How To Integrate Emacs & Cscope To Browse Linux Kernel Source Code

This year I am going to study Linux kernel,  As a first step I grabbed a copy of Understanding the Linux Kernel By Daniel P. Bovet, Marco Cesati. The problem started when I had to go through actual code. I tried to use usual command line utilities to locate files and code inside the kernel source tree. Though it is not impossible, it is very time consuming and inefficient way to  browse the kernel source. Withing an hour of doing this I was sure that there ought to be a better way… and the better way is to use cscope source code browser and best way is to integrate it with emacs (or vi).

This post is about cscope integration with emacs, for more details about cscope itself please refer to cscope home page  and cscope man page.

Installation:

To get started we need to install emacs, cscope and xcscope emacs extension. As per cscope documentation the emacs support for cscope is provided in cscope/contrib/xcscope folder, however the ubuntu package did not have this folder as part of cscope package. It is provided as additional package called cscope-el (The cscope-el package installs /usr/share/emacs23/site-lisp/cscope/xcscope.elc). So install all these packages using:

sudo apt-get install emacs23 cscope cscope-el

Download the required kernel source tar ball from kernel.org, I wanted linux-2.6.11.12. It can be downloaded using wget as:

cd ~/Downloads
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.12.tar.bz2

 Configuration:

We need to configure emacs to load cscope support, edit your ~/.emacs or ~/.emacs.d/init.el to include following line.

(require 'xcscope)

Generate Cscope Database:

There are two ways to generate cscope database from kernel source, first is to use kernel make file and second is to use cscope directly. But first we need to extract the kernel source from the downloaded tar ball as given below.

cd ~/Downloads
tar -jxvf linux-2.6.11.12.tar.bz2

Method1: Generate cscope database using kernel make file, by using this method, list of files to be scanned by cscope is also generated by kernel make file. The file containing this list is named cscope.files. This is safer method if you don’t know which files to be included.

cd ~/Downloads/linux-2.6.11.12
make cscope

Method2: Generate cscope database directly using cscope.

In this method you can either scan all files in the current folder recursively by passing -R command line option to cscope or  you need to create a file named cscope.files  which can either contain list of files to be scanned (one file on each line) or using the special find construct as explained in Using cscope on large project page. The following command will scan the complete kernel source code tree, the -k option ensures that include files in /usr/include are ignored while building the database.

cd ~/Downloads/linux-2.6.11.12
cscope -b -q -k -R

Irrespective of the method the database file named cscope.out will be created.

Browsing the code:

To browse the code from emacs, first we need to tell the location of the database. This is done by executing command “M-x cscope-set-initial-directory” and specify the directory containing the cscope database. This step is not required if emacs is lanuched from the same directory.

Once the initial directory is set, you can search the code for given symbol using “M-x cscope-find-this-symbol” command, the text near cursor will be the default symbol to find. You can move through the results using p (previous match) and n (next match) keys, the corresponding files are opened in other buffer in emacs. Example output for symbol KERN_ALERT is shown below.

Emacs and Xcscope Find Symbol Output

The other useful commands include:

Find symbol.
Find global definition.
Find functions calling a function.
Find called functions (list functions called from a function).
Find text string.
Find egrep pattern.
Find a file.

For a complete list of commands supported by xcscope please refer to xcscope man page.

What didn’t Work for Me:

Using xcscope.el: If you download the xcscope.el and try to add it in emacs through config file as:

(load-file "/usr/share/emacs/site-lisp/xcscope.el")
(require 'xcscope)

I got the following error at emacs startup:

Warning (initialization): An error occurred while loading `/home/dzambare/.emacs.d/init.el':

File error: Cannot open load file, xcscope

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

The solution is to get rid of this file and install cscope-el package as explain in Installation section above.

Alternate Interface:

You can also use cscope’s inbuilt console based UI to browse and edit files. It can be launched by following command from the directory containing cscope database. The screenshot below shows how it looks like.

cscope -d
Cscope in-build user interface

Cscope in-build user interface

End Notes:

  1. Even though this post is related to Linux kernel source, same method will work fine for any c project.
  2. Cscope scans all files only during first run, during subsequent executions it will only scan the files changed since last run.
  3. When you invoke first emacs command related to cscope it will automatically invokes cscope to make the database up to date.
  4. Example of xcscope key binding are provided in xcscope man page

Version Nos of Key Components:

  • OS: Kubuntu 11.10
  • Cscope:  15.7a
  • Xcscope: 15.7a

Links Related to This Post:

Posted in Free Software, GNU GPL, How To, Kernel, Kubuntu, Tips | Tagged , , , , , , | 4 Comments

The New Look, Yet Again

When I changed the theme last time the main reason was readability and interestingly this time also I am changing the theme for the same reason. I usually use laptop or LCD screen to view my blog and it was never appeared to me that I should have checked the same theme on CRT screen as well. I happened to view my blog using CRT screen and it was not readable. The contrast and font size was making it very difficult to read. So I decided to give it a new look again. This time I am giving up on my obsession for orange color :) and opted for no nonsense theme.

What is in it for you:

The new theme is Twenty Ten and I have chose this theme because:

  1. It has bigger font
  2. It uses only four colors and they are White (Text Background), Black (Text Color), Blue (Not visited links) and Purple (Visited links) which gives it a good old plain HTML look and very good contrast.
  3. It also has an option to select the background color, which helped me to improve the contrast even further.
  4. It has 1 side bar and 4 bottom bars. I have used the side bar for widgets of general interest and bottom bars for not so general widgets.
  5. This division of widgets will give you clutter free experience, keeping things you need frequently easily accessible.
  6. It has custom menu and I have used it to allow selection of frequently used categories based on the history.
  7. This theme looks same while editing the post so that I can make out how the end result will look like while preparing a post.

I hope it will improve your experience, you are most welcome to provide your suggestions.

/techtooltip.wordpress.com/2008/10/20/the-new-look/

Posted in General | Tagged , | Leave a comment

mp3splt – Splits mp3/ogg Files In Jiffy

Do you have an mp3/ogg file(s) longer then 10 minutes and your mp3 player does not have seek functionality? It is very very painful to fast forward/rewind (if available)  to the required position in the file, isn’t it? Now it doesn’t make sense to change your mp3 player just because it can not seek to required position in the file, so what else can you do? Split the single long file in multiple short files, right? This gives you a flexibility to over come player’s limitation and still reach the required point quickly.

Splitting mp3 files can be very time consuming with the traditional method

  • When you open a file that you want to split,  it takes time to decode the file. For longer files you might drop the idea of splitting the file before it can be decoded.
  • Next you need to select different sections, if you are doing it manually you will try to find the logical point to break the file which takes time again (This is good thing though).
  • Now you need to save each chunk, while saving it needs to be encoded and that can also take lot of time.
  • You need to decide the bit rate, sample rate, number of channels, etc etc while using this method. Everyone may not be familiar with all these concepts and end up with bad quality or huge files.

If you agree with these disadvantages get yourself mp3splt. This utility can split mp3(and ogg) files without decoding and encoding them which make it very very fast.  Also it work perfectly fine for both constant bit rate (CBR) and variable bit rate (VBR) mp3 files.

mp3splt Features:

  • Split mp3 and ogg files from a begin time to an end time without decoding
  • Split automatically with silence detection
  • Split by a fixed time length
  • Split in equal time tracks
  • Split an album with splitpoints from the freedb.org server
  • Split an album with local .XMCD, .CDDB or .CUE file
  • Recursive multiple files split
  • Supports both ID3v1 & ID3v2 tags
  • Output file names can be derived using ID3 tags
  • Audacity labels file support
  • Split files created with Mp3Wrap or AlbumWrap
  • Split concatenated mp3 files
  • Support for mp3 VBR (variable bit rate)
  • Specify output directory for split files
  • Supports Linux, MAC OS and Windows
  • GNU GPL License
  • GTK based GUI front end (mp3splt-gtk)
  • Excellent Documentation

Installation:

Installation on Linux is very easy as pre-built packages are available for most distributions. It is also available in standard Ubuntu repositories, windows version is available as Zip file which does not need any installation or as windows installer.

Usage Instructions:

As mentioned in feature list even though this is GPL product, it has very good documentation which provides detailed explanation about each and every option and examples. The documentation is so good that I will skip the usage instructions for this post. This documentation can be accessed though man command or online.

Endnotes:

I have used only basic split mode i.e. split one file into multiple tracks of same length. I have tried this for both CBR and VBR (using frame mode) mp3 files.

I tested it for ID3 tags updates and output file names.

I haven’t tested it for wrap and ogg files.

Split points are noticeable while playing the files back to back, I am not sure whether this is the problem with my player or the option I used.

mp3splt is good tool for splitting the mp3 files, if you want to do advanced processing like bit rate change, filtering, volume leveling consider using Audacity instead.

Links Related To This Post:

Posted in Cross Platfrom, GNU GPL, Software Reviews, Tips, Windows Software | Tagged , , , , , , , , , | Leave a comment

MultiGet – Multi Platform, Multi Threaded File Downloader/Accelerator

Once upon a time when my primary operating system was Windows 95, 98 and I was using dial up Internet connection with maximum speed of 19.2 kbps. The most essential software was Download Accelerator Plus (popularly know as DAP) from Speedbit.

Even though the average downloaded file size was much less compared to today’s standard, it was very much essential to have a software that can speed up the download and allow us to resume the broken download from the point it was broken.

After that I made my primary operating system as Linux and I don’t know why I never felt the need of download accelerator any more. Perhaps I was used to download anything and everything when I started or may be I started using torrents more or the average Internet connection speed is increasing day by day (but so is the average download size).

Any ways I felt the need of download accelerator recently while trying to download  one of the Linux distro, because torrent ports were blocked by proxy. I started my search for download accelerator with following requirements

  • It should be open source, preferably GPL (Sorry DAP I am not one of those 200 millions, one good change results in lot more good things)
  • It should allow me to download multiple parts of the file at  the same time, also called as multi-threaded downloading.
  • It should allow me to specify multiple  mirrors.
  • It should  allow me to stop and resume the download as per my convenience.
  • Should support command line operations.
  • Batch processing support is preferable (not necessary as with command line support any scripting language can add this feature).

My search ended at Multiget it met my each and every requirement so well that I felt that tools is developed for me. So I will not list the features separately.

Installation:

I used my Kubuntu system to test Multiget, the installation was very easy as Multiget is available in standard Ubuntu repositories, so my installation needed just following 2 lines

sudo apt-get update
sudo apt-get install multiget

This will install Multiget and it can be launched fromApplications->Internet menu of Kubuntu. For other operating systems please refer to multiget download page.

Configuration:

Multiget configuration is very simple and is limited to just one page as shown  below. This dialog can be opened from Options->Settings menu or by shortcut Ctrl+S.

 

Multiget Configuration Dialog

Multiget - Configuration Dialog

The first section mainly deals with default setting for a task such as number of concurrently running task, sessions/thread/parts for each task and default location for saving the downloaded files.  Multiget can also monitor clipboard for URL and you can set the ignored and accepted extensions filter as per your need.s Rest of the settings need not be changed for basic uses.

The proxy configuration is separate to allow different proxies for different tasks, Multiget supports SOCKS version 4, 4a and 5 proxy, ftp proxy, http proxy. The proxy configuration dialog’s snapshot is shown below. Proxy configuration dialog can be opened using Option->Proxy Admin or by shortcut Ctrl + T.

Multiget Proxy Configuration

Multiget - Proxy Configuration

As said earlier you can configured multiple proxies and select any one of them while starting a task.

Adding New Task:

New task can be added in multiple ways

  • The simplest and easiest way to add new task is to just copy the URL (Provided Clipboard monitoring is enabled and copied URL matches filter specifications), Multiget automatically detects this and opens New task dialog.
  • By dropping and URL on drop window (If enabled)
  • From Multiget window, open new task dialog using menu option Task ->New or by shortcut Ctrl+N.

This should open a new task dialog as shown below:

Multiget New Task Addition

Multiget - New Task Addition

You can add additional mirrors, change the save location, number of sessions, authentication credentials (if required) and choose  proxy server here. Note that this dialog can be opened again anytime when task is not running to change these parameters.

Checking Progress:

Multiget provides detailed information about the running task and it’s different sessions/threads. This can be seen by selecting the running task and different options in info pane. Status bar also provides overview of current status such as number of running tasks, number of waiting tasks and download speed.

You can also change number of sessions at runtime by selecting running task and menu options Tasks->+Thread & Tasks->-Thread or by shortcuts Ctrl + +, Ctrl + – respectively.

Following two snapshots shows Progress and Thread information as provided by Multiget. Note that thread information is available only for running tasks.

Multiget Running Task's Progress

Multiget - Running Task's Progress

 

Multiget Running Task Thread Information

Multiget - Running Task's Thread Information

System Try Control:

Multiget also provides very handy system tray menu which can be used to enable/disable frequently used features, Start/Stop all tasks and set the bandwidth apart from other options. The System Try Menu is shown below.

 

Multiget - System Tray Menu

Multiget - System Tray Menu

Final Thoughts:

If you download lot of huge files and your primary platform is Linux, this is the must have software.

I liked it for its very simple interface and features set. For all options discussed above, there are toolbar icons as well which make it very very user friendly.

The only limitation (if you can say it) is that maximum number of sessions/threads per file are limited to 10 but i guess its OK considering our social responsibility on Internet.

Happy Downloading!!!

Links Related to This Post:

Posted in Cross Platfrom, GNU GPL, Software Reviews | Tagged , , , , , , , , , | 1 Comment

tinySpell – Check Spellings Anywhere

Have you ever looked at some of the comments in your old code  and felt bad about the spelling mistakes? While programming we also make use of  abbreviation and short substitutes  for some words (e.g. using “val” for “Value”, “rev” for “Revision”). Compilers help us to ensure that the code is spelled correctly (by correct I mean we are consistently making the same spelling mistake:)). This might be acceptable and required in the code but comments should be written in non-programmer’s language, your code can be read by non-programmers as well (Don’t agree? Feel free to do drop me a line).

Any ways the point is, there can be lot of spelling mistakes in the code and comments because of two main reasons. First, we concentrate more on programing and second, most editors do not have inbuilt spell checking. Needless to say, if any application used for editing/creating text does not have inbuilt spell check, there will be a fair chance for having spelling mistakes in the final output.

This is where tinySpell comes to rescue. As its name suggests, it is a tiny background utility which allows user to check spellings anywhere in any MS Windows application.

It checks spellings as user types and notify the user when it detects any misspelled words. How you want to be notified is  configurable. After detection it also allows user to correct the spelling mistakes. The exact method used to get the list of corrections is configured by the user. I have configured down arrow key for this purpose to be consistent with other spell checkers and to make it easier to select between suggested corrections.

tinySpell can also check spellings for the text copied in clipboard. Truly speaking I haven’t tried it yet myself, let’s take authors word for it.

If you are thinking that, there is something always running in the background to check the spellings  and I also have inbuilt spell checker in some applications which can not be disabled, how co-operative tinySpell is in this case? and what will happen here? Good Point! You wouldn’t like to be notified for same spelling mistakes twice, would you? Well, you can configure tinySpell to disable spell check in particular application. It allows user to disable spell checking based on either window name or application name. You can also enable/disable tinySpell all together if required.

One more thing worth mentioning about this utility is, it needs very less system resources. I am always paranoid about installing background applications/services which will go on forever for this reason.

tinySpell Feature:

  • Checks spelling in any Windows application
  • Checks spelling as you type it
  • Configure spell check alert
  • Configurable correction mechanism
  • User can add words to the dictionary
  • User and select application for which tinySpell should be enabled and disabled
  • Global enable/disable
  • Efficient use of system resources
  • Available as portable version which does not need any installation
  • Can be enabled to start on power on

Links Related to This Post:

Declaimer:

This review is based on version 1.9.30 of tinySpell free variant. This review does not cover tinySpell+ which is paid version of tinySpell with more features. 

End Note:

My friend, machine never does or thinks of doing anything wrong or bad, the man behind the machine is responsible” – Va Pu Kale

What’s the purpose of this quote? Well, there can be spelling  mistakes in this post as well but  don’t blame Firefox spell checker or tinySpell for them. Feel free to help me in correcting them though.

Checks spelling in any Windows application
Checks spelling on-the-fly (alerts if the last typed word was misspelled)
Checks spelling of text that is copied to the clipboard
Allows you to specify applications for which tinySpell is disabled or enabled
Allows you to add words to the dictionary
Optionally beeps on error (beep sound can be easily set to any wav file)
Optionally displays a spelling tip (see example)
Provides easy access to on-line web services
(Search, Dictionary, Thesaurus, Encyclopedia) (see here)
Opens replacements list with a simple mouse click or a hot-key
Optionally copies the selected replacement word to the clipboard
Optionally inserts the selected replacement word into the document
new in 1.9.30: Optionally ignores text that is typed in password fields
(supported browsers: Internet Explorer, Firefox (Mozilla), Safari)
new in 1.9.30: Checks for updates with options to download and install new versions
Easy Enable/Disable
Uses little system resources
Posted in Free Software, Software Reviews, Windows Software | Tagged , , , , , , | 5 Comments

I am posting every week in 2011!

It’s a new year and time for new resolution. I generally don’t make any new year resolutions but when I came across The DailyPost challenge, I couldn’t stop myself to resolve that I will post at least once every week in 2011.

Yesterday in 2010 in review entry, I posted the summary of how I did in 2010. Even-though I have plenty of readers, I posted only once in 2010. So this is the right time for me to take up this challenge.

I hope that I will be able to balance the quality and quantity.

If you already read my blog, I hope you’ll encourage me with comments and likes, and good will along the way.

Feel free to suggest topics and software reviews I can do for you.

Have a great year ahead.

- excogitator

Posted in About Me | Tagged | Leave a comment

2010 in review

Wish all my readers a very happy new year. Hope to see you again this year.

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

About 3 million people visit the Taj Mahal every year. This blog was viewed about 49,000 times in 2010. If it were the Taj Mahal, it would take about 6 days for that many people to see it.

In 2010, there was 1 new post, growing the total archive of this blog to 24 posts. There were 2 pictures uploaded, taking up a total of 55kb.

The busiest day of the year was November 23rd with 252 views. The most popular post that day was How To Use Host Serial Port From Guest In VirtualBox.

Where did they come from?

The top referring sites in 2010 were forums.virtualbox.org, forum.xda-developers.com, linuxquestions.org, google.com, and vinci.wordpress.com.

Some visitors came searching, mostly for virtualbox serial port, virtualbox usb driver, virtualbox com port, virtualbox tools, and virtualbox usb filter.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

How To Use Host Serial Port From Guest In VirtualBox September 2008
42 comments

2

How To Use Host USB Device From Guest In VirtualBox September 2008
22 comments

3

SWFTools – Create, Extract and Manipulate SWF Files September 2008
4 comments

4

Sun xVM VirtualBox Seamless Windows July 2009
1 comment

5

Lightscreen – Screen Capture Tool September 2008

Posted in About Me, General | Tagged | Leave a comment

How To Automate Disk Cleanup and Defragmentation In Windows XP

Whenever we talk about maintaining Windows XP installation the most common concern is that the system gets slower by every passing day.  Answer to this very common problem is also very common which is defragment your hard disk regularly. I am not sure whether it really solves the problem but lets find a way to do it as easily as we can.

I will not get into details of fragmentation in this post as it is already explained in my other post here. Its is always a good idea to perform defragmentation after performing disk cleanup. This helps in two ways, first it will help us to remove all unwanted data on the hard disk (which might in turn make it perform better) and second it will reduce the time required to complete defragmentation.

I wanted to automate the whole process so that I don’t have to remember doing it.  It is very easy to perform the defragmentation without any intervention by invoking it through command line but that is not the case with clean up utility. The disk cleanup utility asks us to select what data to cleanup. So I started looking for a solution to execute cleanup manager without human intervention.

Cleanup Manager Configuration:

Cleanup manager is used to remove unwanted files (temporary internet files, temporary installation files, other temporary file, compression etc). To setup cleanup manager to run automatically we need to use following command:

cleanmgr /sageset:n

Where “n” can be any value from 0 to 65535. This index is used to choose between different configurations for cleanup manager when it is invoked to perform the actual cleanup activity. Lets assume that we are setting it to 1. This command will open a dialog box which will let you choose which files to delete as part of this configuration.

Cleanup Manager Configuration

Cleanup Manager Configuration

Whatever options you mark in this dialog will be examined when cleanup manager is executed with this configuration.

To run the cleanup manager with this configuration it can be invoked as:

cleanmgr /sagerun:n

Please note that there is no option to select the drive letter here, the cleanup will be performed on all local drives with chosen configuration.

Defragmenter  Configuration:

As it is defrag utility is capable of executing for command line without any intervention, I also enable verbose output to examine the log after the task is completed.

defrag c: -v > CDriveReport.txt

The above example shows command to defragment “C” drive and save the report in CDriveReport.txt.

Putting It All Together In A Batch File:

In order to automate these tasks we need to create a batch file which would look something like this:

@ REM Run the cleanup utility
cleanmgr /sagerun:1

@ REM Defrag C Drive
defrag c: -v > CDriveReport.txt

@ REM Defrag D Drive
defrag D: -v > DDriveReport.txt

You might have to add/delete lines for defrag command as applicable.

Creating A Schedule For This Activity:

Now we have everything required to create a schedule to perform this activity as given time automatically.

To create new scheduled task

  1. Go to Control Panel -> Scheduled Tasks -> Add Scheduled Task.
  2. This will open a wizard, just click next here.
  3. Now you will see list of application, but we don’t want any of them so click on browse and select the batch file we have created above and click next.
  4. In the next screen you need to select the frequency at which you want to execute this task. I would choose weekly. Click next.
  5. On the next screen select the time and day(s) as you wish and click next.
  6. The next screen will ask you for password, you can either enter the password here or change the settings to run this task only when you have logged later in advanced options. I would skip entering the password and click on next.
  7. On the next screen mark the checkbox to open advanced properties and click Finish. If you haven’t entered the password it might give you an warning, just click OK, we are going to set it right.
  8. This will open the advanced property screen as shown below. Mark the checkbox marked “Run only if logged on”
  9. You can also create multiple schedules in Schedule tab.
Scheduled Task Settings

Scheduled Task Settings

You can get the defragmentation logs in the same folder as your batch file.

That’s about it, you can relax now as you don’t have to worry about cleaning up and defragmenting your hard disk any more.

Caution:

Please note that everything you have asked to cleanup will be cleaned up and there is no way to get that data back. So be careful about what you have chosen during cleanup manager configuration.

Links Related to This Post:

Posted in How To, System Tools, Windows Software | Tagged , , , , , | Leave a comment

Sun xVM VirtualBox Seamless Windows

Let’s get to the point directly, when we start a new virtual machine it will be started in the new VirtualBox window. This main window in turn acts as a desktop for the guest OS, this way the guest windows are confined within the boundary of main VirtualBox window. Alternatively we can enable the full screen mode and complete host desktop will be replaced with the guest desktop. This reminds us that we are using the virtual machine. What if we don’t’ want to be reminded of this fact at all?

Background:

Ok, in my setup I have Windows XP host and Kubuntu as guest. I use Kubuntu to do development of my hobby projects for AVR microcontrollers. For some reason I was not able to access the emulator through VirtualBox. To solve this problem I used to compile the programs in Kubuntu and download them to my target hardware using Windows application. Needless to say that I have to constantly switch between the Virtual machine and main desktop. This was more cumbersome when guest was switched to full screen mode. Somehow I wanted to have the Bash shell window used for compilation (in Kubuntu) just next to my windows application (AVR Studio), so that I can switch between them just by clicking on the title bar.

Where There Is A Wish There Is A Way:

With VirtualBox Seamless windows mode we can do just what I wanted. That is it will hide the VirtualBox window and place the application windows owned by guest right on host’s desktop. As you can’t see  any evidence of virtual machine running, so you will not be reminded of it. To make it more clear let’s say you have same OS running on both host and guest, I bet you will not be able to differentiate between host and guest applications.

Virtual Box Setup & Requirement:

You can use seamless windows feature if you are using VirtualBox version 1.5 or above. You must also install Guest Additions to enable seamless windows. This information is correct for VirtualBox 3.0.2, for specific version please refer to VirtualBox User Manual for you version.

How to Get It Working:

From this point onwards I assume that you have installed guest additions and have already started the virtual machine. Also note that in following example my host OS is Windows XP and guest is Kubuntu.

Step1: Ok I will start with the windows desktop showing couple of windows applications running. In the snapshot below you can see that I have opened Windows Explorer, Windows Notepad  and Windows command prompt. The virtual machine is running as well but it is minimized. 

Host Desktop With Windows Applications

Host Desktop With Windows Applications

Step2: In the following snapshot I have restored the VirtualBox window. Inside VirtualBox windows you can see that I have opened Dolphin, Kate and Bash shell. If you look at this snapshot the guest windows are restricted within the Virtual Box window.  Our aim is remove this boundary.

Host Desktop With VirtualBox Maximized

Host Desktop With VirtualBox Maximized

Step3: Let the magic begin, Select “Seamless Mode” entry from the “Machines” menu of VirtualBox window as shown below. It can also be activites by using shortcut key “Host +  L

Enable Seamless Mode

Enable Seamless Mode

Step4: VirtualBox will provide you with the information cum confirmation box, Click on “Switch“. I am sure after reading this blog you would also want to check the “Do not show this message again” before confirmation. The confirmation dialog box is shown below.

Seamless Mode Confirmation

Seamless Mode Confirmation

Step5: Voila!!!, As you can see that VirtualBox will remove the background window and place the guest applications directly on host’s desktop. You can arrange them the way you want and switch between then with just a click of mouse. In the following snapshot I have arranged Dolphin windows just above Windows Explorer, Kate window next to Notepad and Shell window above command prompt.  I love it :).

If you have taskbars for both host and the guest, taskbar corrosponding to selected window will get the focus automatically. In this snapshot you can see that Kubuntu taskbar is visible.

Host And Guest Windows Together

Host And Guest Windows Together

Step 6: Following snapshot shows that the desktop still belongs to the host (see final thoughts (1) below). You can see the windows context menu in the center and windows taskbar at the bottom.

Desktop Still Belongs to Host

Desktop Still Belongs to Host

Step7: To exit the Seamless mode you can either press “Host + L” or press “Host + Home” to disable it through “Machine” menu. 

Final Thoughts:

  1. You can not drag and drop between guest and host windows, That would be a great feature though. However if you drag the item from any of the guest application and drop it over desktop it will be copied on guest’s desktop.
  2. You can start more guest application using its start menu or through bash shell and they will still be shown in seamless mode.
  3. The keyboard will automatically follow the selected OS, for example if you have selected the Dolphin window, Windows Key has no effect.
  4. In the seamless mode you can acccess the VirtualBox menu using “Host + Home” key.
  5. Alt-Tab application switcher does not recognize guest windows but treat them as a single window.

That’s it for this post I like the way it works but if VirtualBox team can enable the drag and drop between Guest and Host and make the Alt-Tab application switcher aware of Seamless mode it will be perfect.

Links Related to This Post:

Posted in How To, Seamless Mode, Tips, Virtual Box | Tagged , , | 4 Comments

VirtualBox 2: How To Pass Through USB Devices To Guests On An Ubuntu 8.10 Host (From HowtoForge)

This short guide shows how you can pass through USB devices (such as a USB flash drive) to VirtualBox guests on an Ubuntu 8.10 VirtualBox 2 host. USB support is available only in the VirtualBox PUEL (closed-source) edition, not in the OSE edition, so make sure you have the PUEL edition installed.

via VirtualBox 2: How To Pass Through USB Devices To Guests On An Ubuntu 8.10 Host | HowtoForge – Linux Howtos and Tutorials.

Credit for this post goes to Falko Timme.

Posted in Free Software, Offsite Articles, Virtual Box | Tagged , | Leave a comment