Re: error when starting X-Win
Gmane User wrote: snip 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. If memory serves me correctly, this was talked about before and perhaps even implemented. If the latter is actually true, then it got lost at some point (perhaps about the time that the Cygwin-X maintainer was lost ;-) ). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: error when starting X-Win
Larry Hall (Cygwin X) wrote: Gmane User wrote: snip 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. If memory serves me correctly, this was talked about before and perhaps even implemented. If the latter is actually true, then it got lost at some point (perhaps about the time that the Cygwin-X maintainer was lost ;-) ). Yeah, well, it's probably not the end-all-be-all solution. It occured to me that if the startxwin.sh script got interrupted somehow e.g. due to forced shutdown, power outage, logoff, or kill, then it never runs the command that erases /tmp.X11-unix. Are you the new maintainer? -- 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/
Re: error when starting X-Win
Gmane User wrote: Martin Bartak wrote: Hello, How to delete /tmp/.X11-unix/X0 automatically when closing X-session or, how to prevent its emergence when starting X-sesion or, how to make it re-writable by 'non-Administrator' user? I've got Cygwin 1.5.23-2 (full installation) on WinXP with two user accounts. I use 'startx' command to invoke X-Win with default parameters or options. When starting X-Win, a file named 'X0' is placed into /tmp/.X11-unix/ and it probably locks the X-server for current user (?) This file persists after exiting from X-Win and also after exiting from Cygwin. No problem if I start Cygwin and X-Win again as the same user, but when I login as another user (different from Administrator) X-Win cannot be started unless the previous X0 file is deleted. I have sshd installed, so I ssh into the account that owns /tmp/.X11 and remove it. Better yet, I simply have the same account starting Xwin all the time. For example, if user1 is the Xwin account and I am logged in as user2, I can ssh into user1 to start Xwin. Or simply do Start-run, then use the runas command to run startxwin.bat as user1 (full program path required). The user2 login session hasn't been interrupted; you just need to export DISPLAY=:0.0 and then start launching X applications. 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. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: error when starting X-Win
Larry Hall (Cygwin X) wrote: Gmane User wrote: Martin Bartak wrote: Hello, How to delete /tmp/.X11-unix/X0 automatically when closing X-session or, how to prevent its emergence when starting X-sesion or, how to make it re-writable by 'non-Administrator' user? I've got Cygwin 1.5.23-2 (full installation) on WinXP with two user accounts. I use 'startx' command to invoke X-Win with default parameters or options. When starting X-Win, a file named 'X0' is placed into /tmp/.X11-unix/ and it probably locks the X-server for current user (?) This file persists after exiting from X-Win and also after exiting from Cygwin. No problem if I start Cygwin and X-Win again as the same user, but when I login as another user (different from Administrator) X-Win cannot be started unless the previous X0 file is deleted. I have sshd installed, so I ssh into the account that owns /tmp/.X11 and remove it. Better yet, I simply have the same account starting Xwin all the time. For example, if user1 is the Xwin account and I am logged in as user2, I can ssh into user1 to start Xwin. Or simply do Start-run, then use the runas command to run startxwin.bat as user1 (full program path required). The user2 login session hasn't been interrupted; you just need to export DISPLAY=:0.0 and then start launching X applications. 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 Thanks! -- 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/
Re: error when starting X-Win
Gmane User wrote: Larry Hall (Cygwin X) wrote: Gmane User wrote: Martin Bartak wrote: Hello, How to delete /tmp/.X11-unix/X0 automatically when closing X-session or, how to prevent its emergence when starting X-sesion or, how to make it re-writable by 'non-Administrator' user? I've got Cygwin 1.5.23-2 (full installation) on WinXP with two user accounts. I use 'startx' command to invoke X-Win with default parameters or options. When starting X-Win, a file named 'X0' is placed into /tmp/.X11-unix/ and it probably locks the X-server for current user (?) This file persists after exiting from X-Win and also after exiting from Cygwin. No problem if I start Cygwin and X-Win again as the same user, but when I login as another user (different from Administrator) X-Win cannot be started unless the previous X0 file is deleted. I have sshd installed, so I ssh into the account that owns /tmp/.X11 and remove it. Better yet, I simply have the same account starting Xwin all the time. For example, if user1 is the Xwin account and I am logged in as user2, I can ssh into user1 to start Xwin. Or simply do Start-run, then use the runas command to run startxwin.bat as user1 (full program path required). The user2 login session hasn't been interrupted; you just need to export DISPLAY=:0.0 and then start launching X applications. 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 Thanks! You're welcome. Glad I could help. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: error when starting X-Win
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? Thanx! Chris -- Chris Sutcliffe http://ir0nh34d.googlepages.com http://ir0nh34d.blogspot.com http://emergedesktop.org -- 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/
Re: error when starting X-Win
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 -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: error when starting X-Win
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/
Re: error when starting X-Win
Martin Bartak wrote: Hello, How to delete /tmp/.X11-unix/X0 automatically when closing X-session or, how to prevent its emergence when starting X-sesion or, how to make it re-writable by 'non-Administrator' user? I've got Cygwin 1.5.23-2 (full installation) on WinXP with two user accounts. I use 'startx' command to invoke X-Win with default parameters or options. When starting X-Win, a file named 'X0' is placed into /tmp/.X11-unix/ and it probably locks the X-server for current user (?) This file persists after exiting from X-Win and also after exiting from Cygwin. No problem if I start Cygwin and X-Win again as the same user, but when I login as another user (different from Administrator) X-Win cannot be started unless the previous X0 file is deleted. I have sshd installed, so I ssh into the account that owns /tmp/.X11 and remove it. Better yet, I simply have the same account starting Xwin all the time. For example, if user1 is the Xwin account and I am logged in as user2, I can ssh into user1 to start Xwin. Or simply do Start-run, then use the runas command to run startxwin.bat as user1 (full program path required). The user2 login session hasn't been interrupted; you just need to export DISPLAY=:0.0 and then start launching X applications. A problem occurs if user2 doesn't have authentication info to login as user1 or run applications as user1. Maybe there is a way to modify startxwin.bat or startxwin.sh. Have the script wait for the Xwin command to finish, and then have it remove /tmp/.X11. That way, whoever launches Xwin via startxwin.{bat,sh} also removes /tmp/.X11 upon completion. I've only looked at startxwin.bat script for any nontrivial amount of time, and I know that you can have script wait for Xwin to complete by modifying the %RUN% command that launches it. %RUN% is fancy invocation of the run command, and getting help on that shows that the -wait switch will cause the script to pause until launched applications ends before continuing. There is a problem I haven't figured out -- how to have startxwin.bat wait for Xwin to finish, yet still proceed to launch xterm *before* it starts to wait. I'm sure those who are wizards in scripting, signals, and things who can figure it out, but that is a foggy area for me at best. I have my eyes peeled for the chimings-in of such experienced people, in case they respond. Meanwhile, you can comment out the xterm line and launch it from another bash shell e.g. opened from the Start Menu (not elegant, I know). -- 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/