Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fonts when using X over ssh
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Sat Jul 14, 2012 8:16 pm    Post subject: Fonts when using X over ssh Reply with quote

I've recently brought back my Gentoo machine and I'm using it on my Mac through SSH. Certain fonts seem to be missing when running X11 applications over SSH. For example, I have urxvt configured to use the Terminus font (a nice font that's readable when very small), but when launching it I get this:
Code:
$ urxvt
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.

The font files are installed to /usr/share/consolefonts, and /usr/share/fonts/terminus and are viewable over the ssh connection.

Running mkfontdir in both directories doesn't work, and the font doesn't show up in xfontsel either. What should I do?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Sat Jul 14, 2012 8:33 pm    Post subject: Reply with quote

The fonts should be installed on the X server if I understand your situation correctly...

In this case, the fonts need to be installed on your Macintosh.

It might be better to just install a vnc server and all the fonts get renderred locally on the Gentoo machine.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Sat Jul 14, 2012 8:37 pm    Post subject: Reply with quote

I've tried using VNC this morning, and it refreshes really slowly, like those ancient CRT screens they have in supermarkets. I'll try installing the fonts on the Macintosh and give it another go.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 14, 2012 8:39 pm    Post subject: Reply with quote

Is running X apps remotely in X native way out of question?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Sat Jul 14, 2012 10:01 pm    Post subject: Reply with quote

I was under the impression this is the native way of doing it. At least that's what I read on Wikipedia: http://en.wikipedia.org/wiki/X_Window_System#Network.

Anyway, installing the font on the Mac doesn't seem to do it. I mean, the font does show up in xfontsel (and now that I think of, all of the fonts xfontsel lists are one I have on the Mac), but the can't use it. I think I'll just look for another fixed width font for OS X.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 14, 2012 10:16 pm    Post subject: Reply with quote

The native way is not over SSH, you simply run an X application in a remote box (which does not need X to be installed) with DISPLAY set to your local X server.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Sat Jul 14, 2012 10:23 pm    Post subject: Reply with quote

Well since the box isn't actually accessible (It isn't connected to a screen, keyboard or mouse.), I have to ssh into it anyway and I think that sets the DISPLAY variable automatically.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 14, 2012 10:30 pm    Post subject: Reply with quote

Logging in over SSH is not same as X forwarding over SSH.
Example: I have a headless box on my LAN. I log into it over SSH (because it's handy, could log in any other way) and issue
Code:
DISPLAY=<mydesktop>:0.0 foo &
After that I can close the SSH session. This headless box has no X installed, yet the application foo is successfully executed and happily displays on my <mydesktop>:0.0. The default port for incoming connections is 6000, your local X server must be listening (not default conf in Gentoo).
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Sat Jul 14, 2012 10:51 pm    Post subject: Reply with quote

Both methods, through ssh port forwarding (usually if you see your DISPLAY set to localhost:10.0 or something) or through X11 TCP connection (usually seeing DISPLAY=xserverhost:0), still use the same mechanism - TCP connections, just that it is proxied in the ssh case. Neither are quite fast as a local socket connection, but not too bad. Going through ssh gives the bonus of encryption as well as compression.

I do have to say that I have had issues forwarding stuff through ssh that works fine through native. Suspecting that ssh does do some protocol emulation of sorts. However this shouldn't affect fonts. And this is weird that you can't use the xfontsel fonts, it should work...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 14, 2012 10:59 pm    Post subject: Reply with quote

I haven't been deep into this but don't you need X installed in the remote box for forwarding over SSH to work? If yes then it's a major difference in how the data is processed.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Sat Jul 14, 2012 11:10 pm    Post subject: Reply with quote

The X libraries need to be installed on the headless box, for both ssh AND native X11 TCP. A full X11 install is needed for VNC, as VNC itself is now the server.

The X server needs to be installed on the machine you're trying to view on.

The mechanism is the same for SSH and native TCP X11 - both use a TCP connection.

There are really just three basic ways to run X11 applications:
1: local socket, that's what your /tmp/.X0-unix is used for. Requires full X11 install on remote machine, but has questionable value (unless you're running VNC on that machine).

2: TCP socket. The X server (the machine you have the monitor, mouse, and keyboard on) listens to a port. The remote machine (X clients) connect to your X server. Whether they do it directly (DISPLAY=xserverhost:0) or indirectly through a proxy (using ssh, DISPLAY=localhost:10) is irrelevant, it's still TCP socket. You could even use netcat to proxy as well, but it's a bit clunky and adds no value.

3: VNC. This emulates the whole X server on the remote machine, and your local machine with the monitor just windows into that server.

I'm not talking about just ssh'ing into the machine for an interactive text session...that's something different :D
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jul 14, 2012 11:15 pm    Post subject: Reply with quote

Thanks for clearing it up. :)
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum