Qubes integration for xmonad

352 views
Skip to first unread message

Daniel Schoepe

unread,
Oct 25, 2015, 1:05:50 PM10/25/15
to qubes-users
Hi,

I implemented some rudimentary changes to integrate the xmonad window
manager [1] with Qubes. This may be useful to others who want to use
xmonad on Qubes without losing the visual cues provided by the default
window managers.

So far, the following changes are implemented:

- Window borders are now colored based on the Qubes domain the window is
running in. The colors can be customized in xmonad.hs by overwriting
the qubesColors field in the XConfig record.

- XMonad.Layout.Decoration and layouts based on it (such as
XMonad.Layout.Tabbed) also use the Qubes domain for settting the color
of the window decoration. This can be used to get a more visible
indication of the domain for other layouts; for example, any existing
layout can be changed to add the decoration by applying `simpleDeco
shrinkText defaultTheme` (from XMonad.Layout.SimpleDecoration) to
the layout.

However, other modules that somehow create their own window borders are
not affected by these changes.

Since this functionality required changing xmonad's core, rebuilding
both xmonad and xmonad-contrib is necessary for using this. The
repositories with the changes are available on github:

https://github.com/dschoepe/qubes-xmonad
https://github.com/dschoepe/qubes-xmonad-contrib

Perhaps this is useful for someone else as well.

Best regards,
Daniel

[1] http://xmonad.org

Thomas Leonard

unread,
Oct 31, 2015, 2:43:33 PM10/31/15
to qubes-users

Very interesting! Not being able to use a tiled WM has been a big annoyance for me (and I've had endless trouble with kwin). I see xmonad now has an ion3 mode, which sounds ideal.

Could you provide some more detailed installation instructions? I assume I should build in an AppVM and then copy the binary (somehow) to dom0. What do I need to do exactly?

Thanks!

Daniel Schoepe

unread,
Oct 31, 2015, 3:47:23 PM10/31/15
to Thomas Leonard, qubes-users
Hi,

On Sat, 31 Oct 2015 19:43 +0100, Thomas Leonard wrote:
> Could you provide some more detailed installation instructions? I assume I
> should build in an AppVM and then copy the binary (somehow) to dom0. What
> do I need to do exactly?

Exactly, it should suffice to install the required dependencies in a VM
(the haskell-platform package on fedora should be enough) and running
`cabal install` first for xmonad, then for xmonad-contrib. After that,
you can configure xmonad, run `xmonad --recompile` and copy
~/.xmonad/xmonad-x86_64-linux to dom0. xmonad can then be started by
running `~/.xmonad/xmonad-x86_64-linux --replace` in dom0.

Note that changing the xmonad configuration (in the AppVM) requires
rerunning `xmonad --recompile` and copying the new binary to dom0.
Arguably you could also do the compilation and configuration in dom0 to
avoid that. The additional risk should be limited; if xmonad or the
compiler were malicious, it could result in a malicious binary anyway.

Best regards,
Daniel

>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups "qubes-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users...@googlegroups.com.
> To post to this group, send email to qubes...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/18201d74-b7f8-4080-b88d-78cb5db0ebbb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Alex

unread,
Oct 31, 2015, 4:31:45 PM10/31/15
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 10/31/2015 08:47 PM, Daniel Schoepe wrote:
> Hi, [....]
I'd really love to try a tiling window manager, but I'm quite low on
time to spare for experiments..

For me, and any other Qubes users that would love a tiling wm but are
in a hurry, could you please post somewhere any screenshots of the
result with a handful windows opened? I'm quite curious about the
auto-spiral placement.

Thank you (anybody who takes the time to do that) in advance

- --
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWNSUsAAoJENNOJZnNP8uDBwgP/3b5u2zMIh30k3fkXDjDbgoR
X3I2ySQByHnchvxyIygroqgORbAcHcLDTAc+DMdjXAmmvRc2UDO3TJDR8tsf4Jap
wE6nKUxD97vEn3CeA9S69iy+KS2mxEydFXHXryPNPTqptlrrcCAO4nT2WXjG72wl
NBOO+mmPtVztJT6pG0jhbUsnD/8t/q4JOkE9/FeRV8ylGdWE+MGwhbXbu3fDiVWl
Ne1GIWBF4PeGGswcYPW75KOquISGjWZ6h5aB9sf9iImQHYAqy7jArZ74QZyt0X3C
BCwaoutKT+Dznc4Ud0+f2QOrDRstDr23xoK2bILyGwoKQVnrzBBE5RpunmIjZWoH
avvluvnu9RGWiF0RP/5Zq9b6OvJx3ZpowsXqDSRzRuS1tB2oLfNIvNxIqNtM+NrA
3nA4F1SY7N7u7/Dx8jr4kW7u0+nC6LFjBgiIsyE15uYb0n80qA3V/80qxH7Jr5Ng
/IhNMhq3Nf1Oh54wWos/fT+OUEH5HkUNTiwoHvuWjLgdIu96Uv+YAw3CI5zZ/GFx
B6u+zGefLDPCHZ/53in4qQoz/g+Sw1Zjc0vYkRJzEPAgfcHx8wuNf+/mac06XLhw
36FT2jZz19LhqFc+7ebZWTWN9TyBS/e3xTa49MSVF6iYmic3rjwQbtCI7WGKzBs7
bYkvybMrQ7Blcf0xGDtw
=lDx1
-----END PGP SIGNATURE-----

Daniel Schoepe

unread,
Nov 1, 2015, 7:59:23 AM11/1/15
to Alex, qubes...@googlegroups.com
On Sat, 31 Oct 2015 21:31 +0100, Alex wrote:
> For me, and any other Qubes users that would love a tiling wm but are
> in a hurry, could you please post somewhere any screenshots of the
> result with a handful windows opened? I'm quite curious about the
> auto-spiral placement.

Here are some screenshots. It basically looks the same as a normal
xmonad installation with the addition of the colored window decorations.
I don't use the spiral layout, but it should be sufficient get an idea
of how it will look anyway.

One of the default tiled layouts (with emacs and two terminals):
http://schoepe.org/~daniel/xmonad1.png

Tabbed layout (two firefox instances):
http://schoepe.org/~daniel/xmonad2.png

Out of convenience this still uses the default Xfce panel configuration,
but there is a panel plugin that can show more xmonad-specific
information: https://github.com/alexkay/xmonad-log-applet

The colors for each VM and other things like the font and size of the
decorations can be customized in the xmonad configuration file. For that
it's probably easiest to

Best regards,
Daniel

Daniel Schoepe

unread,
Nov 1, 2015, 8:27:29 AM11/1/15
to Alex, qubes...@googlegroups.com
On Sun, 01 Nov 2015 13:59 +0100, Daniel Schoepe wrote:
> The colors for each VM and other things like the font and size of the
> decorations can be customized in the xmonad configuration file. For that
> it's probably easiest to

That sentence should have ended: For details on that, it's probably
easiest to build the documentation using cabal (by running `cabal
haddock`). However, like the rest of the xmonad configuration, this may
require some basic familiarity with Haskell (or some other functional
language).

Best regards,
Daniel

Alex

unread,
Nov 1, 2015, 8:47:00 AM11/1/15
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 11/01/2015 01:59 PM, Daniel Schoepe wrote:
> On Sat, 31 Oct 2015 21:31 +0100, Alex wrote:
>
> Here are some screenshots. It basically looks the same as a normal
> xmonad installation with the addition of the colored window
> decorations. I don't use the spiral layout, but it should be
> sufficient get an idea of how it will look anyway. [...]
Thank you very much, I like your results a lot - I will be trying
xmonad as soon as I have a little spare time...

- --
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWNhfRAAoJENNOJZnNP8uDOX8QAJIarNCaxRa9GulRN/d7D+HA
lgg5WEaa6XUm0ygX9kYrpwS+Iq8Fb83xTMR0TRaAEc6luky1qeG+CprHf22qLjNY
lf2VBR7uU6pq5xKdGPUVBG97hflHmm54JE76rFXY2BmXgXgTvY9iWLICO5Wcrcwh
C3Cb8z7u/aDTE3PlC5VSiz/1QcN0UZE4q6sM7iIz5VGtOzjSJU7CT774qnDmo4ga
mkf0JkHPwEJnSmjV5OxV13/iG4G4pNsXrZd+Pl92E2ELT8nvJIFmuMVTLTG+NMXG
fr/yDXbJ2FdgPhepovTETiQIgxz4oVZyEHe5nTeCdCGRldKpkmVPeSjzRWCSeFux
Md4DK8Tc+dLXTx7QMBDlaV8ymEBLBJjA+XQQzaNNRVPQp3QFaEUknPmdhyIzU8ud
S0ueLvz9kyVds6Tm0SjGlfgnTlGXW6TnuHfUZkDOuZLDxRknojpULCABzSZqA5+y
f56n68RZNXumzW5g8G/xcalO2RxNCsNflrpyFToMkseLSmT8md7Brl4u8TS5vA0O
OLLBegp8O07pWC/LbjIigbMzaoS6zQDHkJ/+SBTancTKoPiY+sJbqEXzD+QDBhKm
wJ8GPfLVxpDLvCn8luZnen7bmIBjTS+aBx5eOmEDQwlrrXUO9nFGhlTWmHp1SwPX
3kcVWHg1wbKfTjc32xbg
=jElg
-----END PGP SIGNATURE-----

nesto...@gmail.com

unread,
Jul 1, 2019, 10:08:19 AM7/1/19
to qubes-users
Hi Daniel, I am trying to build your xmonad version but I have problems with some unbuildable library, but I don't know how I would look for that library.

Could you help me with this?
Thanks.

Resolving dependencies...
Configuring xmonad-0.12...
Failed to install xmonad-0.12
Build log ( /home/user/.cabal/logs/ghc-8.2.2/xmonad-0.12-FUpDXVryp86B9yS3zn4k4c.log ):
cabal: Entering directory '.'
Configuring xmonad-0.12...
Error: Dependency on unbuildable library from xmonad
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
xmonad-0.12-FUpDXVryp86B9yS3zn4k4c failed during the configure step. The
exception was:
ExitFailure 1

nesto...@gmail.com

unread,
Jul 1, 2019, 10:21:42 AM7/1/19
to qubes-users
Ok, I have changed X11 library maximum version in xmonad.cabal and it's worked.

nesto...@gmail.com

unread,
Jul 3, 2019, 7:23:07 AM7/3/19
to qubes-users
I have been able to build qubes-xmonad, but now I have problems with qubes-xmonad-contrib

When I try to build it I get next error message:

1. WindowAttributes parameter: In your version you have only 7 parameter but that function need 9 parameter.
I only add the parameters, only 2 and It's continue builing.

2. Now I Have problem with Helpers.hs file (Layout/Groups), but I can to continue, I don't now what the problem is, sorry.

Could you help with this? thanks.

cabal: Entering directory '.'
Configuring xmonad-contrib-0.12...
Preprocessing library for xmonad-contrib-0.12..
Building library for xmonad-contrib-0.12..
[119 of 248] Compiling XMonad.Util.DebugWindow ( XMonad/Util/DebugWindow.hs, dist/build/XMonad/Util/DebugWindow.o )

XMonad/Util/DebugWindow.hs:44:42: warning: [-Wunused-matches]
Defined but not used: ‘color’
|
44 | Just (WindowAttributes x y wid ht bw color m1 m o) -> do
| ^^^^^

XMonad/Util/DebugWindow.hs:44:48: warning: [-Wunused-matches]
Defined but not used: ‘m1’
|
44 | Just (WindowAttributes x y wid ht bw color m1 m o) -> do
| ^^
[123 of 248] Compiling XMonad.Layout.Groups.Helpers ( XMonad/Layout/Groups/Helpers.hs, dist/build/XMonad/Layout/Groups/Helpers.o )

XMonad/Layout/Groups/Helpers.hs:181:8: error:
Couldn't match type ‘G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)’
with ‘forall (l :: * -> *).
G.WithID l Window
-> XMonad.Util.Stack.Zipper (G.Group l Window)
-> XMonad.Util.Stack.Zipper (G.Group l Window)’
Expected type: G.ModifySpec
Actual type: G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
In the expression: sendMessage . G.Modify
In an equation for ‘wrap’: wrap = sendMessage . G.Modify
|
181 | wrap = sendMessage . G.Modify
| ^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '.'


Reply all
Reply to author
Forward
0 new messages