Results 1 to 2 of 2

Thread: Bash script

  1. #1
    Join Date
    Nov 2016
    Beans
    44

    Bash script

    Greetings;

    I want to create a simple script that can accessed via a keyboard shortcut, to open a terminal window FULL SCREEN, then run a simple command to run a screen saver program that runs in the terminal window.

    I tried this command to full screen the terminal,

    Code:
    gnome-terminal --command="wmctrl -r ':ACTIVE:' -b toggle,fullscreen"
    and it works, but the next command which is the one that would open the screen saver program opens in a new shell. Any attempt to have it open in the current shell fails.

    Should be a simple two line script.

  2. #2
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,333
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Bash script

    It's no use having yoru script start the screensaver. You need the gnome-terminal to start the screensaver. There is probably a way to pass arguments to gnome-terminal to tell it to open full-screen, and then you can use --command=myscreen-saver. But failing that, this may work:
    Code:
    gnome-terminal --command="wmctrl -r ':ACTIVE:' -b toggle,fullscreen ; my-screen-saver"

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •