É quase isso, mas o que ele faz é abrir o gedit e o xterm, mas eu não quero abrir o gedit.
Quero executar o script na consola do gnome e que ele corra no xterm.
O script, está em construção e está assim
(só que quando acaba uma opção o xterm fecha e eu queria que ele o xterm continuasse aberto):
############################################################
#!/bin/sh
if ! [ -f script_running ]; then
touch script_running
xterm -e $0
fi
if [ -f script_running ]; then
...actual script...
rm script_running
fi
###################configuração alinex 2.0 beta########################################################
echo ESCOLHA A OPÇÃO?
echo "1 ) ACTUALIZAR SOURCE LIST."
echo "2 ) INSTALAR PROGRAMAS."
echo "3 ) CONFIGURAR O REDWRITE DOS DISCO ."
echo "4 ) INSTALAR DRIVERS NVIDIA ."
echo "5 ) SAIR ."
echo -n "Select an Option: "
read option
case "$option" in
1 )
#echo ISTO VAI CONFIGURAR O REPOSITÓRIO!
wget
http://192.168.1.4/apache/software/linux/alinex2.0beta/sources.list_alinex_2.0betamv /etc/apt/sources.list /etc/apt/sources.list_backtup
mv sources.list_alinex_2.0beta /etc/apt/sources.list
echo "deb
http://ftp.br.debian.org/debian/ etch main contrib non-free" >> /etc/apt/sources.list
echo "deb
http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
echo "deb-src
http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
rm -rf sources.list_alinex_2.0beta
apt-get update
rm -rf /var/lib/apt/lists/ftp.br.debian.org_debian_dists_etch_main_binary-i386_Packages
rm -rf /var/lib/apt/lists/*.gpg
echo FIM, DE ACTUALIZAÇÃO
;;
2 )
echo INSTALAR ALGUNS PROGRAMAS E CODECS
apt-get install clamav realplay bluefish freespeak alltray filezilla gftp opera amsn mozilla-thunderbird liferea acroread brasero soundconverter mplayer gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs mplayer banshee sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin gdesklets gdesklets-data mrxvtmrxvt-mini putty
wget
http://www9.limewire.com/download/LimeWireLinux.debwget
http://dl.google.com/linux/deb/pool/non-free/g/google-desktop-linux/google-desktop-linux_current_i386.deb#wget
http://88.198.54.112/pub/getdeb/pd/pdfedit_0.3.1-1~getdeb1_i386.debwget
http://web.telia.com/~u88005282/sum/archive/deb/startupmanager_1.0.2-2_all.debwget
http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.debdpkg -i picasa_2.2.2820-5_i386.deb
dpkg -i LimeWireLinux.deb
dpkg -i google-desktop-linux_current_i386.deb
#dpkg -i pdfedit_0.3.1-1~getdeb1_i386.deb
dpk -i startupmanager_1.0.2-2_all.deb
rm -rf *.deb
wget
http://192.168.1.4/apache/software/linux/ubuntu/all-20060501.tar.gztar -vzxf all-20060501.tar.gz
mkdir /usr/lib/win32
mv ./all-20060501/* /usr/lib/win32
rm -rf *.tar.gz
rm -rf all-20060501
echo FIM, DA INSTALAÇÃO
;;
3 )
echo AGORA CONFIGURAR O REDWRITE DOS DISCOS
#get all user interaction done right away
echo "deb
http://flomertens.free.fr/ubuntu/ edgy main main-al" >> /etc/apt/sources.list
echo "deb
http://ntfs-3g.sitesweetsite.info/ubuntu/ edgy main main-all" >> /etc/apt/sources.list
echo "deb
http://flomertens.keo.in/ubuntu/ edgy main main-all" >> /etc/apt/sources.list
wget
http://flomertens.keo.in/ubuntu/givre_key.asc -O- | sudo apt-key add -
apt-get update
rm -rf /var/lib/apt/lists/ftp.br.debian.org_debian_dists_etch_main_binary-i386_Packages
apt-get install ntfsprogs libfuse2 fuse-utils ntfs-3g libfuse2 libfuse-dev pmount fuse-source automake fakeroot debhelper autotools-dev cdbs libsysfs-dev libhal-dev libhal-storage-dev intltool
echo 'feito'
wget
http://heanet.dl.sourceforge.net/sourceforge/fuse/fuse-2.7.0.tar.gztar zxvf fuse-2.7.0.tar.gz
cd fuse-2.7.0
./configure
make
make install
cd /home/helder/Desktop
rm -rf fuse-2.7.0
rm -rf *.tar.gz
echo "fuse" >> /etc/modules
modprobe fuse
gksu ntfs-config
echo "/dev/hda5 /media/hda5 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
echo "/dev/hda1 /media/hda1 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
umount -a
mount -a
pmount-hal /dev/hda1
pmount-hal /dev/hda5
mount -t ntfs-3g /dev/hda1 /media/hda1
mount -t ntfs-3g /dev/hda5 /media/hda5
apt-get upgrade
apt-get auto-remove
echo FIM,COMENTE AS ANTIGAS LINHAS DE HDA1 E HDA5 E FAÇA REBOOT
;;
4 )
echo VAMOS INSTALAR OS DRIVERS NVIDIA
wget
http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.7-0ubuntu6_all.deb dpkg -i envy_0.9.7-0ubuntu6_all.deb
apt-get install -f
rm -rf *.deb
envy -t
;;
5 )
exit 0
;;
esac