# Running Vivaldi as root? [SOLVED]

## Spanik

I often need a browser when I'm logged in to protect me from myself. But when I updated Vivaldi to 1.0.162.4_pl (*) I lost the ability to use it when I'm root.

It tells me I need to specify an alternate "--user-data-dir". Now I googled for this but couldn't directly find anything about Vivaldi. However I do find it about Chrome. Tried a few of those "solutions" but they don't work.

So now I'm back on Opera 12.15 but this is getting a bit problematic with quite a bit of sites not working properly.

(*) Wanted to upgrade to 1.0.178.2_pl but then I get this:

```

!!! Fetched file: vivaldi-1.0.178.2_p1-amd64.deb VERIFY FAILED!

!!! Reason: Filesize does not match recorded size

!!! Got:      122

!!! Expected: 39300262

Refetching... File renamed to '/usr/portage/distfiles/vivaldi-1.0.178.2_p1-amd64.deb._checksum_failure_.mz82fW'

!!! Couldn't download 'vivaldi-1.0.178.2_p1-amd64.deb'. Aborting.

 * Fetch failed for 'www-client/vivaldi-1.0.178.2_p1', Log file:

 *  '/var/tmp/portage/www-client/vivaldi-1.0.178.2_p1/temp/build.log'
```

----------

## vnd

In general it's good practice not to run anything as root unless it's really required and web browsers are for sure those things that do not require it. Why would you want to run it as root?

----------

## Spanik

I know, but when I'm logged in and have to search something on the net it is nice to be able to use a browser and have your usual bookmarks available. Using a second pc isn't always possible and cut-paste between pc's isn't easy either.

So how do I run Vivaldi as root. It is possible, but where and how do I specify that alternate --user-data-dir?

----------

## vnd

Can you provide a little bit more details to describe your current situation? You've mentioned that "you're logged" - where are you logged? as who? and why did you mention using the second PC?

In general every program that shares some data between runs uses some dedicated and hidden directory in your user's home location. It's true in case of firefox (that uses ~/.mozilla) and chromium (it's ~/.config/chromium). I'd suggest you running: 

```
find ~/ -iname '*vivaldi*' -type d
```

 in the terminal to find which directory is used by Vivaldi - then you can just copy found directory to another user's home to copy bookmarks and other personal data.

About the switch you've mentioned - it's standard command line switch that you need to type in the terminal. You should run it as: 

```
vivaldi --user-data-dir="some directory"
```

but once again using root account for this kind of operation is not recommended because of security concerns. Do you aware of sudo command?

----------

## Spanik

Well, I'm logged in as root. Mostly this is just regarding audio and video recording/editing. Very often this works just plainly better as root than logged in as another user. Could be because of the age of the pc or because I can't get it working otherwise. But during a session I need a browser to look something up on how to do something (often youtube tutorials). So far I used Opera 12.15 without much problems so far (behind firewall etc), very minimal install no server stuff running. But Opera is becoming unusable for a lot of sites. 

So I installed Vivaldi. I installed it around preview 2 and this worked a lot better. But the last update to 1.0.162.4_pl made that it doesn't run while I'm root anymore. Hence the question. Now I could use a second pc to check the net when using the main pc as root but that makes it awkward with 2 of keyboard, mouse and screen not to mention having to mix the sound from the second pc in. Could be done but hardly the  easy way to do a quick check on the net.

I'll try your suggestion.

Yes, I know about sudo but I never managed to get it running on Gentoo.

EDIT: it works: Copied the directories to another directory in /home and used that one with the command line to start Vivaldi. Thanks.

----------

## Hu

I believe vnd's point is that you are solving the wrong problem.  Instead of trying to make Vivaldi run as root, you should be trying not to run anything as root unless it specifically requires privilege.  You should log in as a normal user, run Vivaldi as that user, run your other programs as that user, and only run things as root when they have a legitimate need to modify the system.

----------

## Spanik

I know. The point is that I never got sound working as it should unless I'm logged in as root. And never got sudo working properly. So I do whatever is not audio or settingup/updating/installing as normal user and the rest as root. Maybe it is solving a problem the wrong way round but you can only get so far asking questions you cannot solve yourself.

----------

