If durring the install for matlab you recieve this error:
update/bin/glnx86/xsetup: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
try install the libxp-dev package:
apt-get install libxp6 libxp-dev
-or-
yum install libXp libXp-devel
MathWorks official answer: MathWorks support solution 1-12E9FJ via MathWorks Tech Notes
This library has to do with "X Printing Extension (Xprint) client library"
My method for finding this solution (before MathWorks posted solution 1-12E9FJ) may work in other cases. I'm seeing searchs for libxmu.so.6 that end up on my site. What I do fist when I have a missing library error, like these, is go to http://packages.debian.org or packages.ubuntu.com depending on the OS. then I so a package contents search for the library and my OS version. Ie:
packages.debian.org >> "Search the contents of packages" >> "paths ending with the keyword" >> Distrobution: testing >> Architecture: AMD64 >> libxp.so.6 >> search
This should yield the necessary package. I then check if I have said package installed.
dpkg -s ::packagename::
If it's not then I install it.
sudo apt-get install ::packagename::
other wise you have a bigger problem and should consult Google or generally more helpful the official IRC support channel for you OS.
23 February 2011
Simulink on Linux
I was having a problem with simulink under Matlab R2007a. It is fine on windows, but I use Kubuntu Linux and here Matlab crashes and closes with a "segmentation fault" everytime something with concern to simulink gets opened. It happens when I open an existing model, the librabry window or the simulink preferences...
Here's what I did to fix it:
then, I opened up the matlab shell script, which is located in:
for me this was /opt/matlab/bin/matlab and I scrolled down to the end of the comments and added this as the very first command in the script:
This points to the location of my Sun JRE 1.6 installation. See this topic if you can't find yours: http://www.mathworks.com/support/solutions/data/1-1812J.html?1-1812J
Here's what I did to fix it:
sudo apt-get install sun-java6-jre sun-java6-fonts
/{YOUR MATLAB DIRECTORY}/bin/matlab
for me this was /opt/matlab/bin/matlab and I scrolled down to the end of the comments and added this as the very first command in the script:
export MATLAB_JAVA=/usr/lib/jvm/java-6-sun-1.6.0.00/jre/
Other Linux distros may need "setenv" instead of "export"This points to the location of my Sun JRE 1.6 installation. See this topic if you can't find yours: http://www.mathworks.com/support/solutions/data/1-1812J.html?1-1812J
Remove taskbar entry for Pidgin in KDE
Here are the instructions (feel free to copy/adjust them, for the Pidgin FAQ, if there is any need):
There might be similar options for the Gnome window manager, and maybe others.
- Be sure that the system tray icon of Pidgin is always shown, so you will be able to open the buddy list, if it is minimized (menu "Tools", then "Preferences"; "Interface" tab; "Show system tray icon" to "Always").
- Click on the Pidgin icon, in the "Buddy List" window titlebar.
- In the window menu, click on "Advanced", and then on "Special Window Settings...".
- In the "Window-Specific Settings" window, click on the "Preferences" tab.
- In the tab, check "Skip taskbar", and then select "Force" in the dropdown list, and check the box on the right of the dropdown list.
- Finally, click on the "Ok" button, and the taskbar entry for the Pidgin buddy list should disappear.
There might be similar options for the Gnome window manager, and maybe others.
Combining PDF files
It is very useful to combine multiple PDF documents into one file. This is useful especially if you accumulate many PDFs (newsletters, bills, etc.) over time.
Preparing Your system
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
In the above command after "-sOUTPUTFILE=" type whatever name you want for the merged file (don't forget to append .pdf to the end of the file name). Rename "1.pdf 2.pdf 3.pdf" to whatever your file names are (separate your file names with a space).
After you run the above command, a new PDF file called combinedpdf.pdf will be created with your individual files merged according to the order you list.
If you want to know more options available for gs command check man page
Preparing Your system
sudo apt-get install gs pdftk
Now we will see one example how to combine pdf files let us assume we have 1.pdf,2.pdf,3.pdf files and now we need to cobmine this files using the following commandgs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
In the above command after "-sOUTPUTFILE=" type whatever name you want for the merged file (don't forget to append .pdf to the end of the file name). Rename "1.pdf 2.pdf 3.pdf" to whatever your file names are (separate your file names with a space).
After you run the above command, a new PDF file called combinedpdf.pdf will be created with your individual files merged according to the order you list.
If you want to know more options available for gs command check man page
Convert .nrg to .iso
if you want to convert .nrg file to .iso file you can use nrg2iso tool to create this. nrg2iso is a program that extracts ISO9660 data from Nero \u201c.nrg\u201d CD-ROM image files.
Install nrg2iso in Ubuntu
Using nrg2iso:
Example:
Now you can burn your iso with your preferred linux burning app.
Install nrg2iso in Ubuntu
sudo apt-get install nrg2iso
Using nrg2iso:
nrg2iso [nrg-file] [iso-file]
Example:
nrg2iso image.nrg image.iso
Now you can burn your iso with your preferred linux burning app.
File Backup Script
I have a server runing Linux from Scratch (LFS) that I need to be able to back up and have a reserve system ready to take it's place with minium downtime. I had two identical boxes one was the server the other was not in use. I decided to put a single pull-out HDD tray in each one. I obtained two identical Harddrives and used Acronis True Image or Norton Ghost to re-images the drives to be identical and carry my LFS server. I installed one disk INSIDE the server and the other went in to the pullout tray.
I then used cron to run my backup script every night at 2am. The script mounts the pull-out drive analyzes the files and directories of my two hard drives and copies new or updated files from specific directories on the primary to the pull-out drive. and Finally unmounts the pull-out drive.
Now if my Primary HDD or server die all I have to do is grab the pull-out drive slam it the the backup server and boot it up.
I assume that a USB drive would work this way for backups, but you'll need to think about how to get the recovery system to boot from USB.
The Script after the jump
#!/bin/bash
I then used cron to run my backup script every night at 2am. The script mounts the pull-out drive analyzes the files and directories of my two hard drives and copies new or updated files from specific directories on the primary to the pull-out drive. and Finally unmounts the pull-out drive.
Now if my Primary HDD or server die all I have to do is grab the pull-out drive slam it the the backup server and boot it up.
I assume that a USB drive would work this way for backups, but you'll need to think about how to get the recovery system to boot from USB.
The Script after the jump
#!/bin/bash
# Put in /usr/local/scripts or wherever you like.
#
# Crontab entry
# 30 3 * * * /usr/local/scripts/MasterRaidSyncScript 2>/dev/null
# This will run every night at 3:30
# Put this in roots crontab otherwise you cannot mount drives
# hint (run as root): crontab -e
SRCMOUNT="/mnt/source"
DSTMOUNT="/mnt/dest"
function quit {
cd /
/usr/bin/smbumount /mnt/source
/usr/bin/smbumount /mnt/dest
/bin/umount /mnt/source
/bin/umount /mnt/dest
exit 1
}
function sambamount {
# /usr/bin/smbmount [Server Shsare] [Mount Point] -o username=[Username],password=[Password]
/usr/bin/smbmount $1 $2 -o username=$3,password=$4 &> /dev/null
if [ "$?" -ne "0" ]; then
echo Sambamount failed to mount $1
quit
fi
}
function rosambamount {
/usr/bin/smbmount $1 $2 -o ro,username=$3,password=$4 &> /dev/null
if [ "$?" -ne "0" ]; then
echo Sambamount failed to mount $1
quit
fi
}
function sambaumount {
/usr/bin/smbumount $1
if [ "$?" -ne "0" ]; then
echo Sambaumount failed to mount $1
quit
fi
}
function localmount {
# /bin/mount [Server Share]
/bin/mount $1 $2
if [ "$?" -ne "0" ]; then
echo Mount failed to mount $1
quit
fi
}
function localunmount {
# /bin/mount [Server Share]
/bin/umount $1
if [ "$?" -ne "0" ]; then
echo Mount failed to unmount $1
quit
fi
}
function SyncSambaDirectories {
SRCSHARE=$1
DSTSHARE=$2
USER=$3
PASS=$4
echo Syncing share $SRCSHARE to $DSTSHARE
rosambamount $SRCSHARE $SRCMOUNT $USER $PASS
sambamount $DSTSHARE $DSTMOUNT $USER $PASS
cd $DSTMOUNT
if [ "$?" -ne "0" ]; then
echo Error changing directory to $DSTSHARE
quit
fi
/usr/bin/rsync -va --delete $SRCMOUNT/ .
if [ "$?" -ne "0" ]; then
echo Rsync returned an error copying $SRCSHARE to $DSTSHARE
quit
fi
cd /
sambaumount $SRCMOUNT
sambaumount $DSTMOUNT
}
function SyncLocalDirectories {
SRCSHARE=$1
DSTSHARE=$2
echo Syncing folder $SRCSHARE to $DSTSHARE
cd $DSTSHARE
if [ "$?" -ne "0" ]; then
echo Error changing directory to $DSTSHARE
quit
fi
/usr/bin/rsync -va --delete $SRCSHARE/ .
if [ "$?" -ne "0" ]; then
echo Rsync returned an error copying $SRCSHARE to $DSTSHARE
quit
fi
cd /
}
localmount /dev/hdb1 /mnt/dest
SyncLocalDirectories /home /mnt/dest/home
SyncLocalDirectories /etc /mnt/dest/etc
SyncLocalDirectories /var/www /mnt/dest/var/www
SyncLocalDirectories /var/virtualhosts /mnt/dest/var/virtualhosts
#SyncLocalDirectories /var/lib/ldap /mnt/dest/var/lib/ldap
SyncLocalDirectories /var/lib/mysql /mnt/dest/var/lib/mysql
SyncLocalDirectories /root /mnt/dest/root
SyncLocalDirectories /usr/local /mnt/dest/usr/local
localunmount /mnt/dest
Artec e+48u and Linux w/ SANE
In order to use the Artec e+48u on Linux with SANE you must have the scanner firmware file and have the conf file containing the firmware file path.
Download the driver file here. Use your favorite file extraction tool and copy the Artec48.usb file to /usr/share/sane/artec_eplus48u/Artec48.usb
open /etc/sane.d/artec_eplus48u.conf and uncomment and modify the following line as necessary:
option artecFirmwareFile /usr/share/sane/artec_eplus48u/Artec48.usb
If necessary add your users to the scanner group using the following:
adduser USERNAME scanner
Download the driver file here. Use your favorite file extraction tool and copy the Artec48.usb file to /usr/share/sane/artec_eplus48u/Artec48.usb
open /etc/sane.d/artec_eplus48u.conf and uncomment and modify the following line as necessary:
option artecFirmwareFile /usr/share/sane/artec_eplus48u/Artec48.usb
If necessary add your users to the scanner group using the following:
adduser USERNAME scanner
OpenWRT on Motorola WR850g
tested on V2 and V3 using White Russian RC3
Install X-Wrt:
I used the tftp method on my wr850g (this might set the routers lan IP to 192.168.1.1), but I recommend using the X-Wrt bin file and uploading it via the web interface.
1. NVRAM
ssh root@192.168.10.1 (or whatever IP you use)
nvram set lan_ifname=vlan0
nvram set lan_proto=static
nvram set lan_ipaddr=192.168.10.1
nvram set lan_netmask=255.255.255.0
nvram set wifi_ifname=eth1
nvram set wifi_proto=static
nvram set wifi_ipaddr=192.168.1.1
nvram set wifi_netmask=255.255.255.0
nvram set wan_ifname=vlan0
nvram set wan_proto=dhcp
nvram set wl0_ssid=Hotspot
nvram commit
reboot
2.1 DNSMASQ
this step only applies to X-WRT firmwares. skip to section 2.2. See webif^2 to set up DNS and DHCP for the three interfaces vlan0, vlan1, and wifi
2.2 Skip this step if using firmware >= RC4
ln -s /usr/sbin/dnsmasq /etc/init.d/S50dnsmasq
chmod a+x /etc/init.d/S50dnsmasq
rm /etc/dnsmasq.conf
vi /etc/dnsmasq.conf
/etc/dnsmasq.conf :
domain-needed
bogus-priv
filterwin2k
local=/lan/
domain=lan
except-interface=vlan1
dhcp-range=vlan0,192.168.10.200,192.168.10.250,255.255.255.0,3h
dhcp-range=eth1,192.168.1.200,192.168.1.250,255.255.255.0,1h
dhcp-leasefile=/tmp/dhcp.leases
dhcp-option=vlan0,3,192.168.10.1
dhcp-option=vlan0,6,192.168.10.1
dhcp-option=eth1,3,192.168.1.1
dhcp-option=eth1,6,192.168.1.1
3. FIREWALL
vi /etc/init.d/S35firewall
NOTE: after doing a new WR850g with RC3 I used /etcinit.d/S45firewall please find a file is right for you. (hint: use ls /etc/init.d/)
Add:
WIFI="$(nvram get wifi_ifname)"
under the similar entries at the top.
Find the ### FORWARDING section
Add:
iptables -A FORWARD -i $WIFI -o $WAN -j ACCEPT
#iptables -A FORWARD -i $WIFI -o $LAN -j ACCEPT
#iptables -A FORWARD -i $LAN -o $WIFI -j ACCEPT
under accept and similar entries. Remove the # from the last two lines to enable a "soft" bridge.
APPENDIX:
I have also done similar procedures for RC6
RC3 was more reliable and smaller
Install X-Wrt:
I used the tftp method on my wr850g (this might set the routers lan IP to 192.168.1.1), but I recommend using the X-Wrt bin file and uploading it via the web interface.
1. NVRAM
ssh root@192.168.10.1 (or whatever IP you use)
nvram set lan_ifname=vlan0
nvram set lan_proto=static
nvram set lan_ipaddr=192.168.10.1
nvram set lan_netmask=255.255.255.0
nvram set wifi_ifname=eth1
nvram set wifi_proto=static
nvram set wifi_ipaddr=192.168.1.1
nvram set wifi_netmask=255.255.255.0
nvram set wan_ifname=vlan0
nvram set wan_proto=dhcp
nvram set wl0_ssid=Hotspot
nvram commit
reboot
2.1 DNSMASQ
this step only applies to X-WRT firmwares. skip to section 2.2. See webif^2 to set up DNS and DHCP for the three interfaces vlan0, vlan1, and wifi
2.2 Skip this step if using firmware >= RC4
ln -s /usr/sbin/dnsmasq /etc/init.d/S50dnsmasq
chmod a+x /etc/init.d/S50dnsmasq
rm /etc/dnsmasq.conf
vi /etc/dnsmasq.conf
/etc/dnsmasq.conf :
domain-needed
bogus-priv
filterwin2k
local=/lan/
domain=lan
except-interface=vlan1
dhcp-range=vlan0,192.168.10.200,192.168.10.250,255.255.255.0,3h
dhcp-range=eth1,192.168.1.200,192.168.1.250,255.255.255.0,1h
dhcp-leasefile=/tmp/dhcp.leases
dhcp-option=vlan0,3,192.168.10.1
dhcp-option=vlan0,6,192.168.10.1
dhcp-option=eth1,3,192.168.1.1
dhcp-option=eth1,6,192.168.1.1
3. FIREWALL
vi /etc/init.d/S35firewall
NOTE: after doing a new WR850g with RC3 I used /etcinit.d/S45firewall please find a file is right for you. (hint: use ls /etc/init.d/)
Add:
WIFI="$(nvram get wifi_ifname)"
under the similar entries at the top.
Find the ### FORWARDING section
Add:
iptables -A FORWARD -i $WIFI -o $WAN -j ACCEPT
#iptables -A FORWARD -i $WIFI -o $LAN -j ACCEPT
#iptables -A FORWARD -i $LAN -o $WIFI -j ACCEPT
under accept and similar entries. Remove the # from the last two lines to enable a "soft" bridge.
APPENDIX:
quick vi help:I take no responsability for this information or what you do with it.
(Esc : I) to enter edit mode
(Esc : q!) to exit with out saving
(Esc : wq) to exit and save
Debian/Ubuntu on KDS Valiant 6480iPTD
Use this how-to if your sound and/or battery meters don't work out of the box using Ubuntu on a KDS Valiant laptop. This how-to should work on any KDS laptop and any version of Ubuntu. It has only been tested on the KDS Valiant 6480iPTD using Ubuntu 6.06.1 and 6.10 .
Background information (Why you need this):
The Valiant has a limited number of interrupts available to it. ACPI wants a large chuck for itself. The Serial Port B on my computer was also conflicting with the interrupts. While the sound card only needs a very small range, it wants a range directly in the middle of the ACPI range. While you could custom compile a new kernel and work around this problem it is much easier to simply disable ACPI. ACPI provides power management services. Like automatic frequency scaling and Standby and Hibernate support. I have found that these services don't work to well on the Valiant anyway. It has an 800Mhz CPU and to throttle that is next to useless. The XFCE Battery Meter does not use ACPI like most of the other battery meters and will continue to work after this how-to.
Enter the bios
When the desktop starts open a terminal and add
Try playing a CD using your favorite media player.
Background information (Why you need this):
The Valiant has a limited number of interrupts available to it. ACPI wants a large chuck for itself. The Serial Port B on my computer was also conflicting with the interrupts. While the sound card only needs a very small range, it wants a range directly in the middle of the ACPI range. While you could custom compile a new kernel and work around this problem it is much easier to simply disable ACPI. ACPI provides power management services. Like automatic frequency scaling and Standby and Hibernate support. I have found that these services don't work to well on the Valiant anyway. It has an 800Mhz CPU and to throttle that is next to useless. The XFCE Battery Meter does not use ACPI like most of the other battery meters and will continue to work after this how-to.
Enter the bios
F2
and disable the serial ports, specially port B.When the desktop starts open a terminal and add
acpi=off
to your list of kernel options in the file /boot/grub/menu.lst
. And in /etc/modules
add apm power_off=1
in a new line. In the open a terminal run alsamixer
. Using the left/right arrows to navigate to Master
. Using the up/down turn up your master volume. Using the left/right arrows to navigate to PCM
Using the up/down turn up your PCM volume.Try playing a CD using your favorite media player.
Why Debian / Why Ubuntu?
Linux V.S. Windows
Debian: Debian Linux Distrobution Home page
Ubuntu: Ubuntu Linux Homepage (Based on Debian)
Debuntu: A wonderful website with interseting Tips & Tricks for Debian based Linux systems, including ubuntu.
Debian: Debian Linux Distrobution Home page
Ubuntu: Ubuntu Linux Homepage (Based on Debian)
Debuntu: A wonderful website with interseting Tips & Tricks for Debian based Linux systems, including ubuntu.
Subscribe to:
Posts (Atom)