Results 1 to 2 of 2

Thread: Start a command in "startup application preferences" in silent mode so gui is hidden

  1. #1
    Join Date
    Jul 2007
    Beans
    210

    Start a command in "startup application preferences" in silent mode so gui is hidden

    I put paprefs in startup application preferences but I don't want to see the PulseAudio Preferences gui each time.
    Similar problem. I put synapse in startup application preferences but again I don't want to see the interface when I log in, only when I press ctrl space.

  2. #2
    Join Date
    Feb 2015
    Beans
    Hidden!
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    Re: Start a command in "startup application preferences" in silent mode so gui is hid

    Having just looked at "man paprefs" is seems that there are no built in options to "start minimized/hidden". Probably because it is a program that does not need to "run in the background" and it is generally used "on demand".

    If you really need to start such a program at startup and have it minimized I'd suggest you install devilspie2 and put it in startup applications as well as paprefs. I have the devilspie2 config folder set up in $HOME/.config/devilspie2 and inside that folder I store the ".lua" scripts for each devilspie2 action required. It can be installed from a terminal with "sudo apt install devilspie2" (or you can use whichever GUI installer app you prefer).

    After installing devilspie2 make a directory for devilspie2 configuration files/lua scripts.
    Code:
    mkdir $HOME/.config/devilspie2
    The startup command for devilspie2 in startup applications would look like...
    Code:
    devilspie2 --folder  /home/"put-your-username-here"/.config/devilspie2
    Replace "put-your-username-here" with your actual user account name.

    The script in $HOME/.config/devilspie2 for minimizing the paprefs window which I've called "paprefs.lua"...
    Code:
    if get_window_name()=="PulseAudio Preferences" then
        debug_print "Pulseaudio Preferences Window"
        minimize()
    end
    Now if you log out and back in again devilspie2 will start at log in and when paprefs tries to open it will be automatically minimized by the devispie2 program running in the background.

    As I had both devilspie2 and paprefs installed here it was very easy to add a paprefs start up entry and a devilspie2 lua script named $HOME/.config/devilspie2/paprefs.lua. Every time I log out and back in paprefs is open but minimized to the bottom panel's "window buttons". Though once in a desktop session if paprefs is stopped and then restarted it will always restart minimized if devilspie2 is running.

    The same set up could be used for synapse I would guess though I can't test that here. I won't install it to test as it brings in zeitgeist packages as well. When the synapse window opens you could try noting the window title and creating a new lua script in $HOME/.config/devilspie2 called synapse.lua. Change both the "get_window_name" and the "debug_print" lines to suit the synapse window title and save as eg. "synapse.lua". Then add a startup entry for it as well.

    Good luck, yeti.
    Last edited by yetimon_64; May 25th, 2021 at 05:34 AM. Reason: highlighted/bolded "install devilspie2 and put it in startup applications as well"

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
  •