Archive

Start X

Starting a Window Manager

When the idea of a graphical system for Unix was first introduced, there was a basic (very basic) graphical screen, based on what some of you will recognise as xdm. That is all well and good, but for those of us that like the CLI (Command-Line Interface), you can use:

startx

to force a normal console-login to start your desired window-manager. Graphical login managers use the underlying configuration file:

~/.xsession

While startx uses:

~/.xinitrc

Although, if no  ~/.xinitrc file is present, startx will read  ~/.xsession quite happily.

Initially (unless you have added one to /etc/skel/), these [continued…]

Multimedia keyboard hot keys

Introduction

A lot of keyboards now have multimedia hot keys on them. For example, most of the Logitech keyboards have the ability to mute the sound and turn the volume up or down. It is possible to use them under X on Linux.

Keyboard keys pass through a ludicrous number of different remappings on Linux before X applications receive them.

But they’re not “remapped” at all. The XServer has to communicate back to the XClient (via the window manager) the key that was pressed. This isn’t remapping whatsoever.

  • The keyboard generates scancodes
  • The Linux console driver remaps these to Linux keycodes [continued…]
  • Qemu Tips

    Qemu Video Performance

    To optimize video performance under Qemu you should use a 16-bit colour depth on both the host and guest operating systems. To set 16-bit colour depth do:

    $ sudo gedit /etc/X11/xorg.conf

    Find the line which starts ‘DefaultDepth’ and change it so that it reads…

    !DefaultDepth 16

    Remeber to restart X in order to make your changes take effect.

    Qemu Launcher

    Qemu Launcher is a GNOME / Gtk front-end for Qemu which can Create and save multiple VM configurations and can create disk images from the GUI using dd, qemu-mkcow, and vmdk2raw for raw, COW, and VMWare converted [continued…]

    Just Edit

    “Just edit this file…”

    “Err… how do I do that? When I type edit it just does nothing.”

    If you’re new to this UNIX lark, you will rapidly discover that more or less all of the configuration of your computer is done in text files, and that therefore you will need an editor to get things working. (Or at least, to follow the instructions that the weirdo hair-shirted gurus on the MailingList will try to get you to follow).

    Something which is usually implied is that you know how to edit these files, which implies knowing [continued…]

    Samba Auth

    Setup Linux to authenticate against a Samba server

    This will show you how to setup Debian GNU/Linux to authenticate against a remote Samba server (Samba could also imply a Windows PDC too). It also details how to setup pam_mount to mount Samba shares automatically on login, so when a Samba user logs on to the Linux client, they get their $HOME as their home directory on the server. There’s also a shell script I devised to allow changing of passwords.

    The article is based on a Linux client running Debian unstable and a Samba server running on a Debian stable [continued…]

    Bash Tricks

    This page is for Bash programming tips and tricks, most of which will only be code fragments.

    Completed solutions should probably go in Useful One-Liners.

    Keeping while in context

    From Bob Dunlop

    I’ve long been annoyed by the behaviour of Bash and pipelines as exhibited by the following small script.

    #!/bin/bash generate() { echo "one" echo "two" echo "three" } last="dummy" generate | while read x do last=$x echo "x= $x last= $last" done echo "last= $last"

    Which produces the following output.

    x= one last= one x= two last= two x= three last= [continued...]

    Budget Laser Printer Recommendations

    For pretty much the first time in my life, I’m finding I really need a printer at home. In past times I’ve been quite happy to sneakily print off everything at university, at work, etc.. Several years ago I rescued a chunky old HP laser printer from the skip at work and that served me well for a few years… and then it died. Now I’m working from home a lot and this is becoming a real hassle, but budget is tight.

    So, can anyone recommend a very cheap mono laser printer for home Linux usage? I have few requirements:

    [continued…]

    Firewall Building

    Building a firewall on a Linux system with a 2.6 series kernel involves the Netfilter iptables command. The 2.4 series kernel uses the ipchains command. The configuration of a Linux system’s firewall is often held in a script that is run at system boot. Crafting complex firewall script can take a long time, however there are some software projects to help make creating and managing your Linux firewalls easier.

    Travelling With Linux

    Preamble

    After a couple of months on the road with my laptop I thought that it might be useful to have a place for road warriors to make a list of those invaluable things to carry with you when you travelling by land sea or air.

    This page should continually evolve with technology, and is not just the work of one person. The latest power-packs and hardware add-ons will be at home here.

    Power

    In General We’ll plug into the wall socket as often as we can, however, does your power supply have a variable input that covers volts over [continued…]

    Software Suspend (Suspend2)

    Introduction

    Software suspend is a method of hibernating (Windows style) the current state of the machine so that it can restored later on. For example, you’re in the middle of some work on your laptop whilst on the train and need to get off. You can simply press the power button and your laptop will suspend the laptop until you power it on later.

    This article covers using Suspend2 in conjunction with hibernate and acpid. It’s aimed at laptop users but you could use it on a workstation too, if you so wished.

    Some of the file paths, file names [continued…]