From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Do not render correctly colors on ssh terminal Date: Mon, 9 Oct 2023 23:39:50 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9315"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Vincenzo Palazzo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 09 18:40:47 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qptJG-0002Cn-CR for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Oct 2023 18:40:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qptIc-0003Ig-83; Mon, 09 Oct 2023 12:40:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qptIb-0003Ho-6c for help-gnu-emacs@gnu.org; Mon, 09 Oct 2023 12:40:05 -0400 Original-Received: from mail-vs1-xe36.google.com ([2607:f8b0:4864:20::e36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptIZ-0000rK-Io for help-gnu-emacs@gnu.org; Mon, 09 Oct 2023 12:40:04 -0400 Original-Received: by mail-vs1-xe36.google.com with SMTP id ada2fe7eead31-4526b9078b2so1314685137.0 for ; Mon, 09 Oct 2023 09:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696869602; x=1697474402; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/tzZiDKJcnXgbAzM37aOZldqMLcc7/FKWbexgQVRYH4=; b=RtEfttkfbUPj2a1TVl0+qXwEsRwXJeVDSMGtcjzioeesNLtzVgcMtI6+NmCoZLQJXW +3QG1AiNhMW02wKR8F1yTYiQ3xmvvjWbDQ6ngjcErYR4OCOOo668Sjg1MD2Jtq5kBNWh ZUhl1qb8ZlJRR1b9OrkrWFmx08KKllfft9tjKC2VdAm8zC1HDpwXXEg7JhobmrEcAugt MYqtMatVFsFq7JdR2/pf5AqsIm5bp4jFLdOgV/nflQDXevBYZVi6YQ4qwbU3IwBfaOk1 NasqvPP9VmiZQoAfGP2bYH7whr0IQXtHV5lHXmdu7ejFkh08FX3mt7oMHd5YJf17kfxo /uog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869602; x=1697474402; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/tzZiDKJcnXgbAzM37aOZldqMLcc7/FKWbexgQVRYH4=; b=HXFvleTTEBAlUnpQFkrKfUCPPw9n0aQV1VsH5kLQzrvoTlgUSCDeYw77TCR/qwCwlA ccP0bbj0RgpS0ePvxiznOn4CJmFD35mfKWM8Yseo5gqBnNSHVURDL/7Dn1LaFd9lYLUZ 6Tg8mR9nh9nhzgtAbfrGMTihQUL6XXJ6tqrJyigwXNO8dinqOdUPusSey/a5Ba6TOI4W /oNKjhuvM9k6C6KYAXJBOUZBLHy9UcSxIc+xC+V+fyO+yumnsSGtApixTGvQMI+78D7A PaWxSjDSNWe4wTDzGFjFvcbn5ndrSrgqOKx1T6gTG60KfDPa/hGlF0G1hvsp1nMKKoTN XaHw== X-Gm-Message-State: AOJu0Yx2knVtWzgBHPuYJpW9xtHpmeRAkUlWyXDwB/H6zT7tS+tquVWS vgYdWiKpq7rAAJaPI2l73n0yXMgeGv4t/38YLHu3o6v6Vic= X-Google-Smtp-Source: AGHT+IEidr5xIglCwqxwvFVBPJah+qF5vdHcMLBA2zT4XV+4HvD1s24YqVBYuUMrdN7HPI69rf4fsp8KR693RlBpEpM= X-Received: by 2002:a67:ea59:0:b0:44e:b77e:f976 with SMTP id r25-20020a67ea59000000b0044eb77ef976mr9881732vso.20.1696869602430; Mon, 09 Oct 2023 09:40:02 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e36; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145268 Archived-At: On Fri, 6 Oct 2023 at 02:08, Vincenzo Palazzo wrote: > I have a problem that I was never able to solve and I > always try to switch on another editor when I am coding on my remote mach= ine. > > However, I think that I solution should be somewhere for this kind of pro= blem > and that I am the only one that is finding this problem. > > MY doom [1] configuration with emacs 29.1 on my host machine is rendered > in the terminal as [2] but the same configuration on the same file in a > ssh session emacs is rendered as [3]. The thread devolved into getting you to use Tramp, but the answer to your original problem is somewhere in terminal capability definitions. On your local machine, you probably have TERM=3Dxterm-256color or similar in your environment and you have a terminfo database entry for that terminal. Typing =E2=80=98infocmp=E2=80=99 probably says =E2=80=98colo= rs#0x100=E2=80=99 or =E2=80=98colors#256=E2=80=99 somewhere near the top. On your remote machine, you should still have TERM=3Dxterm-256color, as =E2=80=98ssh=E2=80=99 forwards that variable by default. However, if the co= rresponding terminfo database entry is not installed, applications will not detect that your terminal is capable of displaying 256 colors. =E2=80=98infocmp=E2= =80=99 will say colors#8 or something similar. How you install the required terminfo entries will depend on your distribution. On Debian-based distros, =E2=80=98/usr/share/terminfo/x/xterm-256color=E2=80=99 is installed by the = package =E2=80=98ncurses-base=E2=80=99. There is also a possibility that your theme assumes 24-bit color, and your remote machine is not advertising that capability. See https://www.gnu.org/software/emacs/manual/html_node/efaq/Colors-on-a-TTY.ht= ml for a summary where Emacs looks before it decides whether 24-bit color is or is not available.