15

I'm working with a Pi running Raspbian. Is there a way to open the network list with a command from the terminal? This is the list I mean:

Screenshot of Wi-Fi network list

I have searched in the file ~/.config/lxpanel/LXDE-pi/panels/panel is defined the menu bar (sizes, icons, applications, etc ...). I think this is the code that defines the icon:

Plugin { 
 type=dhcpcdui
  Config { } 
}
Greenonline
  • 2,740
  • 4
  • 23
  • 36

2 Answers2

11

I think the command you are looking for is:

iwlist wlan0 scan

Which will show a list of available Wi-Fi networks.

If you are connected to a network already you can see a list of the other devices on the network with:

nmap

To launch the terminal using a keyboard you can create a keyboard shortcut such as Ctrl+Alt+t. To do this first run:

nano ~/.config/openbox/lxde-rc.xml

This will allow you to modify the ~/.config/openbox/lxde-rc.xml file.

Anywhere between the <keyboard> and </keyboard> tags add:

<!-- Launch terminal when ctr-alt-t is pressed -->
  <keybind key="C-A-t">
    <action name="Execute"><command>lxterminal</command></action>
  </keybind>

If you put this piece of code just before the </keyboard> tag it should look something like this:

<!-- Launch gnome-screenshot when Print is pressed -->
  <keybind key="Print">
    <action name="Execute"><command>gnome-screenshot</command></action>
  </keybind>
<!-- Launch terminal when ctr-alt-t is pressed -->
  <keybind key="C-A-t">
    <action name="Execute"><command>lxterminal</command></action>
  </keybind>
</keyboard>
Darth Vader
  • 4,206
  • 24
  • 45
  • 69
7

Use iwlist as root to get a fresh scan. It gives a lot of output. Here's a way to get just a list of available networks:

$ sudo iwlist wlan0 scanning | grep ESSID
                ESSID:"Daisycat"
                ESSID:"AI Lab"
                ESSID:"E4A451"
                ESSID:"EB4E7F"
                ESSID:"Lan Solo"
                ESSID:"3FA29B"
                ESSID:"BaronTweet"
                ESSID:"E15F8D"
                ESSID:"Malik3199 2.4G"
                ESSID:""

From the manual page:

Triggering scanning is a privileged operation (root only) and normal users can only read left-over scan results.

Dogweather
  • 171
  • 1
  • 3