Saturday, February 11, 2012

RPM Fusion configuration for RHEL / CENTOS / FEDORA

Installing Free and Nonfree Repositories

We have two separate software repositories:
  • free for Open Source Software (as defined by the Fedora Licensing Guidelines) which the Fedora project cannot ship due to other reasons
  • nonfree for redistributable software that is not Open Source Software (as defined by the Fedora Licensing Guidelines); this includes software with publicly available source-code that has "no commercial use"-like restrictions
Installation can be done either using a web browser, or via the command line.

Graphical Setup via Firefox web browser

  1. First enable access to the free repository. For users of gpk (gnome package kit) or kpackagekit in Fedora that is easy and basically only one step: just click on one of the following files, depending on what distribution you use and then follow the default options that Firefox and Package Kit offer by clicking Enter a few times (¹):
  2. Once that succeeds, you can enable access to the nonfree repositories by clicking on one of the following files, depending on what distribution you use and then follow the default options that Firefox and Package Kit offer by clicking Enter a few times(¹):
(¹) Once you clicked on above link Firefox will ask you how to Open the file. Here you can simply use the default and open the file with the default application Package Installer. Then Firefox will call Package Kit, which asks Do you want to install this file ?. Click OK to begin install; Package Kit then will complain about a Missing security signature; once you tell Package Kit to install the package nevertheless it will move on and install it. That's all.

Command Line Setup using rpm

To enable access to both the free and the nonfree repository use the following command:
  • Fedora 15 and 16:
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
  • Fedora Rawhide and what will become Fedora 17 (Alpha, Beta and snapshots):
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm'
  • RHEL 5 or compatible like CentOS:
    su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm'
  • RHEL 6 or compatible like CentOS:
    su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm'

Important notes

  • You need to enable EPEL on RHEL 5 & 6 or compatible distributions like CentOS before you enable RPM Fusion for EL. See the fedoraproject wiki for instruction how to enable EPEL.
  • The RPM Fusion for EL repositories are still in the early testing stages; hence you (for now) need to enable epel-testing as well, as some of the RPM Fusion packages depend on packages that are currently in epel-testing.
  • All users that used Freshrpms or Livna installed properly (e.g. by installing one of their foo-release packages) got RPM Fusion free and nonfree repositories enabled automatically.

Friday, February 3, 2012

2 Computers via 1 Keyboard & Mouse

Do you have multiple computers on your desk? Is one of them a laptop that is sat off to the side a bit? Have you ever wished that you could get rid of all but one of the keyboard / mouse combos that clutter your desk or that your laptop was easier to control? If so then Synergy is the answer to your woes.

Synergy (synergy2.sf.net ) allows you to use the keyboard and mouse of your primary computer to control all the other computers around you. Best of all, it is free, works with Linux, OS X, and Windows. There is one pitfall though... Synergy has not been updated since 2006 but have no fear because it has been forked to a new project called Synergy+ (http://code.google.com/p/synergy-plus) and they are working to squash the bugs that have arisen plus add new functionality. Below is an explanation of Synergy (taken from the Synergy+ home page):

Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It's intended for users with multiple computers, where each system uses its own display. It's a little like having a 2nd or a 3rd desktop...




In the above picture you could just as easily substitute a laptop for any one of these machines. Client computers can be to the left, right, top, or bottom of the server's screen or any other clients screen. For example, imagine a shelf just above the monitors in the above picture that holds your laptop and monitors for two other computers. Then imagine a shelf above that with a bank of 5 more monitors...

As a side note, if you run a dual monitor setup then the "screen" is the combined real estate of both monitors. Synergy supports mapping a certain percentage of the screen to be aligned with a percentage of another screen. The means that if your dual monitor setup uses matching monitor resolutions you could have 50% of the screen's top edge (one monitor's worth) mapped to the edge of one client and the other 50% (the second monitor) to another client.

Synergy does have some shortcomings when it comes to security but they are easily overcome. Quoting the Synergy2 site:

Synergy does not do any authentication or encryption. Any computer can connect to the synergy server if it provides a screen name known to the server, and all data is transferred between the server and the clients unencrypted which means that anyone can, say, extract the key presses used to type a password. Therefore, synergy should not be used on untrusted networks.

However, there are tools that can add authentication and encryption to synergy without modifying either those tools or synergy. One such tool is SSH (which stands for secure shell). A free implementation of SSH is called OpenSSH and runs on Linux, many Unixes, and Windows (in combination with Cygwin).

So, to secure Synergy you can either tunnel it through SSH or do like I do and configure a private VPN between your computers using OpenVPN and run Synergy over it. OpenVPN is available in most Linux distributions or you can download it directly from their site.

As a final tip, be sure to set your clients to run Synergy (and OpenVPN if used) automatically so that you can login without having to break out the spare keyboard and mouse again. This is particularly easy in Gnome. At the end of /etc/gdm/Init/Default, just before the line that says exit 0 add the following:

/usr/bin/killall synergyc

while [ $(pgrep -x synergyc) ]; do sleep 0.1; done

/usr/bin/synergyc

Now, go clear those extra keyboards off your desk!

Wednesday, February 1, 2012

How to Install Mozilla Thunderbird 9 on Centos, Red Hat (RHEL) 6.2 / 6.1 / 6, Fedora 16 / 15


Introduction

Mozilla Thunderbird is a free, open source, cross-platform e-mail and news client developed by the Mozilla Foundation. The project strategy is modeled after Mozilla Firefox, a project aimed at creating a web browser. On December 7, 2004, version 1.0 was released, and received over 500,000 downloads in its first three days of release, and 1,000,000 in 10 days.

Mozilla Thunderbird 9 is released on 20 December and today we discuss about it in this tutorial. This tutorial allows you to install Thunderbird 9 on Fedora 16/15/14/13, CentOS 6.2/6.1/6 and Red Hat (RHEL) 6.2/6.1/6 using YUM command. Fedora 16 and Fedora 15 users found Thunderbird 9 on their updates repos, they don't have to install the Remi Repositories as other previous versions of Fedora do. So older Fedora users can also install Thunderbird 9 on their desktop by installing the Remi Dependencies. So just follow the instructions given below.

What's New in Thunderbird
Thunderbird is based on the new Mozilla Gecko 9 engine
New opt-in system for users to send performance and usability data back to Mozilla to improve future versions of Thunderbird
Additional support for Personas in the compose and address book windows
Better keyboard handling for attachments
Windows users can hide the menu bar (and show it with the "alt" key)
Several user interface fixes and improvements

You also check out more features ans other details at the Thunderbird Release Notes.

Installing Mozilla Thunderbird 9 on Fedora, CentOS, and Red Hat (RHEL)

Step 1 : Before beginning the Installation you must log on as Root User and now Open the terminal and enter the following command to enter as a Root user : -

$ su

Alternatively, you can also use

$ sudo -i

Step 2 : Now Install the Remi Repository on the Older versions of Fedora and on CentOS or RHEL. Type the following commands to install the Remi Repository. The Remi Repository are needed on the previous versions of Fedora such as Fedora 12 / 13 /14.

Remi Dependency for Fedora 14


$ rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

$ rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Remi Repository for Fedora 14

$ rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm

Remi Repository for Fedora 13

$ rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm

Remi Repository for CentOS / Red Hat (RHEL)

Remi Dependency for CentOS 6 and RHEL 6

$ rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Remi Repository for CentOS 6 and Red Hat 6

$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Step 3 : Check Available Thunderbird Versions for Fedora, CentOS and Red Hat and install it with the help of YUM on terminal

For Fedora 16 / 15

$ yum list thunderbird

For CentOS 6 and Red Hat (RHEL) 6

$ yum --enablerepo=remi list thunderbird

Step 4 : Now, Update and Install the Thunderbird 9 with the help of YUM on Terminal

For Fedora 16 / 15

For updating type the following command : -

$ yum update thunderbird

For Installing type the following command : -


$ yum install thunderbird


For CentOS 6 and Red Hat (RHEL) 6




For updating type the following command : -


$ yum --enablerepo=remi update thunderbird

For Installing type the following command : -


$ yum --enablerepo=remi install thunderbird

Step 5 : Finally, you can start the Thunderbird 9 on your Fedora, CentOS and RHEL Desktops with the help of terminal. Start Thunderbird with the help of following command on the terminal : -


$ thunderbird

Alternatively, You can also use Thunderbird (9) launcher and launch the Thunderbird on your desktop.

Monday, January 30, 2012

Nvidia proprietary drivers and RHEL6 / CentOS 6

Sometimes you need to run Nvidia proprietary drivers in various linux distributions.

I was able to run it on standard RHEL 6.0 installed as “Desktop” with the following commands:

Update the system and install the necessary packages
yum update
yum install gcc kernel-devel

reboot

Blacklist the nouveau driver
sed -i '/root=/s|$| rdblacklist=nouveau vga=791|' /boot/grub/grub.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf


Change the initrd image:
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

Remove the nouveau driver and reboot:
yum remove xorg-x11-drv-nouveau
reboot

Stop the X server and run the Nvidia installation process from command line
init 3
chmod +x NVIDIA-Linux-x86-260.19.29.run
./NVIDIA-Linux-x86-260.19.29.run

Enjoy

iPhone Tip: How To Lock Screen Orientation in iOS 4

In iOS 4, there is a lovely feature that Apple doesn’t explicitly mention. I love iPhone’s auto-rotation feature but at the same time I hate it.

I hate it turn the screen sideway when I lay in bed to browse web and check my email. Do you have the same problem? A few months, I wrote a post about two great hacks that can disable the auto-screen rotation. But it’s for jailbroken iPhone only.

With the release of iOS 4, Apple has finally introduced a screen orientation lock for iPhone. To lock your iPhone to portrait orientation,

1. You can simply tap the HOME button twice to bring the multitasking dock.

2. Swipe your finger to the right until you see the music control buttons.





3. Then just tap on the lock button. After you enable the screen lock, the auto rotation is disabled and your screen is locked to the portrait orientation.



To re-enable the auto rotation, you can simply go through the steps again to turn off the lock.

Sunday, January 29, 2012

Install Skype in EL6 (RHEL 6/ Scientificlinux 6/ Centos 6)

Install Skype in EL6 (RHEL 6/ Scientificlinux 6/ Centos 6)

Apparently Skype are still living in the past and they do not provide 64bit versions of their app... So, in order to install it in our EL6 64bit OS we need to install a crapload of 32bit dependencies. Repeat after me (as root):
 
yum install libasound.so.2 libXv.so.1 libXss.so.1 libSM.so.6 libXi.so.6 libXrender.so.1 libXrandr.so.2 libfreetype.so.6 libfontconfig.so.1 libz.so.1 libgthread-2.0.so.0 libstdc++.so.6 libQtDBus.so.4 libQtGui.so.4 pulseaudio-libs.i686 wget http://www.skype.com/go/getskype-linux-beta-fc10 yum localinstall --nogpgcheck ./skype-*.rpm
That's about it!

PS: I love it how yum automatically found those dependencies by only specifying .so files! ;-)

Update! - It seems the latest RPM for Fedora (skype-2.2.0.25-fedora.i586.rpm in this case) no longer works on EL6 - gives out an "Aborted" message and dies. I found that after installing the RPM you can get the program back working by overwriting the binary from /usr/bin/skype with the one from the static version:
 
wget http://download.skype.com/linux/skype_static-2.2.0.25.tar.bz2
tar xjf skype_static-2.2.0.25.tar.bz2
cp skype_static-2.2.0.25/skype /usr/bin/skype
cp: overwrite `/usr/bin/skype'? y

Saturday, January 28, 2012

Multimedia @ CentOS 6

Here is one more good text about CentOS:

http://blog.ajoian.ro/2011/07/multimedia-stack-centos-6.html

Continuing my Centos 6 trip, (as Fedora 15 is un-usable by my standards) tonight I'm following a tip to use elrepo for hardware support and rpmforge for video codecs and my favorite media player - vlc.

Well to install rpmforge and elrepo is rather easy just do a :

rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm more details can be found here
rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm or here

Now to get codecs working just try to play any of your video media with "Totem Movie Player" and because somewhere in Fedora we had packagekit with gstreamer support (good call about that one) you will see a search box like the one below. Supply the root password to install them and magic you'll be able to play your videos.



Well if you feel that this is not enough you can take the experts advice and yum install everything, this way you will not miss anything :

yum install compat-libstdc++-33 libdvdcss libdvdread libdvdplay libdvdnav lsdvd libquicktime --skip-broken
yum install flash-plugin mplayerplug-in mplayer mplayer-gui gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly

Moving to the hardware bit, last night I managed to get my funky wireless going, but thru an ugly compile hack. I got a tip today about elrepo and looking at the driver version that they offer you can find support for ati, nvidia and ntfs.

Broadcom BCM4313 the wireless driver that i needed is not by default offered by them (i guess legal issues) but they are explaining how to use the src.rpm to compile it yourself, with a bit more elegance then the way I've done it. You can read all about it here.

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...