Chromium - ArchWiki

文章推薦指數: 80 %
投票人數:10人

You can put your flags in a chromium-flags.conf file under ... When using ANGLE, Chromium forces the older i965 driver and fails when ... HomePackagesForumsWikiBugsSecurityAURDownload Jumptocontent Navigationmenu Navigation MainpageTableofcontentsGettinginvolvedWikinewsRandompage Interaction HelpContributingRecentchangesRecenttalksNewpagesStatisticsRequests Tools WhatlinkshereRelatedchangesSpecialpagesPrintableversionPermanentlinkPageinformation Inotherlanguages Deutsch日本語中文(简体) Namespaces PageDiscussion Variants expanded collapsed Views ReadViewsourceViewhistory More expanded collapsed Chromium FromArchWiki Relatedarticles Browserextensions Firefox Opera Vivaldi Chromiumisanopen-sourcegraphicalwebbrowserbasedontheBlinkrenderingengine.ItisthebasisfortheproprietaryGoogleChromebrowser. SeethispageforanexplanationofthedifferencesbetweenChromiumandGoogleChrome.Additionally: SyncisunavailableinChromium89+(2021-03-02)[1] Note:SynccanbetemporarilyrestoredbyusingChrome'sOAuth2credentialsorgettingyourown,butpayattentiontothedisclaimersanddonotconsiderthistobealong-termsolution. Considerswitchingtoxbrowsersyncforbookmarkssyncingaslongtermsolution. SeeListofapplications/Internet#Blink-basedforotherbrowsersbasedonChromium. Contents 1Installation 2Configuration 2.1Defaultapplications 2.2Certificates 2.3Makingflagspersistent 2.4ForceGPUacceleration 2.5Hardwarevideoacceleration 2.5.1Tipsandtricks 2.6PDFviewerplugin 2.7FlashPlayerplugin 2.8RunningonXWayland 2.9NativeWaylandsupport 3Tipsandtricks 3.1Browsingexperience 3.1.1chrome://URLs 3.1.2Chromiumtaskmanager 3.1.3Chromiumoverrides/overwritesPreferencesfile 3.1.4Searchengines 3.1.5Tmpfs 3.1.5.1Cacheintmpfs 3.1.5.2Profileintmpfs 3.1.6Launchanewbrowserinstance 3.1.7Directlyopen*.torrentfilesandmagnetlinkswithatorrentclient 3.1.8TouchScrollingontouchscreendevices 3.1.9Reducememoryusage 3.1.10UserAgent 3.1.11DOMDistiller 3.1.12ForcingspecificGPU 3.1.13ImportbookmarksfromFirefox 3.1.14Enablingnativenotifications 3.1.15U2Fauthentication 3.1.16Darkmode 3.1.16.1Darkmodebysystempreference 3.1.17EnableSidePanel 3.2Profilemaintenance 3.3Security 3.3.1DisableJIT 3.3.2WebRTC 3.3.3SSLcertificates 3.3.3.1AddingCAcertcertificatesforself-signedcertificates 3.3.3.2Example1:UsingashellscripttoisolatethecertificatefromTomatoUSB 3.3.3.3Example2:UsingFirefoxtoisolatethecertificatefromTomatoUSB 3.3.4CanvasFingerprinting 3.3.5Privacyextensions 3.3.6DoNotTrack 3.3.7Forceapasswordstore 4Troubleshooting 4.1Fonts 4.1.1Tabfontsizeistoolarge 4.2WebGL 4.3IncorrectHiDPIrendering 4.4PasswordpromptoneverystartwithGNOMEKeyring 4.5Chromecastsinthenetworkarenotdiscovered 4.6Everythingissyncingexceptforpassword 4.7Losingcookiesandpasswordswhenswitchingbetweendesktopenvironments 4.8HangonstartupwhenGoogleSyncenabled 4.9Chromiumaskstobesetasthedefaultbrowsereverytimeitstarts 4.10"Thisbrowserorappmaynotbesecure"errorloggingintoGoogle 4.11Chromiumstuckat60fpswhenusinga144Hz+60Hzmonitor 4.12Chromiumslowscrollspeed 5Seealso Installation ThereareseveralpackagesavailabletoinstallChromiumwith: chromium—stablerelease; chromium-devAUR—developmentrelease; chromium-snapshot-binAUR—nightlybuild. GoogleChromepackages: google-chromeAUR—stablerelease; google-chrome-betaAUR—betarelease; google-chrome-devAUR—developmentrelease. Note:FromtheChromiumprivacypage:"FeaturesthatcommunicatewithGooglemadeavailablethroughthecompilationofcodeinChromiumaresubjecttotheGooglePrivacyPolicy."ForthosewhowanttoavoidallintegrationwithGoogleservices,therearesomeprivacy-focusedspin-offs. Configuration Defaultapplications TosetChromiumasthedefaultbrowserandtochangewhichapplicationsChromiumlauncheswhenopeningdownloadedfiles,seedefaultapplications. Certificates ChromiumusesNetworkSecurityServicesforcertificatemanagement.Certificatescanbemanagedinchrome://settings/certificates. Makingflagspersistent Note:Thechromium-flags.conffileandtheaccompanyingcustomlauncherscriptarespecifictotheArchLinuxchromiumpackage.Forgoogle-chromeAURandgoogle-chrome-devAUR,usechrome-flags.confandchrome-dev-flags.confinstead. Youcanputyourflagsinachromium-flags.conffileunder$HOME/.config/(orunder$XDG_CONFIG_HOMEifyouhaveconfiguredthatenvironmentvariable). Nospecialsyntaxisused;flagsaredefinedasiftheywerewritteninaterminal. Theargumentsaresplitonwhitespaceandshellquotingrulesapply,butnofurtherparsingisperformed. Incaseofimproperquotinganywhereinthefile,afatalerrorisraised. Flagscanbeplacedinseparatelinesforreadability,butthisisnotrequired. Linesstartingwithahashsymbol(#)areskipped.(Thisisonlysupportedbythechromiumlauncherscriptandwillnotworkwhenusingchrome-flags.confwiththegoogle-chromeAURpackage.) Belowisanexamplechromium-flags.conffilethatdefinestheflags--start-maximized--incognito: ~/.config/chromium-flags.conf #Thislinewillbeignored. --start-maximized --incognito ForceGPUacceleration Warning:Disablingtherenderingblacklistmaycauseunstablebehavior,includingcrashesofthehost.Seethebugreportsinchrome://gpufordetails. BydefaultChromiumonLinuxdoesnotuseanyGPUacceleration.ToforceGPUacceleration,appendthefollowingflagstopersistentconfiguration: ~/.config/chromium-flags.conf --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy Additionallytheflag--disable-gpu-driver-bug-workaroundsmayneedtobepassedtopreventGPUworkaroundfrombeingused.Flagsinchrome://gpushouldstate"Hardwareaccelerated"whenconfiguredandavailable. Thisarticleorsectionisoutofdate. Reason:AfixhasbeenmergedintomesaasofMay2021.[2](DiscussinTalk:Chromium) --enable-native-gpu-memory-buffersisbrokensincemesa20.1.1[3] Hardwarevideoacceleration Note: ThereisnoofficialsupportfromChromiumorArchLinuxforthisfeature[4].However,chromiumfromofficialrepositoriesiscompiledwithVA-APIsupportandyoumayaskforhelpinthededicatedforumthread. VA-APIdoesnotworkwiththechromiumpackagewhenusingthenativeWaylandbackend,butitdoesworkinchromium-wayland-vaapiAUR. ToenableVA-APIsupportinChromium: InstallthecorrectVA-APIdriverforyourvideocardandverifyVA-APIhasbeenenabledandworkingcorrectly,seeHardwarevideoacceleration.ForproprietaryNVIDIAsupport,installinglibva-vdpau-driver-chromiumAURorlibva-vdpau-driver-vp9-gitAURisrequired. Settheoption--enable-features=VaapiVideoDecoder.ThisisenoughwhenusingANGLEGLrendererandlibva-intel-driver. WhenusingANGLE,Chromiumforcestheolderi965driverandfailswhenintel-media-driverisused.Asaworkaround,configureVA-APImanually.See[5]fordetails. TousethesystemGLrendereronXorg,useeither--use-gl=eglor--use-gl=desktop.OnXWayland,usethe--use-gl=eglflag(CurrentlyexhibitschoppinessFS#67035onsomesystems). IfVA-APIstilldoesnotwork,trythe--disable-features=UseChromeOSDirectVideoDecoderflag[6] Tipsandtricks TocheckifitisworkingplayavideowhichisusingacodecsupportedbyyourVA-APIdriver(vainfotellsyouwhichcodecsaresupported,butChromiumwillonlysupportVP9andh264): OpentheDevToolsbypressingCtrl+Shift+IorontheInspectbuttonofthecontext(right-click)menu AddtheMediainspectiontab:Hamburgermenu>Moretools>Media InthenewlyopenedMediatab,lookatthehardwaredecoderstateofthevideodecoder Testonalargeenoughvideo.Startingwithversion86,Chromiumondesktopwillonlyacceleratevideoslargerthan720p. ToreduceCPUusagewhilewatchingYouTubewhereVP8/VP9hardwaredecodingisnotavailableusetheh264ifyorenhanced-h264ifyextension. Onsomesystems(especiallyonXWayland)youmightneedto#ForceGPUacceleration.Only--ignore-gpu-blocklistisenoughforourpurposes. Thisarticleorsectionneedsexpansion. Reason:Providealinktosomebugreport.(DiscussinTalk:Chromium) YoumightneedtodisabletheSkiarenderer,asitiscurrentlynotcompatiblewithvideodecodeacceleration:--disable-features=UseSkiaRenderer PDFviewerplugin ChromiumandGoogleChromearebundledwiththeChromiumPDFViewerplugin.Ifyoudonotwanttousethisplugin,checkDownloadPDFsinchrome://settings/content/pdfDocuments. FlashPlayerplugin SupportforFlashPlayerwasremovedinChromium88.[7] RunningonXWayland IfyouareusingNVIDIA'sproprietarydriver,runningChromiumonXWaylandmaycausetheGPUprocesstooccasionallycrash.TopreventtheGPUprocessfromcrashing,addthefollowingflags: --use-angle=vulkan--use-cmd-decoder=passthrough Note:ThisdoesnotpreventallXWayland-relatedcrashes. NativeWaylandsupport Sinceversion97,nativeWaylandsupportinChromiumcanbeenabledwiththefollowingflags[8]: --ozone-platform-hint=auto See#Makingflagspersistentforapermanentconfiguration.Theflagisalsoavailableviabrowserflagsmenu. ThiswillselectwaylandOzonebackendwheninwaylandsession,soyoucanuseasingledesktopentryifyouswitchbetweenX11andWaylandoften. Tipsandtricks ThefollowingtipsandtricksshouldworkforbothChromiumandChromeunlessexplicitlystated. Browsingexperience chrome://URLs AnumberoftweakscanbeaccessedviaChromeURLs.Seechrome://chrome-urlsforacompletelist. chrome://flags-accessexperimentalfeaturessuchasWebGLandrenderingwebpageswithGPU,etc. chrome://extensions-view,enableanddisablethecurrentlyusedChromiumextensions. chrome://gpu-statusofdifferentGPUoptions. chrome://sandbox-indicatesandboxstatus. chrome://version-displayversionandswitchesusedtoinvoketheactive/usr/bin/chromium. Anautomaticallyupdated,completelistingofChromiumswitches(commandlineparameters)isavailablehere. Chromiumtaskmanager Shift+ESCcanbeusedtobringupthebrowsertaskmanagerwhereinmemory,CPU,andnetworkusagecanbeviewed. Chromiumoverrides/overwritesPreferencesfile IfyouenabledsyncingwithaGoogleAccount,thenChromiumwilloverrideanydirecteditstothePreferencesfilefoundunder~/.config/chromium/Default/Preferences.Toworkaroundthis,startChromiumwiththe--disable-sync-preferencesswitch: $chromium--disable-sync-preferences IfChromiumisstartedinthebackgroundwhenyouloginintoyourdesktopenvironment,makesurethecommandyourdesktopenvironmentusesis: $chromium--disable-sync-preferences--no-startup-window Searchengines Makesiteslikewiki.archlinux.organdwikipedia.orgeasilysearchablebyfirstexecutingasearchonthosepages,thengoingtoSettings>SearchandclicktheManagesearchengines..button.Fromthere,"Edit"theWikipediaentryandchangeitskeywordtow(orsomeothershortcutyouprefer).NowsearchingWikipediafor"ArchLinux"fromtheaddressbarisdonesimplybyentering"warchlinux". Note:GooglesearchisusedautomaticallywhentypingsomethingintotheURLbar.Ahard-codedkeywordtriggerisalsoavailableusingthe?prefix. Tmpfs Cacheintmpfs Note:Chromiumstoresitscacheseparatefromitsbrowserprofiledirectory. TolimitChromiumfromwritingitscachetoaphysicaldisk,onecandefineanalternativelocationviathe--disk-cache-dirflag: $chromium--disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache" Cacheshouldbeconsideredtemporaryandwillnotbesavedafterarebootorhardlock.Anotheroptionistosetupthespacein/etc/fstab: /etc/fstab tmpfs /home/username/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0 Profileintmpfs Relocatethebrowserprofiletoatmpfsfilesystem,including/tmp,or/dev/shmforimprovementsinapplicationresponseastheentireprofileisnowstoredinRAM. Useanactiveprofilemanagementtoolsuchasprofile-sync-daemonformaximalreliabilityandeaseofuse.ItsymlinksorbindmountsandsyncsthebrowserprofiledirectoriestoRAM.Formore,seeProfile-sync-daemon. Launchanewbrowserinstance Whenyoulaunchthebrowser,itfirstchecksifanotherinstanceusingthesamedatadirectoryisalreadyrunning.Ifthereisone,thenewwindowisassociatedwiththeoldinstance.Ifyouwanttolaunchanindependentinstanceofthebrowser,youmustspecifyseparatedirectoryusingthe--user-data-dirparameter: $chromium--user-data-dir=/path/to/some/directory Note:Thedefaultlocationoftheuserdatais~/.config/chromium/. Directlyopen*.torrentfilesandmagnetlinkswithatorrentclient Bydefault,Chromiumdownloads*.torrentfilesdirectlyandyouneedtoclickthenotificationfromthebottom-leftcornerofthescreeninorderforthefiletobeopenedwithyourdefaulttorrentclient.Thiscanbeavoidedwiththefollowingmethod: Downloada*.torrentfile. Right-clickthenotificationdisplayedatthebottom-leftcornerofthescreen. Checkthe"AlwaysOpenFilesofThisType"checkbox. Seexdg-opentochangethedefaultassocation. TouchScrollingontouchscreendevices Youmayneedtospecifywhichtouchdevicetouse.FindyourtouchscreendevicewithxinputlistthenlaunchChromiumwiththe--touch-devices=xparameter,where"x"istheidofyourdevice.Note:Ifthedeviceisdesignatedasaslavepointer,usingthismaynotwork,usethemasterpointer'sIDinstead. Reducememoryusage Bydefault,ChromiumusesaseparateOSprocessforeachinstanceofavisitedwebsite.[9]However,youcanspecifycommand-lineswitcheswhenstartingChromiumtomodifythisbehaviour. Forexample,toshareoneprocessforallinstancesofawebsite: $chromium--process-per-site Touseasingleprocessmodel: $chromium--single-process Warning:Thesingle-processmodelisdiscouragedbecauseitisunsafeandmaycontainbugsnotpresentinothermodels.[10] Inaddition,youcansuspendorstoreinactiveTabswithextensionssuchasTabSuspenderandOneTab. UserAgent TheUserAgentcanbearbitrarilymodifiedatthestartofChromium'sbaseinstanceviaits--user-agent="[string]"parameter. DOMDistiller ChromiumhasasimilarreadermodetoFirefox.InthiscaseitiscalledDOMDistiller,whichisanopensourceproject. Itisdisabledbydefault,butcanbeenabledusingthechrome://flags/#enable-reader-modeflag,whichyoucanalsomakepersistent. NotonlydoesDOMDistillerprovideabetterreadingexperiencebydistillingthecontentofthepage,italsosimplifiespagesforprint.Eventhoughthelattercheckboxoptionhasbeenremovedfromtheprintdialog,youcanstillprintthedistilledpage,whichbasicallyhasthesameeffect. Afterenablingtheflag,youwillfindanew"Enterreadermode"menuitemandcorrespondingiconintheaddressbarwhenChromiumthinksthewebsiteyouarevisitingcoulddowithsomedistilling. ForcingspecificGPU Inmulti-GPUsystems,ChromiumautomaticallydetectswhichGPUshouldbeusedforrendering(discreteorintegrated).Thisworks99%ofthetime,exceptwhenitdoesnot-ifaunavailableGPUispicked(forexample,discretegraphicsonVFIOGPUpassthrough-enabledsystems),chrome://gpuwillcomplainaboutnotbeingabletoinitializetheGPUprocess.OnthesamepagebelowDriverInformationtherewillbemultipleGPUsshown(GPU0,GPU1,...).Thereisnowaytoswitchbetweentheminauser-friendlyway,butyoucanreadthedevice/vendorIDspresentthereandconfigureChromiumtouseaspecificGPUwithflags: $chromium--gpu-testing-vendor-id=0x8086--gpu-testing-device-id=0x1912 ...where0x8086and0x1912isreplacedbytheIDsoftheGPUyouwanttouse(asshownonthechrome://gpupage). ImportbookmarksfromFirefox Toeasethetransition,youcanimportbookmarksfromFirefoxintoChromium. NavigateChromiumtochrome://settings/importData IfFirefoxisalreadyinstalledonyourcomputer,youcandirectlyimportbookmarksaswellasmanyotherthingsfromFirefox. MakesureMozillaFirefoxisselected.Optionally,youcanunchecksomeunwanteditemshere.ClicktheImportandthenDone.Youaredonewithit. Note:IfyouhavenotcreatedanybookmarksinChromiumyet,thebookmarkswillshowupinyourbookmarksbar.Ifyoualreadyhavebookmarks,thebookmarkswillbeinanewfolderlabeled"ImportedFromFirefox" IfyouimportbookmarksfromanotherPC,youhavetoexportbookmarksfromFirefoxfirst. Ctrl+Shift+O>ImportandBackup>ExportBookmarksToHTMLinFirefox Theprocedureisprettymuchthesame.Youneedtogotochrome://settings/importData.However,thistime,intheFromdrop-downmenu,selectBookmarksHTMLFileandclicktheChooseFilebuttonanduploadthedesiredbookmarkfile. Enablingnativenotifications Gotochrome://flags#enable-system-notificationsandselectEnabled. U2Fauthentication Installlibfido2library.ThisprovidestheudevrulesrequiredtoenableaccesstotheU2Fkeyasauser. U2Fkeysarebydefaultonlyaccessiblebyroot,andwithouttheserulesChromiumwillgiveanerror. Darkmode Toenabledarkmode(usedinprefers-color-schemeinCSS,JavaScript,SettingsandDev-Tools)andenablethedarktheme(normallyusedforincognitomode)appendthefollowingflagtopersistentconfiguration: ~/.config/chromium-flags.conf --force-dark-mode --enable-features=WebUIDarkMode Darkmodebysystempreference ThisChromiumissueaimstobringdarkmodebasedonGTKthemeselectionintoChromium. Inthefuture,allthatwillberequiredtoproperlyusesystempreference,issettingDesignstoGTKinchrome://settings/appearance. EnableSidePanel TheSidePanelcanbeenabledthroughchrome://flags.YoucanenableordisableSidepanel,andchangeoptionssuchasSidepanelborderandSidepaneldraganddrop. Profilemaintenance ChromiumusesSQLitedatabasestomanagehistoryandthelike.Sqlitedatabasesbecomefragmentedovertimeandemptyspacesappearallaround.But,sincetherearenomanagingprocessescheckingandoptimizingthedatabase,thesefactorseventuallyresultinaperformancehit.Agoodwaytoimprovestartupandsomeotherbookmarks-andhistory-relatedtasksistodefragmentandtrimunusedspacefromthesedatabases. profile-cleanerandbrowser-vacuumAURintheAURdojustthis. Security DisableJIT Atthecostofreducedperformance,youcandisablejust-in-timecompilationofJavaScripttonativecode,whichisresponsibleforroughlyhalfofthesecurityvulnerabilitiesintheJSengine,usingtheflag--js-flags=--jitless. WebRTC WebRTCisacommunicationprotocolthatreliesonJavaScriptthatcanleakone'sactualIPaddressandhardwarehashfrombehindaVPN.Whilesomesoftwaremaypreventtheleakingscriptsfromrunning,itisprobablyagoodideatoblockthisprotocoldirectlyaswell,justtobesafe.AsofOctober2016,thereisnowaytodisableWebRTConChromiumondesktop,thereareextensionsavailabletodisablelocalIPaddressleak,oneisthisextension. OnecantestWebRTCviahttps://browserleaks.com/webrtc. Warning:EventhoughIPleakcanbeprevented,Chromiumstillsendsyouruniquehash,andthereisnowaytopreventthis.Readmoreonhttps://www.browserleaks.com/webrtc#webrtc-disable SSLcertificates ChromiumdoesnothaveanSSLcertificatemanager.ItreliesontheNSSSharedDB~/.pki/nssdb.InordertoaddSSLcertificatestothedatabase,userswillhavetousetheshell. AddingCAcertcertificatesforself-signedcertificates GrabtheCAcertsandcreateannssdb,ifonedoesnotalreadyexist.Todothis,firstinstallthensspackage,thencompletethesesteps: $mkdir-p$HOME/.pki/nssdb $cd$HOME/.pki/nssdb $certutil-N-dsql:. $curl-k-o"cacert-root.crt""http://www.cacert.org/certs/root.crt" $curl-k-o"cacert-class3.crt""http://www.cacert.org/certs/class3.crt" $certutil-dsql:$HOME/.pki/nssdb-A-tTC-n"CAcert.org"-icacert-root.crt $certutil-dsql:$HOME/.pki/nssdb-A-tTC-n"CAcert.orgClass3"-icacert-class3.crt Note:Userswillneedtocreateapasswordforthedatabase,ifitdoesnotexist. Nowusersmaymanuallyimportaself-signedcertificate. Example1:UsingashellscripttoisolatethecertificatefromTomatoUSB Belowisasimplescriptthatwillextractandaddacertificatetotheuser'snssdb: #!/bin/sh # #usage:import-cert.shremote.host.name[port] # REMHOST=$1 REMPORT=${2:-443} exec6>&1 exec>$REMHOST echo|openssls_client-connect${REMHOST}:${REMPORT}2>&1|sed-ne'/-BEGINCERTIFICATE-/,/-ENDCERTIFICATE-/p' certutil-dsql:$HOME/.pki/nssdb-A-t"P,,"-n"$REMHOST"-i$REMHOST exec1>&66>&- Syntaxisadvertisedinthecommentedlines. References: https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md Example2:UsingFirefoxtoisolatethecertificatefromTomatoUSB Thefirefoxbrowsercanbeusedtosavethecertificatetoafileformanualimportintothedatabase. Usingfirefox: BrowsetothetargetURL. Uponseeingthe"ThisConnectionisUntrusted"warningscreen,click:IunderstandtheRisks>AddException... Click:View>Details>Exportandsavethecertificatetoatemporarylocation(/tmp/easy.peminthisexample). NowimportthecertificateforuseinChromium: $certutil-dsql:$HOME/.pki/nssdb-A-tTC-n"easy"-i/tmp/easy.pem Note:Adjustthenametomatchthatofthecertificate.Intheexampleabove,"easy"isthenameofthecertificate. Reference: https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html CanvasFingerprinting CanvasfingerprintingisatechniquethatallowswebsitestoidentifyusersbydetectingdifferenceswhenrenderingtoanHTML5canvas.Thisinformationcanbemadeinaccessiblebyusingthe--disable-reading-from-canvasflag. Toconfirmthisisworkingrunthistestandmakesure"hashofcanvasfingerprint"isreportedasundeterminedinthefullresults. Note: Someextensionsrequirereadingfromcanvasandmaybebrokenbysetting--disable-reading-from-canvas. YouTubeplayerdoesnotworkproperlywithoutcanvasreading.[11][12] Privacyextensions SeeBrowserextensions#Privacy. Tip:Installingtoomanyextensionsmighttakeupmuchspaceinthetoolbar.Thoseextensionswhichyouwouldnotinteractwithanyway(e.g.HTTPSEverywhere)canbehiddenbyright-clickingontheextensionandchoosingHideinChromiummenu. DoNotTrack ToenableDoNotTrack,visitchrome://settings,scrolldowntoAdvancedandunderPrivacyandsecurity,checkSenda"DoNotTrack"requestwithyourbrowsingtraffic. Forceapasswordstore ChromiumusesapasswordstoretostoreyourpasswordsandtheChromiumSafeStoragekey,whichisusedtoencryptcookievalues.[13] BydefaultChromiumauto-detectswhichpasswordstoretouse,whichcanleadtoyouapparentlylosingyourpasswordsandcookieswhenswitchingtoanotherdesktopenvironmentorwindowmanager. YoucanforceChromiumtouseaspecificpasswordstorebylaunchingitwiththe--password-storeflagwithoneoffollowingthevalues[14]: gnome,usesGnomeKeyring kwallet5,usesKDEWallet basic,savesthepasswordsandthecookies'encryptionkeyasplaintextinthefileLoginData detect,thedefaultauto-detectbehavior Forexample,toforceChromiumtouseGnomeKeyringinanotherdesktoporWMuse--password-store=gnome,see#Makingflagspersistentformakingitpermanent. Whenusingapasswordstoreofanotherdesktopenvironmentyouprobablyalsowanttounlockitautomatically.SeeGNOME/Keyring#UsingthekeyringandKDEWallet#UnlockKDEWalletautomaticallyonlogin. Troubleshooting Fonts Note:Chromiumdoesnotfullyintegratewithfontconfig/GTK/Pango/X/etc.duetoitssandbox.Formoreinformation,seetheLinuxTechnicalFAQ. Tabfontsizeistoolarge ChromiumwillusetheGTKsettingsasdescribedinGTK#Configuration.Whenconfigured,Chromiumwillusethegtk-font-namesettingfortabs(whichmaymismatchwindowfontsize).Tooverridethesesettings,use--force-device-scale-factor=1.0. WebGL ThereisthepossibilitythatyourgraphicscardhasbeenblacklistedbyChromium.See#ForceGPUacceleration. IfyouareusingChromiumwithBumblebee,WebGLmightcrashduetoGPUsandboxing.Inthiscase,youcandisableGPUsandboxingwithoptirunchromium--disable-gpu-sandbox. Visitchrome://gpu/fordebugginginformationaboutWebGLsupport. ChromiumcansaveincorrectdataaboutyourGPUinyouruserprofile(e.g.ifyouuseswitchbetweenanNvidiacardusingOptimusandIntel,itwillshowtheNvidiacardinchrome://gpuevenwhenyouarenotusingitorprimusrun/optirun).Runningusingadifferentuserdirectory,e.g,chromium--user-data-dir=$(mktemp-d)maysolvethisissue.ForapersistentsolutionyoucanresettheGPUinformationbydeleting~/.config/chromium/Local\State. IncorrectHiDPIrendering ChromiumwillautomaticallyscaleforaHiDPIdisplay,however,thismaycauseanincorrectrenderedGUI. Theflag--force-device-scale-factor=1maybeusedtooverruletheautomaticscalingfactor. WhennativeWaylandsupportisenabled,Chromiumwillautomaticallyscalebasedontheconfiguredscaleofeachmonitor. PasswordpromptoneverystartwithGNOMEKeyring SeeGNOME/Keyring#Passwordsarenotremembered. Chromecastsinthenetworkarenotdiscovered YouwillneedtoenabletheMediaRouterComponentExtensioninchrome://flags/#load-media-router-component-extension. Everythingissyncingexceptforpassword Ifsynchronizationisnotworkingforpasswordonly(youcancheckitonchrome://sync-internals/)deleteprofilelogindata: $rm~/.config/chromium/Default/Login\Data* SeeGoogleChromeHelpforumfordetails. Losingcookiesandpasswordswhenswitchingbetweendesktopenvironments IfyouseethemessageFailedtodecrypttokenforserviceAccountId-*intheterminalwhenyoustartChromium,itmighttrytousethewrongpasswordstoragebackend.ThismighthappenwhenyouswitchbetweenDesktopEnvironments. See#Forceapasswordstore. HangonstartupwhenGoogleSyncenabled TrylaunchingChromewith--password-store=basicoranotherappropriatepasswordstore. See#Forceapasswordstore. Chromiumaskstobesetasthedefaultbrowsereverytimeitstarts IfyouareusingKDEandhaveoncesetFirefoxasthedefaultbrowser(byclickingthebuttoninsideFirefox),youmightfindChromiumaskstobesetasthedefaultbrowsereverytimeitstarts,evenifyouclickthe"setasdefault"button. Chromiumchecksforthisstatusbyrunningxdg-settingscheckdefault-web-browserchromium.desktop.Iftheoutputis"no",itisnotconsideringitselftobethedefaultbrowser.Thescriptxdg-settingschecksforthefollowingMIMEassociationsandexpectallofthemtobechromium.desktop: x-scheme-handler/http x-scheme-handler/https text/html Tofixit,gotoSystemsettings>Applications>Defaultapplications>WebbrowserandchooseChromium.Then,settheMIMEassociationfortext/html: $xdg-mimedefaultchromium.desktoptext/html Finally,updatetheMIMEdatabase: $update-mime-database~/.local/share/mime "Thisbrowserorappmaynotbesecure"errorloggingintoGoogle Asof2020.04.20ifyourunchromiumwith--remote-debugging-port=9222flagforwebdevelopment,youcannotlogintoyourGoogleaccount.Temporarilydisablethisflagtologinandthenyoucanenableitback. Chromiumstuckat60fpswhenusinga144Hz+60Hzmonitor Thereisasuitableworkaroundforthisissue,appendthefollowingflagstopersistentconfiguration: ~/.config/chromium-flags.conf --use-gl=egl --ignore-gpu-blocklist --enable-gpu-rasterization ThisshouldmakeChromiumrunat144fpswhenusedonyour144hzdisplay,assumingyourcompositorisrefreshingat144fps. KeepinminditmightbealittlechoppyFS#67035,butthisiswaybetterthanitbeingstuckat60fps. Chromiumslowscrollspeed Mousewhellscrollinginchromiumandelectronbasedapplicationsmaybetooslowfordailyusage.Herearesomesolutions. Libinput#Mousewheelscrollingspeedscalinginjectslibinput_event_pointer_get_axis_valuefunctioninlibinputandprovidesaninterfacetochangescalefactor.Thisisnotaapplicationlevelinjection,soanadditionscriptforapplicationspecificscalefactortuningisneeded.Notethatscrollonchromium'ssmallheightdevelopertoolsmaybetoofastwhenscalefactorisbigenough. IMWheelincreasesscrolldistancebyreplayingXwheelbuttoneventformultipletimes.However,chromiumassumestherealscrollandthereplayedonesastwoevents.Thereisasmallbutnoticeabledelaybetweenthem,soonemousewheelscrollleadstotwicepagejumps.Also,touchpadscrollneedsadditionalcare. LinuxScrollSpeedFixandSmoothScrollaretwochromiumextensionswithsuppportforscrolldistancemodification.Uponwheelscrollinawebpage,theclosestscrollableancestorofcurrentfocusednodewillbefound,thenascrollmethodwithgivenpixeldistancewillbecalledonit,evenifithasbeenscrolledtobottom.Soonceyouscrollintoatexteditororanyscrollableelement,youcanneverscrolloutofit,exceptmovingmouse.Also,extensionbasedmethodscannotbeusedoutsidechromium. Seealso Chromiumhomepage GoogleChromereleasenotes Chromewebstore DifferencesbetweenChromiumandGoogleChrome ListofChromiumcommand-lineswitches Profile-sync-daemon-SystemdservicethatsavesChromiumprofileintmpfsandsyncstodisk Tmpfs-TmpfsFilesystemin/etc/fstab OfficialtmpfskernelDocumentation Retrievedfrom"https://wiki.archlinux.org/index.php?title=Chromium&oldid=731260" Categories:WebbrowserGoogleHiddencategories:PagesorsectionsflaggedwithTemplate:OutofdatePagesorsectionsflaggedwithTemplate:Expansion



請為這篇文章評分?