So, I boot to the command line, as pi automatically I type amixer scontrols it shows me Capture and Master controls I type alsamixer it shows me Master control with stereo
Then I type sudo su - Now I am root, still on the command line (so no X )
I type amixer scontrols it shows me Headphone only I type alsamixer It shows Headphone control as MONO!!!!!
Someone PLEASE FIRE the idiots who set root to mono!!!! and Pi to stereo with DIFFERENT controls Now modify all your code developers!!!! How do I set alsa to stereo like pi has?
Didn't find your answer? Ask the community — no account required.
J
Jim Jackson
I assume the difference between pi and root, is because the creators of pios do not expect users to user the root account - they discourage it. So if you use pios and go "off-piste" you are expected to know what you are doing. I accept that, as I'm always doing things that don't fit the RPI setup - like removing systemd, and pulseaudio and using my own desktop setup.
I did a quick google for "configuring alsa on PiOS" and there seem to be several places that might help. Good luck.
A
Ahem A Rivet's Shot
I suspect they did nothing to root but set up alsa the way they wanted it on the pi user and so generated user specific configs instead of system wide ones. So root wound up with a set of system defaults probably designed to imitate the original Sun audio (8Khz mono PCM IIRC).
I would go looking for the system wide alsa controls and set things up by hand in there. Then I'd remove the user customisations for pi (or just the user).
J
Jan Panteltje
On a sunny day (Thu, 23 Jun 2022 13:15:35 +0100) it happened Ahem A Rivet's Shot snipped-for-privacy@eircom.net wrote in snipped-for-privacy@eircom.net:
Yes, point is , among many other things, that those raspian tinkerers and also some library developers are not really application developers. Example why this pissed me off in a big way, xpsa spectrum analyzer I wrote gets, when it starts, the volume setting (for the radio mode) from alsa by parsing amixer output and sets the GUI slider to that, and in reverse sets amixer Master control to control volume. Parsing amixer fails as it sees mono syntax, anyways FM stereo fails too etc. Same for xmpl media player I wrote. I wrote about close to a hundred Linux applications Maybe not so bad for people who wrote just one, but modifying many each time some idiot changes basics is a nuisance Example: library maintainers: libform maintainer suddenly removed middle and right mouse button from the library I did give feedback.. have about 20 or more programs that use it.. so I compiled an old version of the lib and gave it a different name and link against that.
In the old days... OK REALITY I have a PC with Xfree old version of Linux, oss for audio and all things run perfectly on it. THERE IS NO EXTRA FUNCTIONALITY IN NEWER LINUX RELEASES but if you think booting slower and all sort of insane twiddles then yes. The old oss sound system: I had nice 6 channel (6 languages) stuff I wrote but when alsa came audio became a mess and still is: /dev/dsp was the way to go.
Just always some kids that think they invent something better without understanding the old stuff No wonder the whole world is hacked :-) Look at computer languages, now everybody is into python or something... Too lazy to learn C? Python is a mess.
Yes you are right, will have to see where booting to pi does the alsa stereo thing..
But really EVERY new release of raspian has changes that break things, from EEPROM s*it to audio mess, many things. Poor application developers And poor users!!!
J
Jan Panteltje
On a sunny day (Thu, 23 Jun 2022 11:10:49 -0000 (UTC)) it happened Jim Jackson snipped-for-privacy@franjam.org.uk> wrote in snipped-for-privacy@iridium.wfdf:
Yes Thanks Will google for it
M
Martin Gregorie
... or simply set up another user, initiallly with default settings, and ignore 'pi'. Then its easy to modify your user to yse the settingds you want.
I do not use 'root' apart from doing system-wide things like startup/ shutdown/system update and making whole system backups. I've been working this way since I first used a multi-user, multi-tasking OS (ICL's George
3) in 1970 and prefer to keep the system management:development separation for both security and finger-trouble damage limitation reasons.
That's made sense for OSen I've had a sysadmin role on since then (George
3, OS/400, various Unices, VOS and Guardian as well as Linux), but some people's experience and security requirements evidently can and do differ from mine.
A
Ahem A Rivet's Shot
That just gets them right for the new user, setting the system default sane makes them right for all users by default including the one you add in a few months when you've forgotten all the tweaks.
M
Martin Gregorie
Agreed, I should have added that any settings, tweaks, etc you want to use in all non-super users is best set up by either editing existing scripts in
/etc/profile.d
or adding additional scripts to it. If you put additional scripts in /etc/ profile.d you may have to edit .bashrc and/or .bash_profile in the relevant login directories so your new scripts get called, but adding stuff to the existing scripts should just work
**BUT**
be sure to keep copies of any standard scripts in /etc/profile.d that you've modified somewhere safe, such as a directory in your usual login directory because, while these scripts are pretty stable now, they do occasionally get modified: IOW a system update may clobber your changes.
With local backups, its easy enough to compare the new file with your backup copy, apply system-issued changes to your backup, and then drop your custom version back into /etc/profile.d
R
Richard Kettlewell
formatting link
A
Ahem A Rivet's Shot
Yep or in the application config files.
D
druck
Ah you again.
Answer; you are not supposed to run desktop programs, particularly web browsers as root. If you want proper media access, use a user account.
The only reason for allowing sound at all, is for system tool which requires privileged access can do a warning beep.
---druck
J
Jan Panteltje
On a sunny day (Fri, 24 Jun 2022 14:20:28 +0100) it happened druck snipped-for-privacy@druck.org.uk> wrote in <t94dmt$15v$ snipped-for-privacy@dont-email.me:
The sad thing is that you got it all upside down A bit like the green idiots and climate change and CO2 (Climate change is caused by earth orbit variations), greens then kill all good power sources out of fear for glowball worming bringing us all back to the stone age and endangering humanity
As to root
1) this is my system I control it
2) there is no other user on this system.
3) I remember, probably before you were born, when I still ran the webserver panteltje.com at home, I challenged who was it some hackers group (hacktic?) to hack it I watched them try and fail
4) The problem with you root fear mongers is many fold I come from a hardware background, even designed my own processor worked with many micros programming in asm, C, what not. You root fear guys are like driving a car from the passenger seat and hopping over at ever corner, or to break, or do anything Talk about dangerous, no wonder so many get hacked. Clueless about the hardware and then clueless about the software bound and held hostage by bloat designed by those clueless about the hardware and about the software..
So root since 1998 and never a problem, yes browser runs as root too. This Pi4 is also a router so LAN hangs from it if needed, this laptop i am posting this from too. But this Newsreader I also ported to the Pi so can post from that, just this keyboard is easier.
I did some testing with audio and it gets even wearder, the clueless raspbian tinkerers
-and now I was not only thinking about firing them (I would) but about that US hotel in Cuba where they specialize in water-boarding as a holiday for them.. Anyways I got the stereo sound working now, as root of course in the xmpl mediaplayer I wrote 'like most things that run here I wrote myself'. So, more raspbian s*it and then maybe I will use some older release one running on a Pi4 4 GB 24/7 now with security cams weather sensor, airplane traffic logging GPS, what not.. FM stereo reception now also works in the Pi 4 8GB (rtl-sdr USB stick) as does 70 cm HAM radio etc with the xpsa spectrum analyzer (I wrote too of course) and the xpeu audio process (I wrote too of course) Much of that audio processing can be done with 'play' (part of sox, but you need to export some device to the terminal you run it in or script it (have that somewhere too), but xpequ has a scope and spectrum display plus automatic gain control plus equalizer plus.. so..
*IF* those raspian tinkerers just want to sell some thing that some idiot can use for web browsing and maybe blurb here insults fine, think they had a go at that as they already put out some 400? thing with a keyboard But that market is .. well I have a smart?phone too, Android is Linux based too. So, but if it has to have __educational__ value then the raspbian tinkerers did a bad bad bad job!!! Yea, anybody can do BASIC (mm not sure actually these days) but likely python or whatever have you, scripts would already be a challenge.. So, where does it go??? You have to be an idiot developer to make a PI4 8GB that does not run the release for a Pi 4GB as happened to me, they screwed up the EEPROM.
In a PC you can just add some more memory without changing all software.
Its all hype. 64 bits... Whatsyou gonna do? With it?
So 'root' is what the tree comes from, no root (access) no tree What a morons. And the anybody who is pi can do sudo rm -rf /* try it! Druckman!
Easy to make a website where you can go with your sandboxed browser that does that for you, or email.
D
druck
No amount of mentioning other stupid things, makes the stupid thing you are doing any less stupid. I just hope no one else is stupid enough to let you near a computer in a professional capacity
[Snip rabid tirade]
It's pretty obvious the Raspberry Pi does not meet your needs, so find something else.
---druck
A
Ahem A Rivet's Shot
You're not quite as rude as that Clough fellow, but you are still failing to explain what additional risks he's running by using root as he does, resorting instead to content free insults. He has articulated pretty clearly why he doesn't think he's risking anything and points to decades of experience to back his assertions up. Right now you (and Dan) look like knee jerk idiots criticising a thoughtful person - do better for yourself.
So here's the challenge - explain clearly exactly how he is being stupid without recourse to generalities like "never do X it's bad" without saying why. So if he really is being stupid *EDUCATE* him and the rest of us don't insult him and tell us all exactly *WHY* and *HOW* he is being stupid.
Start by explaining why a single user with passwordless sudo access is more secure than a root login. On a multi-user system sudo is used mainly for accountability not security, when it is used for security the sudo configuration is tight and very carefully worked out.
T
The Natural Philosopher
+1. A single user pi is not a mainframe.
I don't run mine as root because I have no need to and the modern convention is not to, so online support assumes that.
But if he wants to make a rod for his back, he is welcome.
R
Richard Kettlewell
AFAICS Jan is throwing around a lot more heated language than druck.
Well, one of the risks is that things don’t work like he wants them to, and indeed they don’t work like he wants them to. That’s how the thread started.
I don’t see why he should bother.
A
Ahem A Rivet's Shot
That is a problem of not using the carefully set up pi user, nothing to do with being root. If he simply created a user 'jan' without all the user specific config pi has he'd be seeing similar problems. That is because the OS is not set up properly for multi-user use.
It would be a public service, an education to all rPi users to know exactly why and when being root is a bad idea. He might also learn something in the attempt to articulate it clearly - I did a long time ago.
A
alister
access
It is not so much that he is running risk in this particular setup, the system may indeed be totally isolated & therefor @ zero risk. it is that by engaging in bad practice he gets into bad habits which may then transfer across to systems where it is critical, there is also the possibility that the current system may evolve to where security is important & adding security as an after thought has a risk of something being overlooked. the effort he is spending in bypassing the default security model would be better invested in learning how to correctly work with it.
A
Ahem A Rivet's Shot
Feel free to assume it's connected directly to the public internet, what exactly is at risk and why is that risk greater for root than for pi with passwordless sudo ?
You still haven't explained why it is bad practice on a single user system with no important data.
There is no default security - user pi with a well known default password has passwordless sudo - effectively equivalent to being root.
D
Deloptes
I stopped reading here ... I agree with you about green activists, but here you are fundamentally wrong
Also your language and attitude is not acceptable.
When you know all better, start a fork project, but please do not insult people who are most likely more intelligent than you are.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.