Panasonic Viera G30 and AVCHD files

Just bought a few weeks ago a Panasonic Viera G30, european model. The image quality is superb for SD (standard definition) and on HD it is just breathtaking, far superior, in my opinion to the LED and LCD competition at half the price.
Anyway, I own a lot of AVCHD files produced by my Canon Vixia HF200, and the Panasonic can happily read the camera SD card on it’s own SD card slot and even on it’s USB port trough an external card reader. I really never saw these files on an HD TV set, albeit I’ve saw some of them on a friends Sony LCD TV (model KDL4000, I think, not sure) through a WDTV player. I wasn’t amazed of the image quality on this TV..
Well on the G30, the AVCHD files just look fantastic, showing perfect near cinema quality and playing smooth without any hiccups or any flaw.
But there’s a catch. Panasonic Viera can only play AVCHD files with it’s own media player if they are inside a Blue-Ray file structure. Standalone MTS files are not played.

This means that I have a problem, being it that my all AVCHD video library of standalone files cannot be played directly on Viera without first packing them into a BD file structure, much like the folders and files that are on the SDHC camera card…

Creating the file structure on an external hardisk and copying all files to the STREAM sub-folder is not enough, because the G30 will try to read the playlist file .MPL.
So it isn’t just enough to copy the files to a “pre-prepared” hard disk, a correct MPL file must be generated.
So far the only tool that I know that can do that is the multiAVCHD program, only available for windows, but runs fine on Linux, through WINE.
The problem with this tool, in my case, is that will build a complete BD file structure by copying the MTS files and then generating the MPL file… A waste of time.
So if anyone knows a tool that given a list of MTS files, generates a MPL file, and runs on Linux, give me a bip to check it out.

P8 5.0 on CentOS/Redhat install

If by any chance, during the setup launching this happens:

Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…

Launching installer…

Graphical installers are not supported by the VM. The console mode will be used instead…

Preparing CONSOLE Mode Installation…

=======================================================

Installer User Interface Mode Not Supported

The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The valid UI modes identifiers are GUI, Console, and Silent.

=======================================================

Just install de compatibility libstd to your system:

yum install compat-libstdc++-33.i386

Openssl on [K]Ubuntu and the SSLv2 protocol

While troubleshooting a problem related to TLS/SSLv2/SSLv3, I’e found out, that for security reasons, all support for SSLv2 on Ubuntu’s openssl package was removed.

Check out this: http://security.sunera.com/2011_02_01_archive.html for more information. This is very important if using Ubuntu as the OS for running vulnerability scanning, because the lack of SSLv2 support from Ubuntu’s openssl package will always give false negative results for a site with enabled SSLv2 support…

So if there is the need to check for SSLv2 support and or SSLv2 vulnerability scanning using Ubuntu as the host OS, then download, compile and use the OpenSSL sources.

Just for reference: How to check for:

TLS -> openssl s_client -tls1 -connect 10.0.0.0:443

SSLv2 -> openssl s_client -ssl2 -connect 10.0.0.0:443

SSLv3 -> openssl s_client -ssl3 -connect 10.0.0.0 -port 443  -showcerts

Kubuntu 10.10 with KDE 4.6 and full screen flash video

After upgrading to KDE 4.6 on Kubuntu 10.10 I started to have some problems on startup, namely some Dbus errors, unable to logout, systray applets not starting, and so on. For clearing it up, I erased my profile (mv .kde .kde_old EDIT:  DO THIS ONLY IF you don NOT care about your  KDE data. DO NOT DELETE if you want to revert the operation) and rebooted.

So at logon time a new profile was created, and the errors that I had where gone. The only issue was that I had to configure my workspace again.

Trouble hits when I tried to see a full screen flash video, namely 1080p or 720p and it stutters badly. Previously I had no such problem. Logging out and logging in with my wife’s profile, the issue was gone… Strange indeed… Did a lot of install/remove/install of flash plug-in, but nothing that I did solved the issue. But installing a version of Flash Plugin that I did KNOW for sure that it worked full screen didn’t also solved the issue, I know that my problem was something else..

