Passing Environment Variables to sudo
Aha! I can pass environment variables to sudo!
sudo env ARCHFLAGS='-arch ppc' python setup.py install
Or, more to the point,
sudo env LD_LIBRARY_PATH=$LD_LIBRARY_PATH sybase
Passing Environment Variables to sudo
Aha! I can pass environment variables to sudo!
sudo env ARCHFLAGS='-arch ppc' python setup.py install
Or, more to the point,
sudo env LD_LIBRARY_PATH=$LD_LIBRARY_PATH sybase
I downloaded the Import QIF 3.0.0.1 plugin for Buddi 3.0.0.7, but then I had a terrible time importing the data I just exported from Quicken Deluxe 2002 for Macintosh (OS X).
tr '\r' '\n'), but I did anyway.In retrospect, that doesn’t sound too bad, but I sure did spend a lot of time modifying date stamps before I tried this!
The good news is, I moved my data, and if I’m lucky, I won’t go back to Quicken and Intuit’s terrible customer service!
My laptop keyboard’s been out most of the past month. It was never right after it got doused in water, even though I replaced. There’s a fuzz connector under the T, G, and Y keys that connects the keyboard to the motherboard. Ever since I replaced the keyboard, I’ve occasionally had to press down on those three keys very firmly in order to regain keyboard and trackpad. Well, one day last month that trick stopped working. (Luckily I have an external USB keyboard and mouse so I can keep working.)
The ambient light sensor for the backlit keyboard always works, so there’s power to the keyboard. However, none of the keys work (not even the CAPS LOCK light).
This failure is different, though. I have keyboard right after the laptop boots, but after a while, it goes out (and no amount of pressing on TGY brings it back). For instance, one time I lost keyboard in the middle of typing 11 minutes after a reboot (I was on AC). The next time I was on battery, and it took two hours to go out. That would indicate a heat problem, and fuzz connectors aren’t the most solid connection under the best circumstances. However, I think it’s load-related (keyboard goes away when I see the CPU head up) more than power-related. So still a heat issue, but more about CPU than AC versus battery.
However, I collected a list of suggestions from the Internet on what to try for PowerBook G4 keyboard problems.
reset-NVRAM, set-defaults, and reset-all which made it reboot normally.sudo rm ~/Library/Preferences/com.apple.BezelServices.plist /Library/Preferences/com.apple.BezelServices.plistYes, these are predominantly software fixes for what appears to be a hardware problem, but it doesn’t cost anything to try. It does make the new MacBook Air very tempting, but I don’t want onboard Intel graphics.
So it looked like a hardware problem, and sure enough, I think this proves it. The fuzz connector between keyboard and motherboard can only be reset so few times, and I went over the limit. This laptop will just have to stay docked …
Ah, I finally figured out why I couldn’t close windows (just tabs) in Safari! I still had the Taboo 0.3 bundle loaded. Remove it (Safari now warns you when you’re quitting with multiple tabs or windows open), and I can close Safari windows again. Whew. It’s pretty annoying when you can’t close Safari windows!
For years, I’ve seen a problem with sleep on desktop Macs running OS X (both mine and my mother’s). What’s odd is that I never saw this problem with laptops going to sleep. I decided that the problem was probably caused by having multiple hard drives in my Mac towers. Although I have a home network, my mother did not have one when her Mac crash-on-wake-from-sleep problem started. The work-around is to (remember to) select Sleep from the Apple menu instead of letting it go to sleep on its own.
Things I tried:
I tried unplugging all USB peripherals except mouse and keyboard (pain in the rear) before sleep.
Remove the SCSI card. (There’s a G4 Firmware Update for that problem. On a side note, I got rid of a random kernel panic when I removed the CompUSA USB card, so don’t discount removing cards.)
Use different time values for sleep, monitor sleep, and hard drive sleep.
On laptop, make sure that a/c and battery settings are the same in Energy Saver if having wake from sleep problems when changing a/c status.
Delete /var/db/SystemConfiguration/com.apple.PowerManagement.xml as often as needed.
Reset PMU. (How to do this depends on your hardware. Search Apple.)
Of course those didn’t work.
Here’s the twist, support coming from an unusual direction. My boss’ boss also uses a Mac, and often asks me support questions. Yesterday, however, I learned a trick from him. John said he’d been having trouble with sleep until he changed the order of his hard drives. Apparently if OS X is installed on the second drive (and I’ll have to think about what that means when I don’t have a SCSI ID; maybe he means IDE slave instead of IDE master), he has sleep problems. He figured that out when Leopard wouldn’t install on the blank second drive he uses for backups. (With cable select, you can just pull the master.) I think I need to open cases and take a peek to see if I can explain the problems we’ve had for years!
This morning’s annoyance was that old Linux VNC problem I had a while ago, and I finally solved it. I found a hint that TightVNC (a fork used by Apple for Apple Remote Desktop, known for good behavior on slow links) compression is incompatible with RealVNC (the main code base). I bet unknown message type 242 means I don’t understand TightVNC encoding when you get down to it.
If I use Vine Server based on RealVNC, my Linux can control my Mac and my Solaris still can too! Don’t forget to set a strong password and to open your VNC ports in the firewall.
I’m sure the reverse is also true: I could probably install TightVNC from DAG on my Linux, and then view Apple Remote Desktop (which is easier since it would open the firewall for me).
So the cool tool of the day is WebShell (ssh for iPhone), but we couldn’t get it working yesterday when we installed it.
The answer wasn’t RTFM, but on the forum indirectly. Like most people, I run ssh on a non-standard port. You need to change webshell.py to look like this (replacing 22 with whatever you use instead of the default port 22):
[nethope@server WebShell-0.9.5]$ grep ssh webshell.py
cmd = 'ssh -p 22'
help = \"set shell command (default: ssh localhost)\")
The original line is just cmd = 'ssh', and that’s where you make the change.
Whew!
I turned on Apple Remote Desktop on my MacBook Pro, but I couldn’t VNC into it from my Linux box. However, I could VNC into it from my Solaris 9 box, and from my Mac at home (the one that mattered) with Chicken of the VNC 2.0b2. All Macs running 10.4.10. Linux gave me an unknown message type 242.
Here’s what I saw on Linux (2.6.9.55 RHEL4AS):
vncviewer 1.2.3.39
VNC viewer for X version 4.0 - built Jan 10 2007 07:48:23
Copyright (C) 2002-2004 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Fri Jul 6 17:30:58 2007
CConn: connected to host 1.2.3.39 port 5900
CConnection: Server supports RFB protocol version 3.889
CConnection: Using RFB protocol version 3.8
Fri Jul 6 17:31:02 2007
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
CConn: Throughput 20069 kbit/s - changing to hextile encoding
CConn: Throughput 20069 kbit/s - changing to full colour
CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
CConn: Using hextile encoding
unknown message type 242
main: unknown message type
On the other hand, here’s what I saw on Solaris 9:
vncviewer 1.2.3.39
VNC server supports protocol version 3.889 (viewer 3.3)
Password:
VNC authentication succeeded
Desktop name \"a.b.c.d\"
Connected to VNC server, using protocol version 3.3
VNC server default format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using default colormap which is TrueColor. Pixel format:
32 bits per pixel.
Most significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
So if I can use something other than Linux, my VNC viewer to Apple Remote Desktop works. I wonder if Linux is just using a newer version (RFB remote frame buffer protocol version 3.8 instead of 3.3) … but (intelligent!) backwards compatibility would be nice! I really didn’t troubleshoot any further than this because it was Friday evening, and I could go home if I had reasonable confidence that I could VNC in to my MacBook Pro. Since Solaris worked, I didn’t much care why Linux failed. Sure enough, my Mac at home also worked, so I went about finishing that long task, and enjoying my precious weekend.
Update: solved 10/02/2007!
I have a ThinkPad T42 at work. Usually it runs Linux (RHEL 4 AS), but once every 3 months I boot to Windows (XP SP2) to change my domain password (and to run Windows Update). If I knew a way to use SAMBA from Mac OS X or Linux to change my AD domain password, I might not boot to Windows as often as once a year! That would be nice, but unfortunately password changing isn’t that easy.
I have an external monitor, a Dell 2405FPW, connected to it. Usually the monitor works fine. However, after I’ve booted to Windows, once I boot back to Linux, the monitor shakes. The scanlines don’t line up anymore, and it looks for all the world like a hardware problem. However, if I unplug power to this monitor for two days (I haven’t tested a shorter time period yet), it goes back to working. So Windows is doing something evil to my monitor that only shows up for Linux! Once the monitor has the shakes, it doesn’t matter if I remove the BlackBox KVM or the Dock from the cabling.
I use the DVI connector to this monitor with my Mac OS X, and I use the VGA connector for the KVM and Dock (VGA KVMs are significantly cheaper!).
I’m still working on a theory to explain this, but at least I have a workaround, to leave it unplugged over the weekend.
When we moved almost 4 years ago, our HL-1650N Brother laser printer lost its settings. That’s fair, since it didn’t have power for days. However, there’s one subtle setting that needs to be changed from the default for printing to work! Last time, I printed the settings page and used highlighter so I didn’t have to figure it out a third time, but I think I can find a blog entry more easily than a piece of paper (even one stored underneath the printer!).
From the printer’s home page, go to Printer Settings and then to Printer Setup; change Emulation from Auto to BR-Script 3. Save.
That’s it! One teensy change, but it’s the difference between printing and frustrated!