Re: [Dorset] Mysteries of X Servers [solved]

2016-06-01 Thread tda

On 13/05/16 10:33, t...@ls83.eclipse.co.uk wrote:

Hi Ralph

On 13/05/16 00:51, Ralph Corderoy wrote:


I'd guess that either Xfce is asking for server fonts that the server
doesn't have, Cygwin apparently has a whole load of fonts in separate
font-...  packages now rather than put lots into the main package, or it
can't use the client-side fontconfig fonts because the Cygwin X server
doesn't support one or more extensions it wants, xdpyinfo(1) lists a
server's extensions.

Does Cygwin's /var/log/xwin/XWin.1.log give any clues?  Can you
XDCMP-connect with a Linux X server, but from another machine so the
local/remote font difference still applies?



Nothing particularly obvious in terms of uninstalled fonts in Cygwin.
I'm actually looking at two Cygwin machines. One with Windows10 and
fresh Cygwin install. One with XP and an older Cygwin install.

On the Win10 machine I'm able to specify the remote machine as font server

C:\cygwin\bin\XWin.exe :1 -clipboard -query fleet -fp tcp/fleet:7100

- not that it seems to make any difference whether or not I do that.

On the XP machine, specifying font server causes Cygwin to hang.

My assumption has been that a font server will serve up fonts.

$ fslsfonts -server fleet:7100
fslsfonts:  unable to open server "fleet:7100"

Ah no font server - I am on the right track here?



On your second point, I can log in from remote Linux/Xephyr,
WinXP/Cygwin, WinXP/MobaXterm, Win10/Cygwin machines. The Cygwin logins
show the wrong fonts and XFCE icons.

$ aptitude show xfs
No current or candidate version found for xfs
Package: xfs
State: not installed
...


But even stranger is that I get a different set of desktop icons when
logging in from XWin than logging in any other way. I am set up to use
Tango icons but looks like when connected via XWin this changes to
Adwaita theme. I hadn't appreciated that X icons are somehow
configured server-side, but that seems to be the case.




As is often the case, there were multiple issues here. Firstly, doing 
away with specifying a font server from Cygwin/X (remove -fp switch) 
resulted in a full complement of X fonts becoming available. The mystery 
of the incorrect theme was a bit more elusive. From an XP machine login 
it spontaneously corrected itself which left a Windows 10 machine being 
the only remote login which showed this effect, and only when loging in 
as myself, not as other users. That left environment or some config file 
on the X client. Eventually tracked it down to the presence of an XFCE 
config file ~/.config/xfce/xfconf/xfce-perchannel-xml/display.xml. It 
was the differing screen resolutions from different X server machines 
that was triggering the effect. Deleting this file gave the correct 
theme from all machines. It may end up being regenerated on a local 
login, something I rarely do.


Glad to have Cygwin/X back working after probably 10 years of using 
XMing, Mobaxterm etc, as it is a very nice X server.



Tim



--
Next meeting:  Bournemouth, Tuesday, 2016-06-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Mysteries of X Servers

2016-05-13 Thread tda

Hi Ralph

On 13/05/16 00:51, Ralph Corderoy wrote:


I'd guess that either Xfce is asking for server fonts that the server
doesn't have, Cygwin apparently has a whole load of fonts in separate
font-...  packages now rather than put lots into the main package, or it
can't use the client-side fontconfig fonts because the Cygwin X server
doesn't support one or more extensions it wants, xdpyinfo(1) lists a
server's extensions.

Does Cygwin's /var/log/xwin/XWin.1.log give any clues?  Can you
XDCMP-connect with a Linux X server, but from another machine so the
local/remote font difference still applies?



Nothing particularly obvious in terms of uninstalled fonts in Cygwin. 
I'm actually looking at two Cygwin machines. One with Windows10 and 
fresh Cygwin install. One with XP and an older Cygwin install.


On the Win10 machine I'm able to specify the remote machine as font server

C:\cygwin\bin\XWin.exe :1 -clipboard -query fleet -fp tcp/fleet:7100

- not that it seems to make any difference whether or not I do that.

On the XP machine, specifying font server causes Cygwin to hang.

My assumption has been that a font server will serve up fonts.

$ fslsfonts -server fleet:7100
fslsfonts:  unable to open server "fleet:7100"

Ah no font server - I am on the right track here?



On your second point, I can log in from remote Linux/Xephyr, 
WinXP/Cygwin, WinXP/MobaXterm, Win10/Cygwin machines. The Cygwin logins 
show the wrong fonts and XFCE icons.


$ aptitude show xfs
No current or candidate version found for xfs
Package: xfs
State: not installed
...


But even stranger is that I get a different set of desktop icons when
logging in from XWin than logging in any other way. I am set up to use
Tango icons but looks like when connected via XWin this changes to
Adwaita theme. I hadn't appreciated that X icons are somehow
configured server-side, but that seems to be the case.


