You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GSconenct uses incomplete path to mount the sftp on some devices. Thus giving an error when accessed.
This bash script will automatically open the sftp folder with the correct path.
How to use it
Make a new empty file
Copy the below script and paste it
save the file to appropriate location
Right click on the file and go to properties and select Execute as programm.
Make sure gsconnect sftp is mounted
Right click on the file and select Run as programm
#!/bin/bash# A script to open GSconnect sftp folder with correct path# Define the path to the GVFS folder
gvfs_path="/run/user/1000/gvfs"# Find the folder that matches the pattern "sftp:host=*,port=*"
folder=$(find "$gvfs_path" -type d -name "sftp:host=*,port=*"| head -n 1)if [ -z"$folder" ];thenecho"No matching folder found."exit 1
fi# Extract host and port from the folder name
regex="sftp:host=([^,]*),port=([0-9]*)"if [[ $folder=~$regex ]];then
host=${BASH_REMATCH[1]}
port=${BASH_REMATCH[2]}elseecho"Failed to extract host and port from folder name."exit 1
fi# Construct the sftp URL
sftp_url="sftp://$host:$port/storage/emulated/0"echo"Opening $sftp_url in Nautilus..."# Open the sftp URL in Nautilus
nautilus "$sftp_url"&
You can also make a desktop file for this script to launch it with double click
This script works with Nautilus but can be easily modified to work with other file managers.
Thanks so much. All works fine now