LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-23-2007, 09:56 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Rep: Reputation: 34
Question Starting a second session using the VNCserver


Greetings all,

I'm using the following command to start a TightVnc session on my Suse 9.2 box.

vncserver -geometry 800x600 -depth 24

This works just fine and the person on the Windows-XP machine can get to the Linux desk top.

Now another user wants to gain access to the same Linux box (now 2 users).

Would the same command as above be used to start a second VNCserver session so a second user could get in?
And if so what would the second person have to do differently to get into the Linux box from his Windows-XP box after he starts TightVNC?

I'm not in my office now so I can't try this out, I just have to call this person and advise him what to do.

Thank you.
 
Old 03-23-2007, 09:59 PM   #2
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Sorry, I guess what I need to know is this, does either user have to specify some sort of a session number on their windows machine.
 
Old 03-24-2007, 01:46 AM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I use the following to start 2 VNC servers on one of my boxes. From a windows box I use 192.168.2.11:1 and 192.168.2.11:2 for the connections strings for the tightVNC client:
Code:
#!/bin/sh
#

unset VNCSERVERARGS
VNCSERVERS="1:steve 2:oracle"
VNCSERVERARGS[1]="-geometry 1280x960"
VNCSERVERARGS[2]="-geometry 1280x960"

start() {
  echo -n $"Starting VNC server: "
  ulimit -S -c 0 >/dev/null 2>&1

  if [ ! -d /tmp/.X11-unix ]
  then
    mkdir -m 1777 /tmp/.X11-unix || :
  fi
  for display in ${VNCSERVERS}
  do
    echo -n "${display} "
    unset BASH_ENV ENV
    DISP="${display%%:*}"
    export USER="${display##*:}"
    export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
    su - ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
  done
}

stop() {
  echo -n $"Shutting down VNC server: "
  for display in ${VNCSERVERS}
  do
    echo -n "${display} "
    unset BASH_ENV ENV
    export USER="${display##*:}"
    su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
  done
  echo "Done."
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  *)
    echo $"Usage: $0 {start|stop}"
    exit 1
esac
Hope that helps...
 
Old 04-12-2007, 09:18 PM   #4
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Thanks for your reply and I'm sorry I haven't replied earlier.

I guess this is some sort of script, "C" language?

Anyway I'm a newbie and this doens't make to much scense to me at this time. I'm going to have a friend look at this and explain it to me.

But, isn't there a straight command to use which I could enter one at a time?

Thanks again
 
Old 04-12-2007, 09:34 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It's a shell script (bash syntax, in this case) that gets run when the server boots so that I don't have to manually start the vncserver.

You can manually login as the other user and run the same command as you did to get it running for yourself - but that's going to get annoying pretty quickly.
 
  


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
Starting vncserver mickeyboa Fedora 3 08-08-2005 02:47 AM
Starting VNCserver on Mandrake 10.0 archange Linux - Newbie 1 10-01-2004 08:14 PM
How do I clear a stale pts session after vncserver? mindmerge Linux - General 0 04-07-2004 12:07 AM
VNCserver - how to configure session sokar Linux - Software 5 02-04-2004 11:43 AM
Problem starting vncserver bunghole Linux - Networking 2 10-29-2001 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:28 PM.

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