2

I set up a WSL Ubuntu, installed Gnome Files (Nautilus) and tried to use its Connect to Server functionality.

I am trying to view files in a remote server via SSH.

When I key in ssh://mydomain.com, the string turned red, and the Connect button is always greyed out.

When I click the question mark, there is nothing below the Available Protocols column.

Picture of Available Protocols being empty

This is what I'm expecting:

Expected

Here are what I have done so far:

  1. Installed Gnome Files by sudo apt install nautilus -y
  2. Followed this solution and run both sudo apt install gvfs-backends and sudo apt --reinstall install gvfs-backends, it seems to me this package already exists
  3. This solution suggests that gvfs-nfs package is not installed, but running sudo apt install gvfs-nfs returns Unable to locate package gvfs-nfs
  4. I figured installing Gnome might fix its dependencies: sudo apt install ubuntu-desktop gnome, but it does not work

What is going on? What packages did I missed? I could not find any answer to this elsewhere.

Notes:

  1. I launched Gnome Files by running nautilus in Ubuntu shell. Accessing directories seems fine, i.e. I can access Home, /, etc.
  2. Windows Version: Windows 11 21H2 Build 22000.978
  3. WSL System: Ubuntu-22.04
  • It appears to be telling you that the connect to feature does not accept ssh as a protocol for that purpose. – David Sep 30 '22 at 06:06
  • It is supposed to show different protocols. But in my case it's empty. Maybe some packages are not installed because WSL does not come with them? You may refer to the screenshot I added to the question. – James Koh Sep 30 '22 at 07:05
  • What is your Windows version and what method are you using to run GUI applications in WSL? Hopefully Windows 11, but we can (I believe) get it to work under WSL with Windows 10 as well if needed. I'm going to be away from the PC for a few hours though, so might be a bit before I can answer. Thanks! – NotTheDr01ds Sep 30 '22 at 11:39
  • Nice to see you again @NotTheDr01ds Fortunately I'm using Windows 11! Should be WSL-2/WSLG? I've attached the details in the question. – James Koh Sep 30 '22 at 15:29
  • @JamesKoh Thanks for the updates, and apologies that I haven't been able to test this out yet -- Some family stuff, hospital and all that, so a bit slowed down at the moment (but these are good distractions sometimes). In the meantime, let me leave a short "comment-answer" in hopes that it gets you in the right direction. You may have the right package(s) installed at this point, but the main issue you will run into is that Nautilus uses a user-session D-Bus to communicate with GVFS. See if the D-Bus info in this answer gets you any closer. – NotTheDr01ds Oct 01 '22 at 16:14
  • Running Systemd might also get it to work properly (which was going to be my main test) -- That's now (officially) possible with a recent "beta" WSL for Windows 11. See this answer for details. (Edit, on second thought) -- We may still need a method of starting the D-Bus user-session even with the system-level Systemd running. – NotTheDr01ds Oct 01 '22 at 16:16
  • It's alright, it's a side project so it's not that urgent. Btw, I got it working using your first answer! wsl ~ -e dbus-launch bash and it works! So do I need to launch my Ubuntu like this every time? Is there a way I can launch with D-bus by default? – James Koh Oct 04 '22 at 04:42

1 Answers1

1

Using Connect to Server requires D-Bus user session, which is not run automatically in WSL.

Launching your Ubuntu shell with the following command will give you D-Bus support, referring to this answer provided by NotTheDr01ds

wsl ~ -e dbus-launch bash # Or your preferred shell

and Connect to Server will be accessible.