1 |
On Sun, Nov 10, 2013 at 03:38:16PM -0600, Dale wrote |
2 |
> Howdy, |
3 |
> |
4 |
> I have noticed something that really bugs me. I sometimes have a few |
5 |
> Firefox sessions running. I do this because I have to be logged into a |
6 |
> website with more than one user/password. Here is my issue. If I click |
7 |
> the X box to close a session of Firefox, it doesn't seem to kill the |
8 |
> process. I end up having to go to a Konsole and killing the process |
9 |
> with either the kill command or pkill. Naturally, all the processes are |
10 |
> named Firefox so I can't tell one from the other. That leads to me |
11 |
> killing the wrong one at times. |
12 |
> |
13 |
> My question is this, why does Firefox not kill its processes as it |
14 |
> should? When I click the X and it closes, it should kill the process |
15 |
> right? When it does not kill correctly and I try to restart that |
16 |
> session, I get the error that the session is already running. |
17 |
|
18 |
Long story short... "there can only be one" Firefox process *PER USER* |
19 |
at any given time. Seriously... as regular user open up multiple |
20 |
Firefox windows, and execute... |
21 |
|
22 |
ps -ef | grep firefox |
23 |
|
24 |
and you'll get something like... |
25 |
|
26 |
[i660][waltdnes][~] ps -ef | grep firefox |
27 |
waltdnes 28696 11663 2 19:35 pts/22 00:00:07 firefox |
28 |
waltdnes 28836 28825 0 19:39 pts/30 00:00:00 grep --color=auto firefox |
29 |
|
30 |
Only one Firefox process exists. (I can't seem to prevent the grep |
31 |
command from listing itself). |
32 |
|
33 |
> This has been going on for a while. What can I look for or do to |
34 |
> correct this? |
35 |
|
36 |
There is a workaround/kludge/ugly-hack. Notice that I said one |
37 |
process *PER USER*. I have another user "user2" that I log in as to |
38 |
occasionally maintain "static" stuff that I only want my regular login |
39 |
to only see, but not modify/delete/etc. If you create a second user |
40 |
(let's call it "user2"), you can do the following... |
41 |
|
42 |
# Allow other logins/users on the same machine to use your display |
43 |
xhost +127.0.0.1 |
44 |
|
45 |
# Open up up an xterm/wahtever and |
46 |
su - user2 |
47 |
# Give password, and then, as user2 |
48 |
firefox |
49 |
|
50 |
As my regular user "waltdnes", I can then... |
51 |
[i660][waltdnes][~] ps -ef | grep firefox |
52 |
waltdnes 28696 11663 2 19:35 pts/22 00:00:07 firefox |
53 |
user2 28791 28780 2 19:38 pts/9 00:00:01 firefox |
54 |
waltdnes 28836 28825 0 19:39 pts/30 00:00:00 grep --color=auto firefox |
55 |
|
56 |
From the "ps" output, "waltdnes" is running Firefox with pid 28696, |
57 |
and "user" as pid "28791". You can issue a "kill" command for the |
58 |
appropriate pid. Note that unless you're root, you can only kill your |
59 |
own processes. |
60 |
|
61 |
-- |
62 |
Walter Dnes <waltdnes@××××××××.org> |
63 |
I don't run "desktop environments"; I run useful applications |