Skip to content

Instantly share code, notes, and snippets.

@namandixit
Created March 11, 2022 09:05
Show Gist options
  • Save namandixit/53f72e3ed62b82dd257285998c00c6a5 to your computer and use it in GitHub Desktop.
Save namandixit/53f72e3ed62b82dd257285998c00c6a5 to your computer and use it in GitHub Desktop.
NextCloud Startup Helper on KDE
#!/bin/bash
#
# See https://github.com/nextcloud/desktop/issues/1011
#
############################################
# Adjust the following to suit your needs
WALLET="kdewallet" # Name of wallet storing nextcloud client password
MAX_TRIES=2 # Max. number of tries to ask for password
############################################
i=0
while [ $i -lt $MAX_TRIES ]; do
((i++))
open=`qdbus org.kde.kwalletd5 /modules/kwalletd5 isOpen "$WALLET"`
if [ "$open" = "true" ]; then
break
fi
qdbus org.kde.kwalletd5 /modules/kwalletd5 open "$WALLET" 0 "nextcloud-client-starter" > /dev/null
done
nohup nextcloud >> /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment