maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Minor customisation (https://talk.maemo.org/showthread.php?t=5504)

timmorris 2007-03-27 01:44

Minor customisation
 
I've had my N800s for 24 hours now and there are two areas I'd like to customise.

1. Three of them are being used as dedicated squeezebox remotes. Is it possible to launch a browser in full-screen mode when re-booting? It will make them more family freindly.

2. For some reason Nokia have decided that we don't use the 24 hour clock in the UK. Is there a file I can edit to alter the regional settings profiles?

Tim

Milhouse 2007-03-27 02:45

Re: Minor customisation
 
1. You'd need to modify the initfs script, I'm not an expert on this but someone else may advise further. There's no easy way to accomplish this, it's a question that crops up from time to time in the newsgroup from users wanting to use the Internet Tablets in a "kiosk" mode. Try searching the newsgroups, or how about using the new "application launch" home page widget - perhaps it can be configured with an icon to load the Squeezebox URL so that starting the remote is only one button push away?

2. No - it's bug #303 and Nokia don't anticipate fixing it any time soon. The only solution appears to be to choose a region/locale where Nokia think the 24 hour clock *is* used, such as Germany or Netherlands. The current situation is, quite frankly, insnane but there's not a lot we can do about it (date formats are also stuffed up). :(

Sam Lowry 2007-03-27 03:43

Re: Minor customisation
 
Speaking of the clock.... is there a way to have a small clock always in the "sidebar" ?

luketoh 2007-03-27 07:37

Re: Minor customisation
 
Hi Sam,

Yes, I read about a Statusbar clock around.

http://www.internettablettalk.com/fo...tatusbar+clock

OR

https://garage.maemo.org/projects/statusbar-clock

Not sure if they work fine...have not tried them yet.


Luke

timmorris 2007-03-27 10:09

Re: Minor customisation
 
Thanks for the suggestions.

A shortcut on the home page isn't a problem as the remote control is just a web page.

On a completely different note does streaming mp3s over WLAN usually kill the battery? If I start streaming from my server expected battery life goes from 7 hours down to 1 within a couple of minutes.

I'm not quite looking for kiosk mode but if I can launch a web-page in full-screen mode as a startup item it is an easy way for users to bring the device back to their comfort zone - if you get lost just power down, and power back up.

It did make me titter to myself when I found out that the regional settings could not be adjusted by editing a text file. I thought that was the whole point of Linux over Windows - rather than a huge database which is unwieldy to manage (registry) that configuration items are all stored in easy to edit text files...

Tim

Karel Jansens 2007-03-27 14:22

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41301)
On a completely different note does streaming mp3s over WLAN usually kill the battery? If I start streaming from my server expected battery life goes from 7 hours down to 1 within a couple of minutes.

Streaming is pretty juice-happy. You probably could extend battery life by a bit by using external speakers. I generally use one of those battery-powered iZenPod-whatever speaker boxes, or a spare set of computer boxes. Don't expect to get your seven hours back though.

Another solution is one of those emergency cellphone chargers, the ones that take 4 AA batteries. The one I've got (loaded with 2.5 Ah Nimh rechargeables) effectively doubles the battery life of my N800 (for some reason, it doesn't work -- well -- with the 770). You'd have another box dangling from your Numpc, but at least the tunez keep coming...

jethro.itt 2007-03-27 16:51

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41301)
It did make me titter to myself when I found out that the regional settings could not be adjusted by editing a text file. I thought that was the whole point of Linux over Windows - rather than a huge database which is unwieldy to manage (registry) that configuration items are all stored in easy to edit text files...

This made me want to investigate, even though the problem does not affect me. Looks like the locale data is kept in a binary database in /usr/lib/locale/locale-archive. This file is generated by a tool called localedef, from locale definition text file(s).

I modified the default en_GB definition a bit, by removing all 12-hour format strings, and recompiled en_GB into the locale-archive file. The resulting file can be downloaded here (1.1 MB, 5.0 MB uncompressed). It seems to make the home screen clock use 24-hour format. You need to be root and copy an uncompressed version of the file over the original. It is probably a good idea to make a backup of the original first. After that, a reboot is necessary.

NOTE: It did not hose my N800 (firmware version 3.2007.10-7), but there's no telling what it does to your's! The file is larger than the original, so I suspect there's some extra unneeded stuff in there that could be pruned away. I just don't know enough about locale tools to do that.

Please report your findings, if you decide to use this file.

timmorris 2007-03-29 06:27

Re: Minor customisation
 
I'm struggling. I thought it might be a useful excercise to try to find the answers for myself but I fell at the first fence! I've tried downloading the .gz file and saving it in the documents folder and an sd card but I can't find the documents folder in xterm, can't find the file listed in the /media/mmc1 folder or using file manager. and have no idea how to extract it if I could find it. I'm finding my first foray into Linux a frustrating experience.

Tim

jethro.itt 2007-03-29 10:44

Re: Minor customisation
 
Now that I tested, Opera in N800 somehow messes up the download. I get files around 2 MB, different sizes every time. Looks like Opera tries to unpack the .gz file on the fly but fails for some reason.

Let's forget Opera and use wget to to download the file. Here are detailed instructions for installing the file on an N800. The following steps require a command line. Make sure you have OSSO XTerm installed. GNU wget and becomeroot are also required. And remember, you're doing this at your own risk!
  • Copy this link to clipboard, by holding the stylus over it and selecting "Copy link location" from the pop-up menu.
  • Open X Terminal from the application menu.
  • Type: "wget", space, and then select "Paste" from the keyboard menu or the X Terminal application menu. Then press enter. This will fetch a file called "locale-archive.gz" to the current directory.
  • Unpack the file. Type "gunzip locale-archive.gz". (Or just type "wget l" and press the tabulator key on the upper left corner of the on-screen keyboard. This will work as long as you don't have any other files beginning with "l" in the current directory.) Press enter. "locale-archive.gz" (1.1 MB) turns into "locale-archive" (5.0 MB).
  • Backup original "locale-archive" and install the new one. You need to be root to do it. Type (you can use the tabulator trick shown above to eliminate a lot of typing):
    Code:

    sudo gainroot
    cd /usr/lib/locale/
    mv locale-archive locale-archive.orig
    mv /home/user/locale-archive .
    chown root:root locale-archive
    chmod u=rw,go=r locale-archive
    exit

  • That's it! Now reboot.

timmorris 2007-03-29 10:57

Re: Minor customisation
 
Thanks!

I'll get on it. I've managed to find a decent on-line unix course. I'll spend some time going through it to remind myself of the shell commands. Things have moved on a bit since I last played with Unix though - System V used to come on a hand full of 5.25" floppies and most systems were standalone with at most a 14.4k modem...

Tim

TA-t3 2007-03-29 11:00

Re: Minor customisation
 
Ah, since then at least <TAB> - completion has been invented! ;)

timmorris 2007-03-29 11:37

Re: Minor customisation
 
I've tested it in as many applications as I can and it works as expected.

I've found a minor bug. en_GB is shown instead of English (GB) in the regional control panel.

Tim

timmorris 2007-03-30 07:13

Re: Minor customisation
 
Can anyone point me in the direction of a knowledgebase that describes the use of locale tools and I'll try to see if I can edit it myself? While I'm looking what flavour of Unix Debian does the N800 use? I've seen the references to osso and hildon (the latter of which I believe to be the GUI overlay) from browsing through the file system.

The other thing that I can find is the location of the user documents folders from within xterm (or a way of searching for files - grep rings a bell but I can't remember how to use it, tree from the root piped into grep rings a bell, but it is so faint I can't hear it...)

I promise I'm not a complete numpty, I'm just the wrong side of 40 so it is all a long way in the distant past. I didn't use Unix at university, we had VAX 11/780s, dumb terminals, together with high resolution graphics terminals, which were basically CRT equivalents of laser printers (driven by the TeX typesetting language) with a frame rate of about 1 frame every 20 seconds. You pesky kids don't know you're born the N800 has about as much power as the whole computing centre did...

Tim

SeRi@lDiE 2007-03-30 08:03

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41934)
The other thing that I can find is the location of the user documents folders from within xterm (or a way of searching for files - grep rings a bell but I can't remember how to use it, tree from the root piped into grep rings a bell, but it is so faint I can't hear it...)
Tim

ls -a will display the hidden .folders in Linux...

The documents folders is located in /home/user/MyDoc/.documents
if you cd in xterm

cd /home/user/MyDoc

and do ls -a you will see all the hidden folders including your documents folder :)

timmorris 2007-03-30 08:09

Re: Minor customisation
 
Bang! I just got hit by a truck! ls -al | more

What's the command line which will enumerate down a tree and pipe it into grep? I generally hate it when people ask for spoon feeding, but it's driving me mad - the information is in my head but I just can't drag it out. I'm going back 20 years. On System V the online manual was accessed using "man". It isn't the same on Debian. Any clues?

Tim

jethro.itt 2007-03-30 08:10

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41934)
Can anyone point me in the direction of a knowledgebase that describes the use of locale tools and I'll try to see if I can edit it myself?

Here's something: http://people.debian.org/~barbier/ta...ibc-locale.pdf

Quote:

Originally Posted by timmorris (Post 41934)
While I'm looking what flavour of Unix Debian does the N800 use? I've seen the references to osso and hildon (the latter of which I believe to be the GUI overlay) from browsing through the file system.

OSSO is Nokia's semi-internal name for all Open Source related. Hildon is the GUI framework. Neither of these are present in vanilla Debian. The Debian in the internet tablets is heavily customized. It does not directly map to any official Debian distribution.


Quote:

Originally Posted by timmorris (Post 41934)
The other thing that I can find is the location of the user documents folders from within xterm (or a way of searching for files - grep rings a bell but I can't remember how to use it, tree from the root piped into grep rings a bell, but it is so faint I can't hear it...)

Files and directories beginning with a period are not shown by UNIX command line tools (or the file manager) by default. In the user's home directory (/home/user) there is a directory called MyDocs. Under it there are several directories whose names begin with a period. That's why you cannot normally see them. Try:

Code:

ls -a MyDocs


Quote:

Originally Posted by timmorris (Post 41934)
You pesky kids don't know you're born the N800 has about as much power as the whole computing centre did...

The N800 has a computing power equal to about 200-300 VAX 11/780s...

EDIT: Looks like I was late! Someone already answered many of your questions.

timmorris 2007-03-30 08:23

Re: Minor customisation
 
Just a quick note of thanks to all those who have replied to this and other threads I've posted in the last week. I only bought the N800 to use it as a dedicated Squeezebox remote control (4 Squeezeboxes - 4 N800s). The geek in me won't let me just set up a shortcut on the homepage and leave it at that.

The reason I use Squeezeboxes and not Sonos is because slimserver, like the N800 is open source based and allows for so much customisation plus the sound quality is fantastic.

All I need now is for someone to work out how to launch the web-browser in full-screen mode at boot and I can set up three of them and leave them in their appropriate room and then fiddle with the one allocated for my "den" to my heart's content.

I swore I wasn't going to go down the Linux route. You're right about the 11/780 Jethro. I sold an IBM AS/400 B50 in 1990 which had 1.2Gb of disc storage for around 40 users of a dedicated manufacturing control package (Computer Associates PRMS). The hardware came in at £100k!

Tim

jethro.itt 2007-03-30 08:26

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41940)
What's the command line which will enumerate down a tree and pipe it into grep? I generally hate it when people ask for spoon feeding, but it's driving me mad - the information is in my head but I just can't drag it out. I'm going back 20 years.

The "find" command is probably what you want. "find" on the N800 is a cut-down version from BusyBox (a multi-call binary designed to save space by combining most UNIX command into a single binary, with reduced functionality). It does not support the "-exec" command, so you need to get creative with "xargs":

Code:

find -name "*.txt" | xargs grep "hello"
Quote:

Originally Posted by timmorris (Post 41940)
On System V the online manual was accessed using "man". It isn't the same on Debian. Any clues?

Man pages are not available in the internet tablet due to space constraints. In any normal Debian install you could very well use man to find information. Although you need to give "man" a name of a command or "man -k topic" to get a list of matching commands.

BusyBox has a command help on the Internet: http://www.busybox.net/downloads/BusyBox.html. Note that not all commands are included in the N800 version.

timmorris 2007-03-30 08:27

Re: Minor customisation
 
Thanks again.

Edit: The Busybox pages are full of useful info. I'm starting to make some progress.

Tim

SeRi@lDiE 2007-03-30 15:26

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41940)
Bang! I just got hit by a truck! ls -al | more

What's the command line which will enumerate down a tree and pipe it into grep? I generally hate it when people ask for spoon feeding, but it's driving me mad - the information is in my head but I just can't drag it out. I'm going back 20 years. On System V the online manual was accessed using "man". It isn't the same on Debian. Any clues?

Tim

Tim,

You dont need to pipe ls -al to more... it is only 4 folders big if you where in a full blown *nix enviroment than yes | more would be usefull because you would be able to controle the listing.

The rest like find etc... jethro.itt hasit pretty much cover...

timmorris 2007-03-30 15:59

Re: Minor customisation
 
Thanks,

My memory is a bit fuzzy but I don't think find was part of the OS in the old days. I'm not 100% sure as I was a systems integrator working on MS-DOS, Concurrent Dos (ICL DRS300), and Unix (ICL DRS300 and CLAN 3 and 4) but I seem to remember if you wanted to recursively list the entire file structure you had to use "tree". The CPU and filesystem weren't powerful enough to search based on keywords unless the files had been indexed for a particular set of keywords ahead of time. Life was difficult in the old days. Maybe that's why I moved into sales...

Thanks for the help so far. I've got enough to keep me amused over the weekend. It will keep me busy while I upgrade a couple of XP systems to Vista. I've also got a 256Mb SD card which isn't doing anything. I'll try a dual boot while I'm at it.

Tim

Tim

TA-t3 2007-03-30 16:34

Re: Minor customisation
 
Well it's the busybox (i.e. limited) version of 'ls' I guess, but still I think 'ls -lR | more' should work, to see the tree recursively.

(My N800 is forgotten at home so I can't check. It works on the desktop anyway.)

SeRi@lDiE 2007-03-30 17:27

Re: Minor customisation
 
Quote:

Originally Posted by timmorris (Post 41992)
I've also got a 256Mb SD card which isn't doing anything. I'll try a dual boot while I'm at it.

Tim

Tim

I would advice minimum 1Gig SD Card to dual boot :)


All times are GMT. The time now is 03:36.

vBulletin® Version 3.8.8