This forum has been archived. All content is frozen. Please use KDE Discuss instead.

custom path to Firefox as default web browser

Tags: None
(comma "," separated)
apache
Registered Member
Posts
302
Karma
0
OS
Since default applications options got simplified I don't know how to set custom path to Firefox so that it can be open in firejail. I used to use this path

Code: Select all
firejail --private=/home/user/Data/backup/jail/ --profile=/home/user/Data/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox %u


and it worked. When I clicked on a link in Writer it opened this instance of Firefox because in menu I have set this. Now, although nothing changed in menu default Firefox instance is open as if I just typed in terminal:
Code: Select all
firefox

So it opens with different profile.
dzon
Registered Member
Posts
493
Karma
3
apache
Registered Member
Posts
302
Karma
0
OS
It has nothing to do with firejail.

I collect links in Cherrytree. When I have default setting it opens links in firefox that has normal profile in my default home, the same as if in terminal I would type:
Code: Select all
firefox
.

But I can paste in Cherrytree options:
Code: Select all
firejail --private=/home/user/Data/backup/jail/ --profile=/home/user/Data/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox %s &

and it open links correctly in Firefox within firejail with custom home and separate profile.

Also when I run in terminal
Code: Select all
firejail --private=/home/user/Data/backup/jail/ --profile=/home/user/Data/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox https://forum.kde.org/

it opens forum site correctly in firejailed Firefox.

So, if this works correctly my conclusion is that it is a matter of Plasma settings, mimetype or something else. This is what I don't know.

I found this post
viewtopic.php?f=66&t=169397&p=441557&hilit=%22default+application%22#p441557

And I did:
Code: Select all
xdg-settings set default-url-scheme-handler http firefox.desktop
xdg-settings set default-url-scheme-handler https firefox.desktop


In
Code: Select all
/home/user/.local/share/applications/

I have firefox.desktop and firefox-2.desktop
They have both the same content:

Code: Select all
[Desktop Entry]
Actions=NewWindow;NewPrivateWindow;
Categories=GNOME;GTK;Network;WebBrowser;
Comment[pl_PL]=Przeglądanie stron WWW
Comment=Przeglądanie stron WWW
Comment[en_GB]=Browse the World Wide Web
Exec=firejail --private=/home/user/Data/backup/jail/ --profile=/home/user/Data/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox
GenericName[pl_PL]=Przeglądarka WWW
GenericName=Przeglądarka WWW
GenericName[en_GB]=Web Browser
Icon=firefox
Name[pl_PL]=Firefox
Name=Firefox
NoDisplay=false
Path[$e]=
StartupNotify=true
Terminal=0
TerminalOptions=firejail --private=/home/user/Data/backup/jail/ --profile=/home/user/Data/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-MultipleArgs=false
MimeType=x-scheme-handler/http;x-scheme-handler/https;video/webm;text/html;image/png;image/jpeg;image/gif;application/xml;application/xml;application/xhtml+xml;application/x-xpinstall;application/rss+xml;application/rdf+xml;




Now when I click on a link in cherrytree, for example forum address, it says something like
Code: Select all
Firefox can't find file /home/usercache/kioexec/krun/9449_0/unnamed.


Edition:
In
Code: Select all
/home/user/.local/share/applications/

I have firefox.desktop and firefox-2.desktop
should be:
Code: Select all
Exec=firejail --private=/home/kompik/Dane/backup/jail/ --profile=/home/kompik/Dane/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox %u

TerminalOptions=firejail --private=/home/kompik/Dane/backup/jail/ --profile=/home/kompik/Dane/backup/jail/.config/firejail/firefox.local /usr/lib/firefox/firefox %u


This %u is crucial.

I have no idea what it is and how to find more information about it. If anyone knows, please write.

The problem is solved but I will mark it as solved because I want learn more about it.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell