Include xhost + at auto reboot script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Include xhost + at auto reboot script
# 1  
Old 12-07-2006
Include xhost + at auto reboot script

Below is the startup/stop script for vncservers by end-user.
How can xhost + command include in this script?

Please help. Thank you.

#!/bin/sh
#
# Startup/Stop script for vncservers for some users.
#

case "$1" in

'start')
/bin/rm /tmp/.X11-unix/X0
/bin/su - applprod -c "/export/home/applprod/VNC/vncserver :0"
;;

'stop')
/bin/su - applprod -c "/export/home/applprod/VNC/vncserver -kill :0"
;;

*)
echo "Usage: /etc/init.d/rc.vnc { start | stop }"
;;

esac
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Disable xen machine to auto start on reboot

Hello Guys - I need to disable xen server not to start when the server is rebooted. 1) What is the parameter to be used to do this..below is the entry in my config file... on_reboot = "restart" 2) What is the default behaviors of the xen on reboot ? in case we comment this line from config... (0 Replies)
Discussion started by: saurabh84g
0 Replies

2. UNIX for Dummies Questions & Answers

xhost

Some of my users find that a graphical program I have given them will not run until they type: xhost +local:username where, of course, they substitute in their own user name. My question is what the word "local" is doing there and whether it would work as well without it. Thanks in... (0 Replies)
Discussion started by: Brandon9000
0 Replies

3. UNIX for Dummies Questions & Answers

[solved] Script creation (how to include options in the script)

Hi guys i have written a script which takes the options given to him and execute itself accordingly. for example if a script name is doctortux then executing doctortux without option should made doctortux to be executed in automatic mode i.e. doctortux -a or if a doctortux is needed to run in... (4 Replies)
Discussion started by: pinga123
4 Replies

4. SCO

SCO 5.0 setup auto reboot

Hello, How do a schedule a reboot of a SCO 5.0 box like every wednesday at 3:30 am. Doesn't have a /etc/crontab file like our Suse boxes have. Thanks for any help. (6 Replies)
Discussion started by: benefactr
6 Replies

5. Shell Programming and Scripting

include in script

Hello, I have a script and a second file that contains all parameters needed for the script. How can I include this file in the script ? I tried source but I have a "no such file or directory" error. :) (1 Reply)
Discussion started by: pppswing
1 Replies

6. UNIX for Dummies Questions & Answers

Xhost help

Hi all, I am trying to enable usage of X on 2 servers - ServerA and ServerB. I am logged in as root on ServerA and am trying to add ServerB into the access list of A. I am using this: root@ServerA#> export DISPLAY=localhost:20.0 root@ServerA#> xhost +ServerB I am getting the... (3 Replies)
Discussion started by: vishi
3 Replies

7. UNIX for Dummies Questions & Answers

Include PERL script with in the unix shell script

Hi Gurus, Is it possible to include perl script with in the unix shell script? What would be the general syntax? In the above case, is it required to write the below first two lines of codes? #!usr/bin/sh -x #!usr/bin/perl -w Thanks in advance / Mysore Ganapati. (1 Reply)
Discussion started by: ganapati
1 Replies

8. UNIX for Advanced & Expert Users

Xhost and ILO

I have an application that requires me to disable the restricted access to the X Server libraries by issuing the 'Xhost +' command from a Console Window. It is important that this command is run from the Console Window and not a Terminal Window otherwise the system complains that DISPLAY is not... (0 Replies)
Discussion started by: jimthompson
0 Replies

9. Solaris

SB150 auto reboot

My SB150 machine rebooted itself this week several times, anyone have idea what the problem is, a blaster? :) kidding (2 Replies)
Discussion started by: howhowzz
2 Replies
Login or Register to Ask a Question
script(1)							   User Commands							 script(1)

NAME
script - make record of a terminal session SYNOPSIS
script [-a] [filename] DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the record is saved in the file typescript. See WARNINGS. The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends when the forked shell exits or when Control-d is typed. OPTIONS
The following option is supported: -a Appends the session record to filename, rather than overwriting it. NOTES
script places everything that appears on the screen in filename, including prompts. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a privileged user, that is, root. Be sure that typescript is not a link before running script. SunOS 5.11 30 Jan 2004 script(1)