Sunday, March 06, 2011

Making the WRN3500L into a Print Server

The Netgear WRN3500L came to my notice very recently when a local store had it on sale for the same price as the venerable Linksys WRT54GL, my go-to router for stable-as-a-rock installs for many years. The WRN3500L is also a Linux router, but it has all sorts of cool extras; Wireless N, gigabit Ethernet, and coolest of all, a USB port! Sadly, the supplied firmware didn't have any print server capabilities, and I really wanted that feature.

So, I've managed to turn my Netgear WRN3500L router into a print server (while still keeping it as a nice router). I did so using the standard DD-WRT build and an extra package that I downloaded using ipkg, the package-manager for OpenWrt and DD-WRT.

I used the following resources:

myopenrouter.com
The DD-WRT router database and wiki

Read on for my detailed instructions on doing it yourself. And feel free to comment if you have found things I should add or change.

Read more »

Labels: , , , , , , ,

Saturday, November 06, 2010

Running Meego Handset in an N900 chroot with Easy Debian: Part 2

In this post, I show you how to start the Meego Handset 1.1 "desktop" in a Maemo chroot, using Easy Debian and the image file you made using instructions in the last post.







DISCLAIMERS:

This is a very shaky process. It is in no way ready for use in any way other than "Oh that's cool!"

The animations on the desktop are very slow, and none of the applications seem to work except Fennec thanks to Robin Burchell, the applications all work now. Please update your scripts!

The Prerequisites:
  • You have a working install of Easy Debian on your N900, and you can start the LXDE desktop in a window.
  • You have made the image from the last post, and you have put it in your /home/user/MyDocs folder.

Quickstart:

I have written four little scripts that semi-automate the process of starting the Meego UI. You can download the zip file containing the four (updated!) scripts here at qole.org. You must put these scripts in the /home/user/meego directory, or edit the scripts to look in another directory.

Put the scripts in the MyDocs folder of your N900 (that's where they'll download if you just choose the root "N900" folder when downloading from the N900), and then, at the Maemo terminal prompt on your N900:

~ $ tar xzvf MyDocs/meegoscripts.tgz

Then:

~ $ cd meego
~/meego $ ./debmee

Hopefully, that's all you have to do to get the Meego 1.1 desktop to start up on your N900. Read on for more details of what's going on "under the hood."
Read more »

Labels: , , , , , , ,

Tuesday, February 24, 2009

Qole's Notes: Building an Easy Mer / Ubuntu Chroot for the NIT

Mer Midori running in OS2008 Diablo via chroot

Why Mer?

I've been wanting to set up an Ubuntu chroot in the style of Easy Debian. I've decided to use the Mer 0.8 rootfs because:
  • Mer is based on Ubuntu Jaunty, which is my current distro of choice, mainly because it has the newest Open Java6 JDK.
  • The Mer developers have clearly been working to slim down the big Ubuntu footprint; consequently, the image is much smaller than a comparable Jaunty image.
  • The Hildon Input Method works automatically with GTK apps; this means the stylus keyboard pops up when I tap an input field in a GTK app.
  • Midori, a great little GTK WebKit-based browser, comes bundled. Not only that, but they've managed to get some Hildonization done by the developer!

Qole's Notes

Here are my notes for customizing the Mer 0.8 rootfs to run in my chroot.

I have the rootfs set up in a partition on my SD card, and I'm using my Easy Debian package to do the actual chroot.

I'm posting these so I can set things up quickly in the future. Hopefully someone else finds something of value here too.

Configuring the Chroot

Some basic configuration needs to be done, right off the bat. First, from the Maemo prompt:

sudo closechroot
touch /home/user/.synchroot


Then, as root inside the chroot:

mkdir -p /home/user
chown user:users /home/user


This will copy some Maemo config files into the chroot and make a home directory for "user".

Default Ubuntu Shell

The shell defaults to "dash" as opposed to "bash". As explained here, this was a decision by the Ubuntu team to improve boot speed. Boot speed is not relevant in a chroot, so I repoint /bin/sh to bash instead of dash. Inside the chroot:

rm /bin/sh
ln -s /bin/bash /bin/sh


I don't like this solution very much; it will make the system much slower booting (if you wish to boot to it). I'm going to see about leaving dash symlinked and purposely calling bash when a chroot terminal is requested.

Setting Locale:


Changing locales in Ubuntu is ugly, even "broken," as described here. This is what I do (from within the chroot) to get en_GB (my Maemo locale) set up in the chroot. From within the chroot:

cat /usr/share/i18n/SUPPORTED | grep en_GB
vim /var/lib/locales/supported.d/local
dpkg-reconfigure locales


Hardware Key Hacks / GTK Stylus Setup

Now it's time to get the pieces needed for my fullscreen and on-screen keyboard hacks. From within the chroot:

