2

On linux distributions one can simply press the following keys in order to access the shell:

  • Ctrl+Alt+F2
  • Ctrl+Alt+F7 to exit and return to the GUI.

Is there a similar capability in OS X that would let me access a terminal when my interactive desktop session is no longer responsive?

If anyone wants to know why, read below

I have a reason for needing this, and mainly because I killed the wrong process id, which in term ended the launchd daemon. As now I couldn't run Terminal.app, or type in my existing shells I needed to gain access of the main shell (my session is running in) which was active because Spotify still worked! In order to start-up that daemon again to rectify my problem - annoyingly I had to restart which for Unix operating system is ridiculous - ONLY time a linux/unix system need be rebooted is after kernel updates are installed, otherwise it doesn't need to be.

  • Does the system even respond to Option-Command-Escape? – bmike Nov 7 '13 at 22:57
  • I never attempted this, although I doubt it would work. The process i killed was launchd; when I right-clicked icons in my tray, open was not amongst them, before the tray disappeared. – ash Nov 7 '13 at 23:00
1

There hasn't been a console bypass on OSX since 10.0 days, so it's not so much Apple removed it as the feature never passed review for initial implementation. Having such a bypass is a security risk if anyone with physical access to the machine can simply open a shell with a key press or two.

Here's what you can do:

  • You can ssh into your OS since it runs sshd like all unix.
  • You can use a remote management tool like Apple Remote Desktop to issue remote commands as well.

I understand your take on it being a flaw or omission, but it's just not part of the OS X heritage to have a back door to a prompt like linux has implemented.

  • I disagree with the security risk, because on linux when you bypass into shell you had to authenticate, almost like an ssh session but on localhost. Even then you need sudo rights in sudoers to use the sudo command, and without direct root access things are very limited to begin with. – ash Nov 7 '13 at 23:02
  • (damn) couldn't edit the comment - I couldn't ssh because i would need another machine (which i don't have at the moment), even then if iptables blocks sshd that won't help. Really the reboot fixed it, but as a linux guy, I know i could have saved the time by using the cli, so that kinda sucks :( Thanks for the info though :) – ash Nov 7 '13 at 23:10
  • It predates OSX - NeXTStep ran in the same way - so I would guess back to 1988 andit is not really a back door to Linux/other Unicies it is just the GUI management differs – Mark Nov 8 '13 at 0:15
0

What I do for this:

Either:

  • LogMeIn - Full desktop, bit of a pain from an iPhone or iPad, but it works from anywhere, not just local network with no necessary port forwarding, etc.

  • Enable SSH and use a Terminal from your phone. I use Prompt by Panic on my iPhone, it's a nice client. Not free, there are free ones available too. SSH is enabled from the Sharing option in System Preferences. Check Remote Login.

  • VNC - half way between both of the above. Enable VNC on the Mac, and get a VNC client on your phone/iPad/etc.

I use the console option fairly often to kill off run-away processes, etc.

For reference, you can get a console login, but not while a GUI session is active. At the login prompt, if you have it set to type in the username and password, not the selecting from a list option, the username '>console' will take you to a console. Exit takes you back to a login screen. At the console you still need to log in as a user, it's still secure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .