开云体育

Gtk-WARNING: cannot open display (./sbitx)


 

I have hit a bricks wall. The sBitx was working a week ago. Now I get the Raspberry Pi to boot up (see photo) but the sbitx executable now won’t start. See the error in the phot of the cmd line. I have reinstalled an entirely new RPi image with a new high end SD card, and downloaded the sbitx software and successfully built the sbitx executable so there is nothing added from my end. As you can see the display itself works well. I’ve also looked into all the files in /var/log and I can’t find anything referring to sbitx.
Please, any suggestions are welcome. Could this possibly be a hardware issue?
罢丑补苍办蝉…


Anthony Good
 

开云体育

Could you post an ‘ls -al’ (no quotes) of your ~/sbitx directory?

On Sep 29, 2022, at 13:41, John Terrell, N6LN <N6LN@...> wrote:

<37483C69-8FA3-41A3-A0F1-A9AE1E9F0A35.jpeg><39C1089C-ABA8-4C36-86F4-8FAC74E6F328.jpeg>I have hit a bricks wall. The sBitx was working a week ago. Now I get the Raspberry Pi to boot up (see photo) but the sbitx executable now won’t start. See the error in the phot of the cmd line. I have reinstalled an entirely new RPi image with a new high end SD card, and downloaded the sbitx software and successfully built the sbitx executable so there is nothing added from my end. As you can see the display itself works well. I’ve also looked into all the files in /var/log and I can’t find anything referring to sbitx.
Please, any suggestions are welcome. Could this possibly be a hardware issue?
罢丑补苍办蝉…



 

Here


Anthony Good
 

开云体育

I see a problem. ?The directory and all the files in it are owned by root. ?You are user pi.

This should fix that:

cd ~?
chown pi:pi ./sbitx
cd ./sbitx
chown -R pi:pi ./*?

( I’m always hesitant to do a recursive action like the one on that last line, but it should stay within the ~/sbitx directory and not hop out of there…. )

On Sep 29, 2022, at 13:49, John Terrell, N6LN <N6LN@...> wrote:

<EB0B7FDD-D82C-4938-AFB0-ED4A0F2C7B56.jpeg>Here


 

Same error?


Anthony Good
 

开云体育

Did you do a ./build again after fixing permissions?

On Sep 29, 2022, at 14:17, John Terrell, N6LN <N6LN@...> wrote:

Same error?<718CA772-0B74-4C08-97BB-65A02A3400F3.jpeg>


 

Are you trying to run sBitx from another computer in a remoteterminal (like Putty)? Not possible.

You need a remote desktop or vnc or ...?

de oz9ny, niels


 

Yes, I did another build. Same error.
as to the other question no, I am not trying VPN. I use the cmd line to show the error. Invoking sBitx by clicking on the GUI icon similarly starts the process but the hangs. See photos. The leftward green icon is used to start sBitx and the rightward free icon shows the process which no longer proceeds. And yes, invoking sbitx as ./sbitx from the sbitx folder through ssh has worked in the past…exactly as doing the same from a terminal on the sBitx screen. I use ssh because it’s easier to read on my larger Windows screen.


Anthony Good
 

开云体育

Could you do:

ps aux|grep X
ps aux|grep lx

(That second line is grep lima x-ray….)

I’m curious to see what the command line is for the Xorg process, and is user pi owns the various lx* processes...

On Sep 29, 2022, at 15:03, John Terrell, N6LN <N6LN@...> wrote:

Yes, I did another build. Same error.
as to the other question no, I am not trying VPN. I use the cmd line to show the error. Invoking sBitx by clicking on the GUI icon similarly starts the process but the hangs. See photos. The leftward green icon is used to start sBitx and the rightward free icon shows the process which no longer proceeds. And yes, invoking sbitx as ./sbitx from the sbitx folder through ssh has worked in the past…exactly as doing the same from a terminal on the sBitx screen. I use ssh because it’s easier to read on my larger Windows screen.<A44174F1-4658-4896-BD67-9DED294470F6.jpeg><0D297338-5745-455B-BCE7-89D1A176FC41.jpeg>


 

Here’s what I got:


 

Also, I've gone through all the logs in /var/log but I can't find any reference to sbitx. Is there an sbitx error log somewhere else?


Anthony Good
 

开云体育

sbitx outputs a few messages on stdout, but nothing of real significance (yet). ?The error you’re seeing is (obviously) from the Gtk library and it’s having problems with Xwindows. ?I’m just not sure what. ?It’s acting like it can’t connect to the Xwindows server. ?That can happen when one launches an X11 app in another tty, but you’re clearly launching within a terminal session within Xwindows. ?I’m stumped at the moment.

On Sep 29, 2022, at 21:50, John Terrell, N6LN <N6LN@...> wrote:

Also, I've gone through all the logs in /var/log but I can't find any reference to sbitx. Is there an sbitx error log somewhere else?


 

The odd thing is that it worked a week ago. Figuring it is a software problem I burned a new image to a new se card and did a new build so that sbitx is now v1.1 but the problem persists. Could it be a hardware issue? ?I’ve rechecked the 40 pin connector. It’s fine. Also the connection to the display board would seem to be good because the screen displays the GUI perfectly. I know very little about Gtk, so adding code to generate debugging messages isn’t very practical.?


Anthony Good
 

开云体育

It’s not an sbitx hardware issue. ?It’s strictly within the Pi.

The IT guy in me wants to tell you to deinstall Xwindows and reinstall, though that may be like throwing a hand grenade.

If you run sbitx like this:

cd ~/sbitx
sudo ./sbitx

…do you still get the error?

On Sep 30, 2022, at 15:32, John Terrell, N6LN <N6LN@...> wrote:

The odd thing is that it worked a week ago. Figuring it is a software problem I burned a new image to a new se card and did a new build so that sbitx is now v1.1 but the problem persists. Could it be a hardware issue? ?I’ve rechecked the 40 pin connector. It’s fine. Also the connection to the display board would seem to be good because the screen displays the GUI perfectly. I know very little about Gtk, so adding code to generate debugging messages isn’t very practical.?


 

Hi John,

Your prior email stated, "on your Windows machine."? ? Is that a Windows10 or 11 OS?? If so, there has been a security update recently, and your Xwindow server on your PC may have been broken.? Try connecting to another Raspberry Pi if you have one.

If it is a flavor of Linux or UNIX, ignore this email.

73
Evan
AC9TU


 

One other thought:

I had an issue with sBitx starting from the icon on the desktop.? The one in the "Raspberry" button drop-down menu under Hamradio still worked.? Will the radio start from that icon?

73
Evan
AC9TU


Anthony Good
 

开云体育

Oh, I see the problem. ?Evan’s message made me go back and look at the pictures in the email thread again. ?You’re attempting to launch sbitx in an ssh session, correct? ?If so, that will not work unless you set an environmental variable to tell the app where to connect to the Xserver.

You need to set a variable in your environment. ?I think it’s DISPLAY, but I can’t seem to get it to work here. ?I’m still trying…. ?Rest assured, this is the problem.



On Sep 30, 2022, at 16:30, Evan Hand <elhandjr@...> wrote:

Hi John,

Your prior email stated, "on your Windows machine."? ? Is that a Windows10 or 11 OS?? If so, there has been a security update recently, and your Xwindow server on your PC may have been broken.? Try connecting to another Raspberry Pi if you have one.

If it is a flavor of Linux or UNIX, ignore this email.

73
Evan
AC9TU


Anthony Good
 

开云体育

I figured it out. ?(This applies if you’re attempting to launch sbitx via an SSH session):

DISPLAY=:0.0
export DISPLAY
cd ~/sbitx
./sbitx

On Sep 30, 2022, at 16:48, Anthony Good via <anthony.good@...> wrote:

Oh, I see the problem. ?Evan’s message made me go back and look at the pictures in the email thread again. ?You’re attempting to launch sbitx in an ssh session, correct? ?If so, that will not work unless you set an environmental variable to tell the app where to connect to the Xserver.

You need to set a variable in your environment. ?I think it’s DISPLAY, but I can’t seem to get it to work here. ?I’m still trying…. ?Rest assured, this is the problem.



On Sep 30, 2022, at 16:30, Evan Hand <elhandjr@...> wrote:

Hi John,

Your prior email stated, "on your Windows machine."? ? Is that a Windows10 or 11 OS?? If so, there has been a security update recently, and your Xwindow server on your PC may have been broken.? Try connecting to another Raspberry Pi if you have one.

If it is a flavor of Linux or UNIX, ignore this email.

73
Evan
AC9TU



 

开云体育

John - it's difficult to troubleshoot your setup since it appears you are trying to do some unique things. It's odd that all the files in your sbitx directory were owned by root. There are other files in your home (pi) directory that will cause problems if they are given root ownership. Were you using git as root when you pulled the files from github?

Are you able to start ANY programs from the command line that open a graphic window on the sbitx display, such as fldigi or xlogo?

Something that may be useful to try is to enter the command xhost + on the command line, then try to run sbitx or another program such as fldigi or xlogo. You normally should not have to do that, but it seems that there's a permission issue with x programs getting access to the display.

73, Steve, N3SB?

-------- Original message --------
From: "John Terrell, N6LN" <N6LN@...>
Date: 9/30/22 3:32 PM (GMT-05:00)
Subject: Re: [BITX20] Gtk-WARNING: cannot open display (./sbitx)

The odd thing is that it worked a week ago. Figuring it is a software problem I burned a new image to a new se card and did a new build so that sbitx is now v1.1 but the problem persists. Could it be a hardware issue? ?I’ve rechecked the 40 pin connector. It’s fine. Also the connection to the display board would seem to be good because the screen displays the GUI perfectly. I know very little about Gtk, so adding code to generate debugging messages isn’t very practical.?


 

开云体育

John - I've been doing some additional research and reading through your previous posts. Do you have an x server running on your windows system? X based programs you run remotely via ssh need an x server to connect to, or you will get the error you are seeing.

If your desktop PC was running linux, you could ssh into the sbitx radio with the command ssh -Y pi@... , and then your desktop running linux would be the x server. You can then start x programs like xlogo, geany, and sbitx, and a window would open on your desktop to allow you to use the program.

Hey - I learned a cool trick while researching this issue! The -Y option with ssh is a really powerful and easy way to remotely control the sbitx.

73, Steve, N3SB?


-------- Original message --------
From: Steve Beckman <n3sb@...>
Date: 9/30/22 5:08 PM (GMT-05:00)
Subject: Re: [BITX20] Gtk-WARNING: cannot open display (./sbitx)

John - it's difficult to troubleshoot your setup since it appears you are trying to do some unique things. It's odd that all the files in your sbitx directory were owned by root. There are other files in your home (pi) directory that will cause problems if they are given root ownership. Were you using git as root when you pulled the files from github?

Are you able to start ANY programs from the command line that open a graphic window on the sbitx display, such as fldigi or xlogo?

Something that may be useful to try is to enter the command xhost + on the command line, then try to run sbitx or another program such as fldigi or xlogo. You normally should not have to do that, but it seems that there's a permission issue with x programs getting access to the display.

73, Steve, N3SB?

-------- Original message --------
From: "John Terrell, N6LN" <N6LN@...>
Date: 9/30/22 3:32 PM (GMT-05:00)
Subject: Re: [BITX20] Gtk-WARNING: cannot open display (./sbitx)

The odd thing is that it worked a week ago. Figuring it is a software problem I burned a new image to a new se card and did a new build so that sbitx is now v1.1 but the problem persists. Could it be a hardware issue? ?I’ve rechecked the 40 pin connector. It’s fine. Also the connection to the display board would seem to be good because the screen displays the GUI perfectly. I know very little about Gtk, so adding code to generate debugging messages isn’t very practical.?