Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
RFC2324
Jun 7, 2012

http 418

Its actually not a bad idea, tho

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

epic meme haha le upvote

Longinus00
Dec 29, 2005
Ur-Quan

reading posted:

Yes, I set my larger monitor as the primary one in all three of those settings.

I can't switch the cables because the smaller monitor is quite old and my video card, although it has two slots, can only accept the plugs in the order they're in right now. The older monitor is on the first port I think.

This problem didn't use to happen, it only started after an OS update I think it was an update to 14.04 or whatever the current ubuntu is? if I remember correctly I had to wrangle with the new nvidia driver at that point and then things got this way.

Did you try starting the game from the monitor you wanted to launch the game on? As in, physically move the steam window to that monitor. I find this is how I can choose the which monitor to launch on (but I'm on ATI).

Xenomorph
Jun 13, 2001
Samba question!

We have an old server with a lot of files (~3000).

When doing an "ls" to get the list of files, it simply lists the 3000 files.

When doing an "ls -l" to get the long listing of files, the Samba process hits 100% CPU utilization and never returns any file list. We've waited several minutes for it to do something, but nothing happens.

Logs are clean. Nothing out of the ordinary. No errors. I've bumped them up to level 4 and still didn't see anything strange. Of course, at that level there is lots of extra stuff to dig through. How can we figure out what Samba is hanging on when trying to list files? Something in the long-listing. File size, file date, owner info, etc...?

Ubuntu 14.04.2, Samba 4.1.6, ext4 FS, Gigabit network connection.

pseudorandom name
May 6, 2007

ls -l will make calls to lstat() and getxattr() to get the file attributes, POSIX ACLs and SELinux labels; I'd guess the getxattr() calls are going wrong somehow.

evol262
Nov 30, 2010
#!/usr/bin/perl

pseudorandom name posted:

ls -l will make calls to lstat() and getxattr() to get the file attributes, POSIX ACLs and SELinux labels; I'd guess the getxattr() calls are going wrong somehow.

To follow up, strace will show you exactly what's happening

Xenomorph
Jun 13, 2001
strace had crazy amounts of data zooming by. Just a few seconds captured to file was nearly 20MB.

I'm still looking into it, but removing "hide unreadable = yes" from the Samba config at least lets the long directory listing finish. "ls -l" takes about 2 minutes on a directory with ~3000 files, but it does work.

evol262
Nov 30, 2010
#!/usr/bin/perl

Xenomorph posted:

strace had crazy amounts of data zooming by. Just a few seconds captured to file was nearly 20MB.

I'm still looking into it, but removing "hide unreadable = yes" from the Samba config at least lets the long directory listing finish. "ls -l" takes about 2 minutes on a directory with ~3000 files, but it does work.

Did you attach it to the process at 100% or start it with "strace ls -l ..."

If it's the second one, yeah, there's a ton of stuff. But in that case, you'd generally just let it run until it looks like it's hung up somewhere. Or actually read the syscalls if it's busy.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Xenomorph posted:

strace had crazy amounts of data zooming by. Just a few seconds captured to file was nearly 20MB.
Heavens, that's nearly 14 floppy diskettes!

other people
Jun 27, 2004
Associate Christ
evol262, I work in RDU at the tower.

I did a screen sharing session today with a customer who was reading SA :o

evol262
Nov 30, 2010
#!/usr/bin/perl

Kaluza-Klein posted:

evol262, I work in RDU at the tower.

I did a screen sharing session today with a customer who was reading SA :o

I'll harass you if I'm ever back in Raleigh.

Lukano
Apr 28, 2003

With amazon's new $60/yr unlimited Cloud Drive plan, I'm thinking about taking a look at it for backup purposes.

Does anyone know if there's a client (or script or tool or anything at all) that can be used on linux to push backups to Cloud Drive? Perhaps something I can utilize with encfs for iterative and encrypted backups?

Ema Nymton
Apr 26, 2008

the place where I come from
is a small town
Buglord

Ema Nymton posted:

2 years ago I formatted a 3.0 TB Western Digital Green HD with WD's Acronis Align to make the drive useable in Windows XP (no 3 TB support). It does this by splitting it into two partitions and making Windows believe the second partition is a separate drive. This pretend drive partition does not appear in any linux distro I have, and WD support help for linux is poor.
Now I have Windows Vista which can read 3.0 TB, so I want to fix the drive properly and use linux too. This is not my boot drive but I'm using it to store 1.5 TB of sundry backups that I don't want to do over again. I just want to be able to access my data in linux without reformatting and losing everything.

Well, I ended up solving this the easy way in the end. I got a used external 2 TB drive to back up everything just in case I messed it up, which I did. I messed up the partition table, caused the data to be lost, and just reformatted the partitions over again and restored the backups.
So it's solved now. The new NTFS partitions they are both accessible in Windows and Linux, as planned. I just did it the caveman brute way. v:saddowns:v

code:
 sdc      8:32   0   2.7T  0 disk 
--sdc1   8:33   0     2T  0 part /media/chest
--sdc2   8:34   0 746.5G  0 part /media/jewel2 
So now I can use it as my backup platform and use the USB Linux I carry with me at work without issue.

reading
Jul 27, 2013

Celexi posted:

try deleting your xorg config file and using the nvidia command to generate a new one

This did it! I deleted the /etc/X11/xorg.conf and used the nvidia command panel to write a new one. Thanks!

Marinmo
Jan 23, 2005

Prisoner #95H522 Augustus Hill

evol262 posted:

(dbus, udev, and pulseaudio all come to mind)

But appeals to tradition are bad, especially when that appeal itself is fallacious
Thing is, remember pulseaudio? Yeah, me neither. I'll take you down memory lane though: it's that thing that was the "future of audio on linux" where 99 % of people was fine with piping poo poo directly to alsa and enjoyed listening to whatever goatporn they got off to. Also, pulseaudio had a poo poo ton of flaws, quite a few bugs and a somewhat incomprehensible (to the layman) config when it was released into the wild, and its author/main architect/lead proved to be a massive, massive cock. You can just google his name and inevitably you'll end up with him being snarky, rude or outright hostile towards other developers. Or all 3 at the same time, which unfortunately isn't very unusual. This is the same guy who is now head of systemd. I realise I'm talking about one of your colleagues, but there's no defending that guy. I'd piss my pants as well if "the future of the Linux userspace" was in the hands of that lunatic, but here we are. Systemd in itself isn't too bad I guess, it does bring quite a few pros, but I'm really holding out on it; I'm (despite the catastrophe of a SA thread devoted to it) still expecting win10 to be a really good desktop OS which would confine linux to my server which rarely sees use these days anyway. Further, I'm not so sure that the deprecation of udev and subsequent integration of systemd poo poo (no matter how nice/convenient/good it may be) in the kernel counts as "separation" anymore, but I'm not too well versed in the subject to definitely judge that.

Just for clarification: No one remembers PA especially because by now most of its bugs are ironed out and things work flawlessly (a few years later ...). Still, literally no one has any idea what the big pros of it are since 99 % of users don't need networked audio. It's solving a problem that didn't really exist in the first place, which is what systemd kinda is as well to the detractors of it, only way way way (I want to keep on writing way here but I'm sure you get the point) more intrusive.

TL;DR: The problem is not necessarily all systemd as a design, the problem is also its lead and feature-creep into the kernel

Karnivool
May 28, 2009
I have a requirement of web browsing from a vps using a Linux distro, what would you recommend? Need it to be as quick/smooth as possible, there will be some flash pages.

Longinus00
Dec 29, 2005
Ur-Quan

Marinmo posted:

Thing is, remember pulseaudio? Yeah, me neither. I'll take you down memory lane though: it's that thing that was the "future of audio on linux" where 99 % of people was fine with piping poo poo directly to alsa and enjoyed listening to whatever goatporn they got off to. Also, pulseaudio had a poo poo ton of flaws, quite a few bugs and a somewhat incomprehensible (to the layman) config when it was released into the wild, and its author/main architect/lead proved to be a massive, massive cock. You can just google his name and inevitably you'll end up with him being snarky, rude or outright hostile towards other developers. Or all 3 at the same time, which unfortunately isn't very unusual. This is the same guy who is now head of systemd. I realise I'm talking about one of your colleagues, but there's no defending that guy. I'd piss my pants as well if "the future of the Linux userspace" was in the hands of that lunatic, but here we are. Systemd in itself isn't too bad I guess, it does bring quite a few pros, but I'm really holding out on it; I'm (despite the catastrophe of a SA thread devoted to it) still expecting win10 to be a really good desktop OS which would confine linux to my server which rarely sees use these days anyway. Further, I'm not so sure that the deprecation of udev and subsequent integration of systemd poo poo (no matter how nice/convenient/good it may be) in the kernel counts as "separation" anymore, but I'm not too well versed in the subject to definitely judge that.

Just for clarification: No one remembers PA especially because by now most of its bugs are ironed out and things work flawlessly (a few years later ...). Still, literally no one has any idea what the big pros of it are since 99 % of users don't need networked audio. It's solving a problem that didn't really exist in the first place, which is what systemd kinda is as well to the detractors of it, only way way way (I want to keep on writing way here but I'm sure you get the point) more intrusive.

TL;DR: The problem is not necessarily all systemd as a design, the problem is also its lead and feature-creep into the kernel

One pro of pulseaudio over straight ALSA is that you can listen to two different audio streams at once (e.g. you're watching youtube and chatting with your mom over skype) without requiring a hardware mixer in your soundcard. This may not seem like a big deal but when was the last time a consumer computer had anything but one of those realtek chipsets? Unless you wanted everyone to go out and buy soundcards to put into their computers (think about laptops here) the writing was on the wall for pure ALSA.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

Longinus00 posted:

One pro of pulseaudio over straight ALSA is that you can listen to two different audio streams at once (e.g. you're watching youtube and chatting with your mom over skype) without requiring a hardware mixer in your soundcard. This may not seem like a big deal but when was the last time a consumer computer had anything but one of those realtek chipsets? Unless you wanted everyone to go out and buy soundcards to put into their computers (think about laptops here) the writing was on the wall for pure ALSA.
You can do this with ALSA already. Actually you had too in the first few years of pulseaudio.
For a long time I had pulsaudo inputing into the ALSA software mixer, so that I could still have sound for the applications that triggered strange bugs in pulse or that didn't want to use pulse.

The actual part of pulse that I used was the ability to assign output and input streams to recording sinks.

Marinmo
Jan 23, 2005

Prisoner #95H522 Augustus Hill

Longinus00 posted:

One pro of pulseaudio over straight ALSA is that you can listen to two different audio streams at once (e.g. you're watching youtube and chatting with your mom over skype) without requiring a hardware mixer in your soundcard. This may not seem like a big deal but when was the last time a consumer computer had anything but one of those realtek chipsets? Unless you wanted everyone to go out and buy soundcards to put into their computers (think about laptops here) the writing was on the wall for pure ALSA.
As someone else already pointed out, this was fully possible with ALSA as well. Actually, that was one of the big pros of ALSA over OSS afaik. So no, that's not something PA solved. Sorry, sad fact is: ALSA was/is enough for 99 % of users. PA is more or less pure cosmetics, things that you go "oh that's nice to have, despite that I'll never use it". It's basically fulfilling edge-case users' desires, which it's great at. It just wasn't by any stretch of the imagination necessary when keeping in mind all the headaches it gave users when it was forced upon them.

Marinmo fucked around with this message at 17:12 on Mar 28, 2015

Powered Descent
Jul 13, 2008

We haven't had that spirit here since 1969.

Karnivool posted:

I have a requirement of web browsing from a vps using a Linux distro, what would you recommend? Need it to be as quick/smooth as possible, there will be some flash pages.

It depends on what it's for and how it'll be used. If you're using the VPS like a VPN (say to get around geo-IP restrictions and watch your Myanmar-only web content from Tanzania), you can just toss any distro on the planet onto your VPS and then tunnel your local browser through an ssh tunnel to it (short version: ssh -D 12345 username@vps and then set up Firefox to use localhost:12345 as a SOCKS5 proxy). This will give you the best performance on resource-intensive things like flash, and no need to mess with a remote desktop window.

But if you do need a complete remote desktop, performance is necessarily going to suffer, particularly for big heavy things like flash. Run a minimalist DE like LXDE -- the "lubuntu" distro is probably the simplest way to set that up -- and then to connect to it, set up something like VNC over an ssh tunnel, or maybe xrdp.

Give us a bit more info about what this is for, and we can get into more specifics.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Marinmo posted:

As someone else already pointed out, this was fully possible with ALSA as well. Actually, that was one of the big pros of ALSA over OSS afaik. So no, that's not something PA solved. Sorry, sad fact is: ALSA was/is enough for 99 % of users. PA is more or less pure cosmetics, things that you go "oh that's nice to have, despite that I'll never use it". It's basically fulfilling edge-case users' desires, which it's great at. It just wasn't by any stretch of the imagination necessary when keeping in mind all the headaches it gave users when it was forced upon them.

Simple thing PA gives me over ALSA: when a Skype call comes in, the rest of the audio on my system is muted. This is a policy behavior based on stream tags.

Trying to build a usable API that ties ALSA streams to applications is nigh impossible, and I tried it several times before declaring it broken. dmix was unmaintained at the time (the ALSA authors said not to use it), and PulseAudio was originally started as a high-level dmix with user-understandable streams.

I just Googled Lennart Poettering and didn't find any evidence of him being hostile or a dick.

For me, I got his blog, his Google+ page, a change.org petition saying that he should "stop writing useless software", and a wide variety of press articles echoing his comments on the Linux community, where he says that Linus saying that people "should be retroactively aborted" may not be conducive to a great, technical community.

You're thinking of Ulrich Drepper, most likely, who now works for Goldman Sachs.

ExcessBLarg!
Sep 1, 2001

Marinmo posted:

and its author/main architect/lead proved to be a massive, massive cock.
Datenwolf's talk at 27C3 is one of the best examples of this. Yes it's an hour long, but it's worth it. Poettering is the heckler that interrupts him incessantly and eventually steals the stage.

evol262
Nov 30, 2010
#!/usr/bin/perl

Marinmo posted:

As someone else already pointed out, this was fully possible with ALSA as well. Actually, that was one of the big pros of ALSA over OSS afaik. So no, that's not something PA solved. Sorry, sad fact is: ALSA was/is enough for 99 % of users. PA is more or less pure cosmetics, things that you go "oh that's nice to have, despite that I'll never use it". It's basically fulfilling edge-case users' desires, which it's great at. It just wasn't by any stretch of the imagination necessary when keeping in mind all the headaches it gave users when it was forced upon them.

The problem Pulse did solve is per-application volume control and channels, as well as muxing and demuxing. For fun, start a wine app that uses sound and configure wine not to use the pa mixer. Then try to play Spotify or flash or anything. Watch one or the other block. Yeah, alsa worked great.

And, as dish notes, alsa was/is terrible to code against.

Marinmo posted:

Thing is, remember pulseaudio? Yeah, me neither. I'll take you down memory lane though: it's that thing that was the "future of audio on linux" where 99 % of people was fine with piping poo poo directly to alsa and enjoyed listening to whatever goatporn they got off to. Also, pulseaudio had a poo poo ton of flaws, quite a few bugs and a somewhat incomprehensible (to the layman) config when it was released into the wild, and its author/main architect/lead proved to be a massive, massive cock. You can just google his name and inevitably you'll end up with him being snarky, rude or outright hostile towards other developers. Or all 3 at the same time, which unfortunately isn't very unusual. This is the same guy who is now head of systemd. I realise I'm talking about one of your colleagues, but there's no defending that guy. I'd piss my pants as well if "the future of the Linux userspace" was in the hands of that lunatic, but here we are. Systemd in itself isn't too bad I guess, it does bring quite a few pros, but I'm really holding out on it; I'm (despite the catastrophe of a SA thread devoted to it) still expecting win10 to be a really good desktop OS which would confine linux to my server which rarely sees use these days anyway. Further, I'm not so sure that the deprecation of udev and subsequent integration of systemd poo poo (no matter how nice/convenient/good it may be) in the kernel counts as "separation" anymore, but I'm not too well versed in the subject to definitely judge that.

Just for clarification: No one remembers PA especially because by now most of its bugs are ironed out and things work flawlessly (a few years later ...). Still, literally no one has any idea what the big pros of it are since 99 % of users don't need networked audio. It's solving a problem that didn't really exist in the first place, which is what systemd kinda is as well to the detractors of it, only way way way (I want to keep on writing way here but I'm sure you get the point) more intrusive.

TL;DR: The problem is not necessarily all systemd as a design, the problem is also its lead and feature-creep into the kernel

I used Linux through the the OSS->ALSA migration, and into PA. Bluntly, I'm not sure that you did, from the way you talk about it. ALSA got lambasted when it was new, too, but "good enough for 99% of users because audio sort-of works" isn't even an argument. Pulse is intended to be a modern audio system comparable to what Windows has. Something developers can use. Something users can use. Something DEs can tie into. Something ALSA never was. It's great if all you wanna do is use mpg123. Many of us want to do more.

Systemd is not encroaching on kernel space. Wherever you're getting that argument, scrap it. kdbus has uses outside of systemd, and its uptake is unrelated.

Systemd is not deprecating udev. Scrap that argument, too.

It's pretty clear that you're not well versed on the subject. It may be better to avoid ranting about it.

Also, Poettering is no more disliked than Ulrich Drepper or Linus or Theo. Sticking to your principles sometimes involves arguing for them, and tearing down baseless arguments. That may look mean. But there's no middle ground between stuff like "systemd is invading kernel space" and reality.

pmchem
Jan 22, 2010


evol262 posted:

Also, Poettering is no more disliked than Ulrich Drepper or Linus

man I was with you until that point ... what a terrible way to defend a guy's personality

Karnivool
May 28, 2009

Powered Descent posted:

It depends on what it's for and how it'll be used. If you're using the VPS like a VPN (say to get around geo-IP restrictions and watch your Myanmar-only web content from Tanzania), you can just toss any distro on the planet onto your VPS and then tunnel your local browser through an ssh tunnel to it (short version: ssh -D 12345 username@vps and then set up Firefox to use localhost:12345 as a SOCKS5 proxy). This will give you the best performance on resource-intensive things like flash, and no need to mess with a remote desktop window.

But if you do need a complete remote desktop, performance is necessarily going to suffer, particularly for big heavy things like flash. Run a minimalist DE like LXDE -- the "lubuntu" distro is probably the simplest way to set that up -- and then to connect to it, set up something like VNC over an ssh tunnel, or maybe xrdp.

Give us a bit more info about what this is for, and we can get into more specifics.

Thanks for the reply, I'll try and give more info but can't go into exactly what I'm doing. I did think about using a VPN but I think it would end up getting too complicated.

What we have at the moment is a windows machine to do this but I thought we might get better performance out of a Linux server and it would also cost less per month, as we would end up having 3-4 of these machines.

There are multiple people who log into the current server and then from there access specific websites using accounts. We want the websites to know that we are accessing them always from the same IP address. Eventually we will add a second and third server which the same set of users will use to access the websites, but from a specific ip which isn't the same as the first servers.

Basically, users need to access the same websites multiple times but from different IPs concurrently, which I think would be too hard using a VPN, or multiple VPNs. The windows server works okay, but I thought I might be able to get a lot better performance out of a linux desktop.

Karnivool fucked around with this message at 23:13 on Mar 28, 2015

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

evol262 posted:

I used Linux through the the OSS->ALSA migration, and into PA. Bluntly, I'm not sure that you did, from the way you talk about it. ALSA got lambasted when it was new, too, but "good enough for 99% of users because audio sort-of works" isn't even an argument. Pulse is intended to be a modern audio system comparable to what Windows has. Something developers can use. Something users can use. Something DEs can tie into. Something ALSA never was. It's great if all you wanna do is use mpg123. Many of us want to do more.

Systemd is not encroaching on kernel space. Wherever you're getting that argument, scrap it. kdbus has uses outside of systemd, and its uptake is unrelated.
PA also wasn't interfacing with the kernel directly. It still managed to cause lots of kernel panics by interfacing with soundcard drivers in strange ways that aren't possible for alsa alone. And then the bug reports about those crashes are closed because people who use cheap sound cards shouldn't use linux anyway.
That sort of attitude for is the reason why systemd becoming the new PA is worrying.

Powered Descent
Jul 13, 2008

We haven't had that spirit here since 1969.

Karnivool posted:

Thanks for the reply, I'll try and give more info but can't go into exactly what I'm doing. I did think about using a VPN but I think it would end up getting too complicated.

What we have at the moment is a windows machine to do this but I thought we might get better performance out of a Linux server and it would also cost less per month, as we would end up having 3-4 of these machines.

There are multiple people who log into the current server and then from there access specific websites using accounts. We want the websites to know that we are accessing them always from the same IP address. Eventually we will add a second and third server which the same set of users will use to access the websites, but from a specific ip which isn't the same as the first servers.

Basically, users need to access the same websites multiple times but from different IPs concurrently, which I think would be too hard using a VPN, or multiple VPNs. The windows server works okay, but I thought I might be able to get a lot better performance out of a linux desktop.

I'll give you the benefit of the doubt and assume you're not doing anything shady. :)

If all you need to do is just regular web-browsing stuff but coming from the VPS's IP, the local browser through an ssh tunnel method is still what I'd recommend. You can use multiple firefox profiles to keep the various configurations separate but handy -- have a desktop shortcut that's something like "firefox -no-remote -P vps1" to load the profile vps1, which you'd create and then set up to go through an ssh tunnel to your first vps. You can even give each different profile a different theme, to make them visually distinct. (Or if you prefer, use icecat for the first vps, palemoon for the second, whatever. Last I checked, chrome still didn't do socks5 proxying, so you're stuck with firefox derivatives.)

I use exactly this method on my machine at work, with a separate firefox instance whose profile is set up to look through a tunnel to my VPS. That way I can read the forums despite SA being blocked at the office test our public-facing sites from a remote location.

But probably the best way to figure out what works for you is to invest the five bucks on a low-end Linux VPN for a month, toss Debian or CentOS on it, and start banging around. A new VPS will almost certainly be able to accept ssh connections out of the box, so there'll be very little to configure there except creating any user accounts you want. If you don't already have a provider in mind, there's a goon-run VPS service that I really like, or just pick something from LowEndBox.

evol262
Nov 30, 2010
#!/usr/bin/perl

pmchem posted:

man I was with you until that point ... what a terrible way to defend a guy's personality

The point is that I'm not defending his personality. His personality is fine anyway as long as you're making reasonably sound technical arguments, but that ad hominems against project leaders are a lovely way to evaluate software.

tonberrytoby posted:

PA also wasn't interfacing with the kernel directly. It still managed to cause lots of kernel panics by interfacing with soundcard drivers in strange ways that aren't possible for alsa alone. And then the bug reports about those crashes are closed because people who use cheap sound cards shouldn't use linux anyway.
That sort of attitude for is the reason why systemd becoming the new PA is worrying.
Find one. Honestly. If they we're reported in Bugzilla, it would have been reassigned to the kernel component responsible for whatever driver to get fixed, not closed. "Sorry, we only support this hardware 50% of the way" is not how it works. But the pulse guys saying "this is a bug in the platform/driver that we are not going to work around from our level" is absolutely the "right" thing to do.

This should give you confidence, not pause. It's finding bugs in the kernel and getting them fixed.

mystes
May 31, 2006

Is there any good way to record the audio from a specific instance of the flash plugin while having everything else play normally? I'm using selenium to automatically play something in firefox (admittedly hackish but it's working decently; maybe I'll try to figure out if I can use rtmpdump or something later) but my current lovely solution using pulseaudio is to take the output from pacmd to get a list of pids playing audio, find which one is descended from the selenium firefox process, switch that to a null sink, and record that sink. This isn't ideal because there's a delay before my script switches it over, and also pulseaudio wants to send the output from subsequent instances of the flash plugin to the same null sink. The problem is that there doesn't seem to be any better solution that won't affect my other audio as well. Flash uses alsa, so there's nothing that specifically identifies the instance I want to record from the point of view of pulseaudio, and I can't use the alsa configuration file to record everything because that would also affect other flash plugin instances.

It seems like there should be a LD_PRELOAD library that would do this, but with alsa and pulseaudio there isn't. Short of changing $HOME so I can use a different alsa configuration file, or running selenium as a different user, is there any better solution?

mystes fucked around with this message at 02:11 on Mar 29, 2015

evol262
Nov 30, 2010
#!/usr/bin/perl

mystes posted:

Is there any good way to record the audio from a specific instance of the flash plugin while having everything else play normally? I'm using selenium to automatically play something in firefox (admittedly hackish but it's working decently; maybe I'll try to figure out if I can use rtmpdump or something later) but my current lovely solution using pulseaudio is to take the output from pacmd to get a list of pids playing audio, find which one is descended from the selenium firefox process, switch that to a null sink, and record that sink. This isn't ideal because there's a delay before my script switches it over, and also pulseaudio wants to send the output from subsequent instances of the flash plugin to the same null sink. The problem is that there doesn't seem to be any better solution that won't affect my other audio as well. Flash uses alsa, so there's nothing that specifically identifies the instance I want to record from the point of view of pulseaudio, and I can't use the alsa configuration file to record everything because that would also affect other flash plugin instances.

It seems like there should be a LD_PRELOAD library that would do this, but with alsa and pulseaudio there isn't. Short of changing $HOME so I can use a different alsa configuration file, or running selenium as a different user, is there any better solution?

Why is selenium not a different user? Why aren't you running these tests in clean VMs where this stuff (all other flash processes) doesn't matter?

mystes
May 31, 2006

evol262 posted:

Why is selenium not a different user? Why aren't you running these tests in clean VMs where this stuff (all other flash processes) doesn't matter?
Laziness and because I just wanted to run it out of my own cron script. I guess I should just run selenium as a different user. I'm not actually "testing" anything, I'm just using selenium because I need to run a browser, ideally headlessly, and inject javascript into the page to make magic happen.

This is just a really lazy way of getting live, streaming audio out of a lovely webpage.

If I run selenium as another user what's the best way to do this? I guess I can just create a pulseaudio configuration that only has a null sink and not the actual sound card?

mystes fucked around with this message at 02:35 on Mar 29, 2015

Karnivool
May 28, 2009

Powered Descent posted:

I'll give you the benefit of the doubt and assume you're not doing anything shady. :)

If all you need to do is just regular web-browsing stuff but coming from the VPS's IP, the local browser through an ssh tunnel method is still what I'd recommend. You can use multiple firefox profiles to keep the various configurations separate but handy -- have a desktop shortcut that's something like "firefox -no-remote -P vps1" to load the profile vps1, which you'd create and then set up to go through an ssh tunnel to your first vps. You can even give each different profile a different theme, to make them visually distinct. (Or if you prefer, use icecat for the first vps, palemoon for the second, whatever. Last I checked, chrome still didn't do socks5 proxying, so you're stuck with firefox derivatives.)

I use exactly this method on my machine at work, with a separate firefox instance whose profile is set up to look through a tunnel to my VPS. That way I can read the forums despite SA being blocked at the office test our public-facing sites from a remote location.

But probably the best way to figure out what works for you is to invest the five bucks on a low-end Linux VPN for a month, toss Debian or CentOS on it, and start banging around. A new VPS will almost certainly be able to accept ssh connections out of the box, so there'll be very little to configure there except creating any user accounts you want. If you don't already have a provider in mind, there's a goon-run VPS service that I really like, or just pick something from LowEndBox.

Thanks for the awesome post, i use Chrome for most of my browsing so i didnt realise you could set just the browser to use a socks5 proxy. I've set this up using an Ubuntu VPS and firefox with the ProfileSwitch and FoxyProxy add-ons and so far its working great!

Kobayashi
Aug 13, 2004

by Nyc_Tattoo
This isn't so much of a Linux question as an SSH question. I was recently updating my dotfiles when I realized that my SSH keys all use "clever" passphrases from my pre-password manager days. I was thinking of generating new keys. My question is, if I use a 30-character random passphrase generated by my password manager, is it OK to store my private key on something like Dropbox? I assume the passphrase means that my private key is useless without the passphrase?

telcoM
Mar 21, 2009
Fallen Rib

Kobayashi posted:

This isn't so much of a Linux question as an SSH question. I was recently updating my dotfiles when I realized that my SSH keys all use "clever" passphrases from my pre-password manager days. I was thinking of generating new keys. My question is, if I use a 30-character random passphrase generated by my password manager, is it OK to store my private key on something like Dropbox? I assume the passphrase means that my private key is useless without the passphrase?

When you create a SSH key with a passphrase, the passphrase is used to encrypt your SSH private key. According to "man ssh-keygen", the encryption algorithm is 128-bit AES, at least with non-ancient versions of OpenSSH. So.... yeah, pretty much useless without the passphrase.

And you don't *have* to generate new keys: you can just change the passphrase of an existing private key, with "ssh-keygen -p".
You won't even have to redistribute the keys, since as far as the remote hosts are concerned, nothing changes.

