clear >> /etc/issue

I’m still bogged down with a few real-life responsibilities that are monopolizing my free time, so the only tidbit I have to share right now is a quick tip on modifying the login prompt.

One of the things I dislike about Crux is that the login prompt, located at /etc/issue, is rather sparse — so sparse in fact, that it doesn’t clear the screen of debris when I log out. I’d prefer it behaved like Arch, where logging out cleared the screen and showed only the login command.

So how to feed a “clear screen” command into the /etc/issue file? Easy.

clear >> /etc/issue

Naturally, you’ll have to be root to do that (or a reasonable facsimile thereof). Once the escape key sequence for the “clear screen” command is tacked onto that file, you can move it around inside there and cue the blank screen before the text is shown. Simple enough, right?

While you’re adjusting the login prompt, you might as well add some gigantamo text with figlet, colorize the whole affair with cadubi and really pimp your ride.

But let’s not go overboard, friends. :D

About these ads

13 Responses to “clear >> /etc/issue”


  1. 1 Mikachu 2009/06/22 at 12:54 AM

    or you can put clear in ~/.bash_logout or ~/.zlogout

  2. 2 tigrmesh 2009/06/22 at 2:59 AM

    Those of us running Arch can use this little masterpiece: http://bbs.archlinux.org/viewtopic.php?pid=386429#p386429

  3. 4 CorkyAgain 2009/06/22 at 3:14 AM

    … and here I thought your title was a clever reference to your need to clear up some issues in your real life. ;-)

  4. 6 Colin Jones 2009/06/22 at 4:30 AM

    I actually do go overboard and put a pixel art image in my issue along with the name of the computer it’s for.
    It makes a great alternative to GDM or even Slim and Quingy.

    I was planning on writing a tutorial on how to do this too.

  5. 8 ShiftPlusOne 2009/06/22 at 5:15 AM

    Nice! You could also use img2txt, which I think comes with libcaca, to customize /etc/issue.

  6. 10 Eirik 2009/06/24 at 1:23 PM

    Hm,

    for those that don’t have a completely empty /etc/issue, you might want to do the reverse, namely append clear to the top of /etc/issue.

    I couldn’t find any reasonable way append to the beginning of a file using only the shell, so:

    (clear; cat /etc/issue) > /tmp/issue; mv /tmp/issue /etc/issue

    #Parenthesis needed to execute both clear, and cat in subshell,
    #and for single redirect to work. Equivalent to:
    clear >> /tmp/issue
    cat /etc/issue >> /tmp/issue
    mv /tmp/issue /etc/issue

    Using perl one could easily read the whole file, effectively using an anonymous buffer in ram as the temporary file.

    -e

  7. 11 Eirik 2009/06/24 at 1:54 PM

    Hm,

    I probably should have used “tempfile”, this being a public post:

    tf=$(tempfile); (clear; cat /etc/issue) > $tf; mv $tf /etc/issue

    Maybe the next generation of Linux users won’t all be using insecure temporary files[1] now…

    -e

    [1]http://www.google.com/search?q=temporary+file+bug

    • 12 Kaleb Elwert 2009/07/14 at 11:07 PM

      Same issue in Gentoo.

      I love this file, though:
      /etc/bash/bash_logout

      That’s where it is in Gentoo at least. I just add “clear” to the end and it works like a charm.


  1. 1 Painting with cadubi « Motho ke motho ka botho Trackback on 2009/11/12 at 10:30 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,263 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: