well, if you want a graphical program to run on the console, ncurses is your best bet. If you can put the whole program into a shell script, using 'source' will keep the environments together, but you said you wanted graphical, which precludes shell scripts... unless you want a CLI interface and feel like studying the ANSI codes to design your own (way more work).
It sounds like you're trying to implement midnight commander. Seriously, try it out before getting too far. It's customizable, and you navigate with the arrow keys/enter, and it's a curses-type CLI program. Sounds like exactly what you'd be trying to create with your curses version, but it's already a mature, well-developed application. On Tue, Aug 25, 2009 at 12:19 PM, Dos-Man 64 <[email protected]> wrote: > > > > On Aug 25, 12:03 pm, Daniel Eggleston <[email protected]> wrote: > > The reason you cannot "permanently change" the cwd is that linux is using > > proper job management. When bash spawns a child process, it inherits the > > parent's environment, but a copy of it. Therefore, your cwd will impact > > child processes but the children cannot affect the parent. > > > > Can't it make it an exception for one user-defined app defined in an > environment variable? > > > > > > What I'm not understanding is why you want to mash some graphical > directory > > browser into the command line. You can, however, do something like this: > > > > > Trust me it is so much easier and faster. You can fly around with > ease using nothing more than the arrow keys and the enter key. > > > > 1) Write your application > > 2) have it print out the directory to stdout when it exits > > 3) write a wrapper script to run your program, like this: > > # filename=programNameWrapper > > cd "$(programName)" > > 4) write an alias line in your ~/.bashrc, like this: > > alias programName="source programNameWrapper" > > 5) every time you type programName at the prompt, you will change > > directories to whatever it prints out at the end. > > > > Daniel > > I will try this. I have some other ideas too that I am going to try. > It would be best if my app ran in the same console window as opposed > to in an external x window. Not sure if that means I need to use > ncurses or not.... > > > -- Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
