How to make a desktop icon for Firefox with Apulse? (Solved)

Browsers, email, chat, etc.
Post Reply
Message
Author
User avatar
xenial.
Posts: 37
Joined: Fri 01 May 2020, 11:50
Location: uk

How to make a desktop icon for Firefox with Apulse? (Solved)

#1 Post by xenial. »

Hi-----

I would like to download the latest firefox for my 32bit xenial from mozillas ftp site.
I understand i need to launch this via the terminal to use apulse for sound.

How would i be able to create a desktop firefox icon to launch firefox automatically rather than typing in the terminal everytime....?

Many Thanks.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hi xenial.

Not sure I fully understand your need.

There is a download panel for the latest Firefox here, but it's not an ftp site.

But heads up! About the apulse sound interface (aka pulseaudio), I remember reading
it doesn't work on Puppies, here. Puppies continue using the ALSA.

Admittedly, that thread is a bit old, so for up-to-date info, maybe try to get a hold of forum
members Oscar_Talks or Mike_Walsh, they're both "specialists" (so to speak) about
browsers. (Maybe through PM ?)

Also IIRC member Norgo is quite knowledgeable about SeaMonkey, and member bigpup
has been following PaleMoon development. (Both are mozilla-derived browsers.)

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#3 Post by 01micko »

On the exec line of the firefox.desktop put this:

Code: Select all

Exec=apulse firefox
This assumes the there is a firefox binary or symlink in you PATH, which you may have to create yourself if you get official mozilla package.
Puppy Linux Blog - contact me for access

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Re: Terminal link for firefox.

#4 Post by mikeslr »

xenial. wrote:.

How would i be able to create a desktop firefox icon to launch firefox automatically rather than typing in the terminal everytime....?
Puppies look to the desktop files in /usr/share/applications to create menu entries. You, as user, depending on what Window manager your Puppy has, can drag that file to the desktop, or add it to a panel. With the 32-bit Xenial, you probably have Menu>Desktop>Jwmdesk Manager. Check its Launch panel.

You can create /usr/share/applications/firefox.desktop by file-browsing there, right-clicking an empty space, selecting New>Blank file, naming it firefox.desktop then opening it in geany. Then, copy and paste the following:

[Desktop Entry]
Encoding=UTF-8
Name=firefox
Icon=/usr/share/pixmaps/mozicon129.png
Comment=firefox web browser
Exec=apulse firefox
Terminal=false
Type=Application
Categories=X-Internet-browser
GenericName=firefox web browser

I've used blue in sections you may have to edit. The icon= argument assumes you have an appropriate icon named mozicon129.png located in the /usr/share/pixmaps folder. Edit as necessary.

apulse is a builtin. Puppies know where it is located. But you've installed firefox. It may be 'on the path' --in some bin file where puppies expect binaries to be-- but it might not be. In the latter situation, you have to provide the full path to the executable. For example, if you merely decompressed a firefox.deb or firefox.tar.gz in /opt, creating a firefox folder there with the firefox executable within the firefox folder, your Exec= argument would read:

Exec=apulse /opt/firefox/firefox

Edited the above line to remove a . at its end. See Mike Walsh's post following.

The following MAY work; but I've never tried it: just drag firefox's binary to the desktop. Then right-click it and select Edit Item. Type apulse in front of firefox. While you're there, you may want to right-click it again, select "file-Whatever", select Set Icon and drag and drop an appropriate icon onto the dialog box.
Last edited by mikeslr on Sun 14 Jun 2020, 23:34, edited 2 times in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Hello all.

(Edited)
I'd really like to have a source or an explanation for what
01micko is saying. 01micko? Please and thank you.

I ask because I have been led to believe by norgo's work (IIRC) and by personal
experience that firefox had to be compiled in presence of an ALSA to work in Puppy.
Otherwise, no sound in Puppy, in my experience (I tried it), because the people at
mozilla compile it for pulse by default.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#6 Post by 01micko »

Hi musher0

apulse, as the link suggests, emulates pulse audio for alsa. I have had good success with it, even in raspberry pi.

Of course, it doesn't need to be in the desktop file, it can be run on cli preceding the firefox command and any options or scripted. Works well with other programs compiled with pulse audio dependency also.

HTH
Puppy Linux Blog - contact me for access

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

@ musher0:-

Just to expand a little on Micko's last reply, you understand correctly when you say that current Firefox is compiled/built to use PulseAudio by default. That bit is not in question!

Puppies, as you say, come with ALSA as standard. What is less well-known is that even PulseAudio-equipped "mainstream" distros all still use ALSA as a 'backend'; PulseAudio runs as an additional layer, between ALSA & 'user-space', to give finer-grained control. That's its "raison d'etre"; ALSA is still there in the background, PulseAudio sits on top of ALSA, and is what the user interacts with instead of the older ALSAMixer. PulseAudio operates the ALSAMixer controls instead of the user doing so directly.

Sounds confusing, I know, but.....with me so far?

To put it in the simplest possible terms, then, apulse allows apps that expect PulseAudio to "see" it.....while at the same time permitting Puppy to continue to use ALSA to control them. The Firefox tarball, direct from Mozilla's repositories, will work straight-away in Puppy.....so long as apulse is present.

These two Ubuntu wiki pages give a good basic explanation:-

PulseAudio

ALSAmixer....which links to this Wikipedia page.

