Tuesday, October 03, 2006

mongrel_cluster startup script for Gentoo


#!/sbin/runscript
#
# Copyright (c) 2006 Bradley Taylor, bradley@railsmachine.com
#
# Updated Oct 2006 by Russell Rollins for Gentoo compliance.
#
# mongrel_cluster Startup script for Mongrel clusters.
#
# chkconfig: - 85 15
# description: mongrel_cluster manages multiple Mongrel processes for use # behind a load balancer.
#

CONF_DIR=/etc/mongrel_cluster
RETVAL=0

depend() {
need net
}

start() {
ebegin "Starting Mongrel cluster"
/usr/bin/mongrel_cluster_ctl start -c ${CONF_DIR}
eend $?
}
stop() {
ebegin "Stopping Mongrel cluster"
/usr/bin/mongrel_cluster_ctl stop -c ${CONF_DIR}
eend $?
}

pound and mongrel_cluster

In order to easily manage the development/deployment via Capistrano, it made sense to also be running mongrel_cluster automatically. This way deployment is real-time with instant results.


gem install mongrel_cluster capistrano --include-dependencies


Then install pound via emerge/yast. Edit the pound.cfg file:
(this still doesn't seem to be working)

ListenHTTP
Address 0.0.0.0
Port 80
Service
BackEnd
Address 0.0.0.0
Port 8000
End
BackEnd
Address 0.0.0.0
Port 8001
End
BackEnd
Address 0.0.0.0
Port 8002
End
Session
Type BASIC
TTL 300
End
End
End


Start pound and add it to startup:


/etc/init.d/pound start
rc-update add pound default



Next, railsapp/config/mongrel_cluster.yml would look like:


cwd: /home/build/deploy/current
port: "8000"
environment: development
address: 0.0.0.0
pid_file: log/mongrel.pid
servers: 3



Initialize capistrano for railsapp:


cap --apply-to /path/to/railsapp MyApplicationName


Now that capistrano has been initialized, update the config/deploy.rb file adding:


set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"


Update the other properties as necessary, paying particular attention to:


role :web, "someserver.yourinternaldomain.local"


The servers will have to be contactable by the exact name placed in the quotes.

Update the remote variables:


set :deploy_to, "/home/build/deploy"
set :user, "build"
set :keep_releases, 5

Be sure to have the "build" user's password on hand since it'll be necessary for capistrano commands.

Ensure capistrano is working with:


rake remote:exec ACTION=setup


Check that the target server has the releases and shared directories created, if so, capistrano worked.

Lastly:


rake deploy


This should pull everything down and place it in the "current" directory (in relation to cwd).

Create a link to mongrel_cluster script and mongrel_cluster.yml then add to startup:


mkdir /etc/mongrel_cluster
ln -s /home/build/deploy/current/config/mongrel_cluster.yml /etc/mongrel_cluster/railsapp.yml
ln -s /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-0.1.3/resources/mongrel_cluster /etc/init.d/mongrel_cluster
chmod +x /etc/init.d/mongrel_cluster
rc-update /etc/init.d/mongrel_cluster default

TODO: autostart failing on Gentoo

Lastly, start the mongrels:


/etc/init.d/mongrel_cluster start


Test from port 80, 8000, 8001 and 8002 that the rails intro page comes up. Done.

Wednesday, September 27, 2006

openEMM in Gentoo

1. downloaded OpenEMM-5.0.2.binary.tar.gz
2. groupadd openemm
3. useradd -m -g openemm -d /home/openemm -c "OpenEMM 5.0.2" openemm
4. mysqladmin -u root -p create openemm
5. mysql –u root openemm -p < /home/openemm/USR_SHARE/openemm.db
6. changed JAVA_HOME in httpd.sh to explicitly point to local jdk1.5
7. su – openemm
8. /home/openemm/bin/OpenEMM.sh start

Sendmail stuff to get it working:
vsruss russ # cd /home/openemm/
vsruss openemm # cd bin/
vsruss bin # chown root:root smctrl
vsruss bin # chown root:root ../conf/bav/bav.rc
vsruss bin # chmod 6755 smctrl
vsruss bin # chmod 0600 ../conf/bav/bav.rc

and in syslog-ng.conf:
destination mail { file("/var/log/maillog"); };
options { long_hostnames(off); sync(0); perm(0644); stats(3600); };

restarted both sendmail and openemm

Friday, August 18, 2006

nfs simplified

(abridged from http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS)
For the server

1.emerge nfs-utils
2.edit /etc/exports
example:

/opt/svnrepos vsdc1.vital.local(async,no_subtree_check,ro) 192.168.88.62(async,no_subtree_check,rw)


3.execute:
exportfs -ra
/etc/init.d/nfs reload


For the client

ensure that portmap is running (and added as default via rc-update)
then mount ala:

mount vssvn:/var/lib/trac ./vssvn_trac/

Tuesday, August 15, 2006

lspci is your friend

when looking up your NIC, easiest to emerge pciutils and then figure out the chipset

Thursday, July 27, 2006

Test Driven Development -- Saving Grief and Pain

I recently inherited two projects at work, both in gloriously coded .NET. The first was a we'll-throw-together-a-CMS-like-web-application. Some simple concepts utilizing the webcomponents and master-template paradigms from Microsoft. Incidentally, another project was to tie into this one as a "component" to provide additional functionality. Both have zero lines of test code. Both have bugs. Both are now on my plate.

Ever since reading Test Driven Development my world is no longer the same. Having spent some time as a quality assurance engineer(2000), I very much appreciated the concepts of this book. As a developer, I feasted upon the notions of overcoming assumptions/fear based on actual test results. Starting simple, refactoring as tests passed and building a solid foundation of functional code. I finished this book months ago and immediately put into practice writing tests first. I began to think in tests and then design from there, things worked out nicely every time.

So, inheriting two development efforts (with their small portion of issues, ~60), neither of which has a lick of test code, my current outlook is a sliver of hope. A hope that, yes, we can fix things as we try to get the projects out the door. But, a serious sense of uncomfortableness pervades my being as I dig through code and fix things here and there. Deadline is approaching far too quickly, there's no time to get a testing framework in place and cram tests through everything. The best we can do is get some automated web testing in place ala Fitnesse and Selenium.

Now that the rant is done, what's the conclusion? Here it is: if you're gonna write code, write the test to go with it. That way you not only ensure the functionality of the immediate task of the code you're writing, you also spare the grief and pain of others when they look/touch/execute it.

Friday, July 21, 2006

sqlserver incremental table dumps

Very easy using bcp. Using cron, bash and ruby I can dump a given set of tables via cygwin and automate table data commits into subversion.

Thursday, July 13, 2006

vnstat

SonicWall reported that my linux box pumped out "16588800 TBytes" (no explaining what that number is) in a 3 day period. Right. vnstat is a nice handy tracker monitring your NIC traffic.

Thursday, June 29, 2006

Gentoo Trac with existing subversion project


sudo emerge trac sqlite pysqlite
sudo webapp-config -I -d project/trac trac 0.9.5 #this will create the symlinks for the site, http://localhost/project/trac
sudo trac-admin /var/lib/trac/project/ initenv #sets up the trac environment for the project
sudo chown apache:apache -R /var/lib/trac/project
sudo tracd -8000 /var/lib/trac/project

OR to run in apache


emerge mod_fastcgi
#add "-D FASTCGI" to /etc/conf.d/apache

#add FastCgiServer /var/www/localhost/cgi-bin/trac.fcgi -idle-timeout 120 -initial-env TRAC_ENV=/var/lib/trac/project -processes 5
# to /etc/apache/httpd.conf

#add
# SetEnv TRAC_ENV "/var/lib/trac/project"
#

# ScriptAlias /project /var/www/localhost/cgi-bin/trac.cgi
# to virtual hosts file

#add users
sudo htpasswd2 -c /etc/apach2/trac.htpasswd admin

#then add
#
# AuthType Basic
# AuthName "Trac"
# AuthUserFile /etc/apache2/trac.htpasswd
# Require valid-user
#

#
#
#to virtual hosts file

Tuesday, June 20, 2006

Parallels vs VMWare 4.x

I have reason to install Windows under linux, again (sadly). Given my recent experience of trying out Parallels on my MacBook, I thought I'd compare it to VMWare in Linux. I purchased a VMWare 4.x license two years ago and it worked decently enough in Gentoo.

This time around, after emering it, there was network issues that I have heretofore not experienced. Then, for reasons I could not find, it wouldn't boot from the cd in the drive. This is when I decided to emerge Parallels (granted their ebuild is homebrewed, but still). Paraellels workstation is *so* much easier to install and configure, it's just not even funny. It's so simplistic, and it just worked! No network issues, no cd issues, it just worked. Just as simple and fast as on the Mac.

Wednesday, June 14, 2006

Subversion, Apache2, DAV & SAMBA

In order to easily facilitate a consolidated nightly backup we decided to mount (via SAMBA) a win2k3 share to store our Subversion repositories (Subversion being on a Gentoo box). Been live a week, today we had our first issue. The following message appeared on the "svn ci" output:

snc: Commit failed:

svn: Can't move '/opt/svn_repos/CrucialConversationsLP/db/current.3.tmp' to '/opt/svn_repos/CrucialConversationsLP/db/current': Text file busy.

svn: MERGE of '/svn/repos/CrucialConversationsLP': 409 Conflict


followed by this (apache2's error-log):

[Wed Jun 14 14:05:04 2006] [error] [client 192.168.88.9] Could not MERGE resource "/svn/repos/CrucialConversationsLP/!svn/act/e920f6b2-3416-0410-b60c-8a4adf2ad0ca" into "/svn/repos/CrucialConversationsLP/courses/Crucial Conversations/slides". [409, #0]
[Wed Jun 14 14:05:04 2006] [error] [client 192.168.88.9] An error occurred while committing the transaction. [409, #26]
[Wed Jun 14 14:05:04 2006] [error] [client 192.168.88.9] Can't move '/opt/svn_repos/CrucialConversationsLP/db/current.10.tmp' to '/opt/svn_repos/CrucialConversationsLP/db/current': Text file busy [409, #26]


lsof did not indicate that the "current" file was open.

The solution to this issue (for the time being) was to unmount the share and remount it. Then commits worked just fine. I also tried adding and committing test files on other projects, no issues there. So if this crops up again we'll consider an alternative backup scheme and perchance go down the NFS road.

Monday, June 05, 2006

macbook RAM

If you're a developer and you just bought a new MacBook, spare yourself the lag headache and upgrade to 2G RAM (got mine for $160 @ macsolutions.com). I was about to send mine back convinced that something was wrong for how slow it was running. Sure it's warm, but with maxed ourtRAM, it sure hops.

simplified ssh and ssh-agent

(condensed version of http://www.gentoo.org/doc/en/keychain-guide.xml)
ssh-keygen -t dsa
scp ~/.ssh/id_dsa.pub server_user@server:~/myhost.pub
ssh server_user@server "cat ~/myhost.pub >> ~/.ssh/authorized_keys"

ssh-agent
ssh-add id-dsa

Wednesday, May 31, 2006

OS X & subversion install: bash: line 1: svnserve: command not found

Thanks to http://www.tbradshaw.net/archives/2005/03/02/subversion-on-dreamhost/, just symlinked my .profile to .bashrc and now everything works!

Friday, May 19, 2006

oh yeah, why back to Emacs?

So the new projects I'll be working have a wide range of underlying languages. Decided to give Eclipse, BlueFish & JEdit a whirl (again). I'm on a much faster machine (3Ghz HT, compared to previous 1.7Ghz centrino) w/ 3G of RAM (compared to 2G) and thought these apps would perform quicker (and hence more efficient usage). Wrong.

So Eclipse was still sluggish, still a pain to configure with clicking all over the place. Same with JEdit, a royal pain to get all the plugins needed then configure everything. Worth the time? I'm too impatient since the I can't use my locate db and open files as easily (any file, that is). Bluefish seemed nice, but when I opened a large PHP file with some HTML that was generated the thing slogged my CPU parsing it. That was the end of it.

Took the 10 minutes to get JDE and php-mode up and running on my Emacs and I was back in business. Went 4 days w/o it, and now I'm in heaven again since I'm not bound to the mouse, crappy parsing, slow loading, inefficient file finding, etc.

Oh the glory of Emacs...

Emacs and Ubuntu, finally harmony

Headache getting my emacs up and running smoothly after transitioning to this new box from my Gentoo laptop. Lesson learned: keep ALL my .el stuff in ~/site-load and don't use emerge/apt-get for new stuff. Thus everything is easily portable.

Secondly, font selection was jacked for some reason and I had to go about updating my .Xdefaults on this new box with a font string that will work. Best tool I found for doing so is "gtkfontsel", makes it very slick (ugly sibling is xfontsel).

For now I'm using:
emacs.font: -*-terminus-*-*-normal-*-14-*-72-72-c-80-iso8859-13

Tuesday, May 16, 2006

.mrxvtrc

har_encoding: UTF-8
mrxvt*mfont: AR PL New Sung
mrxvt*mfontn: AR PL New Sung
mrxvt*textShadow: black
mrxvt*opacity: 50
mrxvt*OpacityDegree: 1
mrxvt*vt0*saveLines: 10000
mrxvt*initTermNumber: 3
mrxvt*protectSecondary: true
mrxvt*loginShell: true
mrxvt*scrollBar: true
mrxvt*transparent: false
mrxvt*transparentScrollbar: false
mrxvt*transparentTabbar: false
mrxvt*transparentMenubar: false
!mrxvt*foreground: darkgray
!mrxvt*background: white
mrxvt*foreground: white
mrxvt*background: gray19
mrxvt*backgroundFade: 60
mrxvt*fading: 0
!mrxvt*tintColor: darkblue
mrxvt*textShadow: black
mrxvt*textShadowMode: botright
!mrxvt*tabForeground: black
!mrxvt*tabBackground: white
!mrxvt*itabForeground: black
!mrxvt*itabBackground: white
mrxvt*tabForeground: white
mrxvt*tabBackground: black
mrxvt*itabForeground: white
mrxvt*itabBackground: darkblue
mrxvt*tabPixmap: false
mrxvt*syncTabTitle: true
mrxvt*hideTabbar: false
mrxvt*bottomTabbar: true
mrxvt*windowsSwitch: false
mrxvt*showMenu: false
mrxvt*hideButtons: true
mrxvt*xft: true
mrxvt*xftFont: Bitstream Vera Sans Mono
mrxvt*xftmFont: Bitstream Vera Sans Mono
mrxvt*xftAntialias: true
mrxvt*xftWeight: normal
mrxvt*xftSlant: roman
mrxvt*xftHinting: true
mrxvt*xftAutoHint: true
mrxvt*xftGlobalAdvance: true
mrxvt*xftWidth: normal
mrxvt*xftRGBA: rgb
mrxvt*xftSize: 11
mrxvt*cursorBlink: false
!mrxvt*cursorBlinkInterval:500
mrxvt*geometry: 80x25
mrxvt*inputMethod: fcitx
!mrxvt*cursorColor: white
mrxvt*cursorColor: lightblue
mrxvt*color0: black
mrxvt*color1: #40e0d0
mrxvt*color2: #87cefa
mrxvt*color3: #ffff00
mrxvt*color4: #d1eeee
mrxvt*color5: #eed8ae
mrxvt*color6: #b4eeb4
mrxvt*color7: gray
mrxvt*color8: gray40
mrxvt*color9: #ee6363
mrxvt*color10: #c5f779
mrxvt*color11: #fff796
mrxvt*color12: #00b2ee
mrxvt*color13: #cf9ebe
mrxvt*color14: #71bebe
mrxvt*color15: white

Monday, May 15, 2006

VMWare Ubuntu 5.10

http://www.vmware.com/community/thread.jspa?threadID=29227&tstart=0
export CC=/usr/bin/gcc-3.4
ran vmware-install.pl
failed with insmod: error inserting '/tmp/vmware-config0/vmnet.o': -1 Unknown symbol in module
then ran vmware-any-any (http://platan.vc.cvut.cz/ftp/pub/vmware/), no error message
/etc/init.d/vmware stop
sudo rm /etc/vmware/not_configured
vmware

Radeon 9800 Dual-head Ubuntu 5.10

# File: xorg.conf
# File generated by fglrxconfig (C) ATI Technologies, a substitute for xf86config.

# Note by ATI: the below copyright notice is there for servicing possibly
# pending third party rights on the file format and the instance of this file.
#
# Copyright (c) 1999 by The XFree86 Project, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Except as contained in this notice, the name of the XFree86 Project shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from the
# XFree86 Project.
#

# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************

# **********************************************************************
# DRI Section
# **********************************************************************
Section "dri"
# Access to OpenGL ICD is allowed for all users:
Mode 0666
# Access to OpenGL ICD is restricted to a specific user group:
# Group 100 # users
# Mode 0660
EndSection

# **********************************************************************
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
Section "Module"

# This loads the DBE extension module.

Load "dbe" # Double buffer extension

# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection

# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"

# This loads the GLX module
Load "glx" # libglx.a
Load "dri" # libdri.a

EndSection

# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

# The location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.

RgbPath "/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
#
# If you don't have a floating point coprocessor and emacs, Mosaic or other
# programs take long to start up, try moving the Type1 and Speedo directory
# to the end of this list (or comment them out).
#

# FontPath "/usr/X11R6/lib/X11/fonts/local/"
# FontPath "/usr/X11R6/lib/X11/fonts/misc/"
# FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
# FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
# FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
# FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
# FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
# FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"

# The module search path. The default path is shown here.

# ModulePath "/usr/X11R6/lib/modules"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging

# Option "NoTrapSignals"

# Uncomment this to disable the server abort sequence
# This allows clients to receive this key event.

# Option "DontZap"

# Uncomment this to disable the / mode switching
# sequences. This allows clients to receive these key events.

# Option "Dont Zoom"

# Uncomment this to disable tuning with the xvidtune client. With
# it the client can still run and fetch card and monitor attributes,
# but it will not be allowed to change them. If it tries it will
# receive a protocol error.

# Option "DisableVidModeExtension"

# Uncomment this to enable the use of a non-local xvidtune client.

# Option "AllowNonLocalXvidtune"

# Uncomment this to disable dynamically modifying the input device
# (mouse and keyboard) settings.

# Option "DisableModInDev"

# Uncomment this to enable the use of a non-local client to
# change the keyboard or mouse settings (currently only xset).

# Option "AllowNonLocalModInDev"

EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************

Section "InputDevice"

Identifier "Keyboard1"
Driver "kbd"
# For most OSs the protocol can be omitted (it defaults to "Standard").
# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),
# uncomment the following line.

# Option "Protocol" "Xqueue"

Option "AutoRepeat" "500 30"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"

# Option "LeftAlt" "Meta"
# Option "RightAlt" "ModeShift"

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"

# These are the default XKB settings for XFree86
# Option "XkbRules" "xfree86"
# Option "XkbModel" "pc101"
# Option "XkbLayout" "us"
# Option "XkbVariant" ""
# Option "XkbOptions" ""

# Option "XkbDisable"

Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"

EndSection


# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************

Section "InputDevice"

# Identifier and driver

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/input/mice"

# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.

# Option "Protocol" "Xqueue"

# Baudrate and SampleRate are only for some Logitech mice. In
# almost every case these lines should be omitted.

# Option "BaudRate" "9600"
# Option "SampleRate" "150"

# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)

# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"

# ChordMiddle is an option for some 3-button Logitech mice

# Option "ChordMiddle"

EndSection


# **********************************************************************
# Other input device sections
# this is optional and is required only if you
# are using extended input devices. This is for example only. Refer
# to the XF86Config man page for a description of the options.
# **********************************************************************
#
# Section "InputDevice"
# Identifier "Mouse2"
# Driver "mouse"
# Option "Protocol" "MouseMan"
# Option "Device" "/dev/mouse2"
# EndSection
#
# Section "InputDevice"
# Identifier "spaceball"
# Driver "magellan"
# Option "Device" "/dev/cua0"
# EndSection
#
# Section "InputDevice"
# Identifier "spaceball2"
# Driver "spaceorb"
# Option "Device" "/dev/cua0"
# EndSection
#
# Section "InputDevice"
# Identifier "touchscreen0"
# Driver "microtouch"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "1412"
# Option "MaxX" "15184"
# Option "MinY" "15372"
# Option "MaxY" "1230"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection
#
# Section "InputDevice"
# Identifier "touchscreen1"
# Driver "elo2300"
# Option "Device" "/dev/ttyS0"
# Option "MinX" "231"
# Option "MaxX" "3868"
# Option "MinY" "3858"
# Option "MaxY" "272"
# Option "ScreenNumber" "0"
# Option "ReportingMode" "Scaled"
# Option "ButtonThreshold" "17"
# Option "ButtonNumber" "1"
# Option "SendCoreEvents"
# EndSection

# **********************************************************************
# Monitor section
# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"
Identifier "Monitor0"
# === mode lines based on GTF ===
# VGA @ 100Hz
# Modeline "640x480@100" 43.163 640 680 744 848 480 481 484 509 +hsync +vsync
# SVGA @ 100Hz
# Modeline "800x600@100" 68.179 800 848 936 1072 600 601 604 636 +hsync +vsync
# XVGA @ 100Hz
# Modeline "1024x768@100" 113.309 1024 1096 1208 1392 768 769 772 814 +hsync +vsync
# 1152x864 @ 60Hz
# Modeline "1152x864@60" 81.642 1152 1216 1336 1520 864 865 868 895 +hsync +vsync
# 1152x864 @ 85Hz
# Modeline "1152x864@85" 119.651 1152 1224 1352 1552 864 865 868 907 +hsync +vsync
# 1152x864 @ 100Hz
# Modeline "1152x864@100" 143.472 1152 1232 1360 1568 864 865 868 915 +hsync +vsync
# 1280x960 @ 75Hz
# Modeline "1280x960@75" 129.859 1280 1368 1504 1728 960 961 964 1002 +hsync +vsync
# 1280x960 @ 100Hz
# Modeline "1280x960@100" 178.992 1280 1376 1520 1760 960 961 964 1017 +hsync +vsync
# SXGA @ 100Hz
# Modeline "1280x1024@100" 190.960 1280 1376 1520 1760 1024 1025 1028 1085 +hsync +vsync
# SPEA GDM-1950 (60Hz,64kHz,110MHz,-,-): 1280x1024 @ V-freq: 60.00 Hz, H-freq: 63.73 KHz
# Modeline "GDM-1950" 109.62 1280 1336 1472 1720 1024 1024 1026 1062 -hsync -vsync
# 1600x1000 @ 60Hz
# Modeline "1600x1000" 133.142 1600 1704 1872 2144 1000 1001 1004 1035 +hsync +vsync
# 1600x1000 @ 75Hz
# Modeline "1600x1000" 169.128 1600 1704 1880 2160 1000 1001 1004 1044 +hsync +vsync
# 1600x1000 @ 85Hz
# Modeline "1600x1000" 194.202 1600 1712 1888 2176 1000 1001 1004 1050 +hsync +vsync
# 1600x1000 @ 100Hz
# Modeline "1600x1000" 232.133 1600 1720 1896 2192 1000 1001 1004 1059 +hsync +vsync
# 1600x1024 @ 60Hz
# Modeline "1600x1024" 136.385 1600 1704 1872 2144 1024 1027 1030 1060 +hsync +vsync
# 1600x1024 @ 75Hz
# Modeline "1600x1024" 174.416 1600 1712 1888 2176 1024 1025 1028 1069 +hsync +vsync
# 1600x1024 @ 76Hz
# Modeline "1600x1024" 170.450 1600 1632 1792 2096 1024 1027 1030 1070 +hsync +vsync
# 1600x1024 @ 85Hz
# Modeline "1600x1024" 198.832 1600 1712 1888 2176 1024 1027 1030 1075 +hsync +vsync
# 1920x1080 @ 60Hz
# Modeline "1920x1080" 172.798 1920 2040 2248 2576 1080 1081 1084 1118 -hsync -vsync
# 1920x1080 @ 75Hz
# Modeline "1920x1080" 211.436 1920 2056 2264 2608 1080 1081 1084 1126 +hsync +vsync
# 1920x1200 @ 60Hz
# Modeline "1920x1200" 193.156 1920 2048 2256 2592 1200 1201 1203 1242 +hsync +vsync
# 1920x1200 @ 75Hz
# Modeline "1920x1200" 246.590 1920 2064 2272 2624 1200 1201 1203 1253 +hsync +vsync
# 2048x1536 @ 60
# Modeline "2048x1536" 266.952 2048 2200 2424 2800 1536 1537 1540 1589 +hsync +vsync
# 2048x1536 @ 60
# Modeline "2048x1536" 266.952 2048 2200 2424 2800 1536 1537 1540 1589 +hsync +vsync
# 1400x1050 @ 60Hz M9 Laptop mode
# ModeLine "1400x1050" 122.000 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
# 1920x2400 @ 25Hz for IBM T221, VS VP2290 and compatible display devices
# Modeline "1920x2400@25" 124.620 1920 1928 1980 2048 2400 2401 2403 2434 +hsync +vsync
# 1920x2400 @ 30Hz for IBM T221, VS VP2290 and compatible display devices
# Modeline "1920x2400@30" 149.250 1920 1928 1982 2044 2400 2402 2404 2434 +hsync +vsync

EndSection


Section "Monitor"
Identifier "Monitor1"
# === mode lines based on GTF ===
# VGA @ 100Hz
# Modeline "640x480@100" 43.163 640 680 744 848 480 481 484 509 +hsync +vsync
# SVGA @ 100Hz
# Modeline "800x600@100" 68.179 800 848 936 1072 600 601 604 636 +hsync +vsync
# XVGA @ 100Hz
# Modeline "1024x768@100" 113.309 1024 1096 1208 1392 768 769 772 814 +hsync +vsync
# 1152x864 @ 60Hz
# Modeline "1152x864@60" 81.642 1152 1216 1336 1520 864 865 868 895 +hsync +vsync
# 1152x864 @ 85Hz
# Modeline "1152x864@85" 119.651 1152 1224 1352 1552 864 865 868 907 +hsync +vsync
# 1152x864 @ 100Hz
# Modeline "1152x864@100" 143.472 1152 1232 1360 1568 864 865 868 915 +hsync +vsync
# 1280x960 @ 75Hz
# Modeline "1280x960@75" 129.859 1280 1368 1504 1728 960 961 964 1002 +hsync +vsync
# 1280x960 @ 100Hz
# Modeline "1280x960@100" 178.992 1280 1376 1520 1760 960 961 964 1017 +hsync +vsync
# SXGA @ 100Hz
# Modeline "1280x1024@100" 190.960 1280 1376 1520 1760 1024 1025 1028 1085 +hsync +vsync
# SPEA GDM-1950 (60Hz,64kHz,110MHz,-,-): 1280x1024 @ V-freq: 60.00 Hz, H-freq: 63.73 KHz
# Modeline "GDM-1950" 109.62 1280 1336 1472 1720 1024 1024 1026 1062 -hsync -vsync
# 1600x1000 @ 60Hz
# Modeline "1600x1000" 133.142 1600 1704 1872 2144 1000 1001 1004 1035 +hsync +vsync
# 1600x1000 @ 75Hz
# Modeline "1600x1000" 169.128 1600 1704 1880 2160 1000 1001 1004 1044 +hsync +vsync
# 1600x1000 @ 85Hz
# Modeline "1600x1000" 194.202 1600 1712 1888 2176 1000 1001 1004 1050 +hsync +vsync
# 1600x1000 @ 100Hz
# Modeline "1600x1000" 232.133 1600 1720 1896 2192 1000 1001 1004 1059 +hsync +vsync
# 1600x1024 @ 60Hz
# Modeline "1600x1024" 136.385 1600 1704 1872 2144 1024 1027 1030 1060 +hsync +vsync
# 1600x1024 @ 75Hz
# Modeline "1600x1024" 174.416 1600 1712 1888 2176 1024 1025 1028 1069 +hsync +vsync
# 1600x1024 @ 76Hz
# Modeline "1600x1024" 170.450 1600 1632 1792 2096 1024 1027 1030 1070 +hsync +vsync
# 1600x1024 @ 85Hz
# Modeline "1600x1024" 198.832 1600 1712 1888 2176 1024 1027 1030 1075 +hsync +vsync
# 1920x1080 @ 60Hz
# Modeline "1920x1080" 172.798 1920 2040 2248 2576 1080 1081 1084 1118 -hsync -vsync
# 1920x1080 @ 75Hz
# Modeline "1920x1080" 211.436 1920 2056 2264 2608 1080 1081 1084 1126 +hsync +vsync
# 1920x1200 @ 60Hz
# Modeline "1920x1200" 193.156 1920 2048 2256 2592 1200 1201 1203 1242 +hsync +vsync
# 1920x1200 @ 75Hz
# Modeline "1920x1200" 246.590 1920 2064 2272 2624 1200 1201 1203 1253 +hsync +vsync
# 2048x1536 @ 60
# Modeline "2048x1536" 266.952 2048 2200 2424 2800 1536 1537 1540 1589 +hsync +vsync
# 2048x1536 @ 60
# Modeline "2048x1536" 266.952 2048 2200 2424 2800 1536 1537 1540 1589 +hsync +vsync
# 1400x1050 @ 60Hz M9 Laptop mode
# ModeLine "1400x1050" 122.000 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
# 1920x2400 @ 25Hz for IBM T221, VS VP2290 and compatible display devices
# Modeline "1920x2400@25" 124.620 1920 1928 1980 2048 2400 2401 2403 2434 +hsync +vsync
# 1920x2400 @ 30Hz for IBM T221, VS VP2290 and compatible display devices
# Modeline "1920x2400@30" 149.250 1920 1928 1982 2044 2400 2402 2404 2434 +hsync +vsync

EndSection


# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

# Standard VGA Device:

Section "Device"
Identifier "Standard VGA"
VendorName "Unknown"
BoardName "Unknown"

# The chipset line is optional in most cases. It can be used to override
# the driver's chipset detection, and should not normally be specified.

# Chipset "generic"

# The Driver line must be present. When using run-time loadable driver
# modules, this line instructs the server to load the specified driver
# module. Even when not using loadable driver modules, this line
# indicates which driver should interpret the information in this section.

Driver "vga"
# The BusID line is used to specify which of possibly multiple devices
# this section is intended for. When this line isn't present, a device
# section can only match up with the primary video device. For PCI
# devices a line like the following could be used. This line should not
# normally be included unless there is more than one video device
# installed.

# BusID "PCI:0:10:0"

# VideoRam 256

# Clocks 25.2 28.3

EndSection

# === ATI device section ===

Section "Device"
Identifier "ATI Graphics Adapter connector 0"
Driver "fglrx"
# ### generic DRI settings ###
# === disable PnP Monitor ===
#Option "NoDDC"
# === disable/enable XAA/DRI ===
Option "no_accel" "no"
Option "no_dri" "no"
# === misc DRI settings ===
Option "mtrr" "off" # disable DRI mtrr mapper, driver has its own code for mtrr
# ### FireGL DDX driver module specific settings ###
# === Screen Management ===
Option "DesktopSetup" "(null)"
Option "ScreenOverlap" "0"
Option "GammaCorrectionI" "0x00000000"
Option "GammaCorrectionII" "0x00000000"
# === OpenGL specific profiles/settings ===
Option "Capabilities" "0x00000000"
Option "CapabilitiesEx" "0x00000000"
# === Video Overlay for the Xv extension ===
Option "VideoOverlay" "on"
# === OpenGL Overlay ===
# Note: When OpenGL Overlay is enabled, Video Overlay
# will be disabled automatically
Option "OpenGLOverlay" "off"
# === Center Mode (Laptops only) ===
Option "CenterMode" "off"
# === Pseudo Color Visuals (8-bit visuals) ===
Option "PseudoColorVisuals" "off"
# === QBS Management ===
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
# === FSAA Management ===
Option "FSAAEnable" "no"
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
# === Misc Options ===
Option "UseFastTLS" "0"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "yes"
Option "ForceGenericCPU" "no"
BusID "PCI:1:0:0" # vendor=1002, device=4e48
Screen 0
EndSection

Section "Device"
Identifier "ATI Graphics Adapter connector 1"
Driver "fglrx"
BusID "PCI:1:0:0" # vendor=1002, device=4e48
Screen 1
EndSection


# **********************************************************************
# Screen sections
# **********************************************************************

# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
Identifier "Screen0"
Device "ATI Graphics Adapter connector 0"
Monitor "Monitor0"
DefaultDepth 24
#Option "backingstore"

Subsection "Display"
Depth 24
Modes "1600x1200"
ViewPort 0 0 # initial origin if mode is smaller than desktop
# Virtual 1280 1024
EndSubsection
EndSection

Section "Screen"
Identifier "Screen1"
Device "ATI Graphics Adapter connector 1"
Monitor "Monitor1"
DefaultDepth 24
#Option "backingstore"

Subsection "Display"
Depth 24
Modes "1600x1200"
ViewPort 0 0 # initial origin if mode is smaller than desktop
# Virtual 1280 1024
EndSubsection
EndSection

# **********************************************************************
# ServerLayout sections.
# **********************************************************************

# Any number of ServerLayout sections may be present. Each describes
# the way multiple screens are organised. A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option. In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.

Section "ServerLayout"

# The Identifier line must be present
Identifier "Server Layout"

# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens. The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.

Screen "Screen0"
Screen "Screen1" LeftOf "Screen0"

# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used. Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".

InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"

EndSection

### EOF ###

Ubuntu Radeon

https://wiki.ubuntu.com/BinaryDriverHowto/ATI
completed 1-5