LXDE and THE DM and my lxdm

Discussion on LXDE releases and Development. This forum is not the best way to contact the developers, please use the Development mailing list and Sourceforge to interact with them.
dgod
Posts: 9
Joined: Sun Sep 06, 2009 9:16 am

Re: LXDE and THE DM and my lxdm

Post by dgod »

in fedora you need pam-devel and libXmu-develto compile it, others may something else.
slimtop
Posts: 19
Joined: Tue Sep 01, 2009 10:11 am

Re: LXDE and THE DM and my lxdm

Post by slimtop »

Thank you, dgod.
anubisg1
Posts: 12
Joined: Sun May 24, 2009 3:58 pm

Re: LXDE and THE DM and my lxdm

Post 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
dgod
Posts: 9
Joined: Sun Sep 06, 2009 9:16 am

Re: LXDE and THE DM and my lxdm

Post 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?
Last edited by dgod on Tue Sep 08, 2009 10:25 am, edited 1 time in total.
slimtop
Posts: 19
Joined: Tue Sep 01, 2009 10:11 am

Re: LXDE and THE DM and my lxdm

Post 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
PCMan
Posts: 85
Joined: Mon Oct 06, 2008 9:52 am

Re: LXDE and THE DM and my lxdm

Post 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.
dgod
Posts: 9
Joined: Sun Sep 06, 2009 9:16 am

Re: LXDE and THE DM and my lxdm

Post 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.
anubisg1
Posts: 12
Joined: Sun May 24, 2009 3:58 pm

Re: LXDE and THE DM and my lxdm

Post 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!
dgod
Posts: 9
Joined: Sun Sep 06, 2009 9:16 am

Re: LXDE and THE DM and my lxdm

Post by dgod »

now ck-launch-session is default at svn.
PCMan
Posts: 85
Joined: Mon Oct 06, 2008 9:52 am

Re: LXDE and THE DM and my lxdm

Post 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?
Locked