[SOLVED] vnc: black screen with KDE/Plasma (mga6)

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] vnc: black screen with KDE/Plasma (mga6)

Postby magfan » Jan 17th, '18, 10:19

I need a vncserver running on my workstation to send the graphical output of some programs there. But occasionally I have to login that server to see what is going on. This was working with mga5 but now with mga6 I will see only a black screen with a KDE message box: "Plasma is unable to start as it couldn't correctly use OpenGL 2. Please check that your graphic drivers are set up correctly." Any idea how to overcome this problem? Where could I choose a different window manager if KDE/Plasma causes this problem?
Last edited by magfan on Jan 18th, '18, 17:05, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: vnc: black screen with KDE/Plasma (mga6)

Postby wintpe » Jan 17th, '18, 13:46

Hi Magfan

interpreting your problem, im guessing you mean you have a server running mageia and a workstation, the server is headless and you want to view its desktop on your workstation.

That should be possible with vnc, but i must admit ive not tried vnc recently because this is not how unix people run servers, maybe windows people do it that way.

instead of running a graphical desktop on the server, why not enable sshd and administer the server via the command line.

This is how those of us who are loosely termed unix system admins work all the time.

if your using your so called server to run desktop apps then maybe you should know that Xwindows has the ability to start an app on one system, and display it on another.

its done either with Xforwarding enabled in ssh automatically (ssh will set your DISPLAY=workstationaddress:10.0

or without ssh tunneling by explicitly setting the DISPLAY=worksattionaddress:0.0, followed by export DISPLAY

then just start the app on the server using an ssh connection and it will appear on your workstation.

(note, workstation firewall may need to be configured or disabled, and xhost + run in a terminal on your workstation, initially followed by some tweaking once its working to make it secure again)

otherwise a server should serve , by running services that workstations, tablets, and phones connect to. otherwise its just another desktop that you want to connect to.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: vnc: black screen with KDE/Plasma (mga6)

Postby magfan » Jan 17th, '18, 14:05

No, I have only a workstation. And I have a program based on Matlab which displays a lot of windows while running. The problem with this program is that it will show new windows on the active DISPLAY. So, occasionally there will be windows popping up from that program - no matter which DISPLAY I am currently using. In mga5 I simply sent the output of that program to a vncserver running on my workstation because the program will not start at all if I use the Matlab option "-nojvm" (= no Java). This makes it very hard to make that program run in the background...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: vnc: black screen with KDE/Plasma (mga6)

Postby wintpe » Jan 17th, '18, 15:47

OK i understand now.

there is a way to start a background X server , that does not actually attach to your screen.

Xvfb :10 -ac -screen 0 1024x768x24 &

then start your client like this

DISPLAY=:10 mattlab

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: vnc: black screen with KDE/Plasma (mga6)

Postby magfan » Jan 18th, '18, 09:34

OK, this works. But now I do not have a chance to see any progress of that program, do I?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: vnc: black screen with KDE/Plasma (mga6)

Postby wintpe » Jan 18th, '18, 11:04

nope, but you could attach your vnc server to that display, if thats what you need.

matlab also has a cli mode that allows you to create a m-file and run jobs in the background

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: vnc: black screen with KDE/Plasma (mga6)

Postby magfan » Jan 18th, '18, 13:28

What I have now is the following:

Start a display via systemd service:
Code: Select all
[Unit]
Description=xvfb Service
After=network.target

[Service]
ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset

[Install]
WantedBy=multi-user.target


Attach vncserver to that display via systemd service:
Code: Select all
[Unit]
Description=x11vnc service
After=network.target xvfb.service

[Service]
ExecStart=/usr/bin/x11vnc -display :99 -localhost

[Install]
WantedBy=multi-user.target

Look at the display from a terminal:
Code: Select all
# /usr/bin/vncviewer :0


This works well. But when I close the vncviewer also the vncserver dies. How can I avoid this?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: vnc: black screen with KDE/Plasma (mga6)

Postby wintpe » Jan 18th, '18, 15:49

from the man page

By default x11vnc will not allow the screen to be shared and it will exit as soon as the client disconnects.
See -shared and -forever below to override these protections.

-forever

Keep listening for more connections rather than exiting
as soon as the first client(s) disconnect. Same as -many
To get the standard non-shared VNC behavior where when
a new VNC client connects the existing VNC client is dropped use: -nevershared -forever This method can also be used to guard against hung TCP connections that do not go away.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: vnc: black screen with KDE/Plasma (mga6)

Postby magfan » Jan 18th, '18, 17:04

Thank you Peter! It is working now.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron