Disable GTK3 window management
Posted: 2018-11-04 Filed under: desktop, system | Tags: .bashrc, gtk3, gtk3-nocsd, lxdm, nocsd, profile, window, xfce Leave a commentSome GTK3 programs, such as file-roller
and Evince
, use their own custom title bar with minimize, maximize and close buttons. Under Xfce, I have experienced hiccups with Evince when maximized: it would refuse to unmaximize the window (or rather, does not remember the dimensions of the unmaximized window) and behaves kinda “sticky” to desktop borders. In another case, if I have the compositor turned off, the window edges are not smoothened and look ugly.
Here’s what I am talking about, this is how file-roller looks:
I recently came across gtk3-nocsd, a small module used to disable the client side decoration of GTK3. It can be easily installed from SBo.
Now, I can start a GTK3 program like this:
gtk3-nocsd file-roller
To make it the default for all GTK3 programs, I followed the instructions by the author and added these to my .bashrc on a Slackware64 14.2 system:
export GTK_CSD=0 export LD_PRELOAD="/usr/lib64/libgtk3-nocsd.so.0"
I boot in runlevel 3 and start Xfce by simply typing startx
. I had to log out and in for the changes to take effect. When I boot into runlevel 4 with a login manager such as LXDM, this approach has no effect. Instead, I had to put the above lines in my .profile
, as advised here.
That’s it!