How to change the menu right click on the desktop from Ubuntu Mate 20.04?

Hello,

can anyone pls explain how the menu, which you get with a right mouse click on the desktop, can be edited?
I would like to insert a "start lock screen"-Option to that menu.
I am on Ubuntu Mate 20.04.3 LTS (Focal Fossa).

best regards
EDV

2 Likes

Welcome to Ubuntu MATE community!

Really it is possible. I have a pleasure to increase my python experience.

Here is the link to special Caja-Python extension script which does what you want.

To install it use the following commands:

mkdir -p ~/.local/share/caja-python/extensions/
cd ~/.local/share/caja-python/extensions/
wget -c https://gist.githubusercontent.com/N0rbert/847c5466189eb653efec4ce222d6f71d/raw/d83851157eb12856eed5fcfb90dc40b91851a066/startlockscreencaja.py
caja -q

As the result you will have new item in the Caja dropdown menu:

startlockscreen

and clicking on it will execute mate-screensaver-command --lock command to lock the screen by MATE Screensaver. Note that this menu item is shown only on ~/Desktop folder.

I have tested it on Ubuntu MATE 20.04 LTS, 21.04 and even upcoming 21.10.

Technical details - the script is based on dejadup.py from deja-dup-caja deb-package and its Restore Missing Files... functions.

5 Likes

Hello Norbert_X,

thanks a lot for your solution.
Under no circumstances i would have thought of caja as the originator of this menu.
I really appreciate your help!

best regards
EDV

2 Likes