Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Personalizzare il messaggio di login
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
Mistobaan
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 76

PostPosted: Mon Jan 31, 2005 5:00 pm    Post subject: [TIP] Personalizzare il messaggio di login Reply with quote

Avete presente il messaggio che vi compare quando switchate su di una console con CTRL+F[1-*] ?
Bene potete abbellirla nei seguenti modi:
o con
Code:
 emerge linux-logo

o editando il file di testo
Code:
/etc/issue

e' un semplice file ascii, quelle che viene stampato al login e' uguale a quello che viene stampato con
Code:
 cat /etc/issue

tranne che per alcuni caratteri speciali, a cui vengono sostituite le seguenti
info
Code:

\b Baudrate del terminale
\d Data attuale
\s Nome del sistema (sistema operativo)
\l Nome del tty
\m Architettura del sistema (p.e. i486)
\n Hostname della macchina
\o Domainname della macchina
\r Nr.-Release del sistema operativo
\t ora attuale
\u Nr. utenti loggati
\U Nr. utenti loggati e la parola User(s)
\v Versione del sistema operativo (Build-Date)


Ok e fino a qui tutto tranquillo..
la dritta sta nello scaricare il programma
http://www.jave.de/
in particolare il file
http://www.jave.de/jave5.zip
e la libreria di font:
http://www.jave.de/figlet/figletfonts36.zip
dovete avere java per poterlo eseguire.
estraete tutti i file in una directory es
Code:
 #unzip jave5.zip -d /opt/jave

Code:
 #unzip figletfonts36.zip -d /opt/jave

con questo tool potete fare creare di tutto e poi convertirlo in formato ASCII.

Colorare il tutto:
per poter colorare il file usato dovete fare
Code:

{CTRL+V CTRL+ESC} 44;0;0;32m <TESTO DA COLORARE> {CTRL+V CTRL+ESC}m

dove {CTRL+V CTRL+ESC} serve a stampare il carattere speciale ^[.
a posto i colori si cambiano modificando i valori fra i punti e virgola,
il secondo indica il colore di background ( 0 = nero )
l'ultimo indica il colore di foreground (0;32 = Light green )
una lista di colori li ho trovati qui, usando solo l'ultimo valore..
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
il testo viene stampato con l'ultimo colore impostato.
Se avete impostato per esempio rosso, tutto il testo sara' rosso fin quando non viene selezionato un altro.

provate a mettere questo codice dentro a /etc/issue per vedere cosa fa
(sostituite a ^[ con {CTRL+V CTRL+ESC}
Code:

^[[44;0;32m


                                     _|
       _|_|_|    _|_|    _|_|_|    _|_|_|_|    _|_|      _|_|
     _|    _|  _|_|_|_|  _|    _|    _|      _|    _|  _|    _|
     _|    _|  _|        _|    _|    _|      _|    _|  _|    _|
       _|_|_|    _|_|_|  _|    _|      _|_|    _|_|      _|_|
           _|
       _|_|
^[m
^[[44;0;37m   \n.\O (\s \m \r)
   Spawned at: \t
^[


Ultimissima cosa.
quando fate logout dalla console il file vi viene stampato a meta' schermo..
cosa molto brutta...
usate questo comando per risolvere :
Code:


#> echo "clear" >> ~/.bash_logout



Io non ho molto tempo ne sono molto bravo come artista..
ma molti di voi lo sono... create qualcosa di carino e postatelo.. magari
lo mettono di default nella distro :)

EDIT: aggiunto tip di FMulder e un rif al linux-logo, mod titolo[/code]
_________________
God is real until declared integer


Last edited by Mistobaan on Tue Feb 01, 2005 11:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Guglie
Apprentice
Apprentice


Joined: 01 Mar 2004
Posts: 240
Location: switzerland - zürich

PostPosted: Mon Jan 31, 2005 5:56 pm    Post subject: Reply with quote

forse è un po' OT, ma segnalo questo sito carino che converte testo in vari fonts in stile ascii
_________________
A! Elbereth Gilthoniel! silivren penna míriel o menel aglar elenath!
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Jan 31, 2005 6:27 pm    Post subject: Reply with quote

Aggiunto ai "Post utilissimi" sezione Tips.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
mouser
Veteran
Veteran


Joined: 10 Aug 2004
Posts: 1419
Location: Milano

PostPosted: Mon Jan 31, 2005 7:01 pm    Post subject: Reply with quote

@gutter: Una sola domanda: e' il caso di cambiare il titolo del tip, non so, tipo "Abbellire il messaggio di login con Java"??? Mi e' venuta in mente questa cosa perche', alla fine, il suddetto messaggio di login e' abbellibile (<- e' italiano?? :lol: ) anche usando semplicemente la bash!
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Jan 31, 2005 7:10 pm    Post subject: Reply with quote

"abbellibile" non l'ho trovato sul De Mauro :wink:

Se l'autore del post cambia il titolo in questo modo lo faccio anche io ;)
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
mouser
Veteran
Veteran


Joined: 10 Aug 2004
Posts: 1419
Location: Milano

PostPosted: Mon Jan 31, 2005 7:11 pm    Post subject: Reply with quote

gutter wrote:
"abbellibile" non l'ho trovato sul De Mauro :wink:

Se l'autore del post cambia il titolo in questo modo lo faccio anche io ;)

ok, ricevuto. :D

Ciriciao
mouser :wink:
Back to top
View user's profile Send private message
FMulder
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2004
Posts: 83
Location: Cagliari, Italy

PostPosted: Mon Jan 31, 2005 8:53 pm    Post subject: Reply with quote

Ciao sto provando a usare un po' di ascii art però ho un problema

se faccio cat /etc/issue vedo tutto benissimo..
se invece faccio il logout in modo da vedere il messaggio in funzione tutti i caratteri non rispettano le giuste spaziature! Questo accade solo con alcuni tipi di carattere.. ad esempio quello con la scritta gentoo che è stato scritto qui funziona bene

UPDATE: Scoperto l'arcano 1 minuto dopo ke ho postato ;-) Il problema è che nel messaggio ci sono delle \ che quindi vengono visualizzate
_________________
Chi rinuncia ai sogni, è destinato a morire
--> Jim Morrison
Back to top
View user's profile Send private message
=DvD=
Veteran
Veteran


Joined: 25 Mar 2004
Posts: 1353

PostPosted: Mon Jan 31, 2005 10:24 pm    Post subject: Reply with quote

segnalo emerge gentoo-logo ( o logo-gentoo ora non mi ricordo e non ho il fedele pinguino sottomano)
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Jan 31, 2005 10:28 pm    Post subject: Reply with quote

Forse intendevi:

Code:
* app-misc/linux-logo
     Available versions:  4.07  4.07-r1  4.09 
     Installed:           no
     Homepage:            http://www.deater.net/weave/vmwprod/linux_logo/
     Description:         A utility that displays an ANSI/ASCII logo and some system information

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
FMulder
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2004
Posts: 83
Location: Cagliari, Italy

PostPosted: Mon Jan 31, 2005 11:18 pm    Post subject: Reply with quote

Quote:
Colorare il tutto:
per poter colorare il file usato dovete fare
{CTRL+V CTRL+ESC} 44;0;32m <TESTO DA COLORARE> {CTRL+V CTRL+ESC}m
dove {CTRL+V CTRL+ESC} serve a stampare il carattere speciale ^[.
a posto i colori si cambiano modificando i valori fra i punti e virgola,
il secondo indica il colore di background ( 0 = nero )
l'ultimo indica il colore di foreground (32 = Light green )
una lista di colori li ho trovati qui, usando solo l'ultimo valore..
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
il testo viene stampato con l'ultimo colore impostato.
Se avete impostato per esempio rosso, tutto il testo sara' rosso fin quando non viene selezionato un altro.


Ho scoperto che utilizzando la sintassi esatta è possibile visualizzare tutta la lista di colori indicati in quel sito:

Code:

{CTRL+V CTRL+ESC} 44;0;0;32m <TESTO DA COLORARE> {CTRL+V CTRL+ESC}m


cambiando la parte finale del codice colore (0;32 per intenderci) si può utilizzare tutta quella tabella...

ciao!
_________________
Chi rinuncia ai sogni, è destinato a morire
--> Jim Morrison
Back to top
View user's profile Send private message
FMulder
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2004
Posts: 83
Location: Cagliari, Italy

PostPosted: Mon Jan 31, 2005 11:31 pm    Post subject: Reply with quote

questo è il mio nuovo /etc/issue!
Potete vedere uno screen shot qui ;-)
_________________
Chi rinuncia ai sogni, è destinato a morire
--> Jim Morrison


Last edited by FMulder on Tue Feb 01, 2005 4:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Tue Feb 01, 2005 12:30 am    Post subject: Reply with quote

FMulder wrote:
questo è il mio nuovo /etc/issue:
...
ma credo vi convenga scaricarlo qui dopo averlo visto qui ;-)


Visto che é abbastanza illeggibile io cancellerei anche la parte messa nel code lasciando i link :roll:

Simpatico, comunque ;-)
_________________
Ciao da me!
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Tue Feb 01, 2005 9:51 am    Post subject: Reply with quote

Ottimo TIP :)
Questo e' il mio:
Code:

                                    Welcome To
^[[44;0;34m
            _|                    _|                    _|
        _|_|_|    _|_|_|  _|  _|  _|  _|      _|_|_|  _|_|_|_|    _|_|_|  _|  _|
      _|    _|  _|    _|  _|_|    _|_|      _|_|        _|      _|    _|  _|_|
      _|    _|  _|    _|  _|      _|  _|        _|_|    _|      _|    _|  _|
        _|_|_|    _|_|_|  _|      _|    _|  _|_|_|        _|_|    _|_|_|  _|
^[[m

This is \n.\O | Current Date \d at \t | \U logged in
`------------------ Gentoo \s \r on a \m CPU ------------------'


Che risulta piu' o meno....
Code:

                                    Welcome To

            _|                    _|                    _|
        _|_|_|    _|_|_|  _|  _|  _|  _|      _|_|_|  _|_|_|_|    _|_|_|  _|  _|
      _|    _|  _|    _|  _|_|    _|_|      _|_|        _|      _|    _|  _|_|
      _|    _|  _|    _|  _|      _|  _|        _|_|    _|      _|    _|  _|
        _|_|_|    _|_|_|  _|      _|    _|  _|_|_|        _|_|    _|_|_|  _|

This is darkstar.home | Current Date Tue Feb 1  2005 at 10:44:15 | 3 users logged in
`------------------ Gentoo Linux 2.6.10-gentoo-r6 on a x86_64 CPU ------------------'


Con la scritta DARKSTAR in blue scuro!

Cya
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
Mistobaan
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 76

PostPosted: Tue Feb 01, 2005 11:28 am    Post subject: Reply with quote

Ho aggiunto i tip che sono saltati fuori :)
penso che il titolo non ha a che fare con il programmino java..
quella e' solo un tool per il vero scopo.

8)
_________________
God is real until declared integer
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue Feb 01, 2005 11:43 am    Post subject: Reply with quote

Allora se per tutti va bene lasciamo il vecchio titolo anche nei post utilissimi.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Tue Feb 01, 2005 11:55 am    Post subject: Reply with quote

io farei un s/Abbellire/Personalizzare

<EDIT> 0_0 quanti secondi fa e' stato cambiato? :lol: :lol:
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
mouser
Veteran
Veteran


Joined: 10 Aug 2004
Posts: 1419
Location: Milano

PostPosted: Tue Feb 01, 2005 12:06 pm    Post subject: Reply with quote

gutter wrote:

Allora se per tutti va bene lasciamo il vecchio titolo anche nei post utilissimi.

okkey :D

mouser :wink:
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue Feb 01, 2005 12:07 pm    Post subject: Reply with quote

lavish wrote:

<EDIT> 0_0 quanti secondi fa e' stato cambiato? :lol: :lol:


Una decina di minuti ;)
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2489
Location: イタリアのロディで

PostPosted: Mon Oct 31, 2005 8:14 pm    Post subject: Reply with quote

Sorry, ma non dovrebbe essere
Code:
{ALT+V ALT+ESC}

al posto di
Code:
{CTRL+V CTRL+ESC}


O almeno così funziona a me.
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Nov 06, 2005 6:29 pm    Post subject: Reply with quote

Ho creato un logo con jave. Il file è reso correttamente con un semplice cat, ma appare storpiato al login o dopo un exit.

Da cosa può dipendere il fenomeno?
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Nov 06, 2005 11:11 pm    Post subject: Reply with quote

cloc3 wrote:

Il file è reso correttamente con un semplice cat, ma appare storpiato al login o dopo un exit.

La cosa è proprio strana. Dipende dai numerosi backslash che avevo inserito nel testo.
Dopo un exit, vengono considerati come metacaratteri, ed omessi, rendendo illeggibile il logo.

Il fatto è che, se si esegue una login sbagliata, il logo viene eseguito tramite un normale cat, e in questo caso appare correttamente.
A questo punto l'imbarazzo è inevitabile. Si potrebbe infatti aggirare il problema con:
Code:

s939 ~ # sed -i -e s/[\\]/"\\""\\""\\""\\"/g /etc/issue

Ma in questo modo, il logo apparirà correttamente dopo un exit ma illegibile dopo una login sbagliata.

Soluzione? Io non voglio sostituire i backslash!
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Mon Nov 07, 2005 5:58 pm    Post subject: Reply with quote

cloc3 wrote:

La cosa è proprio strana.

up.

Il comportamento diverso prima del login o dopo un login fallito è probabilmente un baco di script di gentoo.

Qualcuno lo saprebbe indicare, in modo da segnalare il baco?
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2489
Location: イタリアのロディで

PostPosted: Wed Nov 09, 2005 10:42 pm    Post subject: Reply with quote

Si può fare in modo che compaia anche in avvio di konsole?
Mi piace troppo, ma usando qingy non ho molte occasioni di vederlo.

Grazie.


Last edited by bandreabis on Thu Nov 10, 2005 12:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
GuN_jAcK
l33t
l33t


Joined: 23 Mar 2005
Posts: 832
Location: Prague, Czech Republic

PostPosted: Thu Nov 10, 2005 12:26 pm    Post subject: Reply with quote

lol carino come tip :D
_________________
Rispondi in maniera intelligente anche a chi ti tratta stupidamente.
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Thu Nov 10, 2005 4:49 pm    Post subject: Reply with quote

bandreabis wrote:
Si può fare in modo che compaia anche in avvio di konsole?
Mi piace troppo, ma usando qingy non ho molte occasioni di vederlo.

Grazie.

Basta inserire un `cat /etc/issue` in una riga del tuo .bashrc. Non usare backslash, altrimenti ti succede il problema che ho segnalato sopra.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum