wok view wireless_tools/stuff/wifibox @ rev 788

syslinux-extra: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue May 13 15:07:17 2008 +0000 (2008-05-13)
parents
children
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=20080415
8 # Interafce status with iwconfig without arguments to show all
9 # connections.
10 #
11 export IWCONFIG='
12 <window title="Wireless status" icon-name="network-wireless">
13 <vbox>
14 <text use-markup="true">
15 <label>"
16 <b>Wireless status</b>"
17 </label>
18 </text>
19 <text wrap="false">
20 <input>date</input>
21 </text>
22 <frame Iwconfig>
23 <text wrap="false" width-chars="58">
24 <input>iwconfig 2>&1</input>
25 </text>
26 </frame>
27 <hbox>
28 <button>
29 <input file icon="exit"></input>
30 <action type="closewindow">IFCONFIG</action>
31 </button>
32 </hbox>
33 </vbox>
34 </window>
35 '
37 # List loaded modules
38 #
39 export LSMOD='
40 <window title="Lsmod" icon-name="network-wireless">
41 <vbox>
42 <text use-markup="true">
43 <label>"
44 <b>Active modules list</b>"
45 </label>
46 </text>
47 <text wrap="false">
48 <input>date</input>
49 </text>
50 <frame Lsmod>
51 <text wrap="false" width-chars="58">
52 <input>lsmod</input>
53 </text>
54 </frame>
55 <hbox>
56 <button>
57 <input file icon="exit"></input>
58 <action type="closewindow">IFCONFIG</action>
59 </button>
60 </hbox>
61 </vbox>
62 </window>
63 '
65 # Main window.
66 export WIFI_DIALOG='
67 <window title="Wifibox" icon-name="network-wireless">
68 <vbox>
70 <text use-markup="true">
71 <label>
72 "
73 <b>SliTaz - Wifibox</b>"
74 </label>
75 </text>
76 <text wrap="true" width-chars="52" use-markup="true">
77 <label>
78 "
79 Connect to a wireless station (without encryption).
80 "
81 </label>
82 </text>
84 <notebook labels="Connection|Drivers">
86 <frame Configuration>
87 <hbox>
88 <text use-markup="true">
89 <label>"<b>Interface :</b>"</label>
90 </text>
91 <entry>
92 <default>wlan0</default>
93 <variable>INTERFACE</variable>
94 </entry>
95 </hbox>
96 <hbox>
97 <text use-markup="true">
98 <label>"<b>ESSID :</b>"</label>
99 </text>
100 <entry>
101 <default>any</default>
102 <variable>ESSID</variable>
103 </entry>
104 </hbox>
105 <hbox>
106 <button>
107 <label>Start</label>
108 <input file icon="forward"></input>
109 <action>iwconfig $INTERFACE essid $ESSID</action>
110 <action>udhcpc -b -i $INTERFACE -p /var/run/udhcpc.$INTERFACE.pid</action>
111 </button>
112 <button>
113 <label>Stop</label>
114 <input file icon="stop"></input>
115 <action>ifconfig $INTERFACE down</action>
116 <action>kill `cat /var/run/udhcpc.$INTERFACE.pid`</action>
117 </button>
118 </hbox>
119 </frame>
121 <frame Kernel>
122 <hbox>
123 <text use-markup="true">
124 <label>"<b>Module :</b>"</label>
125 </text>
126 <combobox>
127 <variable>MODULE</variable>
128 <item>ipw2200</item>
129 <item>ipw2100</item>
130 <item>bcm43xx</item>
131 <item>b43</item>
132 <item>b43legacy</item>
133 <item>rt2500pci</item>
134 <item>rt2x00usb</item>
135 <item>rt2x00lib</item>
136 <item>rt2400pci</item>
137 <item>rt2x00pci</item>
138 <item>rt2500usb</item>
139 <item>zd1211rw</item>
140 </combobox>
141 <button>
142 <label>Load</label>
143 <input file icon="forward"></input>
144 <action>modprobe $MODULE</action>
145 </button>
146 <button>
147 <label>Lsmod</label>
148 <input file icon="computer"></input>
149 <action type="launch">LSMOD</action>
150 </button>
151 </hbox>
152 </frame>
154 </notebook>
156 <hbox>
157 <button>
158 <label>Status</label>
159 <input file icon="network-wireless"></input>
160 <action type="launch">IWCONFIG</action>
161 </button>
162 <button>
163 <input file icon="exit"></input>
164 <action type="exit">Exit</action>
165 </button>
166 </hbox>
168 </vbox>
169 </window>
170 '
172 gtkdialog --program=WIFI_DIALOG
174 exit 0