Spotify remote del 2

January 9th, 2010

spotify_remote

För att göra det hela till ett dubbelklick så skapade jag först en rsa nyckel och kopierade över till htpc’n så jag kan logga in via ssh -X utan att bli promptad av lösenord.

ssh-keygen -t rsa

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/johnny/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/johnny/.ssh/id_rsa.
Your public key has been saved in /home/johnny/.ssh/id_rsa.pub.
The key fingerprint is:
95:09:93:d5:78:1d:ed:82:67:47:5c:2c:a7:c7:00:9d johnny@johnny-laptop
The key's randomart image is:
+--[ RSA 2048]----+
|        oo.o.+.*o|
|        .o.oo E *|
|          +. . O |
|         .  . = =|
|        S    o + |
|                 |
|                 |
|                 |
|                 |
+-----------------+

Sedan behövde jag kopiera över filens innehåll till htpcn’s ~/.ssh/authorized_keys på den user jag vill logga in som…

scp ~/.ssh/id_rsa.pub xbmc@192.168.0.191:/home/xbmc/.ssh/authorized_keys

$ scp ~/.ssh/id_rsa.pub xbmc@192.168.0.191:/home/xbmc/.ssh/authorized_keys
xbmc@192.168.0.191's password:
id_rsa.pub                                    100%  402     0.4KB/s   00:00

När det är klart ssh utan password fungerade så gjorde jag en sökväg som loggar in på htpc’n med ssh -X och startar spotify.
Följande sökväg kan man ange i valfri genväg på desktop med ditt username på remotedatorn.

ssh -X xbmc@192.168.0.191 'env WINEPREFIX="/home/<strong>xbmc</strong>/.wine" wine "C:\Program Files\Spotify\spotify.exe"'

spotify_remote_shortcut

Detta fungerar bra för mig då jag nu kan t.ex kontrollera spotify med gui ifrån en laptop samtidigt som xbmc körs med någon video igång…

test

January 9th, 2010

test

Spotify remote

January 6th, 2010

Har länge velat kunna styra spotify på min htpc via gui ifrån en annan dator på nätverket…
Kom att tänka på ssh x i ubuntu iom att jag kör spotify under ubuntu på min htpc.

Wine + spotify + ssh x.
Hade redan spotify & wine installerat samt ssh så kollade först att X11Forward var satt till yes i ssh_config

sudo cat /etc/ssh/ssh_config | grep X11

xbmc@htpc1:~$ cat /etc/ssh/ssh_config | grep X11
# ForwardX11 no
# ForwardX11Trusted yes
Satte ForwardX11 till yes samt tog bort “#”.

sudo /etc/init.d/ssh restart

Logga in igen via ssh på htpcn med -X och starta spotify.

ssh -X xbmc@htpc1
env WINEPREFIX="/home/xbmc/.wine" wine "C:\Program Files\Spotify\spotify.exe"

brum brum

September 26th, 2009

_0830175web

Höstbilder på Charlie

September 14th, 2009

_0830111

En sväng till Sigtuna

July 21st, 2009

poff

20090719_0579

Hittat kakpaketet

July 9th, 2009

_0830005

Sommarbrillorna

July 6th, 2009

20090707_0487

diNovo mini

July 3rd, 2009

20090703_0444

Används till min mini-itx burk kopplad till tvn.

mobbler

July 1st, 2009

Mobbler i nokia 5800 luren ut via förstärkaren.

20090702_0407