https://wiki.archlinux.org/api.php?action=feedcontributions&user=Hjr265&feedformat=atomArchWiki - User contributions [en]2024-03-19T13:06:28ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lm_sensors&diff=262724Lm sensors2013-06-14T13:29:37Z<p>Hjr265: /* Setting up lm_sensors */</p>
<hr />
<div>[[Category:Status monitoring and notification]]<br />
[[Category:CPU]]<br />
[[cs:Lm sensors]]<br />
[[es:Lm sensors]]<br />
[[ru:Lm sensors]]<br />
[[uk:Lm sensors]]<br />
[[zh-CN:Lm sensors]]<br />
[[ja:Lm sensors]]<br />
{{lowercase title}}<br />
[http://www.lm-sensors.org/ lm_sensors] (Linux monitoring sensors) is a free and open-source application that provides tools and drivers for monitoring temperatures, voltage, and fans. This document explains how to install, configure, and use lm_sensors so that you can monitor CPU temperatures, motherboard temperatures, and fan speeds.<br />
<br />
== Usage ==<br />
=== Installation ===<br />
Install the {{Pkg|lm_sensors}} package from the [[Official Repositories|official repositories]].<br />
<br />
=== Setting up lm_sensors ===<br />
Use '''sensors-detect''' to detect and generate a list of kernel modules:<br />
# sensors-detect<br />
This will create the {{ic|/etc/conf.d/lm_sensors}} configuration file which is used by the {{ic|sensors}} daemon to automatically load kernel modules on boot. You will be asked if you want to probe for various hardware. The "safe" answers are the defaults, so just hitting {{Keypress|Enter}} to all the questions will generally not cause any problems. <br />
<br />
When the detection is finished, you will be presented with a summary of the probes. Here is an example summary from my system:<br />
{{hc|# sensors-detect|<nowiki><br />
Now follows a summary of the probes I have just done.<br />
Just press ENTER to continue:<br />
Driver `it87':<br />
* ISA bus, address 0x290<br />
Chip `ITE IT8718F Super IO Sensors' (confidence: 9)<br />
Driver `coretemp':<br />
* Chip `Intel Core family thermal sensor' (confidence: 9)<br />
</nowiki>}}<br />
If you plan on using the daemon, be sure to answer '''YES''' when asked if you want to to generate {{ic|/etc/conf.d/lm_sensors}}.<br />
<br />
To automatically load the kernel modules at boot time:<br />
# systemctl enable lm_sensors.service<br />
<br />
Alternatively, instead of using the daemon, you can add the modules to the {{ic|MODULES}} array in {{ic|/etc/modules-load.d/lm_sensors.conf}}:<br />
coretemp<br />
it87<br />
acpi-cpufreq<br />
<br />
=== Automatic lm_sensors deployment ===<br />
If you wish to deploy lm-sensors on multiple diferent linux machines issue is that sensors-detect ask you quite a few questions. There are few tricks that you can use to automate replies.<br />
<br />
First one is if you wish to accept defaults which sensors-detect suggest you need just to press [ENTER] all the time. To automate this use this one liner:<br />
<br />
# yes "" | sensors-detect<br />
<br />
If you wish to override defaults and answer YES to all questions then use this oneliner:<br />
<br />
# yes | sensors-detect<br />
<br />
=== Testing your lm_sensors ===<br />
To test your setup, load the kernel modules manually or by using the {{ic|/etc/rc.d/sensors}} init script. You do '''NOT''' have to do both.<br />
Example manually adding them<br />
# modprobe it87<br />
# modprobe coretemp<br />
Example using the script<br />
# systemctl start lm_sensors<br />
<br />
You should see something like this when you run sensors<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0001<br />
Adapter: ISA adapter<br />
Core 1: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0002<br />
Adapter: ISA adapter<br />
Core 2: +32.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0003<br />
Adapter: ISA adapter<br />
Core 3: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
it8718-isa-0290<br />
Adapter: ISA adapter<br />
in0: +1.17 V (min = +0.00 V, max = +4.08 V) <br />
in1: +1.31 V (min = +1.28 V, max = +1.68 V) <br />
in2: +3.28 V (min = +2.78 V, max = +3.78 V) <br />
in3: +2.88 V (min = +2.67 V, max = +3.26 V) <br />
in4: +2.98 V (min = +2.50 V, max = +3.49 V) <br />
in5: +1.34 V (min = +0.58 V, max = +1.34 V) ALARM<br />
in6: +2.02 V (min = +1.04 V, max = +1.36 V) ALARM<br />
in7: +2.83 V (min = +2.67 V, max = +3.26 V) <br />
Vbat: +3.28 V<br />
fan1: 1500 RPM (min = 3245 RPM) ALARM<br />
fan2: 0 RPM (min = 3245 RPM) ALARM<br />
fan3: 0 RPM (min = 3245 RPM) ALARM<br />
temp1: +18.0°C (low = +127.0°C, high = +64.0°C) sensor = thermal diode<br />
temp2: +32.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor<br />
temp3: +38.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor<br />
cpu0_vid: +2.050 V<br />
<br />
acpitz-virtual-0<br />
Adapter: Virtual device<br />
temp1: +18.0°C (crit = +64.0°C)<br />
</nowiki>}}<br />
<br />
=== Reading SPD values from memory modules (optional) ===<br />
<br />
To read the SPD timing values from your memory modules, install {{pkg|i2c-tools}} from the [[Official Repositories|official repositories]]. Once you have i2c-tools installed, you will need to load the {{ic|eeprom}} [[Kernel_modules|kernel module]].<br />
# modprobe eeprom<br />
Finally, you can view your memory information with {{ic|decode-dimms}}.<br />
<br />
Here is partial output from one machine:<br />
{{hc|$ decode-dimms|<nowiki><br />
# decode-dimms version 5733 (2009-06-09 13:13:41 +0200)<br />
<br />
Memory Serial Presence Detect Decoder<br />
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,<br />
Jean Delvare, Trent Piepho and others<br />
<br />
<br />
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050<br />
Guessing DIMM is in bank 1<br />
<br />
---=== SPD EEPROM Information ===---<br />
EEPROM CRC of bytes 0-116 OK (0x583F)<br />
# of bytes written to SDRAM EEPROM 176<br />
Total number of bytes in EEPROM 512<br />
Fundamental Memory type DDR3 SDRAM<br />
Module Type UDIMM<br />
<br />
---=== Memory Characteristics ===---<br />
Fine time base 2.500 ps<br />
Medium time base 0.125 ns<br />
Maximum module speed 1066MHz (PC3-8533)<br />
Size 2048 MB<br />
Banks x Rows x Columns x Bits 8 x 14 x 10 x 64<br />
Ranks 2<br />
SDRAM Device Width 8 bits<br />
tCL-tRCD-tRP-tRAS 7-7-7-33<br />
Supported CAS Latencies (tCL) 8T, 7T, 6T, 5T<br />
<br />
---=== Timing Parameters ===---<br />
Minimum Write Recovery time (tWR) 15.000 ns<br />
Minimum Row Active to Row Active Delay (tRRD) 7.500 ns<br />
Minimum Active to Auto-Refresh Delay (tRC) 49.500 ns<br />
Minimum Recovery Delay (tRFC) 110.000 ns<br />
Minimum Write to Read CMD Delay (tWTR) 7.500 ns<br />
Minimum Read to Pre-charge CMD Delay (tRTP) 7.500 ns<br />
Minimum Four Activate Window Delay (tFAW) 30.000 ns<br />
<br />
---=== Optional Features ===---<br />
Operable voltages 1.5V<br />
RZQ/6 supported? Yes<br />
RZQ/7 supported? Yes<br />
DLL-Off Mode supported? No<br />
Operating temperature range 0-85C<br />
Refresh Rate in extended temp range 1X<br />
Auto Self-Refresh? Yes<br />
On-Die Thermal Sensor readout? No<br />
Partial Array Self-Refresh? No<br />
Thermal Sensor Accuracy Not implemented<br />
SDRAM Device Type Standard Monolithic<br />
<br />
---=== Physical Characteristics ===---<br />
Module Height (mm) 15<br />
Module Thickness (mm) 1 front, 1 back<br />
Module Width (mm) 133.5<br />
Module Reference Card B<br />
<br />
---=== Manufacturer Data ===---<br />
Module Manufacturer Invalid<br />
Manufacturing Location Code 0x02<br />
Part Number OCZ3G1600LV2G <br />
<br />
...<br />
</nowiki>}}<br />
<br />
== Using sensor data ==<br />
=== Graphical Front-ends ===<br />
There are a variety of front-ends for sensors data.<br />
*{{Pkg|xsensors}} - X11 interface to lm_sensors<br />
*{{Pkg|xfce4-sensors-plugin}} - A lm_sensors plugin for the [[Xfce]] panel<br />
*[[conky]] - Conky is an advanced, highly configurable system monitor for X based on torsmo<br />
*{{Pkg|kdeutils-superkaramba}} - Superkaramba is a tool which gives posibility to create different widgets for KDE desktop. Check the [http://www.kde-look.org/index.php?xcontentmode=38 karamba section on kde-look.org] for examples of making karamba front-ends for sensors data.<br />
*{{pkg|sensors-applet}} - applet for the [[GNOME]] Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings.<br />
<br />
=== sensord ===<br />
There is an optional daemon called sensord (included with the {{Pkg|lm_sensors}} package) which can log your data to a round robin database (rrd) and later visualize graphically. See the sensord man page for details.<br />
<br />
==Troubleshooting==<br />
=== Renumbering Cores for Multi-CPU Systems ===<br />
In rare cases, the actual numbering of physical cores on multi-processor motherboards can be incorrect. Consider the following HP Z600 workstation with dual Xeons:<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 1: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 9: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 10: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core 0: +54.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 1: +56.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 9: +60.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 10: +61.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
smsc47b397-isa-0480<br />
Adapter: ISA adapter<br />
fan1: 1730 RPM<br />
fan2: 1746 RPM<br />
fan3: 1224 RPM<br />
fan4: 2825 RPM<br />
temp1: +46.0°C<br />
temp2: +37.0°C<br />
temp3: +23.0°C<br />
temp4: -128.0°C<br />
</nowiki>}}<br />
<br />
Note the cores are numbered 0, 1, 9, 10 which is repeated into the second CPU. Most users want the core temperatures to report out in sequential order, i.e. 0,1,2,3,4,5,6,7. Fixing the order is accomplished in two steps.<br />
<br />
====Step 1. ID what each chip is reporting ====<br />
<br />
Run {{ic|sensors}} with the {{ic|-u}} switch to see what options are available for each physical chip:<br />
<br />
{{hc|$ sensors -u coretemp-isa-0000|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0:<br />
temp2_input: 61.000<br />
temp2_max: 85.000<br />
temp2_crit: 95.000<br />
temp2_crit_alarm: 0.000<br />
Core 1:<br />
temp3_input: 61.000<br />
temp3_max: 85.000<br />
temp3_crit: 95.000<br />
temp3_crit_alarm: 0.000<br />
Core 9:<br />
temp11_input: 62.000<br />
temp11_max: 85.000<br />
temp11_crit: 95.000<br />
Core 10:<br />
temp12_input: 63.000<br />
temp12_max: 85.000<br />
temp12_crit: 95.000<br />
</nowiki>}}<br />
<br />
{{hc|$ sensors -u coretemp-isa-0004|<nowiki><br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core 0:<br />
temp2_input: 53.000<br />
temp2_max: 85.000<br />
temp2_crit: 95.000<br />
temp2_crit_alarm: 0.000<br />
Core 1:<br />
temp3_input: 54.000<br />
temp3_max: 85.000<br />
temp3_crit: 95.000<br />
temp3_crit_alarm: 0.000<br />
Core 9:<br />
temp11_input: 59.000<br />
temp11_max: 85.000<br />
temp11_crit: 95.000<br />
Core 10:<br />
temp12_input: 59.000<br />
temp12_max: 85.000<br />
temp12_crit: 95.000<br />
</nowiki>}}<br />
<br />
==== Step 2. Redefine the cores ====<br />
<br />
Create {{ic|/etc/sensors.d/cores.conf}} wherein the new definitions are defined based on the output of step 1:<br />
<br />
{{hc|/etc/sensors.d/cores.conf|<nowiki><br />
chip "coretemp-isa-0000"<br />
<br />
label temp2 "Core 0"<br />
label temp3 "Core 1"<br />
label temp11 "Core 2"<br />
label temp12 "Core 3"<br />
<br />
chip "coretemp-isa-0004"<br />
<br />
label temp2 "Core 4"<br />
label temp3 "Core 5"<br />
label temp11 "Core 6"<br />
label temp12 "Core 7"</nowiki>}}<br />
<br />
Problem solved. Output after completing these steps:<br />
<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core0: +64.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core1: +63.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core2: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core3: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core4: +53.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core5: +54.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core6: +59.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core7: +60.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
smsc47b397-isa-0480<br />
Adapter: ISA adapter<br />
fan1: 1734 RPM<br />
fan2: 1726 RPM<br />
fan3: 1222 RPM<br />
fan4: 2827 RPM<br />
temp1: +45.0°C <br />
temp2: +37.0°C <br />
temp3: +23.0°C <br />
temp4: -128.0°C <br />
</nowiki>}}<br />
<br />
=== Sensors not working since Linux 2.6.31 ===<br />
A change in version 2.6.31 has made some sensors stop working. See [http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31 this FAQ entry] for a detailed explanation and for some example errors. To fix sensors, add the following [[kernel parameters]]:<br />
acpi_enforce_resources=lax<br />
{{Warning|In some situations, this may be dangerous. Consult the FAQ for details.}}<br />
<br />
Note that in most cases the information is still accessible via other modules (e.g. via ACPI modules) for the hardware in question. Many utilities and monitors (e.g. {{ic|/usr/bin/sensors}}) can gather information from either source. Where possible, this is the preferred solution.<br />
<br />
===K10Temp Module===<br />
<br />
Some K10 processors have issues with their temperature sensor. From the kernel documentation ({{ic|linux-&lt;version&gt;/Documentation/hwmon/k10temp}}):<br />
:''All these processors have a sensor, but on those for Socket F or AM2+, the sensor may return inconsistent values (erratum 319). The driver will refuse to load on these revisions unless you specify the {{ic|1=force=1}} module parameter.''<br />
<br />
:''Due to technical reasons, the driver can detect only the mainboard's socket type, not the processor's actual capabilities. Therefore, if you are using an AM3 processor on an AM2+ mainboard, you can safely use the {{ic|1=force=1}} parameter.''<br />
<br />
On affected machines the module will report "unreliable CPU thermal sensor; monitoring disabled". If you still want to use the module you can:<br />
# rmmod k10temp<br />
# modprobe k10temp force=1<br />
Confirm with [[Lm_sensors#Testing your lm_sensors]] that the sensor is in fact valid and reliable. If it is, you can edit {{ic|/etc/modprobe.d/k10temp.conf}} and add:<br />
options k10temp force=1<br />
This will allow the module to load at boot.<br />
<br />
==See also==<br />
*[[hddtemp]] - Software to read temperatures of hard drives.<br />
*[[monitorix]] - Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible.</div>Hjr265https://wiki.archlinux.org/index.php?title=MariaDB&diff=261436MariaDB2013-06-06T06:47:06Z<p>Hjr265: /* Installation */</p>
<hr />
<div>[[Category:Database management systems]]<br />
[[cs:MySQL]]<br />
[[de:MySQL]]<br />
[[es:MySQL]]<br />
[[fr:MySQL]]<br />
[[it:MySQL]]<br />
[[sr:MySQL]]<br />
[[tr:MySQL]]<br />
[[zh-CN:MySQL]]<br />
MySQL is a widely spread, multi-threaded, multi-user SQL database. For more information about features, see the [http://www.mysql.com/ official homepage].<br />
<br />
{{Note|MariaDB is now officially Archlinux default implementation of MySQL. It is recommended for all users to [[#Upgrade from Oracle MySQL to MariaDB|upgrade]] to MariaDB. Oracle MySQL was dropped to the AUR. See [https://www.archlinux.org/news/mariadb-replaces-mysql-in-repositories/ the announcement].}}<br />
<br />
== Installation ==<br />
<br />
The MySQL implementation choosen by Archlinux is called MariaDB.<br />
[[pacman|Install]] {{Pkg|mariadb}}, {{Pkg|libmariadbclient}}, {{Pkg|mariadb-clients}} packages from the [[official repositories]].<br />
Alternate implementations are {{Pkg|percona-server}} and Oracle {{AUR|mysql}}.<br />
<br />
Start the {{ic|mysqld}} [[daemon]], run the setup script and restart the daemon afterwards:<br />
# systemctl start mysqld<br />
# mysql_secure_installation<br />
# systemctl restart mysqld<br />
<br />
Frontends available are {{AUR|mysql-gui-tools}} and {{AUR|mysql-workbench}}.<br />
<br />
=== Upgrade from Oracle MySQL to MariaDB ===<br />
<br />
Users who want to switch will need to install mariadb, libmariadbclient or mariadb-clients and execute mysql_upgrade in order to migrate their systems.<br />
# systemctl stop mysqld<br />
# pacman -S mariadb libmariadbclient mariadb-clients<br />
# systemctl start mysqld<br />
# mysql_upgrade -p<br />
<br />
=== On update ===<br />
<br />
You might consider running this command after you have upgraded MySQL and started it:<br />
# mysql_upgrade -u root -p<br />
<br />
== Configuration ==<br />
<br />
Once you have started the MySQL server, you probably want to add a root account in order to maintain your MySQL users and databases. This can be done manually or automatically, as mentioned by the output of the above script. Either run the commands to set a password for the root account, or run the secure installation script.<br />
<br />
You now should be able to do further configuration using your favorite interface. For example you can use MySQL's command line tool to log in as root into your MySQL server:<br />
$ mysql -p -u root<br />
<br />
=== Disable remote access ===<br />
<br />
The MySQL server is accessible from the network by default. If MySQL is only needed for the localhost, you can improve security by not listening on TCP port 3306. To refuse remote connections, uncomment the following line in {{ic|/etc/mysql/my.cnf}}:<br />
skip-networking<br />
<br />
You will still be able to log in from the localhost.<br />
<br />
=== Enable auto-completion ===<br />
<br />
{{Note|Enabling this feature can make the client initialization longer.}}<br />
The MySQL client completion feature is disabled by default. To enable it system-wide edit {{ic|/etc/mysql/my.cnf}}, and replace {{ic|no-auto-rehash}} by {{ic|auto-rehash}}. Completion will be enabled next time you run the MySQL client.<br />
<br />
== Backup ==<br />
<br />
The database can be dumped to a file for easy backup. The following shell script will do this for you, creating a {{ic|db_backup.gz}} file in the same directory as the script, containing your database dump:<br />
<br />
{{bc|1=<br />
#!/bin/bash<br />
<br />
THISDIR=$(dirname $(readlink -f "$0"))<br />
<br />
mysqldump --single-transaction --flush-logs --master-data=2 --all-databases \<br />
<nowiki>| gzip > $THISDIR/db_backup.gz<br />
echo 'purge master logs before date_sub(now(), interval 7 day);' |</nowiki> mysql<br />
}}<br />
<br />
See also the official {{ic|mysqldump}} [http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html page] in the MySQL manual.<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL daemon cannot start ===<br />
<br />
If MySQL fails to start and there is no entry in the log files, you might want to check the permissions of files in the directories {{ic|/var/lib/mysql}} and {{ic|/var/lib/mysql/mysql}}. If the owner of files in these directories is not {{ic|mysql:mysql}}, you should do the following:<br />
# chown mysql:mysql /var/lib/mysql -R<br />
If you run into permission problems despite having followed the above, ensure that your {{ic|my.cnf}} is copied to {{ic|/etc/}}:<br />
# cp /etc/mysql/my.cnf /etc/my.cnf<br />
Now try and start the daemon.<br />
<br />
If you get these messages in your {{ic|/var/lib/mysql/hostname.err}}<br />
[ERROR] Can't start server : Bind on unix socket: Permission denied<br />
[ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?<br />
[ERROR] Aborting<br />
The permissions of {{ic|/var/run/mysqld}} could be the culprit.<br />
# chown mysql:mysql /var/run/mysqld -R<br />
<br />
If you run mysqld and the following error appears:<br />
Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist<br />
Run the following command from the {{ic|/usr}} directory to install the default tables:<br />
# cd /usr<br />
# mysql_install_db --user=mysql --ldata=/var/lib/mysql/<br />
<br />
=== Unable to run mysql_upgrade because MySQL cannot start ===<br />
<br />
Try run MySQL in safemode:<br />
# mysqld_safe --datadir=/var/lib/mysql/<br />
And then run:<br />
# mysql_upgrade -u root -p<br />
<br />
=== Reset the root password ===<br />
<br />
Stop the ''mysqld'' [[daemon]]. Issue the following command:<br />
# mysqld_safe --skip-grant-tables &<br />
Connect to the mysql server. Issue the following command:<br />
# mysql -u root mysql<br />
Change root password:<br />
mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';<br />
mysql> FLUSH PRIVILEGES;<br />
mysql> exit<br />
Start the ''mysqld'' daemon.<br />
<br />
== See also ==<br />
<br />
* [[LAMP]] - Arch wiki article covering the setup of a LAMP server (Linux Apache MySQL PHP)<br />
* http://mariadb.org/ - Community-driven implementation<br />
* http://www.mysql.com/ - Oracle implementation<br />
* http://www.percona.com/software - Percona implementation</div>Hjr265https://wiki.archlinux.org/index.php?title=Font_configuration&diff=256079Font configuration2013-05-04T13:52:01Z<p>Hjr265: /* Infinality: the easy way */</p>
<hr />
<div>[[Category:Fonts]]<br />
[[it:Font Configuration]]<br />
[[ru:Font Configuration]]<br />
[[sr:Font Configuration]]<br />
[[tr:Yazıtipi_yapılandırması]]<br />
[[zh-CN:Font Configuration]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of font configuration options and various techniques for improving the readability of fonts}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Fonts}}: Information on adding fonts and font recommendations<br />
{{Article summary wiki|Font Configuration/fontconfig Examples}}<br />
{{Article summary wiki|Java Runtime Environment Fonts}}: Fonts specific to Sun's Java machine<br />
{{Article summary wiki|MS Fonts}}: Adding Microsoft fonts and mimicking Windows' font settings<br />
{{Article summary wiki|X Logical Font Description}}: The older core font system for X<br />
{{Article summary end}}<br />
<br />
Fontconfig is a library designed to provide a list of available [[fonts]] to applications, and also for configuration for how fonts get rendered. See package {{Pkg|fontconfig}} and [[Wikipedia:Fontconfig]]. The Free type library ({{Pkg|freetype2}} package) renders the fonts, based on this configuration.<br />
<br />
Though Fontconfig is the standard in today's Linux, some applications still rely on the original method of font selection and display, the [[X Logical Font Description]].<br />
<br />
The font rendering packages on Arch Linux includes support for ''freetype2'' with the bytecode interpreter (BCI) enabled. Patched packages exist for better font rendering, especially with an LCD monitor. See [[#Patched packages]] below. The [[#Infinality]] package allows both auto-hinting and subpixel rendering, allows the LCD filter to be tweaked without recompiling, and allows the auto-hinter to work well with bold fonts.<br />
<br />
==Font paths==<br />
<br />
For fonts to be known to applications, they must be cataloged for easy and quick access.<br />
<br />
The font paths initially known to Fontconfig are: {{ic|/usr/share/fonts/}} and {{ic|~/.fonts/}} (of which Fontconfig will scan recursively). For ease of organization and installation, it is recommended to use these font paths when [[Fonts#Installation|adding fonts]].<br />
<br />
To see a list of known Fontconfig fonts:<br />
$ fc-list : file<br />
<br />
See {{ic|man fc-list}} for more out put format.<br />
<br />
Check for Xorg's known font paths by reviewing its log:<br />
$ grep /fonts /var/log/Xorg.0.log<br />
<br />
{{Tip|You can also check the list of [[Xorg]]'s known font paths using the command {{ic|xset q}}.}}<br />
<br />
Keep in mind that Xorg does not search recursively through the {{ic|/usr/share/fonts/}} directory like Fontconfig does. To add a path, the full path must be used:<br />
Section "Files"<br />
FontPath "/usr/share/fonts/local/"<br />
EndSection<br />
<br />
If you want font paths to be set on a per-user basis, you can add and remove font paths from the default by adding the following line(s) to {{ic|~/.xinitrc}}:<br />
xset +fp /usr/share/fonts/local/ # Prepend a custom font path to Xorg's list of known font paths<br />
xset -fp /usr/share/fonts/sucky_fonts/ # Remove the specified font path from Xorg's list of known font paths<br />
<br />
To see a list of known Xorg fonts use {{ic|xlsfonts}}, from the {{Pkg|xorg-xlsfonts}} package.<br />
<br />
==Fontconfig configuration==<br />
<br />
Fontconfig is documented in the [http://fontconfig.org/fontconfig-user.html fonts.conf] man page.<br />
<br />
Configuration can be done per-user through {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}, and globally with {{ic|/etc/fonts/local.conf}}. The settings in the per-user configuration have precedence over the global configuration. Both these files use the same syntax.<br />
{{Note|Configuration files and directories: {{ic|~/.fonts.conf}}, {{ic|~/.fonts.conf.d}} and {{ic|~/.fontconfig/*.cache-*}} are deprecated since fontconfig 2.10.1 ([http://cgit.freedesktop.org/fontconfig/commit/?id&#61;8c255fb185d5651b57380b0a9443001e8051b29d upstream commit]) and will not be read by default in the future versions of package. Use instead {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}, {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d}} and {{ic|$XDG_CACHE_HOME/fontconfig/*.cache-*}} respectively. If you use the second directory, the file '''must''' follow the naming convention {{ic|NN-name.conf}} (where NN it's a two digit number like 00, 10, or 99).}}<br />
<br />
Fontconfig gathers all its configurations in a central file ({{ic|/etc/fonts/fonts.conf}}). This file is replaced during fontconfig updates and shouldn't be edited. Fontconfig-aware applications source this file to know available fonts and how they get rendered. This file is a conglomeration of rules from the global configuration ({{ic|/etc/fonts/local.conf}}), the configured presets in {{ic|/etc/fonts/conf.d/}}, and the user configuration file ({{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}).<br />
<br />
{{Note|For some desktop environments (such as [[GNOME]] and [[KDE]]) using the ''Font Control Panel'' will automatically create or overwrite the user font configuration file. For these desktop environments, it is best to match your already defined font configurations to get the expected behavior.}}<br />
<br />
Fontconfig configuration files use [[Wikipedia:XML|XML]] format and need these headers:<br />
<br />
{{bc|<nowiki><br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<br />
<!-- settings go here --><br />
<br />
</fontconfig><br />
</nowiki>}}<br />
<br />
The configuration examples in this article omit these tags.<br />
<br />
===Presets===<br />
<br />
There are presets installed in the directory {{ic|/etc/fonts/conf.avail}}. They can be enabled by creating [[Wikipedia:Symbolic link|symbolic link]]s to them, both per-user and globally, as described in {{ic|/etc/fonts/conf.d/README}}. These presets will override matching settings in their respective configuration files.<br />
<br />
For example, to enable sub-pixel RGB rendering globally:<br />
<br />
# cd /etc/fonts/conf.d<br />
# ln -s ../conf.avail/10-sub-pixel-rgb.conf<br />
<br />
To do the same but instead for a per-user configuration:<br />
<br />
$ mkdir $XDG_CONFIG_HOME/fontconfig/conf.d<br />
$ ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf $XDG_CONFIG_HOME/fontconfig/conf.d<br />
<br />
===Anti-aliasing===<br />
<br />
[[Wikipedia:Font rasterization|Font rasterization]] converts vector font data to bitmap data so that it can be displayed. The result can appear jagged due to [[Wikipedia:Aliasing|aliasing]]. [[Wikipedia:Anti-aliasing|anti-aliasing]] is enabled by default and increases the apparent resolution of font edges.<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="antialias" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
Note: some applications, like [[Gnome|Gnome 3]] may [[#Troubleshooting|override default anti-alias settings]].<br />
<br />
===Hinting===<br />
<br />
[[Wikipedia:Font hinting|Font hinting]] (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid, such as the pixel grid in a display. Fonts will not line up correctly without hinting until displays have 300 [[Wikipedia:Dots per inch|DPI]] or greater. Two types of hinting are available.<br />
<br />
====Byte-Code Interpreter (BCI)====<br />
Using normal hinting, TrueType hinting instructions in the font are interpreted by freetype's Byte-Code Interpreter. This works best for fonts with good hinting instructions.<br />
<br />
To enable normal hinting:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="hinting" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
====Autohinter====<br />
Auto-discovery for hinting. This looks worse than normal hinting for fonts with good instructions, but better for those with poor or no instructions. The autohinter and subpixel rendering are not designed to work together and should not be used in combination.<br />
<br />
To enable auto-hinting:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="autohint" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
====Hint style====<br />
<br />
Hint style is the amount of influence the hinting mode has. Hinting can be set to: {{ic|hintfull}}, {{ic|hintmedium}}, {{ic|hintslight}} and {{ic|hintnone}}. With BCI hinting, hintfull should work best for most fonts. With the autohinter, hintslight is recommended.<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="hintstyle" mode="assign"><br />
<const>hintfull</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
Note: some applications, like [[Gnome|Gnome 3]] may [[#Troubleshooting|override default hinting settings]].<br />
<br />
===Subpixel rendering===<br />
<br />
Subpixel rendering effectively triples the horizontal (or vertical) resolution for fonts by making use of subpixels. The autohinter and subpixel rendering are not designed to work together and should not be used in combination without the [[#Infinality]] patch set.<br />
<br />
Most monitors manufactured today use the Red, Green, Blue (RGB) specification. Fontconfig will need to know your monitor type to be able to display your fonts correctly.<br />
<br />
''RGB (most common), BGR, V-RGB (vertical), or V-BGR''<br />
<br />
To enable subpixel rendering:<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>rgb</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
If you notice unusual colors around font's borders, the wrong subpixel arrangement might be configured. The [http://www.lagom.nl/lcd-test/subpixel.php Lagom subpixel layout test] web page can help identify it.<br />
<br />
====LCD filter====<br />
<br />
When using subpixel rendering, you should enable the LCD filter, which is designed to reduce colour fringing. This is described under [http://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html LCD filtering] in the FreeType 2 API reference. Different options are described under [http://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html#FT_LcdFilter FT_LcdFilter], and are illustrated by this [http://www.spasche.net/files/lcdfiltering/ LCD filter test] page.<br />
<br />
The {{ic|lcddefault}} filter will work for most users. Other filters are available that can be used in special situations: {{ic|lcdlight}}; a lighter filter ideal for fonts that look too bold or fuzzy, {{ic|lcdlegacy}}, the original Cairo filter; and {{ic|lcdnone}} to disable it entirely.<br />
<br />
{{bc|<nowiki><br />
<match target="font"><br />
<edit mode="assign" name="lcdfilter"><br />
<const>lcddefault</const><br />
</edit><br />
</match><br />
</nowiki>}}<br />
<br />
====Advanced LCD filter specification====<br />
<br />
If the available, built-in LCD filters are not satisfactory, it is possible to tweak the font rendering very specifically by building a custom freetype2 package and modifying the hardcoded filters. The [[Arch Build System]] can be used to build and install packages from source.<br />
<br />
First, refresh the freetype2 PKGBUILD as root:<br />
<br />
# abs extra/freetype2<br />
<br />
This example uses {{ic|/var/abs/build}} as the build directory, substitute it according to your personal ABS setup. Download and extract the freetype2 package as a regular user:<br />
<br />
$ cd /var/abs/build<br />
$ cp -r ../extra/freetype2 .<br />
$ cd freetype2<br />
$ makepkg -o<br />
<br />
Edit the file {{ic|src/freetype-VERSION/src/base/ftlcdfil.c}} and look up the definition of the constant {{ic|default_filter[5]}}:<br />
<br />
static const FT_Byte default_filter[5] =<br />
{ 0x10, 0x40, 0x70, 0x40, 0x10 };<br />
<br />
This constant defines a low-pass filter applied to the rendered glyph. Modify it as needed. Save the file, build and install the custom package:<br />
<br />
$ makepkg -e<br />
$ sudo pacman -Rd freetype2<br />
$ sudo pacman -U freetype2-VERSION-ARCH.pkg.tar.xz<br />
<br />
Reboot or restart X. The lcddefault filter should now render fonts differently.<br />
<br />
===Disable auto-hinter for bold fonts===<br />
<br />
The auto-hinter uses sophisticated methods for font rendering, but often makes bold fonts too wide. Fortunately, a solution can be turning off the autohinter for bold fonts while leaving it on for the rest:<br />
...<br />
<match target="font"><br />
<test name="weight" compare="more"><br />
<const>medium</const><br />
</test><br />
<edit name="autohint" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
...<br />
<br />
=== Enable anti-aliasing only for bigger fonts ===<br />
<br />
''See also [http://sharpfonts.co.cc/ sharpfonts.co.cc] for related information.''<br />
<br />
Some users prefer the sharper rendering that anti-aliasing does not offer:<br />
<br />
{{bc|<nowiki><br />
...<br />
<match target="font"><br />
<edit name="antialias" mode="assign"><br />
<bool>false</bool><br />
</edit><br />
</match><br />
<br />
<match target="font" ><br />
<test name="size" qual="any" compare="more"><br />
<double>12</double><br />
</test><br />
<edit name="antialias" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
<br />
<match target="font" ><br />
<test name="pixelsize" qual="any" compare="more"><br />
<double>16</double><br />
</test><br />
<edit name="antialias" mode="assign"><br />
<bool>true</bool><br />
</edit><br />
</match><br />
...<br />
</nowiki>}}<br />
<br />
===Replace fonts===<br />
<br />
The most reliable way to do this is to add an XML fragment similar to the one below. ''Using the "binding" attribute will give you better results'', for example, in Firefox where you may not want to change properties of font being replaced. This will cause Ubuntu to be used in place of Georgia:<br />
...<br />
<match target="pattern"><br />
<test qual="any" name="family"><string>georgia</string></test><br />
<edit name="family" mode="assign" binding="same"><string>Ubuntu</string></edit><br />
</match><br />
...<br />
An alternate approach is to set the "preferred" font, but ''this only works if the original font is not on the system'', in which case the one specified will be substituted:<br />
...<br />
< !-- Replace Helvetica with Bitstream Vera Sans Mono --><br />
< !-- Note, an alias for Helvetica should already exist in default conf files --><br />
<alias><br />
<family>Helvetica</family><br />
<prefer><family>Bitstream Vera Sans Mono</family></prefer><br />
<default><family>fixed</family></default><br />
</alias><br />
...<br />
<br />
===Disable bitmap fonts===<br />
<br />
To disable bitmap fonts in fontconfig, use {{ic|70-no-bitmaps.conf}} (which is not placed by fontconfig by default):<br />
<br />
# cd /etc/fonts/conf.d<br />
# rm 70-yes-bitmaps.conf<br />
# ln -s ../conf.avail/70-no-bitmaps.conf<br />
<br />
You may not need to remove {{ic|70-yes-bitmaps.conf}} if it does not exist. You can choose which fonts to replace bitmaps fonts with (Helvetica, Courier and Times bitmap mapts to TTF fonts) by:<br />
<br />
# cd /etc/fonts/conf.d<br />
# ln -s ../conf.avail/29-replace-bitmap-fonts.conf<br />
<br />
To disable embedded bitmap fonts for a specific font:<br />
<br />
<match target="font"><br />
<test qual="any" name="family"><br />
<string>Monaco</string><br />
</test><br />
<edit name="embeddedbitmap"><bool>false</bool></edit><br />
</match><br />
<br />
===Disable scaling of bitmap fonts===<br />
<br />
To disable scaling of bitmap fonts (which often makes them blurry), remove {{ic|/etc/fonts/conf.d/10-scale-bitmap-fonts.conf}}.<br />
<br />
===Create bold and italic styles for incomplete fonts===<br />
<br />
Freetype has the ability to automatically create ''italic'' and '''bold''' styles for fonts that do not have them, but only if explicitly required by the application. Given programs rarely send these requests, this section covers manually forcing generation of missing styles.<br />
<br />
Start by editing {{ic|/usr/share/fonts/fonts.cache-1}} as explained below. Store a copy of the modifications on another file, because a font update with {{ic|fc-cache}} will overwrite {{ic|/usr/share/fonts/fonts.cache-1}}.<br />
<br />
Assuming the Dupree font is installed:<br />
"dupree.ttf" 0 "Dupree:style=Regular:slant=0:weight=80:width=100:foundry=unknown:index=0:outline=True:''etc...''<br />
<br />
Duplicate the line, change {{ic|<nowiki>style=Regular</nowiki>}} to {{ic|<nowiki>style=Bold</nowiki>}} or any other style. Also change {{ic|<nowiki>slant=0</nowiki>}} to {{ic|<nowiki>slant=100</nowiki>}} for italic, {{ic|<nowiki>weight=80</nowiki>}} to {{ic|<nowiki>weight=200</nowiki>}} for bold, or combine them for '''''bold italic''''':<br />
"dupree.ttf" 0 "Dupree:style=Bold Italic:slant=100:weight=200:width=100:foundry=unknown:index=0:outline=True:''etc...''<br />
<br />
Now add necessary modifications to {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}:<br />
{{bc|<nowiki><br />
...<br />
<match target="font"><br />
<test name="family" qual="any"><br />
<string>Dupree</string><br />
&lt;!-- other fonts here .... --&gt;<br />
</test><br />
<test name="weight" compare="more_eq"><int>140</int></test><br />
<edit name="embolden" mode="assign"><bool>true</bool></edit><br />
</match><br />
<br />
<match target="font"><br />
<test name="family" qual="any"><br />
<string>Dupree</string><br />
&lt;!-- other fonts here .... --&gt;<br />
</test><br />
<test name="slant" compare="more_eq"><int>80</int></test><br />
<edit name="matrix" mode="assign"><br />
<times><br />
<name>matrix</name><br />
<matrix><br />
<double>1</double><double>0.2</double><br />
<double>0</double><double>1</double><br />
</matrix><br />
</times><br />
</edit><br />
</match><br />
...<br />
</nowiki>}}<br />
{{Tip| Use the value 'embolden' for existing bold fonts in order to make them even bolder.}}<br />
<br />
===Change rule overriding===<br />
<br />
Fontconfig processes files in {{ic|/etc/fonts/conf.d}} in numerical order. This enables rules or files to override one another, but often confuses users about what file gets parsed last.<br />
<br />
To guarantee that personal settings take precedence over any other rules, change their ordering:<br />
# cd /etc/fonts/conf.d<br />
# mv 50-user.conf 99-user.conf<br />
<br />
This change seems however to be unnecessary for the most of the cases, because a user is given enough control by default to set up own font preferences, hinting and antialiasing properties, alias new fonts to generic font families, etc.<br />
<br />
===Example fontconfig configurations===<br />
<br />
Example fontconfig configurations can be found on this [[Font_Configuration/fontconfig_Examples|page]].<br />
<br />
A simple starting point:<br />
<br />
{{hc|/etc/fonts/local.conf|<nowiki><br />
<?xml version='1.0'?><br />
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'><br />
<fontconfig><br />
<match target="font"><br />
<br />
<edit mode="assign" name="rgba"><br />
<const>rgb</const><br />
</edit><br />
<br />
<edit mode="assign" name="hinting"><br />
<bool>true</bool><br />
</edit><br />
<br />
<edit mode="assign" name="hintstyle"><br />
<const>hintfull</const><br />
</edit><br />
<br />
<edit mode="assign" name="antialias"><br />
<bool>true</bool><br />
</edit><br />
<br />
<edit mode="assign" name="lcdfilter"><br />
<const>lcddefault</const><br />
</edit><br />
<br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
==Patched packages==<br />
<br />
These patched packages are available in the [[Arch User Repository|AUR]]. A few considerations:<br />
<br />
* Configuration is usually necessary.<br />
* The new font rendering will not kick in until applications restart.<br />
* Applications which [[Wikipedia:Static library|statically link]] to a library will not be affected by patches applied to the system library.<br />
<br />
===Infinality: the generic way===<br />
<br />
The infinality patchset aims to greatly improve freetype2 font rendering. It adds multiple new capabilities.<br />
<br />
*[http://www.infinality.net/blog/infinality-freetype-patches/ Home page].<br />
*[http://www.infinality.net/forum/ Forum].<br />
<br />
Infinality's settings are all configurable at runtime via environment variables in {{ic|/etc/profile.d/infinality-settings.sh}}, and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, producing a much nicer result on fonts without bold versions. Works on native TT hinter and autohinter.<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font, but is 100% patent-free (as far as I know).<br />
*'''Customized FIR Filter''': Select your own [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time. Works on native TT hinter and autohinter.<br />
*'''Stem Alignment''': Aligns bitmap glyphs to optimized pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size. Works on native TT hinter and autohinter.<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible. Works on autohinter.<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting. If you use the local.conf I provide (included in infinality-settings fedora package) you will notice nice improvements on @font-face fonts.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/profile.d/infinality-settings.sh}}.<br />
<br />
{{Note|1=The user bohoomil maintains a very good configuration in his [https://github.com/bohoomil/fontconf github repo] which is available as a [https://aur.archlinux.org/packages/fontconfig-infinality-ultimate/ package] in the AUR.}}<br />
<br />
{{Note|1=Install {{AUR|grip-git}} from AUR to have a realtime preview.}}<br />
<br />
{{AUR|freetype2-infinality}} can be installed from the [[Arch User Repository|AUR]]. Additionally, if you are using {{pkg|lib32-freetype2}} from [multilib], replace it with {{AUR|lib32-freetype2-infinality}} from the AUR. The AUR also contains a Git version of freetype2 that builds the latest development snapshot of freetype2 with the Infinality patchset: {{AUR|freetype2-git-infinality}}, {{AUR|lib32-freetype2-git-infinality}}.<br />
<br />
It is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself. After doing so, you can select the font style (win7, winxp, osx, linux, ...) with:<br />
# infctl setstyle<br />
<br />
If you set e.g. win7 or osx you need the corresponding fonts installed.<br />
<br />
{{Note|Default infinality settings can cause some programs to display fonts at 72 DPI instead of 96. If you notice a problem open /etc/fonts/infinality/infinality.conf search for the section on DPI and change 72 to 96. This problem can specifically affect conky causing the fonts to appear smaller than they should. Thus not aligning properly with images. }}<br />
<br />
{{Note|''The README for {{AUR|fontconfig-infinality}} says that /etc/fonts/local.conf should either not exist, or have no infinality-related configurations in it. The local.conf is now obsolete and completely replaced by this configuration.''}}<br />
<br />
for more information see this article: http://www.infinality.net/forum/viewtopic.php?f=2&t=77<br />
<br />
*[http://www.infinality.net/blog/infinality-freetype-patches/ Home page].<br />
<br />
===Infinality: the easy way===<br />
<br />
bohoomil also maintains '''infinality-bundle''' repository, offering three basic libraries (freetype2-infinality-ultimate, fontconfig-infinality-ultimate & cairo-infinality-ultimate) as pre-patched, pre-configured and pre-built binaries for all architectures (i686, x86_64, multilib). Using infinality-bundle makes the whole installation & configuration process dramatically simplified: all one has to do is install the three packages with<br />
<br />
{{bc|# pacman -S foo-infinality-ultimate}}<br />
<br />
which will replace the corresponding, generic Arch libraries (i.e. freetype2-infinality-ultimate will be used instead of freetype2, fontconfig-infinality-ultimate instead of fontconfig and fontconfig-infinality-ultimate from the AUR, and cairo-infinality-ultimate instead of the regular cairo). The libraries are fully compatible with the Arch packages and are meant to be used as drop-in replacements for them. No post installation/upgrade steps are required for most use scenarios: everything should work out of the box.<br />
<br />
To use the repository, add <br />
<br />
{{bc|1=[infinality-bundle]<br />
SigLevel = Never<br />
Server = http://bohoomil.cu.cc/infinality-bundle/$arch}}<br />
<br />
to your /etc/pacman.conf and issue<br />
<br />
{{bc|# pacman -Syy}}<br />
<br />
If you want to have access to multilib versions, add the following, too:<br />
<br />
{{bc|1=[infinality-bundle-multilib]<br />
SigLevel = Never<br />
Server = http://bohoomil.cu.cc/infinality-bundle-multilib/$arch}}<br />
<br />
In case of server down times, there is always a backup copy of the repository available via [https://www.dropbox.com/sh/ugmxbui00chidox/njDKnTG49W Dropbox].<br />
<br />
When installing some packages (like [https://www.archlinux.org/packages/?sort=&q=libgdiplus&maintainer=&flagged= libgdiplus]), you may encounter an error:<br />
<br />
{{bc|:: cairo and cairo-infinality-ultimate are in conflict. Remove cairo-infinality-ultimate? [y/N] n<br />
error: unresolvable package conflicts detected<br />
error: failed to prepare transaction (conflicting dependencies)}}<br />
<br />
If this happens, install the new package with {{bc|# pacman -Sd foo}} instead.<br />
<br />
For more information, see [http://bohoomil.github.io/ib.html infinality-bundle user notes].<br />
<br />
A support thread in the Forums is available [https://bbs.archlinux.org/viewtopic.php?id=162098 here].<br />
<br />
===Ubuntu===<br />
<br />
Ubuntu adds extra configurations, and occasionally patches to the font rendering libraries.<br />
<br />
Install the patched packages from the [[Arch User Repository|AUR]], the package names are: {{AUR|freetype2-ubuntu}} {{AUR|fontconfig-ubuntu}} {{AUR|cairo-ubuntu}}.<br />
<br />
The global configuration will need to be added. See [[#Example fontconfig configurations]] for a starting point.<br />
<br />
===Reverting to unpatched packages===<br />
<br />
To restore the unpatched packages, reinstall the originals:<br />
<br />
# pacman -S --asdeps freetype2 cairo fontconfig<br />
<br />
==Applications without fontconfig support==<br />
<br />
Some applications like [[URxvt]] will ignore fontconfig settings. This is very apparent when using the infinality patches which are heavily reliant on proper configuration. You can work around this by using {{ic|~/.Xresources}}, but it is not nearly as flexible as fontconfig. Example (see [[#Fontconfig configuration]] for explanations of the options):<br />
<br />
{{hc|~/.Xresources|<nowiki><br />
Xft.autohint: 0<br />
Xft.lcdfilter: lcddefault<br />
Xft.hintstyle: hintfull<br />
Xft.hinting: 1<br />
Xft.antialias: 1<br />
Xft.rgba: rgb<br />
</nowiki>}}<br />
<br />
Make sure the settings are loaded properly when X starts with {{ic|xrdb -q}} (see [[Xresources]] for more information).<br />
<br />
==Troubleshooting==<br />
<br />
=== Distorted fonts ===<br />
<br />
{{Note|96 DPI is not a standard. You should use your monitor's actual DPI to get proper font rendering, especially when using subpixel rendering.}}<br />
<br />
If fonts are still unexpectedly large or small, poorly proportioned or simply rendering poorly, fontconfig may be using the incorrect DPI.<br />
<br />
Fontconfig should be able to detect DPI parameters as discovered by the Xorg server. You can check the automatically discovered DPI with {{ic|xdpyinfo}} (provided by the {{pkg|xorg-xdpyinfo}} package):<br />
<br />
{{hc|<nowiki>$ xdpyinfo | grep dots</nowiki>| resolution: 102x102 dots per inch}}<br />
<br />
If the DPI is detected incorrectly (usually due to an incorrect monitor EDID), you can specify it manually in the Xorg configuration, see [[Xorg#Display Size and DPI]]. This is the recommended solution, but it may not work with buggy drivers.<br />
<br />
Fontconfig will default to the Xft.dpi variable if it is set. Xft.dpi is usually set by desktop environments (usually to Xorg's DPI setting) or manually in {{ic|~/.Xdefaults}} or {{ic|~/.Xresources}}. Use xrdb to query for the value:<br />
<br />
{{hc|<nowiki>$ xrdb -query | grep dpi</nowiki>|Xft.dpi: 102}}<br />
<br />
Those still having problems can fall back to manually setting the DPI used by fontconfig:<br />
<br />
...<br />
<!-- Setup for DPI=96 --><br />
<match target="pattern"><br />
<edit name="dpi" mode="assign"><double>102</double></edit><br />
</match><br />
...<br />
<br />
===Older GTK and QT applications===<br />
<br />
Modern GTK apps enable Xft by default but this was not the case before version 2.2. If it is not possible to update these applications, force Xft for old [[GNOME]] applications by adding to {{ic|~/.bashrc}}:<br />
<br />
export GDK_USE_XFT=1<br />
<br />
For older QT applications:<br />
<br />
export QT_XFT=true<br />
<br />
===Applications overriding hinting===<br />
Some applications may override default fontconfig hinting and anti-aliasing settings. This may happen with [[Gnome]] 3, for example. Use the specific configuration program for the application in such cases. For gnome, try {{pkg|gnome-tweak-tool}}.<br />
<br />
==See also==<br />
*[http://www.x.org/X11R6.8.2/doc/fonts.html Fonts in X11R6.8.2] - Official Xorg font information<br />
*[http://freetype.sourceforge.net/freetype2/ FreeType 2 Overview]<br />
*[https://forums.gentoo.org/viewtopic-t-723341.html Gentoo font-rendering thread]</div>Hjr265https://wiki.archlinux.org/index.php?title=GNOME/Keyring&diff=252704GNOME/Keyring2013-04-02T14:30:52Z<p>Hjr265: /* Manage using GUI */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
From [https://live.gnome.org/GnomeKeyring/ GnomeKeyring]:<br />
:''GNOME Keyring is a collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications.''<br />
{{Note| 1=Gnome Keyring does not support ECDSA keys. See [https://bugzilla.gnome.org/show_bug.cgi?id=641082 Bug 641082].}}<br />
== Manage using GUI ==<br />
# pacman -S seahorse<br />
It is possible to leave the GNOME keyring password blank or change it. In seahorse, in the "View" dropdown, select "By Keyring". On the Passwords tab, right click on "Passwords: login" and pick "Change password." Enter the old password and leave empty the new password. You will be warned about using unencrypted storage; continue by pushing "Use Unsafe Storage."<br />
<br />
== Use Without GNOME ==<br />
It is possible to use GNOME Keyring without the rest of the GNOME desktop. To do this, add the following to your {{ic|~/.xinitrc}} file:<br />
# Start a D-Bus session<br />
source /etc/X11/xinit/xinitrc.d/30-dbus<br />
# Start GNOME Keyring<br />
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)<br />
# You probably need to do this too:<br />
export SSH_AUTH_SOCK<br />
export GPG_AGENT_INFO<br />
export GNOME_KEYRING_CONTROL<br />
export GNOME_KEYRING_PID<br />
See {{bug|13986}} for more info.<br />
<br />
If you experience problems retrieving information from the keyring, make sure that the variables "DBUS_SESSION_BUS_ADDRESS" and "DBUS_SESSION_BUS_PID" are exported in the target environment.<br />
<br />
Instructions on how to use GNOME Keyring in Xfce are in the [[Xfce#SSH_Agents|SSH Agents section]] on that page.<br />
<br />
== SSH Keys ==<br />
To add your SSH key:<br />
<br />
$ ssh-add ~/.ssh/id_dsa<br />
Enter passphrase for /home/mith/.ssh/id_dsa:<br />
<br />
To list automatically loaded keys:<br />
<br />
$ ssh-add -L<br />
<br />
To disable all keys;<br />
<br />
$ ssh-add -D<br />
<br />
Now when you connect to a server, the key will be found and a dialog will popup asking you for the passphrase. It has an option to automatically unlock the key when you login. If you check this you will not need to enter your passphrase again!<br />
<br />
== Integration with applications ==<br />
<br />
* [[Firefox#GNOME_integration]]<br />
<br />
== Gnome Keyring dialog and SSH ==<br />
<br />
Run in a terminal, the following:<br />
<br />
$ gnome-keyring-daemon -s<br />
<br />
Output will get a few lines, but in reality we are interested, {{ic|SSH_AUTH_SOCK}}, example:<br />
<br />
GNOME_KEYRING_C.................<br />
SSH_AUTH_SOCK=/run/user/1000/keyring-XXXXXX/ssh<br />
GPG_AGENT_INF...................<br />
<br />
Now you should add to your {{ic|~/.bashrc}}, according to the output of the previous command, for example:<br />
<br />
SSH_AUTH_SOCK=`ss -xl | grep -o '/run/user/1000/keyring-.*/ssh$'`<br />
[ -z "$SSH_AUTH_SOCK" ] || export SSH_AUTH_SOCK<br />
<br />
If you run on your terminal the following:<br />
<br />
$ echo $SSH_AUTH_SOCK<br />
<br />
will return something like the following:<br />
<br />
/run/user/1000/keyring--XXXXXX/ssh<br />
<br />
Now when you connect with ssh, gnome-keyring dialog will launch the "entry of the passphrase"<br />
<br />
== Unlock at Startup ==<br />
GNOME's login manager ({{pkg|gdm}}) will automatically unlock the keyring once you log in; for others it is not so easy.<br />
<br />
For SLiM, see [[SLiM#SLiM_and_Gnome_Keyring]], This method works for KDM as well, but you need to edit {{ic|/etc/pam.d/kde}} instead of {{ic|/etc/pam.d/slim}}.<br />
<br />
If you are using automatic login, then you can disable the keyring manager by setting a blank password on the login keyring. '''Note''': your passwords will be stored unencrypted if you do this.<br />
<br />
If you use console based login, automatic unlocking of the keyring can be achieved by the following changes in {{ic|/etc/pam.d/login}}:<br />
Add {{ic|auth optional pam_gnome_keyring.so}} at the end of the {{ic|auth}} section and {{ic|session optional pam_gnome_keyring.so auto_start}} at the end of the {{ic|session}} section. The result should look look similar to this:<br />
#%PAM-1.0<br />
<br />
auth required pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth include system-local-login<br />
auth optional pam_gnome_keyring.so<br />
account include system-local-login<br />
session include system-local-login<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
Next, add {{ic|password optional pam_gnome_keyring.so}} to the end of {{ic|/etc/pam.d/passwd}}. The file should look somewhat like this:<br />
#%PAM-1.0<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
<br />
{{Note|To use automatic unlocking, the same password for the user account and the keyring have to be set.}}<br />
<br />
== Useful Tools ==<br />
=== gnome-keyring-query ===<br />
{{AUR|gnome-keyring-query}} from the AUR provides a simple command-line tool for querying passwords from the password store of the GNOME Keyring.</div>Hjr265https://wiki.archlinux.org/index.php?title=GNOME/Keyring&diff=252703GNOME/Keyring2013-04-02T14:30:25Z<p>Hjr265: /* Manage using GUI */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
From [https://live.gnome.org/GnomeKeyring/ GnomeKeyring]:<br />
:''GNOME Keyring is a collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications.''<br />
{{Note| 1=Gnome Keyring does not support ECDSA keys. See [https://bugzilla.gnome.org/show_bug.cgi?id=641082 Bug 641082].}}<br />
== Manage using GUI ==<br />
pacman -S seahorse<br />
It is possible to leave the GNOME keyring password blank or change it. In seahorse, in the "View" dropdown, select "By Keyring". On the Passwords tab, right click on "Passwords: login" and pick "Change password." Enter the old password and leave empty the new password. You will be warned about using unencrypted storage; continue by pushing "Use Unsafe Storage."<br />
<br />
== Use Without GNOME ==<br />
It is possible to use GNOME Keyring without the rest of the GNOME desktop. To do this, add the following to your {{ic|~/.xinitrc}} file:<br />
# Start a D-Bus session<br />
source /etc/X11/xinit/xinitrc.d/30-dbus<br />
# Start GNOME Keyring<br />
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)<br />
# You probably need to do this too:<br />
export SSH_AUTH_SOCK<br />
export GPG_AGENT_INFO<br />
export GNOME_KEYRING_CONTROL<br />
export GNOME_KEYRING_PID<br />
See {{bug|13986}} for more info.<br />
<br />
If you experience problems retrieving information from the keyring, make sure that the variables "DBUS_SESSION_BUS_ADDRESS" and "DBUS_SESSION_BUS_PID" are exported in the target environment.<br />
<br />
Instructions on how to use GNOME Keyring in Xfce are in the [[Xfce#SSH_Agents|SSH Agents section]] on that page.<br />
<br />
== SSH Keys ==<br />
To add your SSH key:<br />
<br />
$ ssh-add ~/.ssh/id_dsa<br />
Enter passphrase for /home/mith/.ssh/id_dsa:<br />
<br />
To list automatically loaded keys:<br />
<br />
$ ssh-add -L<br />
<br />
To disable all keys;<br />
<br />
$ ssh-add -D<br />
<br />
Now when you connect to a server, the key will be found and a dialog will popup asking you for the passphrase. It has an option to automatically unlock the key when you login. If you check this you will not need to enter your passphrase again!<br />
<br />
== Integration with applications ==<br />
<br />
* [[Firefox#GNOME_integration]]<br />
<br />
== Gnome Keyring dialog and SSH ==<br />
<br />
Run in a terminal, the following:<br />
<br />
$ gnome-keyring-daemon -s<br />
<br />
Output will get a few lines, but in reality we are interested, {{ic|SSH_AUTH_SOCK}}, example:<br />
<br />
GNOME_KEYRING_C.................<br />
SSH_AUTH_SOCK=/run/user/1000/keyring-XXXXXX/ssh<br />
GPG_AGENT_INF...................<br />
<br />
Now you should add to your {{ic|~/.bashrc}}, according to the output of the previous command, for example:<br />
<br />
SSH_AUTH_SOCK=`ss -xl | grep -o '/run/user/1000/keyring-.*/ssh$'`<br />
[ -z "$SSH_AUTH_SOCK" ] || export SSH_AUTH_SOCK<br />
<br />
If you run on your terminal the following:<br />
<br />
$ echo $SSH_AUTH_SOCK<br />
<br />
will return something like the following:<br />
<br />
/run/user/1000/keyring--XXXXXX/ssh<br />
<br />
Now when you connect with ssh, gnome-keyring dialog will launch the "entry of the passphrase"<br />
<br />
== Unlock at Startup ==<br />
GNOME's login manager ({{pkg|gdm}}) will automatically unlock the keyring once you log in; for others it is not so easy.<br />
<br />
For SLiM, see [[SLiM#SLiM_and_Gnome_Keyring]], This method works for KDM as well, but you need to edit {{ic|/etc/pam.d/kde}} instead of {{ic|/etc/pam.d/slim}}.<br />
<br />
If you are using automatic login, then you can disable the keyring manager by setting a blank password on the login keyring. '''Note''': your passwords will be stored unencrypted if you do this.<br />
<br />
If you use console based login, automatic unlocking of the keyring can be achieved by the following changes in {{ic|/etc/pam.d/login}}:<br />
Add {{ic|auth optional pam_gnome_keyring.so}} at the end of the {{ic|auth}} section and {{ic|session optional pam_gnome_keyring.so auto_start}} at the end of the {{ic|session}} section. The result should look look similar to this:<br />
#%PAM-1.0<br />
<br />
auth required pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth include system-local-login<br />
auth optional pam_gnome_keyring.so<br />
account include system-local-login<br />
session include system-local-login<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
Next, add {{ic|password optional pam_gnome_keyring.so}} to the end of {{ic|/etc/pam.d/passwd}}. The file should look somewhat like this:<br />
#%PAM-1.0<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
<br />
{{Note|To use automatic unlocking, the same password for the user account and the keyring have to be set.}}<br />
<br />
== Useful Tools ==<br />
=== gnome-keyring-query ===<br />
{{AUR|gnome-keyring-query}} from the AUR provides a simple command-line tool for querying passwords from the password store of the GNOME Keyring.</div>Hjr265https://wiki.archlinux.org/index.php?title=GNOME/Keyring&diff=252702GNOME/Keyring2013-04-02T14:30:02Z<p>Hjr265: /* Manage using GUI */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
From [https://live.gnome.org/GnomeKeyring/ GnomeKeyring]:<br />
:''GNOME Keyring is a collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications.''<br />
{{Note| 1=Gnome Keyring does not support ECDSA keys. See [https://bugzilla.gnome.org/show_bug.cgi?id=641082 Bug 641082].}}<br />
== Manage using GUI ==<br />
pacman -S seahorse<br />
It is possible to leave the GNOME keyring password blank or change it. In seahorse, in the "View" dropdown, select "By Keyring". On the Passwords tab, right click on "Passwords: login" and pick "Change password." Enter the old password and leave empty the new password. You will be warned about using unencrypted storage; continue by pushing "Use Unsafe Storage."<br />
<br />
== Use Without GNOME ==<br />
It is possible to use GNOME Keyring without the rest of the GNOME desktop. To do this, add the following to your {{ic|~/.xinitrc}} file:<br />
# Start a D-Bus session<br />
source /etc/X11/xinit/xinitrc.d/30-dbus<br />
# Start GNOME Keyring<br />
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)<br />
# You probably need to do this too:<br />
export SSH_AUTH_SOCK<br />
export GPG_AGENT_INFO<br />
export GNOME_KEYRING_CONTROL<br />
export GNOME_KEYRING_PID<br />
See {{bug|13986}} for more info.<br />
<br />
If you experience problems retrieving information from the keyring, make sure that the variables "DBUS_SESSION_BUS_ADDRESS" and "DBUS_SESSION_BUS_PID" are exported in the target environment.<br />
<br />
Instructions on how to use GNOME Keyring in Xfce are in the [[Xfce#SSH_Agents|SSH Agents section]] on that page.<br />
<br />
== SSH Keys ==<br />
To add your SSH key:<br />
<br />
$ ssh-add ~/.ssh/id_dsa<br />
Enter passphrase for /home/mith/.ssh/id_dsa:<br />
<br />
To list automatically loaded keys:<br />
<br />
$ ssh-add -L<br />
<br />
To disable all keys;<br />
<br />
$ ssh-add -D<br />
<br />
Now when you connect to a server, the key will be found and a dialog will popup asking you for the passphrase. It has an option to automatically unlock the key when you login. If you check this you will not need to enter your passphrase again!<br />
<br />
== Integration with applications ==<br />
<br />
* [[Firefox#GNOME_integration]]<br />
<br />
== Gnome Keyring dialog and SSH ==<br />
<br />
Run in a terminal, the following:<br />
<br />
$ gnome-keyring-daemon -s<br />
<br />
Output will get a few lines, but in reality we are interested, {{ic|SSH_AUTH_SOCK}}, example:<br />
<br />
GNOME_KEYRING_C.................<br />
SSH_AUTH_SOCK=/run/user/1000/keyring-XXXXXX/ssh<br />
GPG_AGENT_INF...................<br />
<br />
Now you should add to your {{ic|~/.bashrc}}, according to the output of the previous command, for example:<br />
<br />
SSH_AUTH_SOCK=`ss -xl | grep -o '/run/user/1000/keyring-.*/ssh$'`<br />
[ -z "$SSH_AUTH_SOCK" ] || export SSH_AUTH_SOCK<br />
<br />
If you run on your terminal the following:<br />
<br />
$ echo $SSH_AUTH_SOCK<br />
<br />
will return something like the following:<br />
<br />
/run/user/1000/keyring--XXXXXX/ssh<br />
<br />
Now when you connect with ssh, gnome-keyring dialog will launch the "entry of the passphrase"<br />
<br />
== Unlock at Startup ==<br />
GNOME's login manager ({{pkg|gdm}}) will automatically unlock the keyring once you log in; for others it is not so easy.<br />
<br />
For SLiM, see [[SLiM#SLiM_and_Gnome_Keyring]], This method works for KDM as well, but you need to edit {{ic|/etc/pam.d/kde}} instead of {{ic|/etc/pam.d/slim}}.<br />
<br />
If you are using automatic login, then you can disable the keyring manager by setting a blank password on the login keyring. '''Note''': your passwords will be stored unencrypted if you do this.<br />
<br />
If you use console based login, automatic unlocking of the keyring can be achieved by the following changes in {{ic|/etc/pam.d/login}}:<br />
Add {{ic|auth optional pam_gnome_keyring.so}} at the end of the {{ic|auth}} section and {{ic|session optional pam_gnome_keyring.so auto_start}} at the end of the {{ic|session}} section. The result should look look similar to this:<br />
#%PAM-1.0<br />
<br />
auth required pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth include system-local-login<br />
auth optional pam_gnome_keyring.so<br />
account include system-local-login<br />
session include system-local-login<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
Next, add {{ic|password optional pam_gnome_keyring.so}} to the end of {{ic|/etc/pam.d/passwd}}. The file should look somewhat like this:<br />
#%PAM-1.0<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
<br />
{{Note|To use automatic unlocking, the same password for the user account and the keyring have to be set.}}<br />
<br />
== Useful Tools ==<br />
=== gnome-keyring-query ===<br />
{{AUR|gnome-keyring-query}} from the AUR provides a simple command-line tool for querying passwords from the password store of the GNOME Keyring.</div>Hjr265https://wiki.archlinux.org/index.php?title=GNOME/Keyring&diff=252701GNOME/Keyring2013-04-02T14:29:35Z<p>Hjr265: /* Manage using GUI */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
From [https://live.gnome.org/GnomeKeyring/ GnomeKeyring]:<br />
:''GNOME Keyring is a collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications.''<br />
{{Note| 1=Gnome Keyring does not support ECDSA keys. See [https://bugzilla.gnome.org/show_bug.cgi?id=641082 Bug 641082].}}<br />
== Manage using GUI ==<br />
# pacman -S seahorse<br />
It is possible to leave the GNOME keyring password blank or change it. In seahorse, in the "View" dropdown, select "By Keyring". On the Passwords tab, right click on "Passwords: login" and pick "Change password." Enter the old password and leave empty the new password. You will be warned about using unencrypted storage; continue by pushing "Use Unsafe Storage."<br />
<br />
== Use Without GNOME ==<br />
It is possible to use GNOME Keyring without the rest of the GNOME desktop. To do this, add the following to your {{ic|~/.xinitrc}} file:<br />
# Start a D-Bus session<br />
source /etc/X11/xinit/xinitrc.d/30-dbus<br />
# Start GNOME Keyring<br />
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)<br />
# You probably need to do this too:<br />
export SSH_AUTH_SOCK<br />
export GPG_AGENT_INFO<br />
export GNOME_KEYRING_CONTROL<br />
export GNOME_KEYRING_PID<br />
See {{bug|13986}} for more info.<br />
<br />
If you experience problems retrieving information from the keyring, make sure that the variables "DBUS_SESSION_BUS_ADDRESS" and "DBUS_SESSION_BUS_PID" are exported in the target environment.<br />
<br />
Instructions on how to use GNOME Keyring in Xfce are in the [[Xfce#SSH_Agents|SSH Agents section]] on that page.<br />
<br />
== SSH Keys ==<br />
To add your SSH key:<br />
<br />
$ ssh-add ~/.ssh/id_dsa<br />
Enter passphrase for /home/mith/.ssh/id_dsa:<br />
<br />
To list automatically loaded keys:<br />
<br />
$ ssh-add -L<br />
<br />
To disable all keys;<br />
<br />
$ ssh-add -D<br />
<br />
Now when you connect to a server, the key will be found and a dialog will popup asking you for the passphrase. It has an option to automatically unlock the key when you login. If you check this you will not need to enter your passphrase again!<br />
<br />
== Integration with applications ==<br />
<br />
* [[Firefox#GNOME_integration]]<br />
<br />
== Gnome Keyring dialog and SSH ==<br />
<br />
Run in a terminal, the following:<br />
<br />
$ gnome-keyring-daemon -s<br />
<br />
Output will get a few lines, but in reality we are interested, {{ic|SSH_AUTH_SOCK}}, example:<br />
<br />
GNOME_KEYRING_C.................<br />
SSH_AUTH_SOCK=/run/user/1000/keyring-XXXXXX/ssh<br />
GPG_AGENT_INF...................<br />
<br />
Now you should add to your {{ic|~/.bashrc}}, according to the output of the previous command, for example:<br />
<br />
SSH_AUTH_SOCK=`ss -xl | grep -o '/run/user/1000/keyring-.*/ssh$'`<br />
[ -z "$SSH_AUTH_SOCK" ] || export SSH_AUTH_SOCK<br />
<br />
If you run on your terminal the following:<br />
<br />
$ echo $SSH_AUTH_SOCK<br />
<br />
will return something like the following:<br />
<br />
/run/user/1000/keyring--XXXXXX/ssh<br />
<br />
Now when you connect with ssh, gnome-keyring dialog will launch the "entry of the passphrase"<br />
<br />
== Unlock at Startup ==<br />
GNOME's login manager ({{pkg|gdm}}) will automatically unlock the keyring once you log in; for others it is not so easy.<br />
<br />
For SLiM, see [[SLiM#SLiM_and_Gnome_Keyring]], This method works for KDM as well, but you need to edit {{ic|/etc/pam.d/kde}} instead of {{ic|/etc/pam.d/slim}}.<br />
<br />
If you are using automatic login, then you can disable the keyring manager by setting a blank password on the login keyring. '''Note''': your passwords will be stored unencrypted if you do this.<br />
<br />
If you use console based login, automatic unlocking of the keyring can be achieved by the following changes in {{ic|/etc/pam.d/login}}:<br />
Add {{ic|auth optional pam_gnome_keyring.so}} at the end of the {{ic|auth}} section and {{ic|session optional pam_gnome_keyring.so auto_start}} at the end of the {{ic|session}} section. The result should look look similar to this:<br />
#%PAM-1.0<br />
<br />
auth required pam_securetty.so<br />
auth requisite pam_nologin.so<br />
auth include system-local-login<br />
auth optional pam_gnome_keyring.so<br />
account include system-local-login<br />
session include system-local-login<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
Next, add {{ic|password optional pam_gnome_keyring.so}} to the end of {{ic|/etc/pam.d/passwd}}. The file should look somewhat like this:<br />
#%PAM-1.0<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
<br />
{{Note|To use automatic unlocking, the same password for the user account and the keyring have to be set.}}<br />
<br />
== Useful Tools ==<br />
=== gnome-keyring-query ===<br />
{{AUR|gnome-keyring-query}} from the AUR provides a simple command-line tool for querying passwords from the password store of the GNOME Keyring.</div>Hjr265