Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem setting display using vnc viewer Post 302490616 by sarbjit on Tuesday 25th of January 2011 09:51:31 AM
Old 01-25-2011
Bug Problem setting display using vnc viewer

Hi All,

I am having a linux machine and i used to work on this machine either directly or by using vncviewer from my windows machine. So everytime i launch new terminal on my vnc view i need to set DISPLAY. So i added the following code in my .cshrc

Code:
if ($?VNCDESKTOP == 1) then
setenv DISPLAY  `echo $VNCDESKTOP | awk '{printf $1}'`
else
setenv DISPLAY ${HOSTNAME}:0
endif

So in this code i am checking that if VNCDESKTOP variable is set, so that means i am using vncviewer and set DISPLAY as per Vncviewer i had opened otherwise i am working directly on Linux machine.

Now this code works fine as long as i work on my own machine. Problem is when i did rsh to some other linux machine.

Problem1:
If i do rsh on my linux standalone machine, then HOSTNAME is changed and else part of code is of no use. So i have to hard code this part. Can some one tell me how can i make it work, i searched on net and found some thing about $REMOTEHOST. So can i use this for this problem.

Problem2:
Problem1 however has a workaround that i can hard code display but problem 2 is more severe. When i do rsh using my vncviewer, i found that VNCDESKTOP is not set there. Hence i again need to set it manually. Is there any other variable or way by which i can detect that i am still on vncviewer and can set DISPLAY.

Thanks
Sarbjit
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

maximized vnc viewer

I would like the vnc viewer to be maxized when it is launched. How to implement this. Thanks (0 Replies)
Discussion started by: cy163
0 Replies

2. UNIX Desktop Questions & Answers

2 questions about VNC viewer

I am using VNC Viewer 4.0 in my windows enviornment. The questions are: 1. how do you switch the applications in VNC enviornment? ALT-tab doesn't work since it just switchs among VNC viewer itself and other windows applications. 2. how to copy/paste the texts from VNC enviornemnt to... (1 Reply)
Discussion started by: princelinux
1 Replies

3. Linux

Copy Paste in VNC Viewer

hi, I am running a VNCserver on my Fedora VMWare virtual machine. I make a VNCViewer connection to that from my Windows XP box. Can I have copy, paste functionality from Fedora to Windows (2 Replies)
Discussion started by: rakeshgupta
2 Replies

4. Solaris

VNC viewer problem

hi all i cant connect to vnc viewer ... when i try it showing follwing error message write/select : connection aborted (10053) Do you wish to attempt to reconnect to 1##.2##.###.1# # help me any one solved before this problem (3 Replies)
Discussion started by: coolboys
3 Replies
XON(1)							      General Commands Manual							    XON(1)

NAME
xon - start an X program on a remote machine SYNOPSIS
xon remote-host [-access] [-debug] [-name window-name] [-nols] [-screen screen-no] [-user user-name] [command ...] DESCRIPTION
Xon runs the specified command (default xterm -ls) on the remote machine using rsh, remsh, or rcmd. Xon passes the DISPLAY, XAUTHORITY and XUSERFILESEARCHPATH environment variables to the remote command. When no command is specified, xon runs 'xterm -ls'. It additionally specifies the application name to be 'xterm-remote-host' and the win- dow title to be '-fIremote-host'. Xon can only work when the remote host will allow you to log in without a password, by having an entry in the .rhosts file permitting access. OPTIONS
Note that the options follow the remote host name (as they do with rlogin). -access Runs xhost locally to add the remote host to the host access list in the X server. This won't work unless xhost is given permission to modify the access list. -debug Normally, xon disconnects the remote process from stdin, stdout and stderr to eliminate the daemon processes which usually connect them across the network. Specifying the -debug option leaves them connected so that error messages from the remote execution are sent back to the originating host. -name window-name This specifies a different application name and window title for the default command (xterm). -nols Normally xon passes the -ls option to the remote xterm; this option suspends that behaviour. -screen screen-no This changes the screen number of the DISPLAY variable passed to the remote command. -user user-name By default, xon simply uses rsh/remsh/rcmd to connect to the remote machine using the same user name as on the local machine. This option cause xon to specify an alternative user name. This will not work unless you have authorization to access the remote account, by placing an appropriate entry in the remote users .rhosts file. BUGS
Xon can get easily confused when the remote-host, user-name or various environment variable values contain white space. Xon has no way to send the appropriate X authorization information to the remote host. X Version 11 Release 6.6 XON(1)
All times are GMT -4. The time now is 04:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy