Sep 242013

I was having trouble getting Virtualbox to run on my Fedora 19. My system isn’t using PAE so I had to modify my /etc/profile.d/ file to export the correct path.
KERN_DIR=/usr/src/kernels/`uname -r|sed 's/.PAE//g'`

export KERN_DIR
I installed the latest kernel development files:
yum -y install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

PAE Kernel use this:
yum -y  install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
Then I updated the OS:
yum -y update

Then I rebooted
Mar 112013


Recording a window using the –windowid option, doesn’t track the window itself, but the region that it covers. Also when using that option the -x,-y,–width and –height options are relative to the specified window area. An easy way to find out the id of a window, is by using the xwininfo program. Running a command like : xwininfo | awk ´/Window id:/ {print $4}´ will give you only the id of the window(which should look like this: 0x4800005) More conviniently you can put all that in the command that launches recordMyDesktop like this: ~$recordmydesktop –windowid $(xwininfo | awk ´/Window id:/ {print $4}´) Also, the lower quality you select on a video recording ( -v_quality option), the highest CPU-power that you will need. So if you are doing the encoding on the fly ,it’s better to start with default values and manipulate the end-result with another program. An excellent converter is the vlc media player, which can perform a variety of transcoding operations, either using the graphical interface, or the commandline for more flexibility. vlc is a complex piece of software, so you should consult it’s documentation, before using it. An example follows, which will resize a recording named out.ogv to 512×384:

Sep 042011
yum -y install samba 

mkdir /home/share 
chmod 777 /home/share 
vi /etc/samba/smb.conf 

# near line 66: add
unix charset = UTF-8 

# line 87: change (Windows' default)
workgroup = WORKGROUP 

# line 93: uncomment and change IP address you allow
hosts allow = 127. 10.0.0. 

# line 119: change (no auth)
security = share 

# add at the bottom
[Share]# any name you like
   path = /home/share# shared directory
   writable = yes# OK to write
   guest ok = yes# guest OK
   guest only = yes# guest only
   create mode = 0777# fully accessed
   directory mode = 0777# fully accessed
   share modes = yes# warn if some people access to a file

/etc/rc.d/init.d/smb start 
Starting SMB services:[  OK  ]
chkconfig smb on
Sep 042011
 yum -y install phpMyAdmin php-mysql php-mcrypt

 vi /etc/httpd/conf.d/phpMyAdmin.conf

 Change line 14 and add any IP address that you want to allow access to your phpmyadmin web page.
 By default it will allow the local host: Allow from
 You can add any computer on your domain: Allow from
 This is assuming your domain IP address range is
 Alternatively, you can add access to any computer by changing the line to read: Allow from All
 You should setup SSL access to your server if you are going to allow all.

 Save the changes and restart httpd by typing:
 	sudo /etc/rc.d/init.d/httpd reload
 	sudo service httpd restart  

Example of phpMyAdmin.conf file:

# phpMyAdmin - Web based MySQL browser written in php
# Allows only localhost by default
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from
   Allow from ::1

<Directory /usr/share/phpMyAdmin/setup/>
   Order Deny,Allow
   Deny from All
   Allow from
   Allow from ::1

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#<IfModule mod_security.c>
#    <Directory /usr/share/phpMyAdmin/>
#        SecRuleInheritance Off
#    </Directory>
Dec 092010

After updating your Fedora Linux configuration or configuring multiple boot operating systems you will see several options to boot from in your Grub boot menu. To set one of the menu choices as the default you will have to edit /boot/grub/grub.conf.

