TimeLinux1

Sunday, February 17, 2013

Logitech Bluetooth Keyboard K810 with Fedora 17

So received my brand new Logitech Bluetooth Illuminated Keyboard K810 from Amazon a few days ago.
Had been wanting a wireless keyboard for a long time to unclutter the desktop workspace at home.
[[BTW I also went one further and got a wireless mouse too (Verbatim Wireless Mini Nano Travel Mouse 97470) and I write about it little later in this article.]]

What is good and appealing about this keyboard (besides its wireless feature) is its Illumination feature.
In low light conditions, a gentle light comes through each key, meaning all the keys are visible in the dark with the letters themselves glowing. This is important for me as I often work late and in the dark room (so not to disturb others while they sleep) and so having an illuminated keyboard is convenient, enhances typing experience by minimizing typos and also looks cool. Infact, I bought my Sony Vaio S series laptop mainly for the Illuminated keyboard feature. Having an external keyboard that is wireless and illuminated at the same time simply enhances the computing experience.

Ok now that we gloated a bit about the product features, lets talk tech.
As you already read, the keyboard is wireless and it communicates to the laptop via Bluetooth. So obviously, you would want your Bluetooth service turned on (some people turn it off to save laptop battery).

Now my concern about buying this keyboard (its not cheap btw, even on Amazon it costs about $90), was that I only use Linux OS (Fedora 17) and nowhere on Amazon website or even on Logitech's website does it state that this keyboard is compatible with Linux OS. Anyway, based on the notion that Bluetooth is a wireless standard and not any OS specific featu[root@ms-vaio ~]# rpm -qa | grep bluere, I went ahead and ordered the keyboard. I took the risk--if it did not work because of missing or incomatible drivers, I would have returned it back.

Fedora has its own inbuilt Bluetooth drivers and you can configure its settings via the System Settings > Hardware Settings > Bluetooth.
Once check Bluetooth on and also turn on Wireless Logitech Bluetooth keyboard, the system will try to detect the keyboard and 'pair' it. The bad news is the default Bluetooth driver in Fedora 17 wont be able to pair the keyboard. You can find out what Bluetooth driver you have installed by running the following command on a terminal:
[root@ms-vaio ~]# rpm -qa | grep blue

A little research on the web shows that the driver you need is called 'blueman'.
To install Blueman simply use yum (as root user on a terminal window):

[root@ms-vaio ~]# yum install blueman -y

And query the rpm database again for bluetooth -- see my example below:


[root@ms-vaio ~]# rpm -qa | grep blue
bluez-cups-4.99-2.fc17.x86_64
gnome-bluetooth-libs-3.4.2-1.fc17.x86_64
bluez-4.99-2.fc17.x86_64
pulseaudio-module-bluetooth-1.1-9.fc17.x86_64
blueman-1.23-5.fc17.x86_64
gnome-bluetooth-3.4.2-1.fc17.x86_64
bluez-libs-4.99-2.fc17.x86_64
gnome-shell-extension-remove-bluetooth-icon-0.3.0-1.fc17.noarch
bluez-hid2hci-4.99-2.fc17.x86_64
[root@ms-vaio ~]#

Then start the blueman applet from Gnome under Applications. Its called 'Bluetooth Manager'.
Dont select the app called 'Bluetooth' app under 'Services'--thats the default Bluetooth app from Fedora and doesnt work for this keyboard.
Note: to get to Gnome activities, simply point the mouse to your left top corner of the screen.

Then in the Blueman applet, click Setup in the menu bar > Select Input service. It will automatically detect your keyboard and pair it. And you are all set!
Bottom line is even though the neither Logitech nor Amazon does not mention compatibility with Linux/Fedora anywhere, this keyboard DOES work on Linux.
Linux is such a cool platform that you can make anything work on it yourself just with a few commands and some reverse-engineering. No other OS gives you that Freedom. Enjoy!!

PS: Infact, this keyboard supports 3 wireless devices at the sametime. You can pair your tablet, mobile phone and laptop all at the same time just by pairing them to the 3 bluetooth buttons on the keyboard.
Also, Like I said before I also got the Verbatim Wirelesse Mini Nano Travel mouse to increase the 'Wireless' experience. But that one works on USB technology (not Bluetooth), and therefore is much easier to setup and works out of the box. Plug and Play.

Saturday, February 16, 2013

VirtualBox Shared Folder Fedora 18 Guest on OSX Host

In todays article we are going to review the steps required to share folders between two Operating Systems running VirtualBox (VB) on the same machine.

First what is VirtualBox?

VirtualBox (VB)is a very useful desktop virtualization tool from (previously) Sun Microsystems (and now Oracle).
To download VB you can go to https://www.virtualbox.org/ .

In our setup the Host OS is OSX 10.8 and the guest OS (running inside VB) is Fedora 18. Both are 64Bit OS in our case.


[[Note: The article assumes that you have a similar setup and that you have already installed VB and Fedora guest on top of the OSX host. If not, then for installation steps, go here for a text tutorial or here for a video tutorial before proceeding further.]]


We have a folder on our host (OSX) Desktop called 'documents' that we want to access from within the Fedora guest at a mount point directory called '/home/mrinal/doc_osx'


The first thing we need to do is to define the shared folder.

For that click the 'Devices' menu on the top of the VB window, and then click 'Shared Folders...'
This opens a popup where you define the host folder to share (in our case called documents) and the path for the same.

The next thing to do is to install the VBGuest Additions to the Guest OS (Fedora 18).

This is because the default installation of VB doesnt come with the necessary modules for sharing folders, mouse integration, display integration etc.

So, to do that open a terminal window on your Fedora guest and su - to root

$ su -
password:
#  yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel

This downloads and installs the necessary kernel modules and mounts the iso for the guest addition

In my case, the  Guest Additions were mounted under this path by default:


/run/media/mrinal/VBOXADDITIONS_4.2.6_82870/   

[[Note:  you should be able to see it in the output of mount / df -Th 

Also, the correct version of VBox Additional modules for Fedora 18 is 4.2.6.xyz ]]

So I went in that directory,

[root@fedora18 ~]# cd /run/media/mrinal/VBOXADDITIONS_4.2.6_82870/

And ran the shell script to install the Guest Additions as follows:


[root@fedora18 VBOXADDITIONS_4.2.6_82870]# ./VBoxLinuxAdditions.run 

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.6 Guest Additions for Linux..........
VirtualBox Guest Additions installer
Removing installed version 4.2.6 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules     [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.13 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]

[root@fedora18 VBOXADDITIONS_4.2.6_82870]# 

[[Ensure you didnt receive any errors or 'FAILED' status messages, if you do, then look at the log files under /var/log directory. The log file is vboxadd-install.log]]


Assuming all went well so far, now the only thing remaining to do is to mount the shared folder on your guest.

You can do that only as root (or sudo)

[[As Root]]

[root@fedora18 ~]# mount -t vboxsf -o rw documents /home/mrinal/doc_osx

[[As regular user mrinal via sudo]]

[mrinal@fedora18 ~]$ sudo mount -t vboxsf -o rw,uid=1000 documents /home/mrinal/doc_osx

Also:

Not recommended to automount in /etc/fstab as it hangs the guest at boot.
So if you reboot, you need to mount the share manually again. Perhaps you can automate via an init script in /etc/init.d directory.

Anyway, hope you found this article useful...