Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Spotifyのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Spotify
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:音声/動画]] [[Category:Wine]] [[en:Spotify]] [http://www.spotify.com/ Spotify] は数百万もの曲にアクセスすることができるデジタル音楽サービスです。 このインターネット音楽サービスを使うことで無料でデータベースから曲を選択してストリーミング再生できます。以前はヨーロッパ限定でしたが、最近になってアメリカでもサービスが開始されました。Debian と Fedora ディストリビューション向けに公式に Linux クライアントがパッケージで配布されており、AUR からインストールすることが可能です: {{AUR|spotify}}。公式では、Linux ユーザーは Wine で Windows クライアントを動かすことを推奨しています。また、曲の間にときどき音声広告が流れます。 Spotify では無料ユーザーがプレイリストを作成することができ、シャッフルしたり、リピートするトラックを設定することができます。Spotify で提供されているコンテンツにはオリジナル版と検閲版の両方があります。 == クライアントのインストール == 使用したいクライアントをどちらか選択してください。Linux クライアントの方が好評ですが、wine の使用に慣れている場合、windows クライアントを選択するのも良いでしょう。両方のクライアントをインストールする必要はありません。{{AUR|mopidy}} + {{AUR|mopidy-spotify}} または {{AUR|despotify-svn}} のようなオープンソースクライアントも存在しますが、基本的にプレミアムアカウントでないと動作しません。https://play.spotify.com/ で使えるオンラインプレイヤーも存在します (flash が必要です)。 === Linux === [[AUR]] の {{AUR|spotify}} を使うと自動的にソフトウェアがダウンロードされます。ローカルファイルを再生したい場合は {{pkg|ffmpeg-compat}} もインストールする必要があります。 === Windows (Wine) === [[Wine]] を見て下さい。 Spotify のウェブサイトでアカウント登録してから Spotify を取得してください。アプリケーションのアプリ内登録はできません。ただし次の URL を使うことで登録をする前にアプリケーションを取得することは可能です: [http://download.spotify.com/Spotify%20Installer.exe]。 After you have registered and downloaded your copy of the installer you will need to run the application through Wine, depending on your setup you may be able to run the application by right clicking the file. If not terminal will work just fine, as long as you run the below command in the directory of your download. $ wine Spotify\ Installer.exe Once the application is successfully installed you may run Spotify by using one of the following commands in terminal, or in the ALT+F2 launcher: If you use a x86_64 copy of ArchLinux, you will have to run it like this: $ wine "/home/username/.wine/drive_c/Program Files (x86)/Spotify/spotify.exe" If you use a x86 copy of ArchLinux, you can use this command just fine: $ wine ~/.wine/drive_c/Program\ Files/Spotify/spotify.exe If you have any additional problems, I recommend setting the winecfg to Windows XP or Windows 7 emulation. == グローバルなメディアホットキー == Spotify は {{ic|XF86AudioPlay}} などのメディアキーをサポートしています。ただし何も設定をしていなかった場合 Spotify の中でしか動作しません。[[xbindkeys]] などを使用してグローバルのメディアキーの押下を取得してから、以下のどれか方法を使うことで Spotify に転送することができます。 === Linux === ==== Playerctl ==== {{aur|playerctl}} ユーティリティは Spotify プロセスにコマンドを送信するコマンドラインツールを提供します。グローバルに設定する必要があるコマンドは {{ic|play-pause}}, {{ic|next}}, {{ic|previous}} だけです: $ playerctl play-pause $ playerctl next $ playerctl previous Playerctl は始めに見つけたプレイヤーにコマンドを送るため、[[VLC]] などの他のプレイヤーでも使えます。他のプレイヤーを無視させるには、{{ic|--player=spotify}} を引数に付けてください。 ==== xdotool ==== {{ic|xdotool}} を使うことでホットキーをアプリケーションに送信することが可能です。以下は Spotify を外側から操作するスクリプトの例です: #!/bin/sh case $1 in "play") key="XF86AudioPlay" ;; "next") key="XF86AudioNext" ;; "prev") key="XF86AudioPrev" ;; *) echo "Usage: $0 play|next|prev" exit 1 ;; esac xdotool key --window $(xdotool search --name "Spotify (Premium |Unlimited |Free )?- Linux Preview"|head -n1) $key exit 0 {{ic|musickeys.sh}} のように名前をつけて、スクリプトに実行可能属性を付与してください: $ chmod +x musickeys.sh By executing {{ic|./musickeys.sh play}} you can now toggle playing a song. Now you can bind this script to any tool that catches keypresses, such as [[xbindkeys]]. ==== D-Bus ==== An alternative to the above is [[D-Bus]], which should be available by default as it is a dependency of [[systemd]]. With D-Bus we have a consistent and reliable way to communicate with other processes, such as Spotify. To play or pause the current song in Spotify: $ dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause In order to bind this and the other commands to the media keys you need to install [[Xbindkeys]] and edit your .xbindkeysrc and add the following lines: # Play/Pause "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay # Next "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext # Previous "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrev # Stop "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop If the above commands do not work, try setting the dbus address: USER=`whoami` PROCESS=spotify PID=`pgrep -o -u $USER $PROCESS` ENVIRON=/proc/$PID/environ if [ -e $ENVIRON ] then export `grep -z DBUS_SESSION_BUS_ADDRESS $ENVIRON` else echo "Unable to set DBUS_SESSION_BUS_ADDRESS." exit 1 fi ===Windows === wine 版の Spotify を使っている場合、{{AUR|spotifycmd}} を使用して Spotify にアクションを送信することができます。[https://github.com/Tarrasch/dotfiles/compare/0149505f%5E...19ede1f6 こちら] に spotifycmd を使用した xmonad バインディングの設定例があります。 == Tips & Tricks == === トラック通知を無効化 === {{note|It is worth noting that if you have a {{AUR|SpotCommander}} [http://olejon.github.io/spotcommander/ Server] running alongside Spotify, and you disable track notifications by following the instructions below, the [https://play.google.com/store/apps/details?id=net.olejon.spotcommander&hl=en SpotCommander Client] running on your mobile device will display that “No Music is Playing” and will [http://askubuntu.com/questions/472325/remove-spotify-pop-up-notification-when-a-song-starts/472329#472329 fail to display track info] such as title, artist, album art, etc. Apart from that, the mobile client still works fine though, and is still able to skip, play, pause, control volume, etc.}} バージョン 0.9.10 から、トラック変更の通知がデフォルトで有効になっています。この通知は非常に邪魔に思えるかもしれません。無効にするには、以下の行を {{ic|~/.config/spotify/Users/<spotifylogin>-user/prefs}} に追加してください: ui.track_notifications_enabled=false {{ic|--ui.track_notifications_enabled=false}} オプションを付けて spotify を実行することでも設定できます。 === トラック通知を表示 === {{AUR|playerctl}} には {{pkg|python-gobject}} と {{pkg|dunst}} のような通知デーモンと一緒に使用するライブラリが付属しており、トラックが変更されたときにアーティストとタイトルを通知で表示することができます。 #!/usr/bin/env python3 from gi.repository import Playerctl, GLib from subprocess import Popen player = Playerctl.Player() def on_track_change(player, e): track_info = '{artist} - {title}'.format(artist=player.get_artist(), title=player.get_title()) Popen(['notify-send', track_info]) player.on('metadata', on_track_change) GLib.MainLoop().run() === 何度も再生されるラジオトラックをスキップ === {{AUR|playerctl}} ライブラリの他の使い道としてラジオで何度も再生されるトラックをスキップすることができます。ラジオ局で聞きたくない曲を低く評価する必要はもうありません。 #!/usr/bin/env python3 from gi.repository import Playerctl, GLib player = Playerctl.Player() played_out = ['Zu Fuss', 'Walk And Talk', 'Neuland'] def on_track_change(player, e): if player.get_title() in played_out: player.next() player.on('metadata', on_track_change) GLib.MainLoop().run() === コマーシャルをミュート === [https://github.com/mikar/blockify blockify] を使えばコマーシャルをミュートできます (Wine 版とネイティブの Linux クライアント両方で使えます)。[[AUR]] の {{AUR|blockify}} でインストールできます。 Spotify が起動するたびに blockify をバックグラウンドで実行されるようにするには: {{bc|<nowiki> #!/bin/sh spotify=/usr/bin/spotify if [[ -x $spotify && -x /usr/bin/blockify ]]; then blockify & block_pid=$! $spotify trap "kill -9 $block_pid" SIGINT SIGTERM EXIT fi </nowiki>}} 上のスクリプトを {{ic|/usr/local/bin/spotify}} に配置すれば、Spotify を起動したときに {{ic|/usr/bin/spotify}} が優先されます。他に変更する必要があるところはありません。アップデートしても消えることはありません。 === リモートコントロール === ==== SSH でコマンドを送信 ==== If you set up ssh on the server, you can send controls from a client to a remote Spotify instance with $ ssh user@host ''yourcommand'' where ''yourcommand'' can be {{AUR|spotifycmd}} that you installed on the server, or a dbus script for the linux version, as described above. ==== SSH で Spotify ウィンドウをつかむ ==== Aside from grabbing the whole desktop with TeamViewer or VNC to remotely control your server, you can also only grab the Spotify Window from the server to your client. To do that, you need to configure sshd on your server and install x11vnc on both server and client as well as tigervnc on the client. Then you can use these scripts to grab either the complete dektop or only the Spotify window, which essentially gets you GUI client-like behavior as with MPD. {{bc|<nowiki> #!/bin/bash # vncget.sh if [[ $1 == all ]];then ssh -f -t -L 5900:localhost:5900 user@host "x11vnc -q -display :0 -auth .Xauthority" else ssh -f -t -L 5900:localhost:5900 user@host ".bin/vncgetspotify.sh" fi for i in {1..4}; do sleep 2 if vncviewer localhost:0; then break; fi done </nowiki>}} {{bc|<nowiki> #!/bin/bash # vncgetspotify.sh export DISPLAY=:0 id=$(wmctrl -lx | awk '/spotify.exe.Wine/ {print $1}') [[ -z $id ]] && id=$(wmctrl -lx | awk '/spotify.Spotify/ {print $1}') x11vnc -sid $id -display :0 -auth .Xauthority </nowiki>}} You will need to copy the second script to ~/.bin/vncgetspotify.sh on the server and the first script to any place on your client. Finally, to grab the spotify window, run on the client: $ sh vncget.sh or, for the whole desktop: $ sh vncget.sh all == トラブルシューティング == === DWM で Spotify Linux を使用した時に画像が点滅したり正しく表示されない === Start spotify as a floating window. You can add this rule to the rules array in your {{ic|config.h}}: { "Spotify", NULL, NULL, 2, True, -1 }, This will tell dwm to start spotify as a floating window associated with the tag "2" no matter what window mode you are in. Recompile and install dwm to apply your new settings. === 検索やブラウザ、ラジオが動作しない === : Spotify [http://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Bug-Desktop-Linux-0-9-0-133-gd18ed589-Having-mixed-locale-breaks/td-p/418270 bug report] concerning non-english locales If various tabs like browsing only show a blank screen, the search field doesn't seem to do anything or the radio page is broken (stuck when starting and unsresponsive to input) you might be using a custom locale. Spotify を起動する前に {{ic|LC_NUMERIC}} 環境変数を {{ic|en_US.utf8}} に設定してみてください。 === Spotify がローカルファイルを再生しない === This can manifest in a very unusual manner like some songs not playing when you try to stream them because the player attempts to play them from the hard drive. Try installing {{pkg|ffmpeg-compat}}, as per [https://bbs.archlinux.org/viewtopic.php?pid=1383240 this forum discussion]. === SpotifyHelper.exe がクラッシュする (Windows クライアント) === Spotify を起動した時に SpotifyHelper.exe がクラッシュする場合、{{ic|winecfg}} で d3d9 ライブラリを無効化してください。"Libraries" タブを開いて、"d3d9" を選んで Add をクリックしてください。無効化するには、edit をクリックして "Disable" オプションを選択してください。 === ランチャーアイコンがおかしい (Windows クライアント) === ランチャーに Spotify アイコンが正しく表示されない場合、次の行を {{ic|~/.local/share/applications/wine/Programs/Spotify.desktop}} に追加してください: StartupWMClass=spotify.exe === Pulseaudio === [[PulseAudio/トラブルシューティング]] や [https://bbs.archlinux.org/viewtopic.php?pid=1393465#p1393465] を見て下さい。 === プロキシを使ったときにアルバム画像が表示されない、四角が表示される === spotify を終了して、spotify の設定 {{ic|~/.config/spotify/prefs}} を開いて下さい。 @https を @http に変更してください: network.proxy.addr="your-proxy.com:80<strong>@http</strong>" network.proxy.mode=2 See original form post [http://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Mac-Windows-0-9-0-128-Apps-can-t-connect-anywhere-behind-proxy/m-p/448704#M52332 here]. === Spotify でローカルネットワーク上の他のデバイスが検出されない === ファイアウォールを使っている場合、UDP と TCP のポート 57621 を開いて下さい。[[iptables]] の[[シンプルなステートフルファイアウォール]]を使用している場合、以下で設定できます: iptables -A TCP -p tcp --dport 57621 -j ACCEPT -m comment --comment spotify iptables -A UDP -p udp --dport 57621 -j ACCEPT -m comment --comment spotify It is also possible to restrict the source and destination to the local network. ==参照== *[https://github.com/acrisci/playerctl playerctl]: メディアプレーヤーを操作するためのコマンドラインユーティリティ・ライブラリ *[[SpotCommander]]: Spotify のウェブベースのリモートコントロール *http://www.spotify.com/int/help/faq/wine/ *http://www.spotify.com/int/download/previews/
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:App
(
ソースを閲覧
)
テンプレート:Aur
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
Spotify
に戻る。
検索
検索
Spotifyのソースを表示
話題を追加