Smooth サウンドテーマをインストールして Xfceデスクトップでイベントサウンドを鳴らす手順
ざっくり言うと、Smooth_v1.2.tar.gz をダウンロード&展開して index.theme と stereoフォルダを
/usr/share/sounds/Smooth に配置するだけなので、コンパイルする必要はない。
しかしながら、削除するときの利便性を考慮してパッケージ化しておくのが後々のためなので
パッケー作成スクリプトも以下に公開する。
1. Source
Smooth.info
[code]
PRGNAM="Smooth" VERSION="1.2" HOMEPAGE="https://www.pling.com/p/1187979/" DOWNLOAD="https://ocs-dl.fra1.cdn.digitaloceanspaces.com/data/files/1503357675/Smooth_v1.2.tar.gz?response-content-disposition=attachment%3B%2520Smooth_v1.2.tar.gz&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=RWJAQUNCHT7V2NCLZ2AL%2F20241116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241116T175002Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=478eb13b6ae4e0e75a80468558e6a180a38c8057cf4ab0cc23c72d4be9602e31" MD5SUM="604fad389740b481d16a40d74c3b49fd" DOWNLOAD_x86_64="direct download link(s) of application source tarball(s), x86_64 only" MD5SUM_x86_64="" REQUIRES="%README%" MAINTAINER="JW(Shinichi Abe)" EMAIL="shin1_dot_abe_at_nifty_dot_com" |
2. SlackBuild
Smooth.SlackBuild
[code]
#!/bin/sh # Slackware build script for Smooth_v1.2 # Copyright 2024 JW(Shinichi Abe) <shin1.abe@nifty.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=Smooth VERSION=${VERSION:-1.2} BUILD=${BUILD:-1} TAG=${TAG:-jw} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM tar xvf $CWD/${PRGNAM}_v${VERSION}.tar.gz cd $PRGNAM chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p $PKG/usr/share/sounds/${PRGNAM} cp -a stereo $PKG/usr/share/sounds/${PRGNAM}/ cat index.theme > $PKG/usr/share/sounds/${PRGNAM}/index.theme mkdir -p $PKG/usr/local/bin cat $CWD/xfce4-session.user > $PKG/usr/local/bin/xfce4-session find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG -name perllocal.pod \ -o -name ".packlist" \ -o -name "*.bs" \ | xargs rm -f mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a documentation $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README.slackware.ja_JP > $PKG/usr/doc/$PRGNAM-$VERSION/README.slackware.ja_JP mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} |
xfce4-session.user
[code]
#!/bin/bash # run the real xfce4-session executable /usr/bin/xfce4-session # on exit, run my stuff canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-logout.oga |
3. slack-desc
slack-desc
[code]
# HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. # Line up the first '|' above the ':' following the base package name, and # the '|' on the right side marks the last column you can put a character in. # You must make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| Smooth: Smooth (Smooth - complete system sound theme) Smooth: Smooth: Smooth - complete system sound theme, 58 sound events included Smooth: Smooth: HOME: https://www.pling.com/p/1187979/ Smooth: Smooth: Smooth: Smooth: Smooth: Smooth: |
設定手順(日本語)
README.slackware.ja_JP
[code]
XFce4 で Smoothサウンドテーマを鳴らすための手順: パッケージをインストール後に以下の設定を行ってください 1. 設定マネージャー > 外観 > 設定 > イベントサウンドを有効にする 2. 設定マネージャー > 設定エディター > xsetting/Net/SoundThemeNameの値を「Smooth」に設定する 3. [HOME]/.xinitrc に以下の行を追加する # Enable system event sound on Xfce4 GTK_MODULES="$GTK_MODULES:canberra-gtk-module" export GTK_MODULES 4. ※ XFceスタートアップ・サウンドを鳴らしたい場合、以下の設定が必要 設定マネージャー > セッションと起動/自動起動アプリケーション に以下のエントリを追加する 名前 = Login Sound 説明 = Login Sound コマンド = canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-login.oga トリガー = ログイン時 5. ※ XFceログアウト・サウンドを鳴らす場合, /usr/local/bin/xfce4-session に実行属性を付与してください (/usr/local/bin/xfce4-session はSmoothパッケージによりインストールされるものです) chmod +x /usr/local/bin/xfce4-session 設定終了後は必要に応じて XFceを再起動する。 --- 以上 |
---
【追記】2024/11/19
スタートアップ・サウンド/ログアウト・サウンドの音量(Volume)を変更する方法:
( How to change voulme of Startup / Logout sounds: )
1) スタートアップ・サウンドの音量を変更する設定
[HOME]/.config/autostart/Login-Sound.desktop の
Exec=canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-login.oga 末尾に
-V <value> を追加する
※ <value> は dB値
Example ) Decreese volume by 10dB :
canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-login.oga -V -10.0
2) ログアウト・サウンドの音量を変更する設定
/usr/local/bin/xfce4-session の
canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-logout.oga 行の末尾に
-V <value> を追加する
Example ) Decreese volume by 10dB :
Example ) canberra-gtk-play -f /usr/share/sounds/Smooth/stereo/desktop-logout.oga -V -10.0