- Michael J. Hammel - https://www.graphics-muse.org/wp -

Using remote X applications under Fedora Core 3 (re: xhost usage)

It used to be that you could fairly easily allow remote applications to connect to your X server using just xhost. The criminally insane (re: script kiddies [1]) have caused us all to lock down our systems like a virgin during the dark ages. Fortunately, sitting behind a well plumbed firewall we can ignore these issues (well, for the most part at least). I often run applications on a server to display on my laptop [2]. In order to do this under fedora [3] Core 3 you need to turn off a feature in gdm [4]. GDM is the graphical desktop manager, which is what initializes desktop sessions in the new world order for the linux [5] desktop. Edit the file /etc/x11 [6]/gdm/gdm.conf and look for the entry "DisallowTCP=true". This is likely commented out because the default is to do exactly that – disallow TCP connections to the X server. When this keyword is set to "true" (the default) you can't run an application on the server and display it on your laptop (or other desktop). Setting this to "false" tells GDM to be more permissive. You'll need to restart GDM after you make this change. You can do it manually by killing the processes and restarting them or you can simply log in as root, change to init 3, then change back to init 5. If you do this latter thing, you need to do it from a text (re: console) login and not from the graphical login. Also, you should exit out of all your X sessions before restarting GDM. I just thought I'd throw this on my blog because it is something I have to do a lot when upgrading systems behind the firewall and its a pain to remember how I did it. Now I can just search my own blogs. Gotta love that.

An update [7] to this (2006/06/20):

Fedora Core 5 (and thus gnome [8] 2.14) has removed the gdm.conf file.  In fact, the gdm directory is now under /etc/gdm.  Fortunately, they made it a little easier to configure your X display to allow remote connection.  Just run gdmsetup.  This will open a window with multiple tabs.  In the Security tab, disabled the line that says "Deny TCP connections to the X server".  Close the window and then log out of your current X session.  You need to restart gdm for this to work.    The easiest way to do that is to go to a console login, login as root, change to run level 3 (just type "init 3") and then return to run level 5 ("init 5") to restart gdm.