I want to describe what is my problem
I would like to open a specific program with the www-data user via Putty with X11 Forwarding. With the “pi” user it worked after I set the entry “X11Forwarding” to yes in sshd.conf. So when I log in to my Raspberry via Putty and user pi (with X11 forwarding setting), start a GUI program from there it works fine.
With this program I want to access ncdata, which unfortunately is not possible because this directory belongs to the www-data account.
Therefore I tried to execute this command with the following command (after logging into my Raspberry with the pi user (and X11 forwarding):
pi@nextcloudpi:~ $ sudo runuser -l www-data -c fslint-gui
ERROR:
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/ init .py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
/usr/bin/fslint-gui:268: Warning: invalid (NULL) pointer instance
self.widgets = gtk.glade.XML(Filename, WindowName, gettext.textdomain())
/usr/bin/fslint-gui:268: Warning: g_signal_connect_data: assertion ‘G_TYPE_CHECK_INSTANCE (instance)’ failed
That works with the pi user, but in the above Command I use the www-data for the call and then the GTK error message appears, which probably has something to do with X11, since the www-data user has a “nologin” flag and no bash.
That’s why I’m now trying to fix this error - which is actually a Linux-relevant topic, as JimmyKater has already mentioned.
Big thanks to JimmyKater !!!