April 21st, 2011

beartato phd

(no subject)

I was getting this weird error message on login on my home machine:
-bash: /etc/ati/ati-fglrx.sh: No such file or directory
This was weird because I thought I entirely uninstalled the fglrx drivers for my video card. Maybe they left behind some junk in my .bashrc or something. Looked at my bashrc pretty hard, couldn't find anything. .bash_profile? No, don't have one. What gives?

strace to the rescue, of course. Did
sudo strace -f -o /tmp/trace sudo login
and grepped for file opens in /tmp/trace.

Found open("/etc/ati/ati-fglrx.sh", O_RDONLY|O_LARGEFILE), and a few lines above it, open("/etc/profile", O_RDONLY|O_LARGEFILE), the system-wide shell init script. Ati drivers had stuck junk in it and failed to remove it on uninstall. Lame!