The only "icons" server side have been characters in fonts, e.g. `xfd
-fn cursor' familiar from mouse images.  Perhaps again the client, Xfce,
is having to fallback because the server doesn't support some of the
image formats with a protocol extension?  Guessing again.  Is there any
complaint from the clients in ~/.xsession-errors or similar on the
client machine?



On MobaXterm and Cygwin logins, .xsession-errors report

(wrapper:32134): Gtk-WARNING **: Unable to locate theme engine in 
module_path: "pixmap",


but as above, MobaXterm shows correct theme.


The Cygwin login also shows several:

The program 'xfsettingsd' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 126 error_code 8 request_code 139 minor_code 7)


I guess rendering of themes has been pushed down to the X server with 
Cygwin.



Cheers

Tim



--
Next meeting:  Bournemouth, Tuesday, 2016-06-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Mysteries of X Servers

2016-05-12 Thread Ralph Corderoy
Hi Tim,

> I've been trying a few experiments and have a stack of questions to
> try to gain a better understanding over how this stuff all hangs
> together

Jump back to 1990, and the world of the X Window System was compact
enough to be readily understandable!  :-)

> From a Windows XP box I'm running:
>
> C:\cygwin\bin\XWin.exe :1 -query mybox -clipboard
>
> into my Linux XFCE desktop. The desktop looked vaguely unfamiliar and
> I realised that the desktop fonts were not what is defined in the
> desktop settings (normally used the MS core fonts Tahoma).

Fonts were originally the domain of the server.  It had the definitions
and worked out what pixels to set when asked to render "X" in a given
font.  xlsfonts(1) is an X client that would use the protocol to query
and list the fonts the server could provide in X's 14-dimensional
logical font description syntax, e.g.
`-urw-nimbus roman no9 l-medium-r-normal--0-0-0-0-p-0-iso8859-1', the
URW foundry's free-speech Times New Roman IIRC.
https://en.wikipedia.org/wiki/X_logical_font_description
`xfd -fn '-urw-nimbus roman no9 l-medium-r-normal--0-0-0-0-p-0-iso8859-1''
displays it.  The server has a `font path' telling it where to look, on
*it's* machine;  `xset q' shows it.  (When every desk had an X terminal,
i.e. a 80186 "PC" that was an X server, having them all hold all the
fonts, and keeping them up to date, was a chore so the concept of an X
font server that they referred to arrived.)

Time moved on.  Clients wanted to do more pixel rendering themselves for
shiny-ness, including fonts.  Motif's 3D plinths being judged
insufficient.  A new font library for clients came along, written by X's
authors, but usable outside of X.
https://en.wikipedia.org/wiki/Fontconfig  It provides commands like
fc-match(1) to show what font will actually be used given a
fontconfig-style font pattern;  a few less dimensions than 14.

$ fc-match 'Times New Roman'
n021003l.pfb: "Nimbus Roman No9 L" "Regular"
$ file /usr/share/fonts/Type1/n021003l.pfb
/usr/share/fonts/Type1/n021003l.pfb: PostScript Type 1 font program data

Users can have their own private fonts accessible by X clients rather
than the server, which may be a different machine.  Thus Inkscape can
"see" the user's fonts just downloaded from one of the free font sites.
The locations searched are configurable;  that Wikipedia page gives a
starting point.  AFAIK, this is all X-client side, so on the client's
machine.

> Changing the settings makes no difference - I get a nice crisp,
> slightly large set of desktop fonts which don't match the XFCE
> Appearance settings.

I'd guess that either Xfce is asking for server fonts that the server
doesn't have, Cygwin apparently has a whole load of fonts in separate
font-...  packages now rather than put lots into the main package, or it
can't use the client-side fontconfig fonts because the Cygwin X server
doesn't support one or more extensions it wants, xdpyinfo(1) lists a
server's extensions.

Does Cygwin's /var/log/xwin/XWin.1.log give any clues?  Can you
XDCMP-connect with a Linux X server, but from another machine so the
local/remote font difference still applies?

> But even stranger is that I get a different set of desktop icons when
> logging in from XWin than logging in any other way. I am set up to use
> Tango icons but looks like when connected via XWin this changes to
> Adwaita theme. I hadn't appreciated that X icons are somehow
> configured server-side, but that seems to be the case.

The only "icons" server side have been characters in fonts, e.g. `xfd
-fn cursor' familiar from mouse images.  Perhaps again the client, Xfce,
is having to fallback because the server doesn't support some of the
image formats with a protocol extension?  Guessing again.  Is there any
complaint from the clients in ~/.xsession-errors or similar on the
client machine?

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2016-06-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Mysteries of X Servers

2016-05-12 Thread tda

Hi

I normally log into my main Debian box via XDMCP either using Xephyr 
from another Linux machine or a windows X server. Over the years I've 
using Cygwin/X, XMing or MobaxTerm from Windows. By and large it's a 
matter of picking the one with the least glitches and lately I've been 
using MobaxTerm.


Periodically I go back and try Cygwin/X as when it works I prefer it. 
I've been trying a few experiments and have a stack of questions to try 
to gain a better understanding over how this stuff all hangs together, 
but here's the first. From a Windows XP box I'm running:


C:\cygwin\bin\XWin.exe :1 -query mybox -clipboard

into my Linux XFCE desktop. The desktop looked vaguely unfamiliar and I 
realised that the desktop fonts were not what is defined in the desktop 
settings (normally used the MS core fonts Tahoma). Changing the settings 
makes no difference - I get a nice crisp, slightly large set of desktop 
fonts which don't match the XFCE Appearance settings. But even stranger 
is that I get a different set of desktop icons when logging in from XWin 
than logging in any other way. I am set up to use Tango icons but looks 
like when connected via XWin this changes to Adwaita theme. I hadn't 
appreciated that X icons are somehow configured server-side, but that 
seems to be the case.


Cheers

Tim

--
Next meeting:  Bournemouth, Tuesday, 2016-06-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR