I have the same problem using Xubuntu with the default terminal emulator and window manager and have nearly gone insane trying to fix it. I have a partial answer and, unfortunately, no real fix for you.
As you mentioned, the window size in a terminal emulator (at least in xterm
and xfce4-terminal
, the ones that I tested) is handled in terms of font size rather than pixels, which one might expect. This is acceptable behavior according to the X window system manpage: "The WIDTH and HEIGHT parts of the geometry specification are usually measured in either pixels or characters, depending on the application."
This is why there are gaps around the terminal window when doing partial tiling: the window manager maximizes the window within that half of the display while using whole multiples of the font size for the dimensions. There may be a way to add offsets or fix this with in-depth xfwm
or X configuration tweaks that are beyond me (I'm still pretty new to Linux).
The reason that the window takes up the full screen area when maximized seems to have to do with a setting that (I think) is on by default in a new Xubuntu install. If you open the Xfce4 settings manager, go to Window Manager Tweaks, and click the Accessibility tab, there is an option to "Hide frame of windows when maximized." When this option is checked, there are no gaps around the maximized terminal window; when it is unchecked, there are.
Unfortunately, this option only applies to maximized windows and not windows that are "maximized" to half of the screen by partial tiling. Disabling it will at least make the gaps around the windows consistent in both cases.
As far as your issues with the tab bar pushing lines off of the screen, tiling the window again after opening a new tab will bring the bottom of the window back into view. You could also set the terminal to always show the tab bar. This option is not available through the graphical preferences menu; you will have to edit ~/.config/xfce4/terminal/terminalrc
and change the MiscAlwaysShowTabs
option to TRUE
. This way the size of the window won't change when opening a new tab.
Sorry I couldn't be of more help.
I could achieve something like that using devilspie2 (also check here for a few tips https://help.ubuntu.com/community/Devilspie)
sudo apt install devilspie2 lua5.2
and then created the following file at ~/.config/devilspie2/terminator.lua
if (get_application_name() == "terminator") then
-- x,y, xsize, ysize
set_window_geometry(683, 32, 683, 768);
end
Nevertheless I still can't exactly reproduce gnome shell's behavior. If I tile terminator to the left win win-left, the windows decoration disappears, and it appears again if I restore it, with this lua script windows decoration remain visible
And finally to make it autostart I created the following file at ~/.config/autostart/devilspie2.desktop
[Desktop Entry]
Name="devilspie2"
GenericName="devilspie2"
Comment="devilspie2 process"
Exec=/usr/bin/devilspie2
Terminal=false
Type=Application
X-Gnome-Autostart=true
Best Answer
Install maximus
from the Software Center or from the Terminal:
Then run this command from the Terminal:
All the new windows will be maximized with that.
Finally, just like in the screen shot at the 5th point in Isaiah's answer, add an entry in the Startup Applications. The name can be whatever you want, and the command will be simply
maximus
.