Tag: osx


OSX Yosemite – Closing random ports

Ever since upgrading to OS X Yosemite (currently version 10.10.1 (14B25)), I experienced networking issues. Sometimes some ports were closed, meaning that various services did not work as expected (Mail, Evernote, etc). Not only that, ports could sometimes also be inaccessible on my local machine which is tough when you’re trying to develop web applications on that machine. And yeah, I truly mean ‘sometimes’. Other times it would just work well. The one work-around that I found was to switch the WiFi spot frequently which made ports accessible on remote machines as well as my local one which didn’t seem to make any sense.

I figured it must have been some kind of firewall and dug around there. OS X has shipped several firewalls over the last decade and I had a look into every single one of them. But nothing helped. On a random hunch, I went to my WiFi Settings and toggled the option “Auto Proxy Discovery” – and off went the bad spell that was on my machine. I can finally access all ports locally and externally. Who would’ve figured…

Seemingly harmless culprit

Comment » | articles

Make Apple CMD/Command key an additional CTRL/Control key in X11

If you want to use shortcuts in Linux/X11 as you are used to in OSX, you can configure X11 to use the CMD key as an additional CTRL key. Your muscle memory of CMD+c, CMD+s, CMD+v will not betray you anymore, then.

Since Linux is highly configurable, we can just tamper with the keymap.

1. Create a file ~/.Xmodmap

! clear CMD of it's regular task, whatever that might be
clear mod4

! configure CTRL and CMD to act as left Control
keycode 133 = Control_L NoSymbol Control_L
keycode 37 = Control_L NoSymbol Control_L

! use CTRL and CMD to act as left Control
add control = Control_L

Note: This works for my Macbook Pro (early 2011) with US layout. Your machine may use different keycodes. You can find out easily which is your CMD key, though. Just look for “Super_L” in your current keymap.

➜  ~  xmodmap -pke | grep Super_L
keycode 133 = Super_L NoSymbol Super_L

2. Load keymap patch

xmodmap ~/.Xmodmap

3. Autoloading

When this works for you (try copy/pasting/saving), then make sure to autoload .Xmodmap on start of X11. I do that using my window manager I3, but you also might add something similar to .xinitrc or .xsession

echo "exec xmodmap ~/.Xmodmap &" >> .i3/config

Comment » | articles