simple wifi-manager for icewm and pdmenu
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
debian
etc
man
screenshots
usr
BUGS
HOTSPOT
HOTSPOT.org
README
README.html
README.md
README.org
TODO
check-files.sh
iwlist-scan.output
pack.sh
wifi-switcher-ru.org
wifi-switcher.org

README.md

wifi-switcher is a simple automatic switcher between wifi networks for laptops with [icewm](http://www.icewm.org) (window manager) or [pdmenu](https://joeyh.name/code/pdmenu/) (console menu program). To be used as a simple replacement of [network manager](https://wiki.gnome.org/Projects/NetworkManager) or [wicd](https://launchpad.net/wicd) (simplicity often means reliability). Also wifi-switcher can work in the wifi-server (adhoc) mode where it launches vsftpd server. (I use this feature mainly to move photos/videos/music from/to my wife's smartphone.)

See more information in wifi-switcher*.org files.

Quick start

Download (or create yourself using pack.sh) and install wifi-switcher_last_all.deb

wget http://chalaev.com/pub/ws/wifi-switcher_1.0-1_all.deb
dpkg -i wifi-switcher_1.0-1_all.deb

(In Debian stretch instead of dpkg -i wifi-switcher_1.0-1_all.deb I use local-apt-repository package which makes .deb files stored in /srv/local-apt-repository/ available to standard system utilities like apt-get or aptitude.

Use configuration examples described below.
Add networks automatically (see screenshots) or manually (edit /etc/wpa_supplicant/wifi-switcher.conf). Run /usr/share/wifi-switcher/get-passwords to display (randomly-generated) passwords needed to connect to the adhoc wifi spot. To change ftp and adhoc passwords or the wifi-interface name, run

dpkg-reconfigure wifi-switcher

wifi-switcher assumes that hostapd is running only during its "adhoc" mode and will be messed up otherwise. So when wifi-switcher there should be no hostapd running. To ensure that hostapd and isc-dhcp-server are not launched at boot, disable them (as root):

for i in $(service --status-all | grep "hostapd\|isc-dhcp-server" | awk '{print $NF}') ; do
    update-rc.d -f $i remove
done

(You might want to disable vsftpd autostart as well.) From time to time packages hostapd, isc-dhcp-server, and vsftpd are updated and hence reconfigured to autostart again so you may have to disable them again.

Otherwise just add

sudo /usr/sbin/service hostapd stop

to your ~/.profile

Configuration examples for icewm and pdmenu

A line in my ~/.icewm/menu file generating wifi menu is

menuprogreload wifi - 0 /usr/bin/wifi-switcher -icewm scan --wifi-hotspot

My real-life IceWM configuration is available here.

My ~/.pdmenu file looks as follows:

#!/usr/bin/pdmenu
# Define the main menu.
menu:main:Main Menu
show:navit...::navit_conf
group:wifi (_unicode)
	exec::makemenu:\
		echo "menu:mainWiFimenu:Choose network:Select the network" ; \
		/usr/bin/wifi-switcher -pdmenu scan
	show:::mainWiFimenu
	remove:::mainWiFimenu
endgroup
group:wifi (_ascii)
	exec::makemenu:\
		echo "menu:mainWiFimenuII:Choose network:Select the network" ; \
		/usr/bin/wifi-switcher -pdmenu scan --ascii
	show:::mainWiFimenuII
	remove:::mainWiFimenuII
endgroup
group:wifi (unicode + hotspot)
	exec::makemenu:\
		echo "menu:mainWiFimenu:Choose network:Select the network" ; \
		/usr/bin/wifi-switcher -pdmenu --wifi-hotspot scan
	show:::mainWiFimenu
	remove:::mainWiFimenu
endgroup
group:wifi (ascii + hotspot)
	exec::makemenu:\
		echo "menu:mainWiFimenuII:Choose network:Select the network" ; \
		/usr/bin/wifi-switcher -pdmenu scan --ascii --wifi-hotspot
	show:::mainWiFimenuII
	remove:::mainWiFimenuII
endgroup

# Other stuff: for example, I use (good, old, no more maintained) vux as a music player:
show:_vux...::vux_conf

menu:vux_conf:Vux:Vux
exec:down next::vuxctl down next
exec:pause::vuxctl pause
exec:next::vuxctl next
exec:up stop::vuxctl up stop
# exec:reload::vuxctl reload