The below steps gave me an auto-starting desktop-effects-tolerant vnc. I haven’t been able to fine one spot that gives a simple method to getting a working vnc on kubuntu, until now:
Make a backup of the MIT-COOKIE auth file. Having this file will allow x11vnc to run without being root, eliminating much of the configuration headaches involved.
ps wwaux | grep auth
The file will be located in:
/var/run/xauth
In my case it was: /var/run/xauth/A:0-q6mb8o – but NOTE: This name will change frequently. This is why we need to copy this out in the next step.
Create a new directory in ~/.vnc to store this file:
mkdir ~/.vnc
Copy the MIT-COOKIE file we found above to this location:
The -auth switch points to the MIT-cookie auth file, and -noxdamage prevents Compiz from creating additional display issues. I would suggest changing the RFB or listening port to a non-standard one for security reasons.
Before you get too excited it’s not as easy as just editing that file. This file is locked while nagios is running so you can’t edit anything.
If you stop nagios, however, the contents of status.dat are written to:
/usr/local/nagios/var/retention.dat
And this is where you can have fun!
While nagios is stopped you can edit the data in retention.dat, but I would recommend only using the following to avoid causing ownership problems:
should also work but i don’t have a GUI on my servers here at home so can’t test it.
The key is the name. You can move a comment to another entry by just changing the ‘host_name’ to another valid host.
It appears on each start of nagios any comments with invalid hosts are deleted. So the only way you could change a hostname and retain comments would be to stop nagios – change the host-name in customers.cfg and then also find and replace in retention.dat for the same hostname-change. And restart nagios. (Remember to make sure you don’t fudge up the ownership/permissions)
If you just change the hostname in customers.cfg and restart nagios all old comments are wiped.
Other thoughts:
Entry Type:
entry_type=1 = User Comment
entry_type=2 = System Comments (flapping)
entry_type=4 = Acknowledgements
Fun with linux:
if you wanted to see just the user comments for hosts:
grep -B2 -A9 entry_type.1 retention.dat
if you wanted to find all comments that contain Flubber you first search for retention (and get the 2 lines before and 9 lines after) then grep THOSE results for Flubber (-i = not-case-sensitive):
grep -B2 -A9 entry_type.1 retention.dat | grep -B1 -A10 -i Flubber
To replace the text ‘John’ with ‘John Doe’ you could:
cat retention.dat | sed “s/John/John Doe/g” >retention1.dat
Paste in the below, modifying the variables at the top as necessary:
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: networking
# Default-Start: S
# Default-Stop: 0 6
### END INIT INFO
PATH=”$PATH:/usr/X11R6/bin/”
# The Username:Group that will run VNC
export USER=”brian”
#${RUNAS}
# The display that VNC will use
DISPLAY=”1″
# Color depth (between 8 and 32)
DEPTH=”16″
# The Desktop geometry to use.
#GEOMETRY=”x”
#GEOMETRY=”800×600″
#GEOMETRY=”1024×768″
#GEOMETRY=”1280×1024″
GEOMETRY=”1280×768″
#GEOMETRY=”1440×900″
# The name that the VNC Desktop will have.
NAME=”my-vnc-server”
OPTIONS=”-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}”
. /lib/lsb/init-functions
case “$1″ in
start)
log_action_begin_msg “Starting vncserver for user ‘${USER}’ on localhost:${DISPLAY}”
su ${USER} -c “/usr/bin/vncserver ${OPTIONS}”
;;
stop)
log_action_begin_msg “Stoping vncserver for user ‘${USER}’ on localhost:${DISPLAY}”
su ${USER} -c “/usr/bin/vncserver -kill :${DISPLAY}”
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
I found the following script to convert videos to be compatible with the Sanza Fuze player. At the center of it is a script posted to the Sanza Forums. Many thanks to the script author ‘Thomas’. You can find his helpful posts on his Sanza Forum Profile Page.
Step One:
Ensure mencoder is installed, final processing step does require the use of a windows app using wine, so make sure both are installed.
sudo apt-get install mencoder wine unzip
Step Two:
Grab the freeware AVI-MUX program: Website Link, or use the code below.
Extract the zip to your windows ‘program files’ directory as configured in wine. If you haven’t done any customization it is located at: “~/.wine/drive_c/Program Files”
I downloaded the zip to this location and extracted it at this location.
Mine worked fine, but his was acting very flakey. It refused to see any music in sub-folders. If you copied music into the root of the Music share it would see the songs, but it would freeze as soon as it started playing. Both devices successfully had taken the update to the latest firmware.
I had changed the USB settings on my device to ‘MSC’ mode, to prevent ubuntu from thinking it was a camera and allowed me to work with the files in a more pleasant view. In this ‘MSC’ view I saw 5 files in the root of the device including 4 .sys files and a .sdk file.
Just on a wild hunch i copied the .sys files from the working device, to the flakey device and this corrected all issues. Both are now working great, playing all music files and properly seeing sub-folders.
Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg. routers), computer equipment and even devices like UPSs.