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.

SVG and the Future of Web Development

Sitepoint (Meitar Moscovitz) has an interesting article on SVG – SVG Is The Future Of Application Development. The blog item introduced me to the Sun Labs Lively Kernel project amongst other things. I have worked with SVG before – initially just making clipart in Inkscape, and more recently doing some geomapping. I found it clean and simple. Using SVG also meant I could develop my own tools for working with it which is what open standards is all about.

Which brings me to some of the comments on Moscovitz’s article. Some responses suggested that SVG was redundant because Adobe had shifted in another direction. The possibility of a single vendor abandoning a technology others have come to rely on is precisely why I think we should support open standards. We should support them in preference to proprietary systems unless the alternative is compelling (I have yet to find a good alternative to MS Access for some purposes, for example, but I am keeping an eye open). In addition to safeguarding against abandonment, using open standards increases competition in the tools space. MS IE 6 is an example of what can happen when a dominant vendor feels a lack of competition.

Other comments related to the lack of support for SVG in IE (for the foreseeable future). The argument was that if IE didn’t support it then there was no point using it. I don’t think it is that simple. IE is still dominant but there could be many cases where web application development could assume that a standards-compliant web browser would be used (e.g. kiosks; an intranet; a web application aimed at home users which the home users were highly motivated to use). Anyway, the future could surprise us. Who ever thought they would see Microsoft support ODF or portray itself as open-source friendly!?

I won’t be using this technology myself at this stage but I wouldn’t be surprised if it is something I need to add to my toolkit in 5 years time.

Support Creative Freedom and Better Copyright Law

The creative freedom initiative is well worth supporting. Here is a summary and a link:

As the natural world meets the digital opportunities are opening up for artists to connect with new audiences across the world. However, with the digitisation of media the lines between use and copy have become blurred. Laws regulating the act of copying have failed to keep pace with technology and soon ISPs will be forced to take down internet connections and websites of anyone accused (not convicted) of copyright infringement. Copyright law is now having the effect of limiting artists, restricting businesses, and harming public rights. The Creative Freedom Foundation speaks for artists concerned at this trend and through Our Goals we seek to bring Copyright Law into the 21st Century.
http://creativefreedom.org.nz/

I should also mention this release from the NZ Open Source Society http://nzoss.org.nz/news/2009/nzcs-claims-copyright-law-ethically-flawed – the groups opposed to this egregious legislation is very respectable.

Posted in IP

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).