Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strange (Solaris ?) entries in the PATH with ssh/x11vnc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Mar 28, 2010 11:42 pm    Post subject: strange (Solaris ?) entries in the PATH with ssh/x11vnc Reply with quote

I have the following setup for VNC connection to remote AMD64 server:

locally I use ssvnc in terminal mode that establishes ssh connection to remote server, which launches x11vnc that in turn launch Xvfb and some window manager.

My problems is with the PATH that I get after that, which I can't understand. It reads

/opt/intel/Compiler/11.1/038/bin/intel64:/opt/intel/Compiler/11.1/038/bin/intel64:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/bin/X11:/usr/openwin/bin:/usr/dt/bin:/opt/kde4/bin:/opt/kde3/bin:/opt/gnome/bin:/usr/bin:/bin:/usr/sfw/bin

First of all, it does not include /usr/local/bin which means that /etc/profile was not sourced (that EDITOR is not set is another indication)
Secondly, it has entries /usr/X11R6/bin:/usr/bin/X11:/usr/openwin/bin:/usr/dt/bin:/opt/kde4/bin:/opt/kde3/bin:/opt/gnome/bin:/usr/bin:/bin:/usr/sfw/bin
that do not exists on amd64, but look like Solaris. The first 'Intel' is set in my .bashrc which was sourced, it seems, twice.

What can be setting my PATH like that ? Straightforward login via ssh sets the PATH as expected.

Comment 1: aha, if ssh is set to run the command, it does not source /etc/profile it seems
Back to top
View user's profile Send private message
krunge
n00b
n00b


Joined: 04 May 2005
Posts: 9

PostPosted: Sun Apr 04, 2010 1:26 pm    Post subject: Reply with quote

The methods x11vnc uses to try to find your existing Xsession, and if not found try to figure out what your preferred desktop is and launch Xvfb with it are very heuristic. There is no API to do this, so it runs many utility commands to try to figure things out. It appends directories to PATH to have a good chance of finding these utility programs.

If you don't want this, and don't want to repair things in your .bashrc, you can have x11vnc point Xvfb to GDM (or KDM, etc) and then get your system's normal Xsession startup procedure.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Apr 04, 2010 2:39 pm    Post subject: Reply with quote

Thanks, I also did find that the PATH is added to by x11vnc.

I am contemplating whether to put some magic into .bashrc or do something else. I already had (and have) a 'remote terminal' setup running through
xinetd -> Xvnc -> xdm, which gives non-persistent sessions with xdm authenticalion for several users that use the server.
I used x11vnc to have private persistent ones. Should think how to make it all more elegant.
Back to top
View user's profile Send private message
krunge
n00b
n00b


Joined: 04 May 2005
Posts: 9

PostPosted: Wed Apr 07, 2010 1:52 pm    Post subject: Reply with quote

BTW, what is the full command you are using to run x11vnc and have it create your X session?

When I use x11vnc to create X sessions with Xvfb, my PATH doesn't have those entries you mentioned in them; I think this is due to 'startx' or 'xinit' running a session launch script (e.g. /usr/bin/gnome-session) that sets things up normally.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Wed Apr 07, 2010 4:58 pm    Post subject: Reply with quote

I use ssvnc on the client side, which assembles the following command to launch x11vnc on the server

Running ssh:
env LD_PRELOAD=/usr/lib64/ssvnc/./lim_accept.so ssh -x -x -f -t -C -D 5931 pogosyan@myserver "PORT= x11vnc -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb -localhost -nopw -timeout 120 -o $HOME/.tsvnc.log.pogosyan -env FD_SESS=xfce -env FD_GEOM=1850x1150x16 -env AUTO_PORT=5950"

myserver -> is my server address


I grepped x11vnc binary for those (Solaris-like) directories in the PATH, and got a hit on all of them.

I have another VNC setup on the same machine - classical xinetd -> Xvnc -> xdm (which again launches xfce session as specified in system-wide /etc/env.d/90xsession ), and the PATH is all normal then.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum