<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
You can have you cake and eat it too, just do:<br>
dpkg-divert --add --no-rename
/usr/share/applications/firefox.desktop<br>
That will tell the packaging system to write any future version of
/usr/share/applications/firefox.desktop file to
/usr/share/applications/firefox.desktop.distrib instead so your
local changes won't be over written... and if you find that stuff is
acting weird in the future you can look in
/usr/share/applications/firefox.desktop.distrib and see if anything
has changed, and apply it to your locally changed version.<br>
<br>
Brian Cluff<br>
<br>
<div class="moz-cite-prefix">On 3/23/21 9:12 PM, Steve B via
PLUG-discuss wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAHWJ+7ivCkU1hH6eKiDKwZ_Z9OeNYs9g6vc_VoGhJmNeX7dcg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Success - I could not get any farther than what I
posted the other day using
~./local/share/applications/sandfox.desktop, but I achieved 100%
success by editing /usr/share/applications/firefox.desktop.
<div><br>
</div>
<div>Under the main {Desktop Entry] I appended "sandbox" to the
Actions parameter and then created a new [Desktop Action
sandbox] submenu with the lines:</div>
<div>[Desktop Action sandbox]<br>
Name=Open in a sandbox<br>
Exec=firejail --apparmor --private --dns=89.233.43.71
--net=eno1 --netfilter=/etc/firejail/<a
href="http://nolocal.net" moz-do-not-send="true">nolocal.net</a>
--seccomp firefox -no-remote<br>
</div>
<div><br>
</div>
<div>Now if I right click on Firefox I have "Open in a new
window", "Open in a new private window" and "Open in a
sandbox". A quick "firejail --list" confirms firefox is
running with the full parameter string. Yes, I'll have to add
it every time Firefox updates, but for now I'm willing to live
with that. Gives me motivation to look into John's suggestion
of learning to patch the file.</div>
<div><br>
</div>
<div>Also found that my firejail-profile package was corrupted
and that is why I could not get --net= to work. Purged and
reinstalled the package which solved that problem.<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021 at 9:35
PM Brian Cluff via PLUG-discuss <<a
href="mailto:plug-discuss@lists.phxlinux.org"
moz-do-not-send="true">plug-discuss@lists.phxlinux.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> That's what we are talking about. You can put your own
firefox.desktop file in ~/.local/share/applications/ and it
will supersede the package installed version of the file.
I've found just about everything in linux has a similar
directory hierarchy so you have control over a complete
system and/or individual program by putting alternative
versions of config files in their proper places.<br>
<br>
According to the spec
(<a
href="https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html"
target="_blank" moz-do-not-send="true">https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html</a>)
the order that the .desktop files are searched for is in
$XDG_DATA_DIRS and the first one found is used.<br>
<br>
Brian Cluff<br>
<br>
<div>On 3/22/21 6:40 PM, Michael Butash via PLUG-discuss
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>You know, I fscking hate this between distros, but
for arch on mine, it's
/usr/share/applications/firefox.desktop, and every
time I update it resets to defaults I hate. I keep a
copy of firefox.desktop as I need a menu to create a
"choose profile" menu for firefox when I need many
profiles for different customers, all with their own
needs like different google and microsith profiles for
orfice365. Make sure you're hitting the right file
for the distro as different from deb/ubuntu/mint.<br>
</div>
<div><br>
</div>
<div>I'd say copy a working entry outside where you find
the *.desktop files, and just replace what works in a
remote location to upgrade when your dist. Firefox is
the only thing to overwrite and piss me off every time
that I know to copy this when I update. I normally
just right click and do "Choose profile" for firefox
for the plethora of profiles, adding that option to my
firefox.desktop file, but apparently I'm the only
person to do this, so shenanigans needed. Same as
yours I presume. Start with a working one at least.<br>
</div>
<div><br>
</div>
<div>I need to play with this some, as I'd love to
relaunch my 6-7 firefox profiles automatically, and
not screw with my options to launch manually. I'm
sure there are easier ways to do this normally, but
I'm lazy to do so. /me shrugs</div>
<div><br>
</div>
<div>-mb</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021
at 11:31 AM Steve B via PLUG-discuss <<a
href="mailto:plug-discuss@lists.phxlinux.org"
target="_blank" moz-do-not-send="true">plug-discuss@lists.phxlinux.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div>Thank you. The original goal was to add it to
the menu in Pop OS. I'll look again, but don't
recall seeing it after I created it in
~/.local/share/applications. Do I need to use
"--register-app" to add it, or should it just show
up?<br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Mar
20, 2021, 10:30 PM Brian Cluff via
PLUG-discuss <<a
href="mailto:plug-discuss@lists.phxlinux.org"
target="_blank" moz-do-not-send="true">plug-discuss@lists.phxlinux.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> A desktop file is standardized
configuration file for Linux desktops that
describe how to represent a program in the
menus (complete with multiple language
support), and how to launch it. So you
can't just launch it directly because it
doesn't mean anything to the command line.
It should however be showing up in your
menus now and so you can put it in your
favorites and easily launch it that way.<br>
<br>
That being cause, you can kinda turn it into
an executable by adding something like the
following to the very top of the desktop
file:<br>
#!/usr/bin/kioclient5 exec<br>
<br>
That will tell the system to execute the
desktop file with kioclient... of course you
need to be running KDE for that to work
correctly. I'm not sure what the GNOME
equivalent of that command is.<br>
<br>
Personally I would just pretty alt+F2 or
alt+space may work as well and just start to
type "Sandboxed Web Browser" and you may
only have to type Sand or so before you can
press enter and have it launch.<br>
<br>
Alternatives to starting it from the command
line:<br>
Create a file called sandfox in
/usr/local/bin/ and put the following into
it.<br>
#!/bin/bash<br>
/usr/bin/firejail --apparmor firefox $@<br>
<br>
Then set it to be executable and then you
can execute sandfox from anywhere.<br>
<br>
You could also set and alias with:<br>
alias sandfox="/usr/bin/firejail --apparmor
firefox"<br>
<br>
That will allow you to type sandfox and
internally it will replace that with
"/usr/bin/firejail --apparmor firefox".
That should also work in most places equally
well, but only for your username.<br>
That's a one shot way of making that
available. If you want it to be permanent
you'll need to add that line to your .bashrc
file with:<br>
echo alias sandfox='"/usr/bin/firejail
--apparmor firefox"' >>~/.bashrc<br>
<br>
I can't remember what your original goals
were, so I hope the above isn't completely
shooting the dark.<br>
<br>
Brian Cluff<br>
<br>
<div>On 3/19/21 10:25 PM, Steve B via
PLUG-discuss wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>I took Brian's recommendation and
created a file in
~/.local/share/applications called
sandfox.desktop. Contents of that file
are:</div>
<div><br>
</div>
<div>[Desktop Entry]<br>
Encoding=UTF-8<br>
Type=Application<br>
Icon=/home/steve/Pictures/firejailed_firefox128.png<br>
Exec=/usr/bin/firejail --apparmor
firefox<br>
Name=Sandboxed Web Browser<br>
Terminal=false<br>
</div>
<div><br>
</div>
<div>I have it set to executable but
when i try to run it
"./sandfox.desktop" I get the error:</div>
<div>./sandfox.desktop: line 1:
[Desktop: command not found<br>
./sandfox.desktop: line 5: --apparmor:
command not found<br>
./sandfox.desktop: line 6: Web:
command not found<br>
</div>
<div><br>
</div>
<div>Is my file misconfigured or what do
I not have correct?</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><br>
</div>
<div dir="ltr" class="gmail_attr"><br>
</div>
<div dir="ltr" class="gmail_attr">On
Fri, Dec 25, 2020 at 5:47 PM Brian
Cluff via PLUG-discuss <<a
href="mailto:plug-discuss@lists.phxlinux.org"
rel="noreferrer" target="_blank"
moz-do-not-send="true">plug-discuss@lists.phxlinux.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> Under debian based distros,
overriding an overwrite of ANY
installed file is easily done.<br>
There's a really cool tool called
dpkg-divert that the system uses
to take whatever files would
normally be installed and steer
them into a different place so
that you can put your own version
of the file in the same place
without fear of it going away on
the next update.<br>
<br>
Just do:<br>
dpkg-divert --add --rename
/usr/share/applications/firefox.desktop<br>
<br>
In this case, that would be the
overkill and less correct way of
handing the problem. A better way
would be to put your own version
of the firefox.desktop into
certain directories and that cause
it to override the system version
of the config. Put them in
~/.local/share/applications/ to
change an individual user and<code></code>
/usr/local/share/applications/ to
effect every user on the system.<br>
<br>
Brian Cluff<br>
<br>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>---------------------------------------------------
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" rel="noreferrer" target="_blank" moz-do-not-send="true">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
</blockquote>
<br>
</div>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a
href="mailto:PLUG-discuss@lists.phxlinux.org"
rel="noreferrer" target="_blank"
moz-do-not-send="true">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your
mail settings:<br>
<a
href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote>
</div>
</div>
</div>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a
href="mailto:PLUG-discuss@lists.phxlinux.org"
target="_blank" moz-do-not-send="true">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail
settings:<br>
<a
href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>---------------------------------------------------
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank" moz-do-not-send="true">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank" moz-do-not-send="true">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
</blockquote>
<br>
</div>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a
href="mailto:PLUG-discuss@lists.phxlinux.org"
target="_blank" moz-do-not-send="true">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a
href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">---------------------------------------------------
PLUG-discuss mailing list - <a class="moz-txt-link-abbreviated" href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a class="moz-txt-link-freetext" href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
</blockquote>
<br>
</body>
</html>