You are not logged in.

#1 2016-10-15 05:24:06

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Exit nano and clear the screen?

I'm sure I've come across the solution to this in the past but, for the life of me, I can't seem to find it now.

When I exit nano, parts of the file that was opened remain on the screen and my prompt shows up at the bottom of the screen.

I know for a fact that it wasn't always behaving like this in the past.

Does anyone know how I can make the screen clear upon exiting nano so the prompt goes to the top of the screen as "normal"?


Thanks in advance for your assistance! wink

Offline

#2 2016-10-15 05:38:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Exit nano and clear the screen?

Sounds like your TERM is being forced/broken.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-10-15 05:42:12

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

OK, what would cause that?

$ echo $TERM
linux
$ 

Is what I've got. hmm

Offline

#4 2016-10-15 05:45:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Exit nano and clear the screen?

What terminal are you running that in? The TTY?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-10-15 05:49:06

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

tty1 I suppose. hmm

I boot, login, nano somefile, exit and screen won't clear.

I've no DM/DE/WM installed at the moment.

Last edited by S3NTYN3L (2016-10-15 05:50:02)

Offline

#6 2016-10-15 05:52:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Exit nano and clear the screen?

That is just the capability of the TTY. You can either install a multiplexer with a more comprehensive terminfo (like tmux), or get used to hitting Ctrl-l


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2016-10-15 06:03:39

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

Hmm, OK. Thanks just the same.

sad

Offline

#8 2016-10-15 10:08:38

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: Exit nano and clear the screen?

Or make an alias.

alias nano='nano; clear'


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2016-10-15 11:55:39

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: Exit nano and clear the screen?

What is your graphics hardware?

For Intel cards especially, enabling an early KMS start can fix some TTY problems.

https://wiki.archlinux.org/index.php/Ke … _KMS_start

Offline

#10 2016-10-15 13:54:11

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

Yes, it's Intel HD Graphics.

I'm in the middle of nuking the hard drive at the moment because pacstrap was giving me warnings about skipping a bunch of files. (IIRC, stuff like grep and which, etc).
I'll reinstall the base/base-devel and get back to you guys.

Thanks for the help so far.

Offline

#11 2016-10-15 14:05:09

seth
Member
Registered: 2012-09-03
Posts: 49,946

Re: Exit nano and clear the screen?

Happens also with vim but not with mc. Happens also w/ VGA console.
Seems they're not using the alternative buffer or call stuff that's not supported.
No idea though, whether this used to be different in any past.

Offline

#12 2016-10-15 14:08:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Exit nano and clear the screen?

S3NTYN3L wrote:

I'm in the middle of nuking the hard drive at the moment because pacstrap was giving me warnings...

Why are you using pacstrap on an installed system?  Pacstrap is *only* for the initial installation.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2016-10-15 14:15:17

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

Trilby wrote:

Why are you using pacstrap on an installed system?  Pacstrap is *only* for the initial installation.


Because I thought maybe something got corrupted while I was messing around with config files and I attempted a clean install.
I'm guessing that parted only does "quick formats" whilst creating file systems. hmm

Anyway, here I am, nuking the drive to see if 1) I can get rid of those warnings about skipping packages and 2) the behavior I want, the screen clear after exiting nano, etc, comes back.

Offline

#14 2016-10-15 14:20:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Exit nano and clear the screen?

1) reinstalling because pacman gave you an error you didn't understand is never a good idea.  Figure out what the error actually meant.

2) parted doesn't create filesystems, it creates partitions.  The mkfs family of tools make filesystems.

3) Don't expect much different with the fresh install.  What you are seeing is not a "bug" just a common behavior.  You can follow one of the above suggestions like using an alias to include a clear command, or using tmux/screen.  Or you could look into something like fbterm.  If you do much work in a tty I'd suspect you'd want fbterm and/or tmux/screen.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2016-10-15 14:39:59

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Exit nano and clear the screen?

Understood, Trilby.

I misspoke regarding parted.
FWIW, I used parted to recreate my partitions and then mkfs to create the filesystems.
I meant to say that mkfs seems to only perform quick formats.

The need to CTRL+L I can live with.
I posted because, in the past, nano exited and the screen cleared on its own.
Meaning, I didn't set an alias or install a third-party package, etc.

As for pacman skipping base packages, you're correct, I've no idea why that would be.
Especially since it's never done so on this laptop/hardware before.

EDIT:

It's skipping because the packages in question are also part of the base-devel group.

That seems a bit silly to me having them in both groups. hmm

Would someone mind explaining why this is? I'm curious, lol...

Last edited by S3NTYN3L (2016-10-15 22:12:36)

Offline

Board footer

Powered by FluxBB