I wanted to create an option in the context menu to set the clicked picture to current desktop background (just like in Windows).
I read the the nautilus action help but I couldn't figure it out. This is by far the command I could craft: gsettings set org.gnome.desktop.background picture-uri file://$PWD/
What I need:
- A command that correctly sets the current image to be the desktop background
- This command should only appear to the proper files (picture extenstions like .jpg)
EDIT: After v2r answer and this comment , I would like to put more details.
I basically want to refer to "current directory path" and "current file clicked". for "current directory path" I used $PWD (is this the right way ?). I don't know what to use for "current file clicked" but it would be certainly after the path (e.g. $PWD/PIC_NAME.jpg).
The condition of associating this action with pictures (e.g .jpg/.png) is not important now, but I am sure it can be done from Nautilus-action.