SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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:
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...
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?
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?
Distribution: Slackware ....that's all besides Salix and Porteus
Posts: 500
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.