# tightvnc - Syntax error: Unterminated quoted string



## keithandr1 (Jun 12, 2016)

Does anyone know how to fix the following error? I've been searching for days without any solid clues for FreeBSD, though I've found many instances of the error on Linux systems. This error is received on only one out of two 10.3 systems built at the same time, the other for whatever reason, works perfectly without any changes to the vncserver script.

```
$ vncserver
Syntax error: Unterminated quoted string
Syntax error: Unterminated quoted string
Syntax error: Unterminated quoted string
Syntax error: Unterminated quoted string
Couldn't start Xvnc; trying default font path.
Please set correct fontPath in the vncserver script.
Syntax error: Unterminated quoted string
Syntax error: Unterminated quoted string
Couldn't start Xvnc process.
```
the default, relevant portions of /usr/local/bin/vncserver;

```
# Default configuration of the TightVNC Server:

$geometry = "1024x768";
$depth = 24;
$desktopName = "X";
$vncClasses = "/usr/local/share/tightvnc/classes";   
$vncUserDir = "$ENV{HOME}/.vnc";
#$fontPath = "unix/:7100";
$authType = "-rfbauth $vncUserDir/passwd";

  my @configurableVariables =
  qw(geometry
  depth
  desktopName
  vncClasses
  vncUserDir
  fontPath
  authType
  colorPath
  );
```
I tried setting fontpath to /usr/local/share/fonts/ as well as /usr/local/share/fonts/75dpi and some of the other font directories found in that folder as some of the Linux forums that my searches directed, but I still get that same error. Any advice from someone who has dealt with this issue before would be greatly appreciated.


----------



## SirDice (Jun 13, 2016)

Simplest solution is to install and configure x11-fonts/xfs (this is what unix/:7100 refers to).


----------



## keithandr1 (Jun 16, 2016)

Thanks, I installed x11-fonts/xfs and looked at the config page, added an enable line to rc.conf, and started it manually. Still got an identical error, checked my other build to see if it had been installed as a dependency and it had not. Is there not some other explanation as to why it would not work on only one of two almost identical builds?


----------



## kpa (Jun 16, 2016)

Look for stray quotes in environment variables, simplest way to list them is to run `env`.


----------



## keithandr1 (Jun 16, 2016)

Not 100% sure what that means but nothing looks out of the ordinary when I run that command, and the results from both builds are identical. The env line from running that looks like; 

ENV=/home/***/.shrc 

and this is the only section in that file that is uncommented;

# some useful aliases
alias h='fc -l'
alias j=jobs
alias m=$PAGER
alias ll='ls -laFo'
alias l='ls -l'
alias g='egrep -i'


----------

