When I log onto my office computer from outside, the computer knows that I am outside and any grapic background for the desk top is deactivated with a black background. This is good because my remote sessions run faster.
The computer somehow knows that it is being accessed remotely. Is there a way that my BR sessions can know the same thing, like through an env$ variable, and I can deactivate some of the graphics that are used in menus or other programs that look nice when running, but slow down remote sessions?
Terminal Services
Moderators: Susan Smith, admin, Gabriel
-
- Posts: 291
- Joined: Fri Jun 19, 2009 9:01 am
- Location: Lawrence, Kansas
- Contact:
Re: Terminal Services
I believe ENV$("SESSIONNAME") should have something in it when your connected.
gtisdale wrote:When I log onto my office computer from outside, the computer knows that I am outside and any grapic background for the desk top is deactivated with a black background. This is good because my remote sessions run faster.
The computer somehow knows that it is being accessed remotely. Is there a way that my BR sessions can know the same thing, like through an env$ variable, and I can deactivate some of the graphics that are used in menus or other programs that look nice when running, but slow down remote sessions?
Steve Koger
Computer Specialist
SEKESC-MACS Division
Computer Specialist
SEKESC-MACS Division
I'll give it some more tests, but I see that env$("SESSIONNAME") returns "Console" when I am directly connected and "RDP-Tcp#2" when connected using terminal services.
For the time being then I'm going to display the graphics only of ENV$("SESSIONNAME")="Console"
This is on a Windows network NOT running client server.
Thank you Steve.
For the time being then I'm going to display the graphics only of ENV$("SESSIONNAME")="Console"
This is on a Windows network NOT running client server.
Thank you Steve.
-
- Posts: 717
- Joined: Sun Aug 10, 2008 4:24 am
- Location: Southern California
I have a function that I use to determine connection speed in my BR programs, and I use it to disable graphics when someone is connected remotely. I use it to test when someone is connected via Client Server over the internet, as opposed to connected via Client Server over the LAN. But because it tests the speed of the connection, it could probably be tweaked to test Remote Desktop connections as well.
Basically I print a blank space to window 0 when BR first launches, and I time how long it takes to preform this print operation. If its less then a 20th of a second (less then .05 of a second), then we assume a fast connection. If it takes longer then that, then we assume a slow connection.
Running on a LAN, print fields generally takes around 1/100th of a second. Running over the internet, it takes around 1/5th of a second or longer.
Not sure how it would play out on terminal services, but it may be useful to someone facing a similar problem down the line so i'm posting it here.
Basically I print a blank space to window 0 when BR first launches, and I time how long it takes to preform this print operation. If its less then a 20th of a second (less then .05 of a second), then we assume a fast connection. If it takes longer then that, then we assume a slow connection.
Running on a LAN, print fields generally takes around 1/100th of a second. Running over the internet, it takes around 1/5th of a second or longer.
Not sure how it would play out on terminal services, but it may be useful to someone facing a similar problem down the line so i'm posting it here.
The TIMER system function measures time that claims to be accurate to four decimal places. I'm pretty sure it shows the number of seconds that have lapsed since the computer was turned on or something.
The code I use is this:
The code I use is this:
Code: Select all
00150 LET STARTTIME=TIMER
00160 PRINT #0, FIELDS "1,1,C 20" : " "
00170 LET TOTALTIME=TIMER-STARTTIME
00180 IF TOTALTIME>.05 THEN ! slow connection
00190 LIBRARY "menu" : FNMENU
00200 LET FNMENU ! Run Fast Rinput Select based menu
00210 EXECUTE "system"
00220 ELSE ! normal connection
00230 LIBRARY "screenio" : FNFM
00240 LET FNFM("menu") ! Run slow graphical menu
00250 EXECUTE "system"
00260 END IF