Running Pianobar on a headless Ubuntu 18.04 server (without X11) with Alsa/Pulseaudio and streaming audio over SSH to a Mac laptop - pulseaudio

There seem to be a vast amount of articles/posts on setting up Pulseaudio and SSH but I don't know if I've seen any in regards to pianobar.
My scenario:
I am running a headless Ubuntu 18.04 server WITHOUT X11. I would like to ssh to it from my laptop and run the pianobar app so the sound comes out of my laptop.
What I have working:
On the Ubuntu server I have installed Alsa and all its tools
On the Ubuntu server I have installed pianobar
When I physically sit at the Ubuntu server, login, and run pianobar I get sound
What I have attempted:
I installed Pulseaudio and configured the /etc/pulse/default.pa file as instructed in a lot of the google info I find. The most important part seems to be:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 auth-anonymous=1
My problem:
When I ssh into the server from my Mac and run pianobar the sound is still coming out of the server
I have tried a lot of variations with my ssh connection. I understand I'm supposed to be forwarding a port of some sort but I dont know if I have even setup the server right.
Docs I have used to troubleshoot:
https://askubuntu.com/questions/28176/how-do-i-run-pulseaudio-in-a-headless-server-installation?rq=1
https://github.com/cladmi/systemd_pulseaudio_al
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/
https://askubuntu.com/questions/28176/how-do-i-run-pulseaudio-in-a-headless-server-installation
https://askubuntu.com/questions/939144/playing-audio-stops-in-unity-when-i-switch-user/939338#939338

Related

no internet on cloned virtual machine (Vmware workstation)

so i setup a centOS vm in VMware workstation, installed qradar..everything ran fine. I call this vm as QR1.
I was able to use qradar console on QR1 from my host machine, the internet works perfectly fine in QR1.
I make a full clone of QR1 called it QR2.
I boot it up and only running QR2 vm (QR1 is closed) but there is no internet on this vm. Even though all the network setting are same as QR1 and QR1 works just fine(i double checked).
QR2 has same adapter, same ip, same gateway and dns as of QR1 but it doesnt work...
previously i was thinking that i cannot have them both running at same time but QR2 just doesnt connect.
I am also not able to ping QR2 from my host and other way around.
What could be causing this ?
According to this vmware link reference, try these steps:
To change the MAC address of the Linux operating system:
Connect to vCenter Server using the vSphere Client Right-click the
virtual machine and click Edit Settings. Click Network adapter and
note the MAC Address.
For example, you see a MAC Address similar to:
xx:xx:xx:xx:xx:xx
1.Power on the Linux virtual machine.
2.Open a console and log in as root.
3.Change directory to etc/sysconfig/network-scripts.
4.Edit ifcfg-eth0 using a plain text editor and update the MAC address to reflect the MAC address in Step 3.

Raspberry Pi VNC fail connection

I face a problem that I can ping to correct IP address, it have no loss. And also I use nmap ping the pi address, and I get it correctly. Then I using VNC viewer to try access to pi, but it always show up "The connection was refused by the host computer"
Did u all have any idea ?
Your problem indicates that your Raspberry Pi was reached by the connection attempt, but that no service was running on the relevant port and hence the connection was refused. I think, this is because the VNC service is not running on your Raspberry Pi.
Update 1
Raspbian now comes with the server by default thanks to a partnership with RealVNC, it just needs to be enabled.
Original
You must enable VNC Server on your Raspberry Pi using terminal
sudo apt-get update
sudo apt-get install realvnc-vnc-server
or you can also enable VNC Server on the command line using the sudo raspi-config command.
Advanced Options->VNC:Yes
Now you can connect to the VNC Server using a application such as VNC Viewer.
I have been having this issue with my Raspberry Pi Zero W even though it worked perfectly beforehand. This page https://www.realvnc.com/en/connect/docs/raspberry-pi.html should help.
I ran vncserver in a ssh window after verifying the interface settings in raspi-config.
It started the VNC Server and gave me the VNC Server catchphrase and the IP address with Port Number as shown in the photo linked below.
vncserver output
After running that command I was able to get the VNC Viewer on my windows machine to connect to the pi.
I then ran sudo systemctl enable vncserver-x11-serviced.service in the ssh window so that it would start automatically on subsequent reboots.
I've had this same problem but found a different reason. I found three ways to get around this error message.
Plug a mouse or keyboard into the Raspberry Pi zero, waking up the screen and the VNC connection.
Wait about 5 - 10 minutes which is the amount of time for the screen saver to kick in which seems to wake up VNC connection. but don't wait to long other wise run this command to get things going via ssh "systemctl start vncserver-x11-serviced.service".
I am hoping the new update they just published will fix this problem. I don't see this as much with the Raspi B3+ as with the Zero H.
The last was plug in both monitor and mouse and that for sure fixes the VNC issues but defeats the headless connection. It seems that running headless and the screen/saver are somehow related but just not smart enough to figure it out.
For people using newer version of Raspberry, VNC option is found under:
Config>Interface Options
pinging to any service will only tells us that whether the server is currently listening on that port or not. It will not tell you the possible result to connection request asked by client.
It seems that, you have installed VNC server but not started it properly. Use this command to start it...
# vncserver start
Also recheck the port number is correct or not.
With the Rasp Pi 4 - had connecting fail after rebooting both the server and client (both Rasp Pi 4s).
Took a while to realize that I have two clients: One named "VNC Client", the other "VNC Viewer for Google Chrome".
The former works, the latter doesn't.

Access guest from virsh

I am running Centos 7 x86-64. I installed a guest (again Centos 7) through kickstart as an exercise. I prepared my kickstart file, I validated it and I launched with virt-install.
If something went wrong with the network configuration (During install I got no problem, I created a local repo on Host FTP server as source for the install) how can I connect to the machine?
Only SSH or virsh foresee some other connection method?
How can I find my machine running network configuration from outside?
I am running a barebone Centos7 installation so only command line, no graphical interface at all.
Thanks,
M.
You can ssh to your physical host from another one having graphical interface with X forwarding enabled (ssh -X machinename), and look at the the VM with virt-manager
You will need X running on the machine you're connecting from. For Mac OS it's XQuartz

How to configure ipython notebook on laptop to point to remote server for execution

Well, my previous attempt to connect Pycharm from laptop to remote server did not see any ray of hope because of tcp/ip issues (which honestly I could not understand much and am still battling with) therefore I am looking to ipython as an alternative
Question: How can I configure ipython on laptop to point to the remote CentOS6 server for code processing and execution
Use Case: I want to use my laptop (using Win 7 Professional) to connect to the CentOS 6.4 master server using iPython.
Objective: To write the code in iPython on the laptop and then send the job to the server which will do the processing and should then return the result back to the laptop or to any other visualizing API.
The server and 3 namenodes already installed with pyspark and I have checked pyspark works in standalone mode on all four servers. Pyspark works in standalone mode on my laptop too.
Current setup: I use SSH to access the server. python 2.6 is installed on the server and the nodes. Able to run pyspark on all 4 servers in standalone mode
Any pointers will be helpful.
You have to start the IPython Notebook server on one cluster-node and then connect to the cluster-node's url. To do this, you have to create a profile, where you may specify hostname, port and so on. Have a look at this:
http://ipython.org/ipython-doc/1/interactive/public_server.html

Connecting to a remote CentOS machine

I am trying to connect to a remote system which has CentOS running on it from a Windows machine. I am getting the following error:
My remote computer is on and is available on the network. I tried following the steps mentioned on this website http://www.techotopia.com/index.php/Remote_Access_to_the_CentOS_6_Desktop to enable remote access on centos as well.
Currently I can access the remote sever through commandline utility like Putty only.
I use VNC for remote GUI admin work on CentOS device's from windows its nice and easy to set up and use, below are links to CentOS 6.5 set up guide and 7
https://www.howtoforge.com/vnc-server-installation-centos-6.5
https://www.howtoforge.com/vnc-server-installation-on-centos-7
Let me know how you get on :)
As posted by PaulM, I followed the steps in the website to install VNCServer on the centos machine.
To connect from my linux machine, I wrote the following commands:
vncviewer
IPAddress:5901
Adding the port number specifically made it work
CentOs to centOs Only
No Need Any Softwares Already Centos have TigerVnc Viewer
1.Enable Remote desktop in your centos system
Goto System-->Preference-->Remote Desktop
**i.Enable allow other user to view your Desktop**
**ii.Enable allow other user to control your Desktop**
**iii.You must confirm each access to this machine allow or cancel**
**iv.if you ask any password to enable and type your password**
Notification Area:
Some one connect your system its enable to shows the icon on top panel.