Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

  1. #1
    Join Date
    Oct 2011
    Beans
    5

    Question gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    Hi all,

    I appreciate some help in a problem I have with a not-working lock-screen.

    I am using gnome3 on Ubunto 11.10, and I installed xscreensaver, after removing the gnome-screensaver. If I type

    > xcreensaver

    I am able to configure the xscreensaver and everything seems to work.
    However, when I click on 'Lock Screen' from the pull-down menu at it's default location in the top panel on the very right (where you also can choose to lock out, to shut down), nothing happens. The screen is not being locked. And when I try to run it from the command line as follows:

    > xscreensaver-command -lock

    I get a message:

    xscreensaver-command: no screensaver is running on display :0.0

    I have no idea what this message meas, but if anyone has an idea how to 'activate' the 'Lock Screen' that would be really helpful...


    Thanks
    Alex

  2. #2
    Join Date
    Feb 2011
    Beans
    2

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    I get the same exact symptoms, can't seem to figure out why..

    Odd thing is, when I turn off my monitor so ppl don't think my workstation in unlocked when I get back and turn on my monitor the screensaver is active and I am prompted to log in..

    oddities I tell ya~

  3. #3
    Join Date
    Nov 2010
    Beans
    1

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    if you search "lock" from dash, lock screen app for xscreensaver is shown (just discovered this). click and lock...

    the control lock screen appears to be a gnome-screensaver-command (my ctrl-alt-L fails complaining about valid command). so if gnome-screensaver has been removed (per forum advice), then i imaginge control lock screen won't work any more.

  4. #4
    Join Date
    Oct 2011
    Beans
    5

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    Hi,

    Quote Originally Posted by r0bo01 View Post
    if you search "lock" from dash, lock screen app for xscreensaver is shown (just discovered this). click and lock....
    I am not sure what is meant by 'search "lock" from dash'. What does it mean?

    the control lock screen appears to be a gnome-screensaver-command (my ctrl-alt-L fails complaining about valid command). so if gnome-screensaver has been removed (per forum advice), then i imaginge control lock screen won't work any more.
    So I have to re-install gnome-screensaver? Will that be the solution so by clicking on the text ''Lock Screen" in the menu will lock the screen?


    Thanks
    Alex

  5. #5
    Join Date
    Oct 2011
    Beans
    5

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    Hi again,

    I now installed gnome-screensaver again, and now the ''Lock Screen" in the menu does lock my screen! However, it just shows a boring blank screen with no screensaver, which is not what I want.

    Is there really no-one who can help me with that issue? Or could give advise what other forum to try? A screensaver forum, a gnome forum, a whatever forum? Or do I have to code my own operating system so things work? I REALLY would appreciate some help! I want to be able to lock the screen by choosing "Lock Screen" from the menu on the top right where one can log out, and to have a screensaver (preferably one of the xscreensaver) running then!


    Thanks
    Alex

  6. #6
    Join Date
    Aug 2009
    Location
    Las Vegas
    Beans
    62
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    So a few things i discovered... it seems that in the gnome js it specifically calls the dbus for the gnome-screensaver so it doesnt matter if you create a dynamic link to xscreensaver. Following the instructions here:

    Things to tweak after installing ubuntu 11.10

    Specifically
    No screensaver in GNOME 3.2

    GNOME 3 doesn't have a screensaver, just a black screen. If you want to use a screensaver, you can use Xscreensaver - install it using the following commands (this will also remove gnome-screensaver):

    sudo apt-get remove gnome-screensaver
    sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

    Then search for "Screensaver" in the menu and tweak its settings to your needs.

    To add Xscreensaver to startup, open Startup Applications and add "xscreensaver -nosplash".

    Let's also make the lock screen work (CTRL + ALT + L):

    sudo ln -s /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command
    However, that still leaves the menu. Since that is looking for a dbus entry, we will have to create our own...(That part i kinda had to figure out on my own)

    create a script called screenLock.py with the following code in it
    Code:
    #!/usr/bin/python
     
    import dbus
    import dbus.service
    import dbus.glib
    import gobject
    import os
     
    class ScreenDbusObj(dbus.service.Object):
        def __init__(self):
            session_bus = dbus.SessionBus()
            bus_name=dbus.service.BusName("org.gnome.ScreenSaver",bus=session_bus)
            dbus.service.Object.__init__(self,bus_name, '/org/gnome/ScreenSaver')
     
        @dbus.service.method("org.gnome.ScreenSaver")
        def Lock(self):
            os.system( "xscreensaver-command -lock" )
     
     
    if __name__ == '__main__':
        object=ScreenDbusObj()
        gobject.MainLoop().run()
    I placed mine in
    Code:
    ~/.local/share/gnome-shell/customExtensions/screenLock.py
    give it execute permissions (chmod +x) and run it after you've done all of the above...now the menu entry should work.

    Hope that helps everyone out!

  7. #7
    Join Date
    Oct 2011
    Beans
    5

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    Hi,

    this finally seems to work out! Great, thanks a lot!!!

    However, a couple of questions:

    - I had to create the customExtensions directory by myself. Is that directory supposed to have existed before?

    - Do I have to run the python script every time I log-in or reboot the computer? Or is this taken care of automatically?

    Thanks a lot for your great and well-explained help on this issue.


    Cheers
    Alex

  8. #8
    Join Date
    Aug 2009
    Location
    Las Vegas
    Beans
    62
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    You can add it to the autorun menu using the same method you would to add xscreensaver. Just make sure xscreensaver is already running before this runs.

    So in the gnome-shell search for startup applications and add it under there (just like they explain for the xscreensaver -nosplash command).... easy!

    Also, i created the customExtensions directory myself.... since gnome-shell tries to autoload everything inside the actual extensions/ dir i did not want to mess with it by adding a python script in there.
    Last edited by phDaemon; November 2nd, 2011 at 03:31 PM.

  9. #9
    Join Date
    Aug 2009
    Location
    Las Vegas
    Beans
    62
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    You should change the status of this topic to "SOLVED".

    Also, IT IS NOT OK to PM me about the script. If you have any problems with it, open a thread or just follow the instructions here (As they seem to be working for everyone else).

  10. #10
    Join Date
    Apr 2011
    Beans
    1

    Re: gnome3 on ubuntu 11.10 with xscreensaver: lock screen does not work

    Damn it,It Worked after giving me hell.Thanx

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •