Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, February 6, 2012

Firefox 10 keeps crashing

After upgrading to Firefox 10, the new version kept crashing every time I opened it. Running it in safe mode (firefox -safe-mode) didn't help.



I ended up creating a new profile to fix this problem using the following command and switch:-
firefox -P
All plugins were gone and needed reinstalling. I could get some data back though from the old profile folder in
/home/tom/.mozilla/firefox/xxxx.default
Refs
http://ubuntuforums.org/showthread.php?p=11595179


Friday, January 13, 2012

Make Eclipse look better on Ubuntu

  • Compact the look and fix unreadable selected entry in content assist in some themes (e.g. Ambience) by creating a new text file called "gtkrc" (a stylesheet file for GTK apps) with the following content:- 
gtk-color-scheme = "selected_text_color:#000000"
style "compact"
{
  GtkButton::default_border={0,0,0,0}
  GtkButton::default_outside_border={0,0,0,0}
  GtkButtonBox::child_min_width=0
  GtkButtonBox::child_min_heigth=0
  GtkButtonBox::child_internal_pad_x=0
  GtkButtonBox::child_internal_pad_y=0
  GtkMenu::vertical-padding=1
  GtkMenuBar::internal_padding=1
  GtkMenuItem::horizontal_padding=4
  GtkToolbar::internal-padding=1
  GtkToolbar::space-size=1
  GtkOptionMenu::indicator_size=0
  GtkOptionMenu::indicator_spacing=0
  GtkPaned::handle_size=4
  GtkRange::trough_border=0
  GtkRange::stepper_spacing=0
  GtkScale::value_spacing=0
  GtkScrolledWindow::scrollbar_spacing=0
  GtkExpander::expander_size=10
  GtkExpander::expander_spacing=0
  GtkTreeView::vertical-separator=0
  GtkTreeView::horizontal-separator=0
  GtkTreeView::expander-size=12
  GtkTreeView::fixed-height-mode=TRUE
  GtkWidget::focus_padding=0

  font_name="Liberation Sans,Sans Regular 8"
  text[SELECTED] = @selected_text_color
}
class "GtkWidget" style "compact"
style "compact2"
{
  xthickness=1
  ythickness=1
}
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2" 
  • To use the above stylesheet with Eclipse (my version is Indigo - 3.7.1), run Eclipse like this:-
GTK2_RC_FILES=$GTK2_RC_FILES:/somewhere_1/gtkrc /somewhere_2/eclipse
  • Make tooltip readable by using #000000 as its foreground colour (tooltip_fg_color) and #f5f5b5 as background (tooltip_bg_color) in the following files:- 
/usr/share/themes/<your-current-theme>/gtk-3.0/settings.ini
/usr/share/themes/<your-current-theme>/gtk-3.0/gtk.css
/usr/share/themes/<your-current-theme>/gtk-2.0/gtkrc
  • Install Eclipse theme colour plugin and may want to try my TumCode theme which keeps the number of colours to the minimum.
     
  • Replace the default "Monospace" font with "Liberation Mono" and optionally reduce the font size to 8 or 9.
Windows -> Preferences -> General -> Appearance -> Colors and Fonts
(for Java Editor Text Font, Javadoc display font, Properties File Editor Text Font, etc.)

Here is how it looks after the above changes:-

Refs
http://blog.xam.dk/?p=70 
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity
http://blog.valotas.com/2010/02/eclipse-on-linux-make-it-look-good.html

Monday, December 12, 2011

VirtualBox: Failed to access the USB subsystem

To fix this error, just add the user name to the "vboxusers" group but the User Accounts manager in Ubuntu 11.10 is quite terrible, too simple to be useful so use a command line to do this instead:-
sudo usermod -a -G vboxusers <user-name>
The other option is to install and run the old Accounts manager.
sudo apt-get install gnome-system-tools
users-admin
Refs
http://www.liberiangeek.net/2011/10/add-users-to-existing-groups-in-ubuntu-11-10-oneiric-ocelot-2/
http://linux-software-news-tutorials.blogspot.com/2011/11/restore-old-account-manager-in-ubuntu.html

Friday, December 9, 2011

Unable to locate theme engine in module_path: "pixmap"

I got the following warning when running the update-java tool.
(gksudo:5045): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
To fix it, run
sudo apt-get install gtk2-engines-pixbuf
Refs
https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/853232

Wednesday, November 30, 2011

No sound after upgrading to 64-bit Ubuntu 11.10

After upgrading from 32-bit Ubuntu 11.10 to the 64-bit version, the sound system stopped working.

To fix this issue, I ran
rm -rvf ~/.pulse/ 
Interestingly, it worked straight away without re-login.

Refs
http://ubuntuforums.org/showthread.php?t=1845555

Thursday, November 10, 2011

Evoluation failed to append to mbox

After upgrading Evolution to version 3.2.0, I kept getting this message after sending an email from any of my mail accounts:-
The reported error was "Failed to append to mbox:///home/tom/.local/share/evolution/mail/local#Sent: Invalid folder URI 'mbox:///home/tom/.local/share/evolution/mail/local#Sent' Appending to local 'Sent' folder instead."
I fixed it by going to
Edit menu -> Preferences -> Mail Accounts 
-> Select a mail account -> Edit -> Defaults -> Revert
Refs
http://ubuntuforums.org/showthread.php?t=1839990

Monday, October 24, 2011

nautilus-gksu: "Open as administrator" not showing in Ubuntu 11.10

To get nautilus-gksu to work again, run

sudo cp /usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/

Refs
https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/817383

Friday, October 21, 2011

Disable overlay scrollbars in Ubuntu Unity

Finally I gave up on using the overlay scrollbars in Unity. It gave a bit of more screen real-estate but it was less practical (almost a pain) to use on my desktop computer compared with the classic scrollbars. The overlay scrollbars may still be good for devices with smaller screen sizes.

To disable this feature, run
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars
Then restart the machine. Don't know whether just re-login will also work or not.

Update: Just re-login is enough. I tried that on Ubuntu 11.10.

Refs
http://www.flynsarmy.com/2011/04/why-i-hate-unity/

Saturday, October 15, 2011

Get TimeCult running on Linux

TimeCult is a simple but powerful task management and time tracking application. A hierarchy of projects, activities and tasks can be created and displayed in a tree view.



To get it running on Linux,

java -jar timecult.jar
Refs
http://sourceforge.net/projects/timecult/reviews

Monday, October 10, 2011

Add taskbar in Ubuntu (Unity)

Panel tint2 is an awesome customisable taskbar that has excellent dual monitor support. It also has system tray (notification area).

To install,run
sudo apt-get install tint2 


To customise tint2, run
tint2conf

Refs
http://www.liberiangeek.net/2011/10/add-taskbar-in-ubuntu-11-0411-10-with-panel-tint2/

Saturday, October 8, 2011

Unity Launcher and QuickList Editor

Install Bazaar Version Control System.
sudo apt-get install bzr
Download the Unity Launcher Editor code from Launchpad.
bzr branch lp:unity-launcher-editor
Run the editor.
./unity-launcher-editor/ule




Refs
http://www.ultimateeditionoz.com/forum/viewtopic.php?f=23&t=2671
https://launchpad.net/unity-launcher-editor

Saturday, September 24, 2011

Synchronising Folder Problem in Evolution Mail

My Evolution Mail kept synchronising one of the existing folders whenever I clicked on it or read any of the emails inside the folder.


Forcing Evolution to re-index its mailbox file by deleting the associated files with the extensions ".index", and "cmeta" in "~/.local/share/evolution/mail/local/Inbox.sbd" didn't help. The size of the mailfox file for that folder was surprisingly 4GB. Not sure this is the cause of the problem though.

To fix this, I

  • Created a new folder in Evolution.

  • Moved all emails from the folder that had the problem to the new folder. Be patient as this took ages. Evolution was synchronising the folder repeatedly for hours while moving the emails. After it finished, the mailbox file size of the new folder was just a bit over 200 MB.

  • Closed Evolution and deleted the bad folder by removing all of its associated files (mailbox, cmeta, index, and data files) in "~/.local/share/evolution/mail/local/Inbox.sbd" because trying to delete it in Evolution gave this error:-




Refs
http://ubuntuforums.org/showthread.php?t=974536

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

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

Tuesday, May 24, 2011

Useful App Indicators

System Load Indicator
Display graphs for CPU, RAM, network traffic, harddisk and swp space use.
sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload

Weather Indicator
sudo add-apt-repository ppa:weather-indicator-team/ppa
sudo apt-get update
sudo apt-get install indicator-weather

Caffeine
Keep Ubuntu awake by disabling screensaver.
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

Lookit
Capture an area or the entire screen.
sudo add-apt-repository ppa:lookit/ppa
sudo apt-get update
sudo apt-get install lookit

Tomate
Inspired by the Pomodoro technique. You commit to working without interruption for at least 10 minutes which is usually the hardest part. After that, it becomes easier to continue working.


Tuesday, May 17, 2011

Free Antivirus Software for Linux

Clam AntiVirus
  • Install command-line interface
sudo apt-get install clamav
  • Install virus database update utility
sudo apt-get install clamav-freshclam
  • Install Nautilus extension for easy scan (it adds "Scan for Viruses" to the right-click menu)
sudo apt-get install nautilus-clamscan
AVGScan
  • Download the installation file (.deb) from http://free.avg.com/au-en/download.prd-alf
  • When running it, this message "The package is of bad quality" will appear. Just select "Ignore and install".
  • The AVG service should start automatically at boot time. To start the service manually now, run
sudo service avgd start
  • To integrate the AVGScan with Nautilus, create a script file (text file) in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:-
#!/bin/bash
xterm -hold -T "AVG Virus Scanning $*" -e "avgscan --heur --arc $*"
Refs
http://ubuntuforums.org/showthread.php?t=1209061