11

I'm using ubuntu unity desktop

unity control center > sharing > screen sharing > no network selected for sharing

connection is working fine / but don't show in sharing setting / please check screenshot

ubuntu 18.04 (but work fine in default gnome)

problem screenshot :

https://i.stack.imgur.com/BqUfY.png

4 Answers 4

2

If you using static IP address, you’ll have to set the gateway and DNS to the same static IP address as your machine, then it works.

2
  • 2
    Can you explain a little more which command / files you edited for that, and how? Please edit your answer
    – damadam
    Nov 27, 2019 at 8:53
  • I'm using a local network without internet and your answer worked for me. Thank you. @damadam If you're using manual IP addresses, go to settings -> Wifi and click gear icon right side of your wifi name. Click IPv4 tab and you can change the Gateway and DNS settings manually.
    – Ermanas
    Apr 27, 2021 at 8:01
2

This seams to still be a problem even two years later. but the primary problem seams to be in Gnome-control-panel, while the background package, called vino, still works.

you can just start vino by typing: /usr/lib/vino/vino-server in a Terminal.

this will start screen sharing with all the settings set in the control panel. by ending the terminal process the screensharing also ends. Therefore if one wants to start screensharing on boot it needs to be entered into config files that execute on startup.

1

In my case the root cause was Gnome not allowing ScreenSharing when no network connected. Gnome gets the information from the NetworkManager. And it is not reporting any network because it is not set to manage those connections. This had to be fixed.

This is what was in /var/log/syslog

gnome-control-c[16836]: Failed to enable service vino-server: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Sharing cannot be enabled on this network, status is '0'

I had to do the following: change managed to true in /etc/NetworkManager/NetworkManager.conf

[ifupdown]
managed=true

run

 sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

reboot, and check whether now there are networks in the "Networks" field on your screenshot. The "Screen Sharing" button now should allow to be set to "On"

I got the information from this bug report: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1676547

2
  • This Workaround does not work, I still get the same error message: 'Failed to enable service vino-server: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Sharing cannot be enabled on this network, status is '0'' Is there any other solution?
    – sporc
    Jan 11, 2019 at 10:41
  • It did not work for me either. I still get the same error. May 15, 2020 at 7:16
1

I am experiencing the exact same issue.

If you don't need to use networkd, I think your issue can be solved by adding this file /etc/netplan/01-network-manager-all.yaml with these contents to your netplan directory.

network:
  version: 2
  renderer: NetworkManager

After you have added this file make sure there aren't any other files in that directory that will take precedent, then use the command sudo netplan apply. You may need to do a reboot for these changes to take effect in the settings tab though.

I recently updated my netplan.yaml file to use networkd instead of NetworkManager. Since doing this my VMs are now discoverable through my network bridge but my VNC client stopped working. In the sharing page under screen sharing, I no longer have the ability to turn on screen sharing as there are no networks to be found. This of course is false as I am connected to the internet through br-mmrk1

Switching the renderer back to NetworkManager allows network sharing to be enabled again but the network itself doesn't work and I can't connect to my VNC client.

If I remove the network bridges and simply use the default NetworkManager everything works, except for my VMs of course.

Currently my work around to manage my VMs, which you may find useful if you are using your machine for Vms as well, is to manage the VMs remotely using virtual manger on another computer.

Here is the video guide for that --> https://www.youtube.com/watch?v=_SiJSz_2NaY

Here is my /etc/netplan/01-networkd.yaml file where I have to use networkd. I would be interested to see your netplan file to compare.

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0f0:
      mtu: 1500
    enp2s0f1:
      mtu: 1500
  bridges:
    br-mmrk1:
      addresses: [ 10.133.104.200/22 ]
      gateway4: 10.133.104.1
      nameservers:
          addresses: [ 8.8.8.8, 1.1.1.1 ]
      interfaces:
      - enp2s0f0
      mtu: 1500
      parameters:
         stp: false
         forward-delay: 15
    br-mmrk2:
      addresses: [ 10.133.56.200/22 ]
      gateway4: 10.133.56.1
      nameservers:
          addresses: [ 8.8.8.8, 1.1.1.1 ]
      interfaces:
      - enp2s0f1
      mtu: 1500
      parameters:
         stp: false
         forward-delay: 15

If you found a solution for your issue please do share here as I would be delighted with a work around for this issue as well.

1
  • Tested on my Hyper-V VM with Ubuntu Server 18.04.02 - this solution worked for me (reboot was required)
    – Mike
    Apr 28, 2019 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .