Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This does the same.
alias gi='gedit > /dev/null 2>&1'
Very sorry! In an earlier post I left off a critical symbol. It should be:
Code:
$ nohup gedit "$*" > /dev/null 2>&1 &
The final "&" causes the line to be spawned as a separate process, essentially disconnecting it from the parent. The only reliable way to close the spawned process is to kill it by its PID, or log out.
Very sorry! In an earlier post I left off a critical symbol. It should be:
Code:
$ nohup gedit "$*" > /dev/null 2>&1 &
The final "&" causes the line to be spawned as a separate process, essentially disconnecting it from the parent. The only reliable way to close the spawned process is to kill it by its PID, or log out.
To capture the new process PID, do this:
Code:
$ nohup gedit "$*" > /dev/null 2>&1 &
$ mypid=$!
Then you can:
Code:
$ kill $mypid
Later on.
Thanks for the update.
Now for the fun part, gedit .mybash, it opened without locking the terminal....
The nohup line doesn't work well in an alias, but this works:
alias ge='nt $*'
alias without the external would me more tidy, but I'm good.
The wording of the original post makes no sense to me, but given what's been posted since, I'm thinking maybe this will do what you want.
Code:
$ gedit filename & disown
E.g. you open gnome-terminal, type that, then close gnome-terminal and gedit stays running. If you were to omit the 'disown' part then gedit would close along with gnome-terminal.
The wording of the original post makes no sense to me, but given what's been posted since, I'm thinking maybe this will do what you want.
Code:
$ gedit filename & disown
E.g. you open gnome-terminal, type that, then close gnome-terminal and gedit stays running. If you were to omit the 'disown' part then gedit would close along with gnome-terminal.
My original post was a bit ambiguous, this would have been more clear
"This command will stop the terminal until gedit is closed..."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.