Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)?

share|improve this question
up vote 3 down vote accepted

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

share|improve this answer
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 '13 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

share|improve this answer

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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