Hope that helps to clarify a subject that continues to "bewilder & confusticate" many users of ALSA-based distros!


Mike. :wink:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#8 Post by Flash »

The way I create a desktop icon to start Firefox in Puppy Linux (These instructions assume you're using Rox Filer):

1. Download Firefox from Mozilla. https://www.mozilla.org/en-US/

2. Unzip to a Firefox directory and drag the Firefox directory to a final location in Puppy's filesystem. The original file downloaded from Mozilla.org is no longer needed.

3. Right-click on the Firefox directory and choose Permissions, then Yes (to a+x (Make executable/searchable)). This step may not be necessary but it doesn't seem to hurt.

4. Open the Firefox directory and find the gear-shaped icon labeled Firefox. Right click on the icon, choose Permissions, then Yes.

5. Drag the Firefox gear icon onto Puppy's desktop from the Firefox directory. This automatically creates a link from the icon on the desktop to the icon in the Firefox directory, so when you click the icon on the desktop, Firefox will start. Obviously the Firefox directory can't be moved or the link will be broken.

6. I don't bother with this, but if you right-click on the gear icon on the desktop you can choose to change it to a Firefox icon.


As for using Pulse Audio, I can't help you there. You might find this post useful.

User avatar
xenial.
Posts: 37
Joined: Fri 01 May 2020, 11:50
Location: uk

#9 Post by xenial. »

Thank you most kindly for all those replies and i appreciate them.

@mikesir.
I tried your suggestions and to no avail and get a warning that opt/firefox cannot be found.

I can create a desktop icon just fine but it just launches firefox with no sound in youtube.

I launch firefox this way.I open a terminal and type apulse /opt/firefox/firefox and firefox has sound in youtube.it would be nice to have some sort of desktop icon to do this automagically without typing in the terminal.

thanks.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#10 Post by Mike Walsh »

@ xenial:-

Easy-peasy. Try it this way:-

Navigate to /root/my-applications/bin. Right-click in an empty part of the window->New->Script. A small 'action' window pops-up asking you to 'Create', so just give your script a name.....in your case, 'Firefox', and hit 'Create'. Your named script will now appear in the main window.

Now; right-click->Open with Geany (or Open as text). Geany should open with

Code: Select all

#!/bin/sh
....already showing, in red. (Red indicates these are 'commented-out' lines; the '#' symbol at the beginning of a line makes it 'inactive'). Simply add the following:-

Code: Select all

/path/to/your/app
If in /opt, this would read

Code: Select all

/opt/firefox/firefox
So the final script then looks like this:-

Code: Select all

#!/bin/sh
/opt/firefox/firefox
With me so far?

Okay. Now, drag the new script across to the desktop, and drop it. This is now 'linked' to the script you've just created in /root/my-applications/bin.

---------------------------------------------

For an icon:-

Download the attached icon (right-click->Save as). I know it looks a hell of a lot bigger than what you want, but ROX auto-sizes icons down to 48 x 48 for the 'pinboard' (desktop); I always find a larger icon looks sharper and better defined after ROX has reduced it. Put it in /usr/share/pixmaps, and leave this window open.

(This is the slightly older, "early" Quantum icon. But I think it looks neater, somehow.....to my way of thinking, the present FF icon looks kinda Image, TBH..!)

Right-click the new desktop script-link. Select File 'firefox'->Set icon. A small window appears, with a space to drop an icon into. Select the Firefox icon from the /usr/share/pixmaps window, drag it across and drop it into the space.

Bingo! You should now have an icon on your desktop which, when you click on it, will launch Firefox. And this trick can be used for any application.

BTW:- The reason Mikeslr's desktop entry didn't work for you could be because you put the full-stop at the end? You don't want that, since a full-stop is interpreted by Bash to mean something else..... Either that, or you forgot to put the leading "/" in front of 'opt'.....

The 'Exec' line must read exactly as follows:-

Exec=apulse /opt/firefox/firefox

And the above all assumes that you have indeed placed the firefox directory in /opt to begin with. Let us know if that helps, please.


Mike. :wink:
Attachments
ff-quantum.png
PNG icon for Firefox Quantum...
(77.01 KiB) Downloaded 146 times

User avatar
xenial.
Posts: 37
Joined: Fri 01 May 2020, 11:50
Location: uk

#11 Post by xenial. »

@Mike walsh.
Thank you for your extensive reply and i am glad to report it works perfectly.

Much appreciated.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#12 Post by Mike Walsh »

xenial. wrote:@Mike walsh.
Thank you for your extensive reply and i am glad to report it works perfectly.

Much appreciated.
You're very welcome. Glad it helped..!

I've been doing stuff this way for years, and to date, it's always worked for me. But that's the beauty of Linux; so many different ways of achieving your objective. Some of them may not be technically "correct", but, hey!.....if it works.....


Mike. :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#13 Post by musher0 »

Mike Walsh wrote:
xenial. wrote:@Mike walsh.
Thank you for your extensive reply and i am glad to report it works perfectly.

Much appreciated.
You're very welcome. Glad it helped..!

I've been doing stuff this way for years, and to date, it's always worked for me. But that's the beauty of Linux; so many different ways of achieving your objective. Some of them may not be technically "correct", but, hey!.....if it works.....


Mike. :wink:
Mike_Walsh?

That's pure propaganda. :twisted: :lol:
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply