Question

I have installed a new system with xfce4 on debian. My question is how i can make xfce to run on startup? Right now i can only run it with exec ck-launch-session startxfce4.

thanks

Was it helpful?

Solution

From XFCE page on debian

Run Xfce

For GDM/KDM choose xfce4-session.

For startx add in file ~/.xinitrc:

exec ck-launch-session startxfce4

For slim boot session in /etc/slim.conf:

login_cmd exec ck-launch-session /bin/bash -login /etc/X11/Xsession %session

You also can install xdm to login in start Xfce.

OTHER TIPS

Late to the party, but I figured that I'd add my answer anyway.

Taking from aeolist's answer — and hence the Debian wiki — the following will allow you to login using Xfce.

Install SLiM display manager:

$ apt-get install slim

Then edit login_cmd in the SLiM system configuration file (`/etc/slim.conf') to match the following:

login_cmd           exec /bin/sh - ~/.xinitrc %session

Finally, you need to setup the .xinitrc file in your home folder. The following allows you to have several different desktop environments installed:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
        for f in /etc/X11/xinit/xinitrc.d/*; do
                [ -x "$f" ] && . "$f"
        done
        unset f
fi

# Here Xfce is kept as default
DEFAULT_SESSION=startxfce4

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 $DEFAULT_SESSION;;
esac

Note that to launch into one of the above desktop environments from the Xfce display manager, you'll need to add it to the sessions line in /etc/slim.conf.

I'd suggest that you take a good look at the slim.conf file in order to get a sense of what's possible; e.g., the default_user setting could be particularly useful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top