Closed mrDoctorWho closed 9 years ago
sudo
spawns another instance of bash
without Final Term being able to inject its logic into it. I see no way to fix this short of patching bash
. You can, however, replace the user's .bashrc
with Final Term's bash_startup
as a workaround. That way, the hooks get executed whenever a bash
shell is spawned from that user's account – unfortunately, also in other terminal emulators.
@p-e-w Perhaps only run the necessary changes in .bashrc if the current terminal is finalterm. This could be accomplished by interacting with the window manager -- could it not?
Final Term could set an environment variable (IS_FINALTERM
), but indeed all .bashrc
needs to do is examine bash
's parent process (and if that is bash
again, its grandparent process and so on). This could be written as, say, a Python script with ease and probably even in bashscript directly.
Finalterm does not highlight files and directories after changing user by sudo. Sorry if this is a duplicate.