> Today's Topics: > > 1. Connect to local X server? (Shawn Young) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 10 Sep 2010 15:18:14 -0600 > From: Shawn Young <spacep...@gmail.com> > Subject: Connect to local X server? > To: screen-users@gnu.org > Message-ID: > <aanlkti=tkvkrc78woejf9+om=q2mhhzpjfigg0eux...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I am sorry for bothering you with what is probably a simple question but I > am not creative enough to come up with the proper search keywords when I've > tried searching this on the screen-users' website or on google. Whenever I > try to pull up an application which requires X when I am using screen I get > an error telling me that I can't connect to the local X server. This isn't > a problem on a different machine that I have, in fact, using that machine I > can log into the machine with a problem, start a screen session and pull up > X applications. What should I look for on the machine with problems that > will fix my problem? > > Thanks, > > Shawn > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.gnu.org/archive/html/screen-users/attachments/20100910/6983af9e/attachment.html > > ------------------------------ > > _______________________________________________ > screen-users mailing list > screen-users@gnu.org > http://lists.gnu.org/mailman/listinfo/screen-users > > End of screen-users Digest, Vol 1089, Issue 1 > *******************************************
I use a couple of scripts for this. One, xenvsave, I use from any terminal with the correct X settings, the other, an alias, xenvload I use from terminals that need their env "fixed". The xenvload create host specific .ssh.env files in my home and the xenvload simply sources them. Here's the details; 0 %> cat ~/bin/xenvsave #!/bin/bash # Copy X env into a file that can be sourced from another shell. host=$(hostname) file=~/.ssh.env.$host echo "set -a" >$file env | grep -e SSH -e DISPLAY | grep -v TTY | sed -e 's/=\(.\+\)/="\1"/' >>$file echo "set +a" >>$file alias xenvload=". ~/.ssh.env.$(hostname)" I'm sure someone has a cleaner option, but this works pretty well in an env of many servers and X sessions. -Bruce _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users