Fluxbox - 共通事項 - 自動起動 - MX Linux


クラウディア 


1. 概要
2. MX Linux

1. 概要

 「MX Linux」での、「Fluxbox」の自動起動について記述します。

2. MX Linux

 「MX Liunx」の場合。

/usr/share/xsessions/fluxbox.desktop
 には。

[Desktop Entry]
Name=Fluxbox
Comment=Highly configurable and low resource X11 Window manager
Exec=/usr/bin/startfluxbox
Terminal=false
TryExec=/usr/bin/startfluxbox
Type=Application

[X-Window Manager]
SessionManaged=true
 と書かれておりまして。

/usr/bin/startfluxbox
 は、シェルスクリプトなのであります。  中身は、下記のように記述されています。

#!/bin/sh

command="'basename \"$0\"'"
fluxdir="$HOME/.fluxbox"
startup="$fluxdir/startup"

while [ $# -gt 0 ]; do
    case "$1" in
        -c|--config)
            if [ $# -lt 2 ]; then
                echo "$command:error, missing argument"
                exit 1
            fi
            shift
            startup=$1
        ;;
        -h|--help) cat <<EOF
Usage: $command [-h] [-c startupfile]
EOF
        exit
        ;;
    esac
    shift
done

if [ -x "$startup" ]; then
    exec "$startup"
elif [ -r "$startup" ]; then
    exec sh "$startup"
else
    if [ ! -d $fluxdir ]; then
        mkdir -p "$fluxdir/backgrounds" "$fluxdir/styles" "$fluxdir/pixmaps"
    fi
    if [ ! -r "$startup" ]; then
        ( cat << EOF
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap "$HOME/.Xmodmap"

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
#
# Debian-local change:
#   - fbautostart has been added with a quick hack to check to see if it
#     exists. If it does, we'll start it up by default.
which fbautostart > /dev/null
if [ \$? -eq 0 ]; then
    fbautostart
fi

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec fluxbox
# or if you want to keep a log:
# exec fluxbox -log "$fluxdir/log"
EOF
    ) > "$startup"
    fi
    chmod 644 "$startup"
    exec sh "$startup"
fi
 解釈すると。  「~/.fluxbox/startup」に、実行属性がついていれば、「exec ~/.fluxbox/startup」します。  実行属性がなく、読込属性があれば、「exec sh ~/.fluxbox/startup」します。  上記のいずれでもなければ、「~/.fluxbox/startup」を作成して、「exec sh ~/.fluxbox/startup」します。  この結果。

~/.fluxbox/startup
 というスクリプトが用意されています。

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec fluxbox
# or if you want to keep a log:
# exec fluxbox -log "~/.fluxbox/log"
 84行で、「Fluxbox」が起動しますので、自動起動するアプリケーションは、この行の前に記述する必要があります。

audiobook.jp
AbemaTV 無料体験