Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Sep 2014, 03:34
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Ordinary user in "Quirky Linux - 1.40"
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Tue 01 Mar 2011, 21:04    Post subject:  Ordinary user in "Quirky Linux - 1.40"
Subject description: Status: attempt_7
 

Variant of usage of the operating system: booting from the CD into RAM.

Script Arrow
Quote:

Prepair_user.sh
Edit_1122
Code:

#!/bin/bash
rm /dev/tty5 /dev/tty6 /dev/tty7 /dev/tty8 /dev/tty9 /dev/tty10 /dev/tty11 /dev/tty12 ;
rm /dev/ttyI1 /dev/ttyS1 ;
#
ln -s /dev/loop10 /dev/tty5 ;
ln -s /dev/loop10 /dev/tty6 ;
ln -s /dev/loop10 /dev/tty7 ;
ln -s /dev/loop10 /dev/tty8 ;
ln -s /dev/loop10 /dev/tty9 ;
ln -s /dev/loop10 /dev/tty10 ;
ln -s /dev/loop10 /dev/tty11 ;
ln -s /dev/loop10 /dev/tty12 ;
#
ln -s /dev/loop10 /dev/ttyI1 ;
ln -s /dev/loop10 /dev/ttyS1 ;
#
#Already done->>> passwd root ; passwd spot ; passwd nobody ;
#Already done->>> cat /etc/inittab|sed -e '2,2d' > /etc/inittab ;
#Already done->>> rm /dev/tty1 ;
#Already done->>> ln -s /dev/loop10 /dev/tty1 ;
deluser ftp ;
deluser sshd ;
deluser webuser ;
#
chmod g+w /dev/tty2 /dev/tty3 /dev/tty4 /dev/pts ;
#
chmod 776 /dev/zero ;
chmod u+s /usr/sbin/ddcprobe /root/Choices/ROX-Filer/PuppyPin ;
#
chown spot /var/tmp ;
chmod 1755 /var/tmp ;
chmod u+s /var/tmp ;
#
chown spot /tmp/xerrs.log ;
chown spot /etc/.XLOADED ;
chown spot /tmp/xorgwizard-errors.log ;
#
ln -s /root/.jwmrc /root/spot/.jwmrc ;
ln -s /root/Choices /root/spot/Choices ;
ln -s /root/.rxvt.menu /root/spot/.rxvt.menu ;
ln -s /root/.bashrc /root/spot/.bashrc ;
ln -s /root/.fonts.cache-1 /root/spot/.fonts.cache-1 ;
ln -s /root/.jwmrc-tray /root/spot/.jwmrc-tray ;
ln -s /root/.retrovolrc /root/spot/.retrovolrc ;
ln -s /root/.gtkrc-2.0 /root/spot/.gtkrc-2.0 ;
ln -s /root/.Xdefaults /root/spot/.Xdefaults ;
ln -s /root/.Xresources /root/spot/.Xresources ;
#
chown spot -R /dev/snd ;
chmod -R a-rwx /dev/snd ;
chmod -R u+rwx /dev/snd ;
#
chown spot -R /usr/lib/mozilla ;
chmod -R a-rwx /usr/lib/mozilla ;
chmod -R u+rwx /usr/lib/mozilla ;
#
rm -rf /dev/tty
    mknod -m 776 /dev/tty c 5 0 ;
#
mkdir -p /root/spot/.config/cwallpaper ;
chown spot /root/spot/.config/cwallpaper ;
mkdir -p /root/spot/.config/rox.sourceforge.net ;
chown spot /root/spot/.config/rox.sourceforge.net ;
echo '/usr/share/backgrounds/1.jpg' > /root/spot/.config/cwallpaper/wallpapers ;
echo '/usr/share/backgrounds/2.jpg' >> /root/spot/.config/cwallpaper/wallpapers ;
echo '/usr/share/backgrounds/3.jpg' >> /root/spot/.config/cwallpaper/wallpapers ;
echo '/usr/share/backgrounds/4.jpg' >> /root/spot/.config/cwallpaper/wallpapers ;
echo '/usr/share/backgrounds/5.jpg' >> /root/spot/.config/cwallpaper/wallpapers ;
chown spot /root/spot/.config/cwallpaper/wallpapers ;
chmod 0750 -R /root/spot/.config ;
ln -s /root/.config/rox.sourceforge.net/ROX-Filer /root/spot/.config/rox.sourceforge.net/ROX-Filer ;
#
chown spot -R /docs ;
chmod -R a-rwx /docs ;
chmod -R u+rwx /docs ;
#
chown spot -R /usr/local/bin/icecat-3.5.0/extensions ;
chown spot /usr/local/bin/icecat-3.5.0/icecat ;
chmod -R a-rwx /usr/local/bin/icecat-3.5.0/extensions /usr/local/bin/icecat-3.6.12-i686/icecat ;
chmod -R u+rwx /usr/local/bin/icecat-3.5.0/extensions /usr/local/bin/icecat-3.6.12-i686/icecat ;
#
chown spot -R /usr/lib/seamonkey-2.0.7/extensions ;
chown spot /usr/lib/seamonkey-2.0.7/seamonkey ;
chmod -R a-rwx /usr/lib/seamonkey-2.0.7/extensions /usr/lib/seamonkey-2.0.7/seamonkey ;
chmod -R u+rwx /usr/lib/seamonkey-2.0.7/extensions /usr/lib/seamonkey-2.0.7/seamonkey ;
#
chown spot /dev/ptmx ;
#
chown spot /usr/X11R7 ;
chmod 700 /usr/X11R7 ;
#
chmod 000 /initrd ;
#
chmod 550 /sbin/fdisk ;
#
chown spot /bin/busybox ;
chmod 550 /bin/busybox ;
#
#vSTEPv-1-v
chmod 550 /bin/arch ;
rm /bin/autologinroot ;
chmod 550 /bin/gawk ;
chmod 550 /bin/tic ;
chmod 550 /bin/chattr ;
chmod 550 /bin/compile_et ;
chmod 550 /bin/dialog ;
chmod 550 /bin/dlist_test ;
chmod 550 /bin/domainname ;
chmod 550 /bin/e3 ;
chmod 550 /bin/e3em ;
chmod 550 /bin/e3ne ;
chmod 550 /bin/e3pi ;
chmod 550 /bin/e3vi ;
chmod 550 /bin/e3ws ;
chmod 550 /bin/get_device ;
chmod 550 /bin/get_driver ;
chmod 550 /bin/get_module ;
chmod 550 /bin/infocmp ;
chmod 550 /bin/infotocap ;
chmod 550 /bin/initrd_layer_test ;
chmod 550 /bin/last ;
chmod 550 /bin/lsattr ;
chmod 550 /bin/mk_cmds ;
chmod 550 /bin/replaceit ;
chmod 550 /bin/sed ;
chmod 550 /bin/setserial ;
chmod 550 /bin/systool ;
chmod 550 /bin/toe ;
chmod 550 /bin/tput ;
chmod 550 /bin/tset ;
chmod 550 /bin/waitmax ;
#^STEP^-1-^
#
#Icon for "Seamonkey" web-browser --->
echo '[Desktop Entry]' > /usr/share/applications/SeaM.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/SeaM.desktop ;
echo 'Name=Icecat' >> /usr/share/applications/SeaM.desktop ;
echo 'Comment=icecat' >> /usr/share/applications/SeaM.desktop ;
echo 'Exec=bash -c /usr/lib/seamonkey-2.0.7/seamonkey' >> /usr/share/applications/SeaM.desktop ;
echo 'Terminal=false' >> /usr/share/applications/SeaM.desktop ;
echo 'Type=Application' >> /usr/share/applications/SeaM.desktop ;
echo 'Categories=NetworkBrowsing' >> /usr/share/applications/SeaM.desktop ;
echo 'GenericName=icecat' >> /usr/share/applications/SeaM.desktop ;
echo 'Icon=/usr/share/midi-icons/www48.png' >> /usr/share/applications/SeaM.desktop ;
#well...
echo '<icon x="992" y="572" label="SeaM">/usr/share/applications/SeaM.desktop</icon>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin ;
xmessage 'Program -=seamonkey-2.0.7=- has been prepaired for use.' ;
#"US-.-RU" and "RU-.-US" keyboard layouts  --->
echo '[Desktop Entry]' > /usr/share/applications/KdLt.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/KdLt.desktop ;
echo 'Name=WatchNT' >> /usr/share/applications/KdLt.desktop ;
echo 'Comment=WatchNT' >> /usr/share/applications/KdLt.desktop ;
echo "Exec=bash -c '\`Xdialog --title \"Change layout\" --no-tags --radiolist \"Keyboard layouts\" 13 31 10 \"rxvt -e setxkbmap -option grp:shifts_toggle,grp_led:scroll us,ru\" -=English=- on \"rxvt -e setxkbmap -option grp:shifts_toggle,grp_led:scroll ru,us\" -=Russian=- off 2>&1\` ; yaf-splash -text \`setxkbmap -print|grep xkb_symbols|cut -d+ -f2\`'" >> /usr/share/applications/KdLt.desktop ;
echo 'Terminal=false' >> /usr/share/applications/KdLt.desktop ;
echo 'Type=Application' >> /usr/share/applications/KdLt.desktop ;
echo 'Categories=WatchNT' >> /usr/share/applications/KdLt.desktop ;
echo 'GenericName=WatchNT' >> /usr/share/applications/KdLt.desktop ;
echo 'Icon=/usr/share/pixmaps/gcolor2/icon.png' >> /usr/share/applications/KdLt.desktop ;
#ok...
echo '<icon x="928" y="128" label="KLayout">/usr/share/applications/KdLt.desktop</icon>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo "Done" ;
#ok...
xmessage "Now, user environment is ready. Restart WM, please."



