Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak packaging #171

Open
stsdc opened this issue Apr 21, 2020 · 25 comments · May be fixed by #367
Open

Flatpak packaging #171

stsdc opened this issue Apr 21, 2020 · 25 comments · May be fixed by #367

Comments

@stsdc
Copy link
Member

stsdc commented Apr 21, 2020

Prepare for flatpak migration

@DevAlien
Copy link
Contributor

I can take a look at this one

@DevAlien
Copy link
Contributor

I made some progress, the problem is wingpanel as a mandatory dependency, which is not cool.

We could make it not required setting a variable if wingpanel is found and then in the code we can make the wingpanel code conditional if there's wingpanel or not.

meson file:

wingpanel = dependency('wingpanel-2.0', required: false)
if wingpanel.found()
    add_project_arguments('--define=IS_WINGPANEL', language: 'vala')
endif

then in vala files:

#if IS_WINGPANEL
           //stuff about wingpanel
#else
           //something else
#endif

@stsdc
Copy link
Member Author

stsdc commented Aug 25, 2020

So if I understand this correctly:
if build server e.g. elementary's will have this dep, Monitor will build with an Indicator?

@DevAlien
Copy link
Contributor

DevAlien commented Aug 25, 2020 via email

@stsdc
Copy link
Member Author

stsdc commented Aug 25, 2020

But if it will be built on Flathub, there will be no Indicator in package?
My concern is, if someone installs this package from Flathub on elementary?

@stsdc
Copy link
Member Author

stsdc commented Aug 26, 2020

Anyway, You can create a test branch, we will see.

@hanaral
Copy link

hanaral commented Apr 24, 2021

If developing for AppCenter, you are now supposed to use the flatpak AppCenter system to distribute the app to people outside elementary too. This means you only package for AppCenter while also possibly for non-elementary OSes. I'm pretty sure there is going to be an API for detecting whether the app is being installed on elementary or not too.

@stsdc
Copy link
Member Author

stsdc commented Apr 24, 2021

Yes, I'm aware of AppCenter and Flatpak marriage. But I'm not sure about those small details.

I would like to make Monitor available on other distributions, but I do not have much time to dive deep into the Flatpak right now personally.

@sysfu
Copy link

sysfu commented Aug 13, 2021

Any updates on this? Just upgraded to Odin 6x and missing this application. Will build from source for now but obviously having it in the AppCenter would be a win.

@stsdc
Copy link
Member Author

stsdc commented Aug 14, 2021

@sysfu Monitor packaged as a Flatpak isn't able to show processes and also will not install an Indicator. I'm not sure it deserves to be published without this functionality.

@sysfu
Copy link

sysfu commented Aug 15, 2021

@sysfu Monitor packaged as a Flatpak isn't able to show processes and also will not install an Indicator. I'm not sure it deserves to be published without this functionality.

Fair enough. I tried to build it from source however and ran into another wall with the wingpanel 2.0 dependency bug.

@stsdc
Copy link
Member Author

stsdc commented Aug 15, 2021

@sysfu did you try to change it to 3.0 ?

@janxkoci
Copy link

Monitor packaged as a Flatpak isn't able to show processes

I noticed there is not a single system monitoring app even on Flathub. Do you know if this is an inherent limitation of the flatpak container or just a funky coincidence? 🤔

@stsdc
Copy link
Member Author

stsdc commented Mar 18, 2022

@janxkoci that's how Flatpak was designed. It meant to isolate an app from an OS and other apps.

@janxkoci
Copy link

Yes, that's what I suspected. Just wanted to check with a dev who actually faced this issue that this is really the case. So is there any hope for a system monitor app shipped as a flatpak?

@stsdc
Copy link
Member Author

stsdc commented Mar 24, 2022

@janxkoci only if Flatpak will provide needed apis

@peter-kal
Copy link

You could try snaps. There is a snap version of "gnome system monitor" on Snap Store, so I think its viable.

@janxkoci
Copy link

I don't like snaps. But last week I noticed some system monitor apps on Flathub!

@stsdc
Copy link
Member Author

stsdc commented Feb 11, 2023

@janxkoci Just installed https://github.com/hakandundar34coding/system-monitoring-center and it looks like everything works from Flatpak 😲 Worth examining. At this point their app is everything I wanted Monitor to be (maybe UI is questionable, but that's subjective).

@stsdc
Copy link
Member Author

stsdc commented Feb 13, 2023

Updated flatpak branch, but have issue to add new modules. Would appreciate some help.

@stsdc
Copy link
Member Author

stsdc commented Feb 14, 2023

Having an issue with polkit, which is a dependency for udisks2. Here is more: https://gitlab.freedesktop.org/polkit/polkit/-/issues/187

@stsdc
Copy link
Member Author

stsdc commented Feb 15, 2023

@janxkoci Flatpak builds. However processes still don't show. I have no idea why it works for others and doesn't work for Monitor 😞 Feel free to tinker

@stsdc
Copy link
Member Author

stsdc commented Feb 16, 2023

To access processes and other related info you have to use flatpak-spawn. It means it is needed to write special workaround based on ps utility and others to retrieve process info specially for flatpak package. Is it worth it?

@janxkoci
Copy link

Is it worth it?

Well, I lived without this app for a year and found my ways. I don't know about other users, but probably most found a replacement when necessary.

I think it more depends on you, @stsdc as the author. Do you want to work on this app or move on to other projects?

@orowith2os
Copy link

Is it worth it?

I'd say no. If you want to package as a Flatpak, go for it, but keep it to testing repositories. That, for example, is what GNOME's Nautilus file chooser does.

Actual users of these types of applications go bare metal, when you're developing and need an easy way to build and run it, you go to Flatpak. Sandboxes generally don't play well here.

If you want to work around the sandbox, though, feel free to go for it. I wouldn't suggest it though.

@stsdc stsdc linked a pull request Jan 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants