You are not logged in.

#1 2016-09-16 15:01:18

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

[SOLVED] Chromium - Unable to get the user data directory

Hello everyone, I'm new here, and new to Linux in general.
Some days ago, after extensive reading, I decided to jump into Arch and (I swear) I have fully embraced the DIY philosophy.

However I've encountered a problem I can't seem to solve. I've installed Chromium (53.0.2785.101-1) but it won't start. Specifically it gives me this error:

[joe@Arch ~]$ chromium
[0916/162754:FATAL:chrome_main_delegate.cc(412)] Check failed: process_type.empty(). Unable to get the user data directory for process type: zygote
#0 0x55c1499b2fae <unknown>
#1 0x55c1499cb90e <unknown>
#2 0x55c1494ed8e4 <unknown>
#3 0x55c14998155b <unknown>
#4 0x55c14998040d <unknown>
#5 0x55c1494ecc8a ChromeMain
#6 0x7f3eaf7bd291 __libc_start_main
#7 0x55c1494ecb3a _start

[5502:5502:0916/162754:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid). 
#0 0x5652ca6e7fae <unknown>
#1 0x5652ca70090e <unknown>
#2 0x5652cd8189db <unknown>
#3 0x5652cd8177d4 <unknown>
#4 0x5652cd817d9e <unknown>
#5 0x5652cd8b5415 <unknown>
#6 0x5652cd6653c1 <unknown>
#7 0x5652cd665093 <unknown>
#8 0x5652ca6b7278 <unknown>
#9 0x5652ca6b5439 <unknown>
#10 0x5652ca221c8a ChromeMain
#11 0x7ff8f34a4291 __libc_start_main
#12 0x5652ca221b3a _start

Aborted (core dumped)

I've read some past forum topics and I think there's something wrong with the way chromium searches my home directory. I'm specifically referring to this: https://bbs.archlinux.org/viewtopic.php?id=215889. However, I'm still unsure as to where to look for the $HOME variable, since I can't find any in either /etc/environment or /etc/profile. Also I have no XDG_CONFIG_HOME, i think.

If, on the other hand, I use

 [joe@Arch ~]$ chromium  --user-data-dir=/home/joe 

as suggested in another topic, chromium will start and work just fine (in fact, that's where I'm writing from right now).
I'm using a Win7/Arch dual boot, and Openbox as a WM. I'm not sure if more info is needed.

I'm sorry if I said something stupid or meaningless in the post, but I'm new and I'm trying really hard to get into this. I'd appreciate any help. Thank you.

Last edited by 198Joe (2016-09-16 16:58:03)

Offline

#2 2016-09-16 15:23:56

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Chromium - Unable to get the user data directory

You can see your environnement variable with the "env" command. You can also say: echo $MYVAR to see what's the variable MYVAR is. To see the variable for a specific process, determine its PID with top or ps and when you have it say: cat /proc/<pid>/environ. $HOME is usually /home/<your-name> (and it is strongly advised you do not change it). Chromium will normally store its setting in /home/<your_name>/.config/chromium

To solve your problem.

Check your permissions. You might have run some programs as root and have root owned files in your home directory. Can you do a "find -not -user <user name>" in your home directory. You should not have any file. Anyway be sure you can write to ~/.config directory. Remove ~/.config/chromium.

Offline

#3 2016-09-16 15:28:37

poisonby
Member
Registered: 2016-08-20
Posts: 8

Re: [SOLVED] Chromium - Unable to get the user data directory

198Joe wrote:

However, I'm still unsure as to where to look for the $HOME variable, since I can't find any in either /etc/environment or /etc/profile. Also I have no XDG_CONFIG_HOME, i think.

To check what your $HOME is, just echo it in a terminal.

echo $HOME

You could try setting $XDG_CONFIG_HOME to something like $HOME/.config, though I'm not sure if that will help.

export XDG_CONFIG_HOME=$HOME/.config

