When I run
speller.c it says it could not load dictionary. I can't find the dictionaries anywhere in the appliance. Home directory only has jharvard in it and when I put
gedit ~cs50/pset6/dictionaries/large in the command line, it just opens an empty file in gedit.
It looks like the problem here is how you're using the tilde
~ character; you need to separate it from the
cs50 subfolder with a forward-slash
~ is a special character recognized by the cs50 appliance's command-line interpreter, or shell, as a shortcut for your home directory. When you issue a shell command with an unquoted tilde, the interpreter replaces that special character with the contents of the
$HOME environment variable.
When you are logged into the appliance normally, the
$HOME environment variable should contain the path
/home/jharvard. You can check this by issuing the commands
echo $HOME and
echo ~ in the shell; they should both print the same path.
However, if you try
echo ~cs50 you'll see that the special character is not expanded. The interpreter only treats it as a shortcut for your home directory when used on its own or in place of a folder name at the beginning of a file path. You're allowed to use the tilde
~ character in file names, so the interpreter won't expand the tilde in
~cs50 in case there is a file named
~cs50 that you're trying to access.
This is the case with all relative path shortcuts - e.g., to run a file in your current directory, you would issue the command as
./filename rather than
.filename. It is possible to create files with the same name as these shortcuts, by escaping or quoting the special characters, but this is a very bad idea; it confuses users and in the worst case could lead to accidental deletion of the home directory.