Terminal Question...

Posted:
in macOS edited January 2014
hello, i'm somewhat new to UNIX and although i know a decent amount, i still have alot to learn. What i wan't to do is be able to run NEDIT from the terminal however it needs X11 running for it to work. So far i have it set up so that as long as X11 is already running, i can just type 'nedit' into the terminal and it will launch. Now i'm trying to set up my ~/.bash_profile so it will launch X11 when i start the terminal. How do i do this? i dont even know how to launch an application from the terminal. the whole ./program thing didnt seem to work. i also noticed, that the X11.app opens like a folder in the terminal which was wierd. can anybody please help me out here? thx

Comments

  • Reply 1 of 7
    Can't tell you how to open X11 for nedit (which I think is a great editor), but to open an OSX app, you type 'open Application.app'. Since .apps are bundles, you can't just use ./Application. You could cd through the bundle and find the actual executable and then it would work, or just use the open command.
  • Reply 2 of 7
    awsome it works. thx man I just used the open command inside the profile and it work as though it were called from the terminal itself
  • Reply 3 of 7
    okay, new question, sorta... is there a way to start X11 w/out it popping up its terminal and stuff? like, start it up hidden? I need the service running, but dont want all that stuff popping up. thx for your help
  • Reply 4 of 7
    pbpb Posts: 4,255member
    Quote:

    Originally posted by CNUco2007

    ...is there a way to start X11 w/out it popping up its terminal and stuff? like, start it up hidden? I need the service running, but dont want all that stuff popping up. thx for your help



    You need to write you own .xinitrc file then, where you will only start the window manager. For example, a .xinitrc file in your home directory with this alone line of text as content

    Code:




    twm









    will start the twm window manager and it will take you there (I suppose you know how to get back to the normal OS X environment). If you start X11 by clicking the X11 icon on the dock, you can avoid getting there by clicking somewhere else to bring another application in the foreground (Finder for example), while X11 is still starting.
  • Reply 5 of 7
    What about putting it in your Start Up items (System Preferences->Accounts->Login Items) and check the Hide box? Don't know if it will work, but it sounds like it should.
  • Reply 6 of 7
    hmmm, sounds like its worth a try. thx for the ideas. i'll try them out and let yall know. any other ideas while were at it?



    *edit* well i set it up in my Login Apps and set it as Hidden however when X11 starts, it always brings up its own terminal. is there a way i can set up X11 to not show its terminal when its started? thx again for your help.
  • Reply 7 of 7
    okay, i found a real easy solution to this. Im just using xterm now. it has all the same capabilities (that i can see) and x11 is obviously running so i can run my nedit, and any other application i want. thx for all the help
Sign In or Register to comment.