(Of course, if your SSH keys have been created with ancient SSH versions, it might be beneficial to create new keys once in a while... especially if the key was generated with a version of Debian that had OpenSSL with a bad random number generator. The "ssh-vulnkey" command can be used to check for this.)

Kobayashi
Aug 13, 2004

by Nyc_Tattoo
Thanks, didn't know about the "-p" option, that saved a lot of time.

mystes
May 31, 2006

mystes posted:

If I run selenium as another user what's the best way to do this? I guess I can just create a pulseaudio configuration that only has a null sink and not the actual sound card?
Apparently this isn't that easy. I've tried using pulseaudio with just a null sink and I've tried using snd-aloop directly and through pulseaudio, and I just can't get anything to play; I think somehow my normal user's pulseaudio session is tying something up that's preventing the second pulseaudio daemon or snd-aloop device from working. Has anyone done anything like this or used different audio cards for different users?

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

evol262 posted:

The point is that I'm not defending his personality. His personality is fine anyway as long as you're making reasonably sound technical arguments, but that ad hominems against project leaders are a lovely way to evaluate software.

Find one. Honestly. If they we're reported in Bugzilla, it would have been reassigned to the kernel component responsible for whatever driver to get fixed, not closed. "Sorry, we only support this hardware 50% of the way" is not how it works. But the pulse guys saying "this is a bug in the platform/driver that we are not going to work around from our level" is absolutely the "right" thing to do.

This should give you confidence, not pause. It's finding bugs in the kernel and getting them fixed.
It was a few years ago. The Pa Bugzilla said that it is a kernel bug and they won't do anything even though the bug is impossible to trigger without using PA.
The report on the kernel side said there is a clear solution which is to stop using PA. So they had no interest in fixing this quickly.
It took several years to be fixed.

evol262
Nov 30, 2010
#!/usr/bin/perl

tonberrytoby posted:

It was a few years ago. The Pa Bugzilla said that it is a kernel bug and they won't do anything even though the bug is impossible to trigger without using PA.
The report on the kernel side said there is a clear solution which is to stop using PA. So they had no interest in fixing this quickly.
It took several years to be fixed.

I looked and can't find it. Can you find the bug? I don't know if it's on freedesktop or bugzilla.redhat.com

Hissy fits like this are strongly discouraged, and teams work together (either of their own volition or because someone in PM makes them).

See this. Lennart and the PA teams cannot be blamed for distro problems, especially in distros with lovely release engineering (Ubuntu) or which don't have enough engineers to triage the problem so they say "it's this other thing's fault!" (Ubuntu, older SuSE).

While "works for me" is a bad way to resolve it, the PA guys (and Lennart in particular) are not responsible for implementation details on other distros, and saying "that's a kernel bug which we don't have in Fedora, so it's your broken poo poo" is also a valid reponse.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
I just upgraded my laptop to the development version of Kubuntu 15.04, and it's mostly been a smooth experience. There are still a few rough edges with KDE 5, but I really like it overall.

I had some difficulty with locale settings -- KDE 5 handles this in a way that's better in the long run, but not quite as nice in the short term. KDE 4 allowed customizing arbitrary parts of the locale settings, so I could set 24-hour time and YYYY-MM-DD dates while still leaving the rest of my system as en_US. Unsurprisingly, this was implemented as layers of terrible hacks, and had some side effects. It didn't affect GTK programs, for instance, and it was kind of jarring to see date/time formats that are stupid and wrong in Thunderbird.

For now, KDE 5 provides a GUI wrapper around the $LC_* environment variables; my system has LANG=en_US.UTF-8 and LC_TIME=en_BZ.UTF-8, since that locale's time settings matched what I wanted (and didn't use different names for the days of the week, etc.). First problem: this wasn't actually a locale on the system according to localectl list-locales. As a result, this locale setting still didn't affect GTK programs, and caused a lot of terminal oddities: no decoding of bytes as UTF-8; perl programs saying 'Setting locale failed' and 'Falling back to the standard locale ("C")'. I found it easy enough to tweak the en_US locale to fix the date/time formats according to http://askubuntu.com/questions/21316/how-can-i-customize-a-system-locale, and I installed my tweaked locale as en_BZ. Now GTK programs work correctly and terminal character encoding issues are fixed.

After that, I had to make another small tweak to /etc/ssh/ssh_config, since SSH connections would set this nonexistent locale on remote systems. Easy enough to change SendEnv LANG LC_* to SendEnv LANG -- I'd prefer to do something like "send all LC_* environment variables except for LC_TIME", but I don't expect to ever set any of the others.

The switch to systemd seems to have been completely uneventful, too.

Adbot
ADBOT LOVES YOU

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

evol262 posted:

I looked and can't find it. Can you find the bug? I don't know if it's on freedesktop or bugzilla.redhat.com

Hissy fits like this are strongly discouraged, and teams work together (either of their own volition or because someone in PM makes them).

See this. Lennart and the PA teams cannot be blamed for distro problems, especially in distros with lovely release engineering (Ubuntu) or which don't have enough engineers to triage the problem so they say "it's this other thing's fault!" (Ubuntu, older SuSE).

While "works for me" is a bad way to resolve it, the PA guys (and Lennart in particular) are not responsible for implementation details on other distros, and saying "that's a kernel bug which we don't have in Fedora, so it's your broken poo poo" is also a valid reponse.
I can't find the reports now either. I think they were already hard to find back then even with the exact log.

The fact that it is hard to find is actually the larger problem. I was seriously considering buying a new soundcard back then, because I did want to use some of the more exotic features of PA. I decided against it because there was no way to verify if a given soundcard was compatible with PA. Because PA totally never directly interfaces with the hardware and so never can trigger strange kernel bugs.

Actually I think I saw that article you linked, back then. Or at least some similar ones. I definitely remember lots of dead links to the PA documentation that used to have some info I was looking for.

Now I see people (partially literally the same people) say the same thing about systemd. So this makes me hesitant to intall it, especially as it seems to have even less advantages than PA.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply