Openbox terminate process upon logout of openbox How to?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Rep:
Openbox terminate process upon logout of openbox How to?
is there a means to run a script to kill processes that where started with the autostart script upon login to openbox, like WindowMaker has, or what mechanisms are there that I can cut into and execute a script to kill some of the things I started when logging into openbox?
add a redirect to a script that kills the processes, then call exit perhaps. Though, every time I would update the menu it would be over written, so I'd have to go back in an edit it, or write another script calling menumaker, then using sed perhaps to remove and add that part back into the menu after menumaker is done re-creating the menu. Is there a way to get around that or is that pretty much the only avenue of attack?
this is mainly at the time of this writing, to kill a script that is running to simply change the background at a given time.
obshutdown, taken off wmakers then made to work for openbox...
Code:
#!/bin/sh
#
# Place commands to be executed when openbox is exited here.
#
# Openbox will wait until this script finishes, so if you run any
# commands that take long to execute (like a xterm), put a ``&'' in the
# end of the command line.
#
# This file must be executable.
#
piddy=$(pgrep -u $USER changebg)
kill "$piddy"
pkill openbox
it may have been a redundant question but just wanted to know...
isn't menumaker configurable to include custom menu entries?
at least obmenu-generator is.
anyhow, do you want to kill ALL user processes after killing openbox?
how did you login and start X?
if you used "exec startx", you will be logged out when you kill openbox.
then it depends a little on the init system, but it's possible to automatically kill all user processes on logout.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952
Original Poster
Rep:
Quote:
Originally Posted by ondoho
isn't menumaker configurable to include custom menu entries?
at least obmenu-generator is.
anyhow, do you want to kill ALL user processes after killing openbox?
how did you login and start X?
if you used "exec startx", you will be logged out when you kill openbox.
then it depends a little on the init system, but it's possible to automatically kill all user processes on logout.
right now I am using kde login manager. menumaker has a py file that can be edited, but mostly all I've ever done with that is correct the path when using wmaker for a WM.
I'm not user if I want to kill every process, never tired that to see what it does. I started using a script to change backgrounds and noticed that when I logged out of Wmaker and into openbox to set that up, the script was still running. So I fixed that in Wmaker because it has a shutdown script just for that reason. whereas Openbox is less setup for that kind of a thing.
killing every 'user' process should not be a bad thing seeings how this is on logout anyways?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.