One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2008 Oct 29 - Wed

Choosing a GCC Version

Debian Lenny has a very recent GCC Compiler for those who wish to build things with the latest and greatest, which is v4.3 something or other. On the other hand, the kernel is built with GCC 4.1. Kernel modules, as a result need to be built with GCC 4.1. The VMWare tools are one example of this requirement.

I've finally figured out what the CC environment variable can be used for. By keeping gcc-4.3 as a standard default, one can use 'export CC=gcc-4.1' to make use of the older GCC v4.1 compiler for compiling kernel modules.

[/OpenSource/Debian] permanent link


Root Login Through KDE

It typically isn't a good idea to login into a server as root. A basic Debian install, in non-expert mode, requires an alternate user name to be set up. Only in an expert mode install can one skip that step. If one installs in expert mode, and skips the step of installing a regular user, then trying to log in to KDE after an 'apt-get install kde' is impossible. Well, almost impossible.

An adjustment needs to be made to a file called kdmrc, which can be found in /etc/kde3/kdm. The next version of KDE will probably change the directory in which it is located, so use 'locate kdmrc' to figure out the location if not found where it is expected.

Setting AllowRootLogin to true will allow a root login after a reboot. As I find I do more root stuff than not, this is a nice little trick.

[/OpenSource/Debian] permanent link


2008 Oct 27 - Mon

Interactive Brokers TWS on Linux

Installing Interactive Brokers Traders Workstation on Linux is relatively painless. It is probably best to stick with Java Runtime 1.5 rather than using 1.6. The IB forums mention problems with 1.6, and Think Or Swim does not like 1.6 either: apt-get install jre-java5-jre. This will require non-free and contrib in the /etc/apt/sources.list file. After installation, 'update-alternatives --config java' will get the right version set.

The IB suggested command line has problems with hsqldb.jar. I use the following command line as an alternative:

java -cp \
jts.jar:pluginsupport.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:other.jar:riskfeed.jar:rss.jar:/usr/share/java/hsqldb.jar \ 
-Xmx256M jclient.LoginFrame . &

[/Trading] permanent link


NVidia/FX1700 on HP xw8600 with Debian/AMD64 Lenny

I recently obtained an HP xw8600 workstation with an E5420 series processor and two NVidia FX1700 dual head DVI video cards. This provides the ability for four monitors, which in this case, are four HP LP2065 1600x1200 pixel 20" LCD monitors.

Getting these monitors to work together in XP was easy.

To do the same in Debian/Linux was, well, less easy. There was much trial and error. I think Gnome and KDE interact with the drivers differently. I think KDE has more flexibility, but ultimately I was able to get the driver/monitor combination working independently of which GUI solution I was using.

The fly in the ointment is that I want my monitors in portrait mode, rather than landscape mode. It was difficult figuring out if I needed Xinerama or xrandr to the job. More on this further down.

There are two basic steps to my installation: get the NVidia drivers installed, then get everything configured.

