<<
2025.10
>>
[Stories] |
||||||
日 | 月 | 火 | 水 | 木 | 金 | 土 |
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Ubuntu 25.04 でのお話
$ diff -u 90-NM-d4735e4b-9bfa-3052-b1c4-ef3302803c9a.yaml new.yaml
--- 90-NM-d4735e4b-9bfa-3052-b1c4-ef3302803c9a.yaml 2025-10-08 21:56:51.493179616 +0900
+++ new.yaml 2025-10-08 21:56:11.370205647 +0900
@@ -25,3 +25,13 @@
ipv6.method: "disabled"
ipv6.ip6-privacy: "-1"
proxy._: ""
+ # --- ここからVLAN設定の追加 ---
+ vlans:
+ enp0s31f6.100: # VLANインターフェース名 (親インターフェース名.VLAN_IDが慣例)
+ id: 100 # VLAN ID (VID)
+ link: enp0s31f6 # 親となる物理インターフェース
+ addresses: [192.168.100.155/24] # 付与したいIPアドレス
+ # デフォルトゲートウェイは不要なため、gateway4やroutesセクションは設定しません。
+ renderer: NetworkManager # 親と同じrendererを指定 (NetworkManagerで管理させる)
からの
sudo netplan try
sudo netplan apply
sudo nmcli connection add type vlan con-name enp0s31f6.100 ifname enp0s31f6.100 dev enp0s31f6 id 100
sudo nmcli connection modify enp0s31f6.100 ipv4.addresses 192.168.100.155/24
sudo nmcli connection modify enp0s31f6.100 ipv4.method manual
sudo nmcli connection modify enp0s31f6.100 ipv4.never-default yes
sudo nmcli connection up enp0s31f6.100
ってやると、最後の最後で
エラー: 接続のアクティベーションに失敗: Failed to find a compatible device for this connection
sudo ip link add link enp0s31f6 name enp0s31f6.100 type vlan id 100
sudo ip addr add 192.168.100.155/24 dev enp0s31f6.100
sudo ip link set enp0s31f6.100 up
ip a s enp0s31f6.100
vlan-ifは作れるんだけど、nmcliの管理下ではないのでOSリブートで飛ぶ。むむむ。
$ nmcli dev s
DEVICE TYPE STATE CONNECTION
enp0s31f6 ethernet 接続済み netplan-enp0s31f6
vlan-ifの接続デバイスが、netplanで管理されているので、nmcliコマンドでうまくハンドリングできない
nmcliで見ると enp0s31f6.100 が出来ている・・・のだが、connection.autoconnect と ipv4.never-default がイマイチ
途中までipコマンドで作って、nmcliでちょこっと変更する
sudo ip link add link enp0s31f6 name enp0s31f6.100 type vlan id 100
sudo ip addr add 192.168.100.155/24 dev enp0s31f6.100
sudo nmcli connection modify enp0s31f6.100 connection.autoconnect yes
sudo nmcli connection modify enp0s31f6.100 ipv4.never-default yes
sudo nmcli connection modify up enp0s31f6.100
やってみれば分かるけど、nmcliの管轄外になってうまくいかない
ノートPCを閉じても液晶バックライトが消えてくれない時の最終手段
# 通常の明るさを確認
cat /sys/class/backlight/intel_backlight/brightness
277
# バックライトを消す
sudo sh -c "echo 0 > /sys/class/backlight/intel_backlight/brightness"
戻すときも同様
# 通常の明るさに戻す
sudo sh -c "echo 277 > /sys/class/backlight/intel_backlight/brightness"
lyric(){
lynx -dump "https://search.yahoo.co.jp/search?ei=UTF-8&p=${1}+song+site:uta-net.com" |
grep -Fm1 https://www.uta-net.com/song/ |
awk '$0=$NF' |
xargs lynx -dump |
sed -n '/(BUTTON) シェア/,/この歌詞をマイ歌ネットに登録/p' |
sed '1d;$d' |
awk '$1=$1'
}
$ lyric お願いマッスル | head
お願いマッスル
めっちゃモテたい
お願いマッスル
めっちゃ痩せたい、YES
お願いマッスル
めっちゃモテたいから
ウー!(キレてるよ!)
ハー!(キレてるよ!)
筋肉にお願い!
ヒップレイズ!サイドベント!
movie(){
lynx -dump "https://search.yahoo.co.jp/search?ei=UTF-8&p=${1}+movie+site:uta-net.com" |
grep -Fm1 https://www.uta-net.com/movie/ |
awk '$0=$NF' |
xargs yt-dlp
}
2025/05/30に修正が入ってて、ばっちり動きます
ffmpeg -> ffplay/mpv にすると再生専用に早変わり(radish-play.sh相当)
本家の取り込みが終わってないっぽい
2025/05/29 頃から再生できなくなった様子
ならば rec_radiko_ts で現在時刻を開始点として追っかけ再生すれば良いのでは?
コード未整理なので概要だけ
なんとなく radish-play よりも再生開始時のバッファが少ない気がします
高橋なんぐの金曜天国
rec_radiko_ts -s BSN -f 202505300900 -d 55 -S 202505300942
seektime 変更用 変数を追加
# Define argument values
station_id=
fromtime=
totime=
seektime= # nobuoki
duration=
seektime 変更用 コマンドラインオプション追加
while getopts s:f:t:S:d:m:u:p:o: option; do # nobuoki
case "${option}" in
s)
station_id="${OPTARG}"
;;
f)
fromtime="${OPTARG}"
;;
t)
totime="${OPTARG}"
;;
S) # nobuoki
seektime="${OPTARG}"
;;
ファイル保存部分を、m3u8プレイリスト再生に変更
# Record
#ffmpeg
(以下コメントアウト続く)
#if [ ${ret} -ne 0 ]; then
# echo "Record fai#led" >&2
# finalize
# exit 1
#fi
# nobuoki: Play
playlist_uri="https://radiko.jp/v2/api/ts/playlist.m3u8?station_id=${station_id}&start_at=${fromtime}00&ft=${fromtime}00&end_at=${totime}00&to=${totime}00&seek=${seektime:-$fromtime}00&l=15&lsid=${lsid}&type=c"
mpv \
--really-quiet \
--no-video \
--http-header-fields="X-Radiko-Authtoken: ${authtoken}" \
"${playlist_uri}"