Control Your Mac from Afar
by Harold Martin09/19/2003
There are many different ways to control your Mac -- even when you're not sitting at it. You might think that this level of flexibility would require special software. But no! If you're running Mac OS X, you'll be able to accomplish everything in this article without buying a single piece of software. As a bonus, you can also perform most of these tricks on the Mac you're sitting at right now. (Even though that wouldn't actually be remote controlling, now would it?)
The Tools We'll Use
ssh
ssh is the Secure SHell. It and its accompanying programs allow you
to securely log in and copy files to other computers running an ssh server.
The target Mac must have OS X's built-in ssh server enabled. You can
do this by checking "Remote Login" in the "Services" tab in the "Sharing"
System Preference pane. ssh is the "remote" part in "remote control:" we use ssh to log in to
the Mac that we want to control, and then use the other technologies
we'll talk about below to do the actual controlling. The computer you'll
use to control the target Mac should have an ssh client. Most types of UNIX
(including OS X) come with an ssh client, and clients are available
on just about every other platform, including Windows and OS 9. If you're
interested in learning more about ssh, I recommend SSH,
The Secure Shell: The Definitive Guide.
Built-In Commands
On top of the normal UNIX commands we'll use, Mac OS X has a couple of extra ones that will be particularly helpful to us:openis a command that can open a file, directory, application, or URL from the command line, just as if it was double-clicked in the Finder.screencaptureis a program that (surprise, surprise) takes a screen shot of what is on the computer's screen.
AppleScript
|
Session by Gordon Meyer:
Upgrade your digital life to include your house and living environment--controlling lights, temperature, music, and more--all from your Mac. We'll start with the basics of controlling lighting and other physical objects, then graduate to true automation which turns your home into a living entity that responds to, and anticipates, your needs. O'Reilly
Mac OS X Conference |
AppleScript, as you probably know, can be used to control almost everything
on your Mac (now even more so, with GUI
Scripting). You can run AppleScripts from the command line with
osascript scriptname. You can also write scripts
on the fly with osascript -e 'line 1' -e 'line 2'. This
is an amazing tool that we'll use a lot.
cron
We'll use cron to run AppleScripts and commands automatically at set
times.
Remember ...
In order for open, screencapture, or osascript to work over ssh, you
must have either ssh'd in as the user currently running, or you must
run them with sudo. In other words, if user Alice is logged
in at the actual machine and you ssh in as Bob, you would need to run
sudo open file if you wanted file to appear
on Alice's screen. On the other hand, if you logged in as Alice, you
would only have to run open file. Keep this in mind; it's
tripped me up before.
Let's Do It!
Now that you've got your tools in order, I'll walk you through a few tricks to get you started with remote-controlling magic. Well, it's not really magic -- just some good old-fashioned UNIX and Apple technologies.
Logging In
In OS X, open up Terminal and type:
ssh username@target's IP
Replacing the target's IP and the username you use on the target, as appropriate.
If you're using a non-UNIX ssh client, check its documentation for instructions
on logging in.
After a successful login, you'll get a command prompt from which you'll execute the tricks below!
Seeing What the Target Is Doing
To start, go to the prompt and enter:top
You'll see what processes are running, sorted by CPU usage. The processes
whose names end in .app are OS X applications. If you want
to see just the applications, enter:
ps -aux | grep '.app'
ps will list all processes, and grep will display
all of the lines that contain ".app".
Now, if you want to see exactly what the other computer is up to, you could enter:
screencapture -x ~/screen.pdf
This will take a screenshot (without the "camera click" sound) that will
be saved to the file screen.pdf. But how do you view it? By using scp
to copy the screenshot to your computer! If you're still in your ssh
session, you should type:
scp ~/screen.pdf yourusername@yourIP:
substituting your username and IP. Be sure to have the ":" at the end,
otherwise scp won't recognize that you want to copy to
another computer.
An alternate way to get the screenshot is to exit your ssh session and,
at your local prompt, type:
scp otherusername@target's IP:screen.pdf screen.pdf
Again, substitute the correct IP and username.
Either way, you'll end up with the screenshot file screen.pdf in your home directory, which you can look at and see exactly what the other computer was doing!
Communicating With the User of the Other Computer
Now, what if you want to say something to the person using the other
computer? To do this, we'll use the dynamic duo of ssh and osascript.
Logged in over ssh, you can enter:
sudo osascript -e 'tell app "Finder" to activate' -e 'tell app "Finder"
to display dialog "I see you!"'
All that this does is run a two-line (two -es) script that activates
the Finder (which is necessary in order for the dialog to have some
place to appear) and then displays the dialog. You can use any AppleScript
you want, and you can also get the results of what the user on the target
Mac did. For example you could use something like this to let the user
talk back to you:
sudo osascript -e 'tell app "Finder" to activate' -e 'tell app "Finder"
to display dialog "What would you like to say?" default answer ""'
|
|
In the text printed out over the ssh session, you will see a line like
"text returned:Hi!, button returned:OK". The text returned will be what
the user typed back.
But what if you actually wanted to talk to the user, with a voice? You would enter this:
sudo osascript -e 'say "Now I can watch you and talk to you"'
A couple of notes, though: I've sometimes had problems using speech with sudo,
so you might also want to try this without sudo. Also keep in mind that this
will have no effect if the target Mac is muted. You might want to use say
and display dialog for maximum effect!
Closing and Opening Applications
Think back to the discussion of seeing what the target Mac is doing.
What if you see an application that you want to close? From the listing you
get from ps -aux, you can get an application's process
ID (PID). You can then take that PID and pass it to the kill command:
kill PID
I've found this to be particularly useful when an application won't quit
(even with force quit) or when it's in fullscreen mode (like a game).
I can just log in from another machine and quit the wayward app, then
get back to work. If something freezes so bad that normal kill won't,
well, kill it (a rarity) then you can use "super" kill:
kill -9 PID
The only problem with killing an app is that it will immediately
close down, giving the user no chance to save any open documents first.
What if you would like to close down the application in a kinder manner?
AppleScript to the rescue! You can quit TextEdit and still allow the
user to save his changes by entering:
osascript -e 'tell app "TextEdit" to quit'
Be careful, though; if TextEdit isn't already open, then this script will
cause it to open and then quit. Use ps to make sure TextEdit
(or whatever application) is open in the first place. Also keep in mind
that the user can simply click the Cancel button to keep the app from
quitting.
Shutting Down or Rebooting
Suppose you want to shut down or reboot the computer. As before, there's the immediate UNIX way and the kinder (but user-cancelable) AppleScript way. The command-line way to shut down is:
sudo shutdown -h now
This will close your ssh session and shut down the computer, regardless
of any apps or documents that may be open. To reboot, simply enter:
sudo reboot
Again, this will close everything down without mercy. To give the user a chance to save what they're doing (and yes, to cancel the shutdown) you can type:
osascript -e 'tell app "Finder" to shut down'
or
osascript -e 'tell app "Finder" to reboot'
to shut down and reboot, respectively. The only way a user can cancel this is to keep an application open long enough that the shutdown or reboot times out. But at least it won't give the user the "Are you sure you want to shut down your computer now?" dialog!
Using AppleScript GUI Scripting to Control any Application
Apple has released a beta scripting engine, called GUI Scripting, that allows AppleScripts to take full control of any application by directly interacting with its GUI elements (such as menus and buttons). First, download it from Apple's GUI Scripting page. There are also some example GUI scripts there that you should look over. Here is a simple script that puts the computer to sleep, something that can't be accomplished via the Finder's AppleScript dictionary or with regular UNIX commands:
try
tell application "Finder"
activate
end tell
tell application "System Events"
with timeout of 30 seconds
tell process "Finder"
tell menu bar 1
click menu item "Sleep" of menu "Apple"
end tell
end tell
end timeout
end tell
end try
You should save this script it as sleep.scpt, preferably in a hidden directory (such as ~/.applescripts). The next time you log in, you can just enter:
osascript .applescript/sleep.scpt
though putting the computer to sleep will freeze your ssh session.
GUI Scripting will probably end up being one of the most useful tools in your toolbox, as what you can accomplish with it is (nearly) infinite, at least as far as controlling your Mac goes.
Automating Your Remote Control
Now that we've covered how to use a variety of UNIX commands and AppleScripts to control your Mac, there's only one major obstacle left to complete control: you have to be at a computer to do the controlling. Wouldn't it be nice if you could tell your Mac to take control of certain things at certain times?
Enter cron, the age-old UNIX command-scheduling tool. If
you don't know how to use cron, you should read this
tutorial or Chris Stone's "Learning
the Terminal in Jaguar." Don't worry, cron is actually
quite simple.
Since you can't be sure which user (in any) will be logged on when the
cron job runs, you have to edit root's crontab.
With that in mind, you can grab your favorite UNIX text editor, run it
as sudo, and edit /etc/crontab; or, you can use a GUI tool like CronniX.
The only difference between CronniX and /etc/crontab is that in CronniX
you don't use the who field. If you choose to use CronniX,
you open root's crontab by clicking Open and typing in root
for the username.
* * * * * root sudo osascript -e
'tell app "Finder" to activate' -e 'tell app "Finder" to display
dialog current date as string'
Though of course, you would never put that in your crontab, since it would drive you as well as all of your users crazy
Full Remote GUI Control
Finally, if you want complete control over the GUI, there's VNC. VNC allows you to open a window that shows the exact the desktop of the other computer, so you can move the other user's mouse, type in their dialog boxes, and otherwise annoy them. OSXvnc and Chicken of the VNC are my favorite server and client, respectively. After launching your VNC server, you can use any computer that has VNC client to log in and do your remote controlling. The biggest downside to VNC (and the reason it is not covered more extensively here) is that it is totally interactive and is difficult (if not impossible) to automate.
|
|
exit
You're well on your way to automating and controlling your Mac. Using both old and new tools, you should be able to use your Mac whether you're sitting in front of it, on another computer, or letting it execute timed tasks itself. Read sites like Mac OS X Hints and O'Reilly Hacks (and their books Mac OS X Hints: Jaguar Edition and Mac OS X Hacks) to find more tricks you can use.
With all the possibilities, I'll be excited to see what you come up with. Post your experiences and ideas in the Talkback section below!
Harold Martin is a freelance software developer and author. Visit him at his blog.
Return to the Mac DevCenter
Showing messages 1 through 50 of 50.
-
Great article, but there's a better downside to VNC
2003-09-19 19:18:51 csoto [Reply | View]
-
Great article, but there's a better downside to VNC
2003-09-20 19:01:24 anonymous2 [Reply | View]
Charles --
Please, would you write that article,
so that we can all learn to tunnel --
Pick it up, right from here. and, in
the same style and 'weight'.
please?
-
Great article, but there's a better downside to VNC
2003-09-22 14:44:20 csoto [Reply | View]
I'm pretty sure there's an article somewhere on tunneling using SSH. I'll look and post the URL of what I find.
OK. Found one, right here on Oranet:
http://www.oreillynet.com/pub/a/wireless/2001/02/23/wep.html
Simply follow the instructions, but instead of connecting via VNC to the remote host, connect to localhost, on the port that you have forwarded. The VNC team has a "Making VNC more secure with SSH" page at:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
SSH is super useful. I just hope Apple gets off their tuckus and patches the current vulnerability!
Charles
-
Great article, but there's a better downside to VNC
2003-09-23 15:57:09 tychay [Reply | View]
Actually Apple has patched the current portable OpenSSH vulnerability with 10.2.8 <http://archives:archives@lists.apple.com/mhonarc/security-announce/msg00035.html> which means that no G3 or G4 Mac OS X is vulnerable to it (I don't know about the G5 and if such a patch was rolled into 10.2.7). Given the recent news about it, I find it hard to state that Apple was ever one "their tuckus" about this patch. ;)
Note that Apple has pulled the updater because some users are losing their internet connection after running it. I didn't have any problems but I imagine you can check it tomorrow.
Take care,
terry -
VNC via SSH
2003-09-23 15:48:49 tychay [Reply | View]
Here are two .command scripts that will start and stop your an SSH VNC tunnel:
#!/bin/sh
USERNAME=<username on remote machine>
HOSTNAME=<ip address of remote machine>
BINDPORT=<local port to bind to: VNC # + 5900>
VNCPORT=<remote port to bind to: VNC # + 5900>
VNCSESSION=<path to VNCSession file>
ssh -c blowfish -l $USERNAME $HOSTNAME -L $BINDPORT:localhost:$VNCPORT -f -N
open $VNCSESSION
Obviously you have to customize the first part. The first VNC port is the bind port you have on your VNC client (for instance 1->5901 and you are binding to localhost:5901 in your VNC session file. The first line contains the syntax to set up the tunnel and the secibd line opens your VNC session file that is bound to localhost:6901--NOTE: I use VNCDimension not ChickenOfTheVNC so YMMV! Note also that this does not start the VNCServer running on the remote computer/Mac. You have to use OSXvnc or "Share My Desktop" to do that and there is the caveat that if you logout of VNC your session is killed and needs to be restarted! Note also that this script isn't automated since it will ask you for a password (your password on the remote machine). To fix this you have to follow a hint which I won't give (it's in the OReilly Mac OS X hacks book as many other places) and use an SSH keychain tool. For the cheap among you, do a lookup of "ssh-agent" and Mac clients for it as well as passwordless ssh login for tutorials on the web.
To close the script down....
#!/bin/sh
BINDPORT=<local port to bind to: VNC # + 5900>
VNCPORT=<remote port to bind to: VNC # + 5900>
for X in `ps xww | grep $BINDPORT:localhost:$VNCPORT | grep -v grep | awk '{ print $1 }'`; do
kill $X;
done
This will destroy your tunnel but it leaves the VNC server running on the remote machine.
Write these as text files with the name "start.command" and "stop.command" (or whatever) and then turn on executable (with get info) and double click. Obviously with AppleScript Studio and the AppleScript basics provided in this article, you can roll your own interface. :)
Note, I should mention that on LANs this is not much of an issue. VNC uses a challenge/response password verification system that will protect the password from being hacked so the only thing you are transmitting out in the open are the VNC controls.
Take care and happy hacking,
terry -
VNC via SSH
2003-09-28 10:52:10 anonymous2 [Reply | View]
Here's another, perhaps easier way:
Type in terminal this one line, for VNC thru SSH:
ssh user@22.66.111.88 -L 15901:localhost:5901
then open vnc and connect to localhost:5901
:)
and reverse SSH tunelling, open from inside then connect from outside back in
ssh -l user 22.66.44.111 -R 15902:127.0.0.1:5902 sleep 900000
check out:
http://www.afp548.com/
-mr.x -
Great article, but there's a better downside to VNC
2004-01-13 22:58:48 anonymous2 [Reply | View]
There's a great GUI app for OSX for SSH Tunnels:
SSH Tunnel Manager
http://www.versiontracker.com/dyn/moreinfo/macosx/16840
i wrote an ariticle about using ssh tunnels to secure email (pop and smtp):
http://www.macosxhints.com/article.php?story=20030721022245232
-
PPP
2003-09-19 23:42:33 anonymous2 [Reply | View]
How could one manage a modem PPP link using these techniques? I've scripted Internet Connect, but it only seems to work when a user is logged into the remote Mac. Is there a pure Unix solution?
-
ssh ...
2003-09-20 00:02:57 anonymous2 [Reply | View]
how can you put such an article online, not mentioning that, the actual ssh-daemon-implementation (20.09.03) might be vulnerable to a remote exploit ...
wating for an security update by apple ...
see also: http://lists.netsys.com/pipermail/full-disclosure/2003-September/thread.html#10103
-
sleep
2003-09-20 01:39:16 anonymous2 [Reply | View]
Nice article, but I have one minor nit to pick. Actually there is no reason why you cannot remotely sleep the computer by typing osascript -e 'tell application "Finder" to sleep' . No need to use GUI scripting, even though I agree it's pretty cool.
-
copying screenshots between computers
2003-09-20 04:23:31 anonymous2 [Reply | View]
I've got access to the remote machine and most commands work fine (great instructions - thanks!) but when I try to copy the screenshots between machines I get the following message:
scp ~/screen.pdf myshortusername@myIP:
ssh: connect to address remoteIP port 22: Operation timed out
lost connection
Non-standard rules in my firewall were preventing access initially, but I've now set them to the apple defaults and have allowed ftp on both machines - is there something else I need to do to make it possible to transfer files between the computers? This is just a local network I'm testing on, with the connection running through a router.
-
Excellent Article !!
2003-09-20 13:16:18 GarethMcClure [Reply | View]
I have a small LAN setup at home, comprising of my lovely iMac (OS X) and a windows box running XP.
Using Putty <http://www.chiark.greenend.org.uk/~sgtatham/putty/>, a freeware implementation of Telnet and SSH for Win32 platforms (an SSH client).
I was able to work through this great article and control my mac remotely from the windows box. Thanks for this really great article !!
-
Wake on LAN
2003-09-21 10:32:15 anonymous2 [Reply | View]
Great article. I was expecting to see something about waking up a sleeping computer, though. This is something I've been struggling with on my home network: how to wake my sleeping iMac (17" 1gHz) from my powerbook (G4 667), through a router (Netgear MR814). I've worked through the suggestions on macosxhints.com including python and perl scripts. I've also tried utilities like Wake550. Nothing seems to work! My iMac just doesn't seem to pay any attention to those "magic" packets. Any ideas?
Thanks, Mark -
Wake on LAN
2003-09-25 07:42:35 anonymous2 [Reply | View]
I have a similar problem -- I would love to wake up my iMac from my a portable, because that's where my shared printer is. Haven't had any luck. -
Wake on LAN
2003-09-27 08:41:20 anonymous2 [Reply | View]
There is a setting in the Energy Control Panel that allows for network access when the machine is asleep.. open the energy preference and click the options tab........not button.
second line down has a button to check for "Wake for Network Administrator Access"
I do not see how this would not solve your problem -
Wake on LAN
2003-09-30 18:43:56 anonymous2 [Reply | View]
You're trying to send the magic packet from one wired Mac to another, right? Magic packets are broadcast (which is why you have to specify the remote computer by hardware (aka MAC) address rather than by ip) and broadcasts are limited to a single network. The wired ports on the router and the wireless network are separate networks so you can't send magic packets from one to the other.
I haven't used WoL with Macs but I have with PCs. I use the perl script, "wakeonlan" for that purpose. gsd.di.uminho.pt/jpo/software/wakeonlan/ -
Wake on LAN
2003-10-03 10:46:47 anonymous2 [Reply | View]
Uh, I think I have some egg on my face! Unless it is possible that my iMac's MAC address has somehow changed on its own recently :-/, it would appear I've been using the wrong one all this time. Strange since I've tried 4 different WoL methods on different occasions and in all of them used the wrong MAC address (although consistently the same wrong one)! Anyhow, thanks to those of you offering help - it would appear I was beyond help :-O.
A new question. Can anyone here tell me why the following python script will only wake a computer if it has been sleeping for less than about 5mins? All other methods (Wake550, WakeUp, and a Perl script "wakeonlan") successfully wake my iMac regardless of how long it has been asleep. Seems strange that the python script would be time dependent!
#!/usr/bin/env python
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto('\xff'*6+'\x##\x##\x##\x##\x##\x##'*16, ('192.168.0.3', 80))
where # symbols replace the computer's MAC address
Mark
-
ps
2003-09-21 18:48:29 anonymous2 [Reply | View]
If you really want to find all the processes that invoke applications (well, those that end in ".app") you'll need to use the -ww flags to ps. Otherwise long application paths aren't going to show under a simple ps -aux invocation. That is, the command in the article should be something like
% ps -wwaux | grep ".app"
Cheers,
Paul
-
Talk
2003-09-22 10:27:20 bizard [Reply | View]
Although the chat method you cited was novel, it would be rather difficult to carry on a decent conversation using the applescripts and dialogs. You could, however, use the dialog box to say 'Open the terminal and talk to me.'
Of course, I just tried this to make sure it worked before posting and it seems that I have a problem with my terminal settings and it doesn't work. Anyway, if someone feels like explaining how to get 'talk' (an old unix chat program) it is a nice way to communicate with another logged in command line user. -
Talk
2003-09-24 20:01:06 Harold Martin | [Reply | View]
You might want to look at:
http://fink.sourceforge.net/pdb/package.php/ytalk
-
can't get screenshot
2003-09-24 11:56:53 network23 [Reply | View]
This is the second article I've seen on how to get the screenshot of a remote machine and the second time I've tried it and failed. I get this error message...
kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
screencapture: failed to make a connection to the windowserver
Any ideas? Firewall issue? I don't know.
-
Remember...
2003-09-24 19:59:02 Harold Martin | [Reply | View]
In order for open, screencapture, or osascript to work over ssh, you must have either ssh'd in as the user currently running, or you must run them with sudo.
-
http://www.codon4.com
2003-09-27 08:09:05 anonymous2 [Reply | View]
well, if you've ever heard of http://www.codon4.com then you knew about this A LONG time ago... -
http://www.codon4.com
2004-03-16 07:00:11 wheeles [Reply | View]
Well, if they hadn't got one of the most unreadable colour scheme/font size combinations ever seen, then maybe we would all have found out A LONG time ago...
Dark grey text on a slightly lighter dark grey background using a tiny font?
Gimme a break!
-
Wake on LAN
2003-10-01 01:20:04 anonymous2 [Reply | View]
I had a similar problem with a mac, whereby it would wake on lan when I had put it to sleep with the sleep menu item in the apple menu, but if it went into a sleep itself (from idle time) then it would not wake on lan.
I sent the wake on lan packet to the ethernet address as others describe here.
Not sure why this was. I just leave it on all the time now and I don't have to worry.
-
Does it to Aqua forwarding?
2003-10-02 10:39:10 anonymous2 [Reply | View]
What would be REALLY cool is if Apple supported aqua forwarding--similiar to X-forwarding over SSH. Here's what I envision: log in from a Mac(client) via SSH to a Mac(server), and then lauch an app and have the windows for that app only show up on the client machine. Currently you can launch an app from the client machine, but it only shows up on the server, not the client. Is there any way to do this, besides VNC, which does the whole screen?
-
SSH into LAN'd Mac?
2003-10-06 00:11:11 anonymous2 [Reply | View]
I've got my Macs on a router sharing an IP. How do you log in to one of these? Would it just be logging in to the IP given to the router by the DHCP, but since you are going into a user, it knows where to go? I think not? Could do manual IPs on the systems but those are private, so how would one go to the main address, then choose which local private addy to go into? I'm thinking doing a DYNDNS setup that updates upon IP change, but that's still only going as deep as the router. Would you have to port forward? And if so, can that only be to one machine, not multiples?
thanks for any info,
No clue -
SSH into LAN'd Mac?
2003-10-14 07:28:09 anonymous2 [Reply | View]
I'm assuming here that your LAN Macs all have IPs in the range 192.168.1.x (or in the Class A or B range reserved for private use). If you're not doing this already, you probably should be.
If that is the case, you can't directly access the target machine anyway.
What you need to do is to get your router/firewall to forward requests to port 22 to a specific machine. This needn't be the target machine as you can always SSH from there to the target machine inside the LAN.
You'll need to ensure that all the LAN machines that you might want to target have static IPs. You'd then set the router to port-forward requests onto one of them (referred to below as the primary target).
To operate, you'd just dossh foo.dyndns.orgwhich will land you inside your network on the primary target, from which you can SSH to your actual target as necessary.
It's *exactly* the setup I use (with dyndns) to log into home and collect mail with pine. -
SSH into LAN'd Mac?
2004-01-07 17:15:29 anonymous2 [Reply | View]
there is also another way to get this working.
many ssh-clients let you configure the port to use
on the router you have to configure nat (or better pat) to translate the ip adress to the one of your target machine and the destination port of your target machine.
this setup is a bit more work to do but it reduces network trafic in the target LAN
this setup can even be used to connect to multiple vnc servers on a LAN behind a router with an acceptable amount of network traffic
by the way -
for the sake of security its a good idea to use ports different from the well-known ports to confuse crackers ;-)
-
deja vu!
2003-10-27 05:44:00 d_vaught [Reply | View]
MMM...seen that repeating VNC picture somewhere before (love the caption).
Anyone have a clue what I'm doing wrong? -
deja vu!
2003-10-27 06:50:52 Harold Martin | [Reply | View]
What do you want to know if you're doing wrong?
Harold -
vu ja de!
2003-10-27 12:39:16 d_vaught [Reply | View]
In your article you included a picture at the bottom which looks exactly like what I got when trying to remotely login to my machine at work using osXVNC server and connectiong through an SSH tunnel using Chicken of the VNC...the one with the never-ending cascading windows.
I basically want to get it to work, and write a script to somewhat automate the process. I know I tunneled in correctly, because I got that output, but I gots no idea on how to go on from there.
Any suggestions and I'd be mighty obliged.
Doug -
vu ja de!
2003-10-28 14:01:45 Harold Martin | [Reply | View]
You can create the cascading windows by running a VNC server and then on the same machine connecting to it with a VNC client.
Harold -
vu ja de!
2003-10-30 12:02:57 d_vaught [Reply | View]
I see I didn't make myself absolutely clear. I am running as VNC server on my machine at work. When I try to connect to it through an SSH tunnel via my laptop I get the cascading windows.
It would be infinitely more useful if I could actually control my machine at work instead of kicking back with a beer to watch my new cascading screensaver.
In other words, any ideas what I must be doing wrong to get the cascading desktop from a remote machine?
doug
-
the basics
2003-10-28 13:24:31 anonymous2 [Reply | View]
I tried this today (connecting to myself) with the [sudo osascript -e 'tell app...] command. I'm very new to applescripting and mac's in general... Do the -e's actually represent carriage returns? And are you supposed to write out "application" and not use "app". Needless to say, I had trouble. I connected to myself, but the commands wouldn't work. I'll try experimenting more later. Thanks for any help. -
the basics
2003-10-28 14:04:31 Harold Martin | [Reply | View]
If you want to use these tricks on your own machine, there's no need to connect to yourself. Just enter the commands at your local prompt.
The '-e's are interpeted as "the next line".
Both app and application should work. If in doubt just copy and paste the examples from this article.
Harold
-
Router ... vulnerable?
2003-10-28 13:27:20 anonymous2 [Reply | View]
Hi, my friend today said that our school's router is has port 22 open for SSH. I can barely remember what she said. Something about a Denial of Service attack (don't even know what that is) would make it shut down. Could this happen or is she all talk?
-
You can also use Eggplant
2003-10-30 14:32:59 anonymous2 [Reply | View]
It is a more expensive solution, but it also works much better.
http://www.redstonesoftware.com
Redstone is also the maintainer of OSXvnc.
Then you have HyperTalk-like scripting built into Eggplant.
Jim
-
Instead of using applscript to talk...
2004-10-19 12:27:33 maymay [Reply | View]
You can just use the Mac's built-in say command.
say "Listen to me talk to you."
instead of
sudo osascript -e 'say "Listen to me talk to you."'
Both commands have the same effect.
-
Password Problems
2004-11-20 09:08:49 z_coil [Reply | View]
Whenever I try to log on through ssh it asks for the password but then rejects it saying "Permission denied, please try again." 2 times and then says "Permission denied (gssapi,publickey,password,keyboard-interactive)." What am I doing wrong?








Charles