This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Autostart owncloud client minimized

Tags: None
(comma "," separated)
luebking
Karma
0
check ~/.config/session on whether
a) there's an owncloud entry
b) the kwin entry mentions owncloud

(the client could be restarted by the session and restore settings)
dtrebacz
Registered Member
Posts
3
Karma
0
Only old kate files in ~/.config/session nothing for owncloud or kwin at all.
luebking
Karma
0
What happens if you replace
Code: Select all
Exec=/usr/bin/owncloud

by
Code: Select all
Exec=kstart --iconify /usr/bin/owncloud
tnordhoff
Registered Member
Posts
1
Karma
0
Hi there, I'm new to the forum. I found this or an equivalent issue with my ownCloud installation.

Im my case, the ownCloud client started in a windowed state only on system startup. When I terminated the ownCloud client and restarted it while the system was up, the ownCloud client started minimized as intended.

I identified the network connection as the cause: the ownCloud server wasn't reachable because the network connection wasn't up at the time the ownCloud client started.

So I wrote the following script and replaced the original autostart entry by the script:
Code: Select all
#!/bin/bash
HOST=`egrep '^[0-9]\\\\url=' .local/share/data/ownCloud/owncloud.cfg | awk ' BEGIN { FS="=" } { print $2 }' | awk 'BEGIN { FS="://" } { print $2 }'`
echo "Wait until $HOST is reachable..."
while  ! ping -c1 $HOST ; do
    :
done
echo "starting ownCloud"
owncloud &


My bash knowledge is limited, but the script works. Please note that the path
.local/share/data/ownCloud/owncloud.cfg
may be another one on your system. Also, the script will only work if only one account is configured, as far as I understand the config file.

I hope this helps in some cases.

Anyway, the scripts involves one issue: If the ownCloud server is down itself, you won't get notified. Perhaps it may be better to check the connection itself.

EDIT:
This improved version of the script waits for a default route, which makes the script independent from the ownCloud configuration:
Code: Select all
#!/bin/bash
echo "waiting for route to internet..."
while ! route | grep "*" ; do sleep 1; done
echo "starting ownCloud"
owncloud &


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]