Tải bản đầy đủ - 0 (trang)
Hack 51. Change the Ubuntu Splash Screen

Hack 51. Change the Ubuntu Splash Screen

Tải bản đầy đủ - 0trang

2

4

8

13



"OK"textcolor

Progressbarbackgroundcolor

Descriptiontextcolor

"Failed"textcolor



Makeadirectorytoworkin,copyyourPNGin,andrenameitto

somethinglikeusplash-mine.png:

$mkdirusplash

$cpmyimage.pngusplash/usplash-mine.png





EntertheworkingdirectoryandconvertthePNGtoa

hexadecimalsourcefile,then"compile"itintoasharedobject

file:



$pngtoboglusplash-mine.png>usplash-mine.c

$gcc-Os-g-I/usr/include/bogl-fPIC-cusplash-mine.c-ousp

$gcc-shared-Wl,-soname,usplash-mine.sousplash-mine.o-ousp





Inthiscase,theresultingobjectfileiscalledusplash-mine.so,

butyoucangiveitadifferentname,aslongasyoudon'tcallit

usplash-artwork.so.Thatnameisusedbythesystemtofind

thecurrentbootsplashartwork,sothesafestthingtodoisgive

alltheobjectfilesuniquenamesandreferencethecurrentfile

withasymlink:

$sudocpusplash-mine.so/usr/lib/usplash/usplash-mine.so

$sudoln-sf/usr/lib/usplash/usplash-mine.so\\

/usr/lib/usplash/usplash-artwork.so







Togivethekernelaccesstothesplashimageearlyintheboot

process,itneedstobestoredintheinitramfs(initialRAM

filesystem).Theinitramfsisbuiltwhenthekernelpackageis

installed,soforcethecurrentlyinstalledkernelpackagetobe

reconfigured:

$sudodpkg-reconfigurelinux-image-\Quname-r\Q





Oncetheyhavebeencreatedandinstalledin/usr/lib/usplash,

youcanswitchbetweenvarioussplashscreens,includingthe

originalUbuntusplash,simplybyupdatingthesymlinkand

regeneratingtheinitramfs.Forexample,toreturntothe

originalsplashscreen:

$sudoln-sf/usr/lib/usplash/usplash-default.so\\

/usr/lib/usplash/usplash-artwork.so

$sudodpkg-reconfigurelinux-image-\Quname-r\Q









Hack52.Enable3-DVideoAcceleration



Afterafreshinstall,X11isprobablynotconfiguredto

takefulladvantageofyourgraphicscard.Learnhowto

takeadvantageofproprietarydriverstoconfigureyour

videocardfortopspeed.

Moderngraphicscardsareactuallyquitepowerfullittle

computersintheirownright.Squeezingmaximumperformance

outofthemrequiresthemtobesetuptherightway.



MeasurePerformance

Toseehowwellyoursystemiscurrentlyperformingandgive

yourselfabaselinetocompareagainstaftermakingchanges,

youcanuseagamesuchasUnrealTournament2004orQuake

IIItomeasuregraphic-cardperformance,bothofwhichhave

"timedemo"modesthatrunthroughadefinedsequenceof

eventsasfastaspossibleandreporttheaverageframerate

achieved.Analternativeistousetheglxgearsutility(run

glxgears-printfps),whichisincludedwiththemesa-utils

package,butit'ssuchasimpleapplicationthatitreallydoesn't

stressanydecent3-Dhardware,sotheframeratefiguresit

generatesaren'tmuchuseasabenchmark.Ifyougetanything

lessthanabout2,000fpsinglxgears,yourvideocardcould

probablydowithatune-uporreplacement!



IdentifyYourVideoCard

Togetyourvideocardrunningatmaximumspeed,youneedto



knowwhatbrandandmodelitissoyoucanselectthebest

drivers.VideocardsaregenerallyinstalledasPCI,PCI-X,or

AGPcards,orareprovideddirectlyonthemotherboard.In

reality,allofthesecardtypesarejustvariationsonthebasic

PCItechnology,andevenonboardvideocardsareessentially

justPCIdevicesthathappentobepermanentlyinstalledonthe

motherboard.Thismakesitveryeasytoidentifyyourcardby

scanningthePCIbususinglspci:

$lspci-X





The-Xflagtellslspcitoreportdeviceidentifiersintheformat

usedbytheXWindowsconfigurationfilesratherthaninnative

format.

Youcanalsotelllspcitoreportin"verbose"mode:

$lspci-v





Verbosemodeprovidesyouabitmoreinformationabouteach

device.Unfortunately,the-Xand-vflagscan'tbecombined,so

youhavetorunthemseparately.

Lookinthereporteddevicelistforanentrythatsays"VGA

compatiblecontroller."Thedevicestringwillincludethe

manufacturerandmodel.Themostcommonbrandsofhighperformance3-DcardarenVidia,ATI,andMatrox,although

someembeddedvideocardsusechipsetsfromIntelorother

manufacturers.



Drivers



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Hack 51. Change the Ubuntu Splash Screen

Tải bản đầy đủ ngay(0 tr)

×