apt-get update
apt-get install matchbox-keyboard wmctrl xbindkeys libgtkstylus


I use xbindkeys, wmctrl, and Matchbox-Keyboard to do "fake hildonization;" by running xbindkeys, I can map the hardware key combination "-" and "fullscreen" to make any app fullscreen, and "-" and "menu" to toggle the Matchbox keyboard.

Boy, Ubuntu's version of Matchbox keyboard is ugly. What's with the shaded keys?

The libgtkstylus on the end there lets the user use tap-and-hold for right-click within GTK apps.

Adobe Flashplayer

Now I install Stskeep's Adobe flashplayer hack, to allow Flash to work in Midori and other browsers. In maemo root terminal (with chroot mounted):

cd /root
wget http://qole.org/files/deblet-flashplayer.tar.gz
tar xzvf deblet-flashplayer.tar.gz
cd flashplayer
leafpad flashplayer.sh

(change the CHROOT value to point to the directory where your chroot is mounted & save)
./flashplayer.sh

That should configure most Ubuntu browsers to use the maemo Adobe flash plugin.

OpenJDK (Java 6)

apt-get install icedtea6-plugin (This wants to pull in all sorts of unnecessary language fonts; I had to add all the ttf pkgs to the install line, followed by "-" for each, eg ttf-baekmuk- ttf-bengali-fonts- ttf-kannada-fonts- etc...)
sudo debian update-java-alternatives -s java-6-openjdk
sudo ln -s /usr/lib/jvm/java-6-openjdk/jre/lib/arm/IcedTeaPlugin.so /ubuntu/usr/lib/firefox-addons/plugins/libjavaplugin.so

Test the install here:

http://java.sun.com/applets/jdk/1.4/index.html

There currently doesn't seem to be a way to get OpenJava6 to run in Midori. I installed Mozilla Prism to to test Java. It seems to be the lightest-weight Java-capable browser available for the tablet. From within the chroot:

apt-get install prism

Prism running a simple demo Java applet

DBus

Getting maemo / chroot dbus processes to talk is proving to be a challenge...
Maemo doesn't seem to keep the machine id in /var/lib/dbus/machine-id, which is where most dbus-aware apps expect it to be. So far, I've found the following seems to work. In a maemo root terminal (after starting the chroot in /ubuntu) [1]:

dbus-uuidgen --ensure
mount -o bind /var/lib/dbus /ubuntu/var/lib/dbus


This seems to make DBus work; the Mer osso-xterm from maemo will respect the existence of maemo's osso-xterm. The only way to start Mer's osso-xterm is to close maemo's version first.

I've got to make this more permanent. I have to do the mount -o bind command every time I start the chroot (after closechroot or reboot).

Other Problems

The stylus keyboard doesn't work in Midori's web pages, only in the address bar. This is true for any GTK browser. The widgets within the web page are not GTK widgets, so no Hildon Input Method activation. Java doesn't work in Midori, and Prism is a very stripped-down browser, with a very bare interface. Sadly, even installing xulrunner Gnome support doesn't help with making it more stylus friendly. Is there nothing like MicroB out there?

Theme problems: There's got to be a way to get the chroot and maemo sharing theme information and icon info, too. This is certainly a difficult problem. Perhaps the simplest solution is to install the same theme into both maemo and mer.

Dash-vs-Bash: I've gotta figure out a way around this...

Extra apps

Leafpad is my favorite lightweight text editor. It works great in this chroot, because it is completely GTK, so the stylus keyboard and tap-and-hold right-click work fine.

Gnome ALSA mixer
is a nice addition. It is not included in the tarball below, but it is easy to install, and it doesn't pull in a huge number of dependencies.

Future: I want to experiment with Fennec Alpha 2 (+24.3 MB) and Abiword 2.6.6 (+53 MB), and see how they work in this environment. I also would like to try the E17 desktop.

Downloadable rootfs tarball

Here's a tarball of the mer 0.8 chrootfs with all of the above already completed (158 MB).

Updates
25-Feb-09: Here's what I've discovered so far:
  • Fennec doesn't do Flash (even though it sees the plugin, it doesn't actually show the Flash) and it is somewhat unstable. I can't select text; if I drag, it just drags the page. If I double click, it zooms.
  • Abiword works, and it uses Hildon Input Method. It seems to have problems loading files, however, often opening an empty "Untitled" file instead of the chosen document. It also is a bit wobbly; it crashed once on me.
  • I can make the stylus keyboard pop up in most Mer apps (where it doesn't pop up by itself) by pressing the centre d-pad key.
01-Mar-09: Getting themes to work:

I've found a two-step way to get the theme to work in the chroot.
  • Edit /home/user/.gtkrc-2.0 and comment out any theme-related lines. Add the following line:
include "/usr/share/themes/liberty/gtk-2.0/gtkrc"
  • Start the sapwood theme server inside the chroot (as user, not root). I have no idea why it doesn't share the running sapwood server in Maemo; probably Nokia's version is proprietary somehow.
/usr/lib/sapwood/sapwood-server &
If you want to maintain a consistent theme throughout, then you need to install the same theme in OS2008 and the chroot. So far, this seems to be limited to the Titan theme, since the Liberty theme isn't available for OS2008 and Titan is the only third-party OS2008 themes in the Mer repository at the moment.

I will post updates as I discover more.

Labels: , , , , , , , , , , ,

Monday, October 29, 2007

N800 Optimal Setup (OS2007)

I received my new Nokia N800 last week, and I found that a new owner should really spend some time getting things set up before starting to use the device.

Here are my suggested steps for setting up the device.

Essential: Update the firmware. Don't waste any effort personalizing anything or installing software, just update the firmware. Immediately.

For some reason Nokia didn't include best-of-breed software installed by default on the tablet. Here are my suggested replacements:

Essential:
The included media player is garbage for watching video. Install mplayer instead. Encode your 4:3 (non-widescreen) videos as 320x240 XviD, and your widescreen videos as 400x240 XviD (I recommend cropping a bit off the sides rather than letterboxing). It sounds low resolution, but it looks great on the screen.

The included Opera-based browser is inferior. The MicroB browser, based on Firefox, is a much superior drop-in replacement browser engine. Nokia seems to agree. Rumours are that it will be included as default in OS 2008 (due out in a few weeks, as of this post).

Maemo Mapper is really cool if you want to use your N800 for navigation, and essential if you want to connect it to a Bluetooth GPS device. Make sure you hit the download button to get all of the other maps. The default map provider, OpenStreets, is pretty pathetic. At least for my city, Vancouver.

The N800 comes with a built-in camera, but, out of the box, you can only use it to video chat with other N800 (or 810) users at the moment. Google Talk doesn't have a compatible video client on any of the desktop operating systems, and Skype doesn't yet have a video client for the N800. Pretty shabby, if you ask me. At least Nokia could have released their N800 video plugin as Open Source so someone could port it to another platform.

So, if you want to use the camera for something, then install the Camera app or Knips.

If you want listen to FM radio, you have to install the FM radio applet.

The included instant messaging app is only capable of Google Talk. No, I don't know why! So install Pidgin. This one's a bit more work, but totally worth it.

The included PDF reader is pretty useless. Install evince instead. Then go get some free books (like "Someone Comes to Town, Someone Leaves Town" or "Ventus") and get reading!

UKMP seems to be a really nice media center, for those who like that kind of thing. Makes your N800 look very iPod-like. This is a a bit of a complicated install. Ok, not really. First install Python 2.5 and then install UKMP.

Just a note. UKTube, included with UKMP, is broken. Probably due to YouTube tinkering with their interface. Actually, many of the YouTube downloaders seem broken these days. And you really don't want to try to watch YouTube videos with the included Flash plugin (and there's no superior community replacement for that, since that's a closed-source project).

This one is still working: http://www.witube.net/index.php

Geek Zone:

If, like me, you want to use your N800 like a little computer, then here are some things you probably want.

Note: I was able to install the following stuff without having to enable R&D mode or anything like that. Perhaps the latest firmware?

VNC (remote desktop control software): This will let you connect to your desktop computer. For total Geek Mode, this will get you a remote desktop that fits exactly to the screen dimensions of your N800. This looks really cool when you go fullscreen on the N800, hide the toolbar, then open OpenOffice on the remote desktop. So, if you have a linux desktop, install VNC server and run this on your desktop linux computer: vncserver -geometry 800x480

A shell / command line / terminal: Get Osso XTerm Enhanced.

IMPORTANT NOTE: Before I go on, I have to say that I've seen a lot of places talking about installing SSH on your N800. I haven't seen much stress the terrible security risk involved. However, since the default root password is widely available, you must must must change the root password as soon as you install the ssh package. You're propping open the back door of your device if you don't! And there's a lot of scruffy, smelly guys in that particular back alleyway.

Install SSH. Reboot. Open the XTerm. Copy or enter the following (replace [newpassword] with your new password of course):

ssh root@localhost
(enter the default root password)
passwd root [newpassword]
passwd user [newpassword]

Now you can get root access to your device securely and easily. Just type
ssh root@localhost
from your N800, or better still, WinSCP or some other SCP/SFTP capable program and log in to your N800 remotely (once you know your N800's IP address). This (SCP/SFTP) is my preferred way of accessing the N800.

I will post again soon with instructions on re-arranging the N800 Application Menu using the above remote root access.

Hint: look at /home/user/.osso/menus/applications.menu

Labels: , , , , , , , , ,