1753759 Members
4732 Online
108799 Solutions
New Discussion юеВ

Re: VNC Config. on hp-ux

 
SOLVED
Go to solution
Alain Yoshida
Regular Advisor

VNC Config. on hp-ux

I am a newbie to use VNC.
I read the post of http://h30499.www3.hp.com/t5/System-Administration/VNC-on-HP-UX11/m-p/4925032#M408690. In this posting, Bob said "You can launch vncserver multiple times and even as different users; i.e., you could have one vncserver launched as "root" and 2 launched as "user -- each user/vnc will have its own password. Each session will have its own display number ( the ":N" that is shown when you start vncserver)." How to make this, if I want user A and user B use different VNC channel so they don't interrupt each other, I need to copy all the bin files from User A's dir to User B's dir ? also how to generat/reset the User B's password without impact User A ? Thanks

9 REPLIES 9
DeafFrog
Valued Contributor

Re: VNC Config. on hp-ux

Hi Martin ,

you can try to export variable DISPLAY for user A and differently from command line as ,
for user A ,
export DISPLAY=:0.0
Fro user B,
export DISPLAY=:0.1

Hope this helps.
Regards,
FrogIsDeaf
Alain Yoshida
Regular Advisor

Re: VNC Config. on hp-ux

"export variable DISPLAY" can't work in our env. we use Gateway & VPN. Thanks
PeterWolfe
Respected Contributor

Re: VNC Config. on hp-ux

>How to make this, if I want user A and
>user B use different VNC channel so
>they don't interrupt each other

User A does:
vncserver :1
User B does:
vncserver :2

In order to start a VNC session,
user A runs the vnc client and specifies hostname:1.
User b specifies hostname:2.

> also how to generat/reset the User B's password
> without impact User A ?

Both users should first run the vncpasswd command
(on the VNC server side of the connection) to
initially set up their VNC passwords.


>I need to copy all the bin files from User
>A's dir to User B's dir ?

No, you shouldn't need to copy files.
I wasn't sure what files you are referring to here.
Each user ends up with a ~/.vnc directory
for user-specific data. You can place an xstartup
file there to customize your session. For example, on
Linux you could choose to start Gnome or KDE.
Here's a simple example xstartup file:

#!/bin/sh
#

case `uname -s` in

OSF1)
;;

HP-UX)
export USER=$LOGNAME
/usr/dt/bin/Xsession &
;;

Linux)


# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
[ -r $HOME/.Xdefaults ] && xrdb -merge $HOME/.Xdefaults
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session --sm-disable
gnome-session


;;

esac
Alain Yoshida
Regular Advisor

Re: VNC Config. on hp-ux

Thanks Peter, regarding the vncpasswd, per doc http://www.realvnc.com/support/getting-started.html#4, it said ""All your servers on the same Unix machine will use the same password", it means all the user must share same password, Do you use diff password in your vnc env. ? Thanks


Running a Unix server
=======================================
vncserver
If you haven't run a VNC server before you will be prompted for a password, which you will need to use when connecting to this server. "All your servers on the same Unix machine will use the same password", and you can change it at a later date using vncpasswd
===========================================


Patrick Wallek
Honored Contributor

Re: VNC Config. on hp-ux

I just did an experiment on one of my HP-UX servers running VNC.

I already had one VNC server process (server:2) running as usera, with a password set up (via vncpasswd), that I can log into.

I then started another VNC server process (server:3) as userb and set a new password (via vncpasswd). The new password works for the userb VNC server, but NOT for the usera VNC server.

So, the passwords for each user are different as far as VNC is concerned and you can safely have multiple VNC server processes running for different users with a separate (vnc)password for each user.
PeterWolfe
Respected Contributor
Solution

Re: VNC Config. on hp-ux

>it said ""All your servers on the same
> Unix machine will use the same password",
> it means all the user must share same
> password

It's not the clearest documentation.
The "your" is italicized and it's trying
to say that if you, user A, start
three servers (e.g. :1 :2 ;3) then
all *your* servers have the same password.
Certainly true but that's a rather odd
use case since the average user has a VNC single session.

VNC would be a pretty useless tool
if it wasn't per-user. As Patrick noted,
passwords are definitey per-user.
Try it, you'll like it....

Alain Yoshida
Regular Advisor

Re: VNC Config. on hp-ux

Hi Peter,
Thanks for your explanation. I try and it works as you said.

By the way, may I ask another VNC question:
How to copy & paste the contents between VNC and my Windows XP. Thanks
PeterWolfe
Respected Contributor

Re: VNC Config. on hp-ux

Usually it's:

VNC to PC:
- create a selection in the VNC window
- Ctrl-V to past into a Windows window

PC to VNC:
- standard selection then Ctrl-C
- mouse button 2 in the VNC windows
(e.g. for a standard 3 button mouse
x-windows paste). If you only have a two
button mouse, check out VNC's
"Enable 3-button mouse emulation"
setting... then go out a buy a decent
3-button mouse :-) Some mice treat a click
on the scroll wheel as MB2.
Alain Yoshida
Regular Advisor

Re: VNC Config. on hp-ux

Doesn't work in our env. we use HP-UX as vnc server and VNC viewer installed on Windows Xp