<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7696139615994864209</id><updated>2011-09-12T13:59:23.678+02:00</updated><category term='Struts'/><category term='Ubuntu'/><category term='IntelliJ IDEA'/><category term='Log4J'/><category term='Java'/><category term='OSX'/><category term='Maven'/><category term='Regular Expressions'/><category term='ExtJS'/><category term='Eclipse'/><title type='text'>doma</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-2109329471809077991</id><published>2010-03-05T00:19:00.007+01:00</published><updated>2010-03-16T16:47:06.886+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Make Ubuntu look like OSX</title><content type='html'>&lt;h3&gt;Installing the Aurora Leopard BSM Theme&lt;/h3&gt;The &lt;a href="http://gnome-look.org/content/show.php/Aurora+Leopard+BSM?content=92131"&gt;Aurora Leopard BSM Theme&lt;/a&gt; provides a beautiful, minimalistic appearance to Ubuntu. This is how it looks like:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/S4-fNoSb9BI/AAAAAAAADwY/BpEnUUKp5gI/s1600-h/ubuntu-post-installation-aurora-sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/S4-fNoSb9BI/AAAAAAAADwY/BpEnUUKp5gI/s320/ubuntu-post-installation-aurora-sample.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;First we have to install the GTK engine. The steps to take:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo aptitude install build-essential libgtk2.0-dev&lt;br /&gt;wget http://gnome-look.org/CONTENT/content-files/56438-aurora-1.5.1.tar.bz2&lt;br /&gt;tar -xvjf 56438-aurora-1.5.1.tar.bz2&lt;br /&gt;tar xvzf aurora-gtk-engine-1.5.tar.gz&lt;br /&gt;cd aurora-1.5&lt;br /&gt;./configure --prefix=/usr --enable-animation&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we can install the theme, by downloading it from &lt;a href="http://gnome-look.org/CONTENT/content-files/92131-Aurora%20Leopard%20BSM.tar.gz"&gt;here&lt;/a&gt;. Save it to the desktop, then open System-&amp;gt;Preferences-&amp;gt;Appearance, and drag&amp;amp;drop the downloaded file to this window. Ubuntu will install the theme for us.&lt;br /&gt;&lt;br /&gt;Looks a bit like OSX? Indeed it does. To go one step further,&amp;nbsp; we can change the order of the buttons too (this is a copy from &lt;a href="http://gnome-look.org/content/show.php/Aurora+Leopard+BSM?content=92131"&gt;here&lt;/a&gt;):&lt;br /&gt;1 - Press "Alt + F2"&lt;br /&gt;2 - Type "gconf-editor" and press "Enter"&lt;br /&gt;3 - Browse to "Apps -&amp;gt; metacity -&amp;gt; general"&lt;br /&gt;4 - On right panel, double click on "button_layout"&lt;br /&gt;5 - Change the value to "close,minimize,maximize:menu"&lt;br /&gt;6 - Press "OK"&lt;br /&gt;&lt;br /&gt;Now we have the chance to install their icon-libraries. I ended up using a built-in icon library instead. This is how it looks like:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/S4-icmXj3HI/AAAAAAAADwg/Eb-qZNE8zAc/s1600-h/ubuntu-post-installation-hacks-gnome-human-icons.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="257" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/S4-icmXj3HI/AAAAAAAADwg/Eb-qZNE8zAc/s400/ubuntu-post-installation-hacks-gnome-human-icons.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;To install it:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo apt-get install gnome-human-icon-theme&lt;/pre&gt;&lt;br /&gt;Now if you click "Customize" under System-&amp;gt;Preferences-&amp;gt;Appearance-&amp;gt;Aurora Leopard BSM, under the Icons tab you'll find GNOME-Human.&lt;br /&gt;&lt;br /&gt;One more thing. You can use the (already enabled by default) desktop effects if you like, but after a while it can become disturbing, so I usually disable it under System-&amp;gt;Preferences-&amp;gt;Appearance-&amp;gt;Visual Effects (not to mention that Desktop Effects still have some compatibilty issues, if I'm not mistaken Google Earth didn't like it).&lt;br /&gt;&lt;br /&gt;Still, compositing makes the user-interface snappier; if you go back to gconf-editor, at the same place where you've had the button_layout (apps-&amp;gt;metacity-&amp;gt;general), you can enable the compositing_manager by checking it. This is the setting I've found the most performing; let me know if you think otherwise or if you've found some other hacks! &lt;br /&gt;&lt;br /&gt;Hope you like it! Cheers!&lt;br /&gt;Lajos&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0071613749" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470082933" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470467010" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1440478295" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0137021186" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-2109329471809077991?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/2109329471809077991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2010/03/make-ubuntu-look-like-osx.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/2109329471809077991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/2109329471809077991'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2010/03/make-ubuntu-look-like-osx.html' title='Make Ubuntu look like OSX'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eJmj5QN0w1M/S4-fNoSb9BI/AAAAAAAADwY/BpEnUUKp5gI/s72-c/ubuntu-post-installation-aurora-sample.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-7670450455161622961</id><published>2010-03-04T12:54:00.006+01:00</published><updated>2010-03-05T00:19:58.880+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu post-installation tasks</title><content type='html'>After the installation is done, some additional steps must be taken to have a nicely configured system. Just for the record, I'll collect here all the steps I've followed with a brand-new Ubuntu installation.&lt;br /&gt;&lt;h3&gt;64 bit Flash-player&lt;/h3&gt;Like it or not, flash is a must these days. We keep on receiving youtube-links from friends, etc. Still, if you install through Synaptic, you'll get the 32bit version, which will grab all the 32bit libraries. No good - and the 64bit version feels much more solid. So let's install the 64bit version.&lt;br /&gt;&lt;br /&gt;I followed more or less &lt;a href="http://nxadm.wordpress.com/2009/04/26/install-64-bit-adobe-flash-player-on-ubuntu-904/"&gt;this&lt;/a&gt; post; for the record here are the steps I've taken in Terminal:&lt;br /&gt;&lt;pre&gt;wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz&lt;br /&gt;tar xvzf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz&lt;br /&gt;mkdir -p ~/.mozilla/plugins&lt;br /&gt;mv libflashplayer.so ~/.mozilla/plugins/&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://www.youtube.com/"&gt;Youtube&lt;/a&gt; works like a charm after.&lt;br /&gt;&lt;h3&gt;64 bit Skype&lt;/h3&gt;Easy. Just download the 64bit version from &lt;a href="http://www.skype.com/go/getskype-linux-beta-ubuntu-64"&gt;here&lt;/a&gt;. Double-click the downloaded .deb file, which opens Package Installer. Click Install and voila. &lt;br /&gt;&lt;br /&gt;Now is a good time to call the beautiful lady at Skype Call Testing Service, hopefully she's there - if you can't here your own voice, &lt;a href="http://lajosd.blogspot.com/2009/11/skype-on-ubuntu-no-microphone.html"&gt;check if the microphone is your default input device&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I didn't find the 64bit version in any official ubuntu repositories, so had to go away with the .deb file: this means Skype will have to be updated manually from the Skype website if a new version is released. If you found a repo, let us know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-7670450455161622961?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/7670450455161622961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2010/03/ubuntu-post-installation-tasks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7670450455161622961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7670450455161622961'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2010/03/ubuntu-post-installation-tasks.html' title='Ubuntu post-installation tasks'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-3645836778649719507</id><published>2010-03-03T19:51:00.011+01:00</published><updated>2010-09-28T11:32:06.345+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Configuring Ubuntu to mount a shared HFS partition</title><content type='html'>If you have followed along the earlier series of this article, you may have already met one of the limitations of Ubuntu's HFS support: it can't write journaled HFS volumes. Thus, it makes sense to partition the drives with non-case-sensitive and non-journaled HFS where there is a need to read/write. You can also &lt;a href="http://support.apple.com/kb/HT2355"&gt;manually disable journaling&lt;/a&gt; if you already finished partitioning and you've had the journaled option turned on.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f0f0f0; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;A decision to take: move the home folder, or make symbolic links?&lt;/b&gt;&lt;br /&gt;In earlier iterations of my dual-boot configurations, I had my OSX home folder moved to the shared partition. This works quite well, at least up to the point when the system starts up after a "dirty shutdown" when the regular shutdown procedure was not executed properly: like when the computer was frozen and was killed with the power switch (or facing a power-outage on an iMac, or running out of battery on macbooks). In these cases, a disk-check was performed during startup, but since the check can't finish until the computer boots up (and OSX does not wait for the check to finish, rendering the shared volume inaccessible temporarly), we may face an empty home-folder after a dirty shutdown (so you'll face a brand-new configuration, like you have just finished installation, since it uses the unmounted /Users/username folder). This can be fixed by a logout-login, nevertheless it is not nice.&lt;br /&gt;&lt;br /&gt;Not to mention if we do the same with Ubuntu: if the home folder is moved to the shared partition and the partition is dirty on boot-up, it will be read-only; if I'm not mistaken this has resulted being not able to login to the system at all. This sounds really bad, so in my experience the best option is to leave the home folders where they are (e.g. Ubuntu will have its' home folder on the EXT3 drive, OSX on the HFS drive), and we'll make symbolic links to the documents, pictures, videos folders on the shared partition. Until we keep our documents where they belong, they will be on the shared drive.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Mounting an HFS volume on Ubuntu&lt;/h3&gt;There are two ways to identify a partition to mount on linux: either by the device's name (like /dev/sda1) or by its &lt;a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier"&gt;UUID&lt;/a&gt;, which is just a random number. The UUID option is better, since a partition will be identified even if its' name changes (like when the number of partitions changes on a drive: /dev/sda3 won't be /dev/sda3 anymore as soon as we remove /dev/sda1 and /dev/sda2).&lt;br /&gt;&lt;br /&gt;To see some information about your partitions, you can use the command &lt;a href="http://manpages.courier-mta.org/htmlman8/blkid.8.html"&gt;blkid&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/S46g-ITsFCI/AAAAAAAADwI/HH9Rm_4biQs/s1600-h/ubuntu-osx-5-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/S46g-ITsFCI/AAAAAAAADwI/HH9Rm_4biQs/s400/ubuntu-osx-5-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In this screenshot (don't let yourself fooled by the appearance, this is Ubuntu having a &lt;a href="http://gnome-look.org/content/show.php/Aurora+Leopard+BSM?content=92131"&gt;nice gnome-theme applied&lt;/a&gt;, thus looks a bit like OSX, pretty neat huh? See &lt;a href="http://lajosd.blogspot.com/2010/03/ubuntu-post-installation-tasks.html"&gt;here&lt;/a&gt; how to install it) it is apparent that I have four partitions, and I will have to mount the last one. I will mount /dev/sda4. Yours can be different, so double-check.&lt;br /&gt;&lt;br /&gt;To mount a partition, first we have to create the folder where it will be mounted. Open a terminal, and enter&lt;br /&gt;&lt;pre&gt;sudo mkdir /mnt/shared&lt;br /&gt;sudo chmod 777 /mnt/shared&lt;br /&gt;&lt;/pre&gt;Now we'll add an entry in &lt;a href="http://manpages.courier-mta.org/htmlman5/fstab.5.html"&gt;/etc/fstab&lt;/a&gt;. Press Alt+F2 to bring up the &lt;i&gt;Run Application&lt;/i&gt; dialog, and enter &lt;br /&gt;&lt;pre&gt;gksudo gedit /etc/fstab&lt;/pre&gt;&lt;br /&gt;Enter your password when it's been asked. This will bring up the contents of the fstab file in the text-editor using the proper rights to edit it (you can use &lt;i&gt;vi&lt;/i&gt; of course but then you won't need my assistance in any case...) Add a line to the end of this file:&lt;br /&gt;&lt;pre&gt;/dev/sda4 /mnt/shared       hfsplus    rw        0       2&lt;br /&gt;&lt;/pre&gt;Of course, replacing my /dev/sda4 with the correct entry if needed. Save the file &amp;amp; exit the editor.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f0f0f0; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Using UUIDs&lt;/b&gt;&lt;br /&gt;You could also use UUID to identify the partition; I don't know why, it didn't work for me. To acquire the UUID, copy the UUID from the blkid command (or, if you are using Jaunty you can use the &lt;i&gt;sudo vol_id /dev/sda4&lt;/i&gt; command too), and add the fstab line like this:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size: x-small;"&gt;UUID=aae739de-bfb8-39d6-b60a-a6e47222e74a /mnt/shared       hfsplus    rw        0       2&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size: x-small;"&gt;Somehow, even though it worked the first time, it didn't work after a reboot, so I've had to fall back to the name. If you figured out the reason, please let us know! &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Now we have everything in place. If you reboot, this should mount automagically, but you can mount it right away by entering&lt;br /&gt;&lt;pre&gt;sudo mount -a&lt;/pre&gt;to a terminal-window. This mounts all filesystems mentioned in fstab - since all others are mounted anyway, ours will be mounted now. To see your mounted filesystems enter&lt;br /&gt;&lt;pre&gt;sudo mount&lt;/pre&gt;Hopefully your shared partition will be on the list. To shorten the list you can also use&lt;br /&gt;&lt;pre&gt;sudo mount | grep sda4&lt;/pre&gt;&lt;h3&gt;Preparing the shared partition&lt;/h3&gt;The shared partition will contain our documents, pictures, music, videos, etc. Now that we have our shared partition mounted, we can create symbolic links from our home folder, so that we don't have to navigate to the shared folder manually.&lt;br /&gt;&lt;br /&gt;First let's create the folder for our documents:&lt;br /&gt;&lt;pre&gt;mkdir /mnt/shared/doma&lt;br /&gt;mkdir /mnt/shared/doma/Documents&lt;/pre&gt;Don't forget to replace my name with yours of course. &lt;br /&gt;&lt;div style="background-color: #f0f0f0; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;sudo or not to sudo? Using multiple accounts&lt;/b&gt;&lt;br /&gt;We don't need sudo here, since we want to keep our credentials; by repeating this same process for another user using another name, his/her documents will be on the shared partition as well. Just don't forget to logout/login with the other user's account in this case.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Now just to be sure we don't lose anything, we can move all our may-be-existing documents already:&lt;br /&gt;&lt;pre&gt;mv ~/Documents/* /mnt/shared/doma/Documents&lt;/pre&gt;Now the Documents folder should be empty. We can verify it with&lt;br /&gt;&lt;pre&gt;ls ~/Documents&lt;/pre&gt;It should be empty. If it is, we are ready to create the symbolic link.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Creating the symbolic link&lt;/h3&gt;To create the symbolic link, enter&lt;br /&gt;&lt;pre&gt;ln -sf /mnt/shared/doma/Documents ~&lt;/pre&gt;in the terminal. &lt;i&gt;ln -s&lt;/i&gt; creates a symbolic link, the &lt;i&gt;f&lt;/i&gt; parameter replaces the Documents folder if it exists (it does). Even if it looks like (and we wouldn't have moved our documents earlier), it does not destroy anything under the old /home/doma/Documents: if we remove the link, the contents of the (now hidden) folder would reappear. But since we've been careful and moved everything out of the folder earlier, it is empty anyway.&lt;br /&gt;&lt;br /&gt;This same procedure can be repeated with the Pictures, Videos and other folders.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Moving the folders on OSX&lt;/h3&gt;In order to have a nice and clean system, we should move these folders in OSX as well. Thus, if we'll go to the Documents folder, both OSX and Ubuntu will go to the same folder.&lt;br /&gt;&lt;br /&gt;The procedure is quite similar to the previous one. Let's create a small shell-script which will help us:&lt;br /&gt;&lt;pre&gt;mkdir /Volumes/shared/doma/$1&lt;br /&gt;mv ~/$1/* /Volumes/shared/doma/$1 &amp;amp;&amp;amp; sudo rm -rf ~/$1&lt;br /&gt;ln -s /Volumes/shared/doma/$1 ~&lt;/pre&gt;Copy these lines to TextEdit, make it Plain Text (format menu) and save the file in your home folder using the name mv.sh - and don't forget to replace my name with yours! This shell-script automates all the necessary steps for OSX. We'll have to make it executable first with&lt;br /&gt;&lt;pre&gt;chmod +x mv.sh&lt;/pre&gt;Now we can execute it for all the folders we want to move. For the Documents folder, enter&lt;br /&gt;&lt;pre&gt;./mv.sh Documents&lt;/pre&gt;You can do the same with your Movies, Music, Pictures folder if you like - but take iTunes' and iPhoto's proprietary folder-structure into account, you'll see the details of their file-storage in Ubuntu (that's linux anyway and supposed to be lower level right?). In any case, you'll have access to your files - and if you use some other, possibly multi-platform tool to manage your pictures and music, you may end up having a quite usable multi-platform system.&lt;br /&gt;&lt;br /&gt;Drop a comment if it works for you, tell us how you've configured your system - and don't hesitate to ask if you have a question!&lt;br /&gt;&lt;br /&gt;Thanks for dropping by - see y'all next time!&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;amp;tag=dosbl05-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg" /&gt;&lt;/a&gt;&lt;img alt="" border="0" class=" liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv" height="1" src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0071613749" style="border: medium none ! important; margin: 0px ! important;" width="1" /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;amp;tag=dosbl05-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg" /&gt;&lt;/a&gt;&lt;img alt="" border="0" class=" liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv" height="1" src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470082933" style="border: medium none ! important; margin: 0px ! important;" width="1" /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;amp;tag=dosbl05-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg" /&gt;&lt;/a&gt;&lt;img alt="" border="0" class=" liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv" height="1" src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470467010" style="border: medium none ! important; margin: 0px ! important;" width="1" /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;amp;tag=dosbl05-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg" /&gt;&lt;/a&gt;&lt;img alt="" border="0" class=" liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv" height="1" src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1440478295" style="border: medium none ! important; margin: 0px ! important;" width="1" /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;amp;tag=dosbl05-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg" /&gt;&lt;/a&gt;&lt;img alt="" border="0" class=" liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv liiabszizjfmgjzwevpv" height="1" src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0137021186" style="border: medium none ! important; margin: 0px ! important;" width="1" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-3645836778649719507?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/3645836778649719507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2010/03/configuring-ubuntu-to-mount-shared-hfs.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/3645836778649719507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/3645836778649719507'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2010/03/configuring-ubuntu-to-mount-shared-hfs.html' title='Configuring Ubuntu to mount a shared HFS partition'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_eJmj5QN0w1M/S46g-ITsFCI/AAAAAAAADwI/HH9Rm_4biQs/s72-c/ubuntu-osx-5-1.png' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-7429322570610304057</id><published>2009-12-09T12:26:00.002+01:00</published><updated>2009-12-09T15:16:32.411+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Eclipse: quickly change perspectives with keyboard shortcuts</title><content type='html'>Perspectives offer a nice way to quickly adapt Eclipse to the kind of work we are doing; there is a perspective for development, debugging, etc. After using it a while, creating some keyboard-shortcuts helps a lot as well. At the end of this article, we'll have perspective-icons like these:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sx9-TejctSI/AAAAAAAACwU/YQ5fhPR7EKE/s1600-h/eclipse-workspace-icons.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sx9-TejctSI/AAAAAAAACwU/YQ5fhPR7EKE/s320/eclipse-workspace-icons.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Let's see what the buttons do:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JavaEE Perspective (Alt+1)&lt;br /&gt;&lt;/li&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sx9-uftr5NI/AAAAAAAACwc/9xQqfw7Esqo/s1600-h/eclipse-workspace-javaee.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sx9-uftr5NI/AAAAAAAACwc/9xQqfw7Esqo/s200/eclipse-workspace-javaee.PNG" /&gt;&lt;/a&gt;    &lt;/div&gt;&lt;ul&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sx-B5qOCroI/AAAAAAAACwk/eDN8wBkA8yo/s1600-h/eclipse-workspace-preferences-keys.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sx-B5qOCroI/AAAAAAAACwk/eDN8wBkA8yo/s200/eclipse-workspace-preferences-keys.PNG" /&gt;&lt;/a&gt;&lt;li&gt;In this perspective the Project Explorer (tree) is displayed on the left, on the right we have the code-editor window and the tool-windows benefiting from a wide display are on the bottom. The icon shows a tree, that's why it makes sense to use this perspective for the one displaying the tree.&lt;/li&gt;&lt;li&gt;To open this perspective, select &lt;i&gt;Window-&amp;gt;Open Perspective-&amp;gt;Other&lt;/i&gt;, and select &lt;i&gt;JavaEE&lt;/i&gt;. The defaults are almost right, we just have to either close the outline and task list view if we don't use it, or move them to the left (next to the Project Explorer) so that they won't occupy so much space.&lt;/li&gt;&lt;li&gt;&amp;nbsp;To attach it to Alt+1, press &lt;i&gt;Ctrl+Shift+L&lt;/i&gt; twice (this is a double-shortcut which on first press shows the available options in a tooltip, on a second press presents us the Preferences-&amp;gt;Key window); in &lt;i&gt;type filter text&lt;/i&gt; enter &lt;i&gt;java ee&lt;/i&gt;; click on &lt;i&gt;Show Perspective (Parameter Java EE)&lt;/i&gt; ; click &lt;i&gt;binding&lt;/i&gt;, then press the new bind-key &lt;i&gt;Alt+1&lt;/i&gt; and &lt;i&gt;Apply&lt;/i&gt; and &lt;i&gt;OK&lt;/i&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Java Perspective (Alt+2)&lt;/li&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sx-Ft1MOVwI/AAAAAAAACws/dvjGIaWpels/s1600-h/eclipse-workspace-java.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sx-Ft1MOVwI/AAAAAAAACws/dvjGIaWpels/s200/eclipse-workspace-java.PNG" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;ul&gt;&lt;li&gt;This one is very similar to the previous one, except that we don't have the tree displayed, which results in a much wider source-window (for developers fancying long lines...)&lt;/li&gt;&lt;li&gt;To open this perspective, select &lt;i&gt;Window-&amp;gt;Open Perspective-&amp;gt;Other&lt;/i&gt;, and select &lt;i&gt;Java (Default)&lt;/i&gt;. Let's close the &lt;i&gt;Outline /&lt;/i&gt; &lt;i&gt;Task List &lt;/i&gt;/ &lt;i&gt;Spring Explorer&lt;/i&gt; view as well as the &lt;i&gt;Package Explorer &lt;/i&gt;and &lt;i&gt;Hierarchy view.&lt;/i&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Attach the &lt;i&gt;Show Perspective (Parameter: Java)&lt;/i&gt; command to &lt;i&gt;Alt+2&lt;/i&gt;&lt;/li&gt;&lt;li&gt;This results in a very clean interface; we just have to get used to press &lt;i&gt;Alt+1&lt;/i&gt; to switch to the view we declared previously if we need the views we just closed. Just try pressing &lt;i&gt;Alt+1&lt;/i&gt; and &lt;i&gt;Alt+2&lt;/i&gt; repetitively a couple of times; you'll see easy it is to switch. In no time we get used to press &lt;i&gt;Alt+2&lt;/i&gt; when we need a "code-and-tool" like environment and &lt;i&gt;Alt+1&lt;/i&gt; when we want to browse around in the Package Explorer / Ant / etc views.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Debug Perspective (Alt+3)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;The debug-layout really depends on the developer, but the methology is similar. So open this perspective and customize it the way you want.&lt;/li&gt;&lt;li&gt;Attach it to &lt;i&gt;Alt+3.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Team Synchronizing Perspective (Alt+4)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Customize / attach key like earlier.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Database Development Perspective (Alt+5)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Customize / attach key like earlier.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;The last ones are really depending on your development workflow. A typical workflow using these shortcuts can be something like this:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find and Open the needed class or resource:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Alt+1&lt;/i&gt; for browsing in &lt;i&gt;Project Explorer&lt;/i&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Alt+2&lt;/i&gt; and press &lt;i&gt;Ctrl+Shift+R &lt;/i&gt;to quickly open the source-file/resource. Here the first couple of characters of the classname should be enough to type - or CaMeL case, e.g. if you want to open DeadLetterChannel, just enter DLC. Neat, huh? And highly addictive...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;After the modifications are done starting the debugger switches immediately to the Debug Perspective, but if the wide code-view is needed just press &lt;i&gt;Alt+2 &lt;/i&gt;(it's a real relief after the very-useful-but-so-crowded Debug perspective); and when you need something from the debugger tool windows, it's very easy to switch back to the Debug&amp;nbsp; Perspective with &lt;i&gt;Alt+3&lt;/i&gt;. Since the usual shortcuts like F5 (step into), F6 (step over) and F7 (step return) work in Java perspective as well, I usually find myself stepping thru the code there, and only when I arrive at the troublesome part, I switch to the Debug Perspective to see the watches, call stacks, etc.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;When everything is ready, debugged, etc, Alt+4 switches to the Synchronising Perspective to submit the changes to source-control.&lt;/li&gt;&lt;li&gt;After a rebuild on the development server, the Database perspective (Alt+5) can be used to interact with the database.&lt;/li&gt;&lt;/ul&gt;The order of the buttons on the top-right corner depends on the order we opened the perspectives; I usually order them the same way as my keyboard-shortcuts (e.g. the first one is JavaEE because Alt+1 activates it, etc); thus the mouse usage is coherent to the keyboard. The buttons can be easily re-ordered with the mouse by dragging them to their place (Note: the "Show Text" option is turned off on the screenshot on the top of this post)&lt;br /&gt;&lt;br /&gt;Comments and opinions are warmly welcome!&lt;br /&gt;How does your developer workflow look like?&lt;br /&gt;&lt;br /&gt;Thanks for reading and have a nice day!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-7429322570610304057?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/7429322570610304057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/12/eclipse-quickly-change-perspectives.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7429322570610304057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7429322570610304057'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/12/eclipse-quickly-change-perspectives.html' title='Eclipse: quickly change perspectives with keyboard shortcuts'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sx9-TejctSI/AAAAAAAACwU/YQ5fhPR7EKE/s72-c/eclipse-workspace-icons.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-280149136861572441</id><published>2009-11-27T00:03:00.016+01:00</published><updated>2009-12-14T22:46:46.549+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>AppFuse Struts2 Tutorial with Eclipse / SpringSource Tools Suite</title><content type='html'>Excerpt from AppFuse's website:&lt;br /&gt;&lt;br /&gt;&lt;div class="block"&gt;AppFuse is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently. It was originally developed to eliminate the ramp-up time found when building new web applications for customers. At its core, AppFuse is a project skeleton, similar to the one that's created by your IDE when you click through a wizard to create a new web project.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;AppFuse builds on Maven to accomplish its goal. AppFuse + Maven can be used command line, creating our application with just a single line; but here we will be using Eclipse.&lt;br /&gt;&lt;br /&gt;In this tutorial we'll go through the creation of a simple Struts2 web-application, which we'll extend later. We'll use&amp;nbsp;SpringSource Tools Suite 2.2.1 (STS)&amp;nbsp;which is a free tool based on Eclipse 3.5.1 with a pre-configured set of plugins useful for web-development. STS has the Maven2 plugin which we'll use to configure AppFuse for us.&lt;br /&gt;&lt;br /&gt;So, grab a copy of&amp;nbsp;SpringSource Tools&amp;nbsp;from &lt;a href="http://www.springsource.com/products/sts"&gt;http://www.springsource.com/products/sts&lt;/a&gt;. After the installation, select&amp;nbsp;File-&amp;gt;New-&amp;gt;Project...&amp;nbsp;Type maven, and click Next:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sw8VRifDSEI/AAAAAAAACuQ/pgg_IUX3Kmw/s1600/maven-struts-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sw8VRifDSEI/AAAAAAAACuQ/pgg_IUX3Kmw/s400/maven-struts-1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Leave "Use default Workspace location" checked and click Next.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sw79iLQJZzI/AAAAAAAACtQ/ZfmadohBzKg/s1600/maven-struts-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sw79iLQJZzI/AAAAAAAACtQ/ZfmadohBzKg/s400/maven-struts-2.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enter struts in the filter, and select struts2-archetype-starter. This is a so called "Maven Archetype", a ready-to-be-used project template built around the Project Object Model (POM), which will create a starter application for Apache Struts 2.0. Click Next.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sw7-JioDupI/AAAAAAAACtY/WtnMsiYGyww/s1600/maven-struts-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Sw7-JioDupI/AAAAAAAACtY/WtnMsiYGyww/s400/maven-struts-3.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now enter the following info:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Group Id:  org.techmissive&lt;/li&gt;&lt;li&gt;Artifact Id:  testdrive-struts&lt;/li&gt;&lt;li&gt;Version: 1.0.0&lt;/li&gt;&lt;li&gt;Package:  org.techmissive.testdrive.struts&lt;/li&gt;&lt;/ul&gt;And click "Finish":&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sw7-mcmZ8ZI/AAAAAAAACtg/8jS7ngOWqf0/s1600/maven-struts-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Sw7-mcmZ8ZI/AAAAAAAACtg/8jS7ngOWqf0/s400/maven-struts-4.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have created our template project. Now Eclipse (I mean STS of course) will start downloading all our dependencies, and build the project for us. On OSX, we can see directly the Maven-log; on Windows we have to open the Console view (Alt+Shift+Q then C), and click the down-arrow next to the &lt;i&gt;Open Console&lt;/i&gt; button on its toolbar (the window-like button left of the green lamp) and select Maven console to see what Maven is doing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw7_aZj-L-I/AAAAAAAACto/VBdoAtygvus/s1600/maven-struts-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw7_aZj-L-I/AAAAAAAACto/VBdoAtygvus/s400/maven-struts-5.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Included with this template is Jetty, a lightweight servlet container, which can be used to test our application locally without installing a full blown J2EE Server. Let's see how we can start it from STS.&lt;br /&gt;&lt;br /&gt;Select Run -&amp;gt; Run Configurations... from the Menu, here we'll specify what happens when we start our application. Select 'Maven Build' from the list, and click on the New icon on the top of the window to create a new configuration.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw8EU3HP3sI/AAAAAAAACtw/5Op-S1for9U/s1600/maven-struts-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw8EU3HP3sI/AAAAAAAACtw/5Op-S1for9U/s400/maven-struts-6.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To set the Base directory, click on &lt;i&gt;Browse Workspace&lt;/i&gt;. Now click on &lt;i&gt;testdrive-struts&lt;/i&gt; and OK. This sets ${workspace_loc:/testdrive-struts} in the Base directory field, which is a relative resolution from our workspace location.&lt;br /&gt;&lt;br /&gt;To run Jetty, we have to run a given goal, so enter &lt;i&gt;jetty:run-war&lt;/i&gt; in the goals field.&lt;br /&gt;&lt;br /&gt;Replace the &lt;i&gt;New_configuration&lt;/i&gt; default name with something more meaningful, like &lt;i&gt;Run Jetty.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw8F99rf5gI/AAAAAAAACt4/qc6-jZtpSvI/s1600/maven-struts-7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Sw8F99rf5gI/AAAAAAAACt4/qc6-jZtpSvI/s400/maven-struts-7.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click Apply to save, and Run to start the configuration we just created.&lt;br /&gt;&lt;br /&gt;Now Eclipse is working again, starts to download all kind of stuff. But in the end proudly confirms the successful starting of Jetty:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/Sw8G7g7V82I/AAAAAAAACuA/VMhRHrCaELA/s1600/maven-struts-8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/Sw8G7g7V82I/AAAAAAAACuA/VMhRHrCaELA/s400/maven-struts-8.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's test if it works. Jetty is listening by default on the port 8080, so let's start a browser and check what is there. Start Safari and enter&amp;nbsp;&lt;a href="http://localhost:8080/testdrive-struts" target="_blank"&gt;http://localhost:8080/testdrive-struts&lt;/a&gt; in the address field:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/Sw8H938UBpI/AAAAAAAACuI/zOMiu9eT7Zw/s1600/maven-struts-9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/Sw8H938UBpI/AAAAAAAACuI/zOMiu9eT7Zw/s400/maven-struts-9.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have a running Web-application and we didn't have to write a single line of code. This is the main purpose of AppFuse: to provide us a skeleton application we can start working on without hours of hunting for the libraries, configuring them, etc. I just wish all the profiles would work the first time like this one...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-280149136861572441?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/280149136861572441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/apache-struts2-test-drive-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/280149136861572441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/280149136861572441'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/apache-struts2-test-drive-with.html' title='AppFuse Struts2 Tutorial with Eclipse / SpringSource Tools Suite'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sw8VRifDSEI/AAAAAAAACuQ/pgg_IUX3Kmw/s72-c/maven-struts-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-1879898233815614610</id><published>2009-11-12T23:08:00.003+01:00</published><updated>2010-03-16T17:08:05.564+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Skype on Ubuntu:  No microphone on CM8738</title><content type='html'>I have just installed Ubuntu 9.10 "Karmic Koala" on a PC containing a &lt;i&gt;C-Media Electronics Inc CM8738&lt;/i&gt; sound-card. Quite oddly, although the microphone seemed to work thru &lt;i&gt;Application-&amp;gt;Sound &amp;amp; Video-&amp;gt;PulseAudio Volume Control&lt;/i&gt;, there was no playback from the Skype call testing service.&lt;br /&gt;&lt;br /&gt;Right clicking on the &lt;i&gt;Volume control icon&lt;/i&gt; -&amp;gt; &lt;i&gt;Sound Preferences&lt;/i&gt; -&amp;gt; &lt;i&gt;Input&lt;/i&gt; seemed also silent. After fooling around a bit I realized that I need to set the proper input device not in PulseAudio but in alsamixer. Typing &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;alsamixer&lt;/span&gt; in a terminal starts the mixer:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/SvyGMGUvsuI/AAAAAAAACsw/Ys8QInGTq6M/s1600-h/ubuntu-alsamixer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/SvyGMGUvsuI/AAAAAAAACsw/Ys8QInGTq6M/s320/ubuntu-alsamixer.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Press F4 to view the Capture controls, then the right arrow until you reach the microphone:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/SvyGkyJNJkI/AAAAAAAACs4/k97ubxsGzVk/s1600-h/ubuntu-alsamixer2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/SvyGkyJNJkI/AAAAAAAACs4/k97ubxsGzVk/s320/ubuntu-alsamixer2.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Now press the Up Arrow to increase your volume to an acceptable level (I have set it to the max just in case), and press ESC to exit from the mixer. This sets the microphone as the default input device with an adequate volume.&lt;br /&gt;&lt;br /&gt;Go back to Skype and redo that call-testing (she has a beautiful accent, hasn't she?)&lt;br /&gt;&lt;br /&gt;Hopefully it works now!&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0071613749" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470082933" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470467010" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1440478295" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0137021186" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-1879898233815614610?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/1879898233815614610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/skype-on-ubuntu-no-microphone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/1879898233815614610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/1879898233815614610'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/skype-on-ubuntu-no-microphone.html' title='Skype on Ubuntu:  No microphone on CM8738'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eJmj5QN0w1M/SvyGMGUvsuI/AAAAAAAACsw/Ys8QInGTq6M/s72-c/ubuntu-alsamixer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-907267209035238840</id><published>2009-11-11T10:23:00.003+01:00</published><updated>2010-03-16T17:05:43.024+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Reinstall OSX, and re-partition from scratch with the installer for dual booting with Ubuntu</title><content type='html'>(This is the third part of the article&amp;nbsp;&lt;a href="http://lajosd.blogspot.com/2009/11/dual-booting-osx-and-ubuntu-without.html"&gt;Dual booting OSX and Ubuntu without REFIT&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;My only problem with resizing the original OSX Snow Leopard installation is that it comes with lots of stuff I'm not using and this consumes quite some valuable disk-space. Do you really want to sacrifice 1.2GB on Language Transitions and 1.62GB on printer drivers if you don't need it? (Well, the printer drivers you may need, I have a Canon printer for which the driver is not in OSX, so I'll install separately anyway - thus I can get rid of this 1.62GB).  Since I only have a 128GB drive to do the installation and I will install Logic Studio consuming some 60gigs, I prefer the reinstallation. Let's see how it works!&lt;br /&gt;&lt;br /&gt;First and foremost, don't forget to back-up all your valuable data, since this method will destroy everything on the hard-drive. Don't forget: neither me nor anybody else can and will take responsibility for what you are doing on your own computer!&lt;br /&gt;&lt;br /&gt;So pop in that CD (or USB key - &lt;a href="http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html"&gt;did you know you can install Snow Leopard from an USB key?&lt;/a&gt;) and start the installation.&lt;br /&gt;&lt;br /&gt;First select your language and click the arrow to proceed. In the "Install Mac OS X" window, don't continue just yet; first we will have to re-partition our hard drive. So click Utilities-&amp;gt;Disk Utility. Click on your drive, and click on the "Partition" tab. In the "Volume Scheme" dropdown, select "4 Partitions". This will split your drive to four, equally sized partitions. Good enough to start with!&lt;br /&gt;&lt;br /&gt;My preferred layout is the following:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;osx&lt;/td&gt;     &lt;td&gt;As I will have Logic Studio installed which will take like 60 gigs, I will have to leave a huge partition for OSX. So I'll make it 74GB (I tell you how I came up with this number: I tried before and Logic just did not fit on 64GB :-) If you don't have any huge programs like Logic Pro or Final Cut, 20GB should do for the OSX partition with Office.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;home&lt;/td&gt;     &lt;td&gt;Will be visible from both Ubuntu and OSX, containing the documents we are working with: videos, pictures, source-files, etc; thus, it should fill up the remaining space from all the other partitions. Since the HFS driver in Linux is not able to read/write journaled HFS partitions, we will have to change the type of this partition to non-journaled HFS. It should be non-case-sensitive as well, since Adobe products are fooled with case-sensitive file-systems. So, it will be "Mac OS Extended", which is "non-case-sensitive/non-journaled".&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;ubuntu&lt;/td&gt;     &lt;td&gt;The Ubuntu partition will contain the Linux OS. 16GB will do for Karmic Koala.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;swap&lt;/td&gt;     &lt;td&gt;The swap partition is the virtual memory; you have to set the size depending on the amount of RAM you have. I have 4GBs, and since I want to use Hibernation I have to set it to at least 4GB (see [Swap partition size for 4GB RAM - Super User]). If hibernation is not needed, you can go away with 1GB as well.&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;You should come up with a layout of your own, depending on your actual situation, HDD size, OSX &amp;amp; Linux usages.&lt;br /&gt;I have a 128GB drive, so this is how it will look like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;osx(74GB)&lt;/li&gt;&lt;li&gt;home(34GB). &lt;/li&gt;&lt;li&gt;ubuntu(16GB)&lt;/li&gt;&lt;li&gt;swap(5GB)&lt;/li&gt;&lt;/ul&gt;Click on the bottom-rectangle which says "Untitled 4". This selects the partition for the swap. Enter "swap" in the Name, MS-DOS in the Format, and 5GB in the Size field.&lt;br /&gt;&lt;br /&gt;Click on the next rectangle, which says "Untitled 3". This is the partition for the Linux filesystem. Enter "ubuntu" in the Name, MS-DOS in Format and 16GB in the Size field.&lt;br /&gt;&lt;br /&gt;Click on the next rectangle saying "Untitled 2". This is the shared partition. Enter "home" in the Name field, as size enter 34GB (or whatever you have calculated as your Shared partition size)&lt;br /&gt;&lt;br /&gt;Click on the topmost rectangle which says "Untitled 1". This will be the partition of our OSX installation. Enter "osx" in the Name field; the size should be already fine since it equals to the remaining of all our previous partition-sizes.&lt;br /&gt;&lt;br /&gt;Now you can click on any of the rectangles to verify your partition-sizes. If you are content, press Apply. This will do the partitioning in no time.&lt;br /&gt;&lt;br /&gt;When it is finished, you can close Disk Utility. In the Install Mac OS X window, press Continue. Agree the Licence Agreement after reading it through, then select your "Macintosh HD" as a target disk. If you click Customize, you can remove the Printer Support if you don't have a printer or if have your own driver to install after OSX installation; as well as the Additional Fonts if you don't use those languages. I usually deselect the Language Transitions since I'm using OSX in english anyway. X11 I usually keep, but that's just because I may need it if I end up doing development in OSX.&lt;br /&gt;&lt;br /&gt;So just click OK and Install.&lt;br /&gt;&lt;br /&gt;After the OSX installation is finished, you can continue and &lt;a href="http://lajosd.blogspot.com/2009/11/install-ubuntu-910-karmic-koala-on.html"&gt;Install Ubuntu 9.10 "Karmic Koala" on an already partitioned drive&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0071613749" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470082933" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470467010" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1440478295" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0137021186" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-907267209035238840?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/907267209035238840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/reinstall-osx-and-re-partition-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/907267209035238840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/907267209035238840'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/reinstall-osx-and-re-partition-from.html' title='Reinstall OSX, and re-partition from scratch with the installer for dual booting with Ubuntu'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-8065743808042201766</id><published>2009-11-11T10:14:00.006+01:00</published><updated>2010-03-16T16:48:53.432+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Install Ubuntu 9.10 "Karmic Koala" on an already partitioned drive</title><content type='html'>(This is the fourth part of the article&amp;nbsp;&lt;a href="http://lajosd.blogspot.com/2009/11/dual-booting-osx-and-ubuntu-without.html"&gt;Dual booting OSX and Ubuntu without REFIT&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;To me it seems 64bit code runs smoother on today's hardware, so I'm using the 64bit editions if I have the chance. All Apple hardware containing Core2Duo (or better, e.g. Core i5, Core i7) processors is capable of running 64bit code; so here we're going to install &lt;a href="http://www.ubuntu.com/getubuntu/download"&gt;Ubuntu 9.10 Desktop 64bit&lt;/a&gt; also known as Karmic Koala (under "Alternative download options" you'll find the 64bit edition). The nice thing is that it doesn't really matter: there is hardly any difference in setting up 32 or 64 bit Linux distributions.&lt;br /&gt;&lt;br /&gt;Somehow installing Ubuntu thru USB didn't work for me on a Macbook Pro 4.1. So I have &lt;a href="http://www.macosxhints.com/article.php?story=20060619181010389"&gt;burnt the image to a CD&lt;/a&gt; and installed it from there: pop in and boot from the CD (keep pressing Alt when you turn on your Mac and select the CD), and select "English" then "Try Ubuntu without any change to my computer". Sounds careful doesn't it?&lt;br /&gt;&lt;br /&gt;Ubuntu starts up as a live distro. Double-click on the icon &lt;i&gt;Install Ubuntu 9.10&lt;/i&gt;. Select the language to use and click &lt;i&gt;Forward&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp_mWiAcwI/AAAAAAAACrw/wdSqqyP4AWw/s1600-h/u1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp_mWiAcwI/AAAAAAAACrw/wdSqqyP4AWw/s320/u1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Select your timezone and click forward.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp_ridiqtI/AAAAAAAACr4/FWjJ4DPAE2E/s1600-h/u2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp_ridiqtI/AAAAAAAACr4/FWjJ4DPAE2E/s320/u2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Select your keyboard layout and click forward. On a mac, it makes sense to select USA - Macintosh.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp_yiHtKZI/AAAAAAAACsA/2ZjKFM2wKJE/s1600-h/u3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp_yiHtKZI/AAAAAAAACsA/2ZjKFM2wKJE/s320/u3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now comes the interesting part, partitioning. Select &lt;i&gt;Specify partitions manually (advanced)&lt;/i&gt; and click &lt;i&gt;Forward&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp_6OLsBjI/AAAAAAAACsI/_5f6k4Xny5Q/s1600-h/u4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp_6OLsBjI/AAAAAAAACsI/_5f6k4Xny5Q/s320/u4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Since OSX is using GPT instead of MBR for partitioning our drives, you can see some strange things here, like the 200MB EFI partition (/dev/sda1) or the 134MB disk spaces between the partitions. This is fine, we just have to "see through the lines". If we write the OSX names next to the partitions everything will be clear:&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;/dev/sda1&lt;/td&gt;&lt;td&gt;209 MB&lt;/td&gt;&lt;td&gt;EFI&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;/dev/sda2&lt;/td&gt;&lt;td&gt;74356 MB&lt;/td&gt;&lt;td&gt;osx&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;/dev/sda3&lt;/td&gt;&lt;td&gt;34000 MB&lt;/td&gt;&lt;td&gt;home&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;/dev/sda4&lt;/td&gt;&lt;td&gt;16000 MB&lt;/td&gt;&lt;td&gt;ubuntu&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;/dev/sda5&lt;/td&gt;&lt;td&gt;4131 MB&lt;/td&gt;&lt;td&gt;swap&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;So, let's mount &lt;i&gt;/dev/sda4&lt;/i&gt; to "/" which will be the root of our Linux filesystem. Double-click on the line beginning with &lt;i&gt;/dev/sda4&lt;/i&gt;, in &lt;i&gt;Use as&lt;/i&gt; select &lt;i&gt;EXT4 journaling filesystem&lt;/i&gt;, click &lt;i&gt;Format the partition&lt;/i&gt;, in the &lt;i&gt;Mount Point&lt;/i&gt; select "/" and click OK.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/SvqACjzhawI/AAAAAAAACsQ/V6nbCsGzyIg/s1600-h/u5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/SvqACjzhawI/AAAAAAAACsQ/V6nbCsGzyIg/s320/u5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we're going to create a swap partition. Doucle-click on the &lt;i&gt;/dev/sda5&lt;/i&gt; line, select &lt;i&gt;swap area&lt;/i&gt; under &lt;i&gt;Use as&lt;/i&gt;, and click OK.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/SvqAGp--8AI/AAAAAAAACsY/BnEz_TAKgJA/s1600-h/u6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/SvqAGp--8AI/AAAAAAAACsY/BnEz_TAKgJA/s320/u6.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We can't select HFS in the installer, so we'll have to mount the shared "home" partition later on ourselves by the fstab file. For now, we have a root partition and a swap partition, so just click forward!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/SvqAL1VAl4I/AAAAAAAACsg/raE8BiMhzLU/s1600-h/u7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/SvqAL1VAl4I/AAAAAAAACsg/raE8BiMhzLU/s320/u7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Fill in all the necessary parameters in the intimidating "Who are you" dialog and click forward again.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/SvqASWeozsI/AAAAAAAACso/R8KeZks_EIY/s1600-h/u8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/SvqASWeozsI/AAAAAAAACso/R8KeZks_EIY/s320/u8.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the &lt;i&gt;Ready to install&lt;/i&gt; dialog, click &lt;i&gt;Install&lt;/i&gt; (GRUB will go into MBR, which is fine). The installation commences and will be finished in no time. Press Restart Now.&lt;br /&gt;&lt;br /&gt;When the Mac starts up, you'll have to hold the Alt key for the operating system selector menu to pop up. Oddly the additional entry we have next to our &lt;i&gt;Macintosh HD&lt;/i&gt; is &lt;i&gt;Windows&lt;/i&gt;; apparently Apple thinks if there's anything next to its operating system, that will be Windows. So just select &lt;i&gt;Windows&lt;/i&gt; and press ENTER and we are booting Ubuntu!&lt;br /&gt;&lt;br /&gt;In the &lt;a href="http://lajosd.blogspot.com/2010/03/configuring-ubuntu-to-mount-shared-hfs.html"&gt;next post&lt;/a&gt;, we will discuss how to configure Ubuntu to have access to the Shared partition and we'll set up some symbolic links in both OSX and Ubuntu to store our Documents, Pictures, Music and Videos in the common folder, so that we have access to them no matter which one we start up.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0071613749" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470082933" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470467010" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1440478295" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0137021186" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-8065743808042201766?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/8065743808042201766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/install-ubuntu-910-karmic-koala-on.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/8065743808042201766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/8065743808042201766'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/install-ubuntu-910-karmic-koala-on.html' title='Install Ubuntu 9.10 &quot;Karmic Koala&quot; on an already partitioned drive'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp_mWiAcwI/AAAAAAAACrw/wdSqqyP4AWw/s72-c/u1.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-5301884704057698729</id><published>2009-11-11T10:03:00.007+01:00</published><updated>2010-03-03T17:51:48.677+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Resize your existing OSX partitions to make some space for Ubuntu and a "Shared" partition</title><content type='html'>(For the background, see &lt;a href="http://lajosd.blogspot.com/2009/11/dual-booting-osx-and-ubuntu-without.html"&gt;Dual booting OSX and Ubuntu on a Macbook PRO&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;To squeeze Ubuntu to my Macbook Pro I actually prefer &lt;a href="http://lajosd.blogspot.com/2009/11/reinstall-osx-and-re-partition-from.html"&gt;reinstalling from scratch&lt;/a&gt; since Apple installs quite some unused stuff. But, if you don't mind losing some gigabytes, just proceed here, this is the "less destructive" way to go since your original operating system (and thus your home directory with all your documents) remains intact if the partitioning proceeds without error. &lt;br /&gt;&lt;br /&gt;Please take my word as warning: Although I'm using dual and triple boot computers for years and the described procedure works for me (in fact I'm doing it whilst writing this article), I can't take any responsibility that it will work for you as well, and I can't take responsibility for any damage or loss you may encounter. If you still choose to follow me, please, backup your home folder NOW.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f0f0f0; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;I'll tell you a short story: about three years ago, I decided that EXT3 is the way to go on my 1.8TB RAID containing about 800GB of data. It was NTFS, and since there was no utility to convert NTFS partitions to EXT3 and I didn't have a 1TB drive at my disposal (at the time 300GB was the top HDD size, at least in what I could have bought for my hardly-earned money), so I decided to take the risk and proceeded without backup. Using GParted I planned to decrease the size of the NTFS partition to 900GB, and would have created a 900GB EXT3 behind it, would have copied everything to the EXT3, then would have deleted the NTFS &amp;amp; would have resized the EXT3 to use the whole drive, having 1.8TB again. If I'm not mistaken everything went well up till the last step: the NTFS was copied, was deleted, and the EXT3 resize failed. &lt;br /&gt;&lt;br /&gt;Early version of GParted? Data inconsistency? No clue. But the process was stuck, and after a day (you can imagine that day!) I had to stop it and start looking for ways to retrieve my data. Fortunately I was able to get back almost everything from the deleted NTFS partition and by now I have external drives backing up my RAID with rsync regularly (and I'm thinking about migrating my backups to EC2 or another cheap cloud-provider); I have learnt from my own mistake, so you should learn too: MAKE BACKUPS when dealing with such sensitive issues like filesystem-resizing operations.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Let's go! Start Applications-&amp;gt;Utilities-&amp;gt;Disk Utility and click on your Hard Drive on the left panel. Now on the right side, click Partition. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp863hd0II/AAAAAAAACqQ/bP3pDCvyrV8/s1600-h/resize-existing-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp863hd0II/AAAAAAAACqQ/bP3pDCvyrV8/s320/resize-existing-1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you have your original installation, probably you will have one big partition named "Macintosh HD" like me here. We will have to shrink this partition so that our little Karmic Koala fits here too. My preferred layout is the following:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;OSX&lt;/td&gt;     &lt;td&gt;As I will have Logic Studio installed which will take like 60 gigs, I will have to leave a huge partition for OSX. So I'll make it 74GB (I tell you how I came up with this number: I tried before and Logic just did not fit on 64GB :-) &lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Shared&lt;/td&gt;     &lt;td&gt;Will be visible from both Ubuntu and OSX, containing the documents we are working with: videos, pictures, source-files, etc. Thus, it should fill up the remaining space from all the other partitions. Since the HFS driver in Linux is not able to read/write &lt;i&gt;journaled&lt;/i&gt; HFS partitions, we will have to change the type of this partition to &lt;i&gt;non-journaled&lt;/i&gt; HFS. It should be &lt;i&gt;non-case-sensitive&lt;/i&gt;, since Adobe products are fooled with case-sensitive file-systems. So, it will be "Mac OS Extended", which is "&lt;i&gt;non-case-sensitive&lt;/i&gt;/&lt;i&gt;non-journaled&lt;/i&gt;".&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Ubuntu&lt;/td&gt;     &lt;td&gt;The Ubuntu partition will contain the Linux OS. 16GB will do for Karmic Koala.&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;Swap&lt;/td&gt;     &lt;td&gt;The swap partition is the virtual memory; you have to set the size depending on the amount of RAM you have. I have 4GBs, and since I want to use Hibernation I have to set it to at least 4GB (see [Swap partition size for 4GB RAM - Super User]). If hibernation is not needed, you can go away with 1GB as well.&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I have a 128GB drive, so this is how it will look like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;OSX(74GB)&lt;/li&gt;&lt;li&gt;Shared(34GB). &lt;/li&gt;&lt;li&gt;Ubuntu(16GB)&lt;/li&gt;&lt;li&gt;Swap(4GB)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Before starting to partition the drive, I advise to sit down in front of an empty paper and try to come up with the proper numbers of your own. If you only go to the net with OSX, and you'll just install OpenOffice, 16GB should do for the OSX partition. Ubuntu is also quite happy with the 16GB, so if you sacrify 1GB for SWAP (in case you don't mind Ubuntu's hibernation), you can allocate all the remaining space to the SHARED partition, since it can contain all your documents, pictures, movies, music; reachable from either Ubuntu or OSX. The main advantages of this setup are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;if you happen to reinstall either OSX or Ubuntu later on, and you only store your data on the shared partition, you won't lose anything&lt;br /&gt;&lt;/li&gt;&lt;li&gt;you only have to work out a regular backup-procedure to the SHARED partition, since everything on the OSX and UBUNTU partition can be regenerated by a reinstallation.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;To create the partition layout (don't bother with the size just yet - we'll change that in a sec), we will have to click on the rectangle representing the HDD (which says "Macintosh HD"), and then click the [+] sign next to the dimmed "Option" button, which makes a new partition. This results in two partitions:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9DWp6hDI/AAAAAAAACqY/3PGxzNPOFrg/s1600-h/resize-existing-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9DWp6hDI/AAAAAAAACqY/3PGxzNPOFrg/s320/resize-existing-2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now click on the bottom rectangle on the left side ("Macintosh HD 2" on the picture) and click on the [+] sign again. We have three partitions:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp9KvkT0qI/AAAAAAAACqg/sJ-RhMlwOqo/s1600-h/resize-existing-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp9KvkT0qI/AAAAAAAACqg/sJ-RhMlwOqo/s320/resize-existing-3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on the bottom rectangle again ("Macintosh HD 2 2" above), and [+] again. We have four partitions finally:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9PwJkafI/AAAAAAAACqo/1kdZ2WyLDYU/s1600-h/resize-existing-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9PwJkafI/AAAAAAAACqo/1kdZ2WyLDYU/s320/resize-existing-4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So far, so good - we will just have to fix the sizes and the names now. Apple's Disk Utility is a tricky one, since if we change the size of a partition on top, it also changes the size of the partitions below. So we'll go from the bottom.&lt;br /&gt;&lt;br /&gt;Click on the last partition on the left side ("Macintosh HD 2 2 2" above) Triple click on the Name textbox to select its contents and enter the new name: "Swap". Although the name we enter here will be erased with the filesystem itself when we install Koala, we'll enter the names so that we clearly see what we are doing. The format can stay since we'll delete this partition anyway (and we don't have the choice to select Linux Swap anyway), click on size and enter your preferred swap size. I will enter 4.4GB, and I hope this fixes the hibernation which didn't work in previous installations. Press Enter to update the rectangles:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp9XVUJXtI/AAAAAAAACqw/HNB2Aa-JkJE/s1600-h/resize-existing-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp9XVUJXtI/AAAAAAAACqw/HNB2Aa-JkJE/s320/resize-existing-5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Three more to go. Click on the rectangle above the one we just worked with ("Macintosh HD 2 2 1" above) to select it. This is the partition for the Linux Operating System. Enter a descriptive "Name" used only whilst partitioning: "Ubuntu". Format can stay again since the partition will be erased anyway by the Ubuntu installer. The size is 16GB. Enter:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp9d4Q_vDI/AAAAAAAACq4/TF3wqPmyyhw/s1600-h/resize-existing-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp9d4Q_vDI/AAAAAAAACq4/TF3wqPmyyhw/s320/resize-existing-6.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;With me yet? Let's go. Click on the rectangle "Macintosh HD 2 1", and enter "Shared" in the Name: field. Now click on the Format drop-down list and select "Mac OS Extended" (Do you remember? This is the non-case-sensitive/non-journaled HFS stuff from above, so that Linux can read and write it). The size is 34GB (or whatever your Shared partition size will be). Now press Enter and the rectangles will be updated:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9rEEbHLI/AAAAAAAACrA/tk7ObIsQQoo/s1600-h/resize-existing-7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Svp9rEEbHLI/AAAAAAAACrA/tk7ObIsQQoo/s320/resize-existing-7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now you can freely click on any of the rectangles (e.g. partitions) to verify their size. If you are satisfied with the results, click Apply.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp9xZV4qSI/AAAAAAAACrI/jEhiSR-U8q4/s1600-h/resize-existing-8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://2.bp.blogspot.com/_eJmj5QN0w1M/Svp9xZV4qSI/AAAAAAAACrI/jEhiSR-U8q4/s320/resize-existing-8.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Smart Snow Leopard confirms the non-destructive manner of our operations. Since you have already made plenty of backups of your data, you can click on the Partition button right? After making sure your backups are intact, click Partition to proceed.&lt;br /&gt;&lt;br /&gt;Now OSX verifies the disk, and executes the partitioning. In a couple of seconds/minutes, you'll see the results:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp92hm8PKI/AAAAAAAACrQ/FR5Cg83j_D4/s1600-h/resize-existing-9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://3.bp.blogspot.com/_eJmj5QN0w1M/Svp92hm8PKI/AAAAAAAACrQ/FR5Cg83j_D4/s320/resize-existing-9.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you can proceed to &lt;a href="http://lajosd.blogspot.com/2009/11/install-ubuntu-910-karmic-koala-on.html"&gt;Install Ubuntu 9.10 "Karmic Koala" on an already partitioned drive&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-5301884704057698729?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/5301884704057698729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/resize-your-existing-osx-partitions-to.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/5301884704057698729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/5301884704057698729'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/resize-your-existing-osx-partitions-to.html' title='Resize your existing OSX partitions to make some space for Ubuntu and a &quot;Shared&quot; partition'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_eJmj5QN0w1M/Svp863hd0II/AAAAAAAACqQ/bP3pDCvyrV8/s72-c/resize-existing-1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-7030318084187470445</id><published>2009-11-11T09:52:00.010+01:00</published><updated>2010-03-16T17:05:18.997+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Dual booting OSX and Ubuntu on a Macbook Pro</title><content type='html'>In these series of posts we'll talk about how to set up Mac OS X 10.6 "Snow Leopard" to dual boot with Ubuntu 9.10 "Karmic Koala" on a Macbook Pro (the procedure will probably work with previous and newer versions as well - feedback is always welcome!) This setup has quite some "nuances" next to the technical issues concerning the installation, e.g. how to set up the home folders, using a shared partition, etc.&lt;br /&gt;&lt;h3&gt;Usage scenarios&lt;/h3&gt;We have quite some operating systems to choose from, each with their strengths and weaknesses. If I try to summarize my usage of computer systems, I'm doing mainly the following stuff:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Net&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Browsing, Skype, Messenger: OSX and Linux&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Media (mainly OSX)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pictures: RAW to JPG workflow: Nikon Capture and Apple Aperture on OSX&lt;/li&gt;&lt;li&gt;Audio editing: recording and mixing down rehearsals, one track per instrument: Apple Logic Studio on OSX.&lt;/li&gt;&lt;li&gt;DVD and CD remastering: grabbing DVDs, CDs, re-compressing them to XVID/MP3: Linux is unbeatable with all the free tools.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Software Development (mainly Linux)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Java: Eclipse, IntelliJ Idea: Eclipse already in the Ubuntu repositories, thus looks like "integrated" in Ubuntu.&lt;/li&gt;&lt;li&gt;Tomcat: from Ubuntu repos&lt;/li&gt;&lt;li&gt;PostreSQL, MySQL: from Ubuntu repos&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Net&lt;/h3&gt;For browsing the net Firefox is my favorite next to Opera (btw, 56% of the visitors of this site use Firefox - with Explorer having some 20%...). Both Opera and Firefox run fine either on Linux or OSX, so no real preference here. Same with Skype. Concerning Messenger I have the option to use Adium on OSX (which, configured properly is beautiful like OSX itself and can be used with MSN, Facebook chat, Google talk, etc) or Pidgin and Empathy on Ubuntu, which can also be used for MSN, ICQ, Yahoo messenger, etc. Thus, we can go to the Net with either OS; we even have some options to synchronize the settings like bookmarks between the browsers.&lt;br /&gt;&lt;h3&gt;Media&lt;/h3&gt;Personally, I like to work with audio on OSX since Linux is - at least today - unfortunately not the best option for this purpose: although Logic Studio is pricey, but IMO it's simply the best tool to perform Audio editing (not to mention the painful lack of the Linux driver for my MOTU Ultralite). My other option would be to use Windows (Sonar), but I'm using mainly Mac and Linux lately, and I just don't like the "instability" feeling of Windows anymore. Rumors say Windows 7 will change this, but I'll just give it some time before trying it. Somehow I'm more enthusiastic about the new Karmic Koala and Snow Leopard thingy for now.&lt;br /&gt;&lt;br /&gt;For the photography raw workflow (converting Nikon D50 raw NEF images to JPGs), currently I only have experience with Nikon Capture (I used it on XP for years) which, albeit not so nicely but also works on OSX. After following some tutorials on Apple's site, I'm planning to migrate to Apple's Aperture in the future since it looks promising. But, for now I'm using Nikon Capture. So that's also OSX.&lt;br /&gt;&lt;br /&gt;DVDs and CDs: the open source tools in the Ubuntu repos are unbeatable. Just google for "ubuntu cd rip" or "ubuntu dvd rip" and you'll see what I mean: everything built in the repos, no shareware/freeware utilities to haunt for... So Linux is the clear winner here for the moment.&lt;br /&gt;&lt;h3&gt;Software development&lt;/h3&gt;My two favorite Java IDEs in use today are IntelliJ Idea and Eclipse (the third main one is Netbeans, but I dont't use it lately, although I remember I liked it quite much too). Both IDEs run perfectly either on OSX or Linux, but - at least for me - life is just easier if software development is done always in Linux. It is true, we have all the open-source stuff as "macports" (you can go as far as entering "sudo port install tomcat6" in a command line on OSX, which will download the sources of tomcat6, compile it and install it), yet after developing for years both on OSX and Linux I still have the feeling that in Linux everything is just where it should be, while on OSX I always have to figure something out. Yes, everything can be figured out, yet my "Just works" credit goes to Linux when software development is concerned. So I use Ubuntu for software development.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f0f0f0; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;i&gt;Where is windows?&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Windows could be just as easily integrated into a triple boot environment as OSX and Ubuntu. To be exact, previously when I've had a 320GB HDD in this Macbook, I've had Windows too since Nikon Capture was running best in Windows; but since that was the only usage lately and I had to live with a smaller HDD for a while, I've had to make some sacrifices and Windows had to go... Basicly all we need is one more partition for Windows. But, quite oddly the Macbook was only able to start Windows with REFIT if it was on a specific partition, I don't remember if the 3rd or 4th.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Installation&lt;/h3&gt;So you've got your new Mac and you wish to install Ubuntu on it. To have more than one operating system, you'll have to create some additional partitions. You have two ways to proceed with the partitioning:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://lajosd.blogspot.com/2009/11/resize-your-existing-osx-partitions-to.html"&gt;Resize your existing OSX partitions to make some space for Ubuntu and a "Shared" partition&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://lajosd.blogspot.com/2009/11/reinstall-osx-and-re-partition-from.html"&gt;Reinstall OSX, and re-partition from scratch with the installer for dual booting with Ubuntu&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;After the partitioning is done, you can go ahead and &lt;a href="http://lajosd.blogspot.com/2009/11/install-ubuntu-910-karmic-koala-on.html"&gt;Install Ubuntu 9.10 "Karmic Koala" on an already partitioned drive&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the next post, we will discuss how to configure Ubuntu to have access to the Shared partition and we'll set up some symbolic links in both OSX and Ubuntu to store our Documents, Pictures, Music and Videos in the common folder, so that we have access to them no matter which one we start up.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0071613749?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071613749"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51rt6obzJAL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0071613749" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470082933?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470082933"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51r5QZ1CTML._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470082933" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470467010?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470467010"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51VLyRaEv3L._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470467010" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1440478295?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1440478295"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41LHQqWa6yL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1440478295" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0137021186?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137021186"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41s6BFe0oLL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0137021186" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-7030318084187470445?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/7030318084187470445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/dual-booting-osx-and-ubuntu-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7030318084187470445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/7030318084187470445'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/dual-booting-osx-and-ubuntu-without.html' title='Dual booting OSX and Ubuntu on a Macbook Pro'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-2782563114009927372</id><published>2009-11-10T22:24:00.002+01:00</published><updated>2009-11-17T11:58:40.707+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Delayed screen capture in Ubuntu</title><content type='html'>We all know about the PrintScreen button in Windows which copies the actual screen to the clipboard, which can be pasted to the lovely MSPaint and saved to a file. Also quite well known the OSX keyboard shortcut CMD+Shift+3 which captures the screen and creates a file on the desktop (btw CMD+Shift+4 gives you a crop cursor to select of a smaller rectangle, and if you can press the SHIFT key as well - provided you have so many flexible fingers of course - you'll have the image on the clipboard like on Windows/PrintScreen).&lt;br /&gt;&lt;br /&gt;But what about Ubuntu? Especially running on a Macbook where we don't have a PrintScreen button?&lt;br /&gt;&lt;br /&gt;Easy: just create a new Application Launcher to gnome-screenshot which will create a file like OSX does. Right click on the center of the menu bar on the top of the screen (Ubuntu calls this the &lt;i&gt;Panel&lt;/i&gt;), and select &lt;i&gt;Add to panel&lt;/i&gt;. Select Custom Application Launcher and click Add. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJmj5QN0w1M/SvnYUn6vaVI/AAAAAAAACog/7nPsYH_bhPc/s1600-h/gnome-screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_eJmj5QN0w1M/SvnYUn6vaVI/AAAAAAAACog/7nPsYH_bhPc/s320/gnome-screenshot.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Enter "Screenshot" in the &lt;i&gt;Name&lt;/i&gt; field and the following in the &lt;i&gt;Command&lt;/i&gt; field:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;gnome-screenshot --delay 5&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Click OK, and Close.&lt;br /&gt;&lt;br /&gt;Now whenever you click on the freshly created icon, after 5 seconds (which even allows you to position the mouse pointer on your screenshot) the screen is grabbed and a dialog is popped up where you can specify where to save the image. Ubuntu rulez!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-2782563114009927372?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/2782563114009927372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/11/delayed-capture-screen-in-ubuntu.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/2782563114009927372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/2782563114009927372'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/11/delayed-capture-screen-in-ubuntu.html' title='Delayed screen capture in Ubuntu'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_eJmj5QN0w1M/SvnYUn6vaVI/AAAAAAAACog/7nPsYH_bhPc/s72-c/gnome-screenshot.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-4448664899113705097</id><published>2009-10-21T00:05:00.029+02:00</published><updated>2010-03-16T16:45:10.477+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IntelliJ IDEA'/><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Mac OS X: Using IntelliJ IDEA on 64bit JDK6</title><content type='html'>&lt;div class="block" style="text-align: right;"&gt;&lt;b&gt;UPDATE 2:&lt;/b&gt;&lt;br /&gt;The retail version of IntelliJ Idea 9 uses the JDK6 32bit by default on Snow Leopard (in contrast with the betas which were using JDK6 64bit).&lt;br /&gt;The article has been updated to reflect this.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;IntelliJ Idea 9.0 - Mac OSX 10.6 Snow Leopard&lt;/h3&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/SyaeOU2yvOI/AAAAAAAACw8/mcY3uN5ef7E/s1600-h/ij9-on-sl.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/SyaeOU2yvOI/AAAAAAAACw8/mcY3uN5ef7E/s200/ij9-on-sl.png" /&gt;&lt;/a&gt;&lt;/div&gt;The default installation of IntelliJ IDEA 9.0 uses JDK6 32bit on Mac OSX 10.6 "Snow Leopard". With a little configuration we can force it&amp;nbsp; to use the 64 bit JDK6, which is also part of the operating system.&lt;br /&gt;&lt;br /&gt;After you installed IntelliJ IDEA, Cmd+click on the IDEA launcher-icon to open it in Finder. Ctrl-click on the IntelliJ IDEA icon and choose &lt;i&gt;Show Package Contents&lt;/i&gt;. Select &lt;i&gt;Contents&lt;/i&gt; and right-click &lt;i&gt;Info.plist&lt;/i&gt;. Select &lt;i&gt;Open with&lt;/i&gt; -&amp;gt; &lt;i&gt;TextEdit&lt;/i&gt;. This brings up the file in the text editor.&lt;br /&gt;&lt;br /&gt;Do a search (CMD+f) on the string &lt;i&gt;JVMArchs&lt;/i&gt;. You'll find the following entry:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;key&amp;gt;JVMArchs&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;lt;array&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;string&amp;gt;i386&amp;lt;/string&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;string&amp;gt;x86_64&amp;lt;/string&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;string&amp;gt;ppc&amp;lt;/string&amp;gt;&lt;br /&gt;&amp;lt;/array&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/Syagu3sovPI/AAAAAAAACxE/Tsfl3ZwHvs4/s1600-h/ij9-64bit-on-sl.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/Syagu3sovPI/AAAAAAAACxE/Tsfl3ZwHvs4/s200/ij9-64bit-on-sl.png" /&gt;&lt;/a&gt;&lt;/div&gt;Put the x86_64 entry on top (e.g. swap the i386 and the x86_64 lines), save the file (CMD+s) and close TextEdit (CMD+q). If you restart Idea, you'll see it is using the 64bit JDK if you check it in the &lt;i&gt;IntelliJ Idea-&amp;gt;About&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;You can also check if a given process is 64bit in Applications-&amp;gt;Utilities-&amp;gt;Activity Monitor. Check out the last column called &lt;i&gt;Kind&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;IntelliJ Idea 8.0, 9.0 - Mac OSX 10.5 Leopard&lt;/h3&gt;In contrast, Idea uses JDK5 on MacOS X 10.5 "Leopard", and that's 32bit only. Again just a little configuration and we can force it to use the 64bit JDK6. &lt;br /&gt;&lt;br /&gt;After you installed IntelliJ IDEA, CMD+click on the IDEA launcher-icon which brings up the entry in Finder, now right-click (or ctrl-click) on the IntelliJ IDEA icon and choose &lt;i&gt;Show Package Contents&lt;/i&gt;. Select &lt;i&gt;Contents&lt;/i&gt; and right-click &lt;i&gt;Info.plist&lt;/i&gt;. Select &lt;i&gt;Open with&lt;/i&gt; -&amp;gt; &lt;i&gt;TextEdit&lt;/i&gt;. This brings up the file in the text editor.&lt;br /&gt;&lt;br /&gt;Do a search (CMD+f) on the string JVMVersion. You'll find the following entry:&lt;br /&gt;&lt;pre&gt;&amp;lt;key&amp;gt;JVMVersion&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;lt;string&amp;gt;1.5*&amp;lt;/string&amp;gt;&lt;/pre&gt;Change the &lt;i&gt;1.5*&lt;/i&gt; to &lt;i&gt;1.6*&lt;/i&gt;, save the file (CMD+s) and close TextEdit (CMD+q). Since the JDK6 in Leopard is 64-bit only, we don't have to touch the &lt;i&gt;JVMArchs&lt;/i&gt; section. &lt;br /&gt;&lt;br /&gt;Start IDEA and check in &lt;i&gt;About IntelliJ IDEA&lt;/i&gt; if it is indeed using the 64bit JDK6. &lt;br /&gt;&lt;br /&gt;&lt;div class="block"&gt;&lt;b&gt;IntelliJ Idea 8, 9 betas:&lt;/b&gt; if IntelliJ does not start anymore, and honors us with a &lt;i&gt;[JavaAppLauncher Error] unable to find a version of Java to launch&lt;/i&gt; in the log file, we have to replace the launcher with a 64bit executable. Open a terminal:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub64 /Applications/Maia-IU-90.94.app/Contents/MacOS/idea&lt;/pre&gt;&lt;br /&gt;Replace Maia-IU-90.94 with the proper name of your application - I was using a developer preview of IntelliJ IDEA 9, but this same method works for version 8 as well.&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;32bit or 64bit?&lt;/h3&gt;To me IntelliJ Idea seems more responsive on 64bit JDKs. I'm wondering if you consider it faster as well? If you are developing for JDK6 on Leopard you should use similar amount of memory now (the 64-bit JDK footprint is bigger but there's only one copy of the JDK in memory), and - as a question of personal taste - the display looks nicer since JDK6 uses the native font smoothing style of OSX (a mixture of regular antialiasing and subpixel rendering), whilst JDK5 uses plain anti-aliasing without subpixel rendering. There are some comments online about memory leaks using JDK6, but personally I didn't experience this.&lt;br /&gt;&lt;br /&gt;Happy developing using this great tool!&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/1932394443?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1932394443"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51MyPlXajbL._SL110_.jpg"/&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=1932394443" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0596004001?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596004001"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51ekO53IaQL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0596004001" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/059652952X?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=059652952X"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51l7xdgtkKL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=059652952X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0596009658?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596009658"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51FI8kKQGZL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0596009658" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0470478365?ie=UTF8&amp;tag=dosbl05-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470478365"&gt;&lt;img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51c6xrWXneL._SL110_.jpg"&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=as2&amp;o=1&amp;a=0470478365" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-4448664899113705097?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/4448664899113705097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/10/mac-os-x-using-intellij-idea-on-64bit.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4448664899113705097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4448664899113705097'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/10/mac-os-x-using-intellij-idea-on-64bit.html' title='Mac OS X: Using IntelliJ IDEA on 64bit JDK6'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_eJmj5QN0w1M/SyaeOU2yvOI/AAAAAAAACw8/mcY3uN5ef7E/s72-c/ij9-on-sl.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-1350819840163765065</id><published>2009-10-20T16:28:00.002+02:00</published><updated>2010-03-16T17:16:13.829+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ExtJS'/><title type='text'>ExtJS: Getting the selection from a TextField</title><content type='html'>It is not possible to get the selected text from a TextField in ExtJS 2.2. Fortunately it can easily be solved by introducing a getSelection() method to TextField:&lt;br /&gt;&lt;pre&gt;Ext.form.TextField.prototype.getSelection = function() {&lt;br /&gt; var domElement = this.getEl().dom; &lt;br /&gt; if (Ext.isIE){ &lt;br /&gt;  var sel = document.selection;&lt;br /&gt;  var range = sel.createRange();&lt;br /&gt;  if (range.parentElement()!=domElement) return null;&lt;br /&gt;  var bookmark = range.getBookmark();&lt;br /&gt;  var selection = domElement.createTextRange();&lt;br /&gt;  selection.moveToBookmark(bookmark);&lt;br /&gt;  var before = domElement.createTextRange();&lt;br /&gt;  before.collapse(true);&lt;br /&gt;  before.setEndPoint("EndToStart", selection);&lt;br /&gt;  var after = domElement.createTextRange();&lt;br /&gt;  after.setEndPoint("StartToEnd", selection);&lt;br /&gt;  return {&lt;br /&gt;   selectionStart: before.text.length,&lt;br /&gt;   selectionEnd: before.text.length + selection.text.length,&lt;br /&gt;   beforeText: before.text,&lt;br /&gt;   text: selection.text,&lt;br /&gt;   afterText: after.text&lt;br /&gt;  }&lt;br /&gt; } else {&lt;br /&gt;  if (domElement.selectionEnd &amp;amp;&amp;amp; domElement.selectionStart) {&lt;br /&gt;   if (domElement.selectionEnd &amp;gt; domElement.selectionStart){ &lt;br /&gt;          return {&lt;br /&gt;           selectionStart  : domElement.selectionStart,&lt;br /&gt;           selectionEnd : domElement.selectionEnd,&lt;br /&gt;           beforeText   : domElement.value.substr(0, domElement.selectionStart),&lt;br /&gt;           text    : domElement.value.substr(domElement.selectionStart, domElement.selectionEnd - domElement.selectionStart),&lt;br /&gt;           afterText   : domElement.value.substr(domElement.selectionEnd)&lt;br /&gt;          };&lt;br /&gt;   } &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return null;&lt;br /&gt;}&lt;br /&gt;Ext.form.TextField.prototype.getSelectedText = function() {&lt;br /&gt; var selection = this.getSelection();&lt;br /&gt; return selection==null?null:selection.text;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Unfortunately Internet Explorer and Firefox give us a hard time by implementing the functionality of getting the selection so different; this small listing gives us a getSelection() function returning a JS object very similar to the one Firefox returns, and adapts to IE accordingly. This object can be used to treat not just the selection itself, but the text before and after as well.&lt;br /&gt;&lt;br /&gt;The getSelectedText() method returns the selection simply as a text.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Learning-Ext-JS-Shea-Frederick/dp/1847195148?ie=UTF8&amp;tag=dosbl05-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Learning Ext JS" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=1847195148&amp;tag=dosbl05-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1847195148" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Ext-3-0-Cookbook-Jorge-Ramon/dp/1847198708?ie=UTF8&amp;tag=dosbl05-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Ext JS 3.0 Cookbook" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=1847198708&amp;tag=dosbl05-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1847198708" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Ext-JS-Action-Jesus-Garcia/dp/1935182110?ie=UTF8&amp;tag=dosbl05-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Ext JS in Action" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=1935182110&amp;tag=dosbl05-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1935182110" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Professional-JavaScript-Frameworks-Prototype-Programmer/dp/047038459X?ie=UTF8&amp;tag=dosbl05-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Professional JavaScript Frameworks: Prototype,YUI, ExtJS, Dojo and MooTools (Wrox Programmer to Programmer)" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=047038459X&amp;tag=dosbl05-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=dosbl05-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=047038459X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-1350819840163765065?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/1350819840163765065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/10/extjs-getting-selection-from-textfield.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/1350819840163765065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/1350819840163765065'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/10/extjs-getting-selection-from-textfield.html' title='ExtJS: Getting the selection from a TextField'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-4264845715381598432</id><published>2009-10-01T14:28:00.004+02:00</published><updated>2009-11-26T22:23:21.849+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Resolve NoClassDefFoundException: Find a given JAVA class in JARs</title><content type='html'>NoClassDefFoundException occures when the classloader was not able to load a class, possibly because of multiple versions present in the classpath (contrary to what we would think at first, it does not actually mean the class was not found - since that would be a ClassNotFoundException).&lt;br /&gt;&lt;br /&gt;To find the JAR files containing the conflicting versions, we have to iterate over every JAR file in a given directory, to look for the one which file contains the given class.&lt;br /&gt;&lt;br /&gt;So let's assume we have a &lt;code&gt;NoClassDefFoundException: org.jboss.remoting.marshal.Marshaller&lt;/code&gt;. This means, we have to find all the JAR files containing this class to look for the duplicates; and then decide which one to get rid of. In a web-application, the application libraries are in WEB-INF/lib, so we should start looking there. The other libraries' placement depends on the platform and the Servlet Container; for example on Ubuntu 9.04/Tomcat 6.0, the system libraries are at &lt;code&gt;/usr/share/tomcat6/lib&lt;/code&gt; and the common libraries are at &lt;code&gt;/var/lib/tomcat6/common/lib&lt;/code&gt;. These folders should be checked for duplicates as well.&lt;br /&gt;&lt;br /&gt;On Solaris, the following script lists all JARs, spitting a line when the class is found:&lt;br /&gt;&lt;pre&gt;cd webapps/ROOT/WEB-INF/lib&lt;br /&gt;find . -name "*.jar" -print -exec jar tf {} \; | /usr/xpg4/bin/grep -e '.jar' -e 'org/jboss/remoting/marshal/Marshaller'&lt;br /&gt;&lt;/pre&gt;The -print parameter prints out the JAR filename, and grep prints either the JAR filename or the classname if found (we have two conditions in grep: either print the JAR name, or the&amp;nbsp;match&amp;nbsp;found).&lt;br /&gt;&lt;br /&gt;On Mac OSX, the following is the equivalent:&lt;br /&gt;&lt;pre&gt;cd webapps/ROOT/WEB-INF/lib&lt;br /&gt;find . -name "*.jar" -print -exec jar tf {} \; | grep -e '.jar' -e 'org/jboss/remoting/marshal/Marshaller'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In Windows it is not so easy, having a more limited command-line. UnxUtils (download it from &lt;a href="http://sourceforge.net/projects/unxutils/files/unxutils/current/UnxUtils.zip/download"&gt;http://sourceforge.net/projects/unxutils/files/unxutils/current/UnxUtils.zip/download&lt;/a&gt;) can help: after installing, and changing our PATH to include its usr\local\wbin folder:&lt;br /&gt;&lt;pre&gt;cd webapps\ROOT\WEB-INF\lib&lt;br /&gt;find . -name "*.jar" -print -exec jar tf {} ; | grep -e "\.jar\|org/jboss/remoting/marshal/Marshaller"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-4264845715381598432?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/4264845715381598432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/10/resolve-noclassdeffoundexception-find.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4264845715381598432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4264845715381598432'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/10/resolve-noclassdeffoundexception-find.html' title='Resolve NoClassDefFoundException: Find a given JAVA class in JARs'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-3515543098373654033</id><published>2009-10-01T12:58:00.000+02:00</published><updated>2009-10-20T17:50:55.319+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><title type='text'>Renaming multiple files with Flexible Renamer using Regular Expressions: removing numbers from filenames</title><content type='html'>&lt;a href="http://hp.vector.co.jp/authors/VA014830/english/FlexRena/"&gt;Flexible Renamer&lt;/a&gt; is a free tool to rename multiple files written by a Japanese developer Naru. It is very straightforward to rename multiple files with it; my task was to remove the numbers from filenames, which were automatically appended by Outlook when I copied some messages from an Exchange Server, so that my subject is untouched. At the moment the author's download site is down, still the tool can be downloaded from &lt;a href="http://download.cnet.com/3001-18512_4-28799.html?spi=d4ceefc5fd5bad9e88128c59ab73b37d"&gt;CNET&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First you have to go to the folder where your files are. This you can do at the leftmost part of the application (see screenshot below). &lt;br /&gt;&lt;br /&gt;To identify the filenames with numbers, we can use Regular Expressions, so choose &lt;i&gt;RegEx&lt;/i&gt; from &lt;i&gt;Rename Method&lt;/i&gt;. Since we want a complete match, click on the small triangle and select &lt;i&gt;Only completely matched&lt;/i&gt;. The regular expression to match numbers in filenames is &lt;b&gt;(.*)\(\d*\).msg&lt;/b&gt; : which can be broken down like this:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;(.*)&lt;/b&gt; Take any characters any number of times (. and *), and group them in group 1 (so the matched content will be accessible by \1 in the Replace texbox)&lt;/li&gt;&lt;li&gt;&lt;b&gt;\(&lt;/b&gt; Look for an opening bracket (the backslash before is there for escaping: so that the interpreter won't think it is a grouping we are about to do)&lt;/li&gt;&lt;li&gt;&lt;b&gt;\d*&lt;/b&gt; Look for digits, any number of them (&lt;b&gt;\d&lt;/b&gt;: digit, &lt;b&gt;*&lt;/b&gt;: any)&lt;/li&gt;&lt;li&gt;&lt;b&gt;\)&lt;/b&gt; Look for a closing bracket&lt;/li&gt;&lt;li&gt;&lt;b&gt;.msg&lt;/b&gt; Look for the exact text .msg at the end of the filename.&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJmj5QN0w1M/SsSOzbhUSjI/AAAAAAAACmg/uJcvW_Y706U/s1600-h/flexrenamer1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJmj5QN0w1M/SsSOzbhUSjI/AAAAAAAACmg/uJcvW_Y706U/s400/flexrenamer1.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Then just click Rename and voila: the files are renamed to the contents of the &lt;i&gt;New Name&lt;/i&gt; column!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-3515543098373654033?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/3515543098373654033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/10/renaming-multiple-files-with-flexible.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/3515543098373654033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/3515543098373654033'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/10/renaming-multiple-files-with-flexible.html' title='Renaming multiple files with Flexible Renamer using Regular Expressions: removing numbers from filenames'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_eJmj5QN0w1M/SsSOzbhUSjI/AAAAAAAACmg/uJcvW_Y706U/s72-c/flexrenamer1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-8858476603724075282</id><published>2009-09-04T10:29:00.000+02:00</published><updated>2009-11-26T22:16:07.514+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Log4J'/><title type='text'>Log4J: Sending only ERRORs and FATALs to SMTPAppender</title><content type='html'>SMTPAppender is a very nice way to notify support personnel about a serious error occuring in our application. Unfortunately when configured by the log4j.properties file, there is no easy way to have sent only the ERROR and FATAL messages. By using the XML to configure Log4J, we can achieve this aim by using filters.&lt;br /&gt;&lt;br /&gt;LevelRangeFilter can be configured to have sent only ERRORs and FATALs:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;appender class=&amp;quot;org.apache.log4j.net.SMTPAppender&amp;quot; name=&amp;quot;smtp&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;To&amp;quot; value=&amp;quot;Support@yourcompany.com&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;From&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;Subject&amp;quot; value=&amp;quot;An error occured&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;SMTPHost&amp;quot; value=&amp;quot;localhost&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;BufferSize&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;Threshold&amp;quot; value=&amp;quot;ERROR&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; value=&amp;quot;%d{HH:mm:ss} %-5p %t %c - %m%n&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/layout&amp;gt;&lt;br /&gt;  &amp;lt;filter class=&amp;quot;org.apache.log4j.varia.LevelRangeFilter&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;param name=&amp;quot;LevelMin&amp;quot; value=&amp;quot;ERROR&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;param name=&amp;quot;LevelMax&amp;quot; value=&amp;quot;FATAL&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/filter&amp;gt;&lt;br /&gt;&amp;lt;/appender&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you want to include information about the exception in the subject, see &lt;a href="http://lajosd.blogspot.com/2009/09/log4j-smtpappender-exception-info-in.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-8858476603724075282?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/8858476603724075282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/09/sending-only-errors-and-fatals-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/8858476603724075282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/8858476603724075282'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/09/sending-only-errors-and-fatals-to.html' title='Log4J: Sending only ERRORs and FATALs to SMTPAppender'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-5836772035282265433</id><published>2009-09-02T19:03:00.000+02:00</published><updated>2009-11-26T22:16:07.514+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Log4J'/><title type='text'>Log4J SMTPAppender: Exception info in the subject</title><content type='html'>Log4J's SMTPAppender can be nicely configured to send emails when events are logged with priority ERROR or FATAL in our applications. But as soon as you start using this marvelous feature and you'll begin the get notifications about real exceptions, you'll realize how nice it would be to put some dynamic information into the subject of the message - like the name of the exception.&lt;br /&gt;&lt;br /&gt;Unfortunately you can't do this (at least in 1.2.15).&lt;br /&gt;&lt;br /&gt;But it is quite easy to implement this feature as a small addendum:&lt;br /&gt;&lt;pre&gt;package org.apache.log4j.net;&lt;br /&gt;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;import javax.mail.Multipart;&lt;br /&gt;import javax.mail.Transport;&lt;br /&gt;import javax.mail.internet.MimeBodyPart;&lt;br /&gt;import javax.mail.internet.MimeMultipart;&lt;br /&gt;import javax.mail.internet.MimeUtility;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Layout;&lt;br /&gt;import org.apache.log4j.PatternLayout;&lt;br /&gt;import org.apache.log4j.helpers.LogLog;&lt;br /&gt;import org.apache.log4j.spi.LoggingEvent;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* @author ldomaniczky&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;public class PatternSubjectSMTPAppender extends SMTPAppender {&lt;br /&gt; @Override&lt;br /&gt; protected void sendBuffer() {&lt;br /&gt;&lt;br /&gt;  // Note: this code already owns the monitor for this&lt;br /&gt;  // appender. This frees us from needing to synchronize on 'cb'.&lt;br /&gt;  try {&lt;br /&gt;   MimeBodyPart part = new MimeBodyPart();&lt;br /&gt;&lt;br /&gt;   StringBuffer sbuf = new StringBuffer();&lt;br /&gt;   String t = layout.getHeader();&lt;br /&gt;   if (t != null)&lt;br /&gt;    sbuf.append(t);&lt;br /&gt;   int len = cb.length();&lt;br /&gt;   for (int i = 0; i &amp;lt; len; i++) {&lt;br /&gt;    // sbuf.append(MimeUtility.encodeText(layout.format(cb.get())));&lt;br /&gt;    LoggingEvent event = cb.get();&lt;br /&gt;&lt;br /&gt;    // setting the subject&lt;br /&gt;    if (i==0) {&lt;br /&gt;     Layout subjectLayout = new PatternLayout(getSubject());&lt;br /&gt;     msg.setSubject(MimeUtility.encodeText&lt;br /&gt;          (subjectLayout.format(event), "UTF-8", null));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    sbuf.append(layout.format(event));&lt;br /&gt;    if (layout.ignoresThrowable()) {&lt;br /&gt;     String[] s = event.getThrowableStrRep();&lt;br /&gt;     if (s != null) {&lt;br /&gt;      for (int j = 0; j &amp;lt; s.length; j++) {&lt;br /&gt;       sbuf.append(s[j]);&lt;br /&gt;       sbuf.append(Layout.LINE_SEP);&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   t = layout.getFooter();&lt;br /&gt;   if (t != null)&lt;br /&gt;    sbuf.append(t);&lt;br /&gt;   part.setContent(sbuf.toString(), layout.getContentType());&lt;br /&gt;&lt;br /&gt;   Multipart mp = new MimeMultipart();&lt;br /&gt;   mp.addBodyPart(part);&lt;br /&gt;   msg.setContent(mp);&lt;br /&gt;&lt;br /&gt;   msg.setSentDate(new Date());&lt;br /&gt;   Transport.send(msg);&lt;br /&gt;  } catch (Exception e) {&lt;br /&gt;   LogLog.error("Error occured while sending e-mail notification.", e);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As soon as we get the event with cb.get(), the next call does not return it anymore - it considers the event as 'consumed'. Thus, we cannot just override the method, call cb.get() to have access to the event and call the base implementation with super.sendBuffer(). &lt;br /&gt;&lt;br /&gt;We must override the sendBuffer function in SMTPAppender, copy the appropriate functionality from the superclass, and inject the code to set the custom subject at the very moment of processing the errors.&lt;br /&gt;&lt;br /&gt;You can configure the appender with the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;appender name=&amp;quot;smtp&amp;quot; class=&amp;quot;org.apache.log4j.net.PatternSubjectSMTPAppender&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;To&amp;quot; value=&amp;quot;Support@yourcompany.com&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;From&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;Subject&amp;quot; value=&amp;quot;%c{1}: %m&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;SMTPHost&amp;quot; value=&amp;quot;localhost&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;BufferSize&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;param name=&amp;quot;Threshold&amp;quot; value=&amp;quot;ERROR&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; value=&amp;quot;%d{MMM-dd HH:mm:ss} %-5p %t %c - %m%n&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/layout&amp;gt;&lt;br /&gt;  &amp;lt;filter class=&amp;quot;org.apache.log4j.varia.LevelRangeFilter&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;param name=&amp;quot;LevelMin&amp;quot; value=&amp;quot;ERROR&amp;quot; /&amp;gt;&lt;br /&gt;   &amp;lt;param name=&amp;quot;LevelMax&amp;quot; value=&amp;quot;FATAL&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/filter&amp;gt;&lt;br /&gt; &amp;lt;/appender&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The LevelRangeFilter makes sure only the ERROR and FATAL logs will be sent to the support address.&lt;br /&gt;&lt;br /&gt;Note: this has been tested on Log4J 1.2.15.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-5836772035282265433?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/5836772035282265433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/09/log4j-smtpappender-exception-info-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/5836772035282265433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/5836772035282265433'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/09/log4j-smtpappender-exception-info-in.html' title='Log4J SMTPAppender: Exception info in the subject'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7696139615994864209.post-4775976297266890648</id><published>2009-09-02T11:04:00.000+02:00</published><updated>2009-11-26T22:16:07.514+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Log4J'/><title type='text'>Daily logging with log4j</title><content type='html'>To generate a daily log with log4j, we have the following options:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using org.apache.log4j.DailyRollingFileAppender, part of the core Log4j API.&lt;br /&gt;Configuration in XML:&lt;br /&gt;&lt;pre name="code" class="Xml"&gt;&amp;lt;appender name="light" class="org.apache.log4j.DailyRollingFileAppender"&amp;gt;&lt;br /&gt;  &amp;lt;param name="File" value="${catalina.base}/logs/light.log" /&amp;gt;&lt;br /&gt;  &amp;lt;param name="Append" value="true" /&amp;gt;&lt;br /&gt;  &amp;lt;param name="DatePattern" value="'.'yyyy-MM-dd" /&amp;gt;&lt;br /&gt;  &amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;&lt;br /&gt;    &amp;lt;param name="ConversionPattern" value="%d{HH:mm:ss} %-5p %t %c{2} - %m%n" /&amp;gt;&lt;br /&gt;  &amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/appender&amp;gt;&lt;br /&gt;&lt;/pre&gt;This will create a file light.log, and at each midnight it will roll, renaming the light.log to something like &lt;code&gt;light.log.2009-09-02&lt;/code&gt;&lt;br /&gt;If you want to configure when the rollover happens, check the possibilities &lt;a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html"&gt;here&lt;/a&gt;.&lt;br /&gt;My only problem here was with the fixed, arbitrary filename (the current date/time is always appended to the end). If you want to change this, you have to look further.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Using org.apache.log4j.rolling.RollingFileAppender from &lt;a href="http://logging.apache.org/log4j/companions/extras/download.html"&gt;log4j companions&lt;/a&gt; you can specify the file-naming conventions as well. Configuration in XML:&lt;br /&gt;&lt;pre name="code" class="Xml"&gt;&amp;lt;appender name=&amp;quot;light&amp;quot; class=&amp;quot;org.apache.log4j.rolling.RollingFileAppender&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;rollingPolicy class=&amp;quot;org.apache.log4j.rolling.TimeBasedRollingPolicy&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;param name=&amp;quot;FileNamePattern&amp;quot; &lt;br /&gt;           value=&amp;quot;${catalina.base}/logs/light-%d{yyyy-MM}.log&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/rollingPolicy&amp;gt;&lt;br /&gt;  &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; &lt;br /&gt;           value=&amp;quot;%d{HH:mm:ss} %-5p %t %c{2} - %m%n&amp;quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/appender&amp;gt;&lt;br /&gt;&lt;/pre&gt;By changing FileNamePattern,  you can specify the format of the date in the generated log file's name. For more info about the possible configurations see &lt;a href="http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html"&gt;http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html&lt;/a&gt;. Don't forget to have the Apache Log4J Extras in your classpath!&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7696139615994864209-4775976297266890648?l=lajosd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lajosd.blogspot.com/feeds/4775976297266890648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lajosd.blogspot.com/2009/09/daily-logging-with-log4j.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4775976297266890648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7696139615994864209/posts/default/4775976297266890648'/><link rel='alternate' type='text/html' href='http://lajosd.blogspot.com/2009/09/daily-logging-with-log4j.html' title='Daily logging with log4j'/><author><name>doma</name><uri>http://www.blogger.com/profile/15614709126187348992</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/_eJmj5QN0w1M/Sp5CladJNdI/AAAAAAAAClM/FBPeRLqbNyc/S220/doma-atomium-medium.jpg'/></author><thr:total>0</thr:total></entry></feed>
