I'm a little bit stuck (completely bamboozled, if I'm honest) with a little project I'm working on, so I thought I'd pick your collective brains...
So, I'm wanting to use my laptop as a hotspot, but *only* when it's plugged into ethernet. When it's unplugged, I want it to connect to my existing WiFi in the default way.
I imagine that I'd be making a script, and using something akin to udev rules to call it.
So far, I know how to set my laptop as hotspot using the gui: start->networks->wifi->create hotspot. How could I do this in a script?
On the off chance it's useful, here's the output of inxi -Fxz:
Code: Select all
System: Host: cameron-ThinkPad-X220 Kernel: 3.16.0-38-generic x86_64 (64 bit, gcc: 4.8.2)
Desktop: Cinnamon 2.6.13 Distro: Linux Mint 17.2 Rafaela
Machine: System: LENOVO product: 4290CE3 version: ThinkPad X220
Mobo: LENOVO model: 4290CE3 Bios: LENOVO version: 8DET69WW (1.39 ) date: 07/18/2013
CPU: Dual core Intel Core i5-2540M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10366.5
Clock Speeds: 1: 1148.875 MHz 2: 1195.898 MHz 3: 1227.382 MHz 4: 1482.812 MHz
Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0
X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz
GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture ver: k3.16.0-38-generic
Network: Card-1: Intel 82579LM Gigabit Network Connection driver: e1000e ver: 2.3.2-k port: 5080 bus-ID: 00:19.0
IF: eth0 state: down mac: <filter>
Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi ver: in-tree: bus-ID: 03:00.0
IF: wlan0 state: up mac: <filter>
Drives: HDD Total Size: 2480.5GB (32.7% used) 1: id: /dev/sda model: OCZ size: 480.1GB
2: USB id: /dev/sdb model: Elements_10B8 size: 2000.4GB
Partition: ID: / size: 23G used: 11G (51%) fs: ext4 ID: /home size: 27G used: 20G (79%) fs: ext4
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: System Temperatures: cpu: 56.0C mobo: N/A
Fan Speeds (in rpm): cpu: 3424
Info: Processes: 206 Uptime: 3 days Memory: 2726.2/3729.6MB Runlevel: 2 Gcc sys: 4.8.5
Client: Shell (bash 4.3.11) inxi: 1.9.17
Cheers,
JT