https://wiki.archlinux.org/api.php?action=feedcontributions&user=Ounr&feedformat=atomArchWiki - User contributions [en]2024-03-28T11:04:39ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=GNOME/Document_viewer&diff=578836GNOME/Document viewer2019-08-02T16:42:12Z<p>Ounr: /* Installation */ Added the link for mentioned package</p>
<hr />
<div>[[Category:Office]]<br />
[[es:GNOME/Document viewer]]<br />
[[ja:Evince]]<br />
[[w:Evince|Document viewer]] is specifically designed to support the following file formats: [[PDF, PS and DjVu|PDF, PostScript, DjVu]], tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt). For a comprehensive list of formats supported, see [https://wiki.gnome.org/Apps/Evince/SupportedDocumentFormats Supported Document Formats].<br />
<br />
Document viewer uses the poppler library as a backend.<br />
<br />
{{Note|Document viewer was previously known as [https://wiki.gnome.org/Apps/Evince Evince] until the application was given new descriptive names, one for each supported language. The name ''Evince'' is still used in numerous places such as the executable name, some package names, some desktop entries, and some GSettings schemas.}} <br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|evince}} package, or {{AUR|evince-git}} for the development version.<br />
Evince installs the {{Pkg|gnome-desktop}} as a dependency.<br />
<br />
For a standalone version install {{AUR|evince-no-gnome}} or the light version {{AUR|evince-light}} for PDF support only.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Printer does not show up ===<br />
<br />
Upgrade {{Pkg|gtk3}} to version {{ic|3.22.26+47+g3a1a7135a2-1}} or higher. In previous GTK+ 3 versions, the GTK+ printer backends were included in a separate package. [https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/gtk3&id=54e7af64837e18355122e62ff565970620db3537]<br />
<br />
=== Zoom-in is limited ===<br />
<br />
Increasing Evince's page cache size allows you to zoom in further, which is handy for large documents. By default the setting is set to 50MiB. Increasing the page cache size obviously increases Evince's memory consumption when zoomed-in.<br />
<br />
The following command increases the page cache size to one gigabyte:<br />
<br />
$ gsettings set org.gnome.Evince page-cache-size 'uint32 1000'<br />
<br />
=== PDF texts is not show correctly ===<br />
<br />
Try setting {{ic|override-restrictions}} parameter to false:<br />
<br />
$ gsettings set org.gnome.Evince override-restrictions false<br />
<br />
=== Inverse search with SyncTeX doesn't work ===<br />
<br />
Check that {{Pkg|python-dbus}} is [[install]]ed. After that {{ic|Ctrl+click}} should work.<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gnome.org/Apps/Evince Evince website] <br />
* [http://poppler.freedesktop.org/ Poppler website] <br />
* [http://www.adobe.com/devnet/pdf/pdf_reference.html Page "PDF reference" from Adobe]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Codecs_and_containers&diff=572244Codecs and containers2019-04-30T13:51:58Z<p>Ounr: /* No H264, mpg4 or Musepack (.mpc) in Totem Player */ Style improvement</p>
<hr />
<div>[[Category:Multimedia]]<br />
[[cs:Codecs]]<br />
[[de:Codecs]]<br />
[[el:Codecs]]<br />
[[es:Codecs]]<br />
[[fr:Codecs]]<br />
[[it:Codecs]]<br />
[[ja:コーデック]]<br />
[[ru:Codecs]]<br />
[[zh-hans:Codecs]]<br />
{{Related articles start}}<br />
{{Related|Optical disc drive#Playback}}<br />
{{Related|GStreamer}}<br />
{{Related|ffmpeg}}<br />
{{Related articles end}}<br />
From [[Wikipedia:Codec|Wikipedia]], "a codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal."<br />
<br />
In general, codecs are utilized by multimedia applications to encode or decode audio or video streams. In order to play encoded streams, users must ensure an appropriate codec is installed.<br />
<br />
This article deals only with codecs and application backends; see [[List of applications/Multimedia]] for a list of media players ([[MPlayer]], [[mpv]] and [[VLC]] are popular choices).<br />
<br />
== Requirements ==<br />
<br />
Playing multimedia content requires two components:<br />
<br />
* A capable media player<br />
* The appropriate codec<br />
<br />
It is not always necessary to explicitly install codecs if you have installed a media player. For example, [[MPlayer]] pulls in a large number of codecs as dependencies, and also has codecs built in.<br />
<br />
== List of codecs ==<br />
<br />
=== Audio ===<br />
<br />
See also [[Wikipedia:Comparison of audio coding formats]].<br />
<br />
==== Lossless audio codecs ====<br />
<br />
* {{App|[[Wikipedia:Apple Lossless|Apple Lossless]] (ALAC)|A lossless audio compression codec developed by Apple and deployed on all of its platforms and devices.|https://alac.macosforge.org/|{{AUR|alac-git}}}}<br />
* {{App|[[Wikipedia:FLAC|FLAC]]|Free Lossless Audio Codec.|https://xiph.org/flac/|{{Pkg|flac}}}}<br />
* {{App|[[Wikipedia:WavPack|WavPack]]|Lossless audio compression format that also has a lossy [[Wikipedia:WavPack#Hybrid mode|hybrid mode]].|http://www.wavpack.com/|{{Pkg|wavpack}}}}<br />
<br />
==== Lossy audio codecs ====<br />
<br />
{| class="wikitable" style="text-align:center"<br />
!colspan=2| Codec !! Encode !! Decode<br />
|-<br />
|colspan=2| [[Wikipedia:Advanced Audio Coding|AAC]] ||colspan=2| [[#AAC]]<br />
|-<br />
|colspan=2| [[Wikipedia:ATSC A/52|ATSC A/52]] || {{AUR|aften}} || {{Pkg|a52dec}}<br />
|-<br />
|colspan=2| [[Wikipedia:CELT|CELT]] ||colspan=2| {{Pkg|celt}}<br />
|-<br />
|rowspan=2| [[Wikipedia:MPEG-1|MPEG-1]] || || &nbsp; ||rowspan=2| {{Pkg|libmad}}<br />
|-<br />
| [[Wikipedia:MP3|MP3]] || {{Pkg|lame}}<br />
|-<br />
|colspan=2| [[Wikipedia:Musepack|Musepack]] (MPC) || {{-}} <sup>1</sup> || {{Pkg|libmpcdec}}<br />
|-<br />
|colspan=2| [[Wikipedia:Opus (audio format)|Opus]] ||colspan=2| {{Pkg|opus}}, {{AUR|opus-git}}<br />
|-<br />
|colspan=2| [[Wikipedia:Vorbis|Vorbis]] ||colspan=2| {{Pkg|libvorbis}}<br />
|-<br />
!colspan=4| Speech codecs<br />
|-<br />
|colspan=2| [[Wikipedia:Adaptive Multi-Rate audio codec|AMR]] ||colspan=2| {{Pkg|opencore-amr}}<br />
|-<br />
|colspan=2| [[Wikipedia:Speex|Speex]] ||colspan=2| {{Pkg|speex}}<br />
|}<br />
<br />
# mppenc is not packaged.<br />
<br />
* {{App|[[Wikipedia:CELT|CELT]]|Open, royalty-free lossy audio codec, optimized for low latency.|http://www.celt-codec.org/|{{Pkg|celt}}}}<br />
* {{App|[[Wikipedia:LAME|LAME]]|MP3 encoder and graphical frame analyzer.|http://lame.sourceforge.net/|{{Pkg|lame}}}}<br />
* {{App|liba52|Free library for decoding [[Wikipedia:ATSC A/52|ATSC A/52]] (Dolby Digital) streams (lossy).|http://liba52.sourceforge.net/|{{Pkg|a52dec}}}}<br />
* {{App|[[Wikipedia:libdca|libdca]]|Free library for decoding DTS Coherent Acoustics streams.|https://www.videolan.org/developers/libdca.html|{{Pkg|libdca}}}}<br />
* {{App|[[Wikipedia:libmad|MAD]]|High-quality MPEG audio decoder.|https://www.underbit.com/products/mad/|{{Pkg|libmad}}}}<br />
* {{App|[[Wikipedia:Musepack|Musepack]] (MPC)|Open source lossy audio codec, designed for [[Wikipedia:Transparency (data compression)|transparency]].|https://musepack.net/|{{Pkg|libmpcdec}}}}<br />
* {{App|[[Wikipedia:Adaptive Multi-Rate audio codec|opencore-amr]]|Open source implementation of the Adaptive Multi Rate (AMR) speech codec.|https://sourceforge.net/projects/opencore-amr/|{{Pkg|opencore-amr}}}}<br />
* {{App|[[Wikipedia:Opus (audio codec)|Opus]]|Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency.|https://www.opus-codec.org/|{{Pkg|opus}}, {{AUR|opus-git}}}}<br />
* {{App|[[Wikipedia:Speex|Speex]]|Patent-free, lossy audio compression format designed for speech.|https://www.speex.org/|{{Pkg|speex}}}}<br />
* {{App|[[Wikipedia:Vorbis|Vorbis]]|Open, patent-free, lossy audio codec.|https://xiph.org/vorbis/|{{Pkg|libvorbis}}}}<br />
<br />
===== AAC =====<br />
<br />
From [[Wikipedia:Advanced Audio Coding|Wikipedia]]:<br />
<br />
:'''Advanced Audio Coding''' (AAC) is a proprietary audio coding standard for lossy digital audio compression. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at the same bit rate.<br />
<br />
* {{App|[[Wikipedia:FAAC|FAAC]]|Proprietary AAC audio encoder.|https://www.audiocoding.com/faac.html|{{Pkg|faac}}}}<br />
* {{App|[[Wikipedia:FAAD2|FAAD2]]|ISO AAC audio decoder.|http://www.audiocoding.com/faad2.html|{{Pkg|faad2}}}}<br />
* {{App|[[Wikipedia:FAAD2|Fraunhofer FDK AAC]]|Complete, high-quality audio solution to Android (and Linux) users.|http://www.iis.fraunhofer.de/en/bf/amm/implementierungen/fdkaaccodec.html|{{Pkg|libfdk-aac}}}}<br />
* {{App|[[Wikipedia:Nero AAC Codec|Nero AAC]]|Nero AAC reference quality MPEG-4 and 3GPP audio codec. (deprecated)|https://www.nero.com/|[https://aur.archlinux.org/pkgbase/neroaac-bin/ neroaac-bin]<sup>AUR</sup>}}<br />
<br />
=== Image codecs ===<br />
<br />
* {{App|[[Wikipedia:JasPer|JasPer]]|Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard.|http://www.ece.uvic.ca/~frodo/jasper/|}}{{Pkg|jasper}}<br />
* {{App|[[Wikipedia:OpenJPEG|OpenJPEG]]|Open source JPEG 2000 codec.|http://www.openjpeg.org/|{{Pkg|openjpeg}}}}<br />
<br />
=== Video codecs ===<br />
<br />
{{Expansion|Add {{AUR|davs2}}.}}<br />
<br />
See also [[Wikipedia:Comparison of video codecs]].<br />
<br />
{| class="wikitable"<br />
! Codec !! Libraries<br />
|-<br />
| [[Wikipedia:AV1|AV1]] || {{Pkg|aom}}<br />
|-<br />
| [[Wikipedia:Daala|Daala]] || {{AUR|daala-git}}<br />
|-<br />
| [[Wikipedia:Dirac (video compression format)|Dirac]] || {{Pkg|schroedinger}}<br />
|-<br />
| [[Wikipedia:DV|DV]] || {{Pkg|libdv}}<br />
|-<br />
|rowspan=2| [[Wikipedia:High Efficiency Video Coding|H.265]] || {{Pkg|x265}}, {{AUR|x265-hg}}<br />
|-<br />
| {{Pkg|libde265}}, {{AUR|libde265-git}}<br />
|-<br />
| [[Wikipedia:H.264|H.264]] || {{Pkg|x264}}, {{AUR|x264-git}}<br />
|-<br />
| [[Wikipedia:MPEG-1|MPEG-1]] ||rowspan=2| {{Pkg|libmpeg2}} (decode)<br />
|-<br />
| [[Wikipedia:MPEG-2|MPEG-2]]<br />
|-<br />
| [[Wikipedia:MPEG-4|MPEG-4]] || [[Wikipedia:Xvid|Xvid]] ({{Pkg|xvidcore}})<br />
|-<br />
| [[Wikipedia:Theora|Theora]] || {{Pkg|libtheora}}<br />
|-<br />
| [[Wikipedia:VP8|VP8]] || {{Pkg|libvpx}}, {{AUR|libvpx-git}}<br />
|}<br />
<br />
* {{App|[[Wikipedia:AV1|AV1]]|AOMedia Video 1 (AV1) is successor codec to Google's VP9, Mozilla's Daala, Cisco's Thor.|https://aomediacodec.github.io/av1-spec/|{{Pkg|aom}}}}<br />
* {{App|[[Wikipedia:Daala|Daala]]|New video compression technology. The effort is a collaboration between Mozilla Foundation, Xiph.Org Foundation and other contributors. The goal of the project is to provide a free to implement, use and distribute digital media format and reference implementation with technical performance superior to h.265.|https://www.xiph.org/daala/|{{AUR|daala-git}}}}<br />
* {{App|libde265|Open source implementation of the h.265 video codec.|https://github.com/strukturag/libde265|{{Pkg|libde265}}, {{AUR|libde265-git}}}}<br />
* {{App|[[Wikipedia:DV|libdv]]|The Quasar DV codec (libdv) is a software codec for DV video.|http://libdv.sourceforge.net/|{{Pkg|libdv}}}}<br />
* {{App|[[Wikipedia:libmpeg2|libmpeg2]]|Library for decoding MPEG-1 and MPEG-2 video streams.|http://libmpeg2.sourceforge.net/|{{Pkg|libmpeg2}}}}<br />
* {{App|[[Wikipedia:Dirac (video compression format)|Schrödinger]]|Advanced royalty-free video compression format designed for a wide range of uses, from delivering low-resolution web content to broadcasting HD and beyond, to near-lossless studio editing. |http://diracvideo.org/|{{Pkg|schroedinger}}}}<br />
* {{App|[[Wikipedia:Theora|Theora]]|Open video codec developed by the Xiph.org.|https://www.theora.org/|{{Pkg|libtheora}}}}<br />
* {{App|[[Wikipedia:VP8|VP8]]|High-quality, open video format for the web that's freely available to everyone.|https://www.webmproject.org|{{Pkg|libvpx}}, {{AUR|libvpx-git}}}}<br />
* {{App|[[Wikipedia:x264|x264]]|Free library for encoding H264/AVC video streams.|https://www.videolan.org/developers/x264.html|{{Pkg|x264}}, {{AUR|x264-git}}}}<br />
* {{App|[[Wikipedia:x265|x265]]|Open-source project and free application library for encoding video streams into the H.265/High Efficiency Video Coding (HEVC) format.|http://x265.org/|{{Pkg|x265}} {{AUR|x265-hg}}}}<br />
* {{App|[[Wikipedia:Xvid|Xvid]]|Open source MPEG-4 video codec.|https://www.xvid.org/|{{Pkg|xvidcore}}}}<br />
<br />
== Container format tools ==<br />
<br />
See also [[Wikipedia:Comparison of video container formats]].<br />
<br />
* {{App|[[Wikipedia:MKVToolNix|MKVToolNix]]|Set of tools to create, edit and inspect Matroska files.|https://mkvtoolnix.download/|{{Pkg|mkvtoolnix-cli}}, {{Pkg|mkvtoolnix-gui}}}}<br />
* {{App|OGMtools|Information, extraction or creation for OGG media streams.|http://www.bunkus.org/videotools/ogmtools|{{Pkg|ogmtools}}}}<br />
<br />
== Backends ==<br />
<br />
=== GStreamer ===<br />
<br />
From http://www.gstreamer.net/:<br />
<br />
:GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.<br />
<br />
Simply, GStreamer is a ''backend'' or ''framework'' utilized by many media applications. See [[GStreamer]] article.<br />
<br />
=== xine ===<br />
<br />
From http://www.xine-project.org/about:<br />
<br />
:xine is a free (gpl-licensed) high-performance, portable and reusable multimedia playback engine. xine itself is a shared library with an easy to use, yet powerful API which is used by many applications for smooth video playback and video processing purposes.<br />
<br />
As an alternative to GStreamer, many media players can be configured to utilize the xine backend provided by {{Pkg|xine-lib}}.<br />
<br />
Note that the xine project itself provides a capable video player, {{Pkg|xine-ui}}.<br />
<br />
=== libavcodec ===<br />
<br />
[https://ffmpeg.org/libavcodec.html libavcodec] is part of the [[FFmpeg]] project. It includes a large number of video and audio codecs. The libavcodec codecs are included with media players such as [[MPlayer]] and [[VLC]], so you may not need to install the {{Pkg|ffmpeg}} package itself.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Install MPlayer binary codecs ===<br />
<br />
{{Move|MPlayer|Belongs there.}}<br />
<br />
As an ultimate solution, you can try to install MPlayer binary codecs.<br />
<br />
If you are not able to play some files go to http://www.mplayerhq.hu/design7/dload.html, read the instructions and install the codec you need to play your files.<br />
<br />
They can also be found in the {{AUR|codecs}} and {{AUR|codecs64}} packages.<br />
<br />
=== No H264, mpg4 or Musepack (.mpc) in Totem Player ===<br />
<br />
If you see the "The H264 plugin is missing" warning with Totem media player, [[install]] {{Pkg|gst-libav}}.</div>Ounrhttps://wiki.archlinux.org/index.php?title=Codecs_and_containers&diff=572243Codecs and containers2019-04-30T13:44:47Z<p>Ounr: /* GStreamer */ Typo fix</p>
<hr />
<div>[[Category:Multimedia]]<br />
[[cs:Codecs]]<br />
[[de:Codecs]]<br />
[[el:Codecs]]<br />
[[es:Codecs]]<br />
[[fr:Codecs]]<br />
[[it:Codecs]]<br />
[[ja:コーデック]]<br />
[[ru:Codecs]]<br />
[[zh-hans:Codecs]]<br />
{{Related articles start}}<br />
{{Related|Optical disc drive#Playback}}<br />
{{Related|GStreamer}}<br />
{{Related|ffmpeg}}<br />
{{Related articles end}}<br />
From [[Wikipedia:Codec|Wikipedia]], "a codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal."<br />
<br />
In general, codecs are utilized by multimedia applications to encode or decode audio or video streams. In order to play encoded streams, users must ensure an appropriate codec is installed.<br />
<br />
This article deals only with codecs and application backends; see [[List of applications/Multimedia]] for a list of media players ([[MPlayer]], [[mpv]] and [[VLC]] are popular choices).<br />
<br />
== Requirements ==<br />
<br />
Playing multimedia content requires two components:<br />
<br />
* A capable media player<br />
* The appropriate codec<br />
<br />
It is not always necessary to explicitly install codecs if you have installed a media player. For example, [[MPlayer]] pulls in a large number of codecs as dependencies, and also has codecs built in.<br />
<br />
== List of codecs ==<br />
<br />
=== Audio ===<br />
<br />
See also [[Wikipedia:Comparison of audio coding formats]].<br />
<br />
==== Lossless audio codecs ====<br />
<br />
* {{App|[[Wikipedia:Apple Lossless|Apple Lossless]] (ALAC)|A lossless audio compression codec developed by Apple and deployed on all of its platforms and devices.|https://alac.macosforge.org/|{{AUR|alac-git}}}}<br />
* {{App|[[Wikipedia:FLAC|FLAC]]|Free Lossless Audio Codec.|https://xiph.org/flac/|{{Pkg|flac}}}}<br />
* {{App|[[Wikipedia:WavPack|WavPack]]|Lossless audio compression format that also has a lossy [[Wikipedia:WavPack#Hybrid mode|hybrid mode]].|http://www.wavpack.com/|{{Pkg|wavpack}}}}<br />
<br />
==== Lossy audio codecs ====<br />
<br />
{| class="wikitable" style="text-align:center"<br />
!colspan=2| Codec !! Encode !! Decode<br />
|-<br />
|colspan=2| [[Wikipedia:Advanced Audio Coding|AAC]] ||colspan=2| [[#AAC]]<br />
|-<br />
|colspan=2| [[Wikipedia:ATSC A/52|ATSC A/52]] || {{AUR|aften}} || {{Pkg|a52dec}}<br />
|-<br />
|colspan=2| [[Wikipedia:CELT|CELT]] ||colspan=2| {{Pkg|celt}}<br />
|-<br />
|rowspan=2| [[Wikipedia:MPEG-1|MPEG-1]] || || &nbsp; ||rowspan=2| {{Pkg|libmad}}<br />
|-<br />
| [[Wikipedia:MP3|MP3]] || {{Pkg|lame}}<br />
|-<br />
|colspan=2| [[Wikipedia:Musepack|Musepack]] (MPC) || {{-}} <sup>1</sup> || {{Pkg|libmpcdec}}<br />
|-<br />
|colspan=2| [[Wikipedia:Opus (audio format)|Opus]] ||colspan=2| {{Pkg|opus}}, {{AUR|opus-git}}<br />
|-<br />
|colspan=2| [[Wikipedia:Vorbis|Vorbis]] ||colspan=2| {{Pkg|libvorbis}}<br />
|-<br />
!colspan=4| Speech codecs<br />
|-<br />
|colspan=2| [[Wikipedia:Adaptive Multi-Rate audio codec|AMR]] ||colspan=2| {{Pkg|opencore-amr}}<br />
|-<br />
|colspan=2| [[Wikipedia:Speex|Speex]] ||colspan=2| {{Pkg|speex}}<br />
|}<br />
<br />
# mppenc is not packaged.<br />
<br />
* {{App|[[Wikipedia:CELT|CELT]]|Open, royalty-free lossy audio codec, optimized for low latency.|http://www.celt-codec.org/|{{Pkg|celt}}}}<br />
* {{App|[[Wikipedia:LAME|LAME]]|MP3 encoder and graphical frame analyzer.|http://lame.sourceforge.net/|{{Pkg|lame}}}}<br />
* {{App|liba52|Free library for decoding [[Wikipedia:ATSC A/52|ATSC A/52]] (Dolby Digital) streams (lossy).|http://liba52.sourceforge.net/|{{Pkg|a52dec}}}}<br />
* {{App|[[Wikipedia:libdca|libdca]]|Free library for decoding DTS Coherent Acoustics streams.|https://www.videolan.org/developers/libdca.html|{{Pkg|libdca}}}}<br />
* {{App|[[Wikipedia:libmad|MAD]]|High-quality MPEG audio decoder.|https://www.underbit.com/products/mad/|{{Pkg|libmad}}}}<br />
* {{App|[[Wikipedia:Musepack|Musepack]] (MPC)|Open source lossy audio codec, designed for [[Wikipedia:Transparency (data compression)|transparency]].|https://musepack.net/|{{Pkg|libmpcdec}}}}<br />
* {{App|[[Wikipedia:Adaptive Multi-Rate audio codec|opencore-amr]]|Open source implementation of the Adaptive Multi Rate (AMR) speech codec.|https://sourceforge.net/projects/opencore-amr/|{{Pkg|opencore-amr}}}}<br />
* {{App|[[Wikipedia:Opus (audio codec)|Opus]]|Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency.|https://www.opus-codec.org/|{{Pkg|opus}}, {{AUR|opus-git}}}}<br />
* {{App|[[Wikipedia:Speex|Speex]]|Patent-free, lossy audio compression format designed for speech.|https://www.speex.org/|{{Pkg|speex}}}}<br />
* {{App|[[Wikipedia:Vorbis|Vorbis]]|Open, patent-free, lossy audio codec.|https://xiph.org/vorbis/|{{Pkg|libvorbis}}}}<br />
<br />
===== AAC =====<br />
<br />
From [[Wikipedia:Advanced Audio Coding|Wikipedia]]:<br />
<br />
:'''Advanced Audio Coding''' (AAC) is a proprietary audio coding standard for lossy digital audio compression. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at the same bit rate.<br />
<br />
* {{App|[[Wikipedia:FAAC|FAAC]]|Proprietary AAC audio encoder.|https://www.audiocoding.com/faac.html|{{Pkg|faac}}}}<br />
* {{App|[[Wikipedia:FAAD2|FAAD2]]|ISO AAC audio decoder.|http://www.audiocoding.com/faad2.html|{{Pkg|faad2}}}}<br />
* {{App|[[Wikipedia:FAAD2|Fraunhofer FDK AAC]]|Complete, high-quality audio solution to Android (and Linux) users.|http://www.iis.fraunhofer.de/en/bf/amm/implementierungen/fdkaaccodec.html|{{Pkg|libfdk-aac}}}}<br />
* {{App|[[Wikipedia:Nero AAC Codec|Nero AAC]]|Nero AAC reference quality MPEG-4 and 3GPP audio codec. (deprecated)|https://www.nero.com/|[https://aur.archlinux.org/pkgbase/neroaac-bin/ neroaac-bin]<sup>AUR</sup>}}<br />
<br />
=== Image codecs ===<br />
<br />
* {{App|[[Wikipedia:JasPer|JasPer]]|Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard.|http://www.ece.uvic.ca/~frodo/jasper/|}}{{Pkg|jasper}}<br />
* {{App|[[Wikipedia:OpenJPEG|OpenJPEG]]|Open source JPEG 2000 codec.|http://www.openjpeg.org/|{{Pkg|openjpeg}}}}<br />
<br />
=== Video codecs ===<br />
<br />
{{Expansion|Add {{AUR|davs2}}.}}<br />
<br />
See also [[Wikipedia:Comparison of video codecs]].<br />
<br />
{| class="wikitable"<br />
! Codec !! Libraries<br />
|-<br />
| [[Wikipedia:AV1|AV1]] || {{Pkg|aom}}<br />
|-<br />
| [[Wikipedia:Daala|Daala]] || {{AUR|daala-git}}<br />
|-<br />
| [[Wikipedia:Dirac (video compression format)|Dirac]] || {{Pkg|schroedinger}}<br />
|-<br />
| [[Wikipedia:DV|DV]] || {{Pkg|libdv}}<br />
|-<br />
|rowspan=2| [[Wikipedia:High Efficiency Video Coding|H.265]] || {{Pkg|x265}}, {{AUR|x265-hg}}<br />
|-<br />
| {{Pkg|libde265}}, {{AUR|libde265-git}}<br />
|-<br />
| [[Wikipedia:H.264|H.264]] || {{Pkg|x264}}, {{AUR|x264-git}}<br />
|-<br />
| [[Wikipedia:MPEG-1|MPEG-1]] ||rowspan=2| {{Pkg|libmpeg2}} (decode)<br />
|-<br />
| [[Wikipedia:MPEG-2|MPEG-2]]<br />
|-<br />
| [[Wikipedia:MPEG-4|MPEG-4]] || [[Wikipedia:Xvid|Xvid]] ({{Pkg|xvidcore}})<br />
|-<br />
| [[Wikipedia:Theora|Theora]] || {{Pkg|libtheora}}<br />
|-<br />
| [[Wikipedia:VP8|VP8]] || {{Pkg|libvpx}}, {{AUR|libvpx-git}}<br />
|}<br />
<br />
* {{App|[[Wikipedia:AV1|AV1]]|AOMedia Video 1 (AV1) is successor codec to Google's VP9, Mozilla's Daala, Cisco's Thor.|https://aomediacodec.github.io/av1-spec/|{{Pkg|aom}}}}<br />
* {{App|[[Wikipedia:Daala|Daala]]|New video compression technology. The effort is a collaboration between Mozilla Foundation, Xiph.Org Foundation and other contributors. The goal of the project is to provide a free to implement, use and distribute digital media format and reference implementation with technical performance superior to h.265.|https://www.xiph.org/daala/|{{AUR|daala-git}}}}<br />
* {{App|libde265|Open source implementation of the h.265 video codec.|https://github.com/strukturag/libde265|{{Pkg|libde265}}, {{AUR|libde265-git}}}}<br />
* {{App|[[Wikipedia:DV|libdv]]|The Quasar DV codec (libdv) is a software codec for DV video.|http://libdv.sourceforge.net/|{{Pkg|libdv}}}}<br />
* {{App|[[Wikipedia:libmpeg2|libmpeg2]]|Library for decoding MPEG-1 and MPEG-2 video streams.|http://libmpeg2.sourceforge.net/|{{Pkg|libmpeg2}}}}<br />
* {{App|[[Wikipedia:Dirac (video compression format)|Schrödinger]]|Advanced royalty-free video compression format designed for a wide range of uses, from delivering low-resolution web content to broadcasting HD and beyond, to near-lossless studio editing. |http://diracvideo.org/|{{Pkg|schroedinger}}}}<br />
* {{App|[[Wikipedia:Theora|Theora]]|Open video codec developed by the Xiph.org.|https://www.theora.org/|{{Pkg|libtheora}}}}<br />
* {{App|[[Wikipedia:VP8|VP8]]|High-quality, open video format for the web that's freely available to everyone.|https://www.webmproject.org|{{Pkg|libvpx}}, {{AUR|libvpx-git}}}}<br />
* {{App|[[Wikipedia:x264|x264]]|Free library for encoding H264/AVC video streams.|https://www.videolan.org/developers/x264.html|{{Pkg|x264}}, {{AUR|x264-git}}}}<br />
* {{App|[[Wikipedia:x265|x265]]|Open-source project and free application library for encoding video streams into the H.265/High Efficiency Video Coding (HEVC) format.|http://x265.org/|{{Pkg|x265}} {{AUR|x265-hg}}}}<br />
* {{App|[[Wikipedia:Xvid|Xvid]]|Open source MPEG-4 video codec.|https://www.xvid.org/|{{Pkg|xvidcore}}}}<br />
<br />
== Container format tools ==<br />
<br />
See also [[Wikipedia:Comparison of video container formats]].<br />
<br />
* {{App|[[Wikipedia:MKVToolNix|MKVToolNix]]|Set of tools to create, edit and inspect Matroska files.|https://mkvtoolnix.download/|{{Pkg|mkvtoolnix-cli}}, {{Pkg|mkvtoolnix-gui}}}}<br />
* {{App|OGMtools|Information, extraction or creation for OGG media streams.|http://www.bunkus.org/videotools/ogmtools|{{Pkg|ogmtools}}}}<br />
<br />
== Backends ==<br />
<br />
=== GStreamer ===<br />
<br />
From http://www.gstreamer.net/:<br />
<br />
:GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.<br />
<br />
Simply, GStreamer is a ''backend'' or ''framework'' utilized by many media applications. See [[GStreamer]] article.<br />
<br />
=== xine ===<br />
<br />
From http://www.xine-project.org/about:<br />
<br />
:xine is a free (gpl-licensed) high-performance, portable and reusable multimedia playback engine. xine itself is a shared library with an easy to use, yet powerful API which is used by many applications for smooth video playback and video processing purposes.<br />
<br />
As an alternative to GStreamer, many media players can be configured to utilize the xine backend provided by {{Pkg|xine-lib}}.<br />
<br />
Note that the xine project itself provides a capable video player, {{Pkg|xine-ui}}.<br />
<br />
=== libavcodec ===<br />
<br />
[https://ffmpeg.org/libavcodec.html libavcodec] is part of the [[FFmpeg]] project. It includes a large number of video and audio codecs. The libavcodec codecs are included with media players such as [[MPlayer]] and [[VLC]], so you may not need to install the {{Pkg|ffmpeg}} package itself.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Install MPlayer binary codecs ===<br />
<br />
{{Move|MPlayer|Belongs there.}}<br />
<br />
As an ultimate solution, you can try to install MPlayer binary codecs.<br />
<br />
If you are not able to play some files go to http://www.mplayerhq.hu/design7/dload.html, read the instructions and install the codec you need to play your files.<br />
<br />
They can also be found in the {{AUR|codecs}} and {{AUR|codecs64}} packages.<br />
<br />
=== No H264, mpg4 or Musepack (.mpc) in Totem Player ===<br />
<br />
If you see the "The H264 plugin is missing" warning with Totem media player, just install the Gstreamer libav library to fix it install {{Pkg|gst-libav}}.</div>Ounrhttps://wiki.archlinux.org/index.php?title=MATE&diff=571843MATE2019-04-22T13:50:11Z<p>Ounr: /* Troubleshooting */ Speaker test needs a libcanberra driver</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-hans:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related articles end}}<br />
<br />
From [https://mate-desktop.org/ MATE homepage]:<br />
<br />
:The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[install]]ed with one of the following:<br />
<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
The base desktop consists of {{Pkg|marco}}, {{Pkg|mate-panel}} and {{Pkg|mate-session-manager}}.<br />
<br />
=== MATE applications ===<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
{| class="wikitable"<br />
! Application<br />
! GNOME 2<br />
! MATE<br />
|-<br />
| menu editor<br />
| Alacarte<br />
| {{pkg|mozo}}<br />
|-<br />
| file manager<br />
| Nautilus<br />
| {{pkg|caja}}<br />
|-<br />
| window manager<br />
| Metacity<br />
| {{pkg|marco}}<br />
|-<br />
| text editor<br />
| Gedit<br />
| {{pkg|pluma}}<br />
|-<br />
| image viewer<br />
| Eye of GNOME<br />
| Eye of MATE ({{pkg|eom}})<br />
|-<br />
| document viewer<br />
| Evince<br />
| {{pkg|atril}}<br />
|-<br />
| archive manager<br />
| File Roller<br />
| {{pkg|engrampa}}<br />
|}<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are a number of other unofficial MATE applications that are contributed to and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{App|Dock Applet|Application dock for the MATE panel.|https://github.com/robint99/dock-applet|{{Pkg|mate-applet-dock}}}}<br />
* {{App|Online Radio Applet|A MATE panel applet to let you play your favourite online radio station with a single click.|http://www.zavedil.com/online-radio-applet/|{{Pkg|mate-applet-streamer}}}}<br />
* {{App|MATE Menu|Advanced menu for MATE Panel, a fork of MintMenu.|https://github.com/ubuntu-mate/mate-menu|{{AUR|mate-menu}}}}<br />
* {{App|MATE Tweak|Tweak tool for MATE, a fork of mintDesktop.|https://github.com/ubuntu-mate/mate-tweak|{{AUR|mate-tweak}}}}<br />
* {{App|BriskMenu|Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.|https://github.com/solus-project/brisk-menu|{{AUR|brisk-menu}}}}<br />
<br />
Additional packages need to be installed to take advantage of some of Caja's advanced features - see [[File manager functionality]].<br />
<br />
=== MATE unstable ===<br />
<br />
Consider the following community efforts, cf. [https://bbs.archlinux.org/viewtopic.php?pid=1624557#p1624557 forum]:<br />
<br />
* {{AUR|mate-desktop-dev}} (https://github.com/nicman23/arch_mate)<br />
<br />
== Starting MATE ==<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start MATE with ''startx'', append {{ic|exec mate-session}} to your {{ic|~/.xinitrc}} file. See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Configuration ==<br />
<br />
MATE can be configured with its ''Control Center'' application (''mate-control-center'') provided by the {{Pkg|mate-control-center}} package. To manage some hardware, you may need to install additional tools.<br />
<br />
; Audio<br />
: [[ALSA]] and [[PulseAudio]] backends are supported by the {{Pkg|mate-media}} package.<br />
; Bluetooth<br />
: For [[Bluetooth]] device support, install the {{Pkg|blueman}} package. See [[Blueman]].<br />
; Networking<br />
: For configuring the network, install the {{Pkg|network-manager-applet}} package. See [[NetworkManager]].<br />
; Power<br />
: UPower backend is supported by the {{Pkg|mate-power-manager}} package.<br />
; Printers<br />
: For configuring the printers, install the {{Pkg|system-config-printer}} package.<br />
<br />
=== Accessibility ===<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. [[Install]] {{Pkg|orca}}, {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
Before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
$ gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via ''System > Preferences > Assistive Technologies'', although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
=== Notifications ===<br />
<br />
;Battery discharge<br />
<br />
To disable the notification on battery discharge, run:<br />
<br />
$ gsettings set org.mate.power-manager.notify-discharging false<br />
<br />
;Brightness<br />
<br />
See [[Backlight#Kernel command-line options]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling/disabling compositing ===<br />
<br />
Compositing is enabled by default. To otherwise enable or disable it navigate to run ''System > Preferences > Look and Feel > Windows > General'' and click the tick box alongside ''Enable software compositing window manager''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general compositing-manager true<br />
<br />
=== Enabling/disabling new window centering ===<br />
<br />
By default, new windows are placed in the center. To otherwise enable or disable centering new windows on creation navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Center new windows''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general center-new-windows true<br />
<br />
=== Enabling/disabling window snapping ===<br />
<br />
Window snapping is enabled by default, to otherwise enable or disable it navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Enable window tiling''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general allow-tiling true<br />
<br />
=== Undecorating maximized windows ===<br />
<br />
Hiding the decorations of maximized windows is possible with the {{AUR|mate-tweak}} tool: After installing it, navigate to ''System > Preferences > Look and Feel > MATE Tweak > Windows'' and enable ''Undecorate maximized windows'' in the ''Window Behaviour'' section.<br />
{{Tip|If this option is grayed out and unavailable, try installing the {{Grp|mate-extra}} group.}}<br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|gsettings}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
Doing so may cause some graphics artifacts on secondary monitors.<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ gsettings set org.mate.caja.desktop computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ gsettings set org.mate.caja.desktop home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ gsettings set org.mate.caja.desktop network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ gsettings set org.mate.caja.desktop trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ gsettings set org.mate.caja.desktop volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager ===<br />
<br />
The ''marco'' window manager can be replaced with another window manager via either of the following methods:<br />
<br />
;Using gsettings (recommended)<br />
Execute the following to specify a different window manager for MATE:<br />
<br />
$ gsettings set org.mate.session.required-components windowmanager ''wm-name''<br />
<br />
;Using MATE session autostart<br />
You can autostart a window manager of your choice using ''mate-session-properties''. This means that the autostarted window manager will replace the default window manager at login. Navigate to ''System'' -> ''Preferences'' -> ''Startup Applications''. In the dialog click ''Add.'' The command should take the syntax {{ic|''wm-name'' --replace}}.<br />
<br />
=== Prevent Caja from managing the desktop ===<br />
<br />
To prevent Caja from managing the desktop, execute the following:<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
$ killall caja # Caja will be restarted by session manager<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button order using the graphical dconf-editor or the gsettings command line tool:<br />
<br />
$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:<br />
<br />
$ gsettings set org.mate.media-handling automount-open false<br />
<br />
And to disable automounting:<br />
<br />
$ gsettings set org.mate.media-handling automount false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the {{AUR|mate-screensaver-hacks}} package. This will allow you to use [[XScreenSaver]] screensavers with {{pkg|mate-screensaver}}.<br />
<br />
=== Spatial view in Caja ===<br />
<br />
To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:<br />
$ gsettings set org.mate.caja.preferences always-use-browser false<br />
<br />
=== Change font DPI setting ===<br />
<br />
You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing ''Change desktop background > Fonts > Details > Resolution''.<br />
<br />
=== Change applications menu icon ===<br />
<br />
By default, the applications menu icon is set to {{ic|start-here}}. To use a different icon, copy your icon to a folder such as {{ic|/usr/local/share/pixmaps}} and execute the following:<br />
$ gsettings set org.mate.panel.menubar icon-name ''icon''<br />
where ''icon'' is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.<br />
<br />
=== Panel speed settings ===<br />
<br />
;Hide/Unhide delay<br />
To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/(un)hide-delay ''time''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''time'' is a value in miliseconds, e.g. 300.<br />
<br />
;Animation speed<br />
To set the speed at which panel animations occur, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/animation-speed ''value''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''value'' is either {{ic|"'fast'"}}, {{ic|"'medium'"}} or {{ic|"'slow'"}}.<br />
<br />
=== Set the terminal for caja-open-terminal ===<br />
<br />
The {{ic|caja-open-terminal}} extension uses GSettings to determine which terminal to use - ''mate-terminal'' is the default. To change the terminal that will be used, run the following command<br />
<br />
$ gsettings set org.mate.applications-terminal exec ''my-terminal''<br />
<br />
where ''my-terminal'' is the name of the terminal executable to be launched, for example: ''xterm''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]<br />
then<br />
gsettings set org.mate.Marco.general compositing-manager false<br />
else<br />
gsettings set org.mate.Marco.general compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Vertical sync for compositing ===<br />
<br />
Mate's window manager, ''marco'', supports tear-free software compositing via DRI3/Xpresent. [https://github.com/mate-desktop/marco/issues/326]<br />
<br />
If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), ''marco'' does not support vertical synchronization via ''OpenGL'', which may cause video tearing with enabled compositing. [https://github.com/mate-desktop/marco/issues/91] In this case, consider a different [[composite manager]] with OpenGL support such as [[Compton]].<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf-editor}} tool available from the {{ic|System Tools}} menu or by running<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
<br />
$ gsettings set org.mate.background show-desktop-icons true<br />
<br />
to have your desktop icons reappear, if desired.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [https://github.com/mate-desktop/mate-panel/issues/193] <br />
<br />
Copy {{ic|/usr/share/applications/marco.desktop}} and add a delay:<br />
<br />
{{hc|~/.local/share/applications/marco.desktop|2=<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=2'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
{{Note|Delays are only allowed in the applications phase, hence {{ic|X-MATE-Autostart-Phase}} must be set to {{ic|Applications}}.}}<br />
<br />
If this has no effect, increase the delay duration.<br />
<br />
=== Disabling scroll in taskbar ===<br />
<br />
A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.<br />
<br />
Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching {{Pkg|libwnck3}} using the [[Arch Build System]]; in this case, rebuild libwnck3 with the following [https://pastebin.com/raw/q66p3dtj patch]. For more information on rebuilding packages with patches applied, see [[Patching in ABS#Applying patches]].<br />
<br />
=== Logout/shutdown delayed by at-spi-registryd ===<br />
<br />
When logging out or shutting down, you may find that you are presented with an ''A program is still running: at-spi-registryd.desktop'' popup. As a workaround, you can prevent ''at-spi-registryd'' from starting - see [[GTK+#Suppress warning about accessibility bus]] - though this may have an effect on some accessibility features.<br />
<br />
=== Caja's text file preview ===<br />
<br />
Since the migration to GTK+3 this feature is not working.[https://github.com/mate-desktop/caja/issues/1047]<br />
<br />
=== GTK+ 2 applications seem to ignore default MATE themes ===<br />
Themes that come with {{Pkg|mate-themes}} need optional dependencies {{Pkg|gtk-engines}} and {{Pkg|gtk-engine-murrine}} for GTK+ 2 themes to function properly.<br />
<br />
=== Speaker test does not work ===<br />
For [[PulseAudio]] backend, [[Install|install]] {{Pkg|libcanberra}}'s optional dependency {{Pkg|libcanberra-pulse}}.<br />
<br />
== See also ==<br />
<br />
* [https://mate-desktop.org MATE homepage]<br />
* [https://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [https://mate-desktop.org/gallery/1.8/ MATE desktop screenshots]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 The MATE Desktop Environment] - Arch Linux forum discussion about MATE</div>Ounrhttps://wiki.archlinux.org/index.php?title=MATE&diff=571842MATE2019-04-22T13:33:22Z<p>Ounr: /* Troubleshooting */ GTK+ 2 versions of mate-themes need optional dependencies</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-hans:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related articles end}}<br />
<br />
From [https://mate-desktop.org/ MATE homepage]:<br />
<br />
:The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[install]]ed with one of the following:<br />
<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
The base desktop consists of {{Pkg|marco}}, {{Pkg|mate-panel}} and {{Pkg|mate-session-manager}}.<br />
<br />
=== MATE applications ===<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
{| class="wikitable"<br />
! Application<br />
! GNOME 2<br />
! MATE<br />
|-<br />
| menu editor<br />
| Alacarte<br />
| {{pkg|mozo}}<br />
|-<br />
| file manager<br />
| Nautilus<br />
| {{pkg|caja}}<br />
|-<br />
| window manager<br />
| Metacity<br />
| {{pkg|marco}}<br />
|-<br />
| text editor<br />
| Gedit<br />
| {{pkg|pluma}}<br />
|-<br />
| image viewer<br />
| Eye of GNOME<br />
| Eye of MATE ({{pkg|eom}})<br />
|-<br />
| document viewer<br />
| Evince<br />
| {{pkg|atril}}<br />
|-<br />
| archive manager<br />
| File Roller<br />
| {{pkg|engrampa}}<br />
|}<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are a number of other unofficial MATE applications that are contributed to and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{App|Dock Applet|Application dock for the MATE panel.|https://github.com/robint99/dock-applet|{{Pkg|mate-applet-dock}}}}<br />
* {{App|Online Radio Applet|A MATE panel applet to let you play your favourite online radio station with a single click.|http://www.zavedil.com/online-radio-applet/|{{Pkg|mate-applet-streamer}}}}<br />
* {{App|MATE Menu|Advanced menu for MATE Panel, a fork of MintMenu.|https://github.com/ubuntu-mate/mate-menu|{{AUR|mate-menu}}}}<br />
* {{App|MATE Tweak|Tweak tool for MATE, a fork of mintDesktop.|https://github.com/ubuntu-mate/mate-tweak|{{AUR|mate-tweak}}}}<br />
* {{App|BriskMenu|Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.|https://github.com/solus-project/brisk-menu|{{AUR|brisk-menu}}}}<br />
<br />
Additional packages need to be installed to take advantage of some of Caja's advanced features - see [[File manager functionality]].<br />
<br />
=== MATE unstable ===<br />
<br />
Consider the following community efforts, cf. [https://bbs.archlinux.org/viewtopic.php?pid=1624557#p1624557 forum]:<br />
<br />
* {{AUR|mate-desktop-dev}} (https://github.com/nicman23/arch_mate)<br />
<br />
== Starting MATE ==<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start MATE with ''startx'', append {{ic|exec mate-session}} to your {{ic|~/.xinitrc}} file. See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Configuration ==<br />
<br />
MATE can be configured with its ''Control Center'' application (''mate-control-center'') provided by the {{Pkg|mate-control-center}} package. To manage some hardware, you may need to install additional tools.<br />
<br />
; Audio<br />
: [[ALSA]] and [[PulseAudio]] backends are supported by the {{Pkg|mate-media}} package.<br />
; Bluetooth<br />
: For [[Bluetooth]] device support, install the {{Pkg|blueman}} package. See [[Blueman]].<br />
; Networking<br />
: For configuring the network, install the {{Pkg|network-manager-applet}} package. See [[NetworkManager]].<br />
; Power<br />
: UPower backend is supported by the {{Pkg|mate-power-manager}} package.<br />
; Printers<br />
: For configuring the printers, install the {{Pkg|system-config-printer}} package.<br />
<br />
=== Accessibility ===<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. [[Install]] {{Pkg|orca}}, {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
Before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
$ gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via ''System > Preferences > Assistive Technologies'', although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
=== Notifications ===<br />
<br />
;Battery discharge<br />
<br />
To disable the notification on battery discharge, run:<br />
<br />
$ gsettings set org.mate.power-manager.notify-discharging false<br />
<br />
;Brightness<br />
<br />
See [[Backlight#Kernel command-line options]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling/disabling compositing ===<br />
<br />
Compositing is enabled by default. To otherwise enable or disable it navigate to run ''System > Preferences > Look and Feel > Windows > General'' and click the tick box alongside ''Enable software compositing window manager''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general compositing-manager true<br />
<br />
=== Enabling/disabling new window centering ===<br />
<br />
By default, new windows are placed in the center. To otherwise enable or disable centering new windows on creation navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Center new windows''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general center-new-windows true<br />
<br />
=== Enabling/disabling window snapping ===<br />
<br />
Window snapping is enabled by default, to otherwise enable or disable it navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Enable window tiling''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general allow-tiling true<br />
<br />
=== Undecorating maximized windows ===<br />
<br />
Hiding the decorations of maximized windows is possible with the {{AUR|mate-tweak}} tool: After installing it, navigate to ''System > Preferences > Look and Feel > MATE Tweak > Windows'' and enable ''Undecorate maximized windows'' in the ''Window Behaviour'' section.<br />
{{Tip|If this option is grayed out and unavailable, try installing the {{Grp|mate-extra}} group.}}<br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|gsettings}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
Doing so may cause some graphics artifacts on secondary monitors.<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ gsettings set org.mate.caja.desktop computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ gsettings set org.mate.caja.desktop home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ gsettings set org.mate.caja.desktop network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ gsettings set org.mate.caja.desktop trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ gsettings set org.mate.caja.desktop volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager ===<br />
<br />
The ''marco'' window manager can be replaced with another window manager via either of the following methods:<br />
<br />
;Using gsettings (recommended)<br />
Execute the following to specify a different window manager for MATE:<br />
<br />
$ gsettings set org.mate.session.required-components windowmanager ''wm-name''<br />
<br />
;Using MATE session autostart<br />
You can autostart a window manager of your choice using ''mate-session-properties''. This means that the autostarted window manager will replace the default window manager at login. Navigate to ''System'' -> ''Preferences'' -> ''Startup Applications''. In the dialog click ''Add.'' The command should take the syntax {{ic|''wm-name'' --replace}}.<br />
<br />
=== Prevent Caja from managing the desktop ===<br />
<br />
To prevent Caja from managing the desktop, execute the following:<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
$ killall caja # Caja will be restarted by session manager<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button order using the graphical dconf-editor or the gsettings command line tool:<br />
<br />
$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:<br />
<br />
$ gsettings set org.mate.media-handling automount-open false<br />
<br />
And to disable automounting:<br />
<br />
$ gsettings set org.mate.media-handling automount false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the {{AUR|mate-screensaver-hacks}} package. This will allow you to use [[XScreenSaver]] screensavers with {{pkg|mate-screensaver}}.<br />
<br />
=== Spatial view in Caja ===<br />
<br />
To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:<br />
$ gsettings set org.mate.caja.preferences always-use-browser false<br />
<br />
=== Change font DPI setting ===<br />
<br />
You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing ''Change desktop background > Fonts > Details > Resolution''.<br />
<br />
=== Change applications menu icon ===<br />
<br />
By default, the applications menu icon is set to {{ic|start-here}}. To use a different icon, copy your icon to a folder such as {{ic|/usr/local/share/pixmaps}} and execute the following:<br />
$ gsettings set org.mate.panel.menubar icon-name ''icon''<br />
where ''icon'' is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.<br />
<br />
=== Panel speed settings ===<br />
<br />
;Hide/Unhide delay<br />
To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/(un)hide-delay ''time''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''time'' is a value in miliseconds, e.g. 300.<br />
<br />
;Animation speed<br />
To set the speed at which panel animations occur, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/animation-speed ''value''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''value'' is either {{ic|"'fast'"}}, {{ic|"'medium'"}} or {{ic|"'slow'"}}.<br />
<br />
=== Set the terminal for caja-open-terminal ===<br />
<br />
The {{ic|caja-open-terminal}} extension uses GSettings to determine which terminal to use - ''mate-terminal'' is the default. To change the terminal that will be used, run the following command<br />
<br />
$ gsettings set org.mate.applications-terminal exec ''my-terminal''<br />
<br />
where ''my-terminal'' is the name of the terminal executable to be launched, for example: ''xterm''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]<br />
then<br />
gsettings set org.mate.Marco.general compositing-manager false<br />
else<br />
gsettings set org.mate.Marco.general compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Vertical sync for compositing ===<br />
<br />
Mate's window manager, ''marco'', supports tear-free software compositing via DRI3/Xpresent. [https://github.com/mate-desktop/marco/issues/326]<br />
<br />
If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), ''marco'' does not support vertical synchronization via ''OpenGL'', which may cause video tearing with enabled compositing. [https://github.com/mate-desktop/marco/issues/91] In this case, consider a different [[composite manager]] with OpenGL support such as [[Compton]].<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf-editor}} tool available from the {{ic|System Tools}} menu or by running<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
<br />
$ gsettings set org.mate.background show-desktop-icons true<br />
<br />
to have your desktop icons reappear, if desired.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [https://github.com/mate-desktop/mate-panel/issues/193] <br />
<br />
Copy {{ic|/usr/share/applications/marco.desktop}} and add a delay:<br />
<br />
{{hc|~/.local/share/applications/marco.desktop|2=<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=2'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
{{Note|Delays are only allowed in the applications phase, hence {{ic|X-MATE-Autostart-Phase}} must be set to {{ic|Applications}}.}}<br />
<br />
If this has no effect, increase the delay duration.<br />
<br />
=== Disabling scroll in taskbar ===<br />
<br />
A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.<br />
<br />
Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching {{Pkg|libwnck3}} using the [[Arch Build System]]; in this case, rebuild libwnck3 with the following [https://pastebin.com/raw/q66p3dtj patch]. For more information on rebuilding packages with patches applied, see [[Patching in ABS#Applying patches]].<br />
<br />
=== Logout/shutdown delayed by at-spi-registryd ===<br />
<br />
When logging out or shutting down, you may find that you are presented with an ''A program is still running: at-spi-registryd.desktop'' popup. As a workaround, you can prevent ''at-spi-registryd'' from starting - see [[GTK+#Suppress warning about accessibility bus]] - though this may have an effect on some accessibility features.<br />
<br />
=== Caja's text file preview ===<br />
<br />
Since the migration to GTK+3 this feature is not working.[https://github.com/mate-desktop/caja/issues/1047]<br />
<br />
=== GTK+ 2 applications seem to ignore default MATE themes ===<br />
Themes that come with {{Pkg|mate-themes}} need optional dependencies {{Pkg|gtk-engines}} and {{Pkg|gtk-engine-murrine}} for GTK+ 2 themes to function properly.<br />
<br />
== See also ==<br />
<br />
* [https://mate-desktop.org MATE homepage]<br />
* [https://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [https://mate-desktop.org/gallery/1.8/ MATE desktop screenshots]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 The MATE Desktop Environment] - Arch Linux forum discussion about MATE</div>Ounrhttps://wiki.archlinux.org/index.php?title=MATE&diff=571840MATE2019-04-22T11:54:29Z<p>Ounr: /* Enabling/disabling window snapping */ Window snapping is enabled by default</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-hans:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related articles end}}<br />
<br />
From [https://mate-desktop.org/ MATE homepage]:<br />
<br />
:The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[install]]ed with one of the following:<br />
<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
The base desktop consists of {{Pkg|marco}}, {{Pkg|mate-panel}} and {{Pkg|mate-session-manager}}.<br />
<br />
=== MATE applications ===<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
{| class="wikitable"<br />
! Application<br />
! GNOME 2<br />
! MATE<br />
|-<br />
| menu editor<br />
| Alacarte<br />
| {{pkg|mozo}}<br />
|-<br />
| file manager<br />
| Nautilus<br />
| {{pkg|caja}}<br />
|-<br />
| window manager<br />
| Metacity<br />
| {{pkg|marco}}<br />
|-<br />
| text editor<br />
| Gedit<br />
| {{pkg|pluma}}<br />
|-<br />
| image viewer<br />
| Eye of GNOME<br />
| Eye of MATE ({{pkg|eom}})<br />
|-<br />
| document viewer<br />
| Evince<br />
| {{pkg|atril}}<br />
|-<br />
| archive manager<br />
| File Roller<br />
| {{pkg|engrampa}}<br />
|}<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are a number of other unofficial MATE applications that are contributed to and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{App|Dock Applet|Application dock for the MATE panel.|https://github.com/robint99/dock-applet|{{Pkg|mate-applet-dock}}}}<br />
* {{App|Online Radio Applet|A MATE panel applet to let you play your favourite online radio station with a single click.|http://www.zavedil.com/online-radio-applet/|{{Pkg|mate-applet-streamer}}}}<br />
* {{App|MATE Menu|Advanced menu for MATE Panel, a fork of MintMenu.|https://github.com/ubuntu-mate/mate-menu|{{AUR|mate-menu}}}}<br />
* {{App|MATE Tweak|Tweak tool for MATE, a fork of mintDesktop.|https://github.com/ubuntu-mate/mate-tweak|{{AUR|mate-tweak}}}}<br />
* {{App|BriskMenu|Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.|https://github.com/solus-project/brisk-menu|{{AUR|brisk-menu}}}}<br />
<br />
Additional packages need to be installed to take advantage of some of Caja's advanced features - see [[File manager functionality]].<br />
<br />
=== MATE unstable ===<br />
<br />
Consider the following community efforts, cf. [https://bbs.archlinux.org/viewtopic.php?pid=1624557#p1624557 forum]:<br />
<br />
* {{AUR|mate-desktop-dev}} (https://github.com/nicman23/arch_mate)<br />
<br />
== Starting MATE ==<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start MATE with ''startx'', append {{ic|exec mate-session}} to your {{ic|~/.xinitrc}} file. See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Configuration ==<br />
<br />
MATE can be configured with its ''Control Center'' application (''mate-control-center'') provided by the {{Pkg|mate-control-center}} package. To manage some hardware, you may need to install additional tools.<br />
<br />
; Audio<br />
: [[ALSA]] and [[PulseAudio]] backends are supported by the {{Pkg|mate-media}} package.<br />
; Bluetooth<br />
: For [[Bluetooth]] device support, install the {{Pkg|blueman}} package. See [[Blueman]].<br />
; Networking<br />
: For configuring the network, install the {{Pkg|network-manager-applet}} package. See [[NetworkManager]].<br />
; Power<br />
: UPower backend is supported by the {{Pkg|mate-power-manager}} package.<br />
; Printers<br />
: For configuring the printers, install the {{Pkg|system-config-printer}} package.<br />
<br />
=== Accessibility ===<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. [[Install]] {{Pkg|orca}}, {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
Before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
$ gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via ''System > Preferences > Assistive Technologies'', although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
=== Notifications ===<br />
<br />
;Battery discharge<br />
<br />
To disable the notification on battery discharge, run:<br />
<br />
$ gsettings set org.mate.power-manager.notify-discharging false<br />
<br />
;Brightness<br />
<br />
See [[Backlight#Kernel command-line options]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling/disabling compositing ===<br />
<br />
Compositing is enabled by default. To otherwise enable or disable it navigate to run ''System > Preferences > Look and Feel > Windows > General'' and click the tick box alongside ''Enable software compositing window manager''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general compositing-manager true<br />
<br />
=== Enabling/disabling new window centering ===<br />
<br />
By default, new windows are placed in the center. To otherwise enable or disable centering new windows on creation navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Center new windows''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general center-new-windows true<br />
<br />
=== Enabling/disabling window snapping ===<br />
<br />
Window snapping is enabled by default, to otherwise enable or disable it navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Enable window tiling''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general allow-tiling true<br />
<br />
=== Undecorating maximized windows ===<br />
<br />
Hiding the decorations of maximized windows is possible with the {{AUR|mate-tweak}} tool: After installing it, navigate to ''System > Preferences > Look and Feel > MATE Tweak > Windows'' and enable ''Undecorate maximized windows'' in the ''Window Behaviour'' section.<br />
{{Tip|If this option is grayed out and unavailable, try installing the {{Grp|mate-extra}} group.}}<br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|gsettings}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
Doing so may cause some graphics artifacts on secondary monitors.<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ gsettings set org.mate.caja.desktop computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ gsettings set org.mate.caja.desktop home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ gsettings set org.mate.caja.desktop network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ gsettings set org.mate.caja.desktop trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ gsettings set org.mate.caja.desktop volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager ===<br />
<br />
The ''marco'' window manager can be replaced with another window manager via either of the following methods:<br />
<br />
;Using gsettings (recommended)<br />
Execute the following to specify a different window manager for MATE:<br />
<br />
$ gsettings set org.mate.session.required-components windowmanager ''wm-name''<br />
<br />
;Using MATE session autostart<br />
You can autostart a window manager of your choice using ''mate-session-properties''. This means that the autostarted window manager will replace the default window manager at login. Navigate to ''System'' -> ''Preferences'' -> ''Startup Applications''. In the dialog click ''Add.'' The command should take the syntax {{ic|''wm-name'' --replace}}.<br />
<br />
=== Prevent Caja from managing the desktop ===<br />
<br />
To prevent Caja from managing the desktop, execute the following:<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
$ killall caja # Caja will be restarted by session manager<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button order using the graphical dconf-editor or the gsettings command line tool:<br />
<br />
$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:<br />
<br />
$ gsettings set org.mate.media-handling automount-open false<br />
<br />
And to disable automounting:<br />
<br />
$ gsettings set org.mate.media-handling automount false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the {{AUR|mate-screensaver-hacks}} package. This will allow you to use [[XScreenSaver]] screensavers with {{pkg|mate-screensaver}}.<br />
<br />
=== Spatial view in Caja ===<br />
<br />
To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:<br />
$ gsettings set org.mate.caja.preferences always-use-browser false<br />
<br />
=== Change font DPI setting ===<br />
<br />
You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing ''Change desktop background > Fonts > Details > Resolution''.<br />
<br />
=== Change applications menu icon ===<br />
<br />
By default, the applications menu icon is set to {{ic|start-here}}. To use a different icon, copy your icon to a folder such as {{ic|/usr/local/share/pixmaps}} and execute the following:<br />
$ gsettings set org.mate.panel.menubar icon-name ''icon''<br />
where ''icon'' is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.<br />
<br />
=== Panel speed settings ===<br />
<br />
;Hide/Unhide delay<br />
To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/(un)hide-delay ''time''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''time'' is a value in miliseconds, e.g. 300.<br />
<br />
;Animation speed<br />
To set the speed at which panel animations occur, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/animation-speed ''value''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''value'' is either {{ic|"'fast'"}}, {{ic|"'medium'"}} or {{ic|"'slow'"}}.<br />
<br />
=== Set the terminal for caja-open-terminal ===<br />
<br />
The {{ic|caja-open-terminal}} extension uses GSettings to determine which terminal to use - ''mate-terminal'' is the default. To change the terminal that will be used, run the following command<br />
<br />
$ gsettings set org.mate.applications-terminal exec ''my-terminal''<br />
<br />
where ''my-terminal'' is the name of the terminal executable to be launched, for example: ''xterm''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]<br />
then<br />
gsettings set org.mate.Marco.general compositing-manager false<br />
else<br />
gsettings set org.mate.Marco.general compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Vertical sync for compositing ===<br />
<br />
Mate's window manager, ''marco'', supports tear-free software compositing via DRI3/Xpresent. [https://github.com/mate-desktop/marco/issues/326]<br />
<br />
If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), ''marco'' does not support vertical synchronization via ''OpenGL'', which may cause video tearing with enabled compositing. [https://github.com/mate-desktop/marco/issues/91] In this case, consider a different [[composite manager]] with OpenGL support such as [[Compton]].<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf-editor}} tool available from the {{ic|System Tools}} menu or by running<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
<br />
$ gsettings set org.mate.background show-desktop-icons true<br />
<br />
to have your desktop icons reappear, if desired.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [https://github.com/mate-desktop/mate-panel/issues/193] <br />
<br />
Copy {{ic|/usr/share/applications/marco.desktop}} and add a delay:<br />
<br />
{{hc|~/.local/share/applications/marco.desktop|2=<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=2'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
{{Note|Delays are only allowed in the applications phase, hence {{ic|X-MATE-Autostart-Phase}} must be set to {{ic|Applications}}.}}<br />
<br />
If this has no effect, increase the delay duration.<br />
<br />
=== Disabling scroll in taskbar ===<br />
<br />
A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.<br />
<br />
Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching {{Pkg|libwnck3}} using the [[Arch Build System]]; in this case, rebuild libwnck3 with the following [https://pastebin.com/raw/q66p3dtj patch]. For more information on rebuilding packages with patches applied, see [[Patching in ABS#Applying patches]].<br />
<br />
=== Logout/shutdown delayed by at-spi-registryd ===<br />
<br />
When logging out or shutting down, you may find that you are presented with an ''A program is still running: at-spi-registryd.desktop'' popup. As a workaround, you can prevent ''at-spi-registryd'' from starting - see [[GTK+#Suppress warning about accessibility bus]] - though this may have an effect on some accessibility features.<br />
<br />
=== Caja's text file preview ===<br />
<br />
Since the migration to GTK+3 this feature is not working.[https://github.com/mate-desktop/caja/issues/1047]<br />
<br />
== See also ==<br />
<br />
* [https://mate-desktop.org MATE homepage]<br />
* [https://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [https://mate-desktop.org/gallery/1.8/ MATE desktop screenshots]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 The MATE Desktop Environment] - Arch Linux forum discussion about MATE</div>Ounrhttps://wiki.archlinux.org/index.php?title=MATE&diff=571839MATE2019-04-22T11:50:53Z<p>Ounr: /* Enabling/disabling new window centering */ New windows are placed in the center by default</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-hans:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related articles end}}<br />
<br />
From [https://mate-desktop.org/ MATE homepage]:<br />
<br />
:The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[install]]ed with one of the following:<br />
<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
The base desktop consists of {{Pkg|marco}}, {{Pkg|mate-panel}} and {{Pkg|mate-session-manager}}.<br />
<br />
=== MATE applications ===<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
{| class="wikitable"<br />
! Application<br />
! GNOME 2<br />
! MATE<br />
|-<br />
| menu editor<br />
| Alacarte<br />
| {{pkg|mozo}}<br />
|-<br />
| file manager<br />
| Nautilus<br />
| {{pkg|caja}}<br />
|-<br />
| window manager<br />
| Metacity<br />
| {{pkg|marco}}<br />
|-<br />
| text editor<br />
| Gedit<br />
| {{pkg|pluma}}<br />
|-<br />
| image viewer<br />
| Eye of GNOME<br />
| Eye of MATE ({{pkg|eom}})<br />
|-<br />
| document viewer<br />
| Evince<br />
| {{pkg|atril}}<br />
|-<br />
| archive manager<br />
| File Roller<br />
| {{pkg|engrampa}}<br />
|}<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are a number of other unofficial MATE applications that are contributed to and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{App|Dock Applet|Application dock for the MATE panel.|https://github.com/robint99/dock-applet|{{Pkg|mate-applet-dock}}}}<br />
* {{App|Online Radio Applet|A MATE panel applet to let you play your favourite online radio station with a single click.|http://www.zavedil.com/online-radio-applet/|{{Pkg|mate-applet-streamer}}}}<br />
* {{App|MATE Menu|Advanced menu for MATE Panel, a fork of MintMenu.|https://github.com/ubuntu-mate/mate-menu|{{AUR|mate-menu}}}}<br />
* {{App|MATE Tweak|Tweak tool for MATE, a fork of mintDesktop.|https://github.com/ubuntu-mate/mate-tweak|{{AUR|mate-tweak}}}}<br />
* {{App|BriskMenu|Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.|https://github.com/solus-project/brisk-menu|{{AUR|brisk-menu}}}}<br />
<br />
Additional packages need to be installed to take advantage of some of Caja's advanced features - see [[File manager functionality]].<br />
<br />
=== MATE unstable ===<br />
<br />
Consider the following community efforts, cf. [https://bbs.archlinux.org/viewtopic.php?pid=1624557#p1624557 forum]:<br />
<br />
* {{AUR|mate-desktop-dev}} (https://github.com/nicman23/arch_mate)<br />
<br />
== Starting MATE ==<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start MATE with ''startx'', append {{ic|exec mate-session}} to your {{ic|~/.xinitrc}} file. See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Configuration ==<br />
<br />
MATE can be configured with its ''Control Center'' application (''mate-control-center'') provided by the {{Pkg|mate-control-center}} package. To manage some hardware, you may need to install additional tools.<br />
<br />
; Audio<br />
: [[ALSA]] and [[PulseAudio]] backends are supported by the {{Pkg|mate-media}} package.<br />
; Bluetooth<br />
: For [[Bluetooth]] device support, install the {{Pkg|blueman}} package. See [[Blueman]].<br />
; Networking<br />
: For configuring the network, install the {{Pkg|network-manager-applet}} package. See [[NetworkManager]].<br />
; Power<br />
: UPower backend is supported by the {{Pkg|mate-power-manager}} package.<br />
; Printers<br />
: For configuring the printers, install the {{Pkg|system-config-printer}} package.<br />
<br />
=== Accessibility ===<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. [[Install]] {{Pkg|orca}}, {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
Before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
$ gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via ''System > Preferences > Assistive Technologies'', although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
=== Notifications ===<br />
<br />
;Battery discharge<br />
<br />
To disable the notification on battery discharge, run:<br />
<br />
$ gsettings set org.mate.power-manager.notify-discharging false<br />
<br />
;Brightness<br />
<br />
See [[Backlight#Kernel command-line options]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling/disabling compositing ===<br />
<br />
Compositing is enabled by default. To otherwise enable or disable it navigate to run ''System > Preferences > Look and Feel > Windows > General'' and click the tick box alongside ''Enable software compositing window manager''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general compositing-manager true<br />
<br />
=== Enabling/disabling new window centering ===<br />
<br />
By default, new windows are placed in the center. To otherwise enable or disable centering new windows on creation navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Center new windows''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general center-new-windows true<br />
<br />
=== Enabling window snapping ===<br />
<br />
Window snapping is not be enabled by default, to enable it navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Enable side by side tiling''. Alternatively, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general allow-tiling true<br />
<br />
=== Undecorating maximized windows ===<br />
<br />
Hiding the decorations of maximized windows is possible with the {{AUR|mate-tweak}} tool: After installing it, navigate to ''System > Preferences > Look and Feel > MATE Tweak > Windows'' and enable ''Undecorate maximized windows'' in the ''Window Behaviour'' section.<br />
{{Tip|If this option is grayed out and unavailable, try installing the {{Grp|mate-extra}} group.}}<br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|gsettings}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
Doing so may cause some graphics artifacts on secondary monitors.<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ gsettings set org.mate.caja.desktop computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ gsettings set org.mate.caja.desktop home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ gsettings set org.mate.caja.desktop network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ gsettings set org.mate.caja.desktop trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ gsettings set org.mate.caja.desktop volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager ===<br />
<br />
The ''marco'' window manager can be replaced with another window manager via either of the following methods:<br />
<br />
;Using gsettings (recommended)<br />
Execute the following to specify a different window manager for MATE:<br />
<br />
$ gsettings set org.mate.session.required-components windowmanager ''wm-name''<br />
<br />
;Using MATE session autostart<br />
You can autostart a window manager of your choice using ''mate-session-properties''. This means that the autostarted window manager will replace the default window manager at login. Navigate to ''System'' -> ''Preferences'' -> ''Startup Applications''. In the dialog click ''Add.'' The command should take the syntax {{ic|''wm-name'' --replace}}.<br />
<br />
=== Prevent Caja from managing the desktop ===<br />
<br />
To prevent Caja from managing the desktop, execute the following:<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
$ killall caja # Caja will be restarted by session manager<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button order using the graphical dconf-editor or the gsettings command line tool:<br />
<br />
$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:<br />
<br />
$ gsettings set org.mate.media-handling automount-open false<br />
<br />
And to disable automounting:<br />
<br />
$ gsettings set org.mate.media-handling automount false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the {{AUR|mate-screensaver-hacks}} package. This will allow you to use [[XScreenSaver]] screensavers with {{pkg|mate-screensaver}}.<br />
<br />
=== Spatial view in Caja ===<br />
<br />
To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:<br />
$ gsettings set org.mate.caja.preferences always-use-browser false<br />
<br />
=== Change font DPI setting ===<br />
<br />
You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing ''Change desktop background > Fonts > Details > Resolution''.<br />
<br />
=== Change applications menu icon ===<br />
<br />
By default, the applications menu icon is set to {{ic|start-here}}. To use a different icon, copy your icon to a folder such as {{ic|/usr/local/share/pixmaps}} and execute the following:<br />
$ gsettings set org.mate.panel.menubar icon-name ''icon''<br />
where ''icon'' is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.<br />
<br />
=== Panel speed settings ===<br />
<br />
;Hide/Unhide delay<br />
To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/(un)hide-delay ''time''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''time'' is a value in miliseconds, e.g. 300.<br />
<br />
;Animation speed<br />
To set the speed at which panel animations occur, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/animation-speed ''value''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''value'' is either {{ic|"'fast'"}}, {{ic|"'medium'"}} or {{ic|"'slow'"}}.<br />
<br />
=== Set the terminal for caja-open-terminal ===<br />
<br />
The {{ic|caja-open-terminal}} extension uses GSettings to determine which terminal to use - ''mate-terminal'' is the default. To change the terminal that will be used, run the following command<br />
<br />
$ gsettings set org.mate.applications-terminal exec ''my-terminal''<br />
<br />
where ''my-terminal'' is the name of the terminal executable to be launched, for example: ''xterm''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]<br />
then<br />
gsettings set org.mate.Marco.general compositing-manager false<br />
else<br />
gsettings set org.mate.Marco.general compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Vertical sync for compositing ===<br />
<br />
Mate's window manager, ''marco'', supports tear-free software compositing via DRI3/Xpresent. [https://github.com/mate-desktop/marco/issues/326]<br />
<br />
If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), ''marco'' does not support vertical synchronization via ''OpenGL'', which may cause video tearing with enabled compositing. [https://github.com/mate-desktop/marco/issues/91] In this case, consider a different [[composite manager]] with OpenGL support such as [[Compton]].<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf-editor}} tool available from the {{ic|System Tools}} menu or by running<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
<br />
$ gsettings set org.mate.background show-desktop-icons true<br />
<br />
to have your desktop icons reappear, if desired.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [https://github.com/mate-desktop/mate-panel/issues/193] <br />
<br />
Copy {{ic|/usr/share/applications/marco.desktop}} and add a delay:<br />
<br />
{{hc|~/.local/share/applications/marco.desktop|2=<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=2'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
{{Note|Delays are only allowed in the applications phase, hence {{ic|X-MATE-Autostart-Phase}} must be set to {{ic|Applications}}.}}<br />
<br />
If this has no effect, increase the delay duration.<br />
<br />
=== Disabling scroll in taskbar ===<br />
<br />
A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.<br />
<br />
Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching {{Pkg|libwnck3}} using the [[Arch Build System]]; in this case, rebuild libwnck3 with the following [https://pastebin.com/raw/q66p3dtj patch]. For more information on rebuilding packages with patches applied, see [[Patching in ABS#Applying patches]].<br />
<br />
=== Logout/shutdown delayed by at-spi-registryd ===<br />
<br />
When logging out or shutting down, you may find that you are presented with an ''A program is still running: at-spi-registryd.desktop'' popup. As a workaround, you can prevent ''at-spi-registryd'' from starting - see [[GTK+#Suppress warning about accessibility bus]] - though this may have an effect on some accessibility features.<br />
<br />
=== Caja's text file preview ===<br />
<br />
Since the migration to GTK+3 this feature is not working.[https://github.com/mate-desktop/caja/issues/1047]<br />
<br />
== See also ==<br />
<br />
* [https://mate-desktop.org MATE homepage]<br />
* [https://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [https://mate-desktop.org/gallery/1.8/ MATE desktop screenshots]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 The MATE Desktop Environment] - Arch Linux forum discussion about MATE</div>Ounrhttps://wiki.archlinux.org/index.php?title=MATE&diff=571837MATE2019-04-22T11:44:17Z<p>Ounr: /* Enabling/disabling compositing */ Compositing is enabled by default</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[es:MATE]]<br />
[[it:MATE]]<br />
[[ja:MATE]]<br />
[[ko:MATE]]<br />
[[ru:MATE]]<br />
[[zh-hans:MATE]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Cinnamon}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related articles end}}<br />
<br />
From [https://mate-desktop.org/ MATE homepage]:<br />
<br />
:The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems. MATE is [https://github.com/mate-desktop under active development] to add support for new technologies while preserving a traditional desktop experience.<br />
<br />
== Installation ==<br />
<br />
MATE is available in the [[official repositories]] and can be [[install]]ed with one of the following:<br />
<br />
*The {{Grp|mate}} group contains the core desktop environment required for the standard MATE experience.<br />
*The {{Grp|mate-extra}} group contains additional utilities and applications that integrate well with the MATE desktop. Installing just the {{Grp|mate-extra}} group will not pull in the whole {{Grp|mate}} group via dependencies. If you want to install all MATE packages then you will need to explicitly install both groups.<br />
<br />
The base desktop consists of {{Pkg|marco}}, {{Pkg|mate-panel}} and {{Pkg|mate-session-manager}}.<br />
<br />
=== MATE applications ===<br />
<br />
MATE is largely composed of GNOME 2 applications and utilities, forked and renamed to avoid conflicting with their GNOME 3 counterparts. Below is a list of common GNOME applications which have been renamed in MATE.<br />
<br />
{| class="wikitable"<br />
! Application<br />
! GNOME 2<br />
! MATE<br />
|-<br />
| menu editor<br />
| Alacarte<br />
| {{pkg|mozo}}<br />
|-<br />
| file manager<br />
| Nautilus<br />
| {{pkg|caja}}<br />
|-<br />
| window manager<br />
| Metacity<br />
| {{pkg|marco}}<br />
|-<br />
| text editor<br />
| Gedit<br />
| {{pkg|pluma}}<br />
|-<br />
| image viewer<br />
| Eye of GNOME<br />
| Eye of MATE ({{pkg|eom}})<br />
|-<br />
| document viewer<br />
| Evince<br />
| {{pkg|atril}}<br />
|-<br />
| archive manager<br />
| File Roller<br />
| {{pkg|engrampa}}<br />
|}<br />
<br />
Other applications and core components prefixed with GNOME (such as GNOME Terminal, GNOME Panel, GNOME Menus, etc.) have had the prefix changed to MATE so they become MATE Panel, MATE Menus etc.<br />
<br />
=== Additional MATE packages ===<br />
<br />
There are a number of other unofficial MATE applications that are contributed to and maintained by the MATE community and therefore not included in the {{Grp|mate}} or {{Grp|mate-extra}} groups.<br />
<br />
* {{App|Dock Applet|Application dock for the MATE panel.|https://github.com/robint99/dock-applet|{{Pkg|mate-applet-dock}}}}<br />
* {{App|Online Radio Applet|A MATE panel applet to let you play your favourite online radio station with a single click.|http://www.zavedil.com/online-radio-applet/|{{Pkg|mate-applet-streamer}}}}<br />
* {{App|MATE Menu|Advanced menu for MATE Panel, a fork of MintMenu.|https://github.com/ubuntu-mate/mate-menu|{{AUR|mate-menu}}}}<br />
* {{App|MATE Tweak|Tweak tool for MATE, a fork of mintDesktop.|https://github.com/ubuntu-mate/mate-tweak|{{AUR|mate-tweak}}}}<br />
* {{App|BriskMenu|Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.|https://github.com/solus-project/brisk-menu|{{AUR|brisk-menu}}}}<br />
<br />
Additional packages need to be installed to take advantage of some of Caja's advanced features - see [[File manager functionality]].<br />
<br />
=== MATE unstable ===<br />
<br />
Consider the following community efforts, cf. [https://bbs.archlinux.org/viewtopic.php?pid=1624557#p1624557 forum]:<br />
<br />
* {{AUR|mate-desktop-dev}} (https://github.com/nicman23/arch_mate)<br />
<br />
== Starting MATE ==<br />
<br />
Choose ''MATE'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start MATE with ''startx'', append {{ic|exec mate-session}} to your {{ic|~/.xinitrc}} file. See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Configuration ==<br />
<br />
MATE can be configured with its ''Control Center'' application (''mate-control-center'') provided by the {{Pkg|mate-control-center}} package. To manage some hardware, you may need to install additional tools.<br />
<br />
; Audio<br />
: [[ALSA]] and [[PulseAudio]] backends are supported by the {{Pkg|mate-media}} package.<br />
; Bluetooth<br />
: For [[Bluetooth]] device support, install the {{Pkg|blueman}} package. See [[Blueman]].<br />
; Networking<br />
: For configuring the network, install the {{Pkg|network-manager-applet}} package. See [[NetworkManager]].<br />
; Power<br />
: UPower backend is supported by the {{Pkg|mate-power-manager}} package.<br />
; Printers<br />
: For configuring the printers, install the {{Pkg|system-config-printer}} package.<br />
<br />
=== Accessibility ===<br />
<br />
MATE is well suited for use by individuals with sight or mobility impairment. [[Install]] {{Pkg|orca}}, {{Pkg|espeak}} (Screen reader for individuals who are blind or visually impaired) and {{Pkg|onboard}} (On-screen keyboard useful for mobility impaired users) <br />
<br />
Before starting MATE for the first time, enter the following command as the user who needs accessibility features:<br />
<br />
$ gsettings set org.mate.interface accessibility true<br />
<br />
Once you start MATE, you can configure the accessibility applications via ''System > Preferences > Assistive Technologies'', although if you need Orca, you will need to run it from the {{ic|Alt-F2}} run window in order to start getting speech.<br />
<br />
=== Notifications ===<br />
<br />
;Battery discharge<br />
<br />
To disable the notification on battery discharge, run:<br />
<br />
$ gsettings set org.mate.power-manager.notify-discharging false<br />
<br />
;Brightness<br />
<br />
See [[Backlight#Kernel command-line options]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enabling/disabling compositing ===<br />
<br />
Compositing is enabled by default. To otherwise enable or disable it navigate to run ''System > Preferences > Look and Feel > Windows > General'' and click the tick box alongside ''Enable software compositing window manager''. Alternatively, e.g. to enable it, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general compositing-manager true<br />
<br />
=== Enabling new window centering ===<br />
<br />
By default, new windows are placed in the top-left corner. To center new windows on creation navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Center new windows''. Alternatively, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general center-new-windows true<br />
<br />
=== Enabling window snapping ===<br />
<br />
Window snapping is not be enabled by default, to enable it navigate to run ''System > Preferences > Windows > Placement'' and click the tick box alongside ''Enable side by side tiling''. Alternatively, you can run the following from the terminal:<br />
<br />
$ gsettings set org.mate.Marco.general allow-tiling true<br />
<br />
=== Undecorating maximized windows ===<br />
<br />
Hiding the decorations of maximized windows is possible with the {{AUR|mate-tweak}} tool: After installing it, navigate to ''System > Preferences > Look and Feel > MATE Tweak > Windows'' and enable ''Undecorate maximized windows'' in the ''Window Behaviour'' section.<br />
{{Tip|If this option is grayed out and unavailable, try installing the {{Grp|mate-extra}} group.}}<br />
<br />
=== Show or hide desktop icons ===<br />
<br />
By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using {{ic|gsettings}}.<br />
<br />
==== Hide all desktop icons ====<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
Doing so may cause some graphics artifacts on secondary monitors.<br />
<br />
==== Hide individual icons ====<br />
<br />
Hide computer icon:<br />
<br />
$ gsettings set org.mate.caja.desktop computer-icon-visible false<br />
<br />
Hide user directory icon:<br />
<br />
$ gsettings set org.mate.caja.desktop home-icon-visible false<br />
<br />
Hide network icon:<br />
<br />
$ gsettings set org.mate.caja.desktop network-icon-visible false<br />
<br />
Hide trash icon:<br />
<br />
$ gsettings set org.mate.caja.desktop trash-icon-visible false<br />
<br />
Hide mounted volumes:<br />
<br />
$ gsettings set org.mate.caja.desktop volumes-visible false<br />
<br />
Replace {{ic|false}} with {{ic|true}} for the icons to reappear.<br />
<br />
=== Use a different window manager ===<br />
<br />
The ''marco'' window manager can be replaced with another window manager via either of the following methods:<br />
<br />
;Using gsettings (recommended)<br />
Execute the following to specify a different window manager for MATE:<br />
<br />
$ gsettings set org.mate.session.required-components windowmanager ''wm-name''<br />
<br />
;Using MATE session autostart<br />
You can autostart a window manager of your choice using ''mate-session-properties''. This means that the autostarted window manager will replace the default window manager at login. Navigate to ''System'' -> ''Preferences'' -> ''Startup Applications''. In the dialog click ''Add.'' The command should take the syntax {{ic|''wm-name'' --replace}}.<br />
<br />
=== Prevent Caja from managing the desktop ===<br />
<br />
To prevent Caja from managing the desktop, execute the following:<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
$ killall caja # Caja will be restarted by session manager<br />
<br />
=== Change window decoration button order ===<br />
<br />
You can change the button order using the graphical dconf-editor or the gsettings command line tool:<br />
<br />
$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'<br />
<br />
and put '''menu''', '''close''', '''minimize''' and '''maximize''' in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.<br />
<br />
=== Auto open file manager after drive mount ===<br />
<br />
By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:<br />
<br />
$ gsettings set org.mate.media-handling automount-open false<br />
<br />
And to disable automounting:<br />
<br />
$ gsettings set org.mate.media-handling automount false<br />
<br />
=== Screensaver ===<br />
<br />
MATE uses {{pkg|mate-screensaver}} to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the {{AUR|mate-screensaver-hacks}} package. This will allow you to use [[XScreenSaver]] screensavers with {{pkg|mate-screensaver}}.<br />
<br />
=== Spatial view in Caja ===<br />
<br />
To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:<br />
$ gsettings set org.mate.caja.preferences always-use-browser false<br />
<br />
=== Change font DPI setting ===<br />
<br />
You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing ''Change desktop background > Fonts > Details > Resolution''.<br />
<br />
=== Change applications menu icon ===<br />
<br />
By default, the applications menu icon is set to {{ic|start-here}}. To use a different icon, copy your icon to a folder such as {{ic|/usr/local/share/pixmaps}} and execute the following:<br />
$ gsettings set org.mate.panel.menubar icon-name ''icon''<br />
where ''icon'' is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.<br />
<br />
=== Panel speed settings ===<br />
<br />
;Hide/Unhide delay<br />
To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/(un)hide-delay ''time''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''time'' is a value in miliseconds, e.g. 300.<br />
<br />
;Animation speed<br />
To set the speed at which panel animations occur, execute the following:<br />
$ dconf write /org/mate/panel/toplevels/''panel''/animation-speed ''value''<br />
where ''panel'' is either ''top'' or ''bottom'' and ''value'' is either {{ic|"'fast'"}}, {{ic|"'medium'"}} or {{ic|"'slow'"}}.<br />
<br />
=== Set the terminal for caja-open-terminal ===<br />
<br />
The {{ic|caja-open-terminal}} extension uses GSettings to determine which terminal to use - ''mate-terminal'' is the default. To change the terminal that will be used, run the following command<br />
<br />
$ gsettings set org.mate.applications-terminal exec ''my-terminal''<br />
<br />
where ''my-terminal'' is the name of the terminal executable to be launched, for example: ''xterm''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Toggling compositing ===<br />
<br />
Some software may have issues rendering graphics when working on an environment using the nvidia proprietary drivers and a compositing window manager.<br />
<br />
To easily toggle the compositing feature, save the following script somewhere within the Home directory, e.g. {{ic|~/.scripts/compositing.sh}}:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]<br />
then<br />
gsettings set org.mate.Marco.general compositing-manager false<br />
else<br />
gsettings set org.mate.Marco.general compositing-manager true<br />
fi<br />
</nowiki>}}<br />
<br />
and then create a custom keyboard shortcut that executes the file, e.g. {{ic|Ctrl+Alt+C}}, to {{ic|sh ~/.scripts/compositing.sh}}.<br />
<br />
=== Vertical sync for compositing ===<br />
<br />
Mate's window manager, ''marco'', supports tear-free software compositing via DRI3/Xpresent. [https://github.com/mate-desktop/marco/issues/326]<br />
<br />
If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), ''marco'' does not support vertical synchronization via ''OpenGL'', which may cause video tearing with enabled compositing. [https://github.com/mate-desktop/marco/issues/91] In this case, consider a different [[composite manager]] with OpenGL support such as [[Compton]].<br />
<br />
=== Consistent cursor theme ===<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
=== Use of gradient backgrounds with LightDM ===<br />
<br />
If you wish to use the default MATE (1.8) ''Stripes'' background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting {{ic|/org/mate/desktop/background/show-desktop-icons}} to {{ic|false}}, either through the {{ic|dconf-editor}} tool available from the {{ic|System Tools}} menu or by running<br />
<br />
$ gsettings set org.mate.background show-desktop-icons false<br />
<br />
from the Alt-F2 {{ic|Run Application}} dialog, then running {{ic|killall mate-panel}} from said dialog and hitting {{ic|Print Screen}} before the panel reappears. You are then presented with a {{ic|Save As}} dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run<br />
<br />
$ gsettings set org.mate.background show-desktop-icons true<br />
<br />
to have your desktop icons reappear, if desired.<br />
<br />
=== Enabling panel shadow ===<br />
<br />
Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [https://github.com/mate-desktop/mate-panel/issues/193] <br />
<br />
Copy {{ic|/usr/share/applications/marco.desktop}} and add a delay:<br />
<br />
{{hc|~/.local/share/applications/marco.desktop|2=<br />
X-MATE-Autostart-Phase='''Applications'''<br />
'''X-MATE-Autostart-Delay=2'''<br />
X-MATE-Provides=windowmanager<br />
X-MATE-Autostart-Notify=true<br />
}}<br />
<br />
{{Note|Delays are only allowed in the applications phase, hence {{ic|X-MATE-Autostart-Phase}} must be set to {{ic|Applications}}.}}<br />
<br />
If this has no effect, increase the delay duration.<br />
<br />
=== Disabling scroll in taskbar ===<br />
<br />
A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.<br />
<br />
Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching {{Pkg|libwnck3}} using the [[Arch Build System]]; in this case, rebuild libwnck3 with the following [https://pastebin.com/raw/q66p3dtj patch]. For more information on rebuilding packages with patches applied, see [[Patching in ABS#Applying patches]].<br />
<br />
=== Logout/shutdown delayed by at-spi-registryd ===<br />
<br />
When logging out or shutting down, you may find that you are presented with an ''A program is still running: at-spi-registryd.desktop'' popup. As a workaround, you can prevent ''at-spi-registryd'' from starting - see [[GTK+#Suppress warning about accessibility bus]] - though this may have an effect on some accessibility features.<br />
<br />
=== Caja's text file preview ===<br />
<br />
Since the migration to GTK+3 this feature is not working.[https://github.com/mate-desktop/caja/issues/1047]<br />
<br />
== See also ==<br />
<br />
* [https://mate-desktop.org MATE homepage]<br />
* [https://wiki.mate-desktop.org/archlinux_custom_repo MATE wiki for Arch Linux]<br />
* [https://mate-desktop.org/gallery/1.8/ MATE desktop screenshots]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1018647 The MATE Desktop Environment] - Arch Linux forum discussion about MATE</div>Ounrhttps://wiki.archlinux.org/index.php?title=Power_management/Suspend_and_hibernate&diff=570717Power management/Suspend and hibernate2019-04-07T22:31:28Z<p>Ounr: Unless the power cord is unplugged, system still consumes some power. Linked to relevant Wikipedia article.</p>
<hr />
<div>[[Category:Power management]]<br />
[[es:Power management/Suspend and hibernate]]<br />
[[ja:サスペンドとハイバネート]]<br />
[[ru:Power management/Suspend and hibernate]]<br />
[[zh-hans:Power management/Suspend and hibernate]]<br />
{{Related articles start}}<br />
{{Related|Uswsusp}}<br />
{{Related|systemd}}<br />
{{Related|Power management}}<br />
{{Related articles end}}<br />
<br />
Currently there are three methods of suspending available: '''suspend to RAM''' (usually called just '''suspend'''), '''suspend to disk''' (usually known as '''hibernate'''), and '''hybrid suspend''' (sometimes aptly called '''suspend to both'''):<br />
<br />
* '''Suspend to RAM''' method cuts power to most parts of the machine aside from the RAM, which is required to restore the machine's state. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time).<br />
<br />
* '''Suspend to disk''' method saves the machine's state into [[swap space]] and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is [[Wikipedia:Standby power|zero]] power consumption.<br />
<br />
* '''Suspend to both''' method saves the machine's state into swap space, but does not power off the machine. Instead, it invokes usual suspend to RAM. Therefore, if the battery is not depleted, the system can resume from RAM. If the battery is depleted, the system can be resumed from disk, which is much slower than resuming from RAM, but the machine's state has not been lost.<br />
<br />
There are multiple low level interfaces (backends) providing basic functionality, and some high level interfaces providing tweaks to handle problematic hardware drivers/kernel modules (e.g. video card re-initialization).<br />
<br />
== Low level interfaces ==<br />
<br />
Though these interfaces can be used directly, it is advisable to use some of [[#High level interfaces|high level interfaces]] to suspend/hibernate. Using low level interfaces directly is significantly faster than using any high level interface, since running all the pre- and post-suspend hooks takes time, but hooks can properly set hardware clock, restore wireless etc.<br />
<br />
=== kernel (swsusp) ===<br />
<br />
The most straightforward approach is to directly inform the in-kernel software suspend code (swsusp) to enter a suspended state; the exact method and state depends on the level of hardware support. On modern kernels, writing appropriate strings to {{ic|/sys/power/state}} is the primary mechanism to trigger this suspend.<br />
<br />
See [https://www.kernel.org/doc/Documentation/power/states.txt kernel documentation] for details.<br />
<br />
=== uswsusp ===<br />
<br />
The uswsusp ('Userspace Software Suspend') is a wrapper around the kernel's suspend-to-RAM mechanism, which performs some graphics adapter manipulations from userspace before suspending and after resuming.<br />
<br />
See main article [[Uswsusp]].<br />
<br />
== High level interfaces ==<br />
<br />
The end goal of these packages is to provide binaries/scripts that can be invoked to perform suspend/hibernate. Actually hooking them up to power buttons or menu clicks or laptop lid events is usually left to other tools. To automatically suspend/hibernate on certain power events, such as laptop lid close or battery depletion percentage, you may want to look into running [[Acpid]].<br />
<br />
=== systemd ===<br />
<br />
[[systemd]] provides native commands for suspend, hibernate and a hybrid suspend, see [[Power management#Power management with systemd]] for details. This is the default interface used in Arch Linux.<br />
<br />
See [[Power management#Sleep hooks]] for additional information on configuring suspend/hibernate hooks. Also see {{man|1|systemctl}}, {{man|8|systemd-sleep}}, and {{man|7|systemd.special}}.<br />
<br />
== Hibernation ==<br />
<br />
In order to use hibernation, you need to create a [[swap]] partition or file. You will need to point the kernel to your swap using the {{ic|1=resume=}} kernel parameter, which is configured via the boot loader. You will also need to [[#Configure the initramfs|configure the initramfs]]. This tells the kernel to attempt resuming from the specified swap in early userspace. These three steps are described in detail below.<br />
<br />
{{Note|See [[Dm-crypt/Swap encryption#With suspend-to-disk support]] when using [[encryption]].}}<br />
<br />
=== About swap partition/file size ===<br />
<br />
Even if your swap partition is smaller than RAM, you still have a big chance of hibernating successfully. According to [https://www.kernel.org/doc/Documentation/power/interface.txt kernel documentation]:<br />
<br />
: ''{{ic|/sys/power/image_size}} controls the size of the image created by the suspend-to-disk mechanism. It can be written a string representing a non-negative integer that will be used as an upper limit of the image size, in bytes. The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number. However, if this turns out to be impossible, it will try to suspend anyway using the smallest image possible. In particular, if "0" is written to this file, the suspend image will be as small as possible. Reading from this file will display the current image size limit, which is set to 2/5 of available RAM by default.''<br />
<br />
You may either decrease the value of {{ic|/sys/power/image_size}} to make the suspend image as small as possible (for small swap partitions), or increase it to possibly speed up the hibernation process.<br />
<br />
See [[Systemd#Temporary files]] to make this change persistent.<br />
<br />
=== Required kernel parameters ===<br />
<br />
The kernel parameter {{ic|1=resume=''swap_partition''}} has to be used. Either the name the kernel assigns to the partition or its [[UUID]] can be used as {{ic|''swap_partition''}}. For example:<br />
<br />
* {{ic|1=resume=/dev/sda1}}<br />
* {{ic|1=resume=UUID=4209c845-f495-4c43-8a03-5363dd433153}}<br />
* {{ic|1=resume=/dev/archVolumeGroup/archLogicVolume}} -- example if using LVM<br />
<br />
Generally, the naming method used for the {{ic|resume}} parameter should be the same as used for the {{ic|root}} parameter.<br />
<br />
The configuration depends on the used [[boot loader]], refer to [[Kernel parameters]] for details.<br />
<br />
==== Hibernation into swap file ====<br />
<br />
{{Warning|[[Btrfs#Swap file|Btrfs]] on Linux kernel before version 5.0 does not support swap files. Failure to heed this warning may result in file system corruption. While a swap file may be used on Btrfs when mounted through a loop device, this will result in severely degraded swap performance.}}<br />
<br />
Using a swap file instead of a swap partition requires an additional kernel parameter {{ic|1=resume_offset=''swap_file_offset''}}.<br />
<br />
The value of {{ic|''swap_file_offset''}} can be obtained by running {{ic|filefrag -v ''swap_file''}}, the output is in a table format and the required value is located in the first row of the {{ic|physical_offset}} column. For example:<br />
<br />
{{hc|# filefrag -v /swapfile|<nowiki><br />
Filesystem type is: ef53<br />
File size of /swapfile is 4294967296 (1048576 blocks of 4096 bytes)<br />
ext: logical_offset: physical_offset: length: expected: flags:<br />
0: 0.. 0: 38912.. 38912: 1: <br />
1: 1.. 22527: 38913.. 61439: 22527: unwritten<br />
2: 22528.. 53247: 899072.. 929791: 30720: 61440: unwritten<br />
...<br />
</nowiki>}}<br />
<br />
In the example the value of {{ic|''swap_file_offset''}} is the first {{ic|38912}} with the two periods.<br />
<br />
{{Tip|The following command may be used to identify {{ic|''swap_file_offset''}}: {{ic|1=filefrag -v /swapfile {{!}} awk '{ if($1=="0:"){print $4} }'}}.}}<br />
<br />
{{Note|<br />
* Before the first hibernation, a reboot is required to activate the feature.<br />
* The value of {{ic|''swap_file_offset''}} can also be obtained by running {{ic|swap-offset ''swap_file''}}. The ''swap-offset'' binary is provided within the set of tools [[uswsusp]]. If using this method, then these two parameters have to be provided in {{ic|/etc/suspend.conf}} via the keys {{ic|resume device}} and {{ic|resume offset}}. No reboot is required in this case.<br />
<br />
}}<br />
<br />
{{Tip|You might want to decrease the [[Swap#Swappiness]] for your swapfile if the only purpose is to be able to hibernate and not expand RAM.}}<br />
<br />
=== Configure the initramfs ===<br />
<br />
* When an [[initramfs]] with the {{ic|base}} hook is used, which is the default, the {{ic|resume}} hook is required in {{ic|/etc/mkinitcpio.conf}}. Whether by label or by UUID, the swap partition is referred to with a udev device node, so the {{ic|resume}} hook must go ''after'' the {{ic|udev}} hook. This example was made starting from the default hook configuration:<br />
<br />
:{{bc|1=HOOKS=(base udev autodetect keyboard modconf block filesystems '''resume''' fsck)}}<br />
<br />
:Remember to [[regenerate the initramfs]] for these changes to take effect.<br />
<br />
:{{Note|[[LVM]] users should add the {{ic|resume}} hook after {{ic|lvm2}}.}}<br />
<br />
* When an initramfs with the {{ic|systemd}} hook is used, a resume mechanism is already provided, and no further hooks need to be added.<br />
<br />
== Troubleshooting ==<br />
<br />
=== ACPI_OS_NAME ===<br />
<br />
You might want to tweak your '''DSDT table''' to make it work. See [[DSDT]] article<br />
<br />
=== VAIO users ===<br />
<br />
{{Move|Laptop/Sony|Hardware specific problem.}}<br />
<br />
Add the [[kernel parameter]] {{ic|1=acpi_sleep=nonvs}} to your bootloader.<br />
<br />
=== Suspend/hibernate doesn't work, or not consistently ===<br />
<br />
There have been many reports about the screen going black without easily viewable errors or the ability to do anything when going into and coming back from suspend and/or hibernate. These problems have been seen on both laptops and desktops. This is not an official solution, but switching to an older kernel, especially the LTS-kernel, will probably fix this.<br />
<br />
Also problem may arise when using hardware watchdog timer (disabled by default, see {{ic|1=RuntimeWatchdogSec=}} in {{man|5|systemd-system.conf|OPTIONS}}). Bugged watchdog timer may reset the computer before the system finished creating the hibernation image.<br />
<br />
Sometimes the screen goes black due to device initialization from within the initramfs. Removing any modules you might have in [[Mkinitcpio#MODULES]] and rebuilding the initramfs, can possibly solve this issue, specially graphics drivers for [[Kernel_mode_setting#Early_KMS_start|early KMS]]. Initializing such devices before resuming can cause inconsistencies that prevents the system resuming from hibernation. This does not affect resuming from RAM. Also, check the blog article [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues best practices to debug suspend issues].<br />
<br />
For Intel graphics drivers, enabling early KMS may help to solve the blank screen issue. Refer to [[Kernel mode setting#Early KMS start]] for details.<br />
<br />
After upgrading to kernel 4.15.3, resume may fail with a static (non-blinking) cursor on a black screen. [[Blacklisting]] the module {{ic|nvidiafb}} might help. [https://bbs.archlinux.org/viewtopic.php?id=234646]<br />
<br />
=== Wake-on-LAN ===<br />
<br />
If [[Wake-on-LAN]] is active, the network interface card will consume power even if the computer is hibernated.<br />
<br />
=== Instantaneous wakeups from suspend ===<br />
<br />
For some Intel Haswell systems with the LynxPoint and LynxPoint-LP chipset, instantaneous wakeups after suspend are reported. They are linked to erroneous BIOS ACPI implementations and how the {{ic|xhci_hcd}} module interprets it during boot. As a work-around reported affected systems are added to a blacklist (named {{ic|XHCI_SPURIOUS_WAKEUP}}) by the kernel case-by-case.[https://bugzilla.kernel.org/show_bug.cgi?id=66171#c6] <br />
<br />
Instantaneous resume may happen, for example, if a USB device is plugged during suspend and ACPI wakeup triggers are enabled. A viable work-around for such a system, if it is not on the blacklist yet, is to disable the wakeup triggers. An example to disable wakeup through USB is described as follows.[https://bbs.archlinux.org/viewtopic.php?pid=1575617] <br />
<br />
To view the current configuration:<br />
<br />
{{hc|$ cat /proc/acpi/wakeup|<br />
Device S-state Status Sysfs node<br />
...<br />
EHC1 S3 *enabled pci:0000:00:1d.0<br />
EHC2 S3 *enabled pci:0000:00:1a.0<br />
XHC S3 *enabled pci:0000:00:14.0<br />
...<br />
}}<br />
<br />
The relevant devices are {{ic|EHC1}}, {{ic|EHC2}} and {{ic|XHC}} (for USB 3.0). To toggle their state you have to echo the device name to the file as root.<br />
<br />
# echo EHC1 > /proc/acpi/wakeup<br />
# echo EHC2 > /proc/acpi/wakeup<br />
# echo XHC > /proc/acpi/wakeup<br />
<br />
This should result in suspension working again. However, this settings are only temporary and would have to be set at every reboot. To automate this take a look at [[systemd#Writing unit files]]. See [https://bbs.archlinux.org/viewtopic.php?pid=1575617#p1575617 BBS thread] for a possible solution and more information.<br />
<br />
If you use {{ic|nouveau}} driver, the reason of instantaneous wakeup may be a bug in that driver, which sometimes prevents graphics card from suspension. One possible workaround is unloading {{ic|nouveau}} kernel module right before going to sleep and loading it back after wakeup. To do this, create the following script:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/10-nouveau.sh|2=<br />
#!/bin/bash<br />
<br />
case $1/$2 in<br />
pre/*)<br />
# echo "Going to $2..."<br />
/usr/bin/echo "0" > /sys/class/vtconsole/vtcon1/bind<br />
/usr/bin/rmmod nouveau<br />
;;<br />
post/*)<br />
# echo "Waking up from $2..."<br />
/usr/bin/modprobe nouveau<br />
/usr/bin/echo "1" > /sys/class/vtconsole/vtcon1/bind<br />
;;<br />
esac<br />
}}<br />
<br />
The first echo line unbinds nouveaufb from the framebuffer console driver (fbcon). Usually it is {{ic|vtcon1}} as in this example, but it may also be another {{ic|vtcon*}}. See {{ic|/sys/class/vtconsole/vtcon*/name}} which one of them is a "frame buffer device" [https://nouveau.freedesktop.org/wiki/KernelModeSetting/].<br />
<br />
=== System does not power off when hibernating ===<br />
<br />
When you hibernate your system, the system should power off (after saving the state on the disk). Sometimes, you might see the power LED is still glowing. If that happens, it might be instructive to set the {{ic|HibernateMode}} to {{ic|shutdown}} in {{man|5|sleep.conf.d}}:<br />
<br />
{{hc|/etc/systemd/sleep.conf.d/hibernatemode.conf|2=<br />
[Sleep]<br />
HibernateMode=shutdown<br />
}}<br />
<br />
With the above configuration, if every thing else is setup correctly, on invocation of a {{ic|systemctl hibernate}} the machine will shutdown saving state to disk as it does so.</div>Ounrhttps://wiki.archlinux.org/index.php?title=Fonts&diff=570281Fonts2019-03-31T15:47:22Z<p>Ounr: /* Set terminal font on-the-fly */ Removed part of the expansion request that asked for example virtual terminals making use of X resources. Relevant edit: https://wiki.archlinux.org/index.php?title=Fonts&diff=prev&oldid=570280</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[zh-hans:Fonts]]<br />
[[zh-hant:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Linux console#Fonts}}<br />
{{Related|Java Runtime Environment fonts}}<br />
{{Related|Metric-compatible fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font]]: "A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats."<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Bitmap formats ===<br />
<br />
* [[Wikipedia:Glyph Bitmap Distribution Format|Bitmap Distribution Format]] (BDF) by Adobe<br />
* [[Wikipedia:Portable Compiled Format|Portable Compiled Format]] (PCF) by Xorg<br />
* [[Wikipedia:PC Screen Font|PC Screen Font]] (PSF) used by the Kernel for console fonts, not supported by Xorg (for Unicode PSF files the extension is {{ic|psfu}})<br />
<br />
These formats can also be gzipped. See [[#Bitmap]] for the available bitmap fonts.<br />
<br />
=== Outline formats ===<br />
<br />
* [[Wikipedia:PostScript fonts|PostScript fonts]] by Adobe – has various formats, e.g: Printer Font ASCII (PFA) and Printer Font Binary (PFB)<br />
* [[Wikipedia:TrueType|TrueType]] by Apple and Microsoft (file extension: {{ic|ttf}})<br />
* [[Wikipedia:OpenType|OpenType]] by Microsoft, built on TrueType (file extensions: {{ic|otf}}, {{ic|ttf}})<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
[https://fontforge.github.io/en-US/ FontForge] ({{Pkg|fontforge}}), a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]].<br />
<br />
Available fonts may be found by [[pacman#Querying package databases|querying packages]] (e.g. for {{ic|font}} or {{ic|ttf}}).<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. The packages to install fonts are particularly similar; simply taking an existing [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/adobe-source-code-pro-fonts package] as template should work well. To learn about how to modify it for your font, please refer to [[Creating packages]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library does this)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or <br />
Wikipedia pages for detail.<br />
<br />
The [https://github.com/ternstor/distrofonts Archfonts Python script] can be used to generate an overview of all the TTF fonts found in the official repositories / the AUR (the image generation is done using {{AUR|ttf2png}}).<br />
<br />
=== Bitmap ===<br />
<br />
* Default 8x16<br />
* [http://www.dcmembers.com/jibsen/download/61/ Dina] ({{Pkg|dina-font}}) – 6pt, 8pt, 9pt, 10pt, monospaced, based on Proggy<br />
* [http://openlab.jp/efont/unicode/ Efont] ({{AUR|efont-unicode-bdf}}) – 10px, 12px, 14px, 16px, 24px, normal, bold and italic<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}}) – 11px, 14px, normal and bold<br />
* [http://artwizaleczapka.sourceforge.net/ Lime] ({{Pkg|artwiz-fonts}})<br />
* [http://tobiasjung.name/profont/ ProFont] ({{AUR|ttf-profont-iix}}) – 10px, 11px, 12px, 15px, 17px, 22px, 29px, normal<br />
* [[Wikipedia:Proggy programming fonts|Proggy]] ({{AUR|proggyfonts}}) – has different variants<br />
* [http://www.fial.com/~scott/tamsyn-font/ Tamsyn] ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* [http://unifoundry.com/unifont.html Unifont] ([[Wikipedia:Unicode font#Comparison of fonts|most extensive]] Unicode coverage of any font) ({{Pkg|bdf-unifont}})<br />
<br />
=== Latin script ===<br />
<br />
==== Families ====<br />
<br />
* [[Wikipedia:Luxi fonts|Luxi fonts]] ({{Pkg|font-bh-ttf}}) – X.Org Luxi fonts<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera]] ({{Pkg|ttf-bitstream-vera}}) – serif, sans-serif, and monospace<br />
* [https://quoteunquoteapps.com/courierprime/ Courier Prime] ({{AUR|ttf-courier-prime}}) – Courier font alternative optimized for screenplays<br />
* [[Wikipedia:Croscore fonts|Croscore fonts]] ({{Pkg|ttf-croscore}}) – Google's substitute for Windows' Arial, Times New Roman, and Courier New<br />
* [[Wikipedia:DejaVu fonts|DejaVu fonts]] ({{Pkg|ttf-dejavu}}) – Bitstream Vera modified for greater Unicode coverage<br />
* [[Wikipedia:Droid (font)|Droid]] ({{Pkg|ttf-droid}}) – default font for older Android versions<br />
* [[Wikipedia:Roboto|Roboto]] ({{Pkg|ttf-roboto}}) – default font for newer Android versions<br />
* [[Wikipedia:Noto fonts|Google Noto]] ({{Pkg|noto-fonts}}) – Unicode<br />
* [[Wikipedia:Liberation fonts|Liberation fonts]] ({{Pkg|ttf-liberation}}) – free metric-compatible substitute for the Arial, Arial Narrow, Times New Roman and Courier New fonts found in Windows and Microsoft Office products<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Microsoft fonts]] ({{AUR|ttf-ms-win10}}) – Windows 10 fonts<br />
Legacy Microsoft font packages:<br />
* [http://corefonts.sourceforge.net/ Microsoft fonts] ({{AUR|ttf-ms-fonts}}) – Andalé Mono, Courier New, Arial, Arial Black, Comic Sans, Impact, Lucida Sans, Microsoft Sans Serif, Trebuchet, Verdana, Georgia, Times New Roman<br />
* Vista fonts ({{AUR|ttf-vista-fonts}}) – Consolas, Calibri, Candara, Corbel, Cambria, Constantia<br />
<br />
==== Monospaced ====<br />
<br />
For more monospaced fonts see [[#Bitmap]] and [[#Families]].<br />
<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{pkg|ttf-fantasque-sans-mono}}, {{pkg|otf-fantasque-sans-mono}})<br />
* [[Wikipedia:Fira Sans|Fira Mono]] ({{pkg|ttf-fira-mono}}, {{pkg|otf-fira-mono}}) – designed for Firefox OS<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://sourcefoundry.org/hack/ Hack] ({{pkg|ttf-hack}}) - an open source monospaced font, used as the default in KDE Plasma<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - inspired by Consolas<br />
* [https://leonardo-m.livejournal.com/77079.html Inconsolata-g] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [https://be5invis.github.io/Iosevka/ Iosevka] ({{AUR|ttf-iosevka}}) – Iosevka is a slender monospace sans-serif and slab-serif typeface inspired by Pragmata Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Menlo (typeface)|Menlo]] (derivative: {{AUR|ttf-meslo}}) - default monospaced font of OS X<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - proprietary font designed by Apple for OS X<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [https://madmalik.github.io/mononoki Mononoki] ({{AUR|ttf-mononoki}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
Relevant websites:<br />
<br />
* [http://hivelogic.com/articles/top-10-programming-fonts Dan Benjamin's Top 10 Programming Fonts].<br />
* [http://www.lowing.org/fonts/ Trevor Lowing's font list]<br />
* [https://www.slant.co/topics/67/~what-are-the-best-programming-fonts Slant: What are the best programming fonts?]<br />
* [https://stackoverflow.com/questions/4689/recommended-fonts-for-programming Stack Overflow: Recommended fonts for programming]<br />
<br />
==== Sans-serif ====<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://github.com/rsms/inter Inter UI] ({{AUR|ttf-inter-ui}}) – designed for user interfaces<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}}) – free substitute for Times New Roman<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
<br />
==== Serif ====<br />
<br />
* [http://www.georgduffner.at/ebgaramond/ EB Garamond] ({{AUR|otf-eb-garamond}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
<br />
==== Unsorted ====<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including Ubuntu, Inconsolata, Roboto, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
<br />
=== Non-latin scripts ===<br />
<br />
==== Ancient Scripts ====<br />
<br />
* {{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
==== Arabic ====<br />
<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from [[wikipedia:SIL_International|SIL]]<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL (Alternative for Traditional Arabic font)<br />
<br />
==== Braille ====<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
*adobe source han fonts - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
**{{Pkg|adobe-source-han-sans-otc-fonts}} - Sans fonts<br />
**{{Pkg|adobe-source-han-serif-otc-fonts}} - Serif fonts<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
<br />
===== Chinese =====<br />
<br />
{{Move|Localization/Chinese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* adobe source han fonts<br />
** {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-serif-cn-fonts}} - Simplified Chinese OpenType/CFF Serif fonts<br />
** {{Pkg|adobe-source-han-serif-tw-fonts}} - Traditional Chinese OpenType/CFF Serif fonts<br />
<br />
* noto Chinese fonts<br />
** {{AUR|noto-fonts-sc}} - Noto CJK-SC fonts for Simplified Chinese<br />
** {{AUR|noto-fonts-tc}} - Noto CJK-TC fonts for Traditional Chinese<br />
<br />
* wqy fonts<br />
** {{Pkg|wqy-microhei}} - WenQuanYi Micro Hei font family (also known as Hei, Gothic or Dotum) is a sans-serif style derived from Droid Sans Fallback, it offers high quality CJK outline font and it is extremely compact (~5M).<br />
** {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
** {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font.<br />
<br />
* arphic fonts<br />
** {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
** {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese ttf fonts<br />
<br />
* Standart fonts of the Republic of China ministry of education in Taiwan<br />
** {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
** {{AUR|ttf-twcns-fonts}} Chinese TrueType fonts by Ministry of Education of Taiwan government, support CNS11643 standard, including Kai and Sung fontface.<br />
<br />
*Windows Chinese fonts<br />
**{{AUR|ttf-ms-win8-zh_cn}} - windows8 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win8-zh_tw}} - windows8 traditional Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_cn}} - windows10 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_tw}} - windows10 traditional Chinese fonts。<br />
<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface.<br />
<br />
===== Japanese =====<br />
<br />
{{Move|Localization/Japanese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
<br />
===== Korean =====<br />
<br />
{{Move|Localization/Korean#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-kopub}}/{{AUR|otf-kopub}} - Korean TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-kopubworld}}/{{AUR|otf-kopubworld}} - Multilingual (Korean, Yethangul, Chinese extended, Japanese, Latin extended, Cyrillic, Arabic, Hebrew, Devanagari) TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-unfonts-core-ibx}} - A collection of Korean TrueType fonts by KLDP<br />
<br />
===== Vietnamese =====<br />
<br />
* {{Pkg|ttf-hannom}} - Vietnamese TrueType font for chữ Nôm characters<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Latin script]].<br />
<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|opensiddur-hebrew-fonts}} - Large collection of Open-source licensed Hebrew fonts<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
{{Move|Localization/Indic#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont), provides the character [http://www.fileformat.info/info/unicode/char/ca0/index.htm U+0CA0] "ಠ"<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
* {{AUR|fonts-smc-malayalam}} - Malayalam Unicode Fonts released by 'Swathanthra Malayalam Computing' (contains 11 fonts).<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Mongolic and Tungusic ====<br />
<br />
* {{AUR|ttf-abkai}} - Fonts for Sibe, Manchu and Daur scripts (incomplete, currently in development)<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|persian-fonts}} - Meta package for installing all Persian fonts in AUR.<br />
* {{AUR|borna-fonts}} - Borna Rayaneh Co. Persian B font series.<br />
* {{AUR|iran-nastaliq-fonts}} - A free Unicode calligraphic Persian font.<br />
* {{AUR|iranian-fonts}} - Iranian-Sans and Iranian-Serif Persian font family.<br />
* {{AUR|ir-standard-fonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts.<br />
* {{AUR|persian-hm-ftx-fonts}} - A Persian font series derived from X Series 2, Metafont and FarsiTeX fonts with Kashida feature.<br />
* {{AUR|persian-hm-xs2-fonts}} - A Persian font series derived from X Series 2 fonts with Kashida feature.<br />
* {{AUR|sina-fonts}} - Sina Pardazesh Co. Persian font series.<br />
* {{AUR|gandom-fonts}}, {{AUR|parastoo-fonts}}, {{AUR|sahel-fonts}}, {{AUR|samim-fonts}}, {{AUR|shabnam-fonts}}, {{AUR|tanha-fonts}}, {{AUR|vazir-fonts}}, {{AUR|vazir-code-fonts}} - Beautiful Persian fonts made by Ali Rasti Kerdar.<br />
* {{AUR|ttf-yas}} - The Yas Persian font series (with '''hollow zero''').<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
<br />
==== Tai–Kadai ====<br />
<br />
* {{Pkg|fonts-tlwg}} - Collection of scalable Thai fonts<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Tibeto-Burman ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
=== Emoji and symbols ===<br />
<br />
A section of the Unicode standard is designated for pictographic characters called "emoji".<br />
<br />
* {{Pkg|noto-fonts-emoji}} - Google's own emoji font, like on Android or Google Hangouts.<br />
* {{AUR|ttf-symbola}} - provides many Unicode symbols, including emoji, in outline style.<br />
* {{AUR|ttf-emojione}} - Official colorful EmojiOne font.<br />
* {{AUR|ttf-emojione-color}} - a color and B&W emoji SVGinOT font built from EmojiOne.<br />
* {{AUR|ttf-twemoji-color}} - Twitter's open-sourced emoji glyphs.<br />
<br />
[[wikipedia:Emoticon#Japanese_style|Kaomoji]] are sometimes referred to as "Japanese emoticons" and are composed of characters from various character sets, including CJK and Indic fonts. For example, the following set of packages covers most of existing kaomoji: {{Pkg|ttf-freefont}}, {{Pkg|ttf-arphic-uming}}, and {{Pkg|ttf-indic-otf}}.<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{Pkg|texlive-core}} and {{Pkg|texlive-fontsextra}} contain many math fonts such as Latin Modern Math and [[Wikipedia:STIX Fonts project|STIX Fonts]]. See [[TeX Live#Making fonts available to Fontconfig]] for configuration.<br />
* {{AUR|otf-stix}} - A standalone, more recent version of STIX<br />
* {{Pkg|otf-latin-modern}}, {{Pkg|otf-latinmodern-math}} - Improved version of Computer Modern fonts as used in LaTeX<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
<br />
=== Other operating system fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Apple MacOS TrueType fonts<br />
<br />
See [[Metric-compatible fonts]], which lists available alternatives for [[Microsoft fonts]].<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for sans-serif and monospace as well. For more information, have a look at the fontconfig manual.<br />
<br />
See also [[Font configuration#Replace or set default fonts]].<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed Fontconfig fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Lists installed fonts for a particular language ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use [[X resources]], e.g. [[xterm]] or [[rxvt-unicode]], fonts can be set by using escape sequences. Specifically, {{ic|echo -e "\033]710;$font\007"}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} uses the same syntax as in {{ic|~/.Xresources}} and can be anything the terminal emulator will support. (Example: {{ic|1=xft:dejavu sans mono:size=9}})<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|~/.matplotlib/fontList.cache}}, <br />
{{ic|~/.cache/matplotlib/fontList.cache}}, {{ic|~/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]<br />
* [https://fontlibrary.org/en Font Library] - Fonts under Free licenses<br />
* [https://screenshots.debian.net/packages?search=fonts&show=with Fonts on screenshots.debian.net]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Fonts&diff=570280Fonts2019-03-31T15:20:52Z<p>Ounr: /* Set terminal font on-the-fly */ Added internal links to two example terminal emulators that makes use of X resources</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[zh-hans:Fonts]]<br />
[[zh-hant:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Linux console#Fonts}}<br />
{{Related|Java Runtime Environment fonts}}<br />
{{Related|Metric-compatible fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font]]: "A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats."<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Bitmap formats ===<br />
<br />
* [[Wikipedia:Glyph Bitmap Distribution Format|Bitmap Distribution Format]] (BDF) by Adobe<br />
* [[Wikipedia:Portable Compiled Format|Portable Compiled Format]] (PCF) by Xorg<br />
* [[Wikipedia:PC Screen Font|PC Screen Font]] (PSF) used by the Kernel for console fonts, not supported by Xorg (for Unicode PSF files the extension is {{ic|psfu}})<br />
<br />
These formats can also be gzipped. See [[#Bitmap]] for the available bitmap fonts.<br />
<br />
=== Outline formats ===<br />
<br />
* [[Wikipedia:PostScript fonts|PostScript fonts]] by Adobe – has various formats, e.g: Printer Font ASCII (PFA) and Printer Font Binary (PFB)<br />
* [[Wikipedia:TrueType|TrueType]] by Apple and Microsoft (file extension: {{ic|ttf}})<br />
* [[Wikipedia:OpenType|OpenType]] by Microsoft, built on TrueType (file extensions: {{ic|otf}}, {{ic|ttf}})<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
[https://fontforge.github.io/en-US/ FontForge] ({{Pkg|fontforge}}), a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]].<br />
<br />
Available fonts may be found by [[pacman#Querying package databases|querying packages]] (e.g. for {{ic|font}} or {{ic|ttf}}).<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. The packages to install fonts are particularly similar; simply taking an existing [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/adobe-source-code-pro-fonts package] as template should work well. To learn about how to modify it for your font, please refer to [[Creating packages]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library does this)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or <br />
Wikipedia pages for detail.<br />
<br />
The [https://github.com/ternstor/distrofonts Archfonts Python script] can be used to generate an overview of all the TTF fonts found in the official repositories / the AUR (the image generation is done using {{AUR|ttf2png}}).<br />
<br />
=== Bitmap ===<br />
<br />
* Default 8x16<br />
* [http://www.dcmembers.com/jibsen/download/61/ Dina] ({{Pkg|dina-font}}) – 6pt, 8pt, 9pt, 10pt, monospaced, based on Proggy<br />
* [http://openlab.jp/efont/unicode/ Efont] ({{AUR|efont-unicode-bdf}}) – 10px, 12px, 14px, 16px, 24px, normal, bold and italic<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}}) – 11px, 14px, normal and bold<br />
* [http://artwizaleczapka.sourceforge.net/ Lime] ({{Pkg|artwiz-fonts}})<br />
* [http://tobiasjung.name/profont/ ProFont] ({{AUR|ttf-profont-iix}}) – 10px, 11px, 12px, 15px, 17px, 22px, 29px, normal<br />
* [[Wikipedia:Proggy programming fonts|Proggy]] ({{AUR|proggyfonts}}) – has different variants<br />
* [http://www.fial.com/~scott/tamsyn-font/ Tamsyn] ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* [http://unifoundry.com/unifont.html Unifont] ([[Wikipedia:Unicode font#Comparison of fonts|most extensive]] Unicode coverage of any font) ({{Pkg|bdf-unifont}})<br />
<br />
=== Latin script ===<br />
<br />
==== Families ====<br />
<br />
* [[Wikipedia:Luxi fonts|Luxi fonts]] ({{Pkg|font-bh-ttf}}) – X.Org Luxi fonts<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera]] ({{Pkg|ttf-bitstream-vera}}) – serif, sans-serif, and monospace<br />
* [https://quoteunquoteapps.com/courierprime/ Courier Prime] ({{AUR|ttf-courier-prime}}) – Courier font alternative optimized for screenplays<br />
* [[Wikipedia:Croscore fonts|Croscore fonts]] ({{Pkg|ttf-croscore}}) – Google's substitute for Windows' Arial, Times New Roman, and Courier New<br />
* [[Wikipedia:DejaVu fonts|DejaVu fonts]] ({{Pkg|ttf-dejavu}}) – Bitstream Vera modified for greater Unicode coverage<br />
* [[Wikipedia:Droid (font)|Droid]] ({{Pkg|ttf-droid}}) – default font for older Android versions<br />
* [[Wikipedia:Roboto|Roboto]] ({{Pkg|ttf-roboto}}) – default font for newer Android versions<br />
* [[Wikipedia:Noto fonts|Google Noto]] ({{Pkg|noto-fonts}}) – Unicode<br />
* [[Wikipedia:Liberation fonts|Liberation fonts]] ({{Pkg|ttf-liberation}}) – free metric-compatible substitute for the Arial, Arial Narrow, Times New Roman and Courier New fonts found in Windows and Microsoft Office products<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Microsoft fonts]] ({{AUR|ttf-ms-win10}}) – Windows 10 fonts<br />
Legacy Microsoft font packages:<br />
* [http://corefonts.sourceforge.net/ Microsoft fonts] ({{AUR|ttf-ms-fonts}}) – Andalé Mono, Courier New, Arial, Arial Black, Comic Sans, Impact, Lucida Sans, Microsoft Sans Serif, Trebuchet, Verdana, Georgia, Times New Roman<br />
* Vista fonts ({{AUR|ttf-vista-fonts}}) – Consolas, Calibri, Candara, Corbel, Cambria, Constantia<br />
<br />
==== Monospaced ====<br />
<br />
For more monospaced fonts see [[#Bitmap]] and [[#Families]].<br />
<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{pkg|ttf-fantasque-sans-mono}}, {{pkg|otf-fantasque-sans-mono}})<br />
* [[Wikipedia:Fira Sans|Fira Mono]] ({{pkg|ttf-fira-mono}}, {{pkg|otf-fira-mono}}) – designed for Firefox OS<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://sourcefoundry.org/hack/ Hack] ({{pkg|ttf-hack}}) - an open source monospaced font, used as the default in KDE Plasma<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - inspired by Consolas<br />
* [https://leonardo-m.livejournal.com/77079.html Inconsolata-g] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [https://be5invis.github.io/Iosevka/ Iosevka] ({{AUR|ttf-iosevka}}) – Iosevka is a slender monospace sans-serif and slab-serif typeface inspired by Pragmata Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Menlo (typeface)|Menlo]] (derivative: {{AUR|ttf-meslo}}) - default monospaced font of OS X<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - proprietary font designed by Apple for OS X<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [https://madmalik.github.io/mononoki Mononoki] ({{AUR|ttf-mononoki}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
Relevant websites:<br />
<br />
* [http://hivelogic.com/articles/top-10-programming-fonts Dan Benjamin's Top 10 Programming Fonts].<br />
* [http://www.lowing.org/fonts/ Trevor Lowing's font list]<br />
* [https://www.slant.co/topics/67/~what-are-the-best-programming-fonts Slant: What are the best programming fonts?]<br />
* [https://stackoverflow.com/questions/4689/recommended-fonts-for-programming Stack Overflow: Recommended fonts for programming]<br />
<br />
==== Sans-serif ====<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://github.com/rsms/inter Inter UI] ({{AUR|ttf-inter-ui}}) – designed for user interfaces<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}}) – free substitute for Times New Roman<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
<br />
==== Serif ====<br />
<br />
* [http://www.georgduffner.at/ebgaramond/ EB Garamond] ({{AUR|otf-eb-garamond}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
<br />
==== Unsorted ====<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including Ubuntu, Inconsolata, Roboto, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
<br />
=== Non-latin scripts ===<br />
<br />
==== Ancient Scripts ====<br />
<br />
* {{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
==== Arabic ====<br />
<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from [[wikipedia:SIL_International|SIL]]<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL (Alternative for Traditional Arabic font)<br />
<br />
==== Braille ====<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
*adobe source han fonts - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
**{{Pkg|adobe-source-han-sans-otc-fonts}} - Sans fonts<br />
**{{Pkg|adobe-source-han-serif-otc-fonts}} - Serif fonts<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
<br />
===== Chinese =====<br />
<br />
{{Move|Localization/Chinese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* adobe source han fonts<br />
** {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-serif-cn-fonts}} - Simplified Chinese OpenType/CFF Serif fonts<br />
** {{Pkg|adobe-source-han-serif-tw-fonts}} - Traditional Chinese OpenType/CFF Serif fonts<br />
<br />
* noto Chinese fonts<br />
** {{AUR|noto-fonts-sc}} - Noto CJK-SC fonts for Simplified Chinese<br />
** {{AUR|noto-fonts-tc}} - Noto CJK-TC fonts for Traditional Chinese<br />
<br />
* wqy fonts<br />
** {{Pkg|wqy-microhei}} - WenQuanYi Micro Hei font family (also known as Hei, Gothic or Dotum) is a sans-serif style derived from Droid Sans Fallback, it offers high quality CJK outline font and it is extremely compact (~5M).<br />
** {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
** {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font.<br />
<br />
* arphic fonts<br />
** {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
** {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese ttf fonts<br />
<br />
* Standart fonts of the Republic of China ministry of education in Taiwan<br />
** {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
** {{AUR|ttf-twcns-fonts}} Chinese TrueType fonts by Ministry of Education of Taiwan government, support CNS11643 standard, including Kai and Sung fontface.<br />
<br />
*Windows Chinese fonts<br />
**{{AUR|ttf-ms-win8-zh_cn}} - windows8 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win8-zh_tw}} - windows8 traditional Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_cn}} - windows10 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_tw}} - windows10 traditional Chinese fonts。<br />
<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface.<br />
<br />
===== Japanese =====<br />
<br />
{{Move|Localization/Japanese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
<br />
===== Korean =====<br />
<br />
{{Move|Localization/Korean#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-kopub}}/{{AUR|otf-kopub}} - Korean TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-kopubworld}}/{{AUR|otf-kopubworld}} - Multilingual (Korean, Yethangul, Chinese extended, Japanese, Latin extended, Cyrillic, Arabic, Hebrew, Devanagari) TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-unfonts-core-ibx}} - A collection of Korean TrueType fonts by KLDP<br />
<br />
===== Vietnamese =====<br />
<br />
* {{Pkg|ttf-hannom}} - Vietnamese TrueType font for chữ Nôm characters<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Latin script]].<br />
<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|opensiddur-hebrew-fonts}} - Large collection of Open-source licensed Hebrew fonts<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
{{Move|Localization/Indic#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont), provides the character [http://www.fileformat.info/info/unicode/char/ca0/index.htm U+0CA0] "ಠ"<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
* {{AUR|fonts-smc-malayalam}} - Malayalam Unicode Fonts released by 'Swathanthra Malayalam Computing' (contains 11 fonts).<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Mongolic and Tungusic ====<br />
<br />
* {{AUR|ttf-abkai}} - Fonts for Sibe, Manchu and Daur scripts (incomplete, currently in development)<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|persian-fonts}} - Meta package for installing all Persian fonts in AUR.<br />
* {{AUR|borna-fonts}} - Borna Rayaneh Co. Persian B font series.<br />
* {{AUR|iran-nastaliq-fonts}} - A free Unicode calligraphic Persian font.<br />
* {{AUR|iranian-fonts}} - Iranian-Sans and Iranian-Serif Persian font family.<br />
* {{AUR|ir-standard-fonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts.<br />
* {{AUR|persian-hm-ftx-fonts}} - A Persian font series derived from X Series 2, Metafont and FarsiTeX fonts with Kashida feature.<br />
* {{AUR|persian-hm-xs2-fonts}} - A Persian font series derived from X Series 2 fonts with Kashida feature.<br />
* {{AUR|sina-fonts}} - Sina Pardazesh Co. Persian font series.<br />
* {{AUR|gandom-fonts}}, {{AUR|parastoo-fonts}}, {{AUR|sahel-fonts}}, {{AUR|samim-fonts}}, {{AUR|shabnam-fonts}}, {{AUR|tanha-fonts}}, {{AUR|vazir-fonts}}, {{AUR|vazir-code-fonts}} - Beautiful Persian fonts made by Ali Rasti Kerdar.<br />
* {{AUR|ttf-yas}} - The Yas Persian font series (with '''hollow zero''').<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
<br />
==== Tai–Kadai ====<br />
<br />
* {{Pkg|fonts-tlwg}} - Collection of scalable Thai fonts<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Tibeto-Burman ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
=== Emoji and symbols ===<br />
<br />
A section of the Unicode standard is designated for pictographic characters called "emoji".<br />
<br />
* {{Pkg|noto-fonts-emoji}} - Google's own emoji font, like on Android or Google Hangouts.<br />
* {{AUR|ttf-symbola}} - provides many Unicode symbols, including emoji, in outline style.<br />
* {{AUR|ttf-emojione}} - Official colorful EmojiOne font.<br />
* {{AUR|ttf-emojione-color}} - a color and B&W emoji SVGinOT font built from EmojiOne.<br />
* {{AUR|ttf-twemoji-color}} - Twitter's open-sourced emoji glyphs.<br />
<br />
[[wikipedia:Emoticon#Japanese_style|Kaomoji]] are sometimes referred to as "Japanese emoticons" and are composed of characters from various character sets, including CJK and Indic fonts. For example, the following set of packages covers most of existing kaomoji: {{Pkg|ttf-freefont}}, {{Pkg|ttf-arphic-uming}}, and {{Pkg|ttf-indic-otf}}.<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{Pkg|texlive-core}} and {{Pkg|texlive-fontsextra}} contain many math fonts such as Latin Modern Math and [[Wikipedia:STIX Fonts project|STIX Fonts]]. See [[TeX Live#Making fonts available to Fontconfig]] for configuration.<br />
* {{AUR|otf-stix}} - A standalone, more recent version of STIX<br />
* {{Pkg|otf-latin-modern}}, {{Pkg|otf-latinmodern-math}} - Improved version of Computer Modern fonts as used in LaTeX<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
<br />
=== Other operating system fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Apple MacOS TrueType fonts<br />
<br />
See [[Metric-compatible fonts]], which lists available alternatives for [[Microsoft fonts]].<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for sans-serif and monospace as well. For more information, have a look at the fontconfig manual.<br />
<br />
See also [[Font configuration#Replace or set default fonts]].<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed Fontconfig fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Lists installed fonts for a particular language ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use [[X resources]], e.g. [[xterm]] or [[rxvt-unicode]], fonts can be set by using escape sequences. Specifically, {{ic|echo -e "\033]710;$font\007"}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} uses the same syntax as in {{ic|~/.Xresources}} and can be anything the terminal emulator will support. (Example: {{ic|1=xft:dejavu sans mono:size=9}})<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|~/.matplotlib/fontList.cache}}, <br />
{{ic|~/.cache/matplotlib/fontList.cache}}, {{ic|~/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]<br />
* [https://fontlibrary.org/en Font Library] - Fonts under Free licenses<br />
* [https://screenshots.debian.net/packages?search=fonts&show=with Fonts on screenshots.debian.net]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Fonts&diff=570275Fonts2019-03-31T15:09:19Z<p>Ounr: /* Set terminal font on-the-fly */ Replaced inline code that mentions X resources with an internal link to the article</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[zh-hans:Fonts]]<br />
[[zh-hant:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Linux console#Fonts}}<br />
{{Related|Java Runtime Environment fonts}}<br />
{{Related|Metric-compatible fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font]]: "A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats."<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Bitmap formats ===<br />
<br />
* [[Wikipedia:Glyph Bitmap Distribution Format|Bitmap Distribution Format]] (BDF) by Adobe<br />
* [[Wikipedia:Portable Compiled Format|Portable Compiled Format]] (PCF) by Xorg<br />
* [[Wikipedia:PC Screen Font|PC Screen Font]] (PSF) used by the Kernel for console fonts, not supported by Xorg (for Unicode PSF files the extension is {{ic|psfu}})<br />
<br />
These formats can also be gzipped. See [[#Bitmap]] for the available bitmap fonts.<br />
<br />
=== Outline formats ===<br />
<br />
* [[Wikipedia:PostScript fonts|PostScript fonts]] by Adobe – has various formats, e.g: Printer Font ASCII (PFA) and Printer Font Binary (PFB)<br />
* [[Wikipedia:TrueType|TrueType]] by Apple and Microsoft (file extension: {{ic|ttf}})<br />
* [[Wikipedia:OpenType|OpenType]] by Microsoft, built on TrueType (file extensions: {{ic|otf}}, {{ic|ttf}})<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
[https://fontforge.github.io/en-US/ FontForge] ({{Pkg|fontforge}}), a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]].<br />
<br />
Available fonts may be found by [[pacman#Querying package databases|querying packages]] (e.g. for {{ic|font}} or {{ic|ttf}}).<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. The packages to install fonts are particularly similar; simply taking an existing [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/adobe-source-code-pro-fonts package] as template should work well. To learn about how to modify it for your font, please refer to [[Creating packages]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library does this)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or <br />
Wikipedia pages for detail.<br />
<br />
The [https://github.com/ternstor/distrofonts Archfonts Python script] can be used to generate an overview of all the TTF fonts found in the official repositories / the AUR (the image generation is done using {{AUR|ttf2png}}).<br />
<br />
=== Bitmap ===<br />
<br />
* Default 8x16<br />
* [http://www.dcmembers.com/jibsen/download/61/ Dina] ({{Pkg|dina-font}}) – 6pt, 8pt, 9pt, 10pt, monospaced, based on Proggy<br />
* [http://openlab.jp/efont/unicode/ Efont] ({{AUR|efont-unicode-bdf}}) – 10px, 12px, 14px, 16px, 24px, normal, bold and italic<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}}) – 11px, 14px, normal and bold<br />
* [http://artwizaleczapka.sourceforge.net/ Lime] ({{Pkg|artwiz-fonts}})<br />
* [http://tobiasjung.name/profont/ ProFont] ({{AUR|ttf-profont-iix}}) – 10px, 11px, 12px, 15px, 17px, 22px, 29px, normal<br />
* [[Wikipedia:Proggy programming fonts|Proggy]] ({{AUR|proggyfonts}}) – has different variants<br />
* [http://www.fial.com/~scott/tamsyn-font/ Tamsyn] ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* [http://unifoundry.com/unifont.html Unifont] ([[Wikipedia:Unicode font#Comparison of fonts|most extensive]] Unicode coverage of any font) ({{Pkg|bdf-unifont}})<br />
<br />
=== Latin script ===<br />
<br />
==== Families ====<br />
<br />
* [[Wikipedia:Luxi fonts|Luxi fonts]] ({{Pkg|font-bh-ttf}}) – X.Org Luxi fonts<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera]] ({{Pkg|ttf-bitstream-vera}}) – serif, sans-serif, and monospace<br />
* [https://quoteunquoteapps.com/courierprime/ Courier Prime] ({{AUR|ttf-courier-prime}}) – Courier font alternative optimized for screenplays<br />
* [[Wikipedia:Croscore fonts|Croscore fonts]] ({{Pkg|ttf-croscore}}) – Google's substitute for Windows' Arial, Times New Roman, and Courier New<br />
* [[Wikipedia:DejaVu fonts|DejaVu fonts]] ({{Pkg|ttf-dejavu}}) – Bitstream Vera modified for greater Unicode coverage<br />
* [[Wikipedia:Droid (font)|Droid]] ({{Pkg|ttf-droid}}) – default font for older Android versions<br />
* [[Wikipedia:Roboto|Roboto]] ({{Pkg|ttf-roboto}}) – default font for newer Android versions<br />
* [[Wikipedia:Noto fonts|Google Noto]] ({{Pkg|noto-fonts}}) – Unicode<br />
* [[Wikipedia:Liberation fonts|Liberation fonts]] ({{Pkg|ttf-liberation}}) – free metric-compatible substitute for the Arial, Arial Narrow, Times New Roman and Courier New fonts found in Windows and Microsoft Office products<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Microsoft fonts]] ({{AUR|ttf-ms-win10}}) – Windows 10 fonts<br />
Legacy Microsoft font packages:<br />
* [http://corefonts.sourceforge.net/ Microsoft fonts] ({{AUR|ttf-ms-fonts}}) – Andalé Mono, Courier New, Arial, Arial Black, Comic Sans, Impact, Lucida Sans, Microsoft Sans Serif, Trebuchet, Verdana, Georgia, Times New Roman<br />
* Vista fonts ({{AUR|ttf-vista-fonts}}) – Consolas, Calibri, Candara, Corbel, Cambria, Constantia<br />
<br />
==== Monospaced ====<br />
<br />
For more monospaced fonts see [[#Bitmap]] and [[#Families]].<br />
<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{pkg|ttf-fantasque-sans-mono}}, {{pkg|otf-fantasque-sans-mono}})<br />
* [[Wikipedia:Fira Sans|Fira Mono]] ({{pkg|ttf-fira-mono}}, {{pkg|otf-fira-mono}}) – designed for Firefox OS<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://sourcefoundry.org/hack/ Hack] ({{pkg|ttf-hack}}) - an open source monospaced font, used as the default in KDE Plasma<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - inspired by Consolas<br />
* [https://leonardo-m.livejournal.com/77079.html Inconsolata-g] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [https://be5invis.github.io/Iosevka/ Iosevka] ({{AUR|ttf-iosevka}}) – Iosevka is a slender monospace sans-serif and slab-serif typeface inspired by Pragmata Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Menlo (typeface)|Menlo]] (derivative: {{AUR|ttf-meslo}}) - default monospaced font of OS X<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - proprietary font designed by Apple for OS X<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [https://madmalik.github.io/mononoki Mononoki] ({{AUR|ttf-mononoki}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
Relevant websites:<br />
<br />
* [http://hivelogic.com/articles/top-10-programming-fonts Dan Benjamin's Top 10 Programming Fonts].<br />
* [http://www.lowing.org/fonts/ Trevor Lowing's font list]<br />
* [https://www.slant.co/topics/67/~what-are-the-best-programming-fonts Slant: What are the best programming fonts?]<br />
* [https://stackoverflow.com/questions/4689/recommended-fonts-for-programming Stack Overflow: Recommended fonts for programming]<br />
<br />
==== Sans-serif ====<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://github.com/rsms/inter Inter UI] ({{AUR|ttf-inter-ui}}) – designed for user interfaces<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}}) – free substitute for Times New Roman<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
<br />
==== Serif ====<br />
<br />
* [http://www.georgduffner.at/ebgaramond/ EB Garamond] ({{AUR|otf-eb-garamond}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
<br />
==== Unsorted ====<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including Ubuntu, Inconsolata, Roboto, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
<br />
=== Non-latin scripts ===<br />
<br />
==== Ancient Scripts ====<br />
<br />
* {{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
==== Arabic ====<br />
<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from [[wikipedia:SIL_International|SIL]]<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL (Alternative for Traditional Arabic font)<br />
<br />
==== Braille ====<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
*adobe source han fonts - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
**{{Pkg|adobe-source-han-sans-otc-fonts}} - Sans fonts<br />
**{{Pkg|adobe-source-han-serif-otc-fonts}} - Serif fonts<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
<br />
===== Chinese =====<br />
<br />
{{Move|Localization/Chinese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* adobe source han fonts<br />
** {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-serif-cn-fonts}} - Simplified Chinese OpenType/CFF Serif fonts<br />
** {{Pkg|adobe-source-han-serif-tw-fonts}} - Traditional Chinese OpenType/CFF Serif fonts<br />
<br />
* noto Chinese fonts<br />
** {{AUR|noto-fonts-sc}} - Noto CJK-SC fonts for Simplified Chinese<br />
** {{AUR|noto-fonts-tc}} - Noto CJK-TC fonts for Traditional Chinese<br />
<br />
* wqy fonts<br />
** {{Pkg|wqy-microhei}} - WenQuanYi Micro Hei font family (also known as Hei, Gothic or Dotum) is a sans-serif style derived from Droid Sans Fallback, it offers high quality CJK outline font and it is extremely compact (~5M).<br />
** {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
** {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font.<br />
<br />
* arphic fonts<br />
** {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
** {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese ttf fonts<br />
<br />
* Standart fonts of the Republic of China ministry of education in Taiwan<br />
** {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
** {{AUR|ttf-twcns-fonts}} Chinese TrueType fonts by Ministry of Education of Taiwan government, support CNS11643 standard, including Kai and Sung fontface.<br />
<br />
*Windows Chinese fonts<br />
**{{AUR|ttf-ms-win8-zh_cn}} - windows8 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win8-zh_tw}} - windows8 traditional Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_cn}} - windows10 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_tw}} - windows10 traditional Chinese fonts。<br />
<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface.<br />
<br />
===== Japanese =====<br />
<br />
{{Move|Localization/Japanese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
<br />
===== Korean =====<br />
<br />
{{Move|Localization/Korean#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-kopub}}/{{AUR|otf-kopub}} - Korean TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-kopubworld}}/{{AUR|otf-kopubworld}} - Multilingual (Korean, Yethangul, Chinese extended, Japanese, Latin extended, Cyrillic, Arabic, Hebrew, Devanagari) TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-unfonts-core-ibx}} - A collection of Korean TrueType fonts by KLDP<br />
<br />
===== Vietnamese =====<br />
<br />
* {{Pkg|ttf-hannom}} - Vietnamese TrueType font for chữ Nôm characters<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Latin script]].<br />
<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|opensiddur-hebrew-fonts}} - Large collection of Open-source licensed Hebrew fonts<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
{{Move|Localization/Indic#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont), provides the character [http://www.fileformat.info/info/unicode/char/ca0/index.htm U+0CA0] "ಠ"<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
* {{AUR|fonts-smc-malayalam}} - Malayalam Unicode Fonts released by 'Swathanthra Malayalam Computing' (contains 11 fonts).<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Mongolic and Tungusic ====<br />
<br />
* {{AUR|ttf-abkai}} - Fonts for Sibe, Manchu and Daur scripts (incomplete, currently in development)<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|persian-fonts}} - Meta package for installing all Persian fonts in AUR.<br />
* {{AUR|borna-fonts}} - Borna Rayaneh Co. Persian B font series.<br />
* {{AUR|iran-nastaliq-fonts}} - A free Unicode calligraphic Persian font.<br />
* {{AUR|iranian-fonts}} - Iranian-Sans and Iranian-Serif Persian font family.<br />
* {{AUR|ir-standard-fonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts.<br />
* {{AUR|persian-hm-ftx-fonts}} - A Persian font series derived from X Series 2, Metafont and FarsiTeX fonts with Kashida feature.<br />
* {{AUR|persian-hm-xs2-fonts}} - A Persian font series derived from X Series 2 fonts with Kashida feature.<br />
* {{AUR|sina-fonts}} - Sina Pardazesh Co. Persian font series.<br />
* {{AUR|gandom-fonts}}, {{AUR|parastoo-fonts}}, {{AUR|sahel-fonts}}, {{AUR|samim-fonts}}, {{AUR|shabnam-fonts}}, {{AUR|tanha-fonts}}, {{AUR|vazir-fonts}}, {{AUR|vazir-code-fonts}} - Beautiful Persian fonts made by Ali Rasti Kerdar.<br />
* {{AUR|ttf-yas}} - The Yas Persian font series (with '''hollow zero''').<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
<br />
==== Tai–Kadai ====<br />
<br />
* {{Pkg|fonts-tlwg}} - Collection of scalable Thai fonts<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Tibeto-Burman ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
=== Emoji and symbols ===<br />
<br />
A section of the Unicode standard is designated for pictographic characters called "emoji".<br />
<br />
* {{Pkg|noto-fonts-emoji}} - Google's own emoji font, like on Android or Google Hangouts.<br />
* {{AUR|ttf-symbola}} - provides many Unicode symbols, including emoji, in outline style.<br />
* {{AUR|ttf-emojione}} - Official colorful EmojiOne font.<br />
* {{AUR|ttf-emojione-color}} - a color and B&W emoji SVGinOT font built from EmojiOne.<br />
* {{AUR|ttf-twemoji-color}} - Twitter's open-sourced emoji glyphs.<br />
<br />
[[wikipedia:Emoticon#Japanese_style|Kaomoji]] are sometimes referred to as "Japanese emoticons" and are composed of characters from various character sets, including CJK and Indic fonts. For example, the following set of packages covers most of existing kaomoji: {{Pkg|ttf-freefont}}, {{Pkg|ttf-arphic-uming}}, and {{Pkg|ttf-indic-otf}}.<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{Pkg|texlive-core}} and {{Pkg|texlive-fontsextra}} contain many math fonts such as Latin Modern Math and [[Wikipedia:STIX Fonts project|STIX Fonts]]. See [[TeX Live#Making fonts available to Fontconfig]] for configuration.<br />
* {{AUR|otf-stix}} - A standalone, more recent version of STIX<br />
* {{Pkg|otf-latin-modern}}, {{Pkg|otf-latinmodern-math}} - Improved version of Computer Modern fonts as used in LaTeX<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
<br />
=== Other operating system fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Apple MacOS TrueType fonts<br />
<br />
See [[Metric-compatible fonts]], which lists available alternatives for [[Microsoft fonts]].<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for sans-serif and monospace as well. For more information, have a look at the fontconfig manual.<br />
<br />
See also [[Font configuration#Replace or set default fonts]].<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed Fontconfig fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Lists installed fonts for a particular language ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use [[X resources]], fonts can be set by using escape sequences. Specifically, {{ic|echo -e "\033]710;$font\007"}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} uses the same syntax as in {{ic|~/.Xresources}} and can be anything the terminal emulator will support. (Example: {{ic|1=xft:dejavu sans mono:size=9}})<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|~/.matplotlib/fontList.cache}}, <br />
{{ic|~/.cache/matplotlib/fontList.cache}}, {{ic|~/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]<br />
* [https://fontlibrary.org/en Font Library] - Fonts under Free licenses<br />
* [https://screenshots.debian.net/packages?search=fonts&show=with Fonts on screenshots.debian.net]</div>Ounrhttps://wiki.archlinux.org/index.php?title=GNOME/Document_viewer&diff=569567GNOME/Document viewer2019-03-23T13:04:21Z<p>Ounr: Fixed a typo</p>
<hr />
<div>[[Category:Office]]<br />
[[es:GNOME/Document viewer]]<br />
[[ja:Evince]]<br />
[[w:Evince|Document viewer]] is specifically designed to support the following file formats: [[PDF, PS and DjVu|PDF, PostScript, DjVu]], tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt). For a comprehensive list of formats supported, see [https://wiki.gnome.org/Apps/Evince/SupportedDocumentFormats Supported Document Formats].<br />
<br />
Document viewer uses the poppler library as a backend.<br />
<br />
{{Note|Document viewer was previously known as [https://wiki.gnome.org/Apps/Evince Evince] until the application was given new descriptive names, one for each supported language. The name ''Evince'' is still used in numerous places such as the executable name, some package names, some desktop entries, and some GSettings schemas.}} <br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|evince}} package, or {{AUR|evince-git}} for the development version.<br />
Evince installs the gnome-desktop as a dependency.<br />
<br />
For a standalone version install {{AUR|evince-no-gnome}} or the light version {{AUR|evince-light}} for PDF support only.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Printer does not show up ===<br />
<br />
Upgrade {{Pkg|gtk3}} to version {{ic|3.22.26+47+g3a1a7135a2-1}} or higher. In previous GTK+ 3 versions, the GTK+ printer backends were included in a separate package. [https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/gtk3&id=54e7af64837e18355122e62ff565970620db3537]<br />
<br />
=== Zoom-in is limited ===<br />
<br />
Increasing Evince's page cache size allows you to zoom in further, which is handy for large documents. By default the setting is set to 50MiB. Increasing the page cache size obviously increases Evince's memory consumption when zoomed-in.<br />
<br />
The following command increases the page cache size to one gigabyte:<br />
<br />
$ gsettings set org.gnome.Evince page-cache-size 'uint32 1000'<br />
<br />
=== PDF texts is not show correctly ===<br />
<br />
Try setting {{ic|override-restrictions}} parameter to false:<br />
<br />
$ gsettings set org.gnome.Evince override-restrictions false<br />
<br />
=== Inverse search with SyncTeX doesn't work ===<br />
<br />
Check that {{Pkg|python-dbus}} is [[install]]ed. After that {{ic|Ctrl+click}} should work.<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gnome.org/Apps/Evince Evince website] <br />
* [http://poppler.freedesktop.org/ Poppler website] <br />
* [http://www.adobe.com/devnet/pdf/pdf_reference.html Page "PDF reference" from Adobe]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Desktop_notifications&diff=569563Desktop notifications2019-03-23T12:34:45Z<p>Ounr: /* Usage in programming */ Fixed a typo</p>
<hr />
<div>[[Category:X server]]<br />
[[Category:Notification]]<br />
[[Category:Development]]<br />
[[Category:Lists of software]]<br />
[[es:Desktop notifications]]<br />
[[ja:デスクトップ通知]]<br />
[[ru:Desktop notifications]]<br />
{{Related articles start}}<br />
{{Related|GTK+}}<br />
{{Related|Libcanberra}}<br />
{{Related articles end}}<br />
Desktop notifications are small, passive popup dialogs that notify the user of particular events in an asynchronous manner.<br />
<br />
==Libnotify==<br />
<br />
Libnotify is an implementation of the [https://developer.gnome.org/notification-spec/ Desktop Notifications Specification] which provides support for [[GTK+]] and [[Qt]] applications and is desktop independent: it is already used by many open source apps like [[Evolution]] and [[Pidgin]]. Libnotify can be installed with the {{Pkg|libnotify}} package.<br />
<br />
In order to use libnotify, you have to install a [[#Notification servers|notification server]].<br />
<br />
== Notification servers ==<br />
<br />
===Built-in===<br />
[[Cinnamon]], [[Deepin]], [[Enlightenment]], [[GNOME]], [[GNOME Flashback]] and [[KDE Plasma]] use their own implementations to display notifications, and it cannot be replaced. Their notification servers are started automatically on login to receive notifications from applications via DBus.<br />
<br />
===Standalone===<br />
In other desktop environments, the notification server needs to be launched using your WM's/DE's "autostart" option.<br />
<br />
After install the {{Pkg|notification-daemon}} package, the notification server can be launched on the first call via [[D-Bus]], adding the following configuration to its services directory <br />
{{ic|/usr/share/dbus-1/services}} respectively {{ic|$XDG_DATA_HOME/dbus-1/services}}, e.g.<br />
<br />
{{hc|org.freedesktop.Notifications.service|2=<br />
[D-BUS Service]<br />
Name=org.freedesktop.Notifications<br />
Exec=/usr/lib/notification-daemon-1.0/notification-daemon<br />
}}<br />
<br />
You can choose one of the following implementations:<br />
<br />
* {{App|[[Avant Window Navigator]]|A notification-daemon applet is available for AWN.|https://github.com/p12tic/awn-extras|{{AUR|awn-extras-applets}}}}<br />
* {{App|Deadd Notification Center|A notification-daemon with notification center inspired by Dunst.|https://github.com/phuhl/linux_notification_center|{{AUR|deadd-notification-center}}}}<br />
* {{App|[[Dunst]]|Minimalistic notification daemon for Linux designed to fit nicely into minimalistic windowmanagers like [[dwm]].|https://dunst-project.org/|{{pkg|dunst}}}}<br />
* {{App|LXQt Notification Daemon|Notification server for [[LXQt]].|https://github.com/lxde/lxqt-notificationd|{{pkg|lxqt-notificationd}}}}<br />
* {{App|mako|A lightweight notification daemon for [[Wayland]]; it currently works on [[Sway]].|https://github.com/emersion/mako|{{Pkg|mako}} {{AUR|mako-git}}}}<br />
* {{App|MATE Notification Daemon|Notification server for [[MATE]].|https://github.com/mate-desktop/mate-notification-daemon/|{{Pkg|mate-notification-daemon}}}}<br />
* {{App|Notification Daemon|The original notification server.|https://github.com/GNOME/notification-daemon|{{pkg|notification-daemon}}}}<br />
:You can run it manually using {{ic|/usr/lib/notification-daemon-1.0/notification-daemon}}.<br />
* {{App|Notify OSD|Notification server for [[Unity]].|https://launchpad.net/notify-osd|{{Pkg|notify-osd}}}}<br />
* {{App|statnot|Small, lightweight notification daemon that can output notifications to the root window's title, stdout or FIFO pipes, making it integrate very well with tiling window managers.|https://github.com/halhen/statnot|{{AUR|statnot}}}}<br />
* {{App|twmn|Notification system for tiling window managers.|https://github.com/sboli/twmn|{{AUR|twmn-git}}}}<br />
* {{App|Xfce Notification Daemon|Notification server for [[Xfce]].|https://docs.xfce.org/apps/notifyd/start|{{Pkg|xfce4-notifyd}}}}<br />
:You can run it manually using {{ic|/usr/lib/xfce4/notifyd/xfce4-notifyd}}.<br />
:You can also run it via systemd for the current user: {{ic|systemctl --user start xfce4-notifyd}}.<br />
:{{Tip|To configure xfce4-notifyd, run the following command: {{ic|xfce4-notifyd-config}}.}}<br />
<br />
==Usage in programming==<br />
You can write your own libnotify display messages easily in many programming languages through GObject-Introspection or bindings, or you can simply use bash.<br />
<br />
The following examples display a simple "Hello world" notification.<br />
<br />
===Bash===<br />
<br />
* Dependency: {{Pkg|libnotify}}<br />
<br />
{{hc|hello_world.sh|2=<br />
#!/bin/bash<br />
notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information<br />
}}<br />
<br />
{{Tip|<br />
* An overview on the available icons can be found [https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html here].<br />
* To send desktop notification from a background script running as root (replace {{ic|''X_user''}} and {{ic|''X_userid''}} with the user and userid running X respectively): {{bc|1=# sudo -u ''X_user'' DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/''X_userid''/bus notify-send 'Hello world!' 'This is an example notification.'}}<br />
}}<br />
<br />
===Boo===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}} ({{AUR|boo}})<br />
* Makedependency: {{AUR|boo}}<br />
* Build with: {{ic|booc hello_world.boo}}<br />
* Run with: {{ic|mono hello_world.exe}} (or {{ic|booi hello_world.boo}})<br />
<br />
{{hc|hello_world.boo|2=<br />
import Notifications from "notify-sharp"<br />
Hello = Notification()<br />
Hello.Summary = "Hello world!"<br />
Hello.Body = "This is an example notification."<br />
Hello.IconName = "dialog-information"<br />
Hello.Show()<br />
}}<br />
<br />
===C===<br />
<br />
* Dependency: {{Pkg|glib2}}<br />
* Build with: {{ic|gcc -o hello_world `pkg-config --cflags --libs gio-2.0` hello_world.c}}<br />
<br />
{{hc|hello_world.c|2=<br />
#include <gio/gio.h><br />
int main() {<br />
GApplication *application = g_application_new ("hello.world", G_APPLICATION_FLAGS_NONE);<br />
g_application_register (application, NULL, NULL);<br />
GNotification *notification = g_notification_new ("Hello world!");<br />
g_notification_set_body (notification, "This is an example notification.");<br />
GIcon *icon = g_themed_icon_new ("dialog-information");<br />
g_notification_set_icon (notification, icon);<br />
g_application_send_notification (application, NULL, notification);<br />
g_object_unref (icon);<br />
g_object_unref (notification);<br />
g_object_unref (application);<br />
return 0;<br />
}<br />
}}<br />
<br />
* Dependency: {{Pkg|libnotify}}<br />
* Build with: {{ic|gcc -o hello_world `pkg-config --cflags --libs libnotify` hello_world.c}}<br />
<br />
{{hc|hello_world.c|2=<br />
#include <libnotify/notify.h><br />
int main() {<br />
notify_init ("Hello world!");<br />
NotifyNotification * Hello = notify_notification_new ("Hello world", "This is an example notification.", "dialog-information");<br />
notify_notification_show (Hello, NULL);<br />
g_object_unref(G_OBJECT(Hello));<br />
notify_uninit();<br />
return 0;<br />
}<br />
}}<br />
<br />
===C++===<br />
<br />
* Dependency: {{Pkg|glibmm}}<br />
* Build with: {{Ic|g++ -o hello_world `pkg-config --cflags --libs giomm-2.4` hello_world.cc}}<br />
<br />
{{hc|hello_world.cc|2=<br />
#include <giomm-2.4/giomm.h><br />
int main(int argc, char *argv[]) {<br />
auto Application = Gio::Application::create("hello.world", Gio::APPLICATION_FLAGS_NONE);<br />
Application->register_application();<br />
auto Notification = Gio::Notification::create("Hello world");<br />
Notification->set_body("This is an example notification.");<br />
auto Icon = Gio::ThemedIcon::create("dialog-information");<br />
Notification->set_icon (Icon);<br />
Application->send_notification(Notification);<br />
return 0;<br />
}<br />
}}<br />
<br />
* Dependency: {{AUR|libnotifymm}}<br />
* Build with: {{Ic|g++ -o hello_world `pkg-config --cflags --libs libnotifymm-1.0` hello_world.cc}}<br />
<br />
{{hc|hello_world.cc|2=<br />
#include <libnotifymm.h><br />
int main(int argc, char *argv[]) {<br />
Notify::init("Hello world!");<br />
Notify::Notification Hello("Hello world", "This is an example notification.", "dialog-information");<br />
Hello.show();<br />
return 0;<br />
}<br />
}}<br />
<br />
===C#===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}}<br />
* Build with: {{ic|mcs -pkg:notify-sharp-3.0 hello_world.cs}}<br />
* Run with: {{ic|mono hello_world.exe}}<br />
<br />
{{hc|hello_world.cs|2=<br />
using Notifications;<br />
public class HelloWorld {<br />
static void Main() {<br />
var Hello = new Notification();<br />
Hello.Summary = "Hello world!";<br />
Hello.Body = "This is an example notification.";<br />
Hello.IconName = "dialog-information";<br />
Hello.Show();<br />
}<br />
}<br />
}}<br />
<br />
===Cobra===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}}<br />
* Makedependency: {{AUR|cobra}}<br />
* Build with: {{ic|cobra -c hello_world}}<br />
* Run with: {{ic|mono hello_world.exe}}<br />
<br />
{{hc|hello_world.cobra|<nowiki>@args -pkg:notify-sharp-3.0<br />
use Notifications<br />
class HelloWorld<br />
def main<br />
hello = Notification()<br />
hello.summary = "Hello world!"<br />
hello.body = "This is an example notification."<br />
hello.iconName = "dialog-information"<br />
hello.show</nowiki>}}<br />
<br />
===Crystal===<br />
<br />
* Dependency: woodruffw/notify.cr (from shards)<br />
* Build with: shards build<br />
<br />
{{hc|hello_world.fs|2=<br />
require "notify"<br />
notifier = Notify.new<br />
notifier.notify "Hello", body: "<b>World!</b>"<br />
}}<br />
<br />
===F#===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}}<br />
* Makedependency: {{AUR|fsharp}}<br />
* Build with: {{ic|fsharpc -r:notify-sharp.dll -I:/usr/lib/mono/notify-sharp-3.0/ -I:/usr/lib/mono/gtk-sharp-3.0/ hello_world.fs}}<br />
* Run with: {{ic|mono hello_world.exe}}<br />
<br />
{{hc|hello_world.fs|2=<br />
open Notifications<br />
let Hello = new Notification()<br />
Hello.Summary <- "Hello world!"<br />
Hello.Body <- "This is an example notification."<br />
Hello.IconName <- "dialog-information"<br />
Hello.Show()<br />
}}<br />
<br />
===Genie===<br />
<br />
* Dependency: {{Pkg|glib2}}<br />
* Makedependency: {{Pkg|vala}}<br />
* Build with: {{ic|valac --pkg gio-2.0 hello_world.gs}}<br />
<br />
{{hc|hello_world.gs|2=<br />
uses <br />
GLib<br />
<br />
init<br />
var Application = new GLib.Application ("hello.world", GLib.ApplicationFlags.FLAGS_NONE);<br />
Application.register ();<br />
var Notification = new GLib.Notification ("Hello world");<br />
Notification.set_body ("This is an example notification.");<br />
var Icon = new GLib.ThemedIcon ("dialog-information");<br />
Notification.set_icon (Icon);<br />
Application.send_notification (null, Notification);<br />
}}<br />
<br />
* Dependency: {{Pkg|libnotify}}<br />
* Makedependency: {{Pkg|vala}}<br />
* Build with: {{ic|valac --pkg libnotify hello_world.gs}}<br />
<br />
{{hc|hello_world.gs|2=<br />
uses <br />
Notify<br />
<br />
init<br />
Notify.init ("Hello world")<br />
var Hello=new Notify.Notification ("Hello world!","This is an example notification.","dialog-information")<br />
Hello.show ()<br />
}}<br />
<br />
===Go===<br />
<br />
* Dependency: {{Pkg|libnotify}}<br />
* Makedependency: {{AUR|go-notify-git}}<br />
* Build with: {{ic|go build hello_world.go}}<br />
* (Or run with: {{ic|go run hello_world.go}})<br />
<br />
{{hc|hello_world.go|2=<br />
package main<br />
import ("github.com/mqu/go-notify")<br />
<br />
func main() {<br />
notify.Init("Hello world")<br />
hello := notify.NotificationNew("Hello World!", "This is an example notification.","dialog-information")<br />
hello.Show()<br />
}<br />
}}<br />
<br />
===Groovy===<br />
<br />
* Dependencies: {{Pkg|groovy}}, {{AUR|java-gnome}}<br />
* Build with: {{ic|groovyc -cp /usr/share/java/gtk.jar HelloWorld.groovy && jar cfe HelloWorld.jar HelloWorld HelloWorld.class}}<br />
* Run with: {{ic|java -cp /usr/share/groovy/embeddable/groovy-all.jar:/usr/share/java/gtk.jar:HelloWorld.jar HelloWorld}} or {{ic|groovy -cp /usr/share/java/gtk.jar HelloWorld.groovy}}<br />
<br />
{{hc|HelloWorld.groovy|2=<br />
import org.gnome.gtk.*<br />
import org.gnome.notify.*<br />
<br />
Gtk.init()<br />
Notify.init("Hello world")<br />
def Hello = new Notification("Hello world!", "This is an example notification.", "dialog-information")<br />
Hello.show()<br />
}}<br />
<br />
===Haskell===<br />
<br />
* Makedependency: {{Pkg|haskell-fdo-notify}}<br />
* Build with: {{ic|ghc hello_world}}<br />
{{hc|hello_world.hs|2=<br />
import DBus.Notify<br />
main = do<br />
client <- connectSession<br />
let hello = blankNote { summary="Hello world!",<br />
body=(Just $ Text "This is an example notification."),<br />
appImage=(Just $ Icon "dialog-information") }<br />
notification <- notify client hello<br />
return 0<br />
}}<br />
<br />
===IronPython===<br />
<br />
* Dependencies: {{Pkg|notify-sharp-3}}, {{AUR|ironpython}}<br />
* Run with: {{ic|ipy hello_world.py}}<br />
<br />
{{hc|hello_world.py|2=<br />
import clr<br />
clr.AddReference('notify-sharp')<br />
import Notifications<br />
Hello = Notifications.Notification()<br />
Hello.Summary = "Hello world!"<br />
Hello.Body = "This is an example notification."<br />
Hello.IconName = "dialog-information"<br />
Hello.Show()<br />
}}<br />
<br />
===Java===<br />
<br />
* Dependency: {{AUR|java-gnome}}<br />
* Makedependency: java-environment<br />
* Build with: {{ic|javac -cp /usr/share/java/gtk.jar HelloWorld.java && jar cfe HelloWorld.jar HelloWorld HelloWorld.class}}<br />
* Run with: {{ic|java -cp /usr/share/java/gtk.jar:HelloWorld.jar HelloWorld}}<br />
<br />
{{hc|HelloWorld.java|2=<br />
import org.gnome.gtk.Gtk;<br />
import org.gnome.notify.Notify;<br />
import org.gnome.notify.Notification;<br />
<br />
public class HelloWorld<br />
{<br />
public static void main(String[] args) {<br />
Gtk.init(args);<br />
Notify.init("Hello world");<br />
Notification Hello = new Notification("Hello world!", "This is an example notification.", "dialog-information");<br />
Hello.show();<br />
}<br />
}<br />
}}<br />
<br />
===JavaScript===<br />
<br />
* Dependency: {{Pkg|gjs}}<br />
<br />
{{hc|hello_world.js|2=<br />
#!/usr/bin/gjs<br />
const Gio = imports.gi.Gio;<br />
var Application = new Gio.Application ({application_id: "hello.world"});<br />
Application.register (null);<br />
var Notification = new Gio.Notification ();<br />
Notification.set_title ("Hello world");<br />
Notification.set_body ("This is an example notification.");<br />
var Icon = new Gio.ThemedIcon ({name: "dialog-information"});<br />
Notification.set_icon (Icon);<br />
Application.send_notification (null, Notification);<br />
}}<br />
<br />
* Dependencies: {{Pkg|libnotify}}, {{Pkg|gjs}}<br />
<br />
{{hc|hello_world.js|2=<br />
#!/usr/bin/gjs<br />
const Notify = imports.gi.Notify;<br />
Notify.init ("Hello world");<br />
var Hello=new Notify.Notification ({summary: "Hello world!",<br />
body: "This is an example notification.",<br />
"icon-name": "dialog-information"});<br />
Hello.show ();<br />
}}<br />
<br />
===JRuby===<br />
<br />
* Dependencies: {{AUR|java-gnome}}, {{Pkg|jruby}}<br />
* Build with: {{ic|jrubyc hello_world.rb && jar cfe hello_world.jar hello_world hello_world.class}}<br />
* Run with: {{ic|java -cp /opt/jruby/lib/jruby.jar:hello_world.jar hello_world}} or {{ic|jruby hello_world.rb}}<br />
{{hc|hello_world.rb|2=<br />
require '/usr/share/java/gtk.jar'<br />
import Java::OrgGnomeGtk::Gtk<br />
import Java::OrgGnomeNotify::Notify<br />
import Java::OrgGnomeNotify::Notification<br />
<br />
Gtk.init(nil)<br />
Notify.init("Hello world")<br />
Hello = Notification.new("Hello world!", "This is an example notification.", "dialog-information")<br />
Hello.show<br />
}}<br />
<br />
===Jython===<br />
<br />
* Dependencies: {{AUR|java-gnome}}, {{Pkg|jython}}<br />
* Run with: {{ic|1=jython -Dpython.path=/usr/share/java/gtk.jar hello_world.py}}<br />
{{hc|hello_world.py|2=<br />
from org.gnome.gtk import Gtk<br />
from org.gnome.notify import Notify, Notification<br />
Gtk.init(None)<br />
Notify.init("Hello world")<br />
Hello=Notification("Hello world!", "This is an example notification.", "dialog-information")<br />
Hello.show()<br />
}}<br />
<br />
===Lua===<br />
<br />
* Dependency: {{Pkg|lua-lgi}}<br />
<br />
{{hc|hello_world.lua|2=<br />
#!/usr/bin/lua<br />
lgi = require 'lgi'<br />
Gio = lgi.require('Gio')<br />
Application = Gio.Application.new("hello.world",Gio.ApplicationFlags.FLAGS_NONE);<br />
Application:register();<br />
Notification = Gio.Notification.new("Hello world");<br />
Notification:set_body("This is an example notification.");<br />
Icon = Gio.ThemedIcon.new("dialog-information");<br />
Notification:set_icon(Icon);<br />
Application:send_notification(nil, Notification);<br />
}}<br />
<br />
* Dependencies: {{Pkg|libnotify}}, {{Pkg|lua-lgi}}<br />
<br />
{{hc|hello_world.lua|2=<br />
#!/usr/bin/lua<br />
lgi = require 'lgi'<br />
Notify = lgi.require('Notify')<br />
Notify.init("Hello world")<br />
Hello=Notify.Notification.new("Hello world","This is an example notification.","dialog-information")<br />
Hello:show()<br />
}}<br />
<br />
===Nemerle===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}}<br />
* Makedependency: {{AUR|nemerle}}<br />
* Build with: {{ic|ncc -pkg:notify-sharp-3.0 -out:hello_world.exe hello_world.n}}<br />
* Run with: {{ic|mono hello_world.exe}}<br />
<br />
{{hc|hello_world.n|2=<br />
using Notifications;<br />
public class HelloWorld {<br />
static Main() : void {<br />
def Hello = Notification();<br />
Hello.Summary = "Hello world!";<br />
Hello.Body = "This is an example notification.";<br />
Hello.IconName = "dialog-information";<br />
Hello.Show();<br />
}<br />
}<br />
}}<br />
<br />
===Pascal===<br />
<br />
* Dependency: {{Pkg|libnotify}}<br />
* Makedependency: {{Pkg|fpc}}, [https://github.com/ik5/libnotify-fpc libnotify binding]<br />
* Build with: {{ic|fpc hello_world}}<br />
<br />
{{hc|hello_world.pas|2=<br />
program hello_world;<br />
uses libnotify;<br />
var hello : PNotifyNotification;<br />
begin<br />
notify_init(argv[0]);<br />
hello := notify_notification_new ('Hello world', 'This is an example notification.', 'dialog-information');<br />
notify_notification_show (hello, nil);<br />
end.<br />
}}<br />
<br />
===Perl===<br />
<br />
* Dependencies: {{Pkg|libnotify}}, {{Pkg|perl-glib-object-introspection}}<br />
{{hc|hello_world.pl|2=<br />
#!/usr/bin/perl<br />
use Glib::Object::Introspection;<br />
Glib::Object::Introspection->setup (<br />
basename => 'Notify',<br />
version => '0.7',<br />
package => 'Notify');<br />
Notify->init;<br />
my $hello = Notify::Notification->new("Hello world!", "This is an example notification.", "dialog-information");<br />
$hello->show;<br />
}}<br />
<br />
===Python===<br />
<br />
* Dependency: {{Pkg|python-gobject}} (or {{Pkg|python2-gobject}} for Python 2)<br />
<br />
{{hc|hello_world.py|2=<br />
#!/usr/bin/python<br />
import gi<br />
gi.require_version('Gio', '2.0')<br />
from gi.repository import Gio<br />
Application = Gio.Application.new("hello.world", Gio.ApplicationFlags.FLAGS_NONE)<br />
Application.register()<br />
Notification = Gio.Notification.new("Hello world")<br />
Notification.set_body("This is an example notification.")<br />
Icon = Gio.ThemedIcon.new("dialog-information")<br />
Notification.set_icon(Icon)<br />
Application.send_notification(None, Notification)<br />
}}<br />
<br />
* Dependencies: {{Pkg|libnotify}}, {{Pkg|python-gobject}} (or {{Pkg|python2-gobject}} for Python 2)<br />
<br />
{{hc|hello_world.py|2=<br />
#!/usr/bin/python<br />
import gi<br />
gi.require_version('Notify', '0.7')<br />
from gi.repository import Notify<br />
Notify.init("Hello world")<br />
Hello = Notify.Notification.new("Hello world", "This is an example notification.", "dialog-information")<br />
Hello.show()<br />
}}<br />
<br />
===Ruby===<br />
<br />
*Dependencies: {{Pkg|libnotify}}, {{AUR|ruby-gir_ffi}}<br />
<br />
{{hc|hello_world.rb|2=<br />
#!/usr/bin/ruby<br />
require 'gir_ffi'<br />
GirFFI.setup :Notify<br />
Notify.init("Hello world")<br />
Hello = Notify::Notification.new("Hello world!", "This is an example notification.", "dialog-information")<br />
Hello.show<br />
}}<br />
<br />
===Rust===<br />
<br />
Using [https://crates.io/crates/notify-rust notify-rust].<br />
* Makedependency: {{Pkg|rust}}<br />
* Build with: {{ic|cargo build}}<br />
* Run with: {{ic|target/debug/hello_world}} or {{ic|cargo run}}<br />
<br />
{{hc|Cargo.toml|2=<br />
[package]<br />
name = "hello_world"<br />
version = "0.1.0"<br />
<br />
[dependencies]<br />
notify-rust = "^3"<br />
}}<br />
<br />
{{hc|src/main.rs|2=<br />
extern crate notify_rust;<br />
use notify_rust::Notification;<br />
fn main(){<br />
Notification::new()<br />
.summary("Hello world")<br />
.body("This is an example notification.")<br />
.icon("dialog-information")<br />
.show().unwrap();<br />
}<br />
}}<br />
<br />
===Scala===<br />
<br />
* Dependency: {{AUR|java-gnome}} (and {{Pkg|scala}})<br />
* Makedependency: {{Pkg|scala}}<br />
* Build with: {{ic|scalac -cp /usr/share/java/gtk.jar -d HelloWorld.jar HelloWorld.scala}}<br />
* Run with: {{ic|java -cp /usr/share/java/gtk.jar:HelloWorld.jar HelloWorld}} (or {{ic|scala -cp /usr/share/java/gtk.jar HelloWorld.scala}})<br />
<br />
{{hc|HelloWorld.scala|2=<br />
import org.gnome.gtk._<br />
import org.gnome.notify._<br />
<br />
object HelloWorld {<br />
def main(args: Array[String]) {<br />
Gtk.init(args)<br />
Notify.init("Hello world")<br />
var Hello = new Notification("Hello world!", "This is an example notification.", "dialog-information")<br />
Hello.show()<br />
}<br />
}<br />
}}<br />
<br />
===Vala===<br />
<br />
*Dependency: {{Pkg|glib2}}<br />
*Makedependency: {{Pkg|vala}}<br />
*Build with: {{ic|valac --pkg gio-2.0 hello_world.vala}}<br />
<br />
{{hc|hello_world.vala|2=<br />
using GLib;<br />
public class HelloWorld {<br />
static void main () {<br />
var Application = new GLib.Application ("hello.world", GLib.ApplicationFlags.FLAGS_NONE);<br />
Application.register ();<br />
var Notification = new GLib.Notification ("Hello world");<br />
Notification.set_body ("This is an example notification.");<br />
var Icon = new GLib.ThemedIcon ("dialog-information");<br />
Notification.set_icon (Icon);<br />
Application.send_notification (null, Notification);<br />
}<br />
}<br />
}}<br />
<br />
*Dependency: {{Pkg|libnotify}}<br />
*Makedependency: {{Pkg|vala}}<br />
*Build with: {{ic|valac --pkg libnotify hello_world.vala}}<br />
<br />
{{hc|hello_world.vala|2=<br />
using Notify;<br />
public class HelloWorld {<br />
static void main () {<br />
Notify.init ("Hello world");<br />
var Hello = new Notify.Notification("Hello world!", "This is an example notification.", "dialog-information");<br />
Hello.show ();<br />
}<br />
}<br />
}}<br />
<br />
===Visual Basic .NET===<br />
<br />
* Dependency: {{Pkg|notify-sharp-3}}<br />
* Makedependency: {{AUR|mono-basic}}<br />
* Build with: {{ic|vbnc -r:/usr/lib/mono/notify-sharp-3.0/notify-sharp.dll hello_world.vb}}<br />
* Run with: {{ic|mono hello_world.exe}}<br />
<br />
{{hc|hello_world.vb|2=<br />
Imports Notifications<br />
Public Class Hello<br />
Public Shared Sub Main<br />
Dim Hello As New Notification<br />
Hello.Summary = "Hello world!"<br />
Hello.Body = "This is an example notification."<br />
Hello.IconName = "dialog-information"<br />
Hello.Show<br />
End Sub<br />
End Class<br />
}}<br />
<br />
==See also==<br />
*[https://developer.gnome.org/libnotify/ Libnotify Reference Manual]<br />
*[http://milky.manishsinha.net/2009/03/29/working-with-libnotify/ C example]<br />
*[https://www.devdungeon.com/content/desktop-notifications-linux-python Python notification examples]<br />
*[http://hashbang.fr/tutoriel-notify.html Python notify example] (french article)</div>Ounrhttps://wiki.archlinux.org/index.php?title=IBus&diff=569469IBus2019-03-22T17:53:20Z<p>Ounr: /* Installation */ fixed typo</p>
<hr />
<div>[[Category:Input methods]]<br />
[[ja:IBus]]<br />
[[zh-hans:IBus]]<br />
[[zh-hant:IBus]]<br />
[[Wikipedia:Intelligent Input Bus|IBus]] (''Intelligent Input Bus'') is an [[input method]] framework, a system for entering non-Latin characters.<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|ibus}} package.<br />
<br />
Additionally, to smooth the typing experience of IBus for Qt applications, please install the {{Pkg|ibus-qt}} library which provides IM modules to replace XIM protocol.<br />
<br />
=== Input method engines ===<br />
<br />
You will need at least one input method, corresponding to the language you wish to type. Available input methods include:<br />
<br />
==== Chinese ====<br />
<br />
* <strike>{{Pkg|ibus-pinyin}} - Intelligent Chinese Phonetic IME for Hanyu pinyin and Zhuyin (Bopomofo) users. Designed by IBus main author and has many advance features such as English spell checking.</strike> Package currently not maintained and partly broken with latest ibus base. Use {{Pkg|ibus-libpinyin}} instead.<br />
* {{Pkg|ibus-rime}} - Powerful and smart input method for a wide range of Chinese input methods, based on the [[Rime IME]] project.<br />
* {{Pkg|ibus-chewing}} - Intelligent Chinese Phonetic IME for Zhuyin (Bopomofo) users, based on {{Pkg|libchewing}}.<br />
* {{AUR|ibus-cangjie}} - Chinese IME for Cangjie3, Cangjie3, and Quick based on {{AUR|libcangjie}} and {{AUR|python-pycangjie}}.<br />
<br />
==== Japanese ====<br />
<br />
* {{Pkg|ibus-anthy}} - Japanese IME, based on {{Pkg|anthy}}.<br />
* {{AUR|ibus-mozc}} - Japanese IME, based on [[Mozc]].<br />
* {{Pkg|ibus-kkc}} - Japanese IME, based on {{Pkg|libkkc}}.<br />
<br />
==== Others ====<br />
<br />
* {{Pkg|ibus-hangul}} - Korean IME, based on {{Pkg|libhangul}}.<br />
* {{Pkg|ibus-unikey}} - IME for typing Vietnamese characters.<br />
* {{Pkg|ibus-table}} - IME that accommodates table-based IMs.<br />
* {{Pkg|ibus-m17n}} - M17n IME which allows input of many languages using the input methods from {{Pkg|m17n-db}}.<br />
* {{AUR|ibus-kmfl}} - Linux port of [https://keyman.com/ Keyman] input method for Windows which supports over 1,000 languages, such as complex scripts, languages of minorities, and IPA symbols. Only part of them is available in KMFL as it can work with uncompiled layout description only (*.kmn files).<br />
<br />
To see all available input methods:<br />
$ pacman -Ss '^ibus-*'<br />
<br />
Others packages are also available in the [[AUR]].<br />
<br />
=== Initial setup ===<br />
<br />
Now, run {{ic| $ ibus-setup}} (as the user who will use IBus).<br />
It will start the daemon and give you this message:<br />
IBus has been started! If you cannot use IBus, please add below lines in {{ic|~/.bashrc}}, and relogin your desktop.<br />
export GTK_IM_MODULE=ibus<br />
export XMODIFIERS=@im=ibus<br />
export QT_IM_MODULE=ibus<br />
<br />
{{Accuracy|1=<br />
Suggested values might be wrong (chromium and firefox do not work with them for me). Using<br />
<br />
export GTK_IM_MODULE=xim<br />
export XMODIFIERS=@im=ibus<br />
export QT_IM_MODULE=xim<br />
<br />
works for me. [https://github.com/ibus/ibus/issues/2020 Upstream ticket]<br />
}}<br />
{{Accuracy|1=<br />
Another suggestion from a [[LXDM]] user. Adding these lines to /etc/profile<br />
<br />
export GTK_IM_MODULE=ibus<br />
export QT4_IM_MODULE=xim<br />
export QT_IM_MODULE=xim<br />
export XMODIFIERS=@im=ibus<br />
<br />
worked for me.<br />
}}<br />
{{Note|<br />
* Although IBus uses a daemon, it is not the sort of daemon managed by ''systemd'': it runs as an ordinary user and will be started for you when you login.<br />
* If, however, IBus is '''not''' autostarted upon login, then move the “export …” lines above to either <br />
** {{ic|~/.xprofile}} instead and append this line to the same file: {{ic|ibus-daemon -drx}}, '''or''' <br />
** {{ic|~/.xinitrc}} and append this line to the same file: {{ic|ibus-daemon -drx}}. <br />
::Which works best, depends on your [[Window manager]], see also [[xprofile]] and [[xinitrc]].<br />
* You can also try adding {{ic|ibus-daemon -drx}} after the {{ic|export ...}} lines in {{ic|~/.bashrc}}.<br />
}}<br />
<br />
You will then see a configuration screen; you can access this screen whenever IBus is running by right-clicking the icon in the system tray and choosing ''Preferences''. See [[#Configuration|Configuration]].<br />
<br />
If IBus does not work in Qt/KDE applications, ensure that the ''ibus-qt'' library is installed and define IBus as the default IME in the Qt configuration editor:<br />
$ qtconfig-qt4<br />
In ''Interface > Default Input Method'', select ''ibus'' instead of ''xim''.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]] integrates with IBus[https://help.gnome.org/misc/release-notes/3.6/i18n-ibus.html.en], so you should only need to install the package specific to your language. To enable input in your language, add it to the ''Input Sources'' section of the ''Region & Language'' settings. After you add your input sources (at least 2), GNOME will show the input switcher icon in the tray. If you do not find your appropriate input source when trying to add your input sources, most likely you have not done locale-gen for that locale. The default keyboard shortcut to switch to the next input method in GNOME is {{ic|Super+space}}; disregard the ''next input method'' shortcut set in ''ibus-setup''.<br />
<br />
<br />
=== KDE ===<br />
<br />
[[KDE]] needs the 'kimtoy' package to work with ibus<br />
<br />
== Configuration ==<br />
<br />
=== IBus ===<br />
<br />
{{Note|You need to have [[Fonts_FAQ#Chinese.2C_Japanese.2C_Korean.2C_Vietnamese|east Asian fonts]] installed if you want to enter Chinese, Japanese, Korean or Vietnamese characters.}}<br />
The default ''General'' settings should be fine, but go to ''Input Methods'' and select your input method(s) in the drop down box, then press ''Add''. You can use multiple input methods if you wish.<br />
Once IBus is set up, you can press {{ic|Super+space}} to use it (multiple times to cycle through available input methods). IBus will remember which input method you are using in each window, so you will have to reactivate it for each new window. You can override this behavior by right clicking the system tray icon, selecting ''Preferences'', and going to the ''Advanced'' tab.<br />
<br />
{{Note|By default, IBus overrides your [[Xmodmap]] setting. You can disable this feature by enabling "Use system keyboard layout" option in Preference -> Advanced.}}<br />
<br />
=== Ibus-rime ===<br />
<br />
If you have decided to use the great ''ibus-rime'' IME, check out [[Rime IME]] for some help to configure it.<br />
<br />
=== Entering Special Characters—The Compose Input Method ===<br />
<br />
To type special characters, XKB supports compose key sequences. To fulfil this function, IBus supports an input method that is permanently in Compose mode. Instead of hitting a compose key, then typing out the compose sequence, the user switches to the Compose input method (by default using super-space (a.k.a. win-space)), types the compose sequence, then switches back to the previous method. In Archlinux, the Compose input method is not installed by default. To use it, install {{AUR|ibus-table-others}} from the AUR, restart IBus, then look for it in the list of input methods under 'other' at the bottom.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Pinyin usage ===<br />
<br />
When using ''ibus-pinyin'',<br />
* First type the pinyin (sans tones) for the characters you wish to enter.<br />
* Press {{ic|Up}} and {{ic|Down}} repeatedly to select a character (going on to the next page if necessary).<br />
* Press {{ic|Space}} to use a character.<br />
* You can also use {{ic|PageUp}} or {{ic|PageDown}} to scroll pages, and use the number keys 1-5 to select the character you need.<br />
* You can enter multiple characters that form a word or phrase at a time (such as "zhongwen" to enter "中文"). ibus-pinyin will remember which characters you type most frequently and over time make suggestions that are more tuned to your typing profile.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Plasma 5 ===<br />
<br />
Some applications may not accept non-"direct input" text (e.g. Japanese and Chinese) from Mozc using IBus. In order to resolve this problem add<br />
<br />
export QT_IM_MODULE=ibus<br />
<br />
to {{ic|~/.xprofile}} and restart your X user session.<br />
<br />
=== Kimpanel ===<br />
<br />
IBus main interface is currently only available in GTK+, but Kimpanel provides a native Qt/KDE input interface. Kimpanel is bundled with Plasma 5, but IBus needs to be launched as following to be able to communicate with the panel<br />
<br />
$ ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel<br />
<br />
To get a menu entry for launching ibus this way, save the following file to {{ic|~/.local/share/applications/ibus-kimpanel.desktop}}:<br />
{{bc|<nowiki><br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=IBus (KIMPanel)<br />
GenericName=Input Method Framework<br />
Comment=Start IBus Input Method Framework<br />
Exec=ibus-daemon --panel=/usr/lib/kimpanel-ibus-panel<br />
Icon=ibus<br />
Terminal=false<br />
Type=Application<br />
Categories=System;Utility;<br />
X-GNOME-Autostart-Phase=Applications<br />
X-GNOME-AutoRestart=false<br />
X-GNOME-Autostart-Notify=true<br />
X-KDE-autostart-after=panel<br />
</nowiki>}}<br />
<br />
Then you can either let KDE autostart ibus, or set it as the input method application in Kimpanel, and manually click on the kimpanel icon to start it. In either case, choose Utility/Ibus (Kimpanel) in the Choose Application dialog.<br />
<br />
Finally, add the input panel widget to show the panel.<br />
<br />
=== rxvt-unicode ===<br />
<br />
If anyone has any issues with IBus and ''rxvt-unicode'', the following steps should solve it.<br />
<br />
Add the following to your {{ic|~/.Xresources}} (possibly not required, first try without):<br />
URxvt.inputMethod: ibus<br />
URxvt.preeditType: OverTheSpot<br />
<br />
And start IBus with:<br />
$ ibus-daemon --xim<br />
<br />
If you start ''ibus-daemon'' automatically (e.g. in {{ic|~/.xinitrc}} or {{ic|~/.xsession}}) but used to use {{ic|ibus-daemon &}} without the {{ic|--xim}} option, make sure to kill the existing process before testing the new command.<br />
<br />
=== GTK+ applications ===<br />
<br />
Some users have had problems using Input Methods with GTK applications, because it seems that the gtk.immodules file cannot be found. Adding:<br />
export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules<br />
for GTK+ 2, or:<br />
export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
for GTK+ 3, in addition to the three lines above in your {{ic|$HOME/.bashrc}} seems to fix the problem.<br />
<br />
{{Note|If you set it to GTK+ 2, then you cannot use GTK+ 3 applications like ''gedit'', if you set it to GTK+ 3, then you cannot use GTK+ 2 applications like Xfce.}}<br />
<br />
=== Chinese input ===<br />
<br />
If you encounter problems when using Chinese input, check your locale setting. For example in Hong Kong, export LANG=zh_HK.utf8.<br />
<br />
{{Note|There are large revisions after IBus 1.4, you might not be able to input Chinese words with ''ibus-pinyin'' or ''ibus-sunpinyin'', which are written in C. So the solution is to install {{Pkg|ibus-libpinyin}}.<br />
}}<br />
<br />
To start ibus with GNOME, add this in {{ic|~/.profile}} and restart the GNOME.<br />
{{bc|<nowiki><br />
export GTK_IM_MODULE=ibus<br />
export XMODIFIERS=@im=ibus<br />
export QT_IM_MODULE=ibus<br />
ibus-daemon -d -x<br />
</nowiki>}}<br />
<br />
Chinese users can refer to this [http://forum.ubuntu.org.cn/viewtopic.php?f=155&t=346639 page] for detailed solution concerning this bug.<br />
<br />
=== LibreOffice ===<br />
<br />
If IBus does load but does not see LibreOffice as an input window, add this line to {{ic|~/.bashrc}}:<br />
export XMODIFIERS=@im=ibus<br />
And then, you need to start ibus with {{ic|--xim -d}}, for example, add this line to {{ic|~/.xinitrc}}:<br />
ibus-daemon --xim -d<br />
But the horrible thing is that you need to start LibreOffice in terminal.<br />
<br />
If you are using KDE and the above does not work, install {{Pkg|libreoffice-still}} and add this line to {{ic|~/.xprofile}} if you do not mind running LibreOffice in GTK+ 2 mode:<br />
export OOO_FORCE_DESKTOP="gnome"<br />
<br />
That will make IBus work with LibreOffice, and you can start LibreOffice from anywhere, not just the terminal.<br />
<br />
=== Non US keyboards ===<br />
<br />
If [https://code.google.com/p/ibus/issues/detail?id=155 Ibus does not let you write in a given language], let's say Chinese, with a different keyboard layout other than US, then you need to tell it which one to use.<br />
<br />
Each input method specifies its desired input layout in an XML configuration file in {{ic|/usr/share/ibus/component/<method_name>.xml}}. Setting the {{ic|<layout>}} tag to the desired value will make the ibus use that layout. With the special value {{ic|default}}, ibus will use whatever is the default layout configured on the system.<br />
<br />
{{Accuracy|Undone on package upgrades}}<br />
<br />
<br />
You need to change {{ic|/usr/share/ibus/component/<method_name>.xml}} and change the {{ic|<layout>}} tag to the expected keyboard layout.<br />
<br />
== ibus-m17n ==<br />
<br />
In the specific case of {{ic|ibus-m17n}}, a helper, {{ic|/usr/lib/ibus/ibus-engine-m17n}}, generates the necessary XML at runtime. With version <br />
[https://www.archlinux.org/packages/community/x86_64/ibus-m17n/ 1.3.4-4 of the package], this unfortunately uses {{ic|us}} as the {{ic|layout}} without a possibility of override. Fortunately, this was changed to {{ic|default}} [https://github.com/ibus/ibus-m17n/commit/2b915cb54122e2010db1182f4f1007b9f7cda5aa a few commits later in Git], but no new release was made since then. To remediate the issue, a [https://aur.archlinux.org/packages/ibus-m17n-git/ Git-master version of the package is available from AUR], which works nicely.<br />
<br />
=== English international AltGr ===<br />
If you want to use AltGr as compose key for the english keyboard, choose {{ic|English international AltGr}} in the ibus-setup instead of 'English'.<br />
<br />
=== Trouble with Japanese ===<br />
If you have trouble with Japanese input try to generate the locales with uncommenting {{ic|ja_JP.UTF-8 UTF-8}} in the {{ic|/etc/locale.gen}} file and then run {{ic|locale-gen}}.<br />
<br />
== See also ==<br />
<br />
* [https://github.com/ibus/ibus GitHub repository]</div>Ounrhttps://wiki.archlinux.org/index.php?title=XDG_MIME_Applications&diff=569272XDG MIME Applications2019-03-20T21:15:44Z<p>Ounr: /* Shared MIME database */ style</p>
<hr />
<div>[[Category:Freedesktop.org]]<br />
[[ja:デフォルトアプリケーション]]<br />
[[ru:XDG MIME Applications]]<br />
[[zh-hans:Default applications]]<br />
{{Related articles start}}<br />
{{Related|Desktop entries}}<br />
{{Related|Desktop environment}}<br />
{{Related|Window manager}}<br />
{{Related articles end}}<br />
The [https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html XDG MIME Applications specification] builds upon the [[#Shared MIME database]] and [[#Desktop entries]] to provide [[default applications]].<br />
<br />
# Applications describe what MIME types they can handle using [[desktop entries]].<br />
# {{Pkg|desktop-file-utils}} registers a [[pacman hook]] to build a cache database of MIME types handled by desktop entries, see {{man|1|update-desktop-database}}.<br />
# Applications can install new MIME types by placing XML files in {{ic|/usr/share/mime/packages/}}.<br />
# {{Pkg|shared-mime-info}} registers a [[pacman hook]] to build the Shared MIME-Info database cache, see {{man|1|update-mime-database}}.<br />
# [[Desktop environment]]s and users can change default applications and add or remove MIME type to application associations using [[#mimeapps.list|mimeapps.list]] files.<br />
<br />
== Shared MIME database ==<br />
<br />
The [https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html XDG Shared MIME-info Database specification] facilitates a shared MIME database across desktop environments and allows applications to easily register new MIME types system-wide.<br />
<br />
The database is built from the XML files installed by packages in {{ic|/usr/share/mime/packages/}} using the tools from {{Pkg|shared-mime-info}}.<br />
<br />
The files in {{ic|/usr/share/mime/}} should not be directly edited, however it is possible to maintain a separate database on a per-user basis in the {{ic|~/.local/share/mime/}} tree.<br />
<br />
"URI scheme handling [..] are handled through applications handling the {{ic|x-scheme-handler/foo}} MIME type, where foo is the URI scheme in question."[https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#idm140625828587776]<br />
<br />
=== New MIME types ===<br />
<br />
{{expansion|Is the process different for assigning an extension to an existing MIME type?}}<br />
<br />
This example defines a new MIME type {{ic|application/x-foobar}} and assigns it to any file with a name ending in ''.foo''. Simply create the following file:<br />
<br />
{{hc|~/.local/share/mime/packages/application-x-foobar.xml|2=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<nowiki><mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"></nowiki><br />
'''<mime-type type="application/x-foobar">'''<br />
<comment>foo file</comment><br />
<icon name="application-x-foobar"/><br />
<glob-deleteall/><br />
'''<glob pattern="*.foo"/>'''<br />
</mime-type><br />
</mime-info><br />
}}<br />
<br />
And then update the MIME database:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
Of course this will not have any effect if no desktop entries are associated with the MIME type. You may need to create new [[desktop entries]] or modify [[#mimeapps.list]].<br />
<br />
== Desktop entries ==<br />
<br />
{{Remove|Already covered in intro (except cache file path). User-specific desktop entries should be irrelevant as they aren't cached.}}<br />
<br />
Each package can use [[desktop entries]] to provide information about the MIME types that can be handled by the packaged software. In order to provide fast search in the reverse direction, the system uses the tools from the {{Pkg|desktop-file-utils}} package to analyze the desktop files and to create an inverse mapping stored in the {{ic|/usr/share/applications/mimeinfo.cache}} file. This is the only file that programs need to read to find all desktop files that might be used to handle given MIME type. Using the database is easier and faster than reading hundreds of ''.desktop'' files directly.<br />
<br />
The files in {{ic|/usr/share/applications/}} should not be edited directly, it is possible to maintain a separate database on a per-user basis in the {{ic|~/.local/share/applications/}} tree. See [[Desktop entries]] for details.<br />
<br />
== mimeapps.list ==<br />
<br />
The [https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html XDG standard] is the most common for configuring desktop environments. Default applications for each MIME type are stored in {{ic|mimeapps.list}} files, which can be stored in several locations. They are searched in the following order, with earlier associations taking precedence over later ones:<br />
<br />
{| class="wikitable"<br />
! Path !! Usage<br />
|-<br />
| {{ic|~/.config/mimeapps.list}} || user overrides<br />
|-<br />
| {{ic|/etc/xdg/mimeapps.list}} || system-wide overrides<br />
|-<br />
| {{ic|~/.local/share/applications/mimeapps.list}} || ('''deprecated''') user overrides<br />
|-<br />
| {{ic|/usr/local/share/applications/mimeapps.list}}<br>{{ic|/usr/share/applications/mimeapps.list}} || distribution-provided defaults<br />
|}<br />
<br />
Additionally, it is possible to define [[desktop environment]]-specific default applications in a file named {{ic|''desktop''-mimeapps.list}} where {{ic|''desktop''}} is the name of the desktop environment (from the {{ic|XDG_CURRENT_DESKTOP}} environment variable). For example, {{ic|/etc/xdg/xfce-mimeapps.list}} defines system-wide default application overrides for [[Xfce]]. These desktop-specific overrides take precedence over the corresponding non-desktop-specific file. For example, {{ic|/etc/xdg/xfce-mimeapps.list}} takes precedence over {{ic|/etc/xdg/mimeapps.list}} but is still overridden by {{ic|~/.config/mimeapps.list}}.<br />
<br />
{{Tip|1=Although deprecated, several applications still read/write to {{ic|~/.local/share/applications/mimeapps.list}}. To simplify maintenance, simply symlink it {{bc|$ ln -s ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list}}. Note that the symlink must be in this direction because [[xdg-utils]] deletes and recreates {{ic|~/.config/mimeapps.list}} when it writes to it, which will break any symbolic/hard links}}<br />
<br />
{{Note|You might also find files in these locations named {{ic|defaults.list}}. This file is similar to {{ic|mimeapps.list}} except it only lists default applications (not added/removed associations). It is now deprecated and should be manually merged with {{ic|mimeapps.list}}.}}<br />
<br />
==== Format ====<br />
<br />
Consider the following example:<br />
<br />
{{hc|mimeapps.list|2=<br />
[Added Associations]<br />
image/jpeg=bar.desktop;baz.desktop<br />
video/H264=bar.desktop<br />
[Removed Associations]<br />
video/H264=baz.desktop<br />
[Default Applications]<br />
image/jpeg=foo.desktop}}<br />
<br />
Each section assigns one or more desktop entries to MIME types.<br />
* '''Added Associations''' indicates that the applications support opening that MIME type. For example, {{ic|bar.desktop}} and {{ic|baz.desktop}} can open JPEG images. This might affect the application list you see when right-clicking a file in a file browser.<br />
* '''Removed Associations''' indicates that the applications ''do not'' support that MIME type. For example, {{ic|baz.desktop}} cannot open H.264 video.<br />
* '''Default Applications''' indicates that the applications should be the default choice for opening that MIME type. For example, JPEG images should be opened with {{ic|foo.desktop}}. This implicitly adds an association between the application and the MIME type. If there are multiple applications, they are tried in order.<br />
<br />
Each section is optional and can be omitted if unneeded.<br />
<br />
== Utilities ==<br />
<br />
While it is possible to configure default applications and MIME types by directly editing [[#mimeapps.list]] and the [[#Shared MIME database]], there are many tools that can simplify the process. These tools are also important because applications may delegate opening of files to these tools rather than trying to implement the MIME type standard themselves.<br />
<br />
If you use a [[desktop environment]] you should first check if it provides its own utility. That should be preferred over these alternatives.<br />
<br />
The official [[xdg-utils]] contain tools for managing MIME types and default applications according to the XDG standard ([[xdg-utils#xdg-mime|xdg-mime]]). Most importantly it provides [[xdg-open]] which many applications use to open a file with its default application.<br />
<br />
=== lsdesktopf ===<br />
<br />
{{AUR|lsdesktopf}} provides several methods of searching the MIME database and desktop MIME entries.<br />
<br />
For example, to see all MIME extensions in the system's ''.desktop'' files that have MIME type {{ic|video}} you can use {{ic|lsdesktopf --gm -gx video}} or to search in the XML database files use {{ic|lsdesktopf --gdx -gx video}}. To get a quick overview of how many and which ''.desktop'' files can be associated with a certain MIME type, use {{ic|lsdesktopf --gen-mimeapps}}. To see all file name extensions in XML database files, use {{ic|lsdesktopf --gdx -gfx}}.<br />
<br />
== Troubleshooting ==<br />
<br />
If a file is not being opened by your desired default application, there are several possible causes. You may need to check each case.<br />
<br />
=== Missing desktop entry ===<br />
<br />
A [[desktop entry]] is required in order to associate an application with a MIME type. Ensure that such an entry exists and can be used to (manually) open files in the application.<br />
<br />
=== Missing association ===<br />
<br />
If the application's desktop entry does not specify the MIME type under its {{ic|MimeType}} key, it will not be considered when an application is needed to open that type. Edit [[#mimeapps.list]] to add an association between the .desktop file and the MIME type.<br />
<br />
=== Non-default application ===<br />
<br />
If the desktop entry is associated with the MIME type, it may simply not be set as the default. Edit [[#mimeapps.list]] to set the default association.<br />
<br />
=== Nonstandard association ===<br />
<br />
Applications are free to ignore or only partially implement the XDG standard. Check for usage of deprecated files such as {{ic|~/.local/share/applications/mimeapps.list}} and {{ic|~/.local/share/applications/defaults.list}}. If you are attempting to open the file from another application (e.g. a web browser or file manager) check if that application has its own method of selecting default applications.<br />
<br />
=== Variables in .desktop files that affect application launch ===<br />
<br />
{{Expansion|1=The fact {{ic|MimeType}} entries may be missing in the desktop files is only implied here, i.e. "Even if an application...", though this is a common cause of errors. Some openers may also associate mime types not explicitly listed in a desktop file (such as {{Pkg|exo}}). Further environment-specific factors are at play, e.g. whether {{ic|1=Terminal=true}} has an effect, though latter should arguably be expanded on in [[Desktop entries]].}}<br />
<br />
Desktop environments and file managers supporting the specifications launch programs according to definition in the ''.desktop'' files. See [[Desktop entries#Application entry]]. <br />
<br />
Usually, configuration of the packaged ''.desktop'' files is not required, but it may not be bug-free. Even if an application containing necessary MIME type description in the ''.desktop'' file {{ic|MimeType}} variable that is used for association, it can fail to start correctly, not start at all or start without opening a file. <br />
<br />
This may happen, for example, if the {{ic|Exec}} variable is missing internal options needed for how to open a file, or how the application is shown in the menu. The {{ic|Exec}} variable usually begins with {{ic|%}}; for its currently supported options, see [https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables exec-variables].<br />
<br />
The following table lists the main variable entries of ''.desktop'' files that affect how an application starts, if it has a MIME type associated with it. <br />
<br />
{| class="wikitable"<br />
! Variable names !! Example 1 content !! Example 2 content !! Description<br />
|-<br />
| DBusActivatable || DBusActivatable=true || DBusActivatable=false || Application interact with [https://www.freedesktop.org/wiki/Software/dbus/ D-Bus]. <br> See also configuration: [https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus D-Bus].<br />
|-<br />
| MimeType || MimeType=application/vnd.oasis.opendocument.text || MimeType=application/vnd.sun.xml.math || List of MIME types supported by application<br />
|-<br />
| StartupWMClass || StartupWMClass=google-chrome || StartupWMClass=xpad || Associate windows with the owning application<br />
|-<br />
| Terminal || Terminal=true || Terminal=false || Start in default terminal<br />
|}</div>Ounrhttps://wiki.archlinux.org/index.php?title=Kernel_parameters&diff=564582Kernel parameters2019-01-24T15:23:55Z<p>Ounr: Undo revision 564210 by Ounr (talk) use redirect "Kernel Compilation" - Help:Style#Redirect_pages</p>
<hr />
<div>[[Category:Kernel]]<br />
[[es:Kernel parameters]]<br />
[[ja:カーネルパラメータ]]<br />
[[ru:Kernel parameters]]<br />
[[zh-hans:Kernel parameters]]<br />
There are three ways to pass options to the kernel and thus control its behaviour:<br />
<br />
# When building the kernel. See [[Kernel Compilation]] for details.<br />
# When starting the kernel (usually, when invoked from a boot loader).<br />
# At runtime (through the files in {{ic|/proc}} and {{ic|/sys}}). See [[sysctl]] for details.<br />
<br />
This page explains in more detail the second method and shows a list of the most used kernel parameters in Arch Linux.<br />
<br />
Not all parameters are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems built in. They also depend on the presence of the hardware they are associated with.<br />
<br />
Parameters either have the format {{ic|parameter}} or {{ic|1=parameter=value}}.<br />
<br />
{{Note|All kernel parameters are case-sensitive. Most of them are lower case, writing those in upper case does not work.}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|<br />
* You can check the parameters your system was booted up with by running {{ic|cat /proc/cmdline}} and see if it includes your changes.<br />
* The Arch Linux [https://www.archlinux.org/download/ installation medium] uses [[Syslinux]] for [[Wikipedia:BIOS|BIOS]] systems, and [[systemd-boot]] for [[UEFI]] systems.}}<br />
<br />
Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.<br />
<br />
The following examples add the {{ic|quiet}} and {{ic|splash}} parameters to [[Syslinux]], [[systemd-boot]], [[GRUB]], [[GRUB Legacy]], [[LILO]], and [[rEFInd]].<br />
<br />
=== Syslinux ===<br />
<br />
* Press {{ic|Tab}} when the menu shows up and add them at the end of the string:<br />
<br />
: {{bc|1=linux /boot/vmlinuz-linux root=/dev/sda3 initrd=/boot/initramfs-linux.img ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/syslinux/syslinux.cfg}} and add them to the {{ic|APPEND}} line:<br />
<br />
: {{bc|1=APPEND root=/dev/sda3 ''quiet splash''}}<br />
<br />
For more information on configuring Syslinux, see the [[Syslinux]] article.<br />
<br />
=== systemd-boot ===<br />
<br />
* Press {{ic|e}} when the menu appears and add the parameters to the end of the string:<br />
<br />
: {{bc|1=initrd=\initramfs-linux.img root=/dev/sda2 ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
{{Note|If you have not set a value for menu timeout, you will need to hold {{ic|Space}} while booting for the systemd-boot menu to appear.}}<br />
<br />
{{Note|If you can't edit the parameters from the boot menu, you may need to edit {{ic|/boot/loader/loader.conf}} and add "editor 1" to enable editing.}}<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/loader/entries/arch.conf}} (assuming you set up your [[EFI system partition]]) and add them to the {{ic|options}} line:<br />
<br />
: {{bc|1=options root=/dev/sda2 ''quiet splash''}}<br />
<br />
For more information on configuring systemd-boot, see the [[systemd-boot]] article.<br />
<br />
=== GRUB ===<br />
<br />
* Press {{ic|e}} when the menu shows up and add them on the {{ic|linux}} line:<br />
<br />
: {{bc|1=linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ''quiet splash''}}<br />
<br />
: Press {{ic|Ctrl+x}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, while you ''could'' manually edit {{ic|/boot/grub/grub.cfg}} with the exact line from above, the best practice is to:<br />
<br />
:Edit {{ic|/etc/default/grub}} and append your kernel options to the {{ic|GRUB_CMDLINE_LINUX_DEFAULT}} line:<br />
<br />
:: {{bc|1=GRUB_CMDLINE_LINUX_DEFAULT="''quiet splash''"}}<br />
<br />
:And then automatically re-generate the {{ic|grub.cfg}} file with:<br />
<br />
:: {{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
For more information on configuring GRUB, see the [[GRUB]] article.<br />
<br />
=== GRUB Legacy ===<br />
<br />
* Press {{ic|e}} when the menu shows up and add them on the {{ic|kernel}} line:<br />
<br />
: {{bc|1=kernel /boot/vmlinuz-linux root=/dev/sda3 ''quiet splash''}}<br />
<br />
: Press {{ic|b}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/grub/menu.lst}} and add them to the {{ic|kernel}} line, exactly like above.<br />
<br />
For more information on configuring GRUB Legacy, see the [[GRUB Legacy]] article.<br />
<br />
=== LILO ===<br />
<br />
* Add them to {{ic|/etc/lilo.conf}}:<br />
<br />
: {{bc|<nowiki><br />
image=/boot/vmlinuz-linux<br />
...<br />
</nowiki>''quiet splash''}}<br />
<br />
For more information on configuring LILO, see the [[LILO]] article.<br />
<br />
=== rEFInd ===<br />
<br />
* Press {{ic|+}}, {{ic|F2}}, or {{ic|Insert}} on the desired menu entry and press it again on the submenu entry. Add kernel parameters at the end of the string:<br />
<br />
: {{bc|1=root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw initrd=\boot\initramfs-linux.img ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/refind_linux.conf}} and append them to all/required lines, for example<br />
<br />
: {{bc|1="Boot using default options" "root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw ''quiet splash''"}}<br />
<br />
* If you have disabled auto-detection of OSes in rEFInd and are defining OS stanzas instead in {{ic|''esp''/EFI/refind/refind.conf}} to load your OSes, you can edit it like:<br />
<br />
: {{bc|<nowiki><br />
menuentry "Arch Linux" {<br />
...<br />
options "root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw </nowiki>''quiet splash''<nowiki>"<br />
...<br />
}<br />
</nowiki>}}<br />
<br />
For more information on configuring rEFInd, see the [[rEFInd]] article.<br />
<br />
=== EFISTUB ===<br />
<br />
See [[EFISTUB#Using UEFI directly]].<br />
<br />
=== Hijacking cmdline ===<br />
<br />
Even without access to your bootloader it is possible to change your kernel parameters to enable debugging (if you have root access). This can be accomplished by overwriting {{ic|/proc/cmdline}} which stores the kernel parameters. However {{ic|/proc/cmdline}} is not writable even as root, so this hack is accomplished by using a bind mount to mask the path.<br />
<br />
First create a file containing the desired kernel parameters<br />
<br />
{{hc|/root/cmdline|2=root=/dev/disk/by-label/ROOT ro console=tty1 logo.nologo debug}}<br />
<br />
Then use a bind mount to overwrite the parameters<br />
<br />
# mount -n --bind -o ro /root/cmdline /proc/cmdline<br />
<br />
The {{ic|-n}} option skips adding the mount to {{ic|/etc/mtab}}, so it will work even if root is mounted read-only. You can {{ic|cat /proc/cmdline}} to confirm that your change was successful.<br />
<br />
== Parameter list ==<br />
<br />
This list is not comprehensive. For a complete list of all options, please see the [https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt kernel documentation].<br />
{| class="wikitable"<br />
!parameter!!Description<br />
|-<br />
| root= || Root filesystem.<br />
|-<br />
| rootflags= || Root filesystem mount options.<br />
|-<br />
| ro || Mount root device read-only on boot (default<sup>1</sup>).<br />
|-<br />
| rw || Mount root device read-write on boot.<br />
|-<br />
| initrd=|| Specify the location of the initial ramdisk.<br />
|-<br />
| init= || Run specified binary instead of {{ic|/sbin/init}} (symlinked to [[systemd]] in Arch) as init process.<br />
|-<br />
| init=/bin/sh || Boot to shell.<br />
|-<br />
| systemd.unit= || Boot to a [[systemd#Targets|specified target]].<br />
|-<br />
| resume= || Specify a swap device to use when waking from [[hibernation]].<br />
|-<br />
| nomodeset || Disable [[Kernel mode setting]].<br />
|-<br />
| zswap.enabled || Enable [[Zswap]].<br />
|-<br />
| panic= || Time before automatic reboot on kernel panic.<br />
|-<br />
| debug || Enable kernel debugging (events log level).<br />
|-<br />
| mem= || Force usage of a specific amount of memory to be used.<br />
|-<br />
| maxcpus= || Maximum number of processors that an SMP kernel will bring up during bootup.<br />
|-<br />
| selinux= || Disable or enable SELinux at boot time.<br />
|-<br />
| netdev= || Network devices parameters.<br />
|-<br />
| video=<videosetting> || Override framebuffer video defaults.<br />
|}<br />
<br />
<sup>1</sup> [[mkinitcpio]] uses {{ic|ro}} as default value when neither {{ic|rw}} or {{ic|ro}} is set by the [[boot loader]]. Boot loaders may set the value to use, for example GRUB uses {{ic|rw}} by default (see {{Bug|36275}} as a reference).<br />
<br />
== See also ==<br />
<br />
* [https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt Linux "Kernel Parameters" documentation]<br />
* [[Power saving#Kernel parameters]]<br />
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel parameters with further explanation and grouped by similar options]</div>Ounrhttps://wiki.archlinux.org/index.php?title=General_troubleshooting&diff=564211General troubleshooting2019-01-21T16:34:04Z<p>Ounr: Fixed a typo</p>
<hr />
<div>[[Category:System administration]]<br />
[[Category:System recovery]]<br />
[[Category:Installation process]]<br />
[[es:General troubleshooting]]<br />
[[ja:一般的なトラブルシューティング]]<br />
[[ru:General troubleshooting]]<br />
[[zh-hans:General troubleshooting]]<br />
{{Related articles start}}<br />
{{Related|Reporting bug guidelines}}<br />
{{Related|Step-by-step debugging guide}}<br />
{{Related|Debug - Getting Traces}}<br />
{{Related|IRC Collaborative Debugging}}<br />
{{Related articles end}}<br />
<br />
This article explains some methods for general troubleshooting. For application specific issues, please reference the particular wiki page for that program.<br />
<br />
== General procedures ==<br />
<br />
=== Attention to detail ===<br />
<br />
In order to resolve an issue that you are having, it is ''absolutely crucial'' to have a firm basic understanding of how that specific subsystem functions. How does it work, and what does it need to run without error? If you cannot comfortably answer these question then you would best review the [[Table of contents|Archwiki]] article for the subsystem that you are having trouble with. Once you feel like you have understood it, it will be easier for you to pinpoint the cause of the problem.<br />
<br />
=== Questions/checklist ===<br />
<br />
The following gives a number of questions for you whenever dealing with a malfunctioning system. Under each question there are notes explaining how you should be answering each question, followed by some light examples on how to easily gather data output and what tools can be used to review logs and the journal.<br />
<br />
# What is the issue(s)?<br />
#: Be ''as precise as possible''. This will help you not get confused and/or side-tracked when looking up specific information.<br />
# Are there error messages? (if any)<br />
#: Copy and paste ''full outputs'' that contain '''error messages''' related to your issue into a separate file, such as {{ic|$HOME/issue.log}}. For example, to forward the output of the following [[mkinitcpio]] command to {{ic|$HOME/issue.log}}:<br />
#: {{bc|$ mkinitcpio -p linux >> $HOME/issue.log}}<br />
# Can you reproduce the issue?<br />
#: If so, give ''exact'' '''step-by-step''' instructions/commands needed to do so.<br />
# When did you first encounter these issues and what was changed between then and when the system was operating without error?<br />
#:If it occurred right after an update then, list '''all packages that were updated'''. Include ''version numbers'', also, paste the entire update from [[pacman]].log ({{ic|/var/log/pacman.log}}). Also take note of the statuses of ''any'' service(s) needed to support the malfunctioning application(s) using [[systemd]]'s systemctl tools. For example, to forward the output of the following [[Systemd#Basic_systemctl_usage|systemd]] command to {{ic|$HOME/issue.log}}:<br />
#: {{bc|$ systemctl status dhcpcd@eth0.service >> $HOME/issue.log}}<br />
#: {{Note|Using {{ic|'''>>'''}} will ensure any previous text in {{ic|$HOME/issue.log}} will not be overwritten.}}<br />
<br />
=== Approach ===<br />
<br />
Rather than approaching an issue by stating,<br />
<br />
''Application X does not work.''<br />
<br />
you will find it more helpful to formulate your issue in the context of the system as a whole, as:<br />
<br />
''Application X produces Y error(s) when performing Z tasks under conditions A and B.''<br />
<br />
=== Additional support ===<br />
<br />
With all the information in front of you you should have a good idea as to what is going on with the system and you can now start working on a proper fix.<br />
<br />
If you require any additional support, it can be found on [https://bbs.archlinux.org the forums] or IRC at irc.freenode.net #archlinux. See [[IRC channels]] for other options.<br />
<br />
{{Note|[[Code of conduct#Arch Linux distribution support .2Aonly.2A|Support is provided for Arch Linux ''only'']] and not [[Arch-based distributions]].}}<br />
<br />
When asking for support post the '''complete''' output/logs, not just what you think are the significant sections. Sources of information include:<br />
<br />
* Full output of any command involved - do not just select what you think is relevant.<br />
* Output from systemd's {{ic|journalctl}}. For more extensive output, use the {{ic|1=systemd.log_level=debug}} boot parameter.<br />
* Log files (have a look in {{ic|/var/log}})<br />
* Relevant configuration files<br />
* Drivers involved<br />
* Versions of packages involved<br />
* Kernel: {{ic|dmesg}}. For a boot problem, at least the last 10 lines displayed, preferably more<br />
* Networking: Exact output of commands involved, and any configuration files<br />
* Xorg: {{ic|/var/log/Xorg.0.log}}, and prior logs if you have overwritten the problematic one<br />
* Pacman: If a recent upgrade broke something, look in {{ic|/var/log/pacman.log}}<br />
<br />
One of the better ways to post this information is to use an online pastebin. You can [[install]] the {{pkg|pbpst}} or {{pkg|gist}} package to automatically upload information. For example, to upload the content of your systemd journal from this boot you would do:<br />
<br />
# journalctl -xb | pbpst -S<br />
<br />
A link will then be output that you can paste to the forum or IRC.<br />
<br />
Additionally, before posting your question, you may wish to review [http://www.catb.org/esr/faqs/smart-questions.html how to ask smart questions]. See also [[Code of conduct]].<br />
<br />
== Boot problems ==<br />
<br />
Diagnosing errors during the [[boot process]] involves changing the [[kernel parameters]], and rebooting the system.<br />
<br />
If booting the system is not possible, boot from a [https://www.archlinux.org/download/ live image] and [[change root]] to the existing system.<br />
<br />
=== Console messages ===<br />
<br />
After the boot process, the screen is cleared and the login prompt appears, leaving users unable to read init output and error messages. This default behavior may be modified using methods outlined in the sections below.<br />
<br />
Note that regardless of the chosen option, kernel messages can be displayed for inspection after booting by using {{ic|dmesg}} or all logs from the current boot with {{ic|journalctl -b}}.<br />
<br />
==== Flow control ====<br />
<br />
This is basic management that applies to most terminal emulators, including virtual consoles (vc):<br />
<br />
* Press {{ic|Ctrl+S}} to pause the output<br />
* And {{ic|Ctrl+Q}} to resume it<br />
<br />
This pauses not only the output, but also programs which try to print to the terminal, as they will block on the {{ic|write()}} calls for as long as the output is paused. If your ''init'' appears frozen, make sure the system console is not paused.<br />
<br />
To see error messages which are already displayed, see [[Getty#Have boot messages stay on tty1]].<br />
<br />
==== Scrollback ====<br />
<br />
{{Move|Linux console|More fitting article.}}<br />
<br />
Scrollback allows the user to go back and view text which has scrolled off the screen of a text console. This is made possible by a buffer created between the video adapter and the display device called the scrollback buffer. By default, the key combinations of {{ic|Shift+PageUp}} and {{ic|Shift+PageDown}} scroll the buffer up and down.<br />
<br />
If scrolling up all the way does not show you enough information, you need to expand your scrollback buffer to hold more output. This is done by tweaking the kernel's framebuffer console (fbcon) with the [[kernel parameter]] {{ic|1=fbcon=scrollback:Nk}} where {{ic|N}} is the desired buffer size in kilobytes. The default size is 32k.<br />
<br />
If this does not work, your framebuffer console may not be properly enabled. Check the [https://www.kernel.org/doc/Documentation/fb/fbcon.txt Framebuffer Console documentation] for other parameters, e.g. for changing the framebuffer driver.<br />
<br />
==== Debug output ====<br />
<br />
Most kernel messages are hidden during boot. You can see more of these messages by adding different kernel parameters. The simplest ones are:<br />
<br />
* {{ic|debug}} enables debug messages for both the kernel and [[systemd]]<br />
* {{ic|ignore_loglevel}} forces ''all'' kernel messages to be printed<br />
<br />
Other parameters you can add that might be useful in certain situations are:<br />
* {{ic|1=earlyprintk=vga,keep}} prints kernel messages very early in the boot process, in case the kernel would crash before output is shown. You must change {{ic|vga}} to {{ic|efi}} for [[EFI]] systems<br />
* {{ic|1=log_buf_len=16M}} allocates a larger (16MB) kernel message buffer, to ensure that debug output is not overwritten<br />
<br />
There are also a number of separate debug parameters for enabling debugging in specific subsystems e.g. {{ic|bootmem_debug}}, {{ic|sched_debug}}. Check the [https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt kernel parameter documentation] for specific information.<br />
<br />
{{Note|If you cannot scroll back far enough to view the desired boot output, you should increase the size of the [[scrollback buffer]].}}<br />
<br />
=== Recovery shells ===<br />
<br />
Getting an interactive shell at some stage in the boot process can help you pinpoint exactly where and why something is failing. There are several kernel parameters for doing so, but they all launch a normal shell which you can {{ic|exit}} to let the kernel resume what it was doing:<br />
* {{ic|rescue}} launches a shell shortly after the root filesystem is remounted read/write<br />
* {{ic|emergency}} launches a shell even earlier, before most filesystems are mounted<br />
* {{ic|1=init=/bin/sh}} (as a last resort) changes the init program to a root shell. {{ic|rescue}} and {{ic|emergency}} both rely on [[systemd]], but this should work even if ''systemd'' is broken<br />
<br />
Another option is systemd's debug-shell which adds a root shell on {{ic|tty9}} (accessible with Ctrl+Alt+F9). It can be enabled by either adding {{ic|systemd.debug-shell}} to the [[kernel parameters]], or by [[enabling]] {{ic|debug-shell.service}}. Take care to disable the service when done to avoid the security risk of leaving a root shell open on every boot.<br />
<br />
=== Blank screen with Intel video ===<br />
<br />
This is most likely due to a problem with [[kernel mode setting]]. Try [[Kernel mode setting#Disabling modesetting|disabling modesetting]] or changing the [[Intel#KMS Issue: console is limited to small area|video port]].<br />
<br />
=== Stuck while loading the kernel ===<br />
<br />
Try disabling ACPI by adding the {{ic|1=acpi=off}} kernel parameter.<br />
<br />
=== Debugging kernel modules ===<br />
<br />
See [[Kernel modules#Obtaining information]].<br />
<br />
=== Debugging hardware ===<br />
<br />
* You can display extra debugging information about your hardware by following [[udev#Debug output]].<br />
* Ensure that [[Microcode]] updates are applied on your system.<br />
* Test your device's RAM with {{pkg|memtest86+}}. Unstable RAM may lead to some extremely odd issues, ranging from random crashes to data corruption. {{pkg|memtester}} performs similar tests, but it can't test the whole RAM.<br />
<br />
== Kernel panics ==<br />
<br />
A ''kernel panic'' occurs when the Linux kernel enters an unrecoverable failure state. The state typically originates from buggy hardware drivers resulting in the machine being deadlocked, non-responsive, and requiring a reboot. Just prior to deadlock, a diagnostic message is generated, consisting of: the ''machine state'' when the failure occurred, a ''call trace'' leading to the kernel function that recognized the failure, and a listing of currently loaded modules. Thankfully, kernel panics do not happen very often using ''mainline'' versions of the kernel--such as those supplied by the official repositories--but when they do happen, you need to know how to deal with them.<br />
<br />
{{Note|Kernel panics are sometimes referred to as ''oops'' or ''kernel oops''. While both panics and oops occur as the result of a failure state, an ''oops'' is more general in that it does not ''necessarily'' result in a deadlocked machine--sometimes the kernel can recover from an oops by killing the offending task and carrying on.}}<br />
<br />
{{Tip|Pass the kernel parameter {{ic|1=oops=panic}} at boot or write {{ic|1}} to {{ic|/proc/sys/kernel/panic_on_oops}} to force a recoverable oops to issue a panic instead. This is advisable if you are concerned about the small chance of system instability resulting from an oops recovery which may make future errors difficult to diagnose.}}<br />
<br />
=== Examine panic message ===<br />
<br />
If a kernel panic occurs very early in the boot process, you may see a message on the console containing "Kernel panic - not syncing:", but once [[Systemd]] is running, kernel messages will typically be captured and written to the system log. However, when a panic occurs, the diagnostic message output by the kernel is ''almost never'' written to the log file on disk because the machine deadlocks before {{ic|system-journald}} gets the chance. Therefore, the only way to examine the panic message is to view it on the console as it happens (without resorting to setting up a ''kdump crashkernel''). You can do this by booting with the following kernel parameters and attempting to reproduce the panic on tty1:<br />
<br />
{{bc|1=systemd.journald.forward_to_console=1 console=tty1}}<br />
<br />
{{Tip|In the event that the panic message scrolls away too quickly to examine, try passing the kernel parameter {{ic|1=pause_on_oops=''seconds''}} at boot.}}<br />
<br />
==== Example scenario: bad module ====<br />
<br />
It is possible to make a best guess as to what subsystem or module is causing the panic using the information in the diagnostic message. In this scenario, we have a panic on some imaginary machine during boot. Pay attention to the lines highlighted in '''bold''':<br />
<br />
{{bc|'''kernel: BUG: unable to handle kernel NULL pointer dereference at (null)''' [1]<br />
'''kernel: IP: fw_core_init+0x18/0x1000 [firewire_core]''' [2]<br />
kernel: PGD 718d00067 <br />
kernel: P4D 718d00067 <br />
kernel: PUD 7b3611067 <br />
kernel: PMD 0 <br />
kernel: <br />
kernel: Oops: 0002 [#1] PREEMPT SMP<br />
'''kernel: Modules linked in: firewire_core(+) crc_itu_t cfg80211 rfkill ipt_REJECT nf_reject_ipv4 nf_log_ipv4 nf_log_common xt_LOG nf_conntrack_ipv4 ...''' [3] <br />
kernel: CPU: 6 PID: 1438 Comm: modprobe Tainted: P O 4.13.3-1-ARCH #1<br />
kernel: Hardware name: Gigabyte Technology Co., Ltd. H97-D3H/H97-D3H-CF, BIOS F5 06/26/2014<br />
kernel: task: ffff9c667abd9e00 task.stack: ffffb53b8db34000<br />
kernel: RIP: 0010:fw_core_init+0x18/0x1000 [firewire_core]<br />
kernel: RSP: 0018:ffffb53b8db37c68 EFLAGS: 00010246<br />
kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000<br />
kernel: RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffffc16d3af4<br />
kernel: RBP: ffffb53b8db37c70 R08: 0000000000000000 R09: ffffffffae113e95<br />
kernel: R10: ffffe93edfdb9680 R11: 0000000000000000 R12: ffffffffc16d9000<br />
kernel: R13: ffff9c6729bf8f60 R14: ffffffffc16d5710 R15: ffff9c6736e55840<br />
kernel: FS: 00007f301fc80b80(0000) GS:ffff9c675dd80000(0000) knlGS:0000000000000000<br />
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br />
kernel: CR2: 0000000000000000 CR3: 00000007c6456000 CR4: 00000000001406e0<br />
kernel: Call Trace:<br />
'''kernel: do_one_initcall+0x50/0x190''' [4]<br />
kernel: ? do_init_module+0x27/0x1f2<br />
kernel: do_init_module+0x5f/0x1f2<br />
kernel: load_module+0x23f3/0x2be0<br />
kernel: SYSC_init_module+0x16b/0x1a0<br />
kernel: ? SYSC_init_module+0x16b/0x1a0<br />
kernel: SyS_init_module+0xe/0x10<br />
kernel: entry_SYSCALL_64_fastpath+0x1a/0xa5<br />
kernel: RIP: 0033:0x7f301f3a2a0a<br />
kernel: RSP: 002b:00007ffcabbd1998 EFLAGS: 00000246 ORIG_RAX: 00000000000000af<br />
kernel: RAX: ffffffffffffffda RBX: 0000000000c85a48 RCX: 00007f301f3a2a0a<br />
kernel: RDX: 000000000041aada RSI: 000000000001a738 RDI: 00007f301e7eb010<br />
kernel: RBP: 0000000000c8a520 R08: 0000000000000001 R09: 0000000000000085<br />
kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000c79208<br />
kernel: R13: 0000000000c8b4d8 R14: 00007f301e7fffff R15: 0000000000000030<br />
kernel: Code: <c7> 04 25 00 00 00 00 01 00 00 00 bb f4 ff ff ff e8 73 43 9c ec 48 <br />
kernel: RIP: fw_core_init+0x18/0x1000 [firewire_core] RSP: ffffb53b8db37c68<br />
kernel: CR2: 0000000000000000<br />
kernel: ---[ end trace 71f4306ea1238f17 ]---<br />
'''kernel: Kernel panic - not syncing: Fatal exception''' [5]<br />
kernel: Kernel Offset: 0x80000000 from 0xffffffff810000000 (relocation range: 0xffffffff800000000-0xfffffffffbffffffff<br />
kernel: ---[ end Kernel panic - not syncing: Fatal exception}}<br />
<br />
* [1] Indicates the type of error that caused the panic. In this case it was a programmer bug.<br />
* [2] Indicates that the panic happened in a function called ''fw_core_init'' in module ''firewire_core''.<br />
* [3] Indicates that ''firewire_core'' was the latest module to be loaded.<br />
* [4] Indicates that the function that called function ''fw_core_init'' was ''do_one_initcall''.<br />
* [5] Indicates that this ''oops'' message is, in fact, a kernel panic and the system is now deadlocked.<br />
<br />
We can surmise then, that the panic occurred during the initialization routine of module ''firewire_core'' as it was loaded. (We might assume then, that the machine's firewire hardware is incompatible with this version of the firewire driver module due to a programmer error, and will have to wait for a new release.) In the meantime, the easiest way to get the machine running again is to prevent the module from being loaded. We can do this in one of two ways:<br />
<br />
* If the module is being loaded during the execution of the ''initramfs'', reboot with the kernel parameter {{ic|1=rd.blacklist=firewire_core}}.<br />
* Otherwise reboot with the kernel parameter {{ic|1=module_blacklist=firewire_core}}.<br />
<br />
=== Reboot into root shell and fix problem ===<br />
<br />
You will need a root shell to make changes to the system so the panic no longer occurs. If the panic occurs on boot, there are several strategies to obtain a root shell before the machine deadlocks:<br />
<br />
* Reboot with the kernel parameter {{ic|emergency}}, {{ic|rd.emergency}}, or {{ic|-b}} to receive a prompt to login just after the root filesystem is mounted and {{ic|systemd}} is started.<br />
: {{Note|At this point, the root filesystem will be mounted '''read-only'''. Execute {{ic|# mount -o remount,rw /}} to make changes.}}<br />
* Reboot with the kernel parameter {{ic|rescue}}, {{ic|rd.rescue}}, {{ic|single}}, {{ic|s}}, {{ic|S}}, or {{ic|1}} to receive a prompt to login just after local filesystems are mounted.<br />
* Reboot with the kernel parameter {{ic|1=systemd.debug-shell=1}} to obtain a very early root shell on tty9. Switch to it with by pressing {{ic|Ctrl-Alt-F9}}.<br />
* Experiment by rebooting with different sets of kernel parameters to possibly disable the kernel feature that is causing the panic. Try the "old standbys" {{ic|1=acpi=off}} and {{ic|nolapic}}.<br />
: {{Tip|See {{ic|Documentation/admin-guide/kernel-parameters.txt}} in the Linux kernel source tree for all parameters.}}<br />
* As a last resort, boot with the '''Arch Linux Installation CD''' and mount the root filesystem on {{ic|/mnt}} then execute {{ic|# arch-chroot /mnt}}.<br />
<br />
Disable the service or program that is causing the panic, roll-back a faulty update, or fix a configuration problem.<br />
<br />
== Package management ==<br />
<br />
See [[Pacman#Troubleshooting]] for general topics, and [[pacman/Package signing#Troubleshooting]] for issues with PGP keys.<br />
<br />
== fuser ==<br />
<br />
{{Expansion|Needs more information about its usage}}<br />
<br />
''fuser'' is a command-line utility for identifying processes using resources such as files, filesystems and TCP/UDP ports.<br />
<br />
''fuser'' is provided by the {{Pkg|psmisc}} package, which should be already installed as part of the {{Grp|base}} group. See {{man|1|fuser}} for detail.<br />
<br />
== Session permissions ==<br />
<br />
{{Note|You must be using [[systemd]] as your init system for local sessions to work.[https://www.archlinux.org/news/d-bus-now-launches-user-buses/] It is required for polkit permissions and ACLs for various devices (see {{ic|/usr/lib/udev/rules.d/70-uaccess.rules}} and [http://enotty.pipebreaker.pl/2012/05/23/linux-automatic-user-acl-management/])}}<br />
<br />
First, make sure you have a valid local session within X:<br />
<br />
$ loginctl show-session $XDG_SESSION_ID<br />
<br />
This should contain {{ic|1=Remote=no}} and {{ic|1=Active=yes}} in the output. If it does not, make sure that X runs on the same tty where the login occurred. This is required in order to preserve the logind session.<br />
<br />
Basic [[polkit]] actions do not require further set-up. Some polkit actions require further authentication, even with a local session. A polkit authentication agent needs to be running for this to work. See [[polkit#Authentication agents]] for more information on this.<br />
<br />
== Message: "error while loading shared libraries" ==<br />
<br />
{{Accuracy|Or the program needs to be rebuilt after a [[System_maintenance#Partial_upgrades_are_unsupported|soname bump]].}}<br />
<br />
If, while using a program, you get an error similar to: <br />
<br />
error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory<br />
<br />
Use [[pacman]] or [[pkgfile]] to search for the package that owns the missing library:<br />
<br />
{{hc|$ pacman -Fs libusb-0.1.so.4|<br />
extra/libusb-compat 0.1.5-1<br />
usr/lib/libusb-0.1.so.4<br />
}}<br />
<br />
In this case, the {{Pkg|libusb-compat}} package needs to be [[install]]ed.<br />
<br />
The error could also mean that the package that you used to install your program does not list the library as a dependency in its [[PKGBUILD]]: if it is an official package, [[report a bug]]; if it is an [[AUR]] package, report it to the maintainer using its page in the AUR website.<br />
<br />
== Message: "file: could not find any magic files!" ==<br />
<br />
If you see this message, it likely indicates that a package update has corrupted the dynamic linker run-time bindings file and your system is now essentially crippled. You will not be able to recompile or reinstall the package responsible or rebuild the [[initramfs]] until you fix it.<br />
<br />
=== Problem ===<br />
<br />
A package update likely added an invalid {{ic|''filename''.conf}} to the directory {{ic|/etc/ld.so.conf.d}} or edited {{ic|/etc/ld.so.conf}} incorrectly. The result is that the dynamic linker run-time bindings file {{ic|/etc/ld.so.cache}} is being re-generated with invalid data. This can potentially cause all programs on the system that depend on shared libraries to fail (ie. almost all of them).<br />
<br />
=== Solution ===<br />
<br />
# Boot with the '''''Arch Linux Installation CD'''''.<br />
# Mount your root {{ic|/}} filesystem on {{ic|/mnt}} and your {{ic|/boot}} filesystem on {{ic|/mnt/boot}} and chroot into the broken system by executing {{ic|# arch-chroot /mnt}}.<br />
# Examine the file {{ic|/etc/ld.so.conf}} and remove any invalid lines found.<br />
# Examine the files located in the directory {{ic|/etc/ld.so.conf.d/}} and remove any invalid files.<br />
# Rebuild the dynamic linker run-time bindings file {{ic|/etc/ld.so.cache}} by executing {{ic|# ldconfig}}.<br />
# Rebuild the [[Initramfs]] by executing {{ic|# mkinitcpio -p linux}}.<br />
# Exit the chroot, unmount filesystems, and reboot back into your installed system.<br />
<br />
== See also ==<br />
<br />
* [http://www.tuxradar.com/content/how-fix-most-common-linux-problems Fix the Most Common Problems]{{Dead link|2018|02|05}}<br />
* [https://www.reddit.com/r/archlinux/comments/tjjwr/archlinux_a_howto_in_troubleshooting_for_newcomers/ A how-to in troubleshooting for newcomers]<br />
* [http://wiki.ultimatebootcd.com/index.php?title=Tools List of Tools for UBCD] - Memtest-like tools to add to grub.cfg on UltimateBootCD.com<br />
* [[Wikipedia:BIOS Boot partition]]<br />
* [[REISUB]]<br />
* [https://freedesktop.org/wiki/Software/systemd/Debugging/#Debug_Logging_to_a_Serial_Console Debug Logging to a Serial Console] on Freedesktop.org<br />
* [https://web.archive.org/web/20120217124742/http://www.lesswatts.org/projects/acpi/debug.php How to Isolate Linux ACPI Issues] on Archive.org</div>Ounrhttps://wiki.archlinux.org/index.php?title=Kernel_parameters&diff=564210Kernel parameters2019-01-21T16:27:44Z<p>Ounr: Changed page link to point to the new location instead of to old redirect</p>
<hr />
<div>[[Category:Kernel]]<br />
[[es:Kernel parameters]]<br />
[[ja:カーネルパラメータ]]<br />
[[ru:Kernel parameters]]<br />
[[zh-hans:Kernel parameters]]<br />
There are three ways to pass options to the kernel and thus control its behaviour:<br />
<br />
# When building the kernel. See [[Kernel#Compilation]] for details.<br />
# When starting the kernel (usually, when invoked from a boot loader).<br />
# At runtime (through the files in {{ic|/proc}} and {{ic|/sys}}). See [[sysctl]] for details.<br />
<br />
This page explains in more detail the second method and shows a list of the most used kernel parameters in Arch Linux.<br />
<br />
Not all parameters are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems built in. They also depend on the presence of the hardware they are associated with.<br />
<br />
Parameters either have the format {{ic|parameter}} or {{ic|1=parameter=value}}.<br />
<br />
{{Note|All kernel parameters are case-sensitive. Most of them are lower case, writing those in upper case does not work.}}<br />
<br />
== Configuration ==<br />
<br />
{{Note|<br />
* You can check the parameters your system was booted up with by running {{ic|cat /proc/cmdline}} and see if it includes your changes.<br />
* The Arch Linux [https://www.archlinux.org/download/ installation medium] uses [[Syslinux]] for [[Wikipedia:BIOS|BIOS]] systems, and [[systemd-boot]] for [[UEFI]] systems.}}<br />
<br />
Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.<br />
<br />
The following examples add the {{ic|quiet}} and {{ic|splash}} parameters to [[Syslinux]], [[systemd-boot]], [[GRUB]], [[GRUB Legacy]], [[LILO]], and [[rEFInd]].<br />
<br />
=== Syslinux ===<br />
<br />
* Press {{ic|Tab}} when the menu shows up and add them at the end of the string:<br />
<br />
: {{bc|1=linux /boot/vmlinuz-linux root=/dev/sda3 initrd=/boot/initramfs-linux.img ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/syslinux/syslinux.cfg}} and add them to the {{ic|APPEND}} line:<br />
<br />
: {{bc|1=APPEND root=/dev/sda3 ''quiet splash''}}<br />
<br />
For more information on configuring Syslinux, see the [[Syslinux]] article.<br />
<br />
=== systemd-boot ===<br />
<br />
* Press {{ic|e}} when the menu appears and add the parameters to the end of the string:<br />
<br />
: {{bc|1=initrd=\initramfs-linux.img root=/dev/sda2 ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
{{Note|If you have not set a value for menu timeout, you will need to hold {{ic|Space}} while booting for the systemd-boot menu to appear.}}<br />
<br />
{{Note|If you can't edit the parameters from the boot menu, you may need to edit {{ic|/boot/loader/loader.conf}} and add "editor 1" to enable editing.}}<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/loader/entries/arch.conf}} (assuming you set up your [[EFI system partition]]) and add them to the {{ic|options}} line:<br />
<br />
: {{bc|1=options root=/dev/sda2 ''quiet splash''}}<br />
<br />
For more information on configuring systemd-boot, see the [[systemd-boot]] article.<br />
<br />
=== GRUB ===<br />
<br />
* Press {{ic|e}} when the menu shows up and add them on the {{ic|linux}} line:<br />
<br />
: {{bc|1=linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ''quiet splash''}}<br />
<br />
: Press {{ic|Ctrl+x}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, while you ''could'' manually edit {{ic|/boot/grub/grub.cfg}} with the exact line from above, the best practice is to:<br />
<br />
:Edit {{ic|/etc/default/grub}} and append your kernel options to the {{ic|GRUB_CMDLINE_LINUX_DEFAULT}} line:<br />
<br />
:: {{bc|1=GRUB_CMDLINE_LINUX_DEFAULT="''quiet splash''"}}<br />
<br />
:And then automatically re-generate the {{ic|grub.cfg}} file with:<br />
<br />
:: {{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
For more information on configuring GRUB, see the [[GRUB]] article.<br />
<br />
=== GRUB Legacy ===<br />
<br />
* Press {{ic|e}} when the menu shows up and add them on the {{ic|kernel}} line:<br />
<br />
: {{bc|1=kernel /boot/vmlinuz-linux root=/dev/sda3 ''quiet splash''}}<br />
<br />
: Press {{ic|b}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/grub/menu.lst}} and add them to the {{ic|kernel}} line, exactly like above.<br />
<br />
For more information on configuring GRUB Legacy, see the [[GRUB Legacy]] article.<br />
<br />
=== LILO ===<br />
<br />
* Add them to {{ic|/etc/lilo.conf}}:<br />
<br />
: {{bc|<nowiki><br />
image=/boot/vmlinuz-linux<br />
...<br />
</nowiki>''quiet splash''}}<br />
<br />
For more information on configuring LILO, see the [[LILO]] article.<br />
<br />
=== rEFInd ===<br />
<br />
* Press {{ic|+}}, {{ic|F2}}, or {{ic|Insert}} on the desired menu entry and press it again on the submenu entry. Add kernel parameters at the end of the string:<br />
<br />
: {{bc|1=root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw initrd=\boot\initramfs-linux.img ''quiet splash''}}<br />
<br />
: Press {{ic|Enter}} to boot with these parameters.<br />
<br />
* To make the change persistent after reboot, edit {{ic|/boot/refind_linux.conf}} and append them to all/required lines, for example<br />
<br />
: {{bc|1="Boot using default options" "root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw ''quiet splash''"}}<br />
<br />
* If you have disabled auto-detection of OSes in rEFInd and are defining OS stanzas instead in {{ic|''esp''/EFI/refind/refind.conf}} to load your OSes, you can edit it like:<br />
<br />
: {{bc|<nowiki><br />
menuentry "Arch Linux" {<br />
...<br />
options "root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff rw </nowiki>''quiet splash''<nowiki>"<br />
...<br />
}<br />
</nowiki>}}<br />
<br />
For more information on configuring rEFInd, see the [[rEFInd]] article.<br />
<br />
=== EFISTUB ===<br />
<br />
See [[EFISTUB#Using UEFI directly]].<br />
<br />
=== Hijacking cmdline ===<br />
<br />
Even without access to your bootloader it is possible to change your kernel parameters to enable debugging (if you have root access). This can be accomplished by overwriting {{ic|/proc/cmdline}} which stores the kernel parameters. However {{ic|/proc/cmdline}} is not writable even as root, so this hack is accomplished by using a bind mount to mask the path.<br />
<br />
First create a file containing the desired kernel parameters<br />
<br />
{{hc|/root/cmdline|2=root=/dev/disk/by-label/ROOT ro console=tty1 logo.nologo debug}}<br />
<br />
Then use a bind mount to overwrite the parameters<br />
<br />
# mount -n --bind -o ro /root/cmdline /proc/cmdline<br />
<br />
The {{ic|-n}} option skips adding the mount to {{ic|/etc/mtab}}, so it will work even if root is mounted read-only. You can {{ic|cat /proc/cmdline}} to confirm that your change was successful.<br />
<br />
== Parameter list ==<br />
<br />
This list is not comprehensive. For a complete list of all options, please see the [https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt kernel documentation].<br />
{| class="wikitable"<br />
!parameter!!Description<br />
|-<br />
| root= || Root filesystem.<br />
|-<br />
| rootflags= || Root filesystem mount options.<br />
|-<br />
| ro || Mount root device read-only on boot (default<sup>1</sup>).<br />
|-<br />
| rw || Mount root device read-write on boot.<br />
|-<br />
| initrd=|| Specify the location of the initial ramdisk.<br />
|-<br />
| init= || Run specified binary instead of {{ic|/sbin/init}} (symlinked to [[systemd]] in Arch) as init process.<br />
|-<br />
| init=/bin/sh || Boot to shell.<br />
|-<br />
| systemd.unit= || Boot to a [[systemd#Targets|specified target]].<br />
|-<br />
| resume= || Specify a swap device to use when waking from [[hibernation]].<br />
|-<br />
| nomodeset || Disable [[Kernel mode setting]].<br />
|-<br />
| zswap.enabled || Enable [[Zswap]].<br />
|-<br />
| panic= || Time before automatic reboot on kernel panic.<br />
|-<br />
| debug || Enable kernel debugging (events log level).<br />
|-<br />
| mem= || Force usage of a specific amount of memory to be used.<br />
|-<br />
| maxcpus= || Maximum number of processors that an SMP kernel will bring up during bootup.<br />
|-<br />
| selinux= || Disable or enable SELinux at boot time.<br />
|-<br />
| netdev= || Network devices parameters.<br />
|-<br />
| video=<videosetting> || Override framebuffer video defaults.<br />
|}<br />
<br />
<sup>1</sup> [[mkinitcpio]] uses {{ic|ro}} as default value when neither {{ic|rw}} or {{ic|ro}} is set by the [[boot loader]]. Boot loaders may set the value to use, for example GRUB uses {{ic|rw}} by default (see {{Bug|36275}} as a reference).<br />
<br />
== See also ==<br />
<br />
* [https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt Linux "Kernel Parameters" documentation]<br />
* [[Power saving#Kernel parameters]]<br />
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel parameters with further explanation and grouped by similar options]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Kernel_module&diff=564199Kernel module2019-01-21T16:00:07Z<p>Ounr: modconf hook is in HOOKS array by default and adds .conf files under /{usr/lib,etc}/modprobe.d during image generation</p>
<hr />
<div>[[Category:Kernel]]<br />
[[Category:Hardware detection and troubleshooting]]<br />
[[Category:Boot process]]<br />
[[es:Kernel module]]<br />
[[fr:Kernel modules]]<br />
[[it:Kernel module]]<br />
[[ja:カーネルモジュール]]<br />
[[ru:Kernel module]]<br />
[[zh-hans:Kernel module]]<br />
{{Related articles start}}<br />
{{Related|Boot debugging}}<br />
{{Related|Kernels}}<br />
{{Related|Kernel parameters}}<br />
{{Related|Compile kernel module}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Loadable_kernel_module|Kernel modules]] are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. <br />
<br />
To create a kernel module, you can read [http://tldp.org/LDP/lkmpg/2.6/html/index.html The Linux Kernel Module Programming Guide]. A module can be configured as built-in or loadable. To dynamically load or remove a module, it has to be configured as a loadable module in the kernel configuration (the line related to the module will therefore display the letter {{ic|M}}).<br />
<br />
== Obtaining information ==<br />
<br />
Modules are stored in {{ic|/usr/lib/modules/''kernel_release''}}. You can use the command {{ic|uname -r}} to get your current kernel release version.<br />
<br />
{{Note|Module names often use underscores ({{ic|_}}) or dashes ({{ic|-}}); however, those symbols are interchangeable when using the {{ic|modprobe}} command and in configuration files in {{ic|/etc/modprobe.d/}}.}}<br />
<br />
To show what kernel modules are currently loaded:<br />
<br />
$ lsmod<br />
<br />
To show information about a module:<br />
<br />
$ modinfo ''module_name''<br />
<br />
To list the options that are set for a loaded module:<br />
<br />
$ systool -v -m ''module_name''<br />
<br />
To display the comprehensive configuration of all the modules:<br />
<br />
$ modprobe -c | less<br />
<br />
To display the configuration of a particular module:<br />
<br />
$ modprobe -c | grep ''module_name''<br />
<br />
List the dependencies of a module (or alias), including the module itself:<br />
<br />
$ modprobe --show-depends ''module_name''<br />
<br />
== Automatic module loading with systemd ==<br />
<br />
Today, all necessary modules loading is handled automatically by [[udev]], so if you do not need to use any out-of-tree kernel modules, there is no need to put modules that should be loaded at boot in any configuration file. However, there are cases where you might want to load an extra module during the boot process, or blacklist another one for your computer to function properly.<br />
<br />
Kernel modules can be explicitly listed in files under {{ic|/etc/modules-load.d/}} for systemd to load them during boot. Each configuration file is named in the style of {{ic|/etc/modules-load.d/<program>.conf}}. Configuration files simply contain a list of kernel modules names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
{{hc|/etc/modules-load.d/virtio-net.conf|<br />
# Load virtio_net.ko at boot<br />
virtio_net}}<br />
<br />
See {{man|5|modules-load.d}} for more details.<br />
<br />
== Manual module handling ==<br />
<br />
Kernel modules are handled by tools provided by {{Pkg|kmod}} package. You can use these tools manually.<br />
<br />
{{Note|If you have upgraded your kernel but have not yet rebooted, ''modprobe'' will fail with no error message and exit with code 1, because the path {{ic|/usr/lib/modules/$(uname -r)/}} no longer exists. Check manually if this path exists when ''modprobe'' failed to determine if this is the case.}}<br />
<br />
To load a module:<br />
<br />
# modprobe ''module_name''<br />
<br />
To load a module by filename (i.e. one that is not installed in {{ic|/usr/lib/modules/$(uname -r)/}}):<br />
<br />
# insmod filename [args]<br />
<br />
To unload a module:<br />
<br />
# modprobe -r ''module_name''<br />
<br />
Or, alternatively:<br />
<br />
# rmmod ''module_name''<br />
<br />
== Setting module options ==<br />
<br />
To pass a parameter to a kernel module, you can pass them manually with modprobe or assure certain parameters are always applied using a modprobe configuration file or by using the kernel command line.<br />
<br />
=== Manually at load time using modprobe ===<br />
<br />
The basic way to pass parameters to a module is using the modprobe command. Parameters are specified on command line using simple {{ic|1=''key=value''}} assignments:<br />
<br />
# modprobe ''module_name parameter_name=parameter_value''<br />
<br />
=== Using files in /etc/modprobe.d/ ===<br />
<br />
Files in {{ic|/etc/modprobe.d/}} directory can be used to pass module settings to [[udev]], which will use {{ic|modprobe}} to manage the loading of the modules during system boot. Configuration files in this directory can have any name, given that they end with the {{ic|.conf}} extension. The syntax is:<br />
<br />
{{hc|/etc/modprobe.d/myfilename.conf|2=<br />
options ''module_name parameter_name=parameter_value''}}<br />
<br />
For example:<br />
<br />
{{hc|/etc/modprobe.d/thinkfan.conf|2=<br />
# On ThinkPads, this lets the 'thinkfan' daemon control fan speed<br />
options thinkpad_acpi fan_control=1}}<br />
<br />
{{Note|If any of the affected modules is loaded from the initramfs, then you will need to add the appropriate {{ic|.conf}} file to {{ic|FILES}} in [[mkinitcpio.conf]] or use the {{ic|modconf}} [[Mkinitcpio.conf#HOOKS|hook]], so that it will be included in the initramfs. To see the contents of the default initramfs use {{ic|lsinitcpio /boot/initramfs-linux.img}}.}}<br />
<br />
=== Using kernel command line ===<br />
<br />
If the module is built into the kernel, you can also pass options to the module using the kernel command line. For all common bootloaders, the following syntax is correct:<br />
<br />
''module_name.parameter_name=parameter_value''<br />
<br />
For example:<br />
<br />
thinkpad_acpi.fan_control=1<br />
<br />
Simply add this to your bootloader's kernel-line, as described in [[Kernel parameters|Kernel Parameters]].<br />
<br />
== Aliasing ==<br />
<br />
Aliases are alternate names for a module. For example: {{ic|alias my-mod really_long_modulename}} means you can use {{ic|modprobe my-mod}} instead of {{ic|modprobe really_long_modulename}}. You can also use shell-style wildcards, so {{ic|alias my-mod* really_long_modulename}} means that {{ic|modprobe my-mod-something}} has the same effect. Create an alias:<br />
<br />
{{hc|/etc/modprobe.d/myalias.conf|<br />
alias mymod really_long_module_name}}<br />
<br />
Some modules have aliases which are used to automatically load them when they are needed by an application. Disabling these aliases can prevent automatic loading but will still allow the modules to be manually loaded.<br />
<br />
{{hc|/etc/modprobe.d/modprobe.conf|<br />
# Prevent Bluetooth autoload<br />
alias net-pf-31 off}}<br />
<br />
== Blacklisting ==<br />
<br />
Blacklisting, in the context of kernel modules, is a mechanism to prevent the kernel module from loading. This could be useful if, for example, the associated hardware is not needed, or if loading that module causes problems: for instance there may be two kernel modules that try to control the same piece of hardware, and loading them together would result in a conflict.<br />
<br />
Some modules are loaded as part of the [[initramfs]]. {{ic|mkinitcpio -M}} will print out all automatically detected modules: to prevent the initramfs from loading some of those modules, blacklist them in a {{ic|.conf}} file under {{ic|/etc/modprobe.d}} and it shall be added in by the {{ic|modconf}} hook during image generation. Running {{ic|mkinitcpio -v}} will list all modules pulled in by the various hooks (e.g. {{ic|filesystems}} hook, {{ic|block}} hook, etc.). Remember to add that {{ic|.conf}} file to the {{ic|FILES}} section in {{ic|/etc/mkinitcpio.conf}}, if you don't have the {{ic|modconf}} hook in your {{ic|HOOKS}} array (e.g. you have deviated from the default configuration), and once you have blacklisted the modules [[mkinitcpio#Image_creation_and_activation|rebuild the initramfs]], and reboot afterwards.<br />
<br />
=== Using files in /etc/modprobe.d/ ===<br />
<br />
Create a {{ic|.conf}} file inside {{ic|/etc/modprobe.d/}} and append a line for each module you want to blacklist, using the {{ic|blacklist}} keyword. If for example you want to prevent the {{ic|pcspkr}} module from loading:<br />
<br />
{{hc|/etc/modprobe.d/nobeep.conf|<br />
# Do not load the 'pcspkr' module on boot.<br />
blacklist pcspkr}}<br />
<br />
{{Note|The {{ic|blacklist}} command will blacklist a module so that it will not be loaded automatically, but the module may be loaded if another non-blacklisted module depends on it or if it is loaded manually.<br />
<br />
However, there is a workaround for this behaviour; the {{ic|install}} command instructs modprobe to run a custom command instead of inserting the module in the kernel as normal, so you can force the module to always fail loading with:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
...<br />
install ''module_name'' /bin/false<br />
...}}<br />
<br />
This will effectively blacklist that module and any other that depends on it.}}<br />
<br />
=== Using kernel command line ===<br />
<br />
{{Tip|This can be very useful if a broken module makes it impossible to boot your system.}}<br />
<br />
You can also blacklist modules from the bootloader.<br />
<br />
Simply add {{ic|1=module_blacklist=modname1,modname2,modname3}} to your bootloader's kernel line, as described in [[Kernel parameters]].<br />
<br />
{{Note|When you are blacklisting more than one module, note that they are separated by commas only. Spaces or anything else might presumably break the syntax.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Modules do not load ===<br />
<br />
In case a specific module does not load and the boot log (accessible with {{ic|journalctl -b}}) says that the module is blacklisted, but the directory {{ic|/etc/modprobe.d/}} does not show a corresponding entry, check another modprobe source folder at {{ic|/usr/lib/modprobe.d/}} for blacklisting entries.<br />
<br />
A module will not be loaded if the "vermagic" string contained within the kernel module does not match the value of the currently running kernel. If it is known that the module is compatible with the current running kernel the "vermagic" check can be ignored with {{ic|modprobe --force-vermagic}}.<br />
<br />
{{warning|Ignoring the version checks for a kernel module can cause a kernel to crash or a system to exhibit undefined behavior due to incompatibility. Use {{ic|--force-vermagic}} only with the utmost caution.}}<br />
<br />
== See also ==<br />
<br />
* [[Disable PC speaker beep]]<br />
* [https://lwn.net/Articles/391230/ Writing a WMI driver] - an LWM introduction</div>Ounrhttps://wiki.archlinux.org/index.php?title=Environment_variables&diff=563377Environment variables2019-01-15T11:28:51Z<p>Ounr: corrected a typo</p>
<hr />
<div>[[Category:System administration]]<br />
[[de:Umgebungsvariablen]]<br />
[[es:Environment variables]]<br />
[[ja:環境変数]]<br />
[[pt:Environment variables]]<br />
[[ru:Environment variables]]<br />
[[zh-hans:Environment variables]]<br />
{{Related articles start}}<br />
{{Related|Default applications}}<br />
{{Related articles end}}<br />
<br />
An environment variable is a named object that contains data used by one or more applications. In simple terms, it is a variable with a name and a value. The value of an environmental variable can for example be the location of all executable files in the file system, the default editor that should be used, or the system locale settings. Users new to Linux may often find this way of managing settings a bit unmanageable. However, environment variables provide a simple way to share configuration settings between multiple applications and processes in Linux.<br />
<br />
== Utilities ==<br />
<br />
The {{Pkg|coreutils}} package contains the programs ''printenv'' and ''env''. To list the current environmental variables with values: <br />
<br />
$ printenv<br />
<br />
{{Note|Some environment variables are user-specific. Check by comparing the outputs of ''printenv'' as an unprivileged user and as ''root''.}}<br />
<br />
The ''env'' utility can be used to run a command under a modified environment. The following example will launch ''xterm'' with the environment variable {{ic|EDITOR}} set to {{ic|vim}}. This will not affect the global environment variable {{ic|EDITOR}}.<br />
<br />
$ env EDITOR=vim xterm<br />
<br />
The [[Bash]] builtin ''set'' allows you to change the values of shell options and set the positional parameters, or to display the names and values of shell variables. For more information, see [http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin the set builtin documentation].<br />
<br />
Each process stores their environment in the {{ic|/proc/$PID/environ}} file. This file contains each key value pair delimited by a nul character ({{ic|\x0}}). A more human readable format can be obtained with [[sed]], e.g. {{ic|sed 's:\x0:\n:g' /proc/$PID/environ}}.<br />
<br />
== Defining variables ==<br />
<br />
=== Globally ===<br />
<br />
Most Linux distributions tell you to change or add environment variable definitions in {{ic|/etc/profile}} or other locations. Keep in mind that there are also package-specific configuration files containing variable settings such as {{ic|/etc/locale.conf}}. Be sure to maintain and manage the environment variables and pay attention to the numerous files that can contain environment variables. In principle, any shell script can be used for initializing environmental variables, but following traditional UNIX conventions, these statements should be only be present in some particular files. <br />
<br />
The following files should be used for defining global environment variables on your system: {{ic|/etc/environment}}, {{ic|/etc/profile}} and shell specific configuration files. Each of these files has different limitations, so you should carefully select the appropriate one for your purposes.<br />
<br />
* {{ic|/etc/environment}} is used by the pam_env module and is shell agnostic so scripting or glob expansion cannot be used. The file only accepts {{ic|1=''variable=value''}} pairs. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* Global configuration files of your [[shell]], initializes variables and runs scripts. For example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* {{ic|/etc/profile}} initializes variables for login shells ''only''. It does, however, run scripts and can be used by all [[wikipedia:Bourne shell|Bourne shell]] compatible shells.<br />
<br />
In this example, we add {{ic|~/bin}} directory to the {{ic|PATH}} for respective user. To do this, just put this in your preferred global environment variable config file ({{ic|/etc/profile}} or {{ic|/etc/bash.bashrc}}):<br />
<br />
{{bc|<nowiki><br />
# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH<br />
# then export ~/bin to your $PATH.<br />
if [[ $UID -ge 1000 && -d $HOME/bin && -z $(echo $PATH | grep -o $HOME/bin) ]]<br />
then<br />
export PATH="${PATH}:$HOME/bin"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Per user ===<br />
<br />
{{Note|The dbus daemon and the user instance of systemd do not inherit any of the environment variables set in places like {{ic|~/.bashrc}} etc. This means that, for example, dbus activated programs like Gnome Files will not use them by default. See [[Systemd/User#Environment variables]].}}<br />
<br />
You do not always want to define an environment variable globally. For instance, you might want to add {{ic|/home/my_user/bin}} to the {{ic|PATH}} variable but do not want all other users on your system to have that in their {{ic|PATH}} too. Local environment variables can be defined in many different files:<br />
<br />
* {{ic|~/.pam_environment}} is the user specific equivalent of {{ic|/etc/security/pam_env.conf}} [https://github.com/linux-pam/linux-pam/issues/6], used by pam_env module. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* User configuration files of your [[shell]], for example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* {{ic|~/.profile}} is used by many shells as fallback, see [[wikipedia:Unix shell#Configuration files]].<br />
* [[systemd]] will load environment variables from {{ic|~/.config/environment.d/*.conf}} see {{man|5|environment.d}} and https://wiki.gnome.org/Initiatives/Wayland/SessionStart.<br />
<br />
To add a directory to the {{ic|PATH}} for local usage, put following in {{ic|~/.bash_profile}}:<br />
<br />
export PATH="${PATH}:/home/my_user/bin"<br />
<br />
To update the variable, re-login or ''source'' the file: {{ic|$ source ~/.bash_profile}}.<br />
<br />
==== Graphical applications ====<br />
<br />
Environment variables for [[Xorg]] applications can be set in [[xinitrc]], or in [[xprofile]] when using a [[display manager]], for example:<br />
<br />
{{hc|1=~/.xinitrc|2=<br />
export PATH="${PATH}:~/scripts"<br />
export GUIVAR=value<br />
}}<br />
<br />
Applications running on [[Wayland]] may use [[Systemd/User#Environment_variables|systemd]] user environment variables instead, as Wayland does not initiate any Xorg related files:<br />
<br />
{{hc|1=~/.config/environment.d/envvars.conf|2=<br />
PATH=$PATH:~/scripts<br />
GUIVAR=value<br />
}}<br />
<br />
=== Per session ===<br />
<br />
Sometimes even stricter definitions are required. One might want to temporarily run executables from a specific directory created without having to type the absolute path to each one, or editing shell configuration files for the short time needed to run them.<br />
<br />
In this case, you can define the {{ic|PATH}} variable in your current session, combined with the ''export'' command. As long as you do not log out, the {{ic|PATH}} variable will be using the temporary settings. To add a session-specific directory to {{ic|PATH}}, issue:<br />
<br />
$ export PATH="${PATH}:/home/my_user/tmp/usr/bin"<br />
<br />
== Examples ==<br />
<br />
The following section lists a number of common environment variables used by a Linux system and describes their values.<br />
<br />
* {{ic|DE}} indicates the ''D''esktop ''E''nvironment being used. [[xdg-open]] will use it to choose more user-friendly file-opener application that desktop environment provides. Some packages need to be installed to use this feature. For [[GNOME]], that would be {{AUR|libgnome}}; for [[Xfce]] this is {{pkg|exo}}. Recognised values of {{ic|DE}} variable are: {{ic|gnome}}, {{ic|kde}}, {{ic|xfce}}, {{ic|lxde}} and {{ic|mate}}.<br />
<br />
:The {{ic|DE}} environment variable needs to be exported before starting the window manager. For example:<br />
<br />
{{hc|~/.xinitrc|2=<br />
export DE="xfce"<br />
exec openbox<br />
}}<br />
<br />
:This will make ''xdg-open'' use the more user-friendly ''exo-open'', because it assumes it is running inside Xfce. Use ''exo-preferred-applications'' for configuring.<br />
<br />
* {{ic|DESKTOP_SESSION}} is similar to {{ic|DE}}, but used in [[LXDE]] desktop environment: when {{ic|DESKTOP_SESSION}} is set to {{ic|LXDE}}, ''xdg-open'' will use ''pcmanfm'' file associations.<br />
<br />
* {{ic|PATH}} contains a colon-separated list of directories in which your system looks for executable files. When a regular command (e.g. ''ls'', ''systemctl'' or ''pacman'') is interpreted by the shell (e.g. ''bash'' or ''zsh''), the shell looks for an executable file with the same name as your command in the listed directories, and executes it. To run executables that are not listed in {{ic|PATH}}, a relative or absolute path to the executable must be given, e.g. {{ic|./a.out}} or {{ic|/bin/ls}}.<br />
<br />
{{Note|It is advised not to include the current working directory ({{ic|.}}) into your {{ic|PATH}} for security reasons, as it may trick the user to execute vicious commands.}}<br />
<br />
* {{ic|HOME}} contains the path to the home directory of the current user. This variable can be used by applications to associate configuration files and such like with the user running it.<br />
<br />
* {{ic|PWD}} contains the path to your working directory.<br />
<br />
* {{ic|OLDPWD}} contains the path to your previous working directory, that is, the value of {{ic|PWD}} before last ''cd'' was executed.<br />
<br />
* {{ic|TERM}} contains the type of the running terminal, e.g. {{ic|xterm-256color}}. It is used by programs running in the terminal that wish to use terminal-specific capabilities.<br />
<br />
* {{ic|MAIL}} contains the location of incoming email. The traditional setting is {{ic|/var/spool/mail/$LOGNAME}}.<br />
<br />
* {{ic|ftp_proxy}} and {{ic|http_proxy}} contains FTP and HTTP proxy server, respectively:<br />
ftp_proxy="<nowiki>ftp://192.168.0.1:21</nowiki>"<br />
http_proxy="<nowiki>http://192.168.0.1:80</nowiki>"<br />
<br />
* {{ic|MANPATH}} contains a colon-separated list of directories in which ''man'' searches for the man pages.<br />
{{Note|In {{ic|/etc/profile}}, there is a comment that states "Man is much better than us at figuring this out", so this variable should generally be left unset. See {{man|5|manpath}}.<br />
}}<br />
<br />
* {{ic|INFODIR}} contains a colon-separated list of directories in which the ''info'' command searches for the info pages, e.g., {{ic|/usr/share/info:/usr/local/share/info}}<br />
<br />
* {{ic|TZ}} can be used to to set a time zone different to the system zone for a user. The zones listed in {{ic|/usr/share/zoneinfo/}} can be used as reference, for example {{ic|1=TZ=":/usr/share/zoneinfo/Pacific/Fiji"}}. When pointing the {{ic|TZ}} variable to a zoneinfo file, it should start with a colon per [https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html the GNU manual].<br />
<br />
=== Default programs ===<br />
<br />
* {{ic|SHELL}} contains the path to the user's [http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 preferred shell]. Note that this is not necessarily the shell that is currently running, although [[Bash]] sets this variable on startup.<br />
<br />
* {{ic|PAGER}} contains command to run the program used to list the contents of files, e.g., {{ic|/bin/less}}.<br />
<br />
* {{ic|EDITOR}} contains the command to run the lightweight program used for editing files, e.g., {{ic|/usr/bin/nano}}. For example, you can write an interactive switch between ''gedit'' under [[X]] or ''nano'', in this example:<br />
<br />
export EDITOR="$(if <nowiki>[[</nowiki> -n $DISPLAY <nowiki>]]</nowiki>; then echo 'gedit'; else echo 'nano'; fi)"<br />
<br />
* {{ic|VISUAL}} contains command to run the full-fledged editor that is used for more demanding tasks, such as editing mail (e.g., {{ic|vi}}, [[vim]], [[emacs]] etc).<br />
<br />
* {{ic|BROWSER}} contains the path to the web browser. Helpful to set in an interactive shell configuration file so that it may be dynamically altered depending on the availability of a graphic environment, such as [[X]]:<br />
<br />
if <nowiki>[</nowiki> -n "$DISPLAY" <nowiki>]</nowiki>; then<br />
export BROWSER=firefox<br />
else <br />
export BROWSER=links<br />
fi<br />
<br />
=== Using pam_env ===<br />
<br />
The [[PAM]] module {{man|8|pam_env}} loads the variables to be set in the environment from the following files: {{ic|/etc/security/pam_env.conf}}, {{ic|/etc/environment}} and {{ic|~/.pam_environment}}.<br />
<br />
* {{ic|/etc/environment}} must consist of simple {{ic|1=''VARIABLE''=''value''}} pairs on separate lines, for example: {{bc|1=EDITOR=NANO}}<br />
<br />
* {{ic|/etc/security/pam_env.conf}} and {{ic|~/.pam_environment}} share the same following format: {{bc|1=VARIABLE [DEFAULT=''value''] [OVERRIDE=''value'']}} {{ic|@{HOME} }} and {{ic|@{SHELL} }} are special variables that expand to what is defined in {{ic|/etc/passwd}}. The following example illustrates how to expand the {{ic|HOME}} environment variable into another variable: {{bc|1=XDG_CONFIG_HOME DEFAULT=@{HOME}/.config}} {{Note|The variables {{ic|${HOME} }} and {{ic|${SHELL} }} are not linked to the {{ic|HOME}} and {{ic|SHELL}} environment variables, they are not set by default.}} The format also allows to expand already defined variables in the values of other variables using {{ic|${''VARIABLE''} }}, like this: {{bc|1=GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg}} {{ic|1=''VARIABLE''=''value''}} pairs are also allowed, but variable expansion is not supported in those pairs. See {{man|5|pam_env.conf}} for more information. <br />
<br />
{{Note|These files are read before other files, in particular before {{ic|~/.profile}}, {{ic|~/.bash_profile}} and {{ic|~/.zshenv}}. }}<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Handbook:X86/Working/EnvVar Gentoo Linux Documentation]<br />
* [https://help.ubuntu.com/community/EnvironmentVariables Ubuntu Community Wiki - Environment Variables]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Environment_variables&diff=563375Environment variables2019-01-15T10:42:19Z<p>Ounr: corrected a typo</p>
<hr />
<div>[[Category:System administration]]<br />
[[de:Umgebungsvariablen]]<br />
[[es:Environment variables]]<br />
[[ja:環境変数]]<br />
[[pt:Environment variables]]<br />
[[ru:Environment variables]]<br />
[[zh-hans:Environment variables]]<br />
{{Related articles start}}<br />
{{Related|Default applications}}<br />
{{Related articles end}}<br />
<br />
An environment variable is a named object that contains data used by one or more applications. In simple terms, it is a variable with a name and a value. The value of an environmental variable can for example be the location of all executable files in the file system, the default editor that should be used, or the system locale settings. Users new to Linux may often find this way of managing settings a bit unmanageable. However, environment variables provide a simple way to share configuration settings between multiple applications and processes in Linux.<br />
<br />
== Utilities ==<br />
<br />
The {{Pkg|coreutils}} package contains the programs ''printenv'' and ''env''. To list the current environmental variables with values: <br />
<br />
$ printenv<br />
<br />
{{Note|Some environment variables are user-specific. Check by comparing the outputs of ''printenv'' as an unprivileged user and as ''root''.}}<br />
<br />
The ''env'' utility can be used to run a command under a modified environment. The following example will launch ''xterm'' with the environment variable {{ic|EDITOR}} set to {{ic|vim}}. This will not affect the global environment variable {{ic|EDITOR}}.<br />
<br />
$ env EDITOR=vim xterm<br />
<br />
The [[Bash]] builtin ''set'' allows you to change the values of shell options and set the positional parameters, or to display the names and values of shell variables. For more information, see [http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin the set builtin documentation].<br />
<br />
Each process stores their environment in the {{ic|/proc/$PID/environ}} file. This file contains each key value pair delimited by a nul character ({{ic|\x0}}). A more human readable format can be obtained with [[sed]], e.g. {{ic|sed 's:\x0:\n:g' /proc/$PID/environ}}.<br />
<br />
== Defining variables ==<br />
<br />
=== Globally ===<br />
<br />
Most Linux distributions tell you to change or add environment variable definitions in {{ic|/etc/profile}} or other locations. Keep in mind that there are also package-specific configuration files containing variable settings such as {{ic|/etc/locale.conf}}. Be sure to maintain and manage the environment variables and pay attention to the numerous files that can contain environment variables. In principle, any shell script can be used for initializing environmental variables, but following traditional UNIX conventions, these statements should be only be present in some particular files. <br />
<br />
The following files should be used for defining global environment variables on your system: {{ic|/etc/environment}}, {{ic|/etc/profile}} and shell specific configuration files. Each of these files has different limitations, so you should carefully select the appropriate one for your purposes.<br />
<br />
* {{ic|/etc/environment}} is used by the pam_env module and is shell agnostic so scripting or glob expansion cannot be used. The file only accepts {{ic|1=''variable=value''}} pairs. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* Global configuration files of your [[shell]], initializes variables and runs scripts. For example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* {{ic|/etc/profile}} initializes variables for login shells ''only''. It does, however, run scripts and can be used by all [[wikipedia:Bourne shell|Bourne shell]] compatible shells.<br />
<br />
In this example, we add {{ic|~/bin}} directory to the {{ic|PATH}} for respective user. To do this, just put this in your preferred global environment variable config file ({{ic|/etc/profile}} or {{ic|/etc/bash.bashrc}}):<br />
<br />
{{bc|<nowiki><br />
# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH<br />
# then export ~/bin to your $PATH.<br />
if [[ $UID -ge 1000 && -d $HOME/bin && -z $(echo $PATH | grep -o $HOME/bin) ]]<br />
then<br />
export PATH="${PATH}:$HOME/bin"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Per user ===<br />
<br />
{{Note|The dbus daemon and the user instance of systemd do not inherit any of the environment variables set in places like {{ic|~/.bashrc}} etc. This means that, for example, dbus activated programs like Gnome Files will not use them by default. See [[Systemd/User#Environment variables]].}}<br />
<br />
You do not always want to define an environment variable globally. For instance, you might want to add {{ic|/home/my_user/bin}} to the {{ic|PATH}} variable but do not want all other users on your system to have that in their {{ic|PATH}} too. Local environment variables can be defined in many different files:<br />
<br />
* {{ic|~/.pam_environment}} is the user specific equivalent of {{ic|/etc/security/pam_env.conf}} [https://github.com/linux-pam/linux-pam/issues/6], used by pam_env module. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* User configuration files of your [[shell]], for example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* {{ic|~/.profile}} is used by many shells as fallback, see [[wikipedia:Unix shell#Configuration files]].<br />
* [[systemd]] will load environment variables from {{ic|~/.config/environment.d/*.conf}} see {{man|5|environment.d}} and https://wiki.gnome.org/Initiatives/Wayland/SessionStart.<br />
<br />
To add a directory to the {{ic|PATH}} for local usage, put following in {{ic|~/.bash_profile}}:<br />
<br />
export PATH="${PATH}:/home/my_user/bin"<br />
<br />
To update the variable, re-login or ''source'' the file: {{ic|$ source ~/.bash_profile}}.<br />
<br />
==== Graphical applications ====<br />
<br />
Environment variables for [[Xorg]] applications can be set in [[xinitrc]], or in [[xprofile]] when using a [[display manager]], for example:<br />
<br />
{{hc|1=~/.xinitrc|2=<br />
export PATH="${PATH}:~/scripts"<br />
export GUIVAR=value<br />
}}<br />
<br />
Applications running on [[Wayland]] may to use [[Systemd/User#Environment_variables|systemd]] user environments variables instead, as Wayland does not initiate any Xorg related files:<br />
<br />
{{hc|1=~/.config/environment.d/envvars.conf|2=<br />
PATH=$PATH:~/scripts<br />
GUIVAR=value<br />
}}<br />
<br />
=== Per session ===<br />
<br />
Sometimes even stricter definitions are required. One might want to temporarily run executables from a specific directory created without having to type the absolute path to each one, or editing shell configuration files for the short time needed to run them.<br />
<br />
In this case, you can define the {{ic|PATH}} variable in your current session, combined with the ''export'' command. As long as you do not log out, the {{ic|PATH}} variable will be using the temporary settings. To add a session-specific directory to {{ic|PATH}}, issue:<br />
<br />
$ export PATH="${PATH}:/home/my_user/tmp/usr/bin"<br />
<br />
== Examples ==<br />
<br />
The following section lists a number of common environment variables used by a Linux system and describes their values.<br />
<br />
* {{ic|DE}} indicates the ''D''esktop ''E''nvironment being used. [[xdg-open]] will use it to choose more user-friendly file-opener application that desktop environment provides. Some packages need to be installed to use this feature. For [[GNOME]], that would be {{AUR|libgnome}}; for [[Xfce]] this is {{pkg|exo}}. Recognised values of {{ic|DE}} variable are: {{ic|gnome}}, {{ic|kde}}, {{ic|xfce}}, {{ic|lxde}} and {{ic|mate}}.<br />
<br />
:The {{ic|DE}} environment variable needs to be exported before starting the window manager. For example:<br />
<br />
{{hc|~/.xinitrc|2=<br />
export DE="xfce"<br />
exec openbox<br />
}}<br />
<br />
:This will make ''xdg-open'' use the more user-friendly ''exo-open'', because it assumes it is running inside Xfce. Use ''exo-preferred-applications'' for configuring.<br />
<br />
* {{ic|DESKTOP_SESSION}} is similar to {{ic|DE}}, but used in [[LXDE]] desktop environment: when {{ic|DESKTOP_SESSION}} is set to {{ic|LXDE}}, ''xdg-open'' will use ''pcmanfm'' file associations.<br />
<br />
* {{ic|PATH}} contains a colon-separated list of directories in which your system looks for executable files. When a regular command (e.g. ''ls'', ''systemctl'' or ''pacman'') is interpreted by the shell (e.g. ''bash'' or ''zsh''), the shell looks for an executable file with the same name as your command in the listed directories, and executes it. To run executables that are not listed in {{ic|PATH}}, a relative or absolute path to the executable must be given, e.g. {{ic|./a.out}} or {{ic|/bin/ls}}.<br />
<br />
{{Note|It is advised not to include the current working directory ({{ic|.}}) into your {{ic|PATH}} for security reasons, as it may trick the user to execute vicious commands.}}<br />
<br />
* {{ic|HOME}} contains the path to the home directory of the current user. This variable can be used by applications to associate configuration files and such like with the user running it.<br />
<br />
* {{ic|PWD}} contains the path to your working directory.<br />
<br />
* {{ic|OLDPWD}} contains the path to your previous working directory, that is, the value of {{ic|PWD}} before last ''cd'' was executed.<br />
<br />
* {{ic|TERM}} contains the type of the running terminal, e.g. {{ic|xterm-256color}}. It is used by programs running in the terminal that wish to use terminal-specific capabilities.<br />
<br />
* {{ic|MAIL}} contains the location of incoming email. The traditional setting is {{ic|/var/spool/mail/$LOGNAME}}.<br />
<br />
* {{ic|ftp_proxy}} and {{ic|http_proxy}} contains FTP and HTTP proxy server, respectively:<br />
ftp_proxy="<nowiki>ftp://192.168.0.1:21</nowiki>"<br />
http_proxy="<nowiki>http://192.168.0.1:80</nowiki>"<br />
<br />
* {{ic|MANPATH}} contains a colon-separated list of directories in which ''man'' searches for the man pages.<br />
{{Note|In {{ic|/etc/profile}}, there is a comment that states "Man is much better than us at figuring this out", so this variable should generally be left unset. See {{man|5|manpath}}.<br />
}}<br />
<br />
* {{ic|INFODIR}} contains a colon-separated list of directories in which the ''info'' command searches for the info pages, e.g., {{ic|/usr/share/info:/usr/local/share/info}}<br />
<br />
* {{ic|TZ}} can be used to to set a time zone different to the system zone for a user. The zones listed in {{ic|/usr/share/zoneinfo/}} can be used as reference, for example {{ic|1=TZ=":/usr/share/zoneinfo/Pacific/Fiji"}}. When pointing the {{ic|TZ}} variable to a zoneinfo file, it should start with a colon per [https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html the GNU manual].<br />
<br />
=== Default programs ===<br />
<br />
* {{ic|SHELL}} contains the path to the user's [http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 preferred shell]. Note that this is not necessarily the shell that is currently running, although [[Bash]] sets this variable on startup.<br />
<br />
* {{ic|PAGER}} contains command to run the program used to list the contents of files, e.g., {{ic|/bin/less}}.<br />
<br />
* {{ic|EDITOR}} contains the command to run the lightweight program used for editing files, e.g., {{ic|/usr/bin/nano}}. For example, you can write an interactive switch between ''gedit'' under [[X]] or ''nano'', in this example:<br />
<br />
export EDITOR="$(if <nowiki>[[</nowiki> -n $DISPLAY <nowiki>]]</nowiki>; then echo 'gedit'; else echo 'nano'; fi)"<br />
<br />
* {{ic|VISUAL}} contains command to run the full-fledged editor that is used for more demanding tasks, such as editing mail (e.g., {{ic|vi}}, [[vim]], [[emacs]] etc).<br />
<br />
* {{ic|BROWSER}} contains the path to the web browser. Helpful to set in an interactive shell configuration file so that it may be dynamically altered depending on the availability of a graphic environment, such as [[X]]:<br />
<br />
if <nowiki>[</nowiki> -n "$DISPLAY" <nowiki>]</nowiki>; then<br />
export BROWSER=firefox<br />
else <br />
export BROWSER=links<br />
fi<br />
<br />
=== Using pam_env ===<br />
<br />
The [[PAM]] module {{man|8|pam_env}} loads the variables to be set in the environment from the following files: {{ic|/etc/security/pam_env.conf}}, {{ic|/etc/environment}} and {{ic|~/.pam_environment}}.<br />
<br />
* {{ic|/etc/environment}} must consist of simple {{ic|1=''VARIABLE''=''value''}} pairs on separate lines, for example: {{bc|1=EDITOR=NANO}}<br />
<br />
* {{ic|/etc/security/pam_env.conf}} and {{ic|~/.pam_environment}} share the same following format: {{bc|1=VARIABLE [DEFAULT=''value''] [OVERRIDE=''value'']}} {{ic|@{HOME} }} and {{ic|@{SHELL} }} are special variables that expand to what is defined in {{ic|/etc/passwd}}. The following example illustrates how to expand the {{ic|HOME}} environment variable into another variable: {{bc|1=XDG_CONFIG_HOME DEFAULT=@{HOME}/.config}} {{Note|The variables {{ic|${HOME} }} and {{ic|${SHELL} }} are not linked to the {{ic|HOME}} and {{ic|SHELL}} environment variables, they are not set by default.}} The format also allows to expand already defined variables in the values of other variables using {{ic|${''VARIABLE''} }}, like this: {{bc|1=GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg}} {{ic|1=''VARIABLE''=''value''}} pairs are also allowed, but variable expansion is not supported in those pairs. See {{man|5|pam_env.conf}} for more information. <br />
<br />
{{Note|These files are read before other files, in particular before {{ic|~/.profile}}, {{ic|~/.bash_profile}} and {{ic|~/.zshenv}}. }}<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Handbook:X86/Working/EnvVar Gentoo Linux Documentation]<br />
* [https://help.ubuntu.com/community/EnvironmentVariables Ubuntu Community Wiki - Environment Variables]</div>Ounrhttps://wiki.archlinux.org/index.php?title=Man_page&diff=562678Man page2019-01-10T19:58:01Z<p>Ounr: Updated outdated information regarding man pages indexes</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Command-line]]<br />
[[ar:Man page]]<br />
[[es:Man page]]<br />
[[id:Man page]]<br />
[[ja:Man ページ]]<br />
[[ko:Man page]]<br />
[[pt:Man page]]<br />
[[ru:Man page]]<br />
[[zh-hans:Man page]]<br />
{{Related articles start}}<br />
{{Related|Color output in console#man}}<br />
{{Related articles end}}<br />
[[Wikipedia:Man_page|man pages]]—abbreviation for "manual pages"—are the form of documentation that is available on almost all UNIX-like operating systems, including Arch Linux. The command used to display them is {{Ic|man}}.<br />
<br />
In spite of their scope, man pages are designed to be self-contained documents, consequentially limiting themselves to referring to other man pages when discussing related subjects. This is in sharp contrast with the hyperlink-aware [[info manual|Info documents]], GNU's attempt at replacing the traditional man page format.<br />
<br />
{{Pkg|man-db}} implements ''man'' on Arch Linux, and [[Core utilities#Essentials|less]] is the default pager used with ''man''.<br />
<br />
== Accessing man pages ==<br />
<br />
To read a man page, simply enter:<br />
<br />
$ man ''page_name''<br />
<br />
Manuals are sorted into several [[Wikipedia:Man_page#Manual_sections|sections]]. For a full listing see the section entitled "Sections of the manual pages" in {{man|7|man-pages}}.<br />
<br />
Man pages are usually referred to by their name, followed by their section number in parentheses. Often there are multiple man pages of the same name, such as {{man|1|man}} and {{man|7|man}}. In this case, give man the section number followed by the name of the man page, for example:<br />
<br />
$ man 5 passwd<br />
<br />
to read the man page on {{Ic|/etc/passwd}}, rather than the {{Ic|passwd}} utility.<br />
<br />
One-line descriptions of man pages can be displayed using the {{Ic|whatis}} command. For example, for a brief description of the man page sections about {{ic|ls}}, type:<br />
<br />
{{hc|$ whatis ls|<br />
ls (1p) - list directory contents<br />
ls (1) - list directory contents<br />
}}<br />
<br />
== Format ==<br />
<br />
Man pages all follow a fairly standard format, which helps in navigating them. See the section entitled "Sections within a manual page" in {{man|7|man-pages}}.<br />
<br />
== Searching manuals ==<br />
<br />
{{Style|Unnecessarily verbose.}}<br />
<br />
Even though the {{Ic|man}} utility allows users to display man pages, and search their contents via ''less'', a problem arises when one knows not the exact name of the desired manual page in the first place! Fortunately, the {{Ic|-k}} or {{Ic|--apropos}} options can be used to search the manual page descriptions for instances of a given keyword.<br />
<br />
The search feature is provided by a dedicated cache, otherwise all searches would give the ''nothing appropriate'' result. By default, maintenance of that cache is handled by {{Ic|man-db.service}} which gets periodically triggered by {{Ic|man-db.timer}}. You can manually (re)generate the cache or update it by running:<br />
<br />
# mandb<br />
<br />
Now you can begin your search.<br />
For example, to search for man pages related to "password":<br />
<br />
$ man -k password<br />
<br />
or:<br />
<br />
$ man --apropos password<br />
<br />
This is equivalent to calling the {{ic|apropos}} command:<br />
<br />
$ apropos password<br />
<br />
The given keyword is interpreted as a regular expression by default.<br />
<br />
If you want to do a more in-depth search by matching the keywords found in the whole articles, you can use the {{ic|-K}} option:<br />
<br />
$ man -K password<br />
<br />
== Page width ==<br />
The man page width is controlled by the {{Ic|MANWIDTH}} environment variable.<br />
<br />
If the number of columns in the terminal is too small (e.g. the window width is narrow), the line breaks will be wrong. This can be very disturbing for reading. You can fix this by setting the MANWIDTH on {{Ic|man}} invocation. With {{Ic|Bash}}, that would be:<br />
<br />
{{Hc|~/.bashrc|<nowiki><br />
man() {<br />
local width=$(tput cols)<br />
[ $width -gt $MANWIDTH ] && width=$MANWIDTH<br />
env MANWIDTH=$width \<br />
man "$@"<br />
}<br />
</nowiki>}}<br />
<br />
== Reading local man pages ==<br />
<br />
{{Style|1=Sentence doesn't make sense. Man pages != info pages.}}<br />
<br />
Instead of the standard interface, using browsers such as {{Pkg|lynx}} and [[Firefox]] to view man pages allows users to reap info pages' main benefit of hyperlinked text. Alternatives include the following:<br />
<br />
=== Viewer applications ===<br />
<br />
* {{App|GNOME Help|Help viewer for [[GNOME]]. It can show man pages via {{ic|yelp man:<name>}}.|https://wiki.gnome.org/Apps/Yelp|{{Pkg|yelp}}}}<br />
* {{App|KHelpCenter|Application to show [[KDE]] Applications' documentation. Man pages are in ''UNIX manual pages'' or by running {{ic|khelpcenter man:<name>}}.|https://userbase.kde.org/KHelpCenter|{{Pkg|khelpcenter}}}}<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|KDE file manager and web browser. It can show man pages via {{ic|man:<name>}}.|https://konqueror.org/|{{Pkg|konqueror}}}}<br />
* {{App|xman|Provides a categorized look at man pages.|https://xorg.freedesktop.org/|{{pkg|xorg-xman}}}}<br />
<br />
=== Conversion to HTML ===<br />
<br />
==== mandoc ====<br />
<br />
Install the {{AUR|mandoc}} package. To convert a page, for example {{ic|free(1)}}:<br />
<br />
$ gunzip -c /usr/share/man/man1/free.1.gz | mandoc -Thtml -Ostyle=style.css 1> free.html<br />
<br />
Now open the file called {{ic|free.html}} in your favourite browser.<br />
<br />
==== man2html ====<br />
<br />
First, install {{Pkg|man2html}} from the official repositories.<br />
<br />
Now, convert a man page:<br />
<br />
$ man free | man2html -compress -cgiurl man$section/$title.$section$subsection.html > ~/man/free.html<br />
<br />
Another use for {{Ic|man2html}} is exporting to raw, printer-friendly text:<br />
<br />
$ man free | man2html -bare > ~/free.txt<br />
<br />
==== man -H ====<br />
<br />
The GNU implementation of man in the Arch repositories also has the ability to do this on its own:<br />
<br />
$ man -H free<br />
<br />
This will read your {{ic|BROWSER}} [[environment variable]] to determine the browser. You can override this by passing the binary to the {{ic|-H}} option.<br />
<br />
==== roffit ====<br />
<br />
First install {{AUR|roffit}} from [[AUR]].<br />
<br />
To convert a man page:<br />
<br />
$ gunzip -c /usr/share/man/man1/free.1.gz | roffit > free.html<br />
<br />
=== Conversion to PDF ===<br />
<br />
man pages have always been printable: they are written in troff, which is fundamentally a typesetting language. If you have {{Pkg|ghostscript}} installed, you can convert a man page to PDF using {{ic|man -t <manpage> {{!}} ps2pdf - <pdf>}}.<br />
<br />
Caveats: Fonts are generally limited to Times at hardcoded sizes. There are no hyperlinks. Some man pages were specifically designed for terminal viewing, and won't look right in PS or PDF form.<br />
<br />
== Online man pages ==<br />
<br />
There are several online databases of man pages, including:<br />
* [http://man7.org/linux/man-pages/index.html man7.org]. Upstream for Arch Linux's {{pkg|man-pages}}.<br />
* [https://jlk.fjfi.cvut.cz/arch/manpages/ Arch Linux man pages]. Used for links from the wiki.<br />
* [https://manned.org/ manned.org's collection from various Linux distributions, BSD, etc., with multiple package versions]<br />
* [https://manpages.debian.net/ Debian GNU/Linux man pages]<br />
* [https://leaf.dragonflybsd.org/cgi/web-man DragonFlyBSD manual pages]<br />
* [https://www.freebsd.org/cgi/man.cgi FreeBSD man pages]<br />
* [http://www.manpages.spotlynx.com/ Linux and Solaris 10 man pages]{{Dead link|2018|04|16}}<br />
* [https://linux.die.net/man/ Linux man pages at die.net]<br />
* [https://man.cx/ Linux man pages at man.cx]<br />
* [http://netbsd.gw.com/cgi-bin/man-cgi NetBSD manual pages]<br />
* [https://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html Mac OS X manual pages]<br />
* [http://unixhelp.ed.ac.uk/alphabetical/index.html On-line UNIX manual pages]{{Dead link|2018|04|16}}<br />
* [https://www.openbsd.org/cgi-bin/man.cgi OpenBSD manual pages]<br />
* [http://man.cat-v.org/plan_9/ Plan 9 Manual — Volume 1]<br />
* [http://man.cat-v.org/inferno/ Inferno Manual — Volume 1]<br />
* [http://sfdoccentral.symantec.com/sf/5.0MP3/linux/manpages/index.html Storage Foundation man pages]<br />
* [https://www.unix.com/man-page/OpenSolaris/1/man/ The UNIX and Linux forums man page repository]<br />
* [http://manpages.ubuntu.com/ Ubuntu manpage repository]<br />
<br />
{{Tip|You can use the {{ic|!archman}} DuckDuckGo [https://duckduckgo.com/bang.html !Bang] to search through the [https://jlk.fjfi.cvut.cz/arch/manpages/ Arch Linux man pages] directly.}}<br />
{{Warning|Some distributions provide patched or outdated man pages that differ from those provided by Arch. Exercise caution when using online man pages.}}<br />
<br />
==Noteworthy manpages==<br />
<br />
Here follows a non-exhaustive list of noteworthy pages that might help you understand a lot of things more in-depth. Some of them might serve as a good reference (like the ASCII table).<br />
<br />
* {{man|7|ascii}}<br />
* {{man|7|boot}}<br />
* {{man|7|charsets}}<br />
* {{man|1|chmod}}<br />
* {{man|7|credentials}}<br />
* {{man|5|fstab}}<br />
* {{man|7|hier}}<br />
* {{man|1|systemd}}<br />
* {{man|1p|locale}}, {{man|5|locale}}, {{man|7|locale}}<br />
* {{man|3|printf}}<br />
* {{man|5|proc}}<br />
* {{man|7|regex}}<br />
* {{man|7|signal}}<br />
* {{man|5|term}}, {{man|7|term}}<br />
* {{man|5|termcap}}<br />
* {{man|5|terminfo}}<br />
* {{man|7|utf-8}}<br />
<br />
More generally, have a look at [http://man7.org/linux/man-pages/dir_section_7.html category 7 (miscellaneous) pages]:<br />
<br />
$ man -s 7 -k ".*" <br />
<br />
Arch Linux specific pages:<br />
<br />
* {{man|7|archlinux}}<br />
* {{man|8|mkinitcpio}}<br />
* {{man|8|pacman}}<br />
* {{man|8|pacman-key}}<br />
* {{man|5|pacman.conf}}<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Man_page man page - Gentoo wiki article]<br />
* [https://linuxtidbits.wordpress.com/2013/08/21/wtfm-write-the-fine-manual-with-pod2man-text-converter/ Write The Fine Manual with pod2man]</div>Ounrhttps://wiki.archlinux.org/index.php?title=File_permissions_and_attributes&diff=562558File permissions and attributes2019-01-09T18:09:22Z<p>Ounr: It seems attr(5) has been renamed to xattr(7), updated it</p>
<hr />
<div>[[Category:File systems]]<br />
[[Category:Command-line]]<br />
[[ja:ファイルのパーミッションと属性]]<br />
[[pt:File permissions and attributes]]<br />
[[ru:File permissions and attributes]]<br />
[[zh-hans:File permissions and attributes]]<br />
{{Related articles start}}<br />
{{Related|Users and groups}}<br />
{{Related|umask}}<br />
{{Related|Access Control Lists}}<br />
{{Related|Capabilities}}<br />
{{Related articles end}}<br />
[[File systems]] use [[w:File system permissions|permissions]] and [[w:File attribute|attributes]] to regulate the level of interaction that system processes can have with files and directories.<br />
<br />
{{Warning|When used for security purposes, permissions and attributes only defend against attacks launched from the booted system. To protect the stored data from attackers with physical access to the machine, one must also implement [[disk encryption]].}}<br />
<br />
== Viewing permissions ==<br />
<br />
Use the [[ls]] command's {{ic|-l}} option to view the permissions (or '''file mode''') set for the contents of a directory, for example:<br />
<br />
{{hc|$ ls -l /path/to/directory|<br />
total 128<br />
drwxr-xr-x 2 archie users 4096 Jul 5 21:03 Desktop<br />
drwxr-xr-x 6 archie users 4096 Jul 5 17:37 Documents<br />
drwxr-xr-x 2 archie users 4096 Jul 5 13:45 Downloads<br />
-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 customers.ods<br />
-rw-r--r-- 1 archie users 3339 Jun 27 08:28 todo<br />
-rwxr-xr-x 1 archie users 2048 Jul 6 12:56 myscript.sh<br />
}}<br />
<br />
The first column is what we must focus on. Taking an example value of {{ic|drwxrwxrwx+}}, the meaning of each character is explained in the following tables:<br />
<br />
{| class="wikitable"<br />
|- style="text-align:center;"<br />
| {{ic|d}}<br />
| {{ic|rwx}}<br />
| {{ic|rwx}}<br />
| {{ic|rwx}}<br />
| {{ic|+}}<br />
|-<br />
| The file type, technically not part of its permissions. See {{ic|info ls -n "What information is listed"}} for an explanation of the possible values.<br />
| The permissions that the owner has over the file, explained below.<br />
| The permissions that the group has over the file, explained below.<br />
| The permissions that all the other users have over the file, explained below.<br />
| A single character that specifies whether an alternate access method applies to the file. When this character is a space, there is no alternate access method. A {{ic|.}} character indicates a file with a security context, but no other alternate access method. A file with any other combination of alternate access methods is marked with a {{ic|+}} character, for example in the case of [[Access Control Lists]].<br />
|}<br />
<br />
Each of the three permission triads ({{ic|rwx}} in the example above) can be made up of the following characters:<br />
<br />
{| class="wikitable"<br />
! scope="col" style="width: 10%;" | <br />
! scope="col" style="width: 10%;" | Character<br />
! scope="col" style="width: 30%;" | Effect on files<br />
! scope="col" style="width: 50%;" | Effect on directories<br />
|-<br />
! rowspan="2" style="text-align:left;" | Read permission (first character)<br />
| style="text-align:center;" | {{ic|-}}<br />
| The file cannot be read.<br />
| The directory's contents cannot be shown.<br />
|-<br />
| style="text-align:center;" | {{ic|r}}<br />
| The file can be read.<br />
| The directory's contents can be shown.<br />
|-<br />
! rowspan="2" style="text-align:left;" | Write permission (second character)<br />
| style="text-align:center;" | {{ic|-}}<br />
| The file cannot be modified.<br />
| The directory's contents cannot be modified.<br />
|-<br />
| style="text-align:center;" | {{ic|w}}<br />
| The file can be modified.<br />
| The directory's contents can be modified (create new files or folders; rename or delete existing files or folders); requires the execute permission to be also set, otherwise this permission has no effect.<br />
|-<br />
! rowspan="6" style="text-align:left;" | Execute permission (third character)<br />
| style="text-align:center;" | {{ic|-}}<br />
| The file cannot be executed.<br />
| The directory cannot be accessed with [[cd]].<br />
|-<br />
| style="text-align:center;" | {{ic|x}}<br />
| The file can be executed.<br />
| The directory can be accessed with [[cd]]; this is the only permission bit that in practice can be considered to be "inherited" from the ancestor directories, in fact if ''any'' folder in the path does not have the {{ic|x}} bit set, the final file or folder cannot be accessed either, regardless of its permissions; see {{man|7|path_resolution}} for more information.<br />
|-<br />
| style="text-align:center;" | {{ic|s}}<br />
| colspan="2" | The [[w:setuid|setuid]] bit when found in the '''u'''ser triad; the '''setgid''' bit when found in the '''g'''roup triad; it is not found in the '''o'''thers triad; it also implies that {{ic|x}} is set. <br />
|-<br />
| style="text-align:center;" | {{ic|S}}<br />
| colspan="2" | Same as {{ic|s}}, but {{ic|x}} is not set; rare on regular files, and useless on folders.<br />
|-<br />
| style="text-align:center;" | {{ic|t}}<br />
| colspan="2" | The [[w:sticky bit|sticky]] bit; it can only be found in the '''o'''thers triad; it also implies that {{ic|x}} is set.<br />
|-<br />
| style="text-align:center;" | {{ic|T}}<br />
| colspan="2" | Same as {{ic|t}}, but {{ic|x}} is not set; rare on regular files, and useless on folders.<br />
|}<br />
<br />
See {{ic|info Coreutils -n "Mode Structure"}} and {{man|1|chmod}} for more details.<br />
<br />
{{Tip|You can view permissions along a path with {{ic|namei -l ''path''}}.}}<br />
<br />
=== Examples ===<br />
<br />
Let us see some examples to clarify:<br />
<br />
'''drwx------''' 6 archie users 4096 Jul 5 17:37 Documents<br />
<br />
Archie has full access to the Documents directory. He can list, create files and rename, delete any file in Documents, regardless of file permissions. His ability to access a file depends on the file's permission. <br />
<br />
'''dr-x------''' 6 archie users 4096 Jul 5 17:37 Documents<br />
<br />
Archie has full access except he can not create, rename, delete any file. He can list the files and (if file's permission empowers) may access an existing file in Documents.<br />
<br />
'''d-wx------''' 6 archie users 4096 Jul 5 17:37 Documents<br />
<br />
Archie can not do 'ls' in Documents but if he knows the name of an existing file then he may list, rename, delete or (if file's permission empowers him) access it. Also, he is able to create new files.<br />
<br />
'''d--x------''' 6 archie users 4096 Jul 5 17:37 Documents<br />
<br />
Archie is only capable of (if file's permission empowers him) access those files in Documents which he knows of. He can not list already existing files or create, rename, delete any of them.<br />
<br />
You should keep in mind that we elaborate on directory permissions and it has nothing to do with the individual file permissions. When you create a new file it is the directory that changes. That is why you need write permission to the directory.<br />
<br />
Let us look at another example, this time of a file, not a directory:<br />
<br />
'''-rw-r--r--''' 1 archie users 5120 Jun 27 08:28 foobar<br />
<br />
Here we can see the first letter is not {{ic|d}} but {{ic|-}}. So we know it is a file, not a directory. Next the owner's permissions are {{ic|rw-}} so the owner has the ability to read and write but not execute. This may seem odd that the owner does not have all three permissions, but the {{ic|x}} permission is not needed as it is a text/data file, to be read by a text editor such as Gedit, EMACS, or software like R, and not an executable in its own right (if it contained something like python programming code then it very well could be). The group's permissions are set to {{ic|r--}}, so the group has the ability to read the file but not write/edit it in any way — it is essentially like setting something to read-only. We can see that the same permissions apply to everyone else as well.<br />
<br />
== Changing permissions ==<br />
<br />
[[Wikipedia:chmod|chmod]] is a command in Linux and other Unix-like operating systems that allows to ''ch''ange the permissions (or access ''mod''e) of a file or directory.<br />
<br />
=== Text method ===<br />
<br />
To change the permissions — or ''access mode'' — of a file, use the ''chmod'' command in a terminal. Below is the command's general structure:<br />
<br />
chmod ''who''=''permissions'' ''filename''<br />
<br />
Where {{ic|''who''}} is any from a range of letters, each signifying who is being given the permission. They are as follows:<br />
<br />
* {{ic|u}}: the [[user]] that owns the file.<br />
* {{ic|g}}: the [[user group]] that the file belongs to.<br />
* {{ic|o}}: the '''o'''ther users, i.e. everyone else.<br />
* {{ic|a}}: '''a'''ll of the above; use this instead of typing {{ic|ugo}}.<br />
<br />
The permissions are the same as discussed in [[#Viewing permissions]] ({{ic|r}}, {{ic|w}} and {{ic|x}}).<br />
<br />
Now have a look at some examples using this command. Suppose you became very protective of the Documents directory and wanted to deny everybody but yourself, permissions to read, write, and execute (or in this case search/look) in it:<br />
<br />
Before: {{ic|drwxr-xr-x 6 archie users 4096 Jul 5 17:37 Documents}}<br />
<br />
$ chmod g= Documents<br />
$ chmod o= Documents<br />
<br />
After: {{ic|drwx------ 6 archie users 4096 Jul 6 17:32 Documents}}<br />
<br />
Here, because you want to deny permissions, you do not put any letters after the {{ic|1==}} where permissions would be entered. Now you can see that only the owner's permissions are {{ic|rwx}} and all other permissions are {{ic|-}}. <br />
<br />
This can be reverted with:<br />
<br />
Before: {{ic|drwx------ 6 archie users 4096 Jul 6 17:32 Documents}}<br />
<br />
$ chmod g=rx Documents<br />
$ chmod o=rx Documents<br />
<br />
After: {{ic|drwxr-xr-x 6 archie users 4096 Jul 6 17:32 Documents}}<br />
<br />
In the next example, you want to grant read and execute permissions to the group, and other users, so you put the letters for the permissions ({{ic|r}} and {{ic|x}}) after the {{ic|1==}}, with no spaces.<br />
<br />
You can simplify this to put more than one {{ic|''who''}} letter in the same command, e.g:<br />
<br />
$ chmod go=rx Documents<br />
<br />
{{Note|1=It does not matter in which order you put the {{ic|''who''}} letters or the permission letters in a {{ic|chmod}} command: you could have {{ic|1=chmod go=rx file}} or {{ic|1=chmod og=xr file}}. It is all the same.}}<br />
<br />
Now let us consider a second example, suppose you want to change a {{ic|foobar}} file so that you have read and write permissions, and fellow users in the group {{ic|users}} who may be colleagues working on {{ic|foobar}}, can also read and write to it, but other users can only read it:<br />
<br />
Before: {{ic|-rw-r--r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
$ chmod g=rw foobar<br />
<br />
After: {{ic|-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
This is exactly like the first example, but with a file, not a directory, and you grant write permission (just so as to give an example of granting every permission).<br />
<br />
==== Text method shortcuts ====<br />
<br />
The ''chmod'' command lets add and subtract permissions from an existing set using {{ic|+}} or {{ic|-}} instead of {{ic|1==}}. This is different from the above commands, which essentially re-write the permissions (e.g. to change a permission from {{ic|r--}} to {{ic|rw-}}, you still need to include {{ic|r}} as well as {{ic|w}} after the {{ic|1==}} in the ''chmod'' command invocation. If you missed out {{ic|r}}, it would take away the {{ic|r}} permission as they are being re-written with the {{ic|1==}}. Using {{ic|+}} and {{ic|-}} avoids this by adding or taking away from the ''current'' set of permissions).<br />
<br />
Let us try this {{ic|+}} and {{ic|-}} method with the previous example of adding write permissions to the group:<br />
<br />
Before: {{ic|-rw-r--r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
$ chmod g+w foobar<br />
<br />
After: {{ic|-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
Another example, denying write permissions to all ('''a'''):<br />
<br />
Before: {{ic|-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
$ chmod a-w foobar<br />
<br />
After: {{ic|-r--r--r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
A different shortcut is the special {{ic|X}} mode: this is not an actual file mode, but it is often used in conjunction with the {{ic|-R}} option to set the executable bit only for directories, and leave it unchanged for regular files, for example:<br />
<br />
$ chmod -R a+rX ./data/<br />
<br />
==== Copying permissions ====<br />
<br />
It is possible to tell ''chmod'' to copy the permissions from one class, say the owner, and give those same permissions to group or even all. To do this, instead of putting {{ic|r}}, {{ic|w}}, or {{ic|x}} after the {{ic|1==}}, put another ''who'' letter. e.g:<br />
<br />
Before: {{ic|-rw-r--r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
$ chmod g=u foobar<br />
<br />
After: {{ic|-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
This command essentially translates to "change the permissions of group ({{ic|1=g=}}), to be the same as the owning user ({{ic|1==u}}). Note that you cannot copy a set of permissions as well as grant new ones e.g.:<br />
<br />
$ chmod g=wu foobar<br />
<br />
In that case ''chmod'' throw an error.<br />
<br />
=== Numeric method ===<br />
<br />
''chmod'' can also set permissions using numbers.<br />
<br />
Using numbers is another method which allows you to edit the permissions for all three owner, group, and others at the same time, as well as the setuid, setgid, and sticky bits. This basic structure of the code is this:<br />
<br />
$ chmod ''xxx'' ''filename''<br />
<br />
Where {{ic|'''xxx'''}} is a 3-digit number where each digit can be anything from 0 to 7. The first digit applies to permissions for owner, the second digit applies to permissions for group, and the third digit applies to permissions for all others.<br />
<br />
In this number notation, the values {{ic|r}}, {{ic|w}}, and {{ic|x}} have their own number value:<br />
<br />
r=4<br />
w=2<br />
x=1<br />
<br />
To come up with a 3-digit number you need to consider what permissions you want owner, group, and user to have, and then total their values up. For example, if you want to grant the owner of a directory read write and execution permissions, and you want group and everyone else to have just read and execute permissions, you would come up with the numerical values like so:<br />
<br />
* Owner: {{ic|rwx}}=4+2+1=7<br />
* Group: {{ic|r-x}}=4+0+1=5<br />
* Other: {{ic|r-x}}=4+0+1=5<br />
<br />
$ chmod 755 ''filename''<br />
<br />
This is the equivalent of using the following: <br />
<br />
$ chmod u=rwx ''filename''<br />
$ chmod go=rx ''filename''<br />
<br />
To view the existing permissions of a file or directory in numeric form, use the {{man|1|stat}} command:<br />
<br />
$ stat -c %a ''filename''<br />
<br />
Where the %a option specifies output in numeric form.<br />
<br />
Most folders and directories are set to {{ic|755}} to allow reading, writing and execution to the owner, but deny writing to everyone else, and files are normally {{ic|644}} to allow reading and writing for the owner but just reading for everyone else; refer to the last note on the lack of {{ic|x}} permissions with non executable files: it is the same thing here. <br />
<br />
To see this in action with examples consider the previous example that has been used but with this numerical method applied instead:<br />
<br />
Before: {{ic|-rw-r--r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
$ chmod 664 foobar<br />
<br />
After: {{ic|-rw-rw-r-- 1 archie users 5120 Jun 27 08:28 foobar}}<br />
<br />
If this were an executable the number would be {{ic|774}} if you wanted to grant executable permission to the owner and group. Alternatively if you wanted everyone to only have read permission the number would be {{ic|444}}. Treating {{ic|r}} as 4, {{ic|w}} as 2, and {{ic|x}} as 1 is probably the easiest way to work out the numerical values for using {{ic|chmod ''xxx'' ''filename''}}, but there is also a binary method, where each permission has a binary number, and then that is in turn converted to a number. It is a bit more convoluted, but here included for completeness.<br />
<br />
Consider this permission set:<br />
<br />
-rwxr-xr--<br />
<br />
If you put a 1 under each permission granted, and a 0 for every one not granted, the result would be something like this:<br />
<br />
-rwxrwxr-x<br />
111111101<br />
<br />
You can then convert these binary numbers:<br />
<br />
000=0 100=4<br />
001=1 101=5<br />
010=2 110=6<br />
011=3 111=7<br />
<br />
The value of the above would therefore be 775. <br />
<br />
Consider we wanted to remove the writable permission from group:<br />
<br />
-rwxr-xr-x<br />
111101101<br />
<br />
The value would therefore be 755 and you would use {{ic|chmod 755 ''filename''}} to remove the writable permission. You will notice you get the same three digit number no matter which method you use. Whether you use text or numbers will depend on personal preference and typing speed. When you want to restore a directory or file to default permissions e.g. read and write (and execute) permission to the owner but deny write permission to everyone else, it may be faster to use {{ic|chmod 755/644 ''filename''}}. However if you are changing the permissions to something out of the norm, it may be simpler and quicker to use the text method as opposed to trying to convert it to numbers, which may lead to a mistake. It could be argued that there is not any real significant difference in the speed of either method for a user that only needs to use ''chmod'' on occasion.<br />
<br />
You can also use the numeric method to set the {{ic|setuid}}, {{ic|setgid}}, and {{ic|sticky}} bits by using four digits. <br />
<br />
setuid=4<br />
setgid=2<br />
sticky=1<br />
<br />
For example, {{ic|chmod 2777 ''filename''}} will set read/write/executable bits for everyone and also enable the {{ic|setgid}} bit.<br />
<br />
=== Bulk chmod ===<br />
<br />
Generally directories and files should not have the same permissions. If it is necessary to bulk modify a directory tree, use [[find]] to selectively modify one or the other.<br />
<br />
To ''chmod'' only directories to 755:<br />
<br />
$ find ''directory'' -type d -exec chmod 755 {} +<br />
<br />
To ''chmod'' only files to 644:<br />
<br />
$ find ''directory'' -type f -exec chmod 644 {} +<br />
<br />
== Changing ownership ==<br />
<br />
[[Wikipedia:chown|chown]] changes the owner of a file or directory, which is quicker and easier than altering the permissions in some cases. <br />
<br />
Consider the following example, making a new partition with [[GParted]] for backup data. Gparted does this all as root so everything belongs to root by default. This is all well and good but when it comes to writing data to the mounted partition, permission is denied for regular users.<br />
<br />
brw-rw---- 1 root disk 8, 9 Jul 6 16:02 sda9<br />
drwxr-xr-x 5 root root 4096 Jul 6 16:01 Backup<br />
<br />
As you can see the device in {{ic|/dev}} is owned by root, as is the mount location ({{ic|/media/Backup}}). To change the owner of the mount location one can do the following:<br />
<br />
Before: {{ic|drwxr-xr-x 5 root root 4096 Jul 6 16:01 Backup}}<br />
<br />
# chown archie /media/Backup<br />
<br />
After: {{ic|drwxr-xr-x 5 archie root 4096 Jul 6 16:01 Backup}}<br />
<br />
Now the partition can have data written to it by the new owner, archie, without altering the permissions (as the owner triad already had {{ic|rwx}} permissions).<br />
<br />
{{Note|<br />
* {{ic|chown}} always clears the setuid and setgid bits.<br />
* Non-root users cannot use {{ic|chown}} to "give away" files they own to another user.<br />
}}<br />
<br />
== Access Control Lists ==<br />
<br />
[[Access Control Lists]] provides an additional, more flexible permission mechanism for file systems by allowing to set permissions for any user or group to any file.<br />
<br />
== Umask ==<br />
<br />
The [[umask]] utility is used to control the file-creation mode mask, which determines the initial value of file permission bits for newly created files.<br />
<br />
== File attributes ==<br />
<br />
Apart from the file mode bits that control [[Users and groups|user and group]] read, write and execute permissions, several [[file systems]] support file attributes that enable further customization of allowable file operations. This section describes some of these attributes and how to work with them.<br />
<br />
{{Warning|By default, file attributes are not preserved by [[cp]], [[rsync]], and other similar programs.}}<br />
<br />
=== chattr and lsattr ===<br />
<br />
For ext2 and [[ext3]] file systems, the {{Pkg|e2fsprogs}} package contains the programs [[Wikipedia:lsattr|lsattr]] and [[Wikipedia:chattr|chattr]] that list and change a file's attributes, respectively. Though some are not honored by all file systems, the available attributes are:<br />
<br />
* {{ic|a}}: append only<br />
* {{ic|c}}: compressed<br />
* {{ic|d}}: no dump<br />
* {{ic|e}}: extent format<br />
* {{ic|i}}: immutable<br />
* {{ic|j}}: data journalling<br />
* {{ic|s}}: secure deletion<br />
* {{ic|t}}: no tail-merging<br />
* {{ic|u}}: undeletable<br />
* {{ic|A}}: no atime updates<br />
* {{ic|C}}: no copy on write<br />
* {{ic|D}}: synchronous directory updates<br />
* {{ic|S}}: synchronous updates<br />
* {{ic|T}}: top of directory hierarchy<br />
<br />
For example, if you want to set the immutable bit on some file, use the following command:<br />
<br />
# chattr +i ''/path/to/file''<br />
<br />
To remove an attribute on a file just change {{ic|+}} to {{ic|-}}.<br />
<br />
== Extended attributes ==<br />
<br />
From {{man|7|xattr|url=http://man7.org/linux/man-pages/man5/attr.5.html}}: "Extended attributes are name:value pairs associated permanently with files and directories". There are four extended attribute classes: security, system, trusted and user.<br />
<br />
{{Warning|By default, extended attributes are not preserved by [[cp]], [[rsync]], and other similar programs, see [[#Preserving extended attributes]].}}<br />
<br />
Extended attributes are also used to set [[Capabilities]].<br />
<br />
=== User extended attributes ===<br />
<br />
User extended attributes can be used to store arbitrary information about a file. To create one:<br />
<br />
$ setfattr -n user.checksum -v "3baf9ebce4c664ca8d9e5f6314fb47fb" foo.txt<br />
<br />
Use getfattr to display extended attributes:<br />
<br />
{{hc|$ getfattr -d foo.txt|2=<br />
# file: foo.txt<br />
user.checksum="3baf9ebce4c664ca8d9e5f6314fb47fb"<br />
}}<br />
<br />
=== Preserving extended attributes ===<br />
<br />
{| class=wikitable<br />
! Command || Required flag<br />
|-<br />
| {{ic|cp}} || {{ic|1=--preserve=mode,ownership,timestamps,xattr}}<br />
|-<br />
| {{ic|mv}} || {{Y|preserves by default<sup>1}}<br />
|-<br />
| {{ic|tar}} || {{ic|--xattrs}} for creation and extraction<br />
|-<br />
| {{ic|bsdtar}} || {{ic|-p}} for extraction<br />
|-<br />
| [[rsync]] || {{ic|--xattrs}}<br />
|}<br />
<br />
# mv silently discards extended attributes when the target file system does not support them.<br />
<br />
To preserve extended attributes with [[text editor]]s you need to configure them to truncate files on saving instead of using {{man|2|rename}}.[https://unix.stackexchange.com/questions/45407]<br />
<br />
== Tips and tricks ==<br />
<br />
=== Preserve root ===<br />
<br />
Use the {{ic|--preserve-root}} flag to prevent {{ic|chmod}} from acting recursively on {{ic|/}}. This can, for example, prevent one from removing the executable bit systemwide and thus breaking the system. To use this flag every time, set it within an [[alias]]. See also [https://www.reddit.com/r/linux/comments/4ni3xe/tifu_sudo_chmod_644/].<br />
<br />
== See also ==<br />
<br />
* [[wikipedia:Chattr]]<br />
* [http://www.hackinglinuxexposed.com/articles/20030417.html Linux File Permission Confusion]<br />
* [http://www.hackinglinuxexposed.com/articles/20030424.html Linux File Permission Confusion part 2]<br />
* [[wikipedia:Extended file attributes#Linux]]<br />
* [http://www.lesbonscomptes.com/pages/extattrs.html Extended attributes: the good, the not so good, the bad.]<br />
* [http://www.concrete5.org/documentation/how-tos/designers/backup-and-restore-file-permissions-in-linux/ Backup and restore file permissions in Linux]<br />
* [https://serverfault.com/questions/364677/why-is-chmod-r-777-destructive Why is “chmod -R 777 /” destructive?]</div>Ounr