LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-15-2021, 01:01 PM   #1
tanbir91
LQ Newbie
 
Registered: Sep 2021
Posts: 3

Rep: Reputation: Disabled
Angry VNC on startup shows black screen on Fedora 25, manually starting "vncserver" works


Hi All,

I used to run FC19 earlier, and used to edit "etc/systemd/system/vncserver@:1.service.
Changes made in the original file (assuming, I am user "root"):
Code:
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
ExecStop=/sbin/runuser -l root -c "/usr/bin/vncserver -kill %i"
PIDFile=/root/.vnc/%H*%i.pid
Then, issue the following commands:
Code:
vncpasswd

systemctl daemon-reload
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service
systemctl status vncserver@:1.service
That way, VNC server used to start a :1 display on startup.


After I upgrade to FC25, I tried the same steps, and have the observations as below:
VNC viewer is able to connect to VNC server running, but only a Black Screen is visible.

Later, on following suggestions from a similar post, I tried to change /root/.vnc/xstartup as :
Code:
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#exec /etc/X11/xinit/xinitrc
exec /usr/bin/gnome-session
I am still unable to get the Black screen issue fixed.
NOTE: Then, I issued command: "vncserver" manually, and a display :2 started -- I'm able to view the vnc session :2.

I need the :1 vnc display to start on startup.
Any leads are highly appreciated.

Thanks in advance,
Tanbir
 
Old 09-29-2021, 07:01 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi.
Quote:
...Later, on following suggestions from a similar post, I tried to change /root/.vnc/xstartup as : ...
What posts did you find?

Maybe a simpler search: vnc screen blank



Last edited by jamison20000e; 09-29-2021 at 07:04 PM. Reason: +quote
 
Old 10-03-2021, 12:37 PM   #3
ptf
LQ Newbie
 
Registered: Oct 2021
Posts: 15

Rep: Reputation: Disabled
What is your complete /etc/systemd/system/vncserver@:1.service file?
 
Old 05-18-2022, 05:51 AM   #4
tanbir91
LQ Newbie
 
Registered: Sep 2021
Posts: 3

Original Poster
Rep: Reputation: Disabled
Posting the vncserver@:1.service file

Posting the vncserver@:1.service file

Quote:
# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@.service
# 2. Replace <USER> with the actual user name and edit vncserver
# parameters appropriately
# ("User=<USER>" and "/home/<USER>/.vnc/%H%i.pid")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB's port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
#
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.


[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
User=svtuser

# Clean any existing files in /tmp/.X11-unix environment
#ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i
PIDFile=/root/.vnc/%H%i.pid
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC Viewer shows me a black screen when i am connected. morrison71 Red Hat 1 11-07-2013 09:27 AM
Ubuntu 9.10 frozen screen after startup and black screen on startup DutchieAms Ubuntu 4 01-03-2010 07:29 PM
WEBCAM: Stickam shows black screen when Cheese shows cam 449 Linux - Software 16 08-04-2009 03:23 AM
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 05:33 AM
desktop shows on TV but movie shows black screen litrelord Mandriva 6 07-05-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration