What is the Firefox equivalent of Windows' %username%?

I'm trying to setup username variables in about:config, notably default download location and browser.cache.disk.parent_directory . When I use the standard %username% variable in these settings, Firefox interprets them literally. Does Firefox have an equivalent %username% variable?
== This happened ==
Every time Firefox opened
== Always

An extension should be able to do that quite easily.<br />
Try this code in the Tools Error Console.<br />
You can create an extension to make the change.
<pre><nowiki>const Cc = Components.classes, Ci = Components.interfaces;
var PB = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).getBranch("");
var PN = "browser.cache.disk.parent_directory";
var curVal = PB.getCharPref(PN);
var userName = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment).get('USERNAME');
newVal = curVal.replace(/%USERNAME%/i, userName);
PB.setCharPref(PN, newVal);
</nowiki></pre>
See also:
* https://developer.mozilla.org/en/nsIPrefBranch
* https://developer.mozilla.org/en/NsIEnvironment

Similar Messages

  • What is the Java equivalent to Windows SystemMetrics?

    Hello,
    I would like to retrieve component metrics on items such as titlebar height, horizontal scrollbar height, default font etc.
    Unfortunately, I want to know the information without neccessarily having an instance of the control type visible (ie I want to know how high my forms titlebar will be before I create the form).
    The reason I need this is to feed information back to a third party product that requires the type of details that you could query from the SystemMetrics available in Windows.
    The tricky part is that the windows app needs to know these details before the Java app has created its first form.
    Any help would be much appreciated,
    thankyou, Sean.

    thankyou camickr,
    that link was very useful - please have the dukes.
    one thing that the link code doesn't give details about is how to find the metrics on the top level containers. Do you have any suggestions?

  • What's the Mac equivalent of Windows Print Setup?

    I can't find where in OS 10.8.5 applications like Numbers or Pages to set margins, page orientation (portrait/landscape), etc. as in Windows Page Setup facility. I also can't find where to set printing in color or B&W.

    The choice of color vs B/W and single sided vs duplex printing is all found in the print dialog -- exactly where in the print dialog is determined by the author of the printer driver software, but it will be in one of the drop down menus in that dialog. In Apple applications such as Pages and Numbers the page setup is found in the File menu or you can access it directly with Shift+Command+P. Margins can be set by going to the View menu and selecting the option to Show Rulers or you can click on the appropriate section of the Inspector pane on the right hand side of the Window. The Pages or Numbers Help section has a lot of tutorial material that will walk you through most of what you need to know.

  • In IE, hitting the 'F4' button would cause a 'dropdown' menu of recent web sites in the address bar; what is the Firefox equivalent of this?

    Hitting 'F4' in IE would display recently visited web sites under the address bar. This made it easy to use the keyboard (rather than the mouse); once the list web sites appeared, you could use the cursor buttons to move to the site you wanted, and hit enter. I can't find a similar feature in Firefox; instead, I have to mouse up to the Awesome Bar, click the little down arrow, and choose.

    See:
    * http://kb.mozillazine.org/Location_Bar_search
    * https://support.mozilla.com/kb/Location+bar+search

  • What is the Firefox equivalent of IE8/Tools/Internet Options/trusted sites/sites?

    My new VPN requires I select its server as a "trusted site". I can do this easily on Internet Explorer, but I don't see how to do this on Firefox.

    I'm not sure you have to. The reason I say that is you probably allow Java applets and JavaScript for all sites already. Therefore, your VPN probably will work. Maybe you might need to make an exception to pop-up blocking. You can do that here:
    Tools > Options > Content, first Exceptions button on the right
    Give it a try?

  • What is the mac equivalent to a right clic on a windows machine

    What is the Mac equivalent to a right click?  I installed Office for Mac 2011 on my macbook pro and I need to right click over a file from an ealier version of Office to make Office 2011 the default version of office.  This is all in preparation to install Lion (Lion won't support Office 2004 and I can't afford to lose access to these files).

    CTRL+click
    CTRL=control (in between the fn and alt/option keys).
    You can also go into System Preferences --> Trackpad and ensure "Secondary Click" is checked so that a two finger tap will act as a "right-click."

  • What is the WinRT equivalent of MediaPlayerLauncher

    WP8 has MediaPlayerLauncher, so what is the WinRT equivalent of MediaPlayerLauncher for WP8.1?
    Hong

    Thanks, Rob. That is what I was looking for. This is a universal apps project. I tested this with the Windows version and it launched the default video player as expected.
    Hong

  • I wonder to know what is the enterprise solution for windows and application event log management and analyzer

    Hi
    I wonder to know what is the enterprise solution for windows and application event log management and analyzer.
    I have recently research and find two application that seems to be profession ,1-manageengine eventlog analyzer, 2- Solarwinds LEM(Solarwind Log & Event Manager).
    I Want to know the point of view of Microsoft expert and give me their experience and solutions.
    thanks in advance.

    Consider MS System Center 2012.
    Rgds

  • What is the earliest version of Windows that you support.  I tried to download a trial of Photoshop and XP is no longer supported.

    What is the earliest version of Windows supprted?

    You're welcome.  For more detail, see:  System requirements | Photoshop
    -Noel

  • What is the difference between Constant Window, Variable Window,Main Window

    hello all
    what is the difference between 1) Constant Window
                                                2) Variable Window
                                                3) Main Window   in SAP SCRIPT

    Hi,
    Window Types
    When defining a form window, you must select a window type for the window.
    You can choose between three types:
    Constant Windows (CONST)
    Variable Windows (VAR)
    Main Windows (MAIN)
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR.
    Therefore, if you create a new window, always use type VAR.
    Variable Windows (VAR) 
    The contents of variable windows is processed again for each page, on which the window appears.
    The system outputs only as much text as fits into the window. Text exceeding the window size is truncated;
    the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike.
    The only difference is that constant windows have the same size throughout the form.
    Main Windows (MAIN) 
    Each form must have one window of type MAIN. Such a window is called the main window of the form.
    For SAPscript forms, the main window has a central meaning:
    It controls the page break.
    It contains the text body that may cover several pages.
    It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to
    output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form.
    The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page.
    This page must not call itself as subsequent page (recursive call), since this would produce an endless loop.
    In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    go through this links:
    In Scripts Variable window and constant wind difference?
    Main Window
    Re: Main Window in SAP Script
    What is the difference between Constant window and variable window?
    Regards
    Adil

  • What is the Oracle equivalent of the Microsoft Access FIRST function?

    Using: Oracle 10gR2 RAC on SUSE Linux 9 (10.2.0.3)
    In the process of converting a Microsoft Access database to Oracle, an Access query is using the FIRST function.
    What is the Oracle equivalent of the Microsoft Access FIRST function?
    In the attempt to convert, the Oracle FIRST_VALUE function was used. However, the same results was not achieved.
    Thanks,
    (BLL)
    Query:
    h2. ACCESS:
    SELECT
         TRE.GCUSNO,
         UCASE([DCUSNO]) AS DCUSNO_STD,
         *FIRST(UCASE([DNAME])) AS DNAME_STD*,
         *FIRST(UCASE([DADDR])) AS DADDR_STD*,
         *FIRST(UCASE([DCITY])) AS DCITY_STD*,
         TRE.DSTATE,
         FIRST(TRE.DZIP) AS DZIP,
         TRE.DREGN,
         TRE.DDIST,
         TRE.DSLSMN,
         TRE.DCHAIN,
         TRE.MARKET,
         TRE.MKTPGM,
         TRE.EUMKT
    FROM
         TRE
    GROUP BY
         TRE.GCUSNO,
         UCASE([DCUSNO]),
         TRE.DSTATE,
         TRE.DREGN,
         TRE.DDIST,
         TRE.DSLSMN,
         TRE.DCHAIN,
         TRE.MARKET,
         TRE.MKTPGM,
         TRE.EUMKT;
    h2. ORACLE:
    SELECT DISTINCT
    TRE.GCUSNO,
    UPPER(TRIM(TRE.DCUSNO)) AS DCUSNO_STD,
    UPPER(TRIM(TRE.DNAME)) AS DNAME_STD,
    UPPER(TRIM(TRE.DADDR)) AS DADDR_STD,
         FIRST_VALUE(UPPER(TRIM(TRE.DNAME)) IGNORE NULLS) OVER (ORDER BY TRE.GCUSNO) AS DNAME_STD,
         FIRST_VALUE(UPPER(TRIM(TRE.DADDR)) IGNORE NULLS) OVER (ORDER BY TRE.GCUSNO) AS DADDR_STD,
         FIRST_VALUE(UPPER(TRIM(TRE.DCITY)) IGNORE NULLS) OVER (ORDER BY TRE.GCUSNO) AS DCITY_STD,
    TRE.DSTATE,
    TRE.DZIP,
    FIRST_VALUE(UPPER(TRIM(TRE.DZIP)) IGNORE NULLS) OVER (ORDER BY TRE.DZIP ASC) AS DZIP,
    TRE.DREGN,
    TRE.DDIST,
    TRE.DSLSMN,
    TRE.DCHAIN,
    TRE.MARKET,
    TRE.MKTPGM,
    TRE.EUMKT
    FROM CRM.TREUP100R TRE
    GROUP BY
    TRE.GCUSNO,
    UPPER(TRIM(TRE.DCUSNO)),
    TRE.DNAME,
    TRE.DADDR,
    TRE.DCITY,
    TRE.DSTATE,
    TRE.DZIP,
    TRE.DREGN,
    TRE.DDIST,
    TRE.DSLSMN,
    TRE.DCHAIN,
    TRE.MARKET,
    TRE.MKTPGM,
    TRE.EUMKT;

    A slight correction to odie's post. I think you want min not max to replicate the Access first function, but see below to be sure. So:
    min(upper(trim(tre.dname))) keep (dense_rank first order by tre.gcusno) as dname_std
    user10860953 wrote:How does one ignore null values?The min and max functions will ignore nulls automatically, so if there is a null value in tre.dname, it will not be be returned, unless all of the values are null. For example:
    SQL> WITH t AS (
      2     SELECT 65 id, 'ABCD' col FROM dual UNION ALL
      3     SELECT 37, 'DEFG' FROM dual UNION ALL
      4     SELECT 65, 'DEFG' FROM dual UNION ALL
      5     SELECT 65, null FROM dual UNION ALL
      6     SELECT 70, null FROM dual UNION ALL
      7     SELECT 70, null FROM dual UNION ALL
      8     SELECT 37, 'ABC' from dual)
      9  SELECT id,
    10         MIN(col) keep (DENSE_RANK FIRST ORDER BY id) min_dname_std,
    11         MAX(col) keep (DENSE_RANK FIRST ORDER BY id) max_dname_std
    12  FROM t
    13  GROUP BY id;
            ID MIN_ MAX_
            37 ABC  DEFG
            65 ABCD DEFG
            70John

  • What is the shortcut to maximize window (full screen) which is normally done by pressing " -- " like key on the right top corner in macbook pro ?

    What is the shortcut to maximize window (full screen) which is normally done by pressing "<-->" like key on the right top corner in macbook pro ?

    There's no <--> key on ANYones keyboard. (Great answer Shootist )
    The other part of his answer is only applicable to certain windows (browsers specifically) as there is NO system wide maximize command in the manner you are asking.
    Apple's "maximize" function (green +) simply maximizes the window to the content, not the screen.
    For other keyboard shortcuts (and of course they may be outdated) try: this

  • How do I pin a website to the Firefox jumplist in Windows 8?

    How do I pin a website to the Firefox jumplist in Windows 8? I am using Firefox version 35. I have one pinned site on my Firefox taskbar jumplist, but can't figure out how to add additional sites.
    Thanks!

    ''jasonf [[#question-1041305|said]]''
    <blockquote>
    How do I pin a website to the Firefox jumplist in Windows 8? I am using Firefox version 35. I have one pinned site on my Firefox taskbar jumplist, but can't figure out how to add additional sites.
    Thanks!
    </blockquote>
    Excellent. Works as advertised!

  • What is the firefox navigation display storing? It's not my most recent sites or even those most accessed ... how can I change it?

    what is the firefox navigation display storing? It's not my most recent sites or even those most accessed ... how can I change it? It seems way out of date to me

    See https://developer.mozilla.org/en/The_Places_frecency_algorithm
    *http://kb.mozillazine.org/places.frecency.(visit_type)VisitBonus
    *http://kb.mozillazine.org/places.frecency.unvisited(place type)Bonus
    See also:
    * http://kb.mozillazine.org/browser.urlbar.default.behavior
    * http://kb.mozillazine.org/Location_Bar_search

  • What is the mac equivalent to adobe acrobat?

    what is the mac equivalent to adobe acrobat?

    Adobe Acrobat. http://www.adobe.com/products/acrobatpro/tech-specs.html
    Stedman

Maybe you are looking for

  • How do I export every calendar in my iCal to an ics file?

    I am trying to export all my calendars from iCal to ane  ics file.  It is exporting calendar events that i have been invited to by others but is not exporting any calendar events that I have created myself.  Please help.  I have gone in and done the

  • Slicing image on different angle and exporting to Dreamweaver ?

    Hi! I think I searched entire web and didn't find the answer.. Is it possible to slice image on different angle not just rectangle ? On images below you can see the section that I'm trying to make a slice and slowly I'm loosing hope because I think I

  • Sonic connector -not supporting  Multi language

    Hi We are using the SONIC connector to show the SAP office mails in UWL notification tab , When the notification content is other than english , system is not supporting , it is giving the output as "???????" . but in the Task Tab every thing is perf

  • Applescript batch convert DOC to TXT with line breaks

    Hey guys, I recently got stuck at work having to convert over 1,000 DOC files to TXT files with line breaks. I've found online several different Applescripts that work great at converting DOC files to TXT files but I can't find one that will do the T

  • X-Fi questi

    Just a couple of questions. What would be considered the "best" X-Fi soundcard available? I would assume it's the Elite Pro, since it's the most expensi've and all. Are there any major problems with the Elite Pro that would deter me from buying it's?