To keep the story short, as I’m not a great writer or blogger, there is one setting that needs to be changed on KDE to allow full screen flash to work fine (at least for me):

1) Goto System Settings

2) Select Desktop Effects

3) Select Advanced

4) Unselect (! yes unselect) Suspend Desktop effects for full screen windows. Apply and done.

Now it works fine for me. By the way, I’m using an i920 with ATI 4870 proprietary drivers and 64 bit Kubuntu.

BASE64 support for KDE Kate editor

When working with BASE64 encoded content, namely XADES-B/T digital signatures, Notepad++ allows easily to encode and decode from XML to BASE64 and vice-versa.

But being a KDE user, the only way that I could do the same was using command line tool base64 to encode and decode, because KDE Kate editor didn’t had the support for BASE64.

Not a problem any more: I’ve posted a Kate Script that allows to do BASE64 encoding and decoding right inside KDE Kate editor: http://kde-apps.org/content/show.php/Kate+Base64+support?content=138046

This script is possible do to the fact that KDE Kate editor is extensible by plugins or scripts: http://docs.kde.org/stable/en/kdesdk/kate/advanced-editing-tools-scripting.html

In my case, I used JS scripting and it works fine.

So how do I use it? Well follow the installation instructions that are valid for Kubuntu 10.10, and probably valid for other installations. Then the new functions can be called directly from Kate’s command line(Just press F7) and write b64 and the suggested functions should be offered, namely b64encode, b64decode and two other helper functions.

Also on the latest Kate/KDE version, 4.6, these new functions appear on the Tools->Script menu.

Visio alternative for Linux

We really know that Visio for Linux will never be a reality, and so all we have right now is some tools, that from usability point of view or features, are limited: DIA and Kivio 1.6

The new version of Kivio, in the foreseen future on the Calligra suite, is being worked on, and might be a reality, but with unknown stencils/icons.

I’m not the only one, that for work reasons, has this need, as this post on Reddit shows: http://www.reddit.com/r/linux/comments/ewhy5/alternatives_to_dia/

There are here great alternatives, some free, some limited, that can be used to make at least good looking diagrams without resorting to a virtual machine running Windows and Visio:

1) http://www.gliffy.com

2) http://www.lucidchart.com

3) http://www.mxgraph.com/

Private Dokuwiki on multiple computers using Dropbox

Dropbox is a great tool, and due to it’s file sync capabilities it has a lot of possibilities to create “hack” solutions like the one that I’m going to describe here:

If you have a personal Wiki that you want to share between several computers, the usual “normal” way of doing so is to setup a 24/7 Web Server with Apache/Lighttpd and, in my case, installing Dokuwiki. Then the client PC’s to access the Wiki all they have to do is tto point their browser to access this web server. But what this means is that you really need to have a web server available 24/7 even  if not using it… And where to locate this web server? At my home? Pay hosting fees? And if I don’t have connection to it? And so on…

The solution is using Dropbox as your data repository for DokuWiki Content. Content is always available and replicated automatically on all computers, even if you don’t have internet access. You can even share your Wiki privately with your friends/family/colleagues by inviting them to the Wiki folder… and off course setting up Lighttpd on their computers.

How it works:

I’m using Lighttpd as the web server. For personal use is more than enough and it supports PHP5 and Dokuwiki just fine. Lighthttpd is installed in all computers that access the wiki.

The installation steps for Ubuntu/Kubuntu and derivatives are the following:

1) Install Lighttpd, php5 and dokuwiki packages: apt-get install lighttpd php5-cgi dokuwiki.

During installation of dokuwiki, it will be asked what web server should be configured automatically, namely Apache or lighttpd. We must choose the later, lighttpd by pressing space (so that a * should appear) and, if Apache is not installed, deselect Apache.

The following question is if, in case of dokuwiki package removal, should the wiki content ALSO be removed… We should answer NO.

Then, finally, the wiki admin password is asked.

After installation, the lighttpd server should start automatically, and using a browse the local web page http://localhost should show the default web server page.

Then follow these instructions http://redmine.lighttpd.net/wiki/lighttpd/TutorialLighttpdAndPHP#Configuration to enable Lighttpd with PHP5.

Basically is to edit the php.ini file that’slocated in /etc/php5/cgi/php.ini and the lighttpd.conf file located on /etc/lighttpd directory. These changes must be done as the user root (use sudo -s on a command shell).

Make sure that when pasting the fastcgi.server section into the lighttpd.conf file, the “bin-path” entry points to the php5-cgi binary, normally located at /usr/bin/php5-cgi

Save and restart the lighttpd server with the command /etc/init.d/lighttpd restart


2) Copy /usr/share/dokuwiki to /var/www with the following command:  cp -R /usr/share/dokuwiki /var/www and make sure the permissions are correct: chown -R www-data:www-data /var/www/dokuwiki

Note that the first copy command there are no trailing slashes.

3) You can rename the folder from dokuwiki to other name, like wiki, for example to change the URL. This is optional.

4) Create the Dokuwiki data directory on your Dropbox: mkdir -p ~/Dropbox/wiki/data This should be done in only ONE computer, the others will synchronize automatically.


5) Change the permissions on the directory: sudo chown -R www-data ~/Dropbox/wiki/data This should be done in ALL computers.

6) Edit the Dokuwiki configuration file dokuwiki.php located in /etc/dokuwiki and change the value of the line $conf['savedir'] to the data location on the dropbox folder. In my case I changed the default value from $conf['savedir']=’/var/lib/dokuwiki/data'; to $conf['savedir']=’/home/primalcortex/Dropbox/wiki/data';

You must do this in all computers, only, probably, changing the Dropbox location. If you’re using the same username on all computers, just copy the file between them using Dropbox…

And that’s it. Accessing now the URL http://localhost/dokuwiki uses now the local lighttpd web server with all data synchronized between computers, and it works EVEN when offline. 

You now can invite your work colleagues to this folder, and have all data available at all times to anyone that uses the same scheme.

EDIT: You may find the following error when using the Wiki based on your Dropbox directory: The datadir (‘pages‘) does not exist, isn’t accessible or writable. You should check your config and permission settings.

The problem is file/directory permissions, because the user www-data used by lighttpd can’t access your home directory/Dropbox directory.

There are two solutions, being the easy one to add the www-data user to your own group, in my case the group named primalcortex.

The other solution is to add the following permissions: chmod o+x /home/username and chmod o+x/home/Dropbox

The first solution will be better because Dropbox software can or might change the Dropbox directory permissions. Just make sure that your home directory permissions are 750.

Kubuntu – Install ATI drivers

The complete instructions are here: http://wiki.cchtml.com/index.php/Ubuntu_Lucid_Installation_Guide

For Kubuntu just make sure that:

1) The proprietary driver is enabled/installed: alt-f2 and run jockey-kde (Additional drivers)

2) Add the X team PPA:

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update

3) Install the fglrx driver: sudo apt-get install fglrx

4) Initialize the ATI configuration:

sudo aticonfig –initial -f

In my case I’m using a dual monitor setup, and I did the above configuration and used the amdcccle configuration tool to setup the dual monitor. Please note that using Xinerama disables Desktop effects. If you want one large desktop choose the Multi-display Desktops. With this the desktop spawns the monitors and it’s possible to move windows between them.

5) Reboot.

If it fails to boot into graphical mode and/or it boots to VESA mode , go to safe mode and using the command jockey-text, make sure that the driver is enabled.

$ jockey-text -l
xorg:fglrx – ATI/AMD proprietary FGLRX graphics driver (Proprietary, Enabled, In use)

If the driver is disabled, enable it with the command: jockey-text -e xorg:fglrx

Kubuntu 10.04 to 10.10 upgrade

Since Kubuntu 8.04 that I’ve chosen to upgrade my installation instead of re-installing everything by scratch. One of the main reason is that I was to lazy to create a separated /home partition, and I really don’t want also to re-install all applications from scratch.

Most of the people that choose the upgrade path hit some issues that do not happen when doing a fresh install, and, yes, I hit some problems. Some problems are Kubuntu related and do not happen when using Ubuntu…

So the story:

Because my home machine has an ATI 4870 and I’m using the ATI proprietary driver, I wanted to make sure that my driver was up to date because Kubuntu 10.10 uses the latest Xorg…

So while still using 10.04 and the latest kernel available, I downloaded ATI driver 10.12 and it failed to install with the latest kernel.

This was problem number one: To cut a long story short the solution for this issue is here: http://primalcortex.wordpress.com/2010/12/29/kubuntu-install-ati-drivers

Anyway, for upgrading I went to Adept Installer, and on Sources->Edit Software Sources -> Updates changed the Release Upgrade to Normal Releases.

Sure enough, the 10.10 upgrade was offered.

Phase one: Upgrade stopped with error on log “Could not calculate upgrade-Can’t mark ‘kubuntu-desktop’ for upgrade“. It took me a while to find out that this was some meta package leftover from previous upgrades/installs that was not needed. So: apt-get remove kubuntu-desktop and this was the only package removed.

Phase two: Upgrade now stops with another weird error: could not install the upgrades – Couldn’t configure pre-depend x11-common for x11-xkb-utils, probably a dependency cycle

This took some time to solve and the solution is here: https://bugs.launchpad.net/ubuntu/+source/x11-xkb-utils/+bug/639933

Mainly is to do the following as root:

wget http://mirrors.kernel.org/ubuntu/pool/main/x/xorg/x11-common_7.5+6ubuntu3_all.deb
dpkg -i x11-common_7.5+6ubuntu3_all.deb

After this the upgrade ran without any problem.

At the end rebooted and: Despite of running Kubuntu the splash screen was of Ubuntu 10.10… Not nice.This is probably because I was running the command line upgrade tool do-release-upgrade? Not sure. Not important for now…

Boot proceed to fail completely into the text boot login… Oh boy… No graphical desktop no kde desktop no nothing. So I’ve logged in text mode with my credentials and “sudoed” to root (sudo bash)

Ok. Looking at the /var/log/Xorg.0.log file shows that the proprietary fglrx.ko module was not found. Ok, fair enough: The reason was that during the upgrade from 10.04 to 10.10 the kernel version changed, and the previous configuration was lost.

So I edit the /etc/apt/sources.lst and enabled all Kubuntu PPA’s and ubuntu-x-swat PPA. These where disabled during the upgrade, so I need now to enable them to get the latest KDE (4.5.4 at this date) and the ATI proprietary driver. The usual commands apt-get update, and apt-get upgrade and the new KDE and fglrx drivers is downloaded and installed.

Reboot

Still text mode… Xorg.0.log still complains that the fglrx driver is not installed…

Now what? I’ve installed the proprietary driver with jockey-kde which is a graphical utility, but now I don’t have no graphical environment…

The text only tool is jockey-text and running with the -l (that’s an l not an i) reports that the xorg:fglrx driver is DISABLED… ok, So:

jockey-text -e xorg:fglrx

enables the driver and then rebooting it solves the issue. Now I have a graphical KDE environment…

So what’s was broken during the upgrade?

hplip 3.10.2  – doesn’t work anymore: Can’t detect my c309g-m printer. Upgrading to hplip 3.10.9 solves the issue.

Akonadi Google plugins to synchronize calendar and contacts looks like it’s broken. I can’t see my Gcal events… Not sure if it’s related to the upgrade…

What’s new:

I’ve installed bluedevil to replace the old bluetooth software.

Boot times are faster

Fonts look much better.

Upgraded to Digikam 1.7

 

The final problem: At boot instead of having the Kubuntu splash screen, I have the Ubuntu pink/violet one… So I went to synaptic and removed the package plymouth-theme-ubuntu-logo e plymouth-theme-ubuntu-text leaving only the Kubuntu related ones.

Kmail/Korganizer and Nokia phone synchronization

When Nokia bought Trolltech, the makers of QT, one could assume that Nokia PC-Suite for Linux was on the horizon… But so far nothing has happened. So how do I synchronize my phone contacts and agenda with KDE software? Easy…

In my case I’m using KDE and Kmail/Korganizer, so the following post is how to accomplish this syncronization with Kmail address book and Korganizer Calendar using the Opensync syncronization framework. I’m using Opensync version that comes with Kubuntu 9.10, that’s 0.22.

Requirements: Latest KDE SC 4.4 release, a bluetooth dongle (in my case I’ll synchronize using BT), Akonadi and Kmail/Korganizer

1st) Make sure that your phone is detected. In my case it’s an Nokia 6280, and using one of these: http://www.dealextreme.com/details.dx/sku.11866 on my desktop PC, that works on Linux/Kubuntu 9.10 without any issue (and cheaper than this is probably impossible…):

Let’s see if the bluetooth dongle is detected: lsusb

Bus 008 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Detected and Kbluetooth works, now execute the command: hcitool scan and the detected phones should appear:

Scanning ...
 00:3B:34:91:9A:56       Nokia 6280
 00:75:1F:88:08:AF       VF541

Take note of the hexadecimal address for the phones.

We also need to make sure that the phones do have the SyncML client, using the sdptool command browse: For example: sdptool browse 00:3B:34:91:9A:56

And on the output a section like this:

Service Name: SyncML Client
Service RecHandle: 0x1000e
Service Class ID List:
 UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
 Channel: 11
 "OBEX" (0x0008)
Language Base Attr List:
 code_ISO639: 0x656e
 encoding:    0x6a
 base_offset: 0x100

should appear. In my case, only the Nokia 6280 has the SyncML client. The Vodafone 541 does not have this client so synchronization will be impossible. I also have a Nokia 2630, and it has BT and the SyncML client.

So you need now to take note of the following information: The phone address and the channel address of the SyncML client, in my example 11 (see above).


2nd) Make sure that you have the following msynctool plugins installed: file-sync and syncml-obex-client.

For that just execute the following command: msynctool –listplugins

If they are not available, install them using: sudo apt-get install opensync-plugin-file opensync-plugin-syncml

3rd) Create a directory on your home directory for storing information related to the synchronization. Please note that you never, EVER, should delete any information on this directory. If you do its the same as deleting data on the phone.

mkdir ~/nokiasync

4rd) Create the opensync syncronization configuration:

     msynctool --addgroup nokiasync
     msynctool --addmember nokiasync file-sync
     msynctool --addmember nokiasync syncml-obex-client

5th) Edit the configuration for each member of the synchronization group:

  • On the file-sync member we need to put the full path to the syn directory
  • On the syncml-obex client we need to put the MAC address of the phone (the hexadecimal numbers that we’ve found above) and the channel number.

So execute the following commands:

Edit the first member file-sync: msynctool –configure nokiasync 1

The text editor will show something like:

<config>
<path>/home/USERNAME/nokiasync</path>
<recursive>FALSE</recursive>
</config>

Make sure that USERNAME is your Linux username, namely bob, alice, whatever. A command like ls -l /home/USERNAME/nokiasync should return NO error.

Just press CTRL-X to exit and Y + ENTER to save.

Let’s configure now the Syncml client: msynctool –configure nokiasync 2

The file shown should look like:

<config>
<bluetooth_address>XX:XX:XX:XX:XX:XX</bluetooth_address>
<bluetooth_channel>YY</bluetooth_channel>
<identifier>PC Suite</identifier>

Just make sure that XX:XX… is EXACTLY your mobile phone address, and YY is the channel shown by the sdptool. In the above case it’s  00:3B:34:91:9A:56  and 11 respectively. So the file should look like:

<config>
<bluetooth_address>00:3B:34:91:9A:56</bluetooth_address>
<bluetooth_channel>11</bluetooth_channel>
<identifier>PC Suite</identifier>

Then CTRL-X, Y and Enter to save, and we are ready.

6th) Now is a good idea to backup your phone address list and agenda. Do it now! If things go wrong you need a backup. Also the first rule of good a good backup is that restores are more important than backups, so backup AND restore first so see IF you have a VALID backup. You’ve been warned… :)

7th) Now we are ready:

msynctool –sync nokiasync

Because I’m using bluetooth I’ll be asked for a PIN by my phone, and I’ll need to provide it to the PIN question dialog on the computer. After the pin, synchronization takes place, the first one is from the phone to the computer.

After this, on the directory nokiasync you should have some files. These files are your contacts and calendar from the mobile phone. DO NOT DELETE THEM.

8th) Akonadi configuration.

We need to configure Akonadi now. It’s quite easy. Just run akonaditray, and right click on the globe icon that appears on the KDE system tray, and select configure.

For the calendar:

  • On the Akonadi resources tab, press ADD and select the KDE Calendar (Traditional) plugin. A wizard will appear. Press next.
  • Then select more or less at the middle: Calendar in Local Directory and press Next
  • Give as the location the nokiasync directory that we’ve created, and where the opensync works for syncing with our mobile phone. Press Next
  • Give it a name, in my case Nokia Calendar, and press Finish.

OPTIONAL: For the Contacts (For reference only, Korganizer will not use this. See below) :

  • On the Akonadi resources tab, press ADD and select the KDE Adress book (Traditional) plugin. A wizard will appear. Press next.
  • Then select the first option: Folder and press Next
  • Give as the location the nokiasync directory that we’ve created, and where the opensync works for syncing with our mobile phone. Keep the format as vcard, and press Next
  • Give it a name, in my case Nokia Contacts, and press Finish.

That’s it. The akonadi resources are configured.

8th) Korganizer configuration.

For adding the calendar follow these instructions on this post: http://primalcortex.wordpress.com/2010/04/24/korganizer-and-google-calendar-on-kubuntu-9-10/ but instead of adding the Google resources add the Nokia Calendar resource

For the address book, just go to the Contacts section, and on the Address book, select Add Address Book with a right click on the mouse.

  • Select the KDE Adress book (Traditional) plugin. A wizard will appear. Press next.
  • Then select the first option: Folder and press Next
  • Give as the location the nokiasync directory that we’ve created, and where the opensync works for syncing with our mobile phone. Keep the format as vcard, and press Next
  • Give it a name, in my case Nokia Contacts, and press Finish.

And that’s it Nokia<->Korganizer syncronization…

9th) Testing:

Create a contact and a calendar event on Korganizer, but for the Nokia resources. Execute the synchronization command: msynctool –sync nokiasync

Your mobile phone should report that it synchronized 1 or two items. Check your contact list for the new contact. Check your agenda for the new event.

Now repeat the opposite: Create a phone contact and event, and synchronize. It should appear on Korganizer.

Last thoughts:

What happens if the syncronization directory is a sub-directory of your Dropbox folder…???? :-)

Automatic synchronization of all your agenda and contacts on all your computers! This in fact completely implements the purpose of plugins like akunambol and the Funambol server at this level of functionality…

You can now: Create a contact on your mobile phone, sync it, your local computer sees the change, but Dropbox also sees it sync’s it into the cloud, and into your other computers…

The phone synchronization ideas and howto’s where based on this post: http://www.harald-hoyer.de/linux/linux-and-syncml-multisync-with-nokia-6280

Finally, this also just brought to my ancient phone a new lease of life. No new Android phone for me… and by the way, after synchronization, the Nokia 6280 screensaver just fails to start…. and the Vodafone VF541 needed a restart… Nothing is perfect.