Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why does this command CREATE a ~/.mozilla directory?

90 views
Skip to first unread message

L.R.H.

unread,
Feb 17, 2016, 12:16:13 PM2/17/16
to mozilla-sup...@lists.mozilla.org
I don't want firefox to create a ~/.mozilla directory.

But this sequence below always *creates* a ~/.mozilla directory!
$ rm -rf ~/.mozilla
$ mkdir -p /tmp/firefox/default_profile/extensions
$ /usr/lib/firefox/firefox -new-instance -profile /tmp/firefox/default_profile &

What am I doing wrong?
I just want to create & use *only* the "/tmp/firefox/default_profile" directory!

But this command creates ~/.mozilla/{extensions,firefox}
$ /usr/lib/firefox/firefox -new-instance -profile /tmp/firefox/default_profile &

What would NOT create a ~/.mozilla directory & just use the stated default_profile?

»Q«

unread,
Feb 17, 2016, 12:45:30 PM2/17/16
to mozilla-sup...@lists.mozilla.org
In <news:mailman.786.145572936...@lists.mozilla.org>,
"L.R.H." <l.r.h....@crimsontide.edu> wrote:

> I don't want firefox to create a ~/.mozilla directory.

AFAIK, running Firefox will always create $HOME/.mozilla if it doesn't
already exist. In your case, you could remove it as soon as Firefox
has launched, but I think that's the closest you can come to not ever
having it.

dillinger

unread,
Feb 17, 2016, 1:54:45 PM2/17/16
to mozilla-sup...@lists.mozilla.org
You're probably right. Firefox stores its profile locations in
~/.mozilla/firefox/profiles.ini. I don't think there is any way around that.

Caver1

unread,
Feb 17, 2016, 3:42:57 PM2/17/16
to mozilla-sup...@lists.mozilla.org
What's the problem with ~/.mozilla? Not sure what your
problem with it is.
If you don't want it move your profile where you want point
Firefox to it then delete ~/.mozilla.

--
Caver1

Eli the Bearded

unread,
Feb 17, 2016, 8:39:32 PM2/17/16
to mozilla-sup...@lists.mozilla.org
In mozilla.support.firefox, L.R.H. <l.r.h....@crimsontide.edu> wrote:
> I don't want firefox to create a ~/.mozilla directory.
>
> But this sequence below always *creates* a ~/.mozilla directory!
> $ rm -rf ~/.mozilla
> $ mkdir -p /tmp/firefox/default_profile/extensions
> $ /usr/lib/firefox/firefox -new-instance -profile /tmp/firefox/default_profile &
>
> What am I doing wrong?

Stick that shit in a Docker container. Here's mine. (Warning, long
lines.) You'll want to adjust the container mountpoint where I have:

$HOME/.mozilla:/firefox/.mozilla

The format is OUTSIDE:INSIDE. My container creates a "firefox" user
with group 500 (named "ffuser") which has a home directory of /firefox.

And, of course, adjust your firefox source (mine is /usr/lib/firefox-44
outside the container), or just run the one installed in the container
if you don't want to control versions explicitly.

$ cat ~/docker/ffdocker/Dockerfile
# first open X11 to local connections
# xhost +local:docker
# mkdir /tmp/downloads && chmod 777 /tmp/downloads # create
# /tmp/downloads
#
# then run with
# docker run -it --net host \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v /tmp/downloads:/firefox/Downloads \
# -v $HOME/.mozilla:/firefox/.mozilla \
# -v /usr/lib/firefox-44:/usr/lib/firefox-latest \
# -e DISPLAY=$DISPLAY \
# --name Firefox \
# ffdocker
#
# -i keep stdin in open
# -t allocate a pseudo-TTY
# --net host: all container networking
# comes from the host
# -v /tmp/.X11-unix:/tmp/.X11-unix mount the tmp dir with live X11 sockets
# inside the container
# -e DISPLAY=$DISPLAY copy the DISPLAY envirnment variable
# --name Firefox give our container a name (must be
# locally unique)
# ffdocker container to run

FROM ubuntu
MAINTAINER <m...@invalid.invalid>

# intall to get dependencies, but then run the version mounted on
# the command line
# also create a "firefox" user with my <s>user</s>/group ID
# Find font packages:
# dpkg --get-selections |grep font
# (edit the "install" selector off each line)
# for p in (each) ; do dpkg-query -L $p | grep -qi '[.]ttf$' && echo $p ; done
RUN apt-get install -y --no-install-recommends firefox && groupadd -g 500 ffuser && useradd -g 500 -d /firefox -m firefox && apt-get install -y FONTLISTHERE

USER firefox
ENTRYPOINT [ "/usr/lib/firefox-latest/firefox" ]
CMD [ "-ProfileManager", "-no-remote" ]
# end of docker file
$

Elijah
------
did not find any pre-built Docker containers to do this

L.R.H.

unread,
Feb 18, 2016, 1:01:03 AM2/18/16
to mozilla-sup...@lists.mozilla.org
dillinger said:

> You're probably right. Firefox stores its profile locations in
> ~/.mozilla/firefox/profiles.ini. I don't think there is any way around that.

Actually that seems to be wrong (I think)???????

When you do what I'm doing, NOTHING is *stored* in ~/.mozilla, which is why
I think it's strange that it's created, just to store nothing in it.

1. Get rid of any pre-existing profile directory (if any):
$ rm -rf ~/.mozilla/

2. Create a directory for your profile changes to go:
$ mkdir -p /tmp/firefox/default_profile/

3. Start Firefox using *only* that profile directory:
$ firefox -new-instance -profile /tmp/firefox/default_profile &

The good news is that nothing whatsoever actually goes into ~/.mozilla,
but the bad news is that I constantly have to delete the stupid empty
~/.mozilla directories that are never used.

L.R.H.

unread,
Feb 18, 2016, 1:03:34 AM2/18/16
to mozilla-sup...@lists.mozilla.org
Caver1 said:

> What's the problem with ~/.mozilla? Not sure what your
> problem with it is.
> If you don't want it move your profile where you want point
> Firefox to it then delete ~/.mozilla.

It's stupid for Firefox to create a directory that is never used.
I have to delete it constantly.
It's not a problem (my Firefox invocation is a script anyway).
It's just lack of finesse.

What I do is create a known-good profile directory set up perfectly
for my needs, and then I *only* use that profile directory in RAM
storage to run firefox in.

This prevents anything from accidentally messing up the Firefox
profile and it wipes everything out upon every reboot.

It's just stupid for Firefox to create directories it never uses.
It's badly written code.

Philip Chee

unread,
Feb 23, 2016, 11:38:16 PM2/23/16
to mozilla-sup...@lists.mozilla.org
The portable apps version of Firefox might help.

Phil

--
Philip Chee <phi...@aleytys.pc.my>, <phili...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
0 new messages