How do I disable the screen saver in 12.04 system wide?

7,590

Solution 1

This seems to have been solved in an update some time ago. It works now at least.

I also figured out that if there are any problems with server-wide screensaver settings, it's probably related to the power saving features.

Which can be turned off with for examlpe

xset -dpms

Solution 2

The fix:

sessionfile=`find "${HOME}/.dbus/session-bus/" -type f`
export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'`

Now, try running your command again.

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

Stack Overflow is awesome.
:)

Share:
7,590

Related videos on Youtube

Yngvefaen
Author by

Yngvefaen

Updated on September 18, 2022

Comments

  • Yngvefaen
    Yngvefaen over 1 year

    I have a similar problem as this post: How do I turn off the screen saver using the command line?

    However, these new commands (and likewise if I set the options from the GUI) only seem to work if I am actually normally logged in to X.

    I am using an XBMC-only desktop session, and when I type this command:

    gsettings get org.gnome.desktop.screensaver idle-activation-enabled

    I get "true" (which explains why it keeps going blank after 10 mins), but when I type this command:

    gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

    I get the following:

    ** (process:4909): WARNING **: Command line 'dbus-launch --autolaunch=b3ac84dfb4159464a026d84900000006 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

    Is there any way of altering this setting system wide?

  • Ashu
    Ashu about 12 years
    is the link you provided in anyways related to the question????
  • SirCharlo
    SirCharlo about 12 years
    Yes it is. You'll notice, if you read the question and its related answer, that the chap was dealing with the same problem as the OP, and that he also found the solution. I tested it out myself and it works. I didn't want to take credit for sigo's handiwork, ergo the link. Why do you ask?
  • Yngvefaen
    Yngvefaen about 12 years
    That did something, but now i get WARNING **: Could not connect: Connection refused. I read something about that being caused by the terminal not being connected to the x session...any idea how I control that?
  • mikezter
    mikezter over 10 years
    Special thanks for pointing out how to connect to DBUS.