How to create a exe to start vnc viewer?

I am trying to create a icon linked to a exe script. I need the script to open vnc viewer,input the ip/port #, then enter password, and execute. The server is all set up. I have been using it with vnc viewer on XP no problems. Without a GUI for the viewer i need some automation help.
thanks for any help.

Is this for Gnome or KDE environment?

Never mind that, here’s an answer for both KDE and Gnome:

In Gnome you right-click on the desktop screen and select to Create launcher. Type=application, Name=vncviewer, command= see below

In KDE you right-click on the desktop screen and select to Create New → Link to application. Click rhe “Applications” Tab and fill in Name= vncviewer, command= see below

Use this command:

vncviewer -user timothy -passwd abcdefgh hostname:n

The hostname is the network name of the vnc server, e.g. suse111 or e.g. 192.168.0.33 or e.g. www.yourdomain.org or e.g. 203.33.156.22
The n is the display number, by default it’s 1, but it can be 1, 2, 3, 4, … etc.

Thank you for the quick response. I should have noted.i am using the LDXE desktop on the linux box connecting to winvnc on the xp machine. I am trying to set it up so family can get to the xp machine to adjust security cams setting when im not around. I need to make it as simple as possible for them. I got the remote decktop viewer gui up and to connect but since winvnc 100% requires a password remote desktop just disconnects soon as it connects. I looked to try to find a way to follow your instruction on LDXE. I know windows well, but linux is new to me. Since it runs well on a older machine. wanted to use it to gather all the camera feeds. Save my 3 grand box for other stuff. If all else fails ill just put windows back on it. They have to be able to take control of the winvnc xp machine. I checked out your page and still lost. Thanks for the help

side note: what i do is network serveral stripped down laptops i have picked up over time.i mounted them behind the sheetrock with vents for cooling.So i try to control all 4 semi-laptops with multiple cams on each. i funnel all those to one machine. I then display all cams on my 23’screen. So if i can remote control the one with Winvnc, i am all set.

You can do it like this:

make a file with these contents:

#!/bin/sh
vncviewer -user timothy -passwd abcdefgh hostname:n

Cal the file whatever you like e.g. “remote”
Put the file in the directory “bin” located at /home/your_username/bin
Make the file executable with this command:

chmod a+x /home/your_username/bin/remote

When the kdz go to the Linux box they just run this command in a window:

remote

and the xp window should open

Thanks for the help.I will just go back to XP. i have to have a one click solution. No keyboard is attached to linux box normally. I can just put the gui interface back like it was and just put with it being slow. Thank you though, i got away from linux years ago because lack of ease doing things. I guess it just hasnt caught up windows yet. As much as i hate windows.I cant justify buying another keyboard just for that. Oh well few years down the road ill try it again some time maybe linux will catch up some day. Couple weeks working on it messed up my server already with the password problem. I’ll have knock a hole and hook up a keyboard get the password back on the main pc. Thanks again. It was worth a shot.

But I am def. going to try out some of your recipes.Wife and kid like my cooking better anyway:)

Good luck with Linux next time. And bon appetit.

PS: I just discovered that the recipe I wrote for the connection doesn’t work to a windows box, just to a Linux box. It’s in the man pages but there is fine print that I missed.