電子辞書Brainをいじる (5) Brainuxでエミュレータをインストールして遊ぶ

Brainuxにエミュレータをインストール

———-

higan  マルチゲームコンソールエミュレータ(動作はするが遅すぎる)

マルチコンソールゲーム機のエミュレータです。
正確な動作を目標に作成されたエミュレータとのことです。

インストールはApt経由で可能です。

sudo apt install higan

インストール自体は成功して、実行してみましたが、
Brainuxで動作はするが、1FPSくらいしか出ないので、実用上は難しいです。

user@brain:~$ sudo apt show higan
Package: higan
Version: 106-2
Priority: optional
Section: otherosfs
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 5,794 kB
Provides: nes-emulator
Depends: libao4 (>= 1.1.0), libasound2 (>= 1.0.16), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.17), libcairo2 (>= 1.2.4), libfontconfig1 (>= 2.12), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:3.5), libgdk-pixbuf2.0-0 (>= 2.22.0), libgl1, libglib2.0-0 (>= 2.16.0), libgomp1 (>= 4.9), libgtk2.0-0 (>= 2.24.0), libopenal1 (>= 1.14), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libpulse0 (>= 0.99.1), libsdl1.2debian (>= 1.2.11), libstdc++6 (>= 5), libudev1 (>= 183), libx11-6, libxext6, libxv1
Homepage: http://byuu.org/emulation/higan/
Tag: uitoolkit::gtk, uitoolkit::sdl
Download-Size: 1,365 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Accurate multi-system emulator
 higan is an emulator for systems from Nintendo (SNES, NES, Gameboy,
 Gameboy Color, Gameboy Advance), Sega (Master System, Game Gear),
 NEC (PC Engine, SuperGrafx) and Bandai (WonderSwan, WonderSwan Color).
 It was formerly called bsnes and the SNES emulation is especially
 complete and polished.
 .
 higan strives to provide the most faithful hardware emulation possible.
 It focuses on accuracy and clean code, rather than speed and special
 features. It is meant as a reference emulator to document how the underlying
 hardware works. As a result the minimum system requirements are high.



user@brain:~$ sudo apt install higan
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libao-common libao4 libopenal-data libopenal1 libsdl1.2debian libsndio7.0
Suggested packages:
  libaudio2 libsndio6.1 libportaudio2 sndiod
The following NEW packages will be installed:
  higan libao-common libao4 libopenal-data libopenal1 libsdl1.2debian libsndio7.0
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
Need to get 2,252 kB of archives.
After this operation, 7,628 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libao-common all 1.2.2+20180113-1.1 [11.7 kB]
~
Processing triggers for libc-bin (2.31-13+deb11u11) ...

 

———–

gngb GAME BOY エミュレータ

gngbは、GAMEBOY エミュレータです。

画面は小さいですが、結構まともに動きました。

インストールはApt経由で可能です。

sudo apt install gngb

とりあえず、以下のコマンドでも手持ちのGBカードリッジのデータで実行したところ、以下で普通に動きます(音なし)。

gngb “rom.gb”

デフォルト操作
Start Enter(決定)
Select Right Shift(Brainにキーなし)
移動 カーソルキー
A X
B W
Menu TAB(国語辞典)
終了 ESC(戻る,調べる)

快適に動かすため、以下のように実行パラメータを指定して、動作を確認してみました。
FDcloneに”.gb”の拡張子で、使用するオプション込みで追加すれば、便利ですよ。
(.gb: gngb –autoframeskip –sound –sample_rate=11025 –fps )

パラメータ調整(–fps は、フレームレート表示確認用です。)
・音無しで 43-60fps
gngb –autoframeskip –no-sound –fps “.rom.gb”

・音あり(usbサウンドデバイス必須)で 28-35fips
gngb –autoframeskip –sound –sample_rate=11025 –fps “.rom.gb”

デフォルト設定を変えるには、「/usr/share/doc/gngb/examples/sample_gngbrc」を、「$HOME/.gngb/gngbrc」にコピーして、編集してください。

例えば、Setartを「m」、Selectを「n」に割り当てするには以下のように変更します。
(キーコードはこちらを参照)
#map_key 273,274,276,275,120,119,13,303
map_key 273,274,276,275,120,119,109,110

/usr/share/doc/gngb/にドキュメントが保存されているので、参考にしてください。

user@brain:~$ sudo apt show gngb
[sudo] password for user:
Package: gngb
Version: 20060309-5
Priority: optional
Section: x11
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 223 kB
Depends: libc6 (>= 2.28), libgl1, libsdl1.2debian (>= 1.2.11), zlib1g (>= 1:1.1.4)
Homepage: http://m.peponas.free.fr/gngb/
Tag: hardware::emulation, hardware::input:joystick, hardware::input:keyboard,
 interface::commandline, interface::graphical, interface::x11,
 role::program, scope::utility, uitoolkit::sdl, use::gameplaying,
 x11::application
Download-Size: 74.1 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Color Gameboy emulator
 Gngb is an emulator for GameBoy Classic, Color and others.
 .
 It uses the SDL library and OpenGL. This software supports joystick
 and keyboard as input.


user@brain:~$ sudo apt install gngb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  gngb
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 74.1 kB of archives.
After this operation, 223 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel gngb armel 20060309-5 [74.1 kB]
Fetched 74.1 kB in 1s (53.2 kB/s)
Selecting previously unselected package gngb.
(Reading database ... 53441 files and directories currently installed.)
Preparing to unpack .../gngb_20060309-5_armel.deb ...
Unpacking gngb (20060309-5) ...
Setting up gngb (20060309-5) ...
Processing triggers for man-db (2.9.4-2) ...
user@brain:~$




user@brain:~$ gngb
Usage: gngb [OPTION]... FILE
Emulate the GameBoy rom pointed by FILE

  -h, --help                 print this help and exit
  -a, --autoframeskip        turn on autoframeskip
      --sleep_idle           sleep when idle
      --color_filter         turn on the color filter
  -r, --rumble               turn on the rumble simulation
      --filter=X             Set the filter to apply (only for standard mode)
                              0 = none
                              1 = scanline
                              2 = scanline 50%
                              3 = smooth
                              4 = pseudo cell shading
  -R, --res=WxH              set the resolution to WxH (for YUV and GL mode)
  -Y, --yuv                  turn YUV mode on
      --yuv_type             set the type of the YUV overlay
                              0 = YV12
                              1 = YUY2
  -o, --opengl               turn OpenGL mode on (if conpiled in)
  -f, --fullscreen           run gngb in fullscreen
      --fps                  show frame/sec
  -s, --sound                turn on sound
      --sample_rate=RATE     set the sample rate to RATE
  -C, --color_gb             force to color gameboy mode
  -G, --normal_gb            force to normal gameboy mode
  -S, --super_gb             force to super gameboy mode (experimental)
      --auto_gb              turn on automatique detection
  -j, --joy_dev=N            use the Nth joystick
  -g, --gdma_cycle           cpu stop during gdma transfer (experimental)
  -v, --version              printf gngb number version

Most options can be disabled with --no-OPTION (Ex: --no-sound turn sound off)

———-

fceux ファミコンエミュレータ(動作は遅いです。->SDL1.2版では動きます。)

インストールはApt経由で可能です。
sudo apt install fceux

X11環境で、Shellから”fceux”で起動できます。
(libSDL2の再構築が必要です。再構築していないと、Illegal instruction エラーになります)

Optionから設定変更できますが、Video configからDriverをSDLにしたりしたけど、4-5fpsぐらいしか出ませんでした。チューニング次第で、もう少しあげられるのだろうか?
キー入力も何とか反応するレベルでした。

user@brain:~$ sudo apt show fceux
[sudo] password for user:
Package: fceux
Version: 2.3.0+dfsg1-3
Priority: optional
Section: games
Maintainer: Joseph Nahmias <jello@debian.org>
Installed-Size: 3,077 kB
Provides: nes-emulator
Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.5), liblua5.1-0, libminizip1 (>= 1.1), libopengl0, libqt5core5a (>= 5.5.0), libqt5gui5 (>= 5.11.0~rc1) | libqt5gui5-gles (>= 5.11.0~rc1), libqt5widgets5 (>= 5.15.1), libsdl2-2.0-0 (>= 2.0.12), libstdc++6 (>= 5.2), zlib1g (>= 1:1.1.4)
Suggests: efp
Homepage: http://fceux.com/
Tag: uitoolkit::gtk, uitoolkit::sdl
Download-Size: 1,014 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: all-in-one NES/Famicom Emulator
 FCE Ultra X [FCEUX] is an emulator of the original (8-bit) Nintendo
 Entertainment System (NES) released under the GNU General Public License
 (GPL).  It includes the following features (and many more):
 .
       * fully customizable color palette rendering engine
       * complete sound emulation (all five channels)
       * support for up to four joystick controllers
       * zapper emulation for the mouse
       * GameGenie emulation
       * accepts compressed (PKZIP, gzip) ROM images
       * TCP/IP network play
       * Lua scripting


user@brain:~$ sudo apt install fceux
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  liblua5.1-0 libminizip1 libopengl0
Suggested packages:
  efp
The following NEW packages will be installed:
  fceux liblua5.1-0 libminizip1 libopengl0
0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,155 kB of archives.
After this operation, 3,647 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel liblua5.1-0 armel 5.1.5-8.1+b3 [83.5 kB]
~
Processing triggers for libc-bin (2.31-13+deb11u11) ...
user@brain:~$



user@brain:~$ fceux --help
Usage is as follows:
fceux <options> filename

Option         Value   Description
--pal          {0|1}   Use PAL timing.
--newppu       {0|1}   Enable the new PPU core. (WARNING: May break savestates)
--input(1,2)   d       Set which input device to emulate for input 1 or 2.
                         Devices:  gamepad zapper powerpad.0 powerpad.1
                         arkanoid
--input(3,4)   d       Set the famicom expansion device to emulate for
                       input(3, 4)
                          Devices: quizking hypershot mahjong toprider ftrainer
                          familykeyboard oekakids arkanoid shadow bworld
                          4player
--gamegenie    {0|1}   Enable emulated Game Genie.
--frameskip    x       Set # of frames to skip per emulated frame.
--xres         x       Set horizontal resolution for full screen mode.
--yres         x       Set vertical resolution for full screen mode.
--autoscale    {0|1}   Enable autoscaling in fullscreen.
--keepratio    {0|1}   Keep native NES aspect ratio when autoscaling.
--(x/y)scale   x       Multiply width/height by x.
                         (Real numbers >0 with OpenGL, otherwise integers >0).
--(x/y)stretch {0|1}   Stretch to fill surface on x/y axis (OpenGL only).
--fullscreen   {0|1}   Enable full screen mode.
--noframe      {0|1}   Hide title bar and window decorations.
--special      {1-4}   Use special video scaling filters
                         (1 = hq2x; 2 = Scale2x; 3 = NTSC 2x; 4 = hq3x;
                         5 = Scale3x; 6 = Prescale2x; 7 = Prescale3x; 8=Precale4x; 9=PAL)
--palette      f       Load custom global palette from file f.
--sound        {0|1}   Enable sound.
--soundrate    x       Set sound playback rate to x Hz.
--soundq      {0|1|2}  Set sound quality. (0 = Low 1 = High 2 = Very High)
--soundbufsize x       Set sound buffer size to x ms.
--volume      {0-256}  Set volume to x.
--soundrecord  f       Record sound to file f.
--playmov      f       Play back a recorded FCM/FM2/FM3 movie from filename f.
--pauseframe   x       Pause movie playback at frame x.
--fcmconvert   f       Convert fcm movie file f to fm2.
--ripsubs      f       Convert movie's subtitles to srt
--subtitles    {0|1}   Enable subtitle display
--fourscore    {0|1}   Enable fourscore emulation
--no-config    {0|1}   Use default config file and do not save
--net          s       Connect to server 's' for TCP/IP network play.
--port         x       Use TCP/IP port x for network play.
--user         x       Set the nickname to use in network play.
--pass         x       Set password to use for connecting to the server.
--netkey       s       Use string 's' to create a unique session for the
                       game loaded.
--players      x       Set the number of local players in a network play
                       session.
--rp2mic       {0|1}   Replace Port 2 Start with microphone (Famicom).
--4buttonexit {0|1}    exit the emulator when A+B+Select+Start is pressed
--loadstate {0-9|>9}   load from the given state when the game is loaded
--savestate {0-9|>9}   save to the given state when the game is closed
                         to not save/load automatically provide a number
                         greater than 9
--periodicsaves {0|1}  enable automatic periodic saving.  This will save to
                         the state passed to --savestate

--loadlua      f       Loads lua script from filename f.
--style=KEY            Use Qt GUI Style based on supplied key. Available system style keys are:

           Windows              Fusion

 Custom Qt stylesheets (.qss files) may be used by setting an
 environment variable named FCEUX_QT_STYLESHEET equal to the
 full (absolute) path to the qss file.

Compiled with SDL version 2.0.14
Linked with SDL version 2.0.14
Compiled with QT version 5.15.2
git URL: https://github.com/TASVideos/fceux.git
git Rev: 65c5b0d2a1c08db75bb41340bfa5534578926944
user@brain:~$

 

———-

fceux 2.2.3 (SDL1.2版) ファミコンエミュレータ(音無しであれば実用的な速度で動作)

Brainでapt経由でインストールできる fceux2.3.0(SDL2.0版)だと動作速度遅すぎて、4-5fpsしかでない&キー入力も怪しいという状況でした。
で、先日同様に動作が重かったopenMSXをSDL1.2でビルドしてみたところ動作が改善したということで、fceuxもSDL1.2で構築してみました。

結果的に音無しでですが、調子のよいときは最大38 fpsぐらい出るときもあります。
これくらいfpsが出れば、十分遊べる範囲です。
(なんらかの条件で遅かったり早かったりします。条件不明。)
(plusaudio起動している確率があがるような気が・・・)
(10fps or 20fps or 40fps)

インストールは、SDl1.2をサポートする最終バージョンである2.2.3のソースを元にビルドします。

公式サイト
https://fceux.com/web/download.html

$ cd
$ mkdir fcmux
$ cd fcmux
$ wget https://github.com/TASEmulators/fceux/archive/refs/tags/fceux-2.2.3.tar.gz
$ tar zxf fceux-2.2.3.src.tar.gz
$ cd fceux-2.2.3

インストールの仕方の詳細は、README-SDLを確認してください。

まずは、ビルドパラメータを修正します。
いったん、以下のように修正してみました。
$ vi SConstruct

また、最適化も追記設定しておきます(“-O2” -> “-O3 -march=native”)

Fceux 2.2.3 のビルドシステムは sconsを利用します(2.3.0からはcmakeです。)。
が、現行のpython3ではなく、python2版のsconsが必要になります。
ですので、以下のようにpython2環境を作成してsconsを導入、ビルドします。。

$ sudo apt install python2
$ curl -sS https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo python2
$ sudo python2 -m pip install
$ virtualenvvirtualenv -p python2 ~/fceux-py2env
$ source ~/fceux-py2env/bin/activate
$ pip install ‘scons<3.0’
$ cd ~/fcmux/fceux-2.2.3
$ scons -c && rm -rf .scon*           # ビルド情報をクリア
$ scons                    # ビルド(約3時間程度)
$ deactivate

テスト実行
$ cd bin
$ ./fceux

システムにインストール
$ sudo bash
$ source /home/user/fceux-py2env/bin/activate
$ scons install
$ deactivate

これで、/user/local/bin/に実行ファイルがインストールされ、fceuxできるようになります。
もし、JWMのメニューから起動したければdesktopファイルが以下にインストールされているのでこれをベースにアプリのインストール先などを変更してください(Exec,Icon)。
sudo vi /usr/local/share/application/fceux.desktop
Exec=/usr/local/bin/fceux
Icon=/usr/local/share/pixmaps/fceux.png

 

———-

nestopia ファミコンエミュレータ(動作は遅いです。キー入力反応なし?)

インストールはApt経由で可能です。
sudo apt install nestopia

X11環境で、Shellから”nestopia”で起動できます。
(libSDL2の再構築が必要です。再構築していないと、Illegal instruction エラーになります)

設定変更はEmurator -> Configurationからできます。
FPSは出ていませんし、キー入力も受け付けていないように見えます。

user@brain:~$ sudo apt show nestopia
[sudo] password for user:
Package: nestopia
Version: 1.50-2
Priority: optional
Section: games
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 3,532 kB
Provides: nes-emulator
Depends: libao4 (>= 1.1.0), libarchive13 (>= 3.0.4), libc6 (>= 2.29), libepoxy0 (>= 1.0), libgcc-s1 (>= 3.5), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk-3-0 (>= 3.21.4), libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125, libsdl2-2.0-0 (>= 2.0.12), libstdc++6 (>= 5.2), zlib1g (>= 1:1.1.4)
Homepage: http://0ldsk00l.ca/nestopia/
Tag: uitoolkit::gtk, uitoolkit::sdl
Download-Size: 824 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Nintendo Entertainment System/Famicom emulator
 Nestopia is a cycle-accurate NES/Famicom emulator. It has a high
 compatibility rate and support for many peripherals and input
 devices.
 .
 Features:
    * Save states
    * Movie recording
    * Game rewinding
    * GUI or command line interface
    * Emulation of NTSC, PAL, and Dendy systems
    * Support for NES Zapper games
    * Support for Famicom Disk System games
 .
 Nestopia requires OpenGL 3.2 or later.



user@brain:~$ sudo apt install nestopia
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libarchive13
Suggested packages:
  lrzip
The following NEW packages will be installed:
  libarchive13 nestopia
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,124 kB of archives.
After this operation, 4,314 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libarchive13 armel 3.4.3-2+deb11u1 [300 kB]
Get:2 http://archive.debian.org/debian bullseye/main armel nestopia armel 1.50-2 [824 kB]
Fetched 1,124 kB in 3s (350 kB/s)
Selecting previously unselected package libarchive13:armel.
(Reading database ... 53453 files and directories currently installed.)
Preparing to unpack .../libarchive13_3.4.3-2+deb11u1_armel.deb ...
Unpacking libarchive13:armel (3.4.3-2+deb11u1) ...
Selecting previously unselected package nestopia.
Preparing to unpack .../nestopia_1.50-2_armel.deb ...
Unpacking nestopia (1.50-2) ...
Setting up libarchive13:armel (3.4.3-2+deb11u1) ...
Setting up nestopia (1.50-2) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.31-13+deb11u11) ...
user@brain:~$



user@brain:~$ nestopia --help
Usage: nestopia [options] [FILE]

Options:
  -f, --fullscreen        Fullscreen mode
  -w, --window            Window mode

  -l, --filter            Video Filter
                          (0=None, 1=NTSC, 2=xBR, 3=HqX, 4=2xSaI, 5=ScaleX)

  -m, --maskoverscan      Mask overscan areas
  -n, --no-maskoverscan   Disable overscan masking

  -o, --stretchfs         Stretch to native resolution in fullscreen mode
  -p, --preserveaspect    Preserve aspect ratio in fullscreen mode

  -s, --scalefactor       Video scale factor (1-4)

  -t, --tvaspect          TV aspect ratio
  -r, --no-tvaspect       Regular aspect ratio

  -u, --unlimitedsprites  Remove sprite limit
  -q, --spritelimit       Enable sprite limit

  -v, --version           Show version information

More options can be set in the configuration file.
Options are saved, and do not need to be set on future invocations.

user@brain:~$

———-

openmsx  MSXエミュレータ(動作は遅い->SDL1.2版で現実的な速度に。)

インストールはApt経由で可能です。
sudo apt-get install openmsx openmsx-catapult openmsx-data cbios

X11環境で、Shellから”openmsx”で起動できます。
(libSDL2の再構築が必要です。再構築していないと、Illegal instruction エラーになります)

また、専用ランチャである”openmsx-catapult”を起動すると、ROM指定を含めてGUIで操作できます(初回起動時は各種チェック処理が入ります)。

とりあえず、ROM起動しましたレベルまでの確認です。やはり遅いです。

user@brain:~$ sudo apt show openmsx
Package: openmsx
Version: 16.0-1
Priority: optional
Section: otherosfs
Maintainer: Bas Wijnen <wijnen@debian.org>
Installed-Size: 6,851 kB
Provides: msx-emulator
Depends: openmsx-data (= 16.0-1), cbios (>= 0.23), libasound2 (>= 1.0.16), libc6 (>= 2.30), libgcc-s1 (>= 3.5), libgl1, libglew2.1 (>= 1.12.0), libogg0 (>= 1.0rc3), libpng16-16 (>= 1.6.2-1), libsdl2-2.0-0 (>= 2.0.12+dfsg1), libsdl2-ttf-2.0-0 (>= 2.0.14), libstdc++6 (>= 6), libtcl8.6 (>= 8.6.0), libtheora0 (>= 1.0), libvorbis0a (>= 1.1.2), zlib1g (>= 1:1.1.4)
Suggests: openmsx-catapult, openmsx-debugger, dmktools
Replaces: openmsx-data (<< 16.0-1)
Homepage: https://openmsx.org
Tag: hardware::emulation, implemented-in::c++, implemented-in::tcl,
 interface::3d, interface::graphical, interface::x11, role::program,
 uitoolkit::sdl, uitoolkit::tk, use::gameplaying, works-with::audio,
 works-with::video, x11::application
Download-Size: 1,720 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: MSX emulator that aims for perfection
 openMSX is an open source MSX emulator that uses a unique emulation model,
 which tries to achieve the highest level of accuracy possible. It allows
 emulating a large number of different MSX machines. Combined with the
 C-BIOS ROM-files that are available in a separate package, you can run game
 ROM-files without the need for non-free BIOS ROM files.


user@brain:~$
user@brain:~$ sudo apt show openmsx-debubber
N: Unable to locate package openmsx-debubberN: Unable to locate package openmsx-debubber
E: No packages found
user@brain:~$
user@brain:~$
user@brain:~$ sudo apt show openmsx-catapult
Package: openmsx-catapult
Version: 16.0-1
Priority: optional
Section: otherosfs
Maintainer: Bas Wijnen <wijnen@debian.org>
Installed-Size: 1,069 kB
Depends: libc6 (>= 2.4), libgcc-s1 (>= 3.5), libstdc++6 (>= 5.2), libwxbase3.0-0v5 (>= 3.0.5.1+dfsg), libwxgtk3.0-gtk3-0v5 (>= 3.0.5.1+dfsg), libxml2 (>= 2.7.4), openmsx (>= 16.0), openmsx (<< 16.1~)
Homepage: http://openmsx.org
Tag: hardware::emulation, implemented-in::c++, interface::graphical,
 interface::x11, role::program, uitoolkit::wxwidgets, x11::application
Download-Size: 376 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: GUI for openMSX
 OpenMSX catapult is a graphical frontend for starting the openMSX emulator.



user@brain:~$ sudo apt show openmsx-data
Package: openmsx-data
Version: 16.0-1
Priority: optional
Section: otherosfs
Source: openmsx
Maintainer: Bas Wijnen <wijnen@debian.org>
Installed-Size: 5,322 kB
Depends: ttf-bitstream-vera
Recommends: openmsx
Homepage: https://openmsx.org
Tag: hardware::emulation, role::app-data, works-with-format::xml
Download-Size: 1,400 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: datafiles for openMSX, an MSX emulator
 openMSX is an open source MSX emulator that uses a unique emulation model,
 which tries to achieve the highest level of accuracy possible.
 .
 This package provides data that openmsx needs to run.



user@brain:~$ sudo apt show cbios

Package: cbios
Version: 0.28-1.1
Priority: optional
Section: misc
Maintainer: Bas Wijnen <wijnen@debian.org>
Installed-Size: 483 kB
Recommends: openmsx | msx-emulator
Homepage: http://cbios.sf.net
Tag: hardware::emulation, role::app-data
Download-Size: 30.1 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: open source MSX BIOS roms
 C-BIOS is an open source BIOS for MSX computers.
 .
 C-BIOS can be shipped with MSX emulators so they are usable
 out-of-the-box. It comes readily configured for the openMSX
 emulator.



user@brain:~$ sudo apt-get install openmsx openmsx-catapult openmsx-data cbios
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libglew2.1 libnotify4 libsdl2-ttf-2.0-0 libtcl8.6 libwxbase3.0-0v5
  libwxgtk3.0-gtk3-0v5 ttf-bitstream-vera
Suggested packages:
  glew-utils tcl8.6 openmsx-debugger dmktools
Recommended packages:
  notification-daemon
The following NEW packages will be installed:
  cbios libglew2.1 libnotify4 libsdl2-ttf-2.0-0 libtcl8.6 libwxbase3.0-0v5
  libwxgtk3.0-gtk3-0v5 openmsx openmsx-catapult openmsx-data
  ttf-bitstream-vera
0 upgraded, 11 newly installed, 0 to remove and 1 not upgraded.
Need to get 9,423 kB of archives.
After this operation, 35.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel cbios all 0.28-1.1 [30.1 kB]
~

Get:2 http://archive.debian.org/debian bullseye/main armel libglew2.1 armel 2.1.0-4+b1 [159 kB]
Get:3 http://archive.debian.org/debian bullseye/main armel libnotify4 armel 0.7.9-3 [21.7 kB]
Get:4 http://archive.debian.org/debian bullseye/main armel libsdl2-ttf-2.0-0 armel 2.0.15+dfsg1-1 [15.4 kB]
Get:5 http://archive.debian.org/debian bullseye/main armel libtcl8.6 armel 8.6.11+dfsg-1 [894 kB]
~
Processing triggers for fontconfig (2.13.1-4.2) ...
user@brain:~$



user@brain:~$ openmsx --help
openMSX 16.0
============

usage: openmsx [arguments]
  an argument is either an option or a filename

  this is the list of supported options:
    --help, -h      Shows this text
    --version, -v   Prints openMSX version and exits
    -cart, -carta,
    -cartb, -cartc,
    -cartd          Insert the ROM file (cartridge) specified in
                    argument
    -cassetteplayer Put cassette image specified in argument in
                    virtual cassetteplayer
    -cda            Use iso image in argument for the CDROM extension
    -command        Run Tcl command at startup (see also -script)
    -control        Enable external control of openMSX process
    -diska, -diskb  Insert the disk image specified in argument
    -ext, -exta,
    -extb, -extc,
    -extd           Insert the extension specified in argument
    -hda            Use hard disk image in argument for the IDE or
                    SCSI extensions
    -ips            Apply the given IPS patch to the ROM or disk
                    image specified in the preceding option
    -laserdisc      Put LaserDisc image specified in argument in
                    virtual LaserDisc player
    -machine        Use machine specified in argument
    -replay         Load replay and start replaying it in view only
                    mode
    -romtype        Specify the rom type for the ROM image specified
                    in the preceding option
    -savestate      Load savestate and start emulation from there
    -script         Run extra startup script
    -setting        Load an alternative settings file
    -testconfig     Test if the specified config works and exit

  this is the list of supported file types:
    cas, wav        Cassette image, raw recording or fMSX CAS image
    di1, di2, dmk,
    dsk, fd1, fd2,
    xsa             Disk image
    mx1, mx2, ri, rom ROM image of a cartridge
    ogv             LaserDisc image, Ogg Vorbis/Theora
    omr             openMSX replay
    oms             openMSX savestate
    tcl             Extra Tcl script to run at startup
user@brain:~$

なお、Illegal instructionエラーを調査する段階で、ソースからのコンパイルも試してみましたが同じエラーになりました。ちなみにBrainux上でのコンパイルには20時間以上かかりました(マジ)。

 

———-

openmsx 0.15 (SDL1.2版) インストール     2025/12/22追記

いろいろアプリケーションをインストールしてみた傾向から、やはりSDL2.0が重いのではないか、ということでSDL2.0移行前のSDL1.2を使っている最後のバージョンである「openMSX0.15」をソールからビルトインストールして上書きインストールしてみます。

$ sudo apt-get install openmsx openmsx-catapult openmsx-data cbios

$ cd
$ mkdir openmsx15
$ cd openmsx15
$ tar zxvf openmsx-0.15.0.tar.gz
$ cd openmsx-0.15.0

$ sudo apt install python-dev   # openmsx 0.15での./configureの実行に必要
$ sudo apt install libasound2-dev
$ sudo apt install libglew-dev
$ sudo apt install libogg-dev
$ sudo apt install libtheora-dev
$ sudo apt install libvorbis-dev
$ sudo apt install libsdl2-dev
$ sudo apt install libsdl2-ttf-dev
$ sudo apt install tcl tcl8.6-dev

$ ./configure  # ビルドに必要なライブラリをチェック。不足している場合は追加

user@brain:~/openmsx15/openmsx-0.15.0$ ./configure
Using Python: python
Probing target system...
Creating derived/arm-linux-opt/config/probed_defs.mk...
Creating derived/arm-linux-opt/config/systemfuncs.hh...

Found libraries:
  ALSA:             version 1.2.4
  GLEW:             version unknown
  libogg:           version unknown
  libpng:           version 1.6.37
  libtheora:        version unknown
  libvorbis:        version unknown
  OpenGL:           version 4.6
  SDL:              version 1.2.15
  SDL_ttf:          version 2.0.11
  Tcl:              version 8.6.11
  zlib:             version 1.2.11

Components overview:
  Emulation core:   yes
  GL renderer:      yes
  Laserdisc:        yes
  ALSA MIDI:        yes

Customisable options:
  Install to        /opt/openMSX
  (you can edit these in build/custom.mk)

All required and optional components can be built.

If the detected libraries differ from what you think is installed on this system, please check the log file: derived/arm-linux-opt/config/probe.log

$ make        #Brainの実機ビルトで約15時間
$ sudo make install

起動は、ターミナル上で、「openmsx &」 か、
一度aptでインストール済であれば、JWMメニューから、「games -> openMSX」で起動です

なお注意点として、インストール先が違うことです。
aptでインストールしたopenmsx(バージョンは16.0)のインストール先:
 /usr/bin/openmsx
自ビルドしたopenmsx(0.15)のインストール先(シンボリックリンク):
 /usr/local/bin/openmsx

Path優先順位は、/usr/local/bin/ -> /usr/bin/なので、自ビルドしたほうが優先順位が高いですが、openmsx-catapultでのopenmsxの場所を変えないと、aptでインストールしたopenmsx16.0が起動してしまう場合があるので、気を付けてください。
(不要であれば、/usr/bin/openmsx を削除でもいいと思います。)

起動押したら、カーソルを左上にもっていくと出てくる menuをクリックすると、
メニューが開いて、romの指定などができます。

おすすめは、
「misc Settings->Minimal Frameskip: 0」
「misc Settings->Maximal Frameskip: 30」
「Sound Settings->Resampler: fast (but low quality)」
あたりを設定しておくと、音ありでもそれなりの速度で動いてくれます。

なお、USBサウンドデバイスを付けてい場合は、別途pulseaudioを起動しておいてください。
なぜか安定して音が鳴ります。
pulseaudio –start
openmsx
pulseaudio -k

標準では、CBIOSで起動しますが、
必要に応じて、MSX実機から取得したのBIOSを
/opt/openMSX/share/systemromsにコピーすればBASICやDiskも使えるようになります。
(ファイルのチェックサムで識別しているようで、ファイル名は任意だそうです。)

コピーしたら、menu -> hardware -> change machine で抜き出した機種名を選んでください。

詳しい説明はこちら
https://openmsx.org/manual


2026/01/05追加
現在、CPU最適化オプションを付けて再ビルド中
結果は15時間後・・・

$ cd
$ cd openmsx15/openmsx-0.15.0
$ cd build
$ vi main.mk

CXXFLAGS:=

CXXFLAGS:=-O3 -match=native

$ make clean
$ make
$ sudo make install

ビルドに16-17時間かかりました。
結果として、心持ち速度が上がった気がします。

 

———-

fMSX MSXエミュレータ(MSX1/2/2+)

OpenMSXではSDL2を使っているせいか、動作が遅かったのですが、
SDL2を使っていないMSXエミュレータを探したところ、fmsxを見つけました。
これならワンチャン!ということで試してみます。

fMSX 6.0

インストールソールからのビルドになります。
必要に応じて、ライブラリの追加が必要がある場合があります。

$ cd
$ mkdir fmsx
$ cd fmsx
$ wget https://fms.komkon.org/fMSX/fMSX60.zip
$ unzip fMSX60.zip
$ cd fmsx
$ cd fMSX/Unix
$ sudo apt install g++ build-essential libpulse-dev
$ make

ただ、このままでは、build最後のリンク時に大量のエラーになります。

/usr/bin/ld: ../../EMULib/Sound.o:(.bss+0x230): multiple definition of ARGV'; ../../EMULib/EMULib.o:(.bss+0x218): first defined here
/usr/bin/ld: ../../EMULib/Sound.o:(.bss+0x234): multiple definition ofARGC'; ../../EMULib/EMULib.o:(.bss+0x21c): first defined here

このエラーは、簡単に言うと、”ARGC”,”ARGV”の変数が複数のソースで定義されており、
最後のリンク時に重複していてビルドできないといった感じの意味なります。

ソールをgrepで調べたところ、ARGC、RGCGは以下のファイルに存在していました。

user@brain:~/fmsx$ grep -r “ARG” *
EMULib/Unix/LibUnix.c: if(ARGC&&ARGV)
EMULib/Unix/LibUnix.c: P=strrchr(ARGV[0],’/’);
EMULib/Unix/LibUnix.c: ClassHint.res_name = P? P+1:ARGV[0];
EMULib/Unix/LibUnix.c: ClassHint.res_class = P? P+1:ARGV[0];
EMULib/Unix/LibUnix.c: XSetCommand(Dsp,Wnd,ARGV,ARGC);
EMULib/Unix/LibUnix.c: if(ARGC&&ARGV)
EMULib/Unix/LibUnix.h:extern int ARGC;
EMULib/Unix/LibUnix.h:extern char *ARGV;
fMSX/fMSX.c:int ARGC; /* argc/argv from main (#ifdef UNIX) */
fMSX/fMSX.c:char **ARGV;
fMSX/fMSX.c: ARGC = argc;
fMSX/fMSX.c: ARGV = argv;

これで定義部分を抽出すると・・・

EMULib/Unix/LibUnix.h:
int ARGC;
char *ARGV; grep: fMSX/Unix/fmsx: binary file matches

fMSX/fMSX.c:
extern int ARGC; /* argc/argv from main (#ifdef UNIX) */
extern char **ARGV;

これを見ると、
各ソースファイルにインクルードされるヘッダファイル(LibUnix.h)で変数を定義
メインとなるfMSX.cでは変数外部参照になっていました。

これでは、ヘッダファイル(LibUnix.h)をインクルードしている各ソースファイルごとに変数が定義されることになるので、以下のように定義と外部参照を逆に変更します。

EMULib/Unix/LibUnix.h:
extern int ARGC;
extern char *ARGV


fMSX/fMSX.c:
int ARGC; /* argc/argv from main (#ifdef UNIX) */
char **ARGV;

これで、再度コンパイルすると、ビルドできました。
$ make clean
$ make

出来た実行ファイルは、。~/fmsx/fMSX/Unix/fmsx です。
~/fmsx/fMSX/Unix/の下に、MSXのBIOSROMを保存します(別フォルダ指定する場合は)。
MSX.ROM MSX2.ROM MSX2EXT.ROM MSX2P.ROM MSX2PEXT.ROM
FMPAC.ROM DISK.ROM

これで、fmsxが起動します(ちょっと遅く感じたので-skip 50オプション追加)。
./fmsx -skip 50 game.rom

ビルド時にPlusaudioをリンクされていますが現状Pulseaudioの設定していないので音は出ないようですが、問題ないレベルの速度は出ているようです。
(PulseAudio有効にしましたが音なりませんでした。fMSX v5.1でPulseAudioに切り替えしているみたいなので、それより前のバージョンなら音が鳴るかもしれません。)

———–

dosbox グラフィックス、サウンド、DOS を備えた x86 エミュレータ(Brainでは厳しい)

公式サイト:https://www.dosbox.com/DOSBoxManual.html

DOSBoxは、Tandy/Hercules/CGA/EGA/VGA/SVGAグラフィック、サウンド、そしてDOSを搭載したx86エミュレータです。DOSをサポートしていないプラットフォームでも古いDOSゲームを実行できるように設計されています。

以下のレガシーサウンドデバイスがエミュレートされます:PCスピーカー、Creative CMS/Gameblaster、Tandy 3 voice、Adlib、Sound Blaster Pro/16、Disney Soundsource、Gravis Ultrasound。MPU-401はホストに転送されます。

Brainuxでx86のDOSをエミュレートします。
ただ、かなり遅いです。
フレームレートスキップ設定して、CPUサイクルを最大にして、音をなくして、
やっとアクションを伴わないパズルゲームなら、何とか動かせるかも・・・
といったレベルです(ソフトにもよりますが)。

なお、一度dosboxを起動すると、~/.dosbox/dosbox-0.74-3.conf が作成されますので、
このファイルを編集することでいろいろ定義できます。

例)
[render]
frameslip=30

[cpu]
cycles=max

[mixer]
nosounf=true

[autoexec]
mount c ~/dos
c:

[autoexec]にて、上記のように記載すると、
DOSBOX起動時にBranix上の~/dos ディレクトリを
Cドライブとしてマウントして、Cドライブへの移動まで実行してくれます。

インストールはApt経由で可能です。
sudo apt install dosbox

快適な実行は、通常のパソコンレベルのCPU性能がないと厳しいですね。
多分もっと軽くする設定があると思うけど今はこれが精いっぱい。

(参考)
https://www.dosgamesarchive.com/download/bob-and-his-amazing-journey-home

 

———–

Neko Project 2 kai PC9801/9821 エミュレータ

公式サイト:https://domisan.sakura.ne.jp/article/np2kai/np2kai.html

Neco Project をRaspberry Piに移植したものを0.86化していろいろ改善したバージョンとのことです。
このバージョンではSDL1.2を利用したX11ポートが利用できるので、こちらをビルドしてみました。

起動は、xnp2kai-sdl1です(PC9801エミュレート、X11ポートのSDL1バージョン)

結果として音無し設定あれば、i286 5-7Mhz前後の速度が出るようです。(Autoframe設定)
(Device->Sound option->Driverから無効にできます。)
(音ありだと速度が安定せずに全体的に遅くなるので無効推奨です。要pulseAudio)

BrainのCE版にもNP2がありますが、そちらのほうがBrainに特化した修正がされているようで動きもいいです。がこちらのX11版ではUSBキーボード、マウスが使えるのがメリットです。バーチャルキーボードもありますが、X11版にはカーソルキーをテンキーにする機能はないのでそこは残念。

インストールはソースからのビルドになります。
必要に応じて、ライブラリの追加が必要がある場合があります。

$ cd
$ mkdir np2
$ cd np2
$ git clone https://github.com/AZO234/NP2kai.git
$ cd NP2kai
$ sudo apt install git cmake ninja-build build-essential libx11-dev libglib2.0-dev libgtk2.0-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libusb-1.0-0-dev libfreetype-dev libfontconfig1-dev libssl-dev
$ mkdir build
$ cd build
$ cmake .. -D BUILD_X=ON -D USE_SDL2=OFF -D BUILD_I286=ON
$ make
$ sudo make install

これで、xnp2kai-sdl1 がビルドされます。
(この方法だと一緒にxnp21kai-sdl1も作成されるようです。)
cmakeのオプションについては、githubのページに詳細が書かれています。
xnp2kai-sdl1   pc9801エミュレータ(CPU i286)
xnp21kai-sdl1  pc9821エミュレータ(CPU i386以上)

Brain実機ビルドには全部で4-5時間かかりますのでご注意を。

xnp2kai-sdl1では、設定ファイルは、以下にあります。
xnp2kai_sdl1 ~/.config/xnp2kai/
xnp21kai_sdl1 ~/.config/xnp21kai/

フォルダがない場合は、一度xnp2kai-sdl1、xnp21kai-sdl1を起動すれば
作成されると思います。
このままだと、画面のフォントが文字化けするのでフォントの用意が必要です。
PC9801から吸い出したFONT.ROMを使ってもいいのですがない場合は、
Brainuxにインストールしたフォントからも生成できます。

cd ~/.config/xnp2kai/
sudo apt install fonts-ipafont
ln -s /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf default.ttf
rm font.tmp

これで、xnp2kai-sdl1を起動すると、最初にNP2用のフォントが生成されます。

なお、設定ファイルは、xnp2kaircになります。

(2026/01/04追記)
試しに、BrainのCPUに最適化したビルドをやってみます。

/home/user/np2/NP2kai/build/CMakeFiles/xnp2kai_sdl1.dir/flags.make

C_FLAGS = -Wno-incompatible-function-pointer-types -Wno-int-conversion -O2 -g -DNDEBUG

C_FLAGS = -Wno-incompatible-function-pointer-types -Wno-int-conversion -O3 -march=native -DNDEBUG

CXX_FLAGS = -Og -g -Wall -DNDEBUG

CXX_FLAGS = -O3 -march=native -Wall -DNDEBUG

この後、一度Build状況を初期化してmakeします(xnp2kai-sdl1だけで2.5時間くらい)
cd ~/np2/np2kai/build
make clean
make xnp2kai_sdl1
./xnp2kai-sdl1

結果として、ちょびっとだけCPUクロックが上がりました(0.1-0.5Mhzくらい?)
不具合が起こる可能性もあるので、もう少し触ってみます。

 

———-

px68k X68000エミュレータ

ソース入手先:GitHub – hissorii/px68k: Portable SHARP X68000 Emulator

起動: ./px68k

X68000エミュレータです。

速度はかなり遅いです。
Human68kを起動して、コマンド操作するくらいならかろうじて可能かなといったレベルです。(マウス操作が実装されていないっぽいので注意)
Human68kの起動+ドライバ組み込み完了までで、リセットから20秒弱といったところです。
あとBrainの画面解像度だと縦の解像度がちょっと足りません。

メモリ設定を2MB以上にすれば、Nemesis改デモの実行や、
TDQ1でのタイトル画面までは表示できました。
(NumlockがPX68Kでは、10キーのCLRに割り当たっているので、10キー付きのUSBキーボードか、スクリーンキーボードを使う必要があるかもしれません。)

メニューは、F12キーで開きます。
ここで、リセットや、FD,HDDの設定、FPS設定や、サウンド設定が可能です。
サウンド設定は無効化推奨です。

なお、標準ではメモリ1MBで稼働しますので、メモリ設定を変更するには、
Human68K3.0.2を起動して、switchコマンドで、MEMORYを1024->4096KBに変更できます。設定変更したら「終了」->Yで設定が保存されます。

上記について詳しくは、readme.txtに記載があります。

 

インストール:ソースを入手してインストール
 (ビルド時に最適化オプションを追加しています。)

$ cd
$ mkdir px68k
$ cd px68k
$ git clone https://github.com/hissorii/px68k.git
$ cd px68k
$ sudo apt install git cmake ninja-build build-essential libx11-dev libglib2.0-dev libgtk2.0-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev

$ vi Makefile
CDEBUGFLAGS = -g -O0 -fno-strict-aliasing

CDEBUGFLAGS = -O3 -march=native -fno-strict-aliasing

ifeq ($(shell uname -m),armv6l)
MOPT=
else
MOPT= -m32
endif

ifeq ($(shell uname -m),armv6l)
MOPT=
else
MOPT=
endif

$ make #実機ビルト約40分程度

起動前にX68000のBIOS ROM、フォントファイルを~/.keropi に 保存します。
・iplrom.dat   - X68000 BIOS
・cgrom.dat   - Font file (cgrom.tmpでも可)

biosROMについては、シャープから公開されたものがこちらから入手可能です。
(今回はX68000 EXPERT用のものをiplrom.datにリネームして使いました)
fontfileについては、実機から入手するか、疑似的に作成する必要があります。
(フォントファイルがない場合は PC 上で WinX68k 高速版を実行すると、
cgrom.tmp が生成されますので、それを使ってくださいとのことです。)

起動
$ ./px68k

  

———-

Views: 244

カテゴリー: Brain, Brainux, 電子手帳 | コメントする

電子辞書Brainをいじる (4) Brainuxでアプリをインストールして遊ぶ

Brainuxにアプリをインストール

インストール方法のパターン

Brainuxにアプリをインストールには、いくつか方法があります。

  • Debinのレポジトリにあるソフトウェアの場合
    aptコマンドでダウンロードからインストールまで実施できます。

    apt show <パッケージ名>     パッケージの詳細を表示します。
    sudo apt install <パッケージ名>  パッケージをインストールします。
    dpkg -L <パッケージ名>      インストールパッケージのファイルリストを確認

apt search <パッケージ名の一部> パッケージ名やキーワードを検索します。
                (既にインストールされているかも確認できます。)

  • ソースからインストールするパターン
    ソースからインストールする場合は、基本的にドキュメントに書かれている方法でビルド、インストールします。
    ただし、ソース内にビルドを自動化するスクリプトがあれば、自動化したビルドが可能になります。

    「Makefile」がある場合は、make & sudo make install でインストールします。

    「configure」スクリプトが用意されている場合、スクリプトを実行してから、make & sudo make installでインストールします。

    Imakefile」がある場合は、xmkmf -a & make & sudo make install でインストールします。
    (環境に合わせてmakefileを作成してくれます。)

    「CMakeLists.txt」がある場合は、mkdir build & cd build & cmake .. & cmake –build . & cmake –install でインストールします。

    「*.cbpファイル(Code::Blocks IDE project、workspace files)がある」場合は、
    cbp2make -in Bomberman.cbp -out Makefile & make でビルドできます。
    インストールは、make installでできるかもしれませんが、基本的にアプリによります。


    ——————- 

(注意) 2025/12/27追記
なお本ブログでのインストール記事でのパッケージ導入ですが、
アプリインストール時点で不足しているものについて記載しています。
アプリのインストールする順番によっては、
必要なパッケージが記載されていない場合もありますので、
その場合は別途別途導入してください。

インストールするパッケージ名がわからない場合は、googleなどの検索で、
“apt <コマンド名>”や、”apt <ライブラリ名>”などで検索で探せる場合があります。
ソースからのビルドする場合は、”<ライプラリ名>-dev” というパッケージを
導入すればいいことが多いです。

インストール可能な正しいパッケージ名を調べるには、
“apt search <パッケージ名の一部 or キーワード>” で確認することができます。
また、apt search コマンドでは既に導入済かどうかについても確認できます。

——————-

apt等でいろいろアプリをインストールしてみます

実行成功

FDclone        CUI上で利用できるファイル&ディレクトリ管理ツール

xtightvncviewer    X11上で稼働するvncviewer

rdesktop       RDPプロトコルに対応した接続クライアント

xfreerdp2       RDPプロトコルに対応した接続クライアント

gngb         GAME BOY エミュレータ

openmsx       MSXエミュレータ(SDL1.2版で現実的な速度に。)[2025/12/22追加

fmsx        MSXエミュレータ(MSX1/2/2+) [2025/12/20追加]

dosbox       グラフィックス、サウンド、DOS を備えた x86 エミュレータ(Brainでは厳しい)

Neko Project 2 kai  PC9801/9821 エミュレータ

px68k       X68000エミュレータ(かなり遅いです。) 

libSDL2       ハードウェアへの低レベルアクセスを提供する開発ライブラリ

fceux 2.2.3 (SDL1.2版) ファミコンエミュレータ(音無しであれば実用的な速度で動作)

mplayer/smplayer  音楽・動画再生ツール

xpenguins     小さなペンギンがウィンドウ上を動き回るデスクトップマスコットアプリ

xmkmf       Imakefile から Makefile を生成するためのツール

cmake       CMakeLists.txtからMakefileを生成するためのツール

cbp2make     Code::Blocks IDE project (.cbp)からMakefileを生成するためのツール

oneko       X11猫(マウスカーソルを追いかける猫を表示するデスクトップマスコット)

macopix      アクティブウィンドウに座るマスコットプログラム

Emi Clock      美少女コスプレ時計 Emi Clock

xhime        常駐姫ちゃん (デスクトップマスコット的なアニメーションソフト)

xfishtank      X のルートで様々な熱帯魚が泳ぐ壁紙上の水槽が楽しめます。

xfireworks     Xのルートウィンドウ上で花火が打ちあがります

XMascot      Xの画面上で揺れるマスコットを表示する プログラム (2025/12/14追加)

xdesktopwaves   Xのルートウィンドウ上で水の波をシミュレーション

dclock       X Window System 向けの柔軟な表示設定が可能なデジタル時計

mxclock      絵柄が綺麗な時計です.

SunClock       時刻と地理データを表示可能な可愛い時計

Xantfarm     X11用のシンプルなアリ農場

XMangekyou    X11で動く万華鏡です

Xshodow     「書道」のアプリケーションです.

 

動作未確認(動作遅延、動かない等)

remmina       複数の接続に対応した統合クライアント(動作はするが接続できない)

higan        マルチゲームコンソールエミュレータ(動作はするが遅すぎる)

fceux         ファミコンエミュレータ(動作は遅いです。)

nestopia       ファミコンエミュレータ(動作は遅いです。キー入力反応なし?)

java          Java VMの開発実行環境 (非常に遅い)

 

アプリケーション紹介

FDclone CUI上で利用できるファイル&ディレクトリ管理ツール

FDcloneは、古のDOS用のフリーツールであるFD(File&Directory)をUNIX ベースの OSに移植したものです。(FDclone公式ページ)
FDcloneはCUI上で利用できるファイル&ディレクトリ管理ツールということで、
Winowsで言えば、エクスプローラのような感じに使えます。

コマンドやファイル名を直接入力しなくても、ディレクトリの移動やファイルの操作支援ができるので、キー入力に工夫が必要なBrainuxにはピッタリなツールです。

Brainuxでは、apt経由で導入できます。

sudo apt install fdclone

事前にSDカードの文字化け対策をしておけば、/boot以下でも日本語文字も正しく表示できます。
(Brainux起動時にshellで起動した場合は、fbtermを起動してからFDcloneを起動すれば、日本語ファイル名も正しく表示されます。)

シフトを押しながらEで、fdclone自体の設定変更や確認ができます。
キー割り当てや、ランチャ、アーカイバ設定なども可能です。

「内部設定」のおすすめは、以下の通りです。

SORTTYPE: 名前順(昇り順), 直前のソート形式を保持
SORTTREE: 有効
WRITEFS: 使用禁止
LANGUAGE: 英語(English)ではFDcloneのメッセージが英語になります。ここをUTF-8に変更するとメッセージが日本語になりますが日本語表示できない環境では文字化けするので注意。
FNAMEKCODE: UTF-8

その他キー割り当てや、拡張子にあった実行コマンド等いろいろチューニング可能です。
変更したら、保存から「Overwrite」を実行して設定を保存します。

チューニング次第で何でもできるようになるツールですので、おすすめです。

なお、「unzip」や「lhasa」、「nkf」をaptでパッケージをインストールすることで、
zipやlzh内ファイルの解凍なしでの参照(決定[Enter])や解凍(u)、
UTF-8以外の文書ファイルの表示等(ファイル選択してx、先頭に”nkf “と入れて実行)
も可能になります。

sudo apt install unzip lhasa nkf

cabファイルについては、
別途「cabextract」パッケージをaptでインストールすれば
cabextract 展開したいファイル名.cab
で解凍できるようになります(-l オプションでリスト表示)。

cabファイルへの変換もしたいのであれば、「gcab」パッケージをaptでインストールすれば、gcabコマンドで圧縮(-c)、解凍(-x)、リスト表示(-t or -l)ができるようになります。

sudo apt install cabextract

user@brain:~$ sudo apt show fdclone
[sudo] password for user:
Package: fdclone
Version: 3.01j-1
Priority: optional
Section: shells
Maintainer: Elías Alejandro Año Mendoza <ealmdz@gmail.com>
Installed-Size: 1,103 kB
Depends: libc6 (>= 2.28), libtinfo6 (>= 6)
Homepage: http://hp.vector.co.jp/authors/VA012337/soft/fd/
Tag: interface::shell, interface::text-mode, role::program,
 scope::application, uitoolkit::ncurses, use::browsing, use::organizing,
 works-with::file
Download-Size: 504 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: console-base lightweight file manager
 FD (FD represents "File and Directory") is an easy-to-use
 file management tool for Un*x newbies.  As its name shows,
 this is a rewrite from scratch - the original version was written
 by Atsushi Idei for MS-DOS(tm) and once very popular in Japan.
 Messages are available either in English or in Japanese.

user@brain:~$ sudo apt install fdclone
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  fdclone
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 504 kB of archives.
After this operation, 1,103 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel fdclone armel 3.01j-1 [504 kB]
Fetched 504 kB in 2s (287 kB/s)
Selecting previously unselected package fdclone.
(Reading database ... 46263 files and directories currently installed.)
Preparing to unpack .../fdclone_3.01j-1_armel.deb ...
Unpacking fdclone (3.01j-1) ...
Setting up fdclone (3.01j-1) ...
Processing triggers for man-db (2.9.4-2) ...
user@brain:~$

xtightvncviewer X11上で稼働するvncviewer

昔から使われている画面転送プロトコルであるVNCのクライアントです。
X11上で動きます。

VNCは、今思うと昔のうちのホームページでメイン張ってたコンテンツでした。

もう25年も前の記事・・・・当時はかなりのキワモノ扱いのソフトウェアでした。
リナザウとかW-Zero3とかPSPとかでもクライアントを動かして遊んでました。なつかしい。

さっそく、Brainuxで動かせるかを試します。
インストールはApt経由で可能です。

sudo apt install xtightvncviewer

今回は、接続先としてUltraVNCを導入した環境に接続しています。

xtightvnc <接続先IP>:<DISPLAY番号>

例)
xtightvnc 192.168.29.47:1
<パスワード入力>

とりあえず、接続は可能です。
速度は、正直遅いです。

なお、VNCプロトコルには音声リダイレクトの機能はない(はず)なので、
音声リダイレクトをしたい場合は、Plusaudioとかを使うしかないと思います(未確認)。

user@brain:/etc/apt$ sudo apt show xtightvncviewer
Package: xtightvncviewer
Version: 1:1.3.10-3
Priority: optional
Section: x11
Source: tightvnc
Maintainer: Debian Remote Maintainers &lt;debian-remote@lists.debian.org&gt;
Installed-Size: 171 kB
Provides: vnc-viewer, vncviewer
Depends: libc6 (&gt;= 2.28), libjpeg62-turbo (&gt;= 1.3.1), libx11-6, libxaw7, libxext6, libxmu6, libxt6, zlib1g (&gt;= 1:1.1.4)
Recommends: xfonts-base
Suggests: ssh, tightvncserver
Homepage: https://www.tightvnc.com
Tag: interface::graphical, interface::x11, network::client, role::program,
 uitoolkit::athena, use::login, use::viewing, x11::application
Download-Size: 87.2 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: virtual network computing client software for X
 VNC stands for Virtual Network Computing. It is, in essence, a remote
 display system which allows you to view a computing `desktop' environment
 not only on the machine where it is running, but from anywhere on the
 Internet and from a wide variety of machine architectures.
 .
 It is implemented in a client/server model. This package provides a client
 for X, with this you can connect to a vncserver somewhere in the network
 and display its content in a window. There are vncserver available for other
 operating systems.
 .
 The difference between the xtightvncviewer and the normal vncviewer is the
 data encoding, optimized for low bandwidth connections. If the client do not
 support jpeg or zlib encoding it can use the default one. Later versions of
 xvncviewer (&gt; 3.3.3r2) support a new automatic encoding that should be equally
 good as the tightvnc encoding.
 
user@brain:/etc/apt$ sudo apt install xtightvncviewer
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  tightvncserver
Recommended packages:
  xfonts-base
The following NEW packages will be installed:
  xtightvncviewer
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 87.2 kB of archives.
After this operation, 171 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel xtightvncviewer armel 1:1.3.10-3 &#91;87.2 kB]
Fetched 87.2 kB in 1s (64.1 kB/s)
Selecting previously unselected package xtightvncviewer.
(Reading database ... 44210 files and directories currently installed.)
Preparing to unpack .../xtightvncviewer_1%3a1.3.10-3_armel.deb ...
Unpacking xtightvncviewer (1:1.3.10-3) ...
Setting up xtightvncviewer (1:1.3.10-3) ...
update-alternatives: using /usr/bin/xtightvncviewer to provide /usr/bin/vncviewer (vncviewer) in auto mode
Processing triggers for man-db (2.9.4-2) ...
 
user@brain:/etc/apt$ apt list | grep xtightvncviewer
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
xtightvncviewer/oldstable,now 1:1.3.10-3 armel &#91;installed]
 
user@brain:~$ xtightvncviewer 192.168.29.47:1
Connected to RFB server, using protocol version 3.3
Performing standard VNC authentication
Password:
Authentication successful
Desktop name "win10-z800 ( 192.168.29.47 )"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
Using default colormap which is TrueColor.  Pixel format:
  16 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0


user@brain:~$ xtightvncviewer --help
TightVNC Viewer version 1.3.10

Usage: xtightvncviewer [<OPTIONS>] [<HOST>][:<DISPLAY#>]
       xtightvncviewer [<OPTIONS>] [<HOST>][::<PORT#>]
       xtightvncviewer [<OPTIONS>] -listen [<DISPLAY#>]
       xtightvncviewer -help

<OPTIONS> are standard Xt options, or:
        -via <GATEWAY>
        -shared (set by default)
        -noshared
        -viewonly
        -fullscreen
        -noraiseonbeep
        -passwd <PASSWD-FILENAME> (standard VNC authentication)
        -encodings <ENCODING-LIST> (e.g. "tight copyrect")
        -bgr233
        -owncmap
        -truecolour
        -depth <DEPTH>
        -compresslevel <COMPRESS-VALUE> (0..9: 0-fast, 9-best)
        -quality <JPEG-QUALITY-VALUE> (0..9: 0-low, 9-high)
        -nojpeg
        -nocursorshape
        -x11cursor
        -autopass

Option names may be abbreviated, e.g. -bgr instead of -bgr233.
See the manual page for more information.
user@brain:~$

rdesktop RDPプロトコルに対応した接続クライアント

rdesktopは、Windowsで使われているリモートコントロールサービスであるRemoteDesktop(RDP Service)に接続するためのツールです。
接続先でRDPを有効にするにはWindowsはPROエディションが必要です。

インストールはApt経由で可能です。

sudo apt install rdesktop

接続先でRDPを有効になっていれば、
たとえば、以下のコマンドで接続できます。

rdesktop -k en -x lan -a 8 -f <接続先IPアドレス> -u <ログインユーザ名> -p <Password>

例)
rdesktop -k en -x lan -a 8 -f 192.168.29.43 -u user -p userpass

-k :キーボードレイアウト(en)
-x :ネットワークモード(RDP5 experience)を指定します。
-a :色深度(32,24,16,8)
-f :フルスクリーンモード
-u :リモートデスクトップ(Windows)のユーザー名
-p :上記ユーザのWindowsパスワード
パスワード文字列に”!”などがある場合は、パスワード全てをシングルクォーテーションで括ります。

-f でフルスクリーン表示したときのBrainのキーボードでの解除は以下の同時押しです
≫の上向き + 文字切り替え + 決定   (Ctrl + Alt + Enter に相当)
それ以外だと、スタートメニューから電源->切断でもRDP接続を切断できます。

あと、usbサウンドデバイスを付けているのであれば、以下のオプションを追加すると音声のリダイレクションも可能でした。
ただ、画面描画が激しい状態だと音がとぎれてましたので、この辺はマシンパワーとかの取り合いをしている感じでした。なので音楽再生付きでyoutube鑑賞はムリゲーです。
どっちかだけなら何とかなるかもしれません。

-r sound:local:alsa

rdesktopは少し古いいツールなので、
Windows10や11に接続する際にNLA関係でエラーがでて接続できないときがあります。
その時は「RDP NLA」とかで検索して、Windows側で対応してみてください。
もしくは、次に試す「freerdp2」のほうを試してみてください。

user@brain:~$ sudo apt show rdesktop
Package: rdesktop
Version: 1.9.0-2+b1
Priority: optional
Section: x11
Source: rdesktop (1.9.0-2)
Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Installed-Size: 701 kB
Depends: libasound2 (>= 1.0.16), libc6 (>= 2.28), libgmp10, libgnutls30 (>= 3.6.14), libgssapi-krb5-2 (>= 1.17), libhogweed6, libnettle8, libpcsclite1 (>= 1.3.3), libtasn1-6 (>= 4.14), libx11-6, libxcursor1 (>> 1.1.2), libxrandr2
Suggests: pcscd
Homepage: https://www.rdesktop.org/
Tag: interface::graphical, interface::x11, network::client, protocol::ssl,
 role::program, scope::utility, uitoolkit::xlib, use::login,
 x11::application
Download-Size: 212 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: RDP client for Windows NT/2000 Terminal Server and Windows Servers
 rdesktop is an open source client for Windows NT/2000 Terminal Server and
 Windows Server 2003/2008. Capable of natively speaking its Remote Desktop
 Protocol (RDP) in order to present the user's Windows desktop. Unlike Citrix
 ICA, no server extensions are required.



user@brain:~$ sudo apt install rdesktop
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  pcscd
The following NEW packages will be installed:
  rdesktop
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 212 kB of archives.
After this operation, 701 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel rdesktop armel 1.9.0-2+b1 [212 kB]
Fetched 212 kB in 1s (244 kB/s)
Selecting previously unselected package rdesktop.
(Reading database ... 44348 files and directories currently installed.)
Preparing to unpack .../rdesktop_1.9.0-2+b1_armel.deb ...
Unpacking rdesktop (1.9.0-2+b1) ...
Setting up rdesktop (1.9.0-2+b1) ...
Processing triggers for man-db (2.9.4-2) ...



user@brain:~$ rdesktop
rdesktop: A Remote Desktop Protocol client.
Version 1.9.0. Copyright (C) 1999-2016 Matthew Chapman et al.
See http://www.rdesktop.org/ for more information.

Usage: rdesktop [options] server[:port]
   -u: user name
   -d: domain
   -s: shell / seamless application to start remotely
   -c: working directory
   -p: password (- to prompt)
   -n: client hostname
   -k: keyboard layout on server (en-us, de, sv, etc.)
   -g: desktop geometry (WxH[@DPI][+X[+Y]])
   -i: enables smartcard authentication, password is used as pin
   -f: full-screen mode
   -b: force bitmap updates
   -L: local codepage
   -A: path to SeamlessRDP shell, this enables SeamlessRDP mode
   -V: tls version (1.0, 1.1, 1.2, defaults to negotiation)
   -B: use BackingStore of X-server (if available)
   -e: disable encryption (French TS)
   -E: disable encryption from client to server
   -m: do not send motion events
   -M: use local mouse cursor
   -C: use private colour map
   -D: hide window manager decorations
   -K: keep window manager key bindings
   -S: caption button size (single application mode)
   -T: window title
   -t: disable use of remote ctrl
   -N: enable numlock synchronization
   -X: embed into another window with a given id.
   -a: connection colour depth
   -z: enable rdp compression
   -x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)
   -P: use persistent bitmap caching
   -r: enable specified device redirection (this flag can be repeated)
         '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1
             or      COM1=/dev/ttyS0,COM2=/dev/ttyS1
         '-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share
             or   'floppy=/mnt/floppy,cdrom=/mnt/cdrom'
         '-r clientname=<client name>': Set the client name displayed
             for redirected disks
         '-r lptport:LPT1=/dev/lp0': enable parallel redirection of /dev/lp0 to LPT1
             or      LPT1=/dev/lp0,LPT2=/dev/lp1
         '-r printer:mydeskjet': enable printer redirection
             or      mydeskjet="HP LaserJet IIIP" to enter server driver as well
         '-r sound:[local[:driver[:device]]|off|remote]': enable sound redirection
                     remote would leave sound on server
                     available drivers for 'local':
                     alsa:      ALSA output driver, default device: default
         '-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]': enable clipboard
                      redirection.
                      'PRIMARYCLIPBOARD' looks at both PRIMARY and CLIPBOARD
                      when sending data to server.
                      'CLIPBOARD' looks at only CLIPBOARD.
         '-r scard[:"Scard Name"="Alias Name[;Vendor Name]"[,...]]
          example: -r scard:"eToken PRO 00 00"="AKS ifdh 0"
                   "eToken PRO 00 00" -> Device in GNU/Linux and UNIX environment
                   "AKS ifdh 0"       -> Device shown in Windows environment
          example: -r scard:"eToken PRO 00 00"="AKS ifdh 0;AKS"
                   "eToken PRO 00 00" -> Device in GNU/Linux and UNIX environment
                   "AKS ifdh 0"       -> Device shown in Microsoft Windows environment
                   "AKS"              -> Device vendor name
   -0: attach to console
   -4: use RDP version 4
   -5: use RDP version 5 (default)
   -o: name=value: Adds an additional option to rdesktop.
           sc-csp-name        Specifies the Crypto Service Provider name which
                              is used to authenticate the user by smartcard
           sc-container-name  Specifies the container name, this is usually the username
           sc-reader-name     Smartcard reader name to use
           sc-card-name       Specifies the card name of the smartcard to use
   -v: enable verbose logging

xfreerdp2 RDPプロトコルに対応した接続クライアント

rdesktop と同様のRDP Clientです。
rdesktopよりも比較的新しいソフトですので、NLA認証の問題も解決されているようです。

インストールはApt経由で可能です。

sudo apt install freerdp2-x11

接続先でRDPを有効になっていれば、
たとえば、以下のコマンドで接続できます。

xfreerdp /v:<接続先IPアドレス> /u:<ログインユーザ /p:<接続パスワード /f

例)
xfreerdp /v:192.168.29.43 /u:user /p:userpass /f

rdesktop同様、BrainにUSBサウンドデバイスを挿した状態で以下のコマンドオプションを追加すると音声も転送されます。
(一部ノイズ交じりなのも、画面描画が激しい状態だと音がとぎれるのも一緒)

/sound:sys:alsa

サウンドがうまく再生できないときは、以下のメッセージが今コンソール側に出ているっぽいので、ALSAのバッファがたりていないのかもしれません。
ALSA lib pcm.c:8545:(snd_pcm_recover) underrun occurred

user@brain:~$ sudo apt show freerdp2-x11
Package: freerdp2-x11
Version: 2.3.0+dfsg1-2+deb11u1
Priority: optional
Section: x11
Source: freerdp2
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Installed-Size: 553 kB
Provides: freerdp
Depends: libc6 (>= 2.4), libfreerdp-client2-2 (= 2.3.0+dfsg1-2+deb11u1), libfreerdp2-2 (>= 2.3.0+dfsg1), libwinpr2-2 (>= 2.1.0+dfsg1), libx11-6 (>= 2:1.2.99.901), libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxinerama1, libxrandr2 (>= 2:1.5.0), libxrender1
Conflicts: freerdp-x11
Replaces: freerdp-x11
Homepage: https://www.freerdp.com/
Download-Size: 97.6 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: RDP client for Windows Terminal Services (X11 client)
 FreeRDP is a libre client/server implementation of the Remote
 Desktop Protocol (RDP).
 .
 Currently, the FreeRDP client supports the following Windows Versions:
 .
  * Windows NT Server
  * Windows 2000 Terminal Server
  * Windows XP
  * Windows 2003 Server
  * Windows Vista
  * Windows 2008/2008r2/2011SBS Server
  * Windows 7
  * Windows 2012/2012r2 Server
  * Windows 8
  * Windows 10
 .
 This package contains the X11 based client.



user@brain:~$ sudo apt install freerdp2-x11
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

The following additional packages will be installed:
  libaom0 libavcodec58 libavutil56 libcodec2-0.9 libdav1d4 libfreerdp-client2-2 libfreerdp2-2 libgsm1 libopenjp2-7 libshine3 libsnappy1v5 libsoxr0
  libswresample3 libswscale5 libva-drm2 libva-x11-2 libva2 libvdpau1 libwebpmux3 libwinpr2-2 libx264-160 libx265-192 libxvidcore4 libzvbi-common libzvbi0
  ocl-icd-libopencl1
Suggested packages:
  opencl-icd
Recommended packages:
  va-driver-all | va-driver vdpau-driver-all | vdpau-driver
The following NEW packages will be installed:
  freerdp2-x11 libaom0 libavcodec58 libavutil56 libcodec2-0.9 libdav1d4 libfreerdp-client2-2 libfreerdp2-2 libgsm1 libopenjp2-7 libshine3 libsnappy1v5
  libsoxr0 libswresample3 libswscale5 libva-drm2 libva-x11-2 libva2 libvdpau1 libwebpmux3 libwinpr2-2 libx264-160 libx265-192 libxvidcore4 libzvbi-common
  libzvbi0 ocl-icd-libopencl1
0 upgraded, 27 newly installed, 0 to remove and 1 not upgraded.
Need to get 17.4 MB of archives.
After this operation, 45.1 MB of additional disk space will be used.
~
Processing triggers for libc-bin (2.31-13+deb11u11) ...



user@brain:~$ xfreerdp

FreeRDP - A Free Remote Desktop Protocol Implementation
See www.freerdp.com for more information

Usage: xfreerdp [file] [options] [/v:<server>[:port]]

Syntax:
    /flag (enables flag)
    /option:<value> (specifies option with value)
    +toggle -toggle (enables or disables toggle, where '/' is a synonym of '+')

    /a:<addin>[,<options>]            Addin
    /action-script:<file-name>        Action script
    /admin                            Admin (or console) session
    +aero                             Enable desktop composition
    /app:<path> or ||<alias>          Remote application program
    /app-cmd:<parameters>             Remote application command-line parameters
    /app-file:<file-name>             File to open with remote application
    /app-guid:<app-guid>              Remote application GUID
    /app-icon:<icon-path>             Remote application icon for user interface
    /app-name:<app-name>              Remote application name for user interface
    /app-workdir:<workspace path>     Remote application workspace path
    /assistance:<password>            Remote assistance password
    /auto-request-control             Automatically request remote assistance
                                      input control
    +async-channels                   Enable Asynchronous channels
                                      (experimental)
    +async-input                      Enable Asynchronous input
    +async-update                     Enable Asynchronous update
    /audio-mode:<mode>                Audio output mode
    +auth-only                        Enable Authenticate only
    -authentication                   Disable Authentication (experimental)
    +auto-reconnect                   Enable Automatic reconnection
    /auto-reconnect-max-retries:<retries>
                                      Automatic reconnection maximum retries, 0
                                      for unlimited [0,1000]
    +bitmap-cache                     Enable bitmap cache
    /bpp:<depth>                      Session bpp (color depth)
    /buildconfig                      Print the build configuration
    /cert:[deny,ignore,name:<name>,tofu,fingerprint:<hash>:<hash as hex>
          [,fingerprint:<hash>:<another hash>]]
                                      Certificate accept options. Use with care!
                                      * deny         ... Automatically abort
                                      connection if the certificate does not
                                      match, no user interaction.           *
                                      ignore       ... Ignore the certificate
                                      checks altogether (overrules all other
                                      options)                           * name
                                             ... Use the alternate <name>
                                      instead of the certificate subject to
                                      match locally stored certificates * tofu
                                            ... Accept certificate
                                      unconditionally on first connect and deny
                                      on subsequent connections if the
                                      certificate does not match * fingerprints
                                      ... A list of certificate hashes that are
                                      accepted unconditionally for a connection
    /cert-deny                        [deprecated, use /cert:deny] Automatically
                                      abort connection for any certificate that
                                      can not be validated.
    /cert-ignore                      [deprecated, use /cert:ignore] Ignore
                                      certificate
    /cert-name:<name>                 [deprecated, use /cert:name:<name>]
                                      Certificate name
    /cert-tofu                        [deprecated, use /cert:tofu] Automatically
                                      accept certificate on first connect
    /client-build-number:<number>     Client Build Number sent to server
                                      (influences smartcard behaviour, see
                                      [MS-RDPESC])
    /client-hostname:<name>           Client Hostname to send to server
    -clipboard[:[use-selection:<atom>]]
                                      Disable Redirect clipboard.
                                      * use-selection:<atom>  ... (X11) Specify
                                      which X selection to access. Default is
                                      CLIPBOARD. PRIMARY is the X-style
                                      middle-click selection.
    /codec-cache:[rfx|nsc|jpeg]       Bitmap codec cache
    -compression                      Disable compression
    /compression-level:<level>        Compression level (0,1,2)
    +credentials-delegation           Enable credentials delegation
    /d:<domain>                       Domain
    -decorations                      Disable Window decorations
    /disp                             Display control
    /drive:<name>,<path>              Redirect directory <path> as named share
                                      <name>. Hotplug support is enabled with
                                      /drive:hotplug,*. This argument provides
                                      the same function as "Drives that I plug
                                      in later" option in MSTSC.
    +drives                           Enable Redirect all mount points as shares
    /dvc:<channel>[,<options>]        Dynamic virtual channel
    /dynamic-resolution               Send resolution updates when the window is
                                      resized
    /echo                             Echo channel
    -encryption                       Disable Encryption (experimental)
    /encryption-methods:[40,][56,][128,][FIPS]
                                      RDP standard security encryption methods
    /f                                Fullscreen mode (<Ctrl>+<Alt>+<Enter>
                                      toggles fullscreen)
    -fast-path                        Disable fast-path input/output
    +fipsmode                         Enable FIPS mode
    /floatbar[:sticky:[on|off],default:[visible|hidden],show:
               [always|fullscreen||window]]
                                      floatbar is disabled by default (when
                                      enabled defaults to sticky in fullscreen
                                      mode)
    -fonts                            Disable smooth fonts (ClearType)
    /frame-ack:<number>               Number of frame acknowledgement
    /from-stdin[:force]               Read credentials from stdin. With <force>
                                      the prompt is done before connection,
                                      otherwise on server request.
    /g:<gateway>[:<port>]             Gateway Hostname
    /gateway-usage-method:[direct|detect]
                                      Gateway usage method
    /gd:<domain>                      Gateway domain
    /gdi:sw|hw                        GDI rendering
    /geometry                         Geometry tracking channel
    +gestures                         Enable Consume multitouch input locally
    /gfx[:[[RFX|AVC420|AVC444],mask:<value>]]
                                      RDP8 graphics pipeline
    /gfx-h264[:[[AVC420|AVC444],mask:<value>]
               [DEPRECATED] use /gfx:avc420 instead]
                                      RDP8.1 graphics pipeline using H264 codec
    +gfx-progressive                  Enable RDP8 graphics pipeline using progressive
                                      codec
    +gfx-small-cache                  Enable RDP8 graphics pipeline using small cache
                                      mode
    +gfx-thin-client                  Enable RDP8 graphics pipeline using thin client
                                      mode
    +glyph-cache                      Enable Glyph cache (experimental)
    /gp:<password>                    Gateway password
    -grab-keyboard                    Disable Grab keyboard
    /gt:[rpc|http[,no-websockets]|auto[,no-websockets]]
                                      Gateway transport type
    /gu:[[<domain>\]<user>|<user>[@<domain>]]
                                      Gateway username
    /gat:<access token>               Gateway Access Token
    /h:<height>                       Height
    -heartbeat                        Disable Support heartbeat PDUs
    /help                             Print help
    +home-drive                       Enable Redirect user home as share
    /ipv6                             Prefer IPv6 AAA record over IPv4 A record
    /jpeg                             JPEG codec support
    /jpeg-quality:<percentage>        JPEG quality
    /kbd:0x<id> or <name>             Keyboard layout
    /kbd-lang:0x<id>                  Keyboard active language identifier
    /kbd-fn-key:<value>               Function key value
    /kbd-list                         List keyboard layouts
    /kbd-lang-list                    List keyboard languages
    /kbd-remap:List of <key>=<value>,... pairs to remap scancodes
                                      Keyboard scancode remapping
    /kbd-subtype:<id>                 Keyboard subtype
    /kbd-type:<id>                    Keyboard type
    /load-balance-info:<info-string>  Load balance info
    /log-filters:<tag>:<level>[,<tag>:<level>[,...]]
                                      Set logger filters, see wLog(7) for
                                      details
    /log-level:[OFF|FATAL|ERROR|WARN|INFO|DEBUG|TRACE]
                                      Set the default log level, see wLog(7) for
                                      details
    /max-fast-path-size:<size>        Specify maximum fast-path update size
    /max-loop-time:<time>             Specify maximum time in milliseconds spend
                                      treating packets
    +menu-anims                       Enable menu animations
    /microphone[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
                 [channel:<channel>]] Audio input (microphone)
    /monitor-list                     List detected monitors
    /monitors:<id>[,<id>[,...]]       Select monitors to use
    -mouse-motion                     Disable Send mouse motion
    /multimon[:force]                 Use multiple monitors
    +multitouch                       Enable Redirect multitouch input
    +multitransport                   Enable Support multitransport protocol
    -nego                             Disable protocol security negotiation
    /network:[modem|broadband|broadband-low|broadband-high|wan|lan|auto]
                                      Network connection type
    /nsc                              NSCodec support
    +offscreen-cache                  Enable offscreen bitmap cache
    /orientation:[0|90|180|270]       Orientation of display in degrees
    +old-license                      Enable Use the old license workflow (no CAL and
                                      hwId set to 0)
    /p:<password>                     Password
    /parallel[:<name>[,<path>]]       Redirect parallel device
    /parent-window:<window-id>        Parent window id
    +password-is-pin                  Enable Use smart card authentication with
                                      password as smart card PIN
    /pcb:<blob>                       Preconnection Blob
    /pcid:<id>                        Preconnection Id
    /pheight:<height>                 Physical height of display (in
                                      millimeters)
    /play-rfx:<pcap-file>             Replay rfx pcap file
    /port:<number>                    Server port
    -suppress-output                  Disable suppress output when minimized
    +print-reconnect-cookie           Enable Print base64 reconnect cookie after
                                      connecting
    /printer[:<name>[,<driver>]]      Redirect printer device
    /proxy:[<proto>://][<user>:<password>@]<host>:<port>
                                      Proxy settings: override env. var (see
                                      also environment variable below). Protocol
                                      "socks5" should be given explicitly where
                                      "http" is default.
    /pth:<password-hash>              Pass the hash (restricted admin mode)
    /pwidth:<width>                   Physical width of display (in millimeters)
    /rdp2tcp:<executable path[:arg...]>
                                      TCP redirection
    /reconnect-cookie:<base64-cookie> Pass base64 reconnect cookie to the
                                      connection
    /redirect-prefer:<FQDN|IP|NETBIOS>,[...]
                                      Override the preferred redirection order
    /relax-order-checks               Do not check if a RDP order was announced
                                      during capability exchange, only use when
                                      connecting to a buggy server
    /restricted-admin                 Restricted admin mode
    /rfx                              RemoteFX
    /rfx-mode:[image|video]           RemoteFX mode
    /scale:[100|140|180]              Scaling factor of the display
    /scale-desktop:<percentage>       Scaling factor for desktop applications
                                      (value between 100 and 500)
    /scale-device:100|140|180         Scaling factor for app store applications
    /sec:[rdp|tls|nla|ext]            Force specific protocol security
    +sec-ext                          Enable NLA extended protocol security
    -sec-nla                          Disable NLA protocol security
    -sec-rdp                          Disable RDP protocol security
    -sec-tls                          Disable TLS protocol security
    /serial[:<name>[,<path>[,<driver>[,permissive]]]]
                                      Redirect serial device
    /shell:<shell>                    Alternate shell
    /shell-dir:<dir>                  Shell working directory
    /size:<width>x<height> or <percent>%[wh]
                                      Screen size
    /smart-sizing[:<width>x<height>]  Scale remote desktop to window size
    /smartcard[:<str>[,<str>...]]     Redirect the smartcard devices containing
                                      any of the <str> in their names.
    /smartcard-logon                  Activates Smartcard Logon authentication.
                                      (EXPERIMENTAL: NLA not supported)
    /sound[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
            [channel:<channel>,][latency:<latency>,][quality:<quality>]]
                                      Audio output (sound)
    /span                             Span screen over multiple monitors
    /spn-class:<service-class>        SPN authentication service class
    /ssh-agent                        SSH Agent forwarding channel
    /t:<title>                        Window title
    -themes                           Disable themes
    /timeout:<time in ms>             Advanced setting for high latency links:
                                      Adjust connection timeout, use if you
                                      encounter timeout failures with your
                                      connection
    /tls-ciphers:[netmon|ma|ciphers]  Allowed TLS ciphers
    /tls-seclevel:<level>             TLS security level - defaults to 1
    -toggle-fullscreen                Disable Alt+Ctrl+Enter to toggle
                                      fullscreen
    /tune:<setting:value>,<setting:value>
                                      [experimental] directly manipulate freerdp
                                      settings, use with extreme caution!
    /tune-list                        Print options allowed for /tune
    /u:[[<domain>\]<user>|<user>[@<domain>]]
                                      Username
    +unmap-buttons                    Enable Let server see real physical pointer
                                      button
    /usb:[dbg,][id:<vid>:<pid>#...,][addr:<bus>:<addr>#...,][auto]
                                      Redirect USB device
    /v:<server>[:port]                Server hostname
    /vc:<channel>[,<options>]         Static virtual channel
    /version                          Print version
    /video                            Video optimized remoting channel
    /vmconnect[:<vmid>]               Hyper-V console (use port 2179, disable
                                      negotiation)
    /w:<width>                        Width
    -wallpaper                        Disable wallpaper
    +window-drag                      Enable full window drag
    /window-position:<xpos>x<ypos>    window position
    /wm-class:<class-name>            Set the WM_CLASS hint for the window
                                      instance
    /workarea                         Use available work area

Examples:
    xfreerdp connection.rdp /p:Pwd123! /f
    xfreerdp /u:CONTOSO\JohnDoe /p:Pwd123! /v:rdp.contoso.com
    xfreerdp /u:JohnDoe /p:Pwd123! /w:1366 /h:768 /v:192.168.1.100:4489
    xfreerdp /u:JohnDoe /p:Pwd123! /vmconnect:C824F53E-95D2-46C6-9A18-23A5BB403532 /v:192.168.1.100

Clipboard Redirection: +clipboard

Drive Redirection: /drive:home,/home/user
Smartcard Redirection: /smartcard:<device>
Serial Port Redirection: /serial:<name>,<device>,[SerCx2|SerCx|Serial],[permissive]
Serial Port Redirection: /serial:COM1,/dev/ttyS0
Parallel Port Redirection: /parallel:<name>,<device>
Printer Redirection: /printer:<device>,<driver>
TCP redirection: /rdp2tcp:/usr/bin/rdp2tcp

Audio Output Redirection: /sound:sys:oss,dev:1,format:1
Audio Output Redirection: /sound:sys:alsa
Audio Input Redirection: /microphone:sys:oss,dev:1,format:1
Audio Input Redirection: /microphone:sys:alsa

Multimedia Redirection: /video
USB Device Redirection: /usb:id:054c:0268#4669:6e6b,addr:04:0c

For Gateways, the https_proxy environment variable is respected:
    export https_proxy=http://proxy.contoso.com:3128/
    xfreerdp /g:rdp.contoso.com ...

More documentation is coming, in the meantime consult source files

user@brain:~$

remmina 複数の接続に対応した統合クライアント(動作はするが接続できない)

様々なプロトコルに対応した接続用クライアントです。
ssh,RDP,VNC等
接続前のGUIは立ち上がりますが、実際に接続しようとしてもつながりません。
標準のsshでさえつながらないので、どこかネットワーク的にもうまくいっていないのかもしれません。

インストールはApt経由で可能です。

sudo apt install remmina remmina-plugin-rdp remmina-plugin-vnc

user@brain:~$ sudo apt show remmina
[sudo] password for user:
Package: remmina
Version: 1.4.11+dfsg-3
Priority: optional
Section: x11
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Installed-Size: 478 kB
Depends: libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libavahi-ui-gtk3-0 (>= 0.6.30), libayatana-appindicator3-1 (>= 0.4.90), libc6 (>= 2.28), libcairo2 (>= 1.6.0), libgcrypt20 (>= 1.8.0), libglib2.0-0 (>= 2.55.1), libgtk-3-0 (>= 3.21.5), libjson-glib-1.0-0 (>= 1.5.2), libpango-1.0-0 (>= 1.14.0), libsodium23 (>= 1.0.10), libsoup2.4-1 (>= 2.41.90), libssh-4 (>= 0.8.1), libssl1.1 (>= 1.1.0), libvte-2.91-0 (>= 0.51.90), remmina-common (= 1.4.11+dfsg-3), default-dbus-session-bus | dbus-session-bus
Recommends: remmina-plugin-rdp, remmina-plugin-vnc, remmina-plugin-secret
Suggests: remmina-plugin-exec, remmina-plugin-kwallet, remmina-plugin-nx, remmina-plugin-spice, remmina-plugin-www, remmina-plugin-xdmcp
Homepage: https://www.remmina.org/
Tag: interface::graphical, interface::x11, protocol::ssh, role::program,
 uitoolkit::gtk, x11::application
Download-Size: 161 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: GTK+ Remote Desktop Client
 Remmina is a remote desktop client written in GTK+, aiming to be
 useful for system administrators and travellers, who need to work
 with lots of remote computers in front of either large monitors or
 tiny netbooks.
 .
 Remmina supports multiple network protocols in an integrated and
 consistent user interface.
 .
 Currently RDP, VNC, SPICE, WWW, NX, XDMCP, EXEC and SSH are supported.

user@brain:~$
user@brain:~$
user@brain:~$ sudo apt install remmina
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libavahi-glib1 libavahi-ui-gtk3-0 libayatana-appindicator3-1
  libayatana-ido3-0.4-0 libayatana-indicator3-7 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libsodium23 libssh-4 remmina-common
Suggested packages:
  remmina-plugin-exec remmina-plugin-kwallet remmina-plugin-nx
  remmina-plugin-spice remmina-plugin-www remmina-plugin-xdmcp
Recommended packages:
  remmina-plugin-rdp remmina-plugin-vnc remmina-plugin-secret
The following NEW packages will be installed:
  libavahi-glib1 libavahi-ui-gtk3-0 libayatana-appindicator3-1
  libayatana-ido3-0.4-0 libayatana-indicator3-7 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libsodium23 libssh-4 remmina remmina-common
0 upgraded, 11 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,476 kB of archives.
After this operation, 5,820 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libavahi-glib1 armel 0.8-5+deb11u2 [44.0 kB]
~
Processing triggers for shared-mime-info (2.0-1) ...



user@brain:~$ sudo apt show remmina-plugin-rdp
Package: remmina-plugin-rdp
Version: 1.4.11+dfsg-3
Priority: optional
Section: gnome
Source: remmina
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Installed-Size: 132 kB
Depends: libc6 (>= 2.28), libcairo2 (>= 1.6.0), libcups2 (>= 1.6.0), libfreerdp-client2-2 (>= 2.2.0~), libfreerdp2-2 (>= 2.2.0~), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.41.1), libgtk-3-0 (>= 3.19.12), libwinpr2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1), libx11-6, remmina (= 1.4.11+dfsg-3)
Homepage: https://www.remmina.org/
Tag: role::plugin, uitoolkit::gtk
Download-Size: 51.2 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: RDP plugin for Remmina
 Remmina is a remote desktop client written in GTK+, aiming to be
 useful for system administrators and travellers, who need to work
 with lots of remote computers in front of either large monitors or
 tiny netbooks.
 .
 Remmina supports multiple network protocols in an integrated and
 consistent user interface.
 .
 Currently RDP, VNC, SPICE, WWW, NX, XDMCP, EXEC and SSH are supported.
 .
 This package contains the RDP plugin for Remmina.


user@brain:~$ sudo apt install remmina-plugin-rdp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  remmina-plugin-rdp
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 51.2 kB of archives.
After this operation, 132 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel remmina-plugin-rdp armel 1.4.11+dfsg-3 [51.2 kB]
Fetched 51.2 kB in 1s (54.9 kB/s)
Selecting previously unselected package remmina-plugin-rdp:armel.
(Reading database ... 45099 files and directories currently installed.)
Preparing to unpack .../remmina-plugin-rdp_1.4.11+dfsg-3_armel.deb ...
Unpacking remmina-plugin-rdp:armel (1.4.11+dfsg-3) ...
Setting up remmina-plugin-rdp:armel (1.4.11+dfsg-3) ...



user@brain:~$ sudo apt show remmina-plugin-vnc
Package: remmina-plugin-vnc
Version: 1.4.11+dfsg-3
Priority: optional
Section: gnome
Source: remmina
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Installed-Size: 68.6 kB
Depends: libc6 (>= 2.28), libcairo2 (>= 1.6.0), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.26.0), libgtk-3-0 (>= 3.9.12), libvncclient1 (>= 0.9.10), remmina (= 1.4.11+dfsg-3)
Homepage: https://www.remmina.org/
Tag: role::plugin, uitoolkit::gtk
Download-Size: 31.1 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: VNC plugin for Remmina
 Remmina is a remote desktop client written in GTK+, aiming to be
 useful for system administrators and travellers, who need to work
 with lots of remote computers in front of either large monitors or
 tiny netbooks.
 .
 Remmina supports multiple network protocols in an integrated and
 consistent user interface.
 .
 Currently RDP, VNC, SPICE, WWW, NX, XDMCP, EXEC and SSH are supported.
 .
 This package contains the VNC plugin for Remmina.


user@brain:~$ sudo apt install remmina-plugin-vnc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  liblzo2-2 libvncclient1
The following NEW packages will be installed:
  liblzo2-2 libvncclient1 remmina-plugin-vnc
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 248 kB of archives.
After this operation, 501 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel liblzo2-2 armel 2.10-2 [48.5 kB]
Get:2 http://archive.debian.org/debian bullseye/main armel libvncclient1 armel 0.9.13+dfsg-2+deb11u1 [168 kB]
Get:3 http://archive.debian.org/debian bullseye/main armel remmina-plugin-vnc armel 1.4.11+dfsg-3 [31.1 kB]
Fetched 248 kB in 3s (89.2 kB/s)
Selecting previously unselected package liblzo2-2:armel.
(Reading database ... 45107 files and directories currently installed.)
Preparing to unpack .../liblzo2-2_2.10-2_armel.deb ...
Unpacking liblzo2-2:armel (2.10-2) ...
Selecting previously unselected package libvncclient1:armel.
Preparing to unpack .../libvncclient1_0.9.13+dfsg-2+deb11u1_armel.deb ...
Unpacking libvncclient1:armel (0.9.13+dfsg-2+deb11u1) ...
Selecting previously unselected package remmina-plugin-vnc:armel.
Preparing to unpack .../remmina-plugin-vnc_1.4.11+dfsg-3_armel.deb ...
Unpacking remmina-plugin-vnc:armel (1.4.11+dfsg-3) ...
Setting up liblzo2-2:armel (2.10-2) ...
Setting up libvncclient1:armel (0.9.13+dfsg-2+deb11u1) ...
Setting up remmina-plugin-vnc:armel (1.4.11+dfsg-3) ...
Processing triggers for libc-bin (2.31-13+deb11u11) ...
user@brain:~$

higan  マルチゲームコンソールエミュレータ(動作はするが遅すぎる)

gngb GAME BOY エミュレータ

libSDL2  ハードウェアへの低レベルアクセスを提供する開発ライブラリ

libSDL2は、オーディオ, キーボード, マウス, ジョイスティック, グラフィックハードウェアへの低レベルアクセスを提供する開発ライブラリです。(SDL – Simple DirectMedia Layer )

実はdebian11レポジトリに、libSDL2としてすでに登録されているのでAPT経由でインストール自体はできます。
$ sudo apt show libsdl2-2.0-0

ただし、APTでインストールしたものだと、Brainux上で動かないようです。
具体的には、libSDL2に依存するパッケージが”Illigal instruction”エラーで異常終了します。
パッケージが、libSDL2に依存しているかについては、以下のコマンドで確認できます。
sudo apt show <パッケージ名>

このため、今回はlibSDL2をBrainuxで動くように再構築する必要があります。

先達の方の記事を参考に、再構築します。

ビルドツール類をインストールします。
$ sudo apt update
$ sudo apt-get install g++ build-essential libsdl2-dev

libSDL2のソースをダウンロードします。
$cd
$sudo apt source libsdl2

そのままでは動かないので、ソースコードを修正します。
$ cd libsdl2-2.0.14+dfsg2/include
$ sudo cp -p SDL_atomic.h SDL_atomic.h.org
$ sudo vi SDL_atomic.h

SDL_atomic.hの184行目を以下の通り修正する。
(“|| defined(__ARM_ARCH_5TE__)”を消すせばいいとのことです。)

#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)

↓

#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)

SDL2の依存関係を解消して、ビルドします。
$ cd ~/libsdl2-2.0.14+dfsg2
$ sudo apt-get build-dep libsdl2
$ sudo dpkg-buildpackage

以下のようにエラーがでたら、修正のコミットが必要となります。

dpkg-source: info: local changes detected, the modified files are:
libsdl2-2.0.14+dfsg2/include/SDL_atomic.h
libsdl2-2.0.14+dfsg2/include/SDL_atomic.h.org
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/libsdl2_2.0.14+dfsg2-3+deb11u1.diff.sPjez4
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2

修正のコミットは以下のコマンドを実行します。
$ dpkg-source –commit

以下のように表示されるので、「Enter the desired patch name」はbrainと入力しています。
エディタが立ち上がったら、ctal-xで終了する

dpkg-source: info: local changes detected, the modified files are:
libsdl2-2.0.14+dfsg2/include/SDL_atomic.h
libsdl2-2.0.14+dfsg2/include/SDL_atomic.h.org
Enter the desired patch name: brain
dpkg-source: info: local changes have been recorded in a new patch: libsdl2-2.0.14+dfsg2/debian/patches/brain

再度、再構築コマンドを実行すると、延々とコンパイルが行われます。
(うちのBraiux環境[PW-SH3]で環境での実行では4.5時間ほどかかりました。Brainへの給電は必須です。)
$ dpkg-buildpackage

再構築が終わったら、1つ上のディレクトリにインストール用パッケージ(.deb)ファイルができているので、これをインストールします。
$ cd ..
$ sudo dpkg -i libsdl2-2.0-0_2.0.14+dfsg2-3+deb11u1_armel.deb
$ sudo dpkg -i libsdl2-dev_2.0.14+dfsg2-3+deb11u1_armel.deb

(以下3つは必要に応じてインストールしてください。)
$ sudo dpkg -i libsdl2-2.0-0-dbgsym_2.0.14+dfsg2-3+deb11u1_armel.deb
$ sudo dpkg -i libsdl2-dev-dbgsym_2.0.14+dfsg2-3+deb11u1_armel.deb
$ sudo dpkg -i libsdl2-doc_2.0.14+dfsg2-3+deb11u1_all.deb

これで、libSDL2に依存しているアプリケーションパッケージでも、”Illigal instruction”エラーが出なくなることを確認しました。(libSDL2に依存しているアプリケーションの再導入は不要です。)

ちなみに、再構築完了後に、以下のフォルダを確認すると、SDL2のテストプログラムが作成されていますので、確認できます。
~/libsdl2-2.0.14+dfsg2/debian/build-tests

試しにX11環境で”testgles2″ を実行してみたところ、2.20 frames per secondでした。

fceux ファミコンエミュレータ(動作は遅いです。->SDL1.2版では動きます。)

 

fceux 2.2.3 (SDL1.2版) ファミコンエミュレータ(音無しであれば実用的な速度で動作)

 

nestopia ファミコンエミュレータ(動作は遅いです。キー入力反応なし?)

openmsx  MSXエミュレータ(動作は遅い->SDL1.2版で現実的な速度に。)

openmsx 0.15 (SDL1.2版) インストール     2025/12/22追記

fMSX MSXエミュレータ(MSX1/2/2+)

java Java VMの開発実行環境 (非常に遅い)

Java VMの開発実行環境です。
開発環境インストール sudo apt install openjdk-11-jdk
実行環境インストール sudo apt install openjdk-11-jre

ただ、バージョン表示するだけでも1分程度かかる状況ですので、実用的ではないと思います。
一応、openjdk-11-demoパッケージの”Font2DTest.jar”を実行してみました。
X11上にFont2DTestのウィンドウ枠が出ることまでは確認しましたが、
あまりに遅くて諦めました。

user@brain:~$ java --version
openjdk 11.0.24 2024-07-16
OpenJDK Runtime Environment (build 11.0.24+8-post-Debian-2deb11u1)
OpenJDK Zero VM (build 11.0.24+8-post-Debian-2deb11u1, interpreted mode)
user@brain:~$



user@brain:~$ java -jar /usr/share/doc/openjdk-11-jre-headless/demo/jfc/Font2DTest/Font2DTest.jar

(2026/01/04追記)
BrainのCPUであるARM926EJ-Sのアーキテクチャはarmv5tejでjavaバイナリ実行支援である”Jazelle DBX命令(BXJ)”をサポートしているんだけど、この機能を利用できるJavaVMは現行のものではないみたい。

user@brain:~$ cat /proc/cpuinfo
Features : swp half thumb fastmult edsp java

過去のいくつかのJavaVMのバージョンで、Jazelle DBX命令を使えるものを探したのですが見つかりませんでした。

 

dosbox グラフィックス、サウンド、DOS を備えた x86 エミュレータ(Brainでは厳しい)

 

px68k X68000エミュレータ

  

xpenguins 小さなペンギンがウィンドウ上を動き回るデスクトップマスコットアプリ

XPenguins home page

ウィンドウの上をかわいい小さなペンギンが歩き回るX11アプリケーションです。
あと表示されているペンギンをクリックすると・・・・

インストールはApt経由で可能です。
sudo apt show xpenguins

X11環境で、Shellから”xpenguins &”で起動できます。

オプションで、いろいろ表示を指定できるのでぜひ試してみてください。
-n <ペンギンの数>でペンギンの数を増やしたり、–allでいろんなペンギン?を表示したりできますが、表示する数を増やすとさすがにちらつきます。ちらつきは、-m 150とかで軽減できるようです。

user@brain:~$ sudo apt show xpenguins
Package: xpenguins
Version: 2.2-11
Priority: optional
Section: games
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 1,139 kB
Depends: libc6 (>= 2.7), libx11-6, libxext6, libxpm4
Homepage: http://xpenguins.seul.org/
Tag: game::toys, interface::graphical, interface::x11, role::program,
 scope::utility, uitoolkit::xlib, use::entertaining, x11::screensaver
Download-Size: 172 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: little penguins walk on your windows
 Ever wanted cute little penguins walking along the tops of your
 windows? Ever wanted to send an army of cute little penguins to invade
 the screen of someone else on your network? Probably not, but why not
 try this program out anyway, it's cool!



user@brain:~$
user@brain:~$ sudo apt install xpenguins
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  xpenguins
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 172 kB of archives.
After this operation, 1,139 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel xpenguins armel 2.2-11 [172 kB]
Fetched 172 kB in 1s (131 kB/s)
Selecting previously unselected package xpenguins.
(Reading database ... 60135 files and directories currently installed.)
Preparing to unpack .../xpenguins_2.2-11_armel.deb ...
Unpacking xpenguins (2.2-11) ...
Setting up xpenguins (2.2-11) ...
Processing triggers for man-db (2.9.4-2) ...
user@brain:~$



user@brain:~$ xpenguins -h
XPenguins 2.2 (1 October 2001) by Robin Hogan
Usage: xpenguins [options]
Options:
  -d, --display        <display>    Send the penguins to specified display
  -m, --delay          <millisecs>  Set delay between frames
  -n, --penguins       <n>          Create <n> penguins (max 256)
  -q, --quiet                       Suppress all non-fatal messages
  -v, --version                     Show version information
  -h, --help                        Show this message
  -c, --config-dir     <dir>        Look for config files (and themes) in <dir>
  -p, --ignorepopups                Penguins ignore "popup" windows
  -r, --rectwin                     Regard shaped windows as rectangular
  -t, --theme          <theme>      Use named <theme>
  -l, --list-themes                 List available themes
  -i, --theme-info                  Describe a theme and exit (use with -t)
  -b, --no-blood                    Do not show any gory images
  -a, --no-angels                   Do not show any cherubim
  -s, --squish                      kill penguins with mouse
      --all                         Run all available themes simultaneously
      --random-theme                Choose a random theme
      --id             <window id>  Send penguins to window with this ID
      --nice           <ld1> <ld2>  Start killing penguins when load reaches
                                       <ld1>, kill all if load reches <ld2>
("--" can be replaced with "-" in all cases)
System data directory: /usr/share/xpenguins
user@brain:~$

user@brain:~$ xpenguins -l
Big Penguins
Bill
Classic Penguins
Penguins
Turtles

あと、テーマを追加することもできます。
オフィシャルページの右側の真ん中よりちょっと下にある、「XPenguins Themes」のところの
Source tarball:xpenguins_themes-1.0.tar.gz
ダウンロードして、解凍した後、themes以下の各フォルダを
/usr/share/xpenguins/themes/の下にコピーしてみてください。(要root権限)。
追加テーマは、なかなか攻めたラインナップとなっておりますのでぜひ試してみてください。

-l
 インストールされたテーマのリスト
-t “<テーマ名>”
 テーマを使用
–all
 すべてのテーマを利用。数が多い場合は -n 5 とかで数を制限しましょう

 

xmkmf Imakefile から Makefile を生成するためのツール

xmkmfは、X11アプリケーションがソース提供されているときに、コンパイルに必要な”Makefile”を環境に合わせて”Imakefiie”から作成してくれるツールです。

最近開発されたアプリケーションであれば、”configure”コマンドで環境に合わせて”Makefile”を作成してコンパイルすることも多いのですが、昔は”Imakefiie”を用意するアプリケーションも多かったのです。

インストールはApt経由で可能です。
sudo apt install xutils-dev

通常は、アプリケーションのソースディレクトリ(Imakefileがあるフォルダ)で以下のコマンドを実行します。
xmkmf

user@brain:~/xhime/xhime151/xhime1.51$ xmkmf
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
user@brain:~/xhime/xhime151/xhime1.51$

また、xmkmf -a のように -aオプションを付けると、
make Makefiles、make includes、make depend まで自動的に実行します。

user@brain:~/xhime/xhime151/xhime1.51$ xmkmf -a
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --      -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                              -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                   -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE  -DAUDIO_DEVICE=\"/dev/audio\"  -DMAILSPOOL_PATH=\"/usr/spool/mail/\" -DXHIMEDAT_PATH=\"/usr/lib/X11/xhime\" -DXSYSV_SIG   -- xhime.c
user@brain:~/xhime/xhime151/xhime1.51$

あとは、通常通り、以下でビルド&インストールです。
make
make install

インストールログ

user@brain:~/xhime/xhime151/xhime1.51$ sudo apt show xutils-dev
Package: xutils-dev
Version: 1:7.7+5+b1
Priority: optional
Section: x11
Source: xutils-dev (1:7.7+5)
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Installed-Size: 1,489 kB
Depends: libc6 (>= 2.7), cpp
Tag: devel::buildtools, devel::lang:c, devel::library, implemented-in::c,
 interface::commandline, role::devel-lib, role::program, scope::utility,
 works-with::software:source
Download-Size: 239 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: X Window System utility programs for development
 xutils-dev provides a set of utility programs shipped with the X Window System
 that do not require the X libraries; many of these programs are useful
 even on a system that does not have any X clients or X servers installed.
 .
 The programs in this package include:
  - imake, a C preprocessor interface to the make utility;
  - lndir, a tool that creates a shadow directory of symbolic links to
    another directory tree;
  - makedepend, a tool to create dependencies in makefiles;
  - makeg, a tool for making debuggable executables.
 .
 This package also lscontains xorg-macros.m4, a set of macros used in configure
 scripts of X.Org packages.



user@brain:~/xhime/xhime151/xhime1.51$ sudo apt install xutils-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  xutils-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 239 kB of archives.
After this operation, 1,489 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel xutils-dev armel 1:7.7+5+b1 [239 kB]
Fetched 239 kB in 1s (200 kB/s)
Selecting previously unselected package xutils-dev.
(Reading database ... 60570 files and directories currently installed.)
Preparing to unpack .../xutils-dev_1%3a7.7+5+b1_armel.deb ...
Unpacking xutils-dev (1:7.7+5+b1) ...
Setting up xutils-dev (1:7.7+5+b1) ...
Processing triggers for man-db (2.9.4-2) ...
user@brain:~/xhime/xhime151/xhime1.51$



user@brain:~/xhime/xhime151/xhime1.51$ xmkmf --help
usage:  /usr/bin/xmkmf [-a] [top_of_sources_pathname [current_directory]]
user@brain:~/xhime/xhime151/xhime1.51$

 

cmake CMakeLists.txtからMakefileを生成するためのツール

アプリケーションのソースを確認した際に、「CMakeLists.txt」があれば、
ここからビルド環境に合わせたMakefileを生成してビルドできます。

cmake コマンドは、apt経由でインストール可能です。

apt install cmake

ビルドは以下のような流れで実施できます。
mkdir build
cd build
cmake ..
cmake –build .
cmake –install

user@brain:~/oneko-git/oneko/build$ cmake ..
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/oneko-git/oneko/build

user@brain:~/oneko-git/oneko/build$ cmake --build .
Scanning dependencies of target oneko
[ 50%] Building C object CMakeFiles/oneko.dir/oneko.c.o
[100%] Linking C executable oneko
[100%] Built target oneko

 

インストールログ

user@brain:~$ apt show cmake
Package: cmake
Version: 3.18.4-2+deb11u1
Priority: optional
Section: devel
Maintainer: Debian CMake Team <pkg-cmake-team@lists.alioth.debian.org>
Installed-Size: 19.4 MB
Depends: cmake-data (= 3.18.4-2+deb11u1), procps, libarchive13 (>= 3.3.3), libc6 (>= 2.28), libcurl4 (>= 7.16.2), libexpat1 (>= 2.0.1), libgcc-s1 (>= 3.5), libjsoncpp24 (>= 1.9.4), librhash0 (>= 1.2.6), libstdc++6 (>= 9), libuv1 (>= 1.11.0), zlib1g (>= 1:1.2.3.3)
Recommends: gcc, make
Suggests: cmake-doc, ninja-build
Homepage: https://cmake.org/
Tag: devel::buildtools, implemented-in::c++, interface::commandline,
 interface::text-mode, role::program, scope::utility,
 uitoolkit::ncurses, works-with::software:source
Download-Size: 3,384 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: cross-platform, open-source make system
 CMake is used to control the software compilation process using
 simple platform and compiler independent configuration files. CMake
 generates native makefiles and workspaces that can be used in the
 compiler environment of your choice. CMake is quite sophisticated: it
 is possible to support complex environments requiring system
 configuration, pre-processor generation, code generation, and template
 instantiation.
 .
 CMake was developed by Kitware as part of the NLM Insight
 Segmentation and Registration Toolkit project. The ASCI VIEWS project
 also provided support in the context of their parallel computation
 environment. Other sponsors include the Insight, VTK, and VXL open
 source software communities.


user@brain:~$ apt install cmake
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
user@brain:~$ sudo apt install cmake
[sudo] password for user:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cmake-data libjsoncpp24 librhash0
Suggested packages:
  cmake-doc ninja-build
The following NEW packages will be installed:
  cmake cmake-data libjsoncpp24 librhash0
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 5,317 kB of archives.
After this operation, 29.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel cmake-data all 3.18.4-2+deb11u1 [1,725 kB]
Get:2 http://archive.debian.org/debian bullseye/main armel libjsoncpp24 armel 1.9.4-4 [66.9 kB]
Get:3 http://archive.debian.org/debian bullseye/main armel librhash0 armel 1.4.1-2 [141 kB]
Get:4 http://archive.debian.org/debian bullseye/main armel cmake armel 3.18.4-2+deb11u1 [3,384 kB]
Fetched 5,317 kB in 5s (1,066 kB/s)
Selecting previously unselected package cmake-data.
(Reading database ... 60811 files and directories currently installed.)
Preparing to unpack .../cmake-data_3.18.4-2+deb11u1_all.deb ...
Unpacking cmake-data (3.18.4-2+deb11u1) ...
Selecting previously unselected package libjsoncpp24:armel.
Preparing to unpack .../libjsoncpp24_1.9.4-4_armel.deb ...
Unpacking libjsoncpp24:armel (1.9.4-4) ...
Selecting previously unselected package librhash0:armel.
Preparing to unpack .../librhash0_1.4.1-2_armel.deb ...
Unpacking librhash0:armel (1.4.1-2) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.18.4-2+deb11u1_armel.deb ...
Unpacking cmake (3.18.4-2+deb11u1) ...
Setting up libjsoncpp24:armel (1.9.4-4) ...
Setting up librhash0:armel (1.4.1-2) ...
Setting up cmake-data (3.18.4-2+deb11u1) ...
Setting up cmake (3.18.4-2+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u11) ...
user@brain:~$

 

cbp2make Code::Blocks IDE project (.cbp)からMakefileを生成するためのツール(2025/12/13追加)

アプリケーションのソースを確認した際に、
「*.cbp」ファイル(Code::Blocks IDE project 、workspace files)があれば、
ここからMakefileを生成してビルドできます。

cbp2make コマンドは、apt経由でインストール可能です。

apt install cbp2make

 

アプリケーションのビルドは以下のような流れで実施できます。

cbp2make -in Projrct.cbp -out Makefile
make

make時にエラーが出た場合は、エラーに応じて対応してください。

例:allegro5ライブラリを利用していた場合、以下のように修正
LIB = -lallegro -lallegro_dialog -lallegro_image -lallegro_ttf -lallegro_audio -lallegro_acodec -lallegro_color -lallegro_font -lallegro_main -lallegro_memfile -lallegro_primitives

例:allegra4.4ライブラリを利用していた場合、以下のように修正
LIB = -lalleg

インストールは、make installでできるかもしれませんが、基本的にアプリによります。

user@brain:~$ cbp2make --help
Usage syntax:

        Generate makefile:
                cbp2make -in <project_file> [-cfg <configuration>] [-out <makefile>]
                         [-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
                         [--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
                         [--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]
                         [--macros-case keep|lower|upper] [--quote-path auto|never|always]
                cbp2make -list -in <project_file_list> [-cfg <configuration>]
                         [-unix] [-windows] [-mac] [--all-os] [-targets "<target1>[,<target2>[, ...]]"]
                         [--flat-objects] [--flat-objpath] [--wrap-objects] [--wrap-options]
                         [--with-deps] [--keep-objdir] [--keep-outdir] [--target-case keep|lower|upper]

                         [--macros-case keep|lower|upper] [--quote-path auto|never|always]
        Manage toolchains:
                cbp2make --config toolchain --add [-unix|-windows|-mac] -chain <toolchain>
                cbp2make --config toolchain --remove [-unix|-windows|-mac] -chain <toolchain>

        Manage build tools:
                cbp2make --config tool --add [-unix|-windows|-mac] -chain <toolchain>
                         -tool <tool> -type <type> <tool options>
                cbp2make --config tool --remove [-unix|-windows|-mac] -chain <toolchain>
                         -tool <tool>

        Tool types:      pp=preprocessor as=assembler cc=compiler rc=resource compiler
                         sl=static linker dl=dynamic linker el=executable linker
                         nl=native linker
        Tool options (common):
                         -desc <description> -program <executable> -command <command_template>
                         -mkv <make_variable> -srcext <source_extensions> -outext <output_extension>
                         -quotepath <yes|no> -fullpath <yes|no> -unixpath <yes|no>
        Tool options (compiler):
                         -incsw <include_switch> -defsw <define_switch> -deps <yes|no>
        Tool options (linker):
                         -ldsw <library_dir_switch> -llsw <link_library_switch> -lpfx <library_prefix>
                         -lext <library_extension> -objext <object_extension> -lflat <yes|no>

        Manage platforms:
                cbp2make --config platform [-unix|-windows|-mac] [-pwd <print_dir_command>]
                         [-cd <change_dir_command>] [-rm <remove_file_command>]
                         [-rmf <remove_file_forced>] [-rmd <remove_dir_command>]
                         [-cp <copy_file_command>] [-mv <move_file_command>]
                         [-md <make_dir_command>] [-mdf <make_dir_forced>]
                         [-make <default_make_tool>]

        Manage global compiler variables:
                cbp2make --config variable --add [-set <set_name>] -name <var_name>
                         [-desc <description>] [-field <field_name>] -value <var_value>
                cbp2make --config variable --remove [-set <set_name>] [-name <var_name>]
                         [-field <field_name>]

        Manage options:
                cbp2make --config options --default-options "<options>"
                cbp2make --config show

        Common options:
                cbp2make --local        // use configuration from current directory
                cbp2make --global       // use configuration from home directory
                cbp2make --verbose      // show project information
                cbp2make --quiet        // hide all messages
                cbp2make --help         // display this message
                cbp2make --version      // display version information

user@brain:~$

インストールログ

user@brain:~$ apt show cbp2make
Package: cbp2make
Version: 147+dfsg-4
Priority: optional
Section: devel
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Installed-Size: 400 kB
Depends: libc6 (>= 2.4), libgcc-s1 (>= 3.5), libstdc++6 (>= 5.2), libtinyxml2.6.2v5
Homepage: https://sourceforge.net/projects/cbp2make/
Download-Size: 115 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Makefile generation tool for the Code::Blocks IDE
 cbp2make is a stand-alone build tool that allows you
 to generate makefile(s) for GNU Make out of Code::Blocks
 IDE project or workspace files.

user@brain:~$ sudo apt install cbp2make
[sudo] password for user:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  cbp2make
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 115 kB of archives.
After this operation, 400 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel cbp2make armel 147+dfsg-4 [115 kB]
Fetched 115 kB in 1s (91.0 kB/s)
Selecting previously unselected package cbp2make.
(Reading database ... 92070 files and directories currently installed.)
Preparing to unpack .../cbp2make_147+dfsg-4_armel.deb ...
Unpacking cbp2make (147+dfsg-4) ...
Setting up cbp2make (147+dfsg-4) ...
Processing triggers for man-db (2.9.4-2) ...

ser@brain:~$ cbp2make -in Bomberman.cbp -out Makefile
Starting cbp2make rev.147...
Using default configuration.
Loading file 'Bomberman.cbp': [DONE]
Generating makefile(s): Makefile: [DONE]
user@brain:~$

 

oneko X11猫(X11上で動作するマウスカーソルを追いかける猫を表示するデスクトップマスコット)

onelo(X11猫)は11上で動作するマウスカーソルを追いかける猫を表示するデスクトップマスコットです。

キャラがマウスカーソルが変化したネズミを追いかけて、追いつくと特定のアクションをしたのちに、眠りにつきます。

標準はマウスを追いかけるネコですが、オプションでいろいろなキャラに変更できます。
(ネコ、トラ、イヌ、BSDデーモン、(ccさくら)さくら、(ccさくら)知世)

上記公式サイトから、以下をダウンロードして、brainux上で解凍してインストールします。
current version for X Window System – [oneko-1.2.sakura.5.tar.gz]

マニュアルにも書いてありますが、Imakefileがありますのでxmkmf にて環境に合わせたMakefaileを生成して、ビルドします。

ビルド&インストール
tar xvf oneko-1.2.sakura.5.tar.gz
cd oneko-1.2.sakura.5
xmkmf -a
make
sudo make install

上記スクリーンショットは、oneko –tomoyo& を起動した後で、oneko –sakura& を起動した場合です。
すると、マウスカーソル(カード)を追いかける桜に知世がカメラを向けるというカオス原作再現な状況にできます。

インストールログ

user@brain:~/oneko$ tar xvf oneko-1.2.sakura.5.tar.gz
user@brain:~/oneko$ cd oneko-1.2.sakura.5


user@brain:~/oneko/oneko-1.2.sakura.5$ xmkmf -a
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --      -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                               -D_POSIX_SOURCE -D_XOPEN_SOURCE        -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                           -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE   -- oneko.c



user@brain:~/oneko/oneko-1.2.sakura.5$ make
gcc -g -O2 -fno-strict-aliasing         -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                           -D_POSIX_SOURCE -D_XOPEN_SOURCE                                 -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                   -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE    -c -o oneko.o oneko.c
In file included from /usr/include/arm-linux-gnueabi/sys/types.h:25,
                 from /usr/include/X11/Xlib.h:38,
                 from oneko.h:11,
                 from oneko.c:9:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
oneko.c:338:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  338 | GetResources()
      | ^~~~~~~~~~~~
oneko.c:437:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  437 | MakeMouseCursor()
      | ^~~~~~~~~~~~~~~
oneko.c:466:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  466 | SetupColors()
      | ^~~~~~~~~~~
oneko.c: In function ‘InitScreen’:
oneko.c:627:8: warning: extra tokens at end of #endif directive [-Wendif-labels]
  627 | #endif SHAPE
      |        ^~~~~
oneko.c: In function ‘Interval’:
oneko.c:745:5: warning: implicit declaration of function ‘pause’ [-Wimplicit-function-declaration]
  745 |     pause();
      |     ^~~~~
oneko.c: In function ‘DrawNeko’:
oneko.c:812:8: warning: extra tokens at end of #endif directive [-Wendif-labels]
  812 | #endif SHAPE
      |        ^~~~~
rm -f oneko
gcc -o oneko -g -O2 -fno-strict-aliasing       oneko.o -lXext -lX11   -lm
rm -f oneko._man
if test -z "true" ; then \
   cd `dirname oneko` && \
   ln -s `basename oneko.man` `basename oneko._man`; \
else \
             cpp -undef -traditional  -D__apploaddir__=/etc/X11/app-defaults -D__filemansuffix__=5x -D__osfilemansuffix__=5 -D__libmansuffix__=3x -D__oslibmansuffix__=3 -D__mansuffix__=1x -D__osmansuffix__=1 -D__syscallmansuffix__=2x -D__ossysmansuffix__=2 -D__gamemansuffix__=6x -D__osgamemansuffix__=6 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__admmansuffix__=8x -D__osadmmansuffix__=8 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__drivermansuffix__=4x -D__osdrivermansuffix__=4 -D__adminmansuffix__=8 -D__projectroot__=/usr -D__xconfigfile__=xorg.conf -D__xconfigdir__=/usr/lib/X11 -D__xlogfile__=Xorg -D__xservername__=Xorg -D__appmansuffix__=1x -D__xorgversion__="\"`echo 7 7 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`\" \"X Version 11\"" -D__vendorversion__="`echo 7 7 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` X.Org"  \
     < oneko.man | sed -e '/^#  *[0-9][0-9]*  *.*$/d'                   -e '/^#line  *[0-9][0-9]*  *.*$/d'                      -e '/^[         ]*XCOMM$/s/XCOMM/#/'                    -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/'       -e '/^[  ]*XHASH/s/XHASH/#/'                     -e '/\@\@$/s/\@\@$/\\/' >oneko._man; \
fi



user@brain:~/oneko/oneko-1.2.sakura.5$ sudo make install
[sudo] password for user:
install -c   oneko /usr/bin/oneko
install in . done
user@brain:~/oneko/oneko-1.2.sakura.5$



user@brain:~$ oneko --help
oneko: Unknown option "--help".
Usage: oneko [<options>]

Options are:
-display <display>      : Neko appears on specified display.
-fg <color>             : Foreground color
-bg <color>             : Background color
-speed <dots>
-time <microseconds>
-idle <dots>
-name <name>            : set window name of neko.
-towindow               : Neko chases selected window.
-toname <name>          : Neko chases specified window.
-tofocus                : Neko runs on top of focus window
-rv                     : Reverse video. (effects monochrome display only)
-position <geometry>   : adjust position relative to mouse pointer.
-debug                 : puts you in synchronous mode.
-patchlevel            : print out your current patchlevel.
-neko Use neko bitmaps
-tora Use tora bitmaps
-dog Use dog bitmaps
-bsd_daemon Use bsd_daemon bitmaps
-sakura Use sakura bitmaps
-tomoyo Use tomoyo bitmaps
user@brain:~$

なお、GittHubにも同じバージョンとも思われるソースが上がっていますので、こちらからもインストールできます(見た感じソースやドキュメントの文字コードが変更されているだけのようです)。
ですが、Imakefileが入っていないので、先ほどの手順ではビルドできません。
README.md ドキュメントの通り、clangツールを使用してコンパイルするか、
Imakefileの代わりにCMakeLists.txtがありますので、cmakeコマンドでインストール可能です。(こちらのソースの場合、システムへのインストールは手動になるようです。)

 

macopix アクティブウィンドウに座るマスコットプログラム

MaCoPiXは、UNIX系OS(要X Window System)、Microsoft Windows(7以降)、macOS(10.9以降)で動作するマスコットプログラムです。

キャラクターは、マスコットデータ(おすわりマスコット)に登録されたメッセージやしぐさでランダムに動きます。
公式ページにあるキャラクターデータは、2003-2007年公開当時の人気キャラクター関係が多数登録されています。
([はやて×ブレード] [マリみて] [秋桜] [みずいろ] [Pia2] [月姫] [とらハ] [こみパ] [Kanon] [ONE])

公式ページ

インストールは、APT経由で可能です。
(データは新規サイトのものであれば、アプリからダウンロード可能)

sudo apt install macopix

以下のコマンドで起動が可能です。マスコットデータは、~/.macopix/に保存されている .mcpx ファイルになります。

macopix <マスコットデータ名> &

今回は公式データの中から、現状おそらく唯一の現役キャラであると思われる「高町なのは」を召喚します。

「高町なのは」は、「とらいあんぐるハート」グループにいますのでこちらのマスコットデータをダウンロードして設定します。
注)「魔法少女リリカルなのは」はもうすぐ新作TVシリーズも始まるTVシリーズ3作、映画4作やスピンオフ作品まで出ている人気作ですが、元もは大人向けゲームのファンディスクでのパロディ企画企画から派生したスピンオフ作品です(現在で元ネタよりも有名な作品となっているものの1つ)。

マスコットを右クリックして、Mascot Launcherで「とらいあんぐるハート1・2・3」から「高町なのは」を選択します。
このままだとコメントが文字化け(□)しますが、そこは設定変更で対応できます。

ただし、コンフィグ画面が大きいので、BrainのX画面では設定変更できないので、
PC等のX11画面上のターミナルから、
ssh -X <BrainuxのIPアドレス>

で、Brainuxにアクセスして、macopix &で起動します。
あとはマスコットを右クリックして、Configから「Resource」->「Font/Color」画面で、
「Default for Clock」と「Default for Balloon」のフォントを日本語文字列対応の「IPAGithic Regular」あたりに変更します。

その他の設定部分も必要に応じて変更してください。
もしこれでダメな場合は、Macotのほうのフォントも変更してみてください。

(かなり細かい調整ができますので、公式ページを参考にしてください。)

設定を変更したら、右下の「OK」をクリックして設定画面を終了させます。
あらためてマスコットを右クリックして、「Save」->「Save all」で保存します。

これで次回起動時に反映されますが、
起動方法のところで書いた通り、起動時のマスコット指定だけは毎回起動時オプションに指定が必要です。

インストールログ

user@brain:~$ apt show macopix
Package: macopix
Version: 3.4.0+dfsg.1-3
Priority: optional
Section: games
Maintainer: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Installed-Size: 4,962 kB
Depends: libc6 (>= 2.28), libcairo2 (>= 1.10.0), libgdk-pixbuf-2.0-0 (>= 2.25.2), libglib2.0-0 (>= 2.35.9), libgtk-3-0 (>= 3.21.5), libpango-1.0-0 (>= 1.14.0), libssl1.1 (>= 1.1.0), libx11-6
Breaks: macopix-gtk2 (<< 3.4.0-1)
Replaces: macopix-gtk2 (<< 3.4.0-1)
Homepage: http://rosegray.sakura.ne.jp/macopix/
Tag: uitoolkit::gtk
Download-Size: 381 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Mascot Constructive Pilot for X
 MaCoPiX (Mascot Constructive Pilot for X) is a desktop mascot application for
 UNIX / X Window system. You can make window sitters, fixed desktop mascots,
 and, furthermore, desktop clock mascots, using MaCoPiX.



user@brain:~$ sudo apt install macopix
[sudo] password for user:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  macopix
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 381 kB of archives.
After this operation, 4,962 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel macopix armel 3.4.0+dfsg.1-3 [381 kB]
Fetched 381 kB in 1s (377 kB/s)
Selecting previously unselected package macopix.
(Reading database ... 63691 files and directories currently installed.)
Preparing to unpack .../macopix_3.4.0+dfsg.1-3_armel.deb ...
Unpacking macopix (3.4.0+dfsg.1-3) ...
Setting up macopix (3.4.0+dfsg.1-3) ...
Processing triggers for man-db (2.9.4-2) ...
user@brain:~$



(macopix:2313): Gtk-WARNING **: 15:50:50.278: cannot open display:
user@brain:~$ macopix --help
 macopix : Mascot Constructive Pilot for X   Ver3.4.0
  [usage] % macopix [options] (mascot file)
     -h, --help               : Print this message
     -c, --common-dir         : Print COMMON Directory
     -b, --biff               : Turn on the biff function
     -s, --signal             : Turn on the time signal
     -o, --offset offset[%]   : Set offset-value for Focus Following
     -r, --rcfile rc-file     : Set the resource file
     -m, --menu   menu-file   : Set the file for quick menu
     -mg --mag    magnify     : Set magnification percentage of mascot
     -i, --ip-style (0|1|2|3) : Set interpolation style for magnification
## For Installation
     -a, --auto-install       : Set mascot auto install ON
     -na --no-auto-install    : Set mascot auto install OFF
     -O, --over-write         : Permit to overwrite files in user dir
     --install-user-mascot (mascot)  : Mascot Installation to User Dir.
     --install-user-menu (menu)      : Menu Installation to User Dir.
     --install-common-mascot (mascot): Mascot Installation to Common Dir.
     --install-common-menu (menu)    : Menu Installation to Common Dir.
## For Socket Message
     --sockmsg                : Start MaCoPiX as Socket Message Receiver
     --message (text)         : Send Message to Socket Message Receiver
     --message-expire (time)  : Socket Message Expire Time[ms]
     --message-type-lump      : Force to Set Lump Sum Balloon
     --message-type-step      : Force to Set Stepping Balloon
     --message-step (frame)   : Stepping Interval Frame for SockeMsg
     -nc, --no-duet-click     : Duet Animation [Click] OFF
     -nr, --no-duet-random    : Duet Animation [Random] OFF

 ================== Installed Menus ==================
   !!! Common Directory - /usr/share/macopix/ - does not exist.

  !!! User Directory - /home/user/.macopix/ - does not exist.
user@brain:~$

 

Emi Clock  美少女コスプレ時計 Emi Clock

美少女コスプレ時計 Emi Clockは古のジョーク時計アプリです。
種類のかわいい文字盤と、26種類の衣装を選ぶことができるコスプレ時計です

公式サポートページ

X11版のソースコートのダウンロード先が公式ページからリンクされていますので、
こちらからダウンロードできます。

X11版 Emi Clock 2.0.2 
emiclock-2.0.2.tar.gz

インストールは、以下のような流れで行えます。
Imakefileがありますのでxmkmf にて環境に合わせたMakefaileを生成して、ビルドします。

cd
mkdir emiclock
cd emiclock/

wget https://ftp.vector.co.jp/11/78/1347/emiclock-2.0.2.tar.gz
tar zxvf emiclock-2.0.2.tar.gz
cd emiclock-2.0.2

xmkmf -a
make
sudo make install

ただうちの環境では、makeinstallすると、メニューの2段階目以降が表示されなくなりましたので、以下のリソースファイルをリネームして暫定で回避しています。

/etc/X11/app-defaults/EmiClock

/etc/X11/app-defaults/EmiClock.bk

インストールログ

user@brain:~$ mkdir emiclock
user@brain:~$ cd emiclock/

user@brain:~/emiclock$ wget https://ftp.vector.co.jp/11/78/1347/emiclock-2.0.2.tar.gz
--2025-11-30 16:55:04--  https://ftp.vector.co.jp/11/78/1347/emiclock-2.0.2.tar.gz
Resolving ftp.vector.co.jp (ftp.vector.co.jp)... 141.147.176.138
Connecting to ftp.vector.co.jp (ftp.vector.co.jp)|141.147.176.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 308682 (301K) [application/gzip]
Saving to: ‘emiclock-2.0.2.tar.gz’
emiclock-2.0.2.tar. 100%[===================>] 301.45K  1.13MB/s    in 0.3s
2025-11-30 16:55:05 (1.13 MB/s) - ‘emiclock-2.0.2.tar.gz’ saved [308682/308682]
user@brain:~/emiclock$


user@brain:~/emiclock$ tar zxvf emiclock-2.0.2.tar.gz
emiclock-2.0.2/
emiclock-2.0.2/00.README
~
emiclock-2.0.2/sys/netaudio/audio.c
user@brain:~/emiclock$


user@brain:~/emiclock$ cd emiclock-2.0.2


user@brain:~/emiclock/emiclock-2.0.2$ xmkmf -a
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --      -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                               -D_POSIX_SOURCE -D_XOPEN_SOURCE        -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                           -DFUNCPROTO=15 -DNARROWPROTO      -- main.c EmiClock.c menu.c gengine.c        gdata_cbase.c gdata_char.c gdata_cmono.c credit.c credit_mono.c        sound.c rcfile.c misc.c CascadeMenu.c version.c
user@brain:~/emiclock/emiclock-2.0.2$


uuser@brain:~/emiclock/emiclock-2.0.2$ make
rm -f main.o
gcc -c -g -O2 -fno-strict-aliasing         -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                                -D_POSIX_SOURCE -D_XOPEN_SOURCE                                 -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                           -DFUNCPROTO=15 -DNARROWPROTO     -DSIGTYPE=void main.c
In file included from /usr/include/arm-linux-gnueabi/sys/types.h:25,
                 from /usr/include/X11/Xlib.h:38,
                 from /usr/include/X11/Intrinsic.h:53,
                 from main.c:44:
~
fi
user@brain:~/emiclock/emiclock-2.0.2$


user@brain:~/emiclock/emiclock-2.0.2$ sudo make install
[sudo] password for user:
install -c   emiclock /usr/bin/emiclock
cp resources/Xaw/EmiClock.ad .
install -c -m 0444 EmiClock.ad /etc/X11/app-defaults/EmiClock
install in . done
user@brain:~/emiclock/emiclock-2.0.2$


user@brain:~/emiclock/emiclock-2.0.2$ ./emiclock --help
./emiclock: Unknown command line option "--help".
Usage: ./emiclock [options]
        -toolkitoption ...
        -nossound
        -nosave
        -noscache
        -noshape
        -perfect
        -grayscale
        -gray4
        -mono
        -help
        -version
user@brain:~/emiclock/emiclock-2.0.2$

xhime 常駐姫ちゃん (X11上で動作するデスクトップマスコット的なアニメーションソフト)

xhimeはX11上で動作するデスクトップマスコット的なアニメーションソフトです。
常駐姫ちゃんとも呼ばれています。(オリジナルはPC98版で、それをX11に移植したものですす。)
(「姫ちゃんのリボン」という昔のアニメのキャラクターをモデルにしたスクトップマスコットです。)

インストールは、aptなどでのインストールはできず、ソースからコンパイルする必要があります。
xhime – 常駐姫ちゃん X Window System 版 – からソース アーカイブを入手し、
解凍したものをBrainxに転送して、コンパイルするのですが、
まずは Imakefileから Makefileを生成します。
xmkmf -a

user@brain:~/xhime/xhime151/xhime1.51$ xmkmf -a
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --      -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                              -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                   -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE  -DAUDIO_DEVICE=\"/dev/audio\"  -DMAILSPOOL_PATH=\"/usr/spool/mail/\" -DXHIMEDAT_PATH=\"/usr/lib/X11/xhime\" -DXSYSV_SIG   -- xhime.c

In file included from xhime.c:28:
/usr/lib/gcc/arm-linux-gnueabi/10/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
    4 | #error "GCC no longer implements <varargs.h>."
      |  ^~~~~
/usr/lib/gcc/arm-linux-gnueabi/10/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>."
    5 | #error "Revise your code to use <stdarg.h>."
      |  ^~~~~
user@brain:~/xhime/xhime151/xhime1.51$

エラーになりました。
非常に古いソフトウェアなので、ソースの修正が必要なようです。

理由は、現在非推奨になっている”varargs.h”というヘッダファイルを使っていて、
最新の環境ではコンパイルできないためです。

このため以下の部分を修正します。(varargs.hをstdarg.hに変更する関係で、該当するソース部分も変更する必要があります。)

28行目付近

include <varargs.h>

include <stdarg.h>

 
118行付近

void
Error(va_alist)
va_dcl
{
va_list args;
char *fmt;

fprintf(stderr, "%s: ", ProgramName);

va_start(args);
fmt = (char *)va_arg(args, char *);
vfprintf(stderr, fmt, args);
va_end(args);

fprintf(stderr, "\n");
}

void
ErrorExit(va_alist)
va_dcl
{
va_list args;
char *fmt;

fprintf(stderr, "%s: ", ProgramName);

va_start(args);
fmt = (char *)va_arg(args, char *);
vfprintf(stderr, fmt, args);
va_end(args);

fprintf(stderr, "\n");
exit(1);
}

void Error(const char *fmt, …)
{
    va_list args;
    fprintf(stderr, "%s: ", ProgramName);
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");
}

void ErrorExit(const char *fmt, …)
{
    va_list args;
    fprintf(stderr, "%s: ", ProgramName);
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");
    exit(1);
}

改めて、コンパイルします。
(Makeでワーニングが出てますが、まずはコンパイルを目指します。)
xmkmf -a
make
make install

実行は ”xhime &” でマスコット(姫ちゃん)が表示されます。

マウスの左ボタンで移動ができます。右ボタンで終了します。 中央のボタンを押すと、表示ウィンドウを一番上に(Raise)します。 デフォルトでは Return キーに反応してアニメーションが変化します。

が、Returnキーを押しても、アニメーション(いけいけGoGOジャーンプ)してくれません。
コンパイル時のワーニング部分にキー入力判別のあたりがあるのでこの辺は後日対応したいですね。(warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations])

xhime -use_vm &  で起動すると、姫ちゃんの周りにウィンドウ枠が表示されますが、
その中であればEnterキーに反応しますので、動作確認にどうぞ。

(2026/1/17追記)
xtermからxhimeを起動したところ、Enterキーに反応しました。
Brainux標準のlxterminal から起動すると反応しないので、
何か条件があるのかもしれません。

 

インストールログ

user@brain:~/xhime/xhime151/xhime1.51$ xmkmf -a
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --      -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L                              -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                   -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE  -DAUDIO_DEVICE=\"/dev/audio\"  -DMAILSPOOL_PATH=\"/usr/spool/mail/\" -DXHIMEDAT_PATH=\"/usr/lib/X11/xhime\" -DXSYSV_SIG   -- xhime.c


user@brain:~/xhime/xhime151/xhime1.51$ make
gcc -g -O2 -fno-strict-aliasing         -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L          -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                   -DFUNCPROTO=15 -DNARROWPROTO   -DSHAPE  -DAUDIO_DEVICE=\"/dev/audio\"  -DMAILSPOOL_PATH=\"/usr/spool/mail/\" -DXHIMEDAT_PATH=\"/usr/lib/X11/xhime\" -DXSYSV_SIG    -c -o xhime.o xhime.c
In file included from /usr/include/arm-linux-gnueabi/sys/types.h:25,
                 from /usr/include/X11/Xlib.h:38,
                 from xhime.c:13:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
xhime.c: In function ‘CheckEvent’:
xhime.c:944:3: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
  944 |   XKeycodeToKeysym(MyDisplay, event.xkey.keycode, ix) );
      |   ^~~~~~~~~~~~~~~~
In file included from xhime.c:13:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 1687 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
xhime.c:946:7: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
  946 |       if (XKeycodeToKeysym(MyDisplay, event.xkey.keycode, ix) == ActionKeysym){
      |       ^~
In file included from xhime.c:13:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 1687 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
xhime.c: In function ‘ResetChild’:
xhime.c:1333:3: warning: implicit declaration of function ‘wait’ [-Wimplicit-function-declaration]
 1333 |   wait(&stat);
      |   ^~~~
xhime.c: In function ‘OpenData’:
xhime.c:411:31: warning: ‘strncat’ specified bound 256 equals destination size [-Wstringop-overflow=]
  411 |    if (STR_TAIL(path) != '/') strncat(path, "/", sizeof(path));
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xhime.c: In function ‘GetMailPath’:
xhime.c:581:36: warning: ‘strncat’ specified bound 256 equals destination size [-Wstringop-overflow=]
  581 |     if (STR_TAIL(MailPath) != '/') strncat(MailPath, "/", sizeof(MailPath));
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xhime.c: In function ‘OpenData.part.0’:
xhime.c:412:4: warning: ‘strncat’ specified bound 256 equals destination size [-Wstringop-overflow=]
  412 |    strncat(path, fname, sizeof(path));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xhime.c:419:4: warning: ‘strncat’ specified bound 256 equals destination size [-Wstringop-overflow=]
  419 |    strncat(path, fname, sizeof(path));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xhime.c: In function ‘GetMailPath’:
xhime.c:582:5: warning: ‘strncat’ specified bound 256 equals destination size [-Wstringop-overflow=]
  582 |     strncat(MailPath, (char *)getenv("USER"), sizeof(MailPath));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rm -f xhime
gcc -o xhime -g -O2 -fno-strict-aliasing       xhime.o -lXext -lX11   -lm
user@brain:~/xhime/xhime151/xhime1.51$



user@brain:~/xhime/xhime151/xhime1.51$ sudo make install
[sudo] password for user:
install -c   xhime /usr/bin/xhime
+ mkdir -p /usr/lib/X11/xhime
+ install -c -m 0444 rh110.xhm /usr/lib/X11/xhime
install in . done
user@brain:~/xhime/xhime151/xhime1.51$



user@brain:~/xhime/xhime151/xhime1.51$ xhime --help
xhime version 1.51 by `Shochan' Shoichi-NAKAYAMA (C) 1994-1996,1998
  Original: `rhime.exe' by MSP-Iris (C) 1994
usage: xhime [<options>] [<filename.xhm>]
  options are:
    -help              Print usage message and exit
    -display <host:n>  Specify the host and display number
    -geometry <+X+Y>   Specify the geometry
    -key <keyname>     Specify the keysym of the special key
    -nokey             Don't check for the special key
    -noshape           Don't use shape extension
    -bg <color>        Specify the background color
    [-N | -B | -D]     Draw in normal, brighter, or darker colors
    -<statenumber>     Specify the action state
    -use_wm            Use window manager
    -audio <audiofile> Specify audio file
     [-audev <dev>|-aucmd <cmd>]
                        Specify audio device or command
     -showaudio         the same as ``-aucmd showaudio''
    -biff              Enable biff feature
     -file <mailfile>   Specify the mail file
     -update <sec>      Specify the mail polling interval
     -nobell            Don't ring the bell when mails arrive

 

xfishtank X のルートで様々な熱帯魚が泳ぐ壁紙上の水槽が楽しめます。

X のルートを水槽にして、様々な熱帯魚が泳ぐ壁紙上の水槽を楽しめます。

インストールは、APT経由で可能です

sudo apt instsll xfishtank

実行は、” xfishtank & “で起動できます。
デフォルトでは、泡の数:32、魚の数:10です。
必要であれば、オプションで、変更できます。
 

インストールログ

user@brain:~$ apt show xfishtank
Package: xfishtank
Version: 2.5-1+b1
Priority: optional
Section: games
Source: xfishtank (2.5-1)
Maintainer: Marius Gavrilescu <marius@ieval.ro>
Installed-Size: 449 kB
Depends: libc6 (>= 2.10), libimlib2 (>= 1.4.5), libx11-6
Homepage: http://jim.rees.org/computers/xfishtank.html
Tag: game::toys, interface::graphical, interface::x11, role::program,
 scope::utility, uitoolkit::xlib, use::entertaining, x11::screensaver
Download-Size: 77.7 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: turns your X root into an aquarium
 Enjoy an animated aquarium background with a variety of tropical fish
 swimming in it on your screen.




user@brain:~$ sudo apt install xfishtank
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libid3tag0 libimlib2
The following NEW packages will be installed:
  libid3tag0 libimlib2 xfishtank
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 293 kB of archives.
After this operation, 1,129 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libid3tag0 armel 0.15.1b-14 [29.9 kB]
Get:2 http://archive.debian.org/debian bullseye/main armel libimlib2 armel 1.7.1-2+deb11u1 [185 kB]
Get:3 http://archive.debian.org/debian bullseye/main armel xfishtank armel 2.5-1+b1 [77.7 kB]
Fetched 293 kB in 2s (125 kB/s)
Selecting previously unselected package libid3tag0:armel.
(Reading database ... 73715 files and directories currently installed.)
Preparing to unpack .../libid3tag0_0.15.1b-14_armel.deb ...
Unpacking libid3tag0:armel (0.15.1b-14) ...
Selecting previously unselected package libimlib2:armel.
Preparing to unpack .../libimlib2_1.7.1-2+deb11u1_armel.deb ...
Unpacking libimlib2:armel (1.7.1-2+deb11u1) ...
Selecting previously unselected package xfishtank.
Preparing to unpack .../xfishtank_2.5-1+b1_armel.deb ...
Unpacking xfishtank (2.5-1+b1) ...
Setting up libid3tag0:armel (0.15.1b-14) ...
Setting up libimlib2:armel (1.7.1-2+deb11u1) ...
Setting up xfishtank (2.5-1+b1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u11) ...



user@brain:~$ xfishtank --help
xfishtank: invalid option -- '-'
usage: xfishtank
                [-c color]  background color
                [-b limit]  number of bubbles (default 32)
                [-f limit]  number of fish (default 10)
                [-i mult]   move interval (default 0.2)
                [-r rate]   move frequency (default 0.2)
                [-m num]    median cut to this many colors
                [-C num]    use only this many color cells
                [-d]        clip fish, swim on root window
                [-p file]   fish swim on picture in file
                [host:display]
user@brain:~$

 

xfireworks Xのルートウィンドウ上で花火が打ちあがります

XFireworks は、X のルートウィンドウで花火大会を開催します。
これは、日本語の “花火大会” の模倣です。 日本で夏に行われる上に有名なイベントであり、川辺で行われます。花火の種類も豊富で,とってもきれいです.

起動は、「xfireworks &」です。
「xfireworks -no-direct-draw &」で起動すると花火の動きがスムーズになる気がするけど、
安定しているのは、「xfireworks &」のほうな気もします。

オプションで、打ち上げ頻度や残像の残り方などのパラメータが変更できるようで、
好みにあわせてみてください(詳細は、man xfireworksを参照してください。)

インストールは、APT経由で可能です

sudo apt instsll xfireworks

 

XMascot Xの画面上で揺れるマスコットを表示する プログラム (2025/12/14追加)

XMascot のページ

XMascot は、X Window System の画面上に可愛いマスコットを表示する プログラムです。
重力加速度と鎖の長さから振り子運動を計算して、マスコットを揺らしてくれます。
標準の重力加速度は 0.17G(地球加速度の1/6,月面上と同じ)、減衰係数0.01です。
調整すると、揺れ方が変わります。

詳しくは、公式ページのFAQをご確認ください。

標準では、動物シリーズ(10種類)、星座シリーズ(12種類)のキャラクターが用意されています。

また、このアプリ公開当時はいくつかの外部データが公開されていたのですが、
ページごと消えているところも多く、現時点で探してみると以下の2つが見つかりました。
「同級生2」マスコット
「下級生」マスコットのページ

インストールは、aptなどでのインストールはできず、ソースからコンパイルする必要があります。今回は、追加データも含めてインストールしてみます。
途中、そのままではエラーになるので、文字コードの変換やソースなどの一部変更等を行っています。

$ cd
$ mkdir XMascot
$ cd XMascot
$ wget https://cclub-flying.dsl.gr.jp/products/xmascot/xmascot2.6a.tar.gz
$ wget https://cclub-flying.dsl.gr.jp/products/xmascot/dokyu2/dokyu2mas.tar.gz
$ wget https://cclub-flying.dsl.gr.jp/~sage/bin/kakyumas.tar.gz

$ tar zxvf xmascot2.6a.tar.gz
$ cd xmascot2.6a
$ cd mascots
$ tar zxvf ../../dokyu2mas.tar.gz
$ mv dokyusei2 dokyu2
$ mkdir kakyu
$ cd kakyu
$ tar zxvf ../../../kakyumas.tar.gz
$ cd ../../

$ find ./ -type f -not -name ‘.gif’ -not -name ‘.mag’ -not -name ‘.au’ -not -name ‘.raw’ | xargs -i nkf -w -Lu –overwrite {};

$ vi Imakefile

XMascot.ad:: XMascot.ad.sed
sed ‘s!SOUND_COMMAND_NAME!$(SOUND_COMMAND)!;s!XMASDIR!$(XMASDIR)!’ XMascot.ad.sed > $@
sed ‘s!menu1!menu1!’ mascots/zodiac/zodiac.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu2!’ mascots/dokyu2/dokyu2.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu3!’ mascots/nadesico/nadesico.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu4!’ mascots/kakyu/kakyu.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu5!’ mascots/eva/eva.Xdefaults >> $@

XMascot.ad:: XMascot.ad.sed
sed ‘s!SOUND_COMMAND_NAME!$(SOUND_COMMAND)!;s!XMASDIR!$(XMASDIR)!’ XMascot.ad.sed > $@
sed ‘s!menu1!menu1!’ mascots/zodiac/zodiac.Xdefaults >> $@
sed ‘s!menu1!menu2!’ mascots/dokyu2/dokyu2.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu3!’ mascots/nadesico/nadesico.Xdefaults >> $@
sed ‘s!menu1!menu4!’ mascots/kakyu/kakyu.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu5!’ mascots/eva/eva.Xdefaults >> $@

——————-

japanese/XMascot.ad:: japanese/XMascot.ad.sed
sed ‘s!SOUND_COMMAND_NAME!$(SOUND_COMMAND)!;s!XMASDIR!$(XMASDIR)!’ japanese/XMascot.ad.sed > $@
sed ‘s!menu1!menu1!’ mascots/zodiac/zodiac.Xdefaults.jp >> $@
XCOMM sed ‘s!menu1!menu2!’ mascots/dokyu2/dokyu2.Xdefaults.jp >> $@
XCOMM sed ‘s!menu1!menu3!’ mascots/nadesico/nadesico.Xdefaults.jp >> $@
XCOMM sed ‘s!menu1!menu4!’ mascots/kakyu/kakyu.Xdefaults.jp >> $@
XCOMM sed ‘s!menu1!menu5!’ mascots/eva/eva.Xdefaults.jp >> $@

japanese/XMascot.ad:: japanese/XMascot.ad.sed
sed ‘s!SOUND_COMMAND_NAME!$(SOUND_COMMAND)!;s!XMASDIR!$(XMASDIR)!’ japanese/XMascot.ad.sed > $@
sed ‘s!menu1!menu1!’ mascots/zodiac/zodiac.Xdefaults.jp >> $@
sed ‘s!menu1!menu2!’ mascots/dokyu2/dokyu2.Xdefaults.jp >> $@
XCOMM sed ‘s!menu1!menu3!’ mascots/nadesico/nadesico.Xdefaults.jp >> $@
sed ‘s!menu1!menu4!’ mascots/kakyu/kakyu.Xdefaults >> $@
XCOMM sed ‘s!menu1!menu5!’ mascots/eva/eva.Xdefaults.jp >> $@

$ vi xmascot.h

enum{ NODAT, STRING, ID, SYMBOL, RESERVE } TokenType;

typedef enum{ NODAT, STRING, ID, SYMBOL, RESERVE } TokenType;

$ xmkmf -a
$ make
$ sudo make install

$ sudo cp mascots/dokyu2/.mag /usr/lib/X11/xmascot/
$ sudo cp mascots/kakyu/.mag /usr/lib/X11/xmascot/
$ sudo chmod +r /usr/lib/X11/xmascot/*.*

これで、一通りインストールが完了しました。それぞれ、以下で起動できます。

$ xmascot &
$ xmascot -name dokyu2 &     #同級生2マスコット
$ xmascot -name kakyu &     #下級生マスコット


(参考)
マスコットデータ フォルダ:          
  /usr/lib/X11/xmascot/
Xリソースファイル(Unicode:日本語リソース):  
  /usr/lib/X11/en_US.UTF-8/app-defaults/XMascot
Xリソースファイル(Default:デフォルトリソース):
  /etc/X11/app-defaults/XMascot


もし、xmascot &で起動して全てのキャラクターをメニューから選択したいのであれば、Xリソースファイルを、以下のように置換してみてください。
(viでは、:%s/dokyu2/menu2./g のように操作すると、文字列の一括置換ができます。)

dokyu2* -> menu2. kakyu -> *menu3.

*menu2.popup.label: -> *menu2.title:
*menu3.popup.label: -> *menu3.title:

*menusNum: 2 -> *menusNum: 4

 

xdesktopwaves Xのルートウィンドウ上で水の波をシミュレーション

xdesktopwaves は X ウィンドウシステムを水面下におくセルオートマトンです。 ウィンドウとマウスが海上の船のようになり、各動きが水の波を引き起こします。 雨を触らせたり嵐で水をかきみだしたりすることもできます。

xfishtank、XMascot(下で紹介)と一緒に動かすと、結構いい感じになります。
(XMascotの減衰係数を0にするのがコツで、これにより波が発生しつつけます。)

インストールは、APT経由で可能です

sudo apt instsll xdesktopwaves

 

dclock X Window System 向けの柔軟な表示設定が可能なデジタル時計

Dclock の主要機能は、その描画方法における柔軟性の高さです。
“date” からの出力による “Wednesday, 3rd Jan” のような表示さえ可能です。
Dclock はアラーム設定もサポートしています

表示はいろいろとカスタマイズ可能です(例)。

dclock                   12時間表示(デフォルト)
dclock -m                 24時間表示
dclock -date “%p %Y-%m-%d (%a) “ 下にAM/PM表示 年-月-日(曜日省略形)を表示
dclock -m -date “%Y-%m-%d (%a)” -dateup 24時間&上に年-月-日(曜日省略形)を表示
dclock -m -seconds            24時間&秒を表示する

インストールは、APT経由で可能です

sudo apt instsll dclock

 

mxclock 絵柄が綺麗な時計です.

公式サイト

普通の時計です。サイズ変更は出来ません。
マウスの左右ボタンで文字盤(4種類)を切替えられます。
起動時オプションで秒針も表示できます(-sec)

    <起動時のオプション>
            -sec
                    秒針を表示します。
            -p patternnumber
                    時計の図柄を選択します。-p 1 という感じで使います。
                    使用できるパターンは0〜3の4通りです。
            -display hostname:display[.screen]
                    表示するディスプレイの指定をします。
            -geometry {+-}xoff{+-}yoff
                    表示位置の指定をします。

    <実行中の操作>
            マウスの左右ボタンで文字盤を切替えられます。

インストールは、aptなどでのインストールはできず、ソースからコンパイルする必要があります。

$ cd
$ mkdir mxclock
$ cd mxclock/
$ wget https://ftp.vector.co.jp/05/92/1347/mxclock.taz
$ tar xf mxclock.taz
$ cd mxclock.d
$ xmkmf -a
$ make
$ sudo make install

 

SunClock 時刻と地理データを表示可能な可愛い時計

sunclock は、世界地図を表示し、昼の地域を明るく、夜の地域を暗く描画 することにより、地球に太陽光が照らされた地域を示します。 デフォルトのタイムゾーンに対するローカルタイムを示すだけでなく、 主要な都市の GMT 時間、法定時および太陽時、都市の緯度経度、 地球上の任意の二点間の距離を表示できます。 Sunclock は、経線、緯線、南北回帰線および極圏を表示できます。 時間の進み方を加速し、四季の移り変わりを表示する組み込み機能を 有しています。

メインは世界地図表示ですね。都市の選択とかはやり方がわからなくて、できていませんが
世界地図だけでも環境インテリア的にはいいかと。

(詳細は、man sunclockを参照してください。)

インストールは、APT経由で可能です
sudo apt instsll sunclock

 

Xantfarm X11用のシンプルなアリ農場

公式サイト:xantfarm

Xantfarmはアリ塚をシミュレートし、ルートウィンドウに表示します。
アリの世界には三つの元素があります:空気です。 アリは空気中を移動し、を掘り起こし、それを砂として落とします。 アリには3つの行動があります:さまよい運搬する、パニックです。 プログラムにはいくつかの簡単な確率が組み込まれています これは、放浪運搬の間の切り替えを制御します。 パニックになるのを見るには、カーソルでアリをつついてみてください。

実行例
xsetroot -solid Brown
xantfarm ~/.xantfarm.checkpoint -num 10 -c 150 -air Cyan -sand Coral -ant Black

定期的に状況を保存して、次回起動時に続きから開始できるようにします
(5000サイクル間隔で保存なので標準の15cpsだと5分に1回保存します・)
-num:100 (アリの数 標準は10)
-c :150 (1秒間に実行するサイクル(CPS) 標準は15)
あと、空(-air),砂(-sand),アリ(-ant)の色も変えられます。
地面の色は、X11のルートウィンドウの色になりますので、別で指定します。
xsetroot -solid Brown

色指定は、X11 color names – Wikipediaが参考になります。

終了後に画面が残るので、xsetroot コマンドで初期化してください。
 

インストールは、ソースからのビルドになります。

$ cd
$ mkdir xantfarm
$ cd xantfarm
$ wget https://www.acme.com/software/xantfarm/xantfarm_14Aug2014.tar.gz
$ tar zxf xantfarm_14Aug2014.tar.gz
$ cd xantfarm
$ xmkmf -a
$ make
$ sudo make install

 

———-

XMangekyou X11で動く万華鏡です

公式サイト:XMangekyou

万華鏡です.
変化しながらくるくるまわる映像はとってもきれいですが,トリップしすぎて
まわりに怪しがられないように気をつけてください.
壁紙に張り付けることもできます.
ある条件で,アニメーションがはじまっちゃったりします。

いろいろ表示のカスタマイズができるようです。
詳しくは、”nkf README.euc | more”で確認してください。

アニメーションが始める条件については、どこにも記載がありませんが
ぜひソースファイルを読んで、条件を探してみてください。
場所探すのはそんなに難しくはありません。あとは条件を満たしてみてください。

 

インストールは、ソースからのビルドになります。

$ cd
$ mkdir XMangekyou
$ cd XMangekyou
$ wget https://kozos.jp/myfreesoft/xmangekyou-2.0.1.tar.gz
$ tar zxf xmangekyou-2.0.1.tar.gz
$ cd xmangekyou-2.0.1

・configure.hを変更します。
#define XMANGEKYOU_LIB “/usr/X11R6/lib/X11/XMangekyou/”

#define XMANGEKYOU_LIB “/usr/local/lib/X11/XMangekyou/”

・Makefileを変更します。
XMANGEKYOU_PREFIX = /usr/X11R6

XMANGEKYOU_PREFIX = /usr/local

$ make
$ sudo make install

 

———-

Xshodow「書道」のアプリケーションです.

公式サイト:XShodou

XShodou は,UNIX の X Window System 上で動作する, 「書道」のアプリケーションです. マウスのドラッグを繰り返すことにより,だれでも気がるに「書道」 が楽しめます.

Shodou は FreeBSD 用ですが,Tck/Tk で書いてあるので,
UNIX ならば それほど苦労することなく,移植できるでしょう.
実行には Tck/Tk が必要です.
詳しい使用方法は,インストール後に man xshodou をご覧ください.

起動は、テーミナル上で「xshodou」で起動します。

マウスで筆をシミュレーションして書道をすることができます。
マウスドラッグで筆の移動。
マウスの右クリックを押すと筆を下に下げます(=線が太くなる)、
逆にマウスの左クリックを押すと筆を上にあげます(=線が細くなる)

なので残念ながらタッチパネルだけで操作すると1筆書きになっちゃいます。

インストールは上に書かれているように、Tck/Tk で書かれているので、
環境に合わせてファイルを書き替えてからインストールするだけです
(ビルドは不要)。

$ cd
$ mkdir XShodou
$ cd XShodou
$ wget https://kozos.jp/myfreesoft/xshodou-1.11.tar.gz
$ tar zxf xshodou-1.11.tar.gz
$ cd xshodou-1.11
$ sudo apt install tcl tk

$ vi Makefile
XSHODOU_PREFIX = /usr/X11R6

XSHODOU_PREFIX = /usr/local

$ vi xshodou
#!/usr/local/bin/wish

#!/usr/bin/wish

set title_file /usr/X11R6/lib/X11/XShodou/xshodou-title.xbm

set title_file /usr/local/lib/X11/XShodou/xshodou-title.xbm

$ sudo make install

 

———-

 

Brainで「痛デスクトップ」?

上記のアプリを組み合わせると、こんなbrainで「痛デスクトップ環境」が作れます。

痛デスクトップ レシピ
xeyes &
emiclock &
oneko -tomoyo &
oneko -sakura &
xhime &
macopix trh_nanoha.mcpx &
xpenguins –all -n 10 -m 150 &
Terminai 内アプリ: top

アクアリウム時計 レシピ
xfishtank &
xdesktopwaves &
XMascot &      # 蟹、重力加速度 0.02G、減衰係数 0.00
dclock -m &
xclock &

 

他、試してみてほしいアプリありましたら、コメントで

教えてください

Views: 380

カテゴリー: Brainux | コメントする

電子辞書Brainをいじる (3) BrainuxでX11(X window system)とUSBサウンドデバイスで遊ぶ

BrainuxとX環境への接続について

Brainuxには、標準でX環境(X11[X window system])が利用できます。

X環境(X11[X Window system])の1つの特徴として、アプリケーションと表示するシステムが独立していて、アプリケーションを動かすサーバと、画面描画するサーバが別でも構わないことです。

X11はクライアント/サーバモデルで提供しているのですが、
あくまで画面描写が主体となっているため、一般的な認識とは逆になります。

・ここでの「クライアント」は、GUIを表示するプログラム(Xアプリケーション)になります。
・ここでの「サーバー」は、クライアント(Xアプリケーション)からの要求を受け付けて、画面に表示する内容を管理するプログラム(X11[X window system])になります。

Brainの画面でX11アプリケーションを利用するには、いくつかのパターンがあります。

  1. Brainを直接操作して、Brain上でXアプリケーションを起動し、Brainの画面で操作する
  2. Brainから他PCにsshでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する
  3. 他PCからsshでBrainにログインして、Brain上でXアプリケーションを起動し、Brainの画面で操作する
  4. 他PCでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する

起動操作Xアプリケーション実行Xアプリ表示(操作)
1.Brainを直接操作して、Brain上でXアプリケーションを起動し、Brainの画面で操作するBrainBrainBrain
2.Brainから他PCにsshでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作するBrain->他PC他PCBrain
3.他PCからsshでBrainにログインして、Brain上でXアプリケーションを起動し、Brainの画面で操作する他PC->BrainBrainBrain
4.他PCでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する他PC他PCBrain

ここでは、以下を想定して、それぞれの方法での接続例を紹介します。

brain(IP:192.168.29.11) Brainux環境
他PC(IP:192.168.29.19) X11環境を持ったLinuxを想定

今回の環境的には、USBホストアダプタを使って、USBネットワークアダプタ経由でネットワークに接続しています。
(USBでホストPCを経由してネットワークに接続する(USB Ethernet Gadget)だと、他PCからBrainへの通信について制限が出てくるので、ホストPCがX11導入したLinuxであればいけるかもといったところ)


1.Brainを直接操作して、Brain上でXアプリケーションを起動し、Brainの画面で操作する

起動操作Xアプリケーション実行Xアプリ表示(操作)
BrainBrainBrain

これがBrainuxでの一般的な操作になります。
Brain上でBrainuxを起動する際には、「xinitrc」か「jvm」を選択して起動すれば、X環境が立ち上がります。

あとは、terminalを起動し、Xアプリケーションを起動してください。
DISPLAY環境変数にはすでに:0は設定されているので、明示的に設定する必要はありません。(xeyesは、マウスカーソルの方向を向く目玉のアプリケーションです。)

xeyes &

user@brain:~$ printenv DISPLAY
:0
user@brain:~$ xeyes &
[1] 1714

その他デフォルトで、x11-appsというパッケージが導入されているようです。
xeyes(目玉アプリ)以外にも、oclock(アナログ時計),xclock(アナログ時計),calc(電卓)、xedit(エディタ)、xmore(ビューア)あたりは普通に使えると思います。

x11-apps

 - ビットマップ画像を操作するツール atobm, bitmap および bmtoa
 - 多面体を動画表示するデモプログラム ico
 - グラフィカルな時計 oclock および xclock
 - render拡張の実装を検査するプログラム rendercheck
 - ウィンドウの不透明度属性を設定するツール transset
 - 新着メールを通知するツール xbiff
 - 関数電卓デスクトップアクセサリ xcalc
 - カットアンドペーストしたテキスト選択部分の管理ツール xclipboard
 - システムコンソールメッセージを監視する xconsole
 - PNG から X のカーソルファイルを作成するツール xcursorgen
 - ditroff 出力用ビューア xditview
 - X 用のシンプルなテキストエディタ xedit
 - 二つの目がポインタを追いかけるデモプログラム xeyes
 - グラフィックデモ xgc
 - システム平均負荷モニタ xload
 - X のロゴを表示するデモプログラム xlogo
 - X 画面の一部を拡大する xmag
 - マニュアルページブラウザ xman
 - テキストページャ xmore
 - X セッションのウィンドウダンプ ("スクリーンショット") を取る
  ユーティリティ xwd
 - xwd によって作成されたウィンドウダンプのビューア xwud
 - X Window System 上でのグラフィック性能をベンチマークするツール x11perf 
  および x11perfcomp (Xmarkは入っていないようです)

2.Brainから他PCにsshでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する

起動操作Xアプリケーション実行Xアプリ表示(操作)
Brain->他PC他PCBrain

Brainから、他PCにSSHログインして起動したXアプリケーションを、Brainの画面に出す方法です。
Terminalを立ち上げて、sshでログインする際に、-X オプションを設定することで、アクセス元のX環境に画面表示のリダイレクトをしてくれます。(DISPLAY環境変数は自動設定されます。)

ssh -X user@192.168.29.19
xeyes &

user@brain:~$ ssh -X user@192.168.29.19
user@192.168.29.19's password:
Welcome to Linuxfx 11.2 22.04.6 LTS (GNU/Linux 5.15.0-67-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Introducing Expanded Security Maintenance for Applications.
   Receive updates to over 25,000 software packages with your
   Ubuntu Pro subscription. Free for personal use.

     https://ubuntu.com/pro
Last login: Sat Nov  8 17:21:53 2025 from 192.168.29.11

nasubi@nasubi-vmwarevirtualplatform:~$ printenv DISPLAY
localhost:10.0

nasubi@nasubi-vmwarevirtualplatform:~$ xeyes &
[1] 11904

3.PCからsshでBrainにログインして、Brain上でXアプリケーションを起動し、Brainの画面で操作する

起動操作Xアプリケーション実行Xアプリ表示(操作)
他PC->BrainBrainBrain

他PCからsshでBrainにログインして、Brain上でXアプリケーションを起動する方法です。
他PCはWindows上でもputty等でのsshアクセスでもかまいません。問題ありません。
Brainのキーボードで直接入力すると、特殊なキーバインドの違いや反応の悪さなどで、他PCでアプリの起動をする場合等に使用できます(デバック向けかな)。

以下の通り、画面表示先を指定する、DISPLAY環境変数を手動で設定すればOKです。

export DISPLAY=:0
xeyes &

user@pc1:~$ ssh user@192.168.29.11

login as: user
user@192.168.29.11's password:
Linux brain 5.4.149-gaa3edcd5fcbc #2 PREEMPT Mon Dec 23 11:34:55 UTC 2024 armv5tejl

  ____            _
 |  _ \          (_)
 | |_) |_ __ __ _ _ _ __  _   ___  __
 |  _ <| '__/ _` | | '_ \| | | \ \/ /
 | |_) | | | (_| | | | | | |_| |>  <
 |____/|_|  \__,_|_|_| |_|\__,_/_/\_\

           by Brain Hackers

   https://github.com/brain-hackers

Last login: Sun Nov  9 15:00:04 2025 from 192.168.29.19
user@brain:~$ printenv DISPLAY

user@brain:~$ export DISPLAY=:0

user@brain:~$ printenv DISPLAY
:0

user@brain:~$ xeyes &
[1] 1770

4.他PCでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する

起動操作Xアプリケーション実行Xアプリ表示(操作)
他PC他PCBrain

これは、Xアプリケーションの実行ウィンドウのみを、Braiに表示させるものです。
ただし、Brain上で、X11側で、Xアプリケーションからの接続を許可させる必要があるため、通常と違う手順が必要です。

接続許可は、xhosts というコマンドを利用します。
ただし、Brainux標準では、xhostは導入されていないようです。

user@brain:~$ xhost
bash: xhost: command not found

まずは、BrainにXアプリケーションからの接続を許可すためのコマンド(xhost)を導入します。
(一度導入すれば、大丈夫です。)

sudo apt update
sudo apt show x11-xserver-utils

user@brain:~$ sudo apt update
Hit:1 http://archive.debian.org/debian bullseye InRelease
Hit:2 https://packagecloud.io/brainhackers/brainux/any any InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.


user@brain:~$ sudo apt show x11-xserver-utils
Package: x11-xserver-utils
Version: 7.7+8
Priority: optional
Section: x11
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Installed-Size: 476 kB
Depends: libc6 (>= 2.26), libice6 (>= 1:1.0.0), libx11-6, libxaw7, libxcursor1 (>> 1.1.2), libxext6, libxi6, libxmu6, libxmuu1, libxrandr2 (>= 2:1.5.0), libxrender1, libxt6, libxxf86vm1, cpp
Suggests: nickle, cairo-5c, xorg-docs-core
Conflicts: iceauth, sessreg, xgamma, xhost, xmodmap, xrandr, xrdb, xrefresh, xrgb, xset, xsetmode, xsetpointer, xsetroot, xstdcmap, xvidtune
Breaks: arandr (<< 0.1.9)
Replaces: iceauth, sessreg, xbase-clients (<< 1:7.3), xgamma, xhost, xmodmap, xrandr, xrdb, xrefresh, xrgb, xset, xsetmode, xsetpointer, xsetroot, xstdcmap, xutils (<< 1:7.2), xvidtune
Tag: implemented-in::c, interface::commandline, role::program,
 uitoolkit::TODO, x11::xserver
Download-Size: 158 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: X server utilities
 An X client is a program that interfaces with an X server (almost always via
 the X libraries), and thus with some input and output hardware like a
 graphics card, monitor, keyboard, and pointing device (such as a mouse).
 .
 This package provides a miscellaneous assortment of X Server utilities
 that ship with the X Window System, including:
  - iceauth, a tool for manipulating ICE protocol authorization records;
  - rgb;
  - sessreg, a simple program for managing utmp/wtmp entries;
  - xcmsdb, a device color characteristic utility for the X Color Management
    System;
  - xgamma, a tool for querying and setting a monitor's gamma correction;
  - xhost, a very dangerous program that you should never use;
  - xmodmap, a utility for modifying keymaps and pointer button mappings in X;
  - xrandr, a command-line interface to the RandR extension;
  - xrdb, a tool to manage the X server resource database;
  - xrefresh, a tool that forces a redraw of the X screen;
  - xset, a tool for setting miscellaneous X server parameters;
  - xsetmode and xsetpointer, tools for handling X Input devices;
  - xsetroot, a tool for tailoring the appearance of the root window;
  - xstdcmap, a utility to selectively define standard colormap properties;
  - xvidtune, a tool for customizing X server modelines for your monitor.


user@brain:~$ sudo apt install x11-xserver-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  nickle cairo-5c xorg-docs-core
The following NEW packages will be installed:
  x11-xserver-utils
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 158 kB of archives.
After this operation, 476 kB of additional disk space will be used.
Get:1 http://archive.debian.org/debian bullseye/main armel x11-xserver-utils armel 7.7+8 [158 kB]
Fetched 158 kB in 1s (127 kB/s)
Selecting previously unselected package x11-xserver-utils.
(Reading database ... 44310 files and directories currently installed.)
Preparing to unpack .../x11-xserver-utils_7.7+8_armel.deb ...
Unpacking x11-xserver-utils (7.7+8) ...
Setting up x11-xserver-utils (7.7+8) ...
Processing triggers for man-db (2.9.4-2) ...


user@brain:~$ xhost
access control enabled, only authorizaed clients cat connect

次に、BrainでBrainuxを起動する際に、「shell」で起動してください。
(そのまま「xinitrc」か「jvm」で起動してしまうと、X接続用のポート(:0の場合6000)が閉じているため接続できません。)

shellが起動したら、以下のコマンドでXを起動します。

user@brain:~$ stratx -- -listen tcp

Brain上でXが起動したら、terminalを起動して、アクセス許可を設定します(X起動毎に設定が必要です。)
(今回は、”192.168.29.19″からのアクセスを許可するものとします。)

xhost +192.168.29.19

(なお「xhost +」とすると、すべての接続を許可する設定になってしまいます。セキュリティ的には非推奨になります。)
+はBrainのキーボードでは、「シフト+記号+F」ですが、入力がしずらい場合があります。

user@brain:~$ xhost
access control enabled, only authorizaed clients cat connect
SI:localuser:user

user@brain:~$ xhost +192.168.29.19
192.168.29.19 being added to access contol list

user@brain:~$ xhost
access control enabled, only authorizaed clients cat connect
INET:192.168.29.19
SI:localuser:user

ここまで終われば、他PC(Linux)でTerminalを立ち上げて、
DISPLAY環境変数を上書き設定します。
(BraiのIPは192.168.29.11とした場合)

export DISPLAY=192.168.29.11:0
xeyes &

user@pc1:~$ printenv DISPLAY
:0

user@pc1:~$ export DISPLAY=192.168.29.11:0

user@pc1:~$ printenv DISPLAY
192.168.29.11:0

user@pc1:~$ xeyes &

 

X環境への接続についての補足

上記の接続の組合せでも、X環境を利用することができます。
例えば、3の後に2をやることで、疑似的に4の接続にすることも可能です。
(4.の特殊なXnの立ち上げや設定が不要)

起動操作Xアプリケーション実行Xアプリ表示(操作)
他PC->Brain->他PC他PCBrain

2.Brainから他PCにsshでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する
4.他PCでログインして、他PC上でXアプリケーションを起動し、Brainの画面で操作する

ssh user@192.168.29.11

export DISPLAY=:0
ssh -X nasubi@192.168.29.19

xeyes &

user@pc1:~$ ssh user@192.168.29.11

user@brain:~$ export DISPLAY=:0
user@brain:~$ ssh -X nasubi@192.168.29.19

user@pc1:~$ xeyes &

実際にやってみると、他PC上でXアプリケーションを起動する以下の方法では、
速度的にも問題なくアプリケーションを利用することができます。

これらは、俗にいう「シンクライアント」運用になります。
別PCに処理をさせて、結果のみBrainに表示させ、
BrainにUSBキーボードとマウスを付ければ、ハンドヘルドPCの出来上がりです。

また、これまでの説明の中のサーバ指定を逆にすれば、別サーバのX画面に、Braiux上で起動したアプリケーションを表示することもできますが、ここでは割愛します。

難点をいれば、現状Sound再生はされないといったところぐらいでしょうか・・・

参考
ローカルからリモートのXサーバにウィンドウを飛ばす

 

xterm の設定変更について(Xリソースファイルの管理)

lxterminaiは 40MB程度と結構メモリを消費するので、
メモリ消費量が比較的少ない(8MB)ターミナルとして
xtermも使えるようにしておきます。

ただxtermのデフォルトでは、白地に黒文字で目が痛いので
黒地に白文字に変更するためには、
xtermの設定変更として、Xのリソースファイルに追記します。

Xのリソースファイルは、アプリごとに以下のフォルダにまとめられています。
/etc/X11/app-defaults/

xtermの場合、/etc/X11/app-default/XTerm に追記します。

黒地に白文字に変更するには、ファイルの最後に、以下の行を追加します。

$ sudo vi /etc/X11/app-defaults/XTerm
xterm*reverseVideo:on

なお、ユーザ単位での設定では一般的に
~/.Xresourcesに追加するように書かれている資料もありますが、
Brainuxでは、このファイルを参照する様にはなっていないので、
もしユーザ単位でリソースファイルを切り替えたいのであれば、
~/.xprofileに、以下のような行を追加してみてください。
起動時に、~/.Xresourcesが読み込みされるようになります。

$ vi ~/.Xresources
xtermreverseVideo:on
x-terminal-emulatorreverseVideo:on

$ vi ~/.xprofile
xrdb -merge ~/.Xresources

起動時にフォントのワーニングが出る場合は、フォントをインストールします。
$ sudo apt install xfonts-base xfonts-100dpi xfonts-75dpi

$ sudo apt install x11-xserver-utils
$ xset +fp /usr/share/fonts/X11/misc
$ xset fp rehash

 

JWMのメニューにアプリケーション(xterm)に追加する

現状JWMのメニューには、Terminal(lxterminal)しかアプリが登録されていないので、
xtermを追加してみます。

調べてみると、JWMのコンフィグは、以下にありました。
/etc/jwm/system.jwmrc

なお、ユーザごとにカスタマイズしたいのであれば、
先ほどのファイルを、~/.jwmrcにコピーすれば、これらの設定が優先的に使われます。

/etc/jwm/system.jwmrcファイルの先頭部分を確認してみると、
以下のようになっていました。

<?xml version=”1.0″?>
<JWM>
<!– The root menu. –>
<RootMenu onroot=”12″> <Include>/etc/jwm/debian-menu</Include>
<Program icon=”terminal.png” label=”Terminal”>lxterminal</Program>
<Separator/>
<Program icon=”lock.png” label=”Lock”> xlock -mode blank </Program>
<Separator/>
<Restart label=”Restart” icon=”restart.png”/>
<Exit label=”Exit” confirm=”true” icon=”quit.png”/>
</RootMenu>

ここで、メニューに、xtermの定義を追加してみます。
ついでに、Includeの行の下に<Separator/>も追加しています。
<Program label=”xterm”>xterm</Program>

$ sudo vi /etc/jwm/system.jwmrc

<Include>/etc/jwm/debian-menu</Include>
<Program icon=”terminal.png” label=”Terminal”>lxterminal</Program>
<Separator/>
 ↓
<Include>/etc/jwm/debian-menu</Include>
<Separator/>
<Program icon=”terminal.png” label=”Terminal”>lxterminal</Program>
<Program label=”xterm”>xterm</Program>
<Separator/>

設定に間違いがないか、以下のコマンドでチェックします。
$ jwm -p

最初は /etc/jwm/debian-menu ファイルがないため、そこは失敗しますが、
今回はその分はエラーでOKです。それ以外にエラーが出ないことを確認します。

では以下のコマンドで、設定をリロードします。
$ jwm -reload

すると、xtermが追加されました。

xtermをクリックすると、、定義したxtermが起動しました。

 

OSに登録されたアプリケーションをJWMに表示する

BrainuxはDebian11ベースのOSですので、DebianにAptコマンドでアプリをインストールすると、以下のフォルダにアプリケーション登録ファイル(*.desktop)が登録されています。
/usr/share/applications

この登録ファイルを元に自動でJWMの設定ファイルに変換してくれるツールを導入します
xdgmenumaker

$ cd
$ mkdir xdgmenumaker
$ cd xdgmenumaker
$ git clone https://github.com/gapan/xdgmenumaker.git
$ cd xdgmenumaker/
$ sudo apt install txt2tags
$ make
$ pip install pyxdg

もし、pip install pyxdgがエラーになった場合は、以下に置き換えてください
(Debian 12 以降でpipが禁止されているため)
$ sudo apt install python3-xdg

$ sudo make install
$ sudo touch /etc/jwm/debian-menu
$ sudo chmod 666 /etc/jwm/debian-menu
$ xdgmenumaker -n -i -f jwm > /etc/jwm/debian-menu

もし、xdgmenumaker を実行したときに、”import gi”とエラーになったときは、以下を実行してください。
$ sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0

dbind-WARNING **: のワーニングが出た場合は、
無視して大丈夫です(Debian13環境だと出るそうです)。
出さないようにするは、以下のようにファイルの最後に追記してください。
(反映には、再ログインが必要です。)
$ sudo vi /etc/environment
NO_AT_BRIDGE=1

実行に成功したら、以下のコマンドで、設定をリロードします。
$ jwm -reload

すると、apt経由でインストールしたアプリケーションの分のメニューが追加されました。


ただ、この状態だとaptでアプリを追加しても自動でメニューへの反映がされません。
JWM起動時に自動的に反映させてもいいのですが、起動してからJWMが操作できるまでにかなり時間がかかるため、「メニューの反映」をreload menuとして登録して、手動で登録できるようにします(アイコンが不要であれば-iオプションを消すとMenu動作が軽くなります)。

$ sudo vi /etc/jwm/reloadjwmmenu

#!/bin/sh
NO_AT_BRIDGE=1 xdgmenumaker -n -i -f jwm > /etc/jwm/debian-menu
jwm -reload
exit

$ sudo chmod 755 /etc/jwm/reloadjwmmenu


作成したスクリプトをsystem.jwmrcに登録します。
<Program label=”ReloadMenu”>sh /etc/jwm/reloadjwmmenu</Program>

ついでに、VirtualKeybordも追加しておきました。
これで「.profile」で自動起動しなくてもよくなります。
<Program label=”VirtualKeybord”>xvkbd</Program>

$ sudo vi /etc/jwm/system.jwmrc

<!– The root menu. –>
<RootMenu onroot=”12″>
<Include>/etc/jwm/debian-menu</Include>
<Separator/>
<Program icon=”terminal.png” label=”Terminal”>lxterminal</Program>
<Program label=”Xterm”>xterm</Program>
<Program label=”VirtualKeybord”>xvkbd</Program>
<Separator/>
<Program icon=”lock.png” label=”Lock”>
xlock -mode blank
</Program>
<Separator/>
<Program label=”ReloadMenu”>sh /etc/jwm/reloadjwmmenu</Program>
<Restart label=”Restart” icon=”restart.png”/>
<Exit label=”Exit” confirm=”true” icon=”quit.png”/>
</RootMenu>

これで、ReloadMenuをクリックすれば、メニューの反映が行われます。

なお、標準ではxlockが入っていないので、不要であれば、Lockの行は消してください。
多分もっといい方法がありそうだけど、とりあえず動いたということで良しとします。

今は、Lockの行の代わりに、以下のように「OS Reboot」を設定すると、
JWMから再起動できるようにしています。

$ sudo vi /etc/jwm/system.jwmrc

<!– The root menu. –>
<RootMenu onroot=”12″>
<Include>/etc/jwm/debian-menu</Include>
<Separator/>
<Program icon=”terminal.png” label=”Terminal”>lxterminal</Program>
<Program label=”Xterm”>xterm</Program>
<Program label=”VirtualKeybord”>xvkbd</Program>
<Separator/>
<Program label=”OS Reboot”>
/usr/bin/xterm -e sh -c ‘echo run Reboot;sudo reboot’
</Program>

<Separator/>
<Program label=”JWM ReloadMenu”>sh /etc/jwm/reloadjwmmenu</Program>
<Restart label=”JWM Restart” icon=”restart.png”/>
<Exit label=”Exit” confirm=”true” icon=”quit.png”/>
</RootMenu>

 

X11画面のスクリーンショットを撮る方法

X11画面のスクリーンショットは、「scrot」コマンドで取得できるようです。

scrotは、以下のコマンドでインストールできます。
$ sudo apt install scrot

コマンドオプションでいろいろ取得方法をカスタマイズできるようです。

scrot     画面全体のスクリーンショットを撮ります。
scrot -ub   タイトルバー+アクティブウインドウのスクリーンショットを撮ります。
scrot -sb   カーソルの形が+に変わるので、
       その後ウインドウをクリックすると、タイトルバー+クリックしたウインドウ
       のスクリーンショットを撮ります。(ウインドウ範囲外だと全画面)
       左クリック長押しで範囲指定すると、その範囲のスクリーンショット
       を撮ります。

また、scrot -d 10 のように、-dで秒数を指定すると、10秒後に取得されます。

スクリーンショット取得先は、、
指定がなければ、カレントディレクトリに
「2025-12-18-204617_854x480_scrot.png」といった名前で保存されます。

出力先を指定する場合は、以下のようにしてみてください。
scrot ‘%Y-%m-%d-%H%M%S_$wx$h_scrot.png’ -e ‘mv $f ~/screenshot/’

これで~/screenshot/に「2025-12-18-212923_854x480_scrot.png」のような名前で保存されます。

また、リモートPCからssh -X(Xリダイレクトオプション付)でログインしている場合、
リモート側でscrot コマンドを実行して、遠隔実行することも可能です。
ssh -Xでログインしていない場合は -D :0 のようにBrain側のDiskplay番号を追加でOKです。

 

これでスクリーンショットが取れるようになりましたが、毎回コマンドを打つのも面倒です。
今回は、JWMのキーバインド設定をして、USBキーボードの”PrtSc(PrintScreen)”キーでスクリーンショットが取得できるように設定してみます。
参考:JWM設定)(参考:JWMConfig

sudo vi /etc/jwm/system.jwmrc

ファイルの最後のほうに、キーバインド設定がありますので、ここの最後に追記します
(mask設定は、Shift=”S”,Ctrl=”C”,ALT=”A”が対応します。ただSAとしたときにALTの認識に不具合出る場合もあるそうなのでこの辺は調整が必要かもしれません。)

<Key key=”Print”>exec:scrot ‘%Y-%m-%d-%H%M%S_$wx$h_scrot.png’ -e ‘mv $f ~/screenshot/'</Key>
<Key mask=”A” key=”Print”>exec:scrot -ub ‘%Y-%m-%d-%H%M%S_$wx$h_scrot.png’ -e ‘mv $f ~/screenshot/'</Key>
<Key mask=”CA” key=”Print”>exec:scrot -sb ‘%Y-%m-%d-%H%M%S_$wx$h_scrot.png’ -e ‘mv $f ~/screenshot/'</Key>

これで、以下のようなキーバインドになります。
(ただし、jwmのメニュー表示中は、このキーバインドは聞かないようです。)

・PrintScreen      で全画面のスクリーンショット
・ALT+PrintScreen   でアクティブウインドウのスクリーンショット
・Ctrl+ALT+PrintScreen でウィンドウ選択 or 範囲指定のスクリーンショット

もし、Brainのキーボードでスクリーンショットを撮りたいのなら、
キー指定を <Key mask=”CA” key=”s”> とかにすればCtrl+ALT+”s”がキーバインドになります。(“exec:xdotool key ctrl+alt+Print”に割当でキー入力のエミュレートでもいけます)[参考]

JWMのコンフィグファイルを変更したら、jwm -pで構成チェックをした後で、
JWMメニューのRestartをクリックするか、jwm -restart コマンドを実行で設定が反映されます。

 

あと今回気づいたのですが、JWMのキーバインド使えば
タッチパネルでの右クリック対応はxbindkeys使わなくてもいけますね
これで500kbぐらいメモリ消費量を削減できます。
sudo vi /etc/jwm/system.jwmrc 追加&JWMリスタート
<Key mask=”CA” key=”z”>exec:xdotool click 3</Key>

vi ~/.xprofile 一部コメント化
# bash xbind_keys_autostart

/etc/jwm/system.jwmrc 例

  

BrainuxでのSound再生について

標準の環境では、Brainuxではサウンドデバイスを認識していないため、Sound再生されません。
Brain に内蔵されているスマートアンプには大きく分けて Yamaha 系と Rohm 系があるとのことで、現状Brainux上でのSound再生は、現状解析中で非対応だそうです。

試しにUSBサウンドデバイスを付けてみたところ、OSとしては認識しました。

Bus 001 Device 004: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

ターミナル上でのコマンド上では使用できましたが、一部ノイズが乗ります。

user@brain:~$ sudo lsusb
Bus 001 Device 003: ID 0b95:772b ASIX Electronics Corp. AX88772B
Bus 001 Device 004: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


user@brain:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


user@brain:~$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Default Audio Device
sysdefault
    Default Audio Device
hw:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Direct hardware device without any conversions
plughw:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Hardware device with all software conversions
default:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
sysdefault:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
front:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Front output / input
surround21:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Direct sample mixing device


user@brain:~$ amixer -c0
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 151
  Mono:
  Front Left: Playback 44 [29%] [-20.13dB] [on]
  Front Right: Playback 44 [29%] [-20.13dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: Playback 0 - 32 Capture 0 - 16
  Mono: Playback 23 [72%] [34.36dB] [off] Capture 0 [0%] [0.00dB] [on]
Simple mixer control 'Auto Gain Control',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]



user@brain:~$ speaker-test -t sine -c 2 -f 220

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 220.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
^CTime per period = 4.344596
user@brain:~$

user@brain:~$ aplay sample.wav

ALSAを使っているaplayではノイズが出るにせよ音が鳴るし、
amixerや、alsamixerも動いています。

なお、plusaudioは初期未導入っぽいので、この辺が影響してそうです。
この辺もう少しし調べたいのですが、正直勉強不足です。

まあ、USBサウンドデバイスつけないといけないから、おま環ではあります。

この辺が参考になるのだろうか?
Linux の Audio 機能をコマンドラインで設定
X11 Forwarding で音声を再生する

音楽・動画再生は?

音楽・動画再生としては、mplayer や smplayerが apt経由でインストール可能です。

・mplayer コマンドラインの音楽・動画再生プレイヤーです。
・smplayer mplayerのラッパーで、GUI操作インターフェイスを提供します。

sudo apt update
sudo apt install mplayer
sudo apt install smplayer

user@brain:~$ sudo apt show mplayer
[sudo] password for user:
Package: mplayer
Version: 2:1.4+ds1-1+deb11u1
Priority: optional
Section: video
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 4,301 kB
Depends: liba52-0.7.4 (>= 0.7.4), libaa1 (>= 1.4p5), libasound2 (>= 1.0.16), libass9 (>= 1:0.13.6), libaudio2, libavcodec58 (>= 7:4.2), libavformat58 (>= 7:4.2), libavutil56 (>= 7:4.0), libbluray2 (>= 1:0.2.2), libbs2b0, libc6 (>= 2.29), libcaca0 (>= 0.99.beta17-1), libcdio-cdda2 (>= 10.2+2.0.0), libcdio-paranoia2 (>= 10.2+2.0.0), libcdio19 (>= 2.1.0), libdca0 (>= 0.0.5), libdv4 (>= 1.0.0), libdvdnav4 (>= 4.1.3), libdvdread8 (>= 4.1.3), libegl1, libenca0 (>= 1.9), libfaad2 (>= 2.7), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.2.1), libfribidi0 (>= 0.19.2), libgif7 (>= 5.1), libgl1, libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125, libjpeg62-turbo (>= 1.3.1), liblirc-client0, libmad0 (>= 0.15.1b-3), libmng1 (>= 1.0.10), libmpeg2-4 (>= 0.5.1), libmpg123-0 (>= 1.13.7), libogg0 (>= 1.0rc3), libopenal1 (>= 1.14), libpng16-16 (>= 1.6.2-1), libpostproc55 (>= 7:4.0), libpulse0 (>= 0.99.1), libsdl1.2debian (>= 1.2.11), libsmbclient (>= 2:4.0.3+dfsg1), libspeex1 (>= 1.2~beta3-1), libswresample3 (>= 7:4.0), libswscale5 (>= 7:4.0), libtheora0 (>= 1.0), libtinfo6 (>= 6), libvdpau1 (>= 0.2), libvorbisidec1 (>= 1.2.1+git20180316), libx11-6, libxext6, libxinerama1, libxss1, libxv1, libxvidcore4 (>= 1.2.2), libxvmc1 (>= 2:1.0.12), libxxf86dga1, libxxf86vm1, zlib1g (>= 1:1.1.4)
Suggests: bzip2, fontconfig, fonts-freefont-ttf, mplayer-doc, netselect | fping
Homepage: https://www.mplayerhq.hu
Tag: interface::graphical, interface::x11, role::program, uitoolkit::sdl,
 x11::application
Download-Size: 2,057 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: movie player for Unix-like systems
 MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO,
 ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA files,
 supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. It can
 also play VideoCD, SVCD, DVD, 3ivx, RealMedia, and DivX movies.
 .
 Another big feature of MPlayer is the wide range of supported output
 drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev,
 but also SDL.
 .
 Not all of the upstream code is distributed in the source tarball.
 See the README.Debian and copyright files for details.



user@brain:~$ sudo apt install mplayer
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  liba52-0.7.4 libass9 libaudio2 libavformat58 libbluray2 libbs2b0
  libcdio-cdda2 libcdio-paranoia2 libcdio19 libchromaprint1 libdca0 libdvdnav4
  libdvdread8 libenca0 libfaad2 libgif7 libgme0 libldb2 liblirc-client0
  libmad0 libmng1 libmpeg2-4 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55
  librabbitmq4 libsmbclient libsrt1.4-gnutls libssh-gcrypt-4 libtalloc2
  libtdb1 libtevent0 libudfread0 libvorbisfile3 libvorbisidec1 libwbclient0
  libzmq5 python3-ldb python3-talloc samba-libs
Suggested packages:
  nas libbluray-bdj libdvdcss2 lirc fonts-freefont-ttf mplayer-doc netselect
  | fping
Recommended packages:
  libaacs0
The following NEW packages will be installed:
  liba52-0.7.4 libass9 libaudio2 libavformat58 libbluray2 libbs2b0
  libcdio-cdda2 libcdio-paranoia2 libcdio19 libchromaprint1 libdca0 libdvdnav4
  libdvdread8 libenca0 libfaad2 libgif7 libgme0 libldb2 liblirc-client0
  libmad0 libmng1 libmpeg2-4 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55
  librabbitmq4 libsmbclient libsrt1.4-gnutls libssh-gcrypt-4 libtalloc2
  libtdb1 libtevent0 libudfread0 libvorbisfile3 libvorbisidec1 libwbclient0
  libzmq5 mplayer python3-ldb python3-talloc samba-libs
0 upgraded, 42 newly installed, 0 to remove and 1 not upgraded.
Need to get 12.1 MB of archives.
After this operation, 39.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libtalloc2 armel 2.3.1-2+b1 [26.5 kB]
~
Processing triggers for libc-bin (2.31-13+deb11u11) ...





user@brain:~$ sudo apt show smplayer
Package: smplayer
Version: 20.6.0~ds0-1
Priority: optional
Section: video
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 4,357 kB
Depends: mpv (>= 0.6.2) | mplayer, libc6 (>= 2.28), libgcc-s1 (>= 3.5), libqt5core5a (>= 5.14.1), libqt5dbus5 (>= 5.14.1), libqt5gui5 (>= 5.14.1) | libqt5gui5-gles (>= 5.14.1), libqt5network5 (>= 5.14.1), libqt5widgets5 (>= 5.14.1), libqt5xml5 (>= 5.1), libstdc++6 (>= 5), libx11-6, zlib1g (>= 1:1.1.4)
Recommends: smplayer-themes, smplayer-l10n
Homepage: http://smplayer.sourceforge.net/
Tag: interface::graphical, interface::x11, role::program, uitoolkit::qt,
 use::playing, works-with::audio, works-with::video, x11::application
Download-Size: 1,873 kB
APT-Sources: http://archive.debian.org/debian bullseye/main armel Packages
Description: Complete front-end for MPlayer and mpv
 Qt5 front-end for mplayer and forks, with basic features like playing
 videos, DVDs, and VCDs to more advanced features like support
 for MPlayer filters and more. One of the most interesting features
 of SMPlayer: it remembers the settings of all files you play.
 So you start to watch a movie but you have to leave... don't
 worry, when you open that movie again it will resume at the same
 point you left it, and with the same settings: audio track,
 subtitles, volume...





user@brain:~$ sudo apt install smplayer
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libdouble-conversion3 libinput-bin libinput10 libmd4c0 libpcre2-16-0
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5widgets5 libqt5xml5
  libwacom-common libwacom2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1
  libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-util1
  libxcb-xinerama0 libxcb-xinput0 libxkbcommon-x11-0
Suggested packages:
  qt5-image-formats-plugins qtwayland5
Recommended packages:
  qttranslations5-l10n libqt5svg5 qt5-gtk-platformtheme libwacom-bin
  smplayer-themes smplayer-l10n
The following NEW packages will be installed:
  libdouble-conversion3 libinput-bin libinput10 libmd4c0 libpcre2-16-0
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5widgets5 libqt5xml5
  libwacom-common libwacom2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1
  libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-util1
  libxcb-xinerama0 libxcb-xinput0 libxkbcommon-x11-0 smplayer
0 upgraded, 24 newly installed, 0 to remove and 1 not upgraded.
Need to get 10.2 MB of archives.
After this operation, 34.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.debian.org/debian bullseye/main armel libdouble-conversion3 armel 3.1.5-6.1 [39.6 kB]
~
Processing triggers for hicolor-icon-theme (0.17-2) ...
user@brain:~$



user@brain:~$ mplayer
MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team
Usage:   mplayer [options] [url|path/]filename

Basic options: (complete list in the man page)
 -vo <drv>        select video output driver ('-vo help' for a list)
 -ao <drv>        select audio output driver ('-ao help' for a list)
 vcd://<trackno>  play (S)VCD (Super Video CD) track (raw device, no mount)
 dvd://<titleno>  play DVD title from device instead of plain file
 -alang/-slang    select DVD audio/subtitle language (by 2-char country code)
 -ss <position>   seek to given (seconds or hh:mm:ss) position
 -nosound         do not play sound
 -fs              fullscreen playback (or -vm, -zoom, details in the man page)
 -x <x> -y <y>    set display resolution (for use with -vm or -zoom)
 -sub <file>      specify subtitle file to use (also see -subfps, -subdelay)
 -playlist <file> specify playlist file
 -vid x -aid y    select video (x) and audio (y) stream to play
 -fps x -srate y  change video (x fps) and audio (y Hz) rate
 -pp <quality>    enable postprocessing filter (details in the man page)
 -framedrop       enable frame dropping (for slow machines)

Basic keys: (complete list in the man page, also check input.conf)
 <-  or  ->       seek backward/forward 10 seconds
 down or up       seek backward/forward  1 minute
 pgdown or pgup   seek backward/forward 10 minutes
 < or >           step backward/forward in playlist
 p or SPACE       pause movie (press any key to continue)
 q or ESC         stop playing and quit program
 + or -           adjust audio delay by +/- 0.1 second
 o                cycle OSD mode:  none / seekbar / seekbar + timer
 * or /           increase or decrease PCM volume
 x or z           adjust subtitle delay by +/- 0.1 second
 r or t           adjust subtitle position up/down, also see -vf expand

 * * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *

user@brain:~$
user@brain:~$

mplayerで、再生したファイルを指定すれば、そのままALSAで再生されました。
(USB Audioデバイスを付けている場合)
mplayerでの音声再生では、ほとんどノイズは気になりませんでした。
[CUI,X11環境両方で実行可能]

mplayer pianos-by-jtwayne-7-174717.mp3

user@brain:/boot/sound$ mplayer pianos-by-jtwayne-7-174717.mp3
MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing pianos-by-jtwayne-7-174717.mp3.
libavformat version 58.45.100 (external)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 256.0 kbit/18.14% (ratio: 32000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  18.5 (18.5) of 18.0 (18.0) 75.0%


Exiting... (End of file)
user@brain:/boot/sound$

smplayerでも音声再生OKです。

smplayer pianos-by-jtwayne-7-174717.mp3
[X11環境時で実行可能]

同様に動画ファイル(mp4ファイル)も試しましたが、
安定して音声・動画再生はされました。

ただ、さすがにマシンパワー不足で、
動画と音声の同期がうまくいっていませんでした。
(音声が先行する)
再生時パラメータや、動画ファイルの作成パラメータの調整が必要かもしれません。
(-autosync 30 -cache 8192 -framedropのオプションを付けてみたけど、やっぱり遅い)

mplayer -vo fbdev2 /dev/fd0 ./file.mp4
[CUI上で実行する場合、-vo fbdev2 /dev/fd0 オプションを付け得れば再生されました。]

mplayer ./file.mp4
[X11環境上で実行可能]

smplayer file.mp4
[X11環境上で実行可能]

PulseAudio導入について

ALSAに引き続き、PulseAudioの導入も検討していますが、
結構重いそうだし、ALSA強制指定で動くものも多いので、いったん保留。
音楽のリダイレクトはあとで試してみたい。

fmsx,openMSX関連で、Brainuxに「pulseaudio」を入れてみました。

インストール: sudo apt install pulseaudio

インストール直後はサービスが起動していないのですが、以下のコマンドで操作できます。

#pulseaudio起動コマンド
pulseaudio --start

#起動状況確認コマンド
pactl info

#pulseaudioの停止コマンド
pulseaudio -k

ただし、標準では自動実行が設定されてしまっているため、再起動しても自動的に起動してしまいます。

pulseaudio 起動設定確認コマンド

$ systemctl --user status pulseaudio.service

● pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2025-12-20 14:18:53 JST; 30min ago
TriggeredBy: ● pulseaudio.socket
Main PID: 472 (pulseaudio)
CPU: 4.902s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pulseaudio.service
└─472 /usr/bin/pulseaudio --daemonize=no --log-target=journal

自動機能の無効化は以下です。これで自動起動しなくなります。

pulseaudio 自動起動抑止コマンド

$ systemctl --user mask pulseaudio.service pulseaudio.socket

もし、一時的にpulseaudioを起動したいのであれば、以下のようなコマンドを打てばOKです

#pulseaudio起動コマンド
pulseaudio --start

#pulseaudioの停止コマンド
pulseaudio -k


結果としては,Pulseaudioが無効との時うまく動くアプリと、
逆にPulseaudioが有効の時うまくいくアプリがあるっぽい。

ALSAを直接叩いているようなアプリでは問題なく聞ける音楽でもPulseaudioが有効だと、ぶつ切りでまともに聞けなくなるし、
逆に、Pulseaudio経由で音楽を鳴らしているアプリでは、Pulseaudioが起動していたほうがちゃんとうまくなる気がしてます。

Pulseaudioが起動していると、メモリも10MB以上消費するので、
Brainuxでは通常Pulseaudioを利用しないで、必要なときのみ起動するほうがいいでしょう。

openMSXとかだと、PulseAudioを起動したほうが音がちゃんと出ることもあるので、
いったんは必要に応じて手動起動で運用してみます。

 

Views: 289

カテゴリー: Brainux | コメントする