Score:0

How to mount storage by desktop shortcut?

de flag

I want to mount by click to shortcut on desktop.
My shortcut:

    #!/usr/bin/env xdg-open
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=true
    Icon=mate-panel-launcher
    Exec=sshfs 192.168.10.10:/home/www-data /home/stager/mnt/home.www-data
    Name=sshfs 192.168.10.10

On initiate this, terminal opened, password asked. But mounting not happens.

Alternatively, in terminal:
$ sshfs 192.168.10.10:/home/www-data /home/stager/mnt/home.www-data
works as expected.

How to mount by desktop shortcut?

Score:0
cn flag

With the shortcut, the terminal opens, the mount is executed, then the terminal closes and accordingly also closes all processes that were launched under it. You need to keep that terminal open in the background, or try approaches involving disown or nohup to detach the process from the current shell. You will still be able to terminate the mount using the file manager.

Instead, you can consider using the native feature of your file manager to create the connection and make a bookmark for one click access from within the file manager.

Vladimir Kalachikhin avatar
de flag
I've already told you - you're wrong. It is easy to make sure of this.
vanadium avatar
cn flag
So is this a duplicate question then? Did you try keeping the terminal open to confirm that is not the issue? It would work with Terminal=False. The problem then moves to: how to supply the password.
vanadium avatar
cn flag
You may be able to help out here: https://askubuntu.com/questions/1361141/sshfs-umount-after-close-terminal This user has the problem that the sshfs connection breaks when closing the terminal.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.