function setprompt
{
local RED="\[$(tput setaf 1)\]"
local RESET="\[$(tput sgr0)\]"
if [ `id -u` = 0 ] # check if user is root
then
PS1="$RED[\u@\h:\W]$RESET "
else
PS1="[\u@\h:\W]$RESET "
fi
}
setprompt
Monday, March 9, 2009
Red prompt when ROOT
Thursday, March 5, 2009
Installling LINUX at UNAL
Proxy: http://192.168.100.3:8888/
Install the basic programs only.
Write down in the console
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
export https_proxy=http://192.168.100.3:8888/
Then
# apt-get install desktop kde-desktop
Remove kdetoys kdegames kdeaccesibility kdeedu
http://docking.ncl.ac.uk/proxy/linux/
You can also write down in your ~/.bashrc
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
export https_proxy=http://192.168.100.3:8888/
Tambien podrĂa eventualmente funcionar:
export http_proxy="http://168.176.195.227:8888/"
export https_proxy="http://168.176.195.227:8888/"
export ftp_proxy="http://168.176.195.227:8888/"
Add to .bashrc the following lines
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
To configure aptitude, add to /etc/apt/apt.conf the line
Acquire::http::Proxy "http://192.168.100.3:8888/";
Configure Firefox:
Edit/Preferences/Advanced/Network
Connection-Settings
Check Manual proxy configuration
HTTP proxy 192.168.100.3
Port 8888
Check: USE THIS PROXY SERVER FOR ALL PROTOCOLS
No proxy on: localhost, 127.0.0.1, 168.176.*, .unal.edu.co
Control Center-> Proxy
Manually specify the proxy settings
Servers
HTTP: http://192.168.100.3 PORT: 8888
Check Use the same proxy server for all protocols
Servers
HTTP: http://192.168.100.3 PORT: 8888
Check Use the same proxy server for all protocols
Saturday, February 21, 2009
Installing MATLAB in Debian 5 Lenny
I create
# mkdir /usr/local/matlab
# cp /***/license.dat /usr/local/matlab
Then if I do /media/cdrom/install
I get the following error:
earendil:/usr/local/matlab# /media/cdrom/install
-------------------------------------------------------------------
An error status was returned by the program 'xsetup',
the X Window System version of 'install'. The following
messages were written to standard error:
Can't open display.
Attempt to fix the problem and try again. If X is not available
or 'xsetup' cannot be made to work then try the terminal
version of 'install' using the command:
install* -t or INSTALL* -t
-------------------------------------------------------------------
Sorry! Setup aborted . . .
According to some forums do:
# apt-get install libxp-dev
However, I did follow the instructions of:
http://www.debianhelp.org/node/7432
1. Let run the install script so that it creates some environmental variables correctly.
2. Then
# cp /media/cdrom/update/bin/glnx86/libmwins.so /usr/lib
or
# cp /media/cdrom/update/bin/glnxa64/libmwins.so /usr/lib64
Check if you want to install the one of glnx86, glnxa64 and sol64 instead
3. Copy xsetup from the same directory to the install directory.
# cp /media/cdrom/update/bin/glnx86/xsetup /usr/local/matlab
4. From the home directory: (somewhere where install does not reside)
# /home/daa/cdrom/install
LATER when you run matlab you will see some errors associated to java
install java (http://www.java.com/en/download/index.jsp)
and then edit the file in bin/matlab
at the begining of the script (around line 180) write down:
# There is an error with the java that comes with MATLAB. Use the other java
export AWT_TOOLKIT=MToolkit
#export MATLAB_JAVA=/usr/lib/jvm/java-1.6.0-sun-1.6.0.10/jre
#export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
export MATLAB_JAVA=/opt/jre1.6.0_12/
Finally activate the multithreading part in Preferences
ENJOY!
Installing LIBTRASH
IGNORE_HIDDEN = NO
IGNORE_EDITOR_BACKUP = NO
UNREMOVABLE_DIRS=/bin;/boot;/dev;/etc;/lib;/sbin;/usr
then
$make
#make install
add to /etc/profile, /etc/bash.bashrc and $HOME/profile, $HOME/bash.rc the following lines:
# LIBTRASH requires the following four lines
export LD_PRELOAD=/usr/local/lib/libtrash.so
alias su="su -l"
alias trash_on="export TRASH_OFF=NO"
alias trash_off="export TRASH_OFF=YES"
If you want to change something in the configuration, make it in the file ".libtrash", using as an example /etc/libtrash.conf
Remember that has to create the trash subdirectory that is for example $HOME/Trash
Finally to check that all is working
$ su -c "set|grep LD_PRELOAD"
Should output something like:
LD_PRELOAD=/usr/local/lib/libtrash.so
Thursday, February 19, 2009
Packages to be installed
amule
basket
dict
dict-gcide
dict-moby-thesaurus
dict-wn
djview4
gwenview
hugin (it requires to add to /etc/apt/sources.list references to http://www.debian-multimedia.org/ in order to install autopano-sift-c)
inkscape
joe
kchmviewer
kde
kflickr
kile
krename
krusader
lha
libqt4-core
mc
mplayer
ntfs-3g
octave
pdfjam (este es para pdfnup)
p7zip
rar
rpm
ssh-server
unace
unarj
unrar
workrave
xine
xmms
And download from their respective webpages:
adobe flash
acrobat reader
java (http://www.java.com/en/download/index.jsp)
picasa
realplayer
skype
texlive
virtualbox
libtrash (recuede leer el archivo de configuracion y ejecutar al final
su -c "set|grep LD_PRELOAD"
y
set|grep LD_PRELOAD
para verificar que todo esta bien).
WIN32 Codecs... in /usr/lib/win32.
Download the codecs here: http://www.mplayerhq.hu
copy all the codes to /usr/lib/codecs
then create the following soft links:
# ln -s /usr/lib/codecs /usr/local/lib/codecs
# ln -s /usr/lib/codecs /usr/local/lib/win32
# ln -s /usr/lib/codecs /usr/lib/win32
libdvdcss http://developers.videolan.org/libdvdcss
Tuesday, February 17, 2009
ntfs-3g
My /etc/fstab is, for example:
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/hda1 / ext3 errors=remount-ro 0 1
/dev/hda6 /home ext3 defaults 0 2
/dev/hda5 none swap sw 0 0
/dev/sda6 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
# Disco duro Mandriva 2009
/dev/sda5 /media/hd ext3 defaults 1 1
/dev/sda1 /media/windows ntfs-3g defaults 0 0
#none /proc proc defaults 0 0
#none /tmp tmpfs defaults 0 0
#/dev/sda6 swap swap defaults 0 0
#/dev/sda1 /media/hd2 ext3 defaults 1 2
Configuring the "Microsoft Ergonomic Natural Keyboard 4000" under Debian 5 Lenny
"Legacy USB keyboard support" option
Install the unstable package xkb-data_1.5-2_all.deb
In the kcontrol (control center) -> keyboard layout: activate the keyboard model "Microsoft Natural Wireless Ergonomic Keyboard 7000".
And voila!
If you want to test the keys use the
$ xev
command, and run
$ modmap -pke
in order to see all the keycode associations.
I also changed my /etc/X11/xorg.conf to
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "microsoft7000"
Option "XkbLayout" "latam"
EndSection