Sunday, September 4, 2011

Search for File Contents in Nautilus

Create a script file (text file) called "Find" in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:- 

#!/bin/bash
gnome-search-tool --hidden --path="$*" --contains= 

From its command help:-
--hidden               Select the "Show hidden and backup files" search option
--path=PATH            Set the text of "Look in folder" search option
--contains=STRING      Select and set the "Contains the text" search option

To search for files using this script in Nautilus,
Right click a folder -> Scripts -> Find

Refs
http://forums.linuxmint.com/viewtopic.php?f=42&t=25114

Friday, August 5, 2011

Allow apps to display tray icons in Unity

Only whitelisted apps are allowed to show tray icons in Unity. By default, the apps in the whitelist on my PC are JavaEmbeddedFrame, Mumble, Wine, Skype, hp-systray, and scp-dbus-service.

To show the current whitelisted programs, run
gsettings get com.canonical.Unity.Panel systray-whitelist
To add a new program; for example, Tasque, to the current whitelist, run
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Tasque']"
Alternatively, we can do this through a GUI using a tool called "dconf-editor". It's part of the "dconf-tools" package. In dconf-editor, go to
desktop -> unity -> panel
and select "systray-whitelist" on the right panel.


After change, strangely doing a relogin didn't seem to take this into effect for me. I had to reboot the PC. I didn't try just killing X Window though.

Refs
http://www.omgubuntu.co.uk/2011/03/how-to-hide-or-show-app-tray-applets-in-ubuntu-11-04/
http://ubuntu.sun.ac.za/wiki/index.php/Show_tray_icons_in_unity

Thursday, August 4, 2011

vReplicator fails with the message: - " 'Consolidate Helper' snapshot found"

VMWare ESX/ESXi creates a temporary snapshot called "Consolidated Helper" during the snapshot deletion/consolidation. It should be deleted automatically but if it's left behind (possibly due to performance issue or insufficient disk space), vReplicator will fail. To fix this, make sure there's enough free space and then just remove this snapshot manually through Snapshot Manager. After it reaches 95%, be patient as it may take a very long time depending on the virtual disk size to commit the snapshot. If it still fails, try creating a new snapshot and then select "Delete All".

Refs:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003302
http://communities.vmware.com/thread/274077
http://communities.vmware.com/thread/121642

Sunday, July 31, 2011

New Brower Session on IE8/IE9 and Google Chrome

IE8 or IE9 (Microsoft Internet Explorer)
Use -nomerge switch when running IE.

Google Chrome (V12.0.742.124)

  • Use Ctrl + Shift + N to bring up a new Chrome window in the Incognito mode (private browsing). However, any subsequent window opened up this way will share the same session.
  • Use --user-data-dir switch with different profile locations when running Chrome. A bit awkward but can be mitigated by using shortcuts. However, each session will its own config and cache. For example,

google-chrome --user-data-dir=/home/tom/chrome-profiles/1
google-chrome --user-data-dir=/home/tom/chrome-profiles/2
google-chrome --user-data-dir=/home/tom/chrome-profiles/3

Refs
http://superuser.com/questions/690/new-browser-session-on-firefox-and-google-chrome

Saturday, July 16, 2011

Monday, June 13, 2011

Access shared host folders in a VirtualBox Ubuntu guest

  • Install VirtualBox Guest Additions.
  • Set up a shared host folder using VirtualBox.



Make sure Auto-Mount is off otherwise when mounting the shared folder after restarting the guest next time, we'll get this error:-
mount.vboxsf: mounting failed with the error: Invalid argument.
It seems it's caused by the shared folder has already been mounted to "/media/sf_mydata" which only allows "admin" to access.
  • In the Ubuntu guest, use Terminal to run the following commands:-
sudo mkdir /mnt/mydata
sudo mount -t vboxsf mydata /mnt/mydata
ln -s /mnt/mydata $HOME/Desktop/mydata
  • To auto-mount the shared folder,
gksudo gedit /etc/fstab
Then add the following line:-
mydata /mnt/mydata vboxsf defaults 0 0

Saturday, June 11, 2011

Missing Main Menu Bar in Eclipse based Applications

Some Ecipse based applications like XMind (Mind Mapping and Brainstorming program) show the menu neither in the main program window nor in the new global main menu panel introduced in Ubuntu 11.04. The workaround for now is to set the APPMENU_DISPLAY_BOTH to 1 like this:-
APPMENU_DISPLAY_BOTH=1 /usr/local/xmind/xmind
This allows the menu to display within the application like it did in the earlier version of Ubuntu.

Refs:
http://groups.google.com/group/xmind/browse_thread/thread/bd2badc7f785c254?pli=1
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/688136