LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2022, 05:06 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
[tinycore 64bit 13x] update script for icewm


After updating lxterminal I private updated icewm to share too. Change dep of sakura to lxterminal
Code:
#!/bin/sh
# test we are root
if [ "$(id -u)" != "0" ]; then
   echo "run as root now exitting"
   exit 1
fi

###################### inject LA files 
# needs libglib-2.0.la libgobject-2.0.la libgmodule-2.0.la libgbm.la 
### libglapi.la from 11x http://tinycorelinux.net/11.x/x86_64/tcz/src/la/
# libharfbuzz.la & libpixman-1.la from 10x TCZs
######################
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"

ULL=/usr/local/lib

P=icewm
V=2.9.7
SRC=$P-$V
USER=`cat /etc/sysconfig/tcuser`
LIST="compiletc submitqc asciidoc librsvg-dev gettext-dev libtool-dev imlib2-dev lzip perl5"
for Z in $LIST
    do 
    su -c "tce-load -i $Z" $USER
done

cd /tmp 
su -c "/usr/local/bin/wget -nc --no-check-certificate \
http://tinycorelinux.net/10.x/x86_64/tcz/harfbuzz-dev.tcz \
http://tinycorelinux.net/10.x/x86_64/tcz/pixman-dev.tcz \
https://github.com/ice-wm/$P/releases/download/$V/$SRC.tar.lz"  $USER
lzip -d $SRC*lz && tar xvf $SRC.tar
mkdir $P

# unpack and inject la files except glib already downloaded 
unsquashfs pixman-dev.tcz
mv squashfs-root/$ULL/libpixman-1.la $ULL
rm -rf squashfs-root

unsquashfs harfbuzz-dev.tcz
mv squashfs-root/$ULL/libharfbuzz.la $ULL

cd $SRC
./configure --prefix=/usr/local --with-xterm=lxterminal \
--with-theme=NanoBlue --disable-debug
##################################################
# Applications: icewm icewm-session icesh icewmhint icewmbg icehelp icewm-menu-fdo
# Image library: imlib2 libxpm librsvg-2.0
# Audio support: 
# Features: i18n shape xrandr xfreetype xinerama fribidi
# Paths: 
#   PREFIX: /usr/local
#   BINDIR: /usr/local/bin
#   LOCDIR: /usr/local/share/locale
#   LIBDIR: /usr/local/share/icewm
#   CFGDIR: /usr/local/etc/icewm
#   DOCDIR: /usr/local/share/doc/icewm
#   MANDIR: /usr/local/share/man
# ----XTERMCMD: lxterminal
#########################
make -j5 # about 15 secs
make install-strip DESTDIR=/tmp/$P
cd /tmp

# help 
#######
mkdir -p $P-help/usr/local/share/doc/$P
mv $P/usr/local/share/doc/$P/* $P-help/usr/local/share/doc/$P/

# icewm-list
############
mkdir -p $P-list/usr/local/share/$P-list
echo 'haveged.tcz
Xorg-7.7.tcz
icewm.tcz
lxterminal.tcz
adwaita-icon-theme.tcz ' > $P-list/usr/local/share/$P-list/icewm.lst

# list install script
######################
mkdir -p $P-list/usr/local/tce.installed
cat >> $P-list/usr/local/tce.installed/$P-list <<'EOF'
#!/bin/sh
TCEDIR=/etc/sysconfig/tcedir
LOOP=/tmp/tcloop/icewm-list/usr/local/share/icewm-list/icewm.lst
[ -f $TCEDIR/icewm.lst ] || cp $LOOP $TCEDIR/
EOF
chown -R root:staff $P-list/usr/local/tce.installed
chmod -R 755 $P-list/usr/local/tce.installed

# locale
#########
mkdir -p $P-locale/usr/local/share
mv $P/usr/local/share/locale $P-locale/usr/local/share

# themes -move all then put nanoblue back
########
mkdir -p $P-themes/usr/local/share/icewm/themes/
mv $P/usr/local/share/$P/themes/ $P-themes/usr/local/share/$P
mkdir -p $P/usr/local/share/icewm/themes/
mv $P-themes/usr/local/share/$P/themes/NanoBlue $P/usr/local/share/icewm/themes/

# doc 
##########
mkdir -p $P-doc/usr/local/share/doc/$P
mv $P/usr/local/share/man $P-doc/usr/local/share/
cp $SRC/AUTHORS $P-doc/usr/local/share/doc/$P/
cp $SRC/COPYING $P-doc/usr/local/share/doc/$P/
# move configs I intend to change as below
mv $P/usr/local/share/$P/keys $P-doc/usr/local/share/doc/$P/keys-original
mv $P/usr/local/share/$P/toolbar $P-doc/usr/local/share/doc/$P/toolbar-original

# main
#####
# "improve" keys
KEYS=$P/usr/local/share/$P/keys
rm -rf $KEYS
cat >> $KEYS <<'EOF'
# Super = Windows logo key on US kb, some other keynames include 
# Alt Ctrl -- Note capitals where applicable
# IceWM system key defs located at menu or context menu for Preferences -> key (something)
# Below are user defined 

key "Super+Enter" lxterminal
key "Super+a" pkill lxterminal

key "Super+2" apps
key "Super+1" pkill apps

key "Super+4" cpanel
key "Super+3" pkill cpanel 

key "Super+6" exittc
key "Super+5" pkill exittc

key "Super+f" fox
key "Super+d" pkill firefox

key "Super+h" lxterminal -e htop
key "Super+g" pkill htop

key "Super+v" vlc
key "Super+c" pkill vlc

key "Super+l" leafpad
key "Super+k" pkill leafpad 

key "Super+m" mtpaint
key "Super+n" pkill mtpaint

key "Super+p" pcmanfm
key "Super+o" kill -9 $( /usr/local/bin/ps -x | grep /usr/local/bin/pcmanfm )

key "Super+s" .local/bin/startup

key "Super+x" xscreensaver-command -lock
key "Super+z" zs
key "Super+r" zr

key "Super+i" icewm -r
EOF


# "improve" toolbar
##############  

TOOL=$P/usr/local/share/$P/toolbar
rm -rf $TOOL
cat >> $TOOL  <<'EOF'
# formula is prog "hover-name-to-display" icon-pathway exe-name If no icon use a "-" without quotes
# Below are user defined 
prog "Terminal" /usr/local/share/icons/Adwaita/24x24/legacy/utilities-terminal.png lxterminal
prog "File Manager" /usr/local/share/icons/Adwaita/24x24/legacy/folder-new.png pcmanfm
EOF

# audio not supported so remove components
rm -rf $P/usr/local/bin/icesound

# pretty sure gnome users will use TC's gnome in full
rm -rf $P/usr/local/bin/icewm-set-gnomewm

# remove stale icons or we use exittc
cd $P/usr/local/share/icewm/icons
rm -rf bomb* communicator* kde* koules* logout* navigator* netscape* reboot* shutdown* xisp* xload* xv*
cd ../taskbar
rm -rf debian.xpm xfree*
cd /tmp

# fix desktops
APP=$P/usr/local/share/xsessions
sed 's|bin|local/bin|' -i $APP/*

# fix icon search pathway only hicolor was correct 
ICONFILE=$P/usr/local/share/icewm/preferences
sed 's|/usr/share/icons/oxygen/base:/usr/share/icons/Adwaita:/usr/share/icons/hicolor:/usr/share/icons:/usr/share/pixmaps|/usr/local/share/icons/Adwaita:/usr/local/share/icons:/usr/local/share/pixmaps|' -i $ICONFILE

# dir already exists
echo 'see doc TCE for COPYING' > $P/usr/local/share/doc/$P/COPYING

# fix preferences so for exittc
PREF=$P/usr/local/share/$P/preferences
sed 's|# LogoutCommand=""|LogoutCommand="exittc"|' -i $PREF
sed 's|# ShutdownCommand="test -e /run/systemd/system && systemctl poweroff"|ShutdownCommand="exittc"|' -i $PREF
sed 's|# RebootCommand="test -e /run/systemd/system && systemctl reboot"|RebootCommand="exittc"|' -i $PREF

# tce.install
############# old script had chmod 644 on it when startup needs 775
# menu, programs and winoptions not copied over 
# spent no time investigating their effectiveness
 
mkdir -p $P/usr/local/tce.installed
cat >> $P/usr/local/tce.installed/$P <<'EOF'
#!/bin/sh
echo "icewm" > /etc/sysconfig/desktop

USER=`cat /etc/sysconfig/tcuser`
LOOP=/tmp/tcloop/icewm/usr/local/share/icewm
HOME=/home/$USER/.icewm
[ -d $HOME ] || mkdir -p $HOME
[ -f $HOME/prefoverride ] || touch $HOME/prefoverride
[ -f $HOME/preferences ] || cp $LOOP/preferences $HOME
[ -f $HOME/toolbar ] || cp $LOOP/toolbar $HOME
[ -f $HOME/keys ] || cp $LOOP/keys $HOME 
chown $USER:staff -R $HOME 
EOF
chown -R root:staff $P/usr/local/tce.installed
chmod -R 755 $P/usr/local/tce.installed

# TCZ them
###########
LIST2="$P $P-doc $P-help $P-list $P-locale $P-themes"
for Z in $LIST2
do
	mksquashfs $Z $Z.tcz
	md5sum $Z.tcz > $Z.tcz.md5.txt
	cd $Z
	find usr -not -type d > /tmp/$Z.tcz.list
        sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list
	cd /tmp
done

ls -hal

echo 'Title:          icewm-doc.tcz
Description:    docs
Version:        2.9.7
Author:         see AUTHORS
Original-site:  https://github.com/bbidulock/icewm
Copying-policy: LGPL v2
Size:           140K
Extension_by:   you
Tags:           window manager wm
Comments:       Contains raw config files that I have
                editted in main TCE
                Lots of man pages too

Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2022/05/20 v 2.9.7 on 13x
 ' > $P-doc.tcz.info
 
echo 'Title:          icewm-help.tcz
Description:    needed if you click on help
Version:        2.9.7
Author:         see AUTHORS
Original-site:  https://github.com/bbidulock/icewm
Copying-policy: LGPL v2
Size:           124K
Extension_by:   you 
Tags:           window manager wm
Comments:       Not the same as TCE for docs.
                This is for when you use the menu
                to click on help

                Or use your web browser to go to
                https://tinyurl.com/y5c29lo7

Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2022/05/20 v 2.9.7 on 13x
 ' > $P-help.tcz.info

echo 'Title:          icewm-list.tcz
Description:    boot list for your bootloader
Version:        1.0
Author:         aus9
Original-site:  Tinycore
Copying-policy: opensource
Size:           8.0K
Extension_by:   you
Tags:           window manager wm
Comments:       Do NOT choose OnBoot in Apps please.
                Do not download this TCE unless you 
                have tested icewm and am happy to 
                have a boot loader list file to 
                automate the booting of IceWM.

                When ready, in Apps choose 
                DownloadOnly (not + load)
                In a terminal run
                $ tce-load -i icewm-list
                $ cat /etc/sysconfig/tcedir/icewm.lst
                Optional you can then elect to add TCEs
                to that list from your current list
                (Maybe from onboot.lst?)

                If you need firmware, order is important
                see your current boot list or refer to forum

Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2020/07/22
 ' > $P-list.tcz.info

echo 'Title:          icewm-locale.tcz
Description:    locales 
Version:        2.9.7
Author:         see doc TCE for AUTHORS
Original-site:  https://github.com/bbidulock/icewm
Copying-policy: LGPL v2
Size:           588K
Extension_by:   you
Tags:           window manager wm locale
Comments:       locales untested by me
                
Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2022/05/20 v 2.9.7 on 13x
  ' > $P-locale.tcz.info

echo 'Title:          icewm-themes.tcz
Description:    themes 
Version:        2.9.7
Author:         see doc TCE for AUTHORS
Original-site:  https://github.com/bbidulock/icewm
Copying-policy: LGPL v2
Size:           292K
Extension_by:   you
Tags:           window manager wm
Comments:       Extra themes to NanoBlue
                
Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2022/05/20 v 2.9.7 on 13x
  ' > $P-themes.tcz.info

echo 'Title:          icewm.tcz
Description:    Stacking Window Manager 
Version:        2.9.7
Author:         see doc TCE for AUTHORS
Original-site:  https://github.com/bbidulock/icewm
Copying-policy: LGPL v2 
Size:           1.1M
Extension_by:   you
Tags:           window manager wm
Comments:       Do NOT choose OnBoot in Apps please. If you like this 
                WM then download and run icewm-list to get a icewm boot 
                list you can use with your boot loader. Then add TCEs
                
                Most preferences, use the menu button or 
                context menu to change please. 
                 
                Please READ/edit your configs under ~/icewm
                Toolbar (and keys) has lxterminal TCE set 
                (forced dep as xterm set)
                pcmanfm.tcz (recommended TCE)
                
                keys names kb combos but only lxterminal is a dep
                                
                Feel free to edit YOUR configs. I am unable to test on 
                basic X so forced Xorg-7.7 (2d) as a dep.
                            
                Be aware that IceWM uses this order: 
                prefoverride over theme over preferences
                
                icewmbg can control background or wallpaper(s)
                See pcmanfm for a conflicting wallpaper method
                https://tinyurl.com/y3ouvb94

                After any change to a config file, any TCE added after boot,
                that has a kb combo set.....needs WM refresh with kb combo of
                logo+i

                optional TCEs not already mentioned include: 
                icewm-themes 
                icewm-help (stripped from main TCE)
                icewm-doc (man pages)
                icewm-locale 
                xscreensaver (and set local and root pw please)
                ( This evades lock workstation setting )
                
                Recommend https://ice-wm.org/FAQ/ too

                lxterminal-xterm allows apps GUI to work without aterm
                
Change-log:     2020/07/22 Original 1.7.0 on 11x
Current:        2022/05/20 v 2.9.7 on 13x nanoblue new default, sakura replaced by lxterminal 
' > $P.tcz.info

echo 'icewm.tcz' > $P-locale.tcz.dep
echo 'icewm.tcz' > $P-help.tcz.dep
echo 'icewm.tcz' > $P-themes.tcz.dep
echo 'man-db.tcz' > $P-doc.tcz.dep
echo 'haveged.tcz
Xorg-7.7.tcz
lxterminal.tcz
adwaita-icon-theme.tcz' > $P.tcz.dep

submitqc --libs

Last edited by aus9; 05-20-2022 at 05:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [Tinycore 64bit 13x]update script lxterminal for Tinycorers aus9 Linux - Software 3 11-27-2022 01:47 AM
[SOLVED] [Tinycore 64bit 13x] free build script for celluloid for TC users aus9 Linux - Software 0 05-19-2022 03:44 PM
[SOLVED] [Tinycore TC64 13x] kernel environment commands aus9 Linux - General 0 01-15-2022 09:54 AM
Tinycore 64bit TCZ for Eterm aus9 Linux - Software 5 12-02-2017 06:06 PM
where is the startup script of icewm when there is no ~/.icewm frenchn00b Linux - General 2 08-14-2008 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration