Posts Tagged ‘OS X’

Revive lost numeric keypad on newer Mac keyboards

Saturday, May 29th, 2010

I recently switched from the large white Apple Keyboard (A1048) to the compact Apple Wireless Keyboard (A1314).

I was really happy with the new one, except for one thing – on my old keyboard I made heavy use of the numeric keypad, so I realised that neither the new keyboard nor the Macbook Pro keyboard itself offer a feature which was there on my older PowerBook G4: the availability of a numeric keypad equivalent by pushing the fn-key and 789/UIO/JKL/M.

Fortunately, I ran into a nice software by Takayama Fumihiko – KeyRemap4MacBook. It will activate the old functionality, and what is more, it has to offer all kinds of custom key remappings as well as customisation of key repeat rates and whatnot, just in case you need …

OpenCV and Mac OS X 10.6 Snow Leopard

Sunday, September 20th, 2009

The changes in OS X 10.6 basically broke OpenCV’s Quicktime/Carbon GUI functionality.

There is a workaround/patch which allows building Macport’s OpenCV 1.0.0 on 64bit architecture, however, without any QT/Carbon support.

See here on the issue:
http://trac.macports.org/ticket/21014
http://tech.groups.yahoo.com/group/OpenCV/message/65895

A ticket is filed at OpenCV on Sourceforge, too:
http://sourceforge.net/tracker/?func=detail&aid=2859071&group_id=22870&atid=376677

Update:
#21014: OpenCV 1.0.0 does not build on snow leopard
——————————————-+——————————–
Reporter: grundmann.matthias@… | Owner: ryandesign@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Resolution: fixed | Keywords: LP64
Port: opencv |
——————————————-+——————————–
Changes (by ryandesign@…):

* cc: stante@… (added)
* status: assigned => closed
* resolution: => fixed

Comment:

Updated and fixed in r64069.

Connecting to IRC via Colloquy using Tor and Socat

Thursday, May 14th, 2009

Colloquy does not have a proxy function implemented yet. Still, it is possible to realise a connection to an IRC chat via a Tor server. There are some post on this issue over the web, but if you’re not an advanced computer user, it’s hard to understand, as the descriptions are not very explaining, and leave out important things. This is what I wanted to fix.

Still, this is not easy to realise. I will try and explain it as clearly as possible, so that anyone should arive at getting it to run. However, you should be familiar with the shell (called ‘Terminal’) – if not, start reading about it now.

So lets do it. What we need is four pieces of software. The first is Colloquy (http://colloquy.info/, which we install just the usual way in our GUI environment). Second, we need Macports (www.macports.org, which is just a software managment software. We only need it to download and install the following two programs). Third, Tor (https://www.torproject.org/, the software for connecting to proxy mixes). Fourth, Socat (http://www.dest-unreach.org/socat/, which is a software that can act as a network connections interface between other programs).

What we will build might look like the following:
(Colloquy) — (Socat) – (Tor) – (Tor Proxy)
The first three brackets show software which will run on our computer. As you can see, Socat will establish the connection between Colloquy and Tor, which will then connect to the Tor proxies on the web.

Now to the installing, configuring and running:

1. Get Macports and install it. You can get helpful info here: http://guide.macports.org/.

2. Via the shell, install Tor and Socat using Macports:
:~ sudo port install tor
:~ sudo port install socat

Both installation processes will take a while.

3. Configure and run Tor: See whether there is a file /opt/local/etc/tor/torrc. If there only is one called torrc.sample, copy it to the name of torrc:
:~ cp torrc.sample torrc
Then, run Tor:
:~ tor
The process should tell you something like:
“Tor has successfully opened a circuit. Looks like client functionality is working.”
Leave that terminal window open and get another one (cmd-n). You can stop the Tor process by ctrl-c.

4. Run Socat by entering:

:~ socat TCP4-LISTEN:6666,fork SOCKS4A:localhost:SERVERNAME:6667,socksport=9050

At the place of SERVERNAME, you have to enter the name of the IRC server you want to connect to.
Leave that terminal window open, too. You can stop the socal process by ctrl-c.

5. Configure Colloquy
Right-click in the Connections window to make a new connection. For the server name, enter ‘localhost’, and 6666 as the port number.

6. Chose that connection and click ‘Connect’. Now you should connect to the required server. Go into any room (or open one yourself), right-click on your user name and click ‘get info’ to make sure your IP and hostname are those from the Tor proxy you use (i.e. not those ones that your ISP provides you with).

See info on this issue on the web:
http://www.learnsecurityonline.com/index.php?option=com_mamboboard&Itemid=69&func=view&id=997&catid=41
http://blog.oneinsane.net/?p=14
https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#head-1793e1e8a4701ba463b5b82b33f59e787ff752f9

Environment/Postflight Script Problems with Macports (PB G4, OS X 10.5)

Sunday, July 6th, 2008

I’m running OS X 10.5 Leopard on a G4 PowerBook, and I was having some issues making Macports work.

When i installed from GUI, using the Macports 1.6.0 .dmg version, at the end of installation I got something like “Installation Failed” which I slowly figured out to possibly be due to problems with my bash environment, since it was the post-flight script at the end of the installation process which could not be executed correctly – setting the PATH and MANPATH values is one of its jobs. This got affirmed by my bash environment missing the required settings.

Changing those manually usually is quite easy. On opening a bash shell, the .profile script would be executed. It would contain two Macports-related lines, namely:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH

Anyway, this did not work on my system. I miss the .profile file at all, and creating it with the required entries does not change a thing. Leopard seems to have brought some changes that other users were experiencing as well. Actually, there is some posting on this issue, but it’s mainly inconclusive. On my friend’s machine (10.5, Intel) it just seems to work that way. So the problem seems to lie in the fact that different systems can have different bash scripts (~/.bash_profile, ~/.bash_login, ~/.profile …).

That all really confused me. Fortunately, I met the mighty Christoph Lischka yesterday ^^. My problem is solved now, Macports up and running, my mind can peacefully flow over with what I found out:

The bash startup scripts are executed in this order: First, the /etc/bashrc, which is a system-wide setting and which I was recommended not to change at all. Second, ~/.bash_profile. Anyway, the X Windows system evaluates ~/.bashrc first. So here’s what the latter two files look like now:

~/.bash_profile:
source .bashrc

~/.bashrc:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH

Wiimote and Darwiinremote to Control Powerbook Volume

Sunday, April 27th, 2008

For a long time, but without success, I tried to get my Wiimote to work as a volume control for my Powerbook G4. The problem with the free software Darwiinremote always was that mapping the volume keys to Wiimote doesn’t seem possible.

That problem is partially solved now. The free software PTHVolume lets you define any other shortcut which can then be mapped to Wiimote using Darwiinremote.

Still, it’s not perfect. PTHVolume misses a customisable shortcut for the option-shift-volume combination which under 10.5 Leopard controls the volume in smaller increments. And, but that’s only an aesthetic issue, you can’t hide the PTHVolume icon from the menu bar as you can do with the normal volume icon.

Anyway, find PTHVolume here, and Darwiinremote here.

Quicksilver for OS X

Sunday, April 27th, 2008

Quicksilver for Mac OS X is a launcher very much based on keyboard input.

It works by bringing up an alt-tab-style menu via a definable hotkey combination and a search algorithm for finding items matching your input, which works almost instantly. Define which parts of your system are searched, so it’s fine to just serve for starting applications.

You can get much deeper into it, though. Do not only display applications, but any objects. Do not just launch, but use any other action in an application or on an object. Query an online dictionary for input text. Email a paper to your friend. Do it all with just a few keystrokes.

You can find the freely distributed software here.

Dan Dickinson’s blog presents a lovely introduction to using the code.

Fix a broken Spotlight on external hard drive

Monday, March 24th, 2008

Recently, my OS X Leopard system ceased showing to me all the important files on my external hard drive in a spotlight search. A general Spotlight reset did not help, as it only reindexed the system hard drive.

Luckily, you can manually rebuild the index via terminal:

sudo mdutil -E /Volumes/[Drive Name]

Here is links to the Apple manual pages for
mdutil and mdimport

By mdimport you can manually add information on new files and directories to your Spotlight index.