File association in Ubuntu Linux








  1. In Nautilus file manager, select the file
  2. Right-click the file, in the menu select "Properties", it opens a window...
  3. Activate "Open with" tab
  4. Select the applcation that you want to file type associates to then click "Set as default".
  5. "Close" the window.



Evince (Doc Viewer) on Ubuntu 13.10 fails to print to Toshiba e-Studio 4540c printer








ps error: invalidaccess
It fails to print, the job is marked as invalid. You can see the job from the INVALID job list. Select the job then re-print (Need to login with your department code at the printer, then select print then job status), it should work.
alternatively you can install and use adobe reader.


eclipse on Ubuntu Linux: annoying scroll bars issue








To fix the scoll bars issues in Eclipse on Ubuntu Linux (Unity):
  1. Create a wrapper script to start eclipse (Note replace /opt/eclipse to the location where your eclipse is installed):
    sudo vi /usr/local/bin/eclipse
    #!/bin/bash
    # fix the menu issue
    export UBUNTU_MENUPROXY=0
    
    # fix the scroll bar issue
    export LIBOVERLAY_SCROLLBAR=0
    
    /opt/eclipse/eclipse
    
    you need to set the file mode to be executable:
    sudo chmod +x /usr/local/bin/eclipse
  2. Create a desktop shortcut/launcher:
    vi ~/Desktop/Eclipse.desktop
    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_US]=/opt/eclipse/icon.xpm
    Name[en_US]=eclipse
    Exec=/usr/local/bin/eclipse
    Name=eclipse
    Icon=/opt/eclipse/icon.xpm
    
  3. Now you can either click the Eclipse icon on your desktop or type 'eclipse' in a Terminal window to start eclipse



vim: remove all java block comments








  1. Remove all /* ... */:
    :%s/\/\*\_.\{-}\*\///
  2. Remove all /** ... */:
    :%s/\/\*\*\_.\{-}\*\///



Ubuntu Linux: Install google chrome browser








  1. Accept the key:
    sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
  2. Install libxss1:
    sudo apt-get install libxss1
  3. Download google chrome (you need to replace amd64 with i386 if you are running 32 bit Ubuntu):
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  4. Install the package (you need to replace amd64 with i386 if you are running 32 bit Ubuntu)::
    sudo dpkg -i google-chrome-stable_current_amd64.deb
  5. If installation fails, run the following command to fix it:
    sudo apt-get -f install