You are not logged in.

#1 2015-06-25 19:06:40

amlamarra
Member
Registered: 2015-06-25
Posts: 50

[SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

I'm still a bit new to linux but love learning. I have a new Arch setup on my laptop using XFCE for my window manager & LXDM for my login manager. I'd like to get my laptop to lock to the LXDM login screen (switch user screen) when I close the lid & it goes to sleep. I've been able to get it to lock with xscreensaver, but I really don't care to have a screensaver on my laptop. I also prefer the more updated look of LXDM. I've been searching the Internet (and these forums) but haven't found the solution to this particular issue, maybe I'm just searching the wrong terms. I got it to lock to LXDM when I use the Super+L command. Just not on sleep.

Last edited by amlamarra (2015-06-30 14:36:34)

Offline

#2 2015-06-26 00:45:51

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: [SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

I presume the Super+L is an xfce4 shortcut. Therefore I would start looking at what that shortcut is configured to run.

Once you know, you can explore different ways of using that same 'shortcut procedure' which fits your needs to lock the screen when sleeping, f.e. using xss-lock.


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

#3 2015-06-28 16:25:01

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

The command to bring up the LXDM lock screen is "lxdm -c USER_SWITCH"
So I can use xss-lock to call that command when the laptop is put to sleep? I was trying to figure it out but still need help. I got xss-lock installed, but I'm not sure where to go from here.

Offline

#4 2015-06-30 03:53:39

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: [SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

As far as I can tell, yes you can use it to call the lock screen when the laptop is put to sleep.
Of course, once you set it up and test it you will know for sure if it works the way you want. Though as said, at least theoretically speaking, it should.

Note though that using xss-lock the lock screen will not only be called when the laptop is put to sleep but also when hibernating, turning off the screen etc. as that is the way xss-lock works. Check its manual for further explanation

As far as I understand it, as you do not mention it to be otherwise, you have installed the non-git version of xss-lock.
If so, I would recommend you to go for the git one.
The one you have installed features a bug, fixed in the git version, where after locking the screen the xss-lock command may appear double in your processes (f.e. in conky) and topping the CPU use. In order to avoid this, install the git one.

Finally, the last step is pretty simple as you can see here (check out the .xprofile part).
Just remember to not use the ampersand (&) as the example (of the user I wanted to credit for the info as it helped myself) is meant for Openbox. There is no need for it in Xfce4.

Just add your personalized line to your 'Session and Startup' (applications autostart), log out and back in again.

Now test and see if it works as planned. If it does, and there are no further questions, mark the thread as solved including [Solved] in its title, if it does not share what you did and how you did it in order to keep working on it.


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

#5 2015-06-30 12:52:41

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

Are you talking about the package xss-lock-git?

I'll get that & try it out.

Edit: That worked!

In my attempt to resolve this issue, I messed around with a lot of stuff so I'm not entirely sure of everything that was needed to get this working, but I believe I only needed to create a ~/.xprofile file and put the following line in there:

xss-lock -- lxdm -c USER_SWITCH &

I have many other questions but I'll keep searching for answers before creating more posts.

Thanks for the help!

Last edited by amlamarra (2015-06-30 14:35:46)

Offline

#6 2015-07-14 00:36:30

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: [SOLVED] Trying to get XFCE to lock to the LXDM login screen on sleep

amlamarra wrote:

Are you talking about the package xss-lock-git?

I'll get that & try it out.

Edit: That worked!

In my attempt to resolve this issue, I messed around with a lot of stuff so I'm not entirely sure of everything that was needed to get this working, but I believe I only needed to create a ~/.xprofile file and put the following line in there:

xss-lock -- lxdm -c USER_SWITCH &

I have many other questions but I'll keep searching for answers before creating more posts.

Thanks for the help!

Yes, I referred to the xss-lock-git package.

You do not include information on what steps you followed therefore thus I can not help finding out what may have gone wrong with regard to that 'lot of stuff' you did.

As a wild guess you may have forgotten to add the full path to the lxdm executable when trying to use the 'Session and Startup' alternative,

xss-lock -- /usr/bin/lxdm -c USER_SWITCH

Anyway, as far as I know, by using the .xprofile file the screen lock will now work independently from your DE or WM of choice; as long as you have lxdm installed that is.


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

Board footer

Powered by FluxBB