This page is about my experience using Linux in general, and specifically using Slackware OS.
My Slackware installation notes. Some old notes have been archived.
Do note that Slackware also has a great documentation site.
The official way to do this is, of course, to get it from slackware.com.
Personally, I have getslack, a bash script based on (more accurately, a trimmed-down version of) the excellent (he termed it infamous) mirror-slackware-current.sh by Alien Bob. When going down this path, the next step would be to prepare the installation media.
Note: I have removed a section on DE-less installation since my current slackware installations ARE, in fact, DE-less.
Note: I have also removed a section on hijacking other Linux system - this, here, turned out to be VERY similar to what needed to be done.
[LastUpdated20210620]
I need to use GTK3 version that is newer that the one on 14.2, so I tried the development version (slackware64-current). I have done the same once (pre-11), so I am aware that there can be some issues when doing this. I am happy to say that I AM writing this on a slackware64-current (15.0 beta?) installation on my laptop.
So, this is a little note to my future self (or anybody that may be find this useful DISCLAIMER: Use this at your own risk!). I am doing this while still using Devuan and I want to keep that for backup, in case things go wrong. (On a side note, the reason I use Devuan was because of the GTK3 version.) So, I have an extra partition that I have reformatted and prepared to download the stuffs I need.
getslack
)<mount-path>/home/share/slackware
.getslack
VERS=current
bzImage
in kernels/huge.s (rename to vmlinuz
)initrd.img
in isolinux/ (this has the slackware setup)gnuchess
and xaos
packages/usr/share/vim/vimrc
)dmesg
for user/etc/rc.d/rc.local
← echo 0 > /proc/sys/kernel/dmesg_restrict
nmcli r[adio] wifi nmcli r[adio] wifi on nmcli d[evice] wifi list nmcli d[evice] wifi connect <ssid> password <pass> ifname <wlan0> nmcli c[onnection] show nmcli c[onnection] down <ssid> nmcli c[onnection] up <ssid>
/etc/xdg/user-dirs.defaults
(standard default paths)/etc/elogind/logind.conf
loginctl suspend
instead of pm-suspend
)#!/bin/bash case "$1" in pre) upid=$(pgrep dbus-launch) user=$(ps -o user --no-headers $upid) export XAUTHORITY=/home/$user/.Xauthority export DISPLAY=":0.0" su $user -c 'xlock -mode matrix' & sleep 1 ;; esac
chmod a+x
)getslackpack
).getslackpack
getslackbuild
)To maintain:
note: my libmy1slack
library will detect current when /etc/slackware-version
has '+' suffix. this sign will disappear when -current is near to a stable release.
-current
going stable, use SLACKVERS=current slack-update
slackpatch
-current
going stable, use -f
switchSLACKVERS=current slackview find –alien
)
This is what I do for a lean
(not necessarily minimal, but trimmed to my liking) installation. Will continuously update this based on my latest experience.
LastUpdated20230322
getslack
) getslack
config file below)gnuchess, xaos, xsnow
joe, nano, vim-gvim, slackpkg
/usr/share/vim/vimrc
)vimstart
(from my1shell repo)/etc/rc.d/rc.local
← echo 0 > /proc/sys/kernel/dmesg_restrict
setup_slack
(from my1shell repo)getslackpack
)getslackbuild
)dmenu slock st wmname
slackware-xdm-theme
geany rox-filer pmount unrar
nss-mdns avahi libdaemon
To maintain:
getslack
,getslackpack
,getslackbuild
)Configuration file for getslack
Configuration file for getslackpack
Configuration file for slackpatch
Listing for my1live-root
…
20110621 I want to have a 32-bit system running in chroot environment on my Slackware64. I've used such system on Debian using schroot…
20110906 I managed to do this as published here…
20120518 Minor change to the fstab entry for dev, which needs an rbind option so that the pty inside can be valid! Discussed here.
20120524 This is now part of my slackstuff collection (now known as my1shell)… in form of a script called slackroot.
20121031 The path to the chroot installation MUST ALL BE owned by root - or else, users will get a Write failed: Broken pipe
error.
TODO A how-to on creating 32-bit chroot on 64-bit Slackware using slackroot
script.
- on my pure slack64 (maintained using getslack/getslackpack) $ ARCH=i686 getslack - create root filesystem using 32-bit packages # slackroot /opt/chroot32 --arch x86 --desk -x - copy user/group info from 64-bit system to chroot32 = will maintain its own login info! # preproot --init /opt/chroot32 - mount bind 'system' paths # preproot /opt/chroot32 - ssh into system to use 32-bit chroot # ssh user@127.0.0.1 - unmount bind 'system' paths # preproot --done /opt/chroot32
Some things to note…
20210620 Slackware's CPU frequency scaling works (checkout /etc/rc.d/rc.cpufreq
) - just to remind myself, no need to look into this!
To allow non-root users basic admin (poweroff,reboot,etc.), insert the following to /etc/sudoers
(obviously, through sudo
). Note: Actually, only to users in group power
.
%power ALL=(ALL) NOPASSWD:/sbin/poweroff %power ALL=(ALL) NOPASSWD:/sbin/reboot %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-suspend %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-hibernate %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-powersave
Note: The pm-* binaries (pm-utils) are no longer available on Slackware 15.0
mv /etc/nsswitch.conf /etc/nsswitch.conf-orig
cp /etc/nsswitch.conf-mdns /etc/nsswitch.conf
script="/etc/rc.d/rc.avahidaemon" [ -x "$script" ] && $script start script="/etc/rc.d/rc.avahidnsconfd" [ -x "$script" ] && $script start
Main references are here and here.
getslackpack
to download required packages from Eric's multilib site. Install as instructed.getslack
which I use for my 32-bit chroot installation. I use massconvert32.sh
script on this tree. The massconvert32.sh
script can be used to update as well (built packages are not rebuilt). Install as instructed.slackpatch
script has been updated to handle 'blacklisted' 64-bit versions and 'upgraded' compat32 packagesUpdate20180903
Read here. I now have a more specific script to get multilib stuff (previously part of getslackpack script),
/usr/src/
(e.g. linux-4.4.199)/boot
# cp /boot/config-generic? > .config
# make oldconfig
# make menuconfig
# make -j4 bzImage
# make -j4 modules && make modules_install
modules_install
requires root, obviously!cp arch/x86/boot/bzImage /boot/vmlinuz-generic-4.14.12 cp System.map /boot/System.map-generic-4.14.12 cp .config /boot/config-generic-4.14.12
mkinitrd -c -k 4.14.12 -f ext4 -r /dev/sda3 -m ext4 -u -o /boot/initrd.gz
/usr/share/mkinitrd/mkinitrd_command_generator.sh
-P
option if requiredRun ls -l output on /var/log/packages
# ls -l /var/log/packages
Get package full name ONLY
# ls -l /var/log/packages | sed 's|^.* \(.*\)$|\1|g'
Get package name ONLY
# ls -l /var/log/packages | sed -e 's|^.* \(.*\)$|\1|g' -e 's|^\(.*\)-[^-]*-[^-]*-[^-]*$|\1|g'
Find package files for installed packages
for pkg in `ls /var/log/packages/` ; do pkg_file=`find /home/share/slackware/slackware64-14.2/ -name "${pkg}.txz"` ; [ -f "$pkg_file" ] && continue ; echo "Cannot find file for $pkg" ; done
Find installation log for standard packages
for pkg in `find /home/share/slackware/slackware64-14.2/slackware64 -name "*.txz" | sort` ; do base=`basename $pkg` ; name=${base%.*} ; test="/var/log/packages/$name" ; [ -f "$test" ] && continue ; echo "Cannot find file for $test" ; done
To list currently installed packages (to be used in my1live)
# slackview file --name pkgs.txt --installed --insert
# slackview file --name pkgs.txt --sort
slackview file --name pkgs.txt --dups curr.list
Little tips for better Slackware/Linux desktop experience.
Double-clicking in file manager (Thunar) shows no video (audio is ok, so program is running). Running mplayer from command line is fine. Turns out gui version is gmplayer - running from console shows this error message
Failed to open VDPAU backend libvdpau_va_gl.so
So, just edit ~/.mplayer/gui.conf
, find the line for vo_driver
and set it to gl
. Show be ok after that… at least in my case it is.
When using xdm, login fails sometimes with error message … Unable to establish ICE listener…
/etc/rc.d/rc.local
← rm -rf /tmp/.ICE-unix/*
Note: NOT tested… just found this
Although the mplayer setting to disable xscreensaver has been selected, xscreensaver still runs!
Possible Solution: Edit ~/.mplayer/config
heartbeat-cmd="xscreensaver-command -deactivate >/dev/null 2>&1"
The solution is here
aplay -D plughw:<card/slot#>,<device#> <WAV file>
to test/etc/asound.conf
or ~/.asoundrc
to fix this (sample below) pcm.!default { type hw card <card/slot#> } ctl.!default { type hw card <card/slot#> }
As seen here…
Check /etc/asound.conf
pcm.!default { type plug slave.pcm "softvol" } pcm.softvol { type softvol slave { pcm "dmix" } control { name "Pre-Amp" card 0 } min_dB -5.0 max_dB 20.0 resolution 6 }
Sometimes need type
in pcm.!default
to be hw
Setting up application(s) on Slackware… but, most are applicable to all distributions.
There are a couple (a few?)of applications that I thought have great features but relatively unknown (I only knew about them after looking for specific solution). Here they are:
xpaint -snapshot
)Editing /etc/httpd/httpd.conf
Setting up SSL: (for HTTPS!)
openssl genrsa -out privkey.pem 2048
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
mysql_install_db
chown -R mysql:mysql /var/lib/mysql
sh /etc/rc.d/rc.mysqld start
/usr/bin/mysql_secure_installation
create database app_db;
grant all privileges on app_db.* to 'user_app'@'localhost' identified by 'pass_app';
flush privileges;
create user 'user_app'@'localhost' identified by 'pass_app';
# /etc/rc.d/rc.mysqld stop # mysqld_safe --skip-grant-tables & # mysql -u root $ mysql -uroot -p mysql> use mysql; mysql> update user set password=PASSWORD('<newpass>') where User='root'; mysql> flush privileges; mysql> exit
alter table my1vehicle AUTO_INCREMENT=1;
select table_name,auto_increment from information_schema.tables; alter table my1data_use drop foreign key my1data_use_ibfk_2;
mysqldump -p -u user userdb > userapp-`date +%Y%m%d%H%M%S`.sql
The default tetex is usable, but it is no longer maintained and some new packages are not available.
The recommended TeX distribution is TeXLive.
/home/share/tool/texlive
./install-tl -gui
/home/share/tool/texlive/YYYY
(currently, YYYY=2020)TL_VERS="2020" TL_PATH="/home/share/tool/texlive/${TL_VERS}" export PATH=${TL_PATH}/bin/x86_64-linux:$PATH export MANPATH=${TL_PATH}/texmf-dist/doc/man:$MANPATH export INFOPATH=${TL_PATH}/texmf-dist/doc/info:$INFOPATH
tlmgr --gui
tlmgr show <package>
/etc/rsyncd.conf
max connections = 2 log file = /var/log/rsync.log timeout = 300 [share] comment = Shared Stuff path = /home/share read only = yes list = yes hosts allow = 192.168.3.0/24 uid = nobody gid = nobody #auth users = pub #secrets file = /etc/rsyncd.secrets
/etc/inetd.conf
rsync stream tcp nowait root /usr/bin/rsync rsync --daemon
/etc/services
rsync 873/tcp
/etc/rsyncd.secrets
pub:pub
/usr/bin/rsync --daemon --config=/etc/rsyncd.conf
on an x86_64 machine,
Some personal notes…
unspecified application error
$ lspci -vv | sed -n '/VGA compatible/,/^$/ p'
export MESA_LOADER_DRIVER_OVERRIDE=i915
Useful notes on Linux systems.
Kernel-related stuffs.
On startup, got a kernel warning regarding a firmware bug, TSC_DEADLINE disabled…
or something similar. The required 'fix' is to install intel-microcode
package.
On Devuan, install the 'parent' package - firmware-linux
(which covers both intel-microcode and amd64-microcode)
# apt install firmware-linux
Initramfs will be auto regenerated.
On Slackware, install intel-microcode
using script from Slackbuilds.org. Create a new initramfs (initrd) using mknitrd (with -P /boot/intel-ucode.cpio
).
After an upgrade on Devuan, I got
pstore: crypto_comp_decompress failed, ret = -22! pstore: decompression failed: -22
kernel message after rebooting.
Fixed it by deleting everything in /sys/fs/pstore
.
I have some experience playing with AIX and I am very fascinated by its LVM implementation (which is a MUST-USE). I also found out that Linux also has a slightly different LVM implementation - and obviously optional. I tried it on my home machine and I want to put my personal note here. I will simply put it as it is for now… and maybe discuss with a little more detail later.
* DISCLAIMER: this is my personal note. use at your own risk. * My home machine is running Devuan - note: mount | grep -v -E "/sys|tmpfs|proc|devpts|gvfs" - current disk layout on /dev/sda (GPT): = p1: UEFI partition (fat32) 127M (1M offset) = p2: Root partition (ext4) 30G = p3: Home partition (ext4) ~898G = p4: Swap partition (swap) 4G @ TASK: Create a new lv from slice of p3 - make sure basic lvm terms/concepts are covered = volume group (vg) = physical volume (pv) [aix:pv MUST BE a disk] = physical element/extent (pe) [aix:pp=physical partition] = logical volume (lv) = logical element/extent (le) [aix:lp=logical partition] - need to unmount /home = login as root and make sure no user logged in - target disk layout: = p1: UEFI partition (fat32) 127M (1M offset) = p2: Root partition (ext4) 30G = p3: Home partition (ext4) 600G = p4: Xtra partition (lvm) ~298G = p5: Swap partition (swap) 4G - current p3 content is <500G * repartition disk to create space for new lv # umount /home # e2fsck -f /dev/sda3 # resize2fs -p /dev/sda3 500G # swapoff /dev/sda4 # gdisk /dev/sda > delete /dev/sda4 > note /dev/sda3 starting sector > delete /dev/sda3 > create new /dev/sda3 (linux:8300) = make sure use same starting sector = specify size +600G > create new /dev/sda4 (linux lvm:8e00) = default starting sector = specify -4G to leave space for swap > create new /dev/sda5 (swap:8200) = should have 4G remaining > exit * reclaim /dev/sda3 space (600G) # resize2fs -p /dev/sda3 * edit /etc/fstab accordingly - e.g. specify new uuid for swap & /dev/sda3 * restore swap # swapon -a - OR, 'swapon /dev/sda5' * install lvm - using lvm2 implementation (uses device mapper) # apt install lvm2 * create pv # pvcreate /dev/sda4 * create volume group vg # vgcreate xtravg /dev/sda4 * playing around (create/remove lv) # lvcreate -L 100G -n store xtravg # lvcreate -l +100%FREE -n movie xtravg # lvremove movie # lvremove store * create single lv on vg # lvcreate -l +100%FREE -n share xtravg # vgdisplay xtravg * create ext4 fs on lv # mkfs.ext4 -L LVMSHARE /dev/xtravg/share * create a mountpoint for the new lv # mkdir /ext * check entry in /dev/mapper/ = should have xtravg-share * add entry in fstab = e.g. /dev/mapper/xtravg-share /ext ext4 defaults 0 2 * manually mount # mount /ext @ TASK: Add new disk to existing lv - got a new disk, using whole disk (1TB) - extend existing lv # pvcreate /dev/sdb # vgdisplay xtravg # vgextend xtravg /dev/sdb # vgdisplay xtravg * use all newly available space # lvextend -l +100%FREE /dev/xtravg/share @ TASK: Remove PV from VG - need to use original /dev/sda4 for something else - note: pvs -o+pv_used - PV is in use, so need to free up # umount /ext # e2fsck -f /dev/xtravg/share # resize2fs -p /dev/xtravg/share 800G # lvreduce -L 850G /dev/xtravg/share * reclaim space # resize2fs -p /dev/xtravg/share * check usage # pvs -o+pv_used - OR, pvdisplay * IF any PEs still in use # pvmove /dev/sda4 * remove pv from vg # vgreduce xtravg /dev/sda4 * remove pv from system (no longer id as pv) # pvremove /dev/sda4 * reclaim all lv space # lvextend -l +100%FREE /dev/xtravg/share # resize2fs -p /dev/xtravg/share
Dumped from my personal note on making AUFS-patched Linux kernel.
---------------------------------- How I built an aufs-patched kernel ---------------------------------- - get kernel source = got 5.4.26 (latest longterm atm) $ getlinux 5.4.26 -x - prepare kernel source = extract $ tar xf linux-5.4.26.tar.xz = actually, i got 5.4.25 like a day before 5.4.26 is release = got patch-5.4.25-26 and apply $ cd linux-5.4.25 $ patch -p1 < ~/temp/patch-5.4.25-26 = renamed the path as linux-5.4.26 - get the required aufsX = need aufs5 because i chose kernel v5 $ git clone git://github.com/sfjro/aufs5-standalone.git - prepare aufs5 $ git checkout -b aufs5.4 origin/aufs5.4 - get aufs-util (for later use) $ git clone git://git.code.sf.net/p/aufs/aufs-util - prepare aufs-util = aufs-util does not have exact kernel version (get closest lower) $ git checkout -b aufs-5.0 origin/aufs5.0 - apply patches in aufs5-standalone into linux = not all patches are required = refer to README in aufs5-standalone = i use method 1 $ cd linux-5.4.26 $ patch -p1 < ../aufs5-standalone/aufs5-kbuild.patch $ patch -p1 < ../aufs5-standalone/aufs5-base.patch $ patch -p1 < ../aufs5-standalone/aufs5-mmap.patch $ patch -p1 < ../aufs5-standalone/aufs5-standalone.patch = OR (in a single line command) $ for a in kbuild base mmap standalone ; do patch -p1 < ../aufs5-standalone/aufs5-$a.patch ; done - need to copy some files = still in linux-5.4.26 $ cp -av ../aufs5-standalone/Documentation/* Documentation/ $ cp -av ../aufs5-standalone/fs/* fs/ $ cp -av ../aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux/ - repack this for easy reuse = rename path as linux-5.4.26_aufs $ cd .. ; mv linux-5.4.26 linux-5.4.26_aufs $ cd linux-5.4.26_aufs $ packthis - prepare to build = unpack to /usr/src $ cd /usr/src ; tar xf linux-5.4.26_aufs.tar.xz - configure kernel $ cd linux-5.4.26_aufs = use make_kernel $ make_kernel -i -c = that will run make menuconfig = select aufs as module - build kernel = use make_kernel $ make_kernel -x = wait... - pack kernel (slackware) = use pack_kernel (duh!) $ pack_kernel --all = by default package will be at $HOME/temp
Some usage tips and fixes for Linux Desktop Environment(s)
dumped…
jwm mask modifier - mod key map can be checked using xmodmap -pm
My last used config - requires xdgmenumaker (getslackbuild)
<?xml version="1.0"?> <JWM> <RootMenu onroot="3"> <Program icon="terminal.png" label="Terminal">st -g 110x35</Program> <Program icon="file-manager.png" label="File Manager">rox</Program> <Program icon="text-editor.png" label="Editor">geany_space</Program> <Program icon="browser.png" label="Browser">firefox</Program> <Separator/> <Program icon="drive-harddisk.png" label="Mount Tool">my1pmount-gtk</Program> <Separator/> <Include>exec: xdgmenumaker -n -i -f jwm</Include> <Separator/> <Program icon="reload3.png" label="Reload Menu">jwm -reload</Program> <Restart icon="reload.png" label="Restart JWM"/> <Exit icon="exit.png" label="Exit JWM"/> <Separator/> <Program icon="redo.png" label="Reboot">loginctl reboot</Program> <Program icon="system-shutdown.png" label="Shutdown">loginctl poweroff</Program> </RootMenu> <Group> <Name>st</Name> <Option>cascaded</Option> </Group> <Tray x="0" y="0" autohide="off"> <TrayButton label="MY1">root:3</TrayButton> <Spacer width="2"/> <TrayButton label="Desktop">showdesktop</TrayButton> <Spacer width="2"/> <Pager labeled="true"/> <TaskList maxwidth="256"/> <Dock/> <Clock format="%Y%m%d %H:%M"></Clock> </Tray> <WindowStyle> <Font>Sans-10: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-10</Font> <Background>#333333</Background> <Foreground>#FFFFFF</Foreground> <Outline>#000000</Outline> <Opacity>0.75</Opacity> </TrayStyle> <TaskListStyle> <Font>Sans-10</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-10</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-10</Font> <Foreground>#000000</Foreground> <Background>#999999</Background> </PopupStyle> <IconPath>/usr/share/icons/hicolor/16x16/apps</IconPath> <IconPath>/usr/share/icons/Tango/16x16/apps</IconPath> <IconPath>/usr/share/icons/Tango/16x16/actions</IconPath> <IconPath>/usr/share/icons/Tango/16x16/devices</IconPath> <IconPath>/usr/share/icons/Tango/16x16/categories</IconPath> <IconPath>/usr/share/icons/Tango/16x16/mimetypes</IconPath> <IconPath>/usr/share/icons/Adwaita/16x16/apps</IconPath> <IconPath>/usr/share/icons/Adwaita/16x16/actions</IconPath> <IconPath>/usr/share/icons/Adwaita/16x16/categories</IconPath> <IconPath>/usr/share/pixmaps</IconPath> <IconPath>/usr/share/jwm</IconPath> <Desktops width="2" height="1"> <!--<Background type="solid">#111111</Background>--> <Background type="scale">/usr/share/jwm/slackwall.png</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="p">exec:dmenu_run -b</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:3</Key> <Key mask="A" key="F2">window</Key> <Key mask="A" key="F5">move</Key> <Key mask="A" key="F6">resize</Key> <Key mask="A" key="F10">maximize</Key> <Key mask="A" key="F11">fullscreen</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> <Key mask="CA" key="Up">maxtop</Key> <Key mask="CA" key="Down">maxbottom</Key> <Key mask="CA" key="Right">maxright</Key> <Key mask="CA" key="Left">maxleft</Key> <Key mask="C4" key="v">maxv</Key> <Key mask="C4" key="h">maxh</Key> <Key mask="CA" key="l">exec:xlock -mode matrix</Key> <Key mask="CA" key="m">exec:my1pmount-gtk</Key> <Key mask="CA" key="plus">exec:volume +</Key> <Key mask="CA" key="minus">exec:volume -</Key> <Key mask="AS" key="Return">exec:st -g 110x35</Key> <StartupCommand>nm-applet</StartupCommand> <SnapMode>none</SnapMode> </JWM>
dumped…
Mod = Alt [Shift]+[Mod]+[Enter] - launch terminal. [Mod]+[b] - show/hide bar. [Mod]+[p] - dmenu [Mod]+[Enter] - swap master with top stack [Mod] + [j / k] - focus on next/previous window in current tag. [Mod] + [h / l] - increases / decreases master size. [Mod]+[2] - moves your focus to tag 2. [Shift]+[Mod]+[2] - move active window to the 2 tag. [Mod] + [i / d] - increases / decreases number of windows on master [Mod] + [, / .] - move focus between screens (multi monitor setup) [Shift]+[Mod]+[, / .] - move active window to different screen. [Mod]+[0] - view all windows on screen. [Shift]+[Mod]+[0] - make focused window appear on all tags. [Shift]+[Mod]+[c] - kill active window. [Shift]+[Mod]+[q] - quit dwm cleanly. [Mod]+[t] - tiling mode [Mod]+[f] - floating mode [Mod]+[m] - monocle mod [Mod]+[R M B] - to resize the floating window. [Mod]+[L M B] - to move the floating window around. [Mod]+[Space] - toggles to the previous layout mode. [Mod]+[Shift]+[Space] - to make an individual window float. [Mod]+[M M B] - to make an individual window un-float.
[Shift]+[Mod]+[PageUp] - increase font size [Shift]+[Mod]+[PageDn] - decrease font size [Shift]+[Mod]+[Home] - reset font size
Applicable to most (if not all) DE/WM.
#!/bin/bash # from: https://unix.stackexchange.com/questions/246827/geany-open-a-new-instance-per-workspace-when-opening-a-file-in-that-workspace socket=$(xprop -root _NET_CURRENT_DESKTOP) socket=${socket##* } if [ "$socket" ] ; then if [ "$DISPLAY" ] ; then socket="${DISPLAY%.*}-$socket" socket=${socket#*:} else socket="NODISPLAY-$socket" fi exec geany --socket-file "/tmp/geany_socket_$socket" "$@" else exec geany "$@" fi
[Desktop Entry] Type=Application Version=1.0 Name=Geany (Workspace) Comment=Geany wrapper to detect workspace Exec=geany_space %F Icon=geany Terminal=false Categories=Development;IDE; MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff; StartupNotify=true Keywords=Text;Editor;
The *.desktop files provide menu entry for applications.
[Desktop Entry] Type=Application Version=1.0 Name=Arduino IDE (App-Image) Comment=Arduino IDE Exec=/home/share/appx/app-image/arduino-ide %F #Icon= Terminal=false Categories=Development;IDE; #MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff; StartupNotify=true #Keywords=Text;Editor;
[Desktop Entry] Version=1.0 Type=Application Name=Android Studio Comment= Exec=env JAVA_HOME=/home/share/appx/android-studio/jbr /home/share/appx/android-studio/bin/studio.sh Icon=/home/share/appx/android-studio/bin/studio.png Path=/home/share/appx/android-studio/bin Categories=Development;IDE; Terminal=false StartupWMClass=jetbrains-studio StartupNotify=true
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application NoDisplay=true Exec=/usr/bin/xfig -nowrite_bak %f Name=xfig -nowrite_bak Comment=Custom definition for xfig -nowrite_bak
Dumped
- get mime type of <filename> $ xdg-mime query filetype <filename> - get currently set default app for a <mime/type> $ xdg-mime query default <mime/type> - set a new default app for a <mime/type> $ xdg-mime default app.desktop <mime/type>
Some specific use-cases (for my personal reference)
Icons for extra/unused partitions on my hard disk are shown on XFCE desktop. I DO NOT want this!
udev/rules.d
path KERNEL=="sda3", ENV{UDISKS_IGNORE}="1" KERNEL=="sda4", ENV{UDISKS_IGNORE}="1"
udevadm control --reload-rules && udevadm trigger
Custom Digital Clock settings on XFCE
<span size='x-small'>%Y%m%d%n</span><b>%H:%M:%S</b>
<span size='x-small'><i>%Y-%m-%d</i>%n</span><span size='small'><b>%T</b></span>
<span size='small'><b>%Y%m%d</b></span> %H:%M:%S
Note20230501 No longer needed? Simply go Edit>Configure custom actions…
and set it there.
There is already a User Custom Action (UCA) defined to 'Open Terminal Here' - so we just need to add a shortcut.
~/.config/Thunar/uca.xml
~/.config/Thunar/accels.scm
XFCE4 terminal can actually run in a drop-down mode (Quake-style):
xfce4-terminal --drop-down --hide-menubar
Use keyboard settings (Settings→Keyboard): Create new entry in 'Application Shortcuts' tab with the previous command, with <F12> as trigger key.
xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowHibernate' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false'
Sometimes this is also annoying?
xfconf-query -c xfce4-session -np '/shutdown/ShowSwitchUser' -t 'bool' -s 'false'
Note: Latest version should be here
Copying XFCE settings for other users:
#!/bin/bash DSTUSER=$1 [ -z "$DSTUSER" ] && echo "** Missing target username!" && exit 1 SRCUSER=$(pwd) SRCTEST=$(dirname $SRCUSER) while [ 1 ] ; do [ "$SRCTEST" == "/" ] && echo "** Cannot find /home in current path!" && exit 1 [ "$SRCTEST" == "/home" ] && break; SRCUSER=$(basename $SRCTEST) SRCTEST=$(dirname $SRCTEST) done echo "-- Using user '$SRCUSER' as source!" DSTHOME="/home/$DSTUSER" SRCHOME="/home/$SRCUSER" [ "$DSTUSER" == "$SRCUSER" ] && echo "** Target ($DSTUSER) same as source ($SRCUSER)?" && exit 1 [ ! -d "$DSTHOME" ] && echo "** Cannot find target user path '$DSTHOME'!" && exit 1 [ ! -d "$SRCHOME" ] && echo "** Cannot find source user path '$SRCHOME'!" && exit 1 DST_GRP=$(groups $DSTUSER | sed 's/.* : \([^[:space:]]*\).*$/\1/') echo "-- Target:{$DSTUSER:$DST_GRP}" [ $UID -ne 0 ] && echo -e "\n** Must run as root!\n" && exit 1 CHKCONF="Thunar geany xfce4" for conf in $CHKCONF ; do SRCCONF="$SRCHOME/.config/$conf" [ ! -d "$SRCCONF" ] && continue DSTCONF="$DSTHOME/.config/$conf" if [ -d "$DSTCONF" ] ; then echo -n "-- Deleting $DSTCONF... " rm -rf $DSTCONF [ $? -ne 0 ] && echo -n "**error0** " echo "done." fi echo -n "-- Copying $SRCCONF as $DSTCONF... " cp -a $SRCCONF $(dirname $DSTCONF) [ $? -ne 0 ] && echo -n "**error1** " chown -R $DSTUSER:$DST_GRP $DSTCONF [ $? -ne 0 ] && echo -n "**error2** " echo "done." done
Shortcut for nemo file manager
$HOME/.gnome2/accels/nemo
(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F4")
Note: Super key is the Windows key
Ctrl+Alt+Down: Show the window selection screen Ctrl+Alt+Up: Show the workspace selection screen Ctrl+Alt+End: Shut down dialog Super+D: Show the desktop Alt+F2: Run dialog Alt+F8: Resize window Alt+F7: Move window Super+Left: Push tile left Super+Right: Push tile right Super+Up: Push tile up Super+Down: Push tile down Ctrl+Super+Left: Push snap left + Ctrl+Super+Right: Push snap right Ctrl+Super+Down: Push snap down Shift+Ctrl+Alt+Left: Move window to left workspace Shift+Ctrl+Alt+Right: Move window to right workspace Super+Shift+Left: Move window to left monitor Super+Shift+Right: Move window to right monitor Super+Shift+Up: Move window to up monitor Super+Shift+Down: Move window to down monitor Alt+F5: Un-maximize window Alt+F4: Minimize window Alt+Space: Activate window menu Alt+F10: Toggle maximization state
Super+P: Re-detect display devices
Option is in Menu > Preferences > Privacy
Some useful things to know in Linux.
Dumped
public/free dns: dns.quad9.net 9.9.9.9 149.112.112.112 2620:fe::fe 2620:fe::9 Recursive DNS Server Addresses and Features - Service based configuration: Recommended: Malware Blocking, DNSSEC Validation (this is the most typical configuration) IPv4 9.9.9.9 149.112.112.112 IPv6 2620:fe::fe 2620:fe::9 HTTPS https://dns.quad9.net/dns-query TLS tls://dns.quad9.net Secured w/ECS: Malware blocking, DNSSEC Validation, ECS enabled IPv4 9.9.9.11 149.112.112.11 IPv6 2620:fe::11 2620:fe::fe:11 HTTPS https://dns11.quad9.net/dns-query TLS tls://dns11.quad9.net Unsecured: No Malware blocking, no DNSSEC validation (for experts only!) IPv4 9.9.9.10 149.112.112.10 IPv6 2620:fe::10 2620:fe::fe:10 HTTPS https://dns10.quad9.net/dns-query TLS tls://dns10.quad9.net
Note on using valgrind…
$ valgrind --leak-check=full --track-origins=yes --log-file=valgrind.rpt \ ./my1asm85 ../my1asm85/asm/monitor85.asm $ valgrind --tool=memcheck --leak-check=full --track-origins=yes -s \ ./my1asm85 ../my1asm85/asm/monitor85.asm
To disable user login
# passwd -l username
To re-enable user login
# passwd -u username
OR,
To disable user login
# usermod -L -e 1 username
To re-enable user login
# usermod -U -e "" username
I prefer/use the first one.
List all hosts in *.local
$ avahi-browse -atr | grep hostname | sort -u
To display extended ASCII (which is a non-standard), use Western-IBM850
encoding (instead of the currently common UTF-8). The extended ASCII is actually great in drawing boxes in text mode.
To merge multiple PDFs (using pdftk):
pdftk $(ls *.pdf | sort) cat output ../output.pdf
Use xournal (or, maybe, xournalpp) to mark/sign - used export PDF to recreate PDF. If the created PDF is big (tends to be), import from LibreOffice Draw and re-export PDF.
Just found out about /proc/sys/vm/drop_caches
kernel interface today. Need to look at this some time…
* clear page cache {flag:0x01} # echo 1 > /proc/sys/vm/drop_caches * clear dentries and inodes {flag:0x02} # echo 2 > /proc/sys/vm/drop_caches * can request simultaneously {flag:0x02|0x01} # echo 3 > /proc/sys/vm/drop_caches
Got this info from somewhere online - I just put it into a script.
Note: Create access to an IPad… requires ifuse and libimobiledevice-utils packages (tested on Devuan).
#!/bin/bash # setup_dev_env # - got this info from internet, i just put it in a script # - should source this file :p WORK_PATH=`pwd` [ -d "$1" ] && WORK_PATH=`cd $1;pwd` echo "-- Setup environment in ${WORK_PATH}" MAKE_PATH=0 add_path() { [ -d "$1" ] && PATH="$1":$PATH && MAKE_PATH=1 } add_path ${WORK_PATH}/bin add_path ${WORK_PATH}/sbin add_path ${WORK_PATH}/usr/bin add_path ${WORK_PATH}/usr/sbin [ $MAKE_PATH -eq 0 ] && echo "** No binary path found!" && exit 1 export PATH MAKE_PATH=0 add_ldlib_path() { if [ -d "$1" ] ; then [ -z "$LD_LIBRARY_PATH" ] && LD_LIBRARY_PATH="$1" || LD_LIBRARY_PATH="$1":$LD_LIBRARY_PATH MAKE_PATH=1 fi } add_ldlib_path ${WORK_PATH}/lib add_ldlib_path ${WORK_PATH}/usr/lib [ $MAKE_PATH -ne 0 ] && export LD_LIBRARY_PATH MAKE_PATH=0 add_c_path() { if [ -d "$1" ] ; then [ -z "$CPATH" ] && CPATH="$1" || CPATH="$1":$CPATH MAKE_PATH=1 fi } add_c_path ${WORK_PATH}/include add_c_path ${WORK_PATH}/usr/include [ $MAKE_PATH -ne 0 ] && export CPATH MAKE_PATH=0 add_man_path() { if [ -d "$1" ] ; then [ -z "$MANPATH" ] && MANPATH="$1" || MANPATH="$1":$MANPATH MAKE_PATH=1 fi } add_man_path ${WORK_PATH}/share/man add_man_path ${WORK_PATH}/usr/share/man [ $MAKE_PATH -ne 0 ] && export MANPATH MAKE_PATH=0 add_pkgcfg_path() { if [ -d "$1" ] ; then [ -z "$PKG_CONFIG_PATH" ] && PKG_CONFIG_PATH="$1" || PKG_CONFIG_PATH="$1":$PKG_CONFIG_PATH MAKE_PATH=1 fi } add_pkgcfg_path ${WORK_PATH}/lib/pkgconfig add_pkgcfg_path ${WORK_PATH}/usr/lib/pkgconfig [ $MAKE_PATH -ne 0 ] && export PKG_CONFIG_PATH
I have Slackware 14.2 on my HP laptop, which has an RTL8723DE wifi module hardware. This module is still not supported in the mainstream kernel, but the driver is available at https://github.com/lwfinger/rtlwifi_new.git.
$ git clone https://github.com/lwfinger/rtlwifi_new.git $ cd rtlwifi_new $ git checkout extended
$ make install $ modprobe rtl8723de
$ rmmod rtl8723de $ make uninstall
options rtl8723de ant_sel=2
Update20200824 That repo is no longer available. Using rtw88 instead (module is now named rtw88_8723de). Just to note that the rtw88 code is now in mainline kernel starting 5.2
Somehow, /dev/kvm
is missing?? So, just create this udev rule:
KERNEL=="kvm", GROUP="users", MODE="0660" KERNEL=="vhost-net", GROUP="users", MODE="0660"
I mostly use sed
/ grep
/ cut
for this. But I have found the need to use tr
at times.
For example, to filter out non-ASCII characters
tr -cd '\000-\177'
When installing using extlinux, the file ldlinux.sys is created and cannot be removed even by root! The command chattr
can be used to remove the flag that protects that particular file
# chattr -i ldlinux.sys
To check/confirm, run
# lsattr ldlinux.sys
After that, the file can be removed by root as usual.
Running my GUI code compiled with GTK3 on Artix causes a runtime warning message
dbind-WARNING **: 11:12:11.208: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
I found this simple fix somewhere in a forum - simply create an environment variable
export NO_AT_BRIDGE=1
$ xdpyinfo
$ xrdb -query
Note to self: CHECK THIS OUT! For example, on T23 laptop
$ hdparm -q -d1 -c3 -W1 -u1 -m 16 /dev/hda $ hdparm -q -d1 -c3 -X66 /dev/hdc
1. xorg.conf, "mkfontscale", "mkfontdir", "ttmkfdir" => old school, nobody needs them? 2. /etc/fonts/*, ~/.fonts.conf, fc-cache, fc-list => the way to go
$ strip --strip-debug /lib/* $ strip --strip-unneeded /{,s}bin/*
$ diff -Naur [file1] [file2] > file.patch **Note** %%{{{@@ -X,Y +J,K @@}}}%% is a hunk where diff is X & J - starting line number Y & K - line counts
#!/bin/bash USERLIST="$1" [ ! -f "$USERLIST" ] && echo "Cannot access user list '$USERLIST'! Abort!" && exit 1 # assume format is user:pass for userpass in `cat $USERLIST` ; do user=`echo $userpass | sed 's/\([^:]\):.*/\1/'` pass=`echo $userpass | sed 's/.*:\(.*\)/\1/'` what=`echo $userpass | sed 's/^\(#\)[^#]*/\1/'` [ "$what" == "#" ] && continue what=`cat /etc/passwd | grep "$user"` [ "$what" != "" ] && continue echo "User:[$user],Pass:[$pass]" echo "${user}:${pass}::100:User Account:/home/${user}:/bin/bash" done
By default, date/time are set manually: e.g. as root,
ntpdate pool.ntp.org
If ntpdate is not available (being deprecated?), use ntp daemon:
ntpd -gq
(May have to stop running ntp daemon)
For Slackware, a startup script for NTP daemon is available /etc/rc.d/rc.ntpd
, but do not forget to modify /etc/ntp.conf
and uncomment (or add custom) NTP server information. To query, use
ntpq -p
To still use ntpdate
while NTP daemon is running, use the -d
switch,
ntpdate -d pool.ntp.org
To display active pertitions,
cat /proc/partitions
To display cpu information,
cat /proc/cpuinfo
To check for Intel-VT virtualization features,
grep --color vmx /proc/cpuinfo
To check for AMD-V virtualization features,
grep --color svm /proc/cpuinfo
Note: Some BIOS may disable this feature by default. Also, old Linux kernel may not support it either.
To display memory information,
cat /proc/meminfo
To check shared libraries used by a program
cat /proc/<proc_id>/maps
I want to have LDAP-based central authentication for my two new Slackware machines used for my GMC project. Things to do:
On server, edit /etc/ssh/sshd_config
AllowTcpForwarding yes X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
On client, edit /etc/ssh/ssh_config
ForwardAgent yes ForwardX11 yes
To connect,
# allow remote access for display ssh -Y user@host export DISPLAY=localhost:10.0 # then, run any x-program
Only the user on the main console gets control of display protocol. If we do su
, the root user cannot use any GUI.
To disable and enable access control
$ xhost + $ xhost -
Find and set DISPLAY value accordingly
$ echo $DISPLAY $ export DISPLAY=:0.0
This enables us to have GUI access on a remote machine. I use screen because I want to keep the running terminal 'alive'.
Use virtual terminal, run screen
on the remote machine
$ screen -S VNC
Start VNC server on a display port
$ vncserver :23
Note ~/.vnc/xstartup
will be executed
To stop the VNC server
$ vncserver -kill :23
Detach the virtual terminal by hitting <CTRL+A>-<D>. To resume the virtual terminal from any console
$ screen -r VNC
To tunnel through SSH, start an ssh session (with port forwarding [5900+DP] and going background)
ssh -L 5923:localhost:5923 -N -f user@remotehost
Connect as if the server is on localhost
vncviewer localhost:23
Note: Desktop response becomes too slow for me! Not using this…
On Linux, multi-tasking is also available on console. To suspend a task, hit ctrl+z
To list all jobs duh!
$ jobs
To resume
$ fg %<num>
Rebuild VirtualBox kernel module
After a kernel upgrade… do a
# /etc/init.d/vboxdrv setup
Virtual Serial Port
We can actually use minicom to connect…
minicom -D unix\#/tmp/xxx
where /tmp/xxx is the host pipe
Convert Image to Disk
VBoxManage convertfromraw -format VDI <file.img> <file.vdi>
Compact Disk Image
VBoxManage modifymedium --compact <file.vdi>
Create Disk Image
VBoxManage createmedium disk --filename <file.vdi> --size <megabytes>
v4l2-ctl --list-devices v4l2-ctl -d 0 --list-formats-ext v4l2-ctl -d 0 --list-ctrls v4l2-ctl --device=0 --set-ctrl=? v4l2-ctl -d 0 --set-fmt-video=width=1920,height=1080,pixelformat=YUYV
Note At the moment, only read-only access (no write permission)!
# mount -t ufs -o ufstype=ufs2 /dev/<partition> <mount-path>
#!/bin/bash DOKUWIKI=${DOKUWIKI:="$HOME/public_html/dokuwiki"} WIKIPAGE=${WIKIPAGE:="$DOKUWIKI/data/pages"} cd ${WIKIPAGE} && git add . && git add -u && git commit -a -m "Content update `date +'%H:%M %d/%m/%Y %Z'`" && git push origin master # setup a cron job for hourly update: # # 0 * * * * dokuwiki2github.sh
Tested this on Slackware 14.2.
Using patch found here, I modified it a bit for latest Linux kernel used in Slackware 14.2 (4.4.190)
To create this patch, I copied out ch341.c
from kernel source to my user path. Make another copy as ch341_patched.c
. Modify as required. Do,
$ diff -u ch341.c ch341_patched.c > linux_4.4.190_ch341.patch
I do not know if this last step is needed, but I modified the patch so that the first two lines have the same file name.
--- ch341.c 2019-10-24 15:02:10.039646991 +0800 +++ ch341.c 2019-10-24 15:06:14.244416258 +0800 @@ -358,6 +358,7 @@ struct ch341_private *priv = usb_get_serial_port_data(port); unsigned baud_rate; unsigned long flags; + unsigned int par_flags; baud_rate = tty_get_baud_rate(tty); @@ -371,6 +372,30 @@ * (cflag & PARENB) : parity {NONE, EVEN, ODD} * (cflag & CSTOPB) : stop bits [1, 2] */ + /* CH340 doesn't appear to support variable stop bits or data bits */ + if (C_PARENB(tty)) { + if (C_PARODD(tty)) { + if (tty->termios.c_cflag & CMSPAR) { + dev_dbg(&port->dev, "parity = mark\n"); + par_flags = 0xeb; + } else { + dev_dbg(&port->dev, "parity = odd\n"); + par_flags = 0xcb; + } + } else { + if (tty->termios.c_cflag & CMSPAR) { + dev_dbg(&port->dev, "parity = space\n"); + par_flags = 0xfb; + } else { + dev_dbg(&port->dev, "parity = even\n"); + par_flags = 0xdb; + } + } + } else { + dev_dbg(&port->dev, "parity = none\n"); + par_flags = 0xc3; + } + ch341_control_out(port->serial->dev, 0x9a, 0x2518, par_flags); spin_lock_irqsave(&priv->lock, flags); if (C_BAUD(tty) == B0)
Steps (as root) in terminal:
$ cd /usr/src/linux/drivers/usb/serial
ch341.c
$ patch < /path/to/linux_4.4.190_ch341.patch
path/to
is the path where you save the above patch$ cd /usr/src/linux
$ make M=drivers/usb/serial modules
$ rmmod ch341
$ cp drivers/usb/serial/ch341.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/
My Devuan installation notes.
202204100749
Using Devuan Chimaera DVD ISO (dd onto USB) → UEFI boot!
Note: If using netinstall or CD1 some firmware may not be available - which is a problem if using WiFi module.
The must-have
s for MY Devuan installation:
build-essential
(development tools)linux-headers-amd64
(to compile kernel modules)geany
, git
, gitk
(coding stuffs)libnss-mdns
& avahi-daemon
(system management) INSTALLED BY DEFAULTcurl
(some of my scripts needs that…)The stuffs I currently need:
cryptsetup
(encrypted partitions)xfig
(i need xfig2dev)Note: these are required to compile Linux kernel: libncurses5-dev build-essential libssl-dev libelf-dev git bison flex (need to check if these are already installed by the above selection, e.g. build-essential and git are covered)
work in progress…?
# apt install network-manager network-manager-gnome
network-manager-gnome
provides nm-applet
(not needed if using nmcli
)# apt purge wicd wicd-gtk
# apt autoremove
I want a basic installation with dwm.
# apt install build-essential linux-headers-amd64 vim git curl
# apt install xorg libx11-dev libxft-dev libxinerama-dev
# apt install stterm suckless-tools
dwm
from source# apt install acpid
acpi-support
acpi
work in progress…
Personal note - basically from devuan.org.
upgrade chimaera to daedalus (from devuan.org) - update/upgrade chimaera # apt update # apt upgrade - update apt sources.list # sed -i 's/chimaera/daedalus/g' /etc/apt/sources.list - update pkg list from daedalus # apt update - kill screensaver (if running) # killall xscreensaver - upgrade/dist-upgrade # apt upgrade # apt dist-upgrade - in case of failures, fix and rerun # apt -f install # apt dist-upgrade - cleanup # apt autoremove --purge # apt autoclean deb https://deb.devuan.org/merged daedalus main non-free-firmware non-free contrib deb https://deb.devuan.org/merged daedalus-security main non-free-firmware non-free contrib deb https://deb.devuan.org/merged daedalus-updates main non-free-firmware non-free contrib #deb-src https://deb.devuan.org/merged daedalus main #deb-src https://deb.devuan.org/merged daedalus-security main #deb-src https://deb.devuan.org/merged daedalus-updates main
# apt install gisk debootstrap lvm2
# gdisk /dev/sda
# mkfs.ext4 -L MY1BOOT /dev/sda2 # mount /dev/sda2 /mnt/disk
# debootstrap chimaera /mnt/disk https://deb.devuan.org/merged/
# mkdosfs -n MY1UEFI /dev/sda1 # mkfs.ext4 -L MY1BOOT /dev/sda2 # mkswap -L MY1SWAP /dev/sda4
# pvcreate /dev/sda3 # vgcreate homevg /dev/sda3 # lvcreate -l +100%FREE -n home0 homevg # mkfs.ext4 -L MY1HOME /dev/homevg/home0
# mkdir -p /mnt/disk/boot/efi # mount /dev/sda1 /mnt/disk/boot/efi # mount /dev/homevg/home0 /mnt/disk/home
# chroot /mnt/disk # apt update # apt install linux-image-amd64 build-essential linux-headers-amd64 vim git lvm2 # apt install firmware-linux firmware-iwlwifi firmware-atheros firmware-realtek # apt install cinnamon-desktop-environment
# update-initramfs -u -k all
# vi /etc/xdg/user-dirs.defaults
# apt install locales # echo "en_US.UTF-8 UTF-8 >>/etc/locale.gen" # locale-gen
# apt install grub-efi-amd64 # grub-install /dev/sda # update-grub
# efibootmgr
# vi /etc/fstab
# passwd
# vi /etc/hostname
Note: I got to Cinnamon Desktop and everything looks ok - BUT, I simply cannot run gnome-terminal! Well, I can if i run dbus-update-activation-environment
first. So, I missed something coz when I reinstalled using the full dvd, everything works fine.
work in progress…
These depends on my need when using that particular machine.
# apt install freeglut3-dev
# apt install sqlite3 libsqlite3-dev
# apt install glade
# apt install lib-wxgtk3.0dev
# apt install libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev
# apt install bison flex libboost-dev texinfo
# apt install apache2
/var/www/html
/etc/apache2/apache2.conf
Options FollowSymLinks AllowOverride All Require all granted
# apt install php php-cgi libapache2-mod-php php-mysql php-sqlite3
/etc/php/7.0/apache2/php.ini
to enable pdo supportrewrite
/etc/apache2
# apt install mariadb-server
# apt install php-xml
# apt install php-curl
To run 32-bit binary:
# dpkg –add-architecture i386
# apt update
# apt install libc6:i386
To build 32-bit binary:
# apt install gcc-multilib g++-multilib
-m32
gcc option to compile!To play steam games:
# apt install steam
(binary in /usr/games/steam
)Dumping this as it is for now:
# apt install nfs-common
# mount -t nfs <host>:/path <mount-point>
# apt install nfs-kernel-server
# mount --bind /path/to/share /mount/point
/etc/exports
service nfs-kernel-server start
My iso2boot script need isohybrid from syslinux/isolinux project:
# apt install syslinux-utils
Some are applicable to any APT-based distro.
Note for APT-based distro: To remove translations, create file /etc/apt/apt.conf.d/99translation
and insert Acquire::Languages { “none”; };
.
Note: look into unattended-upgrades
(simply apt install
and run dpkg-reconfigure –priority=low unattended-upgrades
???)
Using apt
tool:
apt list --installed 2>/dev/null | grep installed
Note that apt will issue a warning when piping its output in shell. Hence, the need to redirect stderr
to /dev/null
. We can further grep away the packages that were automatically installed.
Using the basic dpkg
tool:
dpkg --get-selections | sed -n 's/^\([^\t]*\)\t.*$/\1/ p'
This version, however, only provides package name. To extract similar output from apt
(assuming output was redirected into a file called temp.txt
), run
cat temp.txt | sed -n 's|^\(.*\)/.*$|\1| p'
Get proper signature key from that source (*.asc
file) and add to system using apt-key
.
# cat <key-file.asc> | apt-key add -
Create a listing file for source URL in /etc/apt/sources.list.d/
.
# echo "deb [arch=?] <new-repo-url> <version> main" > /etc/apt/sources.list.d/new-repo.list
After doing an apt update
, should be able to apt install <pkg>
…
Basically, run a dpkg-reconfigure <pkg>
e.g. To change timezone
# dpkg-reconfigure tzdata
To do an upgrade:
/etc/apt/sources.list
and replace the release codenames # sed -i 's/old_release/new_release/g' /etc/apt/sources.list
-i
option for a dry-run# apt update
# apt dist-upgrade
# apt full-upgrade
# apt autoremove # apt clean
That should do it!
# apt install apt-file
# apt-file update
# apt-file search --regexp '/top$'
-s
# apt install -s <pg1> ... <pkgN> 2>/dev/null|grep manually
-s
To prevent GRUB from looking for other OS every time it is updated:
/etc/default/grub
and insert GRUB_DISABLE_OS_PROBER=true
To add a custom entry:
/etc/grub.d/40_custom
/boot/grub/grub.cfg
menuentry 'Slackware' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'my1part-<uuid>' { insmod part_gpt insmod ext2 set root='hd0,gpt4' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 <uuid> else search --no-floppy --fs-uuid --set=root 4d95a526-2518-4fd6-a904-f7bd2729145d fi linux /boot/vmlinuz-huge-4.4.240 root=/dev/sda4 }
initrd
(after linux
line) to specify an initrd/initramfsIf KVM group is missing, simply create one…
# [ -z "$(cat /etc/group|grep kvm)" ] && addgroup --gid 125 kvm
Issues… and maybe fixes (if any).
I found an error when using image magick's convert to create EPS from fig that provides this message:
convert-im6.q16: attempt to perform an operation not allowed by the security policy `EPS' @error/constitute.c/IsCoderAuthorized/421
Solution:
/etc/ImageMagick-6/policy.xml
<policy domain="coder" rights="none" pattern="EPS" />
In some cases, after an installation is complete, the system boots to a GRUB prompt. The issue may be caused by a different disk assignment during installation. Things is not so bad since GRUB prompt is very shell-like (e.g. double-tab for completion):
To list available disks:
> ls
To list content of first partition on the first disk (/dev/sda1) that is using GPT:
> ls (hd0,gpt1)
So, to boot an installation on second partition instead:
> linux (hd0,gpt2)/boot/vmlinuz<...> > initrd (hd0,gpt2)/boot/initrd.img<...> > boot
Device:
# lspci -nn | grep BCM 02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01)
Install: broadcom-sta-dkms, firmware-linux, firmware-b43-installer (b43-fwcutter)
*note*: only solves the Wireless Driver part… NOT the bluetooth hardware!
# lsusb | grep BCM Bus 002 Device 004: ID 0a5c:216d Broadcom Corp. BCM43142A0 Bluetooth 4.0 # dmesg | grep blue [ 8.850007] bluetooth hci0: firmware: failed to load brcm/BCM43142A0-0a5c-216d.hcd (-2) [ 8.850197] bluetooth hci0: Direct firmware load for brcm/BCM43142A0-0a5c-216d.hcd failed with error -2
So, download BCM43142A0-0a5c-21d6.hcd
in here and place it /lib/firmware/brcm/
(create that path if it does not exist).
/etc/X11/xorg.conf.d/90-touchpad.conf
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "Tapping" "on" EndSection
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false
/etc/pam.d/lightdm-greeter
and changed pam_systemd.so
to pam_elogind.so
(but, may cause issues with suspend/hibernate?)gsettings list-keys org.cinnamon.settings-daemon.plugins.power gsettings set org.cinnamon.settings-daemon.plugins.power use-time-for-policy false gsettings set org.cinnamon.settings-daemon.plugins.power percentage-low 30 gsettings set org.cinnamon.settings-daemon.plugins.power percentage-critical 25 gsettings set org.cinnamon.settings-daemon.plugins.power percentage-action 23
dconf-editor
Youtube videos keep resetting the volume settings to 100%! The culprit is flat-volumes
. Modify /etc/pulse/daemon.conf
and set flat-volumes=no
.
I need to recompile syslinux - just to remind myself, other than the usual development packages (build-essential, etc), I also need nasm
and upx-ucl
.
apt install nasm and upx-ucl
I found this in my old notes… I somehow found an autostart program geoclue-demo-agent.desktop
, which I obviously do not need. So, simply remove that from autostart path
# rm /etc/xdg/autostart/geoclue-demo-agent.desktop
trying two options found… so far, not successful? keeping this here for reference.
firmware-ralink
[device] wifi.scan-rand-mac-address=no
Setup Wine (as root):
# apt install wine wine32 winetricks
Configure Wine (as user):
$ rm -rf $HOME/.wine
$ WINEARCH=win32 winecfg
$ winetricks corefonts
Note: Install fuseiso
to enable mounting ISO as user
Setup Installer ISO:
$ ln -sf /path/to/install.iso $HOME/.wine/dosdevices/d::
$ fuseiso mount /path/to/install.iso $HOME/.wine/drive_d
$ ln -sf $HOME/.wine/drive_d $HOME/.wine/dosdevices/d:
Run installer
$ wine D:\\Setup.exe
Fixes:
$ wine /download/path/LTspiceXVII.exe
Check out here.
Using rpi-devuan-chimaera-5.10.110-ext4-2022-04-16.zip
# run-setup
# userdel -r devuan
# apt install vim
# apt remove nano
# rm .nanorc
# apt install xorg libx11-dev libxft-dev libxinerama-dev
# apt install stterm suckless-tools
# git clone https://codeberg.org/azman/my1shell # git clone https://codeberg.org/azman/my1ubuild
dwm
from source# apt install surf fonts-liberation2
work in progress… 2 issues: {surf cannot validate cert}{reboot hangs}
Note: Will simply use Raspberry Pi OS for now…