ZeroTier-GUI icon indicating copy to clipboard operation
ZeroTier-GUI copied to clipboard

Flatpak Version

Open ripper81 opened this issue 5 years ago • 11 comments

Hi,

it is good to see that someone tries to create a GUI for ZeroTier on linux. It would be great to have this available as a flatpak for easy installing and updating.

Thank you for your work.

Best regards

Heiko Gimbel

ripper81 avatar Dec 05 '20 11:12 ripper81

I think a regular python package installed via pip would be a bit more convenient.

pktiuk avatar Mar 31 '21 16:03 pktiuk

Right now I have a script that creates a deb package on the fly. It's not the same as automatic updates, but it's better than what it was. I'm not a fan of flatpak tbh, I'd rather keep those things out of my computer. But, if somebody else wants to package it, I have no problem with that.

tralph3 avatar Apr 30 '21 01:04 tralph3

Hi,

it is good to see that someone tries to create a GUI for ZeroTier on linux. It would be great to have this available as a flatpak for easy installing and updating.

Thank you for your work.

Best regards

Heiko Gimbel

I made a script in bash that install this ZeroTierGUI (ZeroTierGUI is an amazing work) and the ZeroTier. the idea is that it be an easy installation. Repository (run in terminal)

it's not flatpak, but it's easy to install, in my opinion

the updates would technically work, if you want to update you open the script again, since it uses the direct repository of ZeroTierGUI

Can202 avatar Jun 13 '21 03:06 Can202

Thanks, but It's not recommended to run graphical applcations as root. The GUI will ask for permission if needed, but it should otherwise run as an unauthorized user.

tralph3 avatar Jun 13 '21 03:06 tralph3

I think for beginner friendly purpose it is necessary to make it to flatpak, for example hamachi has a flatpak app call haguichi . However, I faced issue that it won't build in gnome builder in order to export to flatpak. Maybe someone know better for flatpak support can help 圖片

csc-chicken avatar Apr 24 '23 14:04 csc-chicken

Experimenting with builder and flatpak, by it's nature, i think this app it's not possible to package as flatpak, sandbox permissions don't allow access to /var/lib (it's blacklisted) or outside commands as mention in Flatpak docs, zerotier-one lives in /var/lib directory, zerotier-one doesn't have any dbus methods to access.

The only way this could work is moving the authtoken.secret where the flatpak app could read this file:

sudo cp /var/lib/zerotier-one/authtoken.secret /home/user/.zeroTierOneAuthToken chown user /home/user/.zeroTierOneAuthToken chmod 0600 /home/user/.zeroTierOneAuthToken as mention in ZeroTierOne

or telling the user to sudo cat /var/lib/zerotier-one/authtoken.secret and give it to the app (also not possible to do inside the flatpak).

Botw implementations won't work until the new zerotier-gui it's ready.

I personally think this defeats the purpose of making a flatpak app.

RiemaruKarurosu avatar Jun 09 '23 16:06 RiemaruKarurosu

Experimenting with builder and flatpak, by it's nature, i think this app it's not possible to package as flatpak, sandbox permissions don't allow access to /var/lib (it's blacklisted) or outside commands as mention in Flatpak docs, zerotier-one lives in /var/lib directory, zerotier-one doesn't have any dbus methods to access.

The only way this could work is moving the authtoken.secret where the flatpak app could read this file:

OK, I found out something that could help with the flatpak version, you could execute external commands in flatpak with flatpak-spawn --host (some reddit forums tell not to do it because it defeats the flatpak purpose) but with this you could get access to the authtoken.secret and use it in the new zerotier-gui implementation, you only need to give the session bus access to org.freedesktop.Flatpak.

RiemaruKarurosu avatar Nov 12 '23 17:11 RiemaruKarurosu

Hi. I'm currently testing GTK with my other program Steam-Metadata-Editor. I'm liking it much better already.

Once that's finished, I'll likely port ZT GUI to Gtk as well, and I'll switch from running CLI commands to interact with zerotier to using its api. I already ran some tests locally and it works great.

To use the API, I still need to auth token, but it needs to be sent as a header along with the request to the API, meaning that the authtoken can be supplied in any number of ways. Be it asking for it within the program, setting an env variable, or making a copy somewhere where the flatpak version can access.

With that, a Flatpak version is certainly possible.

tralph3 avatar Nov 12 '23 20:11 tralph3

Once that's finished, I'll likely port ZT GUI to Gtk as well, and I'll switch from running CLI commands to interact with zerotier to using its api. I already ran some tests locally and it works great.

To use the API, I still need to auth token, but it needs to be sent as a header along with the request to the API, meaning that the authtoken can be supplied in any number of ways. Be it asking for it within the program, setting an env variable, or making a copy somewhere where the flatpak version can access.

With that, a Flatpak version is certainly possible.

I've a start of the GTK version with flatpak a long time ago, if it help in something https://github.com/RiemaruKarurosu/ZeroTier-GTK, actually I don't have so much time, but it's a work in progress, feel free to grab the usefull things from it.

RiemaruKarurosu avatar Nov 12 '23 20:11 RiemaruKarurosu

Yes, I remember! Thank you, it'll most likely be useful.

tralph3 avatar Nov 13 '23 00:11 tralph3

Right now I have a script that creates a deb package on the fly. It's not the same as automatic updates, but it's better than what it was. I'm not a fan of flatpak tbh, I'd rather keep those things out of my computer. But, if somebody else wants to package it, I have no problem with that.

Normally. I had the same opinion before, but in the result it's a good idea to install all apps with the close source via flatpak for security and to protect the system from the dependencies. And your system will be clear longer. So if it's possible it's a universal way for all distr's. Thanks for your great job anyway.

djsiropchik avatar May 03 '24 01:05 djsiropchik