Run script full screen in terminal

How do I get a bash script to run in full screen when it's executed or how can I change the terminal size if I can't make it full screen?

3 Answers

"Fullscreen" isn't a bash concept at all, it's down to your terminal emulator window and X.

However if you're scripting, you can tell X to add a fullscreen hint to a client. I most applications this will work. I've tested with Terminator and I've no reason to suspect it won't work with Gnome Terminal:

# set fullscreen on startup
wmctrl -r :ACTIVE: -b add,fullscreen
# ... do your stuff ...
# and before you quit
wmctrl -r :ACTIVE: -b remove,fullscreen

With regard to keeping this at a minimum footprint, the only way I've found to do this is to launch another terminal. Unfortunately lxterminal doesn't have a fullscreen launch option so you could either hack through the OpenBox settings (beurgh) or just fall back to xterm:

xterm -fullscreen -hold -e ./anotherscript.sh

Yeah, I'm suggesting launching another terminal. If you're shipping this with a launcher of sorts, you can avoid needing a secondary script.

xterm doesn't adhere to standard fonts or anything like that though you can configure almost everything through command line arguments (see man xterm for a riveting read).

6

Press F11 to make the terminal full screen. If you always want it full screen, you need to edit the .desktop file:

Create a new file, via gedit or similar in /.local/share/applications. Call it fsterminal.desktop

[Desktop Entry]
Version=1.0
Name=Full Screen Terminal
Comment=Open Terminal full screen
Exec=gnome-terminal --full-screen
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=Application;
6

You can try if xterm escape sequences work for your terminal, e.g.

  • echo -ne "\e[8;XXX;YYYt" resizes terminal to show XXX columns and YYY rows
  • echo -ne "\e[9;1t" maximizes the terminal window (doesn't work for me)
  • ...

On my ubuntu 14.04 machine running unity, echo -ne "\e[8;200;200" resizes the terminal beyond screen edges effectively maximizing the window.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like