Pages

Connecting Banshee to Samba Server

Banshee is running on the Mint media player PC and needs to access the music files on the Ubuntu-based server running Samba.
Create a folder on the Mint box /mnt/remote
Mount the remote file system
Point Banshee at /mnt/remote

mkdir /mnt/remote
sudo mount.cifs //Lounge/mhs /mnt/remote -o user=username%password rw noperm

I then added the following to /etc/fstab to mount the remote file system during boot:
#Mount the Samba share for the music on the //Lounge server
//Lounge/mhs /mnt/remote cifs username=username,password=password 0 0

Restarting ssh server

After making changes to the ssh configuration, restart the OpenSSH Server service:


/etc/init.d/ssh restart

Enabling ssh in Mint

LinuxMint by default does not enable SSH server.


apt-get install openssh-server

Samba smbclient

To list the shares on a Windows server from Ubuntu and Raspbmc:

smbclient -L //windowsservername -U domain/username%password

To connect to a shared folder on the Windows server

smbclient //windowsservername/sharename -U domain/username%password

Finding Network Devices

To find all the devices on my home network I used arp-scan from Mint/Ubuntu Terminal.

sudo apt-get install arp-scan

sudo arp-scan --interface=wlan1 --localnet

Where wlan1 is the name of the network interface which can be found with:

ifconfig


Posting code snippets

This is the simple markup I use for posting code snippets on this blog.



<pre style="font-family: Courier New, Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; ">
<code>

content here

</code>
</pre>

Launching Banshee

When my Mint-based media player logs on I want Banshee to launch and start playing. For some reason the --play command line option doesn't work when Banshee starts up. So I wrote this script to launch Banshee and then issue the "play" command.
#!/bin/bash

##############################################
# Launch Banshee
##############################################

banshee &

##############################################
# Wait until Banshee appears in the
# list of running processes
##############################################

let watchdogcount=30

while :
do
 ps -A | grep -w "banshee"
 if [ $? == 0 ]
 then
  break
 fi
 echo "sleeping"
 sleep 1

 # Ensure that the script doesn't loop forever
 ((watchdogcount--))
 if [ $watchdogcount == 0 ]
 then
  echo "timeout"
  exit
 fi
done

##############################################
# Issue "play" command until Banshee's
# state is "playing"
##############################################

while :
do
 echo "checking state"
 banshee --query-current-state | grep -w "playing"
 if [ $? == 0 ]
 then
  break
 fi
 banshee --play
 sleep 1
 echo "sleeping"
done

I saved the script in my Documents folder as "banshee_play", made it executable then added it as one of my Startup Applications...

Open in Terminal

This post gave me a handy tip that has made navigating with Terminal much nicer.


sudo apt-get install nautilus-open-terminal


adds a context menu item to open a new terminal window in the selected folder.

Appears to already be in Mint 14 (Mate).

Mint / Ubuntu Wireless Adapter

Found this excellent post that solved all my "no-name" wireless adapter installation woes.

I used the v3.4.4 (2012/11/12) driver on Mint 14.

I got one error during installation:
ERROR: Module 8192cu does not exist in /proc/modules

and changed Step 5 to use pluma instead of gedit

sudo pluma /etc/modprobe.d/blacklist.conf


In case the original post ever disappears here are the essential bits:

Download the Realtek RTL8191SU drivers from here

Navigate to the downloaded folder and install the drivers with:

sudo bash install.sh

Blacklist the original drivers with:

sudo pluma /etc/modprobe.d/blacklist.conf

Go to the end of the file and add the line: blacklist rtl8192cu

Reboot