手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:ubuntu

Wine中文显示

突然发现wine的中文显示其实很简单
从1.1.4开始wine的界面就已经支持中文了,但是对于软件中的中文支持并不太好,主要原因。还是字体。。。
Let's go
首先,copy一下字体:把simsun.ttc (即宋体)复制到 ~/.wine/drive_c/windows/fonts
然后:

XML/HTML代码
  1. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]  
  2. "Arial"="simsun"  
  3. "Arial CE,238"="simsun"  
  4. "Arial CYR,204"="simsun"  
  5. "Arial Greek,161"="simsun"  
  6. "Arial TUR,162"="simsun"  
  7. "Courier New"="simsun"  
  8. "Courier New CE,238"="simsun"  
  9. "Courier New CYR,204"="simsun"  
  10. "Courier New Greek,161"="simsun"  
  11. "Courier New TUR,162"="simsun"  
  12. "FixedSys"="simsun"  
  13. "Helv"="simsun"  
  14. "Helvetica"="simsun"  
  15. "MS Sans Serif"="simsun"  
  16. "MS Shell Dlg"="simsun"  
  17. "MS Shell Dlg 2"="simsun"  
  18. "System"="simsun"  
  19. "Tahoma"="simsun"  
  20. "Times"="simsun"  
  21. "Times New Roman CE,238"="simsun"  
  22. "Times New Roman CYR,204"="simsun"  
  23. "Times New Roman Greek,161"="simsun"  
  24. "Times New Roman TUR,162"="simsun"  
  25. "Tms Rmn"="simsun"  
当然,你也可以COPY其他字体,然后替换掉这上面的simsun。把这 段内容保存成一个reg文件,例如:fonts.reg
最后,到命令行下支持wine regedit fonts.reg,OK,你现在重新打开记事本,是不是发现可以输入中文了?

Tags: linux, wine, ubuntu, editplus

如何mount Smb服务共享目录

在ubuntu下面默认是不能mount samba共享的目录的,而在公司里,我不得不连接这样的目录,在windows下面的时候,samba共享就象windows的共享目录那样的方便,但是在linux下面就不是这样的了。

首先,你要下载smbmount,运行 :

apt-get install smbfs

然后就会安装smbmount了,我自己Ubuntu系统的loacle设置是:zh_CN.UTF-8,相信大多数使用ubuntu的人都是这样设置的吧,平时使用samba的话,直接输入smb://hostname 就可以了。

然后尝试一下把公司服务器上的路径mount过来。
smbmount //hostname/directory /home/my/mount/dir -o user=username,pass=passpord,iocharset=utf8

在上面的命令里
//hostname/directory 就是公司服务器的samba共享路径,
/home/my/mount/dir 就是本地的挂载目录,

-o 参数是表示后面还有很多参数,参数之间以","(不含引号)隔开
user表示用户名
pass表示密码
iocharset=utf8,可以避免中文乱码

Tags: linux, ubuntu, samba, mount

继续解决ZendStudio5菜单中部分是方框的问题

昨天刚刚解决ZS白屏的问题,再次启动的时候,确实是正常了。。。
然而部份菜单却是方框,查了一些资料,发现是中文字体的问题,于是,将Windows下的宋体(simsun.ttc)拷贝过来,改名为: LucidaSansRegular.ttf,覆盖掉:/usr/local/Zend/ZendStudio-5.5.1/jre/lib/fonts 下的同名文件。

即:

XML/HTML代码
  1. unlink /usr/local/Zend/ZendStudio-5.5.1/jre/lib/fonts/LucidaSansRegular.ttf  
  2. cp /media/disk/WINDOWS/Fonts/simsun.ttc  /usr/local/Zend/ZendStudio-5.5.1/jre/lib/fonts/LucidaSansRegular.ttf  

 

Tags: ubuntu, zend, zendstudio, 方框, 中文

Ubuntu下ZS5.5打开之后是空白屏幕的解决方案

安装了ubuntu之后,立马安装上了zendstudio 5.5 结果出现空白屏幕,以为是不兼容呢。也就没注意。然后安装了一个 ZS for eclipse 6,一切正常。更加肯定了自己的机器与ZS5的不兼容。

可是,我的屏幕只有12。1,在ZS6下面,能够给我写代码的地方太小了。。。。简直无法下手。

于是就想怎么解决5。5的问题。

想不到啊。一直劝别人:内事不决问百度外事不决问google的,象ZS这种进口软件,我居然没有想到问问google。不过,我问了Vampire(政委)同学,他采用了我教别人的方法,然后给了我条答案。

不敢独享。。。

以下内容来自官方网站,地址为:http://www.zend.com/support/knowledgebase.php?kbid=241,不翻译了,也没有什么好翻译的。。。。

Zend Studio starts up with an empty window, or other GUI problems, due to XGL-Compiz/Beryl (with JRE) compatibility issues

Article #241
Product: Zend Studio

 

Symptoms




When running Zend Studio:
1. The ZS's main window comes up totally empty.
2. Sometimes the window has some of the frames painted, but the rest of the window is empty.
3. In the empty ZS window the mouse cursor is changing while moving around the window (as if there are objects: like buttons and other objects).
4. There were erratic mouse/window movements reported.

Summary




Zend Studio starts up with various windowing GUI problems in some linux distros, while using the XGL-Compiz/Beryl product.

Cause




1. Incompatibility between the XGL environment, the JRE, and the Zend Studio Client.
2. The decoration in the 3D environment clashes with the Java Runtime and distorts the operation and visualization of the Zend Studio client's window.

Workaround




There are two ways to execute Zend Studio, by running the ZDE script, and by running the runStudio_unix.sh script, both are in the bin directory of zend studio
(usually /usr/local/Zend/ZendStudio-/bin)

The following workarounds may be used, but there is no guarantee how well or how long it might work for you in your environment.

  •  
  • modification of ZDE script for xgl:
  •  


1. Open your ZDE script with your favorite editor
2. add the next line of code at line 1693.
options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"

for example:
1693:
1694: debugOut ""
1695: unset POSIXLY_CORRECT
1696: if [ $DO_NOT_FORK ]

becomes:
1693: options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"
1694: debugOut ""
1695: unset POSIXLY_CORRECT
1696: if [ $DO_NOT_FORK ]

3. Save the file.

  •  
  • modification of runStudio_unix.sh script for xgl:
  •  


1. open the the file in your favorite editor.
2. modify the java execution line,
the line starts with: ../jre/bin/java -Xms16m -Xmx256m -cp...
change it to: ../jre/bin/java -Dawt.toolkit=sun.awt.motif.MToolkit -Xms16m -Xmx256m -cp...
^^^^^^^^^^^^^^^^^^^^^^^^^^
as you can see, the only difference is an extra parameter to the java program.
3. Save the file.

Another solution




the AWT_TOOLKIT environment variable can be set in order for Java to choose a working AWT Toolkit.

export AWT_TOOLKIT="MToolkit"

In most Linux Distributions it's enough to append this line to /etc/profile.

The information in this article applies to




Zend Studio Client

Common Problems



On some amd64 based systems, the motif toolkit will not work, complaining that "current locale is not supported in X11".

A solution for this case is to set the XLOCALELIBDIR environment variable to the X11 32 bit locale
directory of your system.
Ubuntu Distribution users will find it at: /usr/lib32/X11/locale.

Ubuntu users can use the following as a startup-script:
#!/bin/bash
export AWT_TOOLKIT=MToolkit
export XLOCALELIBDIR=/usr/lib32/X11/locale
exec ZendStudio-5.5.0/Zend_Development_Environment

  •  
  • more information can be found:
  •  


http://alioth.debian.org/tracker/index.php?func=detail&aid=301730&group_id=30192&atid=410386

Keywords




Zend Studio, ZS, ZDE, IDE, Installation, XGL, Compiz, Beryl, unsupported, blank, empty, window, decoration,xgl

Last Updated: 2008-01-07 09:50:08

Tags: ubuntu, zendstudio, 空白屏幕, 官方, 解决方案

简单的添加ssh

为linux添加ssh访问是必然的,否则那就真的成了桌面了。
在网上找了很多资料,实在太多了。而且很多资料都己经过期,例如:http://bbs.net130.com/showthread.php?t=174784,贴子里的地址,是404,无法打开的。
在ubuntu下面,应该是可以通过 新立得软件安装器进行安装 的,但还是没有怎么配置。
于是我在终端下运行 :apt-get install ssh,哇。直接可以安装了。

然后用filezilla打开,嗯,可以访问ssh了。22端口了打开了。呵呵

apt-get确实是一个很好的东西。。不过,这也需要源里面添加了才行。(随便说说。我是新手,不对不要骂我)

安装软件一定要是root权限,你可以先运行su,切换到root下,再运行 。否则会说你没有权限的。

Tags: ubuntu, ssh, openssh, linux, remote

Records:42123456789