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

Auto Run a process in a Terminal Window



I've posted to VNC's list for some help with this, but after two weeks two posts still no responses. I'm hoping someone on this list can help.

On a Redhat 7 machine I start a VNC session from rc.local with the following:

vnc_users="root"
disp=1
for user in $vnc_users
do
echo -e "Starting VNC server for $user (display no. :$disp)...\c"
vncstart="/usr/bin/vncserver :$disp -depth 16 -geometry 800x600 -name Display1"
vnc_cmd="su -l $user -c \"$vncstart\" >/dev/null"


    if eval $vnc_cmd; then
        echo "DONE"
    else
        echo "***VNC FAILED***"
    fi

    # Run xterm on the vnc session on Linux
    su -l $user -c "DISPLAY=:$disp xterm &"

    disp=$(( $disp + 1 ))
done

I can add another xterm, but I'd also like to run something in that xterm window. For example, start the xterm window and load /usr/stoneware/relay.sh.

Is this possible?

Thanks,
James





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