0

I'm trying to use gedit editor in Ubuntu terminal on Windows. I don't have a full Linux OS, just installed Ubuntu prompt for Windows from MS store. I need this for my programming course. Is this possible at all? I installed gedit on my PC as well. But when I try to use it in the prompt, comes message "Command 'gedit' not found, but can be installed with: sudo apt install gedit I tried to install it in the suggested by this message way, but it gives me some errors. So I wonder if it's possible. Thank you in advance for help! When I try 'sudo apt install gedit', I'm getting the errors:

Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libjavascriptcoregtk-4.0-18 amd64 2.26.4-0ubuntu0.18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libwebkit2gtk-4.0-37 amd64 2.26.4-0ubuntu0.18.04.1
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/webkit2gtk/libjavascriptcoregtk-4.0-18_2.26.4-0ubuntu0.18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/webkit2gtk/libwebkit2gtk-4.0-37_2.26.4-0ubuntu0.18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
steeldriver
  • 136,215
  • 21
  • 243
  • 336
  • 2
    You will need to resolve the installation errors, then install an appropriate X server in Windows. See for example What's the easiest way to run GUI apps on Windows Subsystem for Linux as of 2018? – steeldriver Apr 18 '20 at 23:19
  • Thanks for the answer. I have no idea how to resolve these errors, neither what they even mean. I checked your link, but there's nothing there I can easily do. Should I consider that there's no easy way to use gedit in my case under Windows? – Nikolay Tonev Apr 19 '20 at 18:02
  • If you want further help, please [edit] your question to include the errors that resulted when you tried sudo apt install gedit – steeldriver Apr 19 '20 at 18:29
  • Thank you, I did that. – Nikolay Tonev Apr 20 '20 at 21:40
  • Thanks - did you remember to run sudo apt update first? the package versions that it's looking for don't appear to be the current ones – steeldriver Apr 20 '20 at 21:44
  • Thank you very much. I think I updated it, upgraded it and installed gedit. Now I have the following problem when I try to create a gedit file: ~$ gedit test Unable to init server: Could not connect: Connection refused (gedit:4417): Gtk-WARNING **: 00:46:11.204: cannot open display: – Nikolay Tonev Apr 20 '20 at 23:51
  • So did you install + start an X server (Xming, VcXsrv or similar) on the Windows system? – steeldriver Apr 21 '20 at 00:03
  • OK, now I installed Xming and I started it. I can now use gedit in the Ubuntu prompt, even though every time I need to input 'ubuntu' in the Xming launcher - a trick which I tried, but am not even sure how it's working. So I can create now gedit files, but I'm still getting lots of error messages, I'll put them here in separate comment. Thank you very much for the help! – Nikolay Tonev Apr 21 '20 at 14:36
  • (gedit:33): GLib-GIO-CRITICAL : 15:29:39.534: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed (gedit:33): dconf-WARNING : 15:29:41.807: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch= --binary-syntax --close-stderr”: Child process exited with code 1 – Nikolay Tonev Apr 21 '20 at 14:38
  • ** (gedit:33): WARNING : 15:30:20.269: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported (gedit:33): dconf-WARNING : 15:30:25.705: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch= --binary-syntax --close-stderr”: Child process exited with code 1 – Nikolay Tonev Apr 21 '20 at 14:38

0 Answers0