How to use Joplin AppImage installed in template in the qube based on the template

I am having an issue opening the Joplin App. I searched on the forum and found this thread

I’ve tried using unman’s advice of coping the directory to /etc/skel but that hasn’t taken effect as far as I can tell.

I’ve also tried the docs for making custom desktop entries as well but it doesn’t seem to work.

The workaround I could use is to manually copy the Joplin files over to the App qube and then Joplin runs successfully but I don’t know what the side effects would be.

The files from /etc/skel in template are copied to the app qube based on this template only once during creation:

Changes in /etc/skel in template are not applied to the app qubes based on this template that were created before these changes.

1 Like

I’ve tried deleting and recreating the qube in which I was trying to install Joplin.
Trying to launch Joplin from the qube doesn’t work while launching it from the base template works.

Not sure what else I should try apart from manually copying the files over to the qube

What error do you have?

It seems to fail silently. I am running it via the entry in the qube’s App menu.
Not sure where I should look for errors.

Try to start it from the qube terminal.
Something like this:

~/MyApp.AppImage

or

/home/user/MyApp.AppImage
1 Like

Thanks. This worked i.e. Joplin loads this way from the qube. Here’s the traceback I see:

user@App-Qube:~$ .joplin/Joplin.AppImage 
Sentry: Initialized with autoUploadCrashDumps: false
[1211:0520/173625.516521:ERROR:browser_main_loop.cc(274)] Gdk: gdk_atom_intern: assertion 'atom_name != NULL' failed
[1211:0520/173625.516859:ERROR:browser_main_loop.cc(274)] Gdk: gdk_atom_intern: assertion 'atom_name != NULL' failed
[1247:0520/173626.043025:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

I guess your AppImage is creating its .desktop file in user directory in template and since it’s missing in your AppVM based on this template then running the app using Qubes app menu is not working.
Add the .desktop file in /etc/skel in template as well.
Something like this:

sudo mkdir /etc/skel/.local/share/applications
sudo cp /home/userl/.local/share/applications/MyApp.desktop /etc/skel/.local/share/applications
1 Like

Did this and the application still doesn’t run from the App Menu of the qube but runs from the qube terminal with the error shared above.

Not sure, maybe you also need to copy the app files from ~/.config/MyApp or something else.
Are you able to run the app from the menu after running it once from the terminal?

Yeah it seems that I will have to copy the files over after all going by what my current experience is.

Nope. The app still doesn’t run from the App menu even though I’ve been able to run it from the terminal.

What’s the content of MyApp.desktop file?

[Desktop Entry]
Encoding=UTF-8
Name=Joplin
Comment=Joplin for Desktop
Exec=env APPIMAGELAUNCHER_DISABLE=TRUE /home/user/.joplin/Joplin.AppImage --no-sandbox %u
Icon=joplin
StartupWMClass=Joplin
Type=Application
Categories=Office;
MimeType=x-scheme-handler/joplin;
X-GNOME-SingleWindow=true // should be removed eventually as it was upstream to be an XDG specification
SingleMainWindow=true

What if you try to run this command in your qube? Will it work?

env APPIMAGELAUNCHER_DISABLE=TRUE /home/user/.joplin/Joplin.AppImage --no-sandbox

Produces the same error.

user@App-Qube:~$ env APPIMAGELAUNCHER_DISABLE=TRUE /home/user/.joplin/Joplin.AppImage --no-sandbox
Sentry: Initialized with autoUploadCrashDumps: false
[1416:0520/192350.945170:ERROR:browser_main_loop.cc(274)] Gdk: gdk_atom_intern: assertion 'atom_name != NULL' failed
[1416:0520/192350.945541:ERROR:browser_main_loop.cc(274)] Gdk: gdk_atom_intern: assertion 'atom_name != NULL' failed
[1448:0520/192351.301669:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

I’ve just tried it and it worked for me.
In template execute these commands:

cat << 'EOF' | tee ~/.wgetrc
use_proxy = on
http_proxy = 127.0.0.1:8082
https_proxy = 127.0.0.1:8082
EOF
wget https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh
bash Joplin_install_and_update.sh 
sudo cp -r ~/.joplin/ /etc/skel/
sudo mkdir -p /etc/skel/.local/share/applications/
sudo cp ~/.local/share/applications/appimagekit-joplin.desktop /etc/skel/.local/share/applications/

Refresh applications in template Settings.
Create new qube based on this template and add Joplin to the list of shown applications in menu.
Run Joplin app for this qube.
The qube starts and Joplin window is shown.

1 Like

Joplin does not start. The files belong to root. Do you need a chown to user?

The files in /etc/skel in template will be copied in /home/user directory in app qube and their ownership will change to user.
Can you describe your steps that you do to create the template, app qube and run the app in app qube?

I did the steps you described two days ago. Inside Qubes Manager I created a new qube with the “New Qube” button and at “Template” I chose the debian template, which I modified.
At “App shortcuts” I added “Joplin” und startet the new quebes.

Here is the output of the log:

[2024-05-22 19:26:17] [ 3.664334] fbcon: Taking over console [2024-05-22 19:26:17] [ 3.743271] Fallback order for Node 0: 0 [2024-05-22 19:26:17] [ 3.743274] Built 1 zonelists, mobility grouping on. Total pages: 223425 [2024-05-22 19:26:17] [ 3.743296] Policy zone: Normal [2024-05-22 19:26:18] [2024-05-22 19:26:18] Debian GNU/Linux 12 Joplin2 hvc0 [2024-05-22 19:26:18] [2024-05-22 19:26:18] Joplin2 login: [ 6.379541] show_signal: 14 callbacks suppressed [2024-05-22 19:26:19] [ 6.379543] traps: light-locker[862] trap int3 ip:7917646607d7 sp:7ffd21517740 error:0 in libglib-2.0.so.0.7400.6[791764622000+8d000]

couldn’t find anything at /home/user inside the new Joplin Qubes. But I can find it at:

user@Joplin2:/etc/skel$ ls -la
insgesamt 44
drwxr-xr-x 4 root root 4096 22. Mai 19:08 .
drwxr-xr-x 141 root root 12288 22. Mai 19:26 …
-rw-r–r-- 1 root root 220 23. Apr 2023 .bash_logout
-rw-r–r-- 1 root root 3526 23. Apr 2023 .bashrc
-rw-r–r-- 1 root root 5290 12. Jul 2023 .face
lrwxrwxrwx 1 root root 5 12. Jul 2023 .face.icon → .face
drwxr-xr-x 2 root root 4096 22. Mai 19:08 .joplin
drwxr-xr-x 3 root root 4096 22. Mai 19:08 .local
-rw-r–r-- 1 root root 807 23. Apr 2023 .profile