https://wiki.archlinux.org/api.php?action=feedcontributions&user=Macieks&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:48:46ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Running_GUI_applications_as_root&diff=185191Talk:Running GUI applications as root2012-02-18T12:20:40Z<p>Macieks: Another solution</p>
<hr />
<div>What about /etc/X0.hosts file ?<br />
It's descibed in Xserver manual, in section "GRANTING ACCESS".<br />
<br />
----<br />
<br />
Using xhost+ is insecure:<br />
http://www.ocf.berkeley.edu/help/X_Windows_Env_HTML/security.html<br />
Maybe adding:<br />
<br />
HOST=`hostname`<br />
XAUTH=`ps -C X f|sed -n 's/.*-auth *//p'`<br />
XKEY=`xauth -f ${XAUTH} list | awk '{print $3}'`<br />
<br />
xauth add ${HOST}/unix:0 MIT-MAGIC-COOKIE-1 ${XKEY}<br />
xauth add ${HOST}:0 MIT-MAGIC-COOKIE-1 ${XKEY}<br />
<br />
unset HOST<br />
unset XAUTH<br />
unset XKEY<br />
<br />
to /root/.bashrc is a better solution ?<br />
<br />
----<br />
<br />
<br />
OK ... one more solution:<br />
<br />
# xhost +SI:localuser:root<br />
localuser:root being added to access control list<br />
<br />
or saving it in a config file:<br />
# cat /etc/X0.hosts <br />
si:localuser:root</div>Maciekshttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=117520NVIDIA2010-09-16T19:20:33Z<p>Macieks: Added tip for playing HD movies on cards with low RAM memory</p>
<hr />
<div>[[Category: Graphics (English)]]<br />
[[Category: X Server (English)]]<br />
[[Category: HOWTOs (English)]]<br />
{{i18n|NVIDIA}}<br />
[[de:Nvidia]]<br />
{{Article summary start}}<br />
{{Article summary text|Information on installing, configuring and troubleshooting the proprietary NVIDIA Drivers.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Intel}}<br />
{{Article summary wiki|Nouveau}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]].<br />
<br />
==Installing==<br />
These instructions are for those using the stock kernel26 package. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
{{Tip|It is usually beneficial to install the NVIDIA driver through pacman rather than through the package provided by the NVIDIA site, this allows the driver to be updated when upgrading the system.}}<br />
<br />
1. Visit NVIDIA's [http://www.nvidia.com/Download/index.aspx?lang=en-us driver download site] to find out the appropiate driver for a given card.<br />
<br />
2. Install the driver for newer cards:<br />
# pacman -S nvidia nvidia-utils<br />
<br />
Whereas users with older cards should install:<br />
# pacman -S nvidia-96xx nvidia-96xx-utils<br />
<br />
or:<br />
# pacman -S nvidia-173xx nvidia-173xx-utils<br />
{{Note|Currently Nvidia-96xx driver does not support Xorg release 1.8. Please see the news post here: [http://www.archlinux.org/news/502/]. }}<br />
<br />
{{Note|For the latest card models, it may be required to install {{Package AUR|nvidia-beta}} and {{Package AUR|nvidia-utils-beta}} from the [[AUR]] since the stable drivers may not support the newly introduced features.}}<br />
{{Note|On 64 bit systems, For 32-bit programs to take advantage of nvidia-utils you must also install the equivalent lib32 package (for example lib32-nvidia-utils).}}<br />
<br />
Once the driver has been installed, continue to: [[#Configuring]].<br />
<br />
===Alternate install: custom kernel===<br />
First of all, it is of advantage to know how the ABS system works by reading some of the other articles about it:<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating Packages]]<br />
<br />
{{Note|There is the {{Package AUR|nvidia-all}} package on [[AUR]] which turns out to make it easier to install the nvidia driver for custom kernels and multiple kernels}}<br />
<br />
The following is a short tutorial for making a custom nvidia driver package using ABS:<br />
<br />
Install ABS and generate the tree:<br />
# pacman -S abs<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/devel/abs<br />
Make a copy of the nvidia package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/devel/abs/<br />
Go into the temporary nvidia build directory:<br />
$ cd ~/devel/abs/nvidia<br />
It is required to edit the files {{Filename|nvidia.install}} and {{Filename|PKGBUILD}} file so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropiate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the <code>KERNEL_VERSION="2.6.xx-ARCH"</code> variable with the custom kernel version, such as <code>KERNEL_VERSION="2.6.22.6"</code> or <code>KERNEL_VERSION"2.6.22.6-custom"</code> depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the <code>_kernver='2.6.xx-ARCH'</code> variable to match the appropiate version, as above.<br />
# If there are more than one kernels in the system installed in parallel, (such as a custom kernel alongside the default -ARCH kernel) change the <code>"pkgname=nvidia"</code> variable in the PKGBUILD to a unique identifier, such as nvidia-2622 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original.<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{Codeline|-c}} operand tells makepkg to clean left over files after building the nvidia driver, whereas {{Codeline|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==Configuring==<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running Xorg| a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a {{Filename|/etc/X11/xorg.conf}} configuration file in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a [[Xorg#Manual configuration|number of settings]] that can bypass Xorg's auto-discovered or pre-configured options.<br />
<br />
===Automatic configuration===<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{Filename|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{Filename|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
{{Warning| That may still not work properly with Xorg-server 1.8 }}<br />
<br />
===Automatic configuration with multiple monitors===<br />
The NVIDIA package provides Twinview. This tool will help by automatically configuring all the monitors connected to your video card. This only works for multiple monitors on a single card.<br />
To configure Xorg Server with Twinview run:<br />
nvidia-xconfig --twinview<br />
<br />
===Minimal configuration===<br />
To create a basic {{Filename|/etc/X11/xorg.conf}}, as root:<br />
touch /etc/X11/xorg.conf<br />
<br />
And add the driver:<br />
<pre><br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
EndSection<br />
</pre><br />
<br />
{{Tip|Make sure, in order to have full multimedia functionality, to have '''xorg-input-drivers''' installed.}}<br />
<br />
==Tweaking==<br />
<br />
===GUI: nvidia-settings===<br />
The NVIDIA package includes the {{Codeline|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
Or add it to the the desktop environment's auto-startup method.<br />
<br />
{{Tip | On rare occasions the {{Filename|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.}}<br />
<br />
===Advanced: xorg.conf===<br />
Edit {{Filename|/etc/X11/xorg.conf}}, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up {{Filename|xorg.conf}} before making any edits. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
* See [http://us.download.nvidia.com/XFree86/Linux-x86_64/256.53/README/index.html NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.]<br />
====Enabling desktop composition====<br />
As of NVIDIA driver version 180.44, support for GLX with the Damage and Composite X extensions is enabled by default. Refer to [[Composite]] for detailed instructions.<br />
<br />
====Disabling the logo on startup====<br />
Add the {{Codeline|"NoLogo"}} option under section {{Codeline|Device}}:<br />
Option "NoLogo" "True"<br />
<br />
====Enabling hardware acceleration====<br />
{{Note|RenderAccel is enabled by default since drivers version 97.46.xx}}<br />
Add the {{Codeline|"RenderAccel"}} option under section {{Codeline|Device}}:<br />
Option "RenderAccel" "True"<br />
<br />
====Overriding monitor detection====<br />
The {{Codeline|"ConnectedMonitor"}} option under section {{Codeline|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{Codeline|"CRT"}} for analog connections, {{Codeline|"DFP"}} for digital monitors and {{Codeline|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the disply is a flat panel. "DFP" is intended for DVI digital connections only.}}<br />
<br />
====Enabling triple buffering====<br />
Enable the use of triple buffering by adding the {{Codeline|"TripleBuffer"}} Option under section {{Codeline|Device}}:<br />
Option "TripleBuffer" "True"<br />
<br />
Use this option if the graphics card has plenty of ram (equal or greater than 128MB). The setting only takes effect when syncing to vblank is enabled, one of the options featured in nvidia-settings.<br />
<br />
{{Note|This option may introduce full-screen tearing}}<br />
<br />
====Enabling backing store====<br />
This option is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server, thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. BackingStore is not bound to NVIDIA drivers but to X server itself. ATI users would benefit from this option as well.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "BackingStore" "True"<br />
<br />
====Using OS-level events====<br />
Taken from the NVIDIA driver's [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt README] file: ''"[...] Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited."'' It may help improving performance, but it is currently incompatible with SLI and Multi-GPU modes.<br />
<br />
Add under section {{Codeline|Device}}:<br />
Option "DamageEvents" "True"<br />
{{Note|This option is enabled by default in newer driver versions.}}<br />
<br />
====Enabling power saving====<br />
Add under section <code>Monitor</code>:<br />
Option "DPMS" "True"<br />
<br />
====Forcing Powermizer performance level (for laptops)====<br />
Add under section {{Codeline|Device}}:<br />
# Force Powermizer to a certain level at all times<br />
# level 0x1=highest<br />
# level 0x2=med<br />
# level 0x3=lowest<br />
<br />
# AC settings:<br />
Option "RegistryDwords" "PowerMizerLevelAC=0x3"<br />
# Battery settings:<br />
Option "RegistryDwords" "PowerMizerLevel=0x3"<br />
Settings are better explained in [http://tutanhamon.com.ua/technovodstvo/NVIDIA-UNIX-driver/ NVIDIA Driver for X.org:Performance and Power Saving Hints].<br />
<br />
=====Letting the GPU set its own performance level based on temperature=====<br />
Add under section {{Codeline|Device}}:<br />
Option "RegistryDwords" "PerfLevelSrc=0x3333"<br />
<br />
====Disable vblank interrupts (for laptops)====<br />
When running the interrupt detection utility {{Codeline|powertop}}, it can be observed that the Nvidia driver will generate an interrupt for every vblank. To disable, place in the {{Codeline|Device}} section:<br />
Option "OnDemandVBlankInterrupts" "True"<br />
This will reduce interrupts to about one or two per second.<br />
<br />
====Enabling overclocking====<br />
To enable overclocking, place the following line in the {{Codeline|Device}} section:<br />
Option "Coolbits" "1"<br />
This will enable on the fly overclocking by running nvidia-settings inside X.<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
====Enable screen rotation through XRandR====<br />
Place the following line in the {{Codeline|Device}} section:<br />
Option "RandRRotation" "True"<br />
After restarting Xorg, type:<br />
xrandr -o left<br />
The Screen should be rotated. To restore, type:<br />
xrandr -o normal<br />
{{Note| Editing xorg.conf may be unnecessary since screen rotation should be enabled by default, ideally by using the respective DE tools, such as SystemSettings in KDE.}}<br />
<br />
==Tips and tricks==<br />
===Enabling Pure Video HD (VDPAU/VAAPI)===<br />
'''Hardware Required:''' <br />
<br />
At least a video card with second generation PureVideo HD [http://en.wikipedia.org/wiki/PureVideo_HD#Table_of_PureVideo_.28HD.29_GPUs]<br />
<br />
'''Software Required:'''<br />
<br />
Nvidia video cards with the proprietary driver installed will provide video decoding capabilities with the VDPAU interface at different levels according to PureVideo generation.<br />
<br />
You can also add support for the VA-API interface with:<br />
# pacman -S vdpau-video<br />
<br />
Check VA-API support with:<br />
$ vainfo<br />
<br />
To take full advantage of the hardware decoding capability of your video card you will need a media player that supports VDPAU or VA-API.<br />
<br />
To enable hardware acceleration in '''MPlayer''' edit ~/.mplayer/config<br />
<br />
vo=vdpau<br />
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,<br />
<br />
<br />
To enable hardware acceleration in '''VLC''' go:<br />
<br />
Tools -> Settings -> Videos and codec -> check "Use GPU acceleration"<br />
<br />
To enable hardware acceleration in '''smplayer''' go:<br />
<br />
Options -> Preferences -> General -> Video Tab -> select vdpau as output driver<br />
<br />
To enable hardware acceleration in '''gnome-mplayer''' go:<br />
<br />
Edit -> Preferences -> set video output to vdpau<br />
<br />
'''Playing HD movies on cards with low memory:'''<br />
<br />
If your graphic card doesn't have a lot of memory(>521MB?), you can experience glitches when watching 1080p or even 720p movies.<br />
To avoid that start simple window manager like TWM or MWM.<br />
<br />
Additionally increasing the MPlayer's cache size in ~/.mplayer/config can help, when your hard drive is spinning down when watching HD movies.<br />
<br />
===Using TV-out===<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here]<br />
<br />
===X with a TV (DFP) as the only display===<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, {{Filename|/etc/X11/dfp0.edid}}.<br />
<br />
Edit xorg.conf by adding to the "Device" section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The "ConnectedMonitor" option forces the driver to recognize the DFP as if it were connected. The "CustomEDID" provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
===Displaying GPU temperature in the shell===<br />
====Method 1 - nvidia-settings====<br />
{{Note|This method requires that you're using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer nvidia cards such as the G210/220 as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use nvidia-settings as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
$ nvidia-settings -q gpucoretemp -t<br />
41<br />
<br />
====Method 2 - nvidia-smi====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temp in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi -a<br />
<br />
This should output something similar to the following:<br />
<pre><br />
==============NVSMI LOG==============<br />
<br />
<br />
Timestamp : Sun Jun 6 06:17:53 2010<br />
<br />
GPU 0:<br />
Product Name : ION<br />
PCI ID : 87d10de<br />
Temperature : 35 C<br />
</pre><br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
$ nvidia-smi -a | grep Temp | cut -c17-18<br />
35<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli<br />
<br />
====Method 3 - nvclock====<br />
Use nvclock which is available from the [extra] repo. Note that nvclock cannot access thermal sensors on newer nvidia cards such as the G210/220.<br />
<br />
==Troubleshooting==<br />
<br />
===Gaming using Twinview===<br />
In case you want to play fullscreen games when using Twinview, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably don't want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropiate Metamodes to your xorg.conf in section {{Codeline|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
===Old Xorg Settings===<br />
If upgrading from an old installation, please remove old {{Filename|/usr/X11R6}} paths as it can cause trouble during installation.<br />
<br />
===Corrupted screen: "Six screens" issue===<br />
For some users using Geforce GT 100M's, the screen turns out corrupted after X starts; divided into 6 sections with a resolution limited to 640x480.<br />
<br />
To solve this problem, enable the Validation Mode {{Codeline|NoTotalSizeCheck}} in section {{Codeline|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
==='/dev/nvidiactl' errors===<br />
Trying to start an opengl application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the <code>FREQUENTLY ASKED QUESTIONS</code> <br />
section of <code>/usr/share/doc/NVIDIA_GLX-1.0/README</code> <br />
for steps to correct.<br />
<br />
Solve by adding the appropiate user to the "video" group and relogin:<br />
# gpasswd -a username video<br />
<br />
===32 bit applications do not start===<br />
Under 64 bit systems, installing {{Codeline|lib32-nvidia-utils}} that corresponds to the same version installed for the 64 bit driver fixes the issue.<br />
<br />
===Errors after updating the kernel===<br />
Every time the kernel26 package is updated, it is a requirement to reinstall the nvidia package and rebooting afterwards.<br />
<br />
===Crashing in general===<br />
* Try disabling {{Codeline|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{Codeline|nopat}} at the end of the {{Codeline|kernel}} line in {{Codeline|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{Codeline|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{Codeline|nopat}} to the {{Codeline|kernel}} line in {{Codeline|menu.lst}}.<br />
More information about trouble-shooting the driver can be found in the [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums.]<br />
<br />
===Bad performance after installing a new driver version===<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on: <br />
glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No <br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
===Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace===<br />
If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{Codeline|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt NVIDIA Driver's Readme:Appendix K] for more information.<br />
<br />
===Refresh rate not detected properly by XRandR dependant utilities===<br />
The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the {{Codeline|MetaMode}} bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.<br />
<br />
In order to support {{Codeline|DynamicTwinView}}, the NVIDIA driver must make each MetaMode appear to be unique to XRandR. Presently, the Nvidia driver accomplishes this by using the refresh rate as a unique identifier.<br />
<br />
Use {{Codeline|nvidia-settings -q RefreshRate}} to query the actual refresh rate on each display device.<br />
<br />
The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.<br />
<br />
This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to "false", which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.<br />
<br />
==External links==<br />
* [http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 NVIDIA forums]<br />
* [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-7182/README/readme.txt Official readme for NVIDIA drivers]</div>Maciekshttps://wiki.archlinux.org/index.php?title=Talk:Running_GUI_applications_as_root&diff=78211Talk:Running GUI applications as root2009-10-17T12:21:33Z<p>Macieks: </p>
<hr />
<div>What about /etc/X0.hosts file ?<br />
It's descibed in Xserver manual, in section "GRANTING ACCESS".<br />
<br />
----<br />
<br />
Using xhost+ is insecure:<br />
http://www.ocf.berkeley.edu/help/X_Windows_Env_HTML/security.html<br />
Maybe adding:<br />
<br />
HOST=`hostname`<br />
XAUTH=`ps -C X f|sed -n 's/.*-auth *//p'`<br />
XKEY=`xauth -f ${XAUTH} list | awk '{print $3}'`<br />
<br />
xauth add ${HOST}/unix:0 MIT-MAGIC-COOKIE-1 ${XKEY}<br />
xauth add ${HOST}:0 MIT-MAGIC-COOKIE-1 ${XKEY}<br />
<br />
unset HOST<br />
unset XAUTH<br />
unset XKEY<br />
<br />
to /root/.bashrc is a better solution ?</div>Maciekshttps://wiki.archlinux.org/index.php?title=Talk:Running_GUI_applications_as_root&diff=50128Talk:Running GUI applications as root2008-09-27T07:40:59Z<p>Macieks: New page: What about /etc/X0.hosts file ? It's descibed in Xserver manual, in section "GRANTING ACCESS".</p>
<hr />
<div>What about /etc/X0.hosts file ?<br />
It's descibed in Xserver manual, in section "GRANTING ACCESS".</div>Maciekshttps://wiki.archlinux.org/index.php?title=Talk:Ccache&diff=11928Talk:Ccache2006-04-21T12:42:27Z<p>Macieks: </p>
<hr />
<div>ccache worked ok with every compilation except kernel24.<br />
To use it for kernel24 compilation I had to add this to my ~/.bashrc<br />
<br />
if [ -d /usr/lib/ccache ] ; then<br />
PATH="/usr/lib/ccache/bin:${PATH}"<br />
fi</div>Maciekshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=9234Fonts FAQ2006-03-06T23:38:19Z<p>Macieks: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fonts FAQ}}<br />
{{i18n_entry|繁體中文|Fonts 常見問答集}}<br />
{{i18n_links_end}}<br />
<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A(1). Get your proper from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Display pixels should be square, if not it can cause errors in the alignment of vector and raster. The best way to proper fonts DPI is by setting DisplaySize in /etc/X11/xorg.conf. For my Samsung SyncMaster 172x LCD display which is 337.92mm width and 270.336mm heigh, I have:<br />
<br />
DisplaySize 338 270<br />
<br />
You can check your display dimensions in product manual or searching the internet.<br />
After changing that you should check again:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
If it's OK ( square ) restart X and be happy. If not try increasing/decreasing the DisplaySize values to set square DPI.<br />
For SyncMaster 172x and 1280x1024 resolution I have 96dpi.<br />
<br />
$ xdpyinfo | grep resolution<br />
resolution: 96x96 dots per inch<br />
<br />
This link could help:<br />
[http://ed.asisaid.com/fontfight.html Fixing Font]<br />
<br />
<br />
----<br />
<br />
<br />
A(2). Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
Another solution is to run the openoffice administration tool<br />
<pre><br />
# /opt/openoffice/spadmin<br />
</pre><br />
from which you can add fonts.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
*Note: Times New Roman may appear to be a non-TTF font. If this is the case, read above about how to fix this.<br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Maciekshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=9225Fonts FAQ2006-03-06T11:36:40Z<p>Macieks: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fonts FAQ}}<br />
{{i18n_entry|繁體中文|Fonts 常見問答集}}<br />
{{i18n_links_end}}<br />
<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A(1). Get your proper from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Display pixels should be square, if not it can cause errors in the alignment of vector and raster. The best way to proper fonts DPI is by setting DisplaySize in /etc/X11/xorg.conf. For my Samsung SyncMaster 172x LCD display which is 337.92mm width and 270.336mm width I have:<br />
<br />
DisplaySize 338 270<br />
<br />
You can check your display dimensions in product manual or searching the internet.<br />
After changing that you should check again:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
If it's OK ( square ) restart X and be happy. If not try increasing/decreasing the DisplaySize values to set square DPI.<br />
For SyncMaster 172x and 1280x1024 resolution I have 96dpi.<br />
<br />
$ xdpyinfo | grep resolution<br />
resolution: 96x96 dots per inch<br />
<br />
This link could help:<br />
[http://ed.asisaid.com/fontfight.html Fixing Font]<br />
<br />
<br />
----<br />
<br />
<br />
A(2). Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
Another solution is to run the openoffice administration tool<br />
<pre><br />
# /opt/openoffice/spadmin<br />
</pre><br />
from which you can add fonts.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
*Note: Times New Roman may appear to be a non-TTF font. If this is the case, read above about how to fix this.<br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Maciekshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=9224Fonts FAQ2006-03-06T11:35:17Z<p>Macieks: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fonts FAQ}}<br />
{{i18n_entry|繁體中文|Fonts 常見問答集}}<br />
{{i18n_links_end}}<br />
<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A(1). Get your proper from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Display pixels should be square, if not it can cause errors in the alignment of vector and raster. The best way to proper fonts DPI is by setting DisplaySize in /etc/X11/xorg.conf. For my Samsung SyncMaster 172x LCD display which is 337.92mm width and 270.336mm width I have:<br />
<br />
DisplaySize 338 270<br />
<br />
You can check your display dimensions in product manual or searching the internet.<br />
After changing that you should check again:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
If it's OK ( square ) restart X and be happy. If not try increasing/decreasing the DisplaySize values to set square DPI.<br />
For SyncMaster 172x and 1280x1024 resolution I have 96dpi.<br />
<br />
[macieks@Komp_607 ~]$ xdpyinfo | grep resolution<br />
resolution: 96x96 dots per inch<br />
<br />
This link could help:<br />
[http://ed.asisaid.com/fontfight.html Fixing Font]<br />
<br />
<br />
----<br />
<br />
<br />
A(2). Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
Another solution is to run the openoffice administration tool<br />
<pre><br />
# /opt/openoffice/spadmin<br />
</pre><br />
from which you can add fonts.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
*Note: Times New Roman may appear to be a non-TTF font. If this is the case, read above about how to fix this.<br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Maciekshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=9223Fonts FAQ2006-03-06T11:34:46Z<p>Macieks: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fonts FAQ}}<br />
{{i18n_entry|繁體中文|Fonts 常見問答集}}<br />
{{i18n_links_end}}<br />
<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A(1). Get your proper from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Display pixels should be square, if not it can cause errors in the alignment of vector and raster. The best way to proper fonts DPI is by setting DisplaySize in /etc/X11/xorg.conf. For my Samsung SyncMaster 172x LCD display which is 337.92mm width and 270.336mm width I have:<br />
<br />
DisplaySize 338 270<br />
<br />
You can check your display dimensions in product manual or searching the internet.<br />
After changing that you should check again:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
<br />
If it's OK ( square ) restart X and be happy. If not try increasing/decreasing the DisplaySize values to set square DPI.<br />
For SyncMaster 172x and 1280x1024 resolution I have 96dpi.<br />
<br />
[macieks@Komp_607 ~]$ xdpyinfo | grep resolution<br />
resolution: 96x96 dots per inch<br />
<br />
This link could help:<br />
[http://ed.asisaid.com/fontfight.html Fixing Font]<br />
<br />
<br />
----<br />
<br />
<br />
A(2). Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
Another solution is to run the openoffice administration tool<br />
<pre><br />
# /opt/openoffice/spadmin<br />
</pre><br />
from which you can add fonts.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
*Note: Times New Roman may appear to be a non-TTF font. If this is the case, read above about how to fix this.<br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Maciekshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=9222Fonts FAQ2006-03-06T11:30:23Z<p>Macieks: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fonts FAQ}}<br />
{{i18n_entry|繁體中文|Fonts 常見問答集}}<br />
{{i18n_links_end}}<br />
<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A(1). Get your proper from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Display pixels should be square, if not it can cause errors in the alignment of vector and raster. The best way to proper fonts DPI is by setting DisplaySize in /etc/X11/xorg.conf. For my Samsung SyncMaster 172x LCD display which is 337.92mm width and 270.336mm width I have:<br />
<br />
DisplaySize 338 270<br />
<br />
You can check your display dimensions in product manual or searching the internet.<br />
After changing that you should check again:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
If it's OK ( square ) restart X and be happy. If not try increasing/decreasing the DisplaySize values to set square DPI. This link could help:<br />
[http://ed.asisaid.com/fontfight.html Fixing Font]<br />
<br />
<br />
----<br />
<br />
<br />
A(2). Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
Another solution is to run the openoffice administration tool<br />
<pre><br />
# /opt/openoffice/spadmin<br />
</pre><br />
from which you can add fonts.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
*Note: Times New Roman may appear to be a non-TTF font. If this is the case, read above about how to fix this.<br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Macieks