Arch linux comes up with pretty good display managers like kdm, gdm etc. These gdms load all the required software and plugins as a default.

If you are an expert user and have multiple desktop environments like lxde, xfce, lxqt, cinnamon, kde, gnome, mate etc and you frequently switch them, then the best way is to use xinitrc to choose the desktop environment.

Lets prepare your pc to use ~/xinitrc to load the desktop environment of your choice.

1. Copy the default xinitrc

$ cp /etc/X11/xinit/xinitrc ~/.xinitrc

NOTE: Remember, lines following exec would be ignored.

2. Append following lines to your ~/.xinitrc


# Here Xfce is kept as default
session=${1:-xfce}

case $session in
    awesome           ) exec awesome;;
    bspwm             ) exec bspwm;;
    catwm             ) exec catwm;;
    cinnamon          ) exec cinnamon-session;;
    dwm               ) exec dwm;;
    enlightenment     ) exec enlightenment_start;;
    ede               ) exec startede;;
    fluxbox           ) exec startfluxbox;;
    gnome             ) exec gnome-session;;
    gnome-classic     ) exec gnome-session --session=gnome-classic;;
    i3|i3wm           ) exec i3;;
    icewm             ) exec icewm-session;;
    jwm               ) exec jwm;;
    kde               ) exec startkde;;
    mate              ) exec mate-session;;
    monster|monsterwm ) exec monsterwm;;
    notion            ) exec notion;;
    openbox           ) exec openbox-session;;
    unity             ) exec unity;;
    xfce|xfce4        ) exec startxfce4;;
    xmonad            ) exec xmonad;;
    # No known session, try to run it as command
    *) exec $1;;
esac

3. Copy the /etc/X11/xinit/xserverrc file to your home directory

$ cp /etc/X11/xinit/xserverrc ~/.xserverrc

4. After that, you can easily start a particular DE/WM by passing an argument, e.g.:

$ startx
$ startx ~/.xinitrc gnome
$ startx ~/.xinitrc kde
$ startx ~/.xinitrc wmaker

That’s it, enjoy folks ๐Ÿ˜‰

Starting applications without a window manager

Most Advanced users willing to execute an application without even using window manager can use following ๐Ÿ™‚

It is possible to start only specific applications without a window manager, although most likely this is only useful with a single application shown in full-screen mode. For example:

~/.xinitrc
...

exec chromium
Advertisements