You are not logged in.
Pages: 1
Hi there,
Two question:
1) How do I apply xfce4-terminal theme programmatically?
I have, say, custom.theme within /usr/share/xfce4/terminal/colorschemes/custom.theme
But without applying it via GUI, it seems like there's no other options (tried many things already, vie config file with Theme=custom etc)
2) Can I apply the /home/user/.config/xfce4/terminal/terminalrc globally, for all users somehow?
Offline
Hello and welcome.
If you are referring to a terminalrc file, then you must be using an older version of xfce4-terminal as newer versions have migrated to using xfconf as their backend.
1) How do I apply xfce4-terminal theme programmatically?
I have, say, custom.theme within /usr/share/xfce4/terminal/colorschemes/custom.theme
But without applying it via GUI, it seems like there's no other options (tried many things already, vie config file with Theme=custom etc)
The custom theme should have one or more "Color*" statements. Your goal will be to remove the existing Color statements from the terminalrc file:
sed -i '/Color.*/d' terminalrc
...and then add the ones from your custom theme:
while read line; do
if echo "$line" | grep -q "^Color"; then
echo "$line" >> terminalrc
fi
done < /usr/share/xfce4/terminal/colorschemes/solarized-dark.theme
...change the name of the colorscheme file at the end of that statement to your custom file.
The changes will be made live because xfce4-terminal monitors changes to this file.
2) Can I apply the /home/user/.config/xfce4/terminal/terminalrc globally, for all users somehow?
Not easily, but here are a couple of options. If the user has never logged in before (for example a new user), you can put the terminalrc file in the /etc/skel/.config/xfce4/terminal and it will be copied over during account creation. For existing users, you could create a script to run the above statements and put it in their autostart applications list (globally would be /etc/xdg/autostart (must be a formatted .desktop file).
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
Thank you for your response.
Yes, I use the 1.0.4 version and it indeed uses the terminalrc file for its config as I found out with trial and error.
I did have a conflict between the files(theme and terminalrc).
It's resolved now, thanks.
As for the /etc/skel/.config/xfce4/terminal and scripting, I'm aware of this, just thought maybe there's a more simple way for it e.g. putting into /usr/share/ or something alike.
Offline
Pages: 1
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 532.78 KiB (Peak: 534.06 KiB) ]