Newbie here.
I primarily use softwares from the Mint's Software Manager.
But sometimes I need to use latest versions of some graphical applications which aren't available over the repo.
I've used Flatpaks and AppImages for this purpose.
I like AppImages more, but I know it lacks the sandboxing feature.
So, I'm intending to run AppImages within Firejail, don't know if it's a good idea, please correct me on that.
I've successfully run AppImages from within the terminal by using the firejail command but wish to do so with the help of GUI, using context menu.
I've written this small firejail.nemo_action file and put it in ~/.local/share/nemo/actions.
Code: Select all
[Nemo Action]
Name=Open in Firejail
Comment=Open "%f" in Firejail with the default profile
Icon-Name=firetools
Exec=firejail --appimage %F
Selection =appimage
Extensions=appimage;
But, I wish to have other options in along with that item like in a tree structure.
Example;
Code: Select all
Open in Firejail > with default profile
> in private mode
> with custom configuration
The commands are available, I need a way to implement these in a tree structure with the context menu.
Please help.
SOLUTION:
Create a file named firejail.nemo_action
Code: Select all
[Nemo Action]
Name=Open in Firejail
Comment=Open "%f" in Firejail
Icon-Name=firetools
Exec=<open_with_firejail.sh %F>
Selection=s
Extensions=appimage;
Dependencies=firejail;zenity;
EscapeSpaces=true
Create a bash file named open_with_firejail.sh
Code: Select all
#!/bin/bash
#Define Choice
CHOICE=$(zenity --forms --width 200 --title "Open with Firejail" --text "Open with Firejail options" --add-combo "Choose option." --combo-values "1. Default|2. Private|3. Offline")
case $CHOICE in
"1. Default")
firejail --appimage "$1";;
"2. Private")
firejail --appimage --private "$1";;
"3. Offline")
firejail --appimage --net=none "$1";;
*)
firejail --appimage "$1";;
esac
exit
Copy both these files to
~/.local/share/nemo/actions
and restart Nemo.