LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Issues in running DDD (visual GDB) on cygwin. (https://www.linuxquestions.org/questions/programming-9/issues-in-running-ddd-visual-gdb-on-cygwin-4175728532/)

ajiten 08-30-2023 11:00 PM

Issues in running DDD (visual GDB) on cygwin.
 
2 Attachment(s)
Please help with why am getting the error message of: Error: Can't open display:
on running ddd on cygwin.

Saw a site after googling, but that too not helpful.
Another site, gave at 2:32 the command: export DISPLAY=:0

But, that command is unclear to me, as the error instead changed to just: Error: Can't open display: :0


Edit: Have installed xorg-server, and xinit, as stated in the point #15, here.
This is shown in the second attachment.
But, still the same problem persists.

pan64 08-31-2023 01:23 AM

to use graphical environment you need to run an X server (even on windows). So start it https://x.cygwin.com/docs/ug/using.html
and you will have a valid display.

ajiten 08-31-2023 01:59 AM

1 Attachment(s)
Quote:

Originally Posted by pan64 (Post 6451135)
to use graphical environment you need to run an X server (even on windows). So start it https://x.cygwin.com/docs/ug/using.html
and you will have a valid display.

Have installed xorg-server on cygwin, apart form xinit, as stated in my earlier post.
There is no 'X server' package, in the list of packages available in cygwin too!

Seems from your post that need run X-server, on Windows.
Tried to run XWinserver on windows, but lead nowhere. The file location of the same had a link only, as shown attached.

pan64 08-31-2023 02:30 AM

open the link I posted, it is explained (how to start X on cygwin).

ajiten 08-31-2023 05:37 AM

1 Attachment(s)
Quote:

Originally Posted by pan64 (Post 6451146)
open the link I posted, it is explained (how to start X on cygwin).

I could only understand the easiest option there, i.e. the command : startx
need be run on cygwin shell.

But, that gives again error, after running of the command:
Code:

startxxterm: Xt error: Can't open display: :3
Also, the running of ddd gives the same error, as shown in the attachment.

==================================================================================================== ====

Edit: As per here, might find some hints to get reason for the error. But, next to impossible to understand for me.
Got this site on googling.

Trying the answer given here, but face problems still, as the file permissions need be changed in order to write to it.

pan64 08-31-2023 05:54 AM

just read the picture you posted. You successfully started that x server (successfully opened the display) and killed. Probably you pressed Ctrl-C or something similar.
You need to keep it running. So open a cygwin terminal, run startx, open another terminal and run ddd or anything else without killing/stopping your X server.

ajiten 08-31-2023 06:06 AM

2 Attachment(s)
Quote:

Originally Posted by pan64 (Post 6451171)
just read the picture you posted. You successfully started that x server (successfully opened the display) and killed. Probably you pressed Ctrl-C or something similar.
You need to keep it running. So open a cygwin terminal, run startx, open another terminal and run ddd or anything else without killing/stopping your X server.

The command: startx, is run again, with the same results, and it temporarily opens up CygwinX window too.
Never terminated it, or any keypress happened.


Edit: Googled, and found the issue exists.
The result, seems has sthg relevant.
Trying to understand it, but ....


Edit#2: I tried the alternative command: startxwin; but it gave correct output, as if the display is running; but nothing like temporary display CygwinX window.
Also not able to run : ddd command, on another cygwin terminal window..
The second attachment shows the output, obtained on running the command.

ajiten 08-31-2023 04:21 PM

Quote:

Originally Posted by pan64 (Post 6451171)
just read the picture you posted. You successfully started that x server (successfully opened the display) and killed. Probably you pressed Ctrl-C or something similar.
You need to keep it running. So open a cygwin terminal, run startx, open another terminal and run ddd or anything else without killing/stopping your X server.

Sorry to bug, but if my last response could have some answer.
That might provide solution approach to similar problems too in future.


All times are GMT -5. The time now is 02:32 PM.