You are not logged in.

#1 2007-10-06 05:37:01

Laplace's Daemon
Member
Registered: 2007-08-14
Posts: 30

Openbox: Lock screen and switch user?

I've started using Openbox a bit recently and I quite enjoy it, but I would like it if I could add options to switch user and to lock the screen, like in KDE or Gnome.  Is there a way to do this?

Offline

#2 2007-10-06 06:33:15

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Openbox: Lock screen and switch user?

The user switching functionality depends on your login manager, not on your graphical environment.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2007-10-06 15:26:25

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Openbox: Lock screen and switch user?

Regardless of your login manager, you should be able to use Xscreensaver to lock the screen, but I do believe the switch user feature is only possible with GDM/KDM. 

http://wiki.archlinux.org/index.php/Xscreensaver

Have a look at above wiki for basic information.  Then, for openbox you can manually lock your machine with a menu item like this:

<item label="Lock"> <action name="Execute"> <execute>xscreensaver-command -lock</execute> </action> </item>

Here's my shutdown menu in its entirety:

        <menu id="64" label="Shutdown">
            <item label="Lock"> <action name="Execute"> <execute>xscreensaver-command -lock</execute> </action> </item>
            <item label="Logout"> <action name="Exit"/> </item>
            <item label="Reboot"> <action name="Execute"> <execute>sudo shutdown -r now</execute> </action> </item>
            <item label="Suspend"> <action name="Execute"> <execute>sudo pm-suspend</execute> </action> </item>
            <item label="Hibernate"> <action name="Execute"> <execute>sudo pm-hibernate</execute> </action> </item>
            <item label="Poweroff"> <action name="Execute"> <execute>sudo shutdown -h now</execute> </action> </item>
        </menu>

Of course, you can also bind the xscreensaver to a keystroke, such as Win+L:

    <keybind key="W-l">
      <action name="Execute">
        <startupnotify>
          <enabled>false</enabled>
          <name>Lock Screen</name>
        </startupnotify>
        <command>xscreensaver-command -lock</command>
      </action>
    </keybind>

Last edited by thayer.w (2007-10-06 15:27:12)


thayer williams ~ cinderwick.ca

Offline

#4 2007-10-06 17:36:48

Laplace's Daemon
Member
Registered: 2007-08-14
Posts: 30

Re: Openbox: Lock screen and switch user?

Thanks thayer!

I am using KDM as my login manager (I was using KDE mainly before and I never switched it), any way I can use it?

Offline

#5 2008-06-27 17:51:49

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox: Lock screen and switch user?

Don't know how KDE does it's screensaver but I use GDM+gnome-screensaver and locking is as easy as:

gnome-screensaver-command -l

The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

Board footer

Powered by FluxBB