Showing posts with label snow leopard. Show all posts
Showing posts with label snow leopard. Show all posts

Tuesday, April 12, 2016

Mutt Integration With Abook in Mac OS X

This post assume that you already have Mutt running on your Mac OS X.

I choose Abook to manage my address book because it's very simple and suitable for my need.

If you don't have Abook yet, you can install it. I'm using MacPorts, so just execute this command:
$ sudo port install abook

And then, add these lines to your .muttrc config file:
set query_command = "abook --mutt-query '%s'"macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook" 
A little explanation for above script:
1. set query_command (pressing ctrl-t) on Mutt - Compose view, will execute abook to look for match address based on the few letter(s) you already type in.
2. pressing ctrl-a on Mutt, will execute abook to input manually
3. pressing shift-a (or A capital) on Mutt - Index view, will add the sender from any highlight email

Just save your .muttrc and reload the config on Mutt, and you're good to go :)

*full reference see here

Tuesday, October 8, 2013

Run X Applications Over Network Using SSH

Topology:
Linux-based PC: 192.168.1.1
Linux-based Laptop: 192.168.1.7

In PC, you edit /etc/ssh/sshd_config using any editor you like:
$ sudo vi /etc/ssh/sshd
Looking for this line, or you can add if it's not already there:
X11Forwarding     yes
Save that file and restart SSH service:
$ sudo /etc/init.d/ssh restart
Allow Laptop to run X applications:
$ xhost 192.168.1.7
Define default display:
$ export DISPLAY=192.168.1.1:0

Then from Laptop terminal, run the command to execute any X applications you like:
$ ssh -X [username]@192.168.1.1 firefox
$ ssh -X [username]@192.168.1.1 oowriter

That's it! :)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Thursday, October 13, 2011

BingMaps go forth and back to Google Maps

If you haven't know yet, there's an update for Google Maps on your webOS smartphone (Pre, Pixi, Veer), not to another version, but to BingMaps, which is the Maps apps pre-installed in TouchPad.

Like the HP Palm Blog says, you just open App Catalog and download Maps apps from there in order to update your Google Maps.

I did that myself, and not too long after that I decided to get my old Google Maps back. So I open up webOS doctor file and look for Maps application. With the help from #webos-internals on freenode, I found it under /usr/palm/applications in com.palm.app.maps folder. So I re-package it using IPK Packager from Jason Robbitaile.

After deleting Maps apps, I installing this file using webOS Quick Install (wOSQI), again from Jason, and I've got my Google Maps back :)

SSL Certificate Errors on MacOS X

Credit goes to loopkid, for I only put several parts that I used into my blogpost.

Last time I tried to wget a libnotifyperl.pl file from the web, I got this error:


The workaround is by installing curl-ca-bundle using MacPorts:
$ sudo port install curl-ca-bundle
Then, create .wgetrc file in your home directory:
$ vim ~/.wgetrc
And put this line:
CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt
That way, you don't need to include the path everytime you want to do a wget.


Friday, August 19, 2011

#webOS: How to remove EXT3FS partition

I assume you already tried to run UbuntuChroot on your #webOS device, and now you'd like to get back any space taken by EXT3FS. Here's simple thing you can do:
1. Connect your webOS device to your PC
2. Open up Terminal (Mac/ Linux) or Command Prompt (Windows), then type "novaterm"
3. And after you presented by your webOS device's root shell, run this command:
a. Unmount EXT3FS partition:
# umount /dev/mapper/store-ext3fs
b. Remove EXT3FS partition:
# lvremove /dev/mapper/store-ext3fs


4. Then run meta-doctor to re-assign all space to user's diskspace


Or, if you already do Meta-Doctor first, like I did :p , you can follow these steps:
1. Connect your webOS device to your PC
2. Open up Terminal (Mac/ Linux) or Command Prompt (Windows), then type "novaterm"
3. And after you presented by your webOS device's root shell, run this command:
a. Display LV size of EXT3FS partition, don't forget to write that down:
# lvdisplay /dev/mapper/store-ext3fs
b. Remove EXT3FS partition:
# lvremove /dev/mapper/store-ext3fs
c. Display existing user diskspace partition:
# df -kh

d. Unmount existing user diskspace partition:
# umount /dev/mapper/store-media
e. Resize existing user diskspace by adding size of previous EXT3FS partition:
I'm using /etc/fstab to see the filesystem of user's diskspace and /proc/partitions to see total allocation for user's diskspace:



# resizefat /dev/mapper/store-media 6995968K

And here's what you've got on user's diskspace after everything is done:


Enjoy! :)

Friday, July 8, 2011

How to Make MacPorts vim default in Mac OS X Terminal

If you, like I did, ever wanted to use vim with more option, e.g. support for python, or ruby.. then you have to re-compile vim in order to use it in your Mac OS X. You can compile from source, or using Macports like me. You can also view several daily used command for macports in my blogpost here.

First, you can check what version of vim you have by typing "vim" in your Terminal apps. Then, using macports, you just execute this command:
$ sudo port -v install vim +python
After finished, you can find that newest version of vim (compare to built-in version of vim), is located in: /opt/local/share/vim/ directory

Or you can find it using find command:
$ sudo find / -name "vim"
After that, you need to put the path into $PATH, because if you're not doing that, Terminal apps in Mac OS X will execute the default built-in vim. Also, you need to put it in the beginning of your path:
PATH=/opt/local/share:/opt/local/bin:/opt/local/sbin:$PATH
That's it. Close your Terminal window/ tab, and start a new one. Type "vim" on your shell, and you'll see that you already have the new version of vim. Enjoy! :)

Show hidden files in Mac OS X Finder

While accessing my #webOS device, there comes a time when I need to show hidden files. But you can't find anywhere in the menu, just like you did with Folder Properties in Windows operating system. All you have to do is simple, using Terminal apps. Here's what you have to do:

1. Open Terminal apps
2. Type this command:
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
And suddenly you'll find changes in your Finder. If you ever want to get the already-revealed hidden files to default, just type the same command as above and change TRUE to FALSE:
$ defaults write com.apple.finder AppleShowAllFiles FALSE
$ killall Finder


Tuesday, June 21, 2011

Using tcpdump in Mac OS X

This is just notes taken for personal use on which options used in tcpdump command:
# sudo tcpdump -i en0 -vvv -K -n -s 0 -w ~/Desktop/DumpFile.dmp

or without -K option:
# sudo tcpdump -i en0 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp
If you want to stop it from capturing, just press control-c. And to view the file:
# sudo tcpdump -s 0 -n -e -x -vvv -r ~/Desktop/DumpFile.dmp

Here's options explanation using in command above:
-i     interface
-vvv     even more verbose output
-K     don't attempt to verify TCP, UDP and IP checksums
-n     don't convert addressed to names
-s     snaplen settings. setting snaplen to 0 means use the required length to catch whole packets
-w     write the raw packets to file rather than parsing and printing them out
-x     when parsing and printing, in addition to printing header of each packet, print the data of each packet (minus its link level header) in hex
-r     read packets from file

Tuesday, June 14, 2011

Running Winbox in Snow Leopard

My everyday work are sometime using winbox to configure and manage routerboard device which running MikroTik OS, while using MacBook Pro, I need to prepare the environment since winbox are meant to be run on Windows environment. I can use either Darwine or wine package from macports, and I chose to use macports, since I'm more used to CLI environment.

All you need to do is:
1. choose the package according to Mac OS X version, download and install from here
2. for snow leopard (64-bit), you should install wine-devel instead of wine package, and add +universal
#  sudo port -v install wine-devel +universal

3. then you should be able to run winbox.exe from terminal
# /opt/local/bin/wine winbox.exe

4. you can also download this package, put it in your Applications and just double-click to run it

For complete references on other Mac OS X version, see here

Wednesday, June 8, 2011

Hardcoded .srt Subtitle Into A Video Files in Mac OS X

The situation is like this, I have a bunch of download movie (in .avi format) and .srt (subtitles) files along with all of those movie files. Since I don't have much time to watch the movies in my Mac/ PC or player, I want to keep it in my Palm Pre, so I can play it any moment I have some times (while waiting, perhaps). But since video player in Palm Pre doesn't support displaying .srt file while playing the video files, I have to convert it and hardcoded the .srt file so it could "attach" to the converted video files (.mp4 or .m4v, the same format that can be played in iPhone's or Palm Pre's video player).

Here's what you need:
1. Perian (go here to download and install if you haven't already installed it)
2. Quick Time (already installed in any Mac OS X)
3. .avi and .srt files (of course! :D )

And here's what you've got to do:
1. Install Perian
2. Go to System Preferences, open up the Perian and make sure you check "Load External Subtitles" on Subtitle Options section
3. Launch Quick Time and open up .avi file
4. If it plays well and your subtitle can show up then Perian works well
5. File - Save as.. and you can choose the directory where to save the file and file format



6. I choose iPhone format, so it saved as .m4v file
7. Done :)

Friday, May 27, 2011

Accesing #webOS Device via WiFi using SFTP Client

I'm using this because I'm tired of connecting USB cable everytime I want to copy files between my Palm Pre and my MacBookPro. Actually there's only 5 simple steps to follow:

  1. Install Preware
  2. Use Preware to install SFTP and terminal application
  3. Use terminal application to generate keys for OpenSSH
  4. Transfer SSH keys to desktop via USB
  5. Configure SFTP client (I'm using Cyberduck on Mac OS X) on desktop and connect
1. Install Preware
You can see here for complete reference

2. Using Preware to install SFTP and Terminal application
Still, you can refer to previous link for usage guide. FYI, I'm using SDL Terminal, other options is Terminal and Terminus

3. Use terminal application to generate keys for openSSH
I just did these steps:
# cd /
# /opt/bin/ssh-keygen (press Enter key once to accept default filename, then Enter key twice for blank password)
# mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys

Or you can read from wiki here

4. Transfer SSH keys to desktop via USB
First, run this command:
# mv /home/root/.ssh/id_rsa /media/internal/

Then connect your Pre to your desktop station via USB cable, and put it in Drive mode. Copy and save id_rsa file you've just copied to any safe place in your desktop station

5. Configure SFTP client on desktop and connect
First,you need to know your IP address on your Pre. Open Wifi and tap on current Wifi connection (SSID) to view the IP address.
Then, open your SFTP client. Since I'm using Cyberduck, for now I'm just explaining about how to use it on Cyberduck only. But, actually the steps are very similar on any SFTP client. 
1. Click on Open Connection
2. Choose SFTP (SSH File Transfer Protocol).
3. Fill in username: root
4. Leave the password blank
5. More options -> check "Use Public Key Autentication"
6. Click Connect

Just wait and see :D

Monday, May 23, 2011

Workaround to Run SPSS 17 on Snow Leopard

You have to installed Leopard version of  JRE 1.5, like I post in previous blog post before doing these steps. After installing SPSS 17 and JRE 1.5 on Snow Leopard, open edit 2 files system:

1.  /Applications/SPSSInc/Statistics17/SPSSStatistics17.0.app/Contents/bin/jvmcfg.ini
# vim /Applications/SPSSInc/Statistics17/SPSSStatistics17.0.app/Contents/bin/jvmcfg.ini
Comment this line (put semicolon in front of this line):
jvm_lib_path1=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/
and add this line (to change the previous commented line):
jvm_lib_path1=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Libraries/
2. /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist


# sudo vim  /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist
Find this line:
"com.spss.SPSSStatistics.17.0"
"17.1"
and change 17.1 to 17.0
That's all you need to do.  This workaround makes me run SPSS 17 smoothly on my MacBook Pro :)

Sunday, May 22, 2011

Installing JRE1.5 on Snow Leopard

This JRE workaround was I did to make SPSS 17 runs well on Snow Leopard, in order to make things clearer, I divide those 2 things and put each of them on separate blog post. So let's get started! :)


Just follow this simple steps, and in the end you'll get JRE1.5 installed. Please keep in mind that this steps will not remove JRE1.6, but add the option to choose with JRE you'd like to use. First you can go to Finder -> Utilities -> Java Preferences, and check to make sure you only have Java SE 6 there (32-bit and 64-bit version). If you already have J2SE 5.0 (32-bit and 64-bit), just move 32-bit version to top of the list and you're done. No need to follow these steps below :D


1. Check your current version of JRE installed:
# java -version
2. change directory to home directory
# cd ~/
3. retrieve JRE version for Leopard (OS X 10.5.x)
# curl -o java.1.5.0-leopard.tar.gz http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
4. extract the file you just downloaded

# tar -xvzf java.1.5.0-leopard.tar.gz
5. remove existing 1.5 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5
6. remove existing 1.5.0 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
7. move current extracted JRE1.5 for Leopard to existing System directory

# sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
8. make link from currently moved folder to previously removed file

# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5
9. same usage as no. 8
# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
And after you done with all 9 steps above, just go to Finder -> Utilities -> Java Preferences.



There you'll see additional J2SE 5.0 (32-bit and 64-bit), move J2SE 5.0 32-bit version to top of the list, close the preferences, then go back to Terminal apps to execute this command:
# java -version
Notice the differences? You'll now get the "java version 1.5.0_19" (in my MacBook Pro). And you're done :)

Friday, May 20, 2011

Jailbreaking FU iOS Device

I put the title, so I am aware that what I'm about to write here works on almost any iOS device (which I already tried the same way for iPhone 3G/s and 1st generation of iPad). After reading on several blogs, and tried it on my iOS device myself, I choose the method using redsn0w. All you need to do first is make sure that newest update iOS version already been able to jailbreak, and all requirement files are downloaded and ready to use.

Actually you only need 2 files, redsn0w (mac and/or windows) and .ipsw files according to which version of iOS device you want to jailbreak. After you get those two files, execute redsn0w, choose the .ipsw files, check only at "Install Cydia", then just follow onscreen instruction at redsn0w window. That's it! :) And after rebooted, you'll find Cydia icon in your launcher.

Here are some of the snapshot I took, when jailbreak iPhone 3G:




Tuesday, April 12, 2011

Running iDroid Using BootLace

Although many people thinks that installing Android on iPhone is tedious and very geeky, it's not anymore because Nick Dawson's BootLace has simplified the whole process. Just a few tap, you'll find iDroid installed. But in order to do this, you have to jailbreak your device. Here are the steps you can follow:
1. Run Cydia
2. Add http://repo.neonkoala.co.uk as a new Sources in Cydia
3. Install BootLace
4. Run BootLace
5. Install OpeniBoot (This apps is some kind of bootloader to choose between iOS and iDroid on boot up)
6. Install iDroid

Already tried this on my iPhone 3G and success :) Here are several pics:
installing iDroid

"This will reboot your device into Android immediately. Are you sure?"

booting...

Android logo while booting...

iDroid logo

home launcher

menu icons

about this phone

virtual keyboard while typing

Apache MySQL PHP on Mac OS X Snow Leopard

In Mac OS X, you already have built-in Apache web server and you only need to activate it by going to System Preferences -> Sharing -> then check the "Web Sharing". That's it! And you already have your web server running. Just check it by typing "http://localhost" or "http://localhost/~yourusername" in your web browser.

PHP
After that, you can open Terminal and open /private/etc/apache2/httpd.conf file and uncomment this line:
LoadModule php5_module           libexec/apache2/libphp5.so
 then restart Apache service by uncheck - recheck Web Sharing in System Preferences

MySQL
1. Download package from here
2. Install everything: mysql, startup item, preference pane
3. Start MySQL in Preference Pane

Do the following to fix some stuffs:
$ cd /etc
$ sudo cp php.ini.default php.ini
$ sudo chmod 666 php.ini
In php.ini file, edit following:
1. uncomment this line and insert TimeZone:
date.timezone =Asia/Jakarta
2. find all three occurences of /var/mysql/mysql.sock and change to /tmp/mysql.sock
pdo_mysql.default_socket = /tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock
3. change this line from "Off" to "On"
short_open_tag = On
Restart Apache service by uncheck - recheck Web Sharing in System Preferences