터미널에 우분투 로고 한번 띄워 보려고 삽질 한참했습니다;;

Gnome-look.org 에서 활동 하시는 lyrae님의 스크린 샷인데요
샷에 보시면 터미널에 아치리눅스 로고가 뜹니다.
펄스크립트로 짠 프로그램인데, 이걸 우분투로고로 바꾸려고 어제 밤부터 삽질 좀 했습니다.
이짓 하다가 #nlug 채널에서 제 실수로 붙여넣기 잘 못 했다가 킥당하고 ㅎㅎ

[attachment=5:3iucivkd]Laza_by_thrynk.png[/attachment:3iucivkd]

[attachment=4:3iucivkd]Mire_v2_for_Linux_by_thrynk.png[/attachment:3iucivkd]

[attachment=3:3iucivkd]Wild_Sea_by_thrynk.jpg[/attachment:3iucivkd]

perl에 대해서 잘 알지도 모르기에 원본 스크립트를 찾아보려고 한참 헤메다가
결국 ubuntuforums.org에 되도 않는 영어로 글쓰고 어떤분이 우분투꺼 구해 주셔서
받아서 실행해보니
[attachment=2:3iucivkd]before.png[/attachment:3iucivkd]
이모양;;
뭔가 찌그러지고 아치의 그것보다 한참이나 모자란 듯한 모습으로 찾아왔군요ㅋ
그래서 직접 우분투로고를 가지고 ASCII코드를 만들었습니다.
물론 프로그램을 이용해서요 ㅎㅎ
[url:3iucivkd]http://www.typorganism.com/asciiomatic/[/url:3iucivkd]
요 사이트에서 만들었습니다.
일단 만들고 난 뒤 스크립트에 추가해 주고 실행해보니 색(色)이 영 구리더군요

무슨 덩~색 같았습니다.
그래서 오늘 아침부터 개교기념일이라 학교 안가고 펄컬러코드 찾아보고, (찾기가 쉽지않았어요)
이것 저것 손대고 해서 만든게
[attachment=1:3iucivkd]after.png[/attachment:3iucivkd]
요놈 입니다.

실행시키면 자동으로 샷까지 찍히게 되어있습니다. (설정 쬐끔 바꾸면. 요청하시면 howto 써드릴께요)
[attachment=0:3iucivkd]20-05-2008_screen.png[/attachment:3iucivkd]

/usr/bin에 넣어주시면 쵝오!

저장폴더는 개개인 마다 손좀 보셔야 할 겁니다.

아직 완벽하게 마음에 들지는 않네요. 아스키코드 자체가 깔끔하게 안나와서요.
데비안, 아치는 아스키코드가 참 이쁘게 나왔던데
우분투로고 아스키 코드 이쁜것 좀 없을까요?

마지막으로 다들 한번 해보세요~~ 꼭이요! ㅋㅋ

메모장이나 vi 등등 여시고
붙여넣기 하시면 되요
확장자 pl이 안올라가네요

[code:3iucivkd]
#!/usr/bin/perl
use Switch;
use strict;
use File::Basename;

####################

Config options

####################

What distro logo to use to use, Available "Archlinux Debian Ubuntu None"

my $distro = "Ubuntu";

what values to display. Use "OS Kernel DE WM win_theme Theme Font Icons"

my $display = "OS Kernel DE WM Win_theme Theme Icons Font Background";

Takes a screen shot if set to 0

my $shot = 1;

Command to run to take screen shot

my $command = "scrot -d 3";

What colors to use for the variables.

my $textcolor = "\e[0m";
#my $textcolor = "\e[1m";

Prints little debugging messages if set to 0

my $quite = 1;

########################

Script starts here

########################

Define some thing to work with strict

my @line = ();
my $found = 0;
my $DE = "NONE";
my $WM = "NONE";

Hash of WMs and the process they run

my %WMlist = ("Beryl", "beryl",
"Compiz", "compiz",
"Emerald", "emerald",
"Fluxbox", "fluxbox",
"Openbox", "openbox",
"Blackbox", "blackbox",
"Xfwm4", "xfwm4",
"Metacity", "metacity",
"Kwin", "kwin",
"FVWM", "fvwm",
"Enlightenment", "enlightenment",
"IceWM", "icewm",
"Window Maker", "wmaker",
"PekWM","pekwm" );

Hash of DEs and the process they run

my %DElist = ("Gnome", "gnome-panel",
"Xfce4", "xfce-mcs-manage",
"KDE", "ksmserver");

Get Kernel version

if ( $display =~ "Kernel"){
print "::$textcolor Finding Kernel version\n" unless $quite == 1;
my $kernel = uname -r;
$kernel =~ s/\s+/ /g;
$kernel = " Kernel:$textcolor $kernel";
push(@line, "$kernel");
}

Find running processes

print "::$textcolor Getting processes \n" unless $quite == 1;
my $processes = ps -A | awk {'print \$4'};

Find DE

while( (my $DEname, my $DEprocess) = each(%DElist) ) {
print "::$textcolor Testing $DEname process: $DEprocess \n" unless $quite == 1;
if ( $processes =~ m/$DEprocess/ ) {
$DE = $DEname;
print "::$textcolor DE found as $DE\n" unless $quite == 1;
if( $display =~ m/DE/ ) {
push(@line, " DE:$textcolor $DE");
}
last;
}
}

Find WM

while( (my $WMname, my $WMprocess) = each(%WMlist) ) {
print "::$textcolor Testing $WMname process: $WMprocess \n" unless $quite == 1;
if ( $processes =~ m/$WMprocess/ ) {
$WM = $WMname;
print "::$textcolor WM found as $WM\n" unless $quite == 1;
if( $display =~ m/WM/ ) {
push(@line, " WM:$textcolor $WM");
}
last;
}
}

Find WM theme

if ( $display =~ m/Win_theme/ ){
switch($WM) {
case "Openbox" {
print "::$textcolor Finding $WM theme\n" unless $quite == 1;
open(FILE, "$ENV{HOME}/.config/openbox/rc.xml")
|| die "\e[0;31m<Failed>\n";
while( <FILE> ) {
if( /<name>(.+)</name>/ ) {
while ( $found == 0 ) {
print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;
push(@line, " WM Theme:$textcolor $1");
$found = 1;
}
}
}
close(FILE);
}
case "Compiz" {

commented for Heliodor

print "&#58;:$textcolor Finding $WM theme\n" unless $quite == 1;

open(FILE, "$ENV{HOME}/.emerald/themes/Azurite-22px/theme.ini")

|| die "\e[0;31m<Failed>\n";

while( <FILE> ) {

if( /name=(.+)/ ) {

print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;

push(@line, " WM Theme:$textcolor $1");

}

}

close(FILE);

Get the heliodor(metacity) theme

  print &quot;\&#58;&#58;$textcolor Finding $WM theme\n&quot; unless $quite == 1;
  my $gconf = `gconftool-2 -g /apps/metacity/general/theme`;
  print &quot;\&#58;&#58;$textcolor $WM theme found as $gconf\n&quot; unless $quite == 1;
  chomp ($gconf);
  push(@line, &quot; GWD Theme&#58;$textcolor $gconf&quot;);
}
case &quot;Metacity&quot; {
  print &quot;\&#58;&#58;$textcolor Finding $WM theme\n&quot; unless $quite == 1;
  my $gconf = `gconftool-2 -g /apps/metacity/general/theme`;
  print &quot;\&#58;&#58;$textcolor $WM theme found as $gconf\n&quot; unless $quite == 1;
  chomp ($gconf);
  push(@line, &quot; WM Theme&#58;$textcolor $gconf&quot;);
}
case &quot;Fluxbox&quot; {
  print &quot;\&#58;&#58;$textcolor Finding $WM theme\n&quot; unless $quite == 1;
  open(FILE, &quot;$ENV{HOME}/&#46;fluxbox/init&quot;)
  || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
  while( &lt;FILE&gt; ) {
    if( /session&#46;styleFile&#58;&#46;*\/(&#46;+)/ ) {
      print &quot;\&#58;&#58;$textcolor $WM theme found as $1\n&quot; unless $quite == 1;
      push(@line, &quot; WM Theme&#58;$textcolor $1&quot;);
    }
  }
  close(FILE);
}
case &quot;Blackbox&quot; {
  print &quot;\&#58;&#58;$textcolor Finding $WM theme\n&quot; unless $quite == 1;
  open(FILE, &quot;$ENV{HOME}/&#46;blackboxrc&quot;)
  || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
  while( &lt;FILE&gt; ) {
    if( /session&#46;styleFile&#58;&#46;*\/(&#46;+)/ ) {
      print &quot;\&#58;&#58;$textcolor $WM theme found as $1\n&quot; unless $quite == 1;
      push(@line, &quot; WM Theme&#58;$textcolor $1&quot;);
    }
  }
  close(FILE);
}
case &quot;Xfwm4&quot; {
  print &quot;\&#58;&#58;$textcolor Finding $WM theme\n&quot; unless $quite == 1;
  open(FILE, &quot;$ENV{HOME}/&#46;config/xfce4/mcs_settings/xfwm4&#46;xml&quot;)
  || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
  while( &lt;FILE&gt; ) {
    if( /&lt;option name=&quot;Xfwm\/ThemeName&quot; type=&quot;string&quot; value=&quot;(&#46;+)&quot;\/&gt;/ ) {
      print &quot;\&#58;&#58;$textcolor $WM theme found as $1\n&quot; unless $quite == 1;
      push(@line, &quot; WM Theme&#58;$textcolor $1&quot;);
    }

}
close(FILE);
}
case "Kwin" {
print "&#58;:$textcolor Finding $WM theme\n" unless $quite == 1;
open(FILE, "$ENV{HOME}/.kde/share/config/kwinrc")
|| die "\e[0;31m<Failed>\n";
while( <FILE> ) {
if( /PluginLib=kwin3_(.+)/ ) {
print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;
push(@line, " WM Theme:$textcolor $1");
}
}
close(FILE);
}
case "Enlightenment" {
print "&#58;:$textcolor Finding $WM theme\n" unless $quite == 1;
my $remote = enlightenment_remote -theme-get theme ;
if( $remote =~ m/.FILE="(.+).edj"/ ) {
print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;
push(@line, " WM Theme:$textcolor $1");
}
}
case "IceWM" {
print "&#58;:$textcolor Finding $WM theme\n" unless $quite == 1;
open(FILE, "$ENV{HOME}/.icewm/theme")
|| die "\e[0;31m<Failed>\n";
while( <FILE> ) {
if( /Theme="(.+)/.
.theme/ ) {
while( $found == 0 ) {
print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;
push(@line, " WM Theme:$textcolor $1");
$found = 1;
}
}
}
close(FILE);
}
case "PekWM" {
print "&#58;:$textcolor Finding $WM theme\n" unless $quite == 1;
open(FILE, "$ENV{HOME}/.pekwm/config")
|| die "\e[0;31m<Failed>\n";
while( <FILE> ) {
if( /Theme./(.)"/ ) {
print "&#58;:$textcolor $WM theme found as $1\n" unless $quite == 1;
push(@line, " WM Theme:$textcolor $1");
}
}
close(FILE);
}
}
}

Find Theme Icon and Font

if ( $display =~ m/[Theme, Icons, Font, Background]/) {
switch($DE) {
case "Gnome" {
print "&#58;:$textcolor Finding $DE variables\n" unless $quite == 1;
if ( $display =~ m/Theme/ ) {
my $gconf = gconftool-2 -g /desktop/gnome/interface/gtk_theme;
chomp ($gconf);
print "&#58;:$textcolor GTK Theme found as $1\n" unless $quite == 1;
push(@line, " GTK Theme:$textcolor $gconf");
}
if ( $display =~ m/Icons/ ) {
my $gconf = gconftool-2 -g /desktop/gnome/interface/icon_theme;
chomp ($gconf);
push(@line, " Icons:$textcolor $gconf");
}
if ( $display =~ m/Font/ ) {
my $gconf = gconftool-2 -g /desktop/gnome/interface/font_name;
chomp ($gconf);
push(@line, " Font:$textcolor $gconf");
}
if ( $display =~ m/Background/ ) {
my $gconf = gconftool-2 -g /desktop/gnome/background/picture_filename;
chomp ($gconf);
my $bname = basename($gconf);
push(@line, " Background:$textcolor $bname");
}

} 
case &quot;Xfce4&quot; {
  my @sort = ();
  print &quot;\&#58;&#58;$textcolor Finding $DE variables\n&quot; unless $quite == 1;
  open(FILE, &quot;$ENV{HOME}/&#46;config/xfce4/mcs_settings/gtk&#46;xml&quot;)
  || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
  while( &lt;FILE&gt; ) {
 if ( $display =~ m/Theme/ ) {
      if (/&lt;option name=&quot;Net\/ThemeName&quot; type=&quot;string&quot; value=&quot;(&#46;+)&quot;\/&gt;/ ) {
        print &quot;\&#58;&#58;$textcolor GTK Theme found as $1\n&quot; unless $quite == 1;
        unshift(@sort, &quot; GTK Theme&#58;$textcolor $1&quot;);
      } 
    }
    if ( $display =~ m/Icons/ ) {
      if (/&lt;option name=&quot;Net\/IconThemeName&quot; type=&quot;string&quot; value=&quot;(&#46;+)&quot;\/&gt;/ ) {
        print &quot;\&#58;&#58;$textcolor Icons found as $1\n&quot; unless $quite == 1;
        unshift(@sort, &quot; Icons&#58;$textcolor $1&quot;);
      }
    }
    if ( $display =~ m/Font/ ) {
      if ( /&lt;option name=&quot;Gtk\/FontName&quot; type=&quot;string&quot; value=&quot;(&#46;+)&quot;\/&gt;/ ) {
        print &quot;\&#58;&#58;$textcolor Font found as $1\n&quot; unless $quite == 1;
        unshift(@sort, &quot; Font&#58;$textcolor $1&quot;);
      } 
    }
  }
  close(FILE);
  ## Sort variables so they're ordered &quot;Theme Icon Font&quot; ##
  foreach my $i (@sort) {
    push(@line, &quot;$i&quot;);
  }
} 
case &quot;KDE&quot; { 
  print &quot;\&#58;&#58;$textcolor Finding $DE variables\n&quot; unless $quite == 1;
  open(FILE, &quot;$ENV{HOME}/&#46;kde/share/config/kdeglobals&quot;)
  || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
  while( &lt;FILE&gt; ) { 
    if ( $display =~ m/Theme/ ) {
      if ( /widgetStyle=(&#46;+)/  ) {
        print &quot;\&#58;&#58;$textcolor Wiget Style found as $1\n&quot; unless $quite == 1;
        push(@line, &quot; Wiget Style&#58;$textcolor $1&quot;);
      }
      if (/colorScheme=(&#46;+)&#46;kcsrc/ ) {
        print &quot;\&#58;&#58;$textcolor Color Scheme found as $1\n&quot; unless $quite == 1;
        push(@line, &quot; Color Scheme&#58;$textcolor $1&quot;);
      }
    }
    if ( $display =~ m/Icons/ ) {
      if ( /Theme=(&#46;+)/ ) {
        print &quot;\&#58;&#58;$textcolor Icons found as $1\n&quot; unless $quite == 1;
        push(@line, &quot; Icons&#58;$textcolor $1&quot;);
      } 
    }   
    if ( $display =~ m/Font/ ) {
      if ( /font=(&#46;+)/ ) {
        my $font = (split/,/, $1)&#91;0&#93;;
        print &quot;\&#58;&#58;$textcolor Font found as $font\n&quot; unless $quite == 1;
        push(@line, &quot; Font&#58;$textcolor $font&quot;);
      }
    }
  }
  close(FILE);

}
else {
  my @files = (&quot;$ENV{HOME}/&#46;gtkrc-2&#46;0&quot;, &quot;$ENV{HOME}/&#46;gtkrc&#46;mine&quot;,);
  foreach my $file (@files) {
    if ( -e $file ) {
      print &quot;\&#58;&#58;$textcolor Opening $file\n&quot; unless $quite == 1; 
      open(FILE, $file)
      || die &quot;\e&#91;0;31m&lt;Failed&gt;\n&quot;;
      while( &lt;FILE&gt; ) {
        if ( $display =~ m/Theme/ ) {
          if( /include &quot;&#46;*themes\/(&#46;+)\/gtk-(1|2)\&#46;0\/gtkrc&quot;/ ){
            print &quot;\&#58;&#58;$textcolor GTK theme found as $1\n&quot; unless $quite == 1;
            push(@line, &quot; GTK Theme&#58;$textcolor $1&quot;);
          }
        }
        if ( $display =~ m/Icons/ ) {
          if( /&#46;*gtk-icon-theme-name&#46;*&quot;(&#46;+)&quot;/ ) {
            print &quot;\&#58;&#58;$textcolor Icons found as $1\n&quot; unless $quite == 1;
            push(@line, &quot; Icons&#58;$textcolor $1&quot;);
          }
        }
        if ( $display =~ m/Font/ ) {
          if( /&#46;*gtk-font-name&#46;*&quot;(&#46;+)&quot;/ ) {
            print &quot;\&#58;&#58;$textcolor Font found as $1\n&quot; unless $quite == 1;
            push(@line, &quot; Font&#58;$textcolor $1&quot;);
         }
        }
      }
      close(FILE);
    }
  }
}

}
}

Display the system info

if ( $distro =~ m/Archlinux/ ) {

Get Archlinux version

if ( $display =~ "OS"){
print "&#58;:$textcolor Finding Archlinux version\n" unless $quite == 1;
my $version = cat /etc/arch-release;
$version =~ s/\s+/ /g;
$version = " OS:$textcolor $version";
unshift(@line, "$version");
}

my $c1 = "\e[0;32m";
my $c2 = "\e[1;32m";

print "$c1 __
$c1 =(SDGJT=
$c1 GTDJHGGFCVS) $c1@line[0]
$c1 ,GTDJGGDTDFBGX0 $c1@line[1]
$c1 JDJDIJHRORVFSBSVL$c2-=+=,
$c1@line[2]
$c1 IJFDUFHJNXIXCDXDSV,$c2 &quot;DEBL $c1@line[3]
$c1 [LKDSDJTDU=OUSCSBFLD.$c2 ‘?ZWX, $c1@line[4]
$c1 ,LMDSDSWH’ `DCBOSI$c2 DRDS], $c1@line[5]
$c1 SDDFDFH’ !YEWD,$c2 )HDROD $c1@line[6]
$c1 !KMDOCG &GSU|$c2_GFHRGO’ $c1@line[7]
$c1 HKLSGP’$c2 __$c1\TKM0$c2\GHRBV)’ $c1@line[8]
$c1 JSNRVW’$c2 __+MNAEC$c1\IOI,$c2\BN’
$c1 HELK[‘$c2 __,=OFFXCBGHC$c1\FD)
$c1 ?KGHE $c2_-#DASDFLSV=’$c1 'EF
$c1 ‘EHTI !H
$c1 `0F’ '!
\e[0m";
}

if ( $distro =~ m/None/ ) {
my $color = "\e[0;34m";
foreach my $filled ( @line ) {
print "$color $filled\n"
}
}

if ( $distro =~ m/Debian/ ) {

Get Debian version

if ( $display =~ "OS"){
print "&#58;:$textcolor Finding Debian version\n" unless $quite == 1;
my $version = cat /etc/Debian_release;
$version =~ s/\s+/ /g;
$version = " OS:$textcolor $version";
unshift(@line, "$version");
}

my $c1 = "\e[0;31m";

print "
$c1 ,met$$$$$gg.
$c1 ,g$$$$$$$$$$$$$$$P.
$c1 ,g$$P&quot;&quot; &quot;&quot;&quot;Y$$.&quot;. @line[0]
$c1 ,$$P’ `$$$. @line[1]
$c1’,$$P ,ggs. `$$b: @line[2]
$c1`d$$’ ,$P&quot;’ . $$$ @line[3]
$c1 $$P d$’ , $$P @line[4]
$c1 $$: $$. - ,d$$’ @line[5]
$c1 $$; Y$b.
,d$P’ @line[6]
$c1 Y$$. `.`&quot;Y$$$$P&quot;’ @line[7]
$c1 `$$b &quot;-.
_ @line[8]
$c1 `Y$$
$c1 `Y$$.
$c1 `$$b.
$c1 `Y$$b.
$c1 `&quot;Y$b._
$c1 `&quot;&quot;&quot;&quot;
\e[0m";
}

if ( $distro =~ m/Ubuntu/ ) {

Get Ubuntu version

if ( $display =~ "OS"){
print "&#58;:$textcolor Finding Ubuntu version\n" unless $quite == 1;
my $version = head -3 /etc/lsb-release |cut -d&quot;=&quot; -f2;
$version =~ s/\s+/ /g;
$version = " OS:$textcolor $version";
unshift(@line, "$version");
}

#my $c1 = "\e[0;31m";
#my $c2 = "\e[0;33m";
#my $c3 = "\e[0;35m";

#print "

$c1.-.

$c3.-'``$c1( ) @line[0]

$c2, $c3 $c1-'$c3.$c1 @line[1]

$c2/ $c3’``-. `$c1 @line[2]

$c3.-. $c2, $c3`___:$c1 @line[3]

$c3( )$c2: $c1 ___ @line[4]

$c3-' $c2 $c1, : @line[5]

$c2 $c1..-` , @line[6]

$c2&#46;/ $c1 $c2&#46;-&#46;$c1 @line[7]

$c1`-..-$c2( )$c1 @line[8]

$c2`-’

#\e[0m";
#}
my $c1 = "\e[1;31m";
my $c2 = "\e[1;33m";
my $c3 = "\e[0;33m";
my $c4 = "\e[1;37m";

print "
$c1......
$c1.‘zzzzzzz.
$c3..............$c1.zzzzzzzzz.
$c3.eeeeeeeeeeeeee.$c1.zzzzzzzzz.
$c2........$c3 ‘eeeeeeeeeeeee’$c1-zzzzzzz’.
$c2.‘hhhhhh’..$c3.eeeeeeeeeeeeeeeeeeeee’..
$c2..hhhhhhhh. $c3..eeeeeeeeeeeeeeeeeeeeee..
$c2..hhhhhhhhhh. $c3............‘eeeeeeeeee’.
$c3 ......$c2 .hhhhhhhhhh.. $c3..‘eeeeeeeee. $c4@line[1]
$c3..eeeeeee’$c2 ‘hhhhhhh’.. $c3..eeeeeeeee $c4@line[2]
$c3.eeeeeeeee.$c2 ‘hhhhh’. $c3..‘’‘’‘’‘.. $c4@line[3]
$c3.eeeeeeeee.$c2 ‘hhhhh’. $c1.‘zzzzzzzz. $c4@line[4]
$c3..eeeeeee(’$c2 ‘hhhhhh’.. $c1..zzzzzzzzz $c4@line[5]
$c3 .......$c2 -hhhhhhhhh’. $c1..zzzzzzzzz. $c4@line[6]
$c2.hhhhhhhhhh. $c1...........zzzzzzzzzz. $c4@line[7]
$c2..hhhhhhhh. $c1..zzzzzzzzzzzzzzzzzzzzz.. $c4@line[8]
$c2..‘hhhhh..$c1..zzzzzzzzzzzzzh’‘’‘’‘’..
$c2.......$c1.hzzzzzzzzzzzz.$c2.‘hhhhhhh..
$c1.+zzzzzzzzzzzz.$c2.hhhhhhhhh.
$c1............ $c2.hhhhhhhhh.
$c2.-hhhhhh’.
$c2.......

\e[0m";
}

#return 0;

Run screen shot graper

$command unless $shot != 0;
[/code:3iucivkd]

와우 멋있군요. 곧 새로 컴퓨터를 살 예정이라 그 때 시도해봐야겠습니다~

요즘 리눅스를 못 써서…

테마 머 쓰시나욤?? 깔끔하니 보기 좋은데욤…^^
글고 바탕화면 멋집니다 ^^;