Permissions for -=Prepair_user.sh=- were changed as shown:
Code:

cd /place_where_Prepair_user.sh_is_located ; chmod u+x Prepair_user.sh

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.


Last edited by postfs1 on Mon 11 Apr 2011, 16:04; edited 18 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11062
Location: Arizona USA

PostPosted: Tue 01 Mar 2011, 23:10    Post subject:  

What does this do? When would I use it? Confused
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Wed 02 Mar 2011, 07:55    Post subject:  

The script provides the prepair of user's environment. This can be used when there is a need of launch the restricted set of applications. I hope that this improves defence of system. This is not the final version. I think that it's better to publish the existing variant on the forum than do not publish at all.

Additions Arrow
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-[1]-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Script to manage the wire network card in the virtual terminal's environment:
Quote:

Ceth
Code:

#!/bin/bash
mkdir -p /var/.tmp ; chmod 0600 /var/.tmp ; dialog --msgbox "A C T I V E...D E V I C E: [`netstat -i | grep -i -o 'eth0'`]\n\nFor disabling network connection:\nuse point 'To STOP the netwok DEVICE >eth0<'\n\nFor enabling network connection again:\nuse point 'To ACTIVATE the network DEVICE again'\n\nTo cancel ANY operation: push 'Esc' button twice" 14 82 --backtitle "Choice" --title "Variants" --radiolist "Choose: activate or stop device -=`ifconfig -a | grep -i -o \"eth0\"`=- " 13 51 10 "`echo -e \"To see OPEN PORTs of the network DEVICE\"` ; dialog --msgbox \"\`netstat --numeric-ports -aA inet\`\" 47 135" "*" off "`echo -e \"To ACTIVATE the network DEVICE >eth0< \"` ; echo \"To adjust the network DEVICE: use X-system, please\"" "*" off "`echo -e \"To STOP the netwok DEVICE >eth0<      \"` ; ifconfig eth0 down" "*" ON "`echo -e \"To ACTIVATE the network DEVICE again  \"` ; /etc/rc.d/rc.network start" "*" off 2>/var/.tmp/.e_eth0 ; chmod 0100 /var/.tmp/.e_eth0 ; cat /var/.tmp/.e_eth0 | cut -d";" -f2- | cut -d" " -f2- >/var/.tmp/.e_eth0 ; sh /var/.tmp/.e_eth0 ; rm /var/.tmp/.e_eth0 ; echo -=`netstat -i | grep -i -o 'eth0'`=- device is active ; rmdir --ignore-fail-on-non-empty /var/.tmp


Edit: 2012, aug 14.


Commands to install UI to manage the wire network card:
Note: this is an example.
Code:

cp /mnt/sda1/scripts/Ceth /usr/local/bin/scripts ;
chmod a-rwx /user/scripts/Ceth ;
chmod u+x /user/scripts/Ceth

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-[2]-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Quote:
http://www.murga-linux.com/puppy/viewtopic.php?p=497443#497443

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-[3]-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Quote:

1st.sh
Code:

#!/bin/bash
#This is the first script for use after booting with the parameter: pfix=nox,ram
#This script is for starting of use of the place, which the SFS file occupies after booting from the CD.
#Information "size=122000k" is from /etc/mtab
umount -l /dev/loop0 ;
umount -l /initrd/mnt/tmpfs ;
umount -l /initrd/pup_rw ;
#
mount tmpfs /initrd/mnt/tmpfs -t tmpfs -o size=122000k ;

cp --preserve=all -r /usr/bin /archive ;

mv /usr/bin /usr/"bin " ;

mkdir /usr/bin ;

mount --bind /initrd/mnt/tmpfs /usr/bin ;

echo "1"

cp --preserve=all -r /archive/bin/*?* /usr/bin ;

chmod 0755 /usr/bin ;

rm -r /usr/"bin " ;
rm -r /archive/bin ;

echo "2"


_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0847s ][ Queries: 11 (0.0141s) ][ GZIP on ]