Build KLV xorg-minimal JWM mini

Very small KL Linux variants


Moderator: Forum moderators

Post Reply
User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Build KLV xorg-minimal JWM mini

Post by wiak »

KLV_xorg_minimal_JWM_bash.sh

This single script builds a KLV_mini that is constructed using xorg-minimal (rather than much bigger xorg meta package).

To make the build, simply download the attached script into empty build and bootfrom directory such as /KLV_miniJWM on Linux formatted partition, remove its dummy .tar extension, make it executable (e.g. with chmod +x), and run it from that directory using command:

Code: Select all

./KLV_xorg_minimal_JWM_bash.sh

The built 07firstrib_rootfs ends up quite small being only around 361MiB UNCOMPRESSED.
Per usual with FR, at the end of the build, the script provides exact grub stanza you can use to immediately thereafter boot it (the last UUID stanza for grub2 is recommended).

The build is pretty spartan. Just has JWM and st as a terminal (or change f_ plugin for nice lxterminal) with no other major apps added (other than console-based Midnight Commander; mc with mcedit). The easily edited /root/.jwmrc text config file for JWM does work okay on first boot, but could do with being fixed up since aside from terminal st automatically being added to the menu it is otherwise just the default .jwmrc from Void Linux repos that refers to currently uninstalled apps.

You can change the window manager easily by editing /root/.xinitrc
Originally I was using openbox-session (without even the likes of tint2), and then I was using bpswm with dmenu and sxhkd, but I felt that JWM would be a more comfortable initial wm for those from PuppyLand who wish to try this.

It should be very easy learning how to build FirstRib-based KL distros using this simple build script exemplar. Just read the simple contents of the attached KLV_xorg_minimal_JWM_bash.sh script first of all, and then read the contents of the script auto-downloaded main build plug (f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug), which is simply a very short text file of package manager and simple config commands.

NOTES:

Only comes with wiakwifi, but though you can connect using that just by running the wiakwifi command in terminal and answering the questions correctly... you almost certainly want later to xbps-install -Syu NetworkManager (adds a lot of bloat of course) so you can use the likes of nmtui command (or add the network-manager applet). Assuming you get a connection established you can immediately xbps-install -Syu firefox, and use it... No screenshot attached since just a basic JWM desktop with no desktop backgrounds included...

For wiakwifi: open a terminal and enter command:

Code: Select all

wiakwifi  # or use wiakwifi reset

The name of your wifi interface should be displayed so enter it. Then enter your wlan SSID once asked for it (there is no auto-scan sorry - you need to know its name...). Then enter the wifi password and it should connect... Thereafter you can install NetworkManager, as I said, with command:

Code: Select all

xbps-install -Syu NetworkManager

and on reboot the command 'nmtui' should connect fine for you..., but simple wiakwifi does usually work if you get the entries correct ;-)

EDIT: Forgot to say, I only included simple ttf font: font-bh-ttf. That was quite a small package (886k installed) and just enough for JWM and the st terminal to work okay.
After Exiting JWM you'll currently need to use commands: reboot -f (to restart) or reboot -p (to poweroff).

Attachments
KLV_xorg_minimal_JWM_bash.sh.tar
remove dummy tar, chmod +x prior to run
(3.27 KiB) Downloaded 92 times

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by rockedge »

@wiak Excellent!

Now I am wondering if I could chain an f_01_XXX.plug to add packages and configurations without modifying the f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by rockedge »

Ran a build and took the results and created an boot-able (CD-ROM) ISO to test it out in a QEMU virtual machine. Was able to connect to the network with eth0 and began to install some packages which all worked well.

The ISO is 300+ M the size increased mostly by the larger kernel components. The rootfs SFS with xz compression is around 143 M.

Trying out the 6.1.38-rt13c kernel I had some kernel panics which is unusual. I did not track that down yet.

Test various other kernels including Void Linux extracted versions and all of them worked well. All in all, the build is surprisingly fast and ready to go OOTB as a frugal install.

I just cherry picked the parts for the ISO from the finished build for virtual machine usage.

Screenshot(94).jpg
Screenshot(94).jpg (65.26 KiB) Viewed 1129 times

This is an ISO CD-ROM image using the Void Linux kernel 6.3.12_1

Screenshot(95).jpg
Screenshot(95).jpg (65.27 KiB) Viewed 1125 times
User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by wiak »

rockedge wrote: Wed Aug 30, 2023 4:31 pm

Now I am wondering if I could chain an f_01_XXX.plug to add packages and configurations without modifying the f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug

Yes, you can do that. Every file with the two characters f_ at the start of their filename gets copied during the build into firstrib_rootfs/tmp directory so you can source them from there from any other plug. Just prior to the main chroot build process, build_firstrib_rootfs.sh contains the line of code: cp -a f_* firstrib_rootfs/tmp, so ALL f_ named files (including plugs) get copied there automatically during the build.

In fact if you make a new second plug with the exact name f_01.plug, that plug will be run automatically immediately after the stuff in f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug is finished since I made that a special provision of build_firstrib_rootfs.sh script to make such wishes easy. Therefore you don't even need to modify the original f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug at all. So just create a second plug called EXACTLY:

Code: Select all

f_01.plug

and it will be automatically processed immediately after f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug (as if the commands in f_01.plug were written at the end of f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug).

Using f_01.plug to source even more f_ plugs:

Of course since all files, any at all whose names start with the two characters "f_", get auto-loaded into firstrib_rootfs/tmp directory early on, you can source other ones of them from each other. That way you can not only move other plug files/scripts into the chroot filesystem (firstrib_rootfs), but even binary files (which you could later rename via plug mv commands). For example, somewhere in that special second plug, named exactly f_01.plug, you could have a line such as:

Code: Select all

. /tmp/f_someotherXXX.plug

and that f_someotherXXX.plug code lines would then also get processed (sourced). The command above starts with a dot, meaning 'source' in bash, followed by a space, and then the pathname of the plug being sourced: /tmp/f_someotherXXX.plug
NOTE WELL: the pathname is NOT firstrib_rootfs/tmp/f_someotherXXX.plug, but rather /tmp/f_someotherXXX.plug, since during that part of the build it is in a chroot situation.

Alternatively, if you had a binary file called MyJunk in the main build directory that you wanted to put in firstrib_rootfs/usr/local/bin automatically during the build, you could simply rename it f_MyJunk and it would be temporarily auto-loaded into firstrib_rootfs/tmp early in the build process. Then, in any plug file you could arrange to move it to its desired position via the likes of command 'mv /tmp/f_MyJunk /usr/local/bin/MyJunk' and so on and so forth... Note well that as far as any sourced plug file is concerned, MyJunk will be found in /tmp rather than in firstrib_rootfs/tmp since plug files (as I said) are being processed in the chroot so don't themselves know/see they are in an enclosing directory called firstrib_rootfs.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
BarryK
Posts: 2273
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 564 times

Re: Build KLV xorg-minimal JWM mini

Post by BarryK »

Looks interesting!
I have downloaded the script, looking forward to playing with it.

I was wondering about something. Do any of you guys know where the Void package repository is?
I looked here:

https://repo-default.voidlinux.org/current/

...but the browser just says too many files to list.

geo_c
Posts: 2501
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1799 times
Been thanked: 705 times

Re: Build KLV xorg-minimal JWM mini

Post by geo_c »

BarryK wrote: Thu Aug 31, 2023 12:47 am

Do any of you guys know where the Void package repository is?
I looked here:

https://repo-default.voidlinux.org/current/

...but the browser just says too many files to list.

I don't know if this helps, but I often check this before using command line xbps: https://voidlinux.org/packages/

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by rockedge »

I went ahead and used some of the WeeDog-Void PLUG techniques that dealt with setting up the JWM window manager and split into a f_01.plug file.

The run went smoothly and quickly, parsing both PLUG files. Turned out a nifty little KLV-mini-jwm

This is the additional f_01.plug example I used:

Code: Select all

# Optional packages
#
xbps-install -y gvfs-smb gvfs-mtp gvfs-cdda
xbps-install -y yad gxmessage
xbps-install -y geany gftp rox lxterminal
xbps-install -y e2fsprogs yelp gparted
xbps-install -y dosfstools mtools 
xbps-install -y squashfs-tools wget
xbps-install -y lxterminal htop

# Browser selection
xbps-install -y firefox

# Fix Firefox Fonts 
#
ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/
xbps-reconfigure -f fontconfig

# create /root/.jwmrc with correct menu links for jwm logged in as root
cd /root/
cat <<'EOF' >> /root/.jwmrc 
<?xml version="1.0"?>
<JWM>
<!-- Disable virtual desktop scroll. -->
	<RootMenu onroot="4"/>
	<RootMenu onroot="5"/>
	
<!-- The root menu. -->
  <RootMenu onroot="12" height="24">
        
        <Include>/root/.jwmrc-menus</Include>
        
        <Separator/>
        <Program icon="/usr/share/icons/Adwaita/256x256/legacy/system-lock-screen.png" label="Exit X">pkill X</Program>
        <Separator/>       
        <Restart label="Restart JWM" icon="/usr/share/icons/Adwaita/scalable/emblems/emblem-synchronizing-symbolic.svg"/>
        <Exit label="Exit JWM" confirm="true" icon="/usr/share/icons/Adwaita/scalable/actions/system-log-out-symbolic.svg"/>
        <Program icon="/usr/share/icons/Adwaita/scalable/actions/system-shutdown-symbolic.svg" label="Shutdown">xlunch-logout</Program>
    </RootMenu>
 <!-- Options for program groups. -->
    <Group>
        <Option>tiled</Option>
        <Option>aerosnap</Option>
    </Group>
    <Group>
        <Class>Pidgin</Class>
        <Option>sticky</Option>
    </Group>
    <Group>
        <Name>xterm</Name>
        <Option>vmax</Option>
    </Group>
    <Group>
        <Name>xclock</Name>
        <Option>drag</Option>
        <Option>notitle</Option>
    </Group>
                                                           
  <!-- Tray at the bottom. -->
    <Tray x="0" y="-1" autohide="off" height="24">
        <TrayButton label="MENU" icon="jwm-blue">root:1</TrayButton>
        <Spacer width="2"/>
        <TrayButton popup="xlunch" icon="/usr/share/pixmaps/xlunch-logo.png">exec:xluncher3</TrayButton>
        <Spacer width="2"/>
        <TrayButton label="_">showdesktop</TrayButton>
        <Spacer width="2"/>
        <TrayButton popup="lxterminal" icon="/usr/share/pixmaps/filled-xterm_32x32.xpm">exec:lxterminal</TrayButton>
        <Spacer width="2"/>
                                                           
    <Pager labeled="true"/>
        <TaskList maxwidth="256"/>
                                                           
    <Dock/>
                                                                 
        <Swallow name="xload" width="32">xload -nolabel -bg "#444444" -fg "#00FF00" -hl "#4C7CC1"</Swallow>
        <Clock format="%a %d %b %H:%M"><Button mask="123">exec:xclock</Button></Clock>
                                                           
    </Tray>
                                                           
<!-- Visual Styles -->
    <WindowStyle>
        <Font>Sans-9:bold</Font>
        <Width>4</Width>
        <Height>21</Height>
        <Corner>3</Corner>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
        <Outline>#000000</Outline>
        <Opacity>0.5</Opacity>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
            <Outline>#000000</Outline>
            <Opacity>1.0</Opacity>
        </Active>
    </WindowStyle>
    <TrayStyle group="true" list="desktop">
        <Font>Sans-9</Font>
        <Background>#333333</Background>
        <Foreground>#FFFFFF</Foreground>
        <Outline>#000000</Outline>
        <Opacity>0.75</Opacity>
    </TrayStyle>
    <TaskListStyle>
      <Font>Sans-9</Font>
      <Active>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
      </Active>
      <Foreground>#FFFFFF</Foreground>
      <Background>#333333</Background>
    </TaskListStyle>
    <PagerStyle>
        <Outline>#000000</Outline>
        <Foreground>#555555</Foreground>
        <Background>#333333</Background>
        <Text>#FFFFFF</Text>
        <Active>
            <Foreground>#0077CC</Foreground>
            <Background>#004488</Background>
        </Active>
    </PagerStyle>
    <MenuStyle>
        <Font>Sans-9</Font>
        <Foreground>#FFFFFF</Foreground>
        <Background>#333333</Background>
        <Outline>#000000</Outline>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
       </Active>
        <Opacity>0.85</Opacity>
    </MenuStyle>
    <PopupStyle>
        <Font>Sans-9</Font>
        <Foreground>#000000</Foreground>
        <Background>#999999</Background>
   </PopupStyle>
                                                           
<!-- Path where icons can be found.
         IconPath can be listed multiple times to allow searching
         for icons in multiple paths.
     -->
    <IconPath>
        /usr/share/icons/wm-icons/32x32-aquafusion
    </IconPath>
    <IconPath>
        /usr/local/share/jwm
    </IconPath>
                                                           
    <!-- Virtual Desktops -->
    <!-- Desktop tags can be contained within Desktops for desktop names. -->
    <Desktops width="4" height="1"> 
        <!-- Default background. Note that a Background tag can be
              contained within a Desktop tag to give a specific background
              for that desktop.
         -->
        <Background type="solid">#111111</Background>
    </Desktops>
                                                           
<!-- Double click speed (in milliseconds) -->
    <DoubleClickSpeed>400</DoubleClickSpeed>
                                                           
<!-- Double click delta (in pixels) -->
    <DoubleClickDelta>2</DoubleClickDelta>
                                                           
<!-- The focus model (sloppy or click) -->
    <FocusModel>click</FocusModel>
                                                           
<!-- The snap mode (none, screen, or border) -->
    <SnapMode distance="10">border</SnapMode>
                                                           
<!-- The move mode (outline or opaque) -->
    <MoveMode>opaque</MoveMode>
                                                           
<!-- The resize mode (outline or opaque) -->
    <ResizeMode>opaque</ResizeMode>
                                                           
<!-- Key bindings -->
    <Key key="Up">up</Key>
    <Key key="Down">down</Key>
    <Key key="Right">right</Key>
    <Key key="Left">left</Key>
    <Key key="h">left</Key>
    <Key key="j">down</Key>
    <Key key="k">up</Key>
    <Key key="l">right</Key>
    <Key key="Return">select</Key>
    <Key key="Escape">escape</Key>
                                                           
    <Key mask="A" key="Tab">nextstacked</Key>
    <Key mask="A" key="F4">close</Key>
    <Key mask="A" key="#">desktop#</Key>
    <Key mask="A" key="F1">root:1</Key>
    <Key mask="A" key="F2">window</Key>
    <Key mask="A" key="F10">maximize</Key>
    <Key mask="A" key="Right">rdesktop</Key>
    <Key mask="A" key="Left">ldesktop</Key>
    <Key mask="A" key="Up">udesktop</Key>
    <Key mask="A" key="Down">ddesktop</Key>

    <StartupCommand>start_retrovol &</StartupCommand>
    <StartupCommand>start_pmcputemp &</StartupCommand>
                                                           
</JWM>
EOF


#### Get KLV custom packages ####
#
# Create and switch to build directory
mkdir -p /root/Build
cd /root/Build

wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/mime-add-1.1_0.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/xluncher-1.0_0.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/dropbear-0.81_1.x86_64.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/uextract-4.7_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/packit-pfind-1.0_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/run-as-users-1.5_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/inst-xbps-1.8_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/gtkhash-1.1.1_1.x86_64.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/pure-ftpd-1.0.50_1.x86_64.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/gettext-1.0_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/swapper-1.2_1.noarch.xbp
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/tas-1.15_1.noarch.xbps
wget ‐‐continue https://rockedge.org/kernels/data/XBPS_packages/tzupdate2-2.0_2.noarch.xbps

#### Install KLV custom packages ####

# Register and index packages
cd /root
xbps-rindex -a Build/*.xbps


# Install xLunch
xbps-install -y --repository=Build/ xluncher-1.0_0
xbps-pkgdb -m hold  xlunch-4.1_3

# Install MIME definitions 
xbps-install -y --repository=Build/ mime-add-1.1_0

# Install uextract
xbps-install -y --repository=Build/ uextract-4.7_1

# Install tzupdate
xbps-install -y --repository=Build/ tzupdate2-2.0_2

# Install tas
xbps-install -y --repository=Build/ tas-1.15_1

# Install Packit and pFind
xbps-install -y --repository=Build/ packit-pfind-1.0_1

# Install gettext
xbps-install -y --repository=Build/ gettext-1.0_1

# Install swapper
xbps-install -y --repository=Build/ swapper-1.2_1

# Install run-as-spot and run-as-weedog
xbps-install -y --repository=Build/ run-as-users-1.5_1

# Install inst-xbps
xbps-install -y --repository=Build/ inst-xbps-1.8_1

# Install gtkhash
xbps-install -y --repository=Build/ gtkhash-1.1.1_1

# Install pure-ftpd
xbps-install -y --repository=Build/ pure-ftpd-1.0.50_1

# Set execution permissions recursivly for binaries and scripts
chmod +x -R /usr/local/bin

# Clean Up
#

rm -r /root/Build
rm /var/cache/xbps/*


#-----------------------------------------------------------------------
echo "desktop build process finished"

@BarryK Also here is the location for package sources information -> https://github.com/void-linux/void-packages

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by rockedge »

I noticed that in my hurry to try out a f_01.plug I managed to make the /root/.jwmrc have the tray/panel configuration doubled so 2 panels appeared.

Easy fix but a good example of good intentions gone bad..... :geek:

Looking back at the WDL-Void PLUG's there were some pretty involved JWM-Rox desktop configurations happening that now could come in handy as the basis for a new designed second or 3rd PLUG that handles the alterations of the configuration files during the build phase.

Or if tinkering is not involved create a xbps package and install it as a local package that installs the configuration files for customization.

I have the configuration files as text in the PLUG that is written to the system by copy and replacement or modification using sed

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by wiak »

geo_c wrote: Thu Aug 31, 2023 1:38 am
BarryK wrote: Thu Aug 31, 2023 12:47 am

Do any of you guys know where the Void package repository is?
I looked here:

https://repo-default.voidlinux.org/current/

...but the browser just says too many files to list.

I don't know if this helps, but I often check this before using command line xbps: https://voidlinux.org/packages/

Then if you click on the found package of interest you will find 'template' that will show the dependencies that package uses. Some packages are just meta-packages whose only purpose is to bring in a group of dependencies, so you can manually just load which of these dependencies you want or need instead.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by rockedge »

Tried out the Void Linux kernel 6.5.0 with the build....worked well together

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: Build KLV xorg-minimal JWM mini

Post by wiak »

Your more singing and dancing f_01.plug addition works fine on quick rebuild for me (apart from that double taskbar you mentioned) @rockedge.

Actually, since there continues to be some interest in 32bit (i686) distros, I made it that way simply by first changing line 39 of the single KLV_xorg_minimal_JWM_bash.sh script from:

Code: Select all

./build_firstrib_rootfs.sh void default amd64 f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug

to

Code: Select all

./build_firstrib_rootfs.sh void default i686 f_00_Void_xorg_minimal_JWM_bash_no-kernel.plug

i.e. simply replacing amd64 with i686 prior to running the build script

I'm posting from it now (i686 Firefox).

Hopefully upstream Void Linux will continue to support 32bit builds for those who have old enough machines that still need that (though becoming less of these around).

Good thing about this KLV-mini build is that the original f_ PLUG is so short and easy to understand yet still boots to X. Easy/trivial to slot in alternative window manager instead of JWM so great for experimental builds prior to making more polished final builds, and effectively also a practical tutorial on basics of using FR build system more generally.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

Post Reply

Return to “KL minis”