for me it's better to work on Lxde because I have low RAM memory,
I deleted , kde.lzm + kdeapps.lzm, but I can not activate modules by double click !!!
so ,
I took a look in '/usr/bin/kactivate', I saw there is 'kdialog' but I deleted kde.lzm, kdeapps.lzm.
then I installed 'xdialog'
http://slackware.schoepfer.info/13.1/sl ... 86-1js.tgz
http://slackware.schoepfer.info/13.1_64 ... 4-1jsc.txz
then I modified 'kactivate' and replace 'kdialog' syntax , to 'Xdialog' syntax, to let script work on Lxde and KDE.
Code: Select all
#!/bin/bash
# This script is used in LXDE and KDE to provide a GUI for 'activate'
# It has the same syntax like 'activate', moreover it accepts HTTP addresses
# to be mounted remotely using httpfs
# (you may kactivate a LZM module over HTTP, no need to download it!)
#script modified by KSA_ARAB
PATH=.:$(dirname $0):/usr/lib:$PATH
. liblinuxlive || exit 127
# make sure to work only with *.lzm files
while [ "$(echo "$1" | grep '.lzm$')" = "" -a "$1" != "" ]; do shift; done
FILE="$1"
if [ "$FILE" = "" ]; then
FILE=$(xdialog --icon folder_open --getopenurl "" "*.lzm" --title "Select LZM module")
if [ $? -ne 0 ]; then exit 1; fi
FILE=$(echo "$FILE" | sed -r "s,file://,,")
fi
BASE=$(basename "$FILE" 2>/dev/null)
# if the module is already activated, suggest deactivation
if ismountpoint "/mnt/live/memory/images/$BASE"; then
Xdialog --yesno "Deactivate the module?" 6 30
if [ $? -eq 0 ]; then deactivate $BASE; exit 0; fi
exit 2
fi
SLIK=${FILE:0:4}
# handle slik (Slax Klik) and HTTP requests/urls
if [ "$SLIK" = "slik" -o "$SLIK" = "http" ]; then
# if a module is loaded from untrusted site (everything else than slax.org, ask for confirmation)
DOMAIN=$(echo "$FILE" | cut -b 8- | egrep -o "^(www.)?([^/]+)")
DOMAIN=${DOMAIN##www.}
if [ "$DOMAIN" != "slax.org" ]; then
xdialog --icon configure --dontagain "kactivate:trust-$DOMAIN" --title "unsafe domain $DOMAIN" --warningyesno "Warning! You are about to load a module from $DOMAIN...\nThis may be unsafe. Are you sure?"
if [ $? -ne 0 ]; then exit 127; fi
fi
MNT="/mnt/live/memory/httpfs/$BASE"
mkdir -p "$MNT"
xdialog --passivepopup "$BASE: module insertion in progress, wait please..." 10000 & KILLPID=$!
ERR=$(httpfs http${FILE:4} "$MNT" 2>&1)
if [ $? -ne 0 ]; then
kill $KILLPID
xdialog --icon error --title "network error" --error "Can't mount the module remotely.\nError message: $ERR\n\nTry to download the module to your computer."
exit 128;
fi
echo "http${FILE:4}" >$MNT/slik.url
kill $KILLPID
FILE="$MNT/$BASE"
fi
# show info message and remember PID of the process (we'll need to kill the message later on)
Xdialog --msgbox "Module Insertion..." 6 25 10000 & KILLPID=$!
# insert the module to live filesystem
activate -k "$FILE"
if [ $? -ne 0 ]; then
kill $KILLPID
Xdialog --msgbox "error Module." 6 25
exit 3
else
# Rebuild the system configuration cache for KDE (mainly to update KDE menu)
kbuildsycoca 2>/dev/null
kill $KILLPID
Xdialog --msgbox "Module Activated" 6 25 5 &
fi
exit 0
after that you can open module with command 'kactivate' , or
you need to add 'lzm' extension to PcmanFM file manager
Code: Select all
echo "application/octet-stream=userapp-kactivate-DKZMPV.desktop;" >> /root/.local/share/applications/mimeapps.list
echo "[Desktop Entry]" >> /root/.local/share/applications/userapp-kactivate-DKZMPV.desktop
echo "Type=Application" >> /root/.local/share/applications/userapp-kactivate-DKZMPV.desktop
echo "Name=kactivate" >> /root/.local/share/applications/userapp-kactivate-DKZMPV.desktop
echo "Exec=lxactivate %f" >> /root/.local/share/applications/userapp-kactivate-DKZMPV.desktop
echo "NoDisplay=true" >> /root/.local/share/applications/userapp-kactivate-DKZMPV.desktop
you are welcome to suggestions , fix it , or add.
regards