Finding video/ image file info

In ffmpeg, you can determine video or image file info:

ffmpeg -i my_video_filename

Another option is exiftool tool.

1. Install on RHEL
yum install perl-Image-ExifTool.noarch
**you need to have rpmforge repository installed.

2. Use it
exiftool my_video_file


XShell profile/session backup

XShell from NetSarang is a great SSH client that we use. Even one awhile, you might wanna back up all the saved profiles.

The profiles are actually located at: %user_profile%\%username%\AppData\Roaming\NetSarang\Xshell. For example, C:\Users\johnny\AppData\Roaming\NetSarang\Xshell.

You can just copy the directory to where you want to back it up. You can also create sub-directories if you want to manage them a bit.

MonoDevelop 1.91 on Cent OS

Last post we installed Mono 2.x run time. Here we will get MonoDevelop install on GNOME, for development environment.

First, here are the related software. You should have most of them when installing the run-time:

yum install glib2-devel pango-devel gtk2-devel glade2-devel libgnome-devel \
gnome-desktop-devel gnome-panel-devel libgnomeprintui22-devel \
gtksourceview-devel ruby ruby-rdoc gtkhtml38-devel wget

Now, we need make the required environment variables while we’re building the IDE, as well in its run-time. So let’s make it into shellscript called (or whatever you like it).

echo 'PATH="/opt/mono/bin:$PATH"' /opt/mono/
echo 'export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig' >> /opt/mono/
echo 'export LD_LIBRARY_PATH=/opt/mono/lib' >> /opt/mono/
echo 'source /opt/mono/' >> /opt/mono/

chmod +x /opt/mono/

Now we are ready to build MonoDevelop from tarball source. The following packages are the minimum software needed – we will build them one-by-one:


cd ~/
tar xjf gtk-sharp-2.12.5.tar.bz2
cd ./gtk-sharp-2.12.5
./configure --prefix=/opt/mono
make;make install


cd ./mono-addins-0.3.1
./configure --prefix=/opt/mono
make;make install


cd ./monodoc-2.0
./configure --prefix=/opt/mono
make;make install

Mono Tools

tar jfxv mono-tools-2.0.tar.bz2
cd ./mono-tools-2.0
./configure --prefix=/opt/mono
make;make install


tar jfxv monodevelop-1.9.1.tar.bz2
cd ./monodevelop-1.9.1
./configure --prefix=/opt/mono
make;make install

You should now able to start up MonoDevelop in GNOME, enjoy.

Mono 2.x on CentOS 5

Mono no longer packages for Red Hat distribution but still provide sources. Here we will grab the source code, and install manually on a Cent OS 5.2 box.

First off, make sure you have all the development tools installed:

Pre-Software requirement

yum groupinstall "Development Tools"
yum install httpd build-essential gcc bzip bison pkgconfig glib-devel \
glib2-devel httpd-devel libpng-devel libX11-devel freetype fontconfig \
pango-devel ruby ruby-rdoc gtkhtml38-devel wget

At this time, Mono 2.0.1 is the latest. You can always check for new build at

Getting all the needed Mono software

cd /root

Unlike many other tutorials, we will install using “Java" style – the version # is included:

mkdir /opt/mono-2.0.1

Let’s make a desult symlink:,

ln -s /opt/mono-2.0.1 /opt/mono

This is needed when building xsp:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/opt/mono/lib/pkgconfig/:/usr/lib/
Set path (even we don’t actually have it yet)

export PATH=/opt/mono/bin:$PATH

Now we are ready to compile:

tar jvfx mono-2.0.1.tar.bz2

cd mono-2.0.1
./configure --prefix=/opt/mono-2.0.1
make; make install

tar jvfx xsp-2.0.tar.bz2
cd ~/xsp-2.0
./configure --prefix=/opt/mono
make; make install

tar jvfx mod_mono-2.0.tar.bz2
cd ~/mod_mono-2.0
./configure --prefix=/opt/mono --with-mono-prefix=/opt/mono --with-apr-config=/usr/lib/httpd/modules
make; make install

tar jvfx libgdiplus-2.0.tar.bz2
cd ~/libgdiplus-2.0
make; make install

You should now have in /usr/lib/httpd/modules. Also you should have mod_server in /opt/mono/bin.
You directories should look like those:

Directory contents are as follows:

ls /opt/mono/bin/

al                    mono-api-info
al2 mono-api-info2
asp-state monodis
asp-state2 mono-find-provides
caspol mono-find-requires
cert2spc monograph
certmgr monolinker
chktrust monop
cilc monop2
dbsessmgr mono-service
dbsessmgr2 mono-service2
disco mono-shlib-cop
dtd2rng mono-test-install
dtd2xsd mono-xmltool
fastcgi-mono-server mozroots
fastcgi-mono-server2 nunit-console
gacutil nunit-console2
genxs pedump
gmcs permview
httpcfg prj2make
ilasm resgen
ilasm2 resgen2
installvst secutil
jay setreg
macpack sgen
makecert signcode
mbas smcs
mconfig sn
mcs soapsuds
mjs sqlsharp
mkbundle wsdl
mkbundle2 wsdl2
mod-mono-server xbuild
mod-mono-server2 xsd
mono xsp
mono-api-diff xsp2

