LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   vnc and static settings... (https://www.linuxquestions.org/questions/linux-networking-3/vnc-and-static-settings-123571/)

pablovschby 12-07-2003 01:00 PM

vnc and static settings...
 
Hello

I want to run my vnc server with these options: 1000*700;16 color depth; name=vnc....and I made these entries, ....just like it's described on the internet ...
Code:

VNCSERVERS="1:root"
VNCOPTIONS="-geometry 1000x700 -depth 16 -name VNC -alwaysshared "

...but if I start my vnc from the server via ssh like this:
Code:

/etc/init.d/vncserver start
the entries, that I've made .....haven't any effect.......but why???

how can I make these static entries for my router and let them affect the vncserver....???
I've researched every possibility, but .... as far as I've found out.... there aren't any others....

the other problem is, that the vncserver also doesn't start if I define on my kde-gui....->redhat-->system settings->server settings-->services.>that redhat has gotto start my vnc-server automatically....
please help me, thanks
pablo

RolledOat 12-07-2003 01:16 PM

Where are the above options set? The way I do it is to have little scripts (I run many required flavors of VNC, 8 bit color, 800x600, etc.

vncserver -geometry 1000x700 -depth 16 -name VNC -alwaysshared

So long as this is the first VNC session started, it will always be 1. I always just pass in the options
when I start the server. Ahh, found it. /etc/sysconfig/vncservers. Well, that is the problem. These files are used to start a VNC (or more than 1) session at boot time. They have nothing to do and aren't read when a vncserver is started after boot. You may want to see if a vnc server is running before you try starting a new one. If one is running, the second one will be on :2, the thrid on :3, etc.

R.O.

pablovschby 12-07-2003 01:19 PM

Quote:

Originally posted by RolledOat
vncserver -geometry 1000x700 -depth 16 -name VNC -alwaysshared
thanks... yeah...that's my script placed in the folder /etc/rc.d/rc3.d/.....named with "S93vnc".... executable-rights.......there's no problem to run vnc manually....with these parameters...

when my redhat is booting up and executing this script...it reports---> no user is logged on.... -->unsuccessfull......
....mm

RolledOat 12-07-2003 01:20 PM

P.S. If you have a link as to examples of the VNC options in the sysconfig file, I can take a look. Google and VNC web page didn't show them. Maybe it doesn't like one or more of the input parms and is ignoring the string?

R.O.

RolledOat 12-07-2003 01:26 PM

Maybe this will help

http://faq.gotomyvnc.com/fom-serve/cache/86.html

What I always do, that works, is to simply put the required vnc server command in
/etc/rc.local
This is the last file to execute on bootup, and should start the required VNC server session. Have to admit, not a VNC at boot guru. :)

R.O.

pablovschby 12-07-2003 01:35 PM

Quote:

Originally posted by RolledOat
Maybe this will help

http://faq.gotomyvnc.com/fom-serve/cache/86.html

What I always do, that works, is to simply put the required vnc server command in
/etc/rc.local
This is the last file to execute on bootup, and should start the required VNC server session. Have to admit, not a VNC at boot guru. :)

R.O.

I added this line to the file /etc/rc.local:
Code:

/etc/rc.d/rc3.d/vnc
.....and this script was executed, yes....but unssucessfull..... and the vnc-server didn't run....
thanks....for advises

when i log on via ssh and i execute
Code:

/etc/rc.d/rc3.d/vnc
...the vncserver is running and doing well

pablovschby 12-07-2003 01:37 PM

well i commented the line with "VNCOPTIONS=" out of my file /etc/sysconfig/vncservers.... cause I don't know either...if this command exists.....unreliable source-....

so...summary:
when I run /etc/rc.d/rc3.d/vnc as root.....the vncserver is doing well....
but if I run it via /etc/rc.local.....it doesn't start...... (the script is executed "unsuccessfull".....in my os...it's in german ..-->[FEHLGESCHLAGEN]....that means failed...

pablovschby 12-07-2003 01:53 PM

but I think.....it has to be possible...to start vnc automatically...?.....

otherwise that wouldn't be serious...(?)

RolledOat 12-07-2003 02:28 PM

http://www.linuxquestions.org/questi...light=vnc+boot
http://www.linuxquestions.org/questi...light=vnc+boot

Maybe it is as simple as specifying the :1 in the execute command executed from /etc/rc.local
Both these threads, the :1 was required at boot.

R.O.

pablovschby 12-07-2003 02:33 PM

the USER environment variable is not set.....
is what redhat sais to me at the booting process...thanks...

pablovschby 12-07-2003 02:38 PM

Quote:

Maybe it is as simple as specifying the :1 in the execute command executed from /etc/rc.local
Both these threads, the :1 was required at boot.
....???? sorry...but what have i got to define in my /etc/rc.local...

the other two links don't deal with my problem.....(?)..........but thanks anyway

RolledOat 12-07-2003 02:46 PM

Try adding
#!/bin/bash

as the first line of the script before the vncserver command.

R.O.

pablovschby 12-07-2003 02:48 PM

thanks...but the bash is defined.....
this script doesn't run either at boot...:
Code:

#!/bin/bash
set USER = root
vncserver :1 -name VNCServer -depth 16 -geometry 1000x700


pablovschby 12-07-2003 03:05 PM

-

pablovschby 12-07-2003 03:16 PM

ok....it runs with this script as "S93vnc"...:
Code:

#!/bin/bash
export PATH=$PATH:/sbin:/usr/bin:/var/X11R6/bin:/sbin
USER=root
HOME=/root
export USER HOME
vncserver :1 -name VNCServer -depth 16 -geometry 1000x700

...the problem is solved


All times are GMT -5. The time now is 07:25 PM.