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



[Print This] By mjhammel ~ June 30th, 2005. Filed under: Linux, X11.

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) 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. In order to do this under Fedora Core 3 you need to turn off a feature in GDM. GDM is the graphical desktop manager, which is what initializes desktop sessions in the new world order for the Linux desktop. Edit the file /etc/X11/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 to this (2006/06/20):

Fedora Core 5 (and thus GNOME 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. 

Tags: , , , ,

Reader's Comments

  1. Remote Login with GDM and VNC on Fedora 11 « Code Ghar | June 11th, 2009 at 1:11 pm

    [...] Tips: Run VNC and GDM for headless boxes; VNC & GDM; Using remote X applications under Fedora Core 3 (re: xhost usage); Possibly related posts: (automatically generated)Debian Lenny Minimal DesktopFTP Server in [...]