Hey!
I am a complete newbie to FreeBSD and to scripting, too. I read a book, searched a lot in Google and tried on my own not to bother anybody, but I´m stuck and need help, please. So this is my first post and I hope I did it right...
I´m using FreeBSD 8.0p2 64bit as host in Virtualbox 3.1.6 with gnome2 and all ports are and the system is up to date. So far so good...
With the new virtualbox-ose-additions port using the clipboard for the Client is default not enabled. So I´m trying to run a simple command at startup with a rc.d script. I adjusted the script according to the man page and it is working when using it after login in a terminal as root. The echo is shown but the clipboard doesn`t work when starting it through a command in /etc/rc.conf. Here is what it looks like:
I placed it in /home/tom/ and did the following:
As I said, it gets started and
Hope it is a piece of cake for you and you can help me.
Thanks in advance
I am a complete newbie to FreeBSD and to scripting, too. I read a book, searched a lot in Google and tried on my own not to bother anybody, but I´m stuck and need help, please. So this is my first post and I hope I did it right...
I´m using FreeBSD 8.0p2 64bit as host in Virtualbox 3.1.6 with gnome2 and all ports are and the system is up to date. So far so good...
With the new virtualbox-ose-additions port using the clipboard for the Client is default not enabled. So I´m trying to run a simple command at startup with a rc.d script. I adjusted the script according to the man page and it is working when using it after login in a terminal as root. The echo is shown but the clipboard doesn`t work when starting it through a command in /etc/rc.conf. Here is what it looks like:
Code:
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: vboxclipboard
# REQUIRE: DAEMON
# REQUIRE: vboxguest
# KEYWORD: nojail
#
# Add the following lines to /etc/rc.conf
# to enable this service:
#
# vboxclipboard_enable = (bool): Set to NO by default.
# Set it to YES to enable vboxclipboard on startup
. /etc/rc.subr
name="vboxclipboard"
rcvar=${name}_enable
command="/usr/X11R6/sbin/VBoxClient"
start_cmd='${command} --clipboard' && echo "Starting ${name}."
load_rc_config $name
: ${vboxclipboard_enable="NO"}
run_rc_command "$1"
I placed it in /home/tom/ and did the following:
Code:
$ su
$ cp /home/tom/vboxclipboard /usr/local/etc/rc.d/
$ chmod 755 /usr/local/etc/rc.d/vboxclipboard && chmod +x /usr/local/etc/rc.d/vboxclipboard
$ /usr/local/etc/rc.d/vboxclipboard onestart
As I said, it gets started and
is shown during startup, but the clipboard doesn`t work. Only thing I know is that it has to be run as root, but I don`t know how to do that. Perhaps it is started in the wrong order, but I told it to be started after vboxguest.Starting vboxclipboard.
Hope it is a piece of cake for you and you can help me.
Thanks in advance