Bash Script to start VNC

Posted on 2011-05-05
Last Modified: 2012-06-21
Can anyone camment on what this line does?

initlog $INITLOG_ARGS -c \
32 "su ${display##*:} -c \"cd ~${display##*:} && [ -f .vnc/passwd ] && vncserver :${display%%:*} -geometry ${WIDTH_HEIGHT} -depth 15 \""

I am stuck

Question by:gquillos
    1 Comment
    LVL 31

    Accepted Solution

    initlog - log messages and events to the system logger
    ${display##*:} -- In the display variable, get the last field when the fields are : delimited/separated
    ${display%%:*} -- first field in a : delimited variable display
    [ -f .vnc/passwd ]  -- checking if you actually have a passwd file under your .vnc folder

    Basically it is logging and providing some parameters.

    More info

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now