From charlesreid1

Line 97: Line 97:
</pre>
</pre>


If you want to verify your /etc/rc.local file works, try running this command:
If you want to verify your /etc/rc.local file works, try running this command after you have disabled the network manager (below):


<pre>
<pre>

Revision as of 21:14, 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.

Configure Manual Wifi

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.

Finally, start up the wpa supplicant on boot by putting the invocation line in rc.local:

/etc/rc.local

#!/bin/sh
/sbin/ifconfig wlan0 down
/bin/sleep 3
/sbin/ifconfig wlan0 up
/bin/sleep 3
/sbin/wpa_supplicant -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf

Set permissions:

chmod 744 /etc/rc.local

Enable rc.local by creating a startup service:

/etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Now enable the service that was just created:

sudo systemctl enable rc-local

If you want to verify your /etc/rc.local file works, try running this command after you have disabled the network manager (below):

sudo service rc.local start

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