LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 02-24-2019, 03:07 PM   #1
cranon
LQ Newbie
 
Registered: Nov 2018
Posts: 6

Rep: Reputation: 0
program or script to kill parent window on children spawn


Lets say i opened a terminal and a terminal file manager, what i would like to be able to is navigate down to the content i want to open, open it and have the terminal close itself automaticaly. Is there a program or something that can do this. I would like to be able to do this independently as i have a lot of ideas for where to use this. Thanks
 
Old 02-25-2019, 01:31 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
what have you tried?
i'd start with collecting the pids of the processes started (term, filemanager) and kill those.
show us what you got so far and explain where it fails (with output).
 
1 members found this post helpful.
Old 02-28-2019, 01:49 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,885
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by cranon View Post
Lets say i opened a terminal and a terminal file manager, what i would like to be able to is navigate down to the content i want to open, open it and have the terminal close itself automaticaly. Is there a program or something that can do this. I would like to be able to do this independently as i have a lot of ideas for where to use this. Thanks
You learn something new everyday.

I didn't know that Terminal File Manager's existed. Now I do.

I would think that you would need to grab the source for any given terminal file manager and modify it such that when you open something, be that an executable or a file where it opens a document into a graphical editor, that it will choose to exit the file manager, and close the terminal.

One problem you most likely will run up against is that the file manager is a sibling to the terminal, and whatever you run from the file manager may also be a sibling to both of those. Thus if you kill the terminal, it may kill all children of it. Maybe, maybe not, it depends how the final thing is launched, but I'm pretty sure this isn't a huge deal. I happen to open emacs in graphical form a lot from a terminal and if I happen to CTRL-D out of the terminal, the emacs application doesn't get killed.

Back to my original thoughts, which are that you need to modify source for the file manager to make this happen. At least in my humble opinion.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create 5 processes from a common parent and ensure that the parent terminates after c pro_learner Linux - Newbie 1 03-06-2013 09:25 AM
Kill a zombie process - which process is the parent that I should kill? Mountain Linux - General 3 12-31-2011 02:44 PM
C - Using pipes with a parent that has multiple children golmschenk Programming 5 03-07-2010 03:30 PM
Gnome/gdm startup apps: Why are some children of gdm and others children of init? sixerjman Linux - Software 1 07-04-2009 10:48 AM
File descriptors shared between child and parent causing parent to hang. bharadiaam Linux - Newbie 1 03-02-2009 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration