You are not logged in.

#1 2015-08-09 23:30:37

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 165

Getting "X Error: BadAccess" when running qt app as root

I'm trying to run a benchmark tools called fiovisualizer (https://01.org/fio-visualizer) which needs to run as root. The tool is reported to run OK under centos, but on arch I get a blank gui and X errors

sudo ./fio-visualizer.py
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x138
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x260000a

I've seen a few folks have similar issues with ssh and X forwarding, but this is running on my local machine

If I run as a normal user the gui loads OK, but I can't run the benchmark tool as it needs root access to block devices.

Thanks for any help

Offline

#2 2015-08-10 01:20:48

smudge
Member
Registered: 2011-03-20
Posts: 158

Re: Getting "X Error: BadAccess" when running qt app as root

Offline

#3 2015-08-10 16:48:51

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 165

Re: Getting "X Error: BadAccess" when running qt app as root

Thanks, none of those techniques work for this Qt4 based app and I can run other X apps without issue as root i.e. sudo firefox, sudo xterm run as expected.

Offline

#4 2015-08-10 17:52:21

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Getting "X Error: BadAccess" when running qt app as root

Try doing...

sudo -i
./fio-visualizer.py

Also are you sure you have all of the dependencies installed?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2015-08-11 02:44:06

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 165

Re: Getting "X Error: BadAccess" when running qt app as root

slithery wrote:

Try doing...

sudo -i
./fio-visualizer.py

Also are you sure you have all of the dependencies installed?

Thanks, tried that, still gets the X Error

I found if I login into gnome as root the app works correctly. Not sure why it does not via sudo etc.

Offline

#6 2015-08-11 07:58:01

allencch
Member
Registered: 2011-03-25
Posts: 120

Re: Getting "X Error: BadAccess" when running qt app as root

Offline

#7 2015-08-11 16:56:47

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 165

Re: Getting "X Error: BadAccess" when running qt app as root

Many Thanks, that link had the answer or at least a workaround

as root user
export QT_GRAPHICSSYSTEM=native

then ./fio-visualizer.py works as expected

Offline

#8 2015-08-12 00:59:39

allencch
Member
Registered: 2011-03-25
Posts: 120

Re: Getting "X Error: BadAccess" when running qt app as root

You can add to ~/.xprofile

Offline

Board footer

Powered by FluxBB