Posts tagged ‘MacOSX’

I’m a fan of keyboard shortcuts. Not to memorize them, but to use them. It’s just so much quicker to hit CMD+W to close the current browser tab than it is to carefully navigate your mouse to that 12*12 pixels button. However, this didn’t work flawlessly. Sometimes I get the ubiquitous “do you want to save?” question and I have to use the mouse to click “Don’t save”; Tab doesn’t seem to work.

Until I found out how to change that setting, that is. It’s hidden in the System Preferences under Keyboard – Keyboard Shortcuts. You can change Full Keyboard Access to “All Controls”, which is the behavior I’m used to from Linux and Windows.

I sometimes pipe a command to less to study it’s output. If it’s interesting enough, I re-run the command and redirect the output to file. This approach has some limitations: the command is run twice, possibly with different output.

Obviously, I should use tee to send the output to both less and the file, but I regularly forget this. That where this hint comes in: you can save the current less-buffer to file!

In short, to save the buffer that is being displayed by a session of `less’, use its pipe-to-shell-command capability by scrolling to the top of the file and press `|’ followed by `$’ as well as entering `tee DESTINATION_FILE’ when prompted for the shell command.

Usually you don’t want to slow down your network connection deliberately. When testing networking applications, it might come in handy to simulate a worse network than you are actually on. This way you can simulate a 3G connection while actually running over WiFi.

Up until now, I used a Linux-box with netem and/or htb in the Queueing schedulers. Turns out that MacOSX can do most of this as well, using FreeBSD‘s ipfw pipes. Throtteling a single task only takes 2 commands:

$ sudo ipfw pipe 1 config bw 256kbit/s
$ sudo ipfw add pipe 1 dst-ip 192.0.2.1 dst-port 80
33400 pipe 1 ip from any to any dst-ip 192.0.2.1 dst-port 80

$ sudo ipfw list
00100 pipe 1 ip from any to dst-ip 192.0.2.1 dst-port 80
65535 allow ip from any to any
$ sudo ipfw pipe list
00001:   256 kbit/s    0 ms   50 sl. 1 queues (1 buckets) droptail
 mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp

$ # do whatever you want

$ sudo ipfw del 00100
$ sudo ipfw pipe del 00001

Google is my favorite search engine; I use Maps regularly and enjoy Earth as well. I am however concerned about privacy using all these cloud-services. Privacy has a lot of different meanings. Here I’m talking about the control meaning: I want to be in control over my stuff, being it my computer, my mails or my documents.

My concert just got another boost when Growl notified me that a new volume was mounted. I was surprised, since I was laying back, watching a movie… The volume mounted was “GoogleSoftwareUpdate-1.0.6.1054”.

I do have Google Earth installed on my machine, but don’t remember asking it to update itself, definitely not when it’s not even running!

After some digging around, I found the dmg hiding in ~/Library/Caches/com.google.UpdateEngine.Framework.501/Downloads/com.google.Keystone.dmg. Apparently, I’m not the only one who noticed this. This updating seemed to be launched from launchd and can be disabled by removing or disabling the plist-file:

Disabling the startup item can be done by deleting the file ~/Library/LaunchAgents/com.google.keystone.agent.plist or adding a new “Disabled” property to it (in case you want to keep the file):

<key>Disabled</key>
<true/>

I got another toy to play with: A digital multimeter with RS232 interface and True RMS power measurement. Sadly, it comes with Windows-only software, which I interpreted as a challenge!

Continue reading ‘VoltCraft VC-940 protocol reverse engineered’ »

When I’m debugging serial communications, it’s very useful to run the standard application inside a VM. This allows me to connect the virtual RS232 port to the physical one with socat, which provides me with a detailed log of every byte.

The VMware products under Windows and linux have the option to connect their serial port to a “named pipe“, although it’s more a socket, since they allow bidirectional communication. Strangely enough, VMware Fusion, the Mac product, does not have this option.

Continue reading ‘Connecting a serial port from VMware Fusion to a unix socket’ »

If I log in to my Ubuntu box over SSH from my MacOSX terminal, then start screen, my backspace-key doesn’t work anymore. Pressing it deletes the first character on the right of the cursor, instead of the one on the left. This only happens inside screen, not on the regular bash-shell.

I found different workarounds:

  • A forum post telling to change the terminal preferences to send backspase as CTRL-H (ASCII 0x08) instead of the normal ASCII 0x7f.
  • A blogpost telling to lie about the terminal you’re using: “TERM=screen screen”
  • Another blog telling to do remapping inside screen with bindkey-commands

None of the above worked without side-effects: CTRL-H is not understood by MacOSX terminal applications; bindkey-commands are applied even if I SSH from my linux box.

The solution I like best is to change the terminal from the standard “xterm-color” to “rxvt”. After this change, everything worked like a charm.

IPv6 is, big surprise, the new version of IP. The current internet runs on IPv4, which has some drawbacks. Practically both versions are the same: they allow connections from one host to another host. Technically however, there are some major differences, most notably the enlarged address space. For the moment, most hosts will run a dual-stack configuration.

I decided that it was time to implement IPv6 on my home network and get a IPv6 connection to the IPv6-Internet.

Continue reading ‘IPv6 in the home network’ »

I just found a very nice post describing nice things to do with Bluetooth. By using the Proximity tool, my MacBook Pro can monitor the precense of my cell phone. Proximity will run an AppleScript when a selected device enters and/or leaves Bluetooth range. Most  phones are class 2 Bluetooth devices, which gives a range of 10m (outdoors). This allows you to automatically lock your desktop when you leave and unlock when you come back.

Continue reading ‘Useful things to do with Bluetooth’ »

I was looking around to get my VIDEO_TS-directory burned to a DVD-R disc. Apparently, Burn does not support this. This hint seems to work:

hdiutil makehybrid -udf -udf-volume-name DVD_NAME -o MY_DVD.iso /path/to/VIDEO_TS/parent/folder