You are not logged in.

#1 2015-04-04 20:18:01

MickeyRat
Member
Registered: 2011-11-15
Posts: 128

Can't run QT4 applications as root [SOLVED]

I hosed my arch installation (Yes, I did something dumb) and I'm pretty close to done with a reinstall.  However, I have a QT4 application that I need to run as root.  What I'm finding is that root can no longer run QT4 applications.  I can run them under a non-root user but, that's not what I need.  I'm assuming there's a config file I need to fix but, I have no idea where it might be.  When I run a QT4 app, the windows come up blank.  Here's the output on the terminal window when I try to run sudo qtconfig-qt4:

X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x15b
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xa5
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2200012
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 54 (X_FreePixmap)
  Resource id:  0x2200012
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 2 (X_ShmDetach)
  Resource id:  0x2200012

Without the sudo, qtconfig-qt4 runs fine.  Anyone know what I need to do?  Thanks

Last edited by MickeyRat (2015-04-05 11:04:38)


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

#2 2015-04-05 03:34:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Can't run QT4 applications as root [SOLVED]

Don't use sudo for graphical applications. Information on this is in the wiki.

Online

#3 2015-04-05 03:50:19

MickeyRat
Member
Registered: 2011-11-15
Posts: 128

Re: Can't run QT4 applications as root [SOLVED]

Scimmia wrote:

Don't use sudo for graphical applications. Information on this is in the wiki.

Thank you for the reply but, I'm not so sure that's entirely correct.  How would you run something like gparted which  is graphical as an unprivileged user?  I agree you should not run a graphical desktop as root but, individual applications do get run as root pretty frequently.


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

#4 2015-04-05 04:03:22

Svenstaro
Administrator
From: Germany
Registered: 2008-11-19
Posts: 388

Re: Can't run QT4 applications as root [SOLVED]

In visudo, enable the relevant sections.

Offline

#5 2015-04-05 04:36:15

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Can't run QT4 applications as root [SOLVED]

MickeyRat wrote:
Scimmia wrote:

Don't use sudo for graphical applications. Information on this is in the wiki.

Thank you for the reply but, I'm not so sure that's entirely correct.  How would you run something like gparted which  is graphical as an unprivileged user?  I agree you should not run a graphical desktop as root but, individual applications do get run as root pretty frequently.

Again, search the wiki. There's plenty of ways to run graphical apps as root beyond sudo.

Online

#6 2015-04-05 10:56:04

MickeyRat
Member
Registered: 2011-11-15
Posts: 128

Re: Can't run QT4 applications as root [SOLVED]

Svenstaro wrote:

In visudo, enable the relevant sections.

That worked!  Thanks!!!  Something must have changed that made that necessary somewhere along the way.

Again, search the wiki. There's plenty of ways to run graphical apps as root beyond sudo.

Actually this app does have a menu entry that uses one of those ways.  It did the same thing.  I was using sudo because that way I could get the error messages.


Some cause happiness wherever they go; others whenever they go.
- Oscar Wilde

Offline

Board footer

Powered by FluxBB