LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How does firefox (aurora) know where to look for files? (http://www.linuxquestions.org/questions/linux-desktop-74/how-does-firefox-aurora-know-where-to-look-for-files-921681/)

mediumrare 01-02-2012 09:17 PM

How does firefox (aurora) know where to look for files?
 
Root can run Aurora on this box but it segfaults if an unprivileged user tries. I suspect (strace) that might be because Aurora can't find some of the files it's looking for.

I know I can change Aurora's search behavior in regard to specific files by setting an environment variable (XUSERFILESEARCHPATH ?) but doing this for all files one at a time looks like it could be a chore. Since running as root fixes the whole thing all at once, I suspect there must be a config or a switch I haven't found yet.

I'd appreciate pointers if people are willing to help me save some time.

Thanks.

MS3FGX 01-02-2012 09:27 PM

Perhaps the default profile has root-only permissions? Though I would think it would more gracefully fail than segfaulting in that case.

mediumrare 01-02-2012 10:01 PM

Thanks for your suggestion but I don't think so (icbw). I can (unpriv) successfully rename /profiles.ini and xxxx.default. These are recreated on next attempt which also segfaults.

craigevil 01-02-2012 10:39 PM

What distro? And how did you install Firefox Aurora?

Try creating a new profile.

mediumrare 01-03-2012 05:42 PM

Quote:

Originally Posted by craigevil (Post 4564234)
What distro?

~$ cat /etc/issue
Debian GNU/Linux wheezy/sid \n \l

Quote:

And how did you install Firefox Aurora?
More or less followed http://techpatterns.com/forums/about1435.html

Quote:

Try creating a new profile.
As an unprivileged user? I don't know how to do that when firefox won't run.

But what I did do is copy over root's default profile and change the permissions to user:user. Firefox still won't run but seems a little happier with that in that there is some output to the terminal instead of nothing at all. Here are the last few lines:

Code:

rtq@omega:~$ firefox
......
ABP timeline: * ContentPolicy.startup() done            (0)
ABP timeline: * Entered Synchronizer.startup()          (2)
ABP timeline: * Synchronizer.startup() done              (0)
ABP timeline: * initializing additional modules          (1)
ABP timeline: Bootstrap.startup() done                  (0)
ABP timeline: Total time elapsed: 415

Also:
Code:

rtq@omega:~$ strace firefox
...............
stat64("/usr/local/share/mime/mime.cache", 0xbfbf7a60) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/globs2", 0xbfbf7a60) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/globs", 0xbfbf7a60) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/magic", 0xbfbf7a60) = -1 ENOENT (No such file or directory)
open("/usr/local/share/mime/aliases", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/share/mime/subclasses", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/share/mime/icons", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/share/mime/generic-icons", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
................

and

Code:

rtq@omega:~$ ls -l /usr/local/share/mime/*
ls: cannot access /usr/local/share/mime/*: No such file or directory
rtq@omega:~$ ls -l /usr/share/mime/*
-rw-r--r-- 1 root staff  6942 Dec 22 22:10 /usr/share/mime/aliases
-rw-r--r-- 1 root staff  17186 Dec 22 22:10 /usr/share/mime/generic-icons
.................

If I cp -R /usr/share/mime/* user/local/share/mime/ with user:user permissions then the above errors go away and strace gives:

Code:

............
stat64("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=119656, ...}) = 0
open("/usr/share/mime/mime.cache", O_RDONLY|O_LARGEFILE) = 20
fstat64(20, {st_mode=S_IFREG|0644, st_size=119656, ...}) = 0
mmap2(NULL, 119656, PROT_READ, MAP_SHARED, 20, 0) = 0xb280b000
close(20)                              = 0
stat64("/usr/local/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=119656, ...}) = 0
open("/usr/local/share/mime/mime.cache", O_RDONLY|O_LARGEFILE) = 20
fstat64(20, {st_mode=S_IFREG|0644, st_size=119656, ...}) = 0
mmap2(NULL, 119656, PROT_READ, MAP_SHARED, 20, 0) = 0xb2632000
close(20)                              = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

I have omitted some other "no such file" errors because I presume they could be resolved in the same sort of way but I doubt that doing so is desireable. I wonder if the entire problem could be better resolved simply by somehow telling the unprivileged firefox to look in the right places to start with. I haven't (yet) figured out how to do that.

Help appreciated. Thanks.

mediumrare 01-11-2012 07:17 PM

Creating a new profile was not, by itself, sufficient. After doing that didn't work, I used ProfileManager to delete the user's old profile. PM also completely deleted the entire contents of /home/user (it did warn first but, still..., good backups are g/o/l/d :) ). After that, a newly created profile and unprivileged Aurora did work. Problem solved but question as to how ff locates files not answered - that will have to wait for another day. Thanks for the suggestions which pointed me in the right direction and for reading.


All times are GMT -5. The time now is 03:37 AM.