[GH-ISSUE #2655] gajim doesn't let open images #1672

Closed
opened 2026-05-05 08:19:11 -06:00 by gitea-mirror · 17 comments
Owner

Originally created by @alexandre1985 on GitHub (Apr 16, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2655

My firejailed gajim has the gajim's plugins: Image and URL Image Preview. I believe it is a problem with the URL Image Preview.

With it, gajim shows a sent image preview in my chat box. With a right click I can download the image, open the image, or get a link url.

When I click to download the image (with gajim inside firejail) everything works OK, the same with the get link url (it gives a link like this aesgcm://server.domain/upload/xxxxxx/hAsHfiLe.jpg#abcd9876).

But when I click to open the image (it chooses my pc image viewer) it does nothing, doesn't work.

Even with this gajim.local file in place

noblacklist ${PATH}/deepin-image-viewer
noblacklist ${PATH}/firefox

noblacklist ${PATH}/openssl

noblacklist ${PATH}/exo-open
noblacklist ${PATH}/xdg-open

noblacklist /usr/share/applications/deepin-image-viewer.desktop
noblacklist ${HOME}/.local/share/gajim/downloads/*

I have tried to put everything inside the gajim.local but still it doesn't let me open the image.
Need help.

With a non-firejailed gajim it works. And when I click to open a image I get this gajim output

main.go:63: openFile: "/home/john/.local/share/gajim/downloads/rZs4IFurRAStnaCrSbbykg_a1a3020cd28387ebbaaa2ec595a2f8a9bf528bec.jpg"
main.go:93: desktop file: /usr/share/applications/deepin-image-viewer.desktop
Originally created by @alexandre1985 on GitHub (Apr 16, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2655 My firejailed gajim has the gajim's plugins: Image and [URL Image Preview](https://dev.gajim.org/gajim/gajim-plugins/wikis/UrlImagePreviewPlugin). I believe it is a problem with the URL Image Preview. With it, gajim shows a sent image preview in my chat box. With a right click I can download the image, open the image, or get a link url. When I click to download the image (with gajim inside firejail) everything works OK, the same with the get link url (it gives a link like this aesgcm://server.domain/upload/xxxxxx/hAsHfiLe.jpg#abcd9876). But when I click to open the image (it chooses my pc image viewer) it does nothing, doesn't work. Even with this `gajim.local` file in place ``` noblacklist ${PATH}/deepin-image-viewer noblacklist ${PATH}/firefox noblacklist ${PATH}/openssl noblacklist ${PATH}/exo-open noblacklist ${PATH}/xdg-open noblacklist /usr/share/applications/deepin-image-viewer.desktop noblacklist ${HOME}/.local/share/gajim/downloads/* ``` I have tried to put everything inside the `gajim.local` but still it doesn't let me open the image. Need help. With a non-firejailed gajim it works. And when I click to open a image I get this gajim output ``` main.go:63: openFile: "/home/john/.local/share/gajim/downloads/rZs4IFurRAStnaCrSbbykg_a1a3020cd28387ebbaaa2ec595a2f8a9bf528bec.jpg" main.go:93: desktop file: /usr/share/applications/deepin-image-viewer.desktop ```
gitea-mirror 2026-05-05 08:19:11 -06:00
Author
Owner

@rusty-snake commented on GitHub (Apr 17, 2019):

@alexandre1985 try echo "private-bin deepin-image-viewer" >> ~/.config/firejail/gajim.local

<!-- gh-comment-id:483952613 --> @rusty-snake commented on GitHub (Apr 17, 2019): @alexandre1985 try `echo "private-bin deepin-image-viewer" >> ~/.config/firejail/gajim.local`
Author
Owner

@alexandre1985 commented on GitHub (Apr 17, 2019):

@rusty-snake It didn't work.
When I click to open the image, firejailed Gajim does download the image to /home/john/.local/share/gajim/downloads/ but the image it isn't open in deepin-image-viewer.

Don't know if this is related but the image link has the protocol aesgcm://

It works fine without firejail

<!-- gh-comment-id:484133001 --> @alexandre1985 commented on GitHub (Apr 17, 2019): @rusty-snake It didn't work. When I click to open the image, firejailed Gajim does download the image to `/home/john/.local/share/gajim/downloads/` but the image it isn't open in `deepin-image-viewer`. Don't know if this is related but the image link has the protocol aesgcm:// It works fine without firejail
Author
Owner

@rusty-snake commented on GitHub (Apr 17, 2019):

@alexandre1985

  • exit gajim
  • run firejail --build gajim | grep "private-bin" >> $HOME/.config/firejail/gajim.local and open an image in deepin-image-viewer from gajim.
  • start gajim and try again
<!-- gh-comment-id:484176771 --> @rusty-snake commented on GitHub (Apr 17, 2019): @alexandre1985 * exit gajim * run `firejail --build gajim | grep "private-bin" >> $HOME/.config/firejail/gajim.local` and open an image in deepin-image-viewer from gajim. * start gajim and try again
Author
Owner

@alexandre1985 commented on GitHub (Apr 18, 2019):

@rusty-snake I have tried, but it didn't work.
My gajim.local, right now, is:

private-bin bash,python3.7,
<!-- gh-comment-id:484451940 --> @alexandre1985 commented on GitHub (Apr 18, 2019): @rusty-snake I have tried, but it didn't work. My `gajim.local`, right now, is: ``` private-bin bash,python3.7, ```
Author
Owner

@rusty-snake commented on GitHub (Apr 18, 2019):

  1. This should already in gajim.profile.
  2. Which distro?
  3. Which firejail version?
  4. Does firejail --noprofile gajim work?
  5. Try to find out the problem only with gajim.profile:
mv .config/firejail/gajim.local .config/firejail/gajim.local.disabled
cp /etc/firejail/gajim.profile .
vim gajim.profile # if you wish ;)
# comment private-bin, private-etc, disable-programs, disable-common,
# disable-interpreters, whitelist, whitelist-common
firejail --profile=gajim.profile gajim

and uncomment then line by line and test after each time

<!-- gh-comment-id:484584757 --> @rusty-snake commented on GitHub (Apr 18, 2019): 1. This should already in `gajim.profile`. 2. Which distro? 3. Which firejail version? 4. Does `firejail --noprofile gajim` work? 5. Try to find out the problem only with gajim.profile: ``` mv .config/firejail/gajim.local .config/firejail/gajim.local.disabled cp /etc/firejail/gajim.profile . vim gajim.profile # if you wish ;) # comment private-bin, private-etc, disable-programs, disable-common, # disable-interpreters, whitelist, whitelist-common firejail --profile=gajim.profile gajim ``` and uncomment then line by line and test after each time
Author
Owner

@alexandre1985 commented on GitHub (Apr 18, 2019):

  1. Didn't understood
  2. Manjaro Linux Deepin
  3. 0.9.58.2
  4. Yes, the opening of the image does work with firejail --noprofile
  5. Will do that
<!-- gh-comment-id:484594326 --> @alexandre1985 commented on GitHub (Apr 18, 2019): 1. Didn't understood 2. Manjaro Linux Deepin 3. 0.9.58.2 4. Yes, the opening of the image does work with `firejail --noprofile` 5. Will do that
Author
Owner

@alexandre1985 commented on GitHub (Apr 18, 2019):

In gajim.profile I commented out:

#private-bin python,python3,sh,gpg,gpg2,gajim,bash,zsh,paplay,gajim-history-manager

and it solved my issue.

What now?

<!-- gh-comment-id:484595863 --> @alexandre1985 commented on GitHub (Apr 18, 2019): In `gajim.profile` I commented out: ``` #private-bin python,python3,sh,gpg,gpg2,gajim,bash,zsh,paplay,gajim-history-manager ``` and it solved my issue. What now?
Author
Owner

@alexandre1985 commented on GitHub (Apr 18, 2019):

of the line:

private-bin python,python3,sh,gpg,gpg2,gajim,bash,zsh,paplay,gajim-history-manager

I have tried removing each word one by one and it all gave the open image preview error.

When I comment the line all together I can open the image preview (that are in gajim history dialog).

<!-- gh-comment-id:484634493 --> @alexandre1985 commented on GitHub (Apr 18, 2019): of the line: ``` private-bin python,python3,sh,gpg,gpg2,gajim,bash,zsh,paplay,gajim-history-manager ``` I have tried removing each word one by one and it all gave the open image preview error. When I comment the line all together I can open the image preview (that are in gajim history dialog).
Author
Owner

@rusty-snake commented on GitHub (Apr 18, 2019):

@alexandre1985 the other way round, any program is missing, but is confused me that echo "private-bin deepin-image-viewer" >> ~/.config/firejail/gajim.local and firejail --build gajim | grep "private-bin" >> $HOME/.config/firejail/gajim.local (open an image in deepin-ima… from gajim) didn't work.

<!-- gh-comment-id:484658511 --> @rusty-snake commented on GitHub (Apr 18, 2019): @alexandre1985 the other way round, any program is missing, but is confused me that `echo "private-bin deepin-image-viewer" >> ~/.config/firejail/gajim.local` and `firejail --build gajim | grep "private-bin" >> $HOME/.config/firejail/gajim.local` (open an image in deepin-ima… from gajim) didn't work.
Author
Owner

@alexandre1985 commented on GitHub (Apr 18, 2019):

@rusty-snake it didn't. I have tried it again now... Doesn't open.
Here is my $HOME/.config/firejail/gajim.local

private-bin deepin-image-viewer
private-bin bash,python3.7,
<!-- gh-comment-id:484669269 --> @alexandre1985 commented on GitHub (Apr 18, 2019): @rusty-snake it didn't. I have tried it again now... Doesn't open. Here is my `$HOME/.config/firejail/gajim.local` ``` private-bin deepin-image-viewer private-bin bash,python3.7, ```
Author
Owner

@rusty-snake commented on GitHub (Apr 19, 2019):

@alexandre1985 I don't have an idea anymore, but can you try if it works with another image viewer (e.g. eog org feh).

<!-- gh-comment-id:484808532 --> @rusty-snake commented on GitHub (Apr 19, 2019): @alexandre1985 I don't have an idea anymore, but can you try if it works with another image viewer (e.g. eog org feh).
Author
Owner

@alexandre1985 commented on GitHub (Apr 19, 2019):

In Gajim, in order to open a image, it checks for the default application for that use case.
Don't know if this helps.

But now, I have disabled the "default application" setting and choose a manual application. There was only a field for the default file manager and I choose mine. Now I'm able to open the image in the default file manager, then I open the image in that.
So this is a way around.

<!-- gh-comment-id:484961979 --> @alexandre1985 commented on GitHub (Apr 19, 2019): In Gajim, in order to open a image, it checks for the default application for that use case. Don't know if this helps. But now, I have disabled the "default application" setting and choose a manual application. There was only a field for the default file manager and I choose mine. Now I'm able to open the image in the default file manager, then I open the image in that. So this is a way around.
Author
Owner

@rusty-snake commented on GitHub (Apr 20, 2019):

Alternative you can change the leftclick behavior in the plugin settings.

<!-- gh-comment-id:485074432 --> @rusty-snake commented on GitHub (Apr 20, 2019): Alternative you can change the leftclick behavior in the plugin settings.
Author
Owner

@alexandre1985 commented on GitHub (Apr 23, 2019):

@rusty-snake changing the left click of the plugin didn't help at all

<!-- gh-comment-id:485728303 --> @alexandre1985 commented on GitHub (Apr 23, 2019): @rusty-snake changing the left click of the plugin didn't help at all
Author
Owner

@rusty-snake commented on GitHub (Apr 23, 2019):

I meant more like making one of those options:

  1. open in the webbrowser (gajim.profile must be " downgraded)
  2. copy URL -> manual past in webbrowser
  3. save as -> open manually
<!-- gh-comment-id:485739856 --> @rusty-snake commented on GitHub (Apr 23, 2019): I meant more like making one of those options: 1. open in the webbrowser (gajim.profile must be " downgraded) 2. copy URL -> manual past in webbrowser 3. save as -> open manually
Author
Owner

@chiraag-nataraj commented on GitHub (May 21, 2019):

Going to close this as there seems to be a workaround that works. @alexandre1985, please feel to re-open if you have more questions.

<!-- gh-comment-id:494382956 --> @chiraag-nataraj commented on GitHub (May 21, 2019): Going to close this as there seems to be a workaround that works. @alexandre1985, please feel to re-open if you have more questions.
Author
Owner

@shodanx2 commented on GitHub (Mar 19, 2022):

I seem to have a similar issues.

https links work but aesgcm:// links don't work

image

I'm not sure why sometimes gajim exchanges https links and sometimes it is naesgcm:// links

<!-- gh-comment-id:1073116156 --> @shodanx2 commented on GitHub (Mar 19, 2022): I seem to have a similar issues. https links work but aesgcm:// links don't work ![image](https://user-images.githubusercontent.com/10621885/159139355-bc92b903-715e-4939-ba86-6daba87bf5a1.png) I'm not sure why sometimes gajim exchanges https links and sometimes it is naesgcm:// links
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1672
No description provided.