You are not logged in.
I want each lxterminal window to have a different background color.
I came up with a script that generates a new "bgcolor=#hexcodehere" config in the .config/lxterminal/lxterminal.conf file each time I start bash (.bashrc.)
However, it appears as if lxterminal doesn't re-read this file if I simply does "ctrl-N" to create a new terminal, so the change from the last time bash started doesn't take effect. It also doesn't take effect if I already have an lxterminal running and press the shortcut on the start bar at the bottom of the screen.
Is there a way to force lxterminal to re-read its configuration file for new instances?
Is there some other way of going about what I want to accomplish?
Offline
I'm not sure what one can do with lxterminal itself.
To me it sounds strange that '.bashrc' isn't read for each new instance of bash (No matter if it's a new tab or a new window)
Bash should read '.bashrc' everytime when it's launched in interactive mode.
Have you tried to '.profile' too?
Shells can run in three modes: Script, Interactive and Login.
Interactive mode is used whenever a terminal window is opened in a desktop environment. Should read '.bashrc' here.
Login mode is used when one... well.. logs in to a shell. (Usually outside the X-environment) Should read '.profile' and '.bashrc' here
Script mode is used whenever the shell is invoked from a scripts interpreter line. Won't read any profiles. Relies on environment variables already set.
I'm not sure if I got it all right, so, someone please correct me if I'm wrong. I have noticed that Arch Linux behaves different, compared to other distributions, on this matter.
Something you also could try, is forcing lxterminal to reread .bashrc by simply telling it to launch the bash in interactive mode (Which it should do already)
( Also, try the -l option. "Invocation", lowercase ' L '. It makes bash to use login mode, as if one just logged into the terminal. )
# lxterminal --command "/bin/bash -i"Don't forget that you can set variables at the same time you launch something.
Example:
# NEAT_VARIABLE="Hello" lxterminal Try "echo $NEAT_VARIABLE" in that new window. It will only be set for that process, and discarded when closed.
Perfect when one wants to change a variable, temporarily, for a specific program when launching it, without affecting any other instances.
Offline
The problem is not with .bashrc. The .bashrc gets read just fine.
However, lxterminal doesn't re-read the lxterminal.conf file until all running instances of lxterminal have exited.
Thus, my changes appear if I close all lxterminal windows, and then start a new one. But, starting another terminal when one is running, will re-use the background color of the running one, rather than re-read the lxterminal.conf file for the new window.
Is there some RPC that can tell an lxterminal instance to re-read the configuration, or update the preference? Telling a sea of terminal windows apart at a glance is actually pretty important once you have 4-5 collaborating processes running in different windows...
Offline
I checked the source, and there's no way to re-load settings in lxterminal.
Thus, I made a patch :-)
https://sourceforge.net/tracker/?func=d … tid=894871
Offline