public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH v2] serial-getty service: Add linux as default TERM
@ 2014-05-03 23:36 Joel Fernandes
  2014-05-04 10:17 ` Jonathan Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Fernandes @ 2014-05-03 23:36 UTC (permalink / raw)
  To: openembedded-core

In poky with systemd enabled, vt102 is selected for getty
causing user to experience a very crappy terminal. Default
TERM to linux.

Signed-off-by: Joel Fernandes <joelf@ti.com>
---
v2: Dropped PR bump

 .../systemd-serialgetty/serial-getty@.service      |    1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 865de34..eb2280b 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -20,6 +20,7 @@ Before=getty.target
 IgnoreOnIsolate=yes
 
 [Service]
+Environment="TERM=linux"
 ExecStart=-/sbin/agetty --keep-baud %I @BAUDRATE@ $TERM
 Type=idle
 Restart=always
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-03 23:36 [PATCH v2] serial-getty service: Add linux as default TERM Joel Fernandes
@ 2014-05-04 10:17 ` Jonathan Liu
  2014-05-04 20:32   ` Joel Fernandes
  2014-05-05  2:31   ` Khem Raj
  0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Liu @ 2014-05-04 10:17 UTC (permalink / raw)
  To: Joel Fernandes, openembedded-core

On 4/05/2014 9:36 AM, Joel Fernandes wrote:
> In poky with systemd enabled, vt102 is selected for getty
> causing user to experience a very crappy terminal. Default
> TERM to linux.
>
> Signed-off-by: Joel Fernandes <joelf@ti.com>
> ---
> v2: Dropped PR bump
>
>   .../systemd-serialgetty/serial-getty@.service      |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
> index 865de34..eb2280b 100644
> --- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
> +++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
> @@ -20,6 +20,7 @@ Before=getty.target
>   IgnoreOnIsolate=yes
>   
>   [Service]
> +Environment="TERM=linux"
>   ExecStart=-/sbin/agetty --keep-baud %I @BAUDRATE@ $TERM
>   Type=idle
>   Restart=always
I would prefer:
Environment="TERM=xterm"
ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM

"xterm" as it is much more widely supported than "linux". Also, PuTTY 
uses "xterm" by default.
-8 to assume the tty is 8-bit clean and disable parity detection. I have 
had some issues where parity sometimes gets enabled even though the 
serial line is 8-bit clean and I end up with garbage on the serial terminal.

Regards,
Jonathan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-04 10:17 ` Jonathan Liu
@ 2014-05-04 20:32   ` Joel Fernandes
  2014-05-05  2:31   ` Khem Raj
  1 sibling, 0 replies; 8+ messages in thread
From: Joel Fernandes @ 2014-05-04 20:32 UTC (permalink / raw)
  To: Jonathan Liu, openembedded-core

On 05/04/2014 05:17 AM, Jonathan Liu wrote:
> On 4/05/2014 9:36 AM, Joel Fernandes wrote:
>> In poky with systemd enabled, vt102 is selected for getty
>> causing user to experience a very crappy terminal. Default
>> TERM to linux.
>>
>> Signed-off-by: Joel Fernandes <joelf@ti.com>
>> ---
>> v2: Dropped PR bump
>>
>>   .../systemd-serialgetty/serial-getty@.service      |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git
>> a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
>> b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
>> index 865de34..eb2280b 100644
>> --- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
>> +++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
>> @@ -20,6 +20,7 @@ Before=getty.target
>>   IgnoreOnIsolate=yes
>>     [Service]
>> +Environment="TERM=linux"
>>   ExecStart=-/sbin/agetty --keep-baud %I @BAUDRATE@ $TERM
>>   Type=idle
>>   Restart=always
> I would prefer:
> Environment="TERM=xterm"
> ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM
> 
> "xterm" as it is much more widely supported than "linux". Also, PuTTY
> uses "xterm" by default.
> -8 to assume the tty is 8-bit clean and disable parity detection. I have
> had some issues where parity sometimes gets enabled even though the
> serial line is 8-bit clean and I end up with garbage on the serial
> terminal.

Fair enough, I tested and it works fine for me. Will submit a patch.

-Joel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-04 10:17 ` Jonathan Liu
  2014-05-04 20:32   ` Joel Fernandes
@ 2014-05-05  2:31   ` Khem Raj
  2014-05-05  2:37     ` Joel Fernandes
  1 sibling, 1 reply; 8+ messages in thread
From: Khem Raj @ 2014-05-05  2:31 UTC (permalink / raw)
  To: Jonathan Liu; +Cc: Patches and discussions about the oe-core layer

On Sun, May 4, 2014 at 3:17 AM, Jonathan Liu <net147@gmail.com> wrote:
> I would prefer:
> Environment="TERM=xterm"
> ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM

I wonder if that would add some dependency on right terminfo being
present on system ?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-05  2:31   ` Khem Raj
@ 2014-05-05  2:37     ` Joel Fernandes
  2014-05-05  2:51       ` Joel Fernandes
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Fernandes @ 2014-05-05  2:37 UTC (permalink / raw)
  To: Khem Raj, Jonathan Liu; +Cc: Patches and discussions about the oe-core layer

