subgraph-os-issues icon indicating copy to clipboard operation
subgraph-os-issues copied to clipboard

Set custom WM_CLASS for sandboxed apps

Open dma opened this issue 8 years ago • 2 comments
trafficstars

We'll need to patch xpra to do this.

dma avatar Oct 01 '17 15:10 dma

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 avatar Oct 07 '17 16:10 dma

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.

dma avatar Oct 08 '17 15:10 dma