You are not logged in.
Hi everyone,
I want to start certain applications with the hardened malloc implementation, also using firejail.
In the past I edited the .desktop files to include the command I wanted to use to start applications. However since then I switched to a different application launcher setting and also was told that editing the .desktop files is bad style, I am looking for a more solid way.
I wanted to asked how and where to properly set things so that my application launcher 'rofi' starts applications properly. I am unsure what I am looking to do is even called which makes it hard for me to search the wiki.
firejail --env=LD_PRELOAD='/usr/lib/libhardened_malloc.so' /usr/bin/firefoxThanks in advance!
Last edited by Sapiens (2021-07-20 19:28:06)
Offline
... and also was told that editing the .desktop files is bad style
Wearing socks with sandals is bad style. Editting desktop files is precisely how you customize how programs are launched by any tool that uses desktop files. Just be sure to edit versions / copies under your home directory as instructed in the wiki and not the upstream-provided files tracked by pacman.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
There is no need to edit the .desktop file. Just create the file firefox.local in ~/.config/firejail with the entry:
env LD_PRELOAD='/usr/lib/libhardened_malloc.so'Offline
Editting desktop files is precisely how you customize how programs are launched by any tool that uses desktop files.
I see now how this is not clear from my question. I do not use a launcher that is based on .desktop files anymore.
Just be sure to edit versions / copies under your home directory as instructed in the wiki and not the upstream-provided files tracked by pacman.
To make this clear, the files under ~/.local/share/applications are fine, right?
There is no need to edit the .desktop file. Just create the file firefox.local in ~/.config/firejail with the entry:
env LD_PRELOAD='/usr/lib/libhardened_malloc.so'
This is a nice solution, thank you. I also just verified with
ps faux | grep 'firefox'cat /proc/<firefoxprocessid>/environthat firefox is correctly started with the variable! Can you please elaborate if this is a method applicable only to firejail or to all other applications as well?
Last edited by Sapiens (2021-07-19 21:05:55)
Offline
Can you please elaborate if this is a method applicable only to firejail or to all other applications as well?
Only to Firejail!
Offline
Sapiens wrote:Can you please elaborate if this is a method applicable only to firejail or to all other applications as well?
Only to Firejail!
This will serve me well, still! I am planning to roll out firejail to a few more applications and the ones requiring firejail, are the ones that are in need of a hardened malloc as well. Thank you again for taking the time to answer my questions and help me with the transition to Arch!
Offline
firejail --env=LD_PRELOAD='/usr/lib/libhardened_malloc.so' /usr/bin/firefox
I came across this recent post while searching on a related topic. It should be noted that, (for Firefox,) the above does nothing.
Irvine
Mods: Please note, the post is recent, and the above is important
Edit: I believe you would add the "--diasable-jemalloc" flag here in the PKGBUILD
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --enable-linker=lld
ac_add_options --disable-elf-hack
ac_add_options --disable-bootstrap
??? <ac_add_options --diasable-jemalloc> ???
# Branding
ac_add_options Last edited by IrvineHimself (2021-08-30 06:35:56)
Et voilà, elle arrive. La pièce, le sous, peut-être qu'il arrive avec vous!
Offline