Author Topic: term, termcap, bash, qtopia-base  (Read 4044 times)

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« on: November 17, 2004, 08:15:35 am »
term / termcap:

i seem to have a broken TERMCAP database.
i get messeges like "screen size 0x0 is not supported , check TERM environment variable".  
i tried to set TERM=xterm,  TERM=linux, TERM=hot-potatoes
but i either get the same messege, or i get TERMCAP database errors.
(i'm a termcap-db/TERM illiterate/newbie - but i do know few things about linux and zaurus)

"midnight commander" doesn't run at all (nor mcedit),
"less" runs but print errors "WARNING: terminal is not fully functional",
and many other applications dont like the situation.

the OZ installation is fresh & new from yesterday!
what could've been wrong,
how can i fix that
what information should i check ?
etc


qpe-base / qtopia base:
every 2nd app seem to depend on qpe-base or qtopia-base,
but i can't seem to find it anywhere.  
what is wrong with me?


bash:
ok, from reading on the web i understood openzaurus developers dont like bash.
but i've got 100 scripts doing #!/bin/bash and failing.
what can i do to use them without changing all files?


my system:
openzaurus 351 (standard install), sl-c860,
terminal application: kconsole
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
term, termcap, bash, qtopia-base
« Reply #1 on: November 17, 2004, 09:48:55 am »
Quote
bash:
ok, from reading on the web i understood openzaurus developers dont like bash.
but i've got 100 scripts doing #!/bin/bash and failing.
what can i do to use them without changing all files?

do:

ln -s /bin/sh /bin/bash

Not sure about your termcap errors, is there a termcap related package in the feed which you don't have installed?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« Reply #2 on: November 18, 2004, 07:13:30 am »
1. i couldn't link ash/sh --> bash, because busybox wouldn't let me

2.  are there term/termcap packages i MUST install?

---- more terminal questions: ------
3. if i get into O-menu/terminal, how do i go BACK to the desktop??

4. which terminal app do YOU use on OZ?  did you need to configure anything to make it work smooth (e.g. does 'less' or 'mc' work for you) ?

5. ... and where is the CTRL & ALT keys ??  
 - they're not in the hiragana/katakana keys like CACKO,
 - they're not in the CALENDAR/ADDRESS/   like pdaXrom...
 - they're not Fn+Shift   like sharp-rom
maybe something went wrong in my installation?

6. (off topic) can i remap the keyboard -- especially CTRL-ALT ?

thanks!
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« Reply #3 on: November 18, 2004, 07:24:55 am »
another terminal "symptom" is, that i can't scroll the terminal
 SHIFT+up/down.

ah, and CTRL/ALT work in the "full-screen" trerminal (the init1 mode and alike)

thanks!!
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
term, termcap, bash, qtopia-base
« Reply #4 on: November 18, 2004, 07:41:35 am »
Quote
1. i couldn't link ash/sh --> bash, because busybox wouldn't let me

Er, any more info...?

Quote
2. are there term/termcap packages i MUST install?

I was just guessing

Quote
3. if i get into O-menu/terminal, how do i go BACK to the desktop??

Are you talking about selecting a different vt from the o-menu, or just how to show the desktop when there's a full screen app displayed?

Quote
4. which terminal app do YOU use on OZ? did you need to configure anything to make it work smooth (e.g. does 'less' or 'mc' work for you) ?

Octave, which uses less, seemed to work fine (though I've not used it much recently).

Quote
5. ... and where is the CTRL & ALT keys ??

This is an issue, hopefully it'll be fixed for 3.5.2, in the meantime, use the on-screen keyboard.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« Reply #5 on: November 18, 2004, 08:41:05 am »
Quote
1. i couldn't link ash/sh --> bash, because busybox wouldn't let me

it means that busybox "understands" what it runs by the filename ($0), i guess:
# ln -s /bin/sh /bin/bash
# bash
Busybox blah blah..
Usage ...
...

Quote
2. are there term/termcap packages i MUST install?

(BTW: i just reflashed OZ for the experiment 10 minutes ago... it's 100% virgin)
[span style=\'font-size:21pt;line-height:100%\']ok, it's probably my error[/span]
i installed ncurses + ncurses-termcap, and midnight commander works
(probably i installed a bad pkg previously)

Quote
Quote
3. if i get into O-menu/terminal, how do i go BACK to the desktop??

Are you talking about selecting a different vt from the o-menu, or just how to show the desktop when there's a full screen app displayed?


well, both (esp. how to get out of VT)

Quote
5. ... and where is the CTRL & ALT keys ?? ... an issue.
doh! that's really a pity!       i'm a keyboard person, and use these keys extensively..
 is there a patch i can apply?
i guess, if not, i'll investigate OZ just a little longer, and revert to CACKO or something for now...
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

Windrose

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
term, termcap, bash, qtopia-base
« Reply #6 on: November 18, 2004, 08:45:48 am »
Quote
it means that busybox "understands" what it runs by the filename ($0), i guess:
# ln -s /bin/sh /bin/bash
# bash
Busybox blah blah..
Usage ...
...
I may be misunderstanding what you're doing -- do you mean to imply that you are trying to include the link command at the top of your scripts?

I believe what Si was advising was to actually run the link command, once, to create a symbolic link from /bin/bash to /bin/sh. Then the bash scripts should execute.

W
================================
Die Welt ist alles, was der Fall ist.
...
Wovon man nicht sprechen kann, darüber muß man schweigen.
================================

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
term, termcap, bash, qtopia-base
« Reply #7 on: November 18, 2004, 08:59:39 am »
Quote
well, both (esp. how to get out of VT)

For full screen apps, just use the desktop shortcut on the o-menu, or press the home key (actually this may not work atm as it's hooked up to be SysRq I think.

Quote
I believe what Si was advising was to actually run the link command, once, to create a symbolic link from /bin/bash to /bin/sh. Then the bash scripts should execute.

Exactly; but the problem looks a little more difficult.

Quote
it means that busybox "understands" what it runs by the filename ($0), i guess:
# ln -s /bin/sh /bin/bash
# bash
Busybox blah blah..
Usage ...
...

I see your point. Busybox does parse the command line to decide what it's supposed to be run as. Presumably ash/sh is provided by busybox. Hmm. Another option might be to install the bash package from the feed (assuming it's there, it used to be in previous feeds).

I'm pretty sure that this kind of thing used to work (perhaps ash/sh was a stand-alone package in OZ 3.3.6pre1, not part of busybox?).


Si
« Last Edit: November 18, 2004, 09:00:30 am by lardman »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
term, termcap, bash, qtopia-base
« Reply #8 on: November 18, 2004, 09:02:12 am »
[Simon replied while I was typing so you can probably ignore this]

But aren't all the busybox commands actually ln'ed to busybox so executing bash actually runs busybox which then examines argv[0] to work out how it was invoked so it can switch into the correct mode of operation?

If so, then just creating a link for bash will break if busybox doesn't have a switch for bash compiled in.

Would an alias work any better (or do you need bash to support aliases - d'oh).
« Last Edit: November 18, 2004, 09:03:34 am by TimW »

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
term, termcap, bash, qtopia-base
« Reply #9 on: November 18, 2004, 09:20:32 am »
The alias idea is a non-starter.

The best I can suggest is to explicitly use sh to run the scripts or to "source" them.

eg

sh test.sh

or

. test.sh

Of course, there will be some subtle differences if you do the latter (environment variable changes affect your current environment etc. - anyone else know more precisely the differnces?)

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« Reply #10 on: November 18, 2004, 11:30:16 am »
not precisely, but i had fatal errors already, otherwise i wouldn't nag you guys...

so.
i tried to install bash (fatal errors)
the best i could do was creating a script file called /bin/bash:
------------
#!/bin/ash
ash $1 $2 $3 $4 $5 $6 $7 $8 $9
------------
and chmod 755.


but that's "the straw that broke the camel's back".

i'd love to use opie and help debug it, but i need a heavy duty working workstation these days and i can't afford all the beta issues for now.

see ya!
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
term, termcap, bash, qtopia-base
« Reply #11 on: November 18, 2004, 04:06:54 pm »
Quote
i tried to install bash (fatal errors)

From an ipk in the feed?

What were the errors?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

anunakin

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
    • http://vivaphp.net
term, termcap, bash, qtopia-base
« Reply #12 on: December 09, 2004, 01:23:53 pm »
I have tried the same think and this killed my OZ 3.5.2... the ipkg removes the sh link before copy bash .... and make the symlink... sh->bash .... and I need reflash!
« Last Edit: December 09, 2004, 03:23:44 pm by anunakin »
[img]http://www.vivaphp.net/imagens/rev2.jpg\" border=\"0\" class=\"linked-sig-image\" /]
Anunakin (Marcus Fazzi)

Nokia N900 32GB + microSD 2GB
Nokia N810 w/ microSD 8GB
Nokia 5310 XpressMusic w/ microSD 1GB
HP48GX->Psion Sienna->Palm m130->Tungsten T->Zaurus SL-5500->C3000->C3100 ALL SOLD

My FEED(On Line AGAIN!!!)

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
term, termcap, bash, qtopia-base
« Reply #13 on: December 09, 2004, 05:00:42 pm »
lol.  sorry, friend.
it happened to me too, with the same reason.  but i destroyed the busibox on Cacko.  
then i copied it again,
and needed to set the setuid (chmod 1755 /bin/busibox)
 
but i had a shell....
can't you install a shell ipk from the gui?
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)