
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 " "`
for i in $wmid; do
xdotool windowfocus $i; xdotool key "Escape"
done</pre2. 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.