Saturday, November 12, 2011

Ubuntu single paste to install lamp with phpmyadmin

sudo apt-get install apache2 libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-snmp mysql-server mysql-client
phpmyadmin

Monday, November 7, 2011

mysql.m compile 64 bit ubuntu linux

So I downloaded the awesome file exchange mysql.cpp file to link Matlab.

http://www.mathworks.com/matlabcentral/fileexchange/8663-mysql-database-connector

Then I installed the mysql and the extra libraries I thought I needed.

Then in Matlab I ran:

mex -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient mysql.cpp

and I got this error:

Warning: You are using gcc version "4.5.2-8ubuntu4)". The version
currently supported with MEX is "4.3.4".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/

/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /home/snow/matlab2011/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /home/snow/matlab2011/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /home/snow/matlab2011/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /home/snow/matlab2011/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /home/snow/matlab2011/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)

mex: compile of ' "mysql.cpp"' failed.

After digging around on the Internet I finally found the solution, and it was very simple:

Navigate to here:

$MATLAB_ROOT/sys/os/glnxa64/

(first make a backup of that folder just in case). and run these two commands:

mv libstdc++.so.6 libstdc++.so.6.orig
mv libgcc_s.so.1 libgcc_s.so.1.orig

Then I didn't even need to restart my Matlab session, I just reran the mex compile command it it worked! Yay!




Sunday, November 6, 2011

How to 3 monitors 2 graphics cards ubuntu xorg.conf

What a pain! After three days of frustration I finally was able to setup my three monitors to work on ubuntu.

Here is my xorg.conf:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 285.05.09 (buildmeister@swio-display-x86-rhel47-02.nvidia.com) Fri Sep 23 17:55:42 PDT 2011

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" Absolute 1600 900 #Location of first screen
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1" #Use this to stich monitors together so windows can be moved
EndSection

Section "Files"
EndSection

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "HP S2031"
HorizSync 24.0 - 83.0
VertRefresh 50.0 - 76.0
Option "DPMS"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "HP S2031"
HorizSync 24.0 - 83.0
VertRefresh 50.0 - 76.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 480"
BusID "PCI:1:0:0"
Option "RandRRotation" "on"
EndSection

Section "Device"
Identifier "Device1"
Driver "radeon"
VendorName "ATI Technologies"
BoardName "AMD Radeon HD 6500"
BusID "PCI:2:0:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +0+900"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "1"
SubSection "Display"
Depth 24
EndSubSection
EndSection


Important points:
Make sure binary drivers are installed for your graphics cards.
Use nvidia-settings to create and test your xorg.conf files. I noticed it was a lot easier to start with one screen, get each one working individually and then combine.

Backup, backup, backup your working xorg.conf. I screwed this up >10xs and it was nice to have a backup. Also alt-ctrl-backspace came in very handy so I could quickly retest my xorg.conf by restarting.

Option "Xinerama" "1" was needed so I could pass windows between my screens. I had issues using this if compiz effects were enabled, so I just turned off all, looks like it is an issue specific to 11.04, not older versions.

Also lspci |grep VGA was helpful to see my card info, this was needed in the xorg.conf file. I had issues with the relative screen positioning so I used absolute positioning which I would recommend.

Please post comments with any questions or feedback.

Saturday, November 5, 2011

Ubuntu Mint Install Nividia GTX 480 Drivers

First I went to the Nividia website:

http://www.nvidia.com/object/linux-display-amd64-285.05.09-driver.html

And found the right driver for my system. Downloaded the ./NVIDIA-Linux-x86_64-285.05.09.run file.
Change the permissions so I could execute:

chmod 777 ./NVIDIA-Linux-x86_64-285.05.09.run
Then I executed it:
./NVIDIA-Linux-x86_64-285.05.09.run


But it gives me a warning and says I have to kill my xserver. I Do this (I am using gnome):
sudo /etc/init.d/gdm stop

After I kill it I run the same command I tried above and follow the directions and it worked fine.

Thursday, February 3, 2011

"You have not chosen to rust "Entrust.net"" ubuntu ica fix

So I installed the new citrix ica client so I could remote into work on my ubuntu netbook but I get this error when trying to open up the application:

"You have not chosen to rust "Entrust.net"... blah blah blah SSL error...

To fix this you need to copy the Entrust.net certificates to your ICAClient/keysyore/cacerts/ directory.

Mine was located here:
/usr/lib/ICAClient/keystore/cacerts/

To get the Entrust.net certificates you can download them directly here:
wget https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer

Or go to the www.entrust.net/downloads and find the root certificates. Then answer a few stupid questions and download it.

Once you downloaded it you have to change the file extension from .cer to .crt. Once you have copied that file into the folder above you are DONE! I didn't have to close my browser or even login again, I just clicked on the application and it worked perfectly!

Tuesday, January 18, 2011

ubuntu how to copy all file types to a single folder

So I wanted to figure out an easy way to search my computer and my servers for a specific file type, in my case .eps figure files and copy them all to a single folder for me to review.

So first I need to make a folder to copy them do so I did this:

First I made the directory
mkdir figall

Move to the root folder
cd /

Now copy all files with extension .eps to my folder
sudo find -name "*.eps" -exec cp \{\} ~/Desktop/figall/ \;

Now I could repeat this for any file extension:
sudo find -name "*.jpg" -exec cp \{\} ~/Desktop/jpgall/ \;
sudo find -name "*.doc" -exec cp \{\} ~/Desktop/docall/ \;
sudo find -name "*.tex" -exec cp \{\} ~/Desktop/texall/ \;






Monday, January 17, 2011

make ubuntu gnome look like windows XP

This was great, I downloaded it and within minutes my entire desktop looked just like windows. Don't get me wrong, I hate windows and I can't wait for it to go out of business but this is funny and now people that use my computer will be clueless that it is not windows.

http://ubuntu.online02.com/node/14

Here is the direct link:
http://ubuntu.online02.com/files/XpGnome.tar.gz

Just:

tar -xvf XpGnome.tar.gz
cd XpGnome
sudo ./InstallXpGnome.sh

Friday, January 14, 2011

stream logitech alert camera through rtsp ubuntu linux

You can use VLC to do this here is an example:

vlc rtsp://192.168.2.137:554/HighResolutionVideo

or

vlc rtsp://192.168.2.137:554/LowResolutionVideo

Monday, January 3, 2011

Funniest crashthesuperbowl 2011 commerical finger lick

Just saw this:


You can vote for here it.
http://www.crashthesuperbowl.com/?%2F%3Ffinalist=1264#/?finalist=1264

Loved this commerical!
-Ben