OpenShot – Finally, decent video editing for Linux

Using OpenShot I was able to make videos, edit them, insert new sections, add soundtracks, make a groovy 3D title sequence (using Blender behind the scenes). I exported output as AVIs and MP4s, was able to select a size format that perfectly suited my target (www.showmedo.com), and was able to work it all out without reference to the documentation. So this is a big vote of confidence in a brilliant project with a bright future. The developer is very talented (and not just as a developer, but also as a promoter etc) and I think it is safe to hitch my wagon to that program.

The few glitches I experienced were not very large and will probably not survive for too long.

As an example of what I was able to do with OpenShot, check out the Quick Overview video here:

SOFA taster video

Button click bug not GDK_NATIVE_WINDOWS

There was a persistent bug in SOFA Statistics regarding the Preferences bitmap button (wxPython). You would click the button and it would not activate. The associated image would change when you hovered the mouse over the button and the button would appear to have the focus but no click event would fire. Pressing the Enter key or space bar would activate it. Aha! I knew of a similar bug that had affected eclipse on Ubuntu (see What GDK_NATIVE_WINDOWS=1 means) – and setting the env variable GDK_NATIVE_WINDOWS to true was the workaround there. Would that work? Well it did under some circumstances and not others. Very frustrating. But also very interesting now that I know the underlying cause of the bug – namely, a missing event.Skip() at the end of the event triggered by moving the mouse over the Preferences bitmap button. That’s all it was. Nothing whatsoever to do with GDK_NATIVE_WINDOWS really. Adding that missing line solved the problem.

Ubuntuzilla thunderbird 3.1 problem fixed

Ubuntuzilla is a great way of having your cake and eating it. You can have the robustness of the Ubuntu repository system without foregoing the very best of Mozilla Firefox or Thunderbird (see Getting latest Firefox and Thunderbird on Ubuntu). But I did experience a big problem upgrading to Thunderbird 3.1. Clicking on the Thunderbird icon resulted in … nothing. The reason was that the Lightning extension was now incompatible. Solution?

  1. ubuntuzilla.py -a remove -p thunderbird
  2. sudo apt-get update
  3. ubuntuzilla.py -a install -p thunderbird
  4. Download addon for lightning that is compatible with 3.1 e.g. Lightning 1.0b2
  5. thunderbird -safe-mode
  6. Install new add-on – probably you downloaded it to your desktop
  7. Restart Thunderbird

Xdebug restored on Lucid for Netbeans

[Update for Ubuntu 14.10 and Netbeans 7.4

php.ini was in /etc/php5/mods-available/

Needed the following:

zend_extension = "/usr/lib/php5/20121212+lfs/xdebug.so"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

]

When I upgraded from Netbeans 6.7 to 6.8 I lost the ability to debug line by line. Later, I upgraded to 6.9 in the hope that this would fix it. It didn’t but the Netbeans error message for xdebug gave me a better steer towards useful resources. My system is Ubuntu Lucid (10.04) so I looked at http://wiki.netbeans.org/HowToConfigureXDebug#How_to_on_Linux. The answer for me was to edit a line in an xdebug file (I had previously added recommended lines * to php.ini to no avail – at least, not in isolation).

cd /etc/php5/conf.d

sudo gedit xdebug.ini

The first line of xdebug.ini was _almost_ correct 😉

Because I was using PHP 5.3 the key was zend_extension rather than zend_extension_ts. That part was right. But the path was not quite correct. Instead of:


zend_extension=/usr/lib/php5/2006 ... +lfs/xdebug.so

it needed to be (in my case):

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

[Update – now /usr/lib/php5/20121212+lfs/xdebug.so]

Make sure the path actually exists and hasn’t become orphaned during an upgrade.

I then stopped and started apache and restarted Netbeans to be safe.

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 start

—–

* Here are the lines you will probably already have added:

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

Restored Audigy Sound on Lucid

All sound suddenly stopped about 6 weeks after I upgraded to Lucid. Everything seemed right but still no sound. On the volume control, I could even see the sound bar pulsing in sync with the music:

Volume Control

Volume Control

Another computer in the house has identical hardware and also runs Lucid but I couldn’t find any differences. Even swapped the sound cards as a test but still no luck. Here is what worked in my case:

1) sudo apt-get install gnome-alsamixer

2) Now open GNOME ALSA Mixer from Applications>Sound & Video>GNOME ALSA Mixer

3) Untick IEC958

Unticking IEC958

Unticking IEC958

4) Enjoy music again!

UPDATE: To get the microphone working e.g. for Skype, need to enable Analog Source.

Getting latest Firefox and Thunderbird on Ubuntu

OK – you have Ubuntu and you want the latest versions of Firefox and Thunderbird. Unfortunately, they aren’t in the current repositories. You consider the option of manually installing from debs but that undermines one of the benefits of desktop linux – the way it automatically keeps your applications up-to-date for you. So what’s the answer? Thanks to the brilliant Daniel Folkinshteyn, there’s Ubuntuzilla. Here is how I got Ubuntuzilla to work for me:

1) in terminal run:

echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list > /dev/null

2) then run:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29

3) and:

sudo apt-get update

4) Download ubuntuzilla deb from here: http://sourceforge.net/projects/ubuntuzilla/

5) Install ubuntuzilla

6) Install Firefox first using command

ubuntuzilla.py

7) Install Thunderbird 3 using command

ubuntuzilla.py --package=thunderbird
(NB there are two dashes before the word package)
I think the following also works:
ubuntuzilla.py -p thunderbird

In both cases, you get a choice of language and whether to backup everything (choose y for the latter 😉 ).

Then get the personas extension for Thunderbird and choose a persona, get the lightning calendar add-on, and choose a persona for Firefox. You’re good to go.

See also:
easily-upgrade-your-firefox-to-35-in-ubuntu
and
http://sourceforge.net/apps/mediawiki/ubuntuzilla
and if you have problems upgrading to 3.1 see Ubuntuzilla thunderbird 3.1 problem fixed

Karmic MySQL Server Problem Fixed

The Karmic upgrade went really well but MySQL server seemed to die along the way. A temporary solution that worked for me was found here – http://ubuntuforums.org/showthread.php?t=1040786.

sudo apt-get remove --purge mysql-server-5.1
sudo apt-get autoremove
sudo rm -rf /etc/mysql
sudo apt-get install mysql-server-5.1

[update] This solution doesn’t persist after reboot (at present). Still useful if I need to test MySQL but not a proper answer.
[update] running
sudo /etc/init.d/mysql start
does the trick. Not sure why it isn’t happening automatically on startup.
[SOLUTION]
The mysql file was in /etc/rc3/, rc4, and rc5, but not rc2. Why? No idea at all. Anyway, a quick gksu nautilus and copying S19mysql (yours may have a different number) and pasting it from rc3 into rc2 later, then a reboot to be sure. Working as needed. NB a prefix of K means deactivate.

To see if mysql is running:

ps -ef | grep mysql

a single line response (your mysql client?) is not a good sign.

Here is on thread of interest: http://ubuntuforums.org/showthread.php?p=8320705

Here are the main resources I found useful:

http://brainwreckedtech.wordpress.com/2008/04/25/ubuntu-804-bug-with-mysql-and-apparmor/
http://case.oncle-tom.net/2008/05/04/modifier-emplacement-donnees-serveur-mysql/
http://www.hobbes.ch/2009/11/mysql-stopped-working-after-update/
http://ubuntuforums.org/archive/index.php/t-1305921.html
http://ubuntuforums.org/showthread.php?t=1322070
http://bugs.mysql.com/bug.php?id=47195
http://www.mail-archive.com/ubuntu-server-bugs@lists.ubuntu.com/msg16084.html
NB My AppArmor mask denied etc didn’t affect the working of the system so was a bit of a side-track in my case. Mainly affects you if you don’t use standard path locations.
http://en.opensuse.org/AppArmor_Geeks
http://www.vanimpe.eu/blog/2009/01/13/requested_mask-denied_mask-errors-on-ubuntu-with-mysql/