Transhumanist, amateur programmer and Linux enthusiast.

Offline

#4 2016-09-16 15:51:21

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: [SOLVED] Chromium - Unable to get the user data directory

Thanks for your replies!
So, $HOME is correctly set because its output is my home directory /home/joe.

As for permissions, when I use the find command

 [joe@Arch ~]$ find -not -user joe
./.config
./.config/openbox
./.config/openbox/.config
./.config/openbox/.config/autostart
./.config/openbox/.config/menu.xml
./.config/openbox/.config/environment
./.config/openbox/.config/rc.xml
./.config/openbox/autostart
./.config/openbox/menu.xml
./.config/openbox/environment
./.config/openbox/rc.xml
./.config/conky
./.config/conky/conky.conf
./.config/.config
./.config/.config/autostart
./.config/.config/menu.xml
./.config/.config/environment
./.config/.config/rc.xml
./.config/autostart
./.config/menu.xml
./.config/environment
./.config/rc.xml

Does that mean that all of these files are root owned? If that's the case, should I change the permission? Also, it looks like I made some doubles /.config folders in there.
I cannot write anything in ~/.config, except when I sudo. I thought this was normal, but maybe, given that I'm logged in as the user, it is not. And no ~/.config/chromium was created.

EDIT
I also checked through ls command

[joe@Arch ~]$ ls -l -a /home/joe/
total 20108
drwx------ 18 joe  joe      4096 Sep 16 17:58 .
drwxr-xr-x  4 root root     4096 Sep 14 23:34 ..
-rw-------  1 joe  joe     12082 Sep 16 17:52 .bash_history
-rw-r--r--  1 joe  joe        21 Jun 30 20:59 .bash_logout
-rw-r--r--  1 joe  joe        57 Jun 30 20:59 .bash_profile
-rw-r--r--  1 joe  joe       141 Jun 30 20:59 .bashrc
drwxr-xr-x  4 joe  joe      4096 Sep 16 14:02 .cache
-rw-r--r--  1 joe  joe    190223 Sep 16 16:34 'Certificate Revocation Lists'
drwx------  3 joe  joe      4096 Sep 16 17:04 CertificateTransparency
drwxr-xr-x  5 root root     4096 Sep 16 17:47 .config
drwx------ 14 joe  joe      4096 Sep 16 17:59 Default
drwxr-xr-x  2 joe  joe      4096 Sep 16 14:02 Desktop
drwx------  2 joe  joe      4096 Sep 16 16:32 Dictionaries
drwx------  2 joe  joe      4096 Sep 16 14:12 Downloads
etc. etc. 

Everything is joe's except the .config directory. I suppose I'll change permission and see what happens. Anyway, why did it happen? Is it because I may have created it as root? (I can't remember at the moment)

EDIT 2: It worked! I changed ownership with

 [joe@Arch ~]$ sudo chown joe /home/joe/.config 

and it now lets me open Chromium with no need to specify my /home. Should I change root group ownership as well?  I'm still trying to figure out why this happened in the first place, I'm getting confused.

Edit 3: For anyone having the same problem as mine in the future, I eventually changed the group ownership as well:

 [joe@Arch ~]$ sudo chown -R joe:joe /home/joe/.config

so that now

 [joe@Arch ~]$ ls -l /home/joe/.config
total 56
-rwxr-xr-x  1 joe joe   477 Sep 15 01:56 autostart
drwx------ 11 joe joe  4096 Sep 16 19:01 chromium
drwxr-xr-x  2 joe joe  4096 Sep 15 01:36 conky
-rwxr-xr-x  1 joe joe   379 Sep 15 01:32 environment
-rw-r--r--  1 joe joe  9617 Sep 15 01:32 menu.xml
drwxr-xr-x  3 joe joe  4096 Sep 15 01:41 openbox
-rw-r--r--  1 joe joe 23758 Sep 15 01:32 rc.xml

Everything works fine so far, and I deleted duplicates I accidentally created during previous attempts to make Chromium to work.
Thanks for the tips @olive and @poisonby smile

Last edited by 198Joe (2016-09-16 17:13:44)

Offline

#5 2016-09-16 19:56:16

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Chromium - Unable to get the user data directory

~/.config should be owned by you and the group directory should be you too. Change also all files in ~/.config not only the directory itself with the chown -R command (otherwise you will have trouble with other softwares). You can as well act on /home/joe by the way. No files should root owned in your home directory. When you use ls on this use the "-a" option to see hidden files (beginning with .). But double check with "find -not -user joe" that no files remains even in a subdirectory.

The reason is most likely that you have launched program as root that have created these files. It is recommended to only use GUI program like gksu or gksudo when you launch graphical program as root to avoid these kind of problems (they reset the environment in order to avoid the problem). If you know what you are doing you can also use sudo or su but you have to configure the environment yourself properly.

Offline

#6 2016-09-16 21:59:33

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: [SOLVED] Chromium - Unable to get the user data directory

It is very likely I launched xorg or openbox as root for the first times, so no surprise the directory ended up being root owned.

And I didn't think about the subdirectory ownership, so your suggestion was very helpful. Thanks!

Offline

#7 2016-09-17 06:22:35

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Chromium - Unable to get the user data directory

How have you launched Xorg or openbox as root? If you login as root, then it will use the root home directory (which is /root) nor yours. Or make you have done it in your account via sudo or su?

Last edited by olive (2016-09-17 06:29:52)

Offline

#8 2016-09-17 10:39:48

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: [SOLVED] Chromium - Unable to get the user data directory

Well, I think the steps I followed after the basic Arch Installation were: adding the user, installing bumblebee (i have optimus), installing xorg and then openbox. After adding the user, I work as Joe most of the time, but maybe I created the /.config folder from scratch via sudo because I had some problems understanding where to copy the openbox directory. I really don't remember at the moment, had to change and adjust so many things in the process!

I just noticed even my /.xinitrc in /home is root owned, but wasn't used because of a typo. There's also a lost+found directory in /home, which is also root owned, should I change ownership of that too?

EDIT: I just realised I had everything set up wrong. startx was running /etc/X11/xinit/xinitrc instead of /home/joe/.xinitrc both because there was a typo in the file name and because it was located in /home. So i copied the file to /home/joe (and it's user owned now) and I deleted the one in /home. I also changed the one in /etc to the default one. Silly me, I thought I did everything by the rules hmm

Last edited by 198Joe (2016-09-17 11:01:49)

Offline

#9 2016-09-17 13:09:41

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Chromium - Unable to get the user data directory

198Joe wrote:

Well, I think the steps I followed after the basic Arch Installation were: adding the user, installing bumblebee (i have optimus), installing xorg and then openbox. After adding the user, I work as Joe most of the time, but maybe I created the /.config folder from scratch via sudo because I had some problems understanding where to copy the openbox directory. I really don't remember at the moment, had to change and adjust so many things in the process!

I just noticed even my /.xinitrc in /home is root owned, but wasn't used because of a typo. There's also a lost+found directory in /home, which is also root owned, should I change ownership of that too?

/home contains the home user directories (several if you have several users). /home itself is root owned with 0755 permission. As for the lost+found, have you installed /home on a separate partition? This directory is autocreated and should be left as root owned. In case of a corrupted filesystem, utilities like fsck use it to put files or fragment of files that it cannot determine where they come from.

Offline

#10 2016-09-17 13:38:39

198Joe
Member
From: Italy
Registered: 2016-09-16
Posts: 14

Re: [SOLVED] Chromium - Unable to get the user data directory

Yes, my /home directory is on a different partition than / and I left /home/lost+found root owned, so I guess everything is in order now! Thanks smile

Offline

Board footer

Powered by FluxBB