ls /opt/mono/lib/

libgdiplus.a    libmono-profiler-cov.a
libMonoPosixHelper.a libMonoSupportW.a
libmono-profiler-aot.a mono pkgconfig xsp

ls /usr/lib/httpd/modules/    

And the mod_mono config file should be like this:

ls /etc/httpd/conf/mod_mono.conf

LoadModule mono_module /usr/lib/httpd/modules/
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx

Let’s move it to CentOS style:

mv /etc/httpd/conf/mod_mono.conf /etc/httpd/conf.d/mod_mono.conf

Restart web server

service httpd restart

Make a simple test file named default.aspx:
<%Response.Write("mono on centos - it works");%>

If you see that message at http://localhost/default.aspx, congrad, there you have it!

Setup Subversion and Trac on CentOS 5

Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several Subversion repositories with associated Trac projects.

There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a few problems and I hope this post may help at least a few people trying to do the same as me. I am not going to rewrite the great tutorials out there, I will just point you to them and note what things I did differently.

This ‘guide’ should get you from a fresh install of CentOS 5 linux to one or more working Subversion (SVN) repositories and associated Trac wiki’s. Apache/WebDAV is used as the network layer. I have only tested this on a fresh install of CentOS 5.

The Environment

I am aiming for the following:

  • CentOS 5, SVN installed. Apache2 as the network layer using mod_dav_svn.
  • Trac running on Apache with mod_python
  • SVN repositories located at: /srv/svn (e.g. /srv/svn/my-project), accessible via http://server/svn/my-project
  • Trac projects located at: /srv/trac (e.g /srv/trac/my-project) accessible via http://server/trac/my-project

How I did it

Not all the steps are vital (probably) but this is how I got it working. Feel free to skip any non-relevant steps (i.e. there is probably no need for a fresh install). Replace any occurence of with the name of your first project.

1. Fresh install of CentOS. I followed most of the Perfect Setup Guide, except the mail and ISPConfig stuff. The important part is setting up the Apache2 web server.

2. Make sure SVN and mod_dav_svn are installed. As root:

yum install subversion mod_dav_svn
vim /etc/httpd/conf/httpd.conf

If the following two lines are not present, add them:

LoadModule dav_svn_module modules/
LoadModule authz_svn_module modules/

3. Install Trac: Follow Nick’s guide with the alternative Clearsilver installation below. Skip the Apache Configuration part.

Follow all of parts 1 and 2. Instead of part 3 do:

rpm -i clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpm

Continue with parts 4.1 and 4.2 of Nick’s guide. Remember, leave out Apache configuration section.

4. Create your first SVN Repository:

svnadmin create --fs-type fsfs /srv/svn/project_name

5. Initialise a Trac project for your new repository:

trac-admin /srv/trac/project_name initenv

For the trac-admin command use the defaults if not sure, giving a descriptive name for the project. The `Path to repository` is: /srv/svn/project_name.

6. Set the correct file permissions for apache

chown -R apache.apache /srv/svn/project_name
chown -R apache.apache /srv/trac/project_name

7. Tell apache where to find the new repository. Here we create an additional Apache configuration file specifically for the SVN repositories.

vim /etc/httpd/conf.d/subversion.conf

Add the following directive:

DAV svn
SVNPath /srv/svn/project_name
AuthType Basic
AuthName "My SVN Repository"
AuthzSVNAccessFile /srv/svn/svn-acl-conf
AuthUserFile /srv/svn/.htpasswd
Require valid-user

8. Add a repository user:

touch /srv/svn/.htpasswd
htpasswd -m /srv/svn/.htpasswd username

9. Create the Access Control List for the SVN Repository

vim /srv/svn/svn-acl-conf

Add the following directives:

username = rw

Where username represents the username of the repository user you created earlier.

10. Tell apache where to find the new Trac project. Here we create an additional Apache configuration file specifically for the Trac projects.

vim /etc/httpd/conf.d/trac.conf

Add the following directives:

SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /srv/trac/project_name
PythonOption TracUriRoot /trac/

AuthType Basic
AuthName "trac"
AuthUserFile /srv/trac/.htpasswd
Require valid-user

11. Add a Trac user:

touch /srv/trac/.htpasswd
htpasswd -m /srv/trac/.htpasswd

12. Give admin permissions to the Trac user you just created:

trac-admin /srv/trac/ permission add  TRAC_ADMIN

Where represents the username of the Trac user you just created.

13. Restart Apache:

service httpd restart

You should now have SVN and Trac installed. You will have an SVN repository setup (http://server/svn/) and the Trac wiki (http://server/trac/) associated with the repository.

Please let me know if this helped you. If you come across any problems I will be happy to try and help.


The last part of CentOS HowTos: Subversion will give you a quick introduction on how to use SVN.

Subversion setup guides: here and here

Trac setup guides: here and here.

ClearSilver template system (used by Trac).

Setting up CentOS 5.0