Entries in the Category “GNU/Linux”

Generating SSL Cert for Apache

This is mostly just a note to myself, because I have to look it up every time I need to generate one, and the make-ssl-cert script that comes with debian doesn't appear to work.

openssl req -new -x509 -days 365 -nodes -out /tmp/cert.pem -keyout /tmp/cert.pem

Converting midi2wav using fluidsynth

Converting midi to wav using fluidsynth is not entirely trivial. Here is how I do it:

# convert opensolo.mid to fluidsynth.raw using the soundfont /usr/share/sounds/sf2/FluidR3_GM.sf2 
fluidsynth -l -i -a file -z 2048 /usr/share/sounds/sf2/FluidR3_GM.sf2 opensolo.mid
# convert fluidsynth.raw to fluidsynth.wav using sox
sox -b 16 -c 2 -s -r 44100 fluidsynth.raw fluidsynth.wav

You can use this together with the midi export of tuxguitar to export tuxguitar and guitarpro files to wav files.

m-audio Axiom 61 on Linux (Ubuntu 9.10)

I bought myself a M-Audio Axiom 61 to play around with. It works nicely on Linux, plug & play, literally. I tried it with the demo version of Pianoteq and Fluidsynth. Both worked perfectly on the first try. I'm happy so far.

Trick 37: Sniffing http traffic with tcpdump

Sniffing http traffic can be quite useful to find out what's going wrong on a webserver. Here is a simple way to do it using tcpdump:
tcpdump -X tcp port 80

Installing the nvidia opencl driver on ubuntu 9.10

Yesterday, I messed up my system by trying to install a NVIDIA beta driver in order to use opencl. Today I tried again with more success. Here is how I did it:

  1. Download the driver from the NVIDIA website
  2. Open the hardware driver manager of Ubuntu (Sytem/Administration/Hardware Drivers)
  3. Select the NVIDIA accelerated graphics driver (the active one) and click remove
  4. Log out
  5. Press CTRL+ALT+F1 to get to the console
  6. Login with your username and password
  7. sudo stop gdm
  8. chmod +x ./nvdrivers_*.run
  9. sudo ./nvdrivers_*.run
  10. sudo init 6
  11. Enjoy OpenCL goodness

A WORD OF WARNING don't try this unless you understand all the steps involved and know how to recover your system in case something goes wrong!

Stay tuned for some nice opencl experiment.

Getting audio to work on a HP Pavilion dv5 / Ubuntu 9.10

It looks like the problem is still there in Ubuntu 9.10, and it looks like the old fix still works. But it looks gorgeous.

How to disable pulseaudio on ubuntu 9.04

PLEASE DO NOT FOLLOW THE INSTRUCTIONS IN THIS POST UNLESS YOU KNOW WHAT YOU ARE DOING.

Pulse audio seems to be a constant source of trouble for me while providing no benefits at all (at least not any noticeable ones). So here's how to get rid of it:

Open /etc/X11/Xsession.d/70pulseaudio in a text editor and comment out everything (put a # in front of every line) and then save it.

This will prevent pulse audio from being started when you log in.

Getting audio to work on a HP Pavilion dv5 / Ubuntu 9.04

I bought myself a new HP Pavilion dv5 notebook because my old Lenovo broke. It's a bit too shiny for my taste but anyway. Installing the new Ubuntu was a breeze. After installing I noticed that audio playback using the speakers didn't work. Too bad. So here's the solution that worked for me.

Open /etc/modprobe.d/alsa-base.conf and add the following lines at the end of the file:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=dell-m4-1
options snd-hda-intel enable_msi=1

Reboot and everything should work again (or just reload the snd-hda-intel with the new parameters).

I hope that helps,
Jonas

Playitslowly 1.2 released

I finally found time to update playitslowly and make a new release.

Changes

  • Compatibility with python 2.6
  • New keyboard shortcuts
  • Back button
  • Improved setup routine
  • Added file command line argument

Compatibility with python 2.6 means that this release should work with Ubuntu 9.04 etc.

screenshot

Get it Now

Forwarding ports using netcat

You can fordward ports from userspace using netcat like this:

nc -l -p $localport -c "nc $remotehost $remoteport"

Example:

nc -l -p 8888 -c "nc example.com 8888"

Caution: This starts a new process for ever connect to the port.