Coder Social home page Coder Social logo

wifi-switcher's Introduction

Table of Contents

  1. Quick start
  2. Configuration examples for icewm and pdmenu

wifi-switcher is a simple automatic switcher between wifi networks for laptops with icewm (window manager) or pdmenu (console menu program). To be used as a simple replacement of network manager or 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_2.0-1_all.deb

wget  https://github.com/chalaev/wifi-switcher/raw/master/package/wifi-switcher_2.0-1_all.deb
dpkg -i wifi-switcher_2.0-1_all.deb

(In Debian instead of dpkg -i wifi-switcher_2.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):

systemctl disable hostapd.service
systemctl disable vsftpd.service
systemctl disable isc-dhcp-server.service

(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

systemctl stop hostapd.service

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

wifi-switcher's People

Contributors

chalaev avatar

Stargazers

 avatar

Watchers

 avatar

wifi-switcher's Issues

Can't obtain .deb package

Hi !
As the website has been down for a while, the .deb package's link in the readme is dead.

By the more, I can't use the pack.sh script, as some ressources appear to be absent (dependencies ?) :

$ sh pack.sh
find: ‘/srv/local-apt-repository/’: No such file or directory
rm: cannot remove '../wifi-switcher_*': No such file or directory
pack.sh: 1: pack.sh: dpkg-parsechangelog: not found
Packaging the th version.
mv: cannot stat '.pc': No such file or directory
pack.sh: 46: pack.sh: dh_make: not found
mv: cannot stat '../wifi-switcher.pc': No such file or directory
pack.sh: 53: pack.sh: dpkg-buildpackage: not found
pack.sh: 60: pack.sh: debsign: not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.