This is a discussion on RE: dbaccess - return key does not work? within the Informix forums, part of the Database Server Software category; --> Alas, termcap pre-dates the standard xterm, it may not exist in the standard termcap. Looking through my files, I ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Alas, termcap pre-dates the standard xterm, it may not exist in the standard termcap. Looking through my files, I see that the xterm definitions I came up with were trashed in my (pre-backup, Norton caused) drive crash sometime back. There are some xterm definitions on iiug at http://www.iiug.org/software/archive/termcaps_xterm. Give the iiug version a shot and let me know if it works for you, if not, let me know which keys or features do not and I'll have a look at those. So to get this all working, copy/paste the definition from the iiug site into the end of your termcap file, call them special names - like xterm1, xterm2 or Phred whatnot - set your TERM environment variable to that value (xterm1, xterm2, Phred) and try dbaccess. A better answer would be to copy them to your very own termcap file andrews_termcap (or whatnot) and set your TERMCAP variable to point to andrews_termcap (including path) - just to avoid mucking up the "pristine" distribution copy of termcap. The termcap file itself is probably fine, it's just a question of what gnome is sending when you hit the return key. To track that specific one, do: cat > junk [ENTER] CTRL-D od -cx junk will show you the octal and character representation of what Gnome/ssh is sending when you press the Enter key. From there you can wander into the termcap file and make that agree with it. You will see entries like ku=\EOA (KeyUp=Escape-O A) which means that the terminal filter is expecting the keyboard to send that sequence when the up arrow is pressed. There may be a corresponding sequence that the filter is supposed to send when it is attempting to tell the terminal to perform something - like nl=^J (Newline = down arrow). Sequences which are not spelled out are assumed to be the defaults or are inherited from a previous definition. If you're not into working through all of that, let me know and I would be interested in working with you to resolve any non-working features/keys. Documentation for the codes is sparse, 'man terminfo', oddly enough, provides the best list I've seen lately. I can't remember where the original termcap keys/features were spelled out. j. -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]On Behalf Of Andrew2006 Sent: Thursday, December 27, 2007 10:12 AM To: informix-list@iiug.org Subject: Re: dbaccess - return key does not work? On Dec 27, 3:09 pm, "Jack Parker" <jack.park...@verizon.net> wrote: > Somehow I got the, now obviously incorrect, impression that you were using > the mouse. Apologies. > > If in fact the arrow keys do not work, then TERM/TERMCAP is the likeliest > issue. Sounds like you have TERMCAP set correctly, check TERM. That should > match your terminal type. If you are telnetting in from a PC, then "ansi" > is the proper choice. If going in through an X-Window, try "vt100" or > "wyse-50". Termcap did not have a decent entry for x-term last time I > checked. > > ( for example: export TERM=ansi ) > > The ctrl-xxx sequences should also work if your TERM setting is appropriate, > CTRL-M is return, and then of course H, J, K, L for left, down, up and > right. > > j. > > -----Original Message----- > From: informix-list-boun...@iiug.org > > [mailto:informix-list-boun...@iiug.org]On Behalf Of Andrew2006 > Sent: Thursday, December 27, 2007 9:34 AM > To: informix-l...@iiug.org > Subject: Re: dbaccess - return key does not work? > > On Dec 27, 2:13 pm, "Jack Parker" <jack.park...@verizon.net> wrote: > > Let's try that again. dbaccess is not a mouse driven application. You > can > > highlight the words on the screen all day long, but that action does not > > communicate with the application. Use the arrow keys to highlight > databases > > and the return key to select them. Or type in the database you want to > > select on the line where it allows you to. > > > Use the mouse ONLY to navigate to a different window, to select text for > > cutting and pasting. > > > j. > > > -----Original Message----- > > From: informix-list-boun...@iiug.org > > > [mailto:informix-list-boun...@iiug.org]On Behalf Of Andrew2006 > > Sent: Thursday, December 27, 2007 8:46 AM > > To: informix-l...@iiug.org > > Subject: Re: dbaccess - return key does not work? > > > On Dec 27, 1:21 pm, Andrew2006 <mymate...@googlemail.com> wrote: > > > On Dec 27, 11:52 am, "Art S. Kagel" <art.ka...@gmail.com> wrote: > > > > > On Dec 27, 6:24 am, Andrew2006 <mymate...@googlemail.com> wrote: > > > > > > Hi there, > > > > > > Can anyone recommend a tutorial for using dbaccess in menu mode? > > > > > How about the Dbaccess Manual which is part of the IDS documentation > > > > set online. > > > > > Art S. Kagel > > > > Oninit > > > > > > When prompted to hit return, e.g. "Select a server with the Arrow > > > > > Keys, or enter a name, then press Return." I can move the cursor to > > > > > highlight the database but hitting return causes the cursor to move > > > > > forward to the next db. Manually entering the name and hitting > return > > > > > will work though. > > > > > > I am running it from a console in Ubuntu Linux. > > > > > > Apologies if this has been asked before, but I couldn't find it by > > > > > searching the group. > > > > > > Kind Regards > > > > > > Andrew > > > > Hi Art, > > > > Have had a look at the manual, but it just reiterates what the > > > dbaccess program tells you to do. ie. press RETURN. > > > > Everything works for me except pressing RETURN (or Enter) > > > > Thanks > > > > Andrew > > > The page I'm referring to is > here:http://publib.boulder.ibm.com/infoce...ndex.jsp?topic.. > . > > bm.sqlt.doc/sqlt65.htm > > _______________________________________________ > > Informix-list mailing list > > Informix-l...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list > > Hi Jack, > > I'm not using the mouse to highlight words. I'm only using the > keyboard here. > > BTW - one reader emailed me re: TERMCAP. TERMCAP is set correctly to / > opt/informix/etc/termcap. The termcap file is 1553 lines long, and I > assume it's correct. > > Thanks > > Andrew > _______________________________________________ > Informix-list mailing list > Informix-l...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list The arrow keys do work. The Enter keys do not work. They have the same effect as "down arrow". My TERM is currently set to xterm. I run dbaccess by opening a console in Gnome and sshing into another Linux box where dbaccess is installed. The relevant environment variables on the dbaccess box are: INFORMIXTERM="termcap" TERM="xterm" TERMCAP="/opt/informix/etc/termcap" As Ctrl-M also appears to be mapped incorrectly (it performs "down arrow"), it looks like the termcap file may be foobared. Nevermind. In the meantime I can work around it, but it would be nice if worked as intended ... Many thanks Andrew _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list |
| |||
| On Dec 27, 5:20 pm, "Jack Parker" <jack.park...@verizon.net> wrote: > Alas, termcap pre-dates the standard xterm, it may not exist in the standard > termcap. Looking through my files, I see that the xterm definitions I came > up with were trashed in my (pre-backup, Norton caused) drive crash sometime > back. There are some xterm definitions on iiug athttp://www.iiug.org/software/archive/termcaps_xterm. Give the iiug version > a shot and let me know if it works for you, if not, let me know which keys > or features do not and I'll have a look at those. > > So to get this all working, copy/paste the definition from the iiug site > into the end of your termcap file, call them special names - like xterm1, > xterm2 or Phred whatnot - set your TERM environment variable to that value > (xterm1, xterm2, Phred) and try dbaccess. > > A better answer would be to copy them to your very own termcap file > andrews_termcap (or whatnot) and set your TERMCAP variable to point to > andrews_termcap (including path) - just to avoid mucking up the "pristine" > distribution copy of termcap. The termcap file itself is probably fine, > it's just a question of what gnome is sending when you hit the return key. > To track that specific one, do: > > cat > junk > [ENTER] > CTRL-D > > od -cx junk will show you the octal and character representation of what > Gnome/ssh is sending when you press the Enter key. From there you can > wander into the termcap file and make that agree with it. > > You will see entries like ku=\EOA (KeyUp=Escape-O A) which means that the > terminal filter is expecting the keyboard to send that sequence when the up > arrow is pressed. There may be a corresponding sequence that the filter is > supposed to send when it is attempting to tell the terminal to perform > something - like nl=^J (Newline = down arrow). Sequences which are not > spelled out are assumed to be the defaults or are inherited from a previous > definition. > > If you're not into working through all of that, let me know and I would be > interested in working with you to resolve any non-working features/keys. > > Documentation for the codes is sparse, 'man terminfo', oddly enough, > provides the best list I've seen lately. I can't remember where the > original termcap keys/features were spelled out. > > j. > > -----Original Message----- > From: informix-list-boun...@iiug.org > > [mailto:informix-list-boun...@iiug.org]On Behalf Of Andrew2006 > Sent: Thursday, December 27, 2007 10:12 AM > To: informix-l...@iiug.org > Subject: Re: dbaccess - return key does not work? > > On Dec 27, 3:09 pm, "Jack Parker" <jack.park...@verizon.net> wrote: > > Somehow I got the, now obviously incorrect, impression that you were using > > the mouse. Apologies. > > > If in fact the arrow keys do not work, then TERM/TERMCAP is the likeliest > > issue. Sounds like you have TERMCAP set correctly, check TERM. That > should > > match your terminal type. If you are telnetting in from a PC, then "ansi" > > is the proper choice. If going in through an X-Window, try "vt100" or > > "wyse-50". Termcap did not have a decent entry for x-term last time I > > checked. > > > ( for example: export TERM=ansi ) > > > The ctrl-xxx sequences should also work if your TERM setting is > appropriate, > > CTRL-M is return, and then of course H, J, K, L for left, down, up and > > right. > > > j. > > > -----Original Message----- > > From: informix-list-boun...@iiug.org > > > [mailto:informix-list-boun...@iiug.org]On Behalf Of Andrew2006 > > Sent: Thursday, December 27, 2007 9:34 AM > > To: informix-l...@iiug.org > > Subject: Re: dbaccess - return key does not work? > > > On Dec 27, 2:13 pm, "Jack Parker" <jack.park...@verizon.net> wrote: > > > Let's try that again. dbaccess is not a mouse driven application. You > > can > > > highlight the words on the screen all day long, but that action does not > > > communicate with the application. Use the arrow keys to highlight > > databases > > > and the return key to select them. Or type in the database you want to > > > select on the line where it allows you to. > > > > Use the mouse ONLY to navigate to a different window, to select text for > > > cutting and pasting. > > > > j. > > > > -----Original Message----- > > > From: informix-list-boun...@iiug.org > > > > [mailto:informix-list-boun...@iiug.org]On Behalf Of Andrew2006 > > > Sent: Thursday, December 27, 2007 8:46 AM > > > To: informix-l...@iiug.org > > > Subject: Re: dbaccess - return key does not work? > > > > On Dec 27, 1:21 pm, Andrew2006 <mymate...@googlemail.com> wrote: > > > > On Dec 27, 11:52 am, "Art S. Kagel" <art.ka...@gmail.com> wrote: > > > > > > On Dec 27, 6:24 am, Andrew2006 <mymate...@googlemail.com> wrote: > > > > > > > Hi there, > > > > > > > Can anyone recommend a tutorial for using dbaccess in menu mode? > > > > > > How about the Dbaccess Manual which is part of the IDS documentation > > > > > set online. > > > > > > Art S. Kagel > > > > > Oninit > > > > > > > When prompted to hit return, e.g. "Select a server with the Arrow > > > > > > Keys, or enter a name, then press Return." I can move the cursor > to > > > > > > highlight the database but hitting return causes the cursor to > move > > > > > > forward to the next db. Manually entering the name and hitting > > return > > > > > > will work though. > > > > > > > I am running it from a console in Ubuntu Linux. > > > > > > > Apologies if this has been asked before, but I couldn't find it by > > > > > > searching the group. > > > > > > > Kind Regards > > > > > > > Andrew > > > > > Hi Art, > > > > > Have had a look at the manual, but it just reiterates what the > > > > dbaccess program tells you to do. ie. press RETURN. > > > > > Everything works for me except pressing RETURN (or Enter) > > > > > Thanks > > > > > Andrew > > > > The page I'm referring to is > > here:http://publib.boulder.ibm.com/infoce...ndex.jsp?topic.. > > . > > > bm.sqlt.doc/sqlt65.htm > > > _______________________________________________ > > > Informix-list mailing list > > > Informix-l...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list > > > Hi Jack, > > > I'm not using the mouse to highlight words. I'm only using the > > keyboard here. > > > BTW - one reader emailed me re: TERMCAP. TERMCAP is set correctly to / > > opt/informix/etc/termcap. The termcap file is 1553 lines long, and I > > assume it's correct. > > > Thanks > > > Andrew > > _______________________________________________ > > Informix-list mailing list > > Informix-l...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list > > The arrow keys do work. The Enter keys do not work. They have the same > effect as "down arrow". > > My TERM is currently set to xterm. I run dbaccess by opening a console > in Gnome and sshing into another Linux box where dbaccess is > installed. The relevant environment variables on the dbaccess box are: > INFORMIXTERM="termcap" > TERM="xterm" > TERMCAP="/opt/informix/etc/termcap" > > As Ctrl-M also appears to be mapped incorrectly (it performs "down > arrow"), it looks like the termcap file may be foobared. > > Nevermind. In the meantime I can work around it, but it would be nice > if worked as intended ... > > Many thanks > > Andrew > _______________________________________________ > Informix-list mailing list > Informix-l...@iiug.orghttp://www.iiug.org/mailman/listinfo/informix-list Jack, This is the result of testing what ssh is sending as "Return": $ od -cx junk 0000000 \n \0 000a 0000001 I created a termcap in my home directory and pointed the environment variable TERMCAP at this. This contains the following termcap snippet from the iuug site: <termcap> vs|xterm|vs100|xterm terminal emulator (X window system):\ :cr=^M:do=^J:nl=^J:bl=^G:le=^H:ho=\E[H:\ :co#80:li#65:cl=\E[H\E[2J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A: \ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ :md=\E[1m:mr=\E[7m:me=\E[m:\ :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ :k0=\E[11~:k1=\E[12~:k2=\E[13~:k3=\E[14~:k4=\E[15~:\ :k5=\E[17~:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:\ :kf=\E[6~:kg=\E[5~:\ :kY=\E[216z:kZ=\E[222z:\ :ta=^I :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:\ :MT:ke=\E[?1l\E>:\ :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:\ :rs=\E[r\E<\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:xn:\ :AL=\E[%dL :ti=\E7\E[?47h\E(B\E)0:te=\E[2J\E[?47l\E8:\ :hs:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E:\ :gs=^n:ge=^o:gb=lmkjqx: </termcap> I tried the following replacements for the "nl=^J" entry: - "nl=\n" - "nl=\0" - "nl=000a" reloading dbaccess each time. None of them changed how the Enter key works. Have just noticed another version of Informix on the dbaccess box in a directory called: informix_10.0UC5 If I run dbaccess from here then the Return key works as expected. / informix_10.0UC5/etc/termcap is identical to /informix/etc/termcap. The bug must therefore be in the version of dbaccess inside /informix/ bin/. Is there a command you can run to find the version of dbaccess you're using? |
| |||
| dbaccess -v OR dbaccess -V to see your version. Did you try vt100 just for poos and giggles, sometimes that's a nice generic TERM setting. Norma Jean .. .. .. .. ================================================== ========== The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ================================================== ========== |
| |||
| Jack, Andrew, Could there be an stty setting in the way? I know on solaris sometimes my .profile (ksh) or .cshrc (csh) can have unexpected stty settings (unexpected for me, but perhaps good for some application or someone). An unexpected STTY setting can hose up my backspace key or my kill key so I have to do a couple stty settings to get things "out of the way" and then my normal key expectations start working. Just a thought, Norma Jean .. .. .. ================================================== ========== The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ================================================== ========== |
| ||||
| On Dec 28, 2:25 am, "Sebastian, Norma J." <NormaJean.Sebast...@tellabs.com> wrote: > Jack, Andrew, > Could there be an stty setting in the way? I know on solaris sometimes > my .profile (ksh) or .cshrc (csh) can have unexpected stty settings > (unexpected for me, but perhaps good for some application or someone). > An unexpected STTY setting can hose up my backspace key or my kill key > so I have to do a couple stty settings to get things "out of the way" > and then my normal key expectations start working. > Just a thought, > Norma Jean > . > . > . > > ================================================== ========== > The information contained in this message may be privileged > and confidential and protected from disclosure. If the reader > of this message is not the intended recipient, or an employee > or agent responsible for delivering this message to the > intended recipient, you are hereby notified that any reproduction, > dissemination or distribution of this communication is strictly > prohibited. If you have received this communication in error, > please notify us immediately by replying to the message and > deleting it from your computer. Thank you. Tellabs > ================================================== ========== Norma Jean, My stty settings are: $ stty -a speed 38400 baud; rows 49; columns 139; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop - echoprt echoctl echoke However, as the Return key does work with the other location of dbaccess, it seems that the STTY settings must be correct? Thanks for the suggestion Andrew |