diff --git a/src/cdm b/src/cdm index 9ec4823..1f1a9aa 100755 --- a/src/cdm +++ b/src/cdm @@ -241,17 +241,17 @@ xstart() { serverargs=":${display} ${serverargs} vt$((xtty+display))" if $(checkyesno loginshell); then - # if [[ ${wm_bin} == "gnome-session" ]]; then + if $(checkyesno consolekit); then nohup ck-launch-session bash --login -c "startx $wm_bin -- ${serverargs}" &> /dev/null & - # else - # nohup bash --login -c "startx $wm_bin -- ${serverargs}" &> /dev/null & - # fi + else + nohup bash --login -c "startx $wm_bin -- ${serverargs}" &> /dev/null & + fi else - # if [[ ${wm_bin} == "gnome-session" ]]; then + if $(checkyesno consolekit); then nohup ck-launch-session startx $wm_bin -- ${serverargs} &> /dev/null & - # else - # nohup startx $wm_bin -- ${serverargs} &> /dev/null & - # fi + else + nohup startx $wm_bin -- ${serverargs} &> /dev/null & + fi fi # There's some kind of race condition: # despite the nohup, if we exit too quickly the session is killed. diff --git a/src/cdmrc b/src/cdmrc index f9bb16e..1f0e459 100644 --- a/src/cdmrc +++ b/src/cdmrc @@ -77,6 +77,11 @@ locktty=no # /dev/null, so you won't see the complaints. loginshell=no +# The use of consolekit has recently become manditory with hal. However, +# some users might prefer not using either one. If you don't want to +# use consolekit, set the following variable to "no". +consolekit=yes + # Additional arguments to pass to X server # When usexinit=yes, we use ~/.xinitrc when it exists or /etc/X11/xinit/xinitrc # when it doesn't. These are passed the chosen window manager as $1; note that