Monday, October 25, 2010

Adding X windows to an established Linux Server

Ever had a CLI only server and wanted to add X windows to it?  Our environment is very compartmentalized and always asking for help can become cumbersome.  So, we're given Linux servers that do not have X Windows installed on them.  > 99% of the time that's fine.  We have 1 product, however, that MUST be installed from a GUI even though it's on-going execution is through a web interface.  *sigh*

Today I took one of our CLI only servers and started trying to add X to it.  After a lot of troubleshooting I've narrowed that installation down to these packages:

sudo yum install gdm gnome-applets gnome-desktop xorg-x11-server-Xorg.x86_64 gnome-session dbus-x11 gnome-terminal gedit nautilus

Yeah.  It's a RHEL 5.5 machine.  Again, that's what I've got to work with.  Anyway, here's a breakdown:

  • gdm - your window manager
  • xorg-x11 ... - the X server
  • gnome-session and dbus-x11 - those 2 were required for X to allow me to login without any errors, warnings or just not working ;)
  • gnome-desktop - this gave me the icons on the menus instead of red-Xs
  • gnome-applets - this made the trashcan and volume control panel apps stop throwing errors
  • gnome-terminal, gedit and nautilus - those gave me a terminal window, a text editor and a file manager

After installing you can 'telinit 5' to make sure you're good.  If you get a GUI login and can get to a desktop then the only thing left to do is edit /etc/inittab to set the default run level to 5 and when you reboot you're good!

And that's that.  The machine works perfectly and has only the bare minimum to get X up and running.

No comments:

Post a Comment