Plug-ins for working with Nextcloud

Updated 10 June 2020

Nextcloud Plugins

In "nightly" Calculate Linux Desktop builts, we provided two additional browser plug-ins for supporting Nextcloud functionality, namely Passman and FreedomMarks. The first saves site passwords to the Nextcloud password store. The second allows you to work with favorites, all saved on Nextcloud. Plug-ins are installed during the initial profile setup if the corresponding user settings are enabled. This manual describes how to configure a user profile with plug-ins in a browser.

Configuring a new profile

Make sure your plug-in packages are installed or install them if necessary:

emerge -a www-plugins/chrome-passman www-plugins/chrome-freedommarks

To generate a configuration file, call your Nextcloud server:

curl https://guest:PASSWORD@cloud.example.org/apps/passman/api/v2/vaults

..."vault_id":X,"guid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","name":"www" ...

Replace guest with your user login, specify the PASSWORD, and replace cloud.example.org with your server's URL. In the output, look for the string starting with vault_id and ending with www, where www is your password storage. You will need the vault_id and guid values.

Create the user directory and the path to the configuration file:

mkdir -p /home/guest/.calculate

Create the configuration file:

/home/guest/.calculate/ini.env

[user_credentials]
nextcloud_url = https://cloud.example.org
nextcloud_login = guest
nextcloud_pw = PASSWORD
passman_id = 1
passman_guid = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
passman_name = www
passman_pw = PASSWORD
passman_master_pw = calculate
passman_pw_remember = on

Where:

  • nextcloud_url is the server's address
  • nextcloud_login is the user login
  • nextcloud_pw is the Nextcloud pass
  • passman_id is the storage's ID, received from vault_id
  • passman_guid is the storage's GUID, received from guid
  • passman_name is the storage name
  • passman_pw is the storage password
  • passman_master_pw is the password used to encrypt the plug-in data
  • passman_pw_remember tells either to save the plug-in password or prompt again at first launch

Edit the access privileges:

chown -R guest. /home/guest

Delete the mark of the configured session:

rm -f /var/lib/calculate/calculate-desktop/fastlogin/guest

Now log in and launch your Web browser. In the upper right corner, you will see two configured plug-ins, FreedomMarks and Passman:

Installed FreedomMarks and Passman plug-ins

Browser configuration in the current profile

If you wish to completely reconfigure your browser, you can reset its settings. To do this, proceed as explained in the previous section: install the necessary packages if any, obtain the vault_id and guid connections to the server and edit ~/.calculate/ini.env by adding the plug-in settings.

Now remove from ~/.calculate/ini.env the data about Chromium configuration, by deleting the following line:

~/.calculate/ini.env

chromium = 83

Delete the current configuration or backup it to be on the safe side.

rm -rf ~/.config/chromium

Now perform the configuration:

cl-core-setup --pkg-name chromium
 * System configuring for chromium package by Calculate Utilities ...
 * Calculate Utilities have changed files:  
 *      /etc/chromium/password-store-basic  
 *      /usr/share/applications/calculate-browser.desktop  
 *      /usr/share/applications/mimeapps.list  
 * User configuring the chromium package by Calculate Utilities ...
 * Calculate Utilities have changed files:  
 *      /home/guest/.config/chromium/Default/Preferences  
 *      /home/guest/.config/chromium/First Run  
 *      /home/guest/.config/chromium/Local State

Open your browser to check for installed plug-ins.