My grub.conf file has three options in the boot menu (two for Fedora and one for Windows 7 Ultimate). If you look for the word “title” you will see what will actually display on the boot menu. The titles are numbered 0, 1, 2, etc (the first one in the list is 0, second is 1, third is 2 and so on) . If I want to set the first menu title to be the default when I boot my computer all I have to do is change the default line to say default=0. If I want Windows 7 Ultimate to be the default I would change it to say default=2. Mine looks like this:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_m1730xps-lv_root
#          initrd /initrd-[generic-]version.img
title Fedora (
root (hd0,1)
kernel /vmlinuz- ro root=/dev/mapper/vg_m1730xps-lv_root rd_LUKS_UUID=luks-8c135a3b-65ff-48d6-9c21-8e6881ac8c18 rd_LVM_LV=vg_m1730xps/lv_root rd_LVM_LV=vg_m1730xps/lv_swap rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-
title Fedora (
root (hd0,1)
kernel /vmlinuz- ro root=/dev/mapper/vg_m1730xps-lv_root rd_LUKS_UUID=luks-8c135a3b-65ff-48d6-9c21-8e6881ac8c18 rd_LVM_LV=vg_m1730xps/lv_root rd_LVM_LV=vg_m1730xps/lv_swap rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-
title Windows 7 Ultimate
rootnoverify (hd0,0)
chainloader +1

As you can see, my default boot menu is set to Fedora (

May 182010

I was having a problem with WordPress where I could not upload any documents to my website via posting and I could not activate Akismet or change Appearance or Themes. Basically, I could not write to the backend even though my MySql account had full privileges in the database. I got the following error message when I tried to enter my Akismet key:

Akismet The key you entered could not be verified because a connection to could not be established. Please check your server configuration.

The problem was that Apache did not have read/write access to the blog website.

The solution was to change the owner of the blog from root to apache the restart the web service.

sudo chown -R apache:root /var/www/html/blog/

sudo service httpd restart

Once I did this my errors went away.

May 172010

How to install JDBC driver on Linux

To use MySQL with your java programs, you need to download the MySQL Connector-J from their website.

Download the tar.gz file and place it on a directory that you can access. (Suggested directory is /usr/local). Remeber the name that you used when you downloaded it.

You have access to /usr/local

Downloaded file name is on /usr/local/mysql-jdbc.tar.gz

Installing MySQL Connector-J

To use the Connector-J, you need to unzip and untar it. To do this, you have to enter this command on Linux:

cd /usr/local

tar -zxvf mysql-jdbc.tar.gz

At the end of these commands, the files would be placed in a folder called: mysql-connector-java-version.
Where version is the connector version number.
You can then copy the mysql-connector-java-version-bin.jar file in this directory to the java jre/lib/ext directory. Doing this will allow the java interpreter to find the driver.
Then your JDBC will work fine.

I still could not get my JDBC connector to work. JDBC looks for the mysql-connector-java-x.x.x-bin.jar in jre/lib/ext. I had to find where I installed java which was in (/usr/java/jre1.6.0_20). I copied the .jar file to /usr/java/jre1.6.0_20/lib/ext/) and I still discovered a few problems or things that I was missing:
1. I did not have a $JAVA_HOME variable set
2. I typed “which java” and I discovered that the default java location my system used was (/usr/bin/java). This was not where I installed java.
3. Finally, the directory where I installed java did not have /jre/lib/ext. I only had /usr/java/jre1.6.0_20/lib/ext NOT /usr/java/jre/lib/ext which is what JDBC needed to work correctly.

Problem 1 Solution: To set the global JAVA_HOME variable (Need to be root or have sudo privileges):
From the command line type: echo $JAVA_HOME
You should see the path to your java installation. If you don’t see anything then you don’t have the JAVA_HOME variable set.
To set this up you need to edit or create /etc/profile.d/ and export JAVA_HOME to the path of your java installation. As I stated earlier my java installation path was /usr/java/jre1.6.0_20/. So my /etc/profile.d/ file looks like this:

export JAVA_HOME=/usr/java/jre1.6.0_20
export PATH=$JAVA_HOME/bin:$PATH

After you save this file you need to implement the JAVA_HOME variable by typing: source /etc/profile.d/
Then you need to reload your profile by typing: . ./.bash_profile
Now when you type “echo $JAVA_HOME” you should see /usr/java/jre1.6.0_20.

Problem 2 Solution: This should have been fixed when you sourced /etc/profile.d/ If you type “which java” you should see /usr/java/jre1.6.0_20/bin/java or the equivalent if your java installation is different from mine.

Problem 3 Solution: Change directory to /usr/java/jre1.6.0_20 and create a symbolic link to jre by typing “ln -s /usr/java/jre1.6.0_20 jre”. This will force the JDBC connector to look in the correct path. If you want to test it type: cd $JAVA_HOME/jre/lib/ext. You should be in /usr/java/jre1.6.0_20/jre/lib/ext. Your .jar files should be in here too.