slitaz-tools rev 1015

Add tazbox ssh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 11 09:22:26 2017 +0100 (2017-03-11)
parents 29dd24939396
children 62187a6485ae
files applications/tazbox-ssh.desktop tazbox/tazbox
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/applications/tazbox-ssh.desktop	Sat Mar 11 09:22:26 2017 +0100
     1.3 @@ -0,0 +1,7 @@
     1.4 +[Desktop Entry]
     1.5 +Type=Application
     1.6 +Name=SSH terminal
     1.7 +Exec=tazbox ssh
     1.8 +Icon=xterm
     1.9 +Categories=Utility;
    1.10 +Name[fr]=Terminal SSH
     2.1 --- a/tazbox/tazbox	Sun Feb 12 09:20:08 2017 +0000
     2.2 +++ b/tazbox/tazbox	Sat Mar 11 09:22:26 2017 +0100
     2.3 @@ -57,6 +57,7 @@
     2.4  notify		$(_ 'Notify user with a desktop centered box')
     2.5  tazapps		$(_ 'Configure SliTaz default applications')
     2.6  vnc		$(_ 'Launch a framebuffer VNC viewer')"
     2.7 +ssh		$(_ 'Open a remote terminal')
     2.8  	newline
     2.9  }
    2.10  
    2.11 @@ -696,6 +697,20 @@
    2.12  }
    2.13  
    2.14  
    2.15 +ssh_main() {
    2.16 +	icon='xterm'
    2.17 +	yad --title="$(_n 'SSH connection')" --window-icon="$icon" \
    2.18 +		--width='250' --height='180' --on-top --center \
    2.19 +		--image="$icon" --image-on-top --icon="$icon" \
    2.20 +		--form \
    2.21 +		--text="<b>$(_n 'Remote terminal connection')</b>" "user@host" \
    2.22 +		--field="$(_n 'SSH Server')" \
    2.23 +		--field="$(_n 'Password'):H" \
    2.24 +		--field="$(_n 'Prefer sakura'):CHK" \
    2.25 +		--always-print-result
    2.26 +}
    2.27 +
    2.28 +
    2.29  video() {
    2.30  	icon='video-x-generic'
    2.31  
    2.32 @@ -789,6 +804,14 @@
    2.33  }
    2.34  
    2.35  
    2.36 +ssh() { 
    2.37 +	IFS='|'; set -- $(ssh_main) ; unset IFS
    2.38 +	[ "$3" == "TRUE" ] && export TERM=sakura
    2.39 +	[ -n "$2" ] && export DROPBEAR_PASSWORD="$2"
    2.40 +	sshx $1
    2.41 +}
    2.42 +
    2.43 +
    2.44  #
    2.45  # Commands
    2.46  #
    2.47 @@ -965,6 +988,10 @@
    2.48  			--button 'OK' < /usr/share/licenses/gpl.txt
    2.49  		;;
    2.50  
    2.51 +	ssh)
    2.52 +		ssh
    2.53 +		;;
    2.54 +
    2.55  	vnc)
    2.56  		vnc
    2.57  		;;