Is it possible to rotate a single window in X11? I tried to use Xephyr but I run into bug 100458.
I use XMonad as WM if that helps.
I've searched around a bit and I'm surprised not to find a ready solution for this. A possibility could be to use KWin and write a "Kwin effect" for it: https://blog.martin-graesslin.com/blog/2009/07/how-to-write-a-kwin-effect/ . Also, a gnome shell extension is imaginable, but does not exist yet.
A workaround solution: Weston is the reference implementation of Wayland. It allows rotating windows with super-key + middle mouse button. As this works for Wayland clients only, you can run Xwayland in weston, run your X application on Xwayland, and rotate the Xwayland display. If your application supports Wayland (based on GTK3, QT5 or SDL, for example), this works in weston without Xwayland.
For X applications on Xwayland
WAYLAND_DISPLAY=wayland-0 Xwayland :5
DISPLAY=:5 x-window-manager # additionally run a window manager for comfort
(On Gnome-Wayland you can run Xwayland directly without using weston, but I'm not aware of a Gnome-Wayland option to rotate a window).
For QT5 applications without Xwayland:
WAYLAND_DISPLAY=wayland-0 QT_QPA_PLATFORM=wayland yourQT5application
For GTK3 and SDL applications without Xwayland:
(Note: You can specify a wayland socket/WAYLAND_DISPLAY with
weston --socket=mywaylandsocket instead of assuming it will be
wayland-0. You need to do this on Gnome-Wayland as it uses
I'm adding a second answer using Weston, a bit different and more useable than my first one.
Create a file
~/.config/weston.ini with this content:
# wanna get mad? use: transform=flipped-270
weston.ini enables a rootless
xwayland.so in weston.
[output] section with
name=X1 defines weston's appearance as X client.
mode=600x800 sets the screen/window size.
transform=90 rotates the weston display.
scale=1 sets a scaling factor if needed.
[launcher] sections can be used to create custom panel starters for your X applications.
man weston.ini and
/usr/share/doc/weston/examples/weston.ini for further informations and options.
(Instead of using the weston panel, you can disable it with
panel-location=none, parse output of weston for
xserver listening on display :1 and use