customizing GUI-apps possible in Cubic?

Asked by Joe Maier

Hello

Is it possible to configure Apps with their GUI (e.g defining an other download-folder in Firefox)?

Or are there better approaches available?

Thanks!

Joe

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

You can configure just about anything.

The only limitation I've encountered are things that require services to be running in order to perform the configuration; examples include snaps and setting up databases.

However, as long as you know which file to add/modify, you can configure any app.

In the past I used to be able to preset Firefox preferences.
For recent releases for Firefox, Mozilla changes how they configure default preferences.
I don't know exactly what files need to be modified , so you will need to research that.

There are two approaches you can take:

1. Modify files globally

These should be under
    /usr/lib/mozilla
    /usr/lib/firefox
    /usr/share/mozilla

2. Modify template Firefox configuration files for each new user

Inside /etc/skel, create a directory structure called `.mozilla/firefox` (note the dot in front of "mozilla").
All files created inside /etc/skel are copied to each new user's home directory.

The challenge with both approaches is that you *must* not include any user identifies (such as user id) in your configuration files.

Search the Firefox forums to see how the admin configuration is done. (Corporations do this all the time to control which browser features are available to employees).

To get you started, take a look at the files in
    /usr/lib/firefox/defaults/pref
    /home/<your user id>/.mozilla

Revision history for this message
Cubic PPA (cubic-wizard) said :
#2

(In case you didn't already know, remember to click the "Show all files" button in the header bar on the Boot tab to see all the boot configuration files).

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

Also, take a look at Linux Mint's <ISO>/isolinux/isolinux.cfg file.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#4

Please IGNORE comment's #2 and #3. They were meant for a different thread.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

See https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig.

Also, see "User Specific Preferences" section at https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig#w_user-specific-preferences

You can see list of configurable parameters in firefox by going to the "about:config" URL.
(Click the "Show All" below the search box).

An example to set a downloads directory would be something like this.
You would need to add this to a one of the default *.js files files.

    var user = getenv("USER");
    user_pref("browser.download.lastDir", "/home/" + user + "/Downloads");
    user_pref("browser.download.panel.shown", true);

Revision history for this message
Cubic PPA (cubic-wizard) said :
#6

On Ubuntu, I found that adding preferences to...

    /etc/firefox/syspref.js

...works.

Preferences should be added as show in this example:

    pref("browser.download.useDownloadDir", false);

Remember that going to the URL "about:config" will list all of the preferences you can set.

I found that "user_pref(...)" does not work in this file, but "pref(...)" does work.

Also, "var user = getenv("USER");" doesn't seem to work in `etc/firefox/syspref.js`.

Therefore, I could not set the downloads directory to a folder (such as Documents or Videos) inside the user's home directory.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

"Therefore, I could not set the downloads directory to a folder (such as Documents or Videos) inside the user's home directory."

Setting it to "~/Downloads" might work.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#8

@Manfred,

Thank you!

Using...

    pref("browser.download.lastDir", "~/Documents");

...works like a charm!

Can you help with this problem?

Provide an answer of your own, or ask Joe Maier for more information if necessary.

To post a message you must log in.