Saturday, February 29, 2020

Welcome

Welcome to my Blog.

Most the stuff you see here is Linux, Audio or Computer related

Thursday, August 16, 2018

Run 32bit executables under 64bit Ubuntu

Trying to run an old linux script. Turned out to be 32bit.
Just install
apt-get install libc6-i386
 
and it works.
 
from https://superuser.com/questions/1076730/how-to-run-32-bit-app-in-recent-ubuntu-64-bit 

Tuesday, September 8, 2015

Lubuntu Change Autologin User

From http://www.itworld.com/article/2725495/it-management/how-to-put-lubuntu-into-automatic-login-mode.html

Where you make the changes to configure a Lubuntu system for automatic login depends on the release you are using. In releases prior to 12.04, the change must be made in the file /etc/lxdm/default.conf. You can open a terminal (lxterminal) and edit it with vi (e.g., gksudo vi /etc/lxdm/default.conf) or use a desktop editor like leafpad (e.g., gksudo leafpad /etc/lxdm/default.conf).
Uncomment the following line and change "dgod" to the intended login name. This ensures that the automatic login recognizes your account and knows where your home directory and files belong, etc.
# autologin=dgod
After the change, the autologin line in your file might look like this:
autologin=spongebob
 
 
In Ubuntu releases starting with 12.04, however, you need to edit a different file. With the new display manager, lightdm, a different file is used to manage this setting. So, you edit the /etc/lightdm/lightdm.conf file instead.
lightdm is an X display manager that is fast, extensible and provides the ability to use multiple desktops -- like lubuntu and OpenBox. The lightdm.conf file, after your changes, will look something like this. Note the lack of # signs on the autologin lines:

[SeatDefaults] 
autologin-user=spongebob 
autologin-user-timeout=0 
user-session=Lubuntu 
greeter-session=lightdm-gtk-greeter

You can switch back to the using a username and password to log in in by reversing the changes described above. Put the comment markers back in front of the autologin lines and reboot.
In both cases, the username must match the one you set up when you installed the system or you will need to edit your /etc/passwd and /etc/shadow files and move the home directory to match the new name.
Obviously, autologin can only be used for one account. The system needs to know which account to activate when it boots.

Wednesday, August 27, 2014

Checking if rdairplay is running

I was having a few problems with rdairplay crashing randomly and leaving silence on air. I made a script to check if it is running and restart if neccessary and delete the rdairplaylock file. I hope someone finds this usefull.
 I think someone wrote something similar a while back using a while loop or something.
You could run it periodically using crontab if you wished?
When you save this file dont include the word "rdairplay" as part of the file name or else the running of this script will show up as an "rdairplay" process on your system. I called my script checkrdair.sh ... but you can choose a name that suits you.


#!/bin/bash

# This returns a value of 0 (if not running) or 1 (if rdairplay running)

statusrdairplay=`ps x | grep -v grep | grep -c rdairplay`

echo $statusrdairplay

 if [ $statusrdairplay = "1" ]; then
 echo "rdairplay is running"
else

# Remove rdlockfile Change the path to the rdairplaylock file on your set up.
rm /home/geoff2/.rdairplaylock

# Start rdairplay /usr/bin/rdairplay &

#Pause for 10 seconds to give rdairplay time to start up prior the running rmlsend command sleep 10

#Optional you could add this rmlsend line here to play next track if you wished
rmlsend PN\ 1\!

fi

exit

Friday, August 1, 2014

Connecting to a Remote Webstream with Rivendell

Rivendell Macro Cart.
Note this can be triggered during ordinary playback on rdairplay to connect as required.

RN /home/USERNAME/scripts/stream-connect-script.sh! < script that starts mplayer connected to remote stream (while loop) through 3rd sound card.

SP 10! < Sleep 10 ms

RN /home/USERNAME/scripts/openinput.sh! < script that open channel on Line Input (1st sound card) so 3rd soundcard output connects to it.

SP 10!

PM 3! < Switches Rdairplay to Manual Mode

LB Starting stream in 10 seconds!

SP 2000!

LB Starting stream in 8 seconds!

SP 2000!

LB Starting stream in 6 seconds!

SP 2000!

LB Starting stream in 4 seconds!

SP 2000!

LB Starting stream in 2 seconds!

SP 2000!

LB Remote Stream On!

PS 0 5000! < Stop Machine playing out with a 5 second fadeout

SP 5000!


-------------------------------------------------------------------------------------------------------------------------


stream-connect-script.sh
#!/bin/bash
#Note: Playing sound out of 3rd sound card hw2,0 (1st card hw0,0 and 2nd card hw1,0)
sleep 11

while [ true ]
do
mplayer -ao alsa:device=hw=2,0 http://actual-url-of-stream:8000

sleep 3
done

---------------------------------------------------------------------------------------------------------------------------------


openinput.sh
#!/bin/bash

sleep 13

# open amixer Line input channel to 90% volume, (adjust on audio level of stream.)
amixer -c 0 sset Line,0 90%,90%

Disconnecting from Stream

RN /home/USERNAME/scripts/stopstreams.sh!

SP 100!

RN /home/USERNAME/scripts/closeinput.sh!

PM 2!

LB Resume Playlist in 14 seconds!

SP 2000!

LB Resume Playlist in 12 seconds!

SP 2000!

LB Resume Playlist in 10 seconds!

SP 2000!

LB Resume Playlist in 8 seconds!

SP 2000!

LB Resume Playlist in 6 seconds!

SP 2000!

LB Resume Playlist in 4 seconds!

SP 2000!

LB Resume Playlist in 2 seconds!

SP 10!

PN 1!

LB The Worlds Best Radio Station!

-------------------------------------------------------------------------------------------------------------------------

stopstreams.sh!

#!/bin/bash

#Delay 13 seconds
sleep 13


#Kill Streaming processes
killall stream-connect-script.sh
killall mplayer

------------------------------------------------------------------------------------------------------------------------

closeinput.sh

#!/bin/bash

sleep 12

amixer -c 0 sset Line,0 0%,0%


Sunday, May 25, 2014

Show Only Unread Messages in the Gmail Inbox with Search

This uses a search function, making it temporary, and it does not change how the inbox functions or sorts messages beyond this task:
Click into the Gmail Search box and type the following exactly:

is:unread

This info from  http://osxdaily.com/2013/06/30/show-unread-messages-gmail/