You are not logged in.
HI, I'm relatively new to Arch Linux (I've been using it for two days) and so far I'm enjoying the experience. I am using GDM and Budgie DE. However, I don't know how to configure it so that whenever I click the "lock" button or close the laptop lid it goes to the GDM login. Whenever I close the laptop lid it suspends succesfully, but whenever I open the lid again it goes straight back without showing me the GDM first. Please help, I am really enjoying Arch Linux. (BTW I'm still a newbie at the commands so please post them)
Last edited by Caeruleas (2018-04-22 03:53:38)
Offline
With budgie go to settings/power and them settings/privacy...
Last edited by peterklarc (2018-04-18 13:54:29)
Offline
If you don't manage to get it working through budgie settings you might fix it outside of budgie.
In general it is possible to run commands, like locking the screen, when the computer is put to sleep. See https://wiki.archlinux.org/index.php/Po … leep_hooks for details.
Offline
Thank you for the replies. After some research I found out that I'm supposed to use a locking program such as xscreensaver. I couldn't get the budgie settings to work so I followed JJK's link. I have made the service files and enabled them, but now what?
Running "systemctl status suspend@caeruleas.service" gives:
● suspend@caeruleas.service - User suspend actions
Loaded: loaded (/etc/systemd/system/suspend@caeruleas.service; enabled; vend>
Active: failed (Result: exit-code) since Fri 2018-04-20 10:33:11 NZST; 1min >
Process: 22213 ExecStartPre=/usr/local/bin/music.sh stop (code=exited, status>
Process: 22212 ExecStartPre=/usr/bin/pkill -u root unison (code=exited, statu>
Apr 20 10:33:11 Caeruleas systemd[22213]: suspend@caeruleas.service: Failed to >
Apr 20 10:33:11 Caeruleas systemd[22213]: suspend@caeruleas.service: Failed at >
Running "systemctl status resume@caeruleas.service" gives:
● resume@caeruleas.service - User resume actions
Loaded: loaded (/etc/systemd/system/resume@caeruleas.service; enabled; vendo>
Active: inactive (dead)
I just can't seem to lock the screen successfully.
Last edited by Caeruleas (2018-04-19 23:39:07)
Offline
I'm sorry I was not clear enough in my first post.
You seem to have copy-pasted the suspend@ and resume@ files from the wiki.
However, my intention was that you create a suspend@ service in which the ExecStart field starts your lockscreen (i.e. i3lock or any of these https://wiki.archlinux.org/index.php/Li … n_lockers).
You can just replace all the ExecStartPre, ExecStart, ExecStartPost of the example on the wiki. They are just examples of commands that can be run before suspending.
My suspend@ service looks as follows.
[Unit]
Description=i3lock
Before=sleep.target
[Service]
User=jjk
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock
[Install]
WantedBy=sleep.target
Offline
I'm sorry I was not clear enough in my first post.
You seem to have copy-pasted the suspend@ and resume@ files from the wiki.
However, my intention was that you create a suspend@ service in which the ExecStart field starts your lockscreen (i.e. i3lock or any of these https://wiki.archlinux.org/index.php/Li … n_lockers).
You can just replace all the ExecStartPre, ExecStart, ExecStartPost of the example on the wiki. They are just examples of commands that can be run before suspending.My suspend@ service looks as follows.
[Unit] Description=i3lock Before=sleep.target [Service] User=jjk Type=forking Environment=DISPLAY=:0 ExecStart=/usr/bin/i3lock [Install] WantedBy=sleep.target
Thank you for the reply. I did what you suggested and edited my suspend@caeruleas.service file like so:
[Unit]
Description=xscreensaver
Before=sleep.target
[Service]
User=caeruleas
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/xscreensaver
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target
and the resume@caeruleas.service file:
[Unit]
Description=xscreensaver resume
After=suspend.target
[Service]
User=caeruleas
Type=simple
ExecStart=/usr/bin/mysql -e 'slave start'
[Install]
WantedBy=suspend.target
I ran sudo systemctl enable suspend@caeruleas.service again and started it and it came up with this image.
I guess that's a start, but I tried locking my screen through the budgie panel and tried closing the laptop lid but it didn't work. I think I've got the path to xscreensaver wrong.
More help would be greatly appreciated.
Offline
Budgie-desktop optional deps:
- gnome-screensaver.
pacman -Si budgie-desktop
Offline
It seems that your suspend@ script is working. So I do not think the path is wrong.
Is suspend triggered when you close the laptop lid? If not, see https://wiki.archlinux.org/index.php/Po … CPI_events to suspend on lid close.
Offline
Budgie-desktop optional deps:
- gnome-screensaver.pacman -Si budgie-desktop
sudo pacman -Si budgie-desktop
gives me:
Repository : community
Name : budgie-desktop
Version : 10.4+34+gd6f3519f-1
Description : Modern desktop environment from the Solus Project
Architecture : x86_64
URL : https://budgie-desktop.org/
Licenses : GPL LGPL
Groups : None
Provides : None
Depends On : accountsservice gnome-bluetooth gnome-menus gnome-session
gnome-themes-standard libibus libpeas libwnck3 mutter
Optional Deps : gnome-backgrounds: Default background
gnome-control-center: System settings
gnome-screensaver: Lock screen
network-manager-applet: Network management
Conflicts With : None
Replaces : None
Download Size : 656.80 KiB
Installed Size : 4006.00 KiB
Packager : Balló György <ballogyor+arch@gmail.com>
Build Date : Thu 29 Mar 2018 02:44:57 PM NZDT
Validated By : MD5 Sum SHA-256 Sum Signature
It seems that your suspend@ script is working. So I do not think the path is wrong.
Is suspend triggered when you close the laptop lid? If not, see https://wiki.archlinux.org/index.php/Po … CPI_events to suspend on lid close.
Yes the screen does suspend when I close the lid, but when I open it again the image shows up again and airplane mode is on so I had to close then open the lid again to enable the wifi again. How can I make the lockscreen work? And on a side note, is there a way I can disable it so that it doesn't turn off the wifi whenever I suspend it?
Last edited by Caeruleas (2018-04-21 00:36:06)
Offline
If that image shows up your script is working, the command
xscreensaver
is called on suspend. Maybe the command xscreensaver does not lock the screen.
Anyway, I did not know about the optional dependency of budgie. As you can see in the output of
pacman -Qi budgie-desktop
it lists gnome-screensaver as a dependency to lock the screen. So, probably the easiest way to fix locking the screen now is to disable the script you created, the install gnome-screensaver, then the settings in budgie should work.
Last edited by JJK (2018-04-21 05:57:20)
Offline
Okay, I just gave up with xscreensaver and tried i3lock, and it works perfectly when I close the laptop lid! I don't know what I did wrong with xscreensaver but I like the look of i3lock anyways. Thank you all for your help, but I still have the problem of the lock button not working on Budgie DE. This doesn't bother me as much but it would still be pretty useful if I could use this.
Offline
For the problem with xscreensaver, read the wiki page for it. You were using the wrong command in the script.
For the problem with the lock button, carefully read peterklarc's post and mine, you are missing a dependency.
Last edited by JJK (2018-04-21 06:04:05)
Offline
For the problem with xscreensaver, read the wiki page for it. You were using the wrong command in the script.
For the problem with the lock button, carefully read peterklarc's post and mine, you are missing a dependency.
If the missing dependency is gnome-screensaver, I already have it installed.
Offline
In optional deps did you also installed gnome-control-center?
Because budgie intended to integrate with GNOME applications (until now) Budgie so my first comment I was talking about the settings in the gnome-control-center* not the budgie-settings (*touch the battery icon / power in the panel)
I just reinstalled budgie with optional deps and it's working.
note: check the button hidden under your name - just click on it and the lock button will appear - in the power off button panel.
Last edited by peterklarc (2018-04-21 11:49:58)
Offline
Wow, after a restart everything is working just fine. Thank you so much peterklarc and JJK, this problem was really fustrating because I would need to use this laptop for school and I have a couple of friends that would sieze any chance to snoop on my laptop XD. Again, thank you so much!
Offline
JJK wrote:I'm sorry I was not clear enough in my first post.
You seem to have copy-pasted the suspend@ and resume@ files from the wiki.
However, my intention was that you create a suspend@ service in which the ExecStart field starts your lockscreen (i.e. i3lock or any of these https://wiki.archlinux.org/index.php/Li … n_lockers).
You can just replace all the ExecStartPre, ExecStart, ExecStartPost of the example on the wiki. They are just examples of commands that can be run before suspending.My suspend@ service looks as follows.
[Unit] Description=i3lock Before=sleep.target [Service] User=jjk Type=forking Environment=DISPLAY=:0 ExecStart=/usr/bin/i3lock [Install] WantedBy=sleep.target
Thank you for the reply. I did what you suggested and edited my suspend@caeruleas.service file like so:
[Unit] Description=xscreensaver Before=sleep.target [Service] User=caeruleas Type=forking Environment=DISPLAY=:0 ExecStart=/usr/bin/xscreensaver ExecStartPost=/usr/bin/sleep 1 [Install] WantedBy=sleep.target
and the resume@caeruleas.service file:
[Unit] Description=xscreensaver resume After=suspend.target [Service] User=caeruleas Type=simple ExecStart=/usr/bin/mysql -e 'slave start' [Install] WantedBy=suspend.target
I ran sudo systemctl enable suspend@caeruleas.service again and started it and it came up with this image.
I guess that's a start, but I tried locking my screen through the budgie panel and tried closing the laptop lid but it didn't work. I think I've got the path to xscreensaver wrong.
More help would be greatly appreciated.
use:
User=%i
instead, in order to avoid having user names in your system config
Offline