Israel Science and Technology Directory

Internet Apache server

5. Add directory to Favorites folder

Updated on Sept. 1, 2026.

If you do not enter a domain name, it will be shown as "example.com"

This is the fifth and the last optional step for setting up your new localhost directory in Linux Mint. Earlier steps 1-4 established the localhost or web directory at

/var/www/example.com/html

Maintenance of the website requires frequent access to this directory. On Linux File explorer, this requires going into the specific folder which is a time consuming process.

The Favorites folder in Linux file manager Nemo provides quick access to folders you open frequently. To simplify access, I recommend adding the localhost directory to the Nemo Favorites by dragging it into the Favorites folder.

The folder can be also added by a script. For this open a terminal window by using keyboard shortcut Ctl + Alt + T.

Copy the following code and enter in the terminal window.

python3 -c "import subprocess, ast; cmd=['gsettings', 'get', 'org.x.apps.favorites', 'list']; current=ast.literal_eval(subprocess.check_output(cmd).decode().strip().replace('@as', '')); path='file:///var/www/example.com/html'; current.append(path) if path not in current else None; subprocess.run(['gsettings', 'set', 'org.x.apps.favorites', 'list', str(current)])"

Verify that the directory has been added to the Favorites folder by typing the following in the terminal window.

gsettings get org.x.apps.favorites list

If the addition worked, the list should include the following:
['file:///var/www/example.com/html']

Credits

The python script was suggested by Gemini.

ADVERTISEMENT