https://github.com/Whonix/sdwdate-gui
It's tray icon is invisible inside Debian version 9 codename Stretch . It's fully functional still, but invisible.
Patrick | |
Jan 11 2017, 5:47 PM |
F169957: 21.png | |
Feb 15 2017, 1:26 PM |
F134696: 14.png | |
Feb 13 2017, 12:26 PM |
F134698: 16.png | |
Feb 13 2017, 12:26 PM |
F111648: 10.png | |
Feb 7 2017, 8:18 AM |
F111650: 12.png | |
Feb 7 2017, 8:18 AM |
F111646: 8.png | |
Feb 7 2017, 8:18 AM |
F111644: 7.png | |
Feb 7 2017, 8:18 AM |
https://github.com/Whonix/sdwdate-gui
It's tray icon is invisible inside Debian version 9 codename Stretch . It's fully functional still, but invisible.
As discussed with Patrick the issue is with the new KDE 5 (Plasma) architecture
http://blog.martin-graesslin.com/blog/2014/03/system-tray-in-plasma-next/
https://blog.martin-graesslin.com/blog/2014/06/where-are-my-systray-icons/
Python3 + PyQt5 resolved the issue.
Currently the sdwdate_gui uses python2.7 + PyQt4
We need to port it to PyQt5 which needs python3 as well.
After porting, the new look is like attached
Tooltips
Right Click
Left Click
These screenshots were useful to create a homepage for sdwdate-gui. There is now a homepage for both, sdwdate and sdwdate-gui.
https://github.com/joysn/sdwdate-gui/tree/master/usr/lib/python3.4/dist-packages/sdwdate_gui
Few things
sudo apt-get install python3-pyqt5
which is necessary for this change to work. Let me know if any files needs to be modified for that.
/usr/lib/python2.7/dist-packages/sdwdate_gui/sdwdate_gui.py
I created new directory for python3.4
/usr/lib/python3.4/dist-packages/sdwdate_gui/sdwdate_gui.py
libGL error: pci id for fd 10: 80ee:beef, driver (null) libGL error: core dri or dri2 extension not found libGL error: failed to load driver: vboxvideo
I googled and find the issue to be VM related but no fix as such apart from start using newer versions.
I broke https://github.com/Whonix/sdwdate-gui/blob/master/usr/lib/sdwdate-gui/show_message (by changing to python3). Could you please port it to python3 / newer Qt also?
Great! Merged. show_message (the popup) now functional again.
I see two issues (might be code wise the same issue).
sdwdate-gui -> right click "exit" ->
Segmentation fault
sdwdate-gui -> right click "restart" -> right click "restart" another time -> right click now ignored
Could you look into it please?
Well this issue is seen only in "Jessie" not in "Stetch". Still I fixed this.
This change should fix the first issue of segmentation fault.
Second issue
sdwdate-gui -> right click "restart" -> right click "restart" another time -> right click now ignored
I think this is a timing issue. As soon as you press restart, press once more restart, now right click just takes time - probably a good 30 seconds to appear.
Patrick, can you confirm this behavior with the update code?
sdwdate-gui -> right click "exit" ->
Segmentation fault
This is fixed.
sdwdate-gui -> right click "restart" -> right click "restart" another time -> right click now ignored
Right. It becomes responsive again after a while. But why does it lock up? That's a new bug, that didn't happen in Whonix 13.
Patrick,
I see the same issue (repeated right click , restart ) is present even in the older version. Can you verify that once?
If so, we can fork "unresponsive right click" issue out of this ticket.
Thanks
Yes it is indeed by design.
Some comments in the code
## When restarted from sdwdate-gui, allow sufficient time between ## status changes. See related comment in sdwdate-gui. ## When the file is quickly rewritten by another operation, reading ## would fail. TOCTOU ## QFileSystemWatcher may emit the fileChanged signal twice ## or three times, randomly. Filter to allow enough time ## between kill and restart popup in show_message(), and ## prevent os.kill to raise an error and leave a gui open.
So, I think if this needs a fix, this probably needs a re-design. A new ticket is desirable for that.
Works for me in Whonix 13. Right click does not lock up.
Yes it is indeed by design.
Some comments in the code## When the file is quickly rewritten by another operation, reading ## would fail. TOCTOU try: with open(self.status_path, 'rb') as f: status = pickle.load(f) except: return
I do not think this is related. Also possibly nothing can be done about it. It's about showing status messages. When one status is written and then sdwdate quickly progressing in the next moment and another status written. In these situation the one status that did not finish writing to disk is discarded and that later status that was written gets used.
- When restarted from sdwdate-gui, allow sufficient time between
- status changes. See related comment in sdwdate-gui.
Same as below.
## QFileSystemWatcher may emit the fileChanged signal twice ## or three times, randomly.
QFileSystemWatcher does not seem random. That would be a python bug. This was a previous issue which I might have quite some time ago here:
https://github.com/Whonix/sdwdate-gui/commit/0046d2170000449c666fe5f80ec9440505867922
During that time ./usr/share/sdwdate-gui/unit-test/fuzzer was created. It creates tons of messages in a very short time to check if sdwdate-gui has an issue with that. sdwdate-gui then supported super fast file changes and never messed up.
## QFileSystemWatcher may emit the fileChanged signal twice ## or three times, randomly. Filter to allow enough time ## between kill and restart popup in show_message(), and ## prevent os.kill to raise an error and leave a gui open. if self.message != self.previous_message: self.setToolTip('%s\n%s' %(self.title, self.stripped_message)) self.update.update_tip.emit() self.previous_message = self.message
That comment may be outdated, but that code may be good to keep. If sdwdate gets or some other case it could indeed happen that it issues the same message twice. Protecting from duplicate passive popups seems useful.
So, I think if this needs a fix, this probably needs a re-design. A new ticket is desirable for that.
Created T626 for that.
sdwdate-gui generally works, but after installing the sni-qt package, sdwdate-gui is invisible.
I do not see the issue in my case. I have latest sni-qt installed and the sdwdate icon is also visible.
Can you check if you see them inside status and notification?
Just an update.
By default each system tray icon has "visibility" value "Auto". Meaning, we have to press "Up Arrow Key" in the system tray icon to see the icon.
In case, we always want the sdwdate to be always shown then we need to modify
/home/user/.config/plasma-org.kde.plasma.desktop-appletsrc
file to add the below line at the end
shownItems=\\0
It should be in the General Containments. The updated section will look like below
[Containments][7][General] extraItems=org.kde.plasma.notifications,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.mediacontroller,org.kde.plasma.devicenotifier,org.kde.plasma.clipboard knownItems=org.kde.plasma.notifications,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.mediacontroller,org.kde.plasma.devicenotifier,org.kde.plasma.clipboard shownItems=\\0
Through UI it is easy, but the above can be updated using script. I am not sure what changes are to be done for this, so thought of posting this here.
Thanks for reporting!
Making edits in user's /home kde dirs directly isn't a clean solution. Easily breaks or breaks unrelated things or interferes with user settings.
The clean solution is dropping a kde configuration snippet. Here is an example, package https://github.com/Whonix/kde-dolphin-menubar-enable... Essentially two files:
That worked in Debian jessie based Whonix. Currently broken in Debian stretch based Whonix. Apparently the KDEDIRS variable was abolished and hopefully replaced by something else. Still TODO to figure that out and fix.
A similar solution for "always show all tray icons" or "always show sdwate-gui" might have to be added.
Works for me in non-published development build even without sni-qt package installed. After installation of the sni-qt package it's still working.