Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Connecting to a remote Solaris 10 system over X11 I observe inconsistent behavior regarding the used fonts. I am connecting from a Cygwin/X system.

When I connect using ssh forwarding like this

$ ssh -Y mymachine.example.org

fonts work as expected, i.e. the rendering is very nice and programs seem to find all kind of different fonts (e.g. gvim or emacs).

When I connect to the same machine via XDMCP (to the stock blue Solaris 10 login manager screen) and login there seems only 1 fixed size font available. An Emacs from OpenCSW even fails to execute because it can't find the fonts it needs.

It prints that it can't find a font using following specification:

-dt-interface user-medium-r-normal-m

I establish the XDMCP connection like this:

$ XWin -query mymachine.example.org -from mywindowsclient.example.org

My objective is no to get also proper fonts for the XDMCP use case.

How can I investigate this issue? Can I duplicate some configuration which is implicitly used with ssh -Y for the XDMCP case?

How is the font-thing usually setup during ssh-X11-forwarding?

share|improve this question
    
I don't know what XWin does, but this seams like an issue with your environment. What X Server are you connecting to when you use the SSH approach? Is it a different one compared to the XWin use case? I'm guessing when you start the whole Cygwin thing paths are set so that all fonts can be found. If you don't it won't. Fonts are a local thing ... at least in vanilla X. –  Bananguin Jan 4 at 13:46
    
@Bananguin, when using ssh -Y I am doing that from inside a stock Cygwin-xterm which is launched when the Cygwin/X application is started. Cygwin/X calls startxwin.exe which it turn seems to also launch XWin.exe. XWin.exe is like a normal X Xserver plus some other options. –  maxschlepzig Jan 4 at 14:54
1  
XWin is the X server that's bundled with Cygwin. There is also XMing for example, a standalone X server for Windows. –  slm Jan 4 at 15:42

2 Answers 2

up vote 1 down vote accepted

I believe XDMCP is using the fonts local to the Solaris system. When you SSH you're using fonts that are local, since in that scenario you're the X server and the Solaris box is the X client. You can use the command xlsfonts to see what fonts are accessible to you on a given system.

EDIT #1 - Font path

You can find out your system's font path using the command xset.

Example

$ xset q | sed -n '/Font/,/DPM/p'
Font Path:
  catalogue:/etc/X11/fontpath.d,built-ins
DPMS (Energy Star):

This path can include paths to local directories as well "paths" to other font servers. These will show up as port@host types of entries.

Example

$ xset +fp tcp/<IP or name of font server>:7100

References

share|improve this answer
    
Ok, I've also tested another proprietary Windows-XDMCP client now. With that I get some fonts (all bitmaps, it seems) - at least more than one - and enough to make emacs happy. Is there an X command to investigate if that session uses some kind of X font server (address/port) or activates some other session relevant setting? –  maxschlepzig Jan 4 at 14:57
    
The xset q outputs showed no differences and a xset fp rehash did not help either. What makes the difference between my two setups is that with XDMCP a remote system-wide xinitrc/xdefaults file is executed after XDM login. And that mechanism sets some font related X-ressources ... You can verify this via something like xrdb -query | grep -- -dt and remove those entries via xrdb -remove. When doing ssh X-forwarding those X-ressources are not loaded, of course. –  maxschlepzig Jan 6 at 18:58

First thing is to compare font paths via xset q, e.g.:

$ xset q
Font Path:
  /usr/share/fonts/misc/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins

(a X font server (XFS) url may also be part of a font path)

If needed you can add font paths via xset +fp path. After manipulating font paths you have to call xset rehash.

The next thing is to compare the output of xlsfonts.

If it outputs a lot of fonts but your X programs still complain about missing fonts or simply use an ugly standard font for everything: this can be caused by font related X-resources pointing to unavailable fonts.

A simple test is to start emacs - which may complain about not finding a found like:

-dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*

You can verify if such X resources are set via something like:

$ xrdb -query | grep -- -dt
$ xrdb -query | grep -i font

If that is the case you get output like:

*Font:  -dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*
*userFont:      -dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*:

You can remove those entries via xrdb -remove - such that the default font settings are used.

Alternatively, you can load your own font related X resources settings.

Background

X resources are usually set via config files like:

/$SYS_PATH/Xresources
/$SYS_PATH/xinitrc
/$SYS_PATH/Xdefaults
$HOME/.xinitrc
$HOME/.Xresources
...

Or some variation on that - e.g. a lower case x.

Those files may be executed while logging in via an X display manager (XDM). When using XDMCP, XDM runs on the remote system and thus executes those files remotely.

But they are not executed when using X forwarding via ssh.

The obscure font name (-dt-interface) comes from CDE - which seems to was the default desktop environment under Solaris at some point - and they are not included with the Cygwin X server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.