View Single Post
Karel Jansens's Avatar
Posts: 3,220 | Thanked: 326 times | Joined on Oct 2005 @ "Almost there!" (Monte Christo, Count of)
#20
Originally Posted by flareup View Post
one of the reasons I got a 770 was to get into linux a little. I'm now into my second month of 800 and still haven't. Things like this little hack make me realise I have to now..... other things I've been party to as online communities for various audio recording things have always at some point had a site that gave a real "start from scratch" tutorial for newbies - is there any such thing around that anyone could point me to (and the many new users of this forum that have obviously just come into contact with the devices)? I don't want a full-on university course, just somewhere that with a little input will allow me to answer "yes" to Karel's questions.
The 770's and N800's underbellies are a pretty much standard Linux installation, with a few adaptations towards a portable device (power management and user management). This means that any "Linux for Beginners" book is a good place to start.

My starting point, many years ago, was "Linux in a Nutshell" from O'Reilly. I don't even know if this book is still in print, but I found it amazingly helpful. It doesn't try to be a "for dummies" book, but still manages to explain everything to the not-particularly-genius (a subspecies I am proud to be a member of).

my best advice would be to install Linux on a desktop somewhere, get that, or another, book and play a bit.

In the mean time, for this particular problem:

1. Install Xterm from repository
2. Install becomeroot (read the instructions on the homepage!) from repository
3. Install Midnight Commander from repository

Concise information about Midnight Commander: It is a text-based (meaning that it runs from an Xterm, by typing "mc" at the command prompt) file management tool, in the style of Norton Commander for the old DOS-pc. With Midnight Commander you can access the complete filesystem of the N800, far more than what the built in nanny-file manager will let you see.

Warning! Linux file systems are substantially different from what you get on a pc, something I am not even going to try to explain in this message.

More warning! The following steps involve messing around in your system as "root", which is the equivalent of "God" in a Linux filesystem. If anything goes wrong, don't blame me; I don't exist.

If you have those three applications, I would advize you to play around with Midnight Commander a while, without becoming root. It will be very hard to mess things up irrevocably as a user and if you get completely stuck (which will happen!), you can always hit the big X of the Xterm and chicken out.

So, assuming you've been around the virtual block a few times, do this:

1. Start Xterm (make sure the input method is the keyboard, Xterm doesn't play well with the HWR)
2. Type "sudo gainroot" (without the brackets; I'm assuming from now on you'll leave them out). You'll get some messages and the prompt changes from "/ $" to "/ #", indicating that you are now root and evil things may happen.
3. Type "mc". If you've played with mc before, you'll notice it has now a different colour scheme. Again, this is to tell you you are now root. From these warnings it must now have become clear that root is not to be taken lightly. I kid you not.
4. In mc, scroll down in the left pane to the "/etc" directory and hit enter on the virtual keyboard (as you know from your experiments, the enter key on the D-pad doesn't work).
5. In the "/etc" directory, scroll down to the "/mce" directory (it's really the "/etc/mce" directory, but we'll go on what the mc window shows you)
6. In the "/mce" directory, scroll to the file "mce.ini" (you know it's a file, because there's no "/" in front of it).
7. Don't hit enter. Funny things happen if you hit enter on a file. At the bottom of the mc window, you'll see a row of numbers, followed by commands; this is mc's main menu. Tapping "4 Edit" will start the file editor.
8. Look around in the file; it is a rather typical example of a Linux configuration file: All in plain text and with lots of explanations. To change the behaviour of the long powerkeypress, first find the section that begins with "[PowerKey]" (you can use the search function in the editor, but the file is not that long, so scrolling until you see it is doable). In that section look for a line that reads: "PowerKeyLongAction=poweroff". Change "poweroff" to "softpoweroff". DON'T CHANGE ANYTHING ELSE.
9. Tap "2 Save"; confirm save file.
10 Exit mc by tapping "10 Quit" (this option is normally not visible; you have to zoom out with the top keys until you see it)
10. Type "exit" at the Xterm command prompt. This will end root mode (see how the trusted "/ $" prompt is back to tell you all is well?)
11. Type "exit" again to end your Xterm session.

(if all the exiting doesn't work out well, hitting the "X" of the Xterm window will shut everything down. It is frowned upon, but I don't think it'll cause any harm, as long as you get out of the editor cleanly first)

It is possible that the new behaviour of the powerkey doesn't start until you reboot, so make sure you have nothing important running when you try it for the first time.

12. Ask someone else where to find the "systemui.xml" file and how to modify it, if you want to change the power menu.
 

The Following 3 Users Say Thank You to Karel Jansens For This Useful Post: