Necessary changes for Snap GUI to work

This commit is contained in:
Adnan Hodzic 2023-09-16 12:19:44 +02:00
parent 257d6e9532
commit f0de797485
2 changed files with 9 additions and 5 deletions

View File

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

View File

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