tcsh curses issue?

My OpenSuSE Thinkpad has a problem it seems with tcsh and Putty or MobaXterm on my PC.

I have emacs editing configured and it works fine from the laptop’s terminals. But when used remotely, the editing commands don’t update the screen correctly (though they are still editing the command buffer correctly; you just can’t see it.) For instance, I type abcdefgh, then ctrl-A. The cursor only moves you back to the “f”. (Though if I type an i, I get “iabcdefgh: Command not found.” so the editing in fact is happing correctly.)

If I switch to bash, it works fine. If I fire up a tcsh from within that bash, its back to screwed up.

The problem seems to be this line in my cshrc:

set prompt = ">%{\033]0;%}%m %~%{\007%} "

I’ve used this line for like two decades exactly like that, I think, including accessing my previous Linux box from a PC. So why is it now hosed?

2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux

I think most people use bash so maybe tsch is not getting attention and an error has crept in. May need to report to bugzilla

Hello and welcome.

Please allways tell which version of openSUSE you use. In any case, your kernel (as far as I can see that from your cryptic line) seems to be very old.

I assume that cryptic line is something you copied/pasted from a terminal window after invoking some command. Can you please next time copy/paste things completely, that is prompt, command, output and next prompt in one sweep between CODE tags here ia post? You get the code tags by clicking on the # button in the tool bar of the post editor.

I guess you did

henk@boven:~> uname -rv
3.11.10-7-desktop #1 SMP PREEMPT Mon Feb 3 09:41:24 UTC 2014 (750023e)
henk@boven:~>

Which btw shows the kernel delivered with openSUSE 13.1 as shown by:

henk@boven:~> cat /etc/os-release
NAME=openSUSE
VERSION="13.1 (Bottle)"
VERSION_ID="13.1"
PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"
henk@boven:~>

I’m using “tcsh”, and not having problems. Admittedly, I don’t normally use emacs mode.

I suspect, however, that the problem might be different. The OP mentions PuTTY. The “xterm” terminal emulation by PuTTY is probably different from that “xterm”. I used to run into occasional problems when using “solaris”, because of different terminal emulation.

I would try setting TERM to be “vt100” to see if that fixes things (by using only minimal escape sequences).

In tcsh, that should be


set term=vt100

Thanks all for your feedback.

Henk,

Henk, you’re right to hector me for not including the tcsh version. But I can’t believe you’re hectoring me for not showing the command that produced output in a format anyone would recognize as uname -a.

tcsh --version
tcsh 6.17.02 (Astron) 2010-05-12 (x86_64-suse-linux) options wide,nls,lf,dl,al,kan,sm,color,filec

uname -a
Linux slim.site 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux

I don’t have an /etc/os-release .

It funny how Linux fans spend half the time bragging about up-time measured in half-decades, and the other half of the time implying that anyone having trouble with a release more than a couple months old has only themselves to blame for their problems. If Linux is so great (and I’ve been using it since 1995 pretty much daily) then its perfectly valid to ask why one can’t even see ones’ own command line editing even in a 3-year-old release.

Nrickert, I think the problems not the emacs mode, but the setting of PROMPT that has control characters that xterm (and Putty) use for letting the window title be set. (These put the machine name and path in the title bar.)

I did try setting the term to xterm and to VT100, with no luck. Note that I’ve used Putty talking to a tcsh process on Linux or Solaris 50 hours a week for like 10 years now, with this exact PROMPT setting. Its a combination that certainly works fine. Just not on this SuSE release.

I’ve looked into trying to upgrade just tcsh, but I fall into a forest of terminoloy that I don’t understand. Its just a few commands to download configure, handle dependencies, and compile, right? If so can anyone share the commands with me? I’m a C++ developer and can handle an OS as far as config issues configuring disks, networking, etc., but don’t actually know about the “maintenance” side of OS such as upgrading packages.

Use the “script” command. That will give you a file (by default, named “typescript”) with the exact output when tcsh gives a prompt (including escape characters). Then you can examine that, perhaps with a hex editor or with “od -c” to see if it is messing up the prompt.

The actual interpretation in terms of cursor motions is done by the terminal emulation, not by the shell.

You can use “script” locally, before you “putty” into the remote site, or use it on the remote site. You might want to try both, though probably not at the same time. That might help tell if there’s a terminal emulation problem or a tcsh problem.

Hmm, with “putty”, doing locally doesn’t make sense. With command line “ssh” from a local shell, it would make sense.

This was a general remark on how to best post computer facts you want to show. Add the prompts and the commands and all wil be much more clear to your audience.

And reading what people ask isn’t also a bad idea. You forgot the CODE tags. We have to explain that to every newcomer here because it is not very obvious to find this feature. But I think there isn’t much excuse not to use them after it is explained to you. And when the explanation isn’t clear enough then you couuld have asked for more details. But simply ignoring this is a bit harsh to those who try to help you.

Sorry about asking you to post /etc/os-release. I didn’trealize that your openSUSE version is that old. In that case

cat /etc/SuSE-release

will tell you what openSUSE version you have so that you can inform us.

In any case, your openSUSE version is unsupported already for some time and not very many people here will be able to try to replay what you have on their system.

On 2014-05-15 03:06, fsheeran wrote:
>
> Thanks all for your feedback.
>
> Henk,
>
> Henk, you’re right to hector me for not including the tcsh version. But
> I can’t believe you’re hectoring me for not showing the command that
> produced output in a format anyone would recognize as uname -a.
>
> tcsh --version
> tcsh 6.17.02 (Astron) 2010-05-12 (x86_64-suse-linux) options
> wide,nls,lf,dl,al,kan,sm,color,filec

A comment: When pasting here computer commands and such, please use a
CODE BLOCK, so that the forum software doesn’t do silly things like
converting URLS to tiny urls or otherwise hide or alter the commands you
entered. You get them by clicking on the ‘#’ button in the forum editor.
See photo

And… We also like to see everything, from the command prompt with the
command that you are running and the complete output to the next prompt

  • so that we know exactly what your are doing :slight_smile:

:wink:

> uname -a
> Linux slim.site 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10
> +0100 x86_64 x86_64 x86_64 GNU/Linux

What Henk says is that we prefer it like this:


> cer@minas-tirith:~> uname -a
> Linux minas-tirith.valinor 3.11.10-7-desktop #1 SMP PREEMPT Mon Feb 3 09:41:24 UTC 2014 (750023e) x86_64 x86_64 x86_64 GNU/Linux
> cer@minas-tirith:~>

Because it avoids misunderstanding. With the prompts and commands used,
complete :wink:

> I don’t have an /etc/os-release .

Because you are using an old release, maybe even obsolete. Please use
instead "/etc/SuSE-release/. If you are not using 12.3 or 13.1, you have
to upgrade your system (exception: 11.4 has maintenance till about June
with Evergreen).

https://en.opensuse.org/Lifetime
https://en.opensuse.org/Evergreen

> I’ve been using it since 1995 pretty much daily) then its perfectly
> valid to ask why one can’t even see ones’ own command line editing even
> in a 3-year-old release.

… because the problem may be a bug that was solved “recently” :wink:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))