Friday, June 10, 2005

app-portage/cfg-update (replacement for etc-update)

app-portage/cfg-update appears to be a useful replacement for etc-update. There is a useful forum post

Wednesday, January 12, 2005

Programs to think about

Some programs to think about:

Saturday, November 06, 2004

USB Logitech MX310 & PS/2 Mouse

Spent some effort updating my xorg.conf file to support a logitech mx310 mouse. This solution uses the event manager in the kernel (evdev). Definition of the InputDevice in the xorg.conf file:
Section "InputDevice"
    # cat /proc/bus/input/devices
    Identifier  "UsbMouse"
    Driver      "mouse"
    Option "Protocol"    "evdev"
    Option "Dev Name" "Logitech USB-PS/2 Optical Mouse"
    Option "Dev Phys" "usb-*/input0"
    Option "Device"      "/dev/input/mouse1"
    Option "Buttons" "8"
    Option "ZAxisMapping" "7 8"
    Option "Resolution" "800"
EndSection
Definition of the ServerLayout in xorg.conf file. Note that I have dual screens and two mice (other mouse is stick integrated into keyboard).
Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen 0 "Screen 0" 0 0
    Screen 1 "Screen 1" RightOf "Screen 0"
    Option "Xinerama" "on"
    Option "CloneDisplay" "off"
    InputDevice "UsbMouse" "Core Pointer"
    InputDevice "KeyboardMouse" "SendCoreEvents"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection
After playing with xev determined that this switches the buttons around correctly. Note that your have to swap 4-7, 5-8, not just move them forward in the sequence.
xmodmap -e "pointer = 1 2 3 7 8 6 4 5"
Created a .Xmodmap (or .xmodmaprc) with the following line:
pointer = 1 2 3 7 8 6 4 5
After wondering why it wasn't called found from this post that KDM ignores it :-(. So I followed the suggestion and created the xinit.sh script in ~/.kde/AutoStart
#!/bin/sh
xmodmap $HOME/.Xmodmap
Note that you need to make it executable. References linuX-gamers.net-How-Tos - Get all mouse buttons working

Thursday, January 29, 2004

manually emerge rekall (bug 34199)

Worked out how to manually emerge the rekall ebuild provided in bug 34169 this morning:

  1. check that /etc/make.conf has the line PORTDIR_OVERLAY=/usr/local/portage
  2. create the /usr/local/portage/dev-db/rekall directory
  3. copy the ebuild to the directory
  4. change to the directory and run ebuild rekall-2.2.0_beta1.ebuild digest
  5. emerge rekall


Wednesday, November 12, 2003

setup java development environment

I code mostly in java, so I followed the Gentoo Java Guide to setup my development envirionment. The first step was to emerge the packages that I use:

Unfortunately ebuilds currently don't exist for a number of the packages that I use, so I guess it might be time to get my hands dirty.

Next I configured the environment by using java-config as per the documention, using the following commands:
java-config --set-system-vm=sun-jdk-1.4.2.01
java-config --set-system-classpath=commons-beanutils,commons-collections,commons-fileupload,commons-net,ecs,jaf,javamail,jdbc-mysql,servletapi
followed by
env-update; source /etc/profile


Thursday, November 06, 2003

setting CONFIG_PROTECT_MASK in make.conf

After being slightly annoyed with the number of configation files that needed updating after running emerge --updateonly world I did a little research (emerge --help config, and decided to add
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/sane.d"
variable to the /etc/make.conf file.

issue connecting to vpn provided by watchguard firebox

Spent several hours of frustration, attempting to get pptpclient to a vpn provided by a watchguard firebox. The connection would be established, but I was unable to ping any hosts on the network, so I wasted time playing with routing commands to no effect. Finally stumbled across this line in the log (note it appears only after the connection is established):
Unsupported protocol 0x2145 received
A quick search, to find answer faq, add the line:
"nopcomp"
to the /etc/ppp/options.pptp file and it all started working :-).

Upgrading to 2.6.4
After a bit of stress with gentoo-dev-sources, I followed these steps:

  1. download the MPPE/MPPC kernel module for Linux
  2. create a symbolic link: ln -s linux-2.6.4-gentoo-r1/ linux-2.6.4
  3. patch the kernel: zcat /home/software/linux/linux-2.6.4-mppe-mppc-0.99.patch.gz | patch -p0 -E
  4. compile the kernel: make && make modules_install
  5. add alias ppp-compress-18 ppp_mppe_mppc to /etc/modules.d/ppp
  6. run modules-update
  7. run modprobe pp-compress-18 to check it was okay
  8. create a symbolic link: ln -s ppp-2.4.2 ppp-2.4.2.orig
  9. patch the ppp source (v2.4.2): zcat /home/software/linux/ppp-2.4.2-stdopt-mppe-mppc-0.82.patch.gz | patch -p0 -E
  10. install ppp: ./configure && make && make install
Unfortunately, I'm still failing to establish a connection. Hopefully someone will answer my request for help on the gentoo forums.

Upgrading to 2.6.5
After a bit of stress with mm-dev-sources, I followed these steps from the pptpclient gentoo howto

  1. ACCEPT_KEYWORDS="~x86" emerge -a ppp
  2. USE="crypt" emerge -a pptpclient
  3. modprobe ppp-compress-18 reported FATAL: Module ppp_mppe not found.
  4. Followed debian mppe kernel patch howto
  5. Recompiled the kernel (added "PPP MPPE compression" as a module)


Wednesday, October 29, 2003

O3 decreases performance?

According to this post compiling with -02 is faster than -03. This post suggests some other options, but as usual your milage may vary (ummy).

Monday, October 27, 2003

email system for the home network

The Gentoo Weekly Newsletter: June 23rd, 2003 contained several pointers to configuring an email system for the home network. In the end I chose Email System for the Home Network, prepared by beowulf. It uses

  • postfix as a modern MTA that is compatible with Sendmail
  • procmail as a mail delivery agent/filter
  • courier-imap as an imap deamon that works with maildir directories
  • spamassassin to filter spam. The spamconfig web page simplified the configuration.

Promail looks useful, but I need to spend some more time working out the rules. The following pages look useful:

Biggest issue was setting up crontab for fetching mail. In the end I decided to make the cron job a shell script, and everything worked fine.

After reading this SpamAssassin not as good as before thread, I downloaded RuleDuJour to automatically download new versions of SpamAssassin rulesets. Hopefully this improves performance.


Sunday, October 26, 2003

home partition too small (only 8GB)

Discovered tonight that the home partition really was too small. Fortunately I did have some spare disk space that I was saving for a rainy day, so I formatted it using reiser file system, and used:
tar --create --file - software | tar --extract --preserve-permissions --same-owner --directory /home2 software
to move the data. After updating /etc/fstab and rebooting everything is happy.

And it should be noted that 3GB is much too small for a /usr partition, fortunately I just happened to have an 8GB partition lying around...


Monday, August 04, 2003

Network Time Protocol (NTP) configuration

Found this forum thread very useful for configuration of the Network Time Protocol (NTP). In the end I followed more of the comments by RavVan.

Saturday, July 19, 2003

Improving X Performance

The following options should improve performance of a Radeon graphics card:

  • Option "AGPMode" "4"
  • Option "EnablePageFlip" "True"
  • Option "AGPFastWrite" "True"
You can find more options by typing: man radeon

I have dual monitors and for some reason this line:
    (WW) RADEON(1): Only one monitor detected, Second screen will NOT be created
started appearing, and the desktop was cloned. Adding (in the device section):
    Option "MonitorLayout" "CRT, CRT"
will hopefully fix this.

Also while debugging my XF86Config file, I discovered that it was reading the file from /root, rather than /etc/X11. Finally saw the line Using config file: "/root/XF86Config"


Friday, July 18, 2003

dramas with KDE 3.1.2 upgrade

Been having a bit of fun with upgrading to KDE 3.1.2 over the last couple of days. Found the KDE 3.0 splash screen was showing, not the KDE 3.1 splash screen. In the end I fixed this by deleting the files 50kdedir-3.0.4 and 65kdelibs-3.0.4 from the /etc/env.d directory and rerunning env-update. This fixed that problem.

Next problem is that a local user cannot run Konsole (root has no trouble). The error message is "Unable to open suitable terminal device". Looks like the problem might have been disabling Unix98 PTY support in the kernel.


Tuesday, July 15, 2003

installing Advanced Linux Sound Architecture (ALSA)

emerge -e world finally completed successfully. Had to download a couple of java packages from Sun, but apart from that no issues. The next step is to install Advanced Linux Sound Architecture (ALSA)

The Gentoo Linux ALSA Guide provided an excellent reference. Just need to remember to recompile the alsa module everytime I recompile the kernel. make clean ; make dep ; make bzImage modules modules_install ; emerge asla-driver

Found this howto:alsa hw mixing support for nforce2 audio [How-To]. Worked after creating the .asoundrc file.


Wednesday, July 09, 2003

app-text/docbook-sgml-utils failed emerge

app-text/docbook-sgml-utils failed to build this time :-(. Complaining about being unable to open files /usr/share/sgml/xhtml1/xhtml.soc and /usr/share/sgml/html401/HTML4.cat. I emerged app-text/xhtml1 and app-text/html401, followed by app-text/docbook-sgml-utils and this appeared to fix the problem :-).

Thinking I had found a bug I unmerged all three packages, and then emerged app-text/docbook-sgml-utils. This time it worked! Time to rerun emerge -e world (only 315 packages) :-)


bonobo-activation unfinished jobs

Apparrently bonobo-activition doesn't like parallel compilation as it throws an unfinished jobs error. Changed -j3 to -j1 and all is happy.

Tuesday, July 08, 2003

Parallel threads for emerge; Download and Process

This forum topic contains a suggestion for an enhancement to emerge which will continue fetching files while it processing an ebuild. For an emerge containing multiple packages (ie fresh installs) this has the potential to save significant time, because required files for later ebuilds will most probably have already been downloaded.

dev-libs/atk fails building index.sgml

Next I ran into the sgml/index.html problem building dev-libs/atk, which is reported in bug 17448 and discussed in atk-1.2.2 fails at building index.sgml. Instructions for fixing sgml are helpful, but I only worked when I also unmerged dev-util/gtk-doc as mentioned in comment 14 of the bug.

time to rerun emerge -e world (315 packages) :-)


Sunday, July 06, 2003

desktop configuration - X

Gentoo Linux Desktop Configuration Guide provides a good guide to setting up x-windows, kde and gnome.

Had some frustration building x11-misc/ttmkfdir with "Waiting for ttmkfdir.o.lock to be removed", which is discussed in this forum topic. Finally fixed it by creating this symbolic link: ln -s /usr/tmp2/portage/ttmkfdir-3.0.9 /usr/tm/portage/ttmkfdir-3.0.9.


a prettier boot

The Gentoo Framebuffer, Bootsplash (12VT) & Grubsplash How-To is a guide to beautifying linux by adding splash screens and background logos.

Gentoo - the start

Gentoo is a linux distribution that can be "automatically optimised and customised for just about any application or need. This blog contains information on my experiences upgrading my installation of Gentoo to 1.4, after not doing much emerging for 9 months. Much of this points to documentation the gentoo website so that I can find the information at a later date.

The place to start is with the Gentoo Linux Installation Instructions. After running emerge, the command find /etc -iname '._cfg????_*' is very useful for finding configuration files that need to be updated as the result of running emerge. For updating files I:

  • run diff ._cfg0000_make.conf make.conf
  • if I prefer the new version then ^diff^mv replaces the original file with the new file.
  • otherwise I run emacs ^diff^emacs and use ediff-buffer to merge the two buffers (often merge into the new buffer to reduce differences for next time I upgrade the package).

make.conf controls the way emerge builds software, so here are a couple of my key settings:

  • USE="aalib apache2 bonobo directfb doc emacs evo fbcon gtkhtml imap innodb odbc postgres qtmt radeon samba sse xinerama"
  • CHOST="i686-pc-linux-gnu"
  • CFLAGS="-march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4"
  • CXXFLAGS="${CFLAGS}"
Note that Gentoo Linux USE flags editor (ufed) can be used to set the use variable.


This page is powered by Blogger. Isn't yours?