Ubuntu/Bespin: Difference between revisions
From charlesreid1
| Line 24: | Line 24: | ||
<pre> | <pre> | ||
sudo usermod -a -G wheel <your-username-here> | sudo usermod -a -G wheel <your-username-here> | ||
</pre> | |||
Allow wheel group users passwordless sudo, first use visudo to edit the sudoers file: | |||
<pre> | |||
EDITOR=vi visudo | |||
</pre> | |||
Now add this line to the end: | |||
<pre> | |||
%wheel ALL=(ALL) NOPASSWD: ALL | |||
</pre> | </pre> | ||
Revision as of 21:55, 3 July 2020
Setup
Aptitude update
During installation, we allow setup to join the wifi network. On first boot, the network manager will be running and will be connected to the same wifi network. We will disable network manager eventually, but first get some software.
sudo apt-get update sudo apt-get -y install vim gnome-tweak-tool net-tools
Set caps lock as a control key.
Allow sudo for user
Create wheel group:
sudo groupadd wheel
Add user to group:
sudo usermod -a -G wheel <your-username-here>
Allow wheel group users passwordless sudo, first use visudo to edit the sudoers file:
EDITOR=vi visudo
Now add this line to the end:
%wheel ALL=(ALL) NOPASSWD: ALL
Configure WPA Supplicant
We want to configure wifi manually, and disable the network manager. This requires some preparation to manually join a wifi network with wpa supplicant.
First set your wpa supplicant to join a wifi network.
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="yournetworkhere"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="yourpskhere"
}
Next add the 2 usb wifi devices to network interfaces file. The following etc network interfaces file assumes that wlan0 will be joining an existing wifi network, and wlan1 will be in manual mode so it can be used as an AP.
/etc/network/interfaces
allow-hotplug wlan0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
allow-hotplug wlan1
iface wlan1 inet static
address 192.168.10.1
netmask 255.255.255.0
gateway 192.168.10.1
except actually the iface names were dependent on the mac addresses of the wifi cards.
WPA Supplicant Startup Service
Copy a wpa supplicant service template:
sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/wpa_supplicant.service
Edit the file
sudo vim /etc/systemd/system/wpa_supplicant.service
Change this line from this:
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
to this:
ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
Also, remove the following line if it is present:
Alias=dbus-fi.w1.wpa_supplicant1.service # DELETE ME!
Now enable this service to start on boot:
sudo systemctl enable wpa_supplicant.service
Dhclient Startup Service
Create a dhclient startup service:
/etc/systemd/system/dhclient.service
[Unit] Description= DHCP Client Before=network.target [Service] Type=simple ExecStart=/sbin/dhclient wlan0 -v ExecStop=/sbin/dhclient wlan0 -r [Install] WantedBy=multi-user.target
Enable the dhclient startup service to start on boot:
sudo systemctl enable dhclient.service
Requesting Static IP
If you want to request a static IP from the router, add this to the dhclient config file:
/etc/dhcp/dhclient.conf
interface "wlp3s0" {
send dhcp-requested-address 192.168.0.122;
}
Disable Network Manager
Next step is to disable the network manager.
sudo systemctl disable network-manager sudo systemctl stop network-manager
Don't uninstall it, because that will uninstall a bunch of other important gnome packages and you'll be left with a stupid broken ubuntu.
Tweaking Gnome
Now tweak it:
- Tweak tools
- Set up like a mac
- plank and startup service
- albert and startup service