[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: customize Debian 11 evironment in lightdm (and in general?)



On Fri, May 06, 2022 at 09:16:09AM +1000, David wrote:
> So it appears that . ~/.profile runs when Xsession starts,
> but ~/.bashrc is not run until I manually open a terminal
> in LXDE, which appears in the above as x-terminal-emul.

Your .profile should be written to dot in ~/.bashrc if it's being run
by bash.  E.g. something like:

test "$BASH_VERSION" && test -r ~/.bashrc && . ~/.bashrc

In the absence of this, you will not have the desired shell environment
if you ever use a login shell -- e.g. if you hit Ctrl-Alt-F2 and login
on a console, or if you ssh into the system.

If you never do either of these things, well, you're fine.

> I assume that Xsession and lxsession are the same process
> because they have the same PID.

In a proper universe, the former would exec (chain-load) the latter.

> I have chosen to use lxterminal to provide x-terminal-emul.
> One quirk of lxterminal is that there is only one process
> which handles all open terminal windows.

Sounds atrocious.

If you ever feel bored, you could run this experiment, and see what
happens:

1) Put "umask 002" in your ~/.xsessionrc file.

2) Log out and back in.

3) Open an lxterminal.

4) Type "umask" and see what it's set to.

If my conclusions from the OP's post are correct, it will report 0022,
the Debian system default, totally ignoring your attempt to customize it.

Less invasively, a process tree showing the ancestry of a shell running
inside an lxterminal would be helpful.  Something like this:

unicorn:~$ pstree -s $$
systemd───login───bash───startx───xinit───.xsession───rxvt───bash───pstree

That's for one of the rxvt's that's launched from my .xsession file;
for one that's launched from the FVWM menu, I have:

unicorn:~$ pstree -s $$
systemd───login───bash───startx───xinit───.xsession───fvwm2───rxvt───bash───pst+


Reply to: