Firejail: How to automatically open PDF viewer firejailed when opening a pdf file?

Created on 15 Jun 2019  路  2Comments  路  Source: netblue30/firejail

How to automatically open the PDF viewer program firejailed when opening (double clicking) a pdf file? Or at least prevent viewing the pdf non firejailed?

question

Most helpful comment

@spinnaker1 Firejail comes with a tool called firecfg to automate things like this. It has its own manual page (man firecfg), but there's also more info in the DESKTOP INTEGRATION section of man firejail. Creating a symbolic link to /usr/bin/firejail under the name of your PDF viewer program in /usr/local/bin (or any other path that has precedence in your PATH) will start it in a firejail sandbox.

It's quite easy, just experiment a while and decide what works best for you. Either firejailing individual programs yourself via symlinks or using firecfg (which creates symlinks for all the currently supported programs at once). Hope this helps. Enjoy :)

All 2 comments

@spinnaker1 Firejail comes with a tool called firecfg to automate things like this. It has its own manual page (man firecfg), but there's also more info in the DESKTOP INTEGRATION section of man firejail. Creating a symbolic link to /usr/bin/firejail under the name of your PDF viewer program in /usr/local/bin (or any other path that has precedence in your PATH) will start it in a firejail sandbox.

It's quite easy, just experiment a while and decide what works best for you. Either firejailing individual programs yourself via symlinks or using firecfg (which creates symlinks for all the currently supported programs at once). Hope this helps. Enjoy :)

@spinnaker1 since it seems like your questions were answered, I'll go ahead and close this. Feel free to re-open if you have more questions!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fincer picture Fincer  路  4Comments

dandelionred picture dandelionred  路  3Comments

thiswillbeyourgithub picture thiswillbeyourgithub  路  3Comments

kmotoko picture kmotoko  路  3Comments

ghost picture ghost  路  3Comments