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) </ 1 [2] 3 4 5 6 7 ... >/

[ 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: Jan. 05 2004,00:46 QUOTE

Do not put a space between the "./" and the ".start_synaptic"

It should be one command without any spaces. IE:

./.start_synaptic
Back to top
Profile PM 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: Jan. 05 2004,03:31 QUOTE

Thanks cbagger01.

I made a silly mistake. Now when I type it in I get

:bad interpreter: no such file or directory

I must be doing something stupid but I can't figure it out. Can anyone help me? Thanks

BTW: when I type the command the line begins with

root@box:~#

Is this OK?
Back to top
Profile PM MSN YIM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Jan. 05 2004,05:31 QUOTE

clivesay,

The script was originally meant to be run from the default user location (/home/damnsmall/.start_synaptic) and run under the default user account 'damnsmall'

Try copying the script file over to the /home/damnsmall directory and running it from there. IE:

root@box:~# cp .start_synaptic /home/damnsmall
root@box:~# cd /home/damnsmall
root@box:~# ./.start_synaptic

In the future, I need to rewrite the script so that it can be run from any user's home directory. But this should work for the moment.

Good Luck.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Feb. 29 2004,08:43 QUOTE

Hi again.

Due to the changes in DSL 0.6.x, I needed to make several changes to the .start_synaptic script.  The 'ln' command works differently in busybox, so that needed to change.  Also, DSL version 0.6+ uses a version of apt that is incompatible with synaptic 0.16, so I added some lines to downgrade the version of apt so that it will work with synaptic (apt version 0.5.4).

The script installation instructions above are still valid.

Here it is:

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.
# Rev 1 2/27/04
#                   Revised to work with DSL version 0.6.1
#                   Do not use with DSL versions older than 0.6


# 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. '
    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
    dpkg-restore
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 
hasty Offline





Group: Members
Posts: 280
Joined: Oct. 2003
Posted: Feb. 29 2004,10:58 QUOTE

Thanks CB.
Just installed 6.1 yesterday and stalled at synaptic.
Glad I spotted your posting :)

(I'm supposed to be doing my accounts today but Dels just posted a remastering how-to....and I'm very tempted)
:laugh:
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) </ 1 [2] 3 4 5 6 7 ... >/
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