4

I am running Xubuntu on my main PC at home.

Is it possible for 2 users to work simultaneously on one computer, while one is physically in front of the computer, and another one is connected remotely from another Ubuntu PC?

EDIT: Both users need a GUI environment.

If yes, how do I set it up?

EDIT 3: I have a powerful desktop PC (recently converted to Linux :) ) and 2 laptops. The desktop PC has a VM with all the Graphic Design software on it. Me and my friend both work on a web project, and the laptops are not suitable for it. The laptop is good for development, but every now and then I need to access the Graphical Design software, so I need the Desktop. My friend works on Linux Graphics tools and also needs the Desktop. So we decided to share the Desktop, while he will be working on it directly, I would like to connect to it from my Laptop to access the VM. Desktop and laptop are in one LAN.

EDIT2: Thanks, for the comments and answers, I got on track with this. A quick search revealed 2 options:

  1. SSH-X or "X11 Forwarding via SSH" (as you already pointed out)
  2. FreeNX

Which direction would you recommend? Or a better alternative if you know one.

Sorry for bad explanation, I don't have good writing skills.

gravity
  • 1,217
  • 1
  • 12
  • 21
Dean
  • 803
  • 1
  • 10
  • 25
  • Please tell us "I have this kind of machine running this, and another machine running that, and I'd like to see foo running on this but using the display and keyboard of that, etc." There are too many possible answers otherwise. – msw Jun 14 '13 at 13:31
  • 1
    `xrdp` as I added below, is quick, easy, and straight-forward also – gravity Jun 14 '13 at 13:38

4 Answers4

5

There are many ways you could accomplish this, the first couple that are most often used would be ssh (Secure Shell - so, primarily command-line interface to start), and other graphical interfacing methods like rdesktop.

You can also use a combination of ssh and rdesktop or other methods, depending on what you're trying to accomplish. As other users have mentioned, however, it would be worth describing (in some detail) what you're trying to achieve. ;)

Since you want a GUI-interface for both of the simultaneous users, I'd suggest using xrdp and the aforementioned rdesktop

sudo apt-get install xrdp

Then run rdesktop from whatever machine you're trying to connect to the server from. A good test (done entirely on the server) is doing the following:

rdesktop localhost

.. and logging in as the 'second' user. If it works, you'll simply need to try from the other machine the same way, but there's no need to install xrdp on that system (since that's the server).

Alternatively, if you just want to connect via a shell interface:

sudo apt-get install openssh-server

... and, with the very basic default configurations, you're already setup to go. Assuming your network has no port blocking or firewalls on the server-side, you should then be able to (from the other PC):

ssh <server IP address>

Or, to test on the server just to ensure it's ready (you would actually do this on the server's terminal window itself):

ssh localhost

Definitely look at ssh --help for detailed instructions on how to specify ports, users, etc. as you please.

gravity
  • 1,217
  • 1
  • 12
  • 21
  • Thanks. And what if both users require the GUI? – Dean Jun 14 '13 at 13:23
  • +1 but VNC is for desktop *sharing* which you probably know. Does anyone still use XDMCP for multiple lightdm greeter screens? It's been a while since I've seen anyone bother with that. – msw Jun 14 '13 at 13:25
  • @Dean please edit your question to add detail about what you have and what you want. Sprinkling comments around makes it hard for us to help you. – msw Jun 14 '13 at 13:26
  • Valid point, I'll remove the VNC reference. OP - VNC means you'd 'take over' the person's screen essentially, and that's not what you specifically requested. – gravity Jun 14 '13 at 13:27
  • 1
    I added basic `xrdp` instructions for you, Dean. We assume you've already setup individual (separate) users, and other various things (again, that you're aware of firewalls, ports, etc.) – gravity Jun 14 '13 at 13:33
  • I get failed to load session "gnome" – Dean Jun 14 '13 at 13:54
  • You should probably open a new question, as this one has become muddled, and would be 'off topic' of your original question "Is it possible.." and would be more suited to a "Troubleshooting XRDP" subject instead. Please provide as much detail as you can in the new question, however. Describe what you did, on which system, and screenshots/errors verbatim whenever possible. I will try to move into that question with you to continue helping. – gravity Jun 14 '13 at 13:58
  • 1
    I found this guide very useful: http://c-nergy.be/blog/?p=5305 This helped me establish `xrdp` successfully. – Afshar Mohebi Jan 09 '15 at 11:46
4

Of course you can, that's been a central component of the Unix Time Sharing system since the day it was written circa 1970. So also is X Windows designed to be multi-user and network transparent.

If you mean "how do I set this up?", you should ask a more detailed question.

msw
  • 4,668
  • 1
  • 24
  • 26
3

A very common way to do this is using ssh which gives you a remote shell.

You can also use "ssh -X" to transparently forward X11, allowing you to run e.g. Eclipse or Firefox. This is however, somewhat slow, perhaps even more than you like.

There is more than one way to do it. What fits you best, depends on what you work with, how fast a connection there is, and what is important to you.


Based on the comments, the simplest approach might simply be to use your laptops as X-terminals and enable XDM on the powerful server (like in the very old days).

When XDM is running you most likely need something like "X -query powerfulhost" or "X -broadcast" from a non-graphic login. I have not done this in 15 years, so I might remember wrong.

Thorbjørn Ravn Andersen
  • 4,412
  • 4
  • 21
  • 32
-1

I'd use VNC because I have had experience of running several user sessions on the server ("powerful desktop machine") each tempted to a different desktop.

VNC was never designed to be just for sharing a desktop with other people.

The heavy computing is all done on the server, and all the laptops have to do is show the picture that results from it - and pass keystrokes and mouse movement back.

I'm interested that desktop also does it for Linux. Good.

  • Welcome to Ask Ubuntu! I recommend to [edit] this answer to expand it with specific details about how to do this. (See also [How do I write a good answer?](/help/how-to-answer) for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) – David Foerster Aug 20 '17 at 09:25