You are not logged in.

#1 2013-10-07 15:32:08

ashwin_cse
Member
Registered: 2013-07-08
Posts: 15

lightdm

Hi,

I recently changed my display manage from xdm to lightdm. xdm used to invoke $HOME/.xinitrc . I am using awesome as my window manager with no DE. I had xautolock invocation and awesome messages being redirected to file (both stdout an dstderr) . Now i see in lightdm never calls this $HOME/.xinitrc . So the xautolock never runs and redirection of awesome never happens. awesomewm launches correctly. I want to know from where does lightdm detects to launch awesome and how do i make the xautolock and redirection work again?

Offline

#2 2013-10-07 15:37:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: lightdm

Have you read https://wiki.archlinux.org/index.php/LightDM ?
https://wiki.archlinux.org/index.php/Li … _from_SLiM says you should use xprofile instead of .xinitrc.

Offline

#3 2013-10-07 16:01:49

ashwin_cse
Member
Registered: 2013-07-08
Posts: 15

Re: lightdm

I assume moving ~/.xinitrc to ~/.xprofile would solve the xautolock problem. But the redirection of awesome output and error stream to file problem ? The slim part states specifically that i should not move the window manager calls to ~/.xprofile I would like to know how has lightdm know that it has to call awesome wm. I read the wiki on lightdm but it does not answer how lightdm has decided to call awesomewm.

Offline

#4 2013-10-07 16:03:59

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: lightdm

.xprofile is like .profile for X, so mainly to set environment variables. To run commands like xautolock, .xsession is more appropriate.

Lightdm reads .desktop files from /usr/share/xsessions to find the available sessions. You get to pick one when you login (unless a specific greeter hides the session list). The latest slim also uses this directory, but it still passes the executable name to .xinitrc. Lightdm uses /etc/lightdm/Xsession.

Last edited by Raynman (2013-10-07 16:06:12)

Offline

#5 2013-10-07 16:27:06

aoba
Guest

Re: lightdm

When I was first messing around with bspwm - whose default examples center on ~/.xinitrc - I used the following two files to get LightDM to use mine.  Maybe this can be an option for you.

/usr/share/xsessions/custom.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Custom
Comment=Launch a session defined by your ~/.xinitrc
Exec=/usr/bin/custom-session
Type=XSession

/usr/bin/custom-session

#!/bin/bash

/bin/bash --login -i $HOME/.xinitrc

Note that I do not know how necessary those options to bash are.  As I recall, I just copied them directly from my slim.conf.

#6 2013-10-07 16:44:53

ashwin_cse
Member
Registered: 2013-07-08
Posts: 15

Re: lightdm

Raynman wrote:

.xprofile is like .profile for X, so mainly to set environment variables. To run commands like xautolock, .xsession is more appropriate.

Lightdm reads .desktop files from /usr/share/xsessions to find the available sessions. You get to pick one when you login (unless a specific greeter hides the session list). The latest slim also uses this directory, but it still passes the executable name to .xinitrc. Lightdm uses /etc/lightdm/Xsession.

I created xautolock.desktop with the following content:

[Desktop Entry]
Name=xautolock
Comment=X server basic screen lock program
Exec=xautolock -time 15 -locker slock "&"
Type=Application

But it never gets called. I have this placed in /usr/share/xsessions/ . There is also awesome.desktop in that path which i have edited like below:

[Desktop Entry]
Name=awesome
Comment=Highly configurable framework window manager
TryExec=awesome
Exec=awesome ">> ~/awesome-stdout.log 2>>/awesome-stderr.log"
Type=Application

That also does not output to those redirections. So i guess /usr/share/xsessions/*.desktop is not being called.

Offline

#7 2013-10-07 17:09:20

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: lightdm

Maybe reread my post? xautolock does not belong there and lightdm lets you pick one of the available sessions; it doesn't "call" desktop files. The Exec line of the desktop file is probably not directly interpreted by a shell, so you need to invoke one explicitly if you want to do redirections. See aoba's example.

Offline

#8 2013-10-07 18:13:50

ashwin_cse
Member
Registered: 2013-07-08
Posts: 15

Re: lightdm

Thanks Raynman, now i understand what is happening. I will implement aoba example and i think it will make it work the way xdm used to do of invoking ~/.xinitrc

Offline

#9 2013-10-07 18:40:13

ashwin_cse
Member
Registered: 2013-07-08
Posts: 15

Re: lightdm

aoba implementation broke the lightdm and the screen would flicker and never reach the login screen. So i removed the custom.desktop and moved back awesome.desktop and got back to working awesomewm.

Offline

#10 2013-10-07 19:03:10

aoba
Guest

Re: lightdm

The example I posted will not work if /usr/bin/custom-session is not executable, or if you fail to launch your WM/session from your ~/.xinitrc .

Board footer

Powered by FluxBB