 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

4th June 2012, 10:58 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
Well, it seems that what worked for F16 doesn't for F17. I tried the method I'd mentioned above without success, as well as various and sundry alterations.
My only problem with this whole desktop orientation is that it often gets passed blithely into RedHat and that makes my job harder.
At any rate, I worked around this one by creating an /etc/rc.d/rc.local--one has to create it, because they've decided that you don't really need it--which, in fairness, the majority of desktop users don't. For some reason, it starts the VNC session on display :2, and I haven't figured out why, but for our needs, it doesn't really matter, as long as it's consistent.
|

5th June 2012, 09:19 AM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
Hey 54,
When you pointed out that is does start on screen 2, I tried to set it to screen :0 but got a service start failure :
Warning: user:0 is taken because of /tmp/.X0-lock
Remove this file if there is no X server user:0
Since there is a X server session running... I knew that ! (well just now ;-).
For the fun of it, in xtartup, I tried to start Xfce with the 3 following :
startxfce4
exec /bin/sh /etc/xdg/xfce4/xinitrc
/usr/bin/xfce4-session &
Same result... no difference.
I really need to find a way to logon to the existing session...
54, you say that it does not work in 17 !!!???
The code I posted does work on my 17
The only desktop installed is Xfce but I had to use gdm as LXdm was not fun at all.
Lets continue to post here if we develop anything.
Thank for getting back cya next time.
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
Last edited by MotherDawg; 5th June 2012 at 09:21 AM.
Reason: incriminating evidence...
|

5th June 2012, 02:58 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
To be precise, the steps that I posted didn't work for me in F17. It may be because display :1 is being taken up by something.
So, what I did this time: Assuming that user john is the one who will be using vncserver. First, as john, I start vncserver, set a password, Then I kill vnc
I created an /etc/rc.d/rc.local file which reads
Code:
#!/bin/sh
su - john -c vncserver
exit 0
Now, upon restart, it will be begin a vncserver session on display :2. Trying to change the display with the command didn't work (that is, trying vncserver :1), and that might be why the other method didn't work for me--it was trying to start a session on display :1.
So, for now, I'll stick to the rc.local method, quicker, albeit sloppier.
|

6th June 2012, 06:26 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
Ok, now I've got it working without resorting to rc.local. The important thing seems to be that after testing various things, I had to manually remove /tmp/.X11-unix/X2, the socket. Otherwise, for whatever reason (there was a lot of experimenting on my part, so I probably broke something), it wasn't being properly removed. This might also work having it on display :1, but at this point, as we'd been using :2, we are continuing to do so--we meaning us at work.
As per the instructions in the file
Code:
cp /lib/systemd/system/vncserver@.server /etc/systemd/system/vncserver@:2.service
As mentioned, I'm using :2--this would probably work with 1 as well.
If your user name is john, and as john, you've already set your password
Code:
ExecStartPre=/bin/sh -c 'bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l john -c "bin/vncserver %i"
ExecStop=/sbin/runuser -l john -c "bin/vncserver -kill %i"
That ExecStartPre cleans out the /tmp/.X11-unix/X2 socket from last time. As I said, I had to manually remove it the first time, but now it seems to be working successfully.
Be sure to change each /usr/bin/vncserver to /bin/vncserver
Enable it with
systemctl enable vncserver@\:2.service
That \ before the colon seems to be necessary now, at least for me.
Test it with
systemctl start vncserver@\:2.service
So, that's worked for us here.
|

7th June 2012, 12:36 AM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
Yup, you need that kill line to clean up left overs... I figured it too. It was there in the original vncserver@.service file.
Screen :1, :2 or any as long as they're unique.
But friend, /usr/bin/ is the norm now... it goes with systemd.
Direct to /bin is about to get deprecated or something.
Cya
http://Software/systemd/TheCaseForTheUsrMerge at freedesktop.org
and the " Feature " in Fedora 17 :
Features/UsrMove at Fedoraproject.org
As for the escaping the colon, I read somewhere (could not find it again) it depends of the File System. I'm using ext4 and It's not asking me for it. Are you running a dual boot with an NTFS partition ???
Cya
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
|

7th June 2012, 01:32 AM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
As for the bin thing, well, vncserver is in /bin right now.
Whether they'll put it where it's been (no pun intended) forever, back in /usr/bin, I have no idea. I have little faith in modern developers.
As for your question, no, this machine only runs Fedora and it is on ext4.
Now---I may even be wrong about escaping the colon--we were having a lot of problems with this one, and I am pretty sure that I had to escape it to get things working. However, it may have been that by that point, I was getting aggravated and did that (the escape) while also doing something else, that was necessary.
I thought I'd documented all my steps, but as I said in the paragraph above, that might been coincidence. At any rate, doesn't hurt anything, so....
Sigh, at my age, short term memory is the first to go, so now I'm not sure if the sysctrl enable blah blah didn't work because of leaving out the \ or because I forgot to type .service.
|

