diff --git a/auto_cpufreq/gui/app.py b/auto_cpufreq/gui/app.py index 244086c..80dc30c 100644 --- a/auto_cpufreq/gui/app.py +++ b/auto_cpufreq/gui/app.py @@ -60,7 +60,7 @@ class ToolWindow(Gtk.Window): def snap(self): box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, halign=Gtk.Align.CENTER, valign=Gtk.Align.CENTER) - + # reference: https://forum.snapcraft.io/t/pkexec-not-found-python-gtk-gnome-app/36579/12 label = Gtk.Label(label="GUI not available due to Snap package confinement limitations.\nPlease install auto-cpufreq using auto-cpufreq-installer\nVisit the GitHub repo for more info") label.set_justify(Gtk.Justification.CENTER) button = Gtk.LinkButton.new_with_label( diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index cadb678..739d3e1 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -24,11 +24,10 @@ parts: build-packages: - gcc - python3-dev - - libgirepository1.0-dev - - libcairo2-dev stage-packages: - coreutils - dmidecode + - pkexec source: . override-pull: | snapcraftctl pull @@ -64,8 +63,10 @@ apps: - system-observe - hardware-observe - etc-auto-cpufreq-conf + auto-cpufreq-gtk: command: bin/auto-cpufreq-gtk + extensions: [gnome] environment: PYTHONPATH: $SNAP/usr/lib/python3/site-packages:$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH LC_ALL: C.UTF-8 @@ -75,7 +76,10 @@ apps: - cpu-control - system-observe - hardware-observe - - etc-auto-cpufreq-conf + - desktop + - desktop-legacy + - wayland + - x11 service: command: usr/bin/snapdaemon plugs: @@ -86,4 +90,4 @@ apps: LC_ALL: C.UTF-8 LANG: C.UTF-8 PKG_MARKER: SNAP - daemon: simple + daemon: simple \ No newline at end of file