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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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
weston WAYLAND_DISPLAY=wayland-0 Xwayland :5 DISPLAY=:5 yourXapplication 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:
weston WAYLAND_DISPLAY=wayland-0 QT_QPA_PLATFORM=wayland yourQT5application
For GTK3 and SDL applications without Xwayland:
weston WAYLAND_DISPLAY=wayland-0 yourGTK3application
(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:
[core] modules=xwayland.so shell=desktop-shell.so idle-time=0 [shell] background-color=0xff002244 locking=false # panel-location=none [launcher] icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png path=/usr/bin/weston-terminal [launcher] icon=/usr/share/icons/hicolor/48x48/apps/firefox.png path=/usr/bin/firefox [output] name=X1 mode=600x800 transform=90 # wanna get mad? use: transform=flipped-270 scale=1
weston.ini enables a rootless
xwayland.so in weston.
[output] section with
name=X1 defines weston's appearance as X client.
mode=600x800sets the screen/window size.
transform=90rotates the weston display.
scale=1sets 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