Solaris x window windows

How to access solaris 10 gui from windows machine? [closed]

Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

Closed 8 years ago .

I want to access solaris 10 GUI screen from my windows xp machine. Is there any software which can provide this flexibility ?

3 Answers 3

Yes. Assuming your Solaris box has X already installed:

  1. Install Cygwin on your Windows machine
  2. While installing, once you get to the packages page, make sure that X11 is set to Install so that you get all X11 packages
  3. Once Cygwin is done installing, run Start->All Programs->Cygwin-X->XWin Server
  4. Follow these directions (copied below for convenience)
  5. Type ssh -Y username@[solaris box ip] (note you may need to run /usr/openwin/bin/xhost + first)
  6. Run any program which can use X11 (i.e. /usr/openwin/bin/xclock on my Solaris)
  7. It should display in a GUI windows

CygWin comes with an X display server so you should be able to run that, set up a DISPLAY variable to your Windows box (on the Solaris box) and run any GUI program you want.

For example, download CygWin using that link above, then install everything, not just the default packages.

Then start up the X server on your Windows box by choosing Start , All Programs , Cygwin-X and XWin Server .

Now, let’s say your Windows IP address is 192.168.31.31 — you would, on the Solaris box, do something like:

That should run xeyes (or whatever actual program you want to run) on your Solaris box, while putting the window (and input) for it on your Windows box.

Chapter 1 Introduction to the Solaris X Server

This chapter provides information on the Solaris X server. The Solaris X server implements the X Window System client-server model for the Solaris product. The chapter includes information on the following topics:

Features of the Solaris X server, including supported extensions from the X Consortium and the Display PostScript extension

Supported and unsupported X11 applications

OpenWindows TM directory structure

About the Solaris X Server

The Solaris X server, XSun, is composed of the X Consortium’s X11R6 sample server with the Display PostScript (DPS) imaging system extension, additional X Consortium X extensions, and Sun added value. The Solaris X server is the foundation for the Common Desktop Environment (CDE) and underlies the CDE desktop. The server handles communication between client applications, the display hardware, and input devices. By default, the Solaris X server runs with the CDE dtlogin and window manager (dtwm), but any X Window System manager that is ICCCM (Inter-Client Communication Conventions Manual) compliant runs with the server. Software developers can write applications for the Solaris environment using the Xlib library or a variety of toolkits, including the Motif toolkit and the Xt toolkit.

Figure 1-1 illustrates the relationship between the Solaris X server, several desktop client applications, the display, and input devices.

Figure 1-1 Solaris X Server

X11R6 Sample Server

An important component of the Solaris X server is the X11R6 sample server from the X Consortium. The X11R6 sample server was designed and implemented to be portable; it hides differences in the underlying hardware from client applications. The sample server handles all drawing, interfaces with device drivers to receive input, and manages off-screen memory, fonts, cursors, and colormaps.

The sample server contains the following parts, or layers:

Device-Independent Layer (DIX) — Dispatches client requests, manages the event queue, distributes events to clients, and manages visible data structures. This layer contains functions that do not depend on graphics hardware, input devices, or the host operating system.

Device-Dependent Layer (DDX) — Creates and manipulates pixmaps, clipping regions, colormaps, screens, fonts, and graphics contexts. In addition, the DDX layer collects events from input devices and relays them to the DIX layer. This layer contains routines that depend on graphics hardware and input devices the server must accommodate.

Operating System Layer (OS) — Manages client connections and connection authorization schemes, and provides routines for memory allocation and deallocation. The OS layer contains functions that rely on the host operating system.

Читайте также:  Как сменить картинку корзины windows 10

Font Management Library — The font management library enables the server to use font files of different formats and to load fonts from the X font server. The server’s font features are described in detail in Chapter 4, Font Support.

Figure 1-2 illustrates the structure of the server. Note that throughout this document, server is used interchangeably with the Solaris X server, and sample server is used interchangeably with the X Consortium’s X11R6 sample server.

Figure 1-2 Solaris X Server Architecture

DPS Extension

In addition to the X11R6 sample server, the Solaris X server includes the Display PostScript system. DPS provides X applications with the PostScript imaging model and with access to the Adobe Type Library. The Display PostScript system is implemented as an extension to the X Window System as part of the client-server network architecture; the extension is sometimes referred to as DPS/X [This section is based on Chapter 2 of Programming the Display PostScript System with X by Adobe Systems Incorporated (Addison-Wesley Publishing Company, Inc., 1993) and is used with the permission of the copyright holder.] .

