Search This Blog

Tuesday, February 16, 2010

Ubuntu DVD - remove region on copy

My goal:
copy a DVD and remove the region code
I have a DVD with a region code that won't play in my DVD player.  I tried a few solutions, but they did a full copy, including the region code!

Then I tried k9copy.  This can be loaded from the Ubuntu Software Center.  It installs the k9copy application and the k9copy assistant application.

The k9copy Assistant
Screen 1 - selecting the source


Notice there's a Settings button in the bottom left hand corner.  I'm not going to show you all the settings - but you have plenty to play with!

Screen 2 - selecting the activity


In my case, I selected the Rip and encode DVD.  This allows you to copy a DVD to a blank DVD with a lot of control.  If you take the default settings, it works very well.

Screen 3 - select the destination


k9copy assistant will choose a default folder and filename.  I left this unchanged, but it's up to you.

Screen 4 - select the elements you want to copy


Now we're getting somewhere.  You select/deselect by clicking the grey square next to each title.  If you want the whole DVD, click each one.  By clicking on a line, you can preview it in the small window - this makes it very easy to copy only what you want.

Screen 5 - confirmation


Your selected elements are shown, together with the language option you have chosen (in Settings).

Screen 6 - copy options at element level

You now have the ability to fine tune exactly how you want to copy each element.  The only default option I chose was 2 pass option, which is slower but performs an improved, constant quality encoding.

From here on, k9copy provides the status of the operation and prompts you when it's time to load the blank DVD.

In Summary
I found the k9copy assistant is very easy to use. There are a myriad of options that provide control over just about anything you would wish to change.  However for straight copying, just leave the defaults.  Once you get used to it, try using the straight k9copy application.



Friday, February 5, 2010

androidVNC + DynDNS + X11vnc = accessing my laptop from my phone!

The goal: "to be able use my phone/PDA to access my Ubuntu laptop at home as if I was sitting at it."

OK, so over the past few posts I've covered things like Ubuntu, Android on my Motorola Milestone and a few other topics.  This post brings a few of these themes together into a very useful capability.

Have you ever been somewhere and thought "I've got that on my PC at home.  I wish there was someway I could get to it."  Well now you can.  The diagram below provides a graphical view of how the solution fits together.  I will cover the technical aspects in words and links.

The ingredients are:
  • Motorola Milestone (or any phone/PDA running Android)
  • androidVNC, a free application available in the Android Market
  • Ubuntu on your PC or laptop (most Linux distros supported)
  • X11vnc, free server software (author would like donations) for your home machine
  • DynDNA, a service that gives you a free URL to point to your home network
  • Port forwarding on your router
And this diagram provides a high-level view of the solution...


    Overcoming Challenges
    I tried several free apps from the Android Market and, whilst they all work, I found that I preferred androidVNC because it had a better selection of settings to alter its performance.

    On the Ubuntu side, I tried several of the VNC solutions like Vino, vnc4server, etc.  The problems I found with these solutions is that, although they displayed the initial screen on my laptop OK, they never refreshed it.  I eventually settled on X11vnc (created by Karl Runge) after wading through a lot of dismay from people, like myself, who are running Ubuntu 9.10 (Karmic Koala).

    How do I make my machine available from outside my home?
    I'm using the Broadband cable service from Optus (Optusnet).  It is connected to a D-Link DIR655 Router in my home.  The router provides both wired and unwired connectivity.

    Step 1: Port forwarding
    Port forwarding allows you to direct certain network traffic from/to a machine on your home network.  I'm not going to go into each detail here; suffice to say you need to forward ports 5500, 5800 & 5900 to your machine.  The Port Forward web site provides excellent advice for most routers.  You will also need to configure your router to set a fixed (internal) IP address for your machine.

    Step 2: Finding your network from the Internet
    Telco providers assign a single IP address to each of their customers.  Unless you have a business pack, the IP address is not fixed and it can change at any time; you will not know when or how often.  The solution?  DynDNS!  DynDNS provides free and paid DNS services.  The free service is more than enough for our needs.  Simply register at http://www.dyndns.org/ and select your URL from a large list.  The URL will point to the IP address of your home network.  But hang on!  That can be changed at any time by your telco.

    Correctomundo!  So that's why you install the free software from DynDNS that you can configure to run on your machine.  It checks to see whether the IP address of your network has been changed by your Telco.  If it has been changed, it tells DynDNS, who immediately point your URL to the new IP address - wonderful!  DynDNS provide 2 software clients, I used the "ddclient" option.  They provide online examples on the configuration file.  Start off using the basic example to get going.

    Let's see where we are so far.  You have a your own URL that will always point to your home network.  VNC traffic (that uses ports 5500, 5800 & 5900) will hit your router and be directed to your machine.  Now we need some software...

    Step 3: X11vnc Server

    NOTE THAT THIS SOLUTION IS FOR THE GNOME DISPLAY MANAGER (GDM).  YOU WILL NEED TO MODIFY IT FOR KDE

    For Ubuntu 9.10, you need to install version X11vnc-0.99.  Kamal Mostafa has done an excellent job of packaging this up for Ubuntu 9.10 hereSince we want the server to start automatically, then we need to do some work. Here are the instructions to achieve this (acknowledgement to ErikTheRed - original post here) - my comments are in RED:

     1. Install the package

    Code:
    sudo aptitude install x11vnc
     2. This step no longer required

     3. Add x11vnc service to xinetd

    Code:
    sudo nano /etc/xinetd.d/x11vnc
    Enter this into the new file:
    Code:
    service x11vnc
    {
            port            = 5900
            type            = UNLISTED
            socket_type     = stream
            protocol        = tcp
            wait            = no
            user            = root
            server          = /usr/bin/x11vnc
            server_args     = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
            disable         = no
    }
    I have changed the value after -auth in the server_args parameter as with GDM it is a static file.

    4. Restart xinetd

    Code:
    sudo /etc/init.d/xinetd restart
    We now have X11vnc running on our Ubuntu machine and it can be accessed from the Internet.

    Step 4: androidVNC
    To download this app, simply open the Android Market app on your Android phone/PDA and install it.


    The cake is now baked - time to eat it.

    Fire up androidVNC and connect.  Here are some screen shots showing you some typical settings.


    Note: in the screenshots below, the shaded area followed by ":5900" is the URL you defined at DynDNS.




    Once you have connected to your machine, you have other androidVNC settings to play with.  I am not going to explain the whole application as it's pretty intuitive.

    I strongly advise you to leave your machine in Locked Screen - which means your password has to be provided in order to access Ubuntu.  If you want additional security you can configure X11vnc to prompt for a password or you can even use SSH to create a secure connection.  When you have finished, simply Lock Screen, then disconnect the androidVNC session by selecting Settings on androidVNC, click on More, then Disconnect.

    Enjoy!

    Monday, February 1, 2010

    Sikuli - Does that mean it's "sick" AND"cool"?

    Image-based Scripting
    OK - so what does that heading mean?  Well, over the years (decades) there have been many ways - mainly proprietary - to automate the things we do on our PCs.  These solutions are quite often command line interfaces that do not work well in today's ultra-graphical user interface (uGUI - yep, that's mine, just coined it!)

    So what do we need?  We need something that works across the PC operating systems like Linux, Mac OS X and Windows.

    Well the bright ones at MIT have a project called Sikuli that provides a new way to approach scripting or rather automating tasks based on graphical or image matching.  You capture the graphical area on the screen then paste that after an action like "click" in the Sikuli editor.  For instance, say you want a way to script your username/userid and password for any graphical application INDEPENDENT OF THE BROWSER YOU ARE USING - then you could do that with Sikuli.  You can fill in forms, automate menu traversal, etc.

    But, don't be limited by my explanation, have a squizz at their demo.

    This means you can save scripts (or should this be albums/galleries?) of automated tasks like opening up your email, setting admin attributes on/off, etc.

    If have just downloaded and installed the Linux version and will update this post with comments after I have taken it for a test drive - stay tuned...