I recently got a new harddrive, SSD!!!! So I made the decision to wipe the slate and did a clean install. But as always not every thing worked as before, as always. One of the most annoying things was that Alt + left arrow did not jump one word to the left and vide versa for Alt + right arrow. This is OSX default behaviour, on Linux it is Ctrl + arrow keys.
Anyway, to solve this you need to change what iTerm sends when you hit the key combination. Quickest way is to change set keys shortcuts for the default profile to "xterm Defaults"
Next you need to set the correct key bindings in your .inputrc, .bashrc etc. The file depends on how you set up your system. I cannot remember what file is standard on OSX, but i have my config stuff in a .bash_profile to avoid polluting the system more the needed. So i put the following two lines in my .bash_profile
bind '"\033[1;9D": backward-word'
bind '"\033[1;9C": forward-word'
Reload your config file or open a new terminal and I have Alt + arrow keys back working.
Have a look at http://superuser.com/questions/357355/how-can-i-get-controlleft-arrow-to-go-back-one-word-in-iterm2 also.
Tuesday, December 22, 2015
Wednesday, August 12, 2015
Spotify web player keyboard shortcuts
It seems that the keyboard shortcuts for the Spotify web player are different based on OS and browser!!! And it looks like they tend to change a bit over time!! Thank you Spotify.
These work on OSX with Chrome (I am on a danish keyboard, not sure if this have anything to say)
Space - Play/Pause
Shift+Right arrow - Next track
Shift+Left arrow - Previous track
Shift+Ctrl+Right arrow - Forward in track approx. 15 sec
Shift+Ctrl+Right arrow - Backwards in track approx. 15 sec
Ctrl+Alt+s - Open search
Ctrl+Alt+Up arrow - Increase volume (not above system volume)
Ctrl+Alt+Down arrow - Decrease volume
Any I missed??
UPDATE
You need to have focus i the actual player for the shortcuts to work. So you need to click in the right side player for the keyboard shortcuts to work.Tuesday, April 1, 2014
No DNS search domain for SSH after Mavericks upgrade
I often access a lot of server via SSH that all resides on the same domain. So I have set up a the as a search domain. Since I am on OSX I have do do this via the Network preference GUI. To add a search domain edit the connection, hit the DNS tab and a the domain you want to autocomplete from. This will add the search domain to your resolve.conf, that is automatically generated on OSX. If you are on other *NIX systems, just edit your resolve.conf and add
search example.org
This will, after reload, enable you to ssh to a host under the search domain without specifying the full hostname, ie.
$ ssh root@host
will try to connect to host.example.org.
For some reason this does not work out of the box on OSX after the Lion release. And it was again broken after I upgraded to Mavericks. Apparently the search domain is not used. Thank to Google I found this which helped my resolve the problem.
To fix the problem edit /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist and add the following key
<string>-AlwaysAppendSearchDomains</string>
to the array under ProgramArguments. After a restart of the DNS service by doing
$ sudo launchctl unload -w System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
SSH should complete hostnames from the search domain.
search example.org
This will, after reload, enable you to ssh to a host under the search domain without specifying the full hostname, ie.
$ ssh root@host
will try to connect to host.example.org.
For some reason this does not work out of the box on OSX after the Lion release. And it was again broken after I upgraded to Mavericks. Apparently the search domain is not used. Thank to Google I found this which helped my resolve the problem.
To fix the problem edit /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist and add the following key
<string>-AlwaysAppendSearchDomains</string>
to the array under ProgramArguments. After a restart of the DNS service by doing
$ sudo launchctl unload -w System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
SSH should complete hostnames from the search domain.
Friday, November 15, 2013
Magic screen on the wall, who is the fairest one of all?
Just wanted to share a very old article I stumbled upon a few day ago. It is a small into to GNU screen and can be found here http://www.linuxjournal.com/article/6340.
Like many other vannabe *unix natives I have being using screen on and off for different tasks, but not very efficiently. Basically I just used it to launch a process and then Ctrl-A+D to detach and get back later with screen -r. Just recently discovered that screen is a very power full tool for doing your every day work.
Now the first thing I do when opening my laptop is "still" to open Chrome but the second thing I do now is to type screen in my terminal and hence spawning windows within screen with all the stuff I need. But in order to work efficiently with screen you need to know the basics of navigating between windows, copy-paste and so forth. All this a more is covered very nicely in the article above.
Like many other vannabe *unix natives I have being using screen on and off for different tasks, but not very efficiently. Basically I just used it to launch a process and then Ctrl-A+D to detach and get back later with screen -r. Just recently discovered that screen is a very power full tool for doing your every day work.
Now the first thing I do when opening my laptop is "still" to open Chrome but the second thing I do now is to type screen in my terminal and hence spawning windows within screen with all the stuff I need. But in order to work efficiently with screen you need to know the basics of navigating between windows, copy-paste and so forth. All this a more is covered very nicely in the article above.
Friday, September 20, 2013
Disk space not used, but not free. Where did it go...
I recently pulled out almost all of my hair, searching for lost disk space on a Ubuntu box.
"df" showed that almost all space on disk was used, but i was not able for find the files taking up all the space. Of course I went through all the usual suspects (http://ubuntuforums.org/showthread.php?t=1122670), but in the end cause was very simple and yet not obvious.
Side story; the box runs a installation of MySQL that had been mangled when trying to import a database from another box. The MySQL files had been deleted, but I forgot to shutdown the MySQL daemon. So all files used by MySQL was still held by MySQL. This led to disk space being used, but not found when searching for files. the trick to discover the used space was the following:
lsof | grep "deleted"
I know it is a obvious error, but I use a few hours to find this.So heres the tip for you.
"df" showed that almost all space on disk was used, but i was not able for find the files taking up all the space. Of course I went through all the usual suspects (http://ubuntuforums.org/showthread.php?t=1122670), but in the end cause was very simple and yet not obvious.
Side story; the box runs a installation of MySQL that had been mangled when trying to import a database from another box. The MySQL files had been deleted, but I forgot to shutdown the MySQL daemon. So all files used by MySQL was still held by MySQL. This led to disk space being used, but not found when searching for files. the trick to discover the used space was the following:
lsof | grep "deleted"
I know it is a obvious error, but I use a few hours to find this.So heres the tip for you.
Subscribe to:
Posts (Atom)
