Run script full screen in terminal

11,314

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;
Share:
11,314

Related videos on Youtube

Roboman1723
Author by

Roboman1723

Updated on September 18, 2022

Comments

  • Roboman1723
    Roboman1723 almost 2 years

    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?

  • Roboman1723
    Roboman1723 about 10 years
    Is there a way to force terminal to run full screen in a script?
  • Tim
    Tim about 10 years
    So you are running a script, and it opens gnome-terminal? Yeah, add the options --full-screen
  • Roboman1723
    Roboman1723 about 10 years
    I saw that and put it in like this: gnome-terminal --full-screen It still doesn't launch full screen
  • Tim
    Tim about 10 years
    Does it from terminal (i.e. if you open one then run gnome-terminal --full-screen does it open in in full screen mode?
  • Roboman1723
    Roboman1723 about 10 years
    I appreciate it but wmctrl isn't on Lubuntu
  • Oli
    Oli about 10 years
    Is installing it (sudo apt-get install wmctrl) too much?
  • Roboman1723
    Roboman1723 about 10 years
    Didn't seem to work on Lubuntu, thank you though.
  • Roboman1723
    Roboman1723 about 10 years
    Ha 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
    Roboman1723 about 10 years
    No it doesn't because Lubuntu uses XFCE terminal not gnome
  • Oli
    Oli about 10 years
    That's understandable. It's adding more work for you but you could package it into a .deb that depended on the wmctrl package. 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
    Oli about 10 years
    I'll download Lubuntu and see what's available. There's probably something openbox specific that'll work.
  • TuKsn
    TuKsn about 10 years
    @Roboman1723 Lubuntu normally uses LXTerminal.