2016-05-15

mdlbear: blue fractal bear with text "since 2002" (Default)

Monday I got my new work laptop,and spent altogether too much time (much of 2 days, spread over 3) configuring it thanks mainly to an obscure bug in my .bashrc file.

It seems that, in Ubuntu 14.04, the wrapper script that starts sessions for lightdm -- or maybe just terminal sessions -- is written in bash (rather than the safer and more usual sh), so it naturally sources the user's .bashrc file on startup. This is usually a good thing, since the user's environment ends up being configured the way they like it. When a terminal emulator like xterm or gnome-terminal starts up, it uses whatever is in the $SHELL environment variable to create its shell. This fails when one has the seemingly-innocuous like "SHELL=$0" in one's .bashrc file.

This normally does exactly the right thing, because when you start a program -- and in particular a shell -- $0 is bound to the path that was used to start the program, and all is well. Unfortunately, in 14.04, the wrapper script is started in an odd way, with $0 bound to "bash" instead of to "/bin/bash". So terminals don't start, because they can't find the shell. What hurts is that the line was put in to fix a similar bug in RedHat, where shells were getting started by Gnome with $SHELL set wrong.

Anyway, by mid-week my job-related anxiety level was sky-high, and has remained that way.

Most of what I've been doing around the house counts as puttering.

Notes & links, as usual )

Most Popular Tags

Style Credit

Page generated 2026-01-04 10:26 am
Powered by Dreamwidth Studios