On Sun, Nov 10, 2013 at 03:38:16PM -0600, Dale wrote
> Howdy,
> 
> I have noticed something that really bugs me.  I sometimes have a few
> Firefox sessions running.  I do this because I have to be logged into a
> website with more than one user/password.  Here is my issue.  If I click
> the X box to close a session of Firefox, it doesn't seem to kill the
> process.  I end up having to go to a Konsole and killing the process
> with either the kill command or pkill.  Naturally, all the processes are
> named Firefox so I can't tell one from the other.  That leads to me
> killing the wrong one at times. 
> 
> My question is this, why does Firefox not kill its processes as it
> should?  When I click the X and it closes, it should kill the process
> right?  When it does not kill correctly and I try to restart that
> session, I get the error that the session is already running.

  Long story short... "there can only be one" Firefox process *PER USER*
at any given time.  Seriously... as regular user open up multiple
Firefox windows, and execute...

ps -ef | grep firefox

and you'll get something like...

[i660][waltdnes][~] ps -ef | grep firefox
waltdnes 28696 11663  2 19:35 pts/22   00:00:07 firefox
waltdnes 28836 28825  0 19:39 pts/30   00:00:00 grep --color=auto firefox

  Only one Firefox process exists.  (I can't seem to prevent the grep
command from listing itself).

> This has been going on for a while.  What can I look for or do to
> correct this? 

  There is a workaround/kludge/ugly-hack.  Notice that I said one
process *PER USER*.  I have another user "user2" that I log in as to
occasionally maintain "static" stuff that I only want my regular login
to only see, but not modify/delete/etc.  If you create a second user
(let's call it "user2"), you can do the following...

# Allow other logins/users on the same machine to use your display
xhost +127.0.0.1

# Open up up an xterm/wahtever and
su - user2
# Give password, and then, as user2
firefox

  As my regular user "waltdnes", I can then...
[i660][waltdnes][~] ps -ef | grep firefox
waltdnes 28696 11663  2 19:35 pts/22   00:00:07 firefox
user2    28791 28780  2 19:38 pts/9    00:00:01 firefox
waltdnes 28836 28825  0 19:39 pts/30   00:00:00 grep --color=auto firefox

  From the "ps" output, "waltdnes" is running Firefox with pid 28696,
and "user" as pid "28791".  You can issue a "kill" command for the
appropriate pid.  Note that unless you're root, you can only kill your
own processes.

-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to