! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
option to not start xscreensaver when starting xfce4
Status:
RESOLVED: WONTFIX
Product:
Xfce-utils
Component:
General

Comments

Description Klas Meder Boqvist 2007-09-28 16:21:33 CEST
when i start xfce4 i do not want xscreensaver to start
but i do want to have it installed
so this patch to the xinitrc
(source path) script/xinitrc
enables that option
Comment 1 Klas Meder Boqvist 2007-09-28 16:26:13 CEST
Created attachment 1375 
the patch
Comment 2 Klas Meder Boqvist 2007-09-28 17:05:02 CEST
same bug/feature request at gentoo http://bugs.gentoo.org/show_bug.cgi?id=194103
Comment 3 Robby Workman editbugs 2008-02-08 22:34:02 CET
Have a look at $PREFIX/bin/xflock4 - a simple edit should do exactly what you want.

That being said, I think maybe this could be an option in the Settings Manager for 4.6, but it's not that big of a deal.

I recommend that this be marked INVALID and that the reporter file a feature request bug if so desired.
Comment 4 Robby Workman editbugs 2008-02-08 22:47:20 CET
Well, I can mostly be ignored on that last comment :/
After further discussion on IRC with the individual who brought this to my attention, I had misunderstood what they wanted, and then failed to actually read the entire bug report.  Just another clueless noob, I am.  ;-)
Comment 5 Brian J. Tarricone (not reading bugmail) 2008-02-08 22:59:23 CET
God, Robby, what are we going to do with you ^_~.

I kinda think that screensaver handling in Xfce is just pretty poor in general.  For people running GDM and gnome-screensaver (maybe for the switch user functionality), it would be nice to have an easy way to make that work.

This is just further cause for a "preferred desktop apps" framework to complement the preferred apps stuff in libexo.  So we could have options for WM (xfwm4, compiz(-fusion), metacity, kwin), desktop/file management (xfdesktop+Thunar, nautilus, ROX), panel (xfce4-panel, gnome-panel, pypanel), screensaver (gnome-screensaver, xscreensaver, xlock only).  Ideally we could ship with a bunch of .desktop files that define the avail applications, and only show those that are actually installed (and allow the user/distros to easily add other options).

This also needs cooperation from xfce4-session, and I'm not sure anyone besides Benny would know the codebase enough to handle that without a lot of work.

Of course, I currently have about 4 unfinished new projects, 3 or 4 modules I maintain (and am behind on bug fixes and enhancements for), so somebody else is gonna have to step up here.

So, to make a long story... less long, maybe we should just accept the $DISABLE_SCREENSAVER patch for now, and punt a good solution to 4.8...
Comment 6 Jarno Suni 2009-01-14 13:33:29 CET
I would go even one step further: option not to start any screensaver when starting xfce. This would be accomplished by adding an appropriate screensaver launcher in Autostarted Applications dialog, in which user can disable it, if needed; no more starting it in xinitrc script separately. Decision of which screensaver to use would be a matter of setting in Preferred Applications dialog.
Comment 7 Brian J. Tarricone (not reading bugmail) 2009-01-14 17:54:43 CET
Yeah, you're right.  There's really little reason why the screensaver needs to be started by xinitrc.  Moving it to autostart would probably be the best idea.  Having a screensaver entry in a 'preferred applications' dialog sounds a bit overkill to me.  I mean, really, how many people really care which screensaver they're using?  And those few that do can live with using autostart.  Unfortunately this is too late for 4.6, though.
Comment 8 Jarno Suni 2009-01-14 19:30:54 CET
(In reply to comment #7)
>  Having a screensaver entry in a 'preferred applications' dialog sounds a bit
> overkill to me.  I mean, really, how many people really care which screensaver
> they're using?  And those few that do can live with using autostart. 

In current procedure installing xsceensaver may have undesired side effects, since it displaces gnome-screensaver: Screen would not be locked after resume from suspend (see http://bugzilla.xfce.org/show_bug.cgi?id=4805#c0 ).

Xfce should know how to lock screen, if such a utility is installed and started. Since the procedure to lock screen varies from a utility to another, user should tell Xfce how to lock screen, or the set of possible utilities should be restricted. Currently the latter option is in use: xflock4 script tests which utility of the three ones known to Xfce is running.
Comment 9 Brian J. Tarricone (not reading bugmail) 2009-01-14 19:36:50 CET
Frankly, I don't want Xfce to support anything but xscreensaver out of the box.  It's the only actual secure, mostly audited screensaver app out there.  gnome-screensaver is crap in this regard, ditto for xlock and xlockmore.  I don't know anything about KDE's screensaver, though.

If people want to use something else, IMHO they're on their own.  I don't really want to provide an explicit GUI for setting the screensaver, but I'm ok with making it possible for knowledgeable users to change it without having to hack the source.
Comment 10 Jarno Suni 2009-01-14 20:13:35 CET
(In reply to comment #9)
> Frankly, I don't want Xfce to support anything but xscreensaver out of the box.
>  It's the only actual secure, mostly audited screensaver app out there. 
> gnome-screensaver is crap in this regard, ditto for xlock and xlockmore.  I

I have not had problems with gnome-screensaver. You can leave message to the locker by it. And like I told in my last reply, xscreensaver does not lock screen after resume from suspend/hibernate.
Comment 11 Brian J. Tarricone (not reading bugmail) 2009-01-14 20:36:36 CET
Whether or not you've had a problem with it is irrelevant to whether or not the app is generally secure.  My opinion and plan stands.
Comment 12 Jarno Suni 2009-01-14 20:52:28 CET
(In reply to comment #11)
> Whether or not you've had a problem with it is irrelevant to whether or not the
> app is generally secure.  My opinion and plan stands.

True in that it is not xscreensaver's fault that it is not called after resume. 

One thing to keep in mind, if screensaver is started in 'autostarted applications': If user wants to run also xflock4 there*, the former should be started first. (One way to do it would be to put them both in a same script.) Anyway, the order in which autostarted applications are started may be relevant.

*) User may want to do it, if he has configured automatic login.
Comment 13 Yves-Alexis Perez editbugs 2009-01-15 06:59:14 CET
(In reply to comment #9)
> Frankly, I don't want Xfce to support anything but xscreensaver out of the box.

Xfce already “supports” gnome-screensaver. xinitrc and xflock4 both run gnome-screensaver *first* if it's installed. There's a patch lying around in bugzilla for making xflock4 activate the *running* screensaver, btw.

Oh, and “forcing” -mode blank for xlock seems to be secure for me. I do that on my own boxes, where I replace this in xflock4.

(In reply to comment #12)
> (In reply to comment #11)
> > Whether or not you've had a problem with it is irrelevant to whether or not the
> > app is generally secure.  My opinion and plan stands.
> 
> True in that it is not xscreensaver's fault that it is not called after resume. 
> 
> One thing to keep in mind, if screensaver is started in 'autostarted
> applications': If user wants to run also xflock4 there*, the former should be
> started first. (One way to do it would be to put them both in a same script.)

xflock4 is just a wrapper to lock the screen. It won't “run” any daemon. It'll start by trying to activate gnome-screensaver, then xscreensaver, and if none of them are present, try to run xlock. Which is not a screensaver but a locker, with no daemon running.
Comment 14 Jarno Suni 2009-01-15 11:23:47 CET
(In reply to comment #13)
> Xfce already “supports” gnome-screensaver. xinitrc and xflock4 both run
> gnome-screensaver *first* if it's installed. There's a patch lying around in
> bugzilla for making xflock4 activate the *running* screensaver, btw.

They run xscreensaver first if it's installed. I didn't find the patch in bugzilla but I added an attachment to Bug 3770.
 
> Oh, and “forcing” -mode blank for xlock seems to be secure for me. I do that on
> my own boxes, where I replace this in xflock4.

Why don't you just replace the respective keyboard shortcut command by "xflock4 -mode blank"?
 
> xflock4 is just a wrapper to lock the screen. It won't “run” any daemon. It'll
> start by trying to activate gnome-screensaver, then xscreensaver, and if none
> of them are present, try to run xlock. Which is not a screensaver but a locker,
> with no daemon running.

It currently starts by checking xscreensaver first.
Comment 15 Yves-Alexis Perez editbugs 2009-01-15 11:34:20 CET
(In reply to comment #14)
> (In reply to comment #13)
> > Xfce already “supports” gnome-screensaver. xinitrc and xflock4 both run
> > gnome-screensaver *first* if it's installed. There's a patch lying around in
> > bugzilla for making xflock4 activate the *running* screensaver, btw.
> 
> They run xscreensaver first if it's installed.

Hmhm, correct. Wonder if it has changed or if I'm just wrong.

> I didn't find the patch in
> bugzilla but I added an attachment to Bug 3770.

You run Debian (or a derivative) where I added a patch to do exactly that.


> 
> > Oh, and “forcing” -mode blank for xlock seems to be secure for me. I do that on
> > my own boxes, where I replace this in xflock4.
> 
> Why don't you just replace the respective keyboard shortcut command by "xflock4
> -mode blank"?

Because some package call xflock4 and I want to support them. And it's the “standard” way to lock screen in Xfce.
Comment 16 Jarno Suni 2009-01-15 13:33:53 CET
(In reply to comment #15)
 
> You run Debian (or a derivative) where I added a patch to do exactly that.

Thanks for it.

> Because some package call xflock4 and I want to support them. And it's the
> “standard” way to lock screen in Xfce.

Which package? That would be an argument to make that change in the script. What is the default mode for the other screensavers? Another argument is that screensaver animation wastes energy ;)
Comment 17 Yves-Alexis Perez editbugs 2009-01-15 14:10:39 CET
(In reply to comment #16)
> (In reply to comment #15)
> 
> > You run Debian (or a derivative) where I added a patch to do exactly that.
> 
> Thanks for it.

Yw
> 
> > Because some package call xflock4 and I want to support them. And it's the
> > “standard” way to lock screen in Xfce.
> 
> Which package?

xfce4-power-manager for example

> That would be an argument to make that change in the script.
> What is the default mode for the other screensavers?

xscreensaver and gnome-screensaver are only “activated” by this script. The config is done elsewhere (using the proper interface). xlockmore doesn't have any configuration…

> Another argument is that
> screensaver animation wastes energy ;)

Yeah. My decision was 50% energy 50% security :)
Comment 18 Jarno Suni 2009-01-29 13:44:42 CET
(In reply to comment #7)
> Yeah, you're right.  There's really little reason why the screensaver needs to
> be started by xinitrc.  Moving it to autostart would probably be the best idea.
>  Having a screensaver entry in a 'preferred applications' dialog sounds a bit
> overkill to me.  I mean, really, how many people really care which screensaver
> they're using?  And those few that do can live with using autostart. 
> Unfortunately this is too late for 4.6, though.

I suppose starting of a screensaver daemon in xinitrc will be quited in later release of Xfce then.
Comment 19 Jarno Suni 2009-01-29 16:16:01 CET
(In reply to comment #9)
> Frankly, I don't want Xfce to support anything but xscreensaver out of the box.

I think your comment is more related to topic of Bug 4417.
Comment 20 Jarno Suni 2009-02-10 09:25:15 CET
(In reply to comment #7)
> Yeah, you're right.  There's really little reason why the screensaver needs to
> be started by xinitrc.  Moving it to autostart would probably be the best idea.

As mentioned earlier in comment #12, order in which autostarted applications are run is unspecified; this is the case especially in Xfce 4.6, since it starts autostarted applications parallel. Starting a screensaver daemon is best to do before them so that is why I am against moving it to autostart. Customizing xinitrc is the best option so far. Se also Bug 4825.
Comment 21 Yves-Alexis Perez editbugs 2009-02-10 09:44:09 CET
(In reply to comment #20)
> (In reply to comment #7)
> > Yeah, you're right.  There's really little reason why the screensaver needs to
> > be started by xinitrc.  Moving it to autostart would probably be the best idea.
> 
> As mentioned earlier in comment #12, order in which autostarted applications
> are run is unspecified; this is the case especially in Xfce 4.6, since it
> starts autostarted applications parallel. Starting a screensaver daemon is best
> to do before them so that is why I am against moving it to autostart.
> Customizing xinitrc is the best option so far. Se also Bug 4825.

If an user want to *lock* the screen he has to make sure the screensaver is started before, sure. But I don't think this corner case should affect all other users. Just use xdg-screensaver; xflock4 or whatever. Even better would be a way to start the screensaver directly in locked state (which is really what you want).
Comment 22 Jarno Suni 2009-02-10 10:14:03 CET
(In reply to comment #21)
> If an user want to *lock* the screen he has to make sure the screensaver is
> started before, sure. But I don't think this corner case should affect all
> other users.

If a customized xinitrc is used under user's home directory, it affects only to that user's xfce startup. Do you think the selection of screensaver to use should affect to all users? (Locking could be done by using the xflock4 script, that can be programmed to use the daemon that is already running.)

> Just use xdg-screensaver; xflock4 or whatever. Even better would
> be a way to start the screensaver directly in locked state (which is really
> what you want).

I am afraid you can't do that by xscreensaver of gnome-screensaver. Do you think there is a risk doing the lock command as a next command after starting a daemon?
Comment 23 Yves-Alexis Perez editbugs 2009-02-10 10:27:09 CET
(In reply to comment #22)
> (In reply to comment #21)
> > If an user want to *lock* the screen he has to make sure the screensaver is
> > started before, sure. But I don't think this corner case should affect all
> > other users.
> 
> If a customized xinitrc is used under user's home directory, it affects only to
> that user's xfce startup. Do you think the selection of screensaver to use
> should affect to all users? (Locking could be done by using the xflock4 script,
> that can be programmed to use the daemon that is already running.)

The thing is, autostarted applications are way easier to edit than xinitrc, for the end-user. I don't know if gnome-screensaver already ship a .desktop autostart file, and I guess xscreensaver doesn't, but they could be shipped by Xfce, disabled by default, and user only has to choose which one he wants. There's xdg-screensaver too, but it's apparently quite insecure, and basically falls back to xscreensver under Xfce anyway.

> I am afraid you can't do that by xscreensaver of gnome-screensaver. Do you
> think there is a risk doing the lock command as a next command after starting a
> daemon?

I don't know, but I'd say that's something which should be designed/implemented in the screensaver themselves.
Comment 24 Jarno Suni 2009-02-10 11:57:09 CET
(In reply to comment #23)

> The thing is, autostarted applications are way easier to edit than xinitrc, for
> the end-user. I don't know if gnome-screensaver already ship a .desktop
> autostart file, and I guess xscreensaver doesn't, but they could be shipped by
> Xfce, disabled by default, and user only has to choose which one he wants.

User should know which screensaver is installed even then. I suppose most end users do not want to change screensaver used by the distribution. If user wants to lock screen automaticly in automatic login, he/she has to start a screensaver daemon before autostarted applications anyway (at least if he/she uses gnome-screensaver or xscreensaver).

I think this bug is more about not changing a screensaver used by Xfce just by installing one. E.g. I changed screensaver used by Xfce accidentally when I installed LXDE desktop environment in Xubuntu (8.10). I think a separate script could be called from xinitrc to start a screensaver daemon; the script could have several commented out start commands (for convenience) and one (uncommented) default start command, say "xscreensaver -no-splash &" to please Brian J. Tarricone. That kind of script would not be so hard to edit. One could edit xflock4 script respectively (so that it would not have to autodetect any running daemon; see Bug 4417). This policy could be informed about in Autostarted apps dialog or in its help.

> There's xdg-screensaver too, but it's apparently quite insecure, and basically
> falls back to xscreensver under Xfce anyway.

"xdg-screensaver lock" seems to exit after doing nothing in my Xubuntu 8.10 where I have gnome-screensaver daemon running.
Comment 25 Yves-Alexis Perez editbugs 2009-02-10 12:27:48 CET
This discussion is leading to nowhere. This is my last comment for now, let this settle down.

(In reply to comment #24)
> User should know which screensaver is installed even then.

Some user don't care which screensaver they use. Some do.

> I suppose most end
> users do not want to change screensaver used by the distribution.

What on multi-user installs? What if I have a user using Xfce with gnome-screensaver, another using Xfce with xscreensaver, another using GNOME, another using KDE, …


> If user wants
> to lock screen automaticly in automatic login, he/she has to start a
> screensaver daemon before autostarted applications anyway (at least if he/she
> uses gnome-screensaver or xscreensaver).

Then I think that, in this corner case (really, who wants to lock the screen at login anyway? Really a corner case), the user (or the site maintainer if this is for a wide installation) can prepare his own script to autostart the run+lock. Or that should be implemented directly in the screensavers, and then port the bug to their bugzilla.



> 
> I think this bug is more about not changing a screensaver used by Xfce just by
> installing one. E.g. I changed screensaver used by Xfce accidentally when I
> installed LXDE desktop environment in Xubuntu (8.10). I think a separate script
> could be called from xinitrc to start a screensaver daemon; the script could
> have several commented out start commands (for convenience) and one
> (uncommented) default start command, say "xscreensaver -no-splash &" to please
> Brian J. Tarricone. That kind of script would not be so hard to edit.

It already exists. It's /etc/xdg/xfce4/xinitrc. No need to seperate that to yet another script. We already have xdg-screensaver and xflock4.

> One could
> edit xflock4 script respectively (so that it would not have to autodetect any
> running daemon; see Bug 4417).

Sure, having each and every user edit scripts in /usr/bin is really better than autodetection…

By the way, I know there are some levels in the parallel startup. All apps starting at one level must have be run before next level is started. So it can easily fix the run+lock problem. I don't know if there's documentation on it, at least there is xfce4-session code. 

Cheers,
--
Yves-Alexis
Comment 26 Jarno Suni 2009-02-10 13:32:27 CET
(In reply to comment #25)
> What on multi-user installs? What if I have a user using Xfce with
> gnome-screensaver, another using Xfce with xscreensaver, another using GNOME,
> another using KDE, …

Different Xfce users could use custom xinitrc (or some other scripts) under their home directory; such scripts should override system-wide conventions.

I don't understand how Gnome ans KDE users are involved.

> really, who wants to lock the screen at
> login anyway?

There are some bug reports against GDM to allow locking on automatic/timed login. Such a feature might be handy especially with old hardware not to have to wait after giving a password. Hibernate does not work with all hardware...

> It already exists. It's /etc/xdg/xfce4/xinitrc. No need to seperate that to 
> yet another script. We already have xdg-screensaver and xflock4.

I just thought it would be easier to edit a separate script than xinitrc.

> Sure, having each and every user edit scripts in /usr/bin is really better than
> autodetection…

Well, scripts could be in /usr/local/bin, too ;) Or under users' home like mentioned earlier. Autodetection is impossible to do in general case. Anyway, that is more matter of Bug 4417.

> By the way, I know there are some levels in the parallel startup. All apps
> starting at one level must have be run before next level is started. So it can
> easily fix the run+lock problem. I don't know if there's documentation on it,
> at least there is xfce4-session code. 

Thanks for the hint. If autostart will be used, better to do it in the first level. And possible locking in the second.
Comment 27 Jarno Suni 2009-02-10 14:15:13 CET
Still I think that starting a daemon in an xinitrc (or in another script called from such a) script would be safer: Instructions to change/add the locking script could be written in the script starting a screensaver daemon. If autodetection is not used, but the daemon is started in autostarted apps, there is a risk that user will change the daemon command, but not the locking command. If ultimate ease of use from end user's point of view is desired, a GUI frontend for changing the two commands could be written and added in the Settings menu.
Comment 28 Jarno Suni 2009-03-26 15:53:43 CET
Created attachment 2256 
diff to xinitrc

Preferred screen saver can be specified in the environment variable SCREEN_SAVER_UTILITY that is used in the patch. If the variable is e.g. empty string, no daemon will be started. (See also Bug 4417)
Comment 29 Brian J. Tarricone (not reading bugmail) 2009-03-26 17:01:15 CET
No, we are absolutely not using environment variables for this.

I have a plan to fix this that I've discussed elsewhere... writing new patches here for the existing system is just a waste of time.
Comment 30 Jarno Suni 2009-03-27 07:46:12 CET
Well, it is wasted already. The preferred desktop apps framework you told about in comment #5 looks elegant and powerful. It is also much bigger project than just fixing this bug, and implementing it relies on the expertise of few people. I hope we get the resources needed to implement it in reasonable time.
Comment 31 Jarno Suni 2009-04-01 10:37:55 CEST
(In reply to comment #9)
> Frankly, I don't want Xfce to support anything but xscreensaver out of the box.
>  It's the only actual secure, mostly audited screensaver app out there. 
> gnome-screensaver is crap in this regard, ditto for xlock and xlockmore.  I
> don't know anything about KDE's screensaver, though.

Can you give any references that show that gnome-screensaver and xlock are insecure?
 
> If people want to use something else, IMHO they're on their own.  I don't
> really want to provide an explicit GUI for setting the screensaver, but I'm ok
> with making it possible for knowledgeable users to change it without having to
> hack the source.

But wouldn't the "preferred desktop apps" framework have GUI for preferences?
Comment 32 Jarno Suni 2009-04-01 10:58:18 CEST
(In reply to comment #29)
> No, we are absolutely not using environment variables for this.

Environment variable is not necessary for this: just replace the reference to the variable by e.g. xscreensaver. xinitrc can be customized for each user account, but that requires hacking the source. Such a case construction is IMO a better template for that than the current one is. But if a more elegant solution makes it to the next release, fine.
Comment 33 Jarno Suni 2011-09-03 20:08:33 CEST
I see in xinitrc that starting a screensaver can be controlled by xfconf-query now.
Comment 34 Jarno Suni 2014-01-03 12:39:42 CET
xinitrc does not start xscreensaver anymore (http://git.xfce.org/xfce/xfce4-session/tree/scripts/xinitrc.in.in)
so it seems like this bug is fixed.
Comment 35 Nick Schermer editbugs 2014-12-03 09:20:12 CET
Close bug reports of archived products.

Bug #3578

Reported by:
Klas Meder Boqvist
Reported on: 2007-09-28
Last modified on: 2014-12-03

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

the patch (552 bytes, patch)
2007-09-28 16:26 CEST , Klas Meder Boqvist
no flags
diff to xinitrc (862 bytes, patch)
2009-03-26 15:53 CET , Jarno Suni
no flags

Additional information