Open Rosika2 opened 5 days ago
Firewarden creates a temporary directory, and tells Firejail to use that as the home directory when executing the program. So your normal config file at /home/rosika/.config/featherpad/fp.conf
will not be loaded within the jail.
Firewarden has a -c
flag, which tells it to look for and execute a shell script named for the program being executed. The path to the temporary home directory of the sandbox will be passed to this script as $FIREWARDEN_HOME
. This allows you to do any needed configuration, such as creating directories or copying files.
You want to create a shell script at /home/rosika/.config/firewarden/featherpad.sh
, make it executable, and put inside it something like:
#!/bin/sh
mkdir -p "$FIREWARDEN_HOME/.config/featherpad
cp "$HOME/.config/featherpad/fp.conf" "$FIREWARDEN_HOME/.config/featherpad/"
Then instead of executing firewarden featherpad file.txt
, run firewarden -c featherpad file.txt
. Firewarden will run the above shell script prior to launching Featherpad, so Featherpad will see your normal config file and will respect all your normal settings.
In the meantime I managed to solve my problem. For anyone interested here´s the how-to:
mkdir -p ~/.config/firewarden/
nano ~/.config/firewarden/featherpad.sh
set darkColorScheme=true
in /.config/featherpad/fp.conf
Write the configuration script: The script should copy your dark theme fp.conf file to the sandbox’s $FIREWARDEN_HOME directory.
#!/bin/sh
# Create the necessary directories in the sandbox home
mkdir -p "$FIREWARDEN_HOME/.config/featherpad"
# Copy the dark theme configuration to the sandbox
cp "$HOME/.config/featherpad/fp.conf" "$FIREWARDEN_HOME/.config/featherpad/fp.conf"
chmod +x ~/.config/firewarden/featherpad.sh
firewarden -c featherpad /home/rosika/Videos/test4.txt
Works like a charm. Black theme is activated now. :+1:
As a user-defined entry for thunar
:
lxterminal --command="/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Ergänzungen_zu_Programmen/zu_firewarden_focal/firewarden -c featherpad %f"
That´s my personal location of firewarden
, of course.
Yod need to adapt the command according to your preferences.
So, more generally speaking:
lxterminal --command="[path-to-firewarden]/firewarden -c featherpad %f"
Glad it could be solved. :smiley:
Many greetings from Rosika :slightly_smiling_face:
Hi @pigmonkey , :wave:
Thanks, Peter, for your help. :heart:
I think our posts overlapped in time. I just saw your comment after I had posted my how-to. I guess both tell the same story, right? :smiley:
I´m really glad it worked out.
Thank you so much, Peter.
Many greetings from Rosika :slightly_smiling_face:
Hi all, :wave:
Info:
my system: Linux Lite 6.2
here´s the scenario:
In
thunar
file-manager I created a user-defined command which looks like this:lxterminal --command="/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Ergänzungen_zu_Programmen/zu_firewarden_focal/firewarden_strict_dark_theme %f"
My aim is to display any text file by using
featherpad
the secure way withfirewarden
. The problem is: it doesn´t respect darkColorScheme settings. It keeps displaying the text black-on-white, even if I change the respective settings infp.conf
.So I tried to fiddle around a bit.
To this end I created the folder:
mkdir -p ~/.config/featherpad_dark/featherpad
cp ~/.config/featherpad/fp.conf ~/.config/featherpad_dark/featherpad/fp.conf
I changed
darkColorScheme=false
todarkColorScheme=true
in the new config.I also changed
firewarden_strict_dark_theme
(which once was an exact copy of thefirewarden script
thus:... and also tried some more fiddling.
Nothing worked however. :disappointed:
Dark theme settings keep being ignored.
Can anybody help me finding another way of getting
featherpad
to usedarkColorScheme=true
together withfirewarden
:question:Many thanks in advance and many greetings from Rosika :slightly_smiling_face: