Archive for the ‘ubuntu’ Category

Fix ssh ‘Too many authentication failures’

Friday, June 25th, 2010

If you’re like me, you might have a lot of ssh keys installed and this might prevent you from logging into servers with the following message as a result:

“Too many authentication failures”.

As far as I understood this happens due to SSH trying each key on the client for logging and failing due to hitting the serverMaxAuthTries in the SSH server configuration. I use the following quick fix to work around this, by forcing SSH to use a password instead of a public key:

ssh -o PubkeyAuthentication=no username@hostname.com

I’m pretty sure there has to be a better, more durable solution for this issue, but the above fix allows you to at least gain access to your server again. Btw I use this on Linux (Ubuntu 10.04) with OpenSSH_5.3p1 Debian-3ubuntu4.

Howto: Apple wireless keyboard and Ubuntu

Monday, November 2nd, 2009

This rough howto describes how I succeeded in pairing my Apple Wireless Keyboard (bought late oct 2009, the two batteries type) to my Macbook(2,1) running Ubuntu 9.04 (Jaunty) with the help of the awesome Blueman application. I presume Blueman is already installed (I used the PPA) and working fine.

I did not make any notes, but I’ll try to describe my process as accurate as possible. Oh, before you start make sure the keyboard works and has batteries installed.

  • Switch the wireless keyboard on by using the switch on the side.
  • - Use Search in the Blueman interface to find the keyboard. If it can’t find it try the switch. The keyboard is probably switched off already.
  • If i’m not mistaken the led on the right side on top of the keyboard started to blink after which it appeared in the list of bluetooth devices.

  • – Now you can add the device to your trusted devices and pair it. Without pairing the keyboard might be connected to your system, but it won’t work as an input device.
  • The pairing is the most annoying part.

  • – You need to type a PIN number which you first have to type in on another (wired!) keyboard and afterwards you need to type the same PIN in on the Apple wireless keyboard.
  • You won’t see a thing, but after you have typed the PIN correctly you should get a notice that the device has been paired. You might have to use Blueman setup to make sure the wireless keyboard is used an input device.

ps: I also added this rough howto to the Blueman wiki. Please update that version if you encounter any issues with my howto and know how to fix it. Oh and feel free to leave me a comment to notify me :)

Nerdy way to display a clock

Friday, July 24th, 2009

Clock in terminal

If you want the above clock in your linux terminal then run this command:

watch -t -n1 "date +%T|figlet"

Source: http://podcast.ubuntu-uk.org/2009/07/23/s02e09-the-dimensions-of-time/

Ubuntu sound issue with macbook 2,1 solved!

Tuesday, May 26th, 2009

Thanks to the instructions by boomshop found on the Ubuntu Forums I finally have crystal clear sound on my Macbook:

If always had problems (since 7.04) with some static or distorted sound from the left speaker / left headphone on my book. I found serveral solutions on the internet like:

- options in /etc/modprobe.d/alsa-options: only worked out on 7.10, never in 7.04, 8.04, 8.10 for me
- reloading snd-hda-intel on boot with /etc/rc.local: dind’t work since alsa or pulse is already running at that time

…but reloading the module was a fix I found in several tests with different inits.

So a simple solution for me is reloading the module BEFORE anything else sound relevant is started. I’ve done this through rc-inits:

Code:

echo -e '#!/bin/bash\nrmmod snd-hda-intel\nmodprobe snd-hda-intel' | sudo tee /etc/init.d/soundrestart

This one adds a script to init.d wich is only removing and loading the snd-hda-intel module.

Code:

sudo chmod +x /etc/init.d/soundrestart

This line will make the script executable.

Code:

sudo update-rc.d soundrestart start 10 2 3 4 5 .

And the last one will add it to the different inits at a really early stage (10), before hal (24) pulse (25) or anything else is loaded.

Never had any static, distortion or noise in my left output anymore – neither after boot, nor after reboot, wakeup or something.

Sound and Xmonad on Hardy Heron aka Ubuntu 8.04

Saturday, May 24th, 2008

If you use the window manager xmonad and want to listen to some tunes using herrie make sure the pulseaudio server is running. In my case it wasn’t so after starting up xmonad I typed:

pulseaudio -D

This wil start the pulseaudio server as a daemon and now you should be able to enjoy some musica.

Install swfmill on Ubuntu 7.10

Monday, April 7th, 2008

First download the swfmill package (I used the 0.2.12 package and downloaded the Linux source files) from http://www.swfmill.org. Unpack the files and open a terminal. Navigate to the directory in which the files have been unpacked using the command line. Make sure you have installed the libxml2-dev, libxslt1-dev, libfreetype6-dev, libpng12-dev packages or install them now using Synaptic. Now use the holy trinity of compiling software on *nix:

First:
./configure

Second:
make

Third:
sudo make install

Now swfmill should be properly installed. Check this by typing:

swfmill -h

It should show you the possible options with sfwmill.

ERROR?
If you get an error message such as: ‘ swfmill: error while loading shared libraries: libswft.so.0: cannot
open shared object file: No such file or directory’ then there is probably an issue with swfmill not finding a dynamic library due to the path not being set. According to this message on the swfmill mailinglist you can fix this by running:

sudo /sbin/ldconfig -v

In my case this solved the issue. Questions, remarks? feel free to leave a comment.

Setting up HaXe on Ubuntu 7.10

Monday, April 7th, 2008

I wrote this small guide so other people might benefit from my experiences. Feel free to leave a comment if you have any questions or remarks. First a quick introduction:

haXe is a high-level object-oriented programming language mainly focused on helping programers develop Websites and Web applications. haXe has been designed to be easily portable across several platforms.
source: haxe.org

I downloaded the Linux installer and also the HaXe 1.18 for Linux and Neko VM 1.70 zipped files into one directory. Then started a terminal and navigated to this directory and started the installer:

sudo ./hxinst-linux

This launched the GUI installer, which used my previous downloaded zipped versions of HaXe and Neko instead of downloading them again. Nice! I closed the window after the installer finished and typed in the terminal:

haxe

This resulted in a long list of options possible with haxe. Installation succeeded! Next: install swfmill

Virtualhosts script for Ubuntu

Monday, April 7th, 2008

UPDATE: Patrick just has opened a Google Code repository which makes it easier for us to track changes and bugs, so feel free to download the appropriate script from this location: http://code.google.com/p/virtualhost-sh/downloads/list

I recently changed my Macbook from OS X to running Ubuntu as its main operating system. By doing this I also had to replace some useful utilities which ran fine on OS X, but not on Ubuntu. One of those nice utilities is a script by Patrick Gibson which makes it easy to create VirtualHosts for your local (although you could probably use it for non-local installations as well, I’ve never done so yet) Apache2 installation. I changed this script to be used on Ubuntu. In general this meant, replacing some OS X style of doing things with the Linux or more specifically the Ubuntu way of doing things. It will probably run fine on Debian as well, but I have only tested it on Ubuntu 7.10 Gutsy Gibbon. If you can confirm this script to work on other distributions, feel free to leave a comment. Thanks to Patrick Gibson for an awesome, well-documented script!

Download the script Use the Google Code repository instead

ps: For information about how to install or use the script have a look at comments in the script or check out Patrick’s guide