Я использую пакет vino-server по умолчанию для доступа к моей рабочей станции CentOS 6 через VNC.
Он работает нормально, но только ПОСЛЕ того, как я локально вхожу на рабочую станцию. Мне нужно запустить винный сервер ДО входа в систему, прямо на экране входа в Gnome, где я выбираю имя пользователя и пароль.
По личным причинам мне нужно использовать Vino, а не vnc-server или какие-либо другие пакеты.
Я уже пытался вставить / usr / libexec / vino-server &
в / etc / gdm / Init / Default
, но это не решило проблему.
искать сценарий инициализации (/etc/init.d) для vino-server
Обновление: я взломал существующий сценарий запуска, попробуйте поместить его в /etc/init.d/ и запустите updaterc.d параметры vnc-server по умолчанию, я сам не пробовал, но именно его я использовал в качестве скелета для большинства своих сценариев запуска.
### BEGIN INIT INFO
# Provides: vino-server
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: vino-server test script
# Description: This is a test daemon
# This provides example about how to
# write a Init script.
### END INIT INFO
# Using the lsb functions to perform the operations.
. /lib/lsb/init-functions
# Process name ( For display )
NAME=vino-server
# Daemon name, where is the actual executable
DAEMON=/usr/libexec/vino-server
# pid file for the daemon
PIDFILE=/var/run/vino-server.pid
# If the daemon is not there, then exit.
test -x $DAEMON || exit 5
case $1 in
start)
# Checked the PID file exists and check the actual status of process
if [ -e $PIDFILE ]; then
status_of_proc -p $PIDFILE $DAEMON "$NAME process" && status="0" || status="$?"
# If the status is SUCCESS then don't need to start again.
if [ $status = "0" ]; then
exit # Exit
fi
fi
# Start the daemon.
log_daemon_msg "Starting the process" "$NAME"
# Start the daemon with the help of start-stop-daemon
# Log the message appropriately
if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON ; then
log_end_msg 0
else
log_end_msg 1
fi
;;
stop)
# Stop the daemon.
if [ -e $PIDFILE ]; then
status_of_proc -p $PIDFILE $DAEMON "Stoppping the $NAME process" && status="0" || status="$?"
if [ "$status" = 0 ]; then
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
/bin/rm -rf $PIDFILE
fi
else
log_daemon_msg "$NAME process is not running"
log_end_msg 0
fi
;;
restart)
# Restart the daemon.
$0 stop && sleep 2 && $0 start
;;
status)
# Check the status of the process.
if [ -e $PIDFILE ]; then
status_of_proc -p $PIDFILE $DAEMON "$NAME process" && exit 0 || exit $?
else
log_daemon_msg "$NAME Process is not running"
log_end_msg 0
fi
;;
reload)
# Reload the process. Basically sending some signal to a daemon to reload
# it configurations.
if [ -e $PIDFILE ]; then
start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE --name $NAME
log_success_msg "$NAME process reloaded successfully"
else
log_failure_msg "$PIDFILE does not exists"
fi
;;
*)
# For invalid arguments, print the usage message.
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 2
;;
esac
# Example captured from :http://www.thegeekstuff.com/2012/03/lsbinit-script/
& Добавьте его в chkconfig
sudo / sbin / chkconfig --add vnc-server
sudo / sbin / chkconfig --list vnc-server
sudo / sbin / chkconfig vnc-server на