tomboy: 阿帖便笺,0.5.1版本安装

gnome里新带的这个tomboy,中文翻译为阿帖便笺,真得非常好用!
现在ubuntu edgy里带的版本是0.4.1,是最新的stable版本,但是其开发版本0.5.1也已经出来有一段时间了。实在等不到下一个ubuntu发行版了,自己下载源码编译安装:
Continue reading “tomboy: 阿帖便笺,0.5.1版本安装”

ubuntu tips: 特殊的双显方法

我的笔记本是12吋的屏幕,Intel 915的显卡,同时我还有一个19吋的ViewSonic显示器。
一般情况下可以使用Xinerama技术来实现双屏显示,但那样的实现有一个缺点:
1 不能使用硬件加速了(在ATI和NVIDA上据说是可以的,但在I915上不行)
2 当然就不能使用AIGLX或XGL技术了
因此,有时想要是能实现在大显示器上输出,而且使用大显示器的分辨率,笔记本上的小屏幕我就不关心它是否能显示,这样就很好了,相当于给笔记本换了一个大屏幕。
这个和普通的双屏切换的区别在于:能使用大屏幕的分辨率。而普通的双屏切换方法只能使用小屏幕的分辨率。
这个是我无意中在ubuntu forum上发现的,实现方法也很简单:
在系统启动到GRUB的阶段,使用笔记本上的屏幕切换(我的FN+F8)切换大显示器上,然后就OK了。
当然你需要在/etc/X11/xorg.conf加上你大显示器的分辨率。

这样,以后不再使用大显示器的时候,把这个大显示器的分辨率给去掉就可以了。
这样我就可以继续使用XGL或AIGLX了,而且使用上了更高的分辨率。
若是再接一个外置的键盘,这样就可以合上笔记本了。

envi 4.3在ubuntu edgy下启动错误的解决

在我的笔记本上安装了ENVI 4.3后一直无法执行,但IDL没有问题。经检查,应该是I915的驱动所导致的问题,不过可以在XGL环境下执行,非常奇怪。

不过现在终于找到了解决办法:

LIBGL_ALWAYS_INDIRECT=1 /usr/local/bin/envi

最终是在ITT的forum上找到了答案

Hi there. We came across Tech Tip “OpenGL Direct Hardware Rendering on Linux. Article ID: 3524” that showed a workaround.
Disabling (OpenGL) direct rendering made the trick (at the expense of speed):
debian10$ export LIBGL_ALWAYS_INDIRECT=1
I still wonder why other software work fine.

Cheers,
Juan P.

同时,他还给出了一种解释:

Hi there,

After talking to Xorg/DRI/Debian developers, it seems that direct rendering is working ok on my system but a conflict exists between system libGL and IDL’s own copy of Mesa.
They suggest that the system libGL and IDL’s own copy of Mesa shouldn’t be used at the same time, or that IDL should at least make sure their symbols don’t interfere with each other. They suggested a possible workaround (to start the program with LD_PRELAD=/usr/local/rsi/idl_6.3/bin/bin.linux.x86/libMesaGL6_2.so.1 or some variation thereof), which unfortunately didn’t work for me.

Cheers,
J.P. Rigol

不过这种hack方法在我的机器也不能工作。
这个地方给出了更多的说明:

Troubleshooting
RSI cannot control driver quality, so you may have trouble with some drivers that might be buggy. Besides obtaining a driver update from the vendor, there are several things you can do to make IDL usable again in the presence of a buggy driver:

* Read the documentation that came along with your driver software carefully. There may be a number of diagnostic tools or environment variables that you can set to provide some relief.
* When using an X server based on XFree86, modifying the XFree86 configuration file may solve any problems. Consult the XFree86 documentation for details. Also, the XFree86 server startup log, usually found in /var/log, can provide many clues about the problem.
* Set the LIBGL_ALWAYS_INDIRECT environment variable. This causes OpenGL to ignore IDL’s request to use direct rendering and would then avoid any bugs that may exist in the direct path.
* Configure your IDL session to use software rendering when required or code your IDL application to use software rendering. These details are covered in IDL documentation.
* As a last resort, remove/rename the gl_driver shared library from your IDL installation (in the binary directory). This will keep IDL from attempting to use direct or indirect hardware rendering. IDL will instead perform all rendering itself and send the results to the X server with “2D” commands.
* One expert IDL programmer reported in March 2004 on the IDL Newsgroup this promising workaround on a host running Fedora Linux:
“If you’re a user of a recent Linux (like Fedora), and you’ve experienced IDL crashes that post the following fatal error:

