- 1. 概要
- 2. 定義
- 3. ArcoLinux
1. 概要
「Openbox」や「Fluxbox」等と同様、ベーシックなデスクトップでは、他のデスクトップのように
~/.config/autostart/*.desktop
を作成して、ログイン時に自動起動するという方式は通用しません。
2. 定義
基本は
~/.jwmrc
内(プラットフォームによりパスが異なるので注意)に
<StartupCommand>プログラム名</StartupCommand>
を記述しておけば、ログイン時に自動起動します。
とくに「&」をつけなくても自動起動してくれるようです。
「FreeBSD」で、「MenuMaker」を使用して、日本語化するツールを使う際は、別途外に書いたファイルを取り込むようにしました。
詳細は「Python - MenuMaker 日本語化」をご参照ください。
3. ArcoLinux
「ArcoLinux 22.03.07」では
~/.jwmrc
の中は、下記のように記述されていて
<?xml version="1.0"?>
<JWM>
<Include>$HOME/.config/jwm/start</Include>
<Include>$HOME/.config/jwm/menu</Include>
<Include>$HOME/.config/jwm/groups</Include>
<Include>$HOME/.config/jwm/tray</Include>
<Include>$HOME/.config/jwm/keys</Include>
<Include>$HOME/.config/jwm/preferences</Include>
<Include>$HOME/.config/jwm/theme</Include>
</JWM>
3行目でインクルードしている
~/.config/jwm/start
内に自動起動のプログラムに関して記述しているのですが、さらに。
<?xml version="1.0"?>
<JWM>
<StartupCommand>
sh ~/.config/jwm/autostart.sh
</StartupCommand>
</JWM>
と。
~/.config/jwm/autostart.sh
というシェルスクリプトを起動しているという「なんじゃこりゃ?」なのであります。
インクルードを経由する必要があるんだろうか?
でまぁ、シェルスクリプトの中は、デフォルトでは
#!/bin/bash
# more info on http://joewing.net/projects/jwm/config-2.3.html
function run {
if ! pgrep $1 ;
then
$@&
fi
}
#autorandr horizontal
#change your keyboard if you need it
#setxkbmap -layout be
# start ArcoLinux Welcome App
dex $HOME/.config/autostart/arcolinux-welcome-app.desktop
xsetroot -cursor_name left_ptr &
sxhkd -c ~/.config/jwm/sxhkd/sxhkdrc &
run volumeicon &
run variety &
run nm-applet &
run pamac-tray &
run xfce4-power-manager &
numlockx on &
blueberry-tray &
picom --config $HOME/.config/jwm/picom.conf &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
/usr/lib/xfce4/notifyd/xfce4-notifyd &
#nitrogen --restore &
#run caffeine &
#run vivaldi-stable &
#run firefox &
#run thunar &
#run dropbox &
#run insync start &
#run discord &
#run spotify &
#run atom &
となっておりまする。
ちゃんと二重起動も防いでいますね。
|
|