Monday, January 12, 2009

Modifying the Keyboard on Debian Linux

So I've downloaded the SyslogAppliance v0.0.4 to act as a Syslog Server in the company's DMZ. I ran the appliance initially in VM Player and then used the Enterprise Converter to import the appliance into a Virtual Machine on our VMwareESX server.

By default, the appliance is set up for a US audience with US keyboards. That's not a problem. After 20+ years in IT, you expect that and I know my way around a US keyboard, especially as I work for an American concern. Anyway, the ReadMe.txt file that's packaged with the appliance provides you with information on how to configure a UK keyboard.
...
VMWare Settings
- 256 MB memory (you should increase this for large log volumes)
- 64GB virtual disk
- listening on port 514/UDP and port 514/tcp
- US keyboard, to install a different local, do
$ apt-get install console-setup
$ dpkg-reconfigure console-setup
...

Obviously, despite both being Linux, it uses a different mechanism from that used by rPath in an earlier post on this blog. But two command lines isn't too painful.

appliance:/etc# apt-get install console-setup
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package console-setup
appliance:/etc#

Oh. That's unfortunate! Maybe this won't be so easy.

15 minutes of googling around apt-get and reading the more obvious looking results.

appliance:/etc# apt-get update
Get:1 http://security.debian.org lenny/updates Release.gpg [189B]
Ign http://security.debian.org lenny/updates/main Translation-en_US
Get:2 http://ftp.us.debian.org lenny Release.gpg [189B]
Get:3 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://ftp.us.debian.org lenny/main Translation-en_US
Get:4 http://ftp.us.debian.org lenny Release [74.5kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://security.debian.org lenny/updates/main Packages [18.1kB]
Get:6 http://security.debian.org lenny/updates/main Source [5175B]
Get:7 http://ftp.us.debian.org lenny/main Packages [6942kB]
Get:8 http://ftp.us.debian.org lenny/main Source [2982kB]
Fetched 10.1MB in 23s (423kB/s)
Reading package lists... Done
appliance:/etc#
appliance:/etc# apt-get install console-setup
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
console-terminus xkb-data
The following NEW packages will be installed:
console-setup console-terminus xkb-data
0 upgraded, 3newly installed, 0 to remove and 70 not upgraded.
Need to get 1539kB of archives.
After this operation, 5968kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org lenny/main console-terminus 4.26-2.1 [420kB]
Get:2 http://ftp.us.debian.org lenny/main xkb-data 1.3-2 [645kB]
Get:3 http://ftp.us.debian.org lenny/main console-setup 1.28 [474kB]
Fetched 1539kB in 5s (264kB/s)
Preconfiguring packages ...
Selecting previously deselected package console-terminus.
(Reading database ... 18500 files and directories currently installed.)
Unpacking console-terminus (from .../console-terminus_4.26-2.1_all.deb) ...
Selecting previously deselected package xkb-data.
Unpacking xkb-data (from .../xkb-data_1.3-2_all.deb) ...
Selecting previously deselected package console_setup.
Unpacking console-setup (from .../console-setup_1.28_all.deb) ...
Setting up console-terminus (4.26-2.1) ...
Setting up xkb-data (1.3-2) ...
Setting up console-setup (1.28) ...
appliance:/etc#

Despite the quantity of output, it didn't take more than 10 to 20 seconds.

Now to configure the software.

appliance:/etc# dpkg-reconfigure console-setup
























And that's that!

3 comments:

Rainer Gerhards said...

Hi, well done post. I immediately mentioned it in my blog http://blog.gerhards.net/2009/01/syslogappliance-keyboard.html :) I thought that the keyboard changing process is less painful. Anyhow, I'll try to address this now in the appliance "first run" script. Will see into which issues I run. As a side note, all feedback on SyslogAppliance is very much appreciated :)

Rainer

r said...

Hi Rainer,

I was reading up around the exim4 configuration and the installation documentation on http://blog.edseek.com/~jasonb/articles/exim4_courier/exim4.html provided the instructions as

# apt-get update
# apt-get install exim4

So maybe I was displaying my lack of experience with Debian Linux.

So far I like what I'm seeing with rsylog and phpLogCon. Although I'm considering downloading the latest versions of each and installing them onto a CentOS VM as I have more experience with CentOS.

Thanks,
-r

Rainer Gerhards said...

Hi, I am not sure why it did not work in the first place, but I think it had something to do with the way I prepared the appliance. Anyhow, I have now released SyslogAppliance 0.0.5, which offers the option to change the keyboard layout during the initial logon (as promised ;)).

As I see it, the appliance has two main purposes: a) work as a real appliance for those that do not want to invest any time into it and b) provide a simple test environment for others who will probably deploy the components themselves.

I guess you fit in the second category. And, yes, I am yet far from having reached what the a) category users look for...

Keep up the good work,
Rainer