The linux version installed on Nook firmware lacks any kind of text editor (nano, vi, emacs, and so on), normally present on linux distributions.
Having a text editor is really useful for advanced users, in order to quickly show and edit configuration files. Just to make some example: wifi configuration (wpa_supplicant.conf); startup configuration (init.rc).
Nano is a really simple to use editor, and it's easily installable on Nook. Of course, a rooted Nook is necessary; but if you don't have a rooted Nook, you probably will not need any linux CLI text editor.
Installation procedure:
- download and unzip nano;
- download terminfo;
- copy both files to your Nook, using adb;
- move nano to folder /system/bin;
- set appropriate owner and permission to nano executable:
chown system.system /system/bin/nano
chmod 755 /system/bin/nano - unzip terminfo and set correct permission:
busybox tar -xzvf terminfo.tar.gz -C /
chmod -R 0755 /system/etc/terminfo
chmod -R 0644 /system/etc/terminfo/?/* - set the following env variables:
export TERM=xterm
export TERMINFO=/system/etc/terminfo - now you should be able to launch nano from your shell:
nano <filename> - (optional) you need to set the env variable of step 7) each time you launch a shell; therefore, it could be convenient to set them automatically during initialization of Nook, adding the following two lines to file /init.rc (about at the start of the file itself, where a lot of env variables are set):
export TERM xterm
export TERMINFO /system/etc/terminfo
No comments:
Post a Comment