Twitter Updates

    follow me on Twitter

    G-AVLN in front of her home

    G-AVLN in front of her home

    Mostly Unix and Linux topics. But flying might get a mention too.

    Monday, July 09, 2007

    Keyboard layout in Centos

    I have been playing with Centos 5, which is the community binary for binary version of RHEL 5 (with various elements, such as text and graphics depicting or referring to Red Hat replaced with Centos, quite legally, might I add). It's an excellent alternative, as long as you don't expect a 24/7 support, or automatic updates or any of the value added stuff that a formal contract from Red Hat provides.

    Anyway, the install from the DVD onto my Vaio PCG-V505BP went without any problems. Selected "Gnome Desktop", "Server" and "Server-GUI" software, and the only other customisation was disk partitioning (I like my partitions to be done the old-fashioned UNIX style).

    So, as I said, the installation completed successfully, and to my best knowledge all hardware was recognised OK (still testing, so can't be totally sure). One little surprise, though - the keyboard layout was the US, not UK! Well, it is quite possible that I messed it up myself (when selecting the keyboard during installation). Either way, I went to correct it by hand, and thought I'd document it. It's quite straightforward, but a thing to remember is that two different configuration files need to be changed.

    For CLI (character interface screen, accessed through CTRL-ALT-F1 - F6) you need to modify the /etc/sysconfig/keyboard. Change the KEYTABLE line to read:

    KEYTABLE="uk"

    This will have immediate effect, and any new CLI session will assume the correct keyboard.

    For GUI screen terminals, you need to change the Xorg configuration file: /etc/X11/xorg.conf. In the "Section InputDevice", identify the line with XkbLayout and modify it to read:

    Option "XkbLayout" "uk"

    Unlike CLI setting, this GUI change will only take place after GUI session is restarted. I have tried the standard CTRL-ALT-Backspace, to restart Xorg server, but it didn't work! Well, not for the first time. On many systems this is disabled.

    I refuse doing a full reboots lightly, so I tend to 'recycle' GUI instead. First of all, make sure you don't have any GUI-dependent users or applications before you carry out the next step (they may not like being kicked off the system without a warning).

    To 'recycle' GUI means switching runlevels to 3 than to 5 again. To do that: open a CLI session (press CTRL-ALT-F1), log in as root, and switch runlevel to 3 with:

    # init 3

    Once the 'anaconda' message appears on the screen - you are in runlevel 3, even though you see no new prompt. Hit "Enter", and the prompt will be printed. At that point, switch back into runlevel 5 with:

    # init 5

    Your new keyboard layout is now available to all users.

    Thursday, July 05, 2007

    Default gateway in Solaris 10

    I'm spending a lot of time switching between different versions of UNIX and Linux, and the detailed syntax of the command line stuff keeps catching me out. So I will start documenting for myself (and any QA-IQ colleagues) some of the most popular things that are needed in our classrooms.

    This week it is a turn of Solaris 10 (ix86), in our Swindon office. Our infrastructure is such that the 192.168.1.254 gateway requires an argument of 1 where the 'metric' value used to be. No rocket science - just the command line syntax, but it kept me unconnected for far too long (or am I getting too indoctrinated by the Linux syntax and the power of the ip command there?).

    Anyway: to add the default gateway to the Solaris 10 :

    # route add default 192.168.1.254 1

    Then obviously adjust the browser settings to the correct proxy for your location (with port 8080 on QA-IQ sites). In the Mozilla version provided with Solaris 10 you can find the settings in Edit --> Preferences --> Advanced --> Proxies.

    Get it back together again

    Had so many changes within the company - blog went onto the back burner. Things are getting calmer and easier again, and hopefully I can get on with it properly. With any luck, the postings will start coming out again...

    Blog Archive