Larry Hall (Cygwin X) wrote: > Chris Sutcliffe wrote: >>>>> The standard way this has been handled in the past is to set up a >>> mount >>>>> point for '/tmp/' to a unique location. In a default Windows >>>>> installation, the following should work (untested): >>>>> >>>>> mount -b -u "$TEMP" /tmp >>>>> >>>>> This keeps things unique for each user anyway. >>>> That's quite cool. I decorated it a bit to keep it all within my >>> cygwin >>>> file space. Specifically, in my all-purpose ~/Temp directory: >>>> >>>> mkdir -p ~/Temp/tmp >>>> mount -b -u c:/cygwin/home/${USER}/Temp/tmp /tmp >> When I try to execute the mount, I get: >> >> $ mount -b -u "$TEMP" /tmp >> mount: /tmp: Invalid argument >> >> Is there something I'm missing? > > No, not really. It's shame on me for not trying the syntax I was > offering first. If you're doing this from inside a Cygwin shell, > use: > > mount -b -u $(cygpath -ma "$TEMP") /tmp
Shame shame shame :) Actually, I ran into a wrinkle. My /c/cygwin/home/user is soft- linked to another location on the local hard drive. This seems to foil the attempt to mount c:/cygwin/home/user/Temp/tmp. I had forgotten about that file path redirection. After some bumbling to discover it, I found that your mounting method works if the real path is used. Which made me think "wouldn't it be nice if mounting didn't have to be done for each user account?". I install cygwin on whatever machine (of several) that I happen to work on, so such a global fix would make life easier. And there is a solution. With a bit of refresher from the unix shell newsgroup, I was prompted into realizing that startxwin.sh launches XWin in the background, which allows the PID to be captured with "$!". So if one really wanted to, startxwin could use "wait" with XWin's PID to wait for XWin to finish, after which it deletes /tmp/.X11-unix. No need to maintain user-specific /tmp mounts. One could probably create a start-menu shortcut that invokes startxwin.sh with the run command, similar to the way it is used in startxwin.bat. On a separate but related note, I found that launching XWin from an ssh session doesn't result in XWin or xterm showing up on the computer screen, even though the processes are running. Depending on whether I use the sh or bat startup script, xterm might not even be able to connect to the X server. Cygstart is also unable to open up applications on the screen when launched from an ssh session. It is possible that no such similar effects would plague the shortcut that invokes the above modification of startxwin.sh. It remains to be tested, and the hour is late and "tomorrow" (technically today) is an early day, so I put it on my list of things that would be nice to try some time. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/