Sponsored Content
Operating Systems Linux Red Hat Xming Vs ssh connect to RHEL server from Windows machine Post 302769516 by chilinski on Tuesday 12th of February 2013 01:53:17 PM
Old 02-12-2013
It may be that you don't have the display variable set up on the linux side.

When I want to use the Sun Java Directory Server on my LDAP server, I ssh to the machine and run this little script:

Code:
#! /bin/bash
#This little script reads the ipaddress of the session that just logged
#in via SSH and sets up the xwindows display. Exceed must be running
#on the local terminal first.

echo "Do you have Exceed or Xming running? (y or n) and Enter"
read response
if [ "$response" == "y" ]; then
ip_addr=${SSH_CONNECTION%% *}
DISPLAY=$ip_addr:0.0
export DISPLAY
/var/mps/serverroot/startconsole
fi

This sets the DISPLAY variable based on the ip from which you connnected. The linux box needs to know where to send the display based on the DISPLAY variable. In my script, after the variable is set, it runs the startconsole program. This is on a Solaris system; on a normal linux system Xterm is usually used.

So, typically, you would ssh to the box, set the DISPLAY and then run the program you want on the Linux machine. Does that make sense?

Moderator's Comments:
Mod Comment edit by bakunin: PLEASE! My supply of CODE-tags is already running low as i have to give them away the whole day long. Please use your own CODE-tags for your code (not Italic-tags) so that mine last a little longer. This code tag video shows you how. Thank you.

Last edited by bakunin; 02-13-2013 at 12:34 PM..
 

10 More Discussions You Might Find Interesting

1. AIX

Connect from Windows Using SSH

Hi Everybody, I have 2 Servers (AIX 4.3), recently I installed SSH in both servers successfuly. I can connect from one server to another using SSH. My problem is when I tried to connect from Windows workstation to one of these servers the connection timed out. I'm using PUTTY to connect to the... (12 Replies)
Discussion started by: aldowsary
12 Replies

2. Shell Programming and Scripting

SSH into a linux machine from a windows machine

I basically want to login into different linux machines( on the same network) from a windows machine. I know i can use ssh <machine name>. But i want to automate this process. I dont want to enter the username and password. Is there any way to do it. Can i make some sort of a batch script for it. (4 Replies)
Discussion started by: lassimanji
4 Replies

3. Solaris

How to mount a Files System where RHEL is installed on a Sun server Machine..

Hi Everyone, I have a machine where RHEL(Red Hat Enterprise Linux) is installed and few of our products are saved on the same. Our products work only on sparc 6 + and i want to basically asve the products on the machine which has RHEL installed on it and mount the drive on the sun server and... (2 Replies)
Discussion started by: sankasu
2 Replies

4. Solaris

Not able to connect (ping & http) to windows 2003 (with IIS installed) from Solaris9 Machine(Tomcat)

hi Am trying to connect from Solaris 9 installed Sun server and having Tomcat 5.5.9 installed on top of it to Windows 2003 server with IIS installed for web application. Scenarios am facing are 1. From Sun system am able to ping and telnet ip with port 80 of windows 2000 system which is... (2 Replies)
Discussion started by: aemunathan
2 Replies

5. Linux

Help!! trying to connect to linux SSH from windows putty client

Hi, i am trying to connect my Putty session on a windows box to a linux SSH, i have generated private and public key pairs using puttygen, i have set the public one to be in an OPENSSH format... and have put this in my authorized_keys file in linux, when i connect i get the following errors: ... (1 Reply)
Discussion started by: Jtyreman
1 Replies

6. Ubuntu

Steps to connect linux (Ubuntu) machine from windows 7

Hi, Can anyone give me the steps to connect ubuntu from windows7? Thanks (1 Reply)
Discussion started by: diehard
1 Replies

7. Red Hat

Graphically connect RHEL server from Windows 7 Professional

I want to connect RHEL server from my windows 7 Professional machine graphically. I logged into 1 RHEL server with IP, 10.101.17.80 using Putty from my Windows 7 professional machine. Now from this server, 10.101.17.80, I want to connect to another RHEL server 10.101.17.79. I used, ssh -X... (1 Reply)
Discussion started by: RHCE
1 Replies

8. Linux

Unable to connect to Server machine from a client machine using ftp service

Hi, Could you please help me with the below issue.. I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1). I'm trying to connect to server from the client machine using ftp service. I have installed vsftpd daemon on both the machines. I'm getting... (4 Replies)
Discussion started by: raosr020
4 Replies

9. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

10. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies
GNOME-SESSION(1)					      General Commands Manual						  GNOME-SESSION(1)

NAME
gnome-session - Starts up the GNOME desktop environment SYNOPSIS
gnome-session [--autostart=DIR] [--default-session-key=KEY] [--failsafe|-f] [--debug] DESCRIPTION
The gnome-session program starts up the GNOME desktop environment. This command is typically executed by your login manager (either gdm, xdm, or from your X startup scripts). It will load either your saved session, or it will provide a default session for the user as defined by the system administrator (or the default GNOME installation on your system). The default session is defined in the GConf keys under /desktop/gnome/session. When saving a session, gnome-session saves the currently running applications in the $XDG_CONFIG_HOME/gnome-session/saved-session directory. gnome-session is an X11R6 session manager. It can manage GNOME applications as well as any X11R6 SM compliant. OPTIONS
The following options are supported: --autostart=DIR Start all applications defined in DIR, instead of starting the applications defined in /desktop/gnome/session/default_session, or via the --default-session-key option. Multiple --autostart options can be passed. --default-session-key=KEY Sets the GConf key from which applications running a default session should be read to KEY. If not specificed, /desktop/gnome/ses- sion/default_session will be used. --failsafe gnome-session will run in fail-safe mode. User-specified applications will not be started. --debug Enable debugging code. ENVIRONMENT
gnome-session accepts all of the standard environment variables used by gnome programs, other than the SESSION_MANAGER environment vari- able. gnome-session also sets several environment variables for the use of its child processes. SESSION_MANAGER This variable is used by session-manager aware clients to contact gnome-session. DISPLAY This variable is set to the X display being used by gnome-session. Note that if the --display option is used this might be different from the setting of the environment variable when gnome-session is invoked. SEE ALSO
gnome-session-properties(1) gnome-session-save(1) gnome-wm(1) BUGS
If you find bugs in the gnome-session program, please report these on http://bugzilla.gnome.org. GNOME GNOME-SESSION(1)
All times are GMT -4. The time now is 05:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy