On Tue, Sep 06, 2005 at 09:19:51PM +0200, Jan Kundrát wrote: > Joe Wells wrote: > > The best solution to this that I can think of is to extend OpenSSH > > with the capability to copy terminfo information to ~/.terminfo on the > > remote system. > > IMHO automated overwriting files in $HOME on every login is a *very* bad > thing. And if you wanted to remove those "-via-ssh-#" lines after > logout, what will happen if your connection hungs? > > -jkt
As said ssh can transport environment variables to the other system. Usualy people use it to transfer $TERM.. why not make a variable $TERMINFO_DESC ($TERMINFO is allready used by curses for the path to local terminfo) and put the hole terminfo description into it, mark it for export via ssh, and write a few commands in your bashrc on the other side to put $TERMINFO_DESC into a file say ~/.terminfo/${TERM:0:1}/$TERM if it does not exist... (or do the new-uniqe-name stuff Joe suggested) Or just simpler, put a termcap descritption into $TERMCAP, and mark that for ssh export. Downside is that you would have to change TERM to something that isn't in the other systems terminfo database, or the $TERMCAP won't be used. Or better, hack curses to use $TERMINFO_DESC from environment to override the system terminfo databes, and just export that variable... Downside is that applications that don't use ncurses won't use it... But best way is to clear the mess as suggested and persuade konsole, gnome-terminal and others to use their own terminal type. -- _ | YoYo () Siska -- gentoo-dev@gentoo.org mailing list