slitaz-tools diff tinyutils/scpbox @ rev 39

Add scpbox a Gtkdialog to scp from Dropbear
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 14 16:30:05 2008 +0100 (2008-01-14)
parents
children 5de884166be4
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tinyutils/scpbox	Mon Jan 14 16:30:05 2008 +0100
     1.3 @@ -0,0 +1,102 @@
     1.4 +#!/bin/sh
     1.5 +# 
     1.6 +# Gtkdialog box interafce for secure file transfer with scp from Dropbear.
     1.7 +# - SliTaz GNU/Linux 2008.
     1.8 +#
     1.9 +VERSION=20080114
    1.10 +
    1.11 +export SCP_DIALOG='
    1.12 +<window title="Scpbox" icon-name="folder-remote">
    1.13 +  <vbox>
    1.14 + 
    1.15 +    <text use-markup="true">
    1.16 +      <label>
    1.17 +"
    1.18 +<b>SliTaz - Scpbox</b>"
    1.19 +      </label>
    1.20 +    </text>
    1.21 +    <text wrap="true" width-chars="52" use-markup="true">
    1.22 +      <label>
    1.23 +"
    1.24 +Secure file copy with scp from Dropbear SSH client/server.
    1.25 +"
    1.26 +      </label>
    1.27 +    </text>
    1.28 +  
    1.29 +    <frame Configuration>
    1.30 +      <hbox>
    1.31 +        <text use-markup="true">
    1.32 +          <label>"<b>User        :</b>"</label>
    1.33 +        </text>
    1.34 +        <entry>
    1.35 +          <variable>USER</variable>
    1.36 +        </entry>
    1.37 +      </hbox>
    1.38 +      <hbox>
    1.39 +        <text use-markup="true">
    1.40 +          <label>"<b>Host        :</b>"</label>
    1.41 +        </text>
    1.42 +        <entry>
    1.43 +          <variable>HOST</variable>
    1.44 +        </entry>
    1.45 +      </hbox>
    1.46 +      <hbox>
    1.47 +        <text use-markup="true">
    1.48 +          <label>"<b>Options  :</b>"</label>
    1.49 +        </text>
    1.50 +        <entry>
    1.51 +          <default>-r -P 22</default>
    1.52 +          <variable>SCP_OPTS</variable>
    1.53 +        </entry>
    1.54 +      </hbox>
    1.55 +    </frame>
    1.56 +    
    1.57 +    <frame Paths>
    1.58 +      <hbox>
    1.59 +        <text use-markup="true">
    1.60 +          <label>"<b>Local       :</b>"</label>
    1.61 +        </text>
    1.62 +        <entry>
    1.63 +          <input>echo $HOME</input>
    1.64 +          <variable>LOCAL_PATH</variable>
    1.65 +        </entry>
    1.66 +        <button>
    1.67 +          <input file icon="gtk-open"></input>
    1.68 +	      <action type="fileselect">LOCAL_PATH</action>
    1.69 +        </button>
    1.70 +      </hbox>
    1.71 +      
    1.72 +      <hbox>
    1.73 +        <text use-markup="true">
    1.74 +          <label>"<b>Remote   :</b>"</label>
    1.75 +        </text>
    1.76 +        <entry>
    1.77 +          <variable>REMOTE_PATH</variable>
    1.78 +        </entry>
    1.79 +      </hbox>
    1.80 +    </frame>
    1.81 +
    1.82 +    <hbox>
    1.83 +      <button>
    1.84 +        <label>Download</label>
    1.85 +        <input file icon="down"></input>
    1.86 +        <action>xterm -bg black -fg white -geometry 60x10+20+20 -e scp $SCP_OPTS $USER@$HOST:$REMOTE_PATH $LOCAL_PATH</action>
    1.87 +      </button>
    1.88 +      <button>
    1.89 +        <label>Upload</label>
    1.90 +        <input file icon="up"></input>
    1.91 +        <action>xterm -bg black -fg white -geometry 60x10+20+20 -e scp $SCP_OPTS $LOCAL_PATH $USER@$HOST:$REMOTE_PATH</action>
    1.92 +      </button>
    1.93 +      <button>
    1.94 +        <input file icon="exit"></input>
    1.95 +        <action type="exit">Exit</action>
    1.96 +      </button>
    1.97 +    </hbox>
    1.98 +  
    1.99 +  </vbox>
   1.100 +</window>
   1.101 +'
   1.102 + 
   1.103 +gtkdialog --program=SCP_DIALOG
   1.104 +
   1.105 +exit 0