PDA

View Full Version : Windows XP Fast User Switching



Ron
October 13th, 2002, 12:55 PM
It doesn't look hard too implement at all. I could do it, if I had WinXP. Anybody feel like donating ?

Ron
October 13th, 2002, 12:55 PM
You've got mail.


Sure...
BTW if you ever want to see Girder in action with the HTPC on a 100' screen etc the door is open..

Drool,.. oh yeah, I'd like to see that ;-)

Ron
October 13th, 2002, 12:55 PM
Yes I did, but the correct question would be if I have time to work on Girder. The answer would be no. :(

Ron
October 13th, 2002, 12:55 PM
I just dove into this subject, and it looks like it's a major problem to get an application to run on a different desktop from what it was started from. Even if I get the main girder GUI to go there, the plugins will have major problems too.

Sorry PP, theye, this looks like a feature that is not going to happen.

Ron
October 13th, 2002, 12:55 PM
Hmm, how about I send an event through Girder, something like 'OnFUSOut' and 'OnFUSIn'. Then you can react to that anyway you like.

Ron
October 13th, 2002, 12:55 PM
Added to TODO.

Ron
October 13th, 2002, 12:55 PM
Quite right Mark, girder uses a Mutex, that is global across sessions, thus blocking the second girder instance.

Ron
October 13th, 2002, 12:55 PM
I do not know when I'll implement it, and IF I'll implement it.

Ron
October 13th, 2002, 12:55 PM
Service is not the solution this has been tried but it just doesn't work with a Girder type of application because of all kinds of problems with windows.

http://www.girder.nl/phpBB2/viewtopic.php?t=1621&postdays=0&postorder=asc&start=30

The fast user switch will be implemented but don't hold your breath for it. I'm WAY busy right now and I have other things on my mind ( family stuff )

Ron
October 13th, 2002, 12:55 PM
No problem, only thing left to do is make a plugin that actually sends the UserOut/UserIn messages.

Ron
October 13th, 2002, 12:55 PM
I don't think so.

Ron
October 13th, 2002, 12:55 PM
thanks for pointing out the competition. This is the girder forum, if this is your way of getting me to make that plugin you are not on the right track. I'm closer to deleting that post then making a plugin.

Ron
October 13th, 2002, 12:55 PM
It just seems that this may not happen with Girder.

Ah but it will happen, its just a matter of time, as I said in an other thread I didn't write a single line of code the last month, not because I didn't want to but because I didn't have time. One of the last things that I wrote was the modification so that Girder was prepared for Fast User switch...

Anyway no hard feelings, it just rubs me the wrong way when people advertise that the other program can do this or that :-)

Ron
October 13th, 2002, 12:55 PM
Okay, I haven't tested it but I have a feeling it might work :-)

http://www.girder.nl/downloadn.php?Link=406

this plugin routes the events that windows sends into the Girder event system, so you'll have to react to these events by disabling the devices (for example IRMAN) that the other instance of Girder is going to open.

We probably need a little delay before opening the comport in the other session that is 'connecting' but for now this is a test if this actually sends events...

Ron
October 13th, 2002, 12:55 PM
Just verified the plugin, it works. Have fun with it.

Ron
October 13th, 2002, 12:55 PM
yes disable the hardware in the instance of girder that is swapped out. enable the hardware in the instance of girder that is being swapped in.

Ron
October 13th, 2002, 12:55 PM
Under winxp with the plugin enabled and the plugins enabled ( green light ) this plugin sends CONSOLE_CONNECT or something similar ( don't remember exactly, don't feel like starting WinXP again, just enable Mark's logger to see it in action. ).

To actually disable a device you'll first need to look up the device number, that can be done on the plugin page of the settings dialog.

Secondly you'll need to create a command with that actiontype :
"Enable Device" from the girder tab. Fill in the device number in the "Icon/Device" box and learn the correct event... ( this might be tricky,.. press lean event and switch out of the session, but how to learn the connect event is harder, letme think. )

Ron
October 13th, 2002, 12:55 PM
Great that it worked, I was a little afraid it might be problematic with timing,.. the second instance of Girder waking up to early and not being able to grab the comport, that kinda stuff. Would you like to share that part of the gml share with us ?

Mark F
October 13th, 2002, 12:55 PM
How does Girder know that a copy of Girder is already running? Does it use any of the things in the global namespace that would be seen across the different user sessions? Just wondering. :)

theye
October 13th, 2002, 12:55 PM
Hi,

Has anyone been successful at getting Girder to work properly in Windows XP using Fast User switching for already logged in users? I can't seem to find a way to run a command before and after switching users so I can kill the Girder process for the other logged in user and then run it for the current user and have it work because the com port is freed. There is another remote control util out there that automatically disables the remote when switching users. I wish Girder would do this since it's the better of the two. Only thing I found is:

http://msdn.microsoft.com/library/en-us/dnwxp/html/winxpfus.asp?frame=true#winxpfus_switching

The section under "Windows Session Switching".

"Applications that access the serial port or another shared resource on the computer should check for this. To register for a notification, use the following function, which can be found in Wtsapi32.h"

I guess this requires programing. Not sure if it's even applicable. Thanks.

theye
October 13th, 2002, 12:55 PM
Just curious, did you get XP installed yet?

theye
October 13th, 2002, 12:55 PM
What about just simply having it disable the remote control when switching the user? At least that way we could run another process of it in the other user, maybe it would need to be in two separate directories, have it's own configuration, and maybe even renaming the executable, but at least it still be possible to use fast user switching and have remote control access. Basically, all I'd like is to get the com port free when switching users. This is how the "other" remote control util works. It's not a documented feature because it's a pain to get it up and running under two different users when fast switching. But it's still possible with a little messing around because it disables itself so the com port is free. Just a thought... thanks.

theye
October 13th, 2002, 12:55 PM
That would actually be perfect. ;)

theye
October 13th, 2002, 12:55 PM
When you get to this part in your to do list :-? , will it be mentioned in the history.txt or Latest news section :o ? Thanks! :roll:

PS, Is that Topic review section on the post reply pages new? Looks nice. 8)

theye
October 13th, 2002, 12:55 PM
I noticed you added this functionality (allowing Girder to run in two XP sessions) in the latest pre release. Thanks a lot! :)

theye
October 13th, 2002, 12:55 PM
Is anyone currently working on this possible plugin?

theye
October 13th, 2002, 12:55 PM
Hi all.. nothing to read here, move on.

theye
October 13th, 2002, 12:55 PM
Hmm. :x Wasn't trying to stir up anything. Sorry you took it the wrong way. First, it's not really much competition since one is shareware and the other is not. Second, I only supplied this information as an alternative solution for users that desire this functionality, not as a comeback to you. It just seems that this may not happen with Girder. As much as I (and probably most other users) would prefer Girder over the other, it may not be an option if you require this functionally and wouldn't mind settling for less.

theye
October 13th, 2002, 12:55 PM
Since, after all, you did write the modification to prepare Girder for XP Fast User switching, my previous post was based on impatience and just plain being obnoxious. I'll wait it out and I recommend others to do so as well. The alternative (which I deleted the post with info on) isn't worth it anyway. It is shareware and not even close to the capability and functionality that Girder has to offer. Once again, my apologies with the deepest respect towards authors who believe in keeping it free. :wink:

theye
October 13th, 2002, 12:55 PM
Thanks for all the work you put into this.

I must be doing something wrong, but I can't get this to work. What are we supposed to do after we have the plugin enabled? I tried creating all sorts of commands, event strings, etc. Perhaps all my attempts were all on the wrong track. The second instance of Girder in the other session will not accept any commands. Is the hardware device supposed to be disabled in the second instance? As you can tell, I'm pretty lost. Just a general description of how it needs to be setup would be appreciated. Thanks.

theye
October 13th, 2002, 12:55 PM
I guess my question would be how do you disable the device? Is there supposed to be some kind of event like OnFUout, OnFUIn? I don't see this anywhere with the plugin enabled. :\

theye
October 13th, 2002, 12:55 PM
Thanks, that info was very helpful. Here is what I did (plus some of what RonB explained) to get it to fully work for anyone that would like to know:

With the Session Switch and remote hardware plugins enabled,

I added a new Girder command, "Disable Device" with "Icon/Device" being the device number obtained from the Settings/Plugins section for your remote hardware.

For the new command, clicked "Learn Event" button then switched out of XP to the logon screen. Switched back and it learned an event called "SESSION_LOCK" (above the event string section it should say "Session Switch").

Then I copied the entire command and pasted it as a new one. So now there are two identical. I changed the second ones command to "Enable Device" instead of disable and put the same device number as the first.

Then after File/Saving, I edited the .GML file with a text editor and changed the first instance (disable device) of "SESSION_LOCK" to "CONSOLE_DISCONNECT" and the second instance (enable device) to "CONSOLE_CONNECT".

Save the file then quit and restart Girder. Everything works great. When you switch to another user, the first instance of Girder gets the CONSOLE_DISCONNECT and disables the remote hardware plugin so the second instance of Girder in the new session starts the hardware fine. When you switch back to the first instance, it gets the CONSOLE_CONNECT and enables the remote hardware plugin while the other instance gets a CONSOLE_DISCONNECT and so on..

Thanks for all the work RonB. Very much appreciated.

theye
October 13th, 2002, 12:55 PM
The timing seems to work out good. I suppose if someone has a really super fast machine and it doesn't disable it in time, they could theoretically add a command with the SESSION_LOCK event string and have it disable it there. That way it would disable as soon as they switch before they login to another user. But chances of this being necessary are probably uncommon since it appears that Girder (on the first instance) receives the CONSOLE_DISCONNECT as soon as you login to the other user, before everything else is loaded including Girder.

I sent you off an email with a GML file with the two commands to disable and enable.

Phat Phreddy
October 13th, 2002, 12:55 PM
Sure...

Drop me your mailing address via email (perhaps we should have that beer after all)...

PP

BTW if you ever want to see Girder in action with the HTPC on a 100' screen etc the door is open..

dmets
October 13th, 2002, 12:55 PM
This might sound stupid, but why not simply install Girder as a service? Then any user could access it. It seems like the 'best' way to do it, may not be the easiest but at least it would be able to accept input from any user. I could be way off and frankly I have been doing remodeling recently so i am not up to date on Girder and the new version may infact already install as a service. If so - I appologize.

Dustin

Nandu
October 13th, 2002, 12:55 PM
Thanks to both of you. This was the only function missing from my setup. :D