Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmux doesn't work over ssh if TERM=xterm-kitty #1241

Closed
toonn opened this issue Dec 16, 2018 · 11 comments
Closed

Tmux doesn't work over ssh if TERM=xterm-kitty #1241

toonn opened this issue Dec 16, 2018 · 11 comments

Comments

@toonn
Copy link
Contributor

toonn commented Dec 16, 2018

I'm opening a new issue on this because I'm getting no response in a closed one.

Locally tmux opens in kitty without problems. Remotely it throws the following error: open terminal failed: missing or unsuitable terminal: xterm-kitty. I do have the kitty terminfo files on the server, so ssh works fine but I still have to set TERM=xterm-256color to be able to start tmux remotely. Am I missing something on the server?

@kovidgoyal
Copy link
Owner

works for me. Make sure your kitty terminfo files are properly installed on the server. Either by using the ssh kitten or by installing them system wide (the latter is more robust). Verify that the terminfo files are readable by running

infocmp

it will print out the terminfo file for kitty if it is actually accessible.

@kovidgoyal
Copy link
Owner

And remember not to rejoin a tmux session that was started from another terminal emulator. tmux does not support that.

@toonn
Copy link
Contributor Author

toonn commented Dec 16, 2018

As I said, the terminfo files are available remotely.

@kovidgoyal
Copy link
Owner

then you will have to ask tmux developers why it is refusing to open available files, I have no special insight in to tmux, other than to say that dont re-use tmux sessions between different terminal emulators.

@toonn
Copy link
Contributor Author

toonn commented Dec 16, 2018

Hmm, the tmux tracker had a similar issue that was closed pointing the finger to ncurses (this is probably why you say not to re-use sessions but I'm not doing that): tmux/tmux#1433

That issue points to one on the ubuntu tracker where the problem is considered invalid. The ncurses mailing list considers kitty issues off-topic so that didn't help either.

Does this mean I'm stuck setting TERM=xterm-256color?

@kovidgoyal
Copy link
Owner

I suppose so, I dont really see what kitty can do about this.

@pencilcheck
Copy link

pencilcheck commented Dec 20, 2019

My kitty terminfo is available, but tmux still can't find it or use it when I tried to create a new session or attach to existing one. I'm on Mac Catalina what should I do?

$ infocmp -D                                                                                   
/Applications/kitty.app/Contents/Frameworks/kitty/terminfo
/Users/pencilcheck/anaconda2/share/terminfo
$ uname -sp && tmux -V && echo $TERM                                                              
Darwin i386
tmux 3.0a
xterm-kitty
$ infocmp xterm-kitty
#	Reconstructed via infocmp from file: /Applications/kitty.app/Contents/Frameworks/kitty/terminfo/78/xterm-kitty
xterm-kitty|KovIdTTY,
	am, ccc, hs, km, mc5i, mir, msgr, npc, xenl,
	colors#0x100, cols#80, it#8, lines#24, pairs#0x7fff,
	acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
	bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
	clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r,
	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
	cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
	dl=\E[%p1%dM, dl1=\E[M, dsl=\E]2;\007, ech=\E[%p1%dX,
	ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l,
	fsl=^G, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH,
	ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n,
	indn=\E[%p1%dS,
	initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
	kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~,
	kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C,
	ka1=, ka3=, kbs=^?, kc1=, kc3=, kcbt=\E[Z, kcub1=\EOD,
	kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kend=\EOF,
	kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
	kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S,
	kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ,
	kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
	kf23=\E[23;2~, kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q,
	kf27=\E[1;5R, kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR,
	kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~,
	kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~,
	kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R,
	kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~,
	kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~,
	kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~,
	kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R,
	kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
	kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
	kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
	kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
	kf8=\E[19~, kf9=\E[20~, khlp=, khome=\EOH, kich1=\E[2~,
	kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
	kri=\E[1;2A, kund=, oc=\E]104\007, op=\E[39;49m, rc=\E8,
	rev=\E[7m, ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B,
	rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l,
	rmso=\E[27m, rmul=\E[24m, rs1=\E]\E\\\Ec, sc=\E7,
	setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
	setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
	sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
	sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
	smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h, smso=\E[7m,
	smul=\E[4m, tbc=\E[3g, tsl=\E]2;, vpa=\E[%i%p1%dd,

@kovidgoyal
Copy link
Owner

tmux does not support multiple terminfo. You will ned to kill all
existing tmux sessions and start a new one.

@pencilcheck
Copy link

You are right, I didn't kill all existing tmux sessions, once I did the problem went away. Thanks!

@brandondrew
Copy link

I suppose so, I dont really see what kitty can do about this.

Does the quality of Kitty degrade if TERM=xterm-256color is used?

@toonn
Copy link
Contributor Author

toonn commented Sep 27, 2021

I haven't noticed any problems. Though there are programs that rely on the value of TERM to use Kitty's Image Protocol, for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants