- Package:
- xscreensaver
- Source:
- xscreensaver
- Description:
- Screensaver daemon and frontend for X11
- Submitter:
- Thomas Prokosch
- Date:
- 2015-12-25 11:24:04 UTC
- Severity:
- wishlist
On my Xfce powered laptop I am seeing a "New Login" button in xscreensaver's password dialog even though no gdmflexiserver is present. Clicking on the button leaves the screensaver running with an error message saying that gdmflexiserver exited with an error. A check whether a binary exists would be nice prior to running it.
package xscreensaver tags 304406 wontfix severity 304406 wishlist quit Hi, This is checked in compilation-time. I could build a `xscreensaver-nonewlogin' package but I think could be annoying... And if you're using no [x|g|k]dm I guess you should know that there's no option to new login :). That's why I refuse to fix this. Regards, Jose Luis.
package xscreensaver tags 304406 wontfix severity 304406 wishlist quit Hi, This is checked in compilation-time. I could build a `xscreensaver-nonewlogin' package but I think could be annoying... And if you're using no [x|g|k]dm I guess you should know that there's no option to new login :). That's why I refuse to fix this. Regards, Jose Luis.
(1) according to apt-file search, gdmflexiserver is *only* provided
by gdm, not xdm (which I do happen to be running) nor kdm. (kdm
might provide something *like* it, but xscreensaver is hard
coded to have
*newLoginCommand: gdmflexiserver -l -a -c FLEXI_XSERVER
in the binary, so it wouldn't help if it did...)
(2) per debian policy, 7.2 "binary dependencies", xscreensaver needs
at *least* a "Suggests: gdm" to describe the above dependency...
While it would be *better* to see the button go away if it can't
possibly work, I think you at least need to correct the packaging to
reflect the above.
Mark Eichin wrote: Re 2) I have added Suggests: gdm | kdm-gdmcompat To address the original issue of removing the button when the session has not been started by gdm or kdm or there is no gdmflexiserver, I can suggest making a little wrapper that checks for this and sets the newLoginCommand property accordingly before launching the xscreensaver-daemon. For this I would like to know exactly how the xscreensaver-daemon is started in a XFCE session. Can somebody help me with this? Also, in sessions started by gdm the GDMSESSION environment variable is defined. Is there something similar for sessions started by kdm? Or xdm? Tormod
Mark Eichin wrote: Re 2) I have added Suggests: gdm | kdm-gdmcompat To address the original issue of removing the button when the session has not been started by gdm or kdm or there is no gdmflexiserver, I can suggest making a little wrapper that checks for this and sets the newLoginCommand property accordingly before launching the xscreensaver-daemon. For this I would like to know exactly how the xscreensaver-daemon is started in a XFCE session. Can somebody help me with this? Also, in sessions started by gdm the GDMSESSION environment variable is defined. Is there something similar for sessions started by kdm? Or xdm? Tormod
I realize that I have been thinking totally backwards in trying to solve this. Instead of xscreensaver trying to second guess how it has been started and in which environment and figure out which commands it should run, those session managers etc that launch xscreensaver should rather tell xscreensaver if they provide a newLoginCommand in their environment and what command that should be. I haven't got any answer to my request above about how XFCE starts xscreensaver, but I have checked how it is on LXDE. There the lxde-common or lubuntu-default-settings packages provide autostart files which have hardcoded the invocation of "xscreensaver -no-splash". They could instead call their own little wrappers that set the newLoginCommand resource. XFCE and LXDE, which do not have any New Login possibility, could simply set the resource to null. A shell script can do this with: echo "XScreenSaver.newLoginCommand: " | xrdb -merge (I don't think xscreensaver has any other, more elegant way to be handed X resources. Some X applications have for instance a -xrm option to be handed resources directly.) However, the correct thing to do for xscreensaver in the future would be to default to an empty newLoginCommand resource so that XFCE and LXDE do not need to reset it. Those environments that offer New Login (KDE, Gnome) should themselves set it to gdmflexiserver or whatever. Well, Gnome has its own screensaver daemon so they will not care, so it will be up to the users installing xscreensaver there to set the newLoginCommand resource when they start xscreensaver. But before we do this change in xscreensaver, we must ensure KDE etc have been fixed first.
I realize that I have been thinking totally backwards in trying to solve this. Instead of xscreensaver trying to second guess how it has been started and in which environment and figure out which commands it should run, those session managers etc that launch xscreensaver should rather tell xscreensaver if they provide a newLoginCommand in their environment and what command that should be. I haven't got any answer to my request above about how XFCE starts xscreensaver, but I have checked how it is on LXDE. There the lxde-common or lubuntu-default-settings packages provide autostart files which have hardcoded the invocation of "xscreensaver -no-splash". They could instead call their own little wrappers that set the newLoginCommand resource. XFCE and LXDE, which do not have any New Login possibility, could simply set the resource to null. A shell script can do this with: echo "XScreenSaver.newLoginCommand: " | xrdb -merge (I don't think xscreensaver has any other, more elegant way to be handed X resources. Some X applications have for instance a -xrm option to be handed resources directly.) However, the correct thing to do for xscreensaver in the future would be to default to an empty newLoginCommand resource so that XFCE and LXDE do not need to reset it. Those environments that offer New Login (KDE, Gnome) should themselves set it to gdmflexiserver or whatever. Well, Gnome has its own screensaver daemon so they will not care, so it will be up to the users installing xscreensaver there to set the newLoginCommand resource when they start xscreensaver. But before we do this change in xscreensaver, we must ensure KDE etc have been fixed first.
Hi everyone! I've done some search and here is my simple script for new login functionality:------------------------ #!/bin/bash # Issue a "new login" command for currently running login manager. # ...assuming there can be only one. pidof lightdm &> /dev/null && dm-tool switch-to-greeter pidof lxdm &> /dev/null && lxdm -c USER_SWITCH pidof gdm &> /dev/null && gdmflexiserver pidof kdm &> /dev/null && kdmctl reserve ------------------------ Tested with lightdm, although you have to enter password both in lightdm and xscreensaver to return to your session without VT switch. But that's better than nothing. Maybe this bug should be merged with #499909.
xscreensaver ships a xscreensaver-wrapper.sh that detects gdm, lightdm and kdm. So we just need the desktop environments to use this wrapper instead of calling xscreensaver-daemon directly, then we can remove the gdmflexiserver default for newLoginCommand. However I don't know what the status is in KDE, Gnome, Mate or LXDE/XFCE. Or if they don't call xscreensaver-daemon at all, and leave that to any user who installs it.
xscreensaver ships a xscreensaver-wrapper.sh that detects gdm, lightdm and kdm. So we just need the desktop environments to use this wrapper instead of calling xscreensaver-daemon directly, then we can remove the gdmflexiserver default for newLoginCommand. However I don't know what the status is in KDE, Gnome, Mate or LXDE/XFCE. Or if they don't call xscreensaver-daemon at all, and leave that to any user who installs it.
In gdm3 package, there is a /etc/gdm3/Xsession script, and in sddm package, there's a /etc/sddm/Xsession script too. I didn't look for other DMs though. Maybe those scripts could be good place to add code such as: xrdb -merge << EOF *.newLoginCommand: /usr/bin/gdmflexiserver EOF ... and replacing with the appropriate command for the DM we're editing. The right script would be run by its DM, then xscreensaver is started in the user session, with the right newLoginCommand resource. Am I missing something?