Fix Vim editor on Ubuntu

Problem: The arrow keys insert characters, no status message at the bottom etc.

Reason : The default Vim on Ubuntu is vim-tiny, a skeleton version.

Fix: Install the real stuff – sudo apt-get install vim

Note: vi = Visual, vim = Visual improved. And vim-tiny is vi compatible, kind of Jurassic.

Install Sun (Oracle) Java on Ubuntu without using PPAs

Install JDK on Ubuntu manually without depending on PPAs –

  1. Select the required package from here – http://www.oracle.com/technetwork/java/javase/downloads/index.html. Download the jdk-[version].bin file from the downloads page.
  2. Make the downloaded file runnable; Eg – sudo chmod +x jdk-6u32-linux-x64.bin
  3. Run this file; Eg- sudo ./jdk-6u32-linux-x64.bin
  4. Move the newly created folder to /usr/lib/jvm/. Eg – sudo mv jdk1.6.0_32 /usr/lib/jvm/ (Optionally change the user of this folder to yourselves)
  5. Add the newly added jdk to known java command option –
  6. Choose the new java, javac and javaws by running commands-

 

Run java -version to verify installation. Cheers!

Eclipse Compilation error: [function/type] is not accessible due to restriction on required library … rt.jar

Problem : Eclipse gives the error – “[function/type] is not accessible due to restriction on required library … rt.jar” when building a project.

Reason: Project  classpath (in the build path) is refers to JRE in place of the JDK in which the Project is configured to work with.

Fix:  Go to Java Build Path > Libraries, choose JRE System Library, click Edit button. From the dialog choose Alternate JRE and choose the required JDK.

 

Create Shortcut / launcher on Desktop in Ubuntu 12.04

To create a shortcut to an application or location on the desktop (Ubuntu 12+), on terminal run –

Method 1: Installing Gnome Panel

  1. if a shortcut is being created for the first time,

    , else directly do step 2.

  2. In the launcher-creation window choose the type and location of the target. Click OK.

Method 2: For application shortcuts only

If shortcut to an installed application is to be created –

  1. Go to Home Folder –> File System –> usr –> share –> applications.
  2. Right click your favourite icon, choose Copy To –> Desktop

(from mhdizam’s comment, verified working)

How to record from sound card on Ubuntu ?

Given below is how we can record any streamed audio from sound card :

  1. Install PulseAudio Volume Control from Ubuntu Software center.
  2. Open PulseAudio volume control from Dash home.
  3. Go to “Input Devices” Tab.
  4. In the dropdown “Show” (towards bottom of the pane), select “All Input Devices“.
  5. Set Monitor of Built-in Audio Analog Stereo as default fall back option (by clicking the green icon above it).
  6. Close the volume control.
  7. Open Sound Recorder from Dash. This should now record (only the) sounds played in the computer. You may choose “CD quality MP3” from the “Record as” drop down if you want to store the output as mp3s.

Note – Sound recorder is buggy and doesn’t show output formats in Ubuntu 13x. Audicity is a good alternative to use in such cases.

Override certificate error in Cisco AnyConnect Client on Ubuntu 12.04 64 bit

Problem: Cisco Anyconnect client does not give an option to override the “invalid certificate error” and go ahead using the current certificate of the server.

Reason: The current libraries used by Anyconnect client does not support this feature.

Fix: Add libraries from Firefox, as below:

  1. If firefox is not installed, install firefox from Ubuntu Software Center.
  2. On terminal run: sudo cp /usr/lib/firefox/lib*.so /opt/cisco/vpn/lib/
  3. Restart Anyconnect client and connect to required host. The certificate acceptance prompt should appear now.