0

How to configure Unity workspace layout in Ubuntu 12.10 (Quantal)

Why would I need to change the layout ?

Every time I upgrade the desktop for a new Ubuntu version it defaults it to a 2×2 layout.

I don’t have a monitor on top of another so why would I use vertical workspaces? It maybe has advantages for some else workflow. Not mine. I’m used to horizontal multi screens.

update: I’ve just updated to 13.04 (Raring Ringtail) and at last it didn’t change the layout! It remained 3×1!

update: It’s ok with 14.04 (Trusty Tahr) !

How can I define a new workspace layout ?

You can change several parameters with the Compiz Config Settings Manager. I found that some friends didn’t have it installed. So, just install it first.

sudo apt-get install compizconfig-settings-manager

Call it pressing your keyboard Super key and typing compiz. When it appears click on it.

CompizConfig Settings Manager window shows up. Now just select General / General Options / Desktop Size

Several years ago I was used to a 4×1 layout but nowadays a 3×1 feels more productive.

So…

To change your workspace layout you just have to call CompizConfig Settings Manager and go to General Options / Desktop Size bar. Change the Horizontal and Vertical Virtual Size to suit your needs.

1

Audio conversion between FLAC and ALAC in Ubuntu

The short answer

If you want to converte audio between Free Lossless Audio Codec and Apple Lossless Audio Codec it’s straightforward as

avconv -i audio.flac -acodec alac audio.m4a
avconv -i audio.m4a -acodec flac audio.flac

Where did this come from

This is the application from Libav which is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec – the leading audio/video codec library.

So, you are in good hands!

How to install avconv in Ubuntu 12.04 LTS

You already know how to do it right ? Just use apt-get install avconv

$ sudo apt-get install avconv
[sudo] password for biafra:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package avconv
$

What ? This can’t be true!
But it is because avconv is just the new name of… ffmpeg.

At this time you still have to install it using the ffmpeg name

$ sudo apt-get install ffmpeg

$ ffmpeg
ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
built on Mar 22 2012 05:09:06 with gcc 4.6.3
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

The warning is just to tell you to start to use avconv
$ avconv
avconv version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
  built on Mar 22 2012 05:09:06 with gcc 4.6.3
Hyper fast Audio and Video encoder
usage: avconv [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man avconv'

Update: In Ubuntu 14.04 LTS just sudo apt-get install libav-tools

Conclusion

The simplicity of avconv is a must. Just use it to convert FLAC, ALAC and other codecs. Just a warning: mp3 is not supported. Check the available codecs with avconv -codecs.

0

Share your MOO status using MSSP

Why supporting MSSP ?

But what is this MUD Server Status Protocol (MSSP) ? A simple introduction from the official site:

MUD listings are often out dated and lack accurate information. Verifying that the one submitting a new MUD is a member of the MUD’s administration can be quite tedious as well. The MUD Server Status Protocol seeks to address these issues by providing a transparant protocol for MUD crawlers to gather detailed information about a MUD, including dynamic information like boot time and the current amount of online players. It also makes submitting a new mud entry very simple because it only requires a player or admin to fill in the hostname and port.

This way you can have your status and statistics automatically update on sites like MUDStats.com

Let’s add that feature to my MOO

MSSP is implemented as a Telnet option. It’s another way of saying that you would need a client and server that implemented it too. But we don’t want to hack the server code do we ?

Fortunately the protocol also has a plaintext version! And it’s really simple and straightforward. Right after a new connection to your server, if you receive a MSSP-REQUEST command, just respond with the appropriate text lines with the status information.

Assuming you have a LambdaMOO based database just create the command on $login

@verb $login:MSSP-REQUEST this none this "rxd"

and program it:

@program $login:MSSP-REQUEST
if (caller != #0)
return E_PERM;
endif
NAME = $network.MOO_name;
PLAYERS = length(connected_players());
UPTIME = $last_restart_time;
tab = $string_utils.tab;
notify(player, "");
notify(player, "MSSP-REPLY-START");
"Required";
notify(player, tostr("NAME", tab, NAME));
notify(player, tostr("PLAYERS", tab, PLAYERS));
notify(player, tostr("UPTIME", tab, UPTIME));
notify(player, "MSSP-REPLY-END");
.

These are just the required fields. There are many variables you should implement.

Conclusion

Yes, that’s just like it. So simple it can’t be true. You now have a MSSP aware MOO world.
If you want to see more variables on a real life server just telnet moosaico.com 7777 and issue the MSSP-REQUEST command.