Subject: qt/kde applications does not work as root.

From: Pascal d'Hermilly <[email-masked]>
Date: Mon, 29 Jul 2013 15:30:03 +0200

Package: x2goclient
Version: 4.0.1.0

When I start qt/kde applications on the x2go server via the x2goclient, I get a grey application and a lot of error messages in the konsole. A workaround seems to be to change the graphicssystem to native instead of raster. However raster is the default in Kubuntu and it doesnt work when running things as root or through sudo.

administrator@desktops-x2go:~$ sudo dolphin --graphicssystem raster
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x420007d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x420007d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x420007d
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x420007d
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 54 (X_FreePixmap)
  Resource id:  0x420007d
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    129 (MIT-SHM)
  Minor opcode: 2 (X_ShmDetach)
  Resource id:  0x420007c
administrator@desktops-x2go:~$ sudo dolphin --graphicssystem native

this works fine. Also gtk applications such as gimp works fine as root.

This is quite a problem when you want to add/remove users and do other administrative things in KDE.

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 30 Jul 2013 00:25:03 +0200

reassign #276 x2goserver
found #276 4.0.1.6
thanks

Hi Pascal,

reassigning this bug report to X2Go Server, not X2Go Client.

On Mo 29 Jul 2013 15:30:03 CEST Pascal d'Hermilly wrote:

> When I start qt/kde applications on the x2go server via the  
> x2goclient, I get a grey application and a lot of error messages in  
> the konsole. A workaround seems to be to change the graphicssystem  
> to native instead of raster. However raster is the default in  
> Kubuntu and it doesnt work when running things as root or through  
> sudo.
>

In x2goruncommand (the server-side script that is responsible for any  
application startup) sets this env var:

"""
# disable rastering in >= KDE4.8 and Qt4.8
export QT_GRAPHICSSYSTEM=native
"""

That piece of info probably gets lost during the sudo call you perform.

Maybe you want to play with /etc/sudoers...

""" special line in sudo
%admins ALL=(ALL) SETENV: /usr/bin/dolphin
"""

And then: sudo dolphin

Does that work?
Mike

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Pascal d'Hermilly <[email-masked]>
Date: Tue, 30 Jul 2013 02:15:59 +0200

> Maybe you want to play with /etc/sudoers... 
adding the following fixes the behaviour
Defaults        env_keep +="QT_GRAPHICSSYSTEM"

(and running : service sudo restart)

I hope the x2go program can setup this by itself in the future.

However quite important is that with Qt5 the "native" qt_graphicssystem is being removed. Will x2go work with qt5 application?

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 30 Jul 2013 10:17:48 +0200

retitle #276 add sudo rule to keep QT_GRAPHICSSYSTEM as env var
thanks

Hi Pascal,

> Defaults        env_keep +="QT_GRAPHICSSYSTEM"

Yes, we can do that.

> However quite important is that with Qt5 the "native"  
> qt_graphicssystem is being removed. Will x2go work with qt5  
> application?
>

Probably not or if then very slow. X2Go does not handle desktop shell  
that do the rendering server-side very well. With widget toolkits that  
do the rendering on the server (as opposed to pushing X objects over  
the network and leave the rendering to the client) X2Go does not  
perform so well.

Greets,
Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: Pascal d'Hermilly <[email-masked]>
Date: Tue, 30 Jul 2013 10:59:00 +0200

Den 30-07-2013 10:17, Mike Gabriel skrev:
> Probably not or if then very slow. X2Go does not handle desktop shell that do the rendering server-side very well. With widget toolkits that do the rendering on the server (as opposed to pushing X objects over the network and leave the rendering to the client) X2Go does not perform so well.
According to http://vizzzion.org/blog/2013/07/the-next-kubuntu-graphics-stack/ Kubuntu 14.10 will ship with KDE Plasma Workspaces 2 (QT5) that depends on wayland. Will x2go be relevant in this setup? the name suggests a dependency of X.
Obviously X will be around for a fair amount of time, but the new KDE will not run on it.

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 30 Jul 2013 11:56:52 +0200

Hi Pascal,

On Di 30 Jul 2013 10:59:00 CEST Pascal d'Hermilly wrote:

>> Probably not or if then very slow. X2Go does not handle desktop  
>> shell that do the rendering server-side very well. With widget  
>> toolkits that do the rendering on the server (as opposed to pushing  
>> X objects over the network and leave the rendering to the client)  
>> X2Go does not perform so well.
> According to  
> http://vizzzion.org/blog/2013/07/the-next-kubuntu-graphics-stack/  
> Kubuntu 14.10 will ship with KDE Plasma Workspaces 2 (QT5) that  
> depends on wayland. Will x2go be relevant in this setup? the name  
> suggests a dependency of X.

X2Go only works with applications that run as X11 clients. The  
x2goagent binary is an X-Server that the applications connect to when  
started.

I cannot image that Qt5 fully lacks X11 support. Only thing is that  
Ubuntu migrates to Mir (not Wayland AFAIK) and heavily pushses  
resources into Qt development (as Unity and Unity Greeter will move to  
Qt as widget framework).

If the upstream people of KDE decide for that path, then X2Go will  
have to make it without KDE.

Greets,
Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: Pascal d'Hermilly <[email-masked]>
Date: Tue, 30 Jul 2013 12:31:18 +0200

Den 30-07-2013 11:56, Mike Gabriel skrev:
> X2Go only works with applications that run as X11 clients. The x2goagent binary is an X-Server that the applications connect to when started.
>
> I cannot image that Qt5 fully lacks X11 support. Only thing is that Ubuntu migrates to Mir (not Wayland AFAIK) and heavily pushses resources into Qt development (as Unity and Unity Greeter will move to Qt as widget framework).
QT5 does not lack X11 support, but as I understand it it will remove the "graphicssystem" arg and raster through mesa.

Also I wrote something wrong. KDE Plasma workspaces 2 support, not depend on, wayland.
Sorry for the misinformation.
//Pascal
>
> If the upstream people of KDE decide for that path, then X2Go will have to make it without KDE.
>
> Greets,
> Mike
>
>
>

---

From: Ricardo Díaz Martín <[email-masked]>
Date: Wed, 31 Jul 2013 07:58:53 +0200

Hi Pascal,

I got the same problem.

2013/7/30 Pascal d'Hermilly <[email-masked]>

> (and running : service sudo restart)

Can you copy/paste the content of your /etc/sudoers? I just tried to add
this line after Defaults and doesn't work for me. I also tried to comment
Defaults

--
<http://www.oceanosoft.com>

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 31 Jul 2013 09:08:52 +0200

Hi Pascal,

> this line after Defaults and doesn't work for me. I also tried to comment

Yes, that would be good. Please provide a file that works when being  
placed into /etc/sudoers.d/.

Thanks!
Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: Pascal d'Hermilly <[email-masked]>
Date: Wed, 31 Jul 2013 10:33:16 +0200

Den 31-07-2013 09:08, Mike Gabriel skrev:
> Yes, that would be good. Please provide a file that works when being placed into /etc/sudoers.d/. 

Actually mine broke again, because I apparently didn't use visudo. Anyway, I made a 3-step guide for getting it to work. This time I tested after a restart ;-)
Do as root:

echo "Defaults        env_keep +=\"QT_GRAPHICSSYSTEM\"" > /etc/sudoers.d/X2Go
chmod 0440 /etc/sudoers.d/X2Go
service sudo restart

---

From: Moritz Struebe <[email-masked]>
Date: Wed, 31 Jul 2013 11:47:40 +0200

On 2013-07-31 10:33, Pascal d'Hermilly wrote:
>
> Actually mine broke again, because I apparently didn't use visudo.
> Anyway, I made a 3-step guide for getting it to work. This time I
> tested after a restart ;-)
> Do as root:
>

Could you put that on the wiki?

Thanks
Morty

-- 
Dipl.-Ing. Moritz 'Morty' Struebe (Wissenschaftlicher Mitarbeiter)
Lehrstuhl für Informatik 4 (Verteilte Systeme und Betriebssysteme)
Friedrich-Alexander-Universität Erlangen-Nürnberg
Martensstr. 1
91058 Erlangen

Tel   : +49 9131 85-25419
Fax   : +49 9131 85-28732
eMail : [email-masked]
WWW   : http://www4.informatik.uni-erlangen.de/~morty

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 31 Jul 2013 12:22:06 +0200

Hi Morty,

> Could you put that on the wiki?

I plan to add such a sudoers.d/x2goserver file in the next release of  
X2Go server.

No need for the wiki page.
Mike

-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy: