Start Slack Minimized on Ubuntu 18.04

It might seem silly, but I just hate having to see the Slack Connection window every time I start my computer. I just wanted it to start minimized, no big deal!

To start it minimized, just append -u to the command, e.g.

slack -u

screenshot

Enjoy!

About SoCRaT

Research Support and Infrastructure Engineer, OSS & Linux Geek
This entry was posted in Linux, Ubuntu and tagged , , . Bookmark the permalink.

4 Responses to Start Slack Minimized on Ubuntu 18.04

  1. Kenny says:

    OMFG this was driving me crazy. I was trying to do this with Devilspie2 with no luck. Thank you!

    Liked by 1 person

  2. zn says:

    If you have Gnome autostart Slack, and slack is installed from flathub, you can get rid of annoyance by changing exec line in ~/.config/autostart/com.slack.Slack.desktop into something like:
    Exec=sh -c “/usr/bin/flatpak run –branch=stable –arch=x86_64 –command=slack –file-forwarding com.slack.Slack –startup @@u %U @@ & sleep 12 ; /usr/bin/wmctrl -c slack”

    Dependency is a wmctrl package.

    This is tested in CentOS 7 with Gnome 3.28, wmctrl from EPEL repo, and slack 3.3.8 from flathub.

    It should work with Slack installed from a package with a slightly different exec.

    Key is in –startup(equivalent to -u) switch, and giving wmctrl some time with sleep command for slack to initialise. Number can be varied based on a speed of Slack initialisation.

    Like

  3. zn says:

    It not only minimizes Slack, but also kills the initial minimized window and leaves Slack happily live in a tray.

    Like

Leave a Reply to zn Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s