Firefox binary archive: execve: Permission denied

I am on Fedora Kinoite and heard a lot about the problems with sandboxing lately. For usability I switched back from Flathub Firefox to Fedora Firefox (on ublue kinoite-main all codecs are installed).

But on Bazzite and other more opinionated ublue offsprings, like Secureblue too, the image has an rpm-ostree override remove firefox and it cannot be added back.

Another advantage is, that the Firefox Archive updates itself, without a need for rebooting.

Now some questions I had, and what I did:

mkdir -P ~/Programs/Browsers/Firefox 
cd ~/Programs/Browsers/Firefox
wget https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=de -o firefox.tar.bz2
tar -xf firefox.tar.bz2 && rm firefox.tar.bz2
cd firefox
fpath=$(PWD)
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/
sed -i "s|Exec=|Exec=$PWD/|g" ~/.local/share/applications/firefox.desktop

So now every normal Desktop should show the local Firefox instead the Fedora one, in the next step I could rebase to Bazzite, remove Firefox etc.

But running the desktop entry I get an error:

Firefox not started
execve: Permission denied 

The firefox binary is executable as is the firefox.desktop, and I changed the owner to user too.

Is that that the actual script you’re using? What is the resulting Exec line in that file?

Note that bash doesn’t perform variable expansion inside single quotes.

Why wasn’t it already owned by your user? Did you do any of that as root?

I recreated what I did by hand, the sed command should work? But not sure.

I was just making sure it is owned by me, as it is a copied system file, so I assumed it was not owned by user.

Then please confirm what the Exec= line is. There’s no reason why this shouldn’t work, conceptually.

Copying something creates a new file, so it will be owned by you (and appropriately labeled for the new location).

P.S. something like this would work:

sed -i "s|Exec=|Exec=$PWD/|g" ~/.local/share/applications/firefox.desktop
1 Like