You are not logged in.

#1 2011-03-09 16:05:25

jwhendy
Member
Registered: 2010-04-01
Posts: 621

[SOLVED] on last reboot, two wicd-clients running + two tray icons?

Hi,


I've been using wicd forever and for the first time, I had two tray icons showing this morning. I used to use xfce but switched to openbox about a month ago and have been using an autostart.sh like so:

$ cat .config/openbox/autostart.sh |tail
#bg
eval `cat ~/.fehbg` &

#post-start operations
(tint2) &
(conky -c /etc/conky/conky.conf) &
(conky -c /etc/conky/conky-top.conf) &
(wicd-client) &

This has been working fine, at least as far as I knew. Suddenly this morning when I started up X, I had two wireless icons in my tray. I found that two wicd-clients were running:

$ ps ax |grep wicd
 3492 ?        S      0:00 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
 3500 ?        S      0:00 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
 3573 tty1     S      0:00 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
 3578 tty1     S      0:00 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
 3641 ?        Ss     0:00 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext

This has never happened and I'm not sure why it would start all of the sudden like this. If I remove it from ~/.config/openbox/autostart.sh, I only get one wicd-client. If I put it back, I get two. But I never used to get two even when it was in autostart.sh before (like as of any time before this morning), which is why this is so puzzling.

I thought it might have been an upgrade, but I just reinstalled Arch completely on Saturday to do encryption and pacman.log shows that this is the only version of wicd that's been installed.

I wondered if having wicd in /etc/rc.conf daemons was enough to start the client upon startx, but the Arch wiki on wicd implies that you should have wicd-client in autostart.sh or equivalent.

Can anyone assist in diagnosing the problem? I guess I'd be looking for:

1) validation that wicd in DAEMONS of /etc/rc.conf is sufficient to start the client
2) some way to find out where both wicd-clients are being started from (if that's even possible); for example, autostart.sh-started apps might potentially be tied to my username, whereas if something's being started from the system side, perhaps the process is owned by root and we could reveal that somehow
3) any other suggestions or comments


Thanks.

Last edited by jwhendy (2011-03-10 03:00:56)

Offline

#2 2011-03-09 16:40:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

1) No its not. That only starts the daemon - not the client. So you have to explicitly start the wicd-client

2) Maybe you put it in your .xinitrc as well.

3) Check it. big_smile


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-03-09 16:48:32

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@Inxsible:

Thanks for the answer to #1. That's helpful. Unfortunately, no dice on .xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session openbox-session

Offline

#4 2011-03-09 16:52:58

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Some time ago I do remember a similar situation on my laptop, where I run wicd under fluxbox. Some bad shutdown or whatever and then I had two instances. Just remove one by killing its process should do it  - )unless of course this happens at every reboot that you get 2 instances).


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#5 2011-03-09 16:55:48

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Try this test.

1) Remove the wicd daemon from rc.conf. Remove the wicd-client startup from autostart.sh as well.

Once you log in, manually start

wicd

in a terminal. If that also starts the client, then there might have been a change in how wicd works (was wicd updated recently?)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-03-09 18:39:13

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@Inxsible: great suggestion. I should have thought of that. I wish it were as simple as wicd starting the client. Unfortunately, with wicd removed from the DAEMONS list in rc.conf... I got a gksu popup of wicd asking for access to my network cards. Entering my password produces a complaint about it not being able to access wicd's d-bus interface. Manually starting with 'wicd-client &' still works with no complaints, though.

I say unfortunately, as I have no idea where the other one is coming from...

$ cat /etc/rc.conf
DAEMONS=(syslog-ng dbus netfs @network @crond @alsa @arch32)

$ cat /etc/rc.local
cpufreq-set -c 0 -g ondemand &
cpufreq-set -c 1 -g ondemand &
sleep 3 && echo "75" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

$ cat ~/.config/openbox/autostart
#post-start operations
(tint2) &
(conky -c /etc/conky/conky.conf) &
(conky -c /etc/conky/conky-top.conf) &
#(wicd-client) &

Where else could I try to look -- what other scripts start things at boot / X login? If it  helps at all:

$ ps ax |grep wicd
 3863 ?        S      0:00 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
 3865 ?        S      0:00 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
 3899 ?        Ss     0:00 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext

This is the output before I did anything at all -- just after a boot. When I manually start wicd-client, I get an additional entry for wicd with an ID in the mid 3900s which is interesting since those above are quite a bit earlier (the above was actually after several log-outs, log-ins to see if the stuff X prints would help. Originally the numbers were in the 3600s, which is typical for at-boot processes on my machine).

So, something's starting it, but I have no idea what!

Any more ideas of where to look? Grep my whole system for 'wicd'? (just kidding)

Last edited by jwhendy (2011-03-09 18:39:53)

Offline

#7 2011-03-09 18:54:42

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,537

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Try using

ps -o user,pid,ppid,command -ax

so you can get the parent pid to identify which process is starting the client(s)

Offline

#8 2011-03-09 19:38:27

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@skunktrader: thanks for the input. Here was the output:

root      3899     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext
jwhendy   3956     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
root      4284     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      4286  4284 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py

So, it looks like all that was added was a user and ppid. It looks like they all trace back to pid 1 which is 'init [3]'. Not sure where to take this?

Oh, also... I got a complaint when I ran that command:

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html

I think it's just 'ax' vs '-ax'. That seemed to fix it, as did using -e (for everything) instead of -ax.

Last edited by jwhendy (2011-03-09 19:42:53)

Offline

#9 2011-03-09 19:41:02

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,537

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Ummm, I intended you to do that when both instances of wicd-client were running so you could see which process started each one

Offline

#10 2011-03-09 20:26:45

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@skunktrader: Whoops... but won't that be redundant? I already know where one instance was coming from: autostart.sh. I want to know why the other one is starting, since no one seemed to think that wicd automatically launched wicd-client. Anyway, several reboots later, here's the full scoop:

,---
| wicd in /etc/rc.conf deamons: no
| wicd-client in ~/.config/openbox/autostart.sh: no
`---
Note: In previous reboots, I get asked by gksu to allow wicd to access my network cards. This past time, I got a message from gksu saying that wicd had been granted access to my network cards.

,---
| before starting openbox (nothing):
`---

$ ps ax -o user,pid,ppid,command |grep wicd

,---
| after starting openbox:
`---

$ ps ax -o user,pid,ppid,command |grep wicd
jwhendy   3569     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
root      3617     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3619  3617 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3669     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext

=====================

,---
| wicd in /etc/rc.conf deamons: yes
| wicd-client in ~/.config/openbox/autostart.sh: no
`---

,---
| before starting openbox:
`---

$ ps ax -o user,pid,ppid,command|grep wicd
root      3445     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3447  3445 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3566     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext

,---
| after starting openbox:
`---

$ ps ax -o user,pid,ppid,command|grep wicd
root      3445     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3447  3445 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3566     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext
jwhendy   3666     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py

=====================

,---
| wicd in /etc/rc.conf deamons: yes
| wicd-client in ~/.config/openbox/autostart.sh: yes
`---

,---
| before starting openbox:
`---

$ ps ax -o user,pid,ppid,command|grep wicd
root      3420     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3422  3420 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3543     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext

,---
| after starting openbox:
`---

$ ps ax -o user,pid,ppid,command|grep wicd
root      3420     1 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3422  3420 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3543     1 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/001b5311e850 -D wext
jwhendy   3657     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
jwhendy   3662  3641 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py

=====================

So, this is why I said that the test is a bit redundant. The real question still remains: why with no wicd in rc.conf and it commented in autostart.sh is wicd related stuff starting at all? I already know one instance is definitely occurring from autostart.sh, because when I commented it out, I only had one left. But if autostart.sh is supposed to be mandatory, where is the other one coming from? More so... without it in the daemons line, the behavior with gksu indicates that something, somewhere is trying to get wicd up and running. That is what I really don't get at all.

Offline

#11 2011-03-09 20:29:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

find out the app that has pid 3641 -- that is what is starting wicd-client,


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#12 2011-03-09 20:36:08

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@Inxsible: I don't think so. Note that the first two configurations have no wicd-client in autostart.sh and they both contain a line like this:

jwhendy   3666     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py

Now look at the last iteration with the pid 3641 you're interested in. Note that it contains:

jwhendy   3657     1 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py
jwhendy   3662  3641 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client.py

That last iteration featured wicd-client in autostart.sh and so unsurprisingly:

$ ps ax |grep 3641
 3641 tty1     S      0:00 /usr/bin/openbox

We want to know why there's wicd-client processes with a parent pid of 1 (init). That process is the oddity, not the one being started by autostart.

Last edited by jwhendy (2011-03-09 20:37:11)

Offline

#13 2011-03-09 21:15:05

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Don't have an explanation for why it wasn't doing this before, but do you have the file /etc/xdg/autostart/wicd-tray.desktop from the package? This was giving me multiple icons when I had wicd-client in my openbox autostart file.

Offline

#14 2011-03-09 21:21:48

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@mcmillan: beautiful. I do, indeed. What was your fix? Just wipe the file? Or stop putting it in autostart?

I'd also be curious as to:
1) if other wicd/openbox users have the file
2) if other wicd/openbox users removed wicd-client from autostart if it would still start up

The existence of that file explains, perhaps, why even with wicd removed from /etc/rc.conf gksu was still trying to access it.

Offline

#15 2011-03-09 21:27:35

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Huh. THIS is interesting:

By placing an application's .desktop file in one of the Autostart directories the application will be automatically launched during startup of the user's desktop environment after the user has logged in.

So (based on reading more of that article), it seems that anything in /etc/xdg/autostart and ~/.config/autostart gets... autostarted.

I don't know why others aren't getting this issue as well, since I found this:

$ sudo pacman -Ql wicd
...
wicd /etc/xdg/autostart/wicd-tray.desktop
...

If this file is part of the wicd package and they have it in autostart... shouldn't it be double appearing for everyone?

Offline

#16 2011-03-10 03:00:38

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

I'm marking this solved, but if anyone can comment as to whether they have an /etc/xdg/autostart/wicd-tray.desktop as well, that would be helpful. I'd still like to understand why this is happening to two of us but no one else since that file is apparently in the wicd package.

Thanks.

Offline

#17 2011-03-10 04:51:49

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

That file is part of the package and is being used to start it. I'm not including wicd in the autostart file in my home directory anymore. I believe there's some other posts somewhere on the forums, and also a bug report though nothing seems to have happened either changing that or closing as 'won't fix' since it was filed
https://bugs.archlinux.org/task/22423

Offline

#18 2011-03-10 14:58:31

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Great. I added a note in the Wiki, both in the running wicd section where it advises adding wicd-client to DE/WM startup files, a note at end of the troubleshooting section, and two new external links to this post and the bug report you provided. That should cover it smile

Offline

#19 2011-03-10 15:10:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

jwhendy wrote:

Great. I added a note in the Wiki, both in the running wicd section where it advises adding wicd-client to DE/WM startup files, a note at end of the troubleshooting section, and two new external links to this post and the bug report you provided. That should cover it smile

I am always pleased when users take the time to solve their problem and accordingly update the wiki so as to help others.

Kudos to you jwhendy and Thank you.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#20 2011-03-10 15:18:58

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@Inxsible: thanks! I probably do it motivated by one part generosity and several parts of "I-hate-when-I'm-looking-for-something-and-it's-not-on-the-wiki-and-so-I-never-want-anyone-else-to-go-through-that" smile Actually the wiki is a great way to store "self-notes" as well. If you solve some issue when setting up your system, for example, you can add it to the wiki and always know you can find it again.

Last edited by jwhendy (2011-03-10 15:19:29)

Offline

#21 2011-03-16 19:48:26

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Aha -- now this is really solved. I logged out of openbox and just happened to notice a line in the text on the tty that said something about "Autostart requires PyXDG to be installed." This is coupled with the fact that wicd-client stopped appearing again. I checked through /var/log/pacman.log and grepped for pyxdg and noticed that I removed it a couple days ago. I recently fiddled around with dexter, an address book program that requires pyxdg as a dependency and finally now I really know what the missing link is to this query.

If you have pyxdg installed, you'll get an things in /etc/xdg/autostart/*.desktop that start up on log in. If you don't... you won't.

So... since I decided I didn't need dexter as of Monday, suddenly wicd-client wasn't showing up anymore and I was mystified. No longer! Pretty cool, huh?

Offline

#22 2011-03-16 19:54:59

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Hmm I am not so sure if I'd want that behavior, because if its in /etc/xdg ..it would mean that the apps would get started for all. I would much rather have that in userland and have each user define what they want to start up.

But then again, I am the only user on the computer of mine...so it's pretty much moot.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#23 2011-03-16 20:08:00

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

@Inxsible: well, actually you can define your own as well. See the autostart-specification standard HERE. You can also have things autostarted in ~/.config/autostart, but the system-wide location is /etc/xdg/autostart, and the wicd package includes /etc/xdg/autostart/wicd-tray.desktop. mcmillan posted a link to the discussion about whether this is desirable or not HERE.

It seems that the consensus was that some wanted it and others didn't, but that the lesser experienced majority would expect it to be autostarted and so they were going to leave it.

I wouldn't mind this and would just say, trash /etc/xdg/autostart/* for whatever you don't want. Unfortunately, it seems that every time wicd is upgraded, you'll get it back again. Since I don't have pyxdg installed for anything, I'm no longer affected. No one without the pyxdg package will be affected by this.

Offline

#24 2011-03-16 21:16:43

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

Thanks for the link to the bug report. I think I agree with petelewis and believe that it should be left to the users to decide whether they want to start the client or not.

I don't use wicd -- I just use netcfg, so I probably won't voice my opinion on the bug report just as a +1 post, so as to keep the kruft to a minimum


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#25 2018-07-09 10:07:27

RasAlGhul
Member
Registered: 2018-07-09
Posts: 1

Re: [SOLVED] on last reboot, two wicd-clients running + two tray icons?

i had the the same issue but was easily solved my solution was to remove the wicd-client.desktop from the autostart folder and only keep the line in the openbox autostart.sh both of which were housed in the xdg folder i would not have been able to figure it out without this post thank you

Offline

Board footer

Powered by FluxBB