Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (11) </ ... 4 5 6 7 8 [9] 10 11 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Install Script for Synaptic, The EASY way to add more programs to DSL< Next Oldest | Next Newest >
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: April 07 2004,17:21 QUOTE

roberts,

You should be able to run the script from the /home/damsmall directory as user 'damnsmall'

It should work properly from there although I have not used it recently so I will need to check again when I am home.

The last test I did was running from the DSL 0.6.1 liveCD and a Pentium III with 256MB of RAM.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: April 08 2004,05:50 QUOTE

Roberts,

I tried the script with DSL 0.6.2 running from livecd and it installed synaptic correctly.  I was then able to use Synaptic to install xpat2.

Are you using the Rev 1 version of the script dated 2/27/04?

The original rev will only work with versions of DSL that are 0.5.3.1 or older.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: April 08 2004,06:39 QUOTE

Cbagger,

I have identified the issue. Since this does not effect the current releases of DSL I am going to take this discussion off-line.

Robert
Back to top
Profile PM WEB 
Rapidweather Offline





Group: Members
Posts: 375
Joined: Jan. 2004
Posted: April 10 2004,21:25 QUOTE

I'm going to try Synaptic again to get some applications to place in my remaster.
I am running DSL 0.6.2, remastered to include Firefox and Wvdial, and I need some
more applications to test the method for getting them in my remaster. I'm just over
60 MB now, and have a nice welcome screen with images made in Gimp (Mandrake 8).
At least I will place the script in the remaster, so I will have it to work with.
---
I'll get back here if I have any success with Synaptic.


--------------
Rapidweather Remaster of DSL:
http://www.angelfire.com/ms/telegram/getting_started.html
Rapidweather Remaster of Knoppix Linux:
http://www.geocities.com/rapidweather/getting_started.html
Screenshots:
http://www.rapidweather.com/linuxcdsales.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: April 15 2004,02:52 QUOTE

All,

Below is the latest revision of the .start_synaptic script.  Based on tests performed by roberts, a change was needed in order to make it work with DSL version 0.6.3.

Also, a RAMdisk size check was added to the program to prevent the LiveCD user from getting a mangled ramdisk.  At least 96MB of RAM is required in order to run this script if you are running DSL from LiveCD or as a frugal/poor man's install.  Keep in mind that if you only have 96MB of RAM available, you will not be able to use Synaptic to install any large programs.

To use the script, do the following. Copy the text below and paste it into a word processor like scite or nano. Then save the file as .start_synaptic  in your /home/damnsmall directory.

Note the dot "." in front of the word start. Then make the file executable by opening an Xterminal (rxvt) window and type:

chmod 755 .start_synaptic

Finally, to run the script, type in:

./.start_synaptic

on a blank line inside the Xterminal (rxvt) window.

Here is the script text that you need to copy:

Code Sample
#!/bin/sh
#
# .start_synaptic - Checks to see if the Synaptic package manager GUI is
#                   already installed and starts it up. Otherwise, it
#                   installs the program.
#
# Original author:  cbagger01 from the Damn Small Linux forum
# Rev 2 4/09/04
#                   Revised to work with DSL version 0.6.1
#                   Do not use with DSL versions older than 0.6
#                   Added a ramdisk size check,
#                   and changes for DSL version 0.6.3

# Has this script called itself with the install argument?
while [ "$1" = "install" ]
do

# If the user is running DSL from the KNOPPIX compressed file system, a
# writable version of the read-only system directories must be created.
# Otherwise, it will be impossible to install programs that add new files
# into these directories and subdirectories.
ls -l /usr | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'System is running from a Live CD compressed image filesystem. '
# Make sure that there is enough RAM to install Synaptic
# Ramdisk size must be 65MB or greater
    DISKSIZE=$(df -m /ramdisk | awk '(NR > 1) {printf("%d",$2)}')
    if [ $DISKSIZE -lt 65 ]
    then
         echo 'Your computer does not have enough RAM to use Synpatic'
         echo 'while running from the compressed filesystem.'
         echo 'Press ENTER to continue...'
         read CONTINUE
         rm /tmp/startsynaptic.tmp
         exit
    fi
    echo 'Creating a writable /usr tree on the RAM Disk...'
    cp -srd /KNOPPIX/usr/ /ramdisk
    ln -sf /ramdisk/usr/X11R6/lib/X11 /ramdisk/usr/lib/
    ln -sf /ramdisk/usr /
fi
rm /tmp/startsynaptic.tmp

ls -l /bin | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable /bin tree on the RAM Disk...'
    cp -srd /KNOPPIX/bin/ /ramdisk
    ln -sf /ramdisk/bin /
fi
rm /tmp/startsynaptic.tmp

ls -l /boot | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable /boot tree on the RAM Disk...'
    cp -srd /KNOPPIX/boot/ /ramdisk
    ln -sf /ramdisk/boot /
fi
rm /tmp/startsynaptic.tmp

ls -l /lib | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable /lib tree on the RAM Disk...'
    cp -srd /KNOPPIX/lib/ /ramdisk
    ln -sf /ramdisk/lib /
fi
rm /tmp/startsynaptic.tmp

ls -l /sbin | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable /sbin tree on the RAM Disk...'
    cp -srd /KNOPPIX/sbin/ /ramdisk
    ln -sf /ramdisk/sbin /
fi
rm /tmp/startsynaptic.tmp


# Next, we need to make sure that the apt related directories are
# writable. If the user is running from the KNOPPIX compressed
# filesystem, new directories will be created and a non read-only
# version of the lock file will be copied into the new location.

ls -l /var/cache/apt | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable apt cache directory on the RAM Disk...'
    rm -rf /ramdisk/var/cache/apt
    cp -srd /KNOPPIX/var/cache/apt/ /ramdisk/var/cache
    echo 'Creating a writable apt lock file...'
    rm -rf /ramdisk/var/cache/apt/archives/lock
    cp /KNOPPIX/var/cache/apt/archives/lock /ramdisk/var/cache/apt/archives
fi
rm /tmp/startsynaptic.tmp

ls -l /var/lib/apt | grep 'KNOPPIX' > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
    echo 'Creating a writable apt lib directory on the RAM Disk...'
    rm -rf /ramdisk/var/lib/apt
    cp -srd /KNOPPIX/var/lib/apt/ /ramdisk/var/lib
fi
rm /tmp/startsynaptic.tmp

# If the dpkg-restore script hasn't already been restored, restore it.

if [ -e /var/lib/dpkg/status ]
then
    echo 'dpkg has already been restored. Continuing on...'
else
    echo 'Calling the dpkg restore script...'
    rm -f /var/lib/dpkg
    export PATH=.:$PATH
    ln -s /bin/busybox tar
    dpkg-restore
    rm ~/tar
fi

# Install synaptic, the Debian package management GUI
echo 'Downgrading apt back to version 0.5.4...'
wget -c http://ftp.debian.org/debian/pool/main/a/apt/apt_0.5.4_i386.deb
echo $'yes\n' | dpkg -i apt_0.5.4_i386.deb
rm -rf apt_0.5.4_i386.deb
echo $'yes\n' | apt-get -f install
echo $'yes\n' | apt-get install apt-utils
echo 'Downloading and installing Synaptic...'
echo $'yes\n' | apt-get install synaptic

# Downlaod a synaptic icon file and create a link for the desktop icon
wget -c http://savannah.nongnu.org/cgi-bin/viewcvs/*checkout*/synaptic/synaptic/pixmaps/synaptic_48x48.png
mv synaptic_48x48.png /home/damnsmall/.xtdesktop/synaptic.png
echo 'table Icon' > /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  Type: Program' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  Caption: Synaptic' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  Command: sh /home/damnsmall/.start_synaptic' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  Icon: /home/damnsmall/.xtdesktop/synaptic.png' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  X: 385' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo '  Y: 15' >> /home/damnsmall/.xtdesktop/synaptic.lnk
echo 'end' >> /home/damnsmall/.xtdesktop/synaptic.lnk
chown damnsmall:staff /home/damnsmall/.xtdesktop/synaptic.lnk
chown damnsmall:staff /home/damnsmall/.xtdesktop/synaptic.png

exit
done


#Check to see if synaptic is already installed. If so, start it.
if  test -f '/usr/sbin/synaptic'
then
    rxvt -rv -T "Synaptic Message Terminal" -e sudo -u root /usr/sbin/synaptic &
    exit
fi

# Otherwise, run this script again in an rxvt window with the
# install argument added
cd /home/damnsmall
rxvt -rv -T "installing Synaptic..." -e sudo -u root sh ./.start_synaptic install
# Restart the xtdesktop icons if needed
ps -ef | grep xtdesk | grep -v grep | grep -v re_xtdesk > /tmp/startsynaptic.tmp
if  test -s '/tmp/startsynaptic.tmp'
then
killall -9 xtdesk >/dev/null
xtdesk >/dev/null &
fi
rm -rf /tmp/startsynaptic.tmp

# Start synaptic for the first time
rxvt -rv -T "Synaptic Message Terminal" -e sudo -u root /usr/sbin/synaptic &
exit
Back to top
Profile PM 
53 replies since Dec. 27 2003,05:11 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (11) </ ... 4 5 6 7 8 [9] 10 11 >/
reply to topic new topic new poll
Quick Reply: Install Script for Synaptic

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code