Archive for the ‘Linux/Unix Guides’ Category

Sometimes solution is too easy to see (RealVideo .mvb in Debian)

Sunday, May 10th, 2009

I just got some new video files but instead of divx packed inside .avi they came in .mvb files unknown to me. Trying to view them with xine I was surprised that I did not have a correct codec installed and revealed that the format was RealVideo (RV40).

I was so blinded by the thought that I should have almost any possible commonly known codec installed that I spent several apt-cache searches by looking for something else and completely missing on packet - which I then spotted and was humbled by the fact I had forgotten to install it. The command I needed to get it work was simply:
apt-get install w32codecs So never fool yourself, even though your guru mind should know all the switches and gears to make a steampunk computer tick, you might still miss the most obvious package for whatever problem you bump into :)

Using OpenDNS nameserver on Debian

Tuesday, March 3rd, 2009

There are many reasons why a user might want to use OpenDNS quality dns nameservers instead of service providers dns servers. Maybe the providers nameserver does not work that well, or maybe your country and/or provider is one of those who have set up domain name based internet content filtering that you want to pass - this is the case here in Finland where the claimed use is to prevent access to child porn sites but most of the sites filtered are not of that sort at all, many not even regular porn sites and sometimes there have been really bad mistakes (like w3c site ending on the list).

On opendns.org there is a simple guide on how to set Linux (there is one for Windows too) to use OpenDNS - all you have to do, according to the site, is to edit /etc/resolv.conf and replace IP’s on nameserver lines with ones of OpenDNS. While this works at least on Fedora (and supposedly on most other flawors of Linux), at least with Debian and Ubuntu there is an extra step. This one is for those using cable connection with DHCP:

1st. edit /etc/dhcp3/dhclient.conf and add followind line to end of file:
prepend domain-name-servers 208.67.222.222,208.67.220.220;
…then find the line starting with “request” that lists the information to read ask from DHCP server and remove the option “domain-name-servers“.

2nd. edit /etc/resolv.conf like instructed on opendns.org. Replace the nameserver lines with these:
nameserver 208.67.222.222
nameserver 208.67.220.220

edit: I’m not sure if the second step is needed or even effective on debian.

3rd. Now you could just wait until the information from DHCP gets renewed or to make the changes work instantly you can run:
/etc/init.d/networking restart

Notes: You need to get root access to edit the files and to restart networking.

Installing The Ur-Quan Masters for Debian

Friday, February 27th, 2009
Was: “The Ur-Quan Masters for Debian (problem & solution)”
The Ur-Quan Masters (Star Control 2) title screen.

The Ur-Quan Masters (Star Control 2) title screen.

Edit (Feb 28, 2009 @ 19:45): This post was based on error of mine. Originally I wrote that debian packet ‘uqm’ did not install starter wrapper in $PATH. The game binary is installed at /usr/lib/games/uqm/uqm and the packets for different distributions install a wrapper script to run it when called. So I adviced to create a symbolic link to it at /usr/bin/uqm. This is unnecessary, I was wrong.

However when I contacted the package maintainer to inform him, I was (politely) replied that the game installs the wrapper at /usr/games/uqm (which I missed when investigating package content) and was adviced to check my $PATH.

Apparently debian should have /usr/games set in $PATH but for some reason I had edited my ~/.bashrc line and defined my own $PATH setting instead of adding a directory to already set $PATH variable. What a fool have I been indeed :) The line was mostly correct, only missing the /usr/games from original defitition.

The original post is still all below but I added this note in front to tell people that this game installs flawlessly on debian with:apt-get install uqm uqm-content uqm-music uqm-voices

Super Melee dual with other ship getting in planets gravity pull

Super Melee dual with other ship getting in planets gravity pull

The Ur-Quan Masters is a 100% free implementation of original 3DO console version of Star Control II and there is also aditional optional speech package, package with original 3DO music and tree add-on remix packs for download. I ran into a problem not finding the game executable when I had installed The Ur-Quan Masters (on my Debian Etch stable/Lenny), a fantatic game I had come upon years ago originally. “…far journey, a space odyssey encompassing the realms of science-fiction and role-playing.“. It had both, fantastic single player adventure and a 2 player dualing game that really got me addicted before even trying the single player. (more…)

to restart the ssh server on a fedora

Thursday, February 19th, 2009

Someone had googled the text in title of this article on google and end up on my site.

To restart sshd on Fedora just run (as root on console): /etc/init.d/sshd restart

I hope that clears things up.

Protect your ssh-servers, ban offending hosts

Saturday, January 10th, 2009

Perhaps you, like many *nix users, like to remotely connect to your desktop and/or servers and thus are propably running an ssh-server. If so and you have ever checked logs for failed attempts to log in then you know that attempts to login with random usernames and passwords are made constantly. And finally, if you are like me, you are constantly worried that your username and the password, even though naturally a hard one to come up with, might one day be entered by person - or rather a brute force password cracking script - and thus your system getting compromized. There is a simple tool to deny hosts from connecting the ssh-server (couple tools even, but here is one) after failing defined number of times - and if configured to, the program will send email report of new denied hosts and suspicious connection attempts. denyhosts is the program I use for this, and here is how to set up it:

(more…)