Page 2 of 3

Re: LXDE and THE DM and my lxdm

Posted: Mon Sep 07, 2009 4:14 pm
by dgod
in fedora you need pam-devel and libXmu-develto compile it, others may something else.

Re: LXDE and THE DM and my lxdm

Posted: Mon Sep 07, 2009 6:10 pm
by slimtop
Thank you, dgod.

Re: LXDE and THE DM and my lxdm

Posted: Tue Sep 08, 2009 6:25 am
by anubisg1
2 important features you should add are:

capability to run it as a daemon (and then using a PID file)

capability to have a LOG file

works fine, but on openSUSE it's not able to run the consolekit session

Re: LXDE and THE DM and my lxdm

Posted: Tue Sep 08, 2009 9:49 am
by dgod
anubisg1 wrote:2 important features you should add are:

capability to run it as a daemon (and then using a PID file)

capability to have a LOG file

works fine, but on openSUSE it's not able to run the consolekit session
it can run as daemon, use lxdm -d, and have pid file default at /var/run/lxdm.pid
it have log file at /var/log/lxdm.log, but nothing write to it now

not run as consolekit session, is a bug, something should change. From Fedora 11, fedora use the Xsession to start consolekit session, will opensuse follow this? or we have to write diffrent code for different distribution?

Re: LXDE and THE DM and my lxdm

Posted: Tue Sep 08, 2009 10:17 am
by slimtop
Great! Maybe one could modify this Slim init.d-script (ubuntu):

Code: Select all

# Largely adapted from xdm's init script:
# Copyright 1998-2002, 2004, 2005 Branden Robinson <branden@debian.org>.
# Copyright 2006 Eugene Konev <ejka@imfi.kspu.ru>

### BEGIN INIT INFO
# Provides:          slim
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      xfs $named slapd
# Should-Stop:       xfs $named slapd
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop the SLiM daemon.
### END INIT INFO

test -z "$HEED_DEFAULT_DISPLAY_MANAGER" && HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager

DAEMON=/usr/bin/slim
PIDFILE=/var/run/slim.lock

SSD_START_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --startas $DAEMON -- -d"
SSD_STOP_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --retry TERM/5/TERM/5"

case $1 in
  start)
    if [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
       [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
       [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
      echo "Not starting X display manager (slim); it is not the default display manager."
    else
      echo -n "Starting X display manager: slim"
      start-stop-daemon --start --quiet $SSD_START_ARGS || echo -n " already running"
      echo "."
    fi
  ;;

  stop)
    echo -n "Stopping X display manager: slim"
    if ! [ -f $PIDFILE ]; then
      echo -n " not running ($PIDFILE not found)"
    else
      start-stop-daemon --stop --quiet $SSD_STOP_ARGS
      SSD_RES=$?
      if [ $SSD_RES -eq 1 ]; then
        echo -n " not running"
      fi
      if [ $SSD_RES -eq 2 ]; then
        echo -n " not responding to TERM signals"
      else
    if [ -f $PIDFILE ]; then
      echo -n " (removing stale $PIDFILE)"
      rm $PIDFILE
    fi
      fi
    fi
    echo "."
  ;;

  restart)
    $0 stop
    sleep 2
    $0 start
  ;;

  force-reload)
    /etc/init.d/slim restart
  ;;

  *)
    echo "Usage: /etc/init.d/slim {start|stop|restart|force-reload}"
    exit 1
  ;;
esac

# End of file

Re: LXDE and THE DM and my lxdm

Posted: Tue Sep 08, 2009 1:53 pm
by PCMan
Finally get it tested on my system and it works. Great job!
I, however, found one problem.
On ubuntu, /etc/X11/xinit/xinitrc doesn't seem to be executable.
I have to manually chmod +x to make it work.
This should be fixed.

BTW, please put your source code in version control system like svn or git.
Otherwise it's difficult for others to co-work with you.
I'm now developing GTK+-based UI for lxdm and hope that I can finish it soon.

Re: LXDE and THE DM and my lxdm

Posted: Tue Sep 08, 2009 2:37 pm
by dgod
I have put the code at sf under lxde/trunk/lxdm

I have put real session start at /etc/lxdm/Xsession, so /etc/X11/xinit/xinitrc is not important now.

Gtk based UI is really interesting.

Re: LXDE and THE DM and my lxdm

Posted: Wed Sep 09, 2009 7:11 am
by anubisg1
it can run as daemon, use lxdm -d, and have pid file default at /var/run/lxdm.pid
it have log file at /var/log/lxdm.log, but nothing write to it now
i didn't notice that, thanks for the info.
not run as consolekit session, is a bug, something should change. From Fedora 11, fedora use the Xsession to start consolekit session, will opensuse follow this? or we have to write diffrent code for different distribution?
openSUSE use Xsession too, i tested before the code you posted here and no Xsession file was available, using new svn one i finally found, and i discover why it was not working any way.

on openSUSE (and on other distros too) "ck-xinit-session" doesn't exist. Instead "ck-launch-session" exist. I think it's the same with a different name. so please fix it!

Re: LXDE and THE DM and my lxdm

Posted: Wed Sep 09, 2009 2:34 pm
by dgod
now ck-launch-session is default at svn.

Re: LXDE and THE DM and my lxdm

Posted: Thu Sep 10, 2009 11:33 am
by PCMan
I hacked lxdm, and currently the latest code in lxde svn repo is using gtk+ to provide a more descent UI now.
Please get it tested. However, the launch script has some compatibility issues. So it won't work on some distros.
Anyone know what's the better solution?