Tuesday Apr 07, 2009

Macro SVR4 or __SVR4 for Xorg on Solaris

During investigate Opensolaris bug 6824625(And 6728611 ) . There is a issue about macro Xorg, the Xorg  seems to be a remnant of old Imake world.  For example, in app/luit/sys.c, it always use #ifdef SVR4 as switch.  but on Solaris there is no pre-define for "SVR4", only pre-define "__SVR4". (check : CC -xdumpmacros -c dummy.c). For resolve this issue, X team support a header file <X11/Xosdefs.h>. So please include this header file in the program which need use CC or gcc pre-define macros.  In Xosdefs.h:

#ifdef sun
/\* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
  \* This check allows non-Imake configured programs to build correctly.
  \*/
#if defined(__SVR4) && !defined(SVR4)
#define SVR4 1
#endif
#endif
This issue also be discussed in xorg mail-list early (Some portabity issues). Alan gave the solution on Solaris.

Thursday Mar 19, 2009

Cannot login ssh -X between Opensolaris and S10

It reported in Opensoalris forums that "Problem with b108 and ssh -X". Because Opensoalaris already move to Xorg's X window component, so the X fonts naming style of S10 is not compatibility with it. So, when you login to remote S10 machine from locale Opensolaris, you may see message like:
> font missing: KSC5601.1992-3 for Window
> font missing: TIS620.2533-0 for Window
> font missing: ISO8859-6 for Window
> font missing: ISO8859-8 for Window
> font missing: SUN.UNICODE.INDIA-0 for Window


Please use Opensolaris/lastest Nevada as remote machine to avoid the error.
Also, when I run
ssh -X S10_machine -l account /usr/bin/gnome-terminal
error message is showed as following.
The program 'gnome_segv' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 255 error_code 2 request_code 148 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


I'm not sure the reason, it looks also because of incompatibility.

Sunday Jan 18, 2009

如何让xterm 显示中文

默认安装好Xorg的xterm后,如果使用默认的配置很多中文的显示都是小方框,也就是无法显示。有2个方法可以暂时解决这个问题,不过都不是特别完美,只不过通过修改配置,或者改变了字号。估计是默认的点阵字体不全的原因,只有默写字号有比较全的字体(GB2312)。

方法1:
修改:/etc/X11/app-defaults/XTerm 中:
\*VT100.utf8Fonts.font:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 
->  \*VT100.utf8Fonts.font5:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
\*VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
->  \*VT100.utf8Fonts.font: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
或者直接指定字体启动xterm:
xterm -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1

方法2:
1、编辑 ~/.Xresources 文件,加入
        xterm\*faceName:AR PL Uming CN
        xterm\*faceSize:12
2、执行  xrdb -load .Xresources
3、重启 xterm,问题解决了。

方法3:
1、编辑 ~/.Xresources 文件 :
    XTerm\*font: -misc-fixed-medium-r-normal-\*-18-120-100-100-c-90-iso10646-1
    XTerm\*wideFont: -misc-fixed-medium-r-normal-\*-18-120-100-100-c-180-iso10646-1
2、执行  xrdb -load .Xresources
3、重启 xterm,问题解决了。

 
About

williamxue

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today