[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X via vnc lauschen lassen?



Am Donnerstag 27 Dezember 2007 20:12:25 schrieb Christian Knorr:
> ... schaue ich mir mpd später mal an.

Nein, werde ich wohl nicht mehr. Das was ich gebaut habe gefällt mir. So lass' 
ich es.

Hier mal mein Init-Script:
# cat /etc/init.d/amarokvnc
--------------------------------------------------------------------------------------
#!/bin/bash
# Author: Christian Knorr
# Please send feedback to Chris@KnorrC.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

### BEGIN INIT INFO
# Required-Start:
# Should-Start: $ALL
# Default-Start: 2
# Default-Stop: 0 6
# Short-Description: Start Amarok via X-vnc
# Description: Start Amarok via X-vnc
### END INIT INFO

USER=chris
AMAROK_START="vncserver :0 -name amarok -depth 8 -geometry 1250x700"
AMAROK_STOP="vncserver -kill :0"

case "$1" in

    start)
        ( su $USER -c "$AMAROK_START")
        ;;

    stop)
        ( su $USER -c "$AMAROK_STOP")
        ;;

esac
--------------------------------------------------------------------------------------

Damit amarok startet, muss dies noch in /etc/X11/Xsession eingetragen werden.
Ich hab dort direkt dahinter ein "exit 0" eingegeben, damit der Rest der Datei 
nicht abgearbeitet wird. Bis jetzt keine nennenswerte Nachteile fest stellen 
können.

Sieht so aus (Rest abgeschnitten):
# cat /etc/X11/Xsession
--------------------------------------------------------------------------------------
#!/bin/sh
#
# /etc/X11/Xsession
#
# global Xsession file -- used by display managers and xinit (startx)

# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $

set -e

PROGNAME=Xsession
amarok
exit 0
--------------------------------------------------------------------------------------

Ein kleines Problem noch:
Amarok kann ich mit meiner Lösung an der domU nicht beenden, nur killen.
Ich red' jetzt nicht von per vnc auf amarok zugeriffen. Dann kann ich den 
beenden. Nur nicht mit "/etc/init.d/amarokvnc stop".

Einen Lösungsansatz, wie ich amarok mit meinem Init-Script "sanft" beenden 
kann?

MfG, Chris........


Reply to: