Which config file when changing user? Which home directory?

Asked by Ricky Seltzer

I wanted a script or command I could run in my user terminal to bring up a root terminal pane or a root window with different colors to remind me I was in dangerous territory. So I created a profile and a simple layout for the root user that changed the appearance.

After a few false starts, I came up with this script:

#! /bin/sh
sudo -H -i -b /usr/bin/terminator -m --profile=Root --title=Root --layout=RootLayout -u

But I ran into the confuser that the change of profile and layout I wanted, referenced the config file under the root home directory, which of course did not exist.

Eventually, I figured out that I should
    $ sudo cp -p ~/.config/terminator/config ~root/.config/terminator/config.

But this was non-obvious for too long. An unneeded frustration. It isn't clear at exactly what point terminator switches from one config file to the other config file.

1. Was there an explanation for this in the documentation that I missed?
2. Shouldn't some hint or example in the docs have helped me here?
3. I fell in to the solution of creating a whole new terminator window. Would it have been easier or better to instead create a new split pane or new tab?

Clearly there is a need for a sample solutions section in the docs.

What is the overall right approach for changing users and therefore, home directory?
Is there a place for a global config file that could be reference by all my users?

Why in heck did I put the '-u' in that command line? I realize this is an unreasonable question.

Question information

Language:
English Edit question
Status:
Expired
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.