예전에 정리 해놓은줄 알았는데 없길래 다시 정리.
Xming에서 특정 openGL이 제대로 안되서 부랴부랴 다시 찾는데
opengl의 advanced 소스중 일부가 아래와 같은 오류를 발생하며 실행되지 않는 문제가 있다.
이경우에는 cygwin/x로 하면 문제없이 해결된다.
(하지면 용량이 200메가에 ftp.daum.net은 폐쇄되었는지 안되고 -_- 결론은 받는데 한참걸림)
$ gcc -lglut -lGLU accumaa.c
$ ./a.out
freeglut (./a.out): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
몇 버전부터 지원하는건진 모르겠지만 7.5.0.8 버전에서는 -wgl 옵션을 지원한다.
6.9.0.31 버전에서 -wgl을 넣으니 없는 옵션이라고 배쨈 ㅠ.ㅠ
If Xming's native Windows WGL interface for accelerated OpenGL (-wgl option from 7.5.0.8) doesn't work with a program then you can switch on various diagnostic output. Start Xming with special environment variables set
X Window system은 X Server와 X client로 나누어진다.
X server는 출력을 담당하는 프로그램으로, 키보드 / 마우스 등의 입력을 받아들이며
X client는 X용 프로그램이다.
이런 분리구조로 인해 서버에서 X Server 가 구동되어 있지 않아도, 원격지에서 X server가 구동중이면
서버측의 X client의 출력을 로컬로 끌어올수 있다.
아래와 같이 localhost:6010에 대한 주소를 받아오지 못한다고 에러가 나면
/etc/hosts 파일이 존재하는지 확인을 해야한다.
$ gedit
_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known
cannot open display:
Run 'gedit --help' to see a full list of available command line options.
파일이 존재한다 하더라도, 내용이 없다면 내용을 추가해준다.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
포터블 우분투를 실행하면 Xming을 구동하여 사용하는데 옵션이 특이해서
도움말을 찾아보게 되었다.
portable_ubuntu.conf 파일의 내용
kernel=vmlinux
cobd0=images\rootfs.img
cobd3="D:\Documents and Settings\czw5hv\Application Data\Windux\images\root.img"
cofs0=config
cofs1=c:\ #Para tener acceso a la unidad C:
#cofs1=otra_unidad:\ #Si se necesita tener acceso a otras unidades?ej: d:\
#scsi0=cdrom,\Device\Cdrom0 # Para tener acceso al CDROM de la PC
root=/dev/cobd0
ro
initrd=initrd.gz
mem=256
eth0=slirp,00:ff:75:39:D3:C1,tcp:22:22
exec0="Xming\Xming.exe :0 -notrayicon +bs -wm -auth Xauthority -clipboard -multiwindow -dpi 100"
exec1=pulseaudio-0.9.6\pulseaudio.exe # Ejecuta al servidor Pulse Audio para Windows
+bs enable any backing store support -wm WhenMapped default backing-store
위의 옵션들에 backing store라는 내용이 들어간다.
이곳저것 검색을 해봐도 딱히 시원한 대답은 없었지만, 검색 내용중 윈도우 내용이 복구 안될 경우
backing store를 X11에 설정한다는 내용이 발견되었다. 아마 clipping 영역 복구가 제대로 되지 않을 때,
강제로 복구 하도록 하는 옵션인거 같기도 하고.. 용어 내용만 봤을 경우 일종의 캐시 구조인거 같기도하고..
(고속일 수록 가격이 비싸고, 저속일수록 가격이 싸다. 단위용량당 가격적인 면에서
레지스터 > 캐쉬 > 메모리(DRAM) > HDD > ODD > TAPE 등의 순서를 피라미드식으로 이루게 되는데
memory hierarchy 라고 한다.)
Unfortunately some XFree86 drivers are buggy, and when you render an
accelerated primitive which overlaps an area which is not visible to
the user, the driver fails to update the backing store (it only draws
the clipped primitive using accelarated functions and does not complete
the job by calling the software renderer to update the backing store.)
[출처 : http://www.ibiblio.org/ggicore/documentation/libggi/current/display-x.7.html]
Usage...
Xming [:<display-number>] [option]
-a # mouse acceleration (pixels)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
-br create root window with black background +bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-co file color database file
-core generate core dump on fatal error
-dpi int screen resolution in dots per inch
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
-I ignore all remaining arguments
-logo enable logo in screen saver
nologo disable logo in screen saver
-nolisten string don't listen on protocol
-noreset don't reset after last client exists
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-s # screen-saver timeout (minutes)
-sp file security policy file
-su disable any save under support
-t # mouse threshold (pixels)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking -wm WhenMapped default backing-store
-wr create root window with white background
-x string loads named extension at init time
-maxbigreqsize set maximal bigrequest size
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
-kb disable the X Keyboard Extension
+kb enable the X Keyboard Extension
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disable accessx key sequences
-ardelay set XKB autorepeat delay
-arinterval set XKB autorepeat interval
-clipboard
Enables the integration between the Xming clipboard and
Windows clipboard.
-clipupdates num_boxes
Use a clipping region to constrain shadow update blits to
the updated region when num_boxes, or more, are in the
updated region. Diminished effect on current Windows
versions because they already group GDI operations together
in a batch, which has a similar effect.
-depth bits_per_pixel
Specify an optional bitdepth to use in fullscreen mode
with a DirectDraw engine.
-emulate3buttons [timeout]
Emulate a 3 button mouse with an optional timeout in
milliseconds. The default timeout is 50 milliseconds.
-engine engine_type_id
Override the server's automatically selected engine type:
1 - Shadow GDI
2 - Shadow DirectDraw
4 - Shadow DirectDraw4 Non-Locking
Do not use this parameter unless instructed to do so.
-fullscreen
Run the server in fullscreen mode with -depth and -refresh
set as required.
-ignoreinput
Ignore keyboard and mouse input. This is usually only used for
testing and debugging purposes.
-internalwm
EXPERIMENTAL: Run the internal window manager.
-[no]keyhook
Grab special windows key combinations like Alt-Tab or the Menu
key. These keys are discarded by default.
-lesspointer
Hide the windows mouse pointer when it is over an inactive
Xming window. This prevents ghost cursors appearing where
the Windows cursor is drawn over the X cursor.
-logfile filename
Write logmessages to <filename> instead of Xming.n.log,
where n is the display-number of the X Server.
-logverbose verbosity
Set the verbosity of logmessages. [NOTE: Only a few messages
respect the settings, so not much use yet]
0 - only print fatal error.
1 - print additional configuration information.
2 - print additional runtime information [default].
3 - print debugging and tracing information.
-[no]multimonitors (or -[no]multiplemonitors)
Use the entire virtual screen if multiple monitors are
present.
-multiwindow
Run the server in multiwindow mode. Not to be used
together with -rootless or -fullscreen.
-mwextwm
EXPERIMENTAL: Run the server in multiwindow external
window manager mode. Use with xwinwm.
-nodecoration
Do not draw a window border, title bar, etc. Windowed
mode only i.e. ignored when -fullscreen specified.
-noicons
Disable the conversion of X icons in multiwindow mode.
Use to prevent an infrequent crash in miGetImage().
This is a work-around that most people won't need.
-nounicodeclipboard
Disable Unicode in the clipboard.
-refresh rate_in_Hz
Specify an optional refresh rate to use in fullscreen mode
with a DirectDraw engine.
-rootless
Use a transparent root window with an external window
manager (such as openbox). Not to be used with
-multiwindow or with -fullscreen.
-screen scr_num [width height [x y] | [[WxH[+X+Y]][@m]] ]
Enable screen scr_num and optionally specify a width and
height and initial position for that screen. Additionally
a monitor number can be specified to start the server on,
at which point, all coordinates become relative to that
monitor. Examples:
-screen 0 800x600+100+100@2 ;2nd monitor offset 100,100 size 800x600
-screen 0 1024x768@3 ;3rd monitor size 1024x768
-screen 0 @1 ;on 1st monitor using its full resolution (the default)
-scrollbars
In windowed mode, allow screens bigger than the Windows desktop.
Moreover, if the window has decorations, one can now resize
it. Do not use in conjunction with -multiwindow or with -rootless.
-silent-dup-error
If another instance of Xming is found running, exit silently
and don't display the error message.
-swcursor
Disable the usage of the windows cursor and use the X11 software
cursor instead.
-[no]trayicon
Do not create a tray icon. Default is to create one
icon per screen. You can globally disable tray icons with
-notrayicon, then enable it for specific screens with
-trayicon for those screens.
-[no]unixkill
Ctrl-Alt-Backspace exits the X Server. The Ctrl-Alt-Backspace
key combo is disabled by default.
-version
Write version and help text to the console (unless built
console-less) and to the log file.
-[no]winkill
Alt-F4 exits the X Server. The Alt-F4 key combo is enabled
by default.
-xkblayout XKBLayout
Set the layout to use for XKB. This defaults to a layout
matching your current layout from windows or us (i.e. USA)
if no matching layout was found.
For example: -xkblayout de
-xkbmodel XKBModel
Set the model to use for XKB. This defaults to pc105.
-xkboptions XKBOptions
Set the options to use for XKB. This defaults to not set.
-xkbrules XKBRules
Set the rules to use for XKB. This defaults to xorg.
-xkbvariant XKBVariant
Set the variant to use for XKB. This defaults to not set.
For example: -xkbvariant nodeadkeys
Putty를 사용한 SSH X11 Forwarding은 상당히 유용하지만,
Gnome이나 KDE 같은 윈도우 매니저를 한번에 끌어 올때에는 아름답지 못한 결과를 보여준다.
기본 실행옵션인 -multiwindow로 gnome-session을 실행한 결과
Xming이나 cygwin/X의 경우 기본 실행 옵션이 -multiwindow로 실행되기 때문에
위와 같이 각 윈도우 별로 MS windows(TM)의 윈도우창이 붙게 된다. 그런 이유로 상단의 흰 줄은
Gnome Panel이 떠야 함에도 불구하고 제대로 뜨지 못하는 문제를 보여준다.
그리고 작업표시줄에도 윈도우 별로 별도의 창들이 떠있음을 볼 수 있다.
이를 해결 하기 위해서는
Xwindow 구동 방식옵션을 바꾸어 주어야 하는데,
옵션을 살펴보면 아래와 같이 -multiwindow 외에 -fullscreen 이라는 녀석이 존재한다.
[-fullscreen [-depth depth_in_bits_per_pixel ] [-refresh refresh_rate_in_herz ] ]
● The -fullscreen parameter tells Cygwin/X to open a given screen in fullscreen mode.
● The -depth parameter can only be used with -fullscreen and a DirectDraw based engine to specify the display depth that should be used for the fullscreen Cygwin/X screen.
● The -refresh parameter can only be used with -fullscreen and a DirectDraw based engine to specify the refresh rate that should be used for the fullscreen Cygwin/X screen.
[-multiwindow]
● Start the integrated Windows-based window manager, which launches each top-level X window in its own Windows window. Not to be used together with -rootless nor -fullscreen.
아무튼 multiwindow에서 fullscreen으로 옵션을 바꾸어서 실행하면 아래와 같이 나오게 된다.
아쉽게도, 한번에 창을 잡을수가 없어 윈도우 작업표시줄은 윈도우에서, Gnome 화면은 리눅스에서 잡았다.
아무튼 작업표시줄에 나타난 프로그램도 Xming 하나로 하나의 윈도우를 그대로 끌어 오게 되고,
Xwindow 화면 역시 깔끔하게 위의 Gnome-Panel도 제대로 나오게 된다. (참 쉽죠~?)
참고사항 : 이렇게 구동한 윈도우매니저는 shutdown 시에 gnome-session만 종료를 한다.
다르게 말하자면, 윈도우만 종료되지 컴퓨터 자체가 종료되진 않는다.
XLaunch XDMCP settings
XDMCP settings
Settings for the XDMCP mode. This mode is the most problematic, is not secure, and usually requires altering of the remote machine's settings. The XDMCP protocol will send and receive data on port 177/UDP. But the actual connections will be made to the local port 6000+n /TCP, where n is the display number.
Connect to host
Enables XDMCP and sends 'Query' UDP packets to the specified host.
If you are having problems use Wireshark or equivalent to monitor UDP traffic on the remote host and look for the sequence 'Query' 177/UDP, 'Willing' x/UDP, 'Request' 177/UDP, 'Accept' x/UDP, 'Manage' 177/UDP and see where it stops. If it gets through the sequence then test with local and remote 'xeyes' in multiwindow mode, because the Display Manager acts just like an X client from then on in to provide its login window.
Use indirect connect
Enables XDMCP and sends 'IndirectQuery' packets to the specified host. This host presents a chooser box of several hosts or sends 'ForwardQuery' to another host depending on how it's X Display Manager is configured (via Xaccess file entries).
Search for hosts (broadcast)
Enables XDMCP and broadcasts 'BroadcastQuery' packets to the network. The first responding display manager will be chosen for the session.
XDMCP remote settings
A quick guide to setting insecure XDMCP mode on a remote machine running kdm, gdm, xdm or wdm...
On the remote *nix machine edit the following files, restart the X Display Manager and run at 'init 5'.
Edit the file Xaccess (each Display Manager has its own). Make sure you have a line like this that is uncommented.
* #any host can get a login window
Edit the X Display Manager config file (kdmrc, gdm.config, xdm-config or wdm-config) and change
[Xdmcp]
Enable=false (may be shown as 0 in some distributions)
to
[Xdmcp]
Enable=true (or 1 in some distributions)
or for a xdm style configuration
DisplayManager.requestPort: 0
to !DisplayManager.requestPort: 0
출처 : XLaunch Wizard help for Xming - XLaunch XDMCP settings 항목