Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #270182 > unrolled thread

Modifying Desktop Icons

Started byPranjal Singh <pranjal.singh4370@gmail.com>
First post2024-06-17 21:50 +0200
Last post2024-06-21 06:40 +0200
Articles 16 — 9 participants

Back to article view | Back to linux.debian.user


Contents

  Modifying Desktop Icons Pranjal Singh <pranjal.singh4370@gmail.com> - 2024-06-17 21:50 +0200
    Re: Modifying Desktop Icons eben@gmx.us - 2024-06-17 22:10 +0200
      Re: Modifying Desktop Icons Pranjal Singh <pranjal.singh4370@gmail.com> - 2024-06-20 19:50 +0200
        Re: Modifying Desktop Icons Greg Wooledge <greg@wooledge.org> - 2024-06-20 20:00 +0200
          Re: Modifying Desktop Icons debian-user@howorth.org.uk - 2024-06-20 22:00 +0200
            Re: Modifying Desktop Icons "Gareth Evans" <donotspam@fastmail.fm> - 2024-06-22 12:20 +0200
              Re: Modifying Desktop Icons [Solved] Pranjal Singh <pranjal.singh4370@gmail.com> - 2024-06-22 22:20 +0200
                Re: Modifying Desktop Icons [Solved] Max Nikulin <manikulin@gmail.com> - 2024-06-23 04:20 +0200
        Re: Modifying Desktop Icons Max Nikulin <manikulin@gmail.com> - 2024-06-21 04:10 +0200
    Re: Modifying Desktop Icons Gareth Evans <donotspam@fastmail.fm> - 2024-06-18 02:50 +0200
      Re: Modifying Desktop Icons Jeffrey Walton <noloader@gmail.com> - 2024-06-20 20:20 +0200
        Re: Modifying Desktop Icons <tomas@tuxteam.de> - 2024-06-20 20:40 +0200
      Re: Modifying Desktop Icons <tomas@tuxteam.de> - 2024-06-20 20:30 +0200
        Re: Modifying Desktop Icons debian-user@howorth.org.uk - 2024-06-20 22:00 +0200
          Re: Modifying Desktop Icons Greg Wooledge <greg@wooledge.org> - 2024-06-20 23:20 +0200
          Re: Modifying Desktop Icons <tomas@tuxteam.de> - 2024-06-21 06:40 +0200

#270182 — Modifying Desktop Icons

FromPranjal Singh <pranjal.singh4370@gmail.com>
Date2024-06-17 21:50 +0200
SubjectModifying Desktop Icons
Message-ID<IQqwz-3EdM-41@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

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

I've modified and created .desktop
files as per tutorials on the net and rebooted, but it doesn't work.

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.

Can someone direct me to documentation or the actual implementation
of desktop icons?

Thanks,
Pranjal

[toc] | [next] | [standalone]


#270183

Fromeben@gmx.us
Date2024-06-17 22:10 +0200
Message-ID<IQqPT-3ED0-3@gated-at.bofh.it>
In reply to#270182
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?

[toc] | [prev] | [next] | [standalone]


#270308

FromPranjal Singh <pranjal.singh4370@gmail.com>
Date2024-06-20 19:50 +0200
Message-ID<IRu53-4kd3-5@gated-at.bofh.it>
In reply to#270183

[Multipart message — attachments visible in raw view] — view raw

Hi Eben,

Sorry for the late reply.
I realise I could've added more details.

On 18/06/24 01:31, eben@gmx.us wrote:
> 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?

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

This too doesn't change anything.
Meanwhile, I also found some seemingly unhelpful documentation at
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html 
(Exec key - says what I expected)
https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html 
(The entire specification)

Any ideas, anyone?

Grateful,
Pranjal

[toc] | [prev] | [next] | [standalone]


#270309

FromGreg Wooledge <greg@wooledge.org>
Date2024-06-20 20:00 +0200
Message-ID<IRueJ-4kgx-5@gated-at.bofh.it>
In reply to#270308
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.

[toc] | [prev] | [next] | [standalone]


#270316

Fromdebian-user@howorth.org.uk
Date2024-06-20 22:00 +0200
Message-ID<IRw6R-4lv3-3@gated-at.bofh.it>
In reply to#270309
Greg Wooledge <greg@wooledge.org> 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.

[toc] | [prev] | [next] | [standalone]


#270364

From"Gareth Evans" <donotspam@fastmail.fm>
Date2024-06-22 12:20 +0200
Message-ID<IS60F-4IpD-17@gated-at.bofh.it>
In reply to#270316
> On 20 Jun 2024, at 20:52, debian-user@howorth.org.uk wrote:
> Greg Wooledge <greg@wooledge.org> 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
[...]

[toc] | [prev] | [next] | [standalone]


#270386 — Re: Modifying Desktop Icons [Solved]

FromPranjal Singh <pranjal.singh4370@gmail.com>
Date2024-06-22 22:20 +0200
SubjectRe: Modifying Desktop Icons [Solved]
Message-ID<ISfnj-4OdL-5@gated-at.bofh.it>
In reply to#270364

[Multipart message — attachments visible in raw view] — view raw

Hi Gareth,

I have solved it.
The solution: *drumroll* Switch from Ubuntu to Bookworm.

On 22/06/24 15:33, Gareth Evans wrote:

> [...]
> 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.
>
Thanks Brad, Max, Greg, Jeffrey, Tomas and the unnamed Briton.
I have used Bookworm earlier, but the apt policy bit and Max's reply
drove me to return.

Some confusion may still be in order though:

Nikulin's suspicion that a copy of the file is used seems true: changing
non-pinned icons in Ubuntu's panel worked without a reboot, but not
Firefox. I tried looking into the GNOME source (grep-ing into that address)
but in vain.

The desktop-file-validate tool threw no error. Incidentally, the Ubuntu
desktop file had a single hyphen in the sub-entry for private windows
(Bookworm does not have sub-entries), but I've used both single and double
hyphens earlier. But I am using double hyphens now, as Brad warned.

I don't think *I* should raise a bug as Max suggested: unless a significant
number of users is interested, I wouldn't want to, although not having
your data out there is better IMHO. Perhaps some day I'll contribute the
feature myself.

Thanks again,
Pranjal

[toc] | [prev] | [next] | [standalone]


#270393 — Re: Modifying Desktop Icons [Solved]

FromMax Nikulin <manikulin@gmail.com>
Date2024-06-23 04:20 +0200
SubjectRe: Modifying Desktop Icons [Solved]
Message-ID<ISkZH-4RWp-1@gated-at.bofh.it>
In reply to#270386
On 23/06/2024 03:16, Pranjal Singh wrote:
> although not having
> your data out there is better IMHO

Notice that firefox has "Always use private browsing mode" setting 
exposed to UI.

[toc] | [prev] | [next] | [standalone]


#270326

FromMax Nikulin <manikulin@gmail.com>
Date2024-06-21 04:10 +0200
Message-ID<IRBSV-4pkV-5@gated-at.bofh.it>
In reply to#270308
On 21/06/2024 00:26, Pranjal Singh wrote:
>>> 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.

You may file a bug (if it does not exist yet) against the Debian package 
to add alternative actions in the desktop file, see
<https://hg.mozilla.org/mozilla-central/file/tip/taskcluster/docker/firefox-snap/firefox.desktop>

It would not open private widow by default though, it just would make it 
available from GUI.

Have you checked your files using the desktop-file-validate tool?

Are you sure that your desktop environment uses namely files you have 
edited, not a copy of the original file? Menus may use cache with data 
extracted from desktop files instead of files directly. Try to set 
unique Name and Comment.

Notice that the firefox-esr bookworm package contains 
/usr/share/applications/firefox-esr.desktop, not 
/usr/share/applications/firefox.desktop. I would avoid editing 
/usr/share/applications/firefox-esr.desktop since every package update 
means revert to original version with loosing changes.

[toc] | [prev] | [next] | [standalone]


#270191

FromGareth Evans <donotspam@fastmail.fm>
Date2024-06-18 02:50 +0200
Message-ID<IQvcR-3HaA-1@gated-at.bofh.it>
In reply to#270182

[Multipart message — attachments visible in raw view] — view raw

> On 17 Jun 2024, at 20:45, Pranjal Singh <pranjal.singh4370@gmail.com> 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.

[toc] | [prev] | [next] | [standalone]


#270310

FromJeffrey Walton <noloader@gmail.com>
Date2024-06-20 20:20 +0200
Message-ID<IRuy5-4kEe-1@gated-at.bofh.it>
In reply to#270191
On Tue, Jun 18, 2024 at 12:23 AM Gareth Evans <donotspam@fastmail.fm> wrote:
>
> On 17 Jun 2024, at 20:45, Pranjal Singh <pranjal.singh4370@gmail.com> 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.

Jeff

[toc] | [prev] | [next] | [standalone]


#270313

From<tomas@tuxteam.de>
Date2024-06-20 20:40 +0200
Message-ID<IRuRs-4kNZ-47@gated-at.bofh.it>
In reply to#270310

[Multipart message — attachments visible in raw view] — view raw

On Thu, Jun 20, 2024 at 02:10:38PM -0400, Jeffrey Walton wrote:
> On Tue, Jun 18, 2024 at 12:23 AM Gareth Evans <donotspam@fastmail.fm> wrote:
> >
> > On 17 Jun 2024, at 20:45, Pranjal Singh <pranjal.singh4370@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#270312

From<tomas@tuxteam.de>
Date2024-06-20 20:30 +0200
Message-ID<IRuHL-4kI2-3@gated-at.bofh.it>
In reply to#270191

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 18, 2024 at 01:38:00AM +0100, Gareth Evans wrote:
> 
> > On 17 Jun 2024, at 20:45, Pranjal Singh <pranjal.singh4370@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#270315

Fromdebian-user@howorth.org.uk
Date2024-06-20 22:00 +0200
Message-ID<IRw6R-4lv3-5@gated-at.bofh.it>
In reply to#270312
<tomas@tuxteam.de> wrote:
> On Tue, Jun 18, 2024 at 01:38:00AM +0100, Gareth Evans wrote:
> >   
> > > On 17 Jun 2024, at 20:45, Pranjal Singh
> > > <pranjal.singh4370@gmail.com> 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.

[toc] | [prev] | [next] | [standalone]


#270318

FromGreg Wooledge <greg@wooledge.org>
Date2024-06-20 23:20 +0200
Message-ID<IRxmh-4mqY-1@gated-at.bofh.it>
In reply to#270315
> > > 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.

[toc] | [prev] | [next] | [standalone]


#270334

From<tomas@tuxteam.de>
Date2024-06-21 06:40 +0200
Message-ID<IREe5-4qNJ-1@gated-at.bofh.it>
In reply to#270315

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web