[GH-ISSUE #58] Firejailed Gwenview cannot open filenames with blanks #28

Closed
opened 2026-05-05 04:46:38 -06:00 by gitea-mirror · 14 comments
Owner

Originally created by @curiosity-seeker on GitHub (Sep 8, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/58

I've noticed a strange problem with my firejailed VLC. Whenever I try to open, e.g., a video whose filename contains a blank or is located in a directory with a blank, VLC opens and I get an error like the following (for the file "/media/Multimedia/Filme/Die Tribute von Panem - The Hunger Games.avi"):
panem
Note that this problem does not occur if I open VLC directly and navigate to that file, and it does not occur with an un-firejailed VLC. Rather, it only occurs if I want to open that file with firejailed VLC in a filemanager (Krusader or Dolphin - I'm running KDE Plasma 5 on Arch Linux). A similar problem happens if I want to open pictures with blanks in their filenames in firejailed Gwenview.

Originally created by @curiosity-seeker on GitHub (Sep 8, 2015). Original GitHub issue: https://github.com/netblue30/firejail/issues/58 I've noticed a strange problem with my firejailed VLC. Whenever I try to open, e.g., a video whose filename contains a blank or is located in a directory with a blank, VLC opens and I get an error like the following (for the file "/media/Multimedia/Filme/Die Tribute von Panem - The Hunger Games.avi"): ![panem](https://cloud.githubusercontent.com/assets/14075215/9736722/3c135db4-5643-11e5-8807-fca8394a7999.png) Note that this problem does **not** occur if I open VLC directly and navigate to that file, and it does **not** occur with an un-firejailed VLC. Rather, it only occurs if I want to open that file with firejailed VLC in a filemanager (Krusader or Dolphin - I'm running KDE Plasma 5 on Arch Linux). A similar problem happens if I want to open pictures with blanks in their filenames in firejailed Gwenview.
gitea-mirror 2026-05-05 04:46:38 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ghost commented on GitHub (Sep 8, 2015):

If you could please post the exact command line that you use to start firejail, we can help diagnose the problem.

It sounds like a situation where firejail is getting started from a shortcut like firejail vlc $1 - in this case the $1 gets expanded without protecting the spaces in the filename. Is it something like that?

<!-- gh-comment-id:138592377 --> @ghost commented on GitHub (Sep 8, 2015): If you could please post the exact command line that you use to start firejail, we can help diagnose the problem. It sounds like a situation where firejail is getting started from a shortcut like `firejail vlc $1` - in this case the `$1` gets expanded without protecting the spaces in the filename. Is it something like that?
Author
Owner

@curiosity-seeker commented on GitHub (Sep 8, 2015):

Thanks for your reply. The exact command line in the KDE menu entry (and in the corresponding desktop file in ~/.local/share/applications) is:

firejail --profile=/home/xxx/.config/firejail/vlc.profile /usr/bin/vlc --started-from-file %U

<!-- gh-comment-id:138599036 --> @curiosity-seeker commented on GitHub (Sep 8, 2015): Thanks for your reply. The exact command line in the KDE menu entry (and in the corresponding desktop file in ~/.local/share/applications) is: firejail --profile=/home/xxx/.config/firejail/vlc.profile /usr/bin/vlc --started-from-file %U
Author
Owner

@curiosity-seeker commented on GitHub (Sep 8, 2015):

FWIW, I've just tried to start that video without the

--started-from-file %U

switches but with the the same result.

<!-- gh-comment-id:138604785 --> @curiosity-seeker commented on GitHub (Sep 8, 2015): FWIW, I've just tried to start that video without the --started-from-file %U switches but with the the same result.
Author
Owner

@netblue30 commented on GitHub (Sep 8, 2015):

Add a --shell=none, like this:

firejail --shell=none --profile=/home/xxx/.config/firejail/vlc.profile /usr/bin/vlc --started-from-file %U
<!-- gh-comment-id:138628792 --> @netblue30 commented on GitHub (Sep 8, 2015): Add a --shell=none, like this: ``` firejail --shell=none --profile=/home/xxx/.config/firejail/vlc.profile /usr/bin/vlc --started-from-file %U ```
Author
Owner

@curiosity-seeker commented on GitHub (Sep 8, 2015):

Wow! That solved it, indeed! Thank you very much! Can you explain why?

However, that similar problem with Gwenview is not yet really solved. The command line for it is:

firejail --profile=/home/xxx/.config/firejail/gwenview.profile gwenview %U

When opening pictures with blank(s) Gwenview opens with just a line that say something like

Basisordner > tmp > org.kde.gwenview-hNwKkl

After adding --shell=none Gwenview displays the folder symbol where the picture is located and I can navigate to it. An improvement, indeed, but the picture itself isn't immediately opened as it should. Do you have an idea how to circumvent this problem?

<!-- gh-comment-id:138692106 --> @curiosity-seeker commented on GitHub (Sep 8, 2015): Wow! That solved it, indeed! Thank you very much! Can you explain why? However, that similar problem with Gwenview is not yet really solved. The command line for it is: firejail --profile=/home/xxx/.config/firejail/gwenview.profile gwenview %U When opening pictures with blank(s) Gwenview opens with just a line that say something like Basisordner > tmp > org.kde.gwenview-hNwKkl After adding --shell=none Gwenview displays the folder symbol where the picture is located and I can navigate to it. An improvement, indeed, but the picture itself isn't immediately opened as it should. Do you have an idea how to circumvent this problem?
Author
Owner

@netblue30 commented on GitHub (Sep 8, 2015):

It all depends on how the file manager starts vlc. If they start the program in a shell, and firejail also using a shell to start the program, between the two shells the file name gets split into several file names. So the fix is not to let firejail to start a second shell.

I'll look into gwneview, thanks for the bug.

<!-- gh-comment-id:138708119 --> @netblue30 commented on GitHub (Sep 8, 2015): It all depends on how the file manager starts vlc. If they start the program in a shell, and firejail also using a shell to start the program, between the two shells the file name gets split into several file names. So the fix is not to let firejail to start a second shell. I'll look into gwneview, thanks for the bug.
Author
Owner

@curiosity-seeker commented on GitHub (Sep 9, 2015):

FWIW, --shell=none also solves the same problem for a firejailed LibreOffice. Just as a reference for a possible new issue ... ;-)

<!-- gh-comment-id:138978965 --> @curiosity-seeker commented on GitHub (Sep 9, 2015): FWIW, --shell=none also solves the same problem for a firejailed LibreOffice. Just as a reference for a possible new issue ... ;-)
Author
Owner

@netblue30 commented on GitHub (Sep 10, 2015):

Thanks!

<!-- gh-comment-id:139218340 --> @netblue30 commented on GitHub (Sep 10, 2015): Thanks!
Author
Owner

@curiosity-seeker commented on GitHub (Sep 22, 2015):

I suggest that you add

shell none

to the deafult VLC profile as it solves this issue. Or are you looking for a general solution as this issue is still open?

<!-- gh-comment-id:142301042 --> @curiosity-seeker commented on GitHub (Sep 22, 2015): I suggest that you add shell none to the deafult VLC profile as it solves this issue. Or are you looking for a general solution as this issue is still open?
Author
Owner

@netblue30 commented on GitHub (Sep 23, 2015):

Thanks, I'll look for a more general solution, otherwise I'll end up with "shell none" allover the place.

<!-- gh-comment-id:142585068 --> @netblue30 commented on GitHub (Sep 23, 2015): Thanks, I'll look for a more general solution, otherwise I'll end up with "shell none" allover the place.
Author
Owner

@curiosity-seeker commented on GitHub (Oct 24, 2015):

I found this post which seems to be relevant for the problem discussed here. I can confirm that shell none does no longer solve the problem with the newest gwenview version but the start script in that post does!

<!-- gh-comment-id:150830372 --> @curiosity-seeker commented on GitHub (Oct 24, 2015): I found [this](https://www.wilderssecurity.com/threads/firejail-linux-sandbox.369309/page-8#post-2536579) post which seems to be relevant for the problem discussed here. I can confirm that `shell none` does no longer solve the problem with the newest gwenview version but the start script in that post does!
Author
Owner

@netblue30 commented on GitHub (Oct 24, 2015):

Thanks, I'll take a look.

<!-- gh-comment-id:150831404 --> @netblue30 commented on GitHub (Oct 24, 2015): Thanks, I'll take a look.
Author
Owner

@brunonova commented on GitHub (Nov 17, 2015):

I also noticed this issue when I double-clicked an HTML file. The sandoxed Firefox failed to open the file. Opening the file from the command-line didn't work.
Adding shell none to the profile fixes the issue.

This doesn't work:

firejail vlc "some file.mp4"

But this works:

firejail vlc "\"some file.mp4\""

When the program is started through a shell, could you add " or ' characters around every argument?

<!-- gh-comment-id:157490526 --> @brunonova commented on GitHub (Nov 17, 2015): I also noticed this issue when I double-clicked an HTML file. The sandoxed Firefox failed to open the file. Opening the file from the command-line didn't work. Adding `shell none` to the profile fixes the issue. This doesn't work: ``` firejail vlc "some file.mp4" ``` But this works: ``` firejail vlc "\"some file.mp4\"" ``` When the program is started through a shell, could you add `"` or `'` characters around every argument?
Author
Owner

@netblue30 commented on GitHub (Dec 29, 2015):

I think this is fixed in new version, 0.9.36.

<!-- gh-comment-id:167844451 --> @netblue30 commented on GitHub (Dec 29, 2015): I think this is fixed in new version, 0.9.36.
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#28
No description provided.