You are not logged in.

#1 2019-01-13 04:43

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

[SOLVED] Cannot run or install Firefox as root

When I try to run Firefox as root (actually logged in as root) I get an error, something about running as root with a regular user's account is not supported, and $HOME is owned by the regular user's account, despite this folder being "/root". Obviously I'm not running with a regular user's account in this case, so why am I seeing this?

Since I had installed Firefox and other programs with the regular user's account when setting up the system I thought this might be the issue. I removed Firefox and tried to reinstall it as root. The installer errors out and will not run as root.

Any idea how to get around this problem? I accept the risks of doing this!

Last edited by LoneCrusader (2019-01-14 00:48)

Offline

#2 2019-01-13 09:29

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

I have never tried this due to the severe security implications and I would imagine it is prevented for the same reasons, there was a recent post in the Debian User Forum similar to this and going from memory it was resolved by setting the user to the instance of Firefox when starting it, I will post a link if I find the post in a short while. smile

EDIT:
Solution should be to start Firefox like this

su -c 'DISPLAY=:0 firefox' - $user

and the post regarding it is here

HTH

Last edited by Dai_trying (2019-01-13 09:44)

Offline

#3 2019-01-13 19:14

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Cannot run or install Firefox as root

This command has no effect, the same error is presented.

It's unclear to me from the Debian thread whether or not the OP is actually trying to run Firefox AS root while logged in as root. Rather it seems he's trying to run Firefox as a normal user.

I want to run one browser as root on a few selected sites, but want Firefox and others to run as the user account.

Some of the searching I did on this yesterday seems to indicate that Firefox may now even be coded to behave this way. Wow. I already was coming to despise Firefox due to some of the decisions they have been making lately, and this could well be the last straw. I wonder what version begins this rubbish. PaleMoon does not have this problem, and I know it forks from the Firefox 52.9.0esr codebase.

Trying not to go on too much of a rant here, but this "nannyism" is a cancer. Putting in force all of these restrictions on the root account and creating artificial hoops for people to jump through to do this or that is utterly ridiculous. So fine, tell people it's not a good idea IF you don't know what you're doing. Tell them it's a risk. But in the end it's their machine, and it's their choice, and if they break it then it's on them. Whatever happened to expecting users to actually learn about what they are doing, and learn what to do and what NOT to do, rather than "sheltering" them from any danger? I started my computing experience over 25 years ago, in DOS, before Windows 95 even existed. And from that I have a simple expectation - when I issue a command (especially on the command line, and especially when logged in as root) I expect it to be obeyed. Not to tell me "you can't do that." Never once in those 25 years have I "broken" anything by running as "root" on Linux or as "Administrator" on Windows.

Last edited by LoneCrusader (2019-01-13 19:28)

Offline

#4 2019-01-13 21:47

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

Sorry I misunderstood what you wanted, I thought you just wanted to run the browser as user while logged in as root, and as such the Debian post reflects the same. I would understand the reasons for Mozilla to implement a system of disabling running as root but as always there will be fringe cases where the user wants something different.

I found another post (for Ubuntu but should still work) which has two methods but this should be the easiest

sudo u+s /usr/bin/firefox

Ask Ubuntu Post

Offline

#5 2019-01-13 23:14

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Cannot run or install Firefox as root

Dai_trying wrote:

Sorry I misunderstood what you wanted, I thought you just wanted to run the browser as user while logged in as root, and as such the Debian post reflects the same. I would understand the reasons for Mozilla to implement a system of disabling running as root but as always there will be fringe cases where the user wants something different.

I found another post (for Ubuntu but should still work) which has two methods but this should be the easiest

sudo u+s /usr/bin/firefox

Ask Ubuntu Post

sudo: u+s : command not found

No joy here either. sad

I would think that when one is logged in as root one should not have to use sudo to execute a command, but it's been a while since I did much in the way of things like this.

That thread you linked is a good example of the cancer I'm talking about. Full of people not answering the question and scolding the person who asked it rather than helping them. lol.. I digress. smile

Is there a copy of the Q4OS installer for Firefox 52.9.0esr still to be found somewhere? That version doesn't have this problem (verified on an Orion machine I set up a while back), and it's also still compatible with legacy extensions. Perfectly happy to keep using that version.


EDIT:

I fixed it. Viewed the Permissions of the "/root" folder and found the ownership and group was set to the normal user's account. Manually changing these values to "root" allows Firefox to launch normally. No idea yet if this has any other effects on the system or on behavior while using the normal user's account.

I would still like to have a link for the Firefox 52.9.0esr installer if possible; and how do I prevent Synaptic from updating Firefox beyond that version if I choose to use it?

Last edited by LoneCrusader (2019-01-13 23:25)

Offline

#6 2019-01-13 23:45

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

Sorry my post was bad, it should have read

sudo chmod u+s /usr/bin/firefox

which would have done the same as what you have now done and if you are root you can just remove the sudo part.

I use Palemoon which still uses the old style add-ons and can be run as root (I just tried it) without issue, this could ba an alternative as there are security updates for it.

Offline

#7 2019-01-14 00:02

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Cannot run or install Firefox as root

I use PaleMoon quite a bit myself. I have a love-hate relationship with it though. I love it because it retains the good things about Firefox while Firefox has gone in the wrong direction, but I cannot stand the attitude of some of the PaleMoon developers and some of the choices they have made. (For one, they refuse to build the browser to be XP-compatible, despite the fact that the 52.9.0esr codebase they're working from is already XP-compatible. Currently there are "unofficial" builds to cure this but they even "look down their noses" at those.) But that's a Windows issue.)

Anyway, problem solved for now. If anyone does have a link for the Q4OS Firefox 52.9.0esr installer file though I would like to archive a copy of it.

Offline

#8 2019-01-14 00:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

If you had it installed before and haven't cleared you cache you may still have the deb file in /var/cache/apt/archives/ worth a look...

Offline

#9 2019-01-14 00:47

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Cannot run or install Firefox as root

Good point. I'll have another look at that system but it's not located here (parents machine).

I did some searching and found some packages here;
http://security.debian.org/debian-secur … refox-esr/
But I'm not certain this has covered everything. I didn't notice a .deb file directly associated with the "firefox-esr" package, only those .deb files for language packs and the "firefox-esr-dev" package. The "tar.xz" packages may have it, but I'm not familiar enough with this.

In any case it looks like I will have to round up multiple packages.. "deb8u1" and "deb9u1" for both amd64 and i386 architectures in order to have everything covered.

Offline

#10 2019-01-14 01:16

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

Offline

#11 2019-01-14 07:08

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Cannot run or install Firefox as root

Thanks! I think I've got everything relevant now as far as .deb files go.

How do the .deb files relate to/work with the Q4OS automated installers (.esh) files?

Offline

#12 2019-01-14 10:04

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

They work in much the same way as apt does really, you can include a deb file in an installer to have an automated way to install a deb file but you will still be bound by the apt policies in regards to dependencies etc.

Offline

#13 2020-03-25 12:07

Romanic
Member
Registered: 2020-03-25
Posts: 3

Re: [SOLVED] Cannot run or install Firefox as root

Good day,
I need a Big Help: yikes

I was following this Topic to run Firefox as Root as i needed the browser to interpret correctly one link and open a program on the OS  (remote desktop via VMware Horizon Client)  (actually one colleague told me to Run it as Root,  maybe it's not linked at all with the issue!)
when i tried this

sudo u+s /usr/bin/firefox

Firefox wont start anymore from menu or command line,
in CLI it says (both as Normal user and Root): Running Firefox as root in a regular user's session is not supported

What can i do to reverse the command and get all fine as before?!  sad
Please Help Me
Thanks so much
Regards from Rome (IT)

Offline

#14 2020-03-25 12:19

Romanic
Member
Registered: 2020-03-25
Posts: 3

Re: [SOLVED] Cannot run or install Firefox as root

EDIT:
A deeper research brought me:

$ sudo chmod u-s /usr/bin/firefox

Hurrah!! i felt in trouble eheh big_smile

Offline

#15 2020-03-25 13:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,993

Re: [SOLVED] Cannot run or install Firefox as root

Just to add that it is a VERY BAD IDEA to run ANY web browser as root! it is very dangerous from a security aspect.

Offline

#16 2020-03-25 15:31

Romanic
Member
Registered: 2020-03-25
Posts: 3

Re: [SOLVED] Cannot run or install Firefox as root

I know.  It was a test to understand if the issue could be solved like that.
Thanks  smile
Regards

Offline

Board footer

Powered by FluxBB