Raspberry + Samba

Installing Samba:
[cc lang=”bash”]
apt-get install samba samba-common-bin
[/cc]

Once there, edit /etc/samba/smb.conf as follows:

[cc lang=”bash”]
workgroup = [your_workgroup_name]

[SHARE-NAME]
comment=Samba Share
path=/PATH/TO/YOUR/SHARE
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
[/cc]

At last, setup the Samba password:

[cc lang=”bash”]
smbpasswd -a YOUR_USERNAME
[/cc]

Raspberry + Transmission

Let’s begin with the basics. We’ll need to upgrade the system to the latest, and update the apt-get database. Once ready, we’ll proceed with the transmission’s daemon + cli binaries, as follows:

[cc lang=”bash”]
sudo
apt-get update
apt-get upgrade
apt-get install transmission-cli transmission-common transmission-daemon transmission-remote-cli
[/cc]

Authentication:
By default, transmission requires you to setup username / password. Since our goal is *not* to expose Transmission to the open internet (and we’ll only use it via SSH), we’ll simply neutralize any kind of authentication:

[cc lang=”bash”]
nano /etc/transmission-daemon/settings.json
[/cc]

Once there, edit this snippet:

[cc lang=”bash”]
rpc-authentication-required: false
[/cc]

Logging:
We want Transmission to keep an events log. Anything that goes wrong during setup… must be persisted, otherwise, debugging it will be a nightmare.

The only way i’ve found to set this up, is by means of the Daemon Service Descriptor:

[cc lang=”bash”]
nano /lib/systemd/system/transmission-daemon.service
[/cc]

Once there, you want to add the logfile’s path. Make sure that the file exists, and Transmission’s user has enough permissions to edit it:

[cc lang=”bash”]
OPTIONS=”–config-dir $CONFIG_DIR –logfile /var/log/transmission.log”
[/cc]

Filesystem Permissions:

Transmission’s user is specified in the transmission-daemon.service descriptor (which is debian-transmission). So… you really wanna make sure whatever shared folder you end up using, belongs to Transmission’s group.

[cc lang=”bash”]
usermod -a -G debian-transmission YOUR_USER
chgrp debian-transmission /DOWNLOADS/PATH
chmod 770 /DOWNLOADS/PATH
[/cc]

Magnets!

In order to begin downloading a magned, try the following:

[cc lang=”bash”]
transmission-remote-cli
(And press ‘A’)
[/cc]

Restarting Stopped

Last tip: If you need to restart all of your downloads at once, this command becomes quite handy:

[cc lang=”bash”]
transmission-remote -t all -s
[/cc]

Raspbian: Disabling Graphic Mode

Why: because i’m setting up my Raspberry as a private server, and i really don’t need the XWindow overhead!

How: As follows!

[cc lang=”bash”]
systemctl get-default
[/cc]

Verify that the output is: graphical.target.
Now… type the following!

[cc lang=”bash”]
sudo systemctl set-default multi-user.target
[/cc]

Ref. Here

Update:

Simpler way? just run raspi-config and change the setting right there!

Spotify: Multiuser Issues

I’ve recently hit an annoying issue: if you share your mac with, say, your brother… you’ll figure out that Spotify will only work in one of the two accounts.

It doesn’t really matter if you actually have two seats or not. It won’t run at all.

Solution?. As ever… bash and…

[cc lang=”bash”]
cd /Applications
sudo chmod -R 755 Spotify.app/
[/cc]