Tải bản đầy đủ - 0 (trang)
Hack 55. Manage Packages with Synaptic

Hack 55. Manage Packages with Synaptic

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

Themainwindowisdividedintoafewsections.Thesidebar

displaysthedifferentpackagecategoriessothatyoucan

quicklydrilldowntoaparticulargroupofpackages(likegames)

andnothavetoreadthroughpackagesinothercategories.The

firstcategory,All,displaysallpackages.Ontherightsideofthe

windowalongthetopisthelistofpackages,alongwith

informationaboutwhethertheyareinstalledandwhatthe

latestversionis.Ifyouselectaparticularpackage,detailed

informationisdisplayedinthepanebelow.Nearthetopofthe

screenareafewbuttonsthatcorrespondtothemainactions

you'llwanttoperformwhenusingSynaptic,describednext.



ReloadthePackageList

InUbuntu,packagesresideinwhatareknownaspackage

repositories."ModifytheListofPackageRepositories"[Hack

#60]goesintomoredetailaboutthedifferentpackage

repositoriesthatexistforUbuntu,butinshort,these



repositoriesallowdifferenttypesofpackagestobekept

togetherinacentralplace.Asauser,thismeansthatyoudon't

needtosearcharoundontheInternettofindaprogram;you

justfindtheprograminthepackagemanager,anditretrieves

thatprogram'spackage,aswellasanyotherpackagesthat

programneedsfromtheappropriatepackagerepositories.

Thereareoftenupdatestothesepackagerepositoriesasnew

versionsofsoftwarearereleased,sobeforeyoudoanything

else,youwillwanttogettheverylatestlistofpackagesand

theirversions.Todoso,clicktheReloadbuttonatthetopof

thewindow.Synapticwilldownloadandupdateitslocal

databaseofpackageswiththesenewversions(Figure6-2).

Onceitisfinished,youarereadytoinstallandupdate

packages.



Figure6-2.ClickReloadtograbthelatestlistof

packages



InstallPackages

ToinstallapackageinSynaptic,findtheparticularpackagein

thepackagelist.Youcaneitherscrolldownmanuallyor,ifyou

knowthenameofthepackage,youcanstarttypinginthatlist

tohighlightit.Ifyouaren'tsureaboutthecategoryorthe

nameofaparticularprogram,youcanalsosearchwithin

Synapticforit.MoreinformationonhowtousetheSynaptic

searchfeaturecanbefoundin"SearchforPackages,"laterin

thishack.

Afteryouidentifythepackageyouwanttoinstall,right-clickon

itandselect"MarkforInstallation."Ifyouwanttoinstallmore

thanonepackage,markthemallforinstallationatthispoint.

Synapticwillpromptyouifapackagedependsonanother

packagetoinstallsothatyoucanapprovetheinstallationofit.

Onceallofthepackagesyouwishtoinstallareselected,click

theApplybutton,andSynapticwilldisplayapromptlettingyou

knowwhichpackagesitwillinstallalongwithhowmuchspace

itwillneed.ThenSynapticwillautomaticallydownloadand

installalloftheprogramsontothesystem.



UpdatePackages

Oneparticularlynicefeatureofacentralizedpackagerepository

isthatitmakesupgradingalloftheprogramsonyoursystema

breeze.Toupdateyoursystem,clicktheMarkAllUpgrades

button.Synapticwillgothroughandmarkanyandallpackages

thathaveanupdateavailable.ClickApplytoapplythechanges,

andSynapticwilldownloadandinstallallavailableupdatesfor

yoursystem:fromdesktopprogramstolibrariestogames.You

willwanttoperiodicallyupdatetheprogramsonyoursystemto

makesureyouhavethelatestbugfixesandsecuritypatches.



Ifyouhavealotofpackagestoupgradeandyouareonaslow

connection,itcantakesometimetodownloadeverything.Don'tworry

ifyouneedtoshutdownyourcomputerandcan'tfinishthedownload

atthemomentthedownloadsareresumable,sothenexttimeyoustart

theupgrade,itwillpickupwhereitleftoff.However,notethatonce

Synapticfinishesdownloadingandstartsupgradingthepackages,you

willwanttoletitcompletetheprocess;otherwise,youmayendup

withhalf-installedpackages,anditwilltakefurtherworktocomplete

theinstallation.



RemovePackages

YoucanremovepackagesinSynapticinmuchthesamewayas

youcaninstallthem.Findthepackageyouwanttoremovein

thepackagelist,right-click,andselect"MarkforRemoval"if

youwanttoremovetheprogrambutleavebehindany

configurationfilesyoumayhavechanged.Youcanalsoselect

"MarkforCompleteRemoval"ifyouwanttopurgeeventhe

configurationfilesfromthesystem.



SearchforPackages

Sometimesyouknowwhatsortofprogramyouwanttoinstall,

butyouaren'tcompletelysurewhattheexactnameofthe

packageis.Synapticincludesasearchtooltomakeitsimpleto

findthepackagesyouneed.ClicktheSearchbuttonatthetop

ofthewindowandenteranykeywordsyouwanttosearchfor.

Synapticwillthendisplayafilteredpackagelistthatcontains

onlythepackagesthatmatchthosekeywords(Figure6-3).You

canthenmoreeasilylocateandinstallthem.Togetbacktothe

standardpackagelist,clicktheSectionsbuttonatthebottomof

thewindow.



Figure6-3.TheSynapticsearchinterface



EditPreferencesandAddRepositories

Theabovestepsareenoughtodostandardpackage

management,butasyougetusedtoSynapticyoumaywantto

tweaksomeofitssettings.ClickSettings Preferencestosee

themainpreferenceswindow(Figure6-4).InthePreferences

window,youcanconfiguresomeofSynaptic'sdefaultbehavior,

suchashowmanyundooperationstoallow,whatcolorsand

fontstouseforpackages,whichcolumnstodisplayinthemain

window,andthedetailsofyournetworkproxysettings.



Figure6-4.Synaptic'sPreferenceswindowlets

youtweakdefaultbehavior



Youmayalsowanttoaddextrasoftwarerepositoriestoyour

system.Extrarepositoriessuchasuniverseandmultiverse

[Hack#60]containamuchlargersetofsoftware;however,the

softwareispackagedandsupportedbytheUbuntucommunity

insteadoftheUbuntuprojectitself,sothesepackagesmaynot

beaswelltested.Tochangeyourrepositorysettings,click

Settings Repositories.Figure6-5showsthemainwindowthat

displaysallofthemainrepositoriesyouhaveconfigured.Toadd

subcategoriestoaparticularrepository,selecttherepository

andclickAdd.Toadduniverseormultiversesubcategories,

clicktheircorrespondingcheckboxes.Ifyouaresomewhat

familiarwiththesources.listlayout,youcanalsoclicktheEdit

buttontomoredirectlyconfiguretherepositorysettings.



Ifyouhavechangedrepositorysettings,besuretoclickReloadtoget

thelatestpackagelistsfromthenewrepositoriesyouhaveadded.



Figure6-5.AddtoSynaptic'spackage

repositories







Hack56.ManagePackageswithAdept



AdeptistheKDEequivalentofSynaptic,allowingyouto

managepackagesonaKubuntusystem.

Ubuntu'spackage-managementtoolsaresomeofitsgreatest

strengths.Ahugeamountofworkhasbeenputintothe

underlyingmanagementcodeinordertomakeitasflexibleas

possible,separatingtheuserinterfacefromthecodethat

performstheactualheavylifting.Theresultisthatthereare

manydifferentwaystointeractwithapt,allowingyouto

managepackagesfromthecommandline[Hack#54]ina

varietyofwaysoruseoneofmanygraphicalfrontendsthat

hidesthedetailsfromyouandprovidesapoint-and-clickGUI.

Thisapproachallowsgraphicalfrontendstoberelatively

lightweight:theydon'tneedtoincludebasicpackagemanagementlogicbecauseallofthatisprovidedbyaptitself,

whichinturnmakestheGUIapplicationsimplerandmore

robust.

Adeptisagraphicalpackage-managementinterfacethatsitson

thelibaptAPIandusestheQtlibraries,makingitanideal

alternativetoSynapticforKubuntusystems.Youcanuseitto

install,upgrade,andremovepackages,ofcourse,butitalso

comeswithacoupleoflittleextrautilitiestomakeyourlife

easier:adept-notifierandadept-updater.



BasicAdeptUsage

Ifyoudon'talreadyhaveitinstalled,usethecommandlineor

analternativepackage-managementtooltoinstallAdept:



$sudoapt-getinstalladeptlibqt-perl





Thereasonforinstallinglibqt-perlisthatitenablessomeextra

featuresinAdept,includingtheabilitytoconfigureand

reconfigurepackagesdirectly.

LaunchAdeptfromKmenu System Adept.Themain

managementwindowisquitesimilartoSynapticbutincludes

someinterestingadditionalfeatures,suchasDebtagssupport,

showninFigure6-6.



Figure6-6.PackagemanagementwithAdept



Debtagsisaninitiativetoassociatespecifickeywordswith

packages,ratherthanrelyonsearchingpackagetitlesand

descriptionstofindwhatyouwant.It'salotlikethetagsused

forfree-formtaxonomybyFlickrandvariousbloggingtools.You

canbrowsethroughthecurrentlyavailabletagsatthebottom

rightofthewindow,anddragthemintotheTagsIWantand



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

Hack 55. Manage Packages with Synaptic

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

×