• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

Java Detect Remote Users

At work, we have two machines that are constantly being used by 7 people who each also have their own workstation. We will remotely connect to one of the two machines to use Bloomberg. I am looking to create an application that runs on each persons workstation as a client program and a server type program to run on the two machines that are shared.

The purpose of the program is to notify which machine has someone connected to it, and who is connected. Also it will display if it is available(no one is connected).

My question here is, how with java can I detect if someone is remotely logged into a machine, and pull their username?

Also, does anyone know a way to display a notification window on a remote machine. basically I am going to have a request button in the client program where you can notify the current person logged in that you request the machine.

We remote in via windows Remote Desktop Connection, which is using Citrix.

Thanks!
0
KOvitt
Asked:
KOvitt
  • 4
  • 3
  • 3
1 Solution
 
colr__Commented:
The architecture doesnt sound quite right here - when you access another machine via RDP there is no way for a java client  on the local machine to know that you are logged in to that other remote machine. Likewise, at the server end there is no way to detect anything other than the username who is logged on at that specific machine.

On the server end you can get the name of the user who is logged on with the following:

System.getProperty("USERNAME")

Open in new window

0
 
colr__Commented:
As for the notification part, you could consider using the built in netsend utility in windows, and calling it from java:

http://www.microsoft.com

This offers a one-way communication, you would maybe need to provide a similar service at the server end to provide an answer to the client.
0
 
KOvittAuthor Commented:
Okkay, well I was thinking that the program I had running on the machine that is being accessed remotely would be able to somehow detect that there is someone remotely accessing it and report that back to the client program running on the users workstations. Does the machine not know that it is being remotely accessed? I thought that the servlet could communicate with its client application.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
colr__Commented:
Yes, a servlet does communicate with a client, but you never mentioned anything about servlets - you said you were using RDP.

If you mean you are using RDP to connect to the server, then on the server connecting to the servlet via the browser on the server (using localhost), then in this case both the client and the server are the same machine - the server you are logging on to with RDP. Is this the setup you mean?
0
 
KOvittAuthor Commented:
Well i am not exactly sure how i would do it yet. I just figured I would have a client program to run on everyones workstation, and a separate program that runs locally on the machines that we remote into. And those programs would communicate with each other.

But all I really need to know is that one the machine that is being remotely accessed(via a java application that is running on that machine), is there a was to detect that someone is connected remotely in java and pull the username or Mac address of who is connected?

0
 
CEHJCommented:
>>We will remotely connect to one of the two machines

What OS are they using?
0
 
KOvittAuthor Commented:
Mostly XP, one of the computers that are remotely accessed is Win7. All but one of the client workstations are xp and the one is Win7
0
 
CEHJCommented:
Perhaps execute a server-side app, perhaps something like http://technet.microsoft.com/en-us/sysinternals/bb897545
0
 
KOvittAuthor Commented:
Perfect, exactly what I was looking for.
Thanks!!
0
 
CEHJCommented:
:)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now