Portál AbcLinuxu, 5. května 2025 10:37
Řešení dotazu:
#!/bin/bash export DISPLAY=:90 Xvfb :90 -screen 0 1024x768x16 & XvfbPID=$! #x11vnc -display :90 -bg -nopw -xkb export `read -rsp "Password: " pass; echo -n "$pass" | /usr/bin/gnome-keyring-daemon --daemonize --login` echo "Launching evolution..." && ck-launch-session dbus-launch --exit-with-session evolution & # Check existence of TCP connection with timeout of 120 seconds, otherwise continue i=0 sleep 5 while [[ $i -lt 120 ]]; do if [[ `lsof -iTCP | grep -E "^evolution"` ]]; then i=$((i+1)) sleep 1 echo $i else break fi done kill -15 $GNOME_KEYRING_PID $XvfbPID sleep 1 # Check if some processes survived and kill'em x=$(tty) && x=${x:5} x=$(ps --no-headers --tty $x -o pid,cmd --sort=-pid -ww | grep -E "evolution|keyring|gamin" | grep -v "grep" | sed 's/^ *\([0-9]*\) .*/\1/') [[ $x ]] && kill -9 $x exit 0
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.