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. 😀


13 thoughts on “clear >> /etc/issue

  1. CorkyAgain

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

  2. Colin Jones

    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.

  3. ShiftPlusOne

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

  4. Eirik


    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.


  5. Eirik


    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…



    1. Kaleb Elwert

      Same issue in Gentoo.

      I love this file, though:

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

  6. Pingback: Painting with cadubi « Motho ke motho ka botho

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s