summaryrefslogtreecommitdiffstats
path: root/doc/userguide/troubleshooting-network-x.docbook
blob: 45c55196cc2a19f0059d696565cfb0d0d8f5db2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<sect1 id="troubleshooting-network-x">
<sect1info>
<authorgroup>
<author>&J.Hall;</author>
</authorgroup>
</sect1info>
<title>Networking and X</title>
<para>
Misconfigured networking can often be the cause of &kde; applications launching slowly, or in the worst case not launching at all. Your &X-Server; has a very powerful client/server interface and is very network aware.
</para>
<para>
 X uses the hostname to create both a unique key for authorization, and to figure out where (via $<envar>DISPLAY</envar>) to send
 the actual windows it's drawing on screen. If your computer doesn't know it's own name, it will spend inordinate amounts of time
 trying to look itself up, a fate you can avoid by simply teaching your computer what it's own name is.
</para>
<para>
Check your <filename>/etc/hosts</filename> file and ensure there is an entry for localhost that looks
something like this at the top of the file (after any comments).
</para>
<screen>
127.0.0.1	localhost
</screen>
<para>
You also should add your computers fully qualified domain name, short name, and it's usual ip address if it has a static ip. If your ip address is assigned dynamically using <acronym>DHCP</acronym> you can simply use the address for the loopback device.
</para>
<screen>
127.0.0.1	hal.btl		hal 		(for dhcp)
192.168.0.1	hal.btl		hal		(static)
</screen>
<para>
Make sure that your firewall is not so restrictive that it stops packets to the loopback device. For example in iptables if the default rule on the <parameter>INPUT</parameter> chain for this device is set to anything other than <parameter>>ACCEPT</parameter> this will cause performance problems in X. To check this, you can type in:
</para>
<screen>
<prompt>&percnt;</prompt><userinput><command>iptables-save</command> <literal>|</literal> <command>grep</command> <option>lo</option></userinput>
<computeroutput><option>-A</option> <parameter>INPUT</parameter> <option>-i</option> <parameter>lo</parameter> <option>-j</option>  <parameter>ACCEPT</parameter> 
</computeroutput>
</screen>
<para>
The rule <computeroutput><option>-A</option> <parameter>INPUT</parameter> <option>-i</option> <parameter>lo</parameter> <option>-j</option> <parameter>ACCEPT</parameter></computeroutput> should always work, unless there are other misconfigured rules (Such as a <parameter>DROP</parameter> on the <parameter>OUTPUT</parameter> chain)
</para>
</sect1>