Código:
Tome este codigo.fakeroot make-jpkg jdk-1_5_0_06-linux-i586.bin Creating temporary directory: /tmp/make-jpkg.XXXXCWrtcd Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh Detected product: Java(TM) Software Development Kit (J2SDK) Standard Edition, Version 1.5.0+update06 Sun Microsystems(TM), Inc. Is this correct [Y/n]: ........................ :~/Desktop$ sudo dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb Password: (Leyendo la base de datos ...
Código:
y lo guardo como .sh, le doy permisos y todo#!/bin/sh if (test -r /tmp/xmms-info) && (test -a /tmp/xmms-info) && (test "Playing" = `cat /tmp/xmms-info | grep Status | sed 's/Status: //'`); then cat /tmp/xmms-info | grep Title | sed 's/Title: //' | sed 's/ (invalid UTF-8)//' | iconv -f UTF-8 -cs -t ISO-8859-9 -; else echo ""; fi
Código:
Otro script que hace lo mismo es:apt-get install xmms-infopipe
Código:
lo ejecuto en un terminal con sudo sh xmm xmmscurr.sh y me muestra la canción que se esta tocando en ese momento en xmms. de esta forma:#!/usr/bin/perl -w $file='/tmp/xmms-info'; $aa=open(INFO, $file); if(!$aa) { print "no escucho nada"; exit(0); } else { @ar=<INFO>; close(INFO); $data=$ar[12]; $data=~ s/Title//; print "escuchando$data";
Código:
# sudo xmmscurr.sh Faith No More - Stripsearch
Código:
Pero la idea es que aprezca en Mercury por lo tanto como leí por ahí eso se consigue colocando:# ./xmms.pl escuchando: Faith No More - Stripsearch
Options->Account settings->switch to advanced view->shell command
Código:
pero no funciona.sudo sh /home/jung/xmmscurr.sh sh /home/jung/xmmscurr.sh sh /usr/bin/xmmscurr
tampoco funciona con:
Código:
También trate con Amarok~/xmms.pl /home/jung/xmms.pl
Código:
En la consola:Options -->Account Settings --> Display Name --> Current Song Options --> Shell Command: dcop Amarok player nowPlaying dcop amarok player nowPlaying dcop amarok player nowplaying
Código:
tampoco funciono # dcop amarok player nowPlaying ERROR: Couldn't attach to DCOP server!
Código:
# sh sh-3.00# cat /tmp/xmms-info XMMS protocol version: 2467 InfoPipe Plugin version: 1.3 Status: Stopped Tunes in playlist: 1 Currently playing: 1 uSecPosition: 0 Position: 0:00 uSecTime: 197694 Time: 3:17 Current bitrate: 0 Samping Frequency: 0 Channels: 0 Title: Doors - Love Me Two Times.mp3 File: /home/jung/Mp3/Doors - Love Me Two Times.mp3 sh-3.00# cat /tmp/xmms-info XMMS protocol version: 2467 InfoPipe Plugin version: 1.3 Status: Playing Tunes in playlist: 1 Currently playing: 1 uSecPosition: 1846 Position: 0:01 uSecTime: 197694 Time: 3:17 Current bitrate: 128000 Samping Frequency: 44100 Channels: 2 Title: Doors - Love Me Two Times.mp3 File: /home/jung/Mp3/Doors - Love Me Two Times.mp3 sh-3.00# cat /tmp/xmms-info | grep -i title | cut -b0-7 Title: Title: sh-3.00# cat /tmp/xmms-info| grep -i title| cut -b8- Doors - Love Me Two Times.mp3 sh-3.00# cat /tmp/xmms-info| grep -i title| cut -b8- Doors - Love Me Two Times.mp3 sh-3.00# javac -classpath .:pathtodmsn.jar *.java error: cannot read: *.java 1 error sh-3.00#