You are not logged in.

#1 2011-11-08 12:34:55

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Transition from Slim to Lxdm - tiny guide and hints

Since quite a few threads here concerns slim and it's present shortcomings I'd like to share my experiences on configuring Lxdm as a replacement on openbox. The wiki is OK for lxdm but lacks some bits and pieces which are easy to overlook, and the discussion there is since 2009.

This is for starting Lxdm from /etc/inittab;
* Check your /etc/inittab - my had "/usr/bin/lxdm" as start command which is wrong. Correct was /usr/sbin/lxdm . This is what the wiki says as well BUT the small bin vs. sbin in there was a bummer!
* Lxdm doesn't read your your .xinitrc so one has to move all the startup apps somewhere else. There are alternatives but I tested to move them to /etc/lxdm/PostLogin and it worked fine.
* Lxdm starts a consolekit-session and lxdesession by it self, so those lines can be disregarded from .xinitrc.
* Lxdm doesn't seem to source /etc/profile. My solution was to define PATH in .bashrc instead.

Now everything seems to work as before but a bit better since Lxdm is as slim as Slim but more up to date. There are also more configuration options if you take a look inside /etc/lxdm.

I'm sure there are better ways of doing this and further tips are welcome. I hope some can benefit from this small guide.

EDIT: further delvings into lxdm;

Under certain conditions, like a BIG screen, the login box can be too small, and the documentation for themeing lxdm is not too exhaustive. So edit /usr/share/lxdm/themes/Industrial/gtkrc and put something like;

style "font"
{
font_name = "Sans 64"
}
widget_class "*" style "font"
gtk-font-name = "Sans 64"

in it. Adjust to your needs.

EDIT no 2; /etc/lxdm/PostLogin has /bin/sh as shell and that might be the cause of some problems, like not sourcing .bashrc and other bash related files.

Last edited by swanson (2011-12-18 11:38:36)

Offline

#2 2011-11-08 16:02:01

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: Transition from Slim to Lxdm - tiny guide and hints

Why don't you add this to the wiki? Your information will be seen by, and will help, more people there smile

Offline

#3 2011-11-08 23:19:42

twilight0
Member
From: Greece
Registered: 2011-05-01
Posts: 227
Website

Re: Transition from Slim to Lxdm - tiny guide and hints

You could also use lightdm, instead of lxdm.


Proud Arch Linux user since 2007.

Offline

#4 2011-11-10 23:25:18

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

Mmm. Yes, I hadn't yet noticed the ~/.xinitrc difference. That of course means that I don't use it either, so doesn't matter much, but it is a bit unexpected.

What I wanted to add was that LXDM does not seem to restart the X server on logout which is a bit of a pain. With SLiM, logging out meant a quick restart of the X server meaning it was a quick test of X configuration changes. Now you have to restart, or manually drop to a console-level and back. Bit of a shame that SLiM is too far gone because I did like it better. I tested LightDM as well but I'm not even sure anymore what happened -- but something didn't work...

With respect to sourcing /etc/profile (and ~/.profile): LXDM sources /etc/xprofile and ~/.xprofile, through /etc/lxdm/Xsession. I just changed it to delete the x's, but you could ofcourse symlink as well if you insist...

Last edited by rene (2011-11-10 23:27:23)

Offline

#5 2011-11-11 04:03:35

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Transition from Slim to Lxdm - tiny guide and hints

II haven't noticed the non-restarting but I have this in inittab

x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1

I'll test and log out... hmm - seems you're right, all GUI apps close but no X restart!

Concerning the $PATH problem; I had some scripts and customized *.desktop files that needed the full path, especially to my /home/"user"/bin.

I've had Slim for a couple of years now and it was a nice replacement of GDM. It's sad to see it go.

Last edited by swanson (2011-11-11 04:13:22)

Offline

#6 2011-11-11 07:59:14

axel668
Member
Registered: 2009-08-15
Posts: 168

Re: Transition from Slim to Lxdm - tiny guide and hints

still using slim and don't have issues ... what's actually wrong with it, or rather, why should I switch to lxdm or lightdm in the first place ?


"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
(Mitch Ratcliffe)

Offline

#7 2011-11-11 12:48:10

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Transition from Slim to Lxdm - tiny guide and hints

I likewise use SLiM without issue.  I will continue to use SLiM as long as it works.  I believe the ones that have problems with SLiM have a misconfigured system (i.e. something is wrong in one or more of the following files: /home/~/.xinitrc & /etc/inittab & /etc/slim.conf & /etc/rc.conf).

EDIT:  Nothing against the OP.  The guide is useful for those that want to switch DM's.

Last edited by David Batson (2011-11-11 12:50:32)

Offline

#8 2011-11-11 20:20:52

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

axel668:

SLiM doesn't register its ConsoleKit session correctly. David Batson has worked around this problem by manual additions to his local polkit rules (additions that used to be part of thunar and xfce4-session but were recently deleted from those packages).

Moreover, depending on to what degree you or the programs you use actually rely on ConsoleKit, you may not always notice anything wrong immediately. If you run XFCE, and don't have any local polkit rules, the expectation is that you can't for example reboot or shutdown from the logout dialog. Thunar (the XFCE file manager) will have various problems depending on group ownership, Brasero might fail to eject the CD/DVD at the end of a burn -- and so on.

The idea of ConsoleKit is to have things Just Work and if you also use SLiM, they do not. Even if you don't mind a bit of manual intervention now, having various things break again at every other upgrade, sometimes at times where you don't have the time to go fix things, WILL get on your nerves significantly at some time in the future. Trust me.

SLiM is a stack of dead and abandoned open-source bytes like there are many. Just bury it.

(David: before you comment, please REMOVE the polkit files (and reboot, obviously); I'm not sure that renaming them actually does anything)

Last edited by rene (2011-11-11 20:22:18)

Offline

#9 2011-11-11 20:39:14

Parmazae
Member
From: Kentucky, USA
Registered: 2011-10-10
Posts: 30

Re: Transition from Slim to Lxdm - tiny guide and hints

Like others here I'm still using SliM without any problems but if it's dead software I'm going to have to do something.  I tried LXDM but didn't have something configured quite right and it didn't work.  It loaded just fine but didn't have a theme and it wouldn't log my account in for some reason so I wen't back to SLiM.

Thanks for the suggestion on LightDM.  It looks very promising so I'll be having a go at it when I get a chance smile.


Thanks,
Parmazae

archlinux x86_64

Offline

#10 2011-11-11 21:02:17

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

@ Swanson:

Mmm, problem. I couldn't resist trying a few possibilities as to why David Batson wasn't seeing the trouble, and in doing so, I noticed the arch linux default ~/.xinitrc running dbus-launch from the rules in /etc/X11/xinit/xinitrc.d:

===
[rene@e600 ~]$ cat /etc/skel/.xinitrc
#!/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

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
===

Now, for example "startxfce4" also runs dbus-launch when it's not running already so with respect to that particular issue things still work, but LXDM not running ~/.xinitrc does mean none of the other files in there get run either. Other than the "30-bus" file I also have a "40-libcanberra-gtk-module" in there and that is indeed not being run now with LXDM. That's at least in principle a problem.

It's fixable by the ~/.xprofile path. As said, by default LXDM sources /etc/xprofile and ~/.xprofile (trough /etc/lxdm/Xsession) and I guess I should now transfer that above ~/.xinitrc loop to ~/.xprofile. Sort of sucks though. Leads to the kind of setup where in a year's time you just don't remember what you did to have it all working.

Maybe I'll give LightDM another go after all...

Last edited by rene (2011-11-11 21:04:02)

Offline

#11 2011-11-11 21:59:30

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Transition from Slim to Lxdm - tiny guide and hints

Isn't this were Lxdm's config files come in handy;
default.conf
LoginReady
lxdm.conf
PostLogin
PostLogout
PreLogin
PreReboot
PreShutdown
Xsession

Seems self explanatory to me. And they are in /etc/lxdm which even I hope to remember.

Offline

#12 2011-11-11 22:14:10

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

Well, yes, I agree. If I stick with LXDM, I'll transfer the ~/.xinitrc loop to PostLogin. That's better.

Offline

#13 2011-11-11 22:52:16

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

... assuming it would work, that is. The trouble is:

With ~/.xinitrc, you were expected to also run your window manager / desktop environment from ~/.xinitrc meaning that it was launched from the environment as setup by the earlier statements in ~/.xinitrc. Specifically, setting/adjusting an environment variable is all that /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module does. However, with LXDM the eventual starting of the desktop is by default handled by LXDM itself and does not in fact happen from any environment as setup by PostLogin. PostLogin seems to be run rather than sourced, and its environment is therefore gone when it ends.

So, what I've done after all is (restore /etc/lxdm to pristine state and)

# ln -s profile /etc/xprofile

and create an ~/.xprofile consisting of

===
#!/bin/sh
#
# ~/.xprofile
#
# sourced by /etc/lxdm/Xsession

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

Which works. Oh well.

Offline

#14 2011-11-12 00:37:05

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Transition from Slim to Lxdm - tiny guide and hints

rene wrote:

(David: before you comment, please REMOVE the polkit files (and reboot, obviously); I'm not sure that renaming them actually does anything)

I removed all the polkit files except udisks.pkla.  As a normal user I can log off, shutdown, reboot, suspend, and hibernate from the icon on the taskbar to do all those things in Xfce.  I still need udisks.pkla for thunar to allow me access to my hard drive partitions other than arch as a normal user.  Udisks.pkla was just removed by the maintainer in the latest thunar update.  I submitted a bug report on that.

I tried using lxdm instead of SLiM but saw no change in accessibility in Xfce, so I went back to SLiM.

Offline

#15 2011-11-12 03:27:14

rene
Member
Registered: 2010-08-18
Posts: 36

Re: Transition from Slim to Lxdm - tiny guide and hints

Okay, I seem to have gotten to the heart of the issue now. I bet you have /proc/self/sessionid. See

https://bbs.archlinux.org/viewtopic.php?id=130154

Offline

#16 2011-11-12 07:50:51

axel668
Member
Registered: 2009-08-15
Posts: 168

Re: Transition from Slim to Lxdm - tiny guide and hints

Rene: Thanks, good to know. Next time I switch back to XFCE I will definitely use something else.


"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
(Mitch Ratcliffe)

Offline

#17 2011-11-19 17:57:20

robegrassi
Member
Registered: 2011-11-19
Posts: 13

Re: Transition from Slim to Lxdm - tiny guide and hints

@Parmazae: I had the same problems, I could not login (in my case into xfce) and the theme was not loaded.

I saw in my .xsession-errors that startlxde was called instead of startxfce4, so in my /etc/lxdm/lxdm.conf I changed the line
session=/usr/bin/startlxde
to
session=/usr/bin/startxfce4
and then I could login.

Also, I noticed that lxdm-greeter-gtk is run as user "lxdm", while /etc/lxdm/lxdm.conf is only readable by root. I gave
# chmod +r /etc/lxdm/lxdm.conf
and the theme was successfully loaded.

The only bug I have found is that the label of the text-field for user/password is not themed as defined in the gtkrc file of the theme I use (Arch-Dark). I fixed it by adding this line at the end of /usr/share/lxdm/themes/Arch-Dark/gtkrc:
widget_class "GtkWindow.GtkVBox.GtkAlignment.GtkVBox.GtkAlignment.GtkHBox.<GtkLabel>" style "prompt"

Hope it helps,

Roberto

Offline

#18 2011-11-20 11:42:13

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Transition from Slim to Lxdm - tiny guide and hints

Roberto; where did you find the Arch-Dark lxdm theme?

Offline

#19 2011-11-21 10:18:28

robegrassi
Member
Registered: 2011-11-19
Posts: 13

Re: Transition from Slim to Lxdm - tiny guide and hints

From AUR: http://aur.archlinux.org/packages.php?ID=34358. I did not install that lxdm package (I kept the one from the community repo), but I took the archive arch-dark-theme.tar.gz from the tarball and extracted it in /usr/share/lxdm/themes.

Offline

#20 2011-11-21 16:30:45

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Transition from Slim to Lxdm - tiny guide and hints

Nice! Thx.

Offline

#21 2011-11-21 19:01:11

Evilandi666
Member
Registered: 2010-10-28
Posts: 105

Re: Transition from Slim to Lxdm - tiny guide and hints

robegrassi wrote:

I saw in my .xsession-errors that startlxde was called instead of startxfce4, so in my /etc/lxdm/lxdm.conf I changed the line
session=/usr/bin/startlxde
to
session=/usr/bin/startxfce4
and then I could login.

Also, I noticed that lxdm-greeter-gtk is run as user "lxdm", while /etc/lxdm/lxdm.conf is only readable by root. I gave
# chmod +r /etc/lxdm/lxdm.conf
and the theme was successfully loaded.

Thx! I wondered why lxdm didn't work at all for me. You do not need to change the session, just correct the permissions on /etc/lxdm/lxdm.conf like you described, afterwards the session selections works!

THX THX THX!

Filled a bugreport!

Offline

#22 2012-01-11 21:57:34

Viper_Scull
Member
From: London, UK
Registered: 2011-01-15
Posts: 153

Re: Transition from Slim to Lxdm - tiny guide and hints

Hi. I can't get lxdm to work properly. I think it's dbus and/or console-kit related.
I'm using systemd, wmfs and zsh.

I was using slim with no problem whatsoever. I could mount partitions in PcManFM, reboot, suspend and shutdown via dbus-send, etc.

Now i cant do those things using lxdm

This is my .xinitrc for slim

DEF_SESSION="ck-launch-session dbus-launch"


case $1 in
xfce4)
        exec startxfce4
        ;;
i3)
        SESSION="$DEF_SESSION i3"
        xrdb -merge ~/.Xresources
        start-pulseaudio-x11
        urxvtd -q -o -f
        exec $SESSION
        ;;
*)
        SESSION="$DEF_SESSION wmfs"
        xrdb -merge ~/.Xresources
        start-pulseaudio-x11
        urxvtd -q -o -f
        exec $SESSION
        ;;
esac

This is my /etc/lxdm/Xsesssion

#!/bin/bash

# use bash for "exec -l", howto run login shell by /bin/sh ?

if [ $# -eq 1 -a -n "$1" ]; then
        LXSESSION=$1
else
# default session
        LXSESSION=wmfs
fi

[ -f /etc/profile ] && . /etc/profile
[ -f ~/.zprofile ] && . ~/.zprofile
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile

CK_XINIT_SESSION="/usr/bin/ck-launch-session dbus-launch"
exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\""

I removed the if statements i didnt need and added dbus-launch so it matches the functionality reached by slim with .xinitrc. Without dbus-launch, I cant even see the non-mounted partitions in PCManFM

So, when i boot, everything looks similar:

pstree for slim boot

systemd-+-agetty
        |-console-kit-dae---64*[{console-kit-da}]
        |-3*[dbus-daemon]
        |-dbus-launch
        |-gconfd-2
        |-ntpd
        |-pnmixer---{pnmixer}
        |-polkitd---2*[{polkitd}]
        |-pulseaudio-+-gconf-helper
        |            `-{pulseaudio}
        |-rtkit-daemon---2*[{rtkit-daemon}]
        |-slim-+-X
        |      `-ck-launch-sessi---wmfs
        |-sshd
        |-systemd-kmsg-sy
        |-systemd-logind
        |-systemd-stdout-
        |-udevd---2*[udevd]
        |-upowerd---2*[{upowerd}]
        `-urxvtd---zsh---pstree

pstree for lxdm boot

systemd-+-agetty
        |-console-kit-dae---64*[{console-kit-da}]
        |-3*[dbus-daemon]
        |-dbus-launch
        |-gconfd-2
        |-lxdm-binary-+-X
        |             `-ck-launch-sessi---wmfs
        |-ntpd
        |-polkitd---{polkitd}
        |-pulseaudio-+-gconf-helper
        |            `-{pulseaudio}
        |-rtkit-daemon---2*[{rtkit-daemon}]
        |-sshd
        |-systemd-kmsg-sy
        |-systemd-logind
        |-systemd-stdout-
        |-udevd---2*[udevd]
        |-upowerd---2*[{upowerd}]
        `-urxvtd---zsh---pstree

Sessions for slim

Session2:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-01-11T21:26:16.932202Z'
	login-session-id = '1'
Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ':0.0'
	x11-display-device = ''
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-01-11T21:26:16.486968Z'
	login-session-id = '1'

Sessions for lxdm

Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-01-11T21:59:01.981760Z'
	login-session-id = '4294967295'
Session2:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = FALSE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-01-11T21:59:02.063896Z'
	login-session-id = '4294967295'

But when i try to mount a partition, i get Not authorized when i booted with lxdm.

A strange thing is the login-session-id. Should be 1, but is that long number.

Any ideas?

Last edited by Viper_Scull (2012-01-12 22:51:32)


Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB

Archlinux x86_64 + Openbox

Offline

#23 2012-02-20 09:05:25

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Transition from Slim to Lxdm - tiny guide and hints

Since LXDM had some problems like; /var/log/lxdm.log unreadable due to wrong persmissions and gksudo not working and I couldn't find any solutions anywhere, I switched to LIGHTDM. Lightdm had its problsems too but the wiki page has some solutions; https://wiki.archlinux.org/index.php/Lightdm

Lightdm seems to have a larger user base and that helps problemsolving a lot.

Offline

Board footer

Powered by FluxBB