tag:blogger.com,1999:blog-36959338670412525952024-02-22T01:09:23.664-08:00Observations from the castleB. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-3695933867041252595.post-21694317050064220622011-06-03T10:02:00.000-07:002011-06-03T12:31:46.335-07:00Android hackingSo I bought an Android Archos 32 for my 5 year old daughter. A tiny device, ideal for fun things she can do (without spending money, it's wifi only).<br /><br />I also want to see with it what is possible with python on this device, and if perhaps I can port a part of Gramps to there. Well, it will not be easy it seems, but something is possible. I'm thinking about an reader that can understand the Gramps xml fileformat.<br /><br />So, what is needed to try things out?<br /><ol><li>SL4A (scripting layer for android), so download it on your phone by clicking the barcode on : <a href="http://code.google.com/p/android-scripting/">http://code.google.com/p/android-scripting/</a><br />Then when downloaded, go to downloads on your android phone, and click the download to install it.<br /></li><li>Next, install python for SL4A, latest version of PythonForAndroid from <a href="http://code.google.com/p/android-scripting/downloads/list">http://code.google.com/p/android-scripting/downloads/list</a><br />Again, click it in the Downloads to install it, then open run in and the app you see will have an install button at the top. Click that to install python and extra python modules/scripts<br /></li><li>You are now ready on your phone, click the SL4A app and you will see a list of scripts, click one to run it in a terminal or run it standalone</li><li>To develop, you need to have a good PC/laptop, and install the android emulator there. Follow eg the walkthrough on <a href="http://hameedullah.com/develop-your-first-android-application-in-python.html">this blog</a>. So download <a href="http://developer.android.com/sdk/index.html">the SDK</a>, install it, and run it by typing in the tools directory <code>./android</code>, then in the emulated phone, install again SL4A and python4android.</li><li>Write a script on your PC. Eg, I write an application in <blockquote>~/gramps/android</blockquote> push it to the open emulated android, go in the platform-tools directory from the SDK and run <blockquote>./adb push ~/gramps/android/ /sdcard/sl4a/scripts/</blockquote></li><li>On the emulated phone, you will see the script in SL4A, and you can click it to run it.</li><li>Once your script is not crashing your emulated phone anymore, you can push it to your actual phone: connect the phone to your PC in usb-mode, and move the file to /sdcard/sl4a/scripts/ on the phone. You can now run it in SL4A on the actual phone.</li></ol>So, what is my first android script? A framework to read gramps xml files, so<br /><br /><br /><pre><br />#<br /># Gramps - a GTK+/GNOME based genealogy program<br />#<br /># Copyright (C) 2011 Benny Malengier<br />#<br /># This program is free software; you can redistribute it and/or modify<br /># it under the terms of the GNU General Public License as published by<br /># the Free Software Foundation; either version 2 of the License, or<br /># (at your option) any later version.<br />#<br /># This program is distributed in the hope that it will be useful,<br /># but WITHOUT ANY WARRANTY; without even the implied warranty of<br /># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br /># GNU General Public License for more details.<br />#<br /># You should have received a copy of the GNU General Public License<br /># along with this program; if not, write to the Free Software<br /># Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br />#<br /><br /># $Id: gramps.py 17390 2011-05-03 14:38:54Z nick-h $<br /><br />#-------------------------------------------------------------------------<br />#<br /># Python modules<br />#<br />#-------------------------------------------------------------------------<br /><br />import android<br />import os<br />import sys<br /><br /><br />BASE_PATH = '/sdcard/gramps'<br />if not os.path.isdir(BASE_PATH):<br /> os.mkdir(BASE_PATH)<br /><br /><br />#different states<br />ST_START = 0<br />ST_STOP = 1<br />ST_LOADXML = 2<br />ST_SELOBJTYPE = 3<br /><br />class grampsA:<br /> def __init__(self, droid ):<br /> self.droid = droid<br /> self.state = ST_START<br /> self.error = None<br /><br /> def run(self):<br /> while True:<br /> if self.state == ST_STOP:<br /> break<br /> elif self.state == ST_START:<br /> self.setxmlfile()<br /> else:<br /> print 'Unknown State'<br /> break<br /> #check if we have an error, if so alert user and exit<br /> if self.error:<br /> self.showerror(self.error)<br /> break<br /> <br /> def showerror(self, error):<br /> self.droid.dialogCreateAlert('Error encountered: %s' % self.error)<br /> self.droid.dialogSetPositiveButtonText('Close')<br /> self.droid.dialogShow()<br /> response = self.droid.dialogGetResponse().result<br /> <br /> def setxmlfile(self):<br /> title = 'Select Gramps xml file from %s' % BASE_PATH<br /> files = [item for item in os.listdir(BASE_PATH)]<br /> if not files:<br /> self.droid.dialogCreateAlert('No files found in %s! Move a file there.'<br /> % BASE_PATH)<br /> self.droid.dialogSetPositiveButtonText('OK')<br /> self.droid.dialogShow()<br /> response = self.droid.dialogGetResponse().result<br /> self.state = ST_STOP<br /> return<br /> <br /> self.droid.dialogCreateAlert('Select file')<br /> self.droid.dialogSetItems(files)<br /> self.droid.dialogSetNegativeButtonText('Stop')<br /> self.droid.dialogShow()<br /> response = self.droid.dialogGetResponse().result<br /> if response.has_key('which') and response['which'] == 'negative':<br /> self.state = ST_STOP<br /> return<br /> <br /> sel = self.droid.dialogGetResponse().result['item']<br /> try:<br /> self.xmlfile = files[sel]<br /> self.droid.makeToast(self.xmlfile + ' chosen')<br /> except:<br /> self.error = 'Wrong response from file selection'<br /> return<br /> #next the xml file must be loaded, we import it in a dict database.<br /> <br /><br />def main( ):<br /> grampsA( android.Android( ) ).run()<br /> <br />if __name__ == '__main__':<br /> main()<br /></pre>B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com3tag:blogger.com,1999:blog-3695933867041252595.post-53599689007111954582011-01-20T00:57:00.000-08:002011-01-20T04:34:33.566-08:00A fresh DiffusionIT installGuide for <a href="http://gitorious.org/diffusionit">DiffusionIT</a> install on a freshly installed ubuntu:<br /><blockquote>sudo apt-get install python-numpy python-scipy python-matplotlib python-gnuplot git git-gui spe<br />sudo apt-get install python-dev<br /></blockquote>The last is needed to allow weave compiling inline.<br />Now configure git<br /><span></span><blockquote><span>git</span> config --global user.name "Your full name"<br /><span>git</span> config --global user.email "mymail@mail.com"<br /><br /><span>git</span> config --global color.diff auto<br /><span>git</span> config --global color.status auto<br /><span>git</span> config --global color.branch auto</blockquote>To just use the code, we make a directory to extract the code to<br /><blockquote>mkdir <span class="il">diffusionit</span><br />cd <span class="il">diffusionit</span>/<br /><span>git</span> <span>init</span><br /><span>git</span> <span>remote add origin git://gitorious.org/<wbr>diffusionit.git</span><br /><span>git</span> fetch<br /><span>git</span> checkout origin/master<br /><span>git</span> checkout -b master<br /><span>git</span> branch -a</blockquote>If you have commit rights, you can push to the code to update it, but you must setup your remote repo differently. You can change this in the file diffusionit/.git/config. If you are doing things from scratch, change the git remote line above by<br /><span></span><blockquote><span>git</span> remote add origin <span>git</span>@gitorious.org:diffusionit/diffusionit.git</blockquote>You do need to create a login on gitorious and set up ssh passwords to use for the connection, see eg <a href="http://kb.siteground.com/article/How_to_generate_an_SSH_key_in_Linux.html">this post</a>.<br />Once that is ok, a typical development cycle is<br /><span></span><blockquote><span>git</span> status # check if ok<br /><span>git</span> add . # add changed files<br />git diff # check your changes if ok<br /><span>git</span> commit -m "blabla<br /><div> <span>git</span> push</div></blockquote><div></div>To obtain changes that happened remote by somebody else<br /><blockquote>git fetch<br />git rebase origin/master</blockquote>Those are the main commands if you don't intend to become a code-master :-)B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-56728763503718637212010-12-23T01:46:00.001-08:002010-12-23T05:21:03.754-08:00Livebox automount of usb HDOk, I'm streaming from my Mobistar Livebox to my PS3, but no thumbnails, bad directory structure, ...<br />So, I'd also have Mediatomb installed on my laptop, and want to be able to use that too.<br /><br />Mediatomb needs a mounted filesystem however, whereas I now connect to it via smb://livebox/DisquesUSB/HD204UI/data/ in Dolphin.<br /><br />So here how I mount that on the different systems:<br /><blockquote>cd /media/<br />sudo mkdir liveboxUsbHD</blockquote>test it:<br /><blockquote>sudo mount -t smbfs -o username=theuser,password=hispass //livebox/DisquesUSB/HD204UI /media/liveboxUsbHD</blockquote>The directory /media/liveboxUsbHD should contain the files.<br />For automatic mounting:<br /><span style="font-family: verdana;font-family:Courier New;" ></span><blockquote><span style="font-family: verdana;font-family:Courier New;" >cd /etc/init.d<br /></span><span style="font-family: verdana;font-family:Courier New;" >sudo kate start_smb</span></blockquote>And have this file contain the above line<br /><span style="font-family:Courier New;"></span><blockquote><span style="font-family:Courier New;">#!/bin/bash</span><br />sudo mount -t smbfs -o username=theuser,password=hispass //livebox/DisquesUSB/HD204UI /media/liveboxUsbHD</blockquote>So we use smbfs, cifs should work too and is even needed if a real windows share. Anyway, the file contains your password, so hide it and give it correct permissions:<br /><blockquote>sudo chmod 550 start_smb<br /><span style="font-family: verdana;font-family:Courier New;" >sudo update-rc.d start_smb defaults</span><br /></blockquote>In case the samba share is not available on start-up, you can create the link on a later time with:<br /><blockquote>sudo ./etc/init.d/start_smb</blockquote>That's it!B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-32906561263861110862010-08-19T05:13:00.001-07:002010-08-19T05:31:58.668-07:00sound out on Dell studio XPSI bought some nice boxes so as to be able to have nicer sound for the radio stations I listen to, but look, the headphone out jack of my dell studio xps is not working in Kubuntu 10.04!<br /><br />Apparently the default for sound is using the bios configuration, and as I see no sound option in the bios that means I cannot repear the error there. All info to fix it is on the <a href="https://help.ubuntu.com/community/HdaIntelSoundHowto">ubuntu community wiki</a>.<br /><br />So, for this laptop, fire up eg Kinfocenter, and see under sound:<br /><blockquote>Audio devices:<br />0: STAC92xx Analog (Duplex)<br /><br />Mixers:<br />0: IDT 92HD73C1X5</blockquote><br /><br />Looking at the <a href="file:///usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz">HD audio models documention</a>, we see<br /><br /><blockquote>STAC92HD73*<br />===========<br /> ref Reference board<br /> no-jd BIOS setup but without jack-detection<br /> intel Intel DG45* mobos<br /> dell-m6-amic Dell desktops/laptops with analog mics<br /> dell-m6-dmic Dell desktops/laptops with digital mics<br /> dell-m6 Dell desktops/laptops with both type of mics<br /> dell-eq Dell desktops/laptops<br /> alienware Alienware M17x<br /> auto BIOS setup (default)<br /></blockquote><br />So as said, the BIOS setting is the default. So let's change it to dell-m6:<br /><blockquote>sudo kate /etc/modprobe.d/alsa-base.conf</blockquote><br />and add at the end of the file:<br /><blockquote>options snd-hda-intel model=dell-m6</blockquote><br />Reboot, and yes, sound is available on one of the headphone out jacks. The above line is also what is listed on <a href="http://ubuntuforums.org/showthread.php?t=1043568">the forum</a>. Should you know how to make both headphone out to work, let me know.B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-14519384478799428252010-06-10T03:05:00.001-07:002010-06-10T03:26:02.229-07:00A0 poster with latex<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiycKaTgaWYaYsxI-kprKo2dRfxW06RZoE6AbysfmcB2SXNJMfUMdII4pSWSLwqPWblaB1bz0tl6rHIeUjMHAXPXYCM4hmoCTEdl1-HWkL2zsQPw5ibQ5Si1DsFB-qAW0NkZ_ZY9ryHSIM/s1600/poster_prview.png"><img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 229px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiycKaTgaWYaYsxI-kprKo2dRfxW06RZoE6AbysfmcB2SXNJMfUMdII4pSWSLwqPWblaB1bz0tl6rHIeUjMHAXPXYCM4hmoCTEdl1-HWkL2zsQPw5ibQ5Si1DsFB-qAW0NkZ_ZY9ryHSIM/s320/poster_prview.png" alt="" id="BLOGGER_PHOTO_ID_5481089302747349714" border="0" /></a><br />I had to make an A0 poster for a conference. As I had my source in LaTeX, I tried for the first time to do it with latex. It worked better than I thought.<br /><br />First, at UGent, one can print the poster with <a href="http://www.elis.ugent.be/nl/designjet">http://www.elis.ugent.be/nl/designjet</a><br /><br />Second, a latex base file using columns and posterboxes, is at <a href="http://www.sgeier.net/poster/">http://www.sgeier.net/poster/</a>. I had to change it a bit to get it working ok though: remove some /hfill and /vfill calls, add some \mbox{\ } as needed.<br /><br />Note that in Europe, you would want to create an A3 example, then scale it by 2.8 to obtain an A0 poster. So you need the following width and height in the tex:<br /><blockquote>\def\layoutwidth{297mm} % A3 portrait, A0 when scaled 2.82<br />\def\layoutheight{420mm}<br />\def\numcolumns{3}</blockquote>The above produces a bad dvi file when compiled with LaTeX though, you need to run the command<br /><blockquote></blockquote><blockquote>dvips -Ppdf -G0 -o poster.ps poster</blockquote>to obtain a nice ps file okular can nicely show. You can then print this to an A3 printer with good results.<br /><br />Third step is to scale it to A0 poster. You need the<a href="http://www.sgeier.net/poster/poster_resize"> poster_resize</a> script for this:<br /><blockquote>csh poster_resize poster.ps 2.8</blockquote>This creates a poster.resize.ps file which is an A0 print. If you do not have csh, sudo apt-get install it!<br /><br />Fourth step is to create a backup: split the A0 poster in 16 A4 sheets you can plot on a colour printer and glue together yourself:<br /><blockquote>poster -iA0 -mA4 -pA0 poster.resize.ps > posterA4.ps</blockquote>That is it. If you do not have the <span style="font-weight: bold;">poster </span>program, it should be available in your package manager (sudo apt-get install poster).B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-22595671211441826962009-08-14T07:27:00.001-07:002010-07-14T09:35:13.624-07:00upgrade, reinstall scipySo I jumped on the upgrade wagon again with ubuntu, but now I need to obtain last versions of scipy again. All is now python2.6, and only gfortran is supported anymore. Make sure g77 is completely removed, and gfortran latest distro package<br /><br />The workflow:<br /><br />NOTE: use the <span style="font-style: italic;">--prefix /usr</span> flag if setup.py installs in the wrong directory.<br /><br />1. make sure you do not have the repository stuff installed or old versions:<br /><blockquote style="font-family: courier new;">sudo apt-get remove python-scipy python-numpy python-matplotlib python-gnuplot<br />sudo rm -rf /usr/lib/python2.6/site-packages<br />sudo rm -rf /usr/lib/python2.6/dist-packages/numpy<br />sudo rm -rf /usr/lib/python2.6/dist-packages/scipy<br />sudo rm -rf /usr/lib/python2.6/dist-packages/matplotlib<br />sudo rm -rf /usr/lib/python2.6/dist-packages/scikits*</blockquote>2. obtain source code if you do not have it yet:<br /><div style="text-align: left;"><blockquote><span style=";font-family:courier new;font-size:100%;" >svn co http://svn.scipy.org/svn/numpy/trunk numpy<br />svn co http://svn.scipy.org/svn/scipy/trunk scipy<br /></span><pre><span style=";font-family:courier new;font-size:100%;" >svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib<br />svn co https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/trunk gnuplot-py<br />svn co http://svn.scipy.org/svn/scikits/trunk/odes odes</span><br /></pre></blockquote></div>3. Make sure you have the dependencies, eg<br /><div style="text-align: left; font-family: courier new;"><blockquote>sudo apt-get install python-dev python-setuptools</blockquote> For matplotlib, gtk backend, see build depend of <a href="http://packages.ubuntu.com/source/lucid/python/matplotlib">the ubuntu package</a>.<br />I used:<br /><blockquote><br />sudo apt-get install libpng-dev libgtk2.0-dev python-gtk2-dev python-imaging python-qt4 python-qt4-dev python-tz python-wxgtk2.8 zlib1g-dev libfreetype6-dev</blockquote><br /></div><br />4. go to numpy, update, compile, and install. Normally you need to remove /usr/lib/python2.6/site-packages/scipy or /usr/lib/python2.6/dist-packages/scipy and same for numpy first, but as python2.6 is new, those are not present.<br /><br /><blockquote>cd numpy<br />sudo rm -rf build<br />svn up<br />sudo python setup.py install --install-layout=deb<br /><br />cd scipy<br />sudo rm -rf build<br />svn up<br />sudo python setup.py install --install-layout=deb<br /><br />cd matplotlib<br />sudo rm -rf build<br />svn up<br />sudo python setup.py install --install-layout=deb</blockquote><br />3. Now I can reinstall my own module in scikits<br /><br /><blockquote>cd programs/odes<br />sudo rm -rf build<br />svn up<br />sudo python setup.py install --install-layout=deb<br /></blockquote>Above works only on first install. Afterwards I obtain an error with zip files?? To resolve<br /><blockquote>rm -rf /usr/lib/python2.6/dist-packages/scikits/odes<br />sudo rm -rf build<br />sudo python setup.py install --single-version-externally-managed --root / --install-layout=deb</blockquote>And then it is time to test if all is working again.<br />Interesting resource: <a href="http://docs.python.org/install/index.html">python distutils</a>B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-30902965164318933102009-05-28T04:04:00.000-07:002009-05-28T05:42:11.758-07:00Jaunty, ati/radeon and a big desktop with xrandrBuggers, my ati card is no longer supported by the fglrx driver of ati. Full 3D support is present though in the open source driver. Big desktop over two screens? Well 'man radeon' claims it is present. However, I noticed also bug <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/348332">348332 </a><br /><br />So I waited with the upgrade, but today, I felt lucky and did the upgrade. Not a good idea.<br /><br />First, although the upgrade manager said fglrx would not be installed, it did not regenerate my xorg file. So X crashed on startup. Alt+F1, a login and a "<span style="font-style: italic;">sudo dpkg-reconfigure -phigh xorg-server</span>" later, I had my X back.<br /><br />I got bit by bug 348332 very quickly though, so disabled desktop effects in the system settings for now. No option to make a big desktop in these settings though, so apparently that will be a manual install.<br /><br />But first getting my effects back. A trip to <a href="http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v2.6.29.4/">http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.29.4/</a> and then install of the relevant components:<br /><span style="font-size:85%;"><span style="font-style: italic;"></span></span><blockquote><span style="font-size:85%;"><span style="font-style: italic;">sudo dpkg -i linux-headers-2.6.29-02062904_2.6.29-02062904_all.deb linux-headers-2.6.29-02062904-generic_2.6.29-02062904_amd64.deb linux-image-2.6.29-02062904-generic_2.6.29-02062904_amd64.deb</span></span></blockquote><br /><br />After restart things looked ok:<br /><span style="font-size:85%;"><span style="font-style: italic;"></span></span><blockquote><span style="font-size:85%;"><span style="font-style: italic;">$ uname -a</span> <span style="font-style: italic;">Linux bmwork 2.6.29-02062904-generic #02062904 SMP Sat May 23 23:35:48 UTC 2009 x86_64 GNU/Linux</span></span></blockquote>And re-enabling desktop effects was ok too. Still waiting for a crash, but all looks good so far.<br /><br />So, now, how to get my big desktop back. My setup is using the default xorg.conf the radeon driver. My xorg.conf:<br /><br /><span style="font-size:78%;"></span><blockquote><span style="font-size:78%;">Section "Device"<br /> Identifier "Configured Video Device"<br />EndSection<br /><br />Section "Monitor"<br /> Identifier "Configured Monitor"<br />EndSection<br /><br />Section "Screen"<br /> Identifier "Default Screen"<br /> Monitor "Configured Monitor"<br /> Device "Configured Video Device"<br />EndSection</span></blockquote>Apparently we are supposed to use <a href="http://wiki.x.org/wiki/Projects/XRandR">xrandr</a> (see good <a href="http://intellinuxgraphics.org/dualhead.html">intel guide</a>) now for enabling a big desktop. First let's see if it is enabled:<br /><span style="font-size:85%;"></span><blockquote><span style="font-size:85%;"><span style="font-style: italic;">$ xrandr -q</span><br />Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1280 x 1280<br />VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 340mm x 270mm<br /> 1280x1024 60.0 + 75.0 60.0<br /> 1024x768 75.0 70.1 60.0*<br /> 800x600 75.0 60.3<br /> 640x480 75.0 59.9<br /> 720x400 70.1<br />DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm<br /> 1024x768 60.0*+ 75.0 60.0*<br /> 800x600 75.0 60.3<br /> 640x480 75.0 59.9<br /> 720x400 70.1</span></blockquote>OK, my VGA and DVI output are both recognized and correctly enabled, one with identifier <span style="font-size:85%;"><span style="font-style: italic;">VGA-0</span> and one with </span><span style="font-style: italic;font-size:85%;" >DVI-0</span>. The default is clone mode though, which is what I indeed am seeing. To set my VGA left of the DVI I do:<br /><br /><span style="font-size:85%;"><span style="font-style: italic;"></span></span><blockquote><span style="font-size:85%;"><span style="font-style: italic;">$ </span></span><span style="font-style: italic;">xrandr --output VGA-0 --left-of DVI-0</span><br />xrandr: screen cannot be larger than 1280x1280 (desired size 2048x768)</blockquote>It did not work. We need to make sure we can have a virtual screen of 2048x768 before above will work. The graphics card should be capable of this. My /var/log/Xorg.0.log file says:<br /><blockquote>(II) RADEON(0): Max desktop size set to 2560x1600<br />(II) RADEON(0): For a larger or smaller max desktop size, add a Virtual line to your xorg.conf<br />(II) RADEON(0): If you are having trouble with 3D, reduce the desktop size by adjusting the Virtual line to your xorg.conf</blockquote>So add a Virtual line (see xorg.conf below), and all works.<br />Next, as given in the guides, you need to use xrandr commands to see if it works. Well, I can say it does not work 100% via the xrandr command in my case. The desktop got bigger indeed, but both screens kept showing the same thing. Fortunately, changing the xorg.conf file to do the xrandr settings worked like a charm. My new xorg.conf file is:<br /><br /><blockquote><span style="font-size:78%;">Section "Monitor"<br /> Identifier "VGA"<br />EndSection<br /><br />Section "Monitor"<br /> Identifier "DVI"<br /> Option "RightOf" "VGA"<br />EndSection<br /><br />Section "Device"<br /> Identifier "Configured Video Device"<br /> Option "Monitor-VGA-0" "VGA"<br /> Option "Monitor-DVI-0" "DVI"<br />EndSection<br /><br />Section "Screen"<br /> Identifier "Default Screen"<br /> Monitor "Configured Monitor"<br /> Device "Configured Video Device"<br /><br /> SubSection "Display"<br /> Depth 24<br /> Virtual 2048 768<br /> EndSubSection<br />EndSection<br /></span></blockquote>Things to note in the above:<br /><ol><li>The options in the Device section you see, <span style="font-weight: bold;">must</span> have the identifier as given by the <span style="font-style: italic;">xrandr -q</span> output, so<span style="font-style: italic;font-size:100%;" > </span><span style="font-size:78%;"><span style="font-style: italic;font-size:100%;" > Option "Monitor-VGA-0" "VGA" </span><span style="font-size:100%;">works but not </span></span><span style="font-style: italic;font-size:100%;" > </span><span style="font-size:78%;"><span style="font-style: italic;font-size:100%;" > Option "Monitor-VGA" "VGA" </span><span style="font-size:100%;"><br /></span></span></li><li><span style="font-size:78%;"> <span style="font-size:100%;">The <span style="font-style: italic;">Virtual 2048 768 </span>line in Display is where the maximum virtual size is set (see xrandr error above) you need for your display. Take it as low as possible, so you can have as much as possible depth (it eats memory on the card!)<br /></span></span></li></ol>Good. Half a day to get a working set-up. Perhaps I should not upgrade so often. Fortunately, 3D does seem to work like a charm on my dual head setup :-)B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com1tag:blogger.com,1999:blog-3695933867041252595.post-36366820115708610932008-11-03T11:06:00.000-08:002008-11-03T11:18:50.754-08:00slow touchpad in (K)Ubuntu 8.10 Latitude D830My wife has a new work laptop. Install of Kubuntu Intrepid Ibex went fine, but vpnc did not work. Well, a bug entry in lauchpad solved that: <a href="https://bugs.launchpad.net/ubuntu/+source/knetworkmanager/+bug/280926/">280926</a><br /><br />Next, the touchpad was much too insensitive, and editing xorg.conf is no longer wanted with Xorg 7.3+ Fortunately another launchpad bug brought the solution: <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/177146">177146</a><br /><br />So now I have a file touchpadsens in my ~/.kde/Autostart directory with the contents:<br /><tt><br />#!/bin/bash<br />xinput set-ptr-feedback "AlpsPS/2 ALPS GlidePoint" 3 8 1<br /></tt><br />After that, the file touchpadsens is made executable:<br /><tt><br />chmod +x touchpadsens<br /></tt><br />and now, all looks fine... well till the next issue! I did not put dvd's or cd's in the drive, ....B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-92116701996086311652008-09-10T11:39:00.001-07:002008-09-10T12:07:42.949-07:00GRAMPS, client-server, SQL: Django?GRAMPS, client-server and SQL are 3 terms one normally does not find in the same sentence. For those not in the know, <a href="http://gramps-project.org/">GRAMPS</a> is a genealogy application which I started using in 2007, and ended up developing for. Gramps is a nice application, but it is a PC application storing it's data in a Berkeley DB embedded database for performance.<br /><br />Hence, it does not allow for collaboration, running on a single PC. The use of a low level database has the advantage of speed, at the expense of being less known, and a lot more complicated to work with. However, genealogy data as stored by GRAMPS is a verly linked set of relations, so fitting it in a relational type of database is no easy feat.<br /><br />Collaboration by exchanging your files in the gramps xml format is the way to go, but merging is not implemented yet, and even if added, people in the database world know that merging two diverging datasets back together is a very difficult task.<br /><br />Now, people might opt for another solution, going for one of the collaboration apps out there for genealogy, some even open source. However, those work on GEDCOM, which is not as versatile as GRAMPS, so it means not using GRAMPS anymore. However, obviously one cannot always have the internet in it's pocket, so a collaboration app that could work in the data model of GRAMPS would be great.<br /><br />It was hence with pleasure that I noticed that<a href="http://www.djangoproject.com/"> Django</a> had reached version 1.0. This is important as<br /><ol><li>Django is written in Python, so allows the use of GRAMPS code and logic directly. Present OSS collaboration apps for genealogy are in perl/php/...<br /></li><li>Django is a web application, so client-server is the way from the beginning</li><li>Django interfaces with SQL databases (MySQL, PostgreSQL, ...)</li><li>Write a model once, and without coding, administration code is available to edit the data via a web interface</li></ol>Based on this and the fact that I was interested in knowing/understanding/learning Django, I started translating the GRAMPS data model to a Django model. The aim is to get the administration tool working, and allow for import/export to gramps xml files.<br />With my web-design skills it is best to leave any web views to other developers, if there are any interested in that out there.<br /><br />I know, why do what has been done again, blah, blah, join forces with other OSS efforts. You know, that is just not how it works. Anarchy rules? Perhaps. My take on it is that the tools we use improve, so there is a constant need to rewrite what has been done so as to use these new shiny tools instead. In this case, setting up a Django app is too difficult for most PC users (apache server configuration anyone?) so it will not replace GRAMPS in any way. That would actually be impossible anyway I think. However, thinking GRAMPS can 'evolve' so as to have an SQL backend or become client-server aware, is also wishfull thinking as there is just too much legacy to be carried. Better start a new initiative and see later on if there is possibility to work together. In the worst case, experience will be learned with what works, and what doesn't<br /><br />More on the technical details some other time.B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0tag:blogger.com,1999:blog-3695933867041252595.post-22125717321455723992008-08-26T09:59:00.000-07:002008-08-26T10:03:08.699-07:00A beginningOk, time for a 'me too' moment. A blog it will be, just to ramble a bit about life. Must be mid-life coming up.<br /><br /><br />Then again, I might just have something usefull to say. About numerics, linux, redecorating, gardens and who knows, movies perhaps. And God, we should not forget him~B. Malengierhttp://www.blogger.com/profile/15312811341149887545noreply@blogger.com0