From 08ede14dfeb6d3dfbdc5668c5b9cff5c215e009a Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Mon, 2 Aug 2021 23:23:31 +1200 Subject: [PATCH] vncserver: refactor --- unix/vncserver | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 494e1b7..2000a39 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -125,9 +125,8 @@ unless (&IsXvncRunning()) { warn "\nNew '$desktopName' desktop is $host:$displayNumber\n"; warn "\nUsername: $vncUserName\n\n"; -# Create the user's xstartup script if necessary. if (! $skipxstartup) { - &CreateXstartup(); + &CreateXstartupIfNeeded(); } # Create the user's config file if necessary. @@ -618,7 +617,7 @@ sub SanityCheck } } -sub CreateXstartup +sub CreateXstartupIfNeeded { if ((-e "$xstartupFile")) { return;