On 05/04/2014 09:31 PM, Khem Raj wrote:
> On Sun, May 4, 2014 at 3:17 AM, Jonathan Liu <net147@gmail.com> wrote:
>> I would prefer:
>> Environment="TERM=xterm"
>> ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM
> 
> I wonder if that would add some dependency on right terminfo being
> present on system ?
> 

I thought about this too, I have no idea frankly, I can see that it
probably would :-(



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-05  2:37     ` Joel Fernandes
@ 2014-05-05  2:51       ` Joel Fernandes
  2014-05-05  3:02         ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Fernandes @ 2014-05-05  2:51 UTC (permalink / raw)
  To: Khem Raj, Jonathan Liu; +Cc: Patches and discussions about the oe-core layer

On 05/04/2014 09:37 PM, Joel Fernandes wrote:
> On 05/04/2014 09:31 PM, Khem Raj wrote:
>> On Sun, May 4, 2014 at 3:17 AM, Jonathan Liu <net147@gmail.com> wrote:
>>> I would prefer:
>>> Environment="TERM=xterm"
>>> ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM
>>
>> I wonder if that would add some dependency on right terminfo being
>> present on system ?
>>
> 
> I thought about this too, I have no idea frankly, I can see that it
> probably would :-(
> 

Khem,
terminfo data (/usr/share/terminfo) seems to be coming from ncurses in
my build. I think ncurses-terminfo-base. Not sure what the right
dependency play we should be doing for this... set dependency to
ncurses-terminfo-base?

by the way
/lib/systemd/system/debug-shell.service
which ships with systemd already sets Environment=TERM=linux

Thanks,
-Joel



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-05  2:51       ` Joel Fernandes
@ 2014-05-05  3:02         ` Khem Raj
  2014-05-05 15:31           ` Joel Fernandes
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2014-05-05  3:02 UTC (permalink / raw)
  To: Joel Fernandes; +Cc: Patches and discussions about the oe-core layer

On Sun, May 4, 2014 at 7:51 PM, Joel Fernandes <joelf@ti.com> wrote:
> Khem,
> terminfo data (/usr/share/terminfo) seems to be coming from ncurses in
> my build. I think ncurses-terminfo-base. Not sure what the right
> dependency play we should be doing for this... set dependency to
> ncurses-terminfo-base?
>

adding ncurses to dependencies would do it. but that could be an overkill.

> by the way
> /lib/systemd/system/debug-shell.service
> which ships with systemd already sets Environment=TERM=linux

yes this seems ok probably.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] serial-getty service: Add linux as default TERM
  2014-05-05  3:02         ` Khem Raj
@ 2014-05-05 15:31           ` Joel Fernandes
  0 siblings, 0 replies; 8+ messages in thread
From: Joel Fernandes @ 2014-05-05 15:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On 05/04/2014 10:02 PM, Khem Raj wrote:
> On Sun, May 4, 2014 at 7:51 PM, Joel Fernandes <joelf@ti.com> wrote:
>> Khem,
>> terminfo data (/usr/share/terminfo) seems to be coming from ncurses in
>> my build. I think ncurses-terminfo-base. Not sure what the right
>> dependency play we should be doing for this... set dependency to
>> ncurses-terminfo-base?
>>
> 
> adding ncurses to dependencies would do it. but that could be an overkill.
> 
>> by the way
>> /lib/systemd/system/debug-shell.service
>> which ships with systemd already sets Environment=TERM=linux
> 
> yes this seems ok probably.
> 

Ok. I'll take that as an Ack :-D. So can you pull this patch (or someone
else)?

Regards,
-Joel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-05 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-03 23:36 [PATCH v2] serial-getty service: Add linux as default TERM Joel Fernandes
2014-05-04 10:17 ` Jonathan Liu
2014-05-04 20:32   ` Joel Fernandes
2014-05-05  2:31   ` Khem Raj
2014-05-05  2:37     ` Joel Fernandes
2014-05-05  2:51       ` Joel Fernandes
2014-05-05  3:02         ` Khem Raj
2014-05-05 15:31           ` Joel Fernandes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox