Thursday, February 7, 2013

Running QT/KDE applications like VLC Media Player on Fedora 18 without installing

It is quite difficult to provide precise steps how QT applications can be run on Fedora 18 without really installing them but today I succeeded to do that.

What makes the steps complicated is that each QT application has its own requirements and tweaks which are revealed only through error messages during the launch (or if you are God, you would like to infer all possible requirements by looking at the entire source code and configuration files).

The fundamental idea is to download rpm files and extract them to a local folder, say, ~/.qtapps/

1. Issue the installation command in download only mode:
yum --downloadonly install vlc

2. Copy or move the downloaded rpm files ( from /var/cache/yum/... ) to a local folder, say ~/sandbox.

3. Create a file named extract.sh containing following lines in ~/sandbox. When executed, this script will extract data from all the rpm files in ~/sandbox.

 OLDIFS=$IFS; IFS=$'\n'; fileArray=($(find . -type f -iname "*.rpm")); for file in ${fileArray[@]}; do rpm2cpio $file | cpio -midv; done; IFS=$OLDIFS;

4. You will see a folder called usr. Move it to .qtapps.
mv usr ~/.qtapps

5. Make system aware of ~/.qtapps/bin and ~/.qtapps/lib folders and also ~/.qtapps/sbin and ~/.qtapps/lib64 folders if they exist by setting PATH and using ldconfig.

To install more QT based apps just download the necessary rpm files, extract them and move the contents of extracted bin, sbin, lib and lib64 folders into corresponding folders in ~/.qtapps.

For easy launching of the newly added app, create a .desktop file as mentioned in an older post titled "custom 'open with' command".

No comments:

Post a Comment