Gnome: Start ownCloud Desktop Client minimized

Today I solved the annoying behave of not minimized ownCloud Desktop Client under Gnome during logon startup.

System: Arch Linux
Gnome: 3.26.2
ownCloud Desktop Client: 2.4.0

1. Create a helper script

touch ~/scripts/start_owncloud_minimized.sh
chmod u+x ~/scripts/start_owncloud_minimized.sh
vim ~/scripts/start_owncloud_minimized.sh

Content of start_owncloud_minimized.sh:

#!/bin/bash
FULLSCREEN_TIMEOUT=5
WINDOW_NAME=”ownCloud”

owncloud &

sleep $FULLSCREEN_TIMEOUT
wmid=`wmctrl -l | grep $WINDOW_NAME | cut -f 1 -d ” “`
xdotool windowfocus $wmid; xdotool key “Escape”

2. Create the startup routine

vim ~/.config/autostart/ownCloud.desktop

Content of ownCloud.desktop:

IMPORTANT: Set your home folder in “Exec” line.

[Desktop Entry]
Name=ownCloud
GenericName=File Synchronizer
Exec=/home/username/scripts/start_owncloud_minimized.sh
Terminal=false
Icon=owncloud
Categories=Network
Type=Application
StartupNotify=false
X-GNOME-Autostart-enabled=true

3. Done

Re-Login and see how the ownCloud Desktop Client magically disappear into the background.

Leave a Reply

Your email address will not be published. Required fields are marked *