0

Simple upstart script:

start on startup

exec /usr/bin/vncserver

spawns over 15 instances of Xvnc process.

Soft: tigervncserver on Ubuntu 16.04

If i launch it from shell like $/usr/bin/vncserver it works ordinary and brings up only one server.

Every time vncserver starts from anywhere dmesg shows message:

[ 1694.544180] show_signal_msg: 42 callbacks suppressed

[ 1694.544183] gnome-screensav[3732]: segfault at 0 ip           (null) sp 00007ffd6f4700d8 error 14 in gnome-screensaver[400000+20000]

but works fine after that.

When upstart executing this script I can see in dmesg 13 messages about screensav and message:

[ 2040.250475] traps: gnome-session-b[12217] trap int3 ip:7fdbc39eba6b sp:7fff55f95e20 error:0

some overflow I guess... then it stop to spawn servers.

So how to prevent upstart to restart script even if it results to system error? How to autostart vncserver after login another way then upstart (or systemd) or Ubuntu`s Startup Applications to be sure that it executes only one time? How to fix that error (if someone know it)?

0

Answer for main question:

This simple script run on session startup then it launches vnc server which starts new session and in this session upstart launches this script again. So many instances of Xvnc called recursively. I made some additions to script:

start on startup

script
if [ -z "$(ps -e | grep Xvnc)" ]; then
    /usr/bin/vncserver
fi
end script

now it works fine and brings up only one session.

segfault error still exist but main problem is solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.