r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.
  • rss
  • Home
  • About
  • Email

How-To: Install the Official Sun JDK in Ubuntu 10.04

r3dux | June 26, 2010

The default java solution for Ubuntu 10.04 is the OpenJDK virtual machine and the IcedTea plugin for firefox – but I’ve been having serious issues with it locking up, taking up 100% CPU and other such craziness – so I’ve switched over to the (proprietary) official Sun JDK, and things are working much better. Here’s how I did it, and how you can too…

1.) Add the Lucid Partner repository to your Sources list

We’re going to be installing the Sun JDK through the repos, and it just so happens that we need the partner repo enabled, so you can either add the following line to your /etc/apt/sources.list, or you can check the box in System | Administration | Software Sources (assuming you’re using Gnome – pick whatever source managing front-end KDE uses if that’s your poison):

deb http://archive.canonical.com/ lucid partner

or..

Sun JDK Add Repo

2.) Install the Sun JDK and Plugin

Before you install the good stuff, it’s an idea to check your current version so you can see the changeover’s worked. To do this, just run java -version from bash and you should see something like this:

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

Once you know what you’ve currently got, again from the shell, enter the following to install the official Sun JDK (don’t worry about multiple JDKs being installed – we deal with that later):

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

During this process you’ll have to agree to the license agreement – just hit Tab to switch focus in the text window onto the Yes button (assuming you do agree), and hit Enter to accept.

3.) Remove the old OpenJDK stuff

In Synaptic, you want to fully remove the following packages:

default-jdk
default-jre 
default-jre-headless
icedtea-6-jre-cacao
icedtea6-plugin
openjdk-6-jdk
openjdk-6-jre
openjdk-6-jre-headless
openjdk-6-jre-lib

If you do this before installing the Sun JDK, all packages depending on Java will be removed as well – so in this rare instance, later is better, and any packages depending on Java can now stay on the system.

4.) Check it all works

From the command line enter: java -version and you should see the new details:

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

If you want the new plug-in to take effect in Firefox or such you need to restart the browser, then you should be all good to go! Maybe test it out at sodaplay for kicks too :)

Cheers!

Comments
No Comments »
Categories
How-To, Linux
Tags
10.04, HotSpot, IcedTea, JDK, OpenJDK, Sun, Ubuntu

Comments rss Comments rss
Trackback Trackback

How To: Speed Up Linux by Minimising Swapiness

r3dux | June 10, 2010

Swappiness is a setting in the Linux kernel which controls how amenable to paging things in memory out to disk the kernel is (like using virtual memory in Windows), and in Ubuntu it comes with a default value of 60 – which for a box with lots of memory is too high in my humble opinion. The range of values goes from 0 (never use the swap file unless absolutely critical) to 100 (page stuff out to file whenever it feels like).

You can easily check your current swappiness value like this:

cat /proc/sys/vm/swappiness

And you can change the swappiness of the system on the fly (but it’ll go back to the value in the sysctl.conf file after a reboot) like this:

sudo sysctl vm.swappiness=10

My laptop has 4GB of RAM, and even with a bunch free, Linux decides to swap stuff out to file quite often with a swappiness setting of 60, which can slow the box to a crawl. To fix this, and permanently insist that all physical RAM is used up before starting any paging at all,, simply change the setting to something like 10 like this:

gksudo gedit /etc/sysctl.conf

Then, when the file is open, either add the line vm.swappiness=10 to the bottom of the file, or if it already exists just modify the value, then reboot.

To find out more about the whole swappiness thing, try this article.

Comments
No Comments »
Categories
How-To, Linux
Tags
Memory, Paging, RAM, Swap, Swappiness, Virtual

Comments rss Comments rss
Trackback Trackback

How-To: Build a Working Version of Handbrake for Ubuntu 10.04

r3dux | May 16, 2010

The currently available pre-packaged version of Handbrake (the Video/DVD transcoder/ripper) at the time of writing is 0.9.4 (actual filename for the 64-bit version: HandBrake-0.9.4-Ubuntu_GUI_x86_64.deb) – and it’s about as much use as a chocolate teapot on Ubuntu 10.04… You simply can’t endcode/transcode with it because it’s broken, with the Add to Queue and Start buttons permanently greyed out because the functionality behind them is mashed.

So let’s build a fresh version that works!

Step 1.) Get the Necessary Libraries

A quick trip to the command line will get everything you need (where everything you already have in this list is simply ignored):

sudo apt-get install subversion yasm build-essential autoconf libtool zlib1g-dev libbz2-dev intltool libglib2.0-dev libdbus-glib-1-dev libgtk2.0-dev libgudev-1.0-dev libwebkit-dev libnotify-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

Step 2.) Get the Source Code

Create a folder for it, move to it, then grab the latest source code via subversion like this:

mkdir handbrake
cd handbrake
svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk

Step 3.) Build It!

Once we’re in the right place, this configure line with the given switch will configure and make Handbrake in one fell swoop:

cd hb-trunk
./configure --launch

Step 4.) Test It!

After a successful build, you’ll see the executable HandBrake-CLI in the build folder – but you’re probably after the GUI version, which is tucked away in build/gtk/src and called ghb – just go to the right folder, launch it and give it a try out – should be absolutely mint.

There are a stack of different options for the encoding process which can slow down the encode/transcode process and increase the quality – I went with these final settings to get high encoding quality without the encode process taking all week:

ref=2:bframes=2:subme=6:trellis=2:b-pyramid=1:b-adapt=2:direct=auto:no-fast-pskip=1
HandBrake - Working

HandBrake - Now Working! Woo-Hoo!

Cheers!

Comments
4 Comments »
Categories
How-To, Linux
Tags
10.04, build, DVD, Encode, HandBrake, Source, Subversion, SVN, Transcode, Ubuntu

Comments rss Comments rss
Trackback Trackback

How-To: Transform Your Stock Ubuntu 10.04 Install into a Fully Operational Battle Station Operating System

r3dux | May 13, 2010

I used to upgrade my Ubuntu distros after each release cycle, but it was never a very pleasant experience… There’d always be mismatched packages and configs, legacy cruft left lying around filling up my root partition, and all sorts of mismatch woes – so I ditched that for separate partitions for my root folder and home folders, and now wipe the root folder with the newest release as and when it’s out.

Because I’ve done this a couple of times over the last few years, I feel I’m getting pretty good at getting the machine up & running with everything I need at a pretty fast pace: maybe a day for all the core stuff, another to tweak the vast majority of everything so I have it as I want, and then just bits and pieces as they come up. This time, I thought I’d make a list of all the things I install (yes, I know you can automatically generate a list of installed packages) – because I also wanted to note why I install ‘em, you know, what are they good for, so the next time I install a fresh system I can just grab it all even quicker.

Now, a stock/standard Ubuntu distro is a pretty good thing – but it doesn’t come with everything you need, so with that in mind, I’d like to present a list of things that I think you also need, and that once you have in place you’ll be able to do most anything you need with your system with just a few clicks. Before you do any of this, it’s a good idea to open up System | Administration | Software Sources and enable the restricted, universe and multiverse repositories as shown below:

Ubuntu Software Sources

With that done, here’s the list of things you’ll likely want to have installed in no particular-order, and only roughly sectioned off into classes (system, sound & media, social networking etc.):

Freely Available In The Ubuntu Repositories
Package Name Why Install It?
System / Developer / Essential
ubuntu-restricted-extras Meta-suite of proprietary software including the Flash plugin, DVD decoding libraries etc.
build-essentials Tools to compile your own/open-source projects
eclipse Multi-Language IDE – coding is good.
codeblocks Another multi-language IDE, I’ve not used it too much as yet, but I hear good things about it…
subversion Version control tool. Useful to checkout code trunks and compile open-source projects yourself
scons Python-based build system – req’d to compile SCons-based projects (More info: http://www.scons.org/wiki/FrequentlyAskedQuestions)
guake Quake-style terminal access for gnome. Awesome stuff. Change the keybindings for copy and paste to Ctrl+C and Ctrl+V for usabilities sake.
nautilus-open-terminal Nautilus script that adds functionality to allow you to right-click on a folder and open a terminal at that point, saves you cd-ing all the way into long paths.
php5 It’s PHP. Version 5. Drags in apache2 with it.
deskbar Search applet for the panel – finds your programs in the menu, amongst a hundred other things. I really couldn’t live without this.
Utility / Office / Comms
thunderbird Thunderbird 3, my email client o’ choice. I’d written a guide for installing it in Ubuntu 9.10, but it’s in the repos in 10.04, so that’s now obsolete…
p7zip-full 7zip archiver. Better compression than zip and a completely open format.
pidgin Multi-chat-format-client (MSN, AOL, YahooMessenger etc.) I don’t like the packed-in empathy client too much…
pidgin-plugin-pack Additional plugins for pidgin.
xchat IRC (Internet Relay Chat) client
Audio / Video
audacity Very good audio editor
ripperx Decent audio CD ripper, use with LAME. Also, it’s the only ripper I’ve found that doesn’t randomly fall over if it doesn’t like a CD…

Warning: The current version (v2.7.2) has two bugs which are kinda scuppering it: it doesn’t add ID3 tags to tracks ripped beyond track 10, and it crashes at the end of each disc rip =/ It might be better to use something else for the time being, but I really don’t like SoundJuicer or anything, so I just run MusicBrainz Picard (package name: picard) on any folder of MP3s ripped from a disc to fix up the tags after ripping.

lame The best mp3 codec to rip audio with. Use high quality VBR and the results are superb.
soundconverter Easily convert audio files between formats.
pautils PulseAudio utils, stream choosers, volume controls etc.
gpodder Really good podcast client for gnome: subscribe to Linux Outlaws, This Week in Tech (TWiT) etc..
mplayer Useful to get data to transcode .avi files to to DVDs (see this article if you’re interested).
ccsm Compiz config settings manager – lets you tweak your compiz effects in countless ways…
compiz-fusion-plugins-extra Additional effects for compiz
fusionicon A system tray icon for accessing compiz related settings and switching/reloading window managers. Best to set it to autorun on boot through System | Preferences | Startup Applications.
python-sexy Library used by compiz to extend Gtk widget functionality (read more: http://www.chipx86.com/w/index.php/Libsexy)
gnome-colors Additional icon themes – more choice is never a bad thing.
screenlets Widget system for the gnome desktop. Grab some more screenlets from here if you like (the NVidia and FuriousMoon screenlets are useful/pretty respectively).
gimp The GNU Image Manipulation Program, which isn’t included on the CD for the first time this release..
gimp-plugin-registry Useful GIMP plugins, including “Save for Web…”, which is a daily-use tool for me…
cheese Mess around w/ your webcam
camera-monitor A panel applet which indicates when your webcam is switched on – so you’ll know if anybody else is messing around with your webcam!
blender 3D modelling package. I WILL learn how to use it this year, fo’ real!
povray An old-school but excellent ray-tracer (creates images by back-tracing light rays from geometry), always good for a mess around. Get povray-examples and povray-docs while you’re at it.
cbrpager A simple comic viewer for gnome
Administration / Files / Network
gadmin A suit of GUIs to administrate things on your system (proftpd, apache, squid etc.)
proftpd FTP server, requires a fair bit of configuration, but I’ve written pretty solid article on it here if you’re interested in hosting files on your own FTP server..
filezilla An excellent FTP client to connect to FTP servers.
sabnzbdplus A really good news group client – download stuff with far more peace of mind than using torrents. I’ve also written a guide for downloading stuff from newsgroups which you can find here if you’re that way inclined…
pypar2 Tool to repair broken/corrupted/incomplete rar files using PAR(ity) files. Use with sabnazbdplus as and when needed.
transmission An excellent bit-torrent client. Don’t forget to: Enable the block list & update it, change encryption settings from “preferred” to “required”, and disable DHT peer exchange (here’s why: http://forums.phoenixlabs.org/showthread.php?t=15324)
dosbox A legacy PC emulator – run old DOS software if you need to. I use it to fire up ScreamTracker 3 occasionally.

There’s a few other things you might want which aren’t in the standard Ubuntu respositories, too. Such as:

Not Available In The Ubuntu Repositories
Application Name Why Install It? Get From
webmin Tool to administrate your system through a web interface either locally or over the web. Either restrict administration to be from the local network or make your passwords strong if you allow external access from teh Internets! http://www.webmin.com/
google-earth Gaze longingly at home, and the pyramids, and other neat stuff on this blue/green sphere. http://earth.google.com/
google-picassa Nice image organiser/basic photo adjustment tool. Can categorise images by faces (poorly) too! [I had to install this from the commandline for some reason. Used: sudo gdebi ./picassa-3_0-blah-blah.deb to install] http://picasa.google.com/linux/
virtualbox Virtualisation software so you can run stuff like XP/Vista/Windows 7 from virtually from within Linux. Get this from Sun rather than the OSE (Open Source Edition) in the repositories if you want USB support. http://www.virtualbox.org/wiki/Downloads
handbrake Simple and yet powerful DVD ripper/video transcoder with a decent GUI. If you’re ripping a DVD just point it at the top level directory of the DVD and hit Open for it to pull in all the .vob files for you.

Update: Don’t bother installing version 0.9.4 on Ubuntu 10.04 – it’s broken. Build yourself a working version from the freshest source using this guide!

http://handbrake.fr/
nautilus elementary Nice transparency effects for Nautilus http://www.webupd8.org/2010/04/install-nautilus-elementary-230-via-ppa.html
ubuntu tweak Tweak ubuntu like a mother-b http://ubuntu-tweak.com/

You might not need some of that stuff, but for me it turns a good basic install into the real deal that does everything I need. And I absolutely love it :D

Comments
2 Comments »
Categories
How-To, Linux
Tags
10.04, Add-ons, install, Plug-ins, repository, Synaptic, Tweak, Ubuntu

Comments rss Comments rss
Trackback Trackback

How-To: Fix Missing Bots in ioquake3 in Linux

r3dux | May 3, 2010

I don’t do a lot of PC gaming these days, preferring more to just sling a disc in the 360 or PS3 to get my jollies without all the patch/driver hassle, but you’ve got to have a couple of linux games installed to vent the occasional blood-lust. With that in mind, I grabbed the latest version of ioquake3 earlier, and tried out a single player game, but no bots would join the match, and a look at the shell showed errors along the line of:

^1Error: file bots/default_c.c, line 2: file charsh” not found
^3Warning: couldn’t find skill 1 in bots/default_c.c
^1Error: file bots/default_c.c, line 2: file charsh” not found
^1Error: file bots/default_c.c, line 2: file charsh” not found
^1Error: file bots/default_c.c, line 2: file charsh” not found
^3Warning: couldn’t load any skill from bots/default_c.c
^1Error: file bots/kyonshi_c.c, line 2: file charsh” not found
^3Warning: couldn’t find skill 1 in bots/kyonshi_c.c

Apparently it’s only been an issue with the 64-bit version – but even the older version I had was showing the same problem (which I don’t quite get how) – anyways, I recompiled ioquake3 and it’s all fixed up – and thought that if anyone else was up against the same issue it might be useful to know how to fix it quickly and easily.

1.) Get the source

For this we need to have subversion installed to download the source trunk, if you do – great!, if not, run this first:

sudo apt-get install subversion

With subversion in place, from the command line create a folder with mkdir ioqcode or the like, go into it with cd ioqcode and then grab the source with:

svn co svn://svn.icculus.org/quake3/trunk ioquake3

2.) Build it

Go into the downloaded trunk code with cd ioquake3 and then build that bad-boy with this complex command:

make

Geez, linux is tech ;) To be fair, you’ll need the sdl-dev packages installed (libsdl1.2-dev) and of course build-essential – I didn’t have to get any extra packages, it just built.

3.) Pick a place to stick it

Because I’m the only user of my laptop, I have a folder called Games in my home directory, so I just created ~/Games/ioquake3 and then copied all the files from the build/release-linux-x86_64 sub-folder (created when you successfully built ioquake using that complex make command – your folder won’t have _64 on the end if you built it on a 32-bit system) to ~/Games/ioquake3/, and then copied the pak0 to pak8.pk3 files from my original Windows install of Quake III into the baseq3 subfolder of the ioquake3 folder.

4.) Frag on!

Launch ioquake3.x86_64 and get your game on =D

YouTube Preview Image

I have absolutely no idea how they’ve got motion blur on the game (unless it’s applied post-game to the captured footage) – but it looks AWESOME! Want! If you know how they did it please feel free to smack me with the clue-stick in the comments! Cheers! =D

Update: It turns out they’re using the Excessive Plus mod in the video (which works fine with ioquake), still no clue about the motion blur though…

Another Update: Turns out this issue exists in the 64-bit version of OpenArena as well as ioquake3. I rebuilt openarena using the 0.81 version from the svn here – but still no dice with getting bots to spawn. Apparently the 32-bit version of OpenArena is unaffected.

Comments
3 Comments »
Categories
Gaming, How-To, Linux
Tags
Bots, Compile, IOQuake3, Problem, quake, quake 3 arena, quake III arena

Comments rss Comments rss
Trackback Trackback

« Previous Entries

Translate

Categories

Archives

  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009

Post Calendar

July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  

Tags

10.04 360 ActionScript ActionScript 3.0 Adobe Ballarat Bash Compiz Controller CS4 CUFDIG302A Effect Film Fire Flash Gaming Hack How-To install Jaunty Josh Joplin Group Linkage Linux Little Big Planet Motion mount Music NAS Particle photography Photoshop Problem PS3 r3dux.org Retro Slides Softmod Sound Systems Ubuntu Video VirtualBox Wii Windows XBox

Linkage

  • 9GAG
  • A Day in the Life of Jim
  • Truxnor.net

Gamercard

Prepare for Awesome

Misc.

Creative Commons License

stopsoftwarepatents.eu petition banner

“I don’t care if it works on your machine! We are not shipping your machine!”

 - Ovidiu Platon

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox