How to get gnome-screensaver at startup? (SOLVED)

New to Debian (Or Linux in general)? Ask your questions here!

How to get gnome-screensaver at startup? (SOLVED)

Postby Laurentius » 2017-03-06 04:10

Hello.
I'm having problems with the gnome power settings / gnome-screensaver.
The screensaver seem to be not executing at start up
I set the "Blank screen.... 1 minute" at the power settings, but nothing happens then.

If run gnome-screensaver on a terminal, it starts working (visible on the system monitor) and the screen turns off at the expected time.
So it seems the thing is how to get it running at start up?
I can't find any way to do that.
Should i edit or create a .desktop file? Where (at /etc/xdg/autostart)?
How it should look like?

I also have other problems related to power-setting options: on Tweak tool/Power, I can't choose what to do When Laptop Lid is Closed. There is no option avaiable there... How to fix that?

Thanks.
Laurentius

Debian Jessie
Last edited by Laurentius on 2017-03-07 18:39, edited 1 time in total.
Laurentius
 
Posts: 21
Joined: 2017-01-14 00:52

Re: How to get gnome-screensaver at startup?

Postby debiman » 2017-03-06 06:09

please post the output of
Code: Select all
systemctl --failed --all
id


PS:
while it should Just Work (tm), there's nothing wrong with starting gnome-screensaver manually.
you can add an entry to your startup/autostart applications.
User avatar
debiman
 
Posts: 1539
Joined: 2013-03-12 07:18

Re: How to get gnome-screensaver at startup?

Postby Laurentius » 2017-03-06 14:28

Thank you, debiman.

The outputs:

Code: Select all
canelon3@debtest:~$ systemctl --failed --all
0 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
canelon3@debtest:~$ id
uid=1001(canelon3) gid=1001(canelon3) groups=1001(canelon3),4(adm),27(sudo)
canelon3@debtest:~$


I agree with debiman's PS. My question is How can add such an entry to my startup/autostart applications?
GNOME seem to hide those possibilities from users.
On the Tweak Tool > Start up applications dialog, the package gnome-screensaver is not listed as an avaiable application.

I could make xcreensaver autostart by editing a line in /etc/xdg/autostart/xscreensaver.desktop, adding "GNOME" after "ShowOnlyIn:XFCE;" so it looked like this:

Code: Select all
ShowOnlyIn:XFCE;GNOME


But doing the same with a "gnome-screensaver.desktop" file did not make it run automatically at start up. (Besides the fact that there is no such a file on a default install of GNOME and screensaver loads indeed, so i thought GNOME mannages it in some other way)

I like xscreensaver but i'm afraid i could not mannage it from the GNOME Power Settings.

PS:
If i start gnome-screensaver manually, sometimes it turns the screen off and sometimes it just "turns it black", showing at the top date and time (on its usual position) and username on the top right corner (screen is still on). I'd preffer it always turned the screen off.
Laurentius
 
Posts: 21
Joined: 2017-01-14 00:52

Re: How to get gnome-screensaver at startup?

Postby Laurentius » 2017-03-07 18:38

well, i think i've done it.

I tried again with /etc/xdg/autostart/gnome-screensaver.desktop file.
It seemed to have a couple of bad lines which prevented the app to start. I commented (#) them, log out and in and it worked.

---------------------------
So, is that the way to add a startup application in a "modern" and "user friendly" D.E. like GNOME?
There's no way to make that from the Gnome Tweak Tool / Startup applications, i don't know how to make gnome-screensaver appear on the avaiable app list of it so as to add/remove.

Does anynone know any other way? In the past there seem to be the gnome-session-properties but it seem to be removed since 3.12

PS
Debiman said
while it should Just Work (tm)

Could be that it does not "just work" because i'm using lightdm login session instead of gdm?
Laurentius
 
Posts: 21
Joined: 2017-01-14 00:52

Re: How to get gnome-screensaver at startup?

Postby debiman » 2017-03-10 05:53

Laurentius wrote:So, is that the way to add a startup application in a "modern" and "user friendly" D.E. like GNOME?
loaded question.
loaded answer:
i'd never touch gnome with a 10-foot pole.
i prefer user centric to user "friendly".

There's no way to make that from the Gnome Tweak Tool / Startup applications
that's weird, it should.

Does anynone know any other way?
at the very least you shouldn't have to edit files in /etc. there should be an autostart folder under ~/.config, and copying an existing entry there, then edit it, should do the trick.

Could be that it does not "just work" because i'm using lightdm login session instead of gdm?

that is very well possible.
User avatar
debiman
 
Posts: 1539
Joined: 2013-03-12 07:18

Re: How to get gnome-screensaver at startup? (SOLVED)

Postby Laurentius » 2017-03-12 17:34

Alright. Thank you debiman

Then creating a .desktop file under ~/.config/autostart is the correct and safe way.
Only after that file (gnome-screensaver.desktop) was created on that folder it appeared for me in the Gnome-Tweak-Tool Startup applications list. It didn't before. Now it can be added and removed with that tool.
Laurentius
 
Posts: 21
Joined: 2017-01-14 00:52


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable