Digital Base – Blog » ubuntu

Developer Faster with lightning fast Eclipse

Posted by Gijs Nelissen in Programming

When maintaining & developming large web applications you might notice that eclipse slows up a bit. Building workspace, showing the autocomplete or syntax highlighting might take a while to load. The solution for this is to optimise your eclipse.ini and tell your favourite PHP development IDE to use more memory.

After installing eclipse you open the eclipse.ini in the root. If you followed my previous post, the default settings should be something like this :

-startup
plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m

This means eclipse will use in between 40 and 256mb. These default settings will allow you to run Eclipse on a pre historic PII with less then 1GB ram, although i wouldn’t recommend that.

Most of you, especially developers working in a development agency, will have powerful workstations. So lets tell eclipse to use a bit more resources

-startup
plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m

I changed the xms, xmx and xx:maxpermsize settings.

What does it mean ?

  • Xms sets the initial Java heap size
  • Xmx sets the maximum Java heap size
  • XX:MaxPermSize allows for the JVM to be able to grow the PermSize to the amount specified. Initially when the IDE is loaded, the MaxPermSize will still be the default value but will not actually take up that amount until it is needed.

Custom .debs for Symfony (1.0/1.1 & 1.2) for Debian/Ubuntu

Installing multiple versions of symfony

As i wanted to test some of my projects compability against symfony 1.1, i wanted to install multiple symfony versions on my system. The main reason for this i want to keep the default symfony installation on my desktop as well as on our production environment.Â

Now as you know, we are working with 5 workstations and multiple servers. So it’s a real pain in the *** doing this stuff all over again on each of those machines, so i decided to create some .debs.

The Solution

Thanks to a great guide posted on the Symfony Wiki i was up & running in under 5 minutes. I had to check out the different versions, create some folders to hold the different symfony installs and create some symlinks to make sure you can use those different versions by command line.

The Packages

I created 3 different packages for each version of symfony. You can install as many as you like, as those will all use a different path. Direct Link .

I tested these packages on an Ubuntu Hardy & Feisty and it works like a charm. Let me know if it doesn’t for you.

If you have a hard time figuring out which version of the symfony framework you want to use for your project, check this post

Show me the magic

You can see you now have 3 (or 4) different versions of Symfony available to you.Â

 Multiple Version of Symfony On the same system

Configuration

Now the hardest part (if you can even call it that). Howto tell your symfony application which symfony to use ? Just go to your applications config/config.php and update the paths to the corresponding version.

[code]#52[/code]

Don’t forget to also update the /js path in your virtual host configuration , change the version to the one you want to use for this project.

Alias /sf /usr/share/php/symfony_1.0/data/web/sf

Feedback/Suggestions welcome, just send an email to info@digitalbase.eu Â

Update : if you have a problem opening PHP files (error occured during Selection Job Title) here is my follow-up post (the fix)

Ubuntu : Thunderbird 2.x + Lighning : Sidebar Problem

The Problem

When using thunderbird 2.x and migrating profiles from one computer to another, i bumped into a lightning + thunderbird error where the calendar sidebar was shown on the left side without a way to disable/hide this bar.

 thunderbird + lightning sidebar bug

That problem is just way to irritating to ignore, as it would cause thunderbird to behave unexpectedly when browsing through email etc…This is clearly not normal behaviour and shouldn't happen.

More details

My google searches tell me this bug happens only when using Thunderbird 2.x and Lightning 0.8+ on an Ubuntu / Debian platform. Please tell me if you reported this problem on another environment.

The fix

First uninstall lightning and close down thunderbird

Then install the "libstdc++5 " package (it's in the official aptitude repositories ) so just :

[code]apt-getinstalllibstdc[/code]

Now reinstall lightning and fire up thunderbird (you can use synaptic to install lightning). That's it, a real easy fix for a simple problem.

Some more info :


http://ubuntuforums.org/showthread.php?t=624655
: a thread on ubuntu forums that suggests to uninstall thunderbird + lightning and tells you to go for ubuntuzilla , a pretty heavy workaround/fix if you ask me.Â

My Frustration : Ubuntu Hardy Heron and Eclipse PDT

As PHP developers we use ubuntu (now trying Hardy Heron 8.04), but for Eclipse PDT you need Eclipse 3.3 (that is not included in ubuntu repository). Eclipse 3.3 is about 1 year old, and 3.4 will be in testing pretty soon, so for me it's really not clear why Eclipse 3.3 is not the default choice for Ubuntu 8.04.

So we include Firefox 3b05 by default, but we are using an old version of Eclipse ?

Please vote for the idea to include 3.3 by default or provide an easy way for users to upgrade.

More information at launchpad bug #123064

setup a vpn server (pptp) server under ubuntu

it’s actually quite easy to setup a pptp vpn server for windows/*nix client on a ubuntu serverÂ

first off all we install pptpd ( PoPToP Point to Point Tunneling Server)

[code]install pptpd[/code]

 after that we edit /etc/pptpd.conf

[code]pptpd.conf[/code]

then we edit /etc/ppp/options

[code]options[/code]

and then we edit /etc/ppp/pptpd-options

[code]pptpd-options[/code]

and as last we edit the user file /etc/ppp/chap-secrets

[code]chap-secrets[/code]

and finaly we restart the pptpd using the command:

[code]restart pptpd[/code]

so you see … it’s not that hard to install a microsoft vpn tunnel server on a ubuntu server Â

scp sftp support in Krusader (ubuntu gutsy)

By default the scp/sftp support is not installed when running krusader in a gnome environment). If your 'new net connection' only lists ftp, this is the case for you.

This means you are missing some kde libraries allowing krusader (or other kde apps) to use the scp/sftp protocol

[code]gutsy - krusader fix[/code]

This should do the trick..