Page 1 of 1

ssh -x and Ubuntu guest system within a network

Posted: 18. Nov 2008, 10:28
by pkg
Dear all,

I use virtualbox on a Win Vista host and with Ubuntu as guest.

Two things do not work:
  1. If I log via ssh -x username@remote_server onto a remote server and want to start, say, acroread I get the following error message "Gtk-Warning **: cannot open display".
  2. I am connected via LAN with the network of my institute. Internet and ssh work in principle but a colleague who uses Ubuntu as host says that for example all network printers are displayed when he wants to print a doc. On my "Ubuntu via Virtualbox system" this is not the case. Why??? In fact, this application was the main reason for me to install Virtualbox, that is, to be able to print on the institute's network printers ...
Please when answering account for the fact that I am neither a Virtualbox nor a Linux expert and in fact not a computer expert at all ;-)) Thanks!!
BR
pkg

Posted: 18. Nov 2008, 14:27
by TerryE
Welcome to our forum. You might want to take this opportunity to browse the Forum Posting Guide. This contains some useful tips on how to search for VBox knowledge and how to frame Qs. Now to your Qs:

The first issue is all to do with how X applications work and nothing to do with VBox. When you are connected to a display all subprocesses can access the X service through $DISPLAY as long at they have the right X Authorization access. You need to research this with you favourite Linux resources. When you SSH into a system you haven't defined by default an X display service or the access rights to it. Attempting to run any windowing application will therefore fail with the sort of error that you mention.

Second, Ubuntu will connect to any printers that are defined, locally or networked through LPD or SMB print services. Again configuring these isn't really a VBox issue. It's an Ubuntu one. Sorry.

Posted: 19. Nov 2008, 15:48
by pkg
HHmm you are right, it's all about Ubuntu and not about VB ... nevertheless thanks for straighten me out on this point. I could already solve the x-forwarding "problem".
As for my second problem, however, I am not completely sure about where the problem lies ... do you mean that Ubuntu knows all the network printers the host system knows, which would mean that I had to figure out how to identify all the printers via the Win Vista "Network center"??
BR
pkg

Posted: 19. Nov 2008, 16:24
by sej7278
try "ssh -Y"

as far as printing going, perhaps your friend is running cups and/or samba?

Posted: 19. Nov 2008, 21:54
by TerryE
Not a Vista expert, but how NT systems explore the network for printers depends on whether you are part of an AD domain or a workgroup. In the former case it gets its printer list through an LDAP query to the A/D server. In the latter by an SMB multicast, which is UDP. I am not sure if this latter works under VBox NAT, so you may need to know the UNC / URL of the printer that you want to add to Ubuntu, but you can find this out on your host by right clicking on it and looking at its properties. The latest version of samba client supports both modes. Hope that this helps.