tralph3 / ZeroTier-GUI

A Linux front-end for ZeroTier
GNU General Public License v3.0
211 stars 32 forks source link

ZeroTier isn't installed! #9

Closed Youhaojen closed 3 years ago

Youhaojen commented 3 years ago

First, I would like to thank you for the great project! I try to install the ZeroTier-GUI on ubuntu 20.04 and make sure the GLIBC version and python version which the ZeroTier-GUI required. Unfortunately, it showed "ZeroTier isn't installed!". Do I need to install other plug-ins? Thx

https://ibb.co/Qb7YKL7

tralph3 commented 3 years ago

Yes, you do need to have ZeroTier itself up and running. This is just a front-end after all, ZeroTier doesn't come with it. Good news are that if you're seeing that window, then it means the program works, you just need to have ZeroTier :)

stevespaw commented 3 years ago

I have installed this on a machine a few months ago and now I can't seem to get it working. Following your new guide, I get this: (Reading database ... 213663 files and directories currently installed.) Preparing to unpack .../ZeroTier-GUI.deb ... Unpacking zerotier-gui (1.2.1.r.) ... dpkg: error processing archive /home/ltn-vpe/Downloads/ZeroTier-GUI-master/ZeroTier-GUI.deb (--install): trying to overwrite directory '/usr/share/applications' in package kio 5.80.1-0ubuntu3 with nondirectory Processing triggers for mailcap (3.68ubuntu1) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.26-1ubuntu1) ... Errors were encountered while processing: /home/ltn-vpe/Downloads/ZeroTier-GUI-master/ZeroTier-GUI.deb

tralph3 commented 3 years ago

You don't have the /usr/share/applications directory? What distro do you use?

stevespaw commented 3 years ago

Brand new install of Ubuntu 21.04 from the main site

tralph3 commented 3 years ago

Ok, but do you have that directory?

stevespaw commented 3 years ago

I will look in the morning and get back to you . Thanks

stevespaw commented 3 years ago

yes I do: image

tralph3 commented 3 years ago

Could you upload the resultant .deb file here please?

stevespaw commented 3 years ago

ZeroTier-GUI.zip

tralph3 commented 3 years ago

Thanks, I'll check it out when I get home.

tralph3 commented 3 years ago

Ok I think it's fixed. Do a git pull and run the script again, then try to install it.

stevespaw commented 3 years ago

A little better but no go - See attached ZeroTier-GUI-master.zip ZerotierGUI.txt

tralph3 commented 3 years ago

Well, the deb package was created properly this time. If clicking the icon does nothing, then launch it from terminal with zerotier-gui and see what you get. I recommend however to completely delete the program and reinstall it with the deb package. Don't worry, the program doesn't have any configuration, all the networks and stuff gets picked up from zerotier-one directly, reinstalling won't make you lose anything. Primarily, delete the executable in /usr/bin and delete the .dektop file in /usr/share/applications, then reinstall and reboot the system to make Ubuntu read the "new" .desktop file, see if that does it.

stevespaw commented 3 years ago

Ok well: sudo zerotier-gui - works, but launching from the icon does not. I tried all of the uninstall and delete and re-install - reboot.

stevespaw commented 3 years ago

I do get this when launching from terminal: image

if this matters

tralph3 commented 3 years ago

Yes that last error is harmless. You can see the program is still running, it didn't exit because of it. That appears because to display the error message about ZeroTier not being installed I need to create a proper window. So I create a window and instantly make it dissapear so you only see the error message. When I create the actual window, I destroy the first one and this pops up, but it's harmless.

If launching with the terminal works, then the problem is with the .desktop file. Paste the contents of /usr/share/applications/zerotier-gui.desktop.

stevespaw commented 3 years ago

[Desktop Entry] Encoding=UTF-8 Exec=/usr/bin/zerotier-gui Icon=zerotier-gui Type=Application Terminal=false Comment=Linux front-end for ZeroTier Name=ZeroTier GUI GenericName=ZeroTier GUI StartupNotify=false Categories=Utility; Version=1.2.2

tralph3 commented 3 years ago

Hmm and you do have the /usr/bin/zerotier-gui executable right? Can you try running zerotier-gui in a terminal WITHOUT sudo? If that works, then I have no clue why desktop file doesn't.

stevespaw commented 3 years ago

it does NOT run without sudo

tralph3 commented 3 years ago

Ahh so we're getting somewhere. Do you get some error?

stevespaw commented 3 years ago

$ zerotier-gui zerotier-cli: authtoken.secret not found or readable in /var/lib/zerotier-one (try again as root) Traceback (most recent call last): File "/usr/bin/zerotier-gui", line 864, in mainWindow = MainWindow().window File "/usr/bin/zerotier-gui", line 121, in init self.refresh_networks() File "/usr/bin/zerotier-gui", line 221, in refresh_networks networkData = self.get_networks_info() File "/usr/bin/zerotier-gui", line 257, in get_networks_info return loads(check_output(['zerotier-cli', '-j', 'listnetworks'])) File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['zerotier-cli', '-j', 'listnetworks']' returned non-zero exit status 2.

tralph3 commented 3 years ago

Ok... the problem was that I was checking if the error string contained a certain substring. This is very obviously a bad way of doing things, because then something like this can happen. Apparently ZeroTier changed the error string, and now my program doesn't work because of it. I changed it so it checks for error codes now, and this hopefully means its fixed.

Digging through the code was painful, I'll have to do some major rewrites... some time. Anyways, download the latest version and repackage it, should work now.

stevespaw commented 3 years ago

Ok it works now - with some message boxes. But all OK! Thanks for this project.............