Eclipse 3.4 Ganymede On Ubuntu Intrepid

The Ubuntu Intrepid repository only has eclipse 3.2. I had lots of problems with that version (hanging etc) and it was ruining my programming experience. So I uninstalled it and downloaded the latest tar.gz file from the eclipse downloads page. Then I simply extracted everything under my home folder. The new path is /home/myusername/eclipse/eclipse. Brilliant. And it seemed to keep all my existing projects. The only thing was to get pydev and the pydev extensions working. For some reason this was incredibly slow but eventually it succeeded and everything was working just like I wanted. Only one thing to get. A logo for the menu item. I found an answer here: http://www.bearfruit.org/blog/2007/08/09/eclipse-svg-icons.

Here is how some other people did it (including blow by blow instructions) – http://midnight-freak.blogspot.com/2008/08/eclipse-ganymede-in-ubuntu.html.

NB there may be various things installed on my system which made it as easy to install as described. In particular, I probably had the latest java packages installed when I ran the one-step restricted updates command Ubuntu Multimedia, MS Fonts etc in One Command!.

Ubuntu Multimedia, MS Fonts etc in One Command!

I have always wanted a one-step way of getting a Ubuntu machine set up and ready to go. This doesn’t handle everything I need (e.g. Broadcom wireless and NVidia) but it is pretty close 🙂 .

The Ubuntu Restricted Extras will install Adobe Flash Player, Java Runtime Environment (JRE) (sun-java-jre) with Firefox plug-ins (icedtea), a set of Microsoft Fonts (msttcorefonts), multimedia codecs (w32codecs or w64codecs), mp3-compatible encoding (lame), FFMpeg, extra Gstreamer codecs, the package for DVD decoding (libdvdread3, but see below for info on libdvdcss2), and the unrar archiver. This is a single command approach.
sudo apt-get install ubuntu-restricted-extras
http://ubuntuguide.org/wiki/Ubuntu:Intrepid#Restricted_Extras

For more on the Microsoft fonts read http://ubuntu.wordpress.com/2005/09/09/installing-microsoft-fonts/.

Dual booting with GRUB, Ubuntu Jaunty, and Ext4

Ubuntu Jaunty Alpha 3 gave the option if using ext4 so I gave it a try on my experimental machine. There were already partitions for Win 98, Win XP, Intrepid, Kubuntu, and Jaunty Alpha 2. The new grub installed by alpha 3 worked fine but I wanted to reuse the menu.lst file in my Intrepid partition. I rebooted into the Intrepid partition and used the standard tricks with grub (see Win98, WinXP, and Intrepid Partitions to reinstall grub and point it to menu.lst in the Intrepid partition. I added the updated details for jaunty and rebooted. Big mistake. That version of grub didn’t work with ext4. Sigh. So I reinstalled Jaunty and simply modified its menu.lst based on the details in the Intrepid menu.lst that I wished to keep (e.g. the splash screen). Success. And now to start working with Jaunty (which is where I am posting this from).

Fine tuning Logitech Quickcam Chat in Ubuntu Intrepid

I have managed to get the Logitech Quickcam Chat working under Ekiga and Cheese in Ubuntu Intrepid but at night time my images were very dark. And there was no way of adjusting the brightness.

The solution was found here: http://ubuntuforums.org/archive/index.php/t-984126.html. I installed v4l2ucp from http://www.debian-multimedia.org/dists/stable/main/binary-i386/package/v4l2ucp.php. Ran it from the terminal with the command v4l2upc and got a GUI. Exposure was the main setting I adjusted. The frame rate plummeted as the exposure increased (this thread suggests a direct link between the two) so I set it at the slowest frame rate that was satisfactory. I also found that spotlights do not light my face at all well and a side lamp makes the image much, much brighter, thus allowing a faster frame rate.

Citrix ICA Client under Ubuntu Hardy

A friend needed to get into their work Citrix network from Ubuntu Hardy but they were stymied by instructions about installing an ICA Client for Linux. The fact that the login page had links to vastly out-of-date ICA clients for linux didn’t help. The latest ICA client can be found here: http://www.citrix.com/site/SS/downloads/details.asp?dID=2755&downloadID=3323&pID=186#top. Version 10.6 was the most recent I found. We got the .tar.gz version and we needed to unpack it somewhere and run setupwfc. The easiest way to do this was to create a folder under tmp:

mkdir /tmp/citrix/

Then open nautilus (the Gnome file manager) as superuser to make the other steps easy:

gksu nautilus
NB gksu not sudo when a graphical application

Unpack the tar.gz file e.g. en.linuxx86.tar.gz into /tmp/citrix
Then double click setupwfc and select Run in Terminal. Follow the defaults.

The final step is to enable the appropriate permissions:

sudo cp /usr/share/ca-certificates/mozilla/* /usr/lib/ICAClient/keystore/cacerts/

(Thanks to http://blog.torh.net/2008/02/29/problems-with-citrix-client-on-linux/ for that solution.

Better Python Console Gedit Plugin

Just came across Better Python Console – which is a plugin for Gedit, the main text editor in Ubuntu. Think of it as being like IDLE. I use Eclipse with PyDev and the PyDev extension for heavy development and the console for anything quick and dirty.

Get the plugin, plus some basic info, here –
http://live.gnome.org/Gedit/Plugins/BetterPythonConsole/Walkthrough

Remember, to work successfully, the betterpythonconsole needs the plugin file (“betterpythonconsole.gedit-plugin”) copied into the /usr/lib/gedit-2/plugins folder. The betterpythonconsole folder (containing 4 or so scripts only) needs to be there as well.

Audigy Ubuntu Sound Problem Solved (Digital Jack On)

I couldn’t get any sound from the family/business computer’s Audigy 2 card under Ubuntu Intrepid. Strange – it worked under the dual boot Windows. And I was sure I had had it working before. The problem? Under Sound>Switches the Audigy Digital Jack was set to On. I set it off, made sure all the sound was set to AutoDetect, and rebooted. Voila – sound.

Vinagre remote desktop in Ubuntu

Providing support to relatives is a lot easier when you can shell into their computer remotely. Sometimes you will just want the command line (much faster), and other times you will want to remote into their desktop (you can see user situation easier). Here is one way to set it up when the machines at both ends run Ubuntu.


SETUP

Remote computer

  • They need Ubuntu (presumably any other distro will do but I prefer a Ubuntu monoculture for support reasons)
  • They need sshd installed. If you type sshd in their terminal it will tell you the command for installation (very simple one-liner)
  • Under System > Preferences > Remote Desktop > Sharing they will need to “Allow other users to view your desktop”, “Allow other users to control your desktop” but not “Ask you for confirmation”.
  • Set up “http://www.whatismyip.com/” or “http://www.showmyip.com” as a button on their Firefox toolbar so you can identify their current IP address for shelling in. You will need to know the current IP each time unless they have a static/fixed IP address from their ISP, which is less common.
  • Give each remote machine a static IP address (NB this is the internal IP address within the router’s boundaries, not the IP address your router connects to the outside world as (provided to to it by the ISP, often dynamically))
  • Create a new user for you to log in as via Administration > Users and Groups. Give that user admin rights and make them the only user allowed to access ssh. Do the latter:
    sudo gedit /etc/ssh/sshd_config
    add new line on end and a blank line after it. May need to reboot (may not). NB sshd not ssh.
    The new line is AllowUsers new_user_name_here

Remote ADSL modem (Dynalink RTA1320 as example)

  • Open browser and log into modem (http://192.168.1.1 has typically worked)
  • Set up ADSL modem to allow packets from obscure port through to ssh port (22). On some modems you set up a NAT rule, some you configure port forwarding (basic) etc. The Dynalink RTA1320 has it under Advanced > Virtual Server > Port Forwarding.
  • For each machine on the remote network (e.g. desktop and laptop) create a port forwarding rule. Select User Defined, provide an arbitrary label, set a use TCP/UDP as the type, external ports set to XXXX where XXXX is the obscure port (NB different for each machine), and internal port to 22 (upper and lower both to 22). So port requests from XXXX will be forwarded to the ssh port (22) of the appropriate machine.

CONNECTING

  • Open secure shell into remote machine:
    ssh -L 5900:localhost:5900 new_user_name_on_dest@PC_IP -p obscure_port
    The PC_IP address will frequently change so try the last one and then ask user to visit www.showmyip.com and tell you the new one. The obscure port was set in your port forwarding for the IP address of the remote machine you are accessing.
  • First time with any new IP address will need to say “yes” (not “y”, “Y” etc) to RSA key creation.
    Otherwise just need password for new_user_name_on_dest.
  • (NB to exit when finished)

NB can work from the CLI for file management tasks etc. Only open remote desktop viewer if seeing the screen (or user interaction) is useful. The interactive experience is not exactly snappy 😉 .

To use remote desktop, open remote desktop viewer (Vinagre) Internet > Remote Desktop Viewer
Connect:
Host: localhost
Under Hardy you needed to specify port of 5900 as well but not in Intrepid.

NB to close shell in terminal after finishing Vinagre session.

Palm m515 and Ubuntu using JPilot

Gnome-pilot looks like a good answer – but only if you want to use evolution.

First, gnome-pilot is a gnome product, as is evolution. Thus, I believe, that gnome-pilot will only work with evolution, not thunderbird.
http://ubuntuforums.org/showpost.php?p=6200523&postcount=3

I ignore the standard “built-in” Palm app under Ubuntu, namely “gnome-pilot” – although it does work well and has a wizard set-up etc. It integrates well into the default organiser (PIM) environment in Ubuntu/Gnome (evolution).
I tried evolution and I don’t like it… not because it doesn’t work.. it does, quite well…. I prefer to use Mozilla Thunderbird for email.
If you want to try it (in Ubuntu) go in the main Gnome menu to “System -> Preferences -> PalmOS devices
====
So… What do I use…?
I use jpilot.
This is a (kind-of) Palm Desktop clone – with the 4 main apps (datebook, todo, memo, address book).
http://www.palminfocenter.com/forum/viewtopic.php?t=34701

JPilot works fine but it gives you the equivalent of the Pilot interface. So no easy integration with Thunderbird that I could find.

In either case you need to connect via usb:
At the Device Settings screen, click the radio button for USB and then click the down arrow at “/dev/pilot”. Select “usb:” from the pull-down menu. Older instructions are different but I think newer versions of Ubuntu use usb: now.

JPilot works fine though if you press the sync button on the Palm device sync cradle first and then the sync button in JPilot a second or so later. Bidirectional synchronising of calendar appointments etc.

If you don’t do things in the right order you might get an error containing: “Exiting with status SYNC_ERROR_PI_CONNECT” (See http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/unable-to-sync-palm-tx-with-j-pilot-406142/#post2640531).

Netbeans, PHP and Ubuntu

Netbeans was recommended as a good IDE for PHP in a sitepoint blog item recently. So I thought I’d check it out. The version in the Intrepid repository was a bit old (6.1) so I grabbed the version which included PHP support from the Sun website. The result was a file called “netbeans-6.5-ml-php-linux.sh” which I ran by the command:
bash netbeans-6.5-ml-php-linux.sh

Strangely, the Project properties had an extraneous ~username/ in the source path (under project properties > source). This was easily removed.

The other thing I needed to add was xdebug support (I had already set up Apache, PHP, and MySQL previously). This was surprisingly easy. There were some excellent instructions here, here, and here.

sudo apt-get install php5-xdebug
Open file /etc/php5/conf.d/xdebug.ini e.g.
sudo gedit /etc/php5/conf.d/xdebug.ini
and add line:
xdebug.remote_enable=on
Then restart apache:
sudo /etc/init.d/apache2 restart

The debugging worked well and I found everything intuitive. I think I have my new PHP IDE for Ubuntu 🙂

And the development is ongoing. Check out the blog at http://blogs.sun.com/netbeansphp/ for a sense of where things are going.

The sitepoint blog item also included some excellent tips on how to use the functionality to make life easier. Worth bookmarking.

UPDATE – even better I managed to get client-side debugging to work as well so I can click on buttons in my web databases and follow the steps through checking variable values as I go. The key is to install the netbeans firefox extension. This was done automatically when I selected “Server side PHP with client side Javascript etc …” as the debug option and Firefox. I was given the option of installing the browser addon. Fantastic ever since. Just turn debug listening on at the Netbeans end and you are away. Apparently it will be possible to activate this listening from the browser end in a newer version of Netbeans (http://forums.netbeans.org/post-9585.html).