Setting Chrome/Chromium audio sample rate when there is no sound device - chromium

Using Ubuntu under Docker, I am running Chrome to render some web pages as video with their audio.
This is working fine, but the audio sample rate is fixed to 44.1 kHz. This is a VM with no audio device. There is no Pulseaudio daemon that I can see, or anything like that. How can I set the audio sample rate of the browser?
Note, --alsa-fixed-output-sample-rate 48000 has no effect.

First try re-installing alsa and pulseaudio:
sudo apt-get remove --purge alsa-base pulseaudio indicator-sound
sudo apt-get install alsa-base pulseaudio indicator-sound
sudo alsa force-reload
I know you said you can't find a pulseaudio daemon - I expect you may need it present, and will need to install it. This first step should do that for you.
If that doesn't work, try killing pulseaudio:
killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*
Hopefully that works for you!

I had the same problem. It ended up being that my system was trying to put Chrome's sound through the HDMI even though the HDMI cord was not plugged in at the time. Presumably, this could happen with any audio output device. The sound settings Ubuntu offers didn't show this nor let me change it for the individual application, but pavucontrol did.
To install pavucontrol from the Terminal:
sudo apt-get install pavucontrol
To open pavucontrol from the Terminal:
Select the "Playback" menu and make sure that you have it set to Show Applications. Now, start playing something from Google Chrome. It will show up there, and it will show what output device is being used for Google Chrome. Make sure it is set to the output device you are trying to use.

Related

Minecraft pi not launching

(solved, make sure your graphics driver is correct, dont remember which, its from between fake and legacy. Otherwise, reinstall your os, it should fix then)
Also, thanks to: Anston Sorensen, for trying to help
Question:
When I launch Minecraft pi it shows a black window for a second and closes.
in command line it gives me the error:
failed to add service - already in use?
after command:
sudo minecraft-pi
Try this:
sudo apt-get purge minecraft-pi
sudo apt-get update
sudo apt-get install minecraft-pi
If all else fails why not just play the full version of Minecraft? (Minecraft Java Edition). https://forums.raspberrypi.com/viewtopic.php?t=279135

How to automount usb after kiosk mode enable in raspberry Pi 4 with buster os?

Problem with Kiosk mode and USB access.
I have installed buster on raspberry Pi 4. And for open chromiam browser at startup, I enabled kiosk mode.
Now I have a problem that, it does not mount USB device (flash drives) at /media/pi
Any help and suggestions would be very helpful!
Raspbian Buster lite (without GUI) doesn't mount USB devices automatically out of the box.
There is a software called "usbmount" which adds this functionality.
You can install it using
sudo apt-get install usbmount
Then reboot the Pi
sudo reboot now
http://www.howtoeverything.net/linux/raspberry-pi/automount-external-hard-disks-raspberry-pi
I'm using Buster Lite and ran into a problem with installing usbmount. The error I got was "unable to locate package usbmount". I found the solution, and I am append my solution to this thread since this thread shows up on some search-engines pretty high up.
The solution I used was to clone the github repo from https://github.com/rbrito/usbmount/ and build it (instructions below is partially from the readme)
git clone https://github.com/rbrito/usbmount.git
cd usbmount
sudo apt-get update && sudo apt-get install -y debhelper build-essential exfat-fuse exfat-utils
sudo dpkg-buildpackage -us -uc -b
cd ..
sudo dpkg -i usbmount_0.0.24_all.deb
Additionally, use
sudo nano /etc/usbmount/usbmount.conf
to add exfat to the list of file-systems
save and reboot

Direnv not allowing me to allow

I've installed direnv (v2.18.2) onto my Ubuntu 16.04 machine using:
sudo snap install direnv
as per the website, and added the line:
eval "$(direnv hook bash)"
to my ~/.bashrc file as per the instructions. When I navigate into the directory with my .envrc file, the following message shown:
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
Sweet. So I run direnv allow, and I'm immediately hit with exactly the same error. I've also tried using direnv allow . but that doesn't seem to help. Also, completely restarting my laptop hasn't helped either.
All the advice I've seen is for direnv not finding the .envrc file, but here it is finding it, it's just not allowing me to allow it.
I know this is not a propper solution, but I encountered this aftering installing from a snap on Linux Mint.
After I uninstalled the snap and installed it from aptitude I did not have any issues.
While the OP is on Ubuntu I ran into the same problem with the snap installed binary on CentOS 7.7.
I worked around the problem by installing a go binary and then building direnv from source: git clone https://github.com/direnv/direnv.git; cd direnv; make; make install which got me direnv 2.21.2 in /usr/local/bin

Installation of GNU radio on Raspbian

I'm a beginner at this raspberry pi stuff . I cant seem to figure out how to install GNU radio application on the raspbian. The pi was working fine up until i tried to install the GNU using the command
$ sudo apt-get install gnuradio gnuradio-dev after which the pi doesnt start up. The screen starts and then keeps on rebooting. Any help would be appreciated

Text is blacked out when taking a firefox screenshot running headless with xvfb

I have a jenkins setup on amazon ec2 and everything is running fine except for a tiny issue with Selenium. Every time I run the whole suite of tests (~30 min), Selenium gets stuck on a test. I've take a screenshot at that moment and it seems that there is an alert on the screen, but the alert text is all blacked out.
I've run xvfb, started selenium, then taken my screen capture with xwd and converted that image with imagemagick.
I've scoured the internet and have no clue.
Figured it out. Turns out that it's a font thing. I've run the steps indicated below and now I can read the text. It's still on a dark green background, but the text is readable.
On amazon ec2 ubuntu instance need to:
1) enable multiverse for apt-get
Open /etc/apt/sources.list with any editor
On ec2 it seems the multiverse isn't present so copied these lines into the file and saved
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
2) sudo apt-get update
3) sudo apt-get -y install x-ttcidfont-conf cabextract ttf-mscorefonts-installer
this will bring up shell gui, use arrow down, tab, and enter to navigate
accept EULA
4) sudo dpkg-reconfigure x-ttcidfont-conf
- choose freetype fonts