You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I specify "blacklist ${DOCUMENTS}" in the config, I expect that the path to the documents directory assigned in my KDE will be blocked. But this only works if the path starts with $HOME. If this is not the case, for example (/Data/Documents) then "$HOME/Documents" is used instead.
But in reality it is just hardcoded to "${HOME}/Documents" ignoring the KDE settings in the file "~/.config/user-dirs.dirs".
It's not hardcoded, user-dirs.dirs is parsed.
$ firejail --noprofile '--blacklist=${DOCUMENTS}' ls Dokumente
ls: cannot open directory 'Dokumente': Permission denied
# Edit ~/.config/user-dirs.dirs: XDG_DOCUMENTS_DIR="$HOME/DokumentenEnte"
firejail --noprofile '--blacklist=${DOCUMENTS}' ls Dokumente DokumentenEnte
Dokumente:
foo bar
ls: cannot open directory 'DokumentenEnte': Permission denied
However, user-dirs.dirs is not parse correctly. The code expects that the line for ${DOCUMENTS} starts with XDG_DOCUMENTS_DIR=\"$HOME/ and the part after the / is then used relative to cfg.homedir.
Your script also works for me.
But I'm not specifying the path in $HOME, but on another partition of the disk /Data.
And this is no longer processed, and instead of "/Data/Documents", "$HOME/Documents" is blocked.
13ilya-old
changed the title
Incorrect definition of paths for macros ${DOCUMENTS} and possibly others in KDE.
Wrong definition of macro paths from ~/.config/user-dirs.dirs if they are not in "$HOME".
Nov 10, 2020
When I specify "blacklist ${DOCUMENTS}" in the config, I expect that the path to the documents directory assigned in my KDE will be blocked. But this only works if the path starts with $HOME. If this is not the case, for example (/Data/Documents) then "$HOME/Documents" is used instead.
cat ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/Desktop/"
XDG_DOCUMENTS_DIR="/Data/Documents"
XDG_DOWNLOAD_DIR="$HOME/Downloads/"
XDG_MUSIC_DIR="/Data/Music"
XDG_PICTURES_DIR="/Data/Pictures"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_VIDEOS_DIR="/Data/Video"
openSUSE Tumbleweed
KDE
firejail 0.9.64
The text was updated successfully, but these errors were encountered: