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
Xserver(1)						      General Commands Manual							Xserver(1)

NAME
X - X Window System display server dispatcher SYNOPSIS
X [ option ...] DESCRIPTION
: Hewlett-Packard supports two X servers on HP-UX platforms, the Xhp X server which supports HP VISUALIZE graphics devices and the Xf86 X server which supports all other graphics devices. These X servers are delivered as /usr/bin/X11/Xhp and /usr/bin/X11/Xf86. The X dispatcher determines which X server to launch based on the available graphics devices. The control file /etc/X11/Xstart can provide additional guidance to the X dispatcher. The control file allows the user to specify which X server to start for given display connection numbers. The only X servers supported by the X dispatcher are Xhp, Xf86 and Xvfb. If no Xstart file exists, the dispatcher loads the appropriate X server for the graphics device in the system. HP-UX does not deliver the /etc/X11/Xstart file. This file can be created by using the SAM/SMH utility. OPTIONS
If the X dispatcher is invoked with no arguments, the display connection is assumed to be :0. The X dispatcher checks for display connec- tion options and, if found, uses that display connection number when it checks the Xstart file. All other options are passed on to the X server when it is started and it is the X server's responsibility to validate these options. Not all options may be supported on both X servers; refer to Xhp(1) and Xf86(1) to verify supported options for each X server. RETURN VALUE
None Xstart EXAMPLES The control file syntax is the X server to start followed by the display connection number. Valid entries take the form of: Xhp :0 Start the Xhp X server on display connection 0 Xf86 :10 Start the Xf86 X server on display 10 /usr/bin/X11/Xhp :5 Start the Xhp X server on display connection 5 /usr/bin/X11/Xvfb :7 Start the X Virtual Framebuffer server on display connection 7 FILES
/etc/X11/Xstart Dispatcher control file. /var/X11/Xserver/logs/Xstartup.N.log X dispatcher log file for display N. SEE ALSO
X(1), Xhp(1), Xf86(1) STANDARDS CONFORMANCE
See the appropriate section in Xhp(1) or Xf86(1). Xserver(1)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy