Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could I change screen locker from xscreensaver to slock or so #1378

Open
CoinCheung opened this issue Nov 4, 2017 · 53 comments

Comments

@CoinCheung
Copy link

commented Nov 4, 2017

I am a layman to lxqt, I like this light weight and ease of use on my archlinux. I wonder if I could switch to slock as the default screensaver without recompiling the source code. Now each time I click the 'lock screen' item in the menu, a messagebox comes out saying 'action activate failed, ensure xscreensaver installed and running'. Does that mean I cant use slock in this case, if xscreensaver is the only choice why not simply integrate it to lxqt directly?

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

My 2 cents: If xscreensaver is presupposed (sorry, I don't know that because I don't use screensavers), I think that should be changed. Like LXQt doesn't depend on any WM, it shouldn't depend on any screensaver for the job.

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

And please do something about the message "action activate failed, ensure xscreensaver installed and running"! More and more users have found it annoying.

@agaida

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

@tsujan - me was one of the annoyed people nearly a year ago - but nobody trusted me that i not messed up my installation. This should be a seperated bug with high priority - second thing with high prio is that the screensaver jump in to late if the acitvated thing is triggered.

And now to some misunderstandings - we use xdg-screensaver, nor more not less - so we don't depend on xscreensaver. Aka use whatever your version of xdg-tools support. Period. If something don't work we should yell in the direction of the hard working xdg-people. Maybe they react, if not we have to wait until next July 4th.

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

@palinek, @luis-pereira? I don't have much knowledge about this part of LXQt, so I prefer not to touch it -- unless... I don't know.

@stefonarch

This comment has been minimized.

Copy link

commented Nov 4, 2017

And please do something about the message "action activate failed, ensure xscreensaver installed and running"! More and more users have found it annoying.

Just made a trial and installed gnome-screensaver, disinstalled xscreensaver and "lock screen" from the menu or
xdg-screensaver lock
works, so the text could be changed to "No running screensaver found, be sure to have one installed and running" or similar. Actually I have no idea how many candidates there are out there.

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

I meant the warning itself, not its content.

As I said above, I use no screen saver or locker, so I may be missing something here. However:

(1) The first day I started to use LXQt as my main DE, I encountered that warning and got rid of it somehow.
(2) I remember such complaints by other users, although I don't remember where because it wasn't my concern.

@agaida

This comment has been minimized.

Copy link
Member

commented Nov 5, 2017

The problem is that jwz possible don't play by the rules or something is broken over time in xdg - our problem is that xdg-screensaver is not aware of the used screensaver (and should not be as abstraction layer). So - if we consider our implementation as right, the bug is somewhere else. One can think about jwz what he want to, but normally he knows what he do. So i guess the bug is in xdg-screensaver - and thats a real bugger, because the development is nearly dead (thats why i mentioned the July 4.)

@agaida

This comment has been minimized.

Copy link
Member

commented Nov 5, 2017

BTW - the "fix" for xscreensaver is easy - let xscreensaver do the locking and logic and everything is fine. Just remove the relevant hooks in LXQt and setup xscreensaver right :D

@tsujan

This comment has been minimized.

Copy link
Member

commented Nov 5, 2017

... because the development is nearly dead

There's a problem that reappears again and again in such cases: "Wayland is coming." Wayland has been coming for a long time. Yes, it'll really come at some point and all of us will be afflicted with regressions but it's good to have a problem free x11 system for now.

@MttCastelli

This comment has been minimized.

Copy link

commented Nov 5, 2017

Anyway, I've purged xscreensaver and use x3lock with a Key shortcut (Win+l) from lxqt. But I do agree, if lxqt have a block button inside its own Launcher It should not depends from only one app.

@c-cesar

This comment has been minimized.

Copy link

commented Nov 6, 2017

Maybe the best solution is a config option in where you choose the default screenlocker. We already have this for WM.

@Vladimir-csp

This comment has been minimized.

Copy link

commented Sep 26, 2018

ok, I'll duplicate this here, because this seems to be a better place for it than #1563:

Suggestion: handle this directly in lxqt-session. With 3 configurable commands. Defaults would be:
screensaver daemon: xscreensaver -no-splash
screensaver activation: xdg-screensaver activate
lock screen: xdg-screensaver lock

If a command is empty, associated function would be disabled. User could put alternative lockers, screensavers, etc, with benefit of lxqt-session caring about events and sequences.
Like using just i3lock directly as a locker, or xss-lock as a daemon + loginctl as a locker.

@agaida agaida moved this from Wishlist to Needs triage in Issues Oct 7, 2018

@ricardo0624

This comment has been minimized.

Copy link

commented Jan 2, 2019

lxqt is really good,it is small and enough for me,i think xscreensaver is too ugly,especillay it's log ui,and in my journal ,it often show this error ,I don't know hot to fix this.
12月 27 17:58:00 SSS xscreensaver[851]: pam_unix(xscreensaver:auth): conversation failed
12月 27 17:58:00 SSS xscreensaver[851]: pam_unix(xscreensaver:auth): auth could not identify password for [xx]
integrate other light screenlocker,like i3lock?

@librewish

This comment has been minimized.

Copy link

commented Jan 24, 2019

will it change in 0.14.0 release or it will still show xscreensaver is not installed???

@tsujan

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

... or it will still show xscreensaver is not installed?

I don't have xscreensaver and haven't seen any warning -- if you see one, it should be distro specific. Moreover, xscreensaver timing problems on suspend are fixed.

@agaida Is there any reason to keep this open?

@agaida

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Should have a look into the implementation - esp. the notifications about supported screensavers. Had to look also into the XDG part.

@Vladimir-csp

This comment has been minimized.

Copy link

commented Jan 24, 2019

Moreover, xscreensaver timing problems on suspend are fixed.

<nagging>Not xscreensaver timing problems, just timing problems in general</nagging>

Had to look also into the XDG part.

https://bugs.freedesktop.org/show_bug.cgi?id=108865
Unfortunately xdg utils architecture is monolithic and requires patches to be aware of alternatives, instead of being modular. Please consider 3-command approach in my previous comment, it can both use xdg as backend and allow customization.

@agaida agaida moved this from Needs triage to Medium priority in Issues Feb 22, 2019

@fpesari

This comment has been minimized.

Copy link

commented Jul 28, 2019

lxqt is really good,it is small and enough for me,i think xscreensaver is too ugly,especillay it's log ui,and in my journal ,it often show this error ,I don't know hot to fix this.
12月 27 17:58:00 SSS xscreensaver[851]: pam_unix(xscreensaver:auth): conversation failed
12月 27 17:58:00 SSS xscreensaver[851]: pam_unix(xscreensaver:auth): auth could not identify password for [xx]
integrate other light screenlocker,like i3lock?

I agree, XScreensaver looks straight from the 90s and can turn people away from LxQt, making it look half finished.

@agaida

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

@fpesari - and you prefer bling bling over the only known working and secure solution, right?

@fpesari

This comment has been minimized.

Copy link

commented Jul 28, 2019

@fpesari - and you prefer bling bling over the only known working and secure solution, right?

Well, if I preferred bling bling I think I would be on the issue tracker of a DE that focuses on looks at the expense of everything else 😉

XScreensaver's security does not have anything to do with its looks. Maybe the LxQt project could fork it and improve just its looks a little bit. There are boot menus that look better, and that's even before loading the kernel 🤣

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

… a DE that focuses on looks at the expense of everything else

LXQt look is 100% Qt look and the latter is completely customizable (by using various widget styles). Forcing a specific Qt look on LXQt would be a mistake.

Of course, xscreensaver doesn't belong to LXQt, as Openbox doesn't. None of them is necessary for LXQt. Also see #1378 (comment)

@fpesari

This comment has been minimized.

Copy link

commented Jul 28, 2019

… a DE that focuses on looks at the expense of everything else

LXQt look is 100% Qt look and the latter is completely customizable (by using various widget styles). Forcing a specific Qt look on LXQt would be a mistake.

Of course, xscreensaver doesn't belong to LXQt, as Openbox doesn't. None of them is necessary for LXQt. Also see #1378 (comment)

Yes, but it's an integral part of desktop management.

What about this.

  1. LxQt makes its own logo for XScreenSaver (instead of this) (no security issues)
  2. The default font is changed to the system default (no security issues)

The only radical change would be to rewrite XScreenSaver to use Qt. This could have security issues, I leave comments about that to people more competent than I am, but 1 and 2 should be pretty straightforward.

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

LXQt isn't and won't be an app suite. It doesn't include a widget style, a browser, an email client, an IDE, etc. Users are free to install any app they like.

There's only one necessary program that LXQt doesn't provide, namely window manager, and there are good reasons for that: (1) There are several good DE-independent WMs and there's no point to reinventing the wheel; and (2) Wayland will be the future.

As for the screensaver, maybe you haven't heard of Wayland. Let's suppose a screensaver is "an integral part of desktop management" (I don't agree but don't want to start a discussion either). xscreensaver is the securest X11 based screensaver ever. Gnome and KDE forked their screensavers from it (before that, they used it). Maybe, if X11 had a future, LXQt would make that mistake too. On the contrary, LXQt tries to avoid X11 codes as far as possible.

1 and 2 should be pretty straightforward.

X11-independent patches are welcome.

@fpesari

This comment has been minimized.

Copy link

commented Jul 28, 2019

LXQt isn't and won't be an app suite. It doesn't include a widget style, a browser, an email client, an IDE, etc. Users are free to install any app they like.

I know, that's one of the reasons I use it instead of other DEs 😃

As for the screensaver, maybe you haven't heard of Wayland. Let's suppose a screensaver is "an integral part of desktop management" (I don't agree but don't want to start a discussion either).

I was talking more about its role in screen locking. I think suspension is a very important feature, and screen locking happens to be related to it.

xscreensaver is the securest X11 based screensaver ever. Gnome and KDE forked their screensavers from it (before that, they used it). Maybe, if X11 had a future, LXQt would make that mistake too. On the contrary, LXQt tries to avoid X11 codes as far as possible.

I know about Wayland, the question is "when". And if we take into consideration the life spans of some stable distros, we might be talking about a very long time.

@agaida

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

For a home desktop security concerns should not weight so much (ok, my wife/girlfriend/etc should not be able to search trough my private porn collection, maybe some work etc - just not so important) - but that's different in office environments or with mobile devices. And if i need a screensaver (or better locker) this damn thing should make sure that the screen is really locked 😄

@agaida

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

@wxl mentioned it - we are not bound to xscreensaver, we use xdg-screensaver to do all the things™ - one will find the supported screensavers in the xdg-utils sources, namely in xdg-screensaver.in:

  case "$DE" in
    kde)
      if [ -n "${KDE_SESSION_VERSION}" ]; then
        screensaver_freedesktop "$1"
      else
        screensaver_kde3 "$1"
      fi
      ;;
    gnome_screensaver)
      screensaver_gnome_screensaver "$1"
      ;;

    mate_screensaver)
      screensaver_mate_screensaver "$1"
      ;;

    cinnamon)
      screensaver_cinnamon_screensaver "$1"
      ;;

    xscreensaver)
      screensaver_xscreensaver "$1"
      ;;

    xautolock_screensaver)
      xautolock_screensaver "$1"
      ;;

    xfce)
      [ -n "$DISPLAY" ] && screensaver_xserver "$1"
      ;;

    ''|generic)
      [ -n "$DISPLAY" ] && screensaver_xserver "$1"
      ;;
  esac

@wxl

This comment has been minimized.

Copy link

commented Jul 28, 2019

@agaida is right, but he quoted the meat of the detectDE() function, but that doesn't cover what I suggested. In the "main" of the script are four overrides to the DE detection:

detectDE 
# Consider "xscreensaver" a separate DE 
xscreensaver-command -version 2> /dev/null | grep XScreenSaver > /dev/null && DE="xscreensaver" 
# Consider "gnome-screensaver" a separate DE 
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.ScreenSaver > /dev/null 2>&1 && DE="gnome_screensaver" 
# Consider "mate-screensaver" a separate DE 
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.mate.ScreenSaver > /dev/null 2>&1 && DE="mate_screensaver" 
# Consider "cinnamon-screensaver" a separate DE 
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.cinnamon.ScreenSaver > /dev/null 2>&1 && DE="cinnamon" 
# Consider "xautolock" a separate DE 
xautolock -enable > /dev/null 2>&1 && DE="xautolock_screensaver" 
@agaida

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

@wxl - right, intentionally - and thats illustrates our problem - screensavers that are not in the list will handled as generic. The code you posted is about handling some screensavers as a DE and it boils down that slock and others are not in this list, so the script falls back to generic

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

Sorry, off-topic: Although I knew xscreensaver was a good program, after reading its creator's explanations (@agaida's link), I said to myself, "it's better to have it as long as X11 is alive." Then, I installed xscreensaver, selected "Flurry" and disabled its locker. It's just nice; I'll use it :)

@wxl

This comment has been minimized.

Copy link

commented Jul 28, 2019

@agaida you're right assuming the code can correctly handle those edge cases, which isn't always the case. This is why in this self-same issue @Vladimir-csp linked a bug about an option that wasn't supported. Since xautolock trumps everything and allows the user to specify their locker of choice, that's why I made that particular suggestion.

Also @tsujan does bring up another thought (perhaps not intentionally) that I discovered while trying to address a similar concern downstream that xscreensaver is ugly. It's a moving target with new "hacks" being added all the time. Some of these are really old and perhaps objectively ugly, but some, like Flurry, are not. In fact, it's a port of an OS X screensaver from 2003. In fact, there are two new hacks as of this month according to the changelog: GravityWell and DeepStars, both of which look pretty good. In other words, it's what you make of it.

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

while trying to address a similar concern downstream that xscreensaver is ugly.

Tastes differ. Only ancient monitors needed screensavers. My only reason to use it was that it's beautiful. I played with it for 30 minutes before choosing Flurry. My favorites:

Flurry
Galaxy
Bubble3D
EnergyStream
FontGlide
GLPlanet
IFS
Intermomentary
Stairs
Wormhole

@wxl

This comment has been minimized.

Copy link

commented Jul 28, 2019

Here's all the "keepers" in my mind. The rest can go:

  • attaction
  • decayscreen
  • flame
  • drift
  • goop
  • grav
  • kaleidescope
  • pipes
  • atlantis
  • cage
  • kumppa
  • moire2
  • circuit
  • vermiculate
  • anemone
  • cubenetic
  • euler2d
  • fluidballs
  • flurry
  • glblur
  • atunnel
  • blocktube
  • cubestorm
  • gleidescope
  • hypertorus
  • piecewise
  • surfaces
  • fireworkx
  • interaggregate
  • noof
  • substrate
  • wormhole
  • boxfit
  • celtic
  • cubicgrid
  • glcells
  • hypnowheel
  • klein
  • geodesic
  • unknownpleasures
  • binaryring
  • cityflow
  • projectiveplane
  • romanboy
  • hydrostat
  • splodesic
@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

The rest can go

If anything remains ;)

This indicates that the program is rich -- we have different tastes (yours is more inclusive) but both of us have found more than one favorite. It's anything but ugly. As for its dialogs, I prefer security to unsafe elegance ;)

@wxl

This comment has been minimized.

Copy link

commented Jul 28, 2019

If anything remains ;)

Dude, that's 46 out of like 200.

Also to add to the whole thing about security, there are actual examples of the xscreensaver forks failing to lock the screen. So just because you started with the secure solution doesn't mean you end up with one.

If you want to have a different look but retain security, look at xscreensaver.ad which documents all of its X resources, specifically the section "Colors and fonts for the unlock dialog and splash screen" which includes examples.

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

that's 46 out of like 200.

I liked "only" 10, which was much more than I expected.

there are actual examples of the xscreensaver forks failing to lock the screen.

I don't want to defend a program that I'm not familiar with but that link was about gnome-screensaver.

@wxl

This comment has been minimized.

Copy link

commented Jul 28, 2019

I don't want to defend a program that I'm not familiar with but that link was about gnome-screensaver.

I was referring to your comment that gnome-screensaver derived from xscreensaver. Despite all this, they seem to be confident their code is flawless.

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

Oh, sorry, I misunderstood it! Actually, I was checking a PR and just found it was about gnome-screensaver. I was going to add, "gnome-screensaver was forked from xscreensaver and we know how Gnome devs do things".

@wxl

This comment has been minimized.

Copy link

commented Jul 29, 2019

and we know how Gnome devs do things

And in this I think both you, jwz, and I all agree 🤣

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

I guess jwz knew it long before me. I'm sometimes too optimistic (= silly, in this case): I wasn't sure until Gnome 3.6 came out; only after that, my doubts disappeared ;)

@wxl

This comment has been minimized.

Copy link

commented Jul 29, 2019

For me when I saw the whole "GTK4 is not GTK4" post I was convinced they were insane.

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

LOL!

GTK2 was a decent toolkit; I hoped it would get better with version 3. GTK3 was a good "bad joke" to me because it made me try Qt. GTK4 might be beyond my imagination.

@wxl

This comment has been minimized.

Copy link

commented Jul 29, 2019

GTK is hopefully going to be quite literally beyond my imagination once 18.04 is EoL and we're supporting LXQt full time!

@tsujan

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

Our comments may have gone off-topic but I can't help saying this (very sorry):

When I read these kinds of nonsense (I mean Gnome blogs), I get confused: "Is it really possible that someone thinks in this way?" When someone asks "what's LXQt's goal?" it reminds me of such "goal settings". Talk nonsense passionately and do nonsense afterward. What I like is making LXQt more and more stable and adding more features to it little by little, while keeping it backward-compatible.

@wxl

This comment has been minimized.

Copy link

commented Jul 29, 2019

The functional pragmatism of LXQt is indeed its goal, stated or not 😄

yan12125 added a commit to lxqt/liblxqt that referenced this issue Jul 29, 2019
@yan12125

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

And please do something about the message "action activate failed, ensure xscreensaver installed and running"! More and more users have found it annoying.

Please check lxqt/liblxqt#225.

@Vladimir-csp

This comment has been minimized.

Copy link

commented Jul 30, 2019

Semi-offtopic: https://github.com/google/xsecurelock Oriented at plugging X security holes for screensavers. Works well with xss-lock. I see it as another point in support for triple command configuration approach from my comment.

@yan12125

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Currently liblxqt gives different error messages for different return values from xdg-screensaver. Those messages does not make sense for custom lock commands. I'm fine with dropping those messages and add option(s) for custom lock commands as those error messages are not so useful IMO.

An error occurred starting screensaver. Syntax error in xdg-screensaver arguments.

This happens if xdg-screensaver lock returns 1. I don't think this will ever happen as the lock command is hard-coded.

An error occurred starting screensaver. Ensure you have xscreensaver installed and running.

An error occurred starting screensaver. 'activate' failed. Ensure you have xscreensaver installed and running.

The two messages are for return values 3 and 4. I feel them confusing for both newbies and power users. Also the current command is xdg-screensaver lock instead of xdg-screensaver activate.

An error occurred starting screensaver. Unknown error - undocumented return value from xdg-screensaver: %1.

This message is for other return values. May or may not be useful.

lock screen: xdg-screensaver lock

A potential implementation - if a custom lock command fails, raise the following error message

Failed to run "%1". Ensure you have a compatible screensaver installed and running.

screensaver daemon: xscreensaver -no-splash

Currently lxqt-session will start xscreensaver daemon via a standard XDG .desktop file [1]. That file should be removed/changed in favor of a custom daemon command.

screensaver activation: xdg-screensaver activate

From the perspective of security, activating without locking is not useful. Feel free to open pull requests for that but I'm not going to do that by myself.

[1] https://github.com/lxqt/lxqt-session/blob/master/autostart/lxqt-xscreensaver-autostart.desktop.in

@wxl

This comment has been minimized.

Copy link

commented Jul 31, 2019

Not all locks are screensavers, either. Perhaps to be more generic:

Failed to run  "%1." Ensure you have a locker/screensaver compatible with xdg-screensaver installed and running.
@Vladimir-csp

This comment has been minimized.

Copy link

commented Aug 2, 2019

screensaver activation: xdg-screensaver activate
From the perspective of security, activating without locking is not useful. Feel free to open pull requests for that but I'm not going to do that by myself.

That is about the actual 'saver' part of screensaver that isn't locker. Like X builtin dpms-related stuff and some savers and wrappers that are aware of it.

@yan12125

This comment has been minimized.

Copy link
Member

commented Aug 18, 2019

With lxqt/liblxqt#227, a custom lock command can be set in $XDG_CONFIG_HOME/lxqt/lxqt.conf. For example,

[Screensaver]
lock_command=xsecurelock

The next step can be adding a GUI field for that option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.