Andy’s Blog

Just another weblog

Linux Sol #2: MPlayer AF_INET6 Error

Linux Solution #2

Fixing MPlayer AF_INET6 Error

Due to the success of my previous post about fixing unmount problems I have decided another solution to a common problem is in order.

This information is supplied with ABSOLUTELY NO WARRANTY.

Please be careful when entering commands. Particularly ones you find on the Internet. Remember that anyone can post commands on the web so you should only run something if you know what it does. If in doubt use the manual. This is a good idea anyway as it can help improve your knowledge.

For more information about the commands listed use the Linux manual pages (accessed via the man command)

The Problem

When listening to remote streams using MPlayer an error message is displayed that reads: Couldn't resolve name for AF_INET6: (shown below).

The cause of this error message is simple. There is a protocol called the Internet Protocol (IP) which is used to communicate on the Internet. It has two main versions IPv4 and IPv6. When MPlayer tries to turn a name (such as into an IP address it looks to see if it has an IPv6 address. If it can’t find one it switches to IPv4. However it issues an error message.

The Solution

As many sites do no use IPv6 you can instruct MPlayer not to try IPv6 unless it can’t use IPv4. To do this you can add the following line in MPlayer’s configuration file:

If you only want to make the change for the current user you can use the configuration file ~/.mplayer/config (where ~ is your home directory).

If you want to make this change for all users you can use the global configuration file /etc/mplayer/mplayer.conf or /usr/local/etc/mplayer/mplayer.conf. Which file you use depends on your Linux distribution.

Now MPlayer should not display an error message if it finds an IPv4 address but no IPv6 address.

You may have to close and reopen MPlayer for these changes to take effect.


April 6, 2008 Posted by | Computing, Linux, Software, Ubuntu | 1 Comment

A little knowledge really is a dangerous thing

I made a slight mistake yesterday. I managed to remove myself from the admin group. Which of course means I can no longer run ‘sudo’, which means I can’t put my self back in the group.

What happened was I wanted to add myself to a new group. For this I typed: usermod -G newgroup myuser what I didn’t realise was this replaced my list of groups instead of adding to them. Luckily I typed groups myuser to check what groups I was in. On discovering that I was not in all the groups I should be I used groups to save a copy of all the groups I was supposed to be in (this was my previous groups because I hadn’t logged out).

Unfortunately I could not replace my groups because that would require me to be root and sudo was checking I was an admin (which I no longer was).

Don’t worry though, I rebooted and selected recovery mode and restored the groups I should have had. But it just goes to show a little knowledge can be dangerous. (In hindsight it would have been wiser to have used the “Users and Groups” GUI program. Of course it could have been done using the CLI with adduser myuser newgroup).

Maybe I should create a backup admin account in case I mess something up again?

At least I have learnt something, and isn’t that what matters?

April 4, 2008 Posted by | Uncategorized | 1 Comment