Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

Suppose I don't start the display manager on boot and login through the terminal. How would I switch my window manager? With gdm or gdm3, you use a scroll box to select it.

share|improve this question
What are you trying to accomplish? When logged in to a tty you don't have a window (no s!) manager. So what window manager do you want to change? – Bananguin Jun 18 '12 at 12:31
up vote 5 down vote accepted

startx and xinit take an X client on their command line. This can be the name of a window manager or session manager.

startx awesome

If you don't pass this argument, then they run the script ~/.xinitrc, which is responsible for starting your window manager. In the absence of this file, they use some system default.

share|improve this answer

The Arch Wiki has an example script that you can include in your .xinitrc to choose a particular window manager when you start X:

# Executed by startx (run your window manager from here)

if [[ $1 == "fluxbox" ]]
  exec startfluxbox
elif [[ $1 == "spectrwm" ]]
  exec spectrwm
  echo "Choose a window manager"

You can then simply issue xinit fluxbox or xinit spectrwm to log into your wm of choice.

If you did want a list of window managers to choose from, you could look at a tool like CDM, the console display manager.

share|improve this answer

If you want to switch to GNOME, run


while appending


in ~/.xinitrc file.

If your system supports runlevel 5 then just hit the command

init 5

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.