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. 😀
or you can put clear in ~/.bash_logout or ~/.zlogout
Those of us running Arch can use this little masterpiece: http://bbs.archlinux.org/viewtopic.php?pid=386429#p386429
Interesting. Not exactly my style, but I could see adjusting it to suit me. 😉
… and here I thought your title was a clever reference to your need to clear up some issues in your real life. 😉
Ah, that was supposed to be my own little joke. So much for being clever.
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.
If you do, please leave a link. I’d be interested in seeing what you come up with.
Nice! You could also use img2txt, which I think comes with libcaca, to customize /etc/issue.
I hadn’t thought of that, but yes, that would be cool too.
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
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
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.
Pingback: Painting with cadubi « Motho ke motho ka botho