My work laptop runs Ubuntu Linux. After using Ubuntu for more than a month now, I can definitely agree that it is a really nice Linux distribution. Most of the things I have to do as part of my every-day job “just work”. There are binary packages for literally hundreds of applications. The desktop itself feels snappy, fast, it looks good and it’s as configurable as any Gnome-based desktop you will find out there.
Yet, there are a few details about Ubuntu (and its Debian heritage) that range from mildly annoying to batshit crazy. Only this morning, for example, I noticed that my home directory includes a file called “.sudo_as_admin_successful“. This is a Debian-specific hack that Ubuntu has inherited from its roots. When this file does not exist, the default “/etc/bash.bashrc” startup script will show a hint like this when you fire up a new shell:
To run a command as administrator (user "root"), use "sudo ". See "man sudo_root" for details. gkeramidas:~$
The annoying thing about this is that the hint is displayed even when you have created a “~/.hushlogin” file to silence login-time messages:
$ ssh localhost gkeramidas@localhost's password: /usr/bin/xauth: creating new authority file /home/gkeramidas/.Xauthority To run a command as administrator (user "root"), use "sudo ". See "man sudo_root" for details. gkeramidas:~$ exit
The fix is really easy, and I just installed it on my laptop’s “/etc” tree:
gkeramidas:/etc$ diff -u bash.bashrc.orig bash.bashrc
--- bash.bashrc.orig 2010-11-08 10:51:16.000000000 +0100
+++ bash.bashrc 2010-11-08 10:50:55.000000000 +0100
@@ -34,7 +34,7 @@
#fi
# sudo hint
-if [ ! -e "$HOME/.sudo_as_admin_successful" ] ; then
+if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *)
if [ -x /usr/bin/sudo ]; then
cat <<-EOF
gkeramidas:/etc$
One annoyance down. Now off to do some real work :)
Before doing real work, how about notifying the package maintainer?
As usual, the correct solution for these things is to file a bug (ideally, with a patch!). Complaining on one’s blog does little to change things (and that goes beyond software, but that’s a different discussion…).
@adamo and @vvas: yep, you’re right. The package maintainer should be notified. I’m going through the debbugs stuff as I type this. The “bash” maintainer is the one who actually controls “
/etc/bash.bashrc“, as I found out a couple of minutes after posting to the blog.I operate like you do. I do not always file a bug report. Nor do I always contact the package maintainer. Largely this has to do with how quick it is to either file the bug report or locate who the maintainer is. And it is quicker to just post about it and wait for the search engines to index it for whoever is in trouble.
Update: ‘reportbug’ seems broken on my installation of Lucid Lynx:
I think reporting a bug to Ubuntu will have to wait a bit :-(
Launchpad to the rescue: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/672496
Dear e-keramida. This is not the right e-way to fix e-bugs in *Ubuntu. You have to follow the e-rules. It goes like:
I have this… e-Bug.
Me too.
Me too.
Me too.
…
Me too.
…
Solved in next e-Release.
You e-suck tbh… ;-) ;-)