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