-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colorful window icons not always passed to dom0, padlock showed instead #1495
Comments
|
Why not implement the logic in DomUs? For example, icon would be sent on window creation. Pros:
Cons:
|
On Thu, Feb 18, 2016 at 06:40:54AM -0800, Vít Šesták wrote:
It is exactly what is currently done. In practice it looks like this:
The problem is that, we don't control order of 4a and 4b. To make things VM have no direct confirmation when window is actually created in dom0. Another idea (instead of caching) - add some feedback dom0->VM like "no Best Regards, |
I know this is somewhat old, but I feel this feature is not stabilized. I still see lock icons and so do others in Q4. In terms of implementation described by @marmarek, something seems off. I would say that here the vm is the model and the gui agent in dom0 is the view. For that it should not be up to the model to send data to the view. It should be the view that requests it. Example: This way the control over data that flows to dom0 is in the hands of dom0 and not the vm. The vm cannot send more icons than requested. This is better from a security perspective. All you have to do is sanitize and then validate the data you get back. Is the icon a valid image, not exceeding a certain size? Is the window title a valid utf-8 string, with min and max lengths, without forbidden characters, etc. This also solves synchronization issues. dom0 will always be ready when it receives any data, because it has requested it. It also means you don't need several different services. One gui manager in dom0 and one in each vm, no need for something separate for icons, or anything else that we should send, like mouse cursor? This should simplify the architecture. I have not had a look at the implementation in Qubes, but obviously there is one area in which we have the vm initiate comms: Events. It is just important to sanitize and validate all data send by events, and formalize the format. It can then be used by stuff other than gui related as well. It should be a fixed transport protocol. It can help users to make safe extensions as well, when using something strictly typed. |
Not sure whether this helps, but in fedora-26 template, I get this in ~/.xsession-errors:
|
This helps a lot, thanks! |
xpyb in Fedora 26 (and probably others) have problems with parsing X events, like this: Traceback (most recent call last): File "/usr/lib/qubes/icon-sender", line 155, in <module> retriever.watch_and_send_icons() File "/usr/lib/qubes/icon-sender", line 136, in watch_and_send_icons [xproto.EventMask.SubstructureNotify]) File "/usr/lib64/python2.7/site-packages/xcb/xproto.py", line 1400, in ChangeWindowAttributesChecked for elt in xcb.Iterator(value_list, 15, 'value_list', False): xcb.Exception: Too few items in 'value_list' list (expect 15). QubesOS/qubes-issues#1495
xpyb in Fedora 26 (and probably others) have problems with parsing X events, like this: Traceback (most recent call last): File "/usr/lib/qubes/icon-sender", line 155, in <module> retriever.watch_and_send_icons() File "/usr/lib/qubes/icon-sender", line 136, in watch_and_send_icons [xproto.EventMask.SubstructureNotify]) File "/usr/lib64/python2.7/site-packages/xcb/xproto.py", line 1400, in ChangeWindowAttributesChecked for elt in xcb.Iterator(value_list, 15, 'value_list', False): xcb.Exception: Too few items in 'value_list' list (expect 15). QubesOS/qubes-issues#1495 (cherry picked from commit dd959a0)
Automated announcement from builder-github The package
|
In a VM that has been open for a while icons no longer get shown and instead only a padlock does. Looking at xsession_errors it looks like the following may be relevant:
|
Based on my testing of the icon displaying for the task bar these are the observations I have made:
It creates the following icon paths: |
There are two totally separate mechanisms for icons in the menu and for running applications (taskbar, application switcher etc). The former is set in .desktop file, the latter - by running application. Application is free to set different icon, and additionally in many cases there is no way to tell which .desktop file was used to start given application.
Looks like Nautilus does not set _NET_WM_ICON window property. Not sure why. On the other hand, there are some GTK specific properties (retrieved with
Maybe some of them can be used to extract the icon? Maybe |
I noticed this issue for several other apps, including Spotify, Google Chrome, Microsoft Visual Studio Code ... If there is any logs / debug info I can provide you with, let me know. |
The issue is also with gedit. It seems like marmarek are right about it's two separate mechanisms. Quote:
As trying to override it with: Set the icon name in the .desktop file and then doing qvm-sync-appmenus fedora-30. Does not get it to work. I'm using Quebes 4.0 with all updates. |
@najamelan’s comment is right on the money, IMO. |
I have this issue when icon-sender stops running for some reason. ~/.xsession-errors contains this:
Running |
The above seems like a direct result of icon-receiver being terminated. So, the actual problem is somewhere on the icon-receiver side. Have you restarted your X11 session (in case of i3, I believe also reloading configuration may cause this)? Check in dom0 |
This may indeed look this way, but I think the above analogy doesn't work well here. Most of the gui daemon actions are triggered either by the user (click, key press etc), or by some in-vm application action (window content change, window title change etc). It is all event-driven. If you'd separate events from the actual data, then the protocol flow would complicate quite a bit, because for every event gui-daemon would need to:
If there are multiple events in the pipeline, then it would even need to keep track which are handled and which are still waiting for this subsequent data. Correlate which response is to which request (which event, which other responses if more than one requested etc). This is quite complex state machine and gives a great chance to introduce some logic bugs (leaving alone pure programming bugs that are also possible here, because of the C language). Instead, we designed the GUI protocol the way, that events already carry all the needed auxiliary data. In your model you can simply treat all gui-agent messages as kind of rich events, that avoids that ping-pong to get the actual data. Now to the icon receiver. The source of those synchronization issues is the icon handling being outside of gui-agent<->gui-daemon loop. And the sole reason for that is the programming language: I really don't want to do untrusted graphics processing in application written in C (gui-daemon). That's why it is a separate service written in Python.
Both of the above cases would be solved by incorporating events processing into gui-agent<->gui-daemon, but I don't want to do that for the reasons explained above. It's better to sometime have a missing icon, than to risk complete system compromise. |
No, I haven't
|
This appears to be a fantastic use-case for Rust. The C code would need to add support for a single new type of event, but all of the heavy lifting would be done in Rust. In the event that said heavy lifting was CPU-intensive, that work could even be done off of the main thread, thanks to Rust’s good support for multi-threading. |
I guess in light of #6652 it's not clear to me what the priority of this issue should be. |
One way to reproduce:
The way to "fix" icons for appvm is only to shut it down completely, start again and reopen applications. Without restart nothing gets fixes, padlocks instead of proper icons. |
This issue is being closed because:
If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. |
I just checked this way of reproducing. |
It looks like sometimes colorful icon isn't set for a window. Most likely it is transferred before window in dom0 gets created, and simply discarded.
Dom0 part might monitor for new window events and have some (small) queue for such icons.
The text was updated successfully, but these errors were encountered: