Revamp BackTunnel desktop integration: switch to service-based action for directory sharing via GUI.
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=BackTunnel
|
||||
Comment=Reverse SSH folder sharing and access
|
||||
Exec=bash -lc '
|
||||
FOLDER="%f";
|
||||
REMOTE="$(kdialog --inputbox "Remote (user@host or user:host):" "user@vps.example.com")" || exit 1;
|
||||
DUR="$(kdialog --combobox "Share duration" 30m 2h 6h 1d 2d --editable "2h")" || exit 1;
|
||||
TPORT="$(kdialog --inputbox "Tunnel port on remote:" "2222")" || exit 1;
|
||||
LPORT="$(kdialog --inputbox "Local SSH port to expose:" "22")" || exit 1;
|
||||
if kdialog --yesno "Print invite line for chat?"; then INV="-i"; else INV=""; fi;
|
||||
if kdialog --yesno "Show QR code for the invite?"; then QR="--qr"; else QR=""; fi;
|
||||
MP="$(kdialog --inputbox "Suggested mount point in invite:" "/mnt/remote-rssh")" || exit 1;
|
||||
konsole --noclose -e backtunnel-share "$FOLDER" with "$REMOTE" for "$DUR" \
|
||||
-p "$TPORT" -l "$LPORT" $INV $QR --invite-mount "$MP"
|
||||
'
|
||||
Icon=network-vpn
|
||||
Terminal=true
|
||||
Categories=Network;Utility;
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=inode/directory;
|
||||
Icon=network-server
|
||||
Actions=BackTunnelShare;
|
||||
X-KDE-StartupNotify=false
|
||||
X-KDE-Priority=TopLevel
|
||||
|
||||
[Desktop Action BackTunnelShare]
|
||||
Name=Share via BackTunnel…
|
||||
Icon=network-server
|
||||
Exec=backtunnel-share-gui %f
|
||||
|
||||
Reference in New Issue
Block a user