Page 1 of 1

Discord (Your place to talk)

Posted: Sat Nov 14, 2020 5:43 pm
by bigpup

Discord web site:
https://discord.com/

Like a lot of software that is not designed for Puppy Linux.
Discord will not just run from the menu entry, it makes when installed.
It does not like running in root user.
It also wants to use pulse audio.

NOTE:
For pulse audio to work it needs to be in the Puppy version.
Some Puppies have only what is needed installed to make Firefox sound work and other programs needing pulse.
Some Puppies have no pulse audio and it must be installed in them.
Bionicpup64 8.0 and Fossapup64 9.5 already have installed what is needed for pulse Audio.

Download and install the deb package of Discord.

Installed in Fossapup64 9.5
Had to run it from the terminal.
In the terminal enter:

Code: Select all

 apulse run-as-spot discord

That gets it using the pulse audio in Bionicpup64
That makes it think it is not running as root, but as spot.
It will do all of the stuff in the spot directory.
So, this limits it to only putting stuff in spot directory.
Note:
run-as-spot part is up to you. If you do not want to run as root.
Command should work with or without run-as-spot in it.

If it complains about not running in a sandbox.
Add this to the terminal command:
--no-sandbox

Code: Select all

apulse run-as-spot discord --no-sandbox

The menu entry will not work unless you edit the exec line.
Open ->/usr/share/applications/discord.desktop file in a text editor.
Change the exec line to this:

Code: Select all

apulse run-as-spot discord

Run in the terminal fixmenus or reboot, so the change is now being used.

Modified discord.desktop file

[Desktop Entry]
Name=Discord
StartupWMClass=discord
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
GenericName=Internet Messenger
Exec=apulse run-as-spot discord
Icon=discord.png
Type=Application
Categories=InstantMessaging
Path=/usr/bin


Re: Discord (Your place to talk)

Posted: Sat Nov 14, 2020 11:11 pm
by r96chase

I will forever thank you for helping set up Discord on my BionicPup ThinkPad. <3 :thumbup2:


Re: Discord (Your place to talk)

Posted: Tue Dec 22, 2020 5:59 pm
by takenp

Hello!

I put it all together making .sfs for myself and for our lazy puppinians. So it runs as spot using @bigpup string ( apulse run-as-spot discord) both from the .desktop file and from the terminal.

Works smoothly on Bionic and Fossa pups.

Discord is pretty good group chat and voice program but unfortunately it uses pulse audio only. So I did not get it work with my mic using apulse. May be there is a way.

discord-0.0.13_8.0_amd64_9.0.5.sfs 52Mb

discord_sfs.jpg
discord_sfs.jpg (62.98 KiB) Viewed 2454 times

Re: Discord (Your place to talk)

Posted: Tue Dec 22, 2020 7:01 pm
by r96chase

@takenp Keep up the good work. :thumbup2:


Re: Discord (Your place to talk)

Posted: Mon Feb 15, 2021 11:44 pm
by bigpup

mikewalsh posted this in another topic about Discord:

Note:
Terminal Command you use, depends on how you have discord installed.
But for sure it needs to start with apulse

Below is some good info about getting sound fully working.

Okay. I got audio working in Discord. Here's how:-

First; in all honesty, on a desktop, this NEEDS a headset. This is the only way round it, unless you've got a set of headphones AND a separate microphone, both of which are plugged into/working with the same sound card.

I've had a Logitech H340 USB headset for a while, now; it has its own audio card built-in to the rather chunky connector. Which makes setting things up a doddle....

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

Normally, for video chats I'll set output to default speakers (off the main card) and input to the webcam mike (the c920's stereo microphones). Most apps will let you do stuff like this. Discord, however, won't; both input & output must come from the same "default" device.

This is hardly surprising, TBH. Discord was originally, and still IS primarily a gamer's communication platform. The vast majority of serious gamers seem to prefer headsets anyway.....and most modern headsets are USB. With a built-in audio chip...

Go figure. On top of that, this thing expects PulseAudio. Of course! So:-

Make sure you've got apulse installed.

Your launcher needs to read as follows:-

Code: Select all

apulse /usr/bin/discord --no-sandbox

Spot - not required. Root works fine for Discord. (I use a separate launch script in /root/my-applications/bin, with the .desktop file pointing to this. This permits experimenting with 'launch' parameters without disturbing the MenuEntry).

Using apulse gives you 'Default Device' in the Discord settings.....as opposed to 'No device could be found...'

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

Fire up Discord. Sign-in, and all that guff. Now; you should find your audio icons, bottom left, now look normal.

Click on the settings 'cog-wheel'. 'App Settings->Voice & Video'. You'll find it's on 'Voice Activity' by default. If you now talk into your mike, you should see the solid green line come and go as you talk. However....

Discord voice channels all want you to use 'Push to talk'. This means setting up a keybind to activate your mike on/off. (Seems a bit old-fashioned, but.....this is what seems to work. I just used the space bar. There's a lot of default keybindings set-up already, but the space bar doesn't seem to be allocated. So; now it is!)

To test this, you now use the test bar up top. Hit your 'toggle' key to activate your mike. Speaking will show activity in yellow on the test bar. Toggle again to switch the mike off.

All things being equal, you now have a working mike & headphones/speakers!

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

To summarise:-

Apulse is the thing that gets stuff working here, since Discord is set-up to expect PulseAudio.

A single 'default' card isn't really an issue, TBH. A laptop only has one card, with everything working off it.

If you're on a desktop, with possibility of multiple sources; make sure headphones/mike are using the same card. Or, use a headset.....preferably, with its own audio card.

Sorted! Hope that helps some of you.

Mike. ;)


Re: Discord (Your place to talk)

Posted: Tue Feb 23, 2021 3:14 pm
by Zuzia
bigpup wrote: Mon Feb 15, 2021 11:44 pm

mikewalsh posted this in another topic about Discord:

Code: Select all

apulse /usr/bin/discord --no-sandbox

Better is

Code: Select all

apulse run-as-spot /usr/bin/discord

Becouse discord installed from official home page using linux version run as spot without any problems + auto update on root work with --no-sandbox flag but update not run alweys.
You can try if you plan fresh install :) And this work if you edit discord.desktop then discord run normal from start menu :) JWM menu. Right click.


Re: Discord (Your place to talk)

Posted: Wed Mar 03, 2021 5:59 pm
by Zuzia

Guys i not wont create new subject then i write here!

I use this to start discord all work great but...

Code: Select all

exec:apulse run-as-spot /usr/bin/discord

I can't setup my microphone to work, on steam voice chat work on discord not.
my speakers is card:

D01.png
D01.png (24.47 KiB) Viewed 2302 times

My Speakers audio card is: (hw1.0) My mic is device (hw2.0)

D02.jpg
D02.jpg (53.78 KiB) Viewed 2302 times

Discord see my defoult audio device but i need change this somewhere.
Can You tell me what file i must edit and what syntax to force my mic as defoult device?

I try hw:1,0 and plughw:2,0 add to exec: but not work. If anyone fix this problem tell me alsa config directory or apulse and right config parametrs.

Thanks!


Re: Discord (Your place to talk)

Posted: Wed Mar 03, 2021 7:01 pm
by mikewalsh

@Zuzia :-

What Puppy, please? :roll:

Always, always, ALWAYS tell us what Puppy your query is about.....because there's LOTS of different Puppies, and they're all slightly different to each other. Just saying "I tried such-and-such. Didn't work. Help..!" tells us absolutely nothing. And if you don't tell us anything, how can we help you?

We're NOT standing behind you, looking over your shoulder. And I doubt anybody here can use a crystal ball; I don't believe we have mind-readers amongst us.

I will tell you this much. You can get the client working on the 64-bit Puppies, or you can get sound functional in the browser version.....but it MUST be Chrome. It's the only browser that will support it.

Don't even think about it in 32-bit Puppies.

Have a read through my write-up, that bigpup re-posted above. It should help, somewhat. You've already told us your speakers & microphone are running from 2 separate cards. I've already told you, above, that in MY experience 2 separate cards won't work. You do the math.

If anybody else out there knows how to do this, I'm all ears..!

Mike. ;)


Re: Discord (Your place to talk)

Posted: Wed Mar 03, 2021 7:07 pm
by Zuzia

Hi bionic 8 Friend :) x64

pb8.jpg
pb8.jpg (103.3 KiB) Viewed 2295 times

then i try (browser) on chrome but i must install it first coz i like FF not chrome.
Friend i test discord in chrome and work normal :) but i not see defoult speakers only defoult mic. on list. This is so wierd how i can setup same in not browser client? Is any chance?
Now i can normal speak using chrome discord, but still i wont force use mic in no browser discord :) If possible...

Record device have list in browser right side have only defoult, but lucky work, and my speaker is displayed on list same as mic.
Now i must force apulse or alsa device to change order on list.
On github i find that info:
Environment variables APULSE_CAPTURE_DEVICE and APULSE_PLAYBACK_DEVICE can be used to configure capture and playback devices. Try hw:0,0, plughw:0,0 and the like. Refer to the ALSA user guide for a full list of device names.
then syntax must be:

Code: Select all

exec:APULSE_CAPTURE_DEVICE=hw:2,0 APULSE_PLAYBACK_DEVICE=hw:1,0 run-as-spot /usr/bin/discord

or APULSE_CAPTURE_DEVICE="hw:2,0" i must use. "" for right syntax? I must try and i tell more.

Above not work :( I must look other syntax my sound server list is:

Code: Select all

root# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
default:CARD=Generic
    HD-Audio Generic, ALC892 Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALC892 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

and record is:

Code: Select all

root# arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=Generic
    HD-Audio Generic, ALC892 Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALC892 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    Front speakers
default:CARD=Device
    USB PnP Audio Device, USB Audio
    Default Audio Device
sysdefault:CARD=Device
    USB PnP Audio Device, USB Audio
    Default Audio Device
front:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    Front speakers
surround21:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

Question is who know where is alsa config file in puppy where i can change record device and set up as defoult?
Then i 100% sure i can setup my discord properly and force it to work local not in browser.