Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, August 14, 2011

VisualVM on ubuntu(lucid) failed to initialize the Profiler engine

I installed VisualVM on my lucid(amd64), luanch it and it shows an error.
Failed to initialize the Profiler engine: Problem with a required JFluid installation directory or file /usr/lib/jvm/java-6-openjdk/lib/visualvm/profiler3/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so Original message: File does not exist.
In sprite of this error, the visualvm still can run but profiler/sampler doesn't show up.
Someone have filed this bug here. To fix this problem, recompile the missing lib manually and move to the right place.
Here are the steps
  1. Download visualvm source here (visualvm_1.2.2.orig.tar.gz at the right pane)
  2. Extract it and cd to the build directory
    tar -xzvf visualvm_1.2.2.orig.tar.gz
    tar -xzvf netbeans-profiler-visualvm_release68.tar.gz
    cd lib.profiler/native/build
  3. You will see build script ( buildnative-linux64.sh ) then edit it. 
    1. Replace gcc32 with gcc
    2. Change 2 BuildJDK lines to below. /usr/bin/jvm/default-java/ is my jdk path; yours may differ.
      BuildForJDK "/usr/lib/jvm/default-java" "jdk16"
  4. Make directory for release
    mkdir -p ../../release/lib/deployed/jdk16/linux-amd64/
  5. Run this build script. It will compile the source against jni headers in our jdk and output as libprofilerinterface.so
    ./buildnative-linux64.sh
  6. Move libprofilerinterface.so to the right place in your jdk path
    sudo cp ../../release/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so /usr/lib/jvm/default-java/lib/visualvm/profiler3/lib/deployed/jdk16/linux-amd64/
  7. Launch VisualVM again. 

Sunday, September 5, 2010

How to reset the main menu in Ubuntu

I rearranged and deleted some menu items in the main menu. Finally they are in a mess. Some menu is missing and I can't remember the original position or command. I want to reset them to default like fresh install. I don't see any way to reset it easily. There's a revert button but It doesn't work right. So I searched and dug in some configurations.
Then I learn that there're default menu configuration somewhere. One of them is at /etc/xdg/menu which there're applications.menu and settings.menu for application menu and system setting menu respectively. And each user has its own customization of menu in ~/.config/menus which has applications.menu and settings.menu too. Those files contain some exclude configurations and they are merged with default configurations when it is used.

So deleting directory ~/.config/menus should reset the main menu to default state and that's all.

rm -rf ~/.config/menus  

and logout and login again.

but if it's still not be reset like in my case, it need to delete *.desktop in your home directory too.
find ~/ -name "*.desktop" -delete 

Sunday, May 4, 2008

Firefox 3 beta 5 lags on ubuntu 8.04

I upgraded from Gutsy to Hardy last week. It comes with the new Firefox 3 beta 5. After I had used for a few days, I found that firefox lags very much. When I switch the tab or scroll the page or just leave it , it start to lag the system and then system sometime freeze after that. In the system monitor, firefox process was interruptible. I noticed the harddisk light always show or blink fast but I'm not sure it's the same case.

At first I though that it resulted from upgrade process that it's not a fresh install. Maybe some configs file are not upgraded correctly. After few days passed, I felt very annoy. I started to find out what it is.

I found this bug. It's the same. In the bug page they give a method to solve this bug temporarily
There is an easy workaround.

This workaround is successful:
1. Open Firefox 3
2. Disable phishing/attack detection in the security section of the Preferences
3. Close Firefox
4. Make hidden files visible (Locations - Personal folder - View - show hidden files)
5. Delete /home/user/.mozilla/firefox/blahblahblah.default/urlclassifier*.sqlite
6. Open Firefox.
7. There is no next step. You're done. :-)

Greetz, Pjotr.


I follow this instruction. It works!!

I like the bug report system too much. haha

I hope that the patch will be published very soon. I wait for it.

Monday, November 5, 2007

Install Brother MFC-240C (shared on Windows) in Gutsy

I bought Brother MFC-240C yesterday for using in my home. My home network is windows network that use the same workgroup name to see each other. The printer is connected to mom's pc. Then I will add this printer to my ubuntu but the ubuntu database have no drive for this model.
After I googling a few minutes, I found this page and this page. These are the answer!
Follow these steps:
1. download LPR driver from this page. (*choose the driver for Debian, The MFC 240C model)
2. open the terminal and run this commands

sudo mkdir /var/spool/lpdsudo mkdir /var/spool/lpd/mfc240c


3. double clicks the LPR driver (mfc240clpr-1.0.0-9.i386.deb) to install.
4. download cupswrapper from this page. (*choose the driver for Debian, The MFC 240C model)
5. if everything works, the printer will show in System->Administration->Printing



if you plugs the printer on this computer(via USB). It's can work now.
if this printer is shared from other computer and want to add it via network like me.(Go to step 6.)
6. open System->Administration->Printing and click MFC204C like above image. On the right,
Click the Change button on the "Device URI" line. and Find out where your printers!.
7. Try printing the test page and see what you've done.


Thursday, March 29, 2007

Slow scrolling in Beryl and Deskbar can't type problem in ubuntu

My laptop specs are Acer 5021 , ati X600 64MB VRAM , DDR Ram 768

Last week I installed aixlg+beryl in my ubuntu. Beryl is so cool. Many Effects work fine but
when scrolling the window especially Firefox. It's so slow. I don't know why.

I try disabling most effects (resize , wobbling and ...) but It's didn't fix the problem.

I google around , many people have the same problem but there aren't the solution.

Found some bugs of this in http://bugs.beryl-project.org/ticket/1

so I try installing last beryl on svn and using XGL instead of aixlg (that ubuntu recommend)

It's work!! Slow scrolling problem is fixed.


if you have the same problem and want a try. I can't guarantee this method can fix the problem.

How to Install 3D Desktop (Beryl and Xgl) on Ubuntu Edgy Eft with ATI card

and Then

after the beryl works fine. I found that the deskbar applet can't type. It still can search anything by clicking or paste some text. This problem came along XGL ,I think.

so I google again and found this bug
and there is a solution in that bug page.

now I like beryl very much. It's cool.