Lock desktop when removing the Librem key

Hello, everyone.

Can someone explain to me what exactly i must do with those two files? Which directory am i supposed to put them into, and where can i find those directory?

https://docs.puri.sm/Librem_Key/Getting_Started/User_Manual.html#automatically-lock-the-desktop-when-removing-the-librem-key

Thanks

In the two lines of red text, everything up to the last / is a directory. After that is the file name. So you navigate to the same directories on your computer and put the files there so the file paths match.

@Amstram

Open the terminal application Tilix and run the two following comands:

wget https://docs.puri.sm/_downloads/6d38dd063966ab4052abd58cd617b1e4/85-libremkey.rules

wget https://docs.puri.sm/_downloads/10ed9b281420d0842cc85240943f74e9/gnome-screensaver-lock

This will download to your home folder the two files you need.

After that, run the following commands from the same terminal window;

sudo cp 85-libremkey.rules /etc/udev/rules.d/85-libremkey.rules

sudo cp gnome-screensaver-lock /usr/local/bin/gnome-screensaver-lock

This will copy the two files to the correct directories (folders).

After that is done you can either run the following command:

systemctl restart udev

or just reboot your computer.

Also, you had already made the same question on another thread, I would kindly ask you not to double post. it’s just easier to follow a specific topic and a question if it is all in the same thread.

3 Likes

Pinged the wrong person in this thread, sorry

Hello, and thank you for your answer. I’ve dowloaded the file, but when i try to copy them, i’m asked to enter my password, ans then nothing happen. It’s like the command is ignored. Do I need root privilege to copy thoses files? if so, how can I get it?

edit: i tried sudo -i, gaining root privilege, and i entered the fist copy file command. The answer was than no such file or directory exist…

is there a way to find those folder in the gnome environment and simply drag them? I looked everywhere, i think i must be blind.

If the command above does not work - which would be very strange - you can open Nautilus, type CTRL + L and navigate to the paths by typing admin:///etc/udev/rules.d

If it appears that nothing happened then that means it worked. You can double check by typing “ls /etc/udev/rules.d/” and seeing if the file you just copied is in the output. The ls (lowercase L) command lists all the files and directories in a given location.

1 Like

Also “sudo” is a one-off command that executes the command after it with root privileges.