Tag Archives: Ubuntu

xterm on Ubuntu 12.04 manages to party like it’s 1989

In one of those moments when the occasional rough edge in Ubuntu’s otherwise highly polished desktop environment sticks out like a sore thumb:

xterm icon in Ubuntu 12.04

xterm, you uuuuuugly. Still, not too hard to replace the icon with something a bit less jarring.

Advertisements

Add a single video to the XBMC video library

In the latest (version 11) release of XBMC, the ability to add single videos manually to the XBMC library has been removed. In version 10, all one had to do was right-click on a video file in the XBMC user interface, and from the contextual menu that appeared select “Manually add to library”. This is no longer the case in version 11, but rather than go into the potential reasons for the removal of the feature, let’s simply describe how to add a single video file manually.

This is obviously most useful for media files which aren’t detected automatically by XBMC’s media scrapers. In the example I’m using, it’s a technical presentation made by the Nuxeo ECM developers.

First, one has to create an NFO file for each video that needs to be added to the XBMC library. Ensure that both the video file and NFO file are both placed in a directory which is already an XBMC media source. Use your favourite text editor to create the file, give it an .nfo extension, and name it after the same name as your source video file:

Create an NFO file

The contents of the NFO file are very simple – the “title” value should match the name of the video file, for example:

<movie>
  <title>Digital_Asset_Management_with_Nuxeo</title>
</movie>

 

Finally, firing up XBMC and running a media scan (or not, if you’ve set it up to do it automatically) will result in the video being available for playback from your XBMC library:

Single video file detected by XBMC

Enable Nuxeo Live Edit with LibreOffice and Firefox

Following is a quick how-to, as apparently Live Edit with Nuxeo DM 5.5, LibreOffice, Firefox, and the Nuxeo-provided plugins doesn’t work that well out of the box.

My example platform is Ubuntu 10.04 x86, Nuxeo DM 5.5, LibreOffice 3.4.6 (with the LibreOffice Java support packages installed as well), and Firefox 11.

 

First, grab the Nuxeo add-ons for LibreOffice and Firefox, respectively:

http://download.nuxeo.org/desktop-integration/live-edit/nuxeo-liveedit-ooo-lateststable.oxt

https://updates.nuxeo.org/desktop-integration/live-edit/nuxeo-liveedit-ff-protocolhandler.xpi

The latter link Nuxeo refers to as the “protocol handler” for Firefox, but let’s just say that both are needed to enable Live Edit functionality.

 

The LibreOffice add-on once installed requires no configuration (and there are in fact no preferences to set). The Firefox add-on however requires manual configuration – as the default settings are inadequate.

Referring to the below screengrab, we have entered our Nuxeo user credentials for automatic server access when saving documents to Nuxeo from LibreOffice. We have set the /tmp directory as our working directory – but note that the path must have the trailing forward slash (i.e. “/tmp/” will work, but “/tmp” will not). We have retained a single default “OpenOffice.org” mapping, but we have changed the editor command to that of LibreOffice 3.4:

Nuxeo Live Edit Firefox add-on settings

That should be all that is needed. When you click the “Edit Online” icon from within Nuxeo you should observe LibreOffice launching and opening the document for editing automagically. Likewise, clicking on the “Save in Nuxeo” icon in LibreOffice should push the document back up to the server without error:

Nuxeo - edit online

LibreOffice - Nuxeo Live Edit

Importing Firefox RSS bookmarks into Thunderbird

(This guide has been updated for Thunderbird version 31.2.0, running on Ubuntu 14.04.)

Although I’ve tended to use Firefox to subscribe to RSS feeds via its Live Bookmarks feature, turns out Thunderbird can import Firefox bookmarks with the help of a third-party add-on. In this way, you can use Thunderbird to subscribe to any number of your existing Firefox bookmarked RSS feeds, without otherwise having to manually subscribe to each one in turn.

 

First, download the Firefox OPML Support add-on here:

https://addons.mozilla.org/en-us/firefox/addon/opml-support/

Install the add-on in the normal way, and restart Firefox. After restarting, go to “Bookmarks -> Show All Bookmarks” where you will observe new “OPML” entries under the “Import and Backup” menu. We want to select the “Export OPML…” command:

Exporting OPML file

I have used the following export settings:

OPML export settings

Save the resulting .opml file somewhere convenient.

I have noticed that the OPML file in its present state doesn’t appear to successfully import a flat listing of RSS feeds into Thunderbird, without first performing the following edits. Our unmodified example .opml file contains the following (we’ve only got a few RSS feeds to export for this particular example):

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
	<head>
		<title><![CDATA[Live Bookmarks OPML Export]]></title>
		<dateCreated>Tue Oct 15 2013 00:38:07 GMT+1300 (NZDT)</dateCreated>
	</head>
	<body>
<outline text="Bookmarks Menu">
</outline>
<outline text="Bookmarks Toolbar">
<outline type="rss" version="RSS" text="Apertura Designs blogs" htmlUrl="http://www.apertura.co.nz/blog" xmlUrl="http://www.apertura.co.nz/blog/feed" description=""/>
<outline type="rss" version="RSS" text="BusinessBlogs Hub" htmlUrl="http://www.businessblogshub.com/" xmlUrl="http://www.businessblogshub.com/feed/" description=""/>
<outline type="rss" version="RSS" text="Wonderblog" htmlUrl="http://blogs.openwonderland.org/" xmlUrl="http://blogs.openwonderland.org/feed/" description=""/>
<outline type="rss" version="RSS" text="XBMC" htmlUrl="http://xbmc.org/" xmlUrl="http://xbmc.org/feed/" description=""/>
<outline type="rss" version="RSS" text="Quetzalcoatal" htmlUrl="http://quetzalcoatal.blogspot.com/" xmlUrl="http://quetzalcoatal.blogspot.com/feeds/posts/default?alt=rss" description=""/>
</outline><outline text="Unfiled Bookmarks">
</outline></body>
</opml>

We can see here references to the “Bookmarks Menu”, “Bookmarks Toolbar” and “Unfiled Bookmarks” folders, with accompanying opening and closing outline tags. These references and their attendant tags can be removed, leaving just the feed information intact. For example, compare the above example with the following modified file:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
	<head>
		<title><![CDATA[Live Bookmarks OPML Export]]></title>
		<dateCreated>Tue Oct 15 2013 00:38:07 GMT+1300 (NZDT)</dateCreated>
	</head>
	<body>
<outline type="rss" version="RSS" text="Apertura Designs blogs" htmlUrl="http://www.apertura.co.nz/blog" xmlUrl="http://www.apertura.co.nz/blog/feed" description=""/>
<outline type="rss" version="RSS" text="BusinessBlogs Hub" htmlUrl="http://www.businessblogshub.com/" xmlUrl="http://www.businessblogshub.com/feed/" description=""/>
<outline type="rss" version="RSS" text="Wonderblog" htmlUrl="http://blogs.openwonderland.org/" xmlUrl="http://blogs.openwonderland.org/feed/" description=""/>
<outline type="rss" version="RSS" text="XBMC" htmlUrl="http://xbmc.org/" xmlUrl="http://xbmc.org/feed/" description=""/>
<outline type="rss" version="RSS" text="Quetzalcoatal" htmlUrl="http://quetzalcoatal.blogspot.com/" xmlUrl="http://quetzalcoatal.blogspot.com/feeds/posts/default?alt=rss" description=""/>
</body>
</opml>

The file is then ready to be imported into Thunderbird.

Next, in Thunderbird go to the “Account Settings…” window, and add another account. The account type should be set to “Feed Accout…”:

Add Feed account

Accept the default account name, and finish the process:

Feed account default name

Finish adding a new Feed account

Now, go back to the Thunderbird “Account Settings…” window where you will see the newly added account. Select the account, and click on the “Manage Subscriptions…” button.

Managing Feed subscriptions

Here we will finally import our Firefox RSS feed bookmarks. Click on the “Import” button, and locate the OPML file you exported and modified:

Importing RSS feeds

If all goes well, you should now see all your RSS feed bookmarks downloading on the left-hand side of the Thunderbird window (in a default Thunderbird layout):

RSS feeds still importing

Every news feed also has an image based on the source website as well as the feed name.

Close this subscription management window once the import has finished. By default, new news articles will be checked for every 100 minutes, but you can force an immediate update of all recent posts for all feed subscriptions if needed, by right-clicking on the Feed account and selecting Get Messages

Get new RSS feed posts

The fallacy of Firefox “bloat” apropos of comparisons to Google Chrome

Chrome users seem to use the “bloat” argument against Firefox any chance they get, seemingly without being able to back the claim up with anything of substance. So, these recent benchmarks are rather interesting.

Memory usage under Windows and Mac OS X:

http://www.tomshardware.com/reviews/macbook-air-chrome-16-firefox-9-benchmark,3108-13.html

“Under a heavy load of 40 tabs, Safari for Windows uses the least amount of memory (just 725 MB). Firefox comes in second at 910 MB, followed closely by Opera at 925 and Chrome at 995. Microsoft’s own IE9 uses the most memory (1.75 GB).

Opera is the only competitor to use less than a gigabyte of memory in Mac OS X. Safari comes in a close second, eating just over 1 GB, followed by Firefox at 1.25 GB. Chrome reports a whopping 2.3 GB of usage with 40 tabs open, which is significantly more than any other browser.”

 

Windows 7 and Ubuntu:

http://www.tomshardware.com/reviews/chrome-17-firefox-10-ubuntu,3129-14.html

Tres intéressant.

Adding a custom theme to GIMP

GIMP running on .nix distributions that support the Gnome desktop environment can be used with custom themes. Following is a brief how-to which covers doing this on OpenIndiana oi_151a x86, with GIMP 2.6. The method should be very similar or identical for Linux distributions (e.g. Ubuntu).

 

First, let’s locate a sample GTK theme. I am using a rather nice theme called “Darkilouche” found here:

http://art.gnome.org/themes/gtk2/1285

Simply download the compressed file in the above link, and extract the contents to disk.

 

Next, we need to locate the gtkrc file in the uncompressed theme folder. The sample theme we are using contains the following files and directories once uncompressed:

$ ls -al
total 7
drwxr-xr-x 4 dave staff   5 2012-03-07 22:47 .
drwxr-xr-x 3 dave staff   3 2012-03-07 22:47 ..
drwxr-xr-x 6 dave staff   9 2007-02-28 00:22 .svn
drwxr-xr-x 3 dave staff   4 2007-02-28 00:22 gtk-2.0
-rw-r--r-- 1 dave staff 240 2007-02-28 00:23 index.theme

The gtkrc file sits within the gtk-2.0 directory, and appears to be the only critical file that is needed.

 

Next, we copy the gtkrc file into the GIMP themes directory. In this example, I am using the global GIMP themes directory at /usr/share/gimp/2.0/themes. We simply create a directory named after the theme we are installing (in this case “Darkilouche”), and copy the gtkrc file into it.

 

Finally, we launch or restart GIMP and test that the theme is accessible at Edit -> Preferences -> Theme. The following screengrab illustrates that GIMP has found the theme, and, it is also the active theme:

Darkilouch GTK theme installed in GIMP

Stream video content from XBMC to an Android tablet (continued…)

In my blog entry describing how to stream from XBMC to an Android tablet, a commenter remarked that the ASUS “MyNet” application used in the example was an ASUS-specific product, and therefore not applicable to other non-ASUS Android-powered devices. A quick look in the Android market reveals plenty of other free and paid-for UPnP applications, so let’s briefly repeat this exercise using one such vendor-neutral app, which goes by the name of BubbleUPnP.

I am using the free version of BubbleUPnP (hence the ads visible in the following screengrabs), on the same platforms as described originally here.

After installing BubbleUPnP, fire up the application, browse to the Devices tab where you should be able to see your XBMC server listed. Make sure that the “Local Renderer” is selected as the renderer, and the “XBMC: Media Server” is selected as the library source:

BubbleUPnP - select renderer and library sources

Then, head over to the Library tab, and drill down until you find the relevant movie content:

BubbleUPnP - browsing the media library

BubbleUPnP - selecting available video media

On the first attempted playback, you will observe a prompt to select playback through one of the media player applications installed on your tablet. In my case, I am going to use the built-in Android “Video player” application, and set this as my default (of course, if you have other media player applications installed you would expect to see a different set of apps listed here):

BubbleUPnP - selecting the default video playback application

Et voila:

BubbleUPnP - playing back a streamed video locally

Again, the chunky video quality in the above screengrab is simply because I am using a low-quality example video, not because of any inherent quality issues with the source material, software, or hardware.

Screencasting on Ubuntu using ffmpeg

Updated 8th January 2013: It appears that at some stage ffmpeg was forked into libav, and the latter is what is included with Ubuntu 12.04. As it turns out, the ffmpeg commands below (which are still accepted) will result in a video that is severely choppy – practically unusable. I don’t have time to get to the bottom of this, so following are two links which describe how to uninstall the libav tools bundled with Ubuntu 12.04 and how to install the original ffmpeg packages from a PPA. The original packages work fine, but a side effect is that your media playback applications may cease to function normally (the second link describes this in detail). I only use this system for video capture so for me it isn’t an issue – but as they say, your mileage may vary…

http://askubuntu.com/questions/162740/how-do-i-uninstall-ffmpeg
http://askubuntu.com/questions/151494/why-cant-i-watch-video-after-installing-the-original-ffmpeg-fork-from-jon-sever/151508#151508

The original guide now follows.

 

This is a very brief guide to using the FFmpeg Linux utility to record a live screencast. I’ve used this method (which is quite well documented out there) after discovering that the recordMyDesktop utility is unsuitable in certain critical areas for my needs.

The first thing to note here is that FFmpeg consists of a suite of libraries and codecs for handling A/V media, and, the ffmpeg command line utility itself. The latter is what we will be using to capture our screencast.

Our example system is running Ubuntu Linux 11.10 x86. Note that at this stage we are only capturing live video, not live audio.

First, use Ubuntu Software Center to install FFmpeg:

Installing FFmpeg using Ubuntu Software Center

Once installed, launch a Terminal window: it’s time to enter a text command, but don’t worry, it’s straightforward and you can cut and paste the below example to get started. Simply enter the following command, noting that this will save a video recording of your live session to an example file named “testscreencast.mp4” on your Desktop.

ffmpeg -f x11grab -r 25 -s 1280x1024 -i :0.0 -sameq ~/Desktop/testscreencast.mp4

To stop the recording, press Ctrl+C with the terminal window in focus. To view the video file, you can use VLC or a similar media player.

 

Let’s look at the various options and parameters of the above command in more detail:

  • ffmpeg – this is the ffmpeg command itself being invoked
  • -f – force the input or output file format (note – not the file itself). In this example, we are forcing the file input format to be the X11 display (see below)
  • x11grab – use the X11 display
  • -r – frame rate in frames per second. This defaults to 25 fps
  • -s – set frame size. It can be set either as WidthxHeight pixels, (e.g. 1280×1024), or accepts a variety of preset abbreviations (e.g. sxga which corresponds to 1280×1024)
  • -i – set the input file. This does not have to be a “file” per se, and indeed in this example the input file is the value :0.0, which corresponds to the value of the $DISPLAY environment variable (in display.screen format). See: http://ffmpeg.org/ffmpeg.html#X11-grabbing for more information
  • -sameq – this option sets the transcoding quality to be the same as the source input.

The last portion of the command simply sets the location for the output file. Also, the default video codec for ffmpeg (you’ll note that we haven’t explicitly set a codec anywhere) is MPEG-4 (note, not MPEG-4 Part 10), which for screencasts is fine.

Once you’ve captured your screencast, you can use an application like OpenShot to perform the editing.

Freedom in video media production

ffmpeg to do screen captures: $0
Audacity to capture audio, perform clean-up and EQ: $0
GIMP to design titles and watermarks: $0
OpenShot to edit footage, add transitions and effects: $0
Web delivery transcoding to the free, patent-unencumbered Theora codec: $0
The Ubuntu OS to run it all on: $0

And seamless video playback (without stupid plugins) using Firefox

Theora playback in Firefox

Freedom rules.

OpenShot video editor for Linux – watch out iMovie…

I’ve recently begun to use OpenShot on Ubuntu Linux to edit a series of short screencasts with, and holy smoke what a pleasant surprise. Stable, easy to use (including a polished and smoothly responsive UI), a nice selection of effects and transitions, and pretty darn stable to boot:

OpenShot running on Ubuntu 11.10 x86

It’s pretty much based on the iMovie paradigm, before Apple screwed too badly with it. Lots of advanced goodies which the competition doesn’t have, like fancy 3D animated and SVG titles via integration with Blender and Inkscape. Built-in support for insta-upload to YouTube. Even the documentation is great. Between Ubuntu, ffmpeg, and OpenShot (oh, and Audacity for the audio), it’s entirely possible to put together high-quality screencasts for zero software cost.

OpenShot is totally worthy of a donation, which I have happily made.