You are not logged in.
NOTE: If you have no idea what "/dev/vc/1" or "text console" or "tty" means, know that these don't interest you and/or you don't find these interesting, or you boot to runlevel 5, this isn't for you.
NOTE 2: This has a known bug - if your screen is 80 columns wide and your hostname is over 11 chars long, due to the layout of this file it will wrap to the 2nd line.
Some time ago, I learned how agetty (the program that displays /etc/issue and manages login) is able to display certain types of "non-static" information by way of specific "escape sequences" that were agetty's own. Fast forward to now, when X has completely died (majorly buggy graphics configuration), I'm entirely in textmode (framebuffer - I just won't go there, too much work)... and so I decide to make a new /etc/issue for myself.
First I worked on the logo, which after a few attempts I decided to just accept how slashes "fall" because trying anything else just turns out like a Christmas tree, then with the inside of the logo done using full stops I had a crack at the font. I drew the "linux" first then figured out how to use pipe chars to "simulate" 'bold fonts' for the "arch", and I also tried to capture the essence of the fact that the font/logo is gradiented to an extent. The next day, a little mental visualization work later and I'd figured out how to lay out the various bits of info I wanted.
This is the result.
echo -e '\e[H\e[2J' > issue
echo -e ' \e[1;30m| \e[34m\\s \\r' >> issue
echo -e ' \e[36;1m/\\\\ \e[37m|| \e[36m| | \e[30m|' >> issue
echo -e ' \e[36m/ \\\\ \e[37m|| \e[36m| _ \e[30m| \e[32m\\t' >> issue
echo -e ' \e[1;36m/ \e[0;36m.. \e[1m\\\\ \e[37m//==\\\\\\\\ ||/= /==\\\\ ||/=\\\\ \e[36m| | |/ \\\\ | | \\\\ / \e[30m| \e[32m\\d' >> issue
echo -e ' \e[0;36m/ . . \\\\ \e[37m|| || || | || || \e[36m| | | | | | X \e[1;30m|' >> issue
echo -e ' \e[0;36m/ . . \\\\ \e[37m\\\\\\\\==/| || \\\\==/ || || \e[36m| | | | \\\\_/| / \\\\ \e[1;30m| \e[31m\\U' >> issue
echo -e ' \e[0;36m/ .. .. \\\\ \e[0;37mA simple, lightweight linux distribution. \e[1;30m|' >> issue
echo -e ' \e[0;36m/_\x27 `_\\\\ \e[1;30m| \e[35m\\l \e[0mon \e[1;33m\\n' >> issue
echo -e ' \e[0m' >> issue
echo -e '' >> issue
"Ew, what do I do with THAT? "
Save it to a file or just paste it directly into your terminal. It will create the file "issue" in the directory you're in containing the appropriate escape codes.
Here's an example of how you could "import" this:
$ cat > makeissue
<carefully paste code here, press CTRL+D when done>
$ chmod +x makeissue
$ su
Password: ******************************
# cd /etc
# mv issue issue-old
# ~/makeissue
# exit
exit
$
There are no dangers in running this as root - it just echos some escape sequences to a file, so you can see we run this script as root so the new "issue" file is placed appropriately in /etc, with root ownership, exactly as the original /etc/issue... and as always, we save the old version
"Great, but `cat /etc/issue' produces something that looks like a birds' nest had a fight with a tree."
Agetty pays special attention to backslashes (\), so they have to be doubled (\\) when I want to show one. And yes, this breaks the layout when anything except agetty displays it.
"Um, I'm really clueless. Now what?"
Logout, examine, then log back in or switch to a free un-logged-in tty.
-dav7
Last edited by dav7 (2008-06-26 08:17:47)
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
Not bad, I guess. I just use "clear > /etc/issue", but I can see how something like what you've done might work for some users.
Offline
Well, true... but then again, even if I hated color and/or ASCII art I'd at least list the tty name in it since I have 12 text logins
(No X, remember?)
-dav7
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
I have 12 text logins
Why not just one or two with screen?
Offline
dav7 wrote:I have 12 text logins
Why not just one or two with screen?
CTRL+A, CTRL+N is more keystrokes than ALT+Fx
Us Linux people are lazy remember... That's why we have mv instead of move, cp instead of copy, and Linux instead of Windows
It's all about saving keystrokes!!
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Love it - using it as my /etc/issue now
Offline
Great! I don't often switch to a TTY - only if X is behaving weirdly or if I need to run a shellscript that absolutely cannot crash or something, but now I have something wonderful to look at when I do.
Well done.
Offline
Could anybody post a screenshot? I'm interested in how it looks.
Offline
Could anybody post a screenshot? I'm interested in how it looks.
Then do the right thing and -try- it ?
Offline
Beautiful. Thank you.
Offline
Ankka wrote:dav7 wrote:I have 12 text logins
Why not just one or two with screen?
CTRL+A, CTRL+N is more keystrokes than ALT+Fx
Us Linux people are lazy remember... That's why we have mv instead of move, cp instead of copy, and Linux instead of Windows
It's all about saving keystrokes!!
off topic here, but if you wanna be picky about it, you can set a single keystroke to screen windows f1-10 go to screens 0-9 for me
I plan on testing this out on my laptop as soon as i get a chance.
Last edited by rson451 (2008-06-27 03:23:13)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Everybody:
Wow, thanks for the response!
Regarding screen... yeah. I don't really want to venture over there yet. Plus, using screen wrecks my prompt (see the photo below, I use one of the chars from the box drawing charset). =P
wuischke:
Request granted, I took a photo of my 19" CRT showing both my login banner and "normal user" / "superuser" prompt (but I forgot to change to the superuser dir which I also customized, but whatever):
I also tried taking a shot without flash, but the result is that there are too many reflections and the display's contents are also not as dark, which I think suits a shot like this. Plus, the reflection of the flash isn't preventing you from seeing anything
Note: It really was 1:37PM when I took the shot
Note 2: I use the Cyr_a8x8 font which you can grab by running
setfont Cyr_a8x8
from any console.
-dav7
Last edited by dav7 (2008-06-27 04:24:47)
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
Well CLI-only is cool and all, but LINES x COLUMNS is terribly limited. I don't know how you (dav7) overcome this issue. Using framebuffers -somewhat- fixes this problem, but then the problem of slow output appears.
As for the screen thing, think of split screens, and what not other features which you would not get with pure terminals.
Personally, as far as my software development laptop goes, I found that terminals give me too low "lines / columns" values; framebuffers are too slow. So I ended up using minimalistic window managers + x terminal emulators -> win.
</threadhijacking>
Last edited by sniffles (2008-06-27 06:24:22)
Offline
off topic here, but if you wanna be picky about it, you can set a single keystroke to screen windows f1-10 go to screens 0-9 for me
Really? Teach me?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thank you for the screenshot.
@sniffles: I accept the do-it-yourself philosophy, but I believe that it is preferrable to provide such information once in order to save many people the time to test it themselves.
Offline
Really? Teach me?
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
very nice looking man, thanks a ton. they should include this by default with arch, makes thing looks even a hell of a lot nicer
bladdo / mil / Miles
userbound.com - blog and projects
Offline
My current /etc/issue looks like:
Sorry for poor image quality.
Not as fancy as the above but may appeal to some. Would probably look better on your machine if you were to edit the colour scheme - my whole computer is quite orange-ey themed.
Here it is:
^[[H^[[2J
^[[1;33m
^[[1;33m +
^[[1;33m A
^[[1;33m RCH ^[[0;33m Arch Linux \r
^[[1;33m ARCHA ^[[0;33m Time is \t
^[[1;33m RCHARC ^[[0;33m \l @ \n
^[[1;33m ; HARCH; ^[[0;33m
^[[1;33m +AR.CHARC ^[[0;33m
^[[1;33m +HARCHARCHA ^[[0;33m
^[[1;33m RCHARC^[[0;33m\HARCH^[[1;33m\AR; ^[[0;33m
^[[1;33m CHA^[[0;33m\RCHARCHARCHA^[[1;33m+ ^[[0;33m
^[[1;33m R^[[0;33m\CHARCH ARCHARC ^[[0;33m
^[[0;33m .HARCHA; ;RCH;`\".
^[[0;33m .ARCHARC; ;HARCH.
^[[0;33m ARCHARCHA. .RCHARCHA`
^[[0;33m RCHARC' 'HARCHA
^[[0;33m ;RCHA RCHA;
^[[0;33m RC' 'HA
^[[0;33m R' `C
^[[0;33m' `
^[[0m
Last edited by bavardage (2008-06-28 12:20:00)
blog - github - facebook - google profile
Offline
@dav7
Great work! I've started using it
@bavardage
This one is great also thanks for sharing it
Offline
dav7 and bavardage, good work guys.
i am using dav7's issue now, looks awesome.
Offline
Hi!
I'm messing around with /etc/issue, but can't make it display colours. I tried both this:
\e[1;31m\]archlinux\[m\]
and this:
^[[1;31m archlinux
but upon login it still prints all of it, bar the first slash.
Any ideas? I tried various terms on Google and here on the forums, like "/etc/issue", "agetty" "customize", "colour" and so on to no avail...
Thanks for any help!
Credit to KiwiesRuleXD @ DeviantArt for the avatar.
Offline
thanks, this is awesome!
Offline
I'm messing around with /etc/issue, but can't make it display colours. I tried both this:
I have a feeling that you're typing '^[' by hand. It's not those two characters, it's a special non-printing character. You can get it by doing ctrl+V, ctrl+[
[git] | [AURpkgs] | [arch-games]
Offline
i just wanted to say to people that are posting snapshots... "fbgrab" (communitiy) can take a screenshot png of the framebufferd tty.
and fot the original issue file, it looks great thanks!!
Last edited by adamruss (2008-08-19 21:22:52)
Offline
Looks great
Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.
Offline