10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xvfb 起動スクリプト

Last updated at Posted at 2013-01-24

[変えた方がよい]
・ディスプレイ番号やサイズを変数化したほうがよいでしょう

#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops XVfb. \
#              used to provide virtual frame buffer.

# Source function library.
. /etc/init.d/functions

SERVICE="Xvfb"
RETVAL=0

XVFB=/usr/bin/Xvfb

start() {
    echo -n "Starting ${SERVICE}: "
    daemon ${XVFB} :5 -screen 0 800x600x24 &
    echo
}

stop() {
    echo -n "Stopping ${SERVICE}: "
    killproc Xvfb
    echo
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart}"
        RETVAL=1
esac

exit ${RETVAL}
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?