Marcel's weblog

Bloggers zijn blijer!

Archive for Computers en internet

January 13, 2010
13 Jan

Asrock ION 330HT as Wireless Access Point

Posted by Marcel, January 13, 2010

If you know how to do it, most things are simple. Figuring out how to make my Asrock ION 330HT-BD (running Ubuntu Karmic) a wireless access point  took me a couple of hours. For my own reference and maybe to save you some time I wrote down all steps.

How-to

  • Check wireless adapter type
    • lspci -v | grep Network

      • Should be AR9285
  • Enable IP forwarding
    • sudo gedit /etc/sysctl.conf
      • Uncomment
        • net.ipv4.ip_forward = 1
    • Live change
      • sudo echo 1 > /proc/sys/net/ipv4/ip_forward
    • Check
      • cat /proc/sys/net/ipv4/ip_forward
  • Give wireless adapter a static address
    • sudo gedit /etc/network/interfaces
      • Add code below
    • Live change
      • sudo /etc/init.d/networking restart
    • Check
      • ifconfig wlan0
auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    broadcast 192.168.0.255
  • Download latest Linux wireless drivers (currently version 2.6)
    • Extract archive
    • Build/install
      • cd compat-wireless-*
      • ./scripts/driver-select ath9k
      • make
      • sudo make unload
      • sudo make install
      • Redo when new kernel
    • Live change
      • sudo modprobe ath9k
    • Check
      • grep ath9k /var/log/syslog
  • Install hostapd
    • sudo apt-get install hostapd
    • sudo gedit /etc/default/hostapd
      • Uncomment
        • RUN_DAEMON="yes"
        • DAEMON_CONF="/etc/hostapd/hostapd.conf"
    • sudo gedit /etc/hostapd/hostapd.conf
      • Add
        • driver=nl80211
      • Change
        • ssid=<name>
        • hw_mode=g
        • auth_algs=1
        • wpa=2
        • wpa_passphrase=<password>
        • wpa_pairwise=TKIP
    • Live change
      • sudo /etc/init.d/hostapd restart
    • Check
      • grep hostapd /var/log/syslog
  • Install dnsmasq
    • sudo apt-get install dnsmasq
    • sudo gedit /etc/default/dnsmasq
      • Uncomment
        • DNSMASQ_OPTS="--conf-file=/etc/dnsmasq.conf"
      • Comment
        • #CONFIG_DIR=/etc/dnsmasq.d
    • sudo gedit /etc/dnsmasq.conf
      • Add
        • interface=wlan0
        • dhcp-range=192.168.0.2,192.168.0.127,12h
    • Live change
      • sudo /etc/init.d/dnsmasq restart
    • Check
      • grep dnsmasq /var/log/syslog
  • Routing
    • Give the Asrock a static IP 192.168.1.x
      • Preferable by your local DHCP server (based on MAC address)
    • Add a static route 192.168.0.0/255.255.255.0 > 192.168.1.x
      • In your modem/router
  • Now you should be able to connect

Links

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
January 12, 2010
12 Jan

Ubuntu HTPC with satellite TV

Posted by Marcel, January 12, 2010

This how-to describes which hardware and software components I used to build my Home Theater PC, with the ability to watch satellite television too. It includes a step-by-step guide for installing and configuring the required software, which appeared to be quite an adventure if you want to use a softcam, because the information was scattered around the internet.

Some people consider the use of a softcam illegal. My opinion is that a softcam can be used illegally, but if you use it in combination with a valid subscription on one PC only it is perfectly legal. In fact I see no difference with a real CAM, which contains the same kind of software (firmware).

For installing the software at least some experience using the Linux CLI is required.

Comments, corrections and additions are as always very welcome!

Hardware

Goal

  • Small size
  • Low power
  • Low noise
  • HD ready
  • Satellite reception
  • Softcam
  • Linux compatible
  • Affordable

Guide

Power usage

Asrock ION 330HT-BD + TeVii S660

  watt kWh/year Per year
Powered down ~3 26 €5,55
Ubuntu running ~29 254 €53,60
VDR running, no client ~31 271 €57,29
Watching SD channel ~36 315 €66,53

Assuming an average of 21,1 cent per kWh

Software

Goal

  • Open source
  • Repositories, only compilation when really necessary
  • User friendly
  • Recent, stable, supported, actively developed software

Guide

  • Install Ubuntu Karmic Koala 32 bit (use CD or unetbootin)
  • Pin kernel 2.6.31-14 (see issues)
    • sudo gedit /etc/apt/preferences
      • Package: linux-generic linux-headers-generic linux-image-generic
      • Pin: version 2.6.31-14
      • Pin-Priority: 1001
  • Setup network (wireless or wired)
  • Install NVIDIA driver
    • System | Administration | Hardware Drivers: Activate
  • To prevent tearing
    • System | Preferences | Appearance: Visual Effects: None
  • Install TeVii S660 driver
    • sudo apt-get install unrar
    • Download and extract to home folder
    • cd linux_tevii_ds3000
    • sudo -s
    • cp *.fw /lib/firmware
    • tar xjvf linux-tevii-ds3000.tar.bz2
    • cd linux-tevii-ds3000
    • make -j2
    • make install
    • Cycle power
    • dmesg | grep dvb
      • Check TEVII S660 DVBS2 USB2.0 successfully initialized and connected
    • The V4L-DVB device drivers contain almost the same code
    • Redo when new kernel
  • Install newcs card server newcs
  • Install softcam sasc-ng
    • sudo apt-get install linux-headers-`uname -r` build-essential mercurial openssl libssl-dev gettext
    • cd ~
    • hg clone http://85.17.209.13:6100/sc (bleeding edge!)
    • cd sc
    • gedit Makefile
      • Find and remove -O3 from CSAFLAGS
    • cd ~/sc/contrib/sasc-ng
    • chmod +x configure
    • chmod +x ./dvbloopback/module/config_dvb.pl
    • ./configure --dvb-dir=~/linux_tevii_ds3000/linux-tevii-ds3000
    • make
    • make module
    • sudo -s
    • cp sasc-ng /usr/bin
    • mkdir /lib/modules/`uname -r`/misc
    • /usr/bin/install dvbloopback.ko /lib/modules/`uname -r`/misc/
    • depmod
    • modprobe dvbloopback
    • ls /dev/dvb
      • Check adapter1 (assuming one tuner)
    • mkdir /etc/sc
    • cp cardclient.conf /etc/sc
    • When FTDI bug is fixed: cp cardslot.conf /etc/sc
    • Redo when new kernel
  • Create card server / softcam startup script
    • Download script
    • sudo -s
    • cp sc /etc/init.d
    • update-rc.d sc defaults 19
    • /etc/init.d/sc start
  • Install CIR receiver driver
    • Download and install
    • Remote control configuration
      • 1st config: None, None
      • 2nd config: Nuvotron Transceivers/Remotes, None
    • Redo when new kernel (because it is a patch actually)
  • Install VDR
    • deb http://ppa.launchpad.net/the-vdr-team/vdr-ubuntu-karmic/ubuntu karmic main
      • System | Administration | Software Sources, Other
    • sudo -s
    • apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6CF20474
    • apt-get install vdr vdr-plugin-xineliboutput xineliboutput-sxfe
    • gedit /etc/default/vdr
      • OPTIONS="-w 60 -D 1 --lirc=/dev/null"
    • More than one LNB
      • gedit /etc/vdr/diseqc.conf  (Astra 19E2/23E5)
      • gedit /var/lib/vdr/setup.conf (create file)
        • DiSEqC = 1
    • gedit /var/lib/vdr/setup.conf (create file)
      • UpdateChannels = 0
    • Download channels.conf (syntax)
      • grep -v ':-' channels.conf | grep 'CANALDIGITAAL' >/var/lib/vdr/channels.conf
      • grep -v ':-' channels.conf | grep -v 'CANALDIGITAAL' >>/var/lib/vdr/channels.conf
    • Or scan channels
      • sudo apt-get install w-scan
      • sudo /etc/init.d/sc stop
      • w_scan -fs -sS19E2 -o7 -D0c >channels.conf
      • w_scan -fs -sS23E5 -o7 -D1c >>channels.conf
      • sudo /etc/init.d/sc start
      • Make channels FTA:
        • awk -F: '{if ($1 == "" ) print $0 ; else \
        • print $1":"$2":"$3":"$4":"$5":"$6":"$7":"$8":0:"$10":"$11":"$12":"$13}'  \
        • channels.conf >>/var/lib/vdr/channels.conf
    • cp remote.conf /var/lib/vdr (info)
    • sudo /etc/init.d/vdr start
      • Check /var/log/user.log
    • Optional: apt-get install vdr-plugin-femon vdr-plugin-eepg
  • Update Ubuntu
    • System | Administration | Update Manager
  • Watch
    • Disable screen saver
      • System | Preferences | Screensaver: Active ...: Never
      • System | Preferences | Power Management -> Display: Never
    • Dowload vdr-sxfe.sh to home folder
      • System | Preferences | Startup Applications: Add
      • Command: browse to vdr-sxfe.sh
    • Alternative
      • Put .lircrc in the home folder
      • Add irexec -d to startup applications
      • Start/stop vdr-sxfe using Enter/Clear on the remote control
      • Easy when vdr-sxfe crashes

Issues

  • FTDI bug
    • Linux kernel must be pinned
    • newcs is needed to read smartcard, which it sometimes fails to do at startup
  • Communication sasc-ng/newcs sometimes fails
  • Zap time encrypted channels >= 5 sec
  • The German FTA HD channels work, but NederlandHD has only sound sofar
  • No official repositories, some compilation necessary
  • I have to set the listed frequencies about 25 MHz lower to get signal. This is annoying, because scanning channels does not work properly. The cause is most probably the TeVii S660 device, since using Windows doesn't make any difference (assuming the drivers are different) and because my LNB has been replaced in the meantime. My local supplier will replace the device when it is restocked (probably within a week).
  • The fans of the Asrock are little noisy, however the high pitch can be canceled:

To remove the heatsinks the motherboard has to be removed (four screws and some cables).

Questions

  • Does anybody know how to compile vdr-plugin-sc without compiling vdr too?
    • Without getting the message below when starting vdr
      • WARNING: The following plugins have been left out due to really binary incompatibility: sc.

Links

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
December 1, 2009
1 Dec

Televisie kijken met Ubuntu

Posted by Marcel, December 1, 2009

Als je alleen FTA zenders (Nederland 1, 2 en 3 en regionale zenders) via de ether (Digitenne) wilt ontvangen, is televisie kijken en opnemen met Ubuntu heel eenvoudig. Hiervoor heb je nodig:

Bijna overal in Nederland is er dekking. Afhankelijk van je woonplaats en -situatie kan het nodig zijn om een buitenantenne te gebruiken. Ik heb bijvoorbeeld op zolder net voldoende signaal, maar op andere plaatsen in mijn huis niet. Ik heb een USB-verlengkabel gebruikt om de antenne op een gunstige plaats te zetten.

Zelfs op mijn Asus Eee PC 701 werkt het goed. De beeldkwaliteit is aardig, maar niet zo goed als via de satelliet.

Digitenne

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
November 14, 2009
14 Nov

Uninstalling Ubuntu Netbook Remix

Posted by Marcel, November 14, 2009

I tried the Ubuntu Netbook Remix (Karmic Koala 9.10 version) on my desktop by installing the meta package ubuntu-netbook-remix and by adding the Go Home and Window Picker applets to the upper panel. Because the Desktop Switcher application has been dropped from the Karmic Koala release, I was searching for a documented way to remove the netbook remix. I couldn't find one, so I determined on another desktop which packages are being installed and came up with the following:

  • Remove the Go Home and Window Picker applets
  • Using System | Preferences | Startup Applications disable and remove:
    • Maximus Windows Management
    • Netbook Launcher
  • Issue the following commands in the terminal:
    • sudo apt-get remove go-home-applet libclutk-0.2-0 libfakekey0 liblauncher-0.1-0 libnetbook-launcher-0 maximus netbook-launcher ubuntu-netbook-remix-default-settings webfav window-picker-applet ubuntu-netbook-remix
    • sudo apt-get cheese (if you hadn't Cheese installed before)
    • sudo apt-get autoremove
  • Reboot

If you know a simpler way, please let me know.

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
November 10, 2009
10 Nov

Installing Ubuntu Karmic Koala on an Asus Eee PC

Posted by Marcel, November 10, 2009

Based on the installation instructions of the previous version here a how-to guide to install the desktop version of Ubuntu Karmic Koala (version 9.10) on an Eee PC. This guide has been tested using an Eee PC 701 and will take one or two hours to execute (depending on your download speed and the hardware used).

Starting points

  1. The (smaller) SSD will be erased (backup important data!)
  2. Ubuntu will be installed without customizations ('Vanilla') and without swap space
  3. You have some experience using the CLI (Terminal)
  4. An USB flash memory stick of at least 1 GB is available

Instructions

The first four steps can be executed on a desktop PC running Microsoft Windows too. Instead of UNetbootin it is possible to use the new Ubuntu USB Startup Disk Creator too (System | Administration | USB Startup Disk Creator).

  1. Download the desktop version of Ubuntu here
  2. Download UNetbootin here
  3. Insert the USB flash memory stick into your desktop PC
  4. Start UNetbootin
    • Select 'Disk Image' and select the downloaded .iso file
    • Select the inserted USB flash memory stick and press 'Ok'
  5. Remove all removable media from the Eee PC and insert the prepared USB flash memory stick
  6. Turn the Eee PC on
    • Press Esc soon after startup
    • Select USB Flash Memory or Disk and press enter
    • Select 'Default' (or wait a moment)
    • Ubuntu Live should startup
  7. Check if everything works (wireless, sound, etc)
  8. Select System | Preferences | Appearance, Visual Effects -> None
    • Press the 'Close' button below
    • By pressing Alt + left mouse you can drag larger windows using the mouse pad now
  9. Start the installation wizard by double clicking the install icon and follow its steps
    • I choose my own keyboard layout: 'USA - International (AltGr dead keys)'
  10. At the step 'Prepare disk space':
    • Select 'Specify partitions manually (advanced)' and press 'Forward'
    • Take a good look at what drive you want to install Ubuntu (all data will be erased!)
      • You probably want to install on the smaller SSD, because it is the fastest
    • Delete all partitions from the chosen drive (click on each partition and press 'Delete')
    • Select 'free space' and press 'Add...'
    • Choose 'Ext3 journaling file system' as 'Use as:' (I don't recommend using Ext4)
    • Choose '/' as 'Mount Point'
    • Check 'Format?'
    • Press 'Forward'
    • Confirm the message that no swap has been selected by pressing 'Continue'
  11. Continue the wizard, the installation will take about 25 minutes
  12. Press 'Reboot Now' and remove the USB flash memory stick when asked

Karmic Koala is installed and should work now.

Tweaks

The following steps are to improve some things and to setup others. Skip what you don't need/want.

  1. Open the terminal and run this command:
    • gconftool-2 --set /apps/compiz/plugins/move/allscreens/options/constrain_y --type bool false
    • By pressing Alt + left mouse you can drag larger windows using the mouse pad now
  2. Setup wireless internet:
    • Click the signal indicator in the upper task bar
    • Select your network of preference
    • Enter the network password if required
  3. Limit the number of writes to the SSD this way (sudo gedit /etc/fstab)
  4. Disable login sound:
    • Open the terminal and run this command:
    • gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
  5. Select System | Administration | Synaptic Package Manager, then Settings | Preferences | Files
    • Select 'Delete downloaded packages after installation'
    • Set 'Delete History files older than 0 days'
    • Press 'Ok'
  6. Select System | Administration | Time and Date
    • Press the keys symbol and enter your password if asked
    • Set 'Configuration' to 'Keep Synchronized'
    • Press 'Install NTP support'
    • Select one or more servers near your location
  7. Right click on the date/time in the upper task bar and select 'Preferences'
    • General | 24 hour format
    • Location | Add, enter a location name near to you
    • Weather | C & km/h
  8. I installed the following applications:
  9. Localized spell-checker: sudo apt-get install aspell-<language> (thanks Satyamo)
  10. Localize OpenOffice (thanks Satyamo):
    • Go here
    • Search for your language
    • Press 'Get it!' and save the file
    • Right click on the saved file
    • Select 'Open with Other Application'
    • Select 'OpenOffice.org Word Processor'
    • Follow the dialog
  11. I changed the following Firefox settings:
    • View | Toolbars | Bookmarks Toolbar -> Uncheck
    • View | Status Bar -> Uncheck
    • Edit | Preferences | Advanced | Network | Offline Storage ->Use up to 0 MB
    • Type 'about:config' in the addres bar
      • Press 'I'll will be carefull, I promise!'
      • Set 'browser.urlbar.clickSelectsAll' to 'true' by double clicking
    • Tool | Add-ons, search 'Firebug', click 'Add to Firefox...', etc
  12. Start Pidgin automatically (or Empathy)
  13. Default detailed file lists: Open a file browser, Edit | Preferences, View new folders using -> List View
  14. Default subtitles: Move Player | Edit | Preferences, Text Subtitles | Automatically Load ... -> Check

Performance

Startup until login prompt: about 35 seconds (Intrepid: 65 sec; Jaunty: 45 sec)
Login until desktop: about 25 seconds (Intrepid: 30 sec; Jaunty: 25 sec)
Shutdown: about 7 seconds (Intrepid: 15 sec; Jaunty: 15 sec)
Used space after all updates: about 2.2 GiB (df -h) (Intrepid: 2.6 GiB; Jaunty: 2.2 GiB)

Desktop

After some shuffling around, my desktop looks like this:
Asus Eee PC Ubuntu Karmic Koala desktop
Basically the bottom panel has been removed and most of its items have been moved to the top panel.

Function keys

F1 Zzz Works
F2 Wireless Works
F3 Contrast- Works
F4 Contrast+ Works
F5 Externe monitor ?
F6 Task manager ?
F7 Mute Works
F8 Volume- Works
F9 Volume+ Works

Other functions

Suspend on lid close Works
Video/sound Works
Microphone Works
Webcam Works
Bluetooth (Sitecom CN-516) Works

Comments, corrections and additions are as always very welcome!

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
August 28, 2009
28 Aug

WordPress plugin: Mini Mail Dashboard Widget

Posted by Marcel, August 28, 2009

Recently I published the One-Time Password WordPress plugin to be able to login more safely into my weblog to write my travel stories in internet cafés. I wanted something similar to access my e-mail. I considered using my weblog URL as OpenID, but most e-mail providers support OpenID only as provider, not as consumer (meaning that you cannot login with an OpenID). But suddenly I thought why not access my e-mail directly from my WordPress dashboard using a pre-stored password? This is exactly what the Mini Mail Dashboard Widget plugin offers, with the option to receive SMS messages when new e-mail messages arrive (using the services of VoipBuster or one of its clones).

Mini Mail Dashboard Widget

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
August 9, 2009
9 Aug

WordPress plugin: Cli.gs and Tweet

Posted by Marcel, August 9, 2009

For various reasons it is sometimes handy to have short URLs to my posts. After reading this post and some surfing around I selected Cli.gs as short URL service.

I couldn't find a simple WordPress plugin to create and display Cli.gs short URLs, so I wrote Cli.gs and Tweet. As the name suggests this plugin can send a customizable Twitter message containing the created short URL too. This plugin can also inserts code into the page header for short url auto-discovery.

There is no setup required if you only want to automatically create short URLs when saving posts and display them above your posts. If you want to send Twitter messages, you just have to enter your Twitter user name and password. The appearance can be modified by some settings and/or by modifying a style sheet.

cligs-tweet-screenshot-1

This plugin requires PHP 4.3.0 only.

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
July 24, 2009
24 Jul

Streaming video download met Ubuntu Jaunty

Posted by Marcel, July 24, 2009

Omroep.nlVandaag wilde ik net als Satyamo een video van Uitzendinggemist.nl met Ubuntu Jaunty (versie 9.04) downloaden. Na even zoeken, blijkt het zo te kunnen:

  • Installeer via het menu Applications, Add/Remove... VLC media player
  • Ga naar de pagina met de video, bijvoorbeeld Holland Doc: My second Life
  • Klik rechts op de video en kies Copy om de link te kopiëren
  • Start VLC media player (via het menu Applications, Sound & Video)
  • Kies Media, Convert / Save...
  • Ga naar het tabblad Network
  • Plak de gekopieerde link in Address
  • Kies Convert / Save
  • Vink File aan en Browse naar een file, kies als extensie .mpeg
  • Kies Profile MPEG-4 / DivX
  • Kies Save en heb geduld ...
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
July 22, 2009
22 Jul

WordPress plugin: One-Time Password

Posted by Marcel, July 22, 2009

I my attempt to write my travel stories in internet cafés without worries I wrote the Login Virtual Keyboard plugin sometime ago. However, using a virtual keyboard to prevent keylogging is somewhat clumsy and is still not entirely safe.

To improve safety I recently wrote the One-Time Password plugin that enables me to login to my weblog using passwords which are valid for one session only, so my main WordPress password cannot be stolen. The plugin is simple to use, just install it, generate a password list and you can start logging-in using one-time passwords.

For even more safety, I added the possibility to protect administrative actions with one-time passwords in version 2.

If you find this plugin useful, please vote for it on the WordPress Competition Blog.

Update: this plugin is one of the 11 12 13 Vital Tips and Hacks to Protect Your WordPress Admin Area.

Login

Login

List

List

Generator

Generator

The authorize window for an administrative action

Authorize

VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
June 19, 2009
19 Jun

Display post visits using CyStat

Posted by Marcel, June 19, 2009

I wanted to show the number of visits per post using the statistics recorded by the CyStat plugin. This appeared to be quite simple, because there exists a suitable template function. I just added the following line to my WordPress theme to make it working:

<div><span><?php cystats_getPostVisitsByID($post->ID, $showmode=TRUE); ?> Visits</span></div>
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
Tags:
Page 1 2 3 4 »