slitaz-tools view oldstuff/gtkdialog/scpbox @ rev 883
Added tag 5.8.7 for changeset a056a0139188
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed May 07 02:09:17 2014 +0300 (2014-05-07) |
parents | e2f467522651 |
children |
line source
1 #!/bin/sh
2 #
3 # Gtkdialog box interface for secure file transfer with scp from Dropbear.
4 # - SliTaz GNU/Linux 2008-2010.
5 #
6 VERSION=20100314
8 # Internationalization
9 . /usr/bin/gettext.sh
10 TEXTDOMAIN='slitaz-boxes'
11 export TEXTDOMAIN
13 # Box
14 export SCP_DIALOG='
15 <window title="Scpbox" icon-name="folder-remote">
16 <vbox>
18 <text use-markup="true">
19 <label>"
20 <b>SliTaz - Scpbox</b>"
21 </label>
22 </text>
23 <text wrap="true" width-chars="52" use-markup="true">
24 <label>"'`gettext "
25 Copy files securely with scp from Dropbear SSH client/server.
26 "`'"</label>
27 </text>
29 <frame '`gettext "Configuration"`'>
30 <hbox>
31 <text use-markup="true">
32 <label>"'`gettext "<b>User :</b>"`'"</label>
33 </text>
34 <entry>
35 <variable>USER</variable>
36 </entry>
37 </hbox>
38 <hbox>
39 <text use-markup="true">
40 <label>"'`gettext "<b>Host :</b>"`'"</label>
41 </text>
42 <entry>
43 <variable>HOST</variable>
44 </entry>
45 </hbox>
46 <hbox>
47 <text use-markup="true">
48 <label>"'`gettext "<b>Options :</b>"`'"</label>
49 </text>
50 <entry>
51 <default>-r -P 22</default>
52 <variable>SCP_OPTS</variable>
53 </entry>
54 </hbox>
55 </frame>
57 <frame '`gettext "Paths"`'>
58 <hbox>
59 <text use-markup="true">
60 <label>"'`gettext "<b>Local :</b>"`'"</label>
61 </text>
62 <entry>
63 <input>echo $HOME</input>
64 <variable>LOCAL_PATH</variable>
65 </entry>
66 <button>
67 <input file icon="gtk-open"></input>
68 <action type="fileselect">LOCAL_PATH</action>
69 </button>
70 </hbox>
71 <hbox>
72 <text use-markup="true">
73 <label>"'`gettext "<b>Remote :</b>"`'"</label>
74 </text>
75 <entry>
76 <variable>REMOTE_PATH</variable>
77 </entry>
78 </hbox>
79 </frame>
81 <hbox>
82 <button>
83 <label>'`gettext "Download"`'</label>
84 <input file icon="down"></input>
85 <action>xterm -geometry 80x16 -e scp $SCP_OPTS $USER@$HOST:$REMOTE_PATH $LOCAL_PATH</action>
86 </button>
87 <button>
88 <label>'`gettext "Upload"`'</label>
89 <input file icon="up"></input>
90 <action>xterm -geometry 80x16 -e scp $SCP_OPTS $LOCAL_PATH $USER@$HOST:$REMOTE_PATH</action>
91 </button>
92 <button>
93 <label>'`gettext "Exit"`'</label>
94 <input file icon="exit"></input>
95 <action type="exit">Exit</action>
96 </button>
97 </hbox>
99 </vbox>
100 </window>'
102 gtkdialog --program=SCP_DIALOG >/dev/null
104 exit 0