Hey @popey, maybe you have an idea of what should I do?
This looks like a bug in the gtk-common-themes snap, the mount point must be a directory, it is probably a symbolic link instead.
The gnome-3-26-1604 is clearly 16.04 based, perhaps that’s some of the logic buried in the desktop helpers. I cannot help with that aspect.
Hi @zyga-snapd, thanks for the reply. Should I bring this to the attention of someone? Maybe open an issue somewhere?
Thanks, I will open an issue as soon as I get home. Is there a way around this for now? Would removing the references to the gtk theme help with this issue? For now it would be enough to just have the stock GTK theme, I just want to move forward and be able to at least run the app.
Ok, I have reported the bug here.
I’ve also removed the references to the gtk-common-themes
from the snapcraft.yaml
but I still get the error regarding gnome-3-26-1604
when I try to start the app:
$ gwe
You need to connect this snap to the gnome platform snap.
You can do this with those commands:
snap install gnome-3-26-1604
snap connect gwe:gnome-3-26-1604 gnome-3-26-1604
(the '3-26-1604' number defines the platform version and might change)
Should I report this other issue somewhere else? @popey @zyga-snapd @kenvandine any advice?
I think this is great! Thank you.
Hi @zyga-snapd, what about my issue with gnome-3-26-1604
that seems to be not related to the theme issue, do you have any advice for that?
I think that it is a question to @kenvandine as well - perhaps there is a 18.04 based GTK content snap to use but I’m not up-to-date on those things.
I believe I’m already using it:
gnome-3-30-1804:
interface: content
target: $SNAP/gnome-platform
default-provider: gnome-3-30-1804
but don’t get why I’m getting this gnome-3-26-1604
.
The error message? I think this is an oversight somewhere along the stack. Snapd doesn’t know about that so the error message must be coming from one of the helpers included in your snap.
PS: I’m ill so please forgive me if I’m not making sense.
Unfortunately I don’t know what you mean by “these helpers” (are they slots? parts? plugs?). I just started with snapcraft so I am not really familiar with it. (thanks a lot for the help, especially since you are not even feeling well )
There are two classes of helpers in snaps:
- explicitly running scripts before your executable <- the old way
- implicitly running scripts before your executable <- the new way
^ Edited for clarity.
In both cases there are programs running before your application gets to start. They usually look around the filesystem (e.g. is the content plug connected), can print useful messages. They generate various caches so that fonts and icons are okay. They set a bunch of environment variables. Finally they pass control to your application.
Can you please look at the program designated as the starting point of your snap? Do this:
- run
snap run --shell yoursnapname
- go to the snap directory,
cd $SNAP
- look a the wrapper programs generated, they are all shell so you can inspect them easily
The wrappers are in the main directory of the snap (i.e. $SNAP
). By looking at what is executed there you should get the idea about what is causing that message to be printed and, in consequence, where the logic error is.
The only wrapper I can see is called command-gwe.wrapper
and this is its content:
$ cat command-gwe.wrapper
#!/bin/sh
exec "desktop-launch" "$SNAP/gwe" "$@"
It’s inside $SNAP together with these other files and folders:
bin command-gwe.wrapper etc flavor-select gnome-platform lib meta snap usr var
desktop-launch
is inside bin
.
gwe
is in ./usr/bin/gwe
and when I run it it gives this error:
$ ./gwe
Traceback (most recent call last):
File "./gwe", line 44, in <module>
gi.require_version('Gtk', '3.0')
File "/snap/gwe/x1/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
I don’t get what this $SNAP/gwe
means since there is no gwe file or folder in $SNAP:
ls $SNAP/gwe
ls: cannot access ‘/snap/gwe/x1/gwe’: No such file or directory
The helper is desktop-launch
. This is where the error message is coming from.
I think I should yield to @kenvandine for more advice though. I’m not an expert on this part.
I see, thanks again for the help. Now I have to go bed. I hope to be able to make some progress during this weekend, I have GWE already on Flathub but, as a 12+ years Ubuntu user, I really want to have it also on the Snap Store.
Ok, I’ve decided for now to pause the support of Gnome 3.30 since the app can partially run on 2.28 with the Historical data feature disabled.
Now when I create the snap with 2.28 I get this error:
$ gwe
/snap/gwe/x1/bin/desktop-launch: line 546: /snap/gwe/x1/gwe: No such file or directory
I guess is because
apps:
gwe:
command: desktop-launch $SNAP/gwe
is pointing to the wrong position.
If I look inside the snap for gwe
I find it here:
/snap/gwe/x1$ find -type f -name gwe
./usr/bin/gwe
but when I try to run it I get this error:
/snap/gwe/x1/usr/bin$ ./gwe
Traceback (most recent call last):
File "./gwe", line 44, in <module>
gi.require_version('Gtk', '3.0')
File "/snap/gwe/x1/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
So, today I made some real progress. I finally managed to start GWE:
Most of the features are there but there are still 3 big issues that prevent me to officially consider Snap supported:
- The Historical data dialog is not working at all because requires Gnome 3.30 (specific thread)
- Power limit cannot be set because it require executing
pkexec nvidia-smi <bunch of attrs>
on the host (specific thread). An alternative solution could be running an internal script as root (specific thread) - Profiles are not created on the host
XDG_CONFIG_HOME
folder (specific thread)
@kenvandine @zyga-snapd any suggestion regarding the point 2 and 3?
I replied to thread 2 and 3 individually.
There seems to be some interest for GWE: https://www.omgubuntu.co.uk/2019/02/easily-overclock-nvidia-gpu-on-linux-with-this-new-app