• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

Bash Script to start VNC

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

Cheers
GQ
0
gquillos
Asked:
gquillos
1 Solution
 
farzanjCommented:
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 http://linux.die.net/man/1/initlog
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now