• Re: Modifying Desktop Icons

    From [email protected]@21:1/5 to Pranjal Singh on Mon Jun 17 22:10:01 2024
    On 6/17/24 15:29, Pranjal Singh wrote:
    Hi,

    I am trying to modify the Firefox desktop icon so that it opens
    an incognito window by default.

    ...

    What I've done is changing /usr/share/applications/firefox.desktop:

    - Exec=firefox %u
    + Exec=firefox -private-window %u

    I also created a desktop file in ~/.local/share/applications, but
    that too didn't work.

    How didn't it work? Did it run regular Firefox, or not run at all?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gareth Evans@21:1/5 to All on Tue Jun 18 02:50:01 2024
    --Apple-Mail-4DFC6773-CED4-48DA-8E74-6EDF8A88B0B8
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable


    On 17 Jun 2024, at 20:45, Pranjal Singh <[email protected]> wrote:

    
    Hi,

    I am trying to modify the Firefox desktop icon so that it opens
    an incognito window by default.

    ...

    - Exec=firefox %u
    + Exec=firefox -private-window %u


    Assuming that's not a typo, please try:

    --private-window

    (NB two hyphens at the beginning)

    This works for me on Mate.
    --Apple-Mail-4DFC6773-CED4-48DA-8E74-6EDF8A88B0B8
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"></div><blockquote type="cite">On 17 Jun 2024, at 20:45, Pranjal Singh &lt;
    [email protected]&gt; wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">



    <meta http-equiv="content-type" content="text/html; charset=UTF-8">


    <p><font size="4" face="monospace">Hi,</font></p>
    <p><font size="4" face="monospace">I am trying to modify the Firefox
    desktop icon so that it opens<br>
    an incognito window by default.<br>
    </font></p>
    <p><font face="monospace" size="4">...</font></p>
    <p><font size="4" face="monospace">- Exec=firefox %u<br>
    + Exec=firefox -private-window %u</font></p></div></blockquote><br><div>Assuming that's not a typo, please try:</div><div><br></div><div>--private-window</div><div><br></div><div>(NB two hyphens at the beginning)</div><div><br></div><div>This
    works for me on Mate.</div></body></html> --Apple-Mail-4DFC6773-CED4-48DA-8E74-6EDF8A88B0B8--

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Pranjal Singh on Thu Jun 20 20:00:01 2024
    On Thu, Jun 20, 2024 at 22:56:33 +0530, Pranjal Singh wrote:
    It runs regular Firefox after adding the -private-window flag.

    To get a MWE, I made these changes later:
    - Exec=firefox -private-window %u
    - StartupWMClass=firefox
    +Exec=gnome-calculator

    Did you see Gareth's reply at <https://lists.debian.org/debian-user/2024/06/msg00432.html>?

    It's supposed to be --private-window with two leading hyphens, not one,
    he said.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Gareth Evans on Thu Jun 20 20:30:01 2024
    On Tue, Jun 18, 2024 at 01:38:00AM +0100, Gareth Evans wrote:

    On 17 Jun 2024, at 20:45, Pranjal Singh <[email protected]> wrote:

    
    Hi,

    I am trying to modify the Firefox desktop icon so that it opens
    an incognito window by default.

    ...

    - Exec=firefox %u
    + Exec=firefox -private-window %u


    Assuming that's not a typo, please try:

    --private-window

    Yep. Asking firefox itself (firefox --help) confirms that the
    option wants two dashes.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZnR0RgAKCRAFyCz1etHa Rli5AJ4zhY7mqorav8tcgOQlmsknviPynwCfXFDnzROPT03rRjgg0yt6A5NvH8A=
    =nzIv
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Jeffrey Walton on Thu Jun 20 20:40:02 2024
    On Thu, Jun 20, 2024 at 02:10:38PM -0400, Jeffrey Walton wrote:
    On Tue, Jun 18, 2024 at 12:23 AM Gareth Evans <[email protected]> wrote:

    On 17 Jun 2024, at 20:45, Pranjal Singh <[email protected]> wrote:

    I am trying to modify the Firefox desktop icon so that it opens
    an incognito window by default.
    ...

    - Exec=firefox %u
    + Exec=firefox -private-window %u

    Assuming that's not a typo, please try:

    --private-window

    (NB two hyphens at the beginning)

    This works for me on Mate.

    According to Mozilla documentation at <https://wiki.mozilla.org/Firefox/CommandLineOptions>, it is one
    hyphen, not two.

    And according to "firefox --help" it's two, not one. Never trust the
    internet, I s'ppose :-)

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZnR1NwAKCRAFyCz1etHa RvEIAKCBY6KtBT+OFFv1uLbtECFWOli5hACaAk1yyjKq6mw76clwaeCO596S6VE=
    =jdrw
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Greg Wooledge on Thu Jun 20 22:00:01 2024
    Greg Wooledge <[email protected]> wrote:
    On Thu, Jun 20, 2024 at 22:56:33 +0530, Pranjal Singh wrote:
    It runs regular Firefox after adding the -private-window flag.

    To get a MWE, I made these changes later:
    - Exec=firefox -private-window %u
    - StartupWMClass=firefox
    +Exec=gnome-calculator

    Did you see Gareth's reply at <https://lists.debian.org/debian-user/2024/06/msg00432.html>?

    It's supposed to be --private-window with two leading hyphens, not
    one, he said.

    He was wrong according to Mozilla's documentation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Thu Jun 20 22:00:01 2024
    <[email protected]> wrote:
    On Tue, Jun 18, 2024 at 01:38:00AM +0100, Gareth Evans wrote:

    On 17 Jun 2024, at 20:45, Pranjal Singh
    <[email protected]> wrote:

    
    Hi,

    I am trying to modify the Firefox desktop icon so that it opens
    an incognito window by default.

    ...

    - Exec=firefox %u
    + Exec=firefox -private-window %u


    Assuming that's not a typo, please try:

    --private-window

    Yep. Asking firefox itself (firefox --help) confirms that the
    option wants two dashes.

    See https://wiki.mozilla.org/Firefox/CommandLineOptions#-private-window

    or just try it! It works pefectly well with a single hyphen.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to All on Thu Jun 20 23:20:01 2024
    Assuming that's not a typo, please try:

    --private-window

    Yep. Asking firefox itself (firefox --help) confirms that the
    option wants two dashes.

    See https://wiki.mozilla.org/Firefox/CommandLineOptions#-private-window

    or just try it! It works pefectly well with a single hyphen.

    It seems to work either way, with firefox-esr 115.12.0esr-1~deb12u1 .
    I tested with <firefox --private-window https://www.debian.org/>
    and <firefox -private-window https://www.debian.org/>.

    So... in that case, we don't know why the OP's thing isn't working.
    Something something desktop blah blah. Try to find a log file where
    you can see what's wrong. If it's not a DE, you might be able to
    find logs in ~/.xsession-errors but with a Fancy Desktop Environment,
    the logs could be *anywhere*. Or nowhere.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Brad Rogers on Fri Jun 21 06:40:01 2024
    On Thu, Jun 20, 2024 at 09:33:22PM +0100, Brad Rogers wrote:

    [...]

    This is (one) reason why using undocumented features is a Bad Thing™.

    It doesn't seem to be "undocumented": on the contrary, it's rather "overdocumented" (two different ways in two different places), but
    thanks to some intrepid users in this thread we do know that both
    ways work.

    In Greg's words, it seems to be something something desktop.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZnUB4QAKCRAFyCz1etHa RuMVAJ9LxMeXkWo/o1BLbUWto7XmTqqciQCfbYCy6J4cOtTZXjaLPk6EkoAuipg=
    =Yf8R
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gareth Evans@21:1/5 to All on Sat Jun 22 12:20:01 2024
    On 20 Jun 2024, at 20:52, [email protected] wrote:
    Greg Wooledge <[email protected]> wrote:
    On Thu, Jun 20, 2024 at 22:56:33 +0530, Pranjal Singh wrote:
    It runs regular Firefox after adding the -private-window flag.

    To get a MWE, I made these changes later:
    - Exec=firefox -private-window %u
    - StartupWMClass=firefox
    +Exec=gnome-calculator

    Did you see Gareth's reply at
    <https://lists.debian.org/debian-user/2024/06/msg00432.html>?

    It's supposed to be --private-window with two leading hyphens, not
    one, he said.

    He was wrong according to Mozilla's documentation

    My advice was based on

    $ firefox -h | grep private
    --private-window <url> Open <url> in a new private window.
    $

    I did try (with Mate Desktop) with both single and double hyphens, both on the command line and in

    /usr/share/applications/firefox-esr.desktop

    One hyphen failed to have the desired effect, but works when I try it now. Firefox hasn't been updated here since, so there seem to be other variables involved.

    I would be inclined to take it from the firefox help grep results above that the double-hyphen form should always work.

    I think the wiki is out of date - cf.

    "-private
    Opens Firefox in permanent private browsing mode ...

    -private-window
    Opens a new private browsing window in an existing instance of Firefox ..."

    https://wiki.mozilla.org/Firefox/CommandLineOptions#Command_line_options

    There is no "[-]-private" option according to the grep I performed, and [-]-private produces a non-private window when run here from the command line.

    $ apt policy firefox-esr
    firefox-esr:
    Installed: 115.12.0esr-1~deb12u1
    Candidate: 115.12.0esr-1~deb12u1
    Version table:
    *** 115.12.0esr-1~deb12u1 500
    500 https://security.debian.org/debian-security bookworm-security/main amd64 Packages
    [...]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)