Floating exception

when attempting to use any of IDL’s OpenGL 3D stuff (like the Demo->Itools, for example), you might try the following:
setenv MESA_NO_ASM 1

This disables some specific ASM code in the Mesa library which was causing these types of crashes for me. I use an ATI Radeon 7500 plus XFree86 4.3.0’s Radeon drivers. With this environment variable set, IDL’s 3D hardware rendering seems stable, and definitely executes much faster than the alternative software rendering option.”

现在就能解释为何在XGL环境下可以使用ENVI了:现在的XGL环境不支持OPENGL直接调用!

在XGL环境下使用google earth

ubuntu edgy, i915gm
我记得原来不能在xgl环境下使用google earth,随着google earth 4的几次升级,现在可以在xgl环境下使用google earth了,不过还是有问题,速度比正常情况下要慢!
beryl-project.org的FAQ上发现了这个问题的解决办法:

DISPLAY=:0 ./googleearth

My favourite hardware-accelerated application (google earth for example) doesn’t play well with Beryl. What can I do?

Try adding DISPLAY=:0 in front of the command:

$ DISPLAY=:0 googleearth

还是有一点小问题,不过总算不影响使用了。(menubar会丢失)

ubuntu edgy下安装SME 3.2.73

SME: Spatial Modeling Environment,现在要将其安装到我的UBUNTU edgy上,中间遇到了系列问题,持续了2天才将起解决。
ubuntu edgy里软件的版本:g++ 4.1.2, jdk 1.5.0_08, tcl 8.4。
首先从官方下载最新的版本:

wget http://www.uvm.edu/giee/SME3/ftp/sme-3.2.73.zip
unzip sme-3.2.73.zip
cd sme-3.2.73

正常情况下,按照README所述,应该进行下述步骤就可以安装:

./configure --enable-mpi=no --with-tcl_inc_dir=/usr/include/tcl8.4/ \
--with-tcl_lib_dir=/usr/lib/tcl8.4/ --with-hdf_inc_dir=/usr/include/hdf/ \
--with-hdf_lib_dir=/usr/lib/ --enable-opt=yes --enable-java=yes \
--with-jdk_dir=$JAVA_HOME --prefix=/usr/share/sme
sudo make install

但是在make install这步时出现问题:

cd /home/wlx/Desktop/sme-3.2.73/java; jar cf lib/JST.jar
miiee/*/*.class spyconsole/*.class
miiee/*/*.class: No such file or directory
Error adding miiee/*/*.class to jar archive!

细看README,其中好像有说道这一点:

8) On some platforms Java does not get compiles as a result of the
installation process. In that case go to ./java and run
install.sh SME_DIR, where SME_DIR is the directory where SME is
to be installed.

根据其中的操作,可以解决这个问题,然后继续编译,又出现一系列的问题。 Continue reading “ubuntu edgy下安装SME 3.2.73”

scim和skype冲突的解决

升级到edgy后,应该作的修正工作:
修正中文支持功能,默认情况下中文支持已经很好,但有时会和别的程序发生冲突,如SKYPE,因此就可以通过修改设置来完善:

sudo aptitude install scim-bridge scim-qtimm
sudo nano /etc/X11/xinit/xinput.d/zh_CN

修改为:

GTK_IM_MODULE=”scim-bridge”
QT_IM_MODULE=”xim”

这样就能解决skype无法启动的问题。

复杂的XEN

在edgy上现在也可以直接支持xen了,从源里可以直接安装:
sudo aptitude install xen-hypervisor-3.0-i386 xen-image-xen0-2.6.16-11.1-generic xen-utils-3.0
然后设置启动:
sudo mkinitramfs -o /boot/xen0-linux-2.6.16-11.1-generic.initrd.img 2.6.16-11.1-generic
sudo nano /boot/grub/menu.lst
修改启动方式,添加:

title XEN/2.6.16b
root (hd0,1)
kernel /boot/xen-3.0-i386.gz
module /boot/xen0-linux-2.6.16-11.1-generic root=/dev/sda2 ro
module /boot/xen0-linux-2.6.16-11.1-generic.initrd.img
boot

这样就能启动了,但接下去的工作还是很复杂的,看了半天文档,最终还是决定等ubuntu edgy正式发布再进行这个尝试吧。
xen的复杂度比起qemu和vmware要高的多。