LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-30-2023, 11:00 PM   #1
ajiten
Member
 
Registered: Jun 2023
Posts: 375

Rep: Reputation: 4
Issues in running DDD (visual GDB) on cygwin.


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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (1097).png
Views:	6
Size:	107.8 KB
ID:	41554   Click image for larger version

Name:	Screenshot (1098).png
Views:	8
Size:	188.3 KB
ID:	41556  

Last edited by ajiten; 08-31-2023 at 12:12 AM.
 
Old 08-31-2023, 01:23 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,945

Rep: Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325
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.
 
1 members found this post helpful.
Old 08-31-2023, 01:59 AM   #3
ajiten
Member
 
Registered: Jun 2023
Posts: 375

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by pan64 View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (1101).png
Views:	5
Size:	115.5 KB
ID:	41557  

Last edited by ajiten; 08-31-2023 at 02:05 AM.
 
Old 08-31-2023, 02:30 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,945

Rep: Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325
open the link I posted, it is explained (how to start X on cygwin).
 
Old 08-31-2023, 05:37 AM   #5
ajiten
Member
 
Registered: Jun 2023
Posts: 375

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by pan64 View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (1103).png
Views:	7
Size:	160.0 KB
ID:	41558  

Last edited by ajiten; 08-31-2023 at 06:04 AM.
 
Old 08-31-2023, 05:54 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,945

Rep: Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325Reputation: 7325
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.
 
Old 08-31-2023, 06:06 AM   #7
ajiten
Member
 
Registered: Jun 2023
Posts: 375

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by pan64 View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (1105).png
Views:	9
Size:	163.3 KB
ID:	41559   Click image for larger version

Name:	Screenshot (1109).png
Views:	3
Size:	176.3 KB
ID:	41560  

Last edited by ajiten; 09-01-2023 at 03:03 AM.
 
Old 08-31-2023, 04:21 PM   #8
ajiten
Member
 
Registered: Jun 2023
Posts: 375

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by pan64 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"spot" breakpoints with GDB/DDD knobby67 Programming 6 03-13-2011 11:03 AM
setting up a GDB server under DDD knobby67 Programming 0 10-18-2010 04:53 AM
debug library source in GDB/DDD knobby67 Programming 1 08-25-2009 02:24 PM
how debug kernel with ddd? how debug the kernel with ddd? mjalalynia Linux - Kernel 2 08-25-2008 06:50 AM
sed command to replace ddd.mm.ss.s with ddd:mm:ss.s? johnpaulodonnell Programming 4 06-08-2007 06:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration