How do I run chrome as root in Ubuntu 12.04?
-
7You do realize you open your system up for anyone on the outside trying to get into your machine using a possible exploit?– RinzwindApr 20, 2014 at 12:02
-
1Rinzwind is right - it's a big security hole. There's whole sort of javascript malware that can hide on websites, and by running any browser as root you're just yelling "Heeeeey, over here, hack me! "– Sergiy KolodyazhnyyNov 22, 2015 at 23:28
6 Answers
Open google-chrome located in /usr/bin
with 'gedit', 'kate' or your favorite text editor:
sudo gedit /usr/bin/google-chrome
Add --user-data-dir
(without the quotes) at the very end of the file. Mine looks like this:
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir
Save, close and voilà, you're done. You can open chrome as root now.
-
Question was How do I run chrome as a root user in Ubunut 12.04?? Hence my answer Apr 20, 2014 at 12:08
-
Title states chromium so I took that one (and cuz chromium is in the repos and chrome aint ;) ). Lets see who wins by upvotes :D (here have one from me ;) ) edit: I removed the html tags :)– RinzwindApr 20, 2014 at 12:11
-
DISCLAIMER/Warning: Running anything as root is risky and you should not run any software as root when you don't have to. If you don't know what you're doing, or are on a system that needs to be secure, STOP READING NOW
This is about this message:
And you need to hex edit chromium:
sudo apt-get install hexedit
cd /usr/lib/chromium-browser
sudo cp chromium-browser chromium-browser.backup
hexedit chromium-browser
Do control+s and search for geteuid
; change it to getppid
and control-x to exit.
And you can start chromium as root.
To revert the change:
cd /usr/lib/chromium-browser
sudo cp chromium-browser.backup chromium-browser
-
-
-
when I tried to search using
ctrl+S
forgeteuid
it shows invalid hexa string Feb 24, 2015 at 15:16
Edit file /etc/chromium-browser/default
.
Add line CHROMIUM_FLAGS=" --user-data-dir"
.
You are done. Launch Chromium.
-
2Note that since a Chromium update, this solution no longer works. It worked in the past.– LucioApr 23, 2017 at 2:58
This worked for me in Ubuntu on both Nexus 7 (Ubuntu 13.04) and x86 PC (Ubuntu 15.10) running as root:
chromium-browser --temp-profile
Help gives this:
--temp-profile Start with a new and temporary profile
(Nexus 7 had other but presumably unrelated issues)
This answer was supposed to be a comment as this may not be true for 12.04, but I can't comment as a forum newbie.
Usual warning: Running as root is dangerous.
Simple rly. Fastest way. But this isn't recomended.
chromium-browser --user-data-dir=/home/someuser
-
-
-
Why downvote? I use
--user-data-dir=/root/.data
If I want to use root user, and I don't see any reasonable security concerns. May 19, 2016 at 20:01