Posts tagged fedora

How to Enable Flash in Google Chrome for Fedora 11 i686

So you’ve installed the latest development builds of Chromium for Fedora Linux. The only thing lacking is that youtube is not loading. If not, what are you waiting for? Refer to one of my previous posts.

First make sure you install the Adobe yum repository.

As root:-

rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

Then install the flash plugin.

yum install flash-plugin.i386

The flash plugin will be installed in /usr/lib/flash-plugin/libflashplayer.so

Chrome plugins are supposed to be located in /usr/lib/chromium-browser/plugins. So lets create a symbolic link, so that whenever your Adobe flash plugin is updated, your Chrome automatically gets the latest version.

n -sv /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/chromium-browser/plugins/libflashplayer.so

Now start your Chrome browser from the command line, with the --enable-plugins switch. This will enable the flash plugin.

Here’s a screenshot of me watching a video from youtube on chrome:-

Flash Player in Google Chrome for Linux

Flash Player in Google Chrome for Linux

Say goodbye to geek productivity once this is done :D

Temporarily Disable a Yum Repository

Sometimes, you may run into problems updating Fedora via yum. What you could do is temporarily disable the offending repository, and update everything else while the errors are being fixed upstream.

  1. List out your enabled yum repositories.
    $ yum repolist

    You would get something like this:

    [raja@atreides ~]$ yum repolist
    Loaded plugins: fastestmirror, presto, refresh-packagekit
    repo id                   repo name                              status
    adobe-linux-i386          Adobe Systems Incorporated             enabled:     17
    chromium                  Chromium Test Packages                 enabled:      7
    fedora                    Fedora 11 - i386                       enabled: 13,289
    rpmfusion-free            RPM Fusion for Fedora 11 - Free        enabled:    377
    rpmfusion-free-updates    RPM Fusion for Fedora 11 - Free - Upda enabled:    210
    rpmfusion-nonfree         RPM Fusion for Fedora 11 - Nonfree     enabled:    110
    rpmfusion-nonfree-updates RPM Fusion for Fedora 11 - Nonfree - U enabled:    115
    updates                   Fedora 11 - i386 - Updates             enabled:  3,451
    repolist: 17,576
  2. The names on the left are the repo ids. To disable a particular one, for example rpmfusion-nonfree-updates while doing updates, run your yum like this:-
    # yum upgrade --disablerepo=rpmfusion-free-updates
  3. This will help you upgrade the rest of the packages in the mean time.

Configure a Caching-Only Name Server in a Chroot Environment for Fedora 11

Having a caching only name-server on your local Machine speeds up your browsing. Here’s how to set up a slightly more secure caching server using ISC Bind in Fedora 11.

  1. Install bind and bind-chroot packages
    # yum install bind bind-chroot
  2. Edit your /etc/sysconfig/named file.
    # vim /etc/sysconfig/named

    Add the following line:

    ROOTDIR="/var/named/chroot"

  3. Edit your /etc/named.conf file.
    # vim /etc/named.conf
  4. Change the following line:
    listen-on port 53 { 127.0.0.1; };

    to

    listen-on port 53 { any; };

    This allows the bind daemon to listen on all your network IPs, not just your loopback(127.0.0.1) address.

  5. Change this line:
    allow-query     { localhost; };

    to

    allow-query     { 192.168.0.0/24; };

    You now allow all the machines in your home LAN to use your DNS server.

  6. Make sure it starts at boot time.
    # chkconfig named on

    Restart your DNS server.

    # service named restart
  7. Make sure its listening on the correct ports.
    # netstat -ntupl | grep named

    In my case, the DNS server IP is 192.168.0.10. So, as seen here, the line udp 0 0 192.168.0.10:53 0.0.0.0:* 2851/named shows it is listening correctly.

  8. Then test your server from another machine in your network. Most probably another linux box or laptop.
    # dig @192.168.0.10 google.com

    The dig command, with the ‘@’ instructs it to get the IP address for google.com from your newly set up server. On my machine, it looked like this:-

    [root@atreides ~]# dig @192.168.0.10 google.com
     
    ; < <>> DiG 9.6.1-RedHat-9.6.1-2.fc11 < <>> @192.168.0.10 google.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 6515
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 0
     
    ;; QUESTION SECTION:
    ;google.com.			IN	A
     
    ;; ANSWER SECTION:
    google.com.		300	IN	A	74.125.127.100
    google.com.		300	IN	A	74.125.45.100
    google.com.		300	IN	A	74.125.67.100
     
    ;; AUTHORITY SECTION:
    google.com.		171853	IN	NS	ns3.google.com.
    google.com.		171853	IN	NS	ns1.google.com.
    google.com.		171853	IN	NS	ns2.google.com.
    google.com.		171853	IN	NS	ns4.google.com.
     
    ;; Query time: 82 msec
    ;; SERVER: 192.168.0.10#53(192.168.0.10)
    ;; WHEN: Sat Jul 18 20:14:59 2009
    ;; MSG SIZE  rcvd: 148

    Note the SERVER: line. that shows you the answer for the query came from my DNS server (192.168.0.10).

  9. Finally, set up your /etc/resolv.conf accordingly.

    On the server:

    nameserver 127.0.0.1

    And on all your other machines:

    nameserver 192.168.0.10

How to install a Dynamic DNS client for Fedora Linux

Many people use dynamic dns for different purposes. I use it to give my home machine a public presence. I choose DynDNS for my needs. Its a leader in this segment and have been around for a long time.

First, you’ll need to register for a free account at their site. Once you’ve chosen a domain name and setup your details, you’ll need a dynamic dns client to update your IP, which probably changes every time you sign on to your ISP.

I use inadyn, a free dynamic dns update client that works in linux.

The Inadyn package name is inadyn-mt. Install inadyn using yum:

yum install inadyn-mt

Then edit the /etc/inadyn.conf file with your details.

Then turn on the service.

service inadyn start

Check /var/log/messages. you should get some entires showing whether you edited the config file properly, and the update was successful.

Jul 10 22:50:43 atom INADYN[8251]: Fri Jul 10 22:50:43 2009: I:INADYN: Alias 'your-hostname.dyndns.org' to IP '12.34.56.78' updated successfully.

Once you know the client works, dont forget to turn it on permanently on startup.

chkconfig inadyn on

How to enable the Windows Key in Linux

After installing Fedora, or most linuxes, you may realise that the Windows key that you used during the unenlightened days doesnt work anymore. Even worse, you cannot seem to use it as part of you Keyboard shortcuts. Gives some weird irony when reading about Dead Keys.

Enabling the Windows Key is easy, Just go to System -> Preferences -> Keyboard.

You will get the Keyboard Preferences window up. Choose the Layouts tab.

The Keyboard type used

The Keyboard type used

Then choose Layout Options. A new Keyboard Layout Options window comes out.

Keyboard Layout Options

Keyboard Layout Options

Expand the Alt/Win Key Behavior menu, and choose Super is mapped to Win Keys Then close all the menus. You know have a functional Windows key.

Choose the Super is mapped to Win Keys

Choose the Super is mapped to Win Keys

You can now assign shortcuts using the Keyboard Shortcuts menu. In this screenshot, I assigned Windows key + R to opening a new terminal.

A Sample Shortcut Using the Windows Key

A Sample Shortcut Using the Windows Key

Pretty handy for me. I’m sure you will be able to think of other shortcuts that suite your fancy.

2 CLI ways to determine which rpm package has a program you wish to install in Fedora Linux

There are 2 ways I know of to search for a particular program to install in Linux. As usual, I’ll be focusing on the Command Line Interface (CLI).

So, you’ve heard about the versatile port scanning tool called nmap and want to install it in Fedora Linux. The only problem is, you don’t know if it has been pre-packaged and is available as an rpm binary. No worries, all you need to do is search for using yum.

Use the yum search command.

yum search nmap

Based on its output, you know there are packages available, and all you need to do is yum install nmap

[raja@atreides ~]$ yum search nmap
Loaded plugins: fastestmirror, presto, refresh-packagekit
================================ Matched: nmap =================================
nmap.i586 : Network exploration tool and security scanner
nmap-frontend.i586 : the GTK+ frontend for nmap
onesixtyone.i586 : An efficient SNMP scanner
perl-Nmap-Parser.noarch : Parse nmap scan data with perl
psad.i586 : Port Scan Attack Detector (psad) watches for suspect traffic

Or, you might know that its called nmap, and want to search through you yum repositories to find if any of the available rpms have a file called nmap. To do that, use the yum provides */ command. e.g.

yum provides */nmap

Look at what it gives:

[raja@atreides ~]$ yum provides */nmap
Loaded plugins: fastestmirror, presto, refresh-packagekit
2:nmap-4.76-4.fc11.i586 : Network exploration tool and security scanner
Repo        : fedora
Matched from:
Filename    : /usr/share/nmap
Filename    : /usr/bin/nmap

From this, you know that the nmap-4.76-4.fc11.i586 rpm contains these files, and by installing it, you get nmap.

How to enable USB Devices for VirtualBox Guests in Fedora 11

By default, guest hosts running in VirtualBox on Fedora 11 cannot mount or see usb devices plugged into your machine. A few tweaks are necessary for USB support to work.

  1. Edit your /etc/rc.sysinit file, change line no 26 from
    mount -n -t usbfs /proc/bus/usb /proc/bus/usb

    to

    mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/gr    oup),devmode=664 /proc/bus/usb /proc/bus/usb

    So, your /etc/rc.sysinit should change from:

     23 if [ ! -d /proc/bus/usb ]; then
     24         modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb     /proc/bus/usb
     25 else
     26        mount -n -t usbfs /proc/bus/usb /proc/bus/usb
     27 fi

    to

     24         modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb     /proc/bus/usb
     25 else
     26 #       mount -n -t usbfs /proc/bus/usb /proc/bus/usb
     27 mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/gr    oup),devmode=664 /proc/bus/usb /proc/bus/usb
     28 fi
  2. Next, edit your /etc/udev/rules.d/10-vboxdrv.rules. Change line number 1 from
    KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"

    to

    KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0660"
  3. Reboot your machine. You should now be able to mount you usb devices.

The following screenshot shows some of the USB devices can allow my guest machine to view.

The USB devices available for VirtualBox Guests

The USB devices available for VirtualBox Guests

Devices like my USB Flash Drive are still blurred out. In order to get them to work, I need to install the VirtualBox Guest Additions first.

Source:

VirtualBox Community Forum

How to install Virtual Box 3.0 in Fedora 11 32 bit

When trying to install VirtualBox 3.0 in Fedora 11 32bit, you may encounter this error:-

[root@atreides ~]# rpm -ivh VirtualBox-2.2.4_47978_fedora11-1.i586.rpm
Preparing...                ########################################### [100%]
   1:VirtualBox             ########################################### [100%]
 
Creating group 'vboxusers'. VM users must be member of that group!
 
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
 
Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute
 
  /etc/init.d/vboxdrv setup
 
as root.

This happens even when you have the kernel-devel rpm package installed already.

The short:-
Your kernel is most probably a PAE kernel, so just yum install kernel-PAE-devel.i686 and then run /etc/init.d/vboxdrv setup. You can then run VirtualBox as usual.

The long:-

Further investigating, I tailed the /var/log/vbox-install.log file, which gave this error :-

[root@atreides ~]# tail /var/log/vbox-install.log
** Compiling vboxdrv
Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
</directory>

I found it kind of weird, since I have already installed the kernel-devel rpm. So I decided to check my kernel version with this command:-

[root@atreides ~]# uname -a
Linux atreides.dune 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux

After reading up further, I saw this in the Fedora 11 Release Notes:-

3.1. x86 Specifics for Fedora
By default, the PAE kernel is used on 32-bit hardware, where supported by the hardware.

My CPU supports PAE, so by default the kernel-PAE rpm is installed. I checked this by using the following command:-

[root@atreides ~]# rpm -qa | grep kernel
kernel-PAE-2.6.29.4-167.fc11.i686
kernel-firmware-2.6.29.5-191.fc11.noarch
kernel-PAE-2.6.29.5-191.fc11.i686
kernel-devel-2.6.29.5-191.fc11.i586
kerneloops-0.12-5.fc11.i586
kernel-headers-2.6.29.5-191.fc11.i586

You can see that kernel-PAE-2.6.29.4-167.fc11.i686 and kernel-PAE-2.6.29.5-191.fc11.i686 is installed.

Doing a yum search kernel-PAE shows this:-

[raja@atreides ~]$ yum search kernel-PAE
Loaded plugins: fastestmirror, presto, refresh-packagekit
========================================= Matched: kernel-PAE =========================================
kmod-iscsitarget-PAE.i686 : Metapackage which tracks in iscsitarget kernel module for newest kernel-PAE
kernel-PAE.i686 : The Linux kernel compiled for PAE capable machines
kernel-PAE-devel.i686 : Development package for building kernel modules to match the PAE kernel
kernel-PAEdebug.i686 : The Linux kernel compiled with extra debugging enabled for PAE capable machines
kernel-PAEdebug-devel.i686 : Development package for building kernel modules to match the PAEdebug
                           : kernel
kmod-VirtualBox-OSE-PAE.i686 : Metapackage which tracks in VirtualBox-OSE kernel module for newest
                             : kernel-PAE
kmod-blcr-PAE.i686 : Metapackage which tracks in blcr kernel module for newest kernel-PAE
kmod-em8300-PAE.i686 : Metapackage which tracks in em8300 kernel module for newest kernel-PAE
kmod-kqemu-PAE.i686 : Metapackage which tracks in kqemu kernel module for newest kernel-PAE
kmod-ndiswrapper-PAE.i686 : Metapackage which tracks in ndiswrapper kernel module for newest kernel-PAE
kmod-nvidia-173xx-PAE.i686 : Metapackage which tracks in nvidia-173xx kernel module for newest
                           : kernel-PAE
kmod-nvidia-PAE.i686 : Metapackage which tracks in nvidia kernel module for newest kernel-PAE
kmod-open-vm-tools-PAE.i686 : Metapackage which tracks in open-vm-tools kernel module for newest
                            : kernel-PAE
kmod-rt2860-PAE.i686 : Metapackage which tracks in rt2860 kernel module for newest kernel-PAE
kmod-rt2870-PAE.i686 : Metapackage which tracks in rt2870 kernel module for newest kernel-PAE
kmod-rt3070-PAE.i686 : Metapackage which tracks in rt3070 kernel module for newest kernel-PAE
kmod-slmodem-PAE.i686 : Metapackage which tracks in slmodem kernel module for newest kernel-PAE
kmod-sysprof-PAE.i686 : Metapackage which tracks in sysprof kernel module for newest kernel-PAE
kmod-wl-PAE.i686 : Metapackage which tracks in wl kernel module for newest kernel-PAE

Now you know that the kernel-sources for the PAE kernel is kernel-PAE-devel.i686. So, I’d hav to install that instead.

[root@atreides ~]# yum install kernel-PAE-devel.i686
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: mirror.oscc.org.my
 * rpmfusion-free: mirror.transact.net.au
 * rpmfusion-free-updates: mirror.transact.net.au
 * rpmfusion-nonfree: mirror.transact.net.au
 * rpmfusion-nonfree-updates: mirror.transact.net.au
 * updates: mirror.oscc.org.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-PAE-devel.i686 0:2.6.29.5-191.fc11 set to be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=======================================================================================================
 Package                      Arch             Version                       Repository           Size
=======================================================================================================
Installing:
 kernel-PAE-devel             i686             2.6.29.5-191.fc11             updates             6.2 M
 
Transaction Summary
=======================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
 
Total download size: 6.2 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 6.2 M
kernel-PAE-devel-2.6.29.5-191.fc11.i686.rpm                                     | 6.2 MB     08:33
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : kernel-PAE-devel-2.6.29.5-191.fc11.i686                                         1/1
 
Installed:
  kernel-PAE-devel.i686 0:2.6.29.5-191.fc11
 
Complete!

Once done, run /etc/init.d/vboxdrv setup as root, and your done.

root@atreides ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module                          [  OK  ]
Recompiling VirtualBox kernel module                       [  OK  ]
Starting VirtualBox kernel module                          [  OK  ]

You can now run VirtualBox. :)

How to install Google Chrome in Fedora 10 or Fedora 11

Google has its open source version of its Chrome browser, currently under heavy development. The open source version is called Chromium.

Tom ‘Spot’ Callaway, the Fedora Engineering Manager, has created a rpm repository with precompiled versions of the chromium browser.

To install chromium, create a chromium.repo file in your /etc/yum.repos.d directory.

vim /etc/yum.repos.d/chromium.repo

Then fill it up with this:-

[chromium]
name=Chromium Test Packages
baseurl=http://spot.fedorapeople.org/chromium/F$releasever/
enabled=1
gpgcheck=0

After that, just yum install chromium

[root@atreides ~]# yum install chromium
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: mirror.oscc.org.my
 * rpmfusion-free: mirror.transact.net.au
 * rpmfusion-free-updates: mirror.transact.net.au
 * rpmfusion-nonfree: mirror.transact.net.au
 * rpmfusion-nonfree-updates: mirror.transact.net.au
 * updates: ftp.riken.jp
chromium                                                 | 1.2 kB     00:00
chromium/primary                                         | 2.4 kB     00:00
chromium                                                                    7/7
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package chromium.i586 0:3.0.191.0-0.1.20090628svn19474.fc11 set to be updated
--> Processing Dependency: libv8.so.0 for package: chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586
--> Running transaction check
---> Package v8.i586 0:1.2.9-1.20090626svn2284.fc11 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package     Arch    Version                                  Repository   Size
================================================================================
Installing:
 chromium    i586    3.0.191.0-0.1.20090628svn19474.fc11      chromium     11 M
Installing for dependencies:
 v8          i586    1.2.9-1.20090626svn2284.fc11             chromium    858 k
 
Transaction Summary
================================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
 
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 12 M
(1/2): chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586 |  11 MB     01:11
(2/2): v8-1.2.9-1.20090626svn2284.fc11.i586.rpm          | 858 kB     00:06
--------------------------------------------------------------------------------
Total                                           149 kB/s |  12 MB     01:19
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : v8-1.2.9-1.20090626svn2284.fc11.i586                     1/2
  Installing     : chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586        2/2
 
Installed:
  chromium.i586 0:3.0.191.0-0.1.20090628svn19474.fc11
 
Dependency Installed:
  v8.i586 0:1.2.9-1.20090626svn2284.fc11
 
Complete!

And walla!! Chromium for Fedora !!!

Here’s a screenshot of Chromium running on my machine:
chromium
Sources:-