ALSA (snd_pcm_open) over SSH? - ssh

I have written an application using ALSA (snd_pcm_open, snd_pcm_readi, etc). The application works perfect locally on my machine. However, when I SSH to another machine and run it through the SSH connection, all calls to snd_pcm_open fails with a message "Device does not exist" or similar. The remote machine has a soundcard just as my local machine has.
What could be the problem here?
Thanks!
EDIT: If I run the application using the console on the remote computer (walk to the computer, login, run the application), the application runs fine.

The problem might be with /dev/snd/* access rights.
Be sure the user is in the audio group.
In my case, I had to do adduser $USER audio, disconnect and then reconnect.

Just to check for the obvious: Are the drivers for the sound card on the remote machine loaded and working correctly? Check /proc/asound/cards and see so that the card is listed.

Just to confirm...you have the application installed on the remote machine and the remote machine has otherwise working aplay etc? The remote machine must be set up so that if you were to login from the console and run the application, it would work
If this is the case then check your environment variables as sometimes they can be subtly different.

Found the reason. Turns out /dev/audio and the devices below /dev/snd/ where all owned by the user logged in on the remote computer, and readable/writable by no one else. For testing I applied chmod 777 /dev/audio /dev/snd/* and it started working.
Anyone know how I can apply a bit more generous permissions to the audio devices for the remote computer (which will last after a reboot)?

Related

wpa_supplicant - run without sudo

I'm developing an embedded linux application & it uses egt as the GUI front-end. The GUI uses wpa_supplicant to connect/ register WiFi network. I've got the same GUI application running on my desktop for development purposes.
Accessing wpa_supplicant (e.g. wpa_ctrl_open) isn't an issue on the actual embedded device as it runs as root, but on the desktop I'm running into permission errors. I don't want to run the GUI application as root on my desktop in case it trashes my system.
So whats the proper way to run wpa_supplicant as non-root?
Many thanks,
All credit goes to Klaus D. for the correct answer. As he suggested the issue as the permissions on the sockets. Initially I only changed the permission of the actual socket (i.e. WiFi interface) but the actual containing folder needs to be set correctly also (i.e. var/run/supplicant).
Thanks Klaus & hope this helps someone else.

Can we use BLPAPI remotely?

The SDKs at https://www.bloomberg.com/professional/support/api-library/ allow you to connect to localhost 8194 to fetch data. Please correct if any of the following is incorrect:
The use of the SDK requires the installation of a Terminal software on the PC where the program using the SDK is being run.
The Terminal software creates an endpoint listening on port 8194 through which the data can be fetched.
Question:
Is it possible for another computer in the local network to run the SDK and connect to the computer that hosts the Terminal service?
Does the Terminal service license support such use wherein the data leaves the PC and gets pulled to a different PC?
Regards
No, it is not technically possible to connect to another PC which is running the Terminal and even if you can get around this it is not allowed by the license. Data downloaded on a PC running the Terminal must stay on that PC.
Bloomberg offers 2 solutions which don't require the Terminal to run and do require authentication: Server API (SAPI) and B-PIPE. To clarify, because you're describing having to run the Terminal on the PC you're necessarily talking about Desktop API.

Remote Desktop Connection monitors

I log into my work pc from home via VPN + Remote Desktop Connection.
When I log into my work PC, do the monitors invoke at work or stay locked and inactive?
In other words, when I working from home on my work pc, do others standing near my pc can see what I'm doing?
No, RDP takes over the console of the computer.
They however will be able to see on your monitor that You are logged in remotely to that specific computer.
They will see this for example:
http://msblog.blob.core.windows.net/wordpress/2010/11/17a043334c6bd9a1d37194f78df0af21.png

no internet on windows phone 8 emulator

I have installed windows phone 8 SDK and tried running a simple app which embeds a WebBrowser on a page. When I try to run the app in emulator the emulator does not get internet connection. It displays an error message saying "You don't have permission to modify internal Hyper-V network adapter settings required to run the emulator". Im sure my login has admin permissions. My machine is 64bit, hyper v is enabled and Hyper v manager is running, hardware virtualization is enabled in the BIOS settings, DHCP is enabled and its connected to a wired network. I have checked all the system requirements. What ever I do it keeps on giving the same error message. I setup everything in a different machine and tried running the app in that machine. The same error message is displayed in the that machine also. Can anyone tell me how to get it working.
DHCP is enabled and its connected to a wired network
Can you run ipconfig /all on your host machine and post it here please?
seems you have problem with your DHCP or maybe multiple DHCP and conflict.
You need to add your user account as a member of the "Hyper-V Administrators" group on the machine.
Detailed steps:
Hit Windows key + Q and search for "local users and groups". Change the search scope to "Settings". Click "Edit local users and groups".
Expand the "Groups" section. Right-click on "Hyper-V Administrators" and select "Add to group".
Add your user account.
Some connection tools on the host can have negative effects when used with the emulator; I found having cisco VPN client installed on the host prevented the emulator from finding the internet. Other VPN clients may have similar side-effects. I simply uninstalled cisco (the inbuilt windows VPN is fine for what I need) and it worked perfectly.
I've also seen problems where it won't find the internet after the host has been suspended / resumed. In that scenario, it turned out to be bad network drivers. I installed a dedicated Intel NIC (rather than the on-board NIC on the motherboard) - problem solved.
Basically, Hyper-V is a bit fussy.
try refreshing the hyper-v by unchecking and then checking it again,this worked for me.
Steps:
1.control panel>>programs>>Programs and features>>turn windows features on and off>>hyper-v
2.uncheck it and restart the pc.
3.again go to control panel an check hyper-v and restart the pc again.
the try to run the emulator,should work..
another possible reason is that you did not start vs2013 as admin

run gnu-screen/tmux/byobu from client

I need to understand a fundamental concept about terminal multiplexers yet I can't seem to find the answer.
As I understand these programs need to be installed on server but not necessarily on clients. It's not a problem with gnu-screen as it is already installed on most systems but it's not the case for tmux and byobu. The problem is that I don't have permission to install software on the server. Is there a way I can run byobu from my client to show statistics about the server I connect?
Also what exactly is the effect of 'byobu-enable' option?
I think there is a misunderstanding here. When you connect to the server and run a command (byobu in this case), you are running the command on the server. Statistics reported are for the server. It's possible to open a byobu session on your own desktop of course, but if you're ssh'd into a machine, you're very likely to be executing commands on that machine.
byobu-enable sets byobu to launch automatically when you open a terminal. I don't do this since you can have confusion if you have byobu running locally and on the remote end you have connected to, which causes problems when you try to interact with byobu itself.