Skip to main content

Posts

Showing posts from 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 Visibility |  Editor Presentation |  Show Whitespace Characters . Customize Perspective Note that you may have to make Editor Presentation  available through Commands Groups Availability like below. Command Groups Availability

Eclipse TFS support

To install TFS support within Eclipse do: Open Eclipse Do  Help | Install New Software... . In Install software dialog, select Add... . Give it a name like "Eclipse TFS Plugin". In location, type  http://dl.microsoft.com/eclipse/tfs  then hit on OK button. Select  Team Foundation Server Plug-in for Eclipse , see below. Select Next  to proceed with the installation.  In Installation Details, select Next again. In  Review Licenses , select I accept the terms of the license agreements . Then hit on Finish . 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.

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

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

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: Update /etc/hostname , change it to the new machine name Update /etc/hosts , change one of the loopback name to the new machine name. 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

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

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

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

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 c

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" fr

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.

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: As good practice make a copy of the file ports.conf to somewhere safe. Like mkdir ~/bak cp /etc/apache2/ports.conf ~/bak Open and edit ports.conf, like sudo vim /etc/apache2/ports.conf . 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. 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

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

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

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

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. Open Registry Editor (like type regedit.exe). Navigate to  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva Locate key DisplayName , like mine shows  @oem3.inf,%vpnva_Desc%;Cisco AnyConnect VPN Virtual Miniport Adapter for Windows Change it to  Cisco AnyConnect VPN Virtual Miniport Adapter for Windows Close then open Cisco AnyConnect VPN Client. Retry to connect. It should work from here on. ~ts

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

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

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: 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.  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. Open Control Panel

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

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, I use live CD as the media for installati

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

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

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 re