In the DPS system, the PostScript interpreter is implemented as an extension to the X server, and each application is a client. The application sends PostScript language code to the server through single operator calls, and data can be returned from the server in the form of output arguments. DPS client-server communication is implemented transparently using the low-level communication protocols provided by the X Window System. For more information on the DPS system, see Chapter 2, DPS Features and Enhancements.

X Consortium Extensions

The Solaris X server supports X extensions as defined by the X Consortium. These extensions are briefly described in the sections below. The sections provide the specification name for each extension, as well as the associated file name (on ftp.x.org) in parentheses. For information on the standard X Extension Mechanism, see The X Window System Server and the Xlib Programming Manual .

The X Consortium X11 standards referenced in the following sections are readily available to systems on the World Wide Web. The URL is http://www.rdg.opengroup.org The X11 documentation resides in the /pub/R6untarred/mit/doc/extensions directory on the ftp.x.org machine. Use the file transfer protocol (ftp) to download files from this system. If you need help using ftp, refer to the ftp(1) man page. To determine if your system is connected to the World Wide Web, see your system administrator.

X Input Extension

The X Input Extension is Sun’s implementation of the X Consortium standard, X11 Input Extension Protocol Specification (/pub/X11/R6.1/xc/doc/specs/Xi/protocol.ms). This extension controls access to alternate input devices (that is, other than the keyboard and pointer). It allows client programs to select input from these devices independently of each other and independently of the core devices.

Double Buffer Extension

The double buffer extension (DBE) is Sun’s implementation of the X Consortium standard. Double-buffering provides flicker-free animation capabilities by allowing applications to show the user only completely rendered frames. Frames are rendered in a non-displayed buffer and then moved into a displayed buffer.

Shape Extension

The Shape Extension is Sun’s full implementation of the X Consortium standard, X11 Nonrectangular Window Shape Extension (shape.ms). This extension provides the capability of creating arbitrary window and border shapes within the X11 protocol.

Shared Memory Extension

The Shared Memory extension is Sun’s full implementation of the X Consortium experimental Shared Memory Extension (mit-shm.ms). This extension provides the capability to share memory XImages and pixmaps by storing the actual image data in shared memory. This eliminates the need to move data through the Xlib interprocess communication channel; thus, for large images, system performance increases. This extension is useful only if the client application runs on the same machine as the server.

XTEST Extension

The XTEST extension is Sun’s full implementation of the X Consortium proposed standard, X11 Input Synthesis Extension Proposal (xtest1.mm). This extension provides the capability for a client to generate user input and to control user input actions without a user being present. This extension requires modification to the DDX layer of the server.

Miscellaneous Extension

The MIT-SUNDRY-NONSTANDARD extension was developed at MIT and does not have a standard, or specification, on the ftp.x.org machine. This extension handles miscellaneous erroneous protocol requests from X11R3 and earlier clients. It provides a request that turns on bug-compatibility mode so that certain erroneous requests are handled or turns off bug-compatibility mode so that an error for erroneous requests is returned. The extension also provides a request that gets the current state of the mode.

Читайте также:  Открыть два рабочих стола windows 10

This extension can be dynamically turned on or off with xset, or at server startup with openwin. See the xset(1) and openwin(1) man pages, specifically the -bc option, for more information.

XC-MISC

This standard X Consortium extension allows an application to recycle XIDs. Some applications create and destroy XIDs so rapidly that they exceed the fixed range of XIDs. Most applications do not need to use this extension. The specification is in /pub/X11/xc/doc/specs/Xext/xc-misc.ms

X Imaging Extension

The X Imaging Extension (XIE) is Sun’s implementation of the X Consortium standard.

AccessX

The Solaris X server also supports keyboard features compliant with the American Disabilities Act (ADA). These features are available through an extension to the server, called AccessX. The AccessX extension provides the following capabilities: sticky keys, slow keys, toggle keys, mouse keys, bounce keys and repeat keys. Use the client program accessx to enable and disable these capabilities. The accessx client controls the toggle, bounce, and repeat keys and their settings. The sticky, slow, and mouse keys can be enabled using shift or other keys. For information on using AccessX, see the Solaris User’s Guide .

Before running accessx, set the UIDPATH environment variable to /usr/openwin/lib/app-defaults/accessx.uid.

The accessx client is part of the SUNWxwacx package. To install it, you need to install the All Cluster.

Shared Memory Transport

The Solaris X server includes the Sun extension SUN_SME, Sun’s implementation of a shared memory transport mechanism. This extension provides the capability of sending client requests to the server via shared memory. Shared memory is used for client requests only. Replies from the server and events are sent via the default transport mechanism. To enable this transport mechanism, set the DISPLAY environment variable to :x.y, where x is the display number, and y is the screen number, and set the environment variable XSUNTRANSPORT to shmem. The size of the segment can be set by setting the environment variable XSUNSMESIZE to the desired size in Kbytes. By default, XSUNSMESIZE is set to 64.

Visual Overlay Windows

The Solaris X server supports two application programmer’s interfaces (APIs) that enable use of overlay windows. An overlay is a pixel buffer (either physical or software-simulated) into which graphics can be drawn. Applications can use overlays to display temporary imagery in a display window. For more information on the overlay APIs, see Chapter 5, Server Overlay Windows and Chapter 6, Transparent Overlay Windows.

X11 Libraries

Table 1-1 lists the X11 libraries. The .so and .a files that comprise these

libraries are in /usr/openwin/lib.

Table 1-1 X11 Libraries

Dynamic loading of locale

Search path includes /usr/openwin,

Solaris x window windows

Для начала немного истории и общих мест. Представим, что нам нужно написать программу, которая будет работать в графическом режиме. Нам потребуется: опрашивать клавиатуру, снимать события и координаты мыши, рисовать на экране, . Как это делалось на MS-DOSе? Очень просто. Пишем одну большую программу, в ней — все: и логика, и обработка событий, и слежение за перемещениями мыши, ну, а когда требуется что-то нарисовать, мы даем команду на запись в порты EGA контроллера, рисуем пиксель. Через год появляется контроллер VGA, еще через год SVGA 800×600, 16 цветов, вслед за ним UVGA 1024×768, 256 цветов, затем XGA 1280×1024, 16Мб цветов.

Основная идея X Windows.

Имеем две независимых программы. Одна умеет рисовать на графическом мониторе, и вообще, обслуживать все это железо. Она называется X-сервер. Вторая программа — называем ее клиент X Windows, рисовать физически не умеет. Зато она знает, что именно надо рисовать, и умеет командовать. Команды типа: «нарисовать прямоугольник», «провести линию», «открыть окно», «вывести символ в заданном фонте», «опросить координаты мыши», и т.п. передаются X-серверу, а тот их исполняет — рисует. Формат и спецификации этих команд опубликованы, стандартизованы, и широко известны. Все вместе они называются «Протокол X Windows».

X-сервер. Программа, которая написана специально под конкретное физическое устройство (имеется в виду — монитор, графконтроллер, мышь и клавиатура), умеет на нем рисовать, и умеет понимать команды рисования по протоколу X Windows System.

X-клиент. Прикладная программа, обеспечивающая графический интерфейс с пользователем. Команды для рисования на экране передает X серверу по протоколу X Windows System.

X-терминал. Ящик (монитор, графконтроллер, мышь, клавиатура, ну и, естественно, процессор и оперативная память), на котором запущена программа X-сервер. X-терминалом может служить самая обыкновенная графическая Unix-рабочая станция, на которой X сервер выполняется, как одна из многих прикладных задач. Специализированный X-terminal — ящик, на котором запускается только X сервер, и ничего кроме. Можно использовать PC под MS-DOSом, на котором запущена DOSовская программа, реализующая X сервер.

Xlib — библиотека C-ишных функций, реализующих протокол X Windows System. С помощью этой библиотеки можно писать графические программы — X-клиенты.

Что мы с этого имеем.

Мы получаем универсальный GAPI — (Graphical Application Programming Interface) — средство программирования графических приложений. Пользовательские графические программы при этом полностью отвязаны от железа, от конкретного графконтроллера. О железе пусть беспокоится X-сервер.

Протокол X Windows умеет «ездить» по сети: например по TCP/IP, или по DEC-net. Поэтому Xсервер может крутиться на одной машине, а X-клиент — на другой. То есть, картинка рисуется на одной машине, а программа, которая ее обеспечивает — крутится на другой.

X-сервер способен обслуживать сразу много клиентов, причем всех — одновременно. На нашем графическом экране может быть открыто сразу много окон — каждое окно порождается его собственным X клиентом. Клиенты эти могут быть запущены и на нашей машине (к которой подключена графическая подсистема), и на удаленных машинах, соединенных с нами по сети.

Чего нам это стоит.

Понятно чего. Ресурсов. X Windows очень любит ресурсы — память, процессор, диск. Способен съесть их в неограниченных количествах. А еще ведь надо программировать. (К счастью, не всем надо). Кто видел, как выглядят программы для MS Windows или Mac, может представить себе внешний вид исходных текстов X-овой программы.

Как это запускается.

Пусть в нашей сети есть машина с графической подсистемой и X сервером, и сетевой адрес этой машины pcat107.foms.msk.ru
на pcat107 нужно выполнить команду:

Запускаем на нашем компьютере X-овую программу, так, чтобы ее окошко рисовалось на мониторе pcat107. Для этого на нашем компьютере нужно выполнить команду:

Библиотеки, Motif, и война круглых и квадратных кнопок.

Можно писать X-овые программы, используя библиотеку Xlib. Многие так и пишут, хотя это весьма тяжело — уж больно невысок уровень Xlib’а. В помощь программистам было создано несколько toolkit’ов — библиотек более высокого уровня, в которых реализованы различные widget’ы. Widget — непереводимый термин X Windows. Склеен из двух слов — Window и Gadget (приспособление), является графическим объектом с привязанными к нему свойствами и реакциями на действия пользователя. Примеры widgetow: «кнопка», «менюшка», «окошко с текстом», «линейка прокрутки».

Известны следующие toolkit’ы:

Library Description Available From the X Consortium Sun Value Added
Xaw — Anthena Widgets. Очень черно-белый, очень плоский, весьма небогатый. Зато — бесплатный. Посмотрите, как выглядят программы xterm, xedit, xman. Они сделаны на Xaw.
xview — Набор библиотек и объектов, использованных в реализации набора пользовательских утилит Sun-овской версии X Windows — «Open Windows». Весьма симпатично. Круглые кнопки, «шприцы-иголки» (замечательная вещь!), очень хорошо продуманный интерфейс пользователя, в том числе активно используемая трех-кнопочная мышь. Исходные тексты библиотек xview открыты, предоставляются бесплатно. Однако набор DeskSet — 15 пользовательских утилит входящих в OpenWindows, сделанный на библиотеке xview, SunSoft готов предоставить только за плату. В бинарном виде — весьма дешево ($100). В исходных текстах — весьма дорого ($200K)
Motif — Библиотека поставляются организацией OSF за не совсем маленькую плату. Исходные тексты библиотек недоступны, либо чрезмерно дороги. Кнопки — квадратные, да и вообще Motif’овские приложения до безобразия напоминают MS Windows (что, IMHO, является серьезным преступлением)

В борьбе BSD и Unix V победил, как известно, System V, а в войне круглых и квадратных кнопок выиграл Motif.

Конфигурирование X Windows

В Linux используется X11 в реализации XFree86. Чтобы его сконфигурировать, выполните команду xf86config

Запуск X Windows.

На некоторых машинах он сам запускается. А также иногда удается запустить его вручную командами: startx и/или openwin

Solaris:

  1. Установите переменные окружения:
  2. Запустите X Windows командой

«Нормальные» Unix’ы:

  1. Установите переменные окружения:
  2. Запустите X Windows командой

«Ненормальные» Unix’ы (Unixware).

Когда регистрируете пользователя, ответьте Yes на вопрос «Хотите графический DeskTop». Тогда после login’а X Windows будет запускаться автоматически. Если вы прозевали, и ответили No, то никаким осмысленным способом запустить X Windows для себя вам не удастся.

Настройки пользовательского окружения X Windows

При наличии пользовательских настроечных файлов, лежащих в домашнем каталоге пользователя, используются они. Если их нет, используются стандартные, общественные, обычно лежащие в каталоге /usr/lib/X11 или /usr/openwin/lib

Персональные и общественные пользовательские настройки хранятся в файлах: Окружение (desktop) — т.е. программы, которые стартуют автоматически при запуске X Windows находится в файлах:

«Нормальнные» X windows:

Настройки window-manager’a — т.е. — поведение окон, менюшки пользователя, раскладка команд на клавиши мышки, .

Читайте также:  Windows image mastering api
Оцените статью