Forum: Ruby on Rails Computer Name

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
15977b0a3b7e270bf3d1baaadfb79a59?d=identicon&s=25 Lantis Sephiro (lantis)
on 2006-04-10 00:01
How to get the name of the computer accessing the application? I mean
the computer   the user use to access the application.

Thanks,

Lantis.
9d7d8ef2179661d6b30e180fa588cd45?d=identicon&s=25 Calle Dybedahl (Guest)
on 2006-04-10 06:39
(Received via mailing list)
>>>>> "Lantis" == Lantis Sephiro <semutluthu@yahoo.com> writes:

> How to get the name of the computer accessing the application? I mean
> the computer   the user use to access the application.

Generally speaking you don't, because there is no such thing as _the_
name of a computer. What are you really after?
--
		     Calle Dybedahl <calle@cyberpomo.com>
		 http://www.livejournal.com/users/cdybedahl/
       "Facts are for people with weak opinions." -- Lars Willför, I]M
15977b0a3b7e270bf3d1baaadfb79a59?d=identicon&s=25 Lantis Sephiro (lantis)
on 2006-04-10 16:38
Calle Dybedahl wrote:
>>>>>> "Lantis" == Lantis Sephiro <semutluthu@yahoo.com> writes:
>
>> How to get the name of the computer accessing the application? I mean
>> the computer   the user use to access the application.
>
> Generally speaking you don't, because there is no such thing as _the_
> name of a computer. What are you really after?
> --
> 		     Calle Dybedahl <calle@cyberpomo.com>
> 		 http://www.livejournal.com/users/cdybedahl/
>        "Facts are for people with weak opinions." -- Lars Willf�r, I]M

I am developing some sort of web-based problem reporting system. If
someone has a problem with a software, he will log on to the system and
reports the problem. I want the system to get the computer name used to
log the problem. In windows, right click my computer and click the
computer name tab. The computer name i want to get is the full computer
name; in my case is lantis-same.

Thanks,

Lantis.
15977b0a3b7e270bf3d1baaadfb79a59?d=identicon&s=25 Lantis Sephiro (lantis)
on 2006-04-10 16:39
I forgot to add that the system is going to be used in windows
environment only.

Lantis.
F734b6ca0eb2ebd01744224437a72498?d=identicon&s=25 Harm de Laat (Guest)
on 2006-04-10 16:52
(Received via mailing list)
I don't think you can do this.
It might be possible by using some VBScript / ActiveX component.
However,
this would require the user to allow Active X components.
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-04-10 17:44
(Received via mailing list)
Recording the ip address of the computer the request is coming from
should be sufficient, provided they are fixed IP addresses.


On Monday, April 10, 2006, at 4:50 PM, Harm de Laat wrote:
>> Lantis.
>
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
>


_Kevin
9d7d8ef2179661d6b30e180fa588cd45?d=identicon&s=25 Calle Dybedahl (Guest)
on 2006-04-10 19:35
(Received via mailing list)
>>>>> "Lantis" == Lantis Sephiro <semutluthu@yahoo.com> writes:

> If someone has a problem with a software, he will log on to the
> system and reports the problem. I want the system to get the
> computer name used to log the problem. In windows, right click my
> computer and click the computer name tab.

There is nothing in standard web communication that will give you
that. You can either log the IP adress of the incoming connection (and
its reverse DNS, if there is one), or you can start investigating
Windows-specific solutions.
--
		     Calle Dybedahl <calle@cyberpomo.com>
		 http://www.livejournal.com/users/cdybedahl/
   "Do any churches offer gluten-free body of christ? Just in case some
of
  their flock have problems digesting their saviour?" -- Rob Blake,
BofhNet
6783a6831dbd3839a1f03b0f416c2c6f?d=identicon&s=25 Ian Harding (Guest)
on 2006-04-10 21:13
(Received via mailing list)
nbtstat -A <ip address> | grep <03> | cut -f1 -d" "

if you are using windows and have grep and sed.  There are windowy
ways of greping and cuting too.

>From inside RoR I have to assume there is some way to execute shell
commands.  It's not pretty, but your only choice in this case I think

Alternatively, you could have a scheduled process run through all your
sessions and look up computer names in the background and update a
table in the database with them.

This is perishable data due to DHCP and user hijinx.

- Ian
15977b0a3b7e270bf3d1baaadfb79a59?d=identicon&s=25 Lantis Sephiro (lantis)
on 2006-04-11 00:00
I'll give it a shot. Thanks for the help.
This topic is locked and can not be replied to.