#!/bin/bash # # zeigt meinen VNC-Server # . $(dirname ${0})/vncserver.cfg # Xvnc4 :2 -desktop mtiq853:2 (fritz) -auth /home/fritz/.Xauthority -geometry 1280x1024 -depth 24 # ps x | fgrep -v grep | fgrep " ${VNC_OPTIONEN} " | fgrep -i vnc VNC_PID="$(ps x | fgrep -v grep | fgrep " ${VNC_OPTIONEN} " | fgrep -i vnc | awk '{print $1}')" VNC_PORT="$(ps x | fgrep -v grep | fgrep " ${VNC_OPTIONEN} " | fgrep -i vnc | awk '{print $6}')" VNC_IP="$(ip a | fgrep -v 127.0.0.1 | fgrep 'inet ' | awk '{print $2}' | awk -F'/' '{print $1}')" if [ "x${VNC_PID}" != x ] ; then echo "# # ${VNC_PID} - ${VNC_IP}${VNC_PORT} #" fi