Version and Environment
- GSmartControl version: 2.0.1
- OS: Fedora Kinoite 41
Is your feature request related to a problem? Please describe.
Fedora Atomic images uses a read-only root filesystem and discourage installing packages the traditional way (i.e dnf) and prioritize Flatpaks/AppImages/brew/"things not installing into /usr"
Describe the solution you'd like
It would be nice if gsmartcontrol can be distributed as an AppImage to be able to use it on these systems.
Describe alternatives you've considered
Creating a rootful distrobox and installing gsmartcontrol in it, but that's a lot of disk space wasted for just one app.
Layering traditional dnf packages in Fedora Atomic is possible - but highly discouraged.
Additional context
- I had to make gsmartcontrol look for its data files in a portable way (i.e not hardcoding
/usr/share) and this is how I managed to do that. (gsc_init.c)
} else {
if constexpr(BuildEnv::is_kernel_family_windows()) {
hz::data_file_add_search_directory("icons", application_dir / "icons");
hz::data_file_add_search_directory("ui", application_dir / "ui");
hz::data_file_add_search_directory("doc", application_dir / "doc");
} else {
// old
// hz::data_file_add_search_directory("icons", hz::fs_path_from_string(BuildEnv::package_pkgdata_dir()) / BuildEnv::package_name() / "icons"); // /usr/share/program_name/icons
// hz::data_file_add_search_directory("ui", hz::fs_path_from_string(BuildEnv::package_pkgdata_dir()) / BuildEnv::package_name() / "ui"); // /usr/share/program_name/ui
// hz::data_file_add_search_directory("doc", hz::fs_path_from_string(BuildEnv::package_doc_dir())); // /usr/share/doc/[packages/]gsmartcontrol
// new
hz::data_file_add_search_directory("icons", application_dir.parent_path() / "share" / BuildEnv::package_name() / "icons"); // bin/../share/program_name/icons
hz::data_file_add_search_directory("ui", application_dir.parent_path() / "share" / BuildEnv::package_name() / "ui"); // bin/../share/program_name/ui
hz::data_file_add_search_directory("doc", application_dir.parent_path() / "share" / "doc" / BuildEnv::package_name()); // bin/../share/doc/[packages/]gsmartcontrol
}
}
- I had to remove the
gsmartcontrol-root script and just put the binary in /bin like a regular package (plus changing the desktop file exec entry to match) - because the AppImage format does not support running an embedded binary in it with sudo. This also require the AppImage to be run with sudo.
- The
gsmartcontrol.appdata.in.xml file had to either be deleted or changed a little as currently it does not pass appstreamcli's checks.
- IDs should be in rDNS format, so
<id>dev.shaduri.gsmartcontrol</id> instead of <id>gsmartcontrol</id>
- Desktop filename must match ID - so
<launchable type="desktop-id">dev.shaduri.gsmartcontrol.desktop</launchable> instead of <launchable type="desktop-id">gsmartcontrol.desktop</launchable> (plus the real desktop filename must be changed to match also).
After all that was done I successfully built the AppImage and confirm it works.
Version and Environment
Is your feature request related to a problem? Please describe.
Fedora Atomic images uses a read-only root filesystem and discourage installing packages the traditional way (i.e dnf) and prioritize Flatpaks/AppImages/brew/"things not installing into
/usr"Describe the solution you'd like
It would be nice if gsmartcontrol can be distributed as an AppImage to be able to use it on these systems.
Describe alternatives you've considered
Creating a rootful distrobox and installing gsmartcontrol in it, but that's a lot of disk space wasted for just one app.
Layering traditional dnf packages in Fedora Atomic is possible - but highly discouraged.
Additional context
/usr/share) and this is how I managed to do that. (gsc_init.c)gsmartcontrol-rootscript and just put the binary in/binlike a regular package (plus changing the desktop file exec entry to match) - because the AppImage format does not support running an embedded binary in it with sudo. This also require the AppImage to be run with sudo.gsmartcontrol.appdata.in.xmlfile had to either be deleted or changed a little as currently it does not passappstreamcli's checks.<id>dev.shaduri.gsmartcontrol</id>instead of<id>gsmartcontrol</id><launchable type="desktop-id">dev.shaduri.gsmartcontrol.desktop</launchable>instead of<launchable type="desktop-id">gsmartcontrol.desktop</launchable>(plus the real desktop filename must be changed to match also).After all that was done I successfully built the AppImage and confirm it works.