Phone: +65-8585-1750

Address: 30 Holland Close, Singapore

Open Source Software Blog

Please filter the entries below, or use the tag structure...

Type to Filter:

  • Fixing up Author and Committer emails in a Repo 14-Jul-2014

    Fixing up Author and Committer emails in a Repo GitHub doesn’t add emails that it doesn’t recognize into your ‘contributor score’ (and activity calendar, etc). This can be a particular gotcha if one develops on a local machine and commits as ‘username@localhost’ for instance. Steps to Fix the emails First, get fully in-sync with the current GitHub state : git pull git push For certainty, update your .git/config to reflect the user you actually want to be : #more .git/config ... Read More...

  • Install nvidia Optimus drivers on Fedora FC20 Acer Notebook - BumbleBee 15-Jun-2014

    Install nvidia Optimus drivers on Fedora FC20 Acer Notebook - BumbleBee The Acer i5 laptop comes with two graphics paths : The i5 associated (Intel) chipset, and A ‘discrete’ nVidia GT 750M / 4Gb graphics card (which looks like the more interesting OpenCL device) One issue, though, is that the Intel graphics chip is low-power, and I love the ~7hr battery life. Whereas running the NVidia card (according to people on the internet) reduces the laptop battery life to 1.5hr. Read More...

  • Install Radeon OpenCL drivers on Fedora FC20 5-Jun-2014

    Install ATI Radeon OpenCL drivers on Fedora FC20 Basic steps : Install ATI Official Drivers (see other post) Install additional SDK stuff for OpenCL Prove that the install worked Get the OpenCL SDK File name (search on AMD site) : AMD-APP-SDK : http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-tools-sdks/amd-accelerated-parallel-processing-app-sdk/ There is a way to get wget to provide a suitable phoney browser user-agent, but it escapes me for now. It’s a 130Mb file… yum install opencl-headers mkdir AMD-APP-SDK mv AMD-APP-SDK-v2.9-lnx64.tgz AMD-APP-SDK/ cd AMD-APP-SDK/ tar -tzf AMD-APP-SDK-v2.9-lnx64.tgz more ReadMe.txt ./Install-AMD-APP.sh Check whether the icd files are right : more /etc/OpenCL/vendors/amdocl64.icd Checking whether the card is there Fedora has a clinfo package, which is useful : yum install clinfo clinfo Gives : No protocol specified Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Read More...

  • Building VisualSFM on Fedora FC20 3-Jun-2014

    Install the VisualSFM system on Fedora (FC20) The VisualSFM system is the recommended way to use PMVS and CMVS : http://www.di.ens.fr/pmvs/ http://www.di.ens.fr/cmvs/ So, download the Linux 64-bit source code from : http://ccwu.me/vsfm/ The Process for Running VisualSFM : The following have to be run in a coordinated fashion, which is what VisualSFM does : Bundler CMVS PMVS2 Emphasising this, the notes for CMVS state : You should ALWAYS use CMVS after Bundler and before PMVS2 (even when your image set is small), because : PMVS2 will run faster and produce more accurate results with the produced clusters (see the bullet below for the reasoning.) CMVS produces option files (option-0000, option-0001, …) for PMVS2 and a script file (pmvs.sh) containing PMVS2 commands. Read More...

  • Install Official Radeon Catalyst drivers on Fedora FC20 30-May-2014

    Install ATI Radeon OpenCL drivers on Fedora FC20 Basic steps : Install ATI Official Drivers Fix the bugs Prove that the install worked Download the official drivers wget http://www2.ati.com/drivers/beta/linux-amd-catalyst-14.6-beta-v1.0-may23.zip unzip linux-amd-catalyst-14.6-beta-v1.0-may23.zip rm linux-amd-catalyst-14.6-beta-v1.0-may23.zip cd fglrx-14.20/ ./check.sh Then, as root, run the amd-driver-installer, and check that fglrx has been blacklisted : yum install kernel-devel kernel-headers gcc ./amd-driver-installer-14.20-x86.x86_64.run lsmod Success? : Next steps will be : joe /etc/modprobe.d/blacklist-fglrx.conf reboot No success? more /usr/share/ati/fglrx-install.log Fixing the bugs… Probably have to fix it up. Read More...

  • Install nvidia drivers on Fedora FC20 28-May-2014

    Install nvidia OpenCL drivers on Fedora FC20 Basic steps : Install nvidia Proprietary Drivers (mainly CUDA-oriented instructions) Install additional SDK stuff for OpenCL Prove that the install worked Download and install the nVidia driver For the official links, see : https://developer.nvidia.com/opencl http://www.nvidia.com/Download/index.aspx?lang=en-us The 64-bit linux driver takes me to : http://www.nvidia.com/download/driverResults.aspx/75019/en-us So that I can download : NVIDIA-Linux-x86_64-331.67.run NB : This has to be downloaded via a browser, so, since the target machine is (essentially) headless, I have to download to a regular machine and then rsync it over. Read More...

  • ARM Toolchain for STM32-F3 Discovery on Fedora 21-Mar-2013

    ARM Toolchain for STM32-F3 Discovery on Fedora Basic steps : Install stlink, so that linux recognizes the STM32 card over USB Install OpenOCD, which provides a ‘virtual JTAG’ debugging environment Redherring : CodeSourcery Install ARM gnu tools ‘gcc-arm-embedded’ Download the STM32-F3 supplier code (includes the demo .hex file, for instance) Get the STM32-F3-Discovery template Make the template’s simple blinking LED demo work Reflash the initial demo using stlink Off to do our own projects… Install stlink Have a look at the stlink github site. Read More...

  • Service restart script 26-Oct-2012

    Service restart script For when just restarting everything is more expedient than figuring out what’s really going on (i.e. don’t do this) : # more services.web.restart ## This is an alternative to : # run_count=`ps eax | grep ${process} | grep -v grep | wc -l` if [ ! "$(pidof mysqld)" ]; then service mysqld restart fi if [ ! "$(pidof php-cgi)" ]; then service php-cgi restart fi if [ ! Read More...

  • Building ceres-solver on Fedora 17 11-Oct-2012

    Building ceres-solver on Fedora 17 Simple first step : yum install gflags-devel The Fedora rpm package for ‘glog’ is older than required (i.e. it is <3.1), so it has to be built manually. So, as a precursor to the main build, one requires : wget http://google-glog.googlecode.com/files/glog-0.3.2.tar.gz tar -xzf glog-0.3.2.tar.gz cd glog-0.3.2 ./configure --with-gflags=/usr/ make sudo make install # This puts it in /usr/local/ by default Now pull in all the other required packages : yum install eigen3-devel suitesparse-devel blas-devel lapack-devel protobuf-devel and then follow the instructions in the PDF (or the steps below…) : git clone https://ceres-solver.googlesource.com/ceres-solver cd ceres-solver mkdir release cd release cmake -DGLOG_LIB=/usr/local/lib/libglog.so .. Read More...

  • Building OpenCV on Fedora 17 9-Oct-2012

    Building OpenCV on Fedora 17 Installation of required packages by root (first line is essential for everything, others depend on whether you want the video and GUI interfaces respectively): yum install cmake gcc-c++ yum install ffmpeg ffmpeg-devel yum install gtk2-devel Download the latest code : git clone git://code.opencv.org/opencv.git Build the code in an out-of-source directory (chosen to be ‘release’ here) : cd opencv mkdir release cd release cmake -D CMAKE_BUILD_TYPE=RELEASE .. Read More...

  • Building CIFS.ko for a no-name Android TV device 26-Jul-2012

    Building CIFS.ko for a no-name Android TV device Much more fill-in detail to follow… mkdir 2-kernel cd 2-kernel/ # http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source scp root@wifitv.herald:/proc/config.gz .. git clone https://android.googlesource.com/platform/prebuilt git clone git://github.com/madmaze/Meson-3-Kernel.git gunzip config.gz cp config Meson-3-Kernel/.config cd Meson-3-Kernel more .config git log export PATH=$(pwd)/../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH export ARCH=arm export SUBARCH=arm export CROSS_COMPILE=arm-eabi- # Hmmm - someone misplaced a folder... mkdir -p ../out/target/product/f16ref/root make menuconfig # Set 'M' next to CIFS (not '*' or 'Y') # http://forum.xda-developers.com/showthread.php?t=1113191 cp kernel/slow-work.{c,h} fs/cifs/ CREATE fs/cifs/slow-work-addon.c cat fs/cifs/slow-work-addon.c >> fs/cifs/slow-work.c scite fs/cifs/Makefile obj-$(CONFIG_CIFS) += cifs.o slow-work.o make scp fs/cifs/*.ko root@wifitv.herald:/mnt/sda1/2-Kernel/ # On android device : insmod /mnt/sda1/2-Kernel/slow-work.ko insmod /mnt/sda1/2-Kernel/cifs.ko cp /mnt/sda1/2-Kernel/*.ko /boot/ insmod /boot/slow-work.ko insmod /boot/cifs.ko 130|root@android:/data/local # cat /proc/kmsg 720 more .config 721 cp ../config .config 722 make menuconfig # Select the option to create a standalone CIFS module 723 make 728 cp kernel/slow-work.{c,h} fs/cifs/ 729 scite fs/cifs/slow-work.c 730 scite fs/cifs/slow-work-addon.c 732 cat fs/cifs/slow-work-addon.c >> fs/cifs/slow-work.c 733 scite fs/cifs/Makefile 734 make 741 more /etc/fstab 742 more /home/andrewsm/.cifs/bigdisk 743 man mount.cifs [andrewsm@square ~]$ cd ./Downloads/Android/root-tv-device/2-kernel/Meson-3-Kernel/fs/cifs/ [andrewsm@square cifs]$ ls -l *.ko -rw-r--r--. Read More...

  • Moving folder and history between git repos 21-Feb-2012

    Moving folder and history between git repos Problem : One part of a git-tracked repo has become an independent project in its own right. Moreover, there’s no need for participants in that project to have access to the rest of the repo. Idea : Move the independent project out into a separate git repo, preserving all the commit history. Huge props to the following : http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html Initially : Create a fresh clone of the source repo (this will be removed later : don’t do this on a working copy, just in case everything goes awry): git clone git@git.EXAMPLE.com:sketchpad.git cd sketchpad/ Now, let’s filter everything in the directory ‘android-edutiger’ out of this local copy - all the changes from here are what will be moved across (disconnect from the main repo) : git filter-branch --subdirectory-filter android-edutiger -- -- all git remote rm origin Now, create a new directory, and move all the relevant files into it : mkdir android-native git mv AndroidManifest.xml android-native/ git mv Notes.txt android-native/ git mv pro* android-native/ git mv res android-native/ git mv src android-native/ git commit -a -m "Moved into directory prior to moving repo" Now go into the new repo ‘separated-out’ and pull the stuff over from the local remote (which we’ll temporarily name “SKETCHPAD”) : cd .. Read More...

  • G2X connecting in developer mode 7-Jan-2012

    G2X connecting in developer mode On Fedora, I was having issues getting my T-Mobile G2X to connect in developer mode. For sure, I was setting Settings-Applications-USBdebugging to Checked. And when plugging in the device, the SD card (and/or) internal memory space was showing up on the desktop (and the output in /var/log/messages looked equivalent to that from my working G1) - but no joy with : adb devices. The Fix : Eventually, after trying everything I could think of, to no avail, I finally toggled Settings-Applications-USBdebugging off-and-on while the phone is connected via USB. Read More...

  • MythBackend service not starting 25-Nov-2011

    MythBackend service not starting /var/log/messages complains : Nov 24 23:52:54 myth systemd[1]: mythbackend.service: control process exited, code=exited status=235 Nov 24 23:52:54 myth systemd[1]: Unit mythbackend.service entered failed state. Simple solution (not tested whether this survives reboot) : # touch /var/run/mythbackend.pid; chown mythtv:mythtv /var/run/mythbackend.pid # systemctl start mythbackend.service # grep mythbackend Read More...

  • PulseAudio default Sink (output) 25-Nov-2011

    PulseAudio default Sink (output) MythTV suddenly stopped audio (yet again : Every upgrade the reason is different). This time, it appears that the order the audio cards are detected has changed, so the default output has changed… The following is relevant to the process (haven’t tested this through a reboot, yet) : $ pacmd help $ pacmd info | grep -i default $ pacmd list-sinks $ pacmd info | grep Read More...

  • nginx configuration for uwsgi for Flask 18-Nov-2011

    nginx configuration for uwsgi for Flask /etc/nginx/conf.d/site.conf : server { server_name example.com www.example.com; root home/example/flask/static; location ~ ^/(img|js|css)/ { # |pi||ext|theme root /home/example/flask/static; add_header Cache-Control public; #expires 30d; #access_log off; } location / { try_files $uri @yourapplication; } location @yourapplication { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi_example.sock; } } This must be married with a uwsgi service started by a script in /etc/init.d/ : #!/bin/bash # uwsgi - Use uwsgi to run python and wsgi web apps. Read More...

  • Building uwsgi from src.rpm without Python 3 16-Nov-2011

    Building uwsgi from src.rpm without Python 3 To build uwsgi on Fedora 12 (which has no easy-to-find python3 rpm), run through the rpmbuild process (shown in a previous post in more detail for nginx) and make the following changes : wget http://kad.fedorapeople.org/packages/uwsgi/uwsgi-0.9.9.2-2.fc15.src.rpm rpm -ivh uwsgi-0.9.9.2-2.fc15.src.rpm rpmbuild -bb ~/rpmbuild/SPECS/uwsgi.spec yum install python-devel libuuid-devel jansson-devel libyaml-devel ruby-devel python3-devel python-greenlet-devel lua-devel ruby # NB: python3-devel doesn't exist... # Need to fix up the fedora configuration file : joe ~/rpmbuild/SOURCES/fedora.ini # Take out the reference to python32 [uwsgi] inherit = default embedded_plugins = echo, ping, http #plugins = rack, psgi, python, nagios, fastrouter, admin, python32, ruby19, cache, cgi, rpc, ugreen, greenlet, lua plugins = rack, psgi, python, nagios, fastrouter, admin, ruby19, cache, cgi, rpc, ugreen, greenlet, lua # Similarly, edit the spec file (), to take out the installation of the python3 files : joe ~/rpmbuild/SPECS/uwsgi.spec # Take out the reference to python32 # %files -n %{name}-plugin-python3 # %{_libdir}/%{name}/python32_plugin.so # Then, building should work... Read More...

  • Updating nginx (with uwsgi) for Fedora 12 from src.rpm 14-Nov-2011

    Updating nginx (with uwsgi) for Fedora 12 from src.rpm In order to get access to uwsgi (useful for deploying python flask projects, for instance), one needs a version of nginx > 0.8 or so. But Fedora 12 doesn’t have such a modern version : Here’s how to build it from a src.rpm from a more recent Fedora release. # First, make sure we have the rpm-build tools : yum install rpm-build # Download a suitable src.rpm (look at the dependencies : # nginx doesn't really care about which version of fedora it's for wget ftp://ftp.muug.mb.ca/mirror/fedora/linux/development/rawhide/source/SRPMS/nginx-1.0.5-1.fc16.src.rpm # This installs the source into ~/rpmbuild/BUILD/nginx-1.0.5/ rpm -ivh nginx-1.0.5-1.fc16.src.rpm # Now, do a test build to see what we're missing rpmbuild -bb ~/rpmbuild/SPECS/nginx.spec # This complains about missing dependencies : Do a copy-paste as necessary yum install pcre-devel zlib-devel openssl-devel 'perl(ExtUtils::Embed)' libxslt-devel GeoIP-devel gd-devel # Rebuild again (installing more packages if this fails) rpmbuild -bb ~/rpmbuild/SPECS/nginx.spec # Now install nginx from the brand new rpm just created: rpm -Uvh ~/rpmbuild/RPMS/i386/nginx-1.0.5-1.fc12.i386.rpm # Attempt a restart : /etc/init.d/nginx restart # ... Read More...

  • Compiling nginx (with uwsgi) for Fedora 12 18-Oct-2011

    Compiling nginx (with uwsgi) for Fedora 12 In order to get access to uwsgi (useful for deploying python flask projects, for instance), one needs a version of nginx > 0.8 or so. But Fedora 12 doesn’t have such a modern version : Here’s how to compile it from source : Actually, a less hacky approach is to simply back-port (trivially) a src.rpm from Fedora 16 : That’s in a newer Read More...

  • Building a Python LibreOffice Extension 7-Oct-2011

    Building a Python LibreOffice Extension Here’s a pretty minimal setup for building an extension for LibreOffice in Python. Working backwards, I’ve called the extension mdda_fns.oxt. Here’s the makefile, which is in the root of the package development tree : all: clean zip install clean: unopkg remove mdda_fns.oxt rm mdda_fns.oxt zip: zip -r mdda_fns.oxt \ description.xml \ META-INF/manifest.xml \ Addons.xcu \ src/Interface.py \ package/img/icon_42x42.png \ package/desc_en.txt \ package/license_en-GB.txt install: unopkg add mdda_fns.oxt The essential files for anything to work are : description.xml : Contains overall information about the extension : names, descriptions, licensing, help information, upgrading, etc. Read More...

  • MythTV / lircd updates on Fedora : Hauppauge 16-Jul-2011

    MythTV / lircd updates on Fedora : Hauppauge I’ve been maintaining a PVR350 on an old Dell 2.4GHz since forever. Latest updates (to MythTV 24.1, and licrd 0.9.0.7) have made big changes. But it’s all working again, including a serial IR blaster. The following is just for my easy reference, and anyone else who now finds their Grey Hauppauge remote control is emitting new key-presses (or worse, no longer talking to the system). Read More...

  • nginx and WSGI using Paste 13-Jul-2011

    nginx and WSGI using Paste Paster contains the WSGI server originally incorporated within CherryPy (see http://pythonpaste.org/script/module-paste.script.wsgiserver.html). Funnily enough, this is a pretty hot contender amongst other Python WSGI webservers (see http://nichol.as/benchmark-of-python-web-servers) : Maybe not the best, but because of its ease of set-up (working out-of-the-box for Pyramid and Pylons) it is extremely compelling. Combining it with NGINX makes for a very easy-to-configure, fast and scalable set-up. Here goes… Paste reads Read More...

  • Ughh : OpenVZ and packet sniffing... 28-May-2011

    Ughh : OpenVZ and packet sniffing… Before you attempt to experiment with knockd and/or fwknop, Google around a little for venet0 and packet sniffing. The virtualization of the interfaces by OpenVZ apparently mangles the IP headers for packet sniffers (like fwknop uses to listen to DROP’d packets). And they then fail to trigger the next step of cleverness (opening the SSH/22 port, for example). i.e. : fwknop will not work Read More...

  • Update Ruby on Fedora 12 3-May-2011

    Update Ruby on Fedora 12 Fedora 12 maxes out it’s Ruby version at 1.8.6. Unfortunately, compass / sass requires 1.8.7. The following steps creates a suitable RPM, and installs it : # cd ~ # wget http://mo.morsi.org/blog/files/ruby-1.8.7.249-1.fc11.src_.rpm # yum install rpm-build # yum install ncurses-devel gdbm-devel tcl-devel tk-devel libX11-devel autoconf db4-devel byacc bison emacs compat-readline5-devel # rpmbuild --rebuild ruby-1.8.7.249-1.fc11.src_.rpm # cd /root/rpmbuild/RPMS/i386/ # rpm -Uvh * $ export RUBYLIB="/usr/lib/ruby/site_ruby/1.8/:/usr/lib/ruby/1.8/" $ Read More...

  • Pylons File Upload 30-Jan-2011

    Pylons File Upload This code snippet should clear up the confusing documentation when it comes to uploading an optional picture : import os from pylons import config import shutil class MyController(BaseController): def picture(self, registration=False): if 'send_picture' in request.params: if ('picture' in request.params) and hasattr(request.params['picture'], 'filename'): picture = request.params['picture'] log.debug("GOT PICTURE ! '%s'" % (picture.filename, )) profile.picture = "%d-%s" % (user.id, picture.filename.replace(os.sep, '_'), ) permanent_file = open( os.path.join( config['app_conf']['picture_store'], profile.picture, ), Read More...

  • jQuery - Safe 'onReady' code 7-Jan-2011

    jQuery - Safe ‘onReady’ code Just a quickie that combines the $(fn) method of calling a function when the DOM is ready, with an anonymous function that ensures that $ refers to jQuery : (function($) { $(function () { // your code to fire when the DOM is ready }); })(jQuery); Read More...

  • SciTE setup for Pylons (reminder) 5-Nov-2010

    SciTE setup for Pylons (reminder) Another ‘quickie’. Rather than update the central /usr/share/scite/SciTEGlobal.properties, just pull in the user’s properties from SciTE’s Options-OpenUserOptionsFile. There, add the following : find.files=*.p*|*.js|*.[ch]* if PLAT_GTK find.command=grep -R --include '$(find.files)' --exclude '*.svn*' -i --line-number '$(find.what)' . tabsize=1 indent.size=1 use.tabs=0 indent.size.*.py=4 # NB : tabsize becomes tab.size for filepatterns... tab.size.*.py=4 lexer.html.mako=1 source.files=$(source.files);*.css;*.scss filter.css=CSS (css scss)|*.css;*.scss| lexer.*.css=css lexer.*.scss=css # Depending on how much you like monospace... font.base=$(font.monospace) font.small=$(font.monospace) Read More...

  • Laptop Data Security 5-Nov-2010

    Laptop Data Security This should be a no-brainer for anyone carrying anything important around on a laptop. IMHO, relying on a user password (like a login password) is not a great idea, since anyone with physical access to the disk can get to your data easily. OTOH, using disk encryption seems like overkill - since if you want to hand your laptop to someone for a little web browsing, you shouldn’t have to reveal all the ‘secrets’ to do so. Read More...

  • Scite filter changes for SCSS files 15-Sep-2010

    Scite filter changes for SCSS files Just a quickie… To make SciTE work with scss files (which are enhanced css files), just add the following information: In /usr/share/scite/SciTEGlobal.properties (on a Fedora machine at least, YMMV) : ;*.scss to the end of source.files= and in /usr/share/scite/css.properties the top of the file should read : filter.css=CSS (css scss)|*.css;*.scss| lexer.*.css=css lexer.*.scss=css Read More...

  • Stupidly simple SQLalchemy model migration 15-Sep-2010

    Stupidly simple SQLalchemy model migration After looking around the web for an SQLalchemy model migration assistant, we found no satisfactory equivalent to the migration tool that people love for Ruby. In particular sqlalchemy-migrate seems like it’s an overkill (in addition, sqlalchemy-migrate is fiddly to set up with Pylons). There’s also a project call miruku, but that is also a little illusive, somehow. PLATFORMedia has published a simple 150 line script that parses the Pylons INI file (augmented with a line that points to the model.metadata variable definition), and allows just two actions : diff the current database vs. Read More...

  • sass-convert on Fedora 15-Sep-2010

    sass-convert on Fedora sass (and its successor scss) is a really nice CSS meta-language, enabling nicer hierarchies of classes to be built (much more maintainable). The transformation software is written in ruby, and provided by the ruby gem haml. The first step when using SCSS file, is usually to recast existing CSS files into semantically equivalent SCSS files (when you’re using someone elses template, for instance). For this ‘magic’ there is a tool provided by the ‘haml’ gem called ‘sass-convert’. Read More...

  • Scite filter changes for mako files 5-Sep-2010

    Scite filter changes for mako files Just a quickie… To make SciTE work with mako files (which are template files used by the mako templating system included with Pylons), just add the following : In /usr/share/scite/SciTEGlobal.properties (on a Fedora machine at least, YMMV) : lexer.html.mako=1 Read More...

  • Building Titanium SDK on Fedora 25-May-2010

    Building Titanium SDK on Fedora These direct steps (using the openjdk, not the Sun one) are confirmed to work… Below, the following are our (typical) values : MY_ANDROID_SDK : /path-to-android-sdk-installation-root/android-sdk-linux_86 MY_TITANIUM_DEVELOPER_DIR : /path-to-titanium-developer-installation-root/Titanium Developer-1.2.1 MY_TITANIUM_FILES_DIR : /path-to-my-home-directory/.titanium MY_TITANIUM_SDK : /any-suitable-directory/ Note that MY_TITANIUM_FILES_DIR is the default created/used by the Titanium Developer program, which one runs from MY_TITANIUM_DEVELOPER_DIR using ./Titanium Developer Check that the build tools are installed On Fedora (and this assumes that the openjdk is being used, rather than the Sun JDK) : yum -y install scons java-1.6.0-openjdk-devel alternatives --config javac # Check that this is set to the openjdk path : /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/javac Ensure correct android modules loaded Since we’re coding for Android 1.6, we need the ‘level 4’ APIs. Read More...

  • Android SDK on 64-bit fedora (openjdk) 20-May-2010

    Android SDK on 64-bit fedora (openjdk) Requirement : Get the 32-bit Android SDK to work on a 64-bit Fedora machine (Fedora 11 tested below), using the standard openjdk rather than Sun Java. No eclipse required, since development will be done using Titanium. 32-bit libraries are required. To clear out existing libraries (only if you know you haven’t got anything else dependent on 32-bitness) : yum remove *.i586 The following (plus the dependencies it pulls in) seems to be the minimum set required : yum install \ libX11.i586 mesa-libGL.i586 SDL.i586 \ ncurses-libs.i586 libstdc++.i586 \ esound-libs.i586 zlib.i686 After doing that, confirm that the emulator (./tools/emulator) works. Read More...

  • udev rule for Android G1 phone 20-May-2010

    udev rule for Android G1 phone Create /etc/udev/rules.d/91-android.rules with the contents : SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666", OWNER="rmbsanal" Then /etc/init.d/udev-post reload and re-plug in your Android phone. That’s it. Read More...

  • Running TaxAct 2009 with Wine on Fedora 16-Apr-2010

    Running TaxAct 2009 with Wine on Fedora Having to dual-boot into WinXP or Vista to run a tax program once a year is really bothersome. So, this year (the night before taxes were due), I set on the path of submitting my taxes without leaving Fedora. I’d used TaxAct before (business and personal), so it was natural to want to see whether it would work in wine. Install wine from scratch yum install wine cabextract <./code>` Install winetricks to streamline the process : cd ~/.wine wget http://www.kegel.com/wine/winetricks chmod 755 winetricks Fix winetricks so that the i686 vs. Read More...

  • Running rsync from a webserver (using sudo) 21-Oct-2009

    Running rsync from a webserver (using sudo) Situation I want to have ‘rsync’ run when a user presses a button on the webserver. The software stack is as follows (though this was largely a red-herring, see below) : Fedora - server lighttpd - webserver Twiki - intranet setup perl - plugin language for Twiki bash - perl launches a script to run the rsync sudo - to ‘change user’ to the one with the correct permissions for the source folder rsync - the actual backup utility ssh - file transfer mechanism, and auto-login (via its private key) to the remote server Solution It turns out that it wasn’t perl ‘Taint’ that was stopping the rsync from running… Nor lighttpd, nor the ‘user’ for the ‘ssh’ embedded in the rsync command… To cut a long story short, the final solution revolved around understanding the additional ‘requiretty’ constraints that Fedora (and maybe other distributions) has for sudo. Read More...

  • Setting up git server on a 'central repository' - gitosis 11-Oct-2009

    Setting up git server on a ‘central repository’ - gitosis NB : There’s even more information in the following excellent guide : http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way But there are some differences for Fedora that are worth spelling out. Central Repository setup First install gitosis : central# yum install gitosis Then create a dumb git user - noone will be logging in as this user: it’s just so that everything can be centralized : central# /usr/sbin/adduser --system --shell /bin/bash --user-group --home-dir /home/git --create-home git Now create (if necessary) a local SSH key pair, and upload the public key to the ‘git’ user, so that it trusts you : central# su git # Just to test it worked central$ cd ~; pwd; ls -l; exit central# Now create (if necessary) a local SSH key pair, and upload the public key to the ‘git’ user, so that it trusts you : local$ # (look in .ssh for an 'id_dsa.pub' - if it doesn't exist then : local$ ssh-keygen -t rsa local$ # Copy this file to your server (the one running gitosis) local$ cat .ssh/id_dsa.pub # Then copy the response ... Read More...

  • Funambol with MySQL on Fedora 10 17-Sep-2009

    Funambol with MySQL on Fedora 10 Much of this is adapted from the text of http://schattenschreiber.org/diary/2009/05/20/installing-the-funambol-bundled-server-under-ubuntu-server-amd64-mysql-lighttpd/ Installing funambol isn’t as easy as it might be - mostly because it ships with it’s own java/jre version, which I figure is needless duplication. Here’s a little step-by-step guide for getting it installed nicely on Fedora. You will need some command line literacy though : Download funambol-8.0.0.bin on your server - this machine can be set up entirely remotely (without a screen). Read More...

  • Cisco 4000 series back from the dead 31-Jul-2009

    Cisco 4000 series back from the dead After doing some shopping on ebay, I have acquired a nice-looking Cisco cabinet. It’s pretty old, and started off pretty-much functionless : Cisco 4003 - 3 slot cabinet (1 supervisor, 2 sets of ports, dual power supplies) Cisco 4012 - Supervisor module 2 x Cisco 4148 - 48 port PoE unit There are several steps to setting this up. Connect the Console This connects via serial port to the DB-25 connector (into the 9-pin serial on my ageing laptop). Read More...

  • OpenVZ timezone 12-Jul-2009

    OpenVZ timezone Quick fix in a container (assuming the host has the correct time : rm /etc/localtime ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime Read More...

  • Scite user Properties 12-Jul-2009

    Scite user Properties Just my preferences for _ ~/.SciTEUser.properties _… And (of course) I use ScitePM where possible : find.files=*.p?|*.js|*.[ch]* if PLAT_GTK find.command=grep -R --include '$(find.files)' --exclude '*.svn*' -i --line-number '$(find.what)' . tabsize=1 indent.size=1 use.tabs=0 save.session=0 font.base=$(font.monospace) font.small=$(font.monospace) font.comment=$(font.monospace) font.text=$(font.monospace) font.text.comment=$(font.monospace) font.embedded.base=$(font.monospace) font.embedded.comment=$(font.monospace) font.vbs=$(font.monospace) position.tile=1 split.vertical=0 buffers=20 # Remap some keys - # Ctrl-e = to end of line #NO Ctrl-a = to startof line # Ctrl-` = Next bookmark Read More...

  • Magento install on OpenVZ 12-Jul-2009

    Magento install on OpenVZ This one is a little embarrassing. Just trying to install Magento on a new (fresh) container. Running across the following style of error (when executing ./pear install magento-core/Mage_All_Latest-stable) : Starting to download Lib_ZF_Locale-1.7.2.2.tgz (1,279,370 bytes) ...done: 1,279,370 bytes install ok: channel://connect.magentocommerce.com/core/Lib_ZF_Locale-1.7.2.2 Notice: Undefined variable: php_errormsg in Installer.php on line 566 PHP Notice: Undefined variable: php_errormsg in /home/complex/www/magento/downloader/pearlib/php/PEAR/Installer.php on line 566 ERROR: failed to write ./lib/Zend/Pdf/Element/.tmpObject.php: install ok: channel://connect.magentocommerce.com/core/Lib_Varien-1.3.2.2 ERROR: unable to unpack ./downloader/pearlib/download/Mage_Core_Modules-1.3.2.2.tgz ERROR: unable to unpack ./downloader/pearlib/download/Mage_Core_Adminhtml-1.3.2.2.tgz Solution Turns out that the default Quota for the OpenVZ container I had was extremely small. Read More...

  • roundcube and twiki integration 12-Jun-2009

    roundcube and twiki integration Roundcube is a beautiful IMAP webmail client. In order to integrate is properly with an enterprise TWiki installation, ‘single authentication’ needed to be implemented - so that the sign-on for TWiki (which is htpasswd style authenticated by lighttpd) can be used for the roundcube authentication seamlessly. Since the TWiki login/passwords are different from the IMAP login/password pairs, an additional column had to be added to the Read More...

  • lighttpd and twiki : Managing htpasswd file 12-Jun-2009

    lighttpd and twiki : Managing htpasswd file Using twiki with lighttpd is not yet as simple as it should be. One particular problem is that twiki writes out htpasswd files that lighttpd doesn’t parse correctly (twiki includes an unnecessary ‘:$email’ entry). To fix the problem (so that users can manage their own passwords) here’s a quick fix for {twiki}/lib/TWiki/Users/HtPasswdUser.pm : sub _dumpPasswd { my $db = shift; my $s = ''; foreach ( sort keys %$db ) { if ( $TWiki::cfg{Htpasswd}{Encoding} eq 'md5' ) { # htdigest format $s .= $_.':'.$TWiki::cfg{AuthRealm}.':'.$db->{$_}->{pass}.':'.$db->{$_}->{emails}."\n"; } else { # htpasswd format ### Change the following line: # $s .= $_.':'.$db->{$_}->{pass}.':'.$db->{$_}->{emails}."\n"; $s .= $_.':'.$db->{$_}->{pass}."\n"; } } return $s; } Of course, in the configuration, HtPasswdUser needs to be set as the password manager. Read More...

  • lmms with Fedora - compile source 29-Mar-2009

    lmms with Fedora - compile source lmms has some dependencies that are not so easy to determine for Fedora Basic setup : yum install cmake git yum install qt qt-devel Synth extras : yum install libsndfile libsndfile-devel yum install fluidsynth fluidsynth-devel yum install stk stk-devel yum install fftw-devel Importantly for wine VST(i) : yum install wine wine-devel yum install glibc-devel.i386 Hope this helps Read More...

  • Paetec to Asterisk to Nortel 2-Mar-2009

    Paetec to Asterisk to Nortel My company has a Nortel PBX, with a full panel of extensions. However, we need to add more handsets. In addition, our traders have asked for ‘Turrets’ (more of this in a later post). The obvious route is to go VoIP - with the precondition that the Nortel PBX should be unaffected (and repluggable if things don’t go according to plan). Solution : Add an Asterisk PBX in between our telecoms provider (Paetec) and the Nortel PBX, which is currently delivered by some sort of T1. Read More...

  • Asterisk Sounds on Fedora 1-Mar-2009

    Asterisk Sounds on Fedora While all the packages I’ve seen try to put the sounds for Asterisk in /var/lib/asterisk/sounds, Fedora 10 (which includes asterisk-1.6.0.5-2) has a directory (empty) at /usr/share/asterisk. To fix the problem : cd /usr/share/asterisk rmdir sounds ln -s /var/lib/asterisk/sounds . Read More...

  • Secure Mobile Email 31-Dec-2008

    Secure Mobile Email Thunderbird email (where IMAP or POP) still downloads the subject lines (at minimum) into a local database. This is a potential security threat if the laptop falls into unfriendly hands. Solution : Move local data store into a directory protected by EncFS The following assumes that you can find the data store under the server name in the appropriate profile under the .thunderbird directory (and that ~/Fieldstone Read More...

  • Secure Development Laptop 31-Dec-2008

    Secure Development Laptop So that I could continue developing the ‘Trading Account Management’ system while on the road, the installation of lighttpd/database had to be secured. In particular, sqlite had to be used rather than mysql, since the data in the database itself was critical to the business (and there was no time to conjure up ‘fake data’). Using encfs to secure the ~/Fieldstone directory (as in the last post), I just want to point out how to make the Fieldstone directory accessible by the lighttpd server (without changing the user running lighttpd). Read More...

  • encfs password popup 31-Dec-2008

    encfs password popup Quick script for a laptop - to protect data (somehow this has never occurred to anyone the UK government employs…) : #!/bin/bash DIALOGTEXT="Enter the Fieldstone EncFS Password" encfs \ -o allow_other \ --extpass="zenity --title 'EncFS Password' --entry --hide-text --text '$DIALOGTEXT'" \ ~/.Fieldstone.encfs/ ~/Fieldstone/ This can be paired with an un-mounter : #!/bin/bash fusermount -u Fieldstone Read More...

  • phpMyAdmin, lighttpd and Fedora 9 9-Nov-2008

    phpMyAdmin, lighttpd and Fedora 9 yum install mysql-server lighttpd php php-mysql phpMyAdmin This puts the phpMyAdmin install in /usr/share/phpMyAdmin. Add a new configuration file called /etc/lighttpd/lighttpd-phpMyAdmin.conf : # server.bind = "phpmyadmin.example.com" # If there isn't a server.bind already # Ensure the modules we need are loaded in server.modules += ( "mod_cgi" ) # server.modules += ( "mod_alias", "mod_cgi" ) $HTTP["host"] == "phpmyadmin.example.com" { var.root = "/usr/share/phpMyAdmin" server.document-root = var.root + "/" # This is regular (slow) straight CGI $HTTP["url"] =~ "^/" { # alias.url += ( "/" => server.document-root ) cgi.assign = ( ".php" => "/usr/bin/php-cgi" ) } } and include it into the standard /etc/lighttpd/lighttpd.conf by appended : include "lighttpd-phpMyAdmin.conf" Finally, since the phpMyAdmin install expects Apache to be used as the web server, all of the session folders are permissioned for Apache. Read More...

  • Enabling IMAPS (with ssl) for dovecot 5-Oct-2008

    Enabling IMAPS (with ssl) for dovecot Inspect Current Configuration cd /etc/pki/dovecot/ more certs/dovecot.pem # This is the one that people will need more private/dovecot.pem # This is the private half : Don’t reveal However, the certificate (as it stands) is set up for ‘example.com’, so installing it doesn’t help you access email securely on your server. The certificate is defined via : more dovecot-openssl.cnf Create New Configuration This needs to be updated with your information, in particular the server entry : cp dovecot-openssl.cnf dovecot-openssl.cnf-orig # Create a back-up, just in case joe dovecot-openssl.cnf Get rid of the old certificate pair : rm /etc/pki/dovecot/certs/dovecot.pem rm /etc/pki/dovecot/private/dovecot.pem Create the certificate pair : /usr/libexec/dovecot/mkcert.sh Make sure that dovecot is expecting secure logins by ensuring /etc/dovecot.conf has the line : protocols=imaps pop3s Now restart dovecot (just in case - you may not need this) : /etc/init.d/dovecot restart Last Step - use the (public) certificate you created Copy the contents of /etc/pki/dovecot/certs/dovecot.pem into a file on the local (email client) machine, and import the certificate. Read More...

  • Gateway GM6543E Linux Installation 4-Oct-2008

    Gateway GM6543E Linux Installation Initial Boot Problems Booting kernel on stock Fedora 9 x64 DVD requires the kernel option : ‘intel_iommu=off’ to be appended to the kernel boot line. Updated kernels (after, say, 2.2.26), no longer need this extra parameter. USB Keyboard Unless ‘Legacy USB’ is set in the BIOS (which it is by default), the USB keyboard can’t be used to change GRUB selections. Hibernate Seems to work. Suspend Arrrrgh! Read More...

  • Shrinking the Vista Partition 4-Oct-2008

    Shrinking the Vista Partition For a new machine (which is meant to be dual-boot), it may be better to install Linux first, since the partitioning information can be got right-first-time… If Vista is Installed First However, once Vista is installed, space must be made for Linux (and the shared partition). Shrinking the Vista partition is fairly easy using the Vista tool included … But it can only shrink a partition by 50% or so, because of immovable files stored at the mid-point of the drive. Read More...

  • Sharing a Partition between Vista and Linux 4-Oct-2008

    Sharing a Partition between Vista and Linux For a dual-boot machine (where the main desktop would be Linux), a common ‘data’ partition makes sense (rather than allowing root access by Linux to the Vista install, or visa-versa). Shared Partition Since the Vista driver requires it, you need to format the shared ‘ext3’ partition with : /sbin/mkfs.ext3 -I 128 /dev/sd_A_ Partitioning Problems The Vista driver seems to overwrite the UID of the partition. Read More...

  • Secure Backup with reverse encfs 7-Sep-2008

    Secure Backup with reverse encfs Back-up the server onto an insecure host #! /usr/bin/perl -w use strict; my $home='/home/whatever'; if(1) { # Mount the server directory on the encfs mount-point system(qq(mkdir -p $home/server-enc/)); # The -S option is to read the password from stdin # The mount options passed include 'read-only' my $encfs_config=qq(ENCFS6_CONFIG=$home/server_dot-encfs6.xml); # Store the encfs password locally - so it doesn't appear in a command line system(qq(cat $home/.encfs_passwd | $encfs_config encfs -S --reverse /mnt/seagate250/server/ $home/server-enc/ -- -o ro)); } if(1) { # Run actual rsync # This has been added to the ~/.ssh/authorized_keys list on the remote server my $key="$home/fs_server-fieldstone-key"; my $ssh_options=qq(--rsh=ssh -e "ssh -i $key"); my $bandwidth=qq(--bwlimit=50); # This is in kB/sec my $options=qq(--archive --compress --recursive --progress --stats); my $remote=qq(whoever\@whereever.com:backup/system_id_dir); system(qq(rsync $options $bandwidth $ssh_options $home/server-enc/ $remote/server/)); } if(1) { # UnMount the server directory from the encfs mount-point system(qq(fusermount -u $home/server-enc/)); } Mount the backup to retrieve files (don’t overwrite original, yet) #! Read More...

  • Mount Windows (or Samba) share on Linux 7-Sep-2008

    Mount Windows (or Samba) share on Linux After a suitable mount-point is created (in this example mkdir -p /mnt/fscapital_server/), into /etc/fstab put the following (all on one line) : # Mount windows Server drive : //192.168.10.120/server /mnt/fscapital_server/ cifs username=andrewsm,password=whatever 0 0 where each of the spaces above is really a cntrl-t (Tab) - just for neatness, really. Then one can mount /mnt/fscapital_server/ and see the drive immediately with ls -l /mnt/fscapital_server/. Read More...

  • Linux Screen Capture for YouTube 7-Sep-2008

    Linux Screen Capture for YouTube ffmpeg is the command line utility I chose - does enough, but not too much (like mplayer, for instance). YouTube and Google ideal input video 640x480 @ 30 fps MPEG4 Preparation Grab the ffmpeg package from ATrpms. # rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms # scite /etc/yum.repos.d/atrpms.repo # yum install ffmpeg For speed of capture : # Mount a RAM disk (as su) : mkdir /media/ffmpeg mount -t tmpfs tmpfs /media/ffmpeg exit Capture Grabbing the screen (the data rate of 1Mb/sec set with ‘-b’ option) # Grab a standard 640x480 screen from top-left of screen (choose frame rate with '-r') ffmpeg -f x11grab -r 15 -s 640x480 -i :0.0+5,20 -b 1M /media/ffmpeg/grab.flv Test the grab - to make sure it’s what’s needed : ffplay /media/ffmpeg/grab.flv In order to play around with different scenes, or intro and lead-out title frames : # Convert frames to mpeg (can be concatenated easily, output framerate set with '-r') ffmpeg -i /media/ffmpeg/grab.flv -r 30 /media/ffmpeg/grab.mpg Making a Title Sequence # Create title.png from title.svg (inkscape - number of frames=100, at 30fps) ffmpeg -loop_input -vframes 100 -i title.png -r 30 title.mpg Join the Scenes together… # mpg files can be simply 'cat'd together cat title.mpg frames.mpg > joined.mpg Test the movie (and/or upload to youtube) : ffplay joined.mpg Alternative - build the movie out of frames… Create frames for movie via drawstuff… Cntrl-W : this is a feature of the drawstuff GUI front-end for ODE - it creates a sequence of .ppm files from the frames of the simulation. Read More...

  • Reset MythTV music database 22-Aug-2008

    Reset MythTV music database mysql -u mythtv -p mythconverg delete from music_directories; delete from music_genres; delete from music_artists; delete from music_albums; delete from music_albumart; delete from music_songs; and then reload all the music files by : Utilities/Setup - Music Tools (which then rescans the files) Read More...

  • Fedora 9 and encfs Encryption 5-Aug-2008

    Fedora 9 and encfs Encryption To get this installed with ‘useraccount’ having the rights to use the fuse system, as root do : # yum install encfs # /usr/sbin/groupadd -r fuse # /usr/sbin/usermod -a -G fuse useraccount # Restart X11 - to get the groups right Now, as your regular user account (‘useraccount’ from above) : $ encfs ~/.Fieldstone-Secure.encfs ~/Fieldstone-Secure # If file doesn't exist initially, this prompts for directory # creation, encryption settings and password # (hit enter for defaults, and chose a pw) Regular use Mount the encrypted files as a virtual directory system on the mount point : $ encfs ~/.Fieldstone-Secure.encfs ~/Fieldstone-Secure # just prompts for pw # ... Read More...

  • Some MySQL compatibility functions for sqlite 28-Jul-2008

    Some MySQL compatibility functions for sqlite Here are a couple of additional functions to increase interoperability between MySQL code and sqlite : unless($dbh = DBI->connect("DBI:SQLite:dbname=$db_login{file}", "", "") ) { die "Cannot connect to database - version : ".$dbh->{sqlite_version}; } $dbh->func( 'UNIX_TIMESTAMP', 1, sub { return POSIX::mktime(POSIX::strptime($_[0], '%Y-%m-%d %H:%M:%S')); }, 'create_function' ); $dbh->func( 'FROM_UNIXTIME', 1, sub { return POSIX::strftime('%Y-%m-%d %H:%M:%S', localtime($_[0])); }, 'create_function' ); to make this work, you’ll need to install the following packages from CPAN : Time::Local POSIX POSIX::strptime Also recommended : the SQLite Manager addon for Firefox. Read More...

  • Intel i810 on Dell 4800 - FC9 20-Jul-2008

    Intel i810 on Dell 4800 - FC9 The intel driver seems to have gone a few optimizations too far - so that it hangs the machine in its default state. Here’s what works for me (start with Option "NoAccel" "true", and work your way up as far as possible without crashing): # From /etc/X11/xorg.conf Section "Device" Identifier "Videocard0" Driver "intel" # Option "NoAccel" "true" Option "FramebufferCompression" "true" Option "Tiling" "true" Option "DRI" "true" Option "Legacy3D" "true" Option "XVideo" "false" Option "AperTexSize" "8" Option "AccelMethod" "XAA" #Option "AccelMethod" "EXA" Option "ModeDebug" "true" BusID "PCI:0:2:0" EndSection All of these options (with terse descriptions) can be found on the man intel pages. Read More...

  • MythTV on Fedora 7, PVR-350 & Dual Screen 20-Jul-2008

    MythTV on Fedora 7, PVR-350 & Dual Screen Aim : Use 1 computer for two tasks : a) Desktop for GF to use as a regular linux machine (web browsing, photos, etc) b) Completely independent MythTV set-up, with the output going to the TV. Also, the set-up has to be turn-key, with both sessions logging in automatically (goodbye gdm). There’s a lot going on for this one. Fortunately, Fedora 9 (FC9) doesn’t require recompilation of any raw code (phew). Read More...

  • lirc_serial stopped working... 20-Jul-2008

    lirc_serial stopped working… After upgrading to FC9, the previously working serial port channel-changer (bought from IRblaster.info) stopped working. None of the configuration had changed. In addition to the serial port transmitter, there’s a receiver on the PVR350 card - handled by lirc_i2c After much searching, an additional option came to light : softcarrier=1. Here are the relevant parts of a confirmed working setup : From /etc/modprobe.conf : # This is Read More...

  • Rebinding Keys in SCiTE 26-May-2008

    Rebinding Keys in SCiTE On XCFE, some of the default (windowing system) bindings override those of SciTE (notably the Bookmarking commands). Consult [http://scintilla.sourceforge.net/CommandValues.html] and add the following to .SciTEUser.properties : # Remap some keys - # Ctrl-e = to end of line #NOT-YET Ctrl-a = to start of line # Ctrl-2 = Next bookmark # Alt-2 = Toggle bookmark user.shortcuts=\ Ctrl+e|2314|\ Ctrl+2|IDM_BOOKMARK_NEXT|\ Alt+2|IDM_BOOKMARK_TOGGLE| # Ctrl+a|2312| # Ctrl+a|Home| Read More...

  • MythWeb with lighttpd for Fedora 23-Apr-2008

    MythWeb with lighttpd for Fedora Add a lighttpd configuration file in /etc/lighttpd/conf.d/lighttpd-myth.conf (where my machine hostname is ‘americas’ on the local network) : #! /bin/bash # Just for SciTE language hint $HTTP["host"] == "myth.americas" { var.root="/var/www/html/mythweb" server.document-root = var.root url.rewrite = ( "^(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.* )$" => "/mythweb.php/$1", "^/$"=>"/mythweb.php" ) fastcgi.server = ( ".php" => ( "myth.americas" => ( "socket" => "/tmp/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi", "broken-scriptfilename" => "enable", "bin-environment" => ( "db_server" => "localhost", "db_name" => "mythconverg", "db_login" => "mythtv", "db_password" => "mythtv" ) ) )) } Fix up the permissions lighttpd user (so that the default expectation of being apache are met (if MythWeb claims “Cannot write to data directory” ) : # NOT THE BEST WAY : chown apache:lighttpd /var/www/html/mythweb/data/ # MUCH BETTER /usr/sbin/usermod -G -a apache lighttpd And start the lighttpd with : /etc/init.d/lighttpd restart or webmin. Read More...

  • Adding a Disclaimer to TWiki Print format 14-Apr-2008

    Adding a Disclaimer to TWiki Print format This is pretty hackish - but it seems to work Ok. Putting your Disclaimers on the Bottom Edit the variable WEBCOPYRIGHT on the page TWiki.TWikiPreferences. For instance, make the line read like this : * Set WEBCOPYRIGHT = %MAKETEXT{"Copyright &(C)[_1] by PLATFORMedia LLC. " args="1999-%GMTIME{$year}%"}% This has been prepared solely for informational purposes. It is not an offer, recommendation or solicitation to buy or sell, nor is it an official confirmation of terms. Read More...

  • MythTV sharing ALSA with other Desktop 6-Mar-2008

    MythTV sharing ALSA with other Desktop See : http://alsa.opensrc.org/index.php/AlsaSharing Make udev assign the right permissions to the sound devices, but putting the following in /etc/udev/rules.d/90-alsa-extra.rules : # Fix up sound devices for all users NAME=="snd/*", MODE="0666" In /etc/asound.conf, something along these lines : pcm.card0 { type hw card 0 # mmap_emulation true } pcm.dmixer { type dmix ipc_key 36739 ipc_key_add_uid false ipc_perm 0666 slave { # pcm "hw:0,0" pcm "card0" period_time 0 period_size 1024 buffer_size 8192 #periods 128 #rate 44100 rate 48000 } bindings { 0 0 1 1 } } ctl.mixer0 { type hw card 0 } pcm.dsnoop0 { type dsnoop ipc_key 36741 slave { pcm "card0" } } pcm.asym0 { type asym playback.pcm "dmixer" capture.pcm "dsnoop0" } pcm.pasym0 { type plug slave.pcm "asym0" } # 'dsp0' is espected by OSS emulation etc. Read More...

  • MythTV on Fedora 7, PVR-350 & Dual Screen : DONE 6-Nov-2007

    MythTV on Fedora 7, PVR-350 & Dual Screen : DONE Email me for the gory details (for FC7) - but see a more up-to-date post for the same thing (much cleaner) in Fedora 9. Read More...

  • Extra keys on Belkin MediaPilot (linux) 6-Nov-2007

    Extra keys on Belkin MediaPilot (linux) Here are the keycodes that I was able to uncover using showkey -k. Unfortunately, the kernel logs don’t complain when I hit the unknown keys so there’s probably no point in setting up the extra scancodes (particularly since this Belkin MediaPilot keyboard is not the primary keyboard in the system, and the setkeycodes documentation suggests that it only works on the primary keyboard). I’ve tried to use useful codes out of linux/input.h, and can confirm that these actually feed through to MythTV, so that they can be used as JumpPoints, or whatever. Read More...

  • LIRC Serial Blaster and Hauppauge Receiver 6-Nov-2007

    LIRC Serial Blaster and Hauppauge Receiver The Situation I have a Hauppauge PVR350 card, which includes an IR receiver (connected via a 2.5mm socket on the card), but I also need to control an external cable box via an IR blaster (bought from irblaster.info), and have COM1 free. Actually, since I have a Belkin MediaPilot keyboard (mostly) working, I won’t need to use the Hauppauge remote control, but I’ve included the set-up just in case. Read More...

  • LIRC for Generic Cable Box 2-Nov-2007

    LIRC for Generic Cable Box Simple schematic for building serial interface : http://fly.cc.fer.hr/~mozgic/UIR/ http://www.lirc.org/receivers.html On 9-pin Serial plug : Ground : Pin 5 Data : Pin 1 (actually DCD) Existing Hauppauge interface : http://www.irblaster.info/hauppauge_ir.html 2.5mm Connector TSOP 2238 IR Receiver Tip VCC Ring Signal Shield Ground VSOP (or Everlight) IRM2238 http://www.datasheetarchive.com/preview/1808114.html VCC=5V, 38KHz USB Pinout : http://pinouts.ru/SerialPortsCables/usb_cable_pinout.shtml Pin 1 : VCC (+5V) Pin 2 : Data- Pin 3 : Data+ Pin 4 : Ground Even simpler circuit for IR receiver used the +5V power from USB bus. Read More...

  • Verizon USB720 on Fedora 30-Aug-2007

    Verizon USB720 on Fedora The device was initially registered with Verizon using the VZaccess application on Windows. This may be a step that requires their annoy-ware. After that initial stage, the device contains an embedded phone number, that is required to do proper logging-in for National Access / Broadband Access. Plugging this into a spare USB port on my Fedora Linux laptop (and looking in /var/log/messages) showed that Fedora 7 recognizes the device ‘out of the box’, without any special modifications. Read More...

  • ivtv on Fedora with 2.6.22 kernel 21-Aug-2007

    ivtv on Fedora with 2.6.22 kernel Upgrade to 2.6.22 seems to break everything in the ivtv suite. It all disappeared from the rpms, so we need to install from source. * ivtv * ivtv-fb * ivtv-xdriver * ivtvfbctl (now gone) In particular, some web posts indicate that support for the PVR-350 has been eliminated somehow. This doesn’t seem to be completely true - but maybe there’s a problem with the hardware decoding from MythTV. Read More...

  • MythTV on Fedora 7, PVR-350 & Dual Screen 1-Aug-2007

    MythTV on Fedora 7, PVR-350 & Dual Screen Aim : Enable a lightly used Linux machine to additionally host a MythTV video card. Major Issues : Upgrade to 2.6.22 breaks everything : ivtv ivtv-fb ivtv-xdriver ivtvfb-ctl (now gone) Want to have two independent displays (two simultaneous X servers running) Complex /etc/X11/xorg.conf Need to use evdev to have dual keyboards Toy with /etc/gdm/custom.conf (not necessary, hardly working) Added a Belkin wireless keyboard (from woot.com) Set up special keys for MythTV Control cable box via IR transmitter Each of these will be addressed in separate postings. Read More...

  • Air-H Edge Card H407P Setup 21-Jul-2007

    Air-H Edge Card H407P Setup Situation Trusting to the power of Linux on my laptop, I blindly ordered an AirH Edge connectivity card from JCR (Air-H (Edge) Data Card for Laptops - No Airtime or Data Charges). Prior to leaving the US, I downloaded a few things, anticipating that I’d be ‘flying blind’ since I wouldn’t be able to connect until it actually worked. I was able to get it working eventually, but the following shows the results of a process that wasn’t plain sailing at all. Read More...

  • TrueCrypt 4.3 on Fedora 7 : Build from Zero 1-Jul-2007

    TrueCrypt 4.3 on Fedora 7 : Build from Zero NB: Ripped (and modified) from : http://tredosoft.com/comment/reply/37 How to install TrueCrypt 4.3a on Fedora 7 We are going to compile TrueCrypt from source so first grab TrueCrypt’s source code. When it’s downloaded, extract the source code and navigate to the Linux folder : tar xfz truecrypt-4.3a-source-code.tar.gz cd truecrypt-4.3a-source-code cd Linux Truecrypt needs to compile a kernel module during the build process. Unfortunately the kernel headers included with Fedora 7 (in the kernel-devel package) are missing the dm.h header file which is needed for compiling the kernel module. Read More...

  • NFS shares (Samba alternative) 27-Jun-2007

    NFS shares (Samba alternative) Situation Basics yum install portmap nfslock nfs Setup of the Server Machine Create a mount point for the directory to be mounted somewhere convenient : mkdir /s_drive and into /etc/fstab : /mnt/seagate250/server /s_drive none bind 0 0 Mount everything (ready for exporting) using : mount -a Check everything is where it’s meant to be with : mount Add the network export to /etc/exports : more /etc/exports /s_drive 192.168.1.0/255.255.255.0(ro) /etc/hosts.allow file for NFS: portmap: (hosts) lockd: (hosts) mountd: (hosts) rquotad: (hosts) statd: (hosts) where (hosts) is like 192.168.1.0/255.255.255.0 /etc/hosts.deny file for NFS: portmap: ALL lockd: ALL mountd: ALL rquotad: ALL statd: ALL Start the daemons : nfsd, lockd, statd, mountd, and rquotad /etc/init.d/nfs restart Pick up any changes to /etc/exports : /usr/sbin/exportfs -rv /usr/sbin/showmount -e Helpful : http://fconfig.wordpress.com/2006/08/17/setting-up-a-fedora-nfs-server/ Best : http://craiccomputing.blogspot.com/2007/06/setting-up-nfs-mounts-in-linux-fedora-6.html Includes WinXP Home Hack : http://gentoo-wiki.com/HOWTO_Access_NFS_via_SFU Note: Windows XP Home Users: If you use Windows XP Home you’ll have to do a little hex editing to make everything work right for you. Read More...

  • DNSmasq - quick and dirty DNS for LAN 27-Jun-2007

    DNSmasq - quick and dirty DNS for LAN The Situation Simple network within the company : Fortinet NAT/router Windows XP clients around room Linux server (serving via Samba, potentially NFS) I just want to name a few machines, to avoid typing in IPs all the time. On the Server machine yum remove caching-nameserver yum install dnsmasq Edit /etc/dnsmasq.conf, enable : domain-needed bogus-priv local=/fscapital/ # For LAN addresses like server.fscapital cache-size=1500 resolv-file=/etc/resolv-tw.conf # so that localhost also uses dnsmasq Into : /etc/host.conf file: “order hosts,bind” [root@fscapital intranet]# more /etc/resolv.conf nameserver 127.0.0.1 [root@fscapital intranet]# more /etc/resolv-tw.conf nameserver 24.29.xx.y6 nameserver 24.29.xx.y5 After every change to /etc/hosts need to do : /etc/init.d/dnsmasq restart On the Client machines more /etc/host.conf order hosts,bind more /etc/resolv.conf ; generated by /sbin/dhclient-script ; nameserver 192.168.10.1 nameserver 192.168.10.120 domain fscapital On the Router All requests across the network (whether DHCP referred or not) go to the gateway IP. Read More...

  • Fedora Core 7 Upgrade Problems 17-Jun-2007

    Fedora Core 7 Upgrade Problems Upgrading FC6 -> F7 is not painless at all (whereas FC5 -> FC6 was a breeze). The things that needed sorting out were : Samba shares no longer work - not sure why. Quickest to rebuild /etc/samba/smb.conf rather than sort it out properly. xorg.conf file fails (causing even greeter login to fail). Probably due to wacom driver not being fully updated in the distribution libata complains about CDROM drive - stalling booting process. Read More...

  • Samba on Fedora Core 7 17-Jun-2007

    Samba on Fedora Core 7 Somehow, configuration files on FC6 no longer work on F7. Seems best to scrap it all and use the system-config-samba tool to build it all again. This sucks. Read More...

  • phpMyAdmin Fedora layout fix 13-Jun-2007

    phpMyAdmin Fedora layout fix Because Fedora expects Apache to be running as root:apache, the default session information directory for php has the wrong permissions if it’s running as (say) someone:nobody. This disturbs the layout of the phpMyAdmin. The fix : # chown :nobody /var/lib/php/session/ Read More...

  • Fedora 7 Upgrade for Dell Dimension 2400 10-Jun-2007

    Fedora 7 Upgrade for Dell Dimension 2400 Situation This machine previously had FC6 (upgraded FC1 -> FC2 -> FC3 -> FC4 -> FC5 -> FC6). However, the machine can’t boot from USB. Solution suggested elsewhere : Download ISO (F-7-i386-DVD.iso) via bittorrent Copy ISO into /root/Fedora7/ mount the ISO via loopback : cp the isolinux/vmlinuz and isolinux/initrd.img file from the iso to the /boot partition update the grub.conf so that vmlinuz is seen on a reboot reboot and select the new entry. Read More...

  • TrueCrypt 4.3 on FC6 : Build from Zero 24-Apr-2007

    TrueCrypt 4.3 on FC6 : Build from Zero This was modified for the instructions given for 4.2 from the (German) blog at http://fedorawiki.de/index.php/Truecrypt Set up yum # yum install yum-utils # yum install rpm-build redhat-rpm-config unifdef Install Kernel Sources This install the sources from the rpm downloaded into the current directory. The rpm can be discarded afterwards. # yumdownloader --source kernel --enablerepo core-source --enablerepo updates-source # mkdir /usr/src/redhat # due to packaging problem, I guess # rpm -ivh kernel-$(uname -r).src.rpm ` cd /usr/src/redhat/SPECS rpmbuild -bp –target $(uname -m) kernel-2.6.spec ### Copy dm.h into the right place cp /usr/src/redhat/BUILD/kernel-2.6.19/linux-2.6.19.$(uname -p)/drivers/md/dm.h /usr/src/kernels/$(uname -r)-$(uname -m)/drivers/md/ ### Get and unpack truecrypt sources Get [truecrypt source](http://www.truecrypt.org/downloads.php). Read More...

  • Install webmin 11-Feb-2007

    Install webmin Need to download and install RPM directly from SourceForge (noarch version). Read More...

  • Building Camorama on FC6 9-Feb-2007

    Building Camorama on FC6 # curl -O http://camorama.fixedgear.org/downloads/camorama-0.18.tar.bz2 # bunzip2 camorama-0.18.tar.bz2 # tar -xf camorama-0.18.tar # cd camorama-0.18 # ./configure # yum install libgnomeui-devel ### possibly also : yum install gdk-pixbuf libglade glade2 # make # make install $ camorama & $ (Need to set save directory for image grabs to /home/xyz/WebCam, instead of ~/WebCam) Read More...

  • Logitech QuickCam Communicate STX 6-Feb-2007

    Logitech QuickCam Communicate STX There are two versions of the QuickCam Communicate, the newer of which shows up as 046d:08d7 under lsusb. This version needs gspca module. Install kernel headers # yum install kernel-devel Build and install from gspcavl sources The source can be found on the main download page. cd gspcav1-20070110 make make install modprobe gspca lsmod | grep gsp Check it works Load up Ekiga, and select the V4L driver - images should display in the user interface. Read More...

  • TrueCrypt 4.2 on FC6 : Build from Zero 6-Feb-2007

    TrueCrypt 4.2 on FC6 : Build from Zero This was wholesale copied from the (German) blog at http://fedorawiki.de/index.php/Truecrypt Set up yum # yum install yum-utils # yum install rpm-build redhat-rpm-config unifdef ` yumdownloader –source kernel –enablerepo core-source –enablerepo updates-source ### Install Kernel Sources mkdir /usr/src/redhat # due to packaging problem, I guess rpm -ivh kernel-$(uname -r).src.rpm ` # cd /usr/src/redhat/SPECS # rpmbuild -bp --target $(uname -m) kernel-2.6.spec Copy dm.h into the right place # cp /usr/src/redhat/BUILD/kernel-2.6.19/linux-2.6.19.$(uname -p)/drivers/md/dm.h /usr/src/kernels/$(uname -r)-$(uname -m)/drivers/md/ Get and unpack truecrypt sources Get truecrypt source. Read More...

  • Hydrogen on FC6 27-Jan-2007

    Hydrogen on FC6 # yum install qt-devel # QTDIR=/usr/lib/qt-3.3; export QTDIR # yum install libsndfile-devel # yum install flac-devel # ./configure # make src/lib/xml/tinyxml.h:828: error: extra qualification ‘TiXmlDeclaration::’ on member ‘TiXmlDeclaration’ Problem : GCC 4 is giving us problems with hydrogen-0.9.3 Patch : # scite src/lib/xml/tinyxml.h & @@ -823,7 +823,7 @@ /// Construct. - TiXmlDeclaration::TiXmlDeclaration( const char * _version, + TiXmlDeclaration( const char * _version, make now completes, but : ./hydrogen gives a “stack smashing detected” error (during the splash screen) So : First fix ALSA (see other note) : ALSA Fix .. Read More...

  • MS TrueType Fonts for Fedora FC6 23-Jan-2007

    MS TrueType Fonts for Fedora FC6 Many people will find it handy to have MS TrueType fonts available to make sure many websites render correctly. You can download the latest RPM from http://www.mjmwired.net/resources/mjm-fedora-fc5.html#ttf and install it as follows: # wget --referer=http://www.mjmwired.net/resources/mjm-fedora-fc6.html \ http://www.mjmwired.net/resources/files/msttcorefonts-2.0-1.noarch.rpm # rpm -ihv msttcorefonts-2.0-1.noarch.rpm # /etc/init.d/xfs restart Read More...

  • Upgrading FC5 to FC6 15-Jan-2007

    Upgrading FC5 to FC6 Even though the official instructions advise against it, it works fairly smoothly. In particular : ‘americas’ doesn’t have a (non-USB) DVD drive, and won’t boot of the USB external DVD-R; ‘cello’ and ‘flute’ are remote servers, so popping in the DVD is impossible. Here’s a transcript of the not-so-smooth part : # yum install yum-fastestmirror # rpm -Uhv ftp://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-*.noarch.rpm # yum upgrade Error: Package VFlib2 needs libttf.so.2, this is not available. Read More...

  • Beagle stalls machine 8-Jan-2007

    Beagle stalls machine I never asked for beagle to be installed (must be standard in FC6). Apparently it’s a mono application that likes to take over the machine with 100% CPU usage… Simple solution : yum remove beagle Read More...

  • Yum stalling 8-Jan-2007

    Yum stalling It appears that the RPM database needs rebuilding if a yum process is killed prematurely, since it probably had the RPM db open and now it’s in an inconsistent state. The steps : Kill all yum and rpm processes. rm -f /var/lib/rpm/__db* rpm --rebuilddb (add -vv if you want to see what it’s doing) Retry yum update. Read More...

  • Switch Desktop Code 4-Jan-2007

    Switch Desktop Code # yum install wmctrl # perl -MCPAN -e shell; install X11::WMCtrl Then use my ‘LoadWS.pm’ script to dynamically load and position sets of windows based upon the programming environment required… foreach my $id (keys %upd) { my $win=$upd{$id}; print "$id -> $$win{title}\n"; if(exists $$ref{ws}) { system("wmctrl -i -r $id -t $$ref{ws}"); } } Read More...

  • SpeedHouse machine installation 31-Dec-2006

    SpeedHouse machine installation From the DVD, install Basic Desktop for Fedora Core 6. However, much more is required (and the dependencies will be pulled in automatically). yum install yum-fastestmirror rpm -ivh http://rpm.livna.org/livna-release-6.rpm rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY yum update Programming : yum install joe scite Japanese : yum install scim-anthy yum install VLGothic-fonts fonts-japanese.noarch yum install gnome-sudoku Graphics : yum install inkscape yum install koffice-krita yum install xscreensaver-gl-extras-gss rss-glx-gnome-screensaver Music : yum Read More...

  • TrueCrypt interoperability : Linux scripts 31-Dec-2006

    TrueCrypt interoperability : Linux scripts Added scripts for Linux so that the CLI options were automatically correctly chosen. The GUI on WinXP is nice, but become repetitive after a while. mount-fieldstone : #! /bin/bash truecrypt --user-mount /media/1GB/Fieldstone.truecrypt /media/Fieldstone umount-all : #! /bin/bash truecrypt --dismount Also, so that normal users can mount and dismount truecrypt drives : # chmod u+s /usr/bin/truecrypt Read More...

  • TrueCrypt on FC6 : Installation Problems 31-Dec-2006

    TrueCrypt on FC6 : Installation Problems Anaconda bug had i586 kernel being installed on Dell 600m laptop, with uname -a mis-reporting an i686 installation. i586 -> i686 kernel change required, then truecrypt modules on farm.repo work like magic. When installing packages with kmods (e.g. the rt2500 and truecrypt drivers) you might run into trouble like this: Transaction Check Error: package kernel-2.6.18-1.2798.fc6 is already installed file /boot/System.map-2.6.18-1.2798.fc6 from install of kernel-2.6.18-1.2798.fc6 conflicts with file from package kernel-2.6.18-1.2798.fc6 file /boot/config-2.6.18-1.2798.fc6 from install of kernel-2.6.18-1.2798.fc6 conflicts with file from package kernel-2.6.18-1.2798.fc6 file /boot/symvers-2.6.18-1.2798.fc6.gz from install of kernel-2.6.18-1.2798.fc6 conflicts with file from package kernel-2.6.18-1.2798.fc6 file /boot/vmlinuz-2.6.18-1.2798.fc6 from install of kernel-2.6.18-1.2798.fc6 conflicts with file from package kernel-2.6.18-1.2798.fc6 This is due to a bug in anaconda (the Fedora Core installer) that accidentally installed an i586 kernel on your i686 machine. Read More...

  • SCiTE for Programmers : ScitePM 31-Dec-2006

    SCiTE for Programmers : ScitePM ScitePM is a lightweight, Gtk-based project manager for use with the SciTE editor. ScitePM allows the user to organize a set of files as a project, like most IDEs, and then open them within SciTE. The User interface now defaults to being a ‘skinny’ column of files / project items on the LHS of the screen, so that the SCiTE editor can maximized over the rest of the screen. Read More...

  • FC6 x86_64 Speedtouch 330 Wanadoo/Orange 31-Dec-2006

    FC6 x86_64 Speedtouch 330 Wanadoo/Orange Speedtouch driver now part of Fedora Core 6 (FC6). http://www.linux-usb.org/SpeedTouch/fedora/index.html awk '/4061/ { print $5 }' /proc/bus/usb/devices http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip unzip SpeedTouch330_firmware_3012.zip &&amp; chmod +x firmware-extractor && ./firmware-extractor ZZZL_3.012 When ppp calls up your ISP it will need to know your username and password. Open a text editor (On the top Panel, Applications > Accessories > Text Editor) and enter one line in this format “username@isp” “*” “password” username@isp should be your username with your ISP and password should be the password for your internet account. Read More...

  • P4M800Pro-M v2 Fedora Core 6 31-Dec-2006

    P4M800Pro-M v2 Fedora Core 6 Bought from WWW.PC-RACK.COM via e-bay. Sweet deal. Well put together machine (80Gb PATA HD, 512Mb of DDR2 DRAM). Problem areas : Read that choice of Apperture size (64Mb) is important. Getting correct screen resolution (using only LCD display for set-up). Disappearing network interface: Software Shutdown has no effect. Front panel power-off (held down until power-down) has no effect. Power cord removal (and power-supply power-down) for 5 seconds restores network card visibility. Read More...

  • Internal LAN and External ppp0 : DHCP & DNS 31-Dec-2006

    Internal LAN and External ppp0 : DHCP & DNS Set up DHCP - don’t create a DNS bit : Set up Bind : Read More...

  • Fedora Core 6 on Dell 600m 31-Dec-2006

    Fedora Core 6 on Dell 600m No Problemo! Wireless, etc, flawless. Remember to install Wireless Assistant. USB mouse works instantly. Suspend works fine (need to /etc/init.d/network restart to reinstate wireless sometimes. Hibernate doesn’t seem to work right. Read More...

  • Flash for Firefox on x86_64 31-Dec-2006

    Flash for Firefox on x86_64 Best solution : nspluginwrapper Gnash looks promising, but has problems : Lack of aliased fonts Memory leaks cause small Flash panels to take over machine after a couple of dormant hours No embedded video for video.google.com or youtube.com http://gwenole.beauchesne.info/en/projects/nspluginwrapper/help#release_notes -rw-r--r-- 1 platformedia users 53132 Dec 31 19:39 nspluginwrapper-0.9.91.2-1.x86_64.rpm -rw-r--r-- 1 platformedia users 50362 Dec 31 19:39 nspluginwrapper-i386-0.9.91.2-1.x86_64.rpm ` rpm -ivh nspluginwrapper-* #### Flash Player 9 Flash Player 9 beta 1 (9.0.21.55) is not supported. Read More...

  • Internal LAN and External ppp0 : webmin Firewall Routing 31-Dec-2006

    Internal LAN and External ppp0 : webmin Firewall Routing On “Networking - Linux Firewall” tab of webmin add the following : Packet Filtering (filter) table (drop-down box at top of page) : Forwarded packets (FORWARD) section : Rule #1: Comment : #Forward stuff from eth0 Action: Accept if: incoming interface = eth0 Rule #2: Comment : #default Action: Run Chain RH-Firewall-1-INPUT if: (always) Network Address Translation (nat) table (drop-down box at top of page) : Packets after routing (POSTROUTING) section : Rule #1 : Comment : #Masquerade to ppp0 Action : Masquerade if: Outgoing interface = ppp0 Setting up LAN machines From then, the LAN can be set up with hard IP addresses in the 192.168.1.x range. Read More...