Hey Jorge,

Thanks for your advices.
Well, the part in init.d script that actually starts the server is:

...
    for display in ${VNCSERVERS}
    do
        SERVS=1
        echo -n "${display} "
        DISP="${display%%:*}"
        USER="${display##*:}"
        VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
        runuser -l ${USER} -c \
                "cd ~${USER} &&
                 if [ -r .vnc/passwd ]; then
                         vncserver :${DISP} ${VNCUSERARGS}
...

So it's 

DISP="${display%%:*}"

that actually provides the display number. My scripting skills, unfortunately, 
are too limited to tell what this is doing.
It seems to me however that it is hardcoded. For good measure, I even tried 
changing that SERVS to 0 but when I launched vncserver again it still grabbed :
1. Too bad.
I would not call me an expert on Unix, but I have been working for SAP for 
several years and I've seen a lot of vncserver and I'm sure that on Unix (AIX, 
Solaris at least) vncserver without parameters grabs :0 first.
One could object that Unix are primarily server systems where no X is running 
by default while Linux is equally often used as a server as much as a desktop 
so that :0 is often taken by local console... but then again, vncserver already 
has a mechanism in place that allows it to take the next free display when 
default one is taken so I do not understand why they should have chosen :1 as 
standard implementation. :-/
Regarding the other test... I don't know. It doesn't seem to work now. Not 
even to choose the display number! :-/

Thanks
Marco

>----Messaggio originale----
>Da: jorge.fabre...@gmail.com
>Data: 30/10/2013 17.37
>A: <tigervnc-users@lists.sourceforge.net>
>Ogg: Re: [Tigervnc-users] Setting vncserver defaults
>
>On 10/28/2013 12:18 PM, rus...@inwind.it wrote:
>> First of all: this is not what I want. I do not want that when larry 
launches 
>> the vncserver it runs on display :1, when moe does, it runs on display :2 
etc. 
>> etc.. I would like that whoever launches the server, gets display :0. The 
>> command should always launch display :0, even if I launch it with user 
jonh, 
>> who is not mentioned in VNCSERVERS.
>
>Hi,
>
>I'm not sure about this.  Maybe the binary is hard-coded tod o that and
>the only way to change it is by specifying it.  Try to inspect
>/etc/init.d/vncserver  and perhaps you could come up with your own
>script that does what you want.
>
>
>> Secondarily: the geometry parameter is not taken into account: whenever 
and 
>> however I launch the server, it always has geometry 1200x960, which is the 
last 
>> I set directly via gnome menu: System -> Preferences -> Display. This one 
>> should get overridden, but it's not. I do not know where I can change this 
but 
>> I suspect it is X related, not tiger-vnc related. Yet I do not understand 
why 
>> the geometry is overridden.
>
>Try "-extension RANDR" in the VNCSERVERARGS like this:
>
>VNCSERVERARGS[1]="-geometry 1280x1024 -nolisten tcp -localhost
>-extension RANDR"
>
>HTH,
>Jorge
>

>------------------------------------------------------------------------------
>Android is increasing in popularity, but the open development platform that
>developers love is also attractive to malware creators. Download this white
>paper to learn more about secure code signing practices that can help keep
>Android apps secure.
>http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>_______________________________________________
>Tigervnc-users mailing list
>Tigervnc-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/tigervnc-users
>



------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Tigervnc-users mailing list
Tigervnc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-users

Reply via email to