slitaz-tools view tinyutils/scpbox @ rev 340
tazx: Moved doc to Handbook
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 04 23:12:18 2009 +0200 (2009-05-04) |
parents | 8b562f767838 |
children | 62ce01191f4b |
line source
1 #!/bin/sh
2 #
3 # Gtkdialog box interafce for secure file transfer with scp from Dropbear.
4 # - SliTaz GNU/Linux 2008.
5 #
6 VERSION=20080114
8 export SCP_DIALOG='
9 <window title="Scpbox" icon-name="folder-remote">
10 <vbox>
12 <text use-markup="true">
13 <label>
14 "
15 <b>SliTaz - Scpbox</b>"
16 </label>
17 </text>
18 <text wrap="true" width-chars="52" use-markup="true">
19 <label>
20 "
21 Copy files securely with scp from Dropbear SSH client/server.
22 "
23 </label>
24 </text>
26 <frame Configuration>
27 <hbox>
28 <text use-markup="true">
29 <label>"<b>User :</b>"</label>
30 </text>
31 <entry>
32 <variable>USER</variable>
33 </entry>
34 </hbox>
35 <hbox>
36 <text use-markup="true">
37 <label>"<b>Host :</b>"</label>
38 </text>
39 <entry>
40 <variable>HOST</variable>
41 </entry>
42 </hbox>
43 <hbox>
44 <text use-markup="true">
45 <label>"<b>Options :</b>"</label>
46 </text>
47 <entry>
48 <default>-r -P 22</default>
49 <variable>SCP_OPTS</variable>
50 </entry>
51 </hbox>
52 </frame>
54 <frame Paths>
55 <hbox>
56 <text use-markup="true">
57 <label>"<b>Local :</b>"</label>
58 </text>
59 <entry>
60 <input>echo $HOME</input>
61 <variable>LOCAL_PATH</variable>
62 </entry>
63 <button>
64 <input file icon="gtk-open"></input>
65 <action type="fileselect">LOCAL_PATH</action>
66 </button>
67 </hbox>
69 <hbox>
70 <text use-markup="true">
71 <label>"<b>Remote :</b>"</label>
72 </text>
73 <entry>
74 <variable>REMOTE_PATH</variable>
75 </entry>
76 </hbox>
77 </frame>
79 <hbox>
80 <button>
81 <label>Download</label>
82 <input file icon="down"></input>
83 <action>xterm -bg black -fg white -geometry 60x10+20+20 -e scp $SCP_OPTS $USER@$HOST:$REMOTE_PATH $LOCAL_PATH</action>
84 </button>
85 <button>
86 <label>Upload</label>
87 <input file icon="up"></input>
88 <action>xterm -bg black -fg white -geometry 60x10+20+20 -e scp $SCP_OPTS $LOCAL_PATH $USER@$HOST:$REMOTE_PATH</action>
89 </button>
90 <button>
91 <input file icon="exit"></input>
92 <action type="exit">Exit</action>
93 </button>
94 </hbox>
96 </vbox>
97 </window>
98 '
100 gtkdialog --program=SCP_DIALOG
102 exit 0