Sponsored Content
Top Forums Shell Programming and Scripting not able to start xvfb service via rc script Post 302707883 by chidori on Sunday 30th of September 2012 09:13:08 AM
Old 09-30-2012
not able to start xvfb service via rc script

Hi ,

I am having this start script to start xvfb under rc3.d but it fails during system startup saying unable to open display. also manually if i try to execute the script , it does not work. But if i execute what ever is there in the script line by line on my SHELL , it starts well.

Please help me out

Code:
 
#!/sbin/sh
#+---------------------------------------------------+
#| /etc/init.d/Xvfb
#+---------------------------------------------------+
# Start Virtual frame buffer
RDN=`uname -n`
FQDN=`nslookup $RDN | grep Name | awk '{print $NF}'`
export RDN FQDN
DISPLAY=":1"
export DISPLAY
case "$1" in
start)
        /usr/openwin/bin/Xvfb :1 screen 0 1152x900x8 &
        /usr/openwin/bin/xhost +
        /usr/openwin/bin/twm -display ${FQDN}:1.0 &

        ;;
stop)
        ;;
*)
        echo $"Usage: $prog {start|stop}"
        exit 1
        ;;
esac
exit

I am using solaris 10 .

Error:

Code:
 
/usr/openwin/bin/twm:  unable to open display "test.sol.box:1.0"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Making a Script to Start as a Service

Hi, I have a shell script t1.sh. on my solaris box. So, what are the steps required to make this script run as a Service, when the system re-starts. (for ex:- at run level 3). I know that I should use the rc.d folders. But I don't know the exact steps. Kindly explain, Thanks in... (3 Replies)
Discussion started by: S.Vishwanath
3 Replies

2. Shell Programming and Scripting

Start a service as user

Hi I need a service to be start as user after a reboot. My script in /etc/init.d contain the following: start() { su - $USER cd ${INSTALL_PATH}/bin ./MyApp -X exit return 0 } This function stops after su - $USER, I get user shell, and only if I manualy... (5 Replies)
Discussion started by: potro
5 Replies

3. Programming

MySQL service start error

Hi, I have installed MySql version 5.0.67 in RedHat LINUX version 5. The installation completed successfully. When I am trying to start the service an error occured the error shown below ".......Manager of pid-file quit without updating file" Can anyone help me to fix the problem.... (4 Replies)
Discussion started by: saravanakumar
4 Replies

4. AIX

Q: how to start a service when system start

As topic, assume we have a service called "blahservice" and we can start it by: startsrc -s blahservice what is the best practice to run such command when system start? - directly use mkitab to add it into /etc/inittab or - drop startup scripts in /etc/rc.d/rcX.d I know they... (4 Replies)
Discussion started by: acerlinux
4 Replies

5. Red Hat

vsftpd service failed to start

hi, i am using RHEL 5 and i am not able to on the vsftp i have tried to on the vsftp service using command service vsftpd start Starting vsftpd for vsftpd: i am posting the content of my /etc/xinetd.d/vsftpd file # description: The vsftpd FTP... (2 Replies)
Discussion started by: u.n.i.x
2 Replies

6. Red Hat

VSFTPD Service Failed to Start

Today I have installed VSFTPD but service is failing to start. We have been using standard FTP successful but need to introduce an FTPS option. I have run YUM install VSFTPD and everything appeared to load ok. (If I run rpm - qa | grep vsftpd I get vsftpd-2.0.5-16.el5_4.1 which I... (4 Replies)
Discussion started by: PaulComins
4 Replies

7. Red Hat

Can't start NTOP service/daemon

I have installed version of ntop 4.0.3 by guide. But I can't start ntop daemon/service. I didn't find a service file for starting. During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required. I didn't find in /etc/init.d/... (9 Replies)
Discussion started by: getrue
9 Replies

8. Ubuntu

start service when get login prompt

Hi Team, I am using DRBL environment on Ubuntu. When my machine starts some times it's not starting lxdm & nslcd service. Because of that i didn't get graphic mode & also not able to authenticate user as nslcd is also stops. I have to login as root and restart these two services, then i am able... (0 Replies)
Discussion started by: paragnehete
0 Replies

9. AIX

Start script or service with boot on AIX 7.2

I have installed apache2, but not run with boot in AIX 7.2, how to make it run ? in AIX 7.1 i used : mkitab "apache:2:once:/usr/IBMAHS/bin/apachectl start > /dev/null 2>&1" ### ---> not work in AIX 7.2 (i use 0 in once, because appear emoticon when use :once) Did you know that you can use... (4 Replies)
Discussion started by: penchev
4 Replies

10. Solaris

Not able to start cron service in Solaris 10

Hi, This is Solaris-10 x86. I am not able to start cron service, configured in FMRI. It is in maintenance and when I clear it, it seems like calling and failing on /etc/init.d/tcs-rtm script. I am not able to figure out, why cron is calling that script, if this failure is because of that. Cron... (5 Replies)
Discussion started by: ron323232
5 Replies
xvfb-run(1)						      General Commands Manual						       xvfb-run(1)

NAME
xvfb-run - run specified X client or command in a virtual X server environment SYNOPSIS
xvfb-run [ options ] command DESCRIPTION
xvfb-run is a wrapper for the Xvfb(1x) command which simplifies the task of running commands (typically an X client, or a script containing a list of clients to be run) within a virtual X server environment. xvfb-run sets up an X authority file (or uses an existing user-specified one), writes a cookie to it (see xauth(1x)) and then starts the Xvfb X server as a background process. The process ID of Xvfb is stored for later use. The specified command is then run using the X dis- play corresponding to the Xvfb server just started and the X authority file created earlier. When the command exits, its status is saved, the Xvfb server is killed (using the process ID stored earlier), the X authority cookie removed, and the authority file deleted (if the user did not specify one to use). xvfb-run then exits with the exit status of command. xvfb-run requires the xauth command to function. OPTIONS
-a, --auto-servernum Try to get a free server number, starting at 99, or the argument to --server-num. -e file, --error-file=file Store output from xauth and Xvfb in file. The default is /dev/null. -f file, --auth-file=file Store X authentication data in file. By default, a temporary directory called xvfb-run.PID (where PID is the process ID of xvfb-run itself) is created in the directory specified by the environment variable TMPDIR (or /tmp if that variable is null or unset), and the tempfile(1) command is used to create a file in that temporary directory called Xauthority. -h, --help Display a usage message and exit. -n servernumber, --server-num=servernumber Use servernumber as the server number (but see the -a, --auto-servernum option above). The default is 99. -l, --listen-tcp Enable TCP port listening in the X server. For security reasons (to avoid denial-of-service attacks or exploits), TCP port listen- ing is disabled by default. -p protocolname, --xauth-protocol=protocolname Use protocolname as the X authority protocol to use. The default is '.', which xauth interprets as its own default protocol, which is MIT-MAGIC-COOKIE-1. -s arguments, --server-args=arguments Pass arguments to the Xvfb server. Be careful to quote any whitespace characters that may occur within arguments to prevent them from regarded as separators for xvfb-run's own arguments. Also, note that specification of '-nolisten tcp' in arguments may over- ride the function of xvfb-run's own -l, --listen-tcp option, and that specification of the server number (e.g., ':1') may be ignored because of the way the X server parses its argument list. Use the xvfb-run option -n servernumber, --server-num=servernumber to achieve the latter function. The default is '-screen 0 640x480x8'. -w delay, --wait=delay Ignored for compatibility with earlier versions. ENVIRONMENT
COLUMNS indicates the width of the terminal device in character cells. This value is used for formatting diagnostic messages. If not set, the terminal is queried using stty(1) to determine its width. If that fails, a value of '80' is assumed. TMPDIR specifies the directory in which to place xvfb-run's temporary directory for storage of the X authority file; only used if the -f or --auth-file options are not specified. OUTPUT FILES
Unless the -f or --auth-file options are specified, a temporary directory and file within it are created (and deleted) to store the X authority cookies used by the Xvfb server and client(s) run under it. See tempfile(1). If -f or --auth-file are used, then the specified X authority file is only written to, not created or deleted (though xauth creates an authority file itself if told to use use that does not already exist). An error file with a user-specified name is also created if the -e or --error-file options are specifed; see above. EXIT STATUS
xvfb-run uses its exit status as well as output to standard error to communicate diagnostics. The exit status of '1' is not used, and should be interpreted as failure of the specified command. 0 xvfb-run only uses this exit status if the -h, --help option is given. In all other situations, this may be interpreted as success of the specified command. 2 No command to run was specified. 3 The xauth command is not available. 4 The temporary directory that was going to be used already exists; since xvfb-run produces a uniquely named directory, this may indi- cate an attempt by another process on the system to exploit a temporary file race condition. 5 A problem was encountered while cleaning up the temporary directory. 6 A problem was encountered while using getopt(1) to parse the command-line arguments. EXAMPLES
xvfb-run --auto-servernum --server-num=1 xlogo runs the xlogo(1x) demonstration client inside the Xvfb X server on the first available server number greater than or equal to 1. xvfb-run --server-args="-screen 0 1024x768x24" ico -faces runs the ico(1x) demonstration client (and passes it the -faces argument) inside the Xvfb X server, configured with a root window of 1024 by 768 pixels and a color depth of 24 bits. Note that the demo X clients used in the above examples will not exit on their own, so they will have to be killed before xvfb-run will exit. BUGS
See the Debian Bug Tracking System <http://bugs.debian.org/xvfb>. If you wish to report a bug in xvfb-run, please use the reportbug(1) command. AUTHOR
xvfb-run was written by Branden Robinson and Jeff Licquia with sponsorship from Progeny Linux Systems. SEE ALSO
Xvfb(1x), xauth(1x) Debian Project 2004-11-12 xvfb-run(1)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy