LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-11-2004, 03:20 AM   #1
steyr
LQ Newbie
 
Registered: Oct 2003
Posts: 11

Rep: Reputation: 0
running remote gui programs w/ X


So I switched my server over from Redhat 9 to Slack 9.1 and I'm really happy and excited to try to get some things running that I couldn't previously do, but that's another story.

My problem is that when I was running rh9 on both the server and laptop, I could ssh right in and run xxms to control what the server was doing through the stereo (good stuff).

Now I have to run
Code:
> xhost +
on my laptop to authorize the remote x programs to use my screen (I guess?). And I have to run
Code:
> export DISPLAY=[my IP]:0.0
So, other than putting some neat little script file that grabs the connecting ssh IP from export, like:
Code:
>  export | grep SSH_CLIENT | gawk -F\" {'print $2'} | gawk {'print $1'}
and putting that a .login file or .bashrc file, is there some easier way to do this? Or perhaps someone could at least provide me a cleaner version of the last command, 'cause I love seeing how people do tricks and stuff in shell scripts...

TIA,
Paul
(new slacker)
 
Old 01-11-2004, 08:23 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
SSH_CLIENT is just a variable so you should be able to use it in bash:
export DISPLAY=$SSH_CLIENT:0.0
 
Old 01-11-2004, 11:04 AM   #3
trusouthrnplaya
Member
 
Registered: Jun 2001
Location: (Cashville) Nashville, TN
Distribution: CentOS 4.0, Slackware 10.2,
Posts: 223

Rep: Reputation: 30
When I do xhost+, I get "unable to open display" .. I thought I might of had a permission problem but it happens in superuser also. I just moved to Slack 9.1 from Rh9, was there something I missed during setup?
 
Old 01-11-2004, 12:56 PM   #4
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 564

Rep: Reputation: 45
I run gkrellm from my server with display on client using ssh

On my server, in /etc/ssh/sshd_config, the line "X11Forwarding yes" is uncommented and I use a command like this

ssh -X leila@192.168.1.1 /usr/X11/bin/gkrellm -f
 
Old 01-11-2004, 01:40 PM   #5
trusouthrnplaya
Member
 
Registered: Jun 2001
Location: (Cashville) Nashville, TN
Distribution: CentOS 4.0, Slackware 10.2,
Posts: 223

Rep: Reputation: 30
duhh.....
I figured it out..... I was doing it wrong,
1st run xhost + before ssh to the server
and then from there you do export DIPSLAY=(IP):0

My bad for not searching b4 asking the question. The answer was in this forum all along.
 
Old 01-11-2004, 01:53 PM   #6
steyr
LQ Newbie
 
Registered: Oct 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by david_ross
SSH_CLIENT is just a variable so you should be able to use it in bash:
export DISPLAY=$SSH_CLIENT:0.0
You're right. It was late last night... Although for me the SSH_CLIENT variable has extra information with spaces. The first number I don't know what it is, the second is the port.

So I could really cut it down with:
Code:
> echo `echo $SSH_CLIENT | gawk {'print $1'}`:0.0
Of course maybe it'd work with that extra two numbers on the end, I don't know.

Quote:
Originally posted by justwantin
I run gkrellm from my server with display on client using ssh

On my server, in /etc/ssh/sshd_config, the line "X11Forwarding yes" is uncommented and I use a command like this
I uncommented this line and when I connect, it still doesn't automatically set that DISPLAY variable.

Ok, looks like I'm going to have to use that line above to set the DISPLAY variable, but the new question is, where can I put it so all the users (roommates/friends) who also ssh into the server can have that variable automatically set for them as well?

TIA,
Paul
(new slacker)
 
Old 01-11-2004, 06:15 PM   #7
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 564

Rep: Reputation: 45
I use that on the server and that will make it available to all clients.

Can't remember , and didn't check befor I went to work but I don't think you need to have that set on the clients.

About the only thing I remember doing on clients was setting up the dsa keys ( or mayber rsa but either will work.

BTW I use ssh passwordless login when running gkrellm. It's used so that user on client can see that they have connected after initiating a dialup connection from client.
 
Old 01-11-2004, 07:11 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Steyr,

I think that your problem is that you're running a
console as root (or a different user from the one
who started the desktop) when you're ssh'ing ...

If it's set-up correctly you shouldn't need either
the xhost nor the display bit for ssh connections.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remote desktop programs? okan.yuksel Linux - Software 1 03-23-2005 09:03 PM
Can't open GUI of programs in remote machines by telnet and setting DISPLAY..... bioinfo Linux - Networking 2 10-02-2004 08:26 AM
How to use the Linux GUI of the remote PC? weiweif Linux - Software 3 09-08-2004 02:27 PM
running GUI applications on remote client bbresc512 Linux - Networking 9 04-25-2004 05:59 PM
remote GUI session Robert0380 Linux - Software 6 05-18-2003 03:40 PM


All times are GMT -5. The time now is 11:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration