Monday, December 31, 2012

PS Quick Tips: Check if screen saver is enabled for the current user

PS D:\> (Get-WmiObject win32_desktop -Filter "Name Like '%$([Environment]::Username)'").ScreenSaverActive

Or:
PS D:\> (Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop').ScreenSaveActive

How to disable Windows screen saver from the command line

Open command prompt and type:

Reg add "HKCU\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 0 /f

You need to log out to enforce the changes.

Friday, December 28, 2012

Show Whitespace Characters toolbar in Eclipse

To show the toolbar associated with white space character, from main menu do Windows | Customize Perspective.... Then select/enable Tool Bar VisibilityEditor PresentationShow Whitespace Characters.

Customize Perspective
Note that you may have to make Editor Presentation available through Commands Groups Availability like below.
Command Groups Availability


Thursday, December 27, 2012

Split a line into multiple lines using Notepad++

Say you have a document like below.

And you want to split "hello world" into multiple lines. Doing this using Notepad++ is easy. Bring up Replace dialog (Search | Replace... or CTRL+H), in Find what use hello world\r\n. This matches the entire line including carriage return and linefeed character. In Replace with replace the string with the intended multi-line data, for example, hello\r\n\world\r\n, will replace the line into two. One is hello, followed by world in the next line. And of course, for this to work you need to select Regular expression in the Search Mode.

Eclipse TFS support

To install TFS support within Eclipse do:
  1. Open Eclipse
  2. Do Help | Install New Software....
  3. In Install software dialog, select Add....
  4. Give it a name like "Eclipse TFS Plugin".
  5. In location, type http://dl.microsoft.com/eclipse/tfs then hit on OK button.
  6. Select Team Foundation Server Plug-in for Eclipse, see below.
  7. Select Next to proceed with the installation. 
  8. In Installation Details, select Next again.
  9. In Review Licenses, select I accept the terms of the license agreements.
  10. Then hit on Finish.
  11. Select Yes on You will need to restart Eclipse SDK for the changes to take effect. Would you like to restart now? dialog.
Oh the integration is awesome, head to Installing the Team Foundation Server Plug-in for Eclipse for more details. Tested with Eclipse 4.2 on Windows 8 using JRE 7 update 10.

Remove blank lines using Notepad++

Say you have a document as shown below.

And you want to remove the blank lines - represented by {CR}{LF}. To do this using Notepad++, bring up Replace dialog (Search | Replace... or CTRL+H) and use ^\r\n in Find What and blank for Replace. In Search Mode, change it to Regular Expression. See below for an example.

What it does it use regular expression to search for carriage return and linefeed characters and match only if it is the beginning of the line (^). And of course replace it with a blank character.

How To: Modify VirtualBox virtual HD so that it is not affected by snapshots

There are cases where you want to persist data between different snapshots in VirtualBox. To accomplish this, do:

C:\>path=%path%;"c:\Program Files\Oracle\VirtualBox"
C:\>vboxmanage modifyhd Persistent.vdi --type writethrough

Thursday, December 20, 2012

Show whitespace characters in Eclipse editor


From main Eclipse menu do, Windows | Preferences. Then General | Editors | Text Editors | enable Show whitespace characters (configure visibility).

Show whitespace characters



Cannot move tool bar icons in Eclipse 4.2 Juno


Searching for tool bar actions in Juno shows that user should be able to unlock tool bar for customization. Unfortunately this function is not working, see bug 340695.

If you really wanted to move the icons there is a workaround. Change the theme to Windows 7 and restart. You should now be able to move items around.

References:
http://stackoverflow.com/questions/11301795/how-to-unlock-toolbars-in-eclipse-4-2-juno


Eclipse 4.2 Juno default configuration is very slow - how to make it a little faster

Eclipse 3.x series performed pretty good enough that I use it for XML and Python editing. But the latest Eclipse 4.2 Juno release is pretty slow on virtual machines. Few minor tweaks made it bearable for me.

Open Preferences dialog (Window | Preferences). Expand to General | Appearance, then change Theme to Classic and disable Enable animations.

Preferences - Theme to Classic

Wednesday, December 19, 2012

Locked down ecosystem can be a double edged sword

Microsoft has been trying to copy Apple's strategy of designing there own hardware and software combination. This works pretty good in Apple's walled garden for long while but they did get bitten by their maps disaster (see https://www.google.com/search?q=apple+maps+disaster).

For Microsoft's case, Mozilla and Google are not in a hurry to support the Modern UI. In fact they probably are not going to write one as Win RT is restrictive on what apps can do.

Now in relation to browsers, I been using Microsoft Surface for more than a month and lately some of the websites stopped to work or display data properly. In Android land, I have many choices. I used Dolphin Browser, the default Android browser, Google Chrome, and Firefox, I can switch as the need arises. With Surface, no other option.

I am using my Surface now because I wanna immerse with the platform otherwise my TF101 Transformer still rocks.

Can't get Windows 8 split screen to work

I have been trying to get immersed with Windows 8 lately. The more I use the modern UI on a non-touch interface the more I don't like it. There is just too much impedance between using mouse/keyboard for an interface designed for touch input.

Anyway, I read somewhere that the Modern UI interface supports splitting applications. I took me a while to learn that for it to work you have to have at least 1366x768 screen resolution. This is maddening..... argh. First, I couldn't open apps on screen resolutions below 1024x768. Now splitting needs higher resolution.

Microsoft looks like is in identity crisis as of late. They don't just get what user needs. Or maybe people involved in the project do understand but management have a different agenda. Good luck Microsoft, you guys will be in for a difficult time against competition.

References:
http://it-diary.com/windows/windows-8-new-features-screenshots/

This app cannot open - The screen resolution is too low for this app to run

So I installed Windows 8 in VirtualBox, the host machine is laptop with 1280x800 screen resolution. Running a guest not in full screen only have 1280x736 real state. In this configuration, I am not able to run Modern IU (Metro) apps. See below for the error message.

Not able to run "Store" app
It seems like Windows 8 requires at least 1024x768 to work with the modern applications. This is interesting because they are making fun of original Android tablets as not flexible, like you know running weird screen resolution. The layout capabilities of WPF applications is suppose to be flexible, what's going on Microsoft! So this also means that netbooks with smaller screen will not work properly with Windows 8.

References:
http://superuser.com/questions/396846/force-windows-8-metro-apps-to-run-lower-resolutions-below-1024x768



Tuesday, December 04, 2012

What to change after cloning a Ubuntu guest

When cloning a Ubuntu guest machine, you need to take care of few details to make it work properly. Below are the key items to change:

  1. Update /etc/hostname, change it to the new machine name
  2. Update /etc/hosts, change one of the loopback name to the new machine name.
  3. Modify /etc/udev/rules.d/70-persistent-net.rules so that eth0 (generally) points to the updated MAC address of the virtual machine.
References:
https://forums.virtualbox.org/viewtopic.php?f=3&t=7749&sid=89e480f0dfb234c062a058995976a424

Change hostname of Ubuntu machine

To change Ubuntu(Debian/Mint) machine hostname, edit /etc/hostname. You may have to reboot machine for the changes to take effect. Note that for the new name to resolve locally, you need to edit /etc/hosts. The line that contains 127.0.0.1 below localhost should match with the hostname.

Saturday, December 01, 2012

List installed packages on Ubuntu system

To list installed packages on a Ubuntu (Debian/Mint) system, do:

$: dpkg -l

Change group owner ownership of a file or folder in Ubuntu

To change group ownership of ~/tmp and folders and files below it to say www-authors do:

$: sudo chgrp www-authors ~/tmp -R

Adding a group account in Ubuntu via console

Below adds a group called www-authors

$: sudo addgroup www-authors

Reference(s):
Manpage

How to detect if reboot is required after running apt upgrade

So you have a Debian based installation (i.e., Ubuntu, Linux Mint and of course Debian itself), how would you know if you need to reboot after running apt-get upgrade?

Well, this should be as easy as checking for the presence of the file /var/run/reboot-required

Tags:
apt, apt-get, upgrade, reboot, required

References:
http://askubuntu.com/questions/28530/how-can-i-tell-what-package-requires-a-reboot-of-my-system
http://serverfault.com/questions/92932/how-does-ubuntu-keep-track-of-the-system-restart-required-flag-in-motd


Friday, November 30, 2012

Can't run Windows 8 on VirtualBox if host proc does not support VTx/AMD-v proc

Can't run Windows 8 virtual machine using VirtualBox (4.2.4) on Dell 610 machine :(

Error message says:

VT-x/AMD-V hardware acceleration is not available on your system. Certain guests (e.g. OS/2 and QN) require this feature and will fail to boot without it



Looks like Win8 needs VT-x/AMD-V hardware to work.

Reference(s):
https://forums.virtualbox.org/viewtopic.php?f=2&t=48256

Sunday, November 25, 2012

Get memory information in Ubuntu from the command line

To get memory information from the command line, do:
$: sudo lshw -class memory

The above command should show something like:
  *-firmware              
       description: BIOS
       vendor: Winbond Electronics
       physical id: 0
       version: A06
       date: 10/02/2005
       size: 64KiB
       capacity: 512KiB
       capabilities: isa pci pcmcia pnp upgrade shadowing cdboot bootselect int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb agp smartbattery biosbootspecification netboot
  *-cache:0
       description: L1 cache
       physical id: 700
       size: 8KiB
       capacity: 8KiB
       capabilities: internal write-back data
  *-cache:1
       description: L2 cache
       physical id: 701
       size: 2MiB
       capacity: 2MiB
       clock: 66MHz (15.0ns)
       capabilities: pipeline-burst internal varies unified
  *-memory
       description: System Memory
       physical id: 1000
       slot: System board or motherboard
       size: 2GiB
     *-bank:0
          description: DIMM DDR Synchronous 533 MHz (1.9 ns)
          vendor: Hynix Semiconductor (Hyundai Electronics)
          physical id: 0
          serial: 00005128
          slot: DIMM_A
          size: 1GiB
          width: 64 bits
          clock: 533MHz (1.9ns)
     *-bank:1
          description: DIMM DDR Synchronous 533 MHz (1.9 ns)
          vendor: Hynix Semiconductor (Hyundai Electronics)
          physical id: 1
          serial: 00004128
          slot: DIMM_B
          size: 1GiB
          width: 64 bits
          clock: 533MHz (1.9ns)

Get CPU information in Ubuntu from command line

Method 1: Using lshw

$: sudo lswh -class cpu

This will show something like:
  *-cpu                   
       description: CPU
       product: Intel(R) Pentium(R) M processor 2.13GHz
       vendor: Intel Corp.
       physical id: 400
       bus info: cpu@0
       version: 6.13.8
       slot: Microprocessor
       size: 2133MHz
       capacity: 2133MHz
       width: 32 bits
       clock: 133MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2 cpufreq

Method 2. Using special /proc, like:
$: cat /proc/cpuinfo

processor      : 0
vendor_id      : GenuineIntel
cpu family     : 6
model          : 13
model name     : Intel(R) Pentium(R) M processor 2.13GHz
stepping       : 8
microcode      : 0x20
cpu MHz        : 800.000
cache size     : 2048 KB
fdiv_bug       : no
hlt_bug        : no
f00f_bug       : no
coma_bug       : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 2
wp             : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2
bogomips       : 1596.16
clflush size   : 64
cache_alignment: 64
address sizes  : 32 bits physical, 32 bits virtual
power management:

Installing Ubunut 12.10 via netinstall on Eee PC 900

I have a pretty old Eee PC 900 that have been running Arch Linux for awhile. I did an update lately and it borked it beyond my knowledge how to repair.

So, I was thinking why not use Ubuntu minimal install? I am pretty familiar with Ubuntu/Debian distribution, fixing it should be much easier as I am familiar with the distro. As an aside I am planning to use it as a web server and i don't want to update the machine weekly to keep up with the latest Arch packages.

Ubuntu 12.10 minimal installation is very easy now a days  It is as easy as installing Windows :). Anyway, I used a copy from https://help.ubuntu.com/community/Installation/MinimalCD. Ok, I am still using a lot of Windows machine ;(, so burning it to USB flash I used unetbootin.

Below are the sequence/options I have selected/or data supplied.


  • Turn off Eee PC 900
  • Connect flash drive (flashed with Ubuntu mini iso using unetbootin)
  • Turn of Eee PC 900, press ESC to view boot options
  • Select "Install" from the menu.
  • English for the "Select a Language".
  • United States for "Select your location"
  • No on "Configure the keyboard"
  • English (US) on "Configure the keyboard" - Country of origin for the keyboard
  • English (US) on "Configure the keyboard" - Keyboard layout
  • eth0 on "Configure the network" Primary network interface
  • eeepc900 on "Configure the network" hostname
  • United States on Choose a mirror of the Ubuntu archive
  • us.archive.ubuntu.com on Choose a mirror of the Ubuntu archive - Ubuntu archive mirror
  • Blank (nada) on Choose a mirror of the Ubuntu archive - HTTP Proxy information
  • username lastname on Set up users and passwords - Full name for the new user
  • username on Set up users and passowrds - Username for your account
  • password on Set up users and passwords - Choose a password for the new user
  • password on Set up users and passwords - Re-enter password for verify
  • No on Set up users and passwords - Encrypt your home directory
  • Yes on Configure the clock - Is this time zone correct
  • In Software Selection, I selected
    • LAMP server
    • Lubuntu minimal installation


Note:
Ubuntu 12.10 minimal install have difficulty working with the partitions created by Arch. I have to delete the partitions manually before the installation can proceed.



Android Blogger client force closes - not usable

Blogger client force closes in my Droid Razr Maxx, can't use it at all :(.

This was observed with Blogger v2.0.

Ok, reboot of the phone fixes it.

Personal best ssh client for Android

Remotely connecting to Linux securely in Android is like a walk in the park, ssh clients abound in Google Play Store. But ssh clients are not created alike. Some are designed with specific hardware in mind and for those who like to use physical keyboards, like Droid 3, you probably want to use all the keys. I have tried Terminal IDE, ConnectBot, Android Terminal Emulator but none of them work as I would have hoped. Like using ~, tab key for command line completion, display mc (Midnight Commander) properly. But one actually meet my need today, VX ConnectBot. In my understanding it is based on ConnectBot with changes to allow a much more pleasant experience using hardware keyboard. Try it for yourself, download from Google Play Store.

Note:
* Tested using Droid Razr Maxx using stock OS and Droid 3 using ICS.

Saturday, November 24, 2012

Changing default port used by Apache

Not sure if this is the right way to do it, searching the blogoshpere seems to indicate that this might be the case.

Steps to change default port that Apache listens on:
  1. As good practice make a copy of the file ports.conf to somewhere safe. Like
    • mkdir ~/bak
    • cp /etc/apache2/ports.conf ~/bak
  2. Open and edit ports.conf, like sudo vim /etc/apache2/ports.conf.
  3. In Ubuntu 12.10, change Listen 80 to Listen 81. This should be around line 9, of course change 81 to a value that you need.
  4. Restart Apache to enforce the changes, like sudo /etc/init.d/apache2 restart.

References:
http://httpd.apache.org/docs/2.2/vhosts/name-based.html
http://ubuntublog.org/how-to-change-apache-ports-in-ubuntu.htm

Wednesday, November 21, 2012

PInvoke.net alternative


http://pinvoke.net/ is my goto location when I need to call native functions into C#. I just found out today that there is actually an alternative from Microsoft called P/Invoke Interop Assistant, head to the link below to get the binaries.

http://clrinterop.codeplex.com/
http://clrinterop.codeplex.com/releases/view/14120

Check if a file exists on a remote site

To check if a file exists on a remote site (say a web site), do the following:

$: wget --spider https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb

The above command checks if a stable version of Google Chrome exists in the remote location specified.

Saturday, November 17, 2012

Windows 8 Mouse Tips and Tricks

Work in progress!!!


Mouse Gesture What it does
Click anywhere Lock screen: brings up login screen
Move mouse to corner bottom left, then click popup icon Either shows Start(home) screen or desktop screen
Move mouse to corner top left, then click popup icon Cycle through running applications
Move mouse to corner bottom(or top) left, then move mouse up Show running applications
Move mouse to corner bottom right Show Charms bar
Right Click in Doc area IE10MUI: Brings up address bar and tab bar

* IE10MUIE: IE10 Moderun UI

Windows 8 Shortcuts

Work in progress!!!


Keyboard Shortcut Action
Win Key Windows 8 Home Screen
Any Key Lock Screen - brings up login window
Page Down/Page Up In W8 Home Screen, move between tile groups
Win+C Open Charms bar
Win+Q Bring up integrated/semantic search
Win+f Search for Files
Win+I Charms bar Settings
Win+K Charms bar Devices
Win+Tab See running applications
Win+D Show Desktop

Saturday, July 14, 2012

PS Quick Tips: Create a directory in PowerShell

PS D:\> New-Item -ItemType directory -Path D:\tmp

PS Quick Tips: How to check if path exists in Powershell

PS D:\> Test-Path C:\Windows

PS Quick Tips: Loading Powershell add-on module

  1. Copy PowerShell module to $env:HOMEDRIVE + $env:HOMEPATH + "\Documents\WindowsPowerShell\Modules", create the folder if necessary.
  2. Load the module, e.g., 
PS D:\> Import-Module Pscx

Where Pscx is the module name.

PS Quick Tips: Check Powershell version installed

PS: D:> $host.version

Wednesday, July 04, 2012

Get IP address of the machine in Arch Linux

How to get IP address in Arch Linux? Well, it turns out to be easy:
#: ip addr

You should see something like:


1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1f:c6:d5:32:4d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.105/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::21f:c6ff:fed5:324d/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:15:af:92:3e:8a brd ff:ff:ff:ff:ff:ff

!Enjoy ts

Saturday, June 16, 2012

Get BIOS tag from the command line

Quick one liner to get Windows BIOS serial number.

wmic bios get serialnumber | clip

This only works for Windows operating system. Clip only works with Vista or later versions. Note that the output contains the string "SerialNumber" and the value. I wish I new just to return the value.

Saturday, June 02, 2012

Cisco VPN client failed to connect on Windows 8

I tried to connect to a remote location using Cisco AnyConnect VPN Client (v 2.2.0140) using Windows 8 Release Preview but failed with error message "The VPN client driver has encountered an error."

Does this indicates that the client application is not compatible with Windows 8, at least for now? There is a workaround though. Following are the steps to make it to work.
  1. Open Registry Editor (like type regedit.exe).
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva
  3. Locate key DisplayName, like mine shows @oem3.inf,%vpnva_Desc%;Cisco AnyConnect VPN Virtual Miniport Adapter for Windows
  4. Change it to Cisco AnyConnect VPN Virtual Miniport Adapter for Windows
  5. Close then open Cisco AnyConnect VPN Client. Retry to connect. It should work from here on.
~ts

Wednesday, May 30, 2012

ERROR: database disk image is malformed in Fedora 17

Got a spanking brand new Fedora 17 install, it looks a lot different from Fedora 16 on the surface which is a welcome change, quite refreshing actually. Tried to do a software update but instead got the following error message:
ERROR: database disk image is malformed
 Seems like my rpm database got corrupted for some reason but this is a new install on VirtualBox. Anyway, got it fixed by doing the following:

$ sudo yum clean dbcache 

~ts

Saturday, May 26, 2012

Force ntp sync on OpenSUSE


I am running openSUSE under VirtualBox to play around with the distribution. I am not really using it on a regular basis so it can be in the "Saved state" for several days.

I am also using the guest additions that comes with it and for some reason it is not syncing with the host automatically. Got no time to investigate today but I would like to sync the time so that I can check for updates.

As always in Linux land, there are thousand ways to do this and below is one quick way of doing it.
sudo /etc/init.d/ntp restart

Of course you have to do this at the command line.

Reference(s):
http://www.krazyworks.com/force-ntp-time-update-on-linux/

Have fun!!!

Technos


Saturday, May 12, 2012

How to get computer model of a computer

This is just one of the many ways to get computer model, this will be through WMI. Type the following to get the computer model:
wmic csproduct get name

Enjoy!

 Reference(s):
http://myserverissick.com/2008/04/find-a-computers-model-using-the-command-line-or-in-a-batch-file/

Saturday, May 05, 2012

How to remotely manage Hyper-V on Windows 7

If you are running non-Windows OS or Windows OS without integration services installed in Hyper-V, then remotely managing those guest machines can be painful and in some cases not usable. Think non-Windows machine that you need to configure via GUI. GUI configuration of non-Windows machine over remote client connection (RDP) does not work - guest machine can't grab the mouse. To get around this limitation, you can install  Remote Server Administration Tools for Windows 7 and some other minor tweaks.

Following are the steps:
  1. Of course you need to have a client OS, I will be using Windows 7 in this scenario but I hear that Windows Vista is also supported but not Windows XP and older versions. 
  2. Download and install Remote Server Administration Tools for Windows 7. This download link only works for Windows 7 with Sp1 (Enterprise, Ultimate, Prof). This is no small download, around 230MB for x86 as of this writing. And yes, the install also takes quite a while.
  3. Open Control Panel then select Programs.
  4.  Under Programs and Features click on Turn Windows features on or off.
  5. In Windows Features select Remote Server Administration Tools | Role Administration Tools Feature | Hyper-V Tools then hit on OK.
  6. At this point you should have Hyper-V Manager installed but connecting to a Hyper-V Server will probably fail at this time. I believe this has to do with security and more... good thing is that someone from Microsoft created a cscript that makes this configuration a little easier. The tool is called Hyper-V Remote Management Configuration Utility. From what I can see, it is not officially supported by MSFT but hey it works. Anyway, download the tool from here.
  7. Open an elevated command prompt and navigate to where hvremote.swf was downloaded.
  8. Run the following to enable remote administration on the client OS.
  9. cscript hvremote.wsf /mmc:enable
    
  10. Since my system is workgroup environment, need to run the following. I believe this is to allow remote DCOM access to Anonymous logon.
  11. cscript hvremote.wsf /anondcom:grant
    
  12. Assuming that same user account exists between Hyper-V Server and this client OS and that the server was already configured, then you should now be able to remotely manage that Hyper-V Server.

~ts

Friday, May 04, 2012

Setting up Eclipse 4.1 as IronPython IDE

There are various IDEs available out there that can be used for IronPython. One of them is Eclipse + PyDev + Subclipse for version control. The nice thing with this setup is that it provides intellesense and it does understand Python language well.

Setting it up is fairly easy. First download Java Runtime, I have used v6 update 32 for this exercise. Second, download Eclipse 4.1 (4.1.2 as of this writing). The way I see it, version 4.x is not yet for the mainstream use but it does work fairly well. Third, install latest PyDev and finally install Subclipse for SVN integration.

~ts

Tuesday, May 01, 2012

Installing Fedora 16 on VirtualBox

Installing Fedora 16 on Virtualbox is a no sweat activity. But for those uninitiated it probably helps to provide a little guidance. See below for one of the many possible configurations:
General
Name: f16
OS Type: Fedora

System
Base Memory: 1024 MB
Processor(s): 1
Execution Cap: 100%
Boot Order: CD/DVD-ROM, Hard Disk
VT-x/AMD-V: Enabled
Nested Paging: Enabled
 
Display 
Video Memory: 128 MB
3D Acceleration: Enabled
2D Video Acceleration: Disabled
Remote Desktop Server: Disabled
 
Storage
IDE Controller
  IDE Secondary Master (CD/DVD): Empty
SATA Controller 
  SATA Port 0: f16.vdi (Normal, 80.00 GB)
 
Audio
Host Driver: Windows DirectSound
Controller: ICH AC97
 
Network
Adapter 1: Intel PRO/1000 MT Desktop (NAT)
 
Serial Ports
Disabled

USB
Device Filters: 0 (0 active)
This is typical configuration with NAT networking. So guest can connect to the outside world but the outside world cannot connect to the guest directly.

For this exercise, let use live CD as the media for installation. This should be available directly from Fedora or from a mirror site near you, this sample link is from University of Texas.

With LiveCD available and VirtualBox guest configured, it is now time to power-up the guest and start breezing through the installation. Since the base install is easy, I will just show the highlights during install.

Figure 1. Boot screen

Figure 2. First sign that Fedora 16 does not like VirtualBox or VirtualBox does not like Fedora 16 ;) . Basically this tells us that GNOME 3 detected that the machine is not good enough to run GNOME 3 goodies. The bar now is higher to use GNOME 3, need more powerful machine to enjoy it. But it does fallback pretty good.

Figure 3. Fedora 16 live in fallback mode. Got selected Install Hard Drive here to start installing the software.

Figure 4. Select keyboard

Figure 5. Storage device, using iSCSI? Don't know what it means? Pick the first one.

Figure 6. You are warned, this will destroy any existing data ;)

Figure 7. Hostname, provide name as you like.

Figure 8. Pick your time zone. This is used by the system to figure out your local time.

Figure 9. Set root account password

Figure 10. You familiar with partitioning hard disk and specific layout? Nope? Use default

Figure 11. You are being warned again, this will destroy existing layout and of course data.

Figure 12. Installation complete, that was easy.

Figure 13. Welcome to Fedora!!!

Figure 14. Licensing... you using this at home? Yes, just accept it.

Figure 15. Date and time, do you want to keep your time sync with the rest of the world? Enable Synchronize date and time over the network.

Figure 16. Create user that you will be using on this machine on regular basis

Figure 17. Hardware profile, wanna help a little bit Fedora? Then send profile to them

Figure 18. Login screen

Figure 19. GNOME 3 fallback desktop

Now you should have a working Fedora 16 installation in VirtualBox. If you are adventurous and wanna see how full GNOME 3 looks like, then let us do the following.

Ensure that everything is updated/current:
$: sudo yum check-update
$: sudo yum update
Install supporting libraries and gcc to compile VirtualBox modules:
$: sudo yum -y install gcc kernel-devel
From VirtualBox client window for this guest machine, do Devices | Install Guest Additions... Once ISO is detected, from the terminal do:
$: cd /media/VBOXADDITIONS_4.1.8_75467
Of course, replace the folder above with the version of your VirtualBox. Once inside that folder do:
$: sudo ./VBoxLinuxAdditions.run
Wait for the installation to complete and reboot. Ok, the pain is not over yet. For some reason SELinux and VirtualBox guest additions does not like each other, so we need to let VirtualBox guest additions be exempted from the prying eyes of SELinux. So, do:
$: sudo grep gnome-session-c /var/log/audit/audit.log | audit2allow -M mypol
$: sudo semodule -i mypol.pp
Reboot and congratulations... you now have a GNOME 3 desktop running in VirtualBox. But this is a very short lived celebration as VirtualBox and GNOME 3 are not best of friends :). I find it that it is not stable and gets into your way getting things done. Like not refreshing properly, lock-ups, buttons not responding as you would have expected. To cut the story short, I have to force GNOME 3 to run in fallback mode. Now it is not too bad.

Fedora 16 is free, and I am not directly contributing to the distribution, so the best I can do is praise for the hard work and may the team have the desire to continue to improve the distribution and hopefully in the future get with VirtualBox team and iron out the problems with the integration between these two great projects.

~ts

Saturday, April 28, 2012

Restart X from command line in Ubuntu

To restart X from the console, open a terminal session (e.g., Ctrl+Alt+F1), then do:
$: sudo restart lightdm

Note that any child processes created by X will also be killed.

Tested on: Ubuntu 11.10

~ts

Friday, April 27, 2012

How to get SharpDevelop to start working with svn

SharpDevelop can take advantage of the installed SVN (TortoiseSVN) if it is installed. To get this to work need to ensure the following:
- TortoiseSVN is installed
- TortoiseSVN is in the system path. One way to test this is to install TortoiseSVN with the command line tools. After installation open up console and run svn.exe. If it responds with "Try 'svn help' for usage." then you are good.
- Create TortoiseSVN repo (if you don't have any).
- Checkout snv repo to a SharpDevelop project directory. At this point SharpDevelop should detect that solution is under source control and you should now be able to make commits/diffs/updates/etc.

Info:
SharpDevelop: 4.2.0 build 8649 (beta 2)
TortoiseSVN: 1.7.6

~ts

Thursday, February 02, 2012

Ubuntu 11.10 screen capture log

This is old news but someone (or I) might find this helpful in the future. Below are screen captures during Ubuntu 11.10(Oneiric Ocelot) installation.

Figure 1. Welcome screen

Figure 2. Prepare to install

Figure 3. Install type

Figure 4. Partition type

Figure 5. Timezone

Figure 6. Keyboard layout

Figure 7. Create user account

Figure 8. Install Complete

Figure 9. Login

Figure 10. Ubuntu 11.10 Desktop

Tuesday, January 03, 2012

Error! Could not locate dkms.conf file install VirtualBox 4.1.8 on Ubuntu 11.10

Tried to update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed properly except that VirtualBox installation was complaining about missing dkms.conf file, see error message below.
$: sudo /etc/init.d/vboxdrv setup
 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                              
Error! Could not locate dkms.conf file.
File:  does not exist.
                                                                         [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS           [ OK ] 
 * Starting VirtualBox kernel modules                                    [ OK ] 

Though it looks like installation was fine but I am concerned about its effects to VirtualBox functionality. To fix this, do:

$: cd /var/lib/dkms/vboxhost
$: sudo rm -r 4.1.4
$: sudo /etc/init.d/vboxdrv setup

Of course you have to replace 4.1.4 with the old version of VirtualBox that you don't need.

~technos

Tags:
VirtualBox, Ubuntu, dkms.conf, file not found