11-12-2006, 02:08 PM | #1 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
mrxvt ported to iLiad
I've ported mrxvt to the iLiad and I will be using it as a training tool to help other developers learn what it takes to port X11 applications to run on the iLiad.
First off, mrxvt is a tabbed version of rxvt. And rxvt is a small terminal program that doesn't try to do too much so it stays small in size. A terminal program allows you to execute commands under Linix on the iLiad. You can use it to examine the contents of memory cards, move files to and from memory cards. Set the time zone, set the time... In general it is your swiss army knife of tools that iRex has so far failed to provide. I'll be using mrxvt to document some of the more useful features such as setting the timezone so your notes have the correct date and time on them (unless of course you already live and work in UTC). I've bundled this tool up in a manner similar to that I developed for gnuchess. It is a zip file that you need to extract onto a MMC/CF card or onto the iLiad's own internal memory drive. You will then need to have the [SHELL] hack installed. Navigate to where you extracted the zip and click into the "mrxvt" directory created, then click on the "run.sh" file. You should see a window pop up like that shown in the picture below. If you are not an experienced Linux command shell user (and if you don't know what that means: you aren't ) then do try not to brick your iLiad by typing in random things you find to try via Google. I'll be posting articles, please be patient. The features of this program that I will be sharing via postings shortly are: 1. It knows how to label itself so Matchbox Window Manager lets it decide its window size. 2. It knows how to coax the keyboard into automatically popping up: the right way. 3. It knows how to put away the keyboard on exit. 4. It knows how to invoke a light weight screen refresh so it won't risk triggering epileptic seizures amongst the users. 5. It knows how to turn off the busy LED. 6. It defaults to using one of the few X11 fonts provided "out of the box". 7. It uses nothing but "out of the box" shared libraries, so it is a very tiny program. For the advanced I'll share how to make an on screen button for it using Matchbox so you can pop it up and then put it away whilst in the middle of other things. |
11-12-2006, 02:23 PM | #2 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
still busy scotty?
Anyway, looks promising. Now i should finally install the [SHELL] patch. |
Advert | |
|
11-12-2006, 03:00 PM | #3 | |
Evangelist
Posts: 458
Karma: 293
Join Date: May 2006
|
Quote:
|
|
11-12-2006, 04:31 PM | #4 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
The bits and pieces
You need the following includes:
Code:
#include <liberdm/erdm.h> #include <liberipc/eripcviewer.h> #include <liberipc/eripctoolbar.h> #include <liberipc/eripcbusyd.h> Code:
erClientChannel_t erbusyChannel; erClientChannel_t ertoolbarChannel; Code:
// Turn off busy LED if we were invoked via [SHELL] erIpcStartClient(ER_BUSYD_CHANNEL, &erbusyChannel); busySetBusy(erbusyChannel, ccBusyState_Off); Code:
erIpcStartClient(ER_TOOLBAR_CHANNEL, &ertoolbarChannel); tbSelectIconSet(ertoolbarChannel, ER_PDF_VIEWER_UA_ID); tbClearIconSet(ertoolbarChannel, ER_PDF_VIEWER_UA_ID); // Turn off trashcan tbAppendPlatformIcon( ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_trashcan, -1); tbSetStatePlatformIcon(ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_trashcan, iconState_grey ); // Enable then pop up keyboard tbAppendPlatformIcon( ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_keyboard, -1); tbSetStatePlatformIcon(ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_keyboard, iconState_selected); Code:
Atom window_type = XInternAtom(r->Xdisplay, "_NET_WM_WINDOW_TYPE_DIALOG", False); XChangeProperty(r->Xdisplay, r->TermWin.parent, XInternAtom(r->Xdisplay, "_NET_WM_WINDOW_TYPE", False), XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); Code:
// Full Refresh, chase off all the ghosts dmDisplay(dmCmdPriorUrgent, dmQFull); Code:
dmDisplay(dmCmdPriorUrgent, dmQTyping); Code:
extern erClientChannel_t ertoolbarChannel; // close keyboard tbSetStatePlatformIcon(ertoolbarChannel, ER_PDF_VIEWER_UA_ID, iconID_keyboard, iconState_normal); Code:
-lerdm -leripc Last edited by scotty1024; 11-12-2006 at 07:56 PM. Reason: Added library linkages and Matchbox WM code |
11-13-2006, 07:11 AM | #5 |
Guru
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
|
I remember time ago I had some trouble about the appropiate font to use for xrvt.
Scotty, the centered Dialog idea is BRILLIANT. And I regret do not have greater/bigger uppercasses. Er, wait a moment, I have... BRILLIANT. It is real hack, to have remembered that dialog windows indeed appear and of course to know that they can be asked to show. |
Advert | |
|
11-13-2006, 07:32 AM | #6 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
I think the next item out of my porting pipeline will really put the heat to iRex from the 2.7.1 user community. |
|
11-13-2006, 07:54 AM | #7 |
eink fanatic
Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
|
well, i'm certainly looking forward to that then...:-)
|
11-13-2006, 07:58 AM | #8 | |
Guru
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
|
Quote:
EDITED: well, or any vmac fork |
|
11-13-2006, 11:23 AM | #9 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I said heat, not something to make iRex laugh their asses off.
|
11-13-2006, 11:27 AM | #10 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
Hmm, might do them some good to laugh a bit.
|
11-14-2006, 09:22 AM | #11 |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
Thanks, scotty, brilliant as usual.
No we have a real shell terminal. I copied some files from CF to /mnt/free wo help of a PC. uhh! nice! |
11-14-2006, 09:23 AM | #12 | |
Guru
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
|
Quote:
Plus, wget. |
|
11-15-2006, 05:38 AM | #13 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
I think there has been a bit of pent up demand for this simple capability. |
|
11-15-2006, 07:12 AM | #14 |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
STICKY [This is a first draft, this message says to you: post isn't finished right now]
step-to-step-guide How to copy directories from CF/MMC to iLiad's USB drive without a PC What you need to know How you can start mrxvt What you want copy a directory from media card to iLiad. Wouldn't it be nice to do this without a PC? at the beach, in subway, you understand? Steps # run mrxvt via run.sh # what you get is a terminal window, where you can run shell comands # my terminal says /mnt/free/newpapers/Apps/mrxvt/ # What does this mean? It shows you in which directory your mrxvt application lies. So this depends, where you copied the binary file [application] mrxvt. # using mrxvt works this way: 1- you enter a command, 2- then you press enter, 3- mrxvt executes your command & creates a new line, 4- where can enter the next command. # This will we do. Ok, first we need to change the directory first type cd /mnt/cf [if you use a CF card] or cd /mnt/mmc [if you use a MMC card], then press "enter" button on keyboard. terminal gets a new line, which lists the address you typed in. You are now at the lowest dir level [root] of you memory card. cd stands for change directory, /mnt/cf is the address of root directory of CF card # you can type ls -l if you want, a contents list of your memory card is shown, this may helps to choose the directory you want to copy. sample output: Code:
dr-xr-xr-x 3 root root 4096 Nov 3 11:45 Kryptologie drwxr-xr-x 4 root root 4096 Nov 11 17:18 LaTex drwxr-xr-x 4 root root 4096 Nov 6 13:28 Linux drwxr-xr-x 6 root root 4096 Sep 2 17:43 My Notes -rwxr-xr-x 1 root root 23558 Mar 19 2004 pdf.ico sample root directory of memory card has got 4 dirs [Do you see the d in front of line? It's says, it's a dir] What the hack is the rwx stuff? r=read right, w=write right,x=execute right. In sample you have as user/root all rights. # You can switch with cd command between levels of directories. like Code:
cd Linux Code:
cd directoryname with Code:
cd .. # I decide to copy the directory "Kryptologie" with all subdirectories to the iLiad's Books USB drive. How to do this. We can you use the copy command. We type cp -r Kryptologie /mnt/free/books/Kryptologie This copies the directory Kryptologie to the iLiad's book directory. It takes a while to copy, depending how large your files are, when the copy process is done, mrxvt creates a new line & is waiting for a new command. general command is Code:
cp -r /directory/to/copy/from /directory/to/copy/to # press cross [top right of window] or # type the command exit a one-step-copy-process [if you know what you want to copy] in mrxvt could be: Code:
cp -r /mnt/cf/directory/subdirectory /mnt/free/books/subdirectory note to myself: I need to install fbshot. Some screenshots would be nice. Q: Can you follow the instructions? Or did you found any mistakes? a tip: with the up-arrow key on keyboard you can switch between commands you already used. more information about shell commands: # Linux man pages online # linuxmanpages.com # cp @wikipedia. Last edited by yokos; 11-16-2006 at 06:40 AM. |
11-15-2006, 01:19 PM | #15 | |
Addict
Posts: 285
Karma: 10
Join Date: Apr 2006
Location: Vancouver, Canada
Device: Proud Iliad owner
|
Quote:
So i'm assuming that your next(current) project is so awesome that the 2.7.1 ppl will be so jelaous that they will 'scream' at iRex to push their releases faster. Can't wait! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Qt ported to PRS-505 | bero | Sony Reader Dev Corner | 5 | 06-18-2010 03:05 AM |
GNUShogi ported to iLiad? | zatrigkiwtes | iRex | 5 | 05-25-2009 11:53 PM |
iLiad Has anyone ported ltrace to the iLiad? | LazyScot | iRex Developer's Corner | 3 | 07-18-2008 04:02 PM |
iLiad Bigger Font for mrxvt? | grayfox | iRex Developer's Corner | 6 | 10-20-2007 06:00 PM |
iLiad FBReader is being ported for the Iliad! | CommanderROR | iRex Developer's Corner | 0 | 03-15-2007 05:36 PM |