LinuxTent

  • rss
  • Home
  • About
  • Contact

Compiling and installing ROOT on Ubuntu

Mustafa | December 6, 2009 | 8:55 am

ROOT is an important framework for people working in high energy physics and in analyzing accelerators data and some other fields. I am not here to introduce ROOT, you probably know what it is if you are looking for how to compile it.

  1. First you need to download the source code package.
  2. Uncompress the source code package.
  3. Enter the folder
  4. Now you need to install the required packages sudo apt-get install build-essential libx11-dev libxft2-dev xorg-dev
  5. Here you start with configuration, there are many compilation options. You can check them by entering ./configure --help
  6. I used the following command, the python parameter is to instruct the compiler to compile the python interface ./configure --enable-opengl --prefix=/usr/local --enable-python
  7. Now the making sudo make
  8. The installing sudo make install
  9. Now go to gedit /etc/ld.so.conf.d/libc.conf
  10. Add the following line, do not forget to replace $ROOT by the path to the root folder on your computer $ROOT/lib
  11. sudo ldconfig

This worked for me.

ENJOY!

Comments
No Comments »
Categories
Uncategorized
Comments rss Comments rss
Trackback Trackback

Upgrading Wordpress

aboSamoor | September 9, 2009 | 11:11 am

After long procrastination, for about a year, our wordpress engine that render LinuxTent was upgraded eventually from 2.6 to 2.8.4 :) . The main reason to upgrade was to fix the security hole in the wordpress versions before 2.8.4. The warnings were spread over the internet that it is a serious attack.  According to some analysis the threat was due small bug in admin options file permissions, for more info look here.

The upgrade was easy with the help of the official upgrade tutorial,  FileZilla and PHPMyAdmin. It was just a matter of downloading, uploading and overwriting. Till now everything works fine. The new wordpress panel interface is really awesome :) . You feel you want to write more and more :P .

All the plugins were upgraded successfully except the Automatic Upgrade plugin. Anyway, I don’t think I want it anymore, especially that worpdress provide that nowadays by default. Check your /wp-admin/update-core.php to see if you have it or not.

I think I should maintain a backup for the wordpress in my repository, not sure if databases are maintained under common version control systems.

For anyone who did not upgrade yet, don’t let terrorism to take over the internet. Fight fear and confusion by upgrading your wordpress. Don’t forget that you are always standing on the shoulders of giants, Wordpress !.

Comments
1 Comment »
Categories
Uncategorized
Comments rss Comments rss
Trackback Trackback

Mathematica 7 high cpu usage on linux kernels 2.6.28+

aboSamoor | July 22, 2009 | 11:52 am

According to the email from then wolfram support, there is a patched shared libraries for the new linux kernels. Apparently, Mathematica having problems running on 2.6.28+. I followed the email of the technical support and it worked for me ;) and the cpu usage dropped from 80%+ on average to less than 5% !!!

The solution as mention in ubuntu forums [1]

  1. Download the file here:

    http://download.wolfram.com/?key=61JJHE

  2. Place the shared library in
    /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Libraries/Linux
  3. Download these files:

    http://download.wolfram.com/?key=MK4ZR8
    http://download.wolfram.com/?key=YHDAH4

  4. Place them in
    /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Libraries/Linux-x86-64

Good Luck :)

Comments
4 Comments »
Categories
Hints
Tags
2.6.28+, high cpu, linux, mathematica 7
Comments rss Comments rss
Trackback Trackback

Mathematica 7 java interface problems

aboSamoor | | 11:40 am

Java interfaces usually brings problems as cpu high usage and rendering difficulties. You can notice that for matlab, Netbeans and Mathematica. I think they have to consider QT4 for cross platform UI library.

Java used mainly in Mathematica in the documentation center, and this usage allocated about 15% of the CPU to Java all the time, to reduce the usage you have to replace JLink folder with patched one.

  1. wget http://download.wolfram.com/download/GM5YM4/JLink.zip
  2. extract the zip file
  3. Replace the /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/Jlink with the new folder

If you don’t want Java anymore your can use this trick, notice that you will block the documentation center. However, you can use http://reference.wolfram.com instead.

  1. Renaming the folder
    mv /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink_old
  2. OR Making it not executable
    chmod a-x chmod a-x /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink

Sources:

  1. The patched folder
  2. Renaming option [1][2]
Comments
No Comments »
Categories
Uncategorized
Tags
interface, java, mathematica 7
Comments rss Comments rss
Trackback Trackback

Mathematica rendering 3D plots problems

aboSamoor | | 11:18 am

Rendering Graphics3D using Mathematica on linux generally and specifically on Ubuntu 9.04+ is not fun. The output is not displayed till you rotate the object, and once you rotate the 3D object the cpu usage jump to 100% which gives bad experience using Mathematica for Ubuntu users. This is a driver issue which it is expected to be addressed with the newer Intel graphics drivers which introduces UXA option instead of EXA as an acceleration method. As 9.04 was released this new technology was not stable enough to be enabled by default.

Now, to solve the problem for Mathematica you have two options:

  1. Run Mathematica with mesa option
    mathematica -mesa

    • Modify /etc/X11/xorg.conf to add the UXA option
      Section "Device"
      Identifier "Configured Video Device"
      Option "AccelMethod" "uxa"
      EndSection

    • Logout to restart the X server
    • Notice: Don’t forget to backup your xorg.conf before editing ;)

Sources:

  1. UXA option
  2. Mesa option
Comments
1 Comment »
Categories
Uncategorized
Tags
3d, Graphics, mathematica, mathematica 7, plot, ubuntu
Comments rss Comments rss
Trackback Trackback

Konica Minolta 7222 on Ubuntu,Linux

aboSamoor | May 27, 2009 | 9:32 am

The Linux driver for Konica Minolta 7222 is not working for me, when I send the test page it gives 32 garbage page.

To solve the problem, you can:

  1. Fix the konica driver ;)
  2. Install a virtual machine XP using virtualbox and connect it to the network printer using the windows driver. The printing process is slow according to the usage of the NAT service. To solve such low performance use Host adapter solution from virtualbox as a networking alternative to NAT service which asks you to make many changes including creating a new virtual bridge on your ubuntu host machine :) , for more details read this tutorial. Eventually your new virtual XP machine will appear as a new machine in the LAN so you can order printing requests as any other XP machine. Anyway, it is not east task especially that my network has strict administration rules which does not allow giving an unauthenticated machines an IP address
  3. Use generic drivers. You can pick any one of many generic drivers available by default in ubuntu :) :
    1. go to System/Administration/printing or run the following command
      system-config-printer
    2. Choose new printer, you will get this dialog after searching for available printers
    3. new-printer dialog

      new-printer dialog

    4. After choosing the IP address of your network printer, press forward to get the “choose driver” dialog.
    5. Choose Select Printer from database then for makes choose Generic. Press forward to get the following dialog
      Choose Driver dialog

      Choose Driver dialog

    6. Most of the models are working, for me PCL 5, PCL 5e and PCL 6/PCL XL work for normal printing orders, for both sides printing option only PCL6/PCL XL works, after choosing the model choose the driver the best to choose is the recommended one.
    7. After that you have to fill the name and description fields, and Yupeee you have a new printer.
    8. Try printing a test page by choosing prosperities from right click menu.
    9. Go to Settings/Tests and Maintenance. Press print test page.

Both Sides printing Option

As I said before this option is not working smoothly with all the generic drivers even it is available in most of them. For example, my network printer supports both sides option, the PCL 5 driver also give the option from the printer properties dialog but it is disabled in the evince printing dialog. Moreover, adding the both sides option to the lpr command did not work with the PCL 5 generic driver, choosing PCL6/PCL XL solved the probelm.

To check if your driver provides both sides option:

  1. Go to Your Printer Properties Dialog
  2. Choose Printer Options
  3. Go to Gutenprint Printer Features Common
  4. Change the default setting to whatever you want

Providing the option of both sides does not mean that it is guaranteed to work, so to test the option, open any pdf you have using evince, and try the printing dialog. Go to the page setup tab if the both sides option is enabled this means that it is working, if it is disabled try another generic driver.

You can pass the both sides option to the lpr command in this way:
$ lpr -P NameofYourPrinter -o InputSlot=Standard -o Resolution=FromPrintoutMode -o PageSize=A4 -o sides=two-sided-long-edge -o page-ranges=3-4 nameofthefile

Comments
1 Comment »
Categories
Uncategorized
Tags
7222, double side, Konica, Minolta, print
Comments rss Comments rss
Trackback Trackback

Wikipedia to be printed

aboSamoor | May 14, 2009 | 3:01 pm

Once you have laser network printer without any upper limit, your appetite of reading will start to increase. Within one month my office converted to a mess of articles, papers, books, and problems. However, Wikipedia is still my favorite source of reading. In Wikipedia no more fear to read more about anything you want or you do not; everything is explained by clicking on the new term that frightened you. Wikiing becomes a trend which is being included in new and special gadgets like Kindle. Moreover, such luxury is not available everywhere and having Internet while you are in a bus is far from being achieved in the near future [at least in TRNC].

I searched for a long time for a solution to make Wikipedia printed articles more elegant and practical. For example, if you want to print the printable version of the USA article this will cost you 47 page ! Changing the printing font size in Firefox browser helps. However, the printed article structure is far from being elegant: you have many white space areas and a photo or table may occupy consecutive pages in ugly and scattered way.

Apparently, there is no available firefox addons that can change the style of wikipedia article to suitable format. I think CSS and the new web fonts can be in great help [I am not sure]. PediaPress made good efforts with Wikimedia to make a new extension that allow you to collect the articles you want to be printed in one pdf file. You can also order a printed copy from pediapress. This extension which is called [collection] or [wiki-to-print] is enabled in English Wikibooks, French, Polish, Dutch, Portuguese, Spanish, and Simple English wikipedias. According to scalability issues this extension is not available directly in English Wikipedia. You can use the extension in English Wikipedia in one of these ways:

  1. Collection extension is available to logged in users of English Wikiepedia. Using this solution:
    USA artcile printed in 44 pages with images in one column , the file size is 8 MB.
  2. Use the pedia button in the collection extension. Using this solution:
    USA article printed in 26 pages without images in one column. The file size is 581KB

Moreover, I found superior solution to print wikipedia articles. Prince provide neat conversion method for HTML, XML files that generates pdf files. The software is cross platform and has a cli. Running the following command generates a pdf file for the USA article in 28 pages with images in 2 columns. The file size is 1.3MB.

rami@rami-desktop:~$ prince --no-author-style
-s http://www.princexml.com/howcome2008/wikipedia/wiki2.css
http://en.wikipedia.org/wiki/Usa -o usa.pdf

I used the prince software to print the wikipedia article on Neural Networks. Once Shariq saw the output, he said it is like a conference paper. Mustafa replied that it is even in a better quality.

Comments
1 Comment »
Categories
How to ?
Tags
prince, print, wikipedia
Comments rss Comments rss
Trackback Trackback

Skype on Ubuntu, “Call Failed: Problem with Audio Playback”

Mustafa | April 15, 2009 | 11:51 am

If you are getting this error “Call Failed: Problem with Audio Playback” every time you try to make a call with Skype, first check that your microphone is working properly, you can do that by going to the Sound Recorded in your menu, on Gnome, it is Application=>Sound and Video=> Sound Recorder.

If it is working fine and you are still getting the same error just remove pulseaudio,


sudo apt-get remove pulseaudio

I hope this solves the problem, it worked with me on three different machines with different hardware.

ENJOY!

Comments
No Comments »
Categories
Hints, How to ?
Tags
Audio Playback, pulseaudio, Skype
Comments rss Comments rss
Trackback Trackback

Format Partition or Flash Memory on Ubuntu

Mustafa | March 2, 2009 | 11:13 am

When you want to format a certain partition, first you need to know the label of the partition (for more information about this go here)

To that enter this command in your terminal,
df
under “Filesystem” you will find the label you want, and under “Mounted on” you will find the mounting point.
Now to format it you have to unmount it first :

sudo umount "Mount Point"

Then you can format it, there are different commands for formatting depending on which filesystem (FAT, Ext2,Ext3, Ext4, … etc) , for example lets say i want to format my flash memory stick which is under the filesystem label /dev/sdb1 , it is mounted on /media/disk, and I want to format it ext2 i will do this

sudo umount /media/disk
sudo mkfs.ext2 /dev/sdb1

ENJOY!

Comments
No Comments »
Categories
Hints, How to ?
Tags
format ubuntu, mkfs
Comments rss Comments rss
Trackback Trackback

USB Speakers Ubuntu

Mustafa | December 22, 2008 | 1:25 am

You probably noticed that USB speakers don’t work as soon as you plug them on Ubuntu, all what you have to do is to change the sound output device, on Ubuntu (Gnome Desktop) you can do that by going to the System=>Preferences=>Sound , then on “Music and Movies” choose the device which says USB. Click Test to test them.

ENJOY!

Comments
2 Comments »
Categories
Hints
Tags
USB Speaker
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Free News

Cloud without Rain

2.6.24 6 A100 ubuntu sound fix advanced alarm alias in .bashrc apt-get proxy archive bash bchunk bg bin iso image blogging boostlib browsers bugs charles commands ctrl z desktop dual Graphics hardy installation linux mathematica mathematica 7 matlab monitoring newbie user packages performance print proxy on terminal root script shell system terminal ubuntu user vga ubuntu wikipedia windows xp Hints (25)
How to ? (32)
Reviews (2)
Uncategorized (16)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Recent Posts

  • Compiling and installing ROOT on Ubuntu
  • Upgrading Wordpress
  • Mathematica 7 high cpu usage on linux kernels 2.6.28+
  • Mathematica 7 java interface problems
  • Mathematica rendering 3D plots problems

Archives

  • December 2009 (1)
  • September 2009 (1)
  • July 2009 (3)
  • May 2009 (2)
  • April 2009 (1)
  • March 2009 (1)
  • December 2008 (2)
  • November 2008 (1)
  • October 2008 (9)
  • June 2008 (2)
  • May 2008 (2)
  • April 2008 (2)
  • March 2008 (17)
  • February 2008 (1)
  • December 2007 (1)
  • November 2007 (3)
  • September 2007 (2)
  • August 2007 (11)
  • June 2007 (7)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox