Category Archives: Debian

Debian GNU/Linux

Edx on Debian Stretch

After you clone the Edx repo there you will find a (undocumented) list of packages required to install on Ubuntu:

requirements/system/ubuntu/apt-packages.txt

These packages and others are required for Debian Stretch.  First, install these packages:

sudo apt-get install $(grep -vE "^\s*#" requirements/system/ubuntu/apt-packages.txt   | tr "\n" " ")

And then install these packages:

sudo apt-get install python-scipy python-numpy build-essential python-dev gfortran libfreetype6-dev libjpeg-dev libtiff5-dev zlib1g-dev libpng-dev  libxml2-dev libxslt-dev yui-compressor graphviz libgraphviz-dev graphviz-dev mysql-server libmysqlclient-dev libgeos-dev libreadline7 libreadline7-dev mongodb nodejs mysql-client virtualenvwrapper libgeos-ruby1.8 lynx-cur libxmlsec1-dev swig  libsqlclient-dev libxmlsec1

Like the photo? See a bigger version on Flickr.

Install Oracle SQL Developer on Ubuntu Karmic & Lucid

If you want to install Oracle’s SQL Developer on Ubuntu (or another DEB based system such as Debian) you can do one of the following:

  1. Download the RPM package and install using rpm (not advisable).
  2. Download the RPM package and convert to a DEB package using alien
  3. Download the ZIP file titled “Oracle SQL Developer for other platforms” and manually install
  4. Use the make-sqldeveloper-package to convert the ZIP file into a DEB package

I used the make-sqldeveloper-package, which is available for Debian and Ubuntu and it’s derivatives. However, the man page and the instructions are little unclear on how to use it. You need to download the zip file available at Oracle’s (and not the RPM file nor any of the other packages) and then use the make-sqldeveloper-package to convert it to a DEB which you can then install using the dpkg command.

This is preferable to using rpm or alien as you can more easily manage the package using Debian’s and Ubuntu package management tools, plus it will integrate SQL Developer into Gnome’s Menu System . Plus, when Oracle updates their version you can use make-sqldeveloper-package to create an updated DEB package and easily update the version you have installed. The procedure outlined below works on Ubuntu Karmic and should also work on any Debian version that has the make-sqldeveloper-package.

As the man page states:

This utility will require you to download the “Oracle  SQL  Developer  for  other  platforms”  archive  from  <http://otn.oracle.com/software/prod‐ucts/sql/> to create the Debian package from.

1. Download the ZIP file from Oracle’s site

You will need to accept Oracle’s license agreement and download the ZIP file, titled “Oracle SQL Developer for other platforms”, from:

http://www.oracle.com/technology/software/products/sql/index.html

2. Install the make-sqldeveloper-package package

sudo apt-get install sqldeveloper-package

You will need Ubuntu’s multiverse software repository. See the instructions on how to do so.

2.a. Install the tofrodos package

sudo apt-get install tofrodos

Create symbolic links to the tofrodos commands to allow the sqldeveloper-package to work:

sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix
sudo ln -s /usr/bin/todos /usr/bin/unix2dos

Thanks to Miles for the tofrodos tip.

3. Convert the ZIP file to .DEB package

The format of the command is:

make-sqldeveloper-package -b BUILD_LOCATION LOCATION_OF_ZIP_FILE

In my example, I’m going to use /tmp/ORA as the build location and the ZIP file has been download to my Desktop (~Desktop).

make-sqldeveloper-package -b /tmp/ORA/ ~/Desktop/sqldeveloper-2.1.0.63.73-no-jre.zip

The command will create the build directory and remove it when the command finishes. If the command completes successfully you’ll see the following output after a minute or two:

make-sqldeveloper-package: Building sqldeveloper package in "/tmp".

The DEB file will be created in the current directory. In my example I had changed directories to /tmp and that’s where the DEB file will be:

/tmp/sqldeveloper_2.1.0.63.73+0.2.3-1_all.deb

See the man page for more information about the tool:

man make-sqldeveloper-package

4. Install the package

sudo dpkg -i sqldeveloper_2.1.0.63.73+0.2.3-1_all.deb

5. Run SQL Developer

After installing there should he an entry in Gnome’s menu to start the SQL Developer. It’s located under:

Applications->Programming->SQL Developer

Note: You will need a JVM installed for the tool to run.

Obligatory Screen Shot:

Oracle SQL Developer

Updated September 27th 2010. Added instructions from Miles on installing dos2unix alternative for Ubuntu Lucid. The dos2unix command is not available in Ubuntu Lucid.

Killing X

On Ubuntu it used to be that ctrl-alt-backspace would kill X (the backend of the various graphical user interfaces on Linux). In an aim to be user friendly this is now disabled by default. This can be a real pain if X locks up, you can’t kill it nor change to a console.

On Debian and Ubuntu you can install the dontzap command which will allow you to kill X:

sudo apt-get install dontzap

Then run dontzap:

sudo dontzap -d

Or you can the following section to your /etc/X11/xorg.conf file (which is what the dontxzap command does):

Section "ServerFlags"
        Option  "DontZap"       "False"
EndSection

See Alberto Milone’s blog for more info:
http://albertomilone.com/wordpress/?p=335

Stuff I’ve read or reading …

Some links to stuff I’ve either read or plan to read which I think is interesting:

Python is not Java, tips for Java programmers starting w/ Python:
http://dirtsimple.org/2004/12/python-is-not-java.html
Python for Bioinformatics:
http://www.pasteur.fr/recherche/unites/sis/formation/python/index.html
BioPython:
http://biopython.org/DIST/docs/tutorial/Tutorial.html

I need to know Selenium better, it’s possible that I might consider using it for a project I might be working on (that sounds like it might have some UI bugs/issues/problems):
http://seleniumhq.org/

10 things every programmer should read (this will take a while to wade through):
http://blog.objectmentor.com/articles/2009/02/26/10-papers-every-programmer-should-read-at-least-twice

Xen Cluster Mgt using Ganeti for Debian Lenny:
http://www.howtoforge.com/xen-cluster-management-with-ganeti-on-debian-lenny
Ganeti admin guide and install guide:
http://ganeti-doc.googlecode.com/svn/ganeti-1.2/admin.html
http://ganeti-doc.googlecode.com/svn/ganeti-1.2/install.html

David Byrne (of Talking Heads) interviews Thom Yorke (of Radiohead):
http://www.wired.com/entertainment/music/magazine/16-01/ff_yorke?currentPage=all

With a great quote, that shows how well the record companies treat their performing artists (that’s sarcasm in case you don’t have a sense of humour). First Radiohead made zip/zilch/nada from EMI sales of digitized versions of their music:

Yorke: In terms of digital income, we’ve made more money out of this record than out of all the other Radiohead albums put together, forever — in terms of anything on the Net. And that’s nuts. It’s partly due to the fact that EMI wasn’t giving us any money for digital sales. All the contracts signed in a certain era have none of that stuff …

Yorke: … It’s about whether the music affects you or not. And why would you worry about an artist or a company going after people copying their music if the music itself is not valued?

Then he talks about how the music iteself isn’t valued, but the business processes surrounding the marketing and selling of music:

Byrne: You’re valuing the delivery system as opposed to the relationship and the emotional thing…

Yorke: You’re valuing the company or the interest of the artists rather than the music itself. I don’t know. We’ve always been quite naive. We don’t have any alternative to doing this. It’s the only obvious thing to do.

Hi Lenny

Debian GNU/Linux 5.0, codenamed Lenny, was recently released. Here’s a round of of articles about the release and why you might want to consider Debian for your infrastructure.

Techworld sums up what this means for companies and highlights new features and security enhancements:

http://www.techworld.com/news/index.cfm?RSS&NewsID=110898

Debian 5.0, known as Lenny, will offer users improved security handling. For example, as an added protection measure, Debian Installer will now apply any security updates before the first boot.
In addition, several security-critical packages have been built with GCC hardening features, and the standard system contains fewer setuid root binaries and fewer open ports. Other new features include support for IPv6, NFS 4, PostgreSQL 8.3.5, MySQL 5.1.30 and 5.0.51a, Samba 3.2.5, PHP 5.2.6, Asterisk 1.4.21.2, Nagios 3.06 and the Xen Hypervisor 3.2.1.

Debian was proving to be particularly attractive, claiming that Debian was now the Linux distribution with the lowest total cost of ownership.

And Russell Coker mentions that Debian has full Xen support, which will make Xen users happy!

http://etbe.coker.com.au/2009/02/16/xen-and-lenny/

One of the features that is particularly noteworthy is that Xen has been updated and now works fully and correctly on the 2.6.26 kern

Sami Haatinen suggests that administrators utilize the apt-listchanges command:

http://ressukka.net/blog/posts/20090215_apt-listchanges/

It lists changes made to packages since the currently installed version. Sure that information will be overwhelming on major upgrades, but what is useful even on major upgrades is the capability to parse News files in the same way.

Debian 5.0 release notes are available at:

http://debian.org/releases/stable/i386/release-notes/

Me? I’m being running a mixture of Debian Stable, Testing, Sid, and Experimental on my Desktop and it runs stable 99% of time. A configuration like that isn’t recommended, as serious breakage can occur. But, this rarely happens, and I’ve Debian enough to know when not to let the package manager remove important packages! On my laptop, a Lenovo T400, I run Ubuntu Linux, see here for why.

Why use Lenny as a codename? All versions of Debian have been named after characters from the film Toy Story. The unstable version is codenamed Sid, and Sid will never be released as Sid breaks things. For a list of the previous names used see Section 6.2 here:

http://www.debian.org/doc/FAQ/ch-ftparchives

Lenny is named after a pair of wind-up binoculars.

Enable mod_perl on Debian, Ubuntu, & Other Linuxes.

To enable mod_perl with Apache2 on Debian & Ubuntu for all directories served up by Apache2, including user directories such as ~/public_html, add the following lines to /etc/apache2/sites-available/default

# enable mod_perl
    <Files ~ ".(pl|cgi)$">
           SetHandler perl-script
           PerlResponseHandler ModPerl::Registry
           Options +ExecCGI
           PerlSendHeader On
    </Files>

In a real production environment you probably don’t want to enable this for all directories that Apache2 serves up, but only from those directories you expect to run perl in.

Thanks to this thread on the Ubuntu Forums for the info.

Titled updated as per Ozkar’s suggestion.

Adobe Flash Sound not working with Iceweasel on Debian?

After upgrading to Flash 10 sound stopped working. Installing the flashplugin-nonfree-extrasound package solved that problem for me:

aptitude install flashplugin-nonfree-extrasound

If your using pulse audio, install the flashplugin-nonfree-pulse package. It doesn’t look like the Debian flash plug-in suggests either package:

apt-cache show flashplugin-nonfree|more
Package: flashplugin-nonfree
Priority: optional
Section: contrib/web

Suggests: iceweasel, konqueror-nsplugins, x-ttcidfont-conf, msttcorefonts, ttf-dejavu, ttf-xfree86-nonfree, xfs (>= 1:1.0.1-5)

Netbeans 6.5 on Debian

Doesn’t perform badly, I’ve been using it recently with Ruby code, and I like how it colourises the code to make editing code easier, and performs it auto-completion and method lookup (basically all the features you’d expect with a modern IDE).

It’s does’t startup as fast as using Emacs, or vi, but I find the features very handy and very convenient. It doesn’t look  bad either. It runs better on my PC at home running Debian Linux than it does on my PC at work running WinXP. This is probably because I’m using a 1.5 JVM on WinXP and a 1.6 JVM on Debian. Running on 1.6 JVM’s means that Netbeans will automatically use anti-aliased fonts if you have anti-aliased fonts enabled (much easier on the eyes if your using a LCD screen).

KDE4 and Debian

I figured it’s time for me to try and install kde4 again! Previously I had to remove KDE4 due to package conflicts. There are installation instructions at:

http://pkg-kde.alioth.debian.org/experimental.html

So following the instructions there on what changes to make to your sources.list, and then run:

aptitude update

I’ve had some dependency issues, and installing the kde4 package (a meta-package that will install all of KDE4) would not install due to dependency issues with the kdegraphics package. The way around this is to install the kde4-minimal package and whichever of the other packages you want. So I installed everything, minus the kdegraphics package via the following:

aptitude install -t experimental kde4-minimal kdeplasma-addons kdegames kdemultimedia kdenetwork kdepim kdeutils kdeedu kdeadmin kdeartwork kdetoy

Be prepared for a lot of packages to be installed, for others to be removed, and to possibly break your existing kde3 installation (if you have one). See the first comment to see what I had to install and remove.

Firstly, KDE4 does not import any of your KDE3 settings, which is pretty annoying, as all of the applications start with the default settings, and is really annoying with applications like kmail … however some has created a tool to import the settings:

http://silentcoder.co.za/silentcoder/?page_id=330

My only complaint about the tool, is that it requires root to install it. I’d also like the option to be able to run the tool without first having to install it. Anyways, it seems to work pretty well and imported all of my mail into kmail, the only thing it didn’t do was import account settings into kmail.

This post is a work in progress, I’ll update it over the next day or so with any further instructions as I install, configure, and test KDE4.