7th June 2012, 04:57 PM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
I ain't no green either, I had my first computer in 1984 at 22.
No faith in fresh off the school bench coders... " Ah know what ya mean ! "
Good show about documenting, this thread is being linked on other pages. >:-D
To recap, this is my "working" systemd vncserver setup running on a fully updated F17:
/etc/systemd/system/vncserver@:1.server
Code:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=UserName1
User=UserName2_etc
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :1 -geometry 1024x768 -depth 16 -securitytypes=none -fp /usr/share/X11/fonts/misc
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target
/home/UserName/.vnc/xstartup
Code:
unset SESSION_MANAGER
export VNCSESSION="TRUE"
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
startxfce4
This returns me a clean service status but my vnc log still giving me errors :
Quote:
vncext: created VNC server for screen 0
/usr/bin/startxfce4: X server already running on display :1
gpg-agent[8139]: a gpg-agent is already running - not starting a new one
xfdesktop[8154]: starting up
(xfwm4:8148): xfwm4-WARNING **: The display does not support the XComposite extension.
(xfwm4:8148): xfwm4-WARNING **: Compositing manager disabled.
(xfce4-settings-helper:8175): xfce4-settings-helper-WARNING **: Failed to get the _NET_NUMBER_OF_DESKTOPS property.
(polkit-gnome-authentication-agent-1:8167): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 8167
libpager-Message: Setting the pager rows returned false. Maybe the setting is not applied.
** Message: applet now removed from the notification area
** Message: applet now embedded in the notification area
|
The Gnome Policy kit error is interesting... I thinking of opening a bug.
Work-work-work...
*** UN*X is sexy! ***
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
Last edited by MotherDawg; 7th June 2012 at 07:56 PM.
|

11th June 2012, 05:23 PM
|
|
Registered User
|
|
Join Date: Mar 2009
Posts: 2

|
|
|
Re: Tiger VNC server
I followed your steps and the vnc server does start, but when I connect to it via a VNC client, I just get a black screen...thoughts?
|

12th June 2012, 05:03 PM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
Hi
Interesting...
First thing first... which Fedora ??? Fully updated ???
Second... can you post your xstartup script ?
Third... beauty is in the details... your black screen, do you have a X cursor that works ?
If yes, your connected to a working vncserver that is giving you a basic X desktop. Your just not starting a Desktop Manager session.
xstartup should finish with a line that starts a new session. From many other sites, there was all kinds of ways to do this. I had the same results with either of the following :
startxfce4
exec /bin/sh /etc/xdg/xfce4/xinitrc
/usr/bin/xfce4-session &
But as you can see, I have dropped the "the crazy" Gnome for a usable WORK station as in Xfce.
If your using any other Desktop Manager, you have to adjust the line that starts it.
If your black screen has nothing... details man !
TTL8tr
*** The opposite of a correct statement is a false statement. The opposite of a profound truth may well be another profound truth. -- Niels Bohr
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
|

15th June 2012, 03:54 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
A quick follow up to some of my earlier posts. MotherDawg, you were correct in all things. If one tries which vncserver it will come back as /bin/vncserver, but /usr/bin/vncserver works without problems.
One doesn't need to escape the colon with a \ on Fedora. Lastly, I'm not sure what happened on the first attempts to set up vncserver, but using :1 works without problem so long as one runs the complete thing that cleans out /tmp/.X11-unix. If it doesn't work the first time, you might have to clean it out manually, once, but it will work after that. (I'm not positive that that was the problem, I couldn't reproduce it in several tests, so just mentioning it as an in case.)
|

16th June 2012, 03:08 PM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
Wohhh !
Kind words my dear smr54. Thank you. I'm beginning to be impress with myself. LoL!
I'm still getting freakish errors in my vnc log file :
Code:
(nm-applet:3121): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed
** Message: applet now embedded in the notification area
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Uhhhhhhhhhhhhhh that laptop runs an ATI graphic... what the hell could be calling nVidia code ???
During all of this, the messages log stay silent !!!
nm-applet is a Gnome Live garbage. I'll have to drop that for WICD one day.
Buggy gnome applets... I would not be having any of this if Gnome2 still existed. AAARGH!!!
Poop on the head of the people who made Gnome3.
Thanks again smr54 and Cya
*** There is no good mechanism how to use similar ways with systemd.
Apparently you can put that on a banner and carry it around.
-- Michal Jaegermann answering a RedHat bug report.
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
|

22nd June 2012, 03:45 AM
|
 |
Registered User
|
|
Join Date: Sep 2010
Location: Quebec, Canada
Posts: 26

|
|
|
Re: Tiger VNC server
Some movement...
My xstartup is now:
Code:
vncconfig -iconic -nowin & <<<<===== Needed for clipboard transfer
unset SESSION_MANAGER
export VNCSESSION="TRUE"
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
/usr/bin/xfce4-session & <<<<===== Seems to be more stable...
SMR54, your page is nice.
Thank you!
__________________
MotherDawg
I do RPMs
I own crappy boxes
GNU/Linux 3.7.9-104.fc17.i686
Last edited by MotherDawg; 22nd June 2012 at 06:33 PM.
Reason: ERROR - ERROR - ERROR...
|

22nd June 2012, 01:11 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Tiger VNC server
No, Thank YOU, for your help with it.
|

28th July 2012, 05:03 AM
|
 |
Registered User
|
|
Join Date: Mar 2012
Location: sa
Age: 22
Posts: 6

|
|
|
Re: Tiger VNC server
i get error in fedora 17
Quote:
[root@myVpsXen ~]# systemctl status vncserver@:1.service
vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled)
Active: failed (Result: exit-code) since Sat, 28 Jul 2012 08:00:05 +0400; 32s ago
Process: 1229 ExecStart=/sbin/runuser -l -c /usrbin/vncserver %i (code=exited, status=127)
Process: 1225 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/vncserver@.service/:1
Jul 28 08:00:05 myVpsXen.com runuser[1229]: pam_unix(runuser-l:session): ses...)
Jul 28 08:00:05 myVpsXen.com runuser[1229]: -bash: /usrbin/vncserver: No suc...y
|
__________________
:-)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 20:07 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|