Literally just a thread for users who are here and have had a play to say thanks to the maintainers and devs of not only this device, but the project as a whole.
Thanks
Literally just a thread for users who are here and have had a play to say thanks to the maintainers and devs of not only this device, but the project as a whole.
Thanks
With things limited in the wireguard space apart from kernel support I had been yearning for an app to make life easier with setup and toggling but alas... The one on the store, while awesome, doesn't work with a device set up with a pin
For ease, get your device working via ssh to make things quicker and easier.
Another good thing to remember is that you will need to remount the filesystem in order to change things in various areas such as;
sudo mount -o remount,rw /
Firstly get yourself setup with wireguard on the device within terminal. You can use something like this here (minus the starting at boot and be mindful of how your wireguard server is created, whether the client information needs to be added through a gui, etc) - https://tech.serhatteker.com/post/2021-01/how-to-set-up-wireguard-client-on-ubuntu-desktop/
With that, wireguard will work, however you need to run the command through terminal each time and supply a password... kinda annoying if your leaving home/work/ whatever.
Here we can add a line in the sudoers file to access the wireguard command/s without the need to input a password. It will still require the use of 'sudo' however you wont be prompted. There is obviously a bit of a security risk adding things such as this to the sudoers file just to be mindful of that.
anyway run (make sure your rw);
sudo visudo
and paste in this line at the bottom
phablet ALL=NOPASSWD: /usr/bin/wg, /usr/bin/wg-quick
Save...
You should now be good to bring up the wireguard connection or down without being prompted for a password.
From here we can create a script in order to connect/disconnect to our wireguard server
For arguments sake we can call it wireguardup.sh and can place it within /home/phablet/ directory (for example)
#!/bin/bash
sudo wg-quick up wg0
exit
Save and make sure you have chmod +x on the script in order to allow it to execute.
You can now make the reciprocating file with 'up' substituted with 'down' on both the script name and the wg-quick command line.
You should now be able to run the associated script to bring the wireguard instance up or down.
Now we can go further and get it to run from our application launcher.
Let's get a couple rudimentary icons into place first (I have attached them to this post I knocked up in a couple minutes with gimp).
Put them in an appropriate directory (for example we could use ~/.local/share/icons )
Now lets get a launcher entry working.
These will need to go into ~/.local/share/applications/
We can call it wireguardup.desktop
Paste in the contents
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/phablet/wireguardup.sh
Icon=/home/phablet/.local/share/icons/wireguardup.png
Name=Wireguard UP
X-Ubuntu-Touch=true
X-Ubuntu-Default-Department-ID=accessories
Remember this will need to have the appropriate location you stored your script as well as your icon to work correctly.
You can then make the same thing again with the 'down' set of script & icon
Now you could essentially just use this as is however if you want to take it a step further you can go back to your wireguardup.sh and modify it with further commands that you wish to run for example disabling wifi in line with your wireguard toggle.
so for instance, you wish to turn off wifi when the wireguard tunnel is up your wireguardup.sh can be changed to something like this
#!/bin/bash
nmcli radio wifi off
wait 5
sudo wg-quick up wg0
exit
note - the wait command isn't explicitly necessary I just find that it works better for me if i give it a moment before connecting to wireguard
You should now be good to connect and disconnect to your wireguard server with a single launcher click either way...
There's probably a more elegant solution but in any event this works for now and might help someone else out there
@wsanford I cannot believe I literally have just been going through the same thing. Fresh ebay second hand 3XL... latest deb beta 0.9.1 and stuck at google screen. Thankfully I found this and the 0.8.8 version worked FIRST time. Definitely something wonky with install on the later versions. Thanks mate, one happy fellow enthusiast here (Even made an account just to post this)