Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm trying to run gedit in cygwin, but receiving error

Tags:

cygwin

gedit

I'm trying to run some normal text editor in cygwin (version 2.4.1(0.293/5/3)). I've really disappointed and frustrated with emacs :( So I downloaded and installed gedit as a part of cygwin package, but when I'm trying to run it, I receive:

$ gedit

Unable to init server: Could not connect to 127.0.0.1: Connection refused

(gedit:8196): Gtk-WARNING **: cannot open display:

I understand that it can be somehow connected with security issues (it runs on multiuser win10 PC), but I cannot find out how to solve it....

Please help!

like image 243
mibo6700 Avatar asked Mar 24 '16 20:03

mibo6700


1 Answers

I was having the same problem and was able to solve. Your case may be the same

  1. install Cygwin/X

  2. open cygwin and start x11 server by typing

    startxwin >/dev/null 2>&1 &

  3. set DISPLAY environment variable as explained here by typing

    export DISPLAY=:0.0

  4. Start gedit normally

like image 91
user2759511 Avatar answered Oct 14 '22 04:10

user2759511