Linux

Yum remove Enlightenment

Submitted by teknikqa on Fri, 03/18/2011 - 20:14

Here's a one-liner that will save some time. Uses sed, uniq, sort and of course regular expressions.

yum remove `yum search enlightenment | awk '{print $1}' | sed -e 's/.\(x86_64\|i686\|noarch\)//' -e '/^[:=]/d' -e 's/\(Loaded\|font-manager\)//' | uniq | sort`

What does it do?

It uses yum to remove all packages that are related to the Enlightenment Window Manager.

It does this by searching the package lists for the word enlightenment, prints just the first word, filters out unnecessary stuff, lists only the unique ones and finally sorts the result. This resulting list of packages is then passed on to yum to remove.

HOW TO: Full screen Ubuntu in VirtualBox

Submitted by teknikqa on Sat, 06/06/2009 - 00:07

VirtualBox is a great way to test different platforms without actually installing them. It creates a perfect virtual machine to play with. Of course, a dummy virtual machine is of no use, until you install on OS on it.

VirtualBox under Windows

 

To learn more on setting up VirtualBox, check out this great post at Lifehacker.

And if you want pre-compiled VirtualBox images, head over to VirtualBox Images.

This post is about how to get the Guest Additions running for Ubuntu. Why would you want to run the Guest Additions? For one, it provides full-screen ability. Complete screen-size, not the teeny window size that is present by default. There are other goodies too, such as, mouse-pointer integration and improved performance.

The only drawback is the license. These additions are covered under the PUEL license, rather than the GPLv2.

Alright, now how do you get the additions working. I'm using Ubuntu as my guest OS. But, these steps can be easily modified for other Linux OSes too.

  1. Mount your Ubuntu cd/ISO from the VirtualBox GUI.
  2. Mount the VirtualBox Guest Additions by clicking on Device > Install Guest Additions.
  3. Once Ubuntu is up and running, open a terminal and find the kernel version by running uname -r
  4. Run the following command to install pre-requisites. (Replace KERNELVERSION with the output of the above command). sudo apt-get install build-essential linux-headers-KERNELVERSION
  5. Depending on your platform, run the VirtualBoxAdditions installer sudo sh /media/cdrom/VBoxLinuxAdditions-x86.run all (Use VBoxLinuxAdditions-x64.run for 64-bit platforms).
  6. Restart the machine.

Note: For Fedora (or rpms based machines), run the 4th step as

yum install kernel-headers kernel-devel gcc

Source: Robotification [via Ubuntu Forums] & FedoraSolved

Making Java 2 work in Debian

Submitted by teknikqa on Sun, 03/23/2008 - 12:26

Download the j2se SDK from http://java.sun.com. Download the ".bin" file. In a terminal window, run the following commands.

  • Switch to root use by issuing
    $ su -
    Password:
  • cd to the directory where the file was downloaded.
    # cd ~nick/Downloads/
  • Change the permission of the file and execute it.
    # chmod +x j2sdk*.bin # ./j2sdk-*.bin
  • Make a directory under /usr/local (for example /usr/local/sun).
    # mkdir /usr/local/sun
  • Copy the extracted java directory to this newly created directory.
    # mv j2sdk* /usr/local/sun
  • Adjust the configurations to ensure that java works correctly. (This is because Debian/Linux uses different versions of java, that may not be reset when the Sun Java is installed.
    # update-alternatives --install /usr/bin/javac javac /usr/local/sun/j2sdk*/bin/javac 120
    # update-alternatives --install /usr/bin/java java /usr/local/sun/j2sdk*/bin/java 120

You should now have a working jdk environment, virtual machine and compiler.

You might need to change your /etc/profile adding the proper definitions of some environment variables (CLASSPATH, JAVA_COMPILER and JAVA_HOME) so that Java programs can find the kit you just have installed. Append the following lines to your /etc/profile. The following example show which settings you could add if you had installed Sun's 1.4.2 jdk:

JAVA_COMPILER=/usr/local/sun/j2sdk1.4.2_17/lib:/usr/local/sun/j2sdk1.4.2_17/jre/libexport
export JAVA_COMPILER

JAVA_HOME=/usr/local/sun/j2sdk1.4.2_17/
export JAVA_HOME

PATH=$PATH:/usr/local/sun/j2sdk1.4.2_17/bin
export PATH

This should enable it for all users, except root. If you want to compile and run java programs as root, add the above lines to /root/.bash_profile.

Note: This has been tested only in Debian, although it should work in other distro's too.

Subscribe to RSS - Linux