Please is there a fix to this, i want my music player to keep playing when i lock screen on antergos gnome desktop, i want it to keep playing like ubuntu desktop
music player stop when i lock screen
I don’t particularily know the standard gnome locker (does it even work without gdm? It doesn’t for me), but if you are interested in a custom solution, write here and I’ll tell you how to whip up a nice screen-locking mechanism that does keep playing music (well, I tested with youtube, I don’t have music on my rig atm).
Please point me to a custom solution.
@kellyhose201 If the gnome screenlocker works for you right now, then disable it to potentially avoid conflict.
You need to download the following packages if you don’t already have them:
$ sudo pacman -S scrot i3lock xautolock
Scrot is a screenshot-taking utility, i3lock is a screenlocking utility of the tiling window manager i3 (but it works without i3 too!) and xautolock is a tool for automatic screenlocking.
What you need to do now is to write a shell script with the following in it (for example place it in your home folder for now) (Note: In case you are unfamiliar, you must NOT type out the $ signs, I just use them in this post to indicate script
$ scrot /tmp/screenshot.png
$ convert /tmp/screenshot.png -blur 0x5 /tmp/screenshotblur.png
$ i3lock -i /tmp/screenshotblur.png
Now save this script with some name that doesn’t conflict with other apps (I named it blurlock, it should be fine) and do
$ sudo cp blurlock /bin
(run this command only if you are in the same directory blurlock is now, otherwise you need to give a path for the source file too)
This command will move the shell script “blurlock” to the /bin folder, which means you can execute it without giving a full path. Try it out, open a terminal and type
Now your screen should look like your desktop but blurred. To exit the screen lock, you need to type your password and press enter. Note: There is no prompt to enter your password. You just need to type it. The locking app WILL however give feedback on your typing.
If you are satisfied with the blur effect, cool. If not, you can edit the “convert” part in the shell script. Or, if you don’t want to blur, then you can use a fixed image as the locking screen by omitting every command in the shell script except for the last one, but change the path to an image you’d like to use.
We are almost done, but we want the screen locking to happen automatically after a time. We will use xautolock for that.
In some less complicated desktop environment, this would be simpler but on gnome this will be more complicated.
Creat a file autolock.desktop in ~/.config/autostart (so that the path is ~/.config/autostart/autolock.desktop)
and put into that file the following (once again, no $):
$ [Desktop Entry]
$ Exec=xautolock -time 5 -locker blurlock
Then save the file. Btw, the “5” in the Exec xautlock… command means that autolocking will happen after 5 minutes of idle, modify it if you want.
Afterwards, this should show up in the Gnome Tweak Tools, in the startup applications pane. Set this on startup, logout then login.
Now, after 5 minutes of idle, i3lock should work.
Note: I haven’t tested the whole automatic startup thingy, I used to use this with i3, but running on startup is simpler there. I still use the script on Gnome, but only manually. If the startup thingy doesn’t work, write here and I’ll check it out.
thanks alot, i will give this a trial but how do i disable gnome screen locker?
Dunno, look around settings and the Gnome Tweak Tools. Tbh, I can’t check because for me it doesn’t work without gdm and I don’t use a display manager.