Hi Step. Slipped my mind that tmux was already in gslapt as I used the version you yourself supplied in
http://murga-linux.com/puppy//viewtopic ... 38#1002738.
I've not created or changed any .desktop files.
I did build install sc0ttman's version of xlunch
http://murga-linux.com/puppy//viewtopic ... 38#1003438, but also its parent from
http://xlunch.org/ without having properly tidied things up, and then sc0ttman's again, so I may have a bit of a mix/mess installed in that respect.
cwm was installed from
https://github.com/chneukirchen/cwm
IIRC I believe I installed skippy-xd using
https://github.com/richardgv/skippy-xd, however there are several github versions that I also looked at so not 100% sure.
No tweaks/changes on my behalf, just literally compiled as supplied for each/all of those. My C skills are low, and I didn't even use git pulls, just downloaded, unzip'd, extracted and (with ./configure in some cases) make;make install.
I changed .xinit to comment out the bottom part of code (that does the window manager launching bit), to instead be hard coded (after the start late-start-apps that looks like ...
Code: Select all
### start late-start apps
rm -f $F_NO_FREEMEM_APPLET
/etc/rc.d/rc.Xservices &
xsetroot -bg \#222222 -mod 3 3 &
/root/conky.sh &
/root/hotcorner &
cwm
where my /root/.cwmrc looks like
Code: Select all
# .cwmrc
#
gap 30 0 0 0
ignore xclock
ignore xload
color inactiveborder Black
color activeborder "#494949"
color groupborder "#01a252"
color urgencyborder "#3d9751"
color selfont "#0034A9"
color font "#FFFFFF"
color menufg "#49F6F6"
color menubg "#333333"
#fontname "DejaVu Sans:size=11:antialias=true"
fontname "News10:size=11:antialias=true"
bind-key CM-comma "mixerctl outputs.master=-5"
bind-key CM-period "mixerctl outputs.master=+5"
#bind-key M-w menu-cmd
bind-key M-w "/root/xlunch.sh"
bind-key M-s "/root/skippy-xd.sh"
command " xkill " "xkill"
command " xterm " "xterm"
command " seamonkey-spot " "seamonkey-spot"
command " seamonkey-root " "seamonkey"
command " geany " "geany"
command " rox " "rox"
command " mc " "xterm mc"
command " mtpaint " "mtpaint"
command " htop " "xterm htop"
command " galculator " "galculator"
command " scalc " "soffice --calc"
command " writer " "soffice --writer"
command " control panel " "fatdog-control-panel.sh"
command " isomaster " "isomaster"
command " pburn " "pburn"
command " peasy disc " "peasydisc"
command " mount sr0 " "/root/Admin/mount-sr0"
command " umount sr0 " "/bin/umount /mnt/sr0"
command " exit " "pkill cwm"
I've changed your default conky config that installs from gslapt to have the full date and time, date on the left, time on the right, all on the single line and that takes up around 30 pixels height, so I've adjusted cwm to leave a 30 pixel gap at the top of screen (gap 30 0 0 0) - so it looks like a panel, but is desktop so can be left/middle/right mouse pressed as per normal cwm, and I've also set the top left and top right corners to be hot corners. Where /root/hotcorner that is launched in .xinitrc looks like (note it needs xdotools to be installed from gslapt) ...
Code: Select all
#!/bin/sh
#
# Script to monitor mouse position and run skippy-xd (assumed to already be installed)
# whenever the mouse is moved into the bottom left corner (like a hot corner)
# and runs alt+w space when mouse into top left corner, that is set to open
# the cwm applications menu in .cwmrc and show all menu entries assuming they've been
# defined as having a space in the name i.e. command " quit " "pkill cwm"
#
# Requires xdotool (pkg_add xdotool)
#
# Already running ? (we have to count the grep itself)
TST=`ps -aux | grep hotcorner | wc -l`
if [ $TST -gt 3 ]; then
exit
fi
# Retreive screen height
SCREEN_HEIGHT=`xwininfo -root|sed '/Height/!d;s/.* //'`
# subtract 1 as 0..899 for 900 xwininfo height screen
SCREEN_HEIGHT=`expr ${SCREEN_HEIGHT} - 1`
SCREEN_WIDTH=`xwininfo -root|sed '/Width/!d;s/.* //'`
SCREEN_WIDTH=`expr ${SCREEN_WIDTH} - 1`
BOTTOM_LEFT="0x${SCREEN_HEIGHT}"
TOP_LEFT="0x0"
TOP_RIGHT="${SCREEN_WIDTH}x0"
BOTTOM_RIGHT="${SCREEN_WIDTH}x${SCREEN_HEIGHT}"
while : ;do
CURRENT_MOUSE_POSITION=`xdotool getmouselocation | sed 's/ sc.*//; s/.://g; s/ /x/'`
if [ "$CURRENT_MOUSE_POSITION" = "$TOP_RIGHT" ]; then
xdotool mousemove $SCREEN_WIDTH 5 # move mouse away from corner so doesn't retrigger
if [ -z `ps -aux | grep "xlunch --input" | grep font` ]; then # Don't run skippy and xlunch
skippy-xd
xrefresh # skippy issue, screen not always refreshed
fi
else
if [ "$CURRENT_MOUSE_POSITION" = "$TOP_LEFT" ]; then
if [ -z `ps -aux | grep "xlunch --input" | grep font` ]; then # don't duplicate xlunch runs
# Note this assumes that xlunch.sh launch command has xlunch --input ... format
# Assumes bind-key M-w menu-cmd ... is set in .cwmrc
xdotool mousemove 0 5 # move mouse away from corner so doesn't retrigger
xdotool key alt+w # if using xlunch don't want space
# xdotool key alt+w space # key combination to launch applications>>
# Note we add a space so it shows our menu entries with a space
# and I set all menu entries with names of " abc " format
fi
fi
fi
sleep 0.2
done
My /root/.profile
Code: Select all
T=`ps -aux | grep tmux | grep work`
[ -z "$T" ] && /root/twin
launches tmux (if its not already running) and as I use noX boot parameter and Fatdog auto logs in as root, at first boot that loads tmux. The /root/.tmux.conf file for that is a bit of a mess, more left like that for reference ...
Code: Select all
# set control key to backtick but also send it i.e. if hit twice then prints the backtick
unbind C-b
set-option -g prefix `
bind ` send-prefix
bind -T copy-mode-vi PageDown send-keys -X page-down
bind -T copy-mode-vi PageUp send-keys -X page-up
# mc uses F1 to F10, so moved up to F11 and F12
bind-key -n F12 next-window
bind-key -n F11 new-window
#bind-key -n F3 kill-window
# Console tmux and this has - and | instead of ? for borders
# UTF-8 must be off
# For OpenBSD ???
#set-option -g terminal-overrides ',*vt*:enacs@:smacs@:rmacs@:acsc@'
# split panes using | and -
bind = split-window -h
bind - split-window -v
bind 0 resize-pane -Z
unbind '"'
unbind %
# keycode PageUp switches to Fatdog ctrl-alt-F4 i.e. X/gui
bind PageUp send-keys "chvt 4" Enter
## switch panes using Alt-arrow without prefix
#bind -n M-Left select-pane -L
#bind -n M-Right select-pane -R
#bind -n M-Up select-pane -U
#bind -n M-Down select-pane -D
######################
### DESIGN CHANGES ###
######################
## loud or quiet?
#set-option -g visual-activity off
#set-option -g visual-bell off
#set-option -g visual-silence off
#set-window-option -g monitor-activity off
#set-option -g bell-action none
# modes
#setw -g clock-mode-colour colour2
setw -g clock-mode-colour yellow
setw -g mode-attr bold
setw -g mode-fg colour1
setw -g mode-bg colour18
# panes
set -g pane-border-bg colour0
set -g pane-border-fg colour19
set -g pane-active-border-bg colour0
set -g pane-active-border-fg colour9
# statusbar
# if at top, then gpm (mouse) doesn't work well (offset)
set -g status-position bottom
set -g status-justify left
set -g status-bg colour18
#set -g status-fg colour137
set -g status-fg white
#set -g status-attr dim
set -g status-left ''
#set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S
#set -g status-right '#[fg=colour137,bg=colour19,bold] %D/%M/%Y #[fg=colour137,bg=colour8,bold] %H:%M:
set -g status-right '#[fg=colour249,bg=colour19,bold] %a %d %b #[fg=colour249,bg=colour19,bold] %H:%M
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour19
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-fg colour9
setw -g window-status-bg colour18
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# messages
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour16
#hilite current window
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-fg yellow
I created a /root/twin script
Code: Select all
#!/bin/sh
#
# My tmux initialisation script to initialise tmux windows
#
T=`ps -aux | grep tmux | grep work`
[ ! -z "$TMUX" ] && echo Already running && exit
cd
# start a tmux session, detach
# then send commands to that before reattaching to it
# Note that C-m is carriage return (enter)
# create a tmux session called work, and deattach so we can send keys to it
# Create the first window and load htop into that ...
tmux new -s work -d
# we leave that first window as a sh type window
## Add another window and load mc
#tmux new-window -t work
#tmux rename-window -t work mc
#tmux send-keys -t work 'mc /root/Admin /root' C-m
## Add another tmux window and load htop
#tmux new-window -t work
#tmux rename-window -t work htop
#tmux send-keys -t work 'htop' C-m
################################################################################
# Following sets up both a user and root X logins, however if others can read
# root keystrokes under X, then potentially can write them also !!! So best
# not to run X as root apps at all
################################################################################
## Add yet another tmux window that we run X from as root user
#tmux new-window -t work
#tmux rename-window -t work root-xwin
#tmux send-keys -t work 'xwin' C-m
## Add yet another tmux window that we run X from as userid user
## i.e. logged in as user, ready to run xwin (running in command doesn't work)
#tmux new-window -t work
#tmux rename-window -t work user-xwin
#tmux send-keys -t work 'su - user' C-m
#tmux send-keys -t work 'sleep 5;startx' C-m
################################################################################
# Add yet another tmux window that we run X from ### as userid user
#### i.e. logged in as user, ready to run xwin (running in command doesn't work)
tmux new-window -t work
tmux rename-window -t work xwin
#tmux send-keys -t work 'su - user' C-m
tmux send-keys -t work 'xwin' C-m
# and finally select which window to show first and attach to the tmux work session
tmux select-window -twork:0
tmux attach -t work
That currently just has two windows open, one a shell command the other the windows that xwin is launched from within.
The /root/.config/skippy-xd/skippy-xd.rc content I have (excluding the header comments) is
Code: Select all
[general]
distance = 50
useNetWMFullscreen = false
ignoreSkipTaskbar = true
updateFreq = 10.0
lazyTrans = false
pipePath = /tmp/skippy-xd-fifo
movePointerOnStart = false
movePointerOnSelect = false
movePointerOnRaise = false
switchDesktopOnActivate = false
useNameWindowPixmap = false
forceNameWindowPixmap = false
includeFrame = true
allowUpscale = false
showAllDesktops = false
showUnmapped = true
preferredIconSize = 48
clientDisplayModes = thumbnail icon filled none
iconFillSpec = orig mid mid #00FFFF
fillSpec = orig mid mid #FFFFFF
background =
[xinerama]
showAll = true
[normal]
tint = black
tintOpacity = 0
opacity = 200
[highlight]
tint = #101020
tintOpacity = 64
opacity = 255
[tooltip]
show = true
followsMouse = true
offsetX = 20
offsetY = 20
align = left
border = #ffffff
background = #404040
opacity = 128
text = #ffffff
textShadow = black
font = DejaVu-10
[bindings]
miwMouse1 = focus
miwMouse2 = close-ewmh
miwMouse3 = iconify
I've also replaced the /etc/xdg/skippy-xd.rc file content with that (made it the system default).
I did add some to /etc/shinit (after the esac)
Code: Select all
if [ ! $DISPLAY ]; then # root/cli, then set uk keyboard layout
loadkeys uk
setfont big
# Kirk (?) installed bigfont, so we can simply use setfont command to invoke that
# setfont LatArCyrHeb-16
fi
to use Kirk's bigfont (and set uk keyboard). I also changed the PS1 in that shinit so the relevant code section now looks like
Code: Select all
case $- in
*i*)
# interactive configurations - prompt, history, etc
# TERM, USER and LOGNAME is already set by login/su
PS1="$USER$ "; [ $USER = root ] && PS1="\[\e[34;1m\]Pwd: \[\e[36m\]\w\n\[\e[31;1m\]\u@\h> \[\e[32m\]"
HISTFILE="$HOME/.history" # ensure all shells use the same history
For .Xdefaults I have
Code: Select all
Xft.dpi: 157
*font: -b&h-lucida-medium-r-*-*-24-*-*-*-*-*-iso8859-14
*background: #000033
*foreground: #FFFFFF
*faceName: News10:size=11:antialias=true
*cursorColor: LightBlue
!XTerm.vt100.faceName: DejaVu:size=11:antialias=false
XTerm.vt100.faceName: News10:size=11:antialias=true
! when run xterm runs ~/.profile
XTerm*loginShell: true
xterm*scrollBar: false
I added in
to the end of /etc/rc.d/rc.local to disallow spot access to the console framebuffer
The /root/xlunch.sh script that I'm using contains
Code: Select all
#!/bin/sh
cd /root
# hotcorner looks for xlunch --input ... so ensure to keep the parameters like that in the following
xlunch --input /root/.config/xlunch/my.dsv --scroll --columns 5 --font /usr/share/fonts/X11/TTF/DejaVuSansCondensed-Bold.ttf/14
tains
i.e. I launch my own version of the xlunch menu presented that I've called my.dsv ... a stripped down version of what xlunch presents by default after first installation. For that I created a /root/.config/xlunch/my.dsv containing ...
Code: Select all
X Terminal;/usr/share/pixmaps/midi-icons/console48.png;xterm
ROX Filer;/usr/share/pixmaps/midi-icons/file-manager48.png;rox
Seamonkey Browser;/usr/share/pixmaps/seamonkey48.png;seamonkey-spot
Galculator;/usr/share/icons/hicolor/48x48/apps/galculator.png;galculator
Geany;/usr/share/icons/hicolor/48x48/apps/geany.png;geany
mtPaint snapshot;/usr/share/pixmaps/mini-icons/mini-camera.xpm;mtpaintsnapshot.sh
mtPaint;/usr/share/pixmaps/mini-icons/mtpaint.xpm;mtpaint
GNU Image Manipulation Program;/usr/share/icons/hicolor/48x48/apps/gimp.png;gimp-2.8
chvt 1;/usr/share/pixmaps/utilities-system-monitor.png;chvt 1
Fatdog64 Control Panel;/usr/share/pixmaps/midi-icons/controlpanel48.png;fatdog-control-panel.sh
Fatdog64 QuickApps;/usr/share/pixmaps/midi-icons/go48.png;fatdog-quickapps.sh
Fatdog Help;/usr/share/pixmaps/midi-icons/help48.png;fatdog-help.sh
LibreOffice Base;/usr/share/icons/libreoffice-base.png;libreoffice --base
LibreOffice Calc;/usr/share/icons/libreoffice-calc.png;libreoffice --calc
LibreOffice Draw;/usr/share/icons/libreoffice-draw.png;libreoffice --draw
LibreOffice Impress;/usr/share/icons/libreoffice-impress.png;libreoffice --impress
LibreOffice Math;/usr/share/icons/libreoffice-math.png;libreoffice --math
LibreOffice;/usr/share/icons/libreoffice-startcenter.png;libreoffice
LibreOffice Writer;/usr/share/icons/libreoffice-writer.png;libreoffice --writer
NoteCase notes manager;/usr/share/pixmaps/notecase.xpm;notecase
Osmo;/usr/share/icons/hicolor/48x48/apps/osmo.png;osmo
VLC media player;/usr/share/icons/hicolor/48x48/apps/vlc.png;/usr/bin/vlc
ISO Master;/usr/share/isomaster/icons/isomaster.png;isomaster
Pburn CD/DVD/Blu-ray writer;/usr/share/xlunch/svgicons/pburn.png;pburn
PeasyDisc optical disc tools;/usr/share/pixmaps/midi-icons/optical48.png;peasydisc
ripperX CD song ripper;/usr/share/pixmaps/midi-icons/optical48.png;ripperX
Screencaster;/usr/share/pixmaps/midi-icons/camera48.png;screencast.sh
Pmount mount/unmount drives;/usr/share/pixmaps/midi-icons/floppy48.png;pmount
Reboot;/usr/share/pixmaps/midi-icons/connect48.png;wmexit reboot
Restart X;/usr/share/pixmaps/midi-icons/x.png;wmexit restart
Shutdown;/usr/share/pixmaps/midi-icons/shutdown48.png;wmexit shutdown
SeaMonkey Addressbook;/usr/share/pixmaps/contact48.png;seamonkey-spot -addressbook
SeaMonkey Composer html editor;/usr/share/pixmaps/mozicon48.png;seamonkey -edit
SeaMonkey mail;/usr/share/pixmaps/email48.png;seamonkey-spot -mail
Task Manager;/usr/share/pixmaps/midi-icons/system-monitor48.png;lxtask
/root/conky.sh script to keep it alive (so restarts if the user does say ctrl-alt-X (close) on the 'desktop' (conky)
Code: Select all
#!/bin/sh
#
# Keep conky alive if ctrl-alt-x (cwm) close the 'desktop' (conky)
# /etc/conky/conky.conf should have background no setting
#
while : ; do
conky -o
wait %1
done
I thought I added a xrdb -merge ~/.Xdefaults somewhere, but that may have been when I was running under user (I've since removed userid user and just run as root), can't recall if or where.
The /etc/ssh/sshd_config that I pulled in and edited from openbsd looks like
Code: Select all
# $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
#Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
ClientAliveInterval 60
ClientAliveCountMax 10000
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
and I added
to the end of /etc/ssh/ssh_config (not sure if that is required, but it was my attempts to stop the sshfs links dropping after a period of inactivity. sshd_config's TCPKeepAlive yes is also for that purpose).
So that my OpenBSD box can access FatDog I created ssh keys in OpenBSD using ssh-keygen under userid user, that creates ssh keys in /home/user/.ssh, and copied the public key over to Fatdog and added it to /root/.ssh/authorized_keys. So no password has to be entered when OpenBSD ssh's to Fatdog. That OpenBSD is behind a router so Fatdog can't even see the OpenBSD box. I have a script that runs on OpenBSD as part of default boot that just loops around and sshfs's to fatdog if it 'finds' it, or sleeps for a while before retrying again if its not found. I did consider using FatDog for that dataserver but had problems finding sftp-server for FatDog that the rsshfs script I use requires.
https://github.com/rom1v/rsshfs I did consider reserve ssh'ing from OpenBSD into Fatdog and then running standard sshfs back through that ssh tunnel, but prefer rsshfs as the ssh tunnel is more closed and is less inclined to encrypt twice (more secure IMO as it uses local stdin piping). Also using userid user on OpenBSD does make it more secure if somehow that rsshfs tunnel could somehow be hacked i.e. they drop into user level and would have to privilege elevate on a system (OpenBSD) that is pretty secure and resilient to privilege elevations.
I've probably missed some, but I think that its pretty much it.