Run Programs from unix

Posted:
in macOS edited January 2014
Is it possible to start up in single user mode, and then login from there, and run applications without showing your desktop and the dock stuff?



I guess you'd probably have to start the windowserver or whatever, but I think it would be kinda cool to have GUI apps on top of the unix background...as a novelty.

Comments

  • Reply 1 of 13
    baumanbauman Posts: 1,248member
    I believe you can do it by logging in as >console, and then launching an X-11 app.



    I've never tried it personally, though.
  • Reply 2 of 13
    You really don't want to do anything but troubleshooting in single user mode.



    And if your question is about Cocoa/Carbon Apps, those need the window server, and that does not come up in single user mode.
  • Reply 3 of 13
    ast3r3xast3r3x Posts: 5,012member
    Quote:

    Originally posted by Karl Kuehn

    You really don't want to do anything but troubleshooting in single user mode.



    And if your question is about Cocoa/Carbon Apps, those need the window server, and that does not come up in single user mode.




    Right, well what is the difference between single user mode and regular start up. I was under the impression I could that single user mode just didn't automatically start up all the other processes that are normally running. So I thought if I started the window server and possible another thing or two that I could use it like a normal machine but with no finder, again no real reason, just as a novelty.
  • Reply 4 of 13
    kickahakickaha Posts: 8,760member
    Nope, single-user is being logged in as root, to boot. Ie, *ZERO* permissions lockouts. You can do *ANYTHING*, including wipe your hard drive with a typo.



    What you're thinking of is console mode.



    At the login screen, if you have text fields to enter name/password, type in >console for the name, and no password. Voila. Then you log in with your normal name/password, but have no Finder.



    If you're in namelist mode in the login screen, hold down Opt-Return and click a name. It should give you the text boxes and you can continue as above.
  • Reply 5 of 13
    pbpb Posts: 4,255member
    Quote:

    Originally posted by Kickaha



    What you're thinking of is console mode.



    At the login screen, if you have text fields to enter name/password, type in >console for the name, and no password. Voila. Then you log in with your normal name/password, but have no Finder.





    Right. But if you have X11 installed, you can run startx with your own .xinitrc file (after log in with your normal name/password) and load your X11 environment. I don't know though how do you get out from there (that is to the login screen).
  • Reply 6 of 13
    Quote:

    Originally posted by PB

    Right. But if you have X11 installed, you can run startx with your own .xinitrc file (after log in with your normal name/password) and load your X11 environment. I don't know though how do you get out from there (that is to the login screen).



    How you get out of it depends on your .xinitrc file.



    If your file looks like this:



    ******BEGIN FILE***********

    xterm &

    xclock &

    wmaker

    *******END FILE************



    ...then X11 will quit when you quit windowmaker. If your .xinitrc file looks like this:



    ******BEGIN FILE***********

    gimp &

    twm &

    xterm

    ******END FILE************



    ...then when you type "exit" or "logout" in the xterm, X11 will quit.



    SO: BE CAREFUL WHAT YOU PUT IN YOUR .xinitrc FILE!
  • Reply 7 of 13
    pbpb Posts: 4,255member
    Quote:

    Originally posted by drumbug1

    If your .xinitrc file looks like this:



    ******BEGIN FILE***********

    gimp &

    twm &

    xterm

    ******END FILE************



    ...then when you type "exit" or "logout" in the xterm, X11 will quit.



    SO: BE CAREFUL WHAT YOU PUT IN YOUR .xinitrc FILE!




    But you have to type "exit" in the initial xterm window launched at X11 start, or whatever xterm window? And after X11 quits, you return to the Aqua login screen or to the black unix console? If the later, how do you enable again the MacOS X login screen?
  • Reply 8 of 13
    pbpb Posts: 4,255member
    Quote:

    Originally posted by drumbug1

    How you get out of it depends on your .xinitrc file.



    If your file looks like this:



    ******BEGIN FILE***********

    xterm &

    xclock &

    wmaker

    *******END FILE************



    ...then X11 will quit when you quit windowmaker.




    And how do you quit windowmaker (well, apart from killing the process in the terminal)? Is there some utility or DockApp for that?
  • Reply 9 of 13
    Quote:

    Originally posted by PB

    And how do you quit windowmaker (well, apart from killing the process in the terminal)? Is there some utility or DockApp for that?



    You right click and go to 'quit' or 'exit'. I would check and tell you exactly what is says, but I am at work. Regardless, there is a quit option in the 'right-click' menu. I think you can command-click (or option click maybe?) if you have a single button mouse.
  • Reply 10 of 13
    pbpb Posts: 4,255member
    Quote:

    Originally posted by drumbug1

    You right click and go to 'quit' or 'exit'.



    Right, I tried that while running windowmaker/X11 in full screen mode (along with Aqua that is) and it killed X11 too, revealing the MacOS X desktop. What will happen if I log in as ">console", start X11 and then quit windowmaker? Sure it will kill X11 too (assuming the last line in the .xinitrc file is the good one), but it will revert to the MacOS X login screen or to the unix console? I guess the later, but I am mostly interested to be able to return to the standard MacOS X login screen from there.
  • Reply 11 of 13
    Quote:

    Originally posted by PB

    Right, I tried that while running windowmaker/X11 in full screen mode (along with Aqua that is) and it killed X11 too, revealing the MacOS X desktop. What will happen if I log in as ">console", start X11 and then quit windowmaker? Sure it will kill X11 too (assuming the last line in the .xinitrc file is the good one), but it will revert to the MacOS X login screen or to the unix console? I guess the later, but I am mostly interested to be able to return to the standard MacOS X login screen from there.



    Why don't you try it and find out? It'd be a lot quicker than me trying it and telling you.



  • Reply 12 of 13
    pbpb Posts: 4,255member
    Quote:

    Originally posted by drumbug1

    Why don't you try it and find out? It'd be a lot quicker than me trying it and telling you.







    Well, it's true, but this is not what I am looking for. Certainly I will try when I get home.



    As I said, I am interested to learn how do you return to the login MacOS X screen, without rebooting the machine, in the case where X11 quitting leaves you with the unix console.
  • Reply 13 of 13
    Quote:

    Originally posted by PB

    Well, it's true, but this is not what I am looking for. Certainly I will try when I get home.



    As I said, I am interested to learn how do you return to the login MacOS X screen, without rebooting the machine, in the case where X11 quitting leaves you with the unix console.




    Well... I'm not home either, but IIRC, when you quit X11 you will be back at the command prompt. Assuming you got there by logging in as ">console", then all you have to do it type "logout" and it will bring back the graphical login screen.
Sign In or Register to comment.