I've installed Oracle Linux 6.4 (x86_64) on a server as a database server, the packages installed by default didn't include the graphical interface. Following this article, I installed the referred packages and thereafter I could launch the graphical interface using startx after login. Can I make the server start the graphical server before login and actually login using a graphical greeter (if the term was correct!), or I have to log in first then startx after (automatically or manually)?


4 Answers 4


You could try changing the runlevel in the /etc/inittab file from id:3:initdefault: to id:5:initdefault:.

  • Yes. I totally forgot about that.. Was lost looking into the display manager stuff.. I kinda expected after installing graphical server that some package did the inittab for me :)
    – amyassin
    Sep 10, 2013 at 13:19

On my Debian 7 system with the venerable sysVinit and Gnome3 as desktop environment the startup of graphical environment upon change of runlevel to graphical runlevel (runlevel 2, rc2) is carried out by gdm3 init script - /etc/init.d/gdm3, symlinked in /etc/rc2.d/S20gdm3 (/etc/rc2.d/S20gdm3 -> /etc/init.d/gdm3).

gdm3 is responsible for running the Xserver and graphical greeter. If you're planning to use barebone X without any desktop environment, probably, you're going to need analogue of that script for xdm. Otherwise consider installing a desktop environment, such as Gnome or KDE.

If your system already has xdm (and its startup script in /etc/init.d/) installed, you have to start it upon switching to your default runlevel (or change the default runlevel). That is, your /etc/rcX.d (where X is your default runlevel specified in /etc/inittab) must contain script S##xdm, where ## is some number, e.g. 20 (exact number depends on the order, in which you want your init scripts to be executed, because S19 is executed before S20) and S##xdm should be a symlink to /etc/init.d/xdm (run sudo ln -s /etc/init.d/xdm /etc/rcX/S##xdm to create that symlink).

Here you can see an example of XDM configuration: http://tldp.org/HOWTO/XDM-Xterm/config.html


After trying all of your suggestions and failed, I have tried the following: install "GNOME" and then startx ... It worked like a charm, spent all day trying to get from Oracle Linux 7.4 command line to a desktop environment :D


I learned that this changed in Oracle Linux 7 when trying to follow Varad's advice.

If you look at the inittab file on an OL7 system you will see the following:

# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
# To view current default target, run:
# systemctl get-default
# To set a default target, run:
# systemctl set-default TARGET.target

I ran the following:

sudo systemctl set-default graphical.target

and now it boots to GDM (which, of course you must have installed in order for this to work).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.