tags:

views:

3390

answers:

4

I'm trying to have the same KDE Konsole experience within Mac OS X.

Here's my (overly complicated?) setup:

  • I have Control and Command swapped at the System Preferences level. (Can't live without this)
  • Parallels lets you, at the Parallels application level, also reverse Control and Command. So I can undo the System Preferences setting (and get the setup I want within virtual Linux)

I want this same per-application-opt-out for the Mac OS X Terminal app. Is it possible?

A: 

Swapping Control and Command at the system level should already swap it in Terminal. Do you want to opt out of the system swapping?

Ben Stiglitz
+2  A: 

You can simply ssh into the Linux/Unix system and run X11 programs direct to your Mac screen: ssh -X user@host_or_ipaddress, login, and just run the X11 programs you want (e.g. emacs&) and the X11 apps will appear on the Mac display.

Pros:

  • X11 windows work just like any other window, including Exposé goodness, etc...
  • No need to work only inside the Parallels console window
  • Same solution works with any Linux/Unix system, remote or virtual
  • ssh connection is secure even over the internet

Tech info:

  • "ssh -X" turns on X11 forwarding for the ssh connection, i.e. the X11 display connection is tunneled through ssh securely
  • "ssh -X" also handles X11 authentication tunneling
  • X11.app is automagically started on OSX by launchd when needed
  • X11 can connect to displays over the network, which is one of the few cool things about it ;-)
haa
A: 

@Ben: yeah, the system swapping gives a natural experience for almost all apps, however it messes up the terminal.app. Is there a way to opt out for terminal.app?

Mickey
A: 

You can customize the command keys used for an individual application in System Preferences > Keyboard & Mouse > Keyboard Shortcuts. I think (if I understand correctly what you're trying to do) that this might allow you to accomplish your goal. You could remap all of Terminal's command keys to use control instead of command, to get them out of your way... but then you might need to do a lot of customization on the machines you ssh into, so that they use Command instead of control

It seems that you're going to have to do an ENORMOUS amount of work just to allow you to use your pinky instead of your thumb for the modifier key.

Another possibility: user preferences can be manipulated by the "defaults" command. I haven't been able to find a way to use this to control they modifier key mappings, but it should logically be possible (if you're willing to do a lot of digging). If so, then you could write short scripts to switch back and forth between Mac default and your swapped mode. Trigger the scripts with Quicksilver, and whenever you use Terminal you can call one script, and whenever you leave it you can call another. Again, a big pain to achieve what you want, but it might be possible.

I don't think there's a clean and simple solution.

I've seen third-party programs that give more control over manipulating modifier keys, if you're willing to install them (probably kernel extensions). They might be able to do what you want, but I don't recall the names. If you google for programs to fix emacs and vi keys you might find them.

Good luck.