Control Remote Shell Fm With Bash Aliases
well, having a non-graphical TTY on some of my computers, and a remote shell-fm running as daemon, i made a few aliases in my .bashrc file to control shell-fm over the network, using netcat (nc):
$ grep 54311 ~/.bashrc alias info='echo info | nc 192.168.0.1 54311 ; echo' alias love='echo love | nc 192.168.0.1 54311' alias ban='echo ban | nc 192.168.0.1 54311' alias skip='echo skip | nc 192.168.0.1 54311'
thus, whie i'm working on my terminal and listening to last.fm, i can type at any time:
[ctrl-z] # this keystroke interrupts my current working application $ love # this tells shell-fm i love the current song $ fg # i'm back to my work
of course, here, the IP address of my shell-fm is hard-coded: don't forget to use your own if you copy these aliases in your ~/.bashrc. ah, some people would prefer not to use the 'info' alias because they use the GNU info browser ? two solution appear:
- type \info to have the GNU info browser, or
- rename the 'info' alias to something else, such as 'title'
page revision: 0, last edited: 15 Oct 2008 23:41