subgraph / subgraph-os-issues

Subgraph OS issues repository
73 stars 10 forks source link

Set custom WM_CLASS for sandboxed apps #294

Open dma opened 7 years ago

dma commented 7 years ago

We'll need to patch xpra to do this.

dma commented 7 years ago

On the Oz side of this, added support for custom environment variables as part of profile defined sandbox XServerConf: https://github.com/subgraph/oz/commit/c863b34382e494c28ee428c381352e9a67ddc699

The patch I've made to the xpra client will honor the environment variable XPRA_WMCLASS_OVERRIDE.

In an Oz profile, it would be specified like this:

, "xserver": {
    "enabled": true
    , "audio_mode": "pulseaudio"
    , "tray_icon":"/usr/share/icons/hicolor/256x256/apps/chronion.png"
    , "notifications": true
    , "env": [
        {"name":"XPRA_WMCLASS_OVERRIDE","value":"chronion Chronion"}
        ]
}
dma commented 6 years ago

Two more TODOs here:

  1. Xpra should also override class-instance server side in the off-chance that the user will run xpra client to attach manually (i.e. not through oz)
  2. We should override the icon hint as well, both client and server side. If Xpra can't find icons/metadata associated by class instance, it falls back to the icon hint.