andrebrait / prime-indicator

PRIME Indicator Plus - enhanced indicator applet for NVIDIA Optimus laptops
GNU General Public License v3.0
69 stars 12 forks source link

Taskbar Icon Missing in KDE Plasma Unless Run with Sudo #23

Closed bellpepper closed 7 years ago

bellpepper commented 7 years ago

This seems similar to #7, but opened a new issue anyways.

I was having issues getting the icon to display in the taskbar of Plasma, and noticed that if I run prime-indicator as root, the issue goes away. Here is what I see as my normal user:

cd /usr/lib/prime-indicator
./prime-indicator

as-my-user Notice the missing icon below the "ph" of "Graphics"

But it looks better when I ran it with sudo: sudo ./prime-indicator as-root

My prime-indicator.cfg:

[PowerManagement]
enabled = true

[Appearance]
#iconset = theme-default
#iconset = color
iconset = custom(#ffffff)

About my system:

$ uname -a
Linux ed-Lenovo-Y50-70 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS            (Actually is Kubuntu)
Release:        16.04
Codename:       xenial

$ plasmashell --version
plasmashell 5.6.5

Great tool, btw!

andrebrait commented 7 years ago

This is weird. I run KDE too. Is it affected no matter which option you set in the config file?

Can you send me the output of ls -lha /usr/lib/prime-indicator/icons?

bellpepper commented 7 years ago

Any option in the config file will affect the toast (I don't know the proper name) icon properly. For example, here is iconset = color:

color

$ ls -lha /usr/lib/prime-indicator/icons
total 24K
drwxr-xr-x 2 root root 4.0K Nov 21 15:00 .
drwxr-xr-x 3 root root 4.0K Nov 27 17:34 ..
-rw-r--r-- 1 root root 3.9K Nov 21 15:00 prime-indicator-intel.svg
-rw-r--r-- 1 root root 3.9K Nov 21 15:00 prime-indicator-intel-symbolic.svg
-rw-r--r-- 1 root root 3.0K Nov 21 15:00 prime-indicator-nvidia.svg
-rw-r--r-- 1 root root 3.0K Nov 21 15:00 prime-indicator-nvidia-symbolic.svg
andrebrait commented 7 years ago

That's very, very weird. I'm going to check if the solution to KDE >= 5.8 caused this. If that's the case, I'll have to include a conditional check to see if the user is running KDE with version lesser or greater than 5.8.

bellpepper commented 7 years ago

Also, I found a downside to running it with sudo: I cannot interact with the menu icon from the taskbar UI. If I right-click the icon, no menu appears. I have to quit prime-indicator using a kill command.

andrebrait commented 7 years ago

Given how the AppIndicator library is unstable with anything other than Ubuntu's Unity, it's not surprising.

A while ago it was reported to me some situations that would cause Gedit to crash when the indicator started, but only if the user had opened it through the GUI by opening a file with a file browser (such as Nautilus, Dolphin, etc.). That's how buggy the AppIndicator library can be.

I'm considering moving it to Qt, since it works well with most desktops.

bellpepper commented 7 years ago

You know, I think this must be a local issue. I've began using another application that attempts to display on the taskbar, and it is not displaying properly. The "proper" icon here should be a red logo, but instead it is just a red box. So, I think this issue could be closed as EUE. Something must be wrong on my machine. Sorry if this resulted in chasing a bug that didn't exist.

image

andrebrait commented 7 years ago

No problem at all! I haven't had any time to look into the issue anyway. Thank you for providing the information.