5

I am using Nextcloud as an "Online Service" in Ubuntu 18.04. After logging in and starting a Nautilus (Files) window I can mount the service without (re)entering my password by clicking on it in the side panel.

I want to be able to mount this service from a script (triggered from a .desktop file) and the trouble I'm having is that:

xdg-open davs://user@server.com/remote.php/webdav

Just says "not mounted".

gio mount davs://user@server.com/remote.php/webdav

asks for a password on the commandline - but there isn't an interactive command line available as it's a script launched by clicking a .desktop file.

nautilus davs://user@server.com/remote.php/webdav

asks for password using UI, and includes the tick box to "remember password" - however it's already remembered, so why doesn't it use the remembered version?

How to trigger gnome's built in "mount with remembered password" functionality from the command line?

Task I'm trying to achieve, for background

I'm making a convenience app that takes a file path on the clipboard and opens the file. This will then enable users to send filepaths to eachother instead of attaching files. The script handles the changes to the urls required by different users etc.

Edit

One machine (out of 8 others) allows gio mount davs://... to mount! This machine also auto-mounts the Nextcloud accounts on login. Can't figure out what's different.

artfulrobot
  • 8,543
  • There is a way to provide password to gio non-interactively in command line, see here: https://askubuntu.com/a/1027175/868324 – nt86 Aug 23 '21 at 10:52

0 Answers0