start shell with a command

Diputs

Active Member
Joined
Jul 28, 2021
Messages
134
Reaction score
48
Credits
1,030
Question may be simple, but I haven't come up with a simple solution yet. Here it goes:

There's a script, and one of the things it does, is launching another Shell.
No problem.

Now, I would like a given command, or script, to be launched along launching that Shell ... but I want the Shell to be usable, just as if I only launch the Shell.
So, in other words, I want the command (or script) to run - in the Shell that is started - and then remain in that shell.

It's easy to launch a Shell, it's easy to lauch a script/command, but I want both. And the script/command must be run in that Shell. Not just running a command, and then start another Shell.

What's the easiest way to do this ?
 


Maybe tmux with its "attach" and "detach" functions may satisfy your requirements.
 
i set my shell to fish and customized the entire konsole profile as well as modified the fish config to remove the greeting then added in the neofetch command so it does this every time i open it, is this something like what you want to do? it took me a while to figure out all these settings but i can share if needed
 

Attachments

  • Screenshot_20231018_214119.png
    Screenshot_20231018_214119.png
    625 KB · Views: 123
i set my shell to fish and customized the entire konsole profile as well as modified the fish config to remove the greeting then added in the neofetch command so it does this every time i open it, is this something like what you want to do? it took me a while to figure out all these settings but i can share if needed

No, because I don't want the Linux account to run this command/script on every login. But if that would be needed, changing the profile indeed is the way to go. Actually the whole issue is that I cannot change the profile, because it's MY preference settings, and the account is shared. So, can't change the Profile.
 

Members online


Latest posts

Top