Wednesday, November 23, 2016

Launch Wizard / Applications On Linux Servers Without Display- X11 Access


In some cases, it might be necessary to have a graphical user interface on a Linux server.

Various tools exist to achieve this, but most of us are already using PuTTY, so this guide will use PuTTY as a stating point.
Install XWindows Server Xming http://www.straightrunning.com/XmingNotes/ and run XLaunch to configure Xming using default options. When the configuration is completed, Xming will start. For any subsequent uses, you just start Xming.

Configure PuTTY session to use X forwarding:



Start PuTTY session and check environment variable DISPLAY is set and a xterminal can be started:

[xxx@xxxx]$ echo $DISPLAY
localhost:10.0
[xxx@xxxx]]$ xterm &

When switching to another user, it is required to authorize xsession for the other user. In order to facilitate this, first get x-authorization information for own user:

[xxx@xxxx]]$ xauth list
XXXXXXXX/unix:10  MIT-MAGIC-COOKIE-1  87a6d247f9d40f1a8a8ec2cc11a52643

Next switch to another user if someone wants to  install software or launch anything using specific user  then  add x-authorization and check an xterminal can be started:

Like in my case I have oracle user who has complete rights and he is in correct group.

[xxx@xxxx] ~]$ sudo -u oracle -i

[xxx@xxxx] ~]$ xauth add XXXXXXXX/unix:10 MIT-MAGIC-COOKIE-1 87a6d247f9d40f1a8a8ec2cc11a52643
[xxx@xxxx]s ~]$ xterm & 

0 comments:

Post a Comment