How to do "Desktop Sharing" in 18.2?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
milesma
Level 1
Level 1
Posts: 4
Joined: Thu Feb 08, 2018 9:04 pm

How to do "Desktop Sharing" in 18.2?

Post by milesma » Thu Feb 08, 2018 9:24 pm

Hi,

I have three machines: A, B, C are in the same local network:

Machine A: Linux Mint 18.2 Sonya
Machine B: Linux Mint 18.1 Serena
Machine C: Windows 8.1

They have following connection status:

A (Remmina) connect to C: Success
A (Remmina) connect to B: Success
B (Remmina) connect to C: Success
B (Remmina) connect to B: Success
A (Remmina) connect to A: Fail
B (Remmina) connect to A: Fail
C (Remote Desktop Connection) connect to A: Fail

For the fail cases, I immediately get the error message "Unable to connect to RDP server xxx.xx.xx.xx".
So I think the RDP Server is not running on machine A.

Since B's RDP server is running well (otherwise connection to B will fail), I did a compare between A and B.

B did not install xrdp, however, clients can successfully connect to B.
A and B both have vino installed.

Question 1: Does machine B have a rdp server running?
Question 2: If "yes", then what rdp server(package) is B running? Is this package an alternative to xrdp? If "no", why A/C can connect to B?
Question 3: What is machine A missing and how to make "Desktop Sharing" to machine A?

Thanks in advance.

User avatar
MrEen
Level 6
Level 6
Posts: 1043
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to do "Desktop Sharing" in 18.2?

Post by MrEen » Thu Feb 08, 2018 9:58 pm

I'm certainly no expert on this subject, but this reads to me like a firewall issue. Maybe you need to tweak the setting of the firewall on A?

milesma
Level 1
Level 1
Posts: 4
Joined: Thu Feb 08, 2018 9:04 pm

Re: How to do "Desktop Sharing" in 18.2?

Post by milesma » Thu Feb 08, 2018 10:24 pm

The fire wall is turned off.

User avatar
MrEen
Level 6
Level 6
Posts: 1043
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to do "Desktop Sharing" in 18.2?

Post by MrEen » Thu Feb 08, 2018 10:30 pm

Sorry. I had hoped it was that simple. You'll have to wait for someone else to offer help.

User avatar
prestonR
Level 5
Level 5
Posts: 844
Joined: Wed Jan 07, 2015 12:24 pm
Location: Harare

Re: How to do "Desktop Sharing" in 18.2?

Post by prestonR » Fri Feb 09, 2018 5:29 pm

RDP should be used for the Windows machine only (and I have no experience with that).

Depending on your Mint edition, some, like Mate, have Desktop Sharing (xfce gnome-desktop-sharing?) in the Control Centre. If you're using that you're using VNC, not RDP; the actual server is vino and the Desktop Sharing settings window is a process called vino-preferences.

That means that Remmina's drop-down protocol picker needs to be set to the correct protocol the server is using; it will be RDP when trying to remote into C because it's a Win machine but it should be 'VNC' when remoting into A and B.

My guess is that you installed freerdp/xrdp server on B because you couldn't find any Desktop Sharing gui and got it to work. On A you used the installed Desktop Sharing and you're now trying to connect to A using RDP from the drop-down protocol picker of Remmina when the server is a VNC server, so pick 'VNC' instead.

The real problem will be to get C to connect to anything unless you install a vnc viewer.

EDIT: When activating Desktop Sharing via gui, a.k.a vino-preferences, the vino server will be automatically added to startup processes. If you install x11vnc or vino without vino-preferences (it used to be part of vino but now it's part of gnome-control-center or gnome desktop control, can't remember) you'll have to add a startup process with a command like:

Code: Select all

/usr/lib/vino/vino-server --sm-disable

ralplpcr
Level 5
Level 5
Posts: 603
Joined: Tue Jul 28, 2015 10:11 am

Re: How to do "Desktop Sharing" in 18.2?

Post by ralplpcr » Sat Feb 10, 2018 9:05 am

Never used vino, but from what I've read it performs a similar function to X11VNC?
If that's true, then vino alone won't be enough - - you need to tell Linux to listen for the connection before vino can accept it.
For each Linux system that I've got an X11VNC connection working, I found that installing an ssh server was required.

Try installing the openssh-server package on your "A" box:

Code: Select all

sudo apt-get update
sudo apt-get install openssh-server
Then fire up your vino and make sure you've got the "Sharing" checkboxes checked to allow viewing/control as desired.
See if that'll make the difference for you!

If not, you can install X11VNC - - it's been very good in my experience enabling remote connections.

milesma
Level 1
Level 1
Posts: 4
Joined: Thu Feb 08, 2018 9:04 pm

Re: How to do "Desktop Sharing" in 18.2?

Post by milesma » Sun Feb 11, 2018 9:01 pm

Thanks for your kind help.

After install x11vnc on A, and use VNC as protocol in Remmina (either A or B), I can connect to machine A. So problem is PARTLY solved.

There are two things left:
1. after the connection, when scaling to full screen, I can not actually see the full screen (the system menu bar at the bottom is hidden!)
When using VNC protocol, the Remmina's setting does not have a "use client resolution" option when RDP protocol is selected.
Then how to set the resolution in Remmina when connecting through VNC protocol?

2. When connecting to machine B (Linux Mint), the client (Either A or B itself) remmina is using RDP protocol. The connection is very fast and smooth.
If machine B is not using VNC Server, what kind of server package is machine B running?

ralplpcr
Level 5
Level 5
Posts: 603
Joined: Tue Jul 28, 2015 10:11 am

Re: How to do "Desktop Sharing" in 18.2?

Post by ralplpcr » Mon Feb 12, 2018 6:21 pm

milesma wrote: 1. after the connection, when scaling to full screen, I can not actually see the full screen (the system menu bar at the bottom is hidden!)
When using VNC protocol, the Remmina's setting does not have a "use client resolution" option when RDP protocol is selected.
Then how to set the resolution in Remmina when connecting through VNC protocol?
I don't know that there is a "good" way to do it. It's certainly possible.... but it's a bit of a hassle. By default, Mint only displays modes that are detected at the time of the X login. These are typically set during boot. Remmina doesn't change them remotely (at least not that I've found). It may be possible in newer versions of Remmina, but the only way I know is via terminal commands.

You can do this via some xrandr commands. Here's how: (don't say I didn't warn you!)

First, connect to your remote system using Remmina. These commands are all done *on* the remote system:
1. Open a terminal
2. Type cvt, the desired horizontal resolution in pixels, and then the desired vertical resolution. For example: cvt 1280 1024
3. You'll get a bunch of text resulting from that command. What you're looking for is the "Modeline". Copy everything after that.
4. Type xrandr --newmode, and then paste the text you just copied from step 3.

Code: Select all

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
5. Type xrandr.
6. In the output of step 5, you'll be looking for the name of the target monitor. In my below example, it's VGA-0

Code: Select all

ralplpcr@remote ~ $ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1920 x 2048
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0* 
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
  1280x1024_60.00 (0x197)  109.0MHz
        h: width  1280 start 1368 end 1496 total 1712 skew    0 clock   63.7KHz
        v: height 1024 start 1027 end 1034 total 1063           clock   59.9Hz
7. Now type xrandr --addmode + the name of your target monitor and the name of the resolution you just created:

Code: Select all

xrandr --addmode VGA-0 1280x1024_60.00
8. Open your display settings. Your new resolution should now be available for selection. Once you choose it, Remmina's remote screen will re-size for you.

Unfortunately, this setting is *not* persistent. If you reboot your remote machine, this resolution selection goes away. You have to set it again.
I suppose if you wanted to set up a bash script, you could automate a good chunk of this - - once you have the info from #2 & #6, you could create a bash that simply does those two commands? It'd then be just a double-click when you connect, and you could then adjust your screen resolution.

Full example below:

Code: Select all

ralplpcr@remote ~ $ cvt 1280 1024
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
ralplpcr@remote ~ $ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
ralplpcr@remote ~ $ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1920 x 2048
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0* 
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
  1280x1024_60.00 (0x197)  109.0MHz
        h: width  1280 start 1368 end 1496 total 1712 skew    0 clock   63.7KHz
        v: height 1024 start 1027 end 1034 total 1063           clock   59.9Hz
ralplpcr@remote ~ $ xrandr --addmode VGA-0 1280x1024_60.00
milesma wrote: 2. When connecting to machine B (Linux Mint), the client (Either A or B itself) remmina is using RDP protocol. The connection is very fast and smooth.
If machine B is not using VNC Server, what kind of server package is machine B running?
I'd be very surprised if you were actually using RDP protocol, since that's purely a Windows thing. What makes you believe that you're using RDP? Can you post a screenshot where you're seeing this?

milesma
Level 1
Level 1
Posts: 4
Joined: Thu Feb 08, 2018 9:04 pm

Re: How to do "Desktop Sharing" in 18.2?

Post by milesma » Wed Feb 14, 2018 9:05 pm

Hi ralplpcr,

Here is the remmina screenshot on machine A or any other linux mint client; Trying to connect to Machine B, which is linux mint as well.

Note: the protocol is selecting RDP, and the connection is very smooth, the resolution is great.

Very interested in Machine B, I can fully access Machine B (it is in my office), What kind of "rdp" server it is running? How to detect it? (run some commands in terminal?)
Selection_013.png
Thanks

User avatar
smurphos
Level 6
Level 6
Posts: 1171
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: How to do "Desktop Sharing" in 18.2?

Post by smurphos » Thu Feb 15, 2018 1:48 am

Machine B is probably running xrdp - an opensource Linux implementation of RDP.

Code: Select all

apt show xrdp
Package: xrdp
Version: 0.6.1-2
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Vincent Bernat <bernat@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,620 kB
Depends: libc6 (>= 2.15), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libx11-6, libxfixes3, adduser
Recommends: vnc4server | tightvncserver | vnc-server
Homepage: http://xrdp.sourceforge.net
Download-Size: 215 kB
APT-Sources: http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Description: Remote Desktop Protocol (RDP) server
 Based on research work by the rdesktop project, xrdp uses the Remote
 Desktop Protocol to present a graphical login to a remote client. xrdp can
 connect to a VNC server or another RDP server.
 .
 Microsoft Windows users can connect to a system running xrdp without
 installing additional software.

ralplpcr
Level 5
Level 5
Posts: 603
Joined: Tue Jul 28, 2015 10:11 am

Re: How to do "Desktop Sharing" in 18.2?

Post by ralplpcr » Thu Feb 15, 2018 8:01 am

smurphos wrote:
Thu Feb 15, 2018 1:48 am
Machine B is probably running xrdp - an opensource Linux implementation of RDP.
Beat me to it! That's what I was thinking, though I didn't think it came pre-installed with Mint - - the OP would have had to install it at some point?

Post Reply

Return to “Newbie Questions”