Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Running pavr2gui (USB v2 programmer) on Linux?


#1

Hi,
My USB AVR V2 has just arrived and I am trying to get it working. I have installed the utilities but…
Running as a user, I get this message:

me@wsta1:~> /usr/local/bin/pavr2gui
Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.

… and as Root, I get:

# pavr2gui
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.

I guess it is a problem with my local setup, but I am hoping that someone here can tell me how to correct?

I am running openSuSE Leap 15 64bit, with the KDE plasma desktop.

Regards, Martin


#2

Hello, Martin.

I set up an openSUSE Leap 15 x86_64 virtual machine here and chose the KDE Plasma desktop, but I was unable to reproduce the problem you are having.

You might consider using the command-line utility, pavr2cmd, which can do everything that the GUI can do.

If you want more help troubleshooting the GUI, please run strace -o log.txt pavr2gui and then post the resulting log file here so we can see what might be going wrong.

–David


#3

Hi David,
Thank you. I would like to get the GUI working if I can.
The log file is attached.

Regards, Martin
log.txt (4.5 KB)


#4

It looks like the GUI is reading an authentication string called the “MIT-MAGIC-COOKIE-1” from ~/.Xauthority and sending it to your X server, but your X server is replying that the cookie is invalid. If you have not rebooted recently, I recommend doing that, just to see if the problem goes away on its own. If that does not work, please run the following five commands and post the output from each one here:

env | grep DISPLAY
env | grep XAUTH
ls -l ~/.Xauthority
ls -l ~/.local/share/sddm/.Xauthority
xauth info

–David


#5

Hi David,
Thanks for taking the time to look at this. Here is the info requested:

mprowe@Gzunder:~> env | grep DISPLAY
DISPLAY=:0

mprowe@Gzunder:~> env | grep XAUTH
XAUTHLOCALHOSTNAME=Gzunder
XAUTHORITY=/home/mprowe/.Xauthority

mprowe@Gzunder:~> ls -l ~/.Xauthority
-rw------- 1 mprowe users 281 Mar 19 07:48 /home/mprowe/.Xauthority
mprowe@Gzunder:~> ls -l ~/.local/share/sddm/.Xauthority
-rw------- 1 mprowe users 52 Sep 3 2018
/home/mprowe/.local/share/sddm/.Xauthority

mprowe@Gzunder:~> xauth info
Authority file: /home/mprowe/.Xauthority
File new: no
File locked: no
Number of entries: 5
Changes honored: yes
Changes made: no
Current input: (argv):1

mprowe@Gzunder:~>

Regards, Martin


#6

Thanks for the additional information. My newly installed openSUSE Leap machine is a little different from yours.

My machine uses ~/.local/share/sddm/.Xauthority, and ~/.Xauthority does not exist. However, based on the timestamps , I would say that ~/.Xauthority is the right one for you to be using, and you should continue using it.

Another difference is that I only have one entry in .Xauthority, whereas you have 5.

Please run the command below so I can see what entries you have. With this information, I might be able to reproduce the issue here.

xauth list | cut -c -45

(That command uses cut to hide most of the cookie, while still allowing me to see the first 6 digits.)

–David


#7

Hi David,

Well this is interesting (to me;-) anyway)…
I have extended the cut command cope with the longer host names:

mprowe@Gzunder:~> xauth list | cut -c -60
linux-g1sl/unix:0 MIT-MAGIC-COOKIE-1 1107f157d5642c43
gzunder.localnet/unix:0 MIT-MAGIC-COOKIE-1 77753119a7
gzunder/unix:0 MIT-MAGIC-COOKIE-1 094539b703bafe3f933
Gzunder.localnet/unix:0 MIT-MAGIC-COOKIE-1 54c20e2d41
Gzunder/unix:0 MIT-MAGIC-COOKIE-1 d424e4af43179e41c9b

mprowe@Gzunder:~> hostname -A
gzunder.localnet
mprowe@Gzunder:~>

The first entry (shown in red), is the format used by default for my
Virtual openSuSE installations. However, none of the currently installed
VMs have that hostname.
But that is not to say, it is not a leftover from an earlier exercise?
The remaining four seem to be variants on this workstation. See
hostname -A” above.

As I don’t know what is adding these extra entries, I’d like your advice
on how to “clean it up”? Hopefully, that will allow pavr2gui to run?

Best regards, Martin


#8

Did you compile pavr2gui from source, or are you using the pre-compiled binaries we provide in the user’s guide (and in the Resources tab of the product page)?

To clean up those extra entries, you could try renaming the .Xauthority file to something else so that the system cannot find it, and then rebooting. The X server should create a new .Xauthority file when it starts up. I do not think that will help though.

I see that your computer’s hostname is “Gzunder” with a capital “G” according to your command prompt, but its fully-qualified domain name is “gzunder.localnet” with a lower case “g”. You have xauth entries that differ from each other only by capitalization. This might be confusing some of the software that works with those cookies. Could you try configuring your computer so that the hostname uses lowercase letters everywhere? If “Gzunder” is coming from /etc/hostname, you can probably just edit that file and reboot.

–David