|
|
ssh sessions between FreeBSD and solaris
I like ssh and use it a lot. But I find it difficult to have a ssh
session from teh cmd line. FreeBSD complains it does not recognise my
sun-color terminal and solaris complains it does not know the cons25
terminal. I'm not sure how to solve this.
Would it help to have the ssh session bedded into a screen session?
Something like "screen ssh -X server -l user"?
Or do I use some terminal that's supported by fbsd and sol?
|
|
0
|
|
|
|
Reply
|
dick
|
9/16/2006 7:13:08 PM |
|
dick <dick@nagual.nl> wrote:
> I like ssh and use it a lot. But I find it difficult to have a ssh
> session from teh cmd line. FreeBSD complains it does not recognise my
> sun-color terminal and solaris complains it does not know the cons25
> terminal. I'm not sure how to solve this.
You do still work on the console?
On the Solaris machine extract termcap information for the requested terminal
type (sun-color):
infocmp -C sun-color
Paste this information into /usr/share/misc/termcap of your FreeBSD
machine and rerun
cap_mkdb /usr/share/misc/termcap
Now FreeBSD should recognise your sun-color terminal type.
FreeBSD's cons* terminal types should be compatible with AT386. So if you
log into a Sun box and the terminal type is set to cons25, just reset it
to AT386.
Or extract the definitions for cons25w and cons25 from FreeBSD's termcap into
a separate file on your Solaris machine. Then run
captoinfo termcap-extracted > terminfo-cons25
tic terminfo-cons25
This should add definitions for cons25 into Solaris' terminfo database.
--
Daniel
|
|
0
|
|
|
|
Reply
|
Daniel
|
9/16/2006 9:08:28 PM
|
|
quoting Daniel Rock (Sat, 16 Sep 2006 21:08:28 +0000 (UTC)):
> You do still work on the console?
> infocmp -C sun-color
> cap_mkdb /usr/share/misc/termcap
> captoinfo termcap-extracted > terminfo-cons25
> tic terminfo-cons25
Thank you for this crystal clear explanation.
I'll do that tomorrow.
--
dick -- http://nagual.nl/ -- PGP/GnuPG key: F86289CE
++ Running FreeBSD 6.1 +++ The Power to Serve
|
|
0
|
|
|
|
Reply
|
Dick
|
9/16/2006 10:33:03 PM
|
|
On 2006-09-16, Dick Hoogendijk <dick@nagual.nl> wrote:
> Thank you for this crystal clear explanation.
> I'll do that tomorrow.
If you work on a lot of different hosts, you might want to consider
writing one shell profile that covers all your hosts and terminal
worries. Can save a lot of time.
--
Andre
|
|
0
|
|
|
|
Reply
|
Andre
|
9/17/2006 5:53:12 AM
|
|
dick <dick@nagual.nl> writes:
>I like ssh and use it a lot. But I find it difficult to have a ssh
>session from teh cmd line. FreeBSD complains it does not recognise my
>sun-color terminal and solaris complains it does not know the cons25
>terminal. I'm not sure how to solve this.
If you have a sun-color terminal, you must be logging in from the
Solaris console (x86 console).
>Would it help to have the ssh session bedded into a screen session?
>Something like "screen ssh -X server -l user"?
Yes, that would change the terminal type; setting it to "sun" may
help too.
Casper
|
|
0
|
|
|
|
Reply
|
Casper
|
9/17/2006 2:01:20 PM
|
|
Daniel Rock <v200637@deadcafe.de> wrote:
> dick <dick@nagual.nl> wrote:
>> I like ssh and use it a lot. But I find it difficult to have a ssh
>> session from teh cmd line. FreeBSD complains it does not recognise my
>> sun-color terminal and solaris complains it does not know the cons25
>> terminal. I'm not sure how to solve this.
> You do still work on the console?
> On the Solaris machine extract termcap information for the requested terminal
> type (sun-color):
> infocmp -C sun-color
But using Sun's programs for this gives poor results.
In this case, I see this result (which doesn't have color):
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/s/sun-color
sun-color|Sun Workstation console with color text support:\
:am:km:ms:bs:pt:\
:co#80:li#34:kn#2:\
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:IC=\E[%d@:al=\E[L:\
:cd=\E[J:ce=\E[K:cl=\f:cm=\E[%i%d;%dH:dc=\E[P:dl=\E[M:\
:ho=\E[H:ic=\E[@:k1=\E[224z:k2=\E[225z:k3=\E[226z:\
:k4=\E[227z:k5=\E[228z:k6=\E[229z:k7=\E[230z:\
:k8=\E[231z:k9=\E[232z:kd=\E[B:kl=\E[D:kr=\E[C:\
:ku=\E[A:nd=\E[C:r2=\E[s:se=\E[m:so=\E[7m:ue=\E[m:\
:up=\E[A:us=\E[4m:ko=nd,up:
Using ncurses' tools (and terminal database), this information is available:
sun-color|Sun Microsystems Workstation console with color support (IA systems):\
:Co#8:pa#64:\
:AB=\E[4%dm:AF=\E[3%dm:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:\
:UP=\E[%dA:ho=\E[H:op=\E[m\E[p:tc=sun:
sun-il|Sun Microsystems console with working insert-line:\
:am:km:ms:\
:co#80:li#34:\
:%7=\E[194z:&5=\E[193z:&8=\E[195z:@7=\E[220z:AL=\E[%dL:\
:DC=\E[%dP:DL=\E[%dM:F1=\E[234z:F2=\E[235z:IC=\E[%d@:\
:K2=\E[218z:al=\E[L:bl=^G:cd=\E[J:ce=\E[K:cl=^L:\
:cm=\E[%i%d;%dH:cr=^M:dc=\E[P:dl=\E[M:do=^J:ei=:ic=\E[@:im=:\
:k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
:k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:k;=\E[233z:\
:kD=\177:kN=\E[222z:kP=\E[216z:kb=^H:kd=\E[B:kh=\E[214z:\
:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:me=\E[m:mr=\E[7m:nd=\E[C:\
:rs=\E[s:se=\E[m:sf=^J:so=\E[7m:ta=^I:u8=\E[1t:u9=\E[11t:\
:ue@:up=\E[A:
sun|sun1|sun2|Sun Microsystems Inc. workstation console:\
:tc=sun-il:
> Paste this information into /usr/share/misc/termcap of your FreeBSD
> machine and rerun
> cap_mkdb /usr/share/misc/termcap
> Now FreeBSD should recognise your sun-color terminal type.
Given the quality of results, you could simply have told him to alias
sun-color to sun.
> FreeBSD's cons* terminal types should be compatible with AT386. So if you
> log into a Sun box and the terminal type is set to cons25, just reset it
> to AT386.
"should be".
There's been some feature drift (ymmv).
> Or extract the definitions for cons25w and cons25 from FreeBSD's termcap into
> a separate file on your Solaris machine. Then run
Extracting from FreeBSD's termcap would be done with a text-editor, since
FreeBSD doesn't package any more powerful tools...
Upcoming ncurses 5.6 will solve that problem, at any rate.
> captoinfo termcap-extracted > terminfo-cons25
> tic terminfo-cons25
> This should add definitions for cons25 into Solaris' terminfo database.
However, the same information lives here:
ftp://invisible-island.net/ncurses/terminfo.src.gz
ftp://invisible-island.net/ncurses/termcap.src.gz
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/19/2006 11:26:07 AM
|
|
In article <12gvkufotf75l81@corp.supernews.com>,
Thomas Dickey <dickey@saltmine.radix.net> wrote:
>Daniel Rock <v200637@deadcafe.de> wrote:
>> dick <dick@nagual.nl> wrote:
>>> I like ssh and use it a lot. But I find it difficult to have a ssh
>>> session from teh cmd line. FreeBSD complains it does not recognise my
>>> sun-color terminal and solaris complains it does not know the cons25
>>> terminal. I'm not sure how to solve this.
>
>> You do still work on the console?
>
>> On the Solaris machine extract termcap information for the requested terminal
>> type (sun-color):
>
>> infocmp -C sun-color
>
>But using Sun's programs for this gives poor results.
>
....
....
>> Paste this information into /usr/share/misc/termcap of your FreeBSD
>> machine and rerun
>
>> cap_mkdb /usr/share/misc/termcap
>
>
>> Now FreeBSD should recognise your sun-color terminal type.
>
>Given the quality of results, you could simply have told him to alias
>sun-color to sun.
What kind of alias? For use in:
>> infocmp -C sun-color
a (t)csh kind of alias is useless -- doesn't work
on args.
So, what *kind* of "alias" was that talking about?
Thanks!
David
|
|
0
|
|
|
|
Reply
|
dkcombs
|
9/20/2006 12:16:31 PM
|
|
David Combs <dkcombs@panix.com> wrote:
>>Given the quality of results, you could simply have told him to alias
>>sun-color to sun.
> What kind of alias? For use in:
> >> infocmp -C sun-color
> a (t)csh kind of alias is useless -- doesn't work
> on args.
> So, what *kind* of "alias" was that talking about?
man terminfo (the same sort of thing applies to termcap) uses "alias"
in this context:
Entries in terminfo source files consist of a number of
comma-separated fields. White space after each comma is
ignored. Embedded commas must be escaped by using a
backslash. Each device entry has the following format:
alias1 | alias2 | ... | aliasn | fullname,
capability1, capability2,
.
.
.
capabilityn,
The first line, commonly referred to as the header line,
must begin in column one and must contain at least two
aliases separated by vertical bars. The last field in the
header line must be the long name of the device and it may
contain any string. Alias names must be unique in the ter-
minfo database and they must conform to system file naming
conventions (see tic(1M)); they cannot, for example, contain
termcap uses similar conventions. For example, he could have written
this in termcap:
sun-color|alias for sun:\
:tc=sun:
and pasted that into FreeBSD's termcap file (assuming that it has "sun",
which is likely). The terminfo for that is similar
sun-color|alias for sun,
use=sun,
But there's not much point in pasting in a non-color subset of sun-color
as a termcap entry.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
|
|
0
|
|
|
|
Reply
|
Thomas
|
9/20/2006 12:46:31 PM
|
|
|
7 Replies
271 Views
(page loaded in 0.14 seconds)
|
|
|
|
|
|
|
|
|