Run script full screen in terminal
Solution 1
"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).
Solution 2
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;
Related videos on Youtube
Roboman1723
Updated on September 18, 2022Comments
-
Roboman1723 4 monthsHow 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?
-
Roboman1723 over 8 yearsIs there a way to force terminal to run full screen in a script? -
Tim over 8 yearsSo you are running a script, and it opensgnome-terminal? Yeah, add the options--full-screen -
Roboman1723 over 8 yearsI saw that and put it in like this:gnome-terminal --full-screenIt still doesn't launch full screen -
Tim over 8 yearsDoes it from terminal (i.e. if you open one then rungnome-terminal --full-screendoes it open in in full screen mode? -
Roboman1723 over 8 yearsI appreciate it but wmctrl isn't on Lubuntu -
Oli over 8 yearsIs installing it (sudo apt-get install wmctrl) too much? -
Roboman1723 over 8 yearsDidn't seem to work on Lubuntu, thank you though. -
Roboman1723 over 8 yearsHa no but I'm sending this script to many people on different distros on Linux and I just want it to work right out of the gate. -
Roboman1723 over 8 yearsNo it doesn't because Lubuntu uses XFCE terminal not gnome -
Oli over 8 yearsThat's understandable. It's adding more work for you but you could package it into a .deb that depended on thewmctrlpackage. That would also save on people putting it in the wrong places (and needing to set permissions). Might be less work in the long run. -
Oli over 8 yearsI'll download Lubuntu and see what's available. There's probably something openbox specific that'll work. -
TuKsn over 8 years@Roboman1723 Lubuntu normally uses LXTerminal.