04-12-2009, 07:04 AM | #1 |
Connoisseur
Posts: 80
Karma: 204
Join Date: Jun 2007
Device: Sony Librie, Irex DR1000S
|
Is it possible to execute a bash script from the SD card?
As far as I remember the DR is running under Linux, so yesterday I was wondering if it is possible to execute from the device (without the help of a computer) a bash script that is in the SD card.
Does anybody know the answer? If the answer is positive, how do you launch the script? |
04-12-2009, 08:45 AM | #2 |
Addicted to Porting
Posts: 1,697
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
|
It's possible, just look at the installation script for the updated content browser with FBReader support.
|
Advert | |
|
04-12-2009, 09:14 AM | #3 | |
Connoisseur
Posts: 80
Karma: 204
Join Date: Jun 2007
Device: Sony Librie, Irex DR1000S
|
Quote:
Now my next question. Does anybody know how to create a bash script that asks the reader (i.e., an alternative way to the command "read") for some options (perhaps using somethink like the displayed keyboard that the device uses for the dictionary searches)? |
|
04-12-2009, 09:59 AM | #4 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
I think what you are looking for is dmenu
Quote:
|
|
04-13-2009, 09:54 PM | #5 |
Member
Posts: 24
Karma: 58
Join Date: Aug 2008
Device: Sony PRS-505, iRex DR1000S
|
Please, somebody manage to port a terminal app. I've tried, but it's not as easy as it might seem. There was only one I got running, but the screen wouldn't refresh properly. (Had to pop up the menu to get anything to appear... but then the menu wouldn't disappear...) I've been meaning to add the screen refresh code I put into xournal in there, but have't gotten around to it. It was mrxvt, if anyone's interested in a starting point.
|
Advert | |
|
05-11-2009, 01:26 PM | #6 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
|
05-11-2009, 02:00 PM | #7 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
On the DR1000S, if I understand Adam B.'s description correctly, the best choice is going to be a GTK+ based application because this library on the DR1000S includes built-in EInk page refresh support. The trick, though, is to find lightweight GTK+ applications. One possibility for a terminal is Sakura.
|
05-11-2009, 03:29 PM | #8 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Thanks for the link, I will give it a try.
|
05-16-2009, 11:31 AM | #9 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Sakura uses vte which is easy to compile for the DR (I used version 0.17.4) with Anjuta. It even has a small example application that uses the terminal widget of the vte-library.
So far for the good news ... I can start it (the little app of vte and sakura) on the emulator, but I do not see anything but a white block (black for sakura) and the keyboard. Entering 'exit' stops the program, entering 'ls >somefile' creates the file, so the terminal-part seems to work, but getting output on the screen is the challenge... Any help is welcome |
05-16-2009, 05:03 PM | #10 | |
Lord
Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
|
Quote:
|
|
05-16-2009, 06:33 PM | #11 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
|
|
05-16-2009, 10:03 PM | #12 |
Lord
Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
|
Why not try it directly on the DR? There are some things that are not fully implemented on the emulator (I know some DBUS commands to sysd etc. don't work). Of course, the problem is probably something else altogether. Perhaps some library that compiled fine but barfs during runtime.
|
05-17-2009, 11:52 AM | #13 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
There is some 'intelligence' deciding when to update the screen, which seems to decide never to update the actual widget. (In the expose-event via some function calls an gdk_window_invalidate_rect is called, which only results in a new expose-event. I have to debug the code a little more.)
After modifying to always update the widget, I could get something on the screen. However this is very slow. So next I tried on the DR, first time I started the batch file to install the ipk-file, I had to reset the DR since the 'wait'-dialog would not disapear (after 5 minutes). Trying a second time it seemed to work. The vte-application was copied to /usr/bin/ but after starting it nothing happened... more debugging to do... A terminal window would have been handy ... ;-) Last edited by Mackx; 05-17-2009 at 01:39 PM. |
05-17-2009, 11:40 PM | #14 | |
Lord
Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
|
Quote:
You can see waveforms 6 and 9 in action while entering text in a GTK text entry widget, while changing tabs in the settings dialog in FBReader or while toggling shift/caps on the Matchbox keyboard. Lol, the old chicken and egg problem |
|
05-24-2009, 03:05 PM | #15 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Most of the code in vte seems to be dedicated to translating characters and intelligent mechanism to get a responsive terminal even if you have several of them opened. On the emulator the problem is to get characters correctly on the screen. Most of them are printed as black rectangles unless you do an 'ls -R /media' after which the text is correctly visible on the emulator most of the time. The cursor is also not properly shown, so using vi is very difficult.
On the DR I did not get it to work at all. I am not sure if I can install it properly maybe some components are missing, but I am not getting any proper feedback. So although VTE seems like a nice library to get ported on the DR, it is too difficult for me :-(. I will look for some easier libraries, maybe it is easier to port rxvt or mrxvt to gtk (for me). More experienced 'porters' could get a better look at it. To Grimulkan: it is not a display refreshing problem that I have, it is more deep in the code somewere. I am not getting the correct things on the screen. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bash Script/SQL Query for ISBN in filename? | zenrhino | Calibre | 1 | 09-26-2010 08:55 AM |
A way to execute files without shell access?!? | scotsman | iRex | 8 | 03-13-2009 07:35 AM |
manga2pdf - Linux bash scripts for the Cybook, Sony Reader and iLiad | IceHand | 52 | 03-09-2009 06:36 PM | |
Simple Script to move content to CF Card (works around WLAN - CF Performance Bug) | torben | iRex | 0 | 12-03-2008 02:45 AM |
BASH script for *2lrf utilities (thanks Kovid!)... | KaiGoth | Sony Reader | 0 | 08-05-2007 01:30 AM |