I used the current Lenny beta of Debian/AMD64 Net Installation (AMD64 is another misnomer, one needs the AMD64 version to run the Intel64 version, wouldn't there be a better name for this?) to get the operating system and graphics installed. I then went to Debian Wiki NvidiaGraphicsDrivers for inspiration on how to get the drivers installed. I would recommend not going there. The decision tree and instruction sets are not very well designed.

Instead, go to Pendrivelinux. The instructions are dead simple and accurate. The only change is that I downloaded the more recent 64 bit NVidia driver: NVidia NVIDIA-Linux-x86_64-177.80-pkg2.run.

Knowing about "apt-get install build-essential linux-headers-$(uname -r)" is good for installing a minimal build system after getting a minimal operating system installed.

Something else good to know is the ctl-alt-backspace to exit the GUI to a command line. All except gdm wants to start back up again. The solution for that is to open a terminal window, do a "ps aux | grep gdm" and then kill the process.

The hard part was getting the driver configured with portrait mode monitors. For configuration, the tool at Applications-> System Tools -> NVIDIA X Server Settings can be used. I had to resort to a few minor manual edits of /etc/X11/xorg.conf to make things work. In any case, some documentation stated that Xinerama wouldn't work for rotated monitors, and that I should use xrandr. In my case, the opposite is true. xrandr doesn't work, and Xinerama does work with a couple of manual xorg.conf tweaks.

When testing, a useful console command to start the GUI is: startx -- -layout Layout0

Here is my final xorg.conf file:

Section "ServerLayout"
    Identifier     "Layout0"
# a little out of order, but that is the order in which I plugged them
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 2400 0
    Screen      2  "Screen2" 1200 0
    Screen      3  "Screen3" 3600 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "1"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "HP LP2065"
    HorizSync       30.0 - 92.0
    VertRefresh     48.0 - 85.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor3"
    VendorName     "Unknown"
    ModelName      "HP LP2065"
    HorizSync       30.0 - 92.0
    VertRefresh     48.0 - 85.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "HP LP2065"
    HorizSync       30.0 - 92.0
    VertRefresh     48.0 - 85.0
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "HP LP2065"
    HorizSync       30.0 - 92.0
    VertRefresh     48.0 - 85.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 1700"
    BusID          "PCI:96:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 1700"
    BusID          "PCI:96:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 1700"
    BusID          "PCI:128:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 1700"
    BusID          "PCI:128:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
#    Option         "RandRRotation" "on"
#    Option         "Rotate" "right"
    Option         "Rotate" "CW"
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DFP-0: 1600x1200 +0+0; DFP-0: nvidia-auto-select +0+0; DFP-0: 1440x900 
+0+0; DFP-0: 1400x1050 +0+0; DFP-0: 1400x1050_70 +
0+0; DFP-0: 1400x1050_60 +0+0; DFP-0: 1280x1024 +0+0; DFP-0: 1280x1024_75 +0+0; DFP-0: 1280x1024_60 +0+0; 
DFP-0: 1280x960 +0+0; DFP-0: 1280x960_60 +0+0;
DFP-0: 1280x800 +0+0; DFP-0: 1280x768 +0+0; DFP-0: 1152x864 +0+0; DFP-0: 1152x864_75 +0+0; DFP-0: 1152x768 
+0+0; DFP-0: 1024x768 +0+0; DFP-0: 1024x768_75
 +0+0; DFP-0: 1024x768_70 +0+0; DFP-0: 1024x768_60 +0+0; DFP-0: 960x720 +0+0; DFP-0: 960x600 +0+0; DFP-0: 
960x600d60 +0+0; DFP-0: 928x696 +0+0; DFP-0: 89
6x672 +0+0; DFP-0: 840x525 +0+0; DFP-0: 832x624 +0+0; DFP-0: 800x600 +0+0; DFP-0: 800x600_85_0 +0+0; 
DFP-0: 800x600_75 +0+0; DFP-0: 800x600_72 +0+0; DFP-
0: 800x600_60 +0+0; DFP-0: 800x600_56 +0+0; DFP-0: 800x600d70 +0+0; DFP-0: 800x600d65 +0+0; DFP-0: 
800x600d60 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    Monitor        "Monitor3"
    DefaultDepth    24
#    Option         "RandRRotation" "on"
#    Option         "Rotate" "right"
    Option         "Rotate" "CW"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device2"
    Monitor        "Monitor1"
    DefaultDepth    24
#    Option         "RandRRotation" "on"
#    Option         "Rotate" "right"
    Option         "Rotate" "CW"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device1"
    Monitor        "Monitor2"
    DefaultDepth    24
#    Option         "RandRRotation" "on"
#    Option         "Rotate" "right"
    Option         "Rotate" "CW"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
 

[/OpenSource/Debian] permanent link


2008 Oct 24 - Fri

Single User Mode

From Single User Mode, I like the following extract for root password recovery:

If you get asked for the root password when entering single user mode use 'init=/bin/bash' on the kernel append line which should 
boot the machine into a bash console where you can get read/write access to your /etc/shadow file. You can then either run `passwd` 
or edit the shadow file directly to put in an empty string. This allows you to reboot the machine into its normal environment and 
login as root leaving the password blank and then run the `passwd` program to set the root password. This should really only be done 
when the machine is detached from any networks.

[/OpenSource/Debian] permanent link


2008 Oct 10 - Fri

Boost Build

Boost C++ Library has a large number of interesting modules. Most of the modules are header only templates readily used on many platforms and many recent version compilers.

A few of the modules, such as Regex and DateTime, need to be compiled into static or dynamic link libraries. To do so, requires the use of Boost's build tool: bjam.

To build all variations of the libraries, single/multithreaded, debug/release, and static/dynamic, the command is simple (example for windows):

bjam --toolset=msvc --build-type=complete stage

Finding out how to build a subset of the libraries is a bit harder. The options I use are:

bjam --toolset=msvc variant=debug,release threading=multi link=static stage

[/OpenSource/Programming] permanent link



Blog Content ©2008
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



October
Su Mo Tu We Th Fr Sa
     
 


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge

2008
Months
Oct Dec




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.