Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

Running a global installation of Mozilla as non-root on Linux

1 vue
Accéder directement au premier message non lu

Chris Howells

non lue,
31 mai 2001, 16:24:4931/05/2001
à
Does anybody have a tutorial on doing this?

I want to have one copy of Mozilla on my system, under
/usr/local/mozilla. However I am now failing to get it to work like
this.

Of course, since it's under /usr/local/, only root user has write access
to it.

I though that the procedure was like as follows:

untar Mozilla into /usr/local/mozilla

Run Mozilla once as root to allow it to set itself up

Mozilla should now be able to run as a non-root user by running
/usr/local/mozilla

I had this working like this with 0.9. However I downloaded a nightly
today, and tried to get it to work as my non-root user. This has failed:

chris@venus: mozilla$ ./mozilla
./run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=/usr/local/mozilla
LD_LIBRARY_PATH=/usr/local/mozilla:/usr/local/mozilla/plugins:/usr/lib
LIBRARY_PATH=/usr/local/mozilla:/usr/local/mozilla/components
SHLIB_PATH=/usr/local/mozilla
LIBPATH=/usr/local/mozilla
ADDON_PATH=/usr/local/mozilla
MOZ_PROGRAM=./mozilla-bin
MOZ_TOOLKIT=
moz_debug=0
moz_debugger=
Registering plugin 0 for: "*","All types",".*"
/usr/local/mozilla/run-mozilla.sh: line 72: 1525 Segmentation
fault $prog ${1+"$@"}

I did try to get 0.9 working in the same way as well, although I have
failed with that now. I must have done something to get it working,
although don't know what it was.

(p.s -- the new builds look excellent -- just a shame are so bloody hard
to set up! :( )

--
Cheers,

Chris Howells -- ch...@chrishowells.co.uk
http://www.chrishowells.co.uk

Stuart Ballard

non lue,
31 mai 2001, 18:50:1731/05/2001
à
Chris Howells wrote:
>
> I though that the procedure was like as follows:
>
> untar Mozilla into /usr/local/mozilla
>
> Run Mozilla once as root to allow it to set itself up
>
> Mozilla should now be able to run as a non-root user by running
> /usr/local/mozilla

I can't verify that this works with nightlies, but I've found the
following procedure preferable to the "run mozilla once as root" part
(it worked with 0.9, but you say your way did too):

untar into /usr/local/mozilla
cd /usr/local/mozilla
export LD_LIBRARY_PATH=.
export MOZILLA_FIVE_HOME=.
./regxpcom
./regchrome
touch chrome/user-{skins,locales}.rdf

At least this way you aren't running any graphical apps as root, which
is generally considered to be insecure... this also can be nicely
scripted :)

I'd also suggest re-posting your original query in n.p.m.unix - not many
developers read .general due to the high noise content ("noise" for the
purposes of trying to actually work on developing the software, anyway).

Stuart.

Chris Howells

non lue,
31 mai 2001, 19:16:5631/05/2001
à
Stuart Ballard wrote:

> I can't verify that this works with nightlies, but I've found the
> following procedure preferable to the "run mozilla once as root" part
> (it worked with 0.9, but you say your way did too):

OK.

> untar into /usr/local/mozilla
> cd /usr/local/mozilla
> export LD_LIBRARY_PATH=.
> export MOZILLA_FIVE_HOME=.
> ./regxpcom
> ./regchrome

I was able to do all up to here...

> touch chrome/user-{skins,locales}.rdf

But I didn't really understand this bit I'm afraid. The only rdf files
under chrome/ are:

chris@venus: chrome$ ls *.rdf
all-locales.rdf all-packages.rdf all-skins.rdf user-locales.rdf
chris@venus: chrome$

Are they the ones you mean? If so, I've touched them.

Sadly this doesn't seem to work -- I still get the segfault when running
as a normal user.

> At least this way you aren't running any graphical apps as root, which
> is generally considered to be insecure... this also can be nicely
> scripted :)

Yeah :)

> I'd also suggest re-posting your original query in n.p.m.unix - not many
> developers read .general due to the high noise content ("noise" for the
> purposes of trying to actually work on developing the software, anyway).

Excellent idea.

Thanks a lot anyway :)

--
Cheers,

Chris Howells -- ch...@chrishowells.co.uk
http://chrishowells.co.uk

Stuart Ballard

non lue,
31 mai 2001, 20:47:2731/05/2001
à
Chris Howells wrote:
>
> I was able to do all up to here...
>
> > touch chrome/user-{skins,locales}.rdf
>
> But I didn't really understand this bit I'm afraid. The only rdf files
> under chrome/ are:
>
> chris@venus: chrome$ ls *.rdf
> all-locales.rdf all-packages.rdf all-skins.rdf user-locales.rdf
> chris@venus: chrome$
>
> Are they the ones you mean? If so, I've touched them.
>
> Sadly this doesn't seem to work -- I still get the segfault when running
> as a normal user.

"touch" is just a convenient command that can be used in unix to create
an empty file. You could create them in a text editor or any other way
if you prefer (although make sure they're owned by root and not
writeable by the user who will be running mozilla). I should have
clarified that I was speaking in literal shell commands, and also that
that specific line of instruction was bash-specific (there may be other
shells that also support the syntax, but I know it isn't true of all
shells - the original sh for example). A portable version of the command
would be:
touch chrome/user-skins.rdf chrome/user-locales.rdf

Unless I'm misremembering, when you untar a clean tarball, there
shouldn't be *any* user-*.rdf files in the chrome directory. By running
"touch", you create these files.

From my (limited) understanding, running my sequence of commands
(regxpcom, regchrome, and creating those two files) is more or less
equivalent to the important parts of what mozilla does when run as root.
Since you don't seem to have a user-skins.rdf file, it could be that
something's changed recently that makes mozilla not create this file,
even when run as root.

The first thing I'd try is creating an (empty) user-skins.rdf in your
existing mozilla/chrome directory and see whether that solves your
problem. If not, try again from scratch with an empty /usr/local/mozilla
and do *only* the sequence of steps I suggested (in particular, don't
run mozilla as root ever). If you are using bash, type the "touch" line
from my original email literally; if not, substitute the touch line
above (which will work under bash too but it's longer to type :) )

If none of that works, then I'm afraid I don't know what could have
broken. Hope you get more luck on n.p.m.unix :)

Stuart.

Chris Howells

non lue,
1 juin 2001, 14:32:2101/06/2001
à
Stuart Ballard wrote:

> "touch" is just a convenient command that can be used in unix to create
> an empty file. You could create them in a text editor or any other way

I know ;) I thought that you meant to touch an existing file to update
the file creation date, or something ;)

> touch chrome/user-skins.rdf chrome/user-locales.rdf

That worked thanks. Bash didn't seem very happy with the first command.

> The first thing I'd try is creating an (empty) user-skins.rdf in your
> existing mozilla/chrome directory and see whether that solves your
> problem. If not, try again from scratch with an empty /usr/local/mozilla
> and do *only* the sequence of steps I suggested (in particular, don't

Yes, that worked fine. Thanks a lot :)

> run mozilla as root ever). If you are using bash, type the "touch" line
> from my original email literally; if not, substitute the touch line
> above (which will work under bash too but it's longer to type :) )

I won't touch anything but bash ;) Bash rocks, and it's recommended in
LSB, so that's what I use :)

Thanks a lot again. Working brilliantly :)

0 nouveau message