Take the 2-minute tour ×
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.

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

3 Answers 3

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" ]]
then
  exec startfluxbox
elif [[ $1 == "spectrwm" ]]
then
  exec spectrwm
else
  echo "Choose a window manager"
fi

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

xinit

while appending

gnome-session

in ~/.xinitrc file.

If your system supports runlevel 5 then just hit the command

init 5

share|improve this answer

Your Answer

 
discard

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.