Linux / UNIX Tech Support Forum
This is a discussion on Help with Automating VNC Setup within the Shell scripting forums, part of the Development/Scripting category; Greetings, i am a noob with shell scripting, just now started, i am trying to automate the VNCserver setup, for ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Greetings,
i am a noob with shell scripting, just now started, i am trying to automate the VNCserver setup, for which i have created a small script, please someone could correct it vnc.sh ===== Code:
ip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
read -s -p "Enter vnc password : " password
read -p "Enter the VNC Port Number: " port
echo $password | vncserver :$port -stdin $password
echo "your VNc Details are:"
echo "---------------------"
echo "Hostname :" $ip:$port
echo "Password :" $password
echo "---------------------"
./vnc.sh Enter vnc password : Enter the VNC Port Number: 24 You will require a password to access your desktops. getpass error: Invalid argument i have installed vnc4server on debian, please help regards, Esha Last edited by nixcraft; 11-15-2009 at 01:17 PM. |
| Sponsored Links | ||
|
|
|
||||
|
Code:
echo $password | vncserver :$port -stdin $password Update your script as follows Code:
#!/bin/bash
ip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
read -p "Enter the VNC Port Number: " port
echo "Password setup:"
vncpasswd
echo "your VNc Details are:"
echo "---------------------"
echo "Hostname :" $ip:$port
#echo "Password :" $password
echo "---------------------"
__________________
Vivek Gite Linux Evangelist Last edited by nixcraft; 11-15-2009 at 01:23 PM. |
|
|||
|
thnx vivek, i need to automate it too, because if i use vncpasswd, i need to type it, is there anyother method where i can stdin the password, after getting it
like Code:
read -s -p "Enter vnc password : " password read -p "Enter the VNC Port Number: " port regards, Esha |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Setup Wireles | hoefman | Linux hardware | 0 | 04-15-2008 02:30 AM |
| about new mail server setup | jhn_daz@yahoo.com | Mail Servers | 2 | 11-01-2007 09:43 AM |
| New user setup in sam | swillet | HP-UX | 2 | 07-18-2007 08:19 PM |
| Sandmail Setup | diptanjan | Mail Servers | 2 | 06-19-2007 09:53 AM |
| SpamAssassin setup. | diptanjan | Mail Servers | 4 | 06-08-2007 09:48 AM |