Crashes at startup because it can't find an icon

Asked by Ben Babcock

I am running Kubuntu 10.04 and KDE 4.5 with the Oxygen desktop theme. After installing localhost-indicator with the Python script, this is what I get when I try to run it. It seems odd that it balks because it cannot find an icon.

ben@serenity:/usr/local/bin$ ./localhost-indicator
Traceback (most recent call last):
  File "./localhost-indicator", line 164, in <module>
    main()
  File "./localhost-indicator", line 160, in main
    ControlPanel()
  File "./localhost-indicator", line 21, in __init__
    self.set_icon_from_file('/usr/share/icons/ubuntu-mono-dark/status/24/gnome-netstatus-tx.svg') # Set the window icon
glib.GError: Failed to open file '/usr/share/icons/ubuntu-mono-dark/status/24/gnome-netstatus-tx.svg': No such file or directory

Question information

Language:
English Edit question
Status:
Solved
For:
localhost-indicator Edit question
Assignee:
No assignee Edit question
Solved by:
Alfred Maghi
Solved:
Last query:
Last reply:
Revision history for this message
Best Alfred Maghi (alfred-maghi) said :
#1

Hi Ben.

This software was made for Ubuntu 10.04, that's why your Kubuntu system doesn't have the icon.

To fix your issue, edit the localhost-indicator and remove the following line:

self.set_icon_from_file('/usr/share/icons/ubuntu-mono-dark/status/24/gnome-netstatus-tx.svg') # Set the window icon

If you could find a Kubuntu icon I would fix it for Kubuntu users.
I also need an icon for localhost-indicator.desktop (Icon=network-transmit). Is this icon available on Kubuntu?

Revision history for this message
Ben Babcock (ben-tachyondecay) said :
#2

Thanks for the reply.

I looked for a network-transmit icon, and I have one at /usr/share/icons/gnome/scalable/status/network-transmit.svg. Changing the line above to use this path let me start localhost-indicator.

However, when I click on any of the buttons, all they do is popup with an alert. For example, when I click "Execute" under Apache, a popup tells me: "Apache http server will be started with the command: sudo service apache2 start" but apache2 does not actually start.

Revision history for this message
Alfred Maghi (alfred-maghi) said :
#3

The software alerts and commands 'gksudo service apache2 start'.
Does Apache start when you command: "sudo service apache2 start" ?

If not, you should have a look to your Apache log.

2010/8/20 Ben Babcock <email address hidden>

> Question #122002 on localhost-indicator changed:
> https://answers.launchpad.net/localhost-indicator/+question/122002
>
> Ben Babcock posted a new comment:
> Thanks for the reply.
>
> I looked for a network-transmit icon, and I have one at
> /usr/share/icons/gnome/scalable/status/network-transmit.svg. Changing
> the line above to use this path let me start localhost-indicator.
>
> However, when I click on any of the buttons, all they do is popup with
> an alert. For example, when I click "Execute" under Apache, a popup
> tells me: "Apache http server will be started with the command: sudo
> service apache2 start" but apache2 does not actually start.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Ben Babcock (ben-tachyondecay) said :
#4

Right, my terminal tells me "sh: gksudo: not found." Duh. Kubuntu doesn't have gksudo installed.

Sorry, my command line fu is not strong. ;) Hence my desire for GUI alternatives when available. Anyway, I should be able to alias gksudo to kdesudo . . . but that's beyond the scope of this problem. I'll be glad if you tweak localhost-indicator to work in Kubuntu "out of the box," but I understand you must account for some differences.

Thanks for your time.

Revision history for this message
Ben Babcock (ben-tachyondecay) said :
#5

Thanks Alfred Maghi, that solved my question.

Revision history for this message
Ben Babcock (ben-tachyondecay) said :
#6

One last note (sorry): editing localhost-indicator a replacing "gksudo" with "kdesudo" got everything working. I've learned something new today.