Sunday, March 13, 2011

Flush/Clear Windows host name to IP

Generally, Windows machine's host name to IP resolution is managed by NetBIOS. This is specially true for machines in a workgroup environment.

There are cases where the NetBIOS name resolution on the local machine can get out of sync against other machines IP address and host name. This can happen when the machine has been  turned off for a few hours and  the IP getting reused.

Since file sharing and any other network related activities in Windows commonly uses host name then this can get problematic if you need to access network shares. Now to fix this out of sync scenario, run the following command:

nbtstat -R

This should clear the local name to IP cache.

Changing hostname on OpenSUSE

When I installed openSUSE, the installer assigned a seemingly random name to the machine. As is the case with Linux there are many ways to do it.

It can be changed graphically in openSUSE. To do so click on kicker (), then select Computer  (), finally click on YAST (). Running YAST requires root (administrative) password, so for this screen supply your root password.
Figure 1. Enter root password.

Once root password is entered you should see this screen. 
Figure 2. YaST Control Center

Now click on Network Devices then Network Settings.From Network Settings, select Hostname/DNS tab.
Figure 3. YaST2 Network Settings

Supply new value for the hostname field, click on OK and you are done.



Saturday, March 12, 2011

KDE menus goes blank

I am using OpenSUSE 11.3 with KDE 4.4. I changed hostname of the machine and noticed that the menus of KDE goes blank. The icons are still there and I can still see the description when I hover over the icons.

Removing /home/.kde4 (or better yet backup the folder) and a reboot fixed it. Is it the right way of doing it? I don't know but I am back to business. Of course my customization where all gone.

How to get KDE version from console

There are many ways to do this. One way of would be open up konsole, then do:

kwrite --version

Kwrite is one of the default applications the comes with KDE. This should show something like:

Qt: 4.6.3 KDE Development Platform: 4.4.4 (KDE 4.4.4) "release 3" KWrite: 4.4.4 (KDE 4.4.4) "release 2

Wednesday, March 02, 2011

Installing Adobe flash player in Fedora

Fedora 14 does not include Adobe flash player in their repository as it is non-free. To install the plugin for Firefox, Mozilla or SeaMonkey you have to do it manually. To do this go to http://get.adobe.com/flashplayer/, select YUM for Linux. Download this to a convenient location, by default  this goes to /home/[user]/Downloads if you are using Firefox. Open a console and do:

cd ~/Downloads su -c 'rpm -ivh adobe-release-i386-1.0-1.noarch.rpm'

What we have just done is install the repositories file, if you check /etc/yum.repos.d, you should see adobe-linux-i386.repo. This allows Fedora update manager to automatically update our copy of flash player should new version is available. To complete this part we have to import GPG key, thus say:

su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux'

Now to install the plugin do:

su -c 'yum install nspluginwrapper alsa-plugins-pulseaudio flash-plugin'

You can check if the plugin is working by hitting this link, http://www.adobe.com/software/flash/about/.

~technos

Friday, February 18, 2011

Fedora 14 screen capture

Fedora 14 was released last Nov 2, 2010, awfully long time ago in the Linux world. Anyway, I am just documenting here how it looks like installing Fedora 14 in VirtualBox. I have done this for the top 5 distributions and I am gonna do this for Fedora again.

In terms of the installation screens, nothing much that meets the eye. I have no doubt that internally much has changed. Anyway, what follows are the screen capture while I was installing Fedora 14. As usual, you can use the images as you see fit, no need for permission.

Figure 1. Boot splash

Figure 2. Live installer login screen

Figure 3. Live installer desktop

Figure 4. Installer first screen

Figure 5. Keyboard Selection

Figure 6. Initialize disk

Figure 7. Set machine hostname

Figure 8. Storage Type

Figure 8a.

Figure 9. Root password

Figure 10. Storage allocation

Figure 11. Timezone selection

Figure 12. Installation complete

Figure 13. Welcome screen

Figure 14. License Information

Figure 15. Create regular user account

Figure 16. Set date and time

Figure 17. Send hardware profile

Figure 18. Login to the F14.

Figure 19. F14 Desktop

I then perform an update which is quite massive, below are the key versions:
Linux kernel: 2.6.35.11-83.fc14.i686
GNOME: 2.32.0

Friday, February 04, 2011

Ubuntu 11.04 Natty Alpha 2 with VirtualBox 4.0.2

Ubuntu 11.04 Natty Alpha 2 was released last February 3, 2011. I have it installed on VirtualBox 4.0.2 with Windows 7 Professional as the host. Installation was smooth and uneventful.

But installing VirtualBox guest addition that comes with the default installer seems like incompatible with Ubuntu Natty Alpha 2.

Here is what I got when I tried to install:
Warning: unsupported pre-release of X.org Server Installed

It seems like some changes has to be done before it will work with this version of Ubuntu. But since VirtualBox does have an open source version of the guest additions, this can be used instead of the stock version. To do this, you have to:
apt-get update apt-get upgrade apt-get install virtualbox-ose-guest-utils apt-get install virtualbox-ose-guest-x11

Reboot and enjoy Ubuntu Alpha 2!!!!

Updates:
[23March2011]: Since 21March2011, Guest Additions that comes with VirtualBox 4.0.4 does not work anymore. Updated my copy today and installed the above packages and it saved my day.

[01April2011]: This applies to Ubuntu Natty Beta 1.

CPP Quick Guide

Basics Hello world User input While loop If statement For loop Switch statement Read file using ifstream Write to a file using ofstr...