c++ - Creating a customised shell -


i have created customized shell in c++. currently, shell designed infinite while loop started running corresponding executable terminal (i using ubuntu os). shell implements few new commands each stored separate executables in file system. rest of commands user enters directly executed using execve() wrapper function.

so, essentially, executing user commands using execve() function: customised commands stored separate exectuables , "execed" providing path executable whereas other "standard" unix command directly execed.

instead of running separate executable bash, want make user use shell executes on terminal. how can that?

i referred following links:

processes , sessions , controlling terminals

creating unix shell

however, unable figure out links association between controlling terminal , shell etc. appreciated in regards.

update:

this may sound bit illogical but:

is there way implement user command user can execute current shell?i know there command called chsh... work shell?

first can test shell bash exec yourshell. replaces bash process shell entirely. (when exit shell, terminal exit/logout it.)

you can run xterm -e yourshell start xterm shell instead of bash.

if want permanently make default shell:

  1. add shell list of system shells, /etc/shells
  2. change user's login shell chsh
  3. log out , in again

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -