logging on console
My first tip is about logging, especially logging system logs on 11. and 12. console like it is in gentoo. If we are using common linux logger syslog the way is add this lines to /etc/syslog.conf
this lines says that syslog will log system logs to 12. console and all kernel logs to 11. console
Now we need restart syslog
or
it depends on distribution you are used.
we can view the console by pressing alt + F12 for system logs or alt + F11 for kernel logs, if we are in GUI we must press alt + ctrl + F11 or alt + ctrl + F12.
for return to GUI we press alt + F7 becouse default console for GUI is 7 ;)
advanced uninstall packages in slackware
if we want to remove some package on slackware we have to write whole name of package and it removes without asking. i solved this problem with very simple script. here it is:
we write this into file for example rempkg, copy this to /usr/sbin and give execute bit.
console resolulution
My last tip is about freebsd, I hope this topic isn't only for linux :)
I use freebsd but wihout x windows system and I don't like big resolution what is used by default. So I compiled vesa support into the kernel for better resolution.
first step what we need to do is change directory to /usr/src/sys/i386/conf architecture select which you use.
then we copy old config to new file.
add this line to the new config
save & exit
change directory to /usr/src and compile new kernel
after reboot we can show list of all resolutions by
for change resolution run this command
when we are definitely decided for resolution we can change it permanently by editing /etc/rc.conf and adding this lines
allscreens_flag s="MODE_<NUMB ER OF RESOLUTION>"
save & exit & reboot ;)
ps. I'm really sorry for my english but I'm not native english speaker so keep it in mind ;)
REGARDS,
vl4kn0
My first tip is about logging, especially logging system logs on 11. and 12. console like it is in gentoo. If we are using common linux logger syslog the way is add this lines to /etc/syslog.conf
Code:
# Log everything on tty12 *.* /dev/tty12 # Log kernel messages on tty11 kern.* /dev/tty11
Now we need restart syslog
Code:
/etc/init.d/syslogd restart
Code:
/etc/init.d/sysklog restart
we can view the console by pressing alt + F12 for system logs or alt + F11 for kernel logs, if we are in GUI we must press alt + ctrl + F11 or alt + ctrl + F12.
for return to GUI we press alt + F7 becouse default console for GUI is 7 ;)
advanced uninstall packages in slackware
if we want to remove some package on slackware we have to write whole name of package and it removes without asking. i solved this problem with very simple script. here it is:
Code:
#!/bin/bash
if [ -z $1 ]; then
echo "Missing arguments";
exit 0;
fi
PKG_DIR=/var/log/packages
for ARG in $*; do
PACKAGES=`ls $PKG_DIR | grep $ARG`;
for PKG in $PACKAGES; do
echo "Do you really want to remove $PKG (y|n) ?";
read ANS;
case $ANS in
y) removepkg $PKG > /dev/null;
echo "Package $PKG successful removed";
;;
*) echo "Skipping $PKG...";
;;
esac
done
done
Code:
cp rempkg /usr/sbin/rempkg && chmod +x /usr/sbin/rempkg
My last tip is about freebsd, I hope this topic isn't only for linux :)
I use freebsd but wihout x windows system and I don't like big resolution what is used by default. So I compiled vesa support into the kernel for better resolution.
first step what we need to do is change directory to /usr/src/sys/i386/conf architecture select which you use.
Code:
cd /usr/src/sys/i386/conf
Code:
cp GENERIC VESAKERN
Code:
options VESA options SC_PIXEL_MODE
change directory to /usr/src and compile new kernel
Code:
make buildkernel KERNCONF=VESAKERN make installkernel KERNCONF=VESAKERN reboot
Code:
vidcontrol -i mode
Code:
vidcontrol MODE_<NUMBER OF RESULUTION>
allscreens_flag s="MODE_<NUMB ER OF RESOLUTION>"
save & exit & reboot ;)
ps. I'm really sorry for my english but I'm not native english speaker so keep it in mind ;)
REGARDS,
vl4kn0
Comment