monitor icon indicating copy to clipboard operation
monitor copied to clipboard

Flatpak packaging

Open stsdc opened this issue 4 years ago • 25 comments

Prepare for flatpak migration

stsdc avatar Apr 21 '20 23:04 stsdc

I can take a look at this one

DevAlien avatar Aug 25 '20 10:08 DevAlien

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

DevAlien avatar Aug 25 '20 11:08 DevAlien

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

stsdc avatar Aug 25 '20 18:08 stsdc

Yes. Basically if the app is running in elementary then makes sense to have the indicator (since it is compatible just with it), if it is running somewhere else there is no need for the indicator since it won't show up anyway.

Also I doctors are now forbidden based on the latest info

On Tue, Aug 25, 2020, 8:38 PM Stanisław [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stsdc/monitor/issues/171#issuecomment-680201315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQ474PEAD4ZH52PV6KQF3SCQAK3ANCNFSM4MNVV4BQ .

DevAlien avatar Aug 25 '20 18:08 DevAlien

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 avatar Aug 25 '20 18:08 stsdc

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

stsdc avatar Aug 26 '20 19:08 stsdc

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.

hanaral avatar Apr 24 '21 12:04 hanaral

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.

stsdc avatar Apr 24 '21 13:04 stsdc

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.

sysfu avatar Aug 13 '21 15:08 sysfu

@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.

stsdc avatar Aug 14 '21 18:08 stsdc

@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.

sysfu avatar Aug 15 '21 00:08 sysfu

@sysfu did you try to change it to 3.0 ?

stsdc avatar Aug 15 '21 00:08 stsdc

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? :thinking:

janxkoci avatar Mar 18 '22 10:03 janxkoci

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

stsdc avatar Mar 18 '22 12:03 stsdc

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?

janxkoci avatar Mar 18 '22 13:03 janxkoci

@janxkoci only if Flatpak will provide needed apis

stsdc avatar Mar 24 '22 22:03 stsdc

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

peter-kal avatar Feb 11 '23 01:02 peter-kal

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

janxkoci avatar Feb 11 '23 10:02 janxkoci

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

stsdc avatar Feb 11 '23 16:02 stsdc

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

stsdc avatar Feb 13 '23 13:02 stsdc

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

stsdc avatar Feb 14 '23 21:02 stsdc

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

stsdc avatar Feb 15 '23 21:02 stsdc

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?

stsdc avatar Feb 16 '23 15:02 stsdc

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?

janxkoci avatar Feb 21 '23 13:02 janxkoci

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.

orowith2os avatar Jun 18 '23 07:06 orowith2os