make programs commands?/kill fullscreen apps?
I just got 2 questions that should be pretty simple..
1st is, what directory do I install things to so they can be ran just by typing the name of the program in the command line?
2nd, how to kill a fullscreen SDL app? I tried ctrl+alt+esc but it doesn''t work on fullscreen SDL apps.. Just wondering how to kill them when I accidently make a bad if statement and it makes SDL_Delay go forever, so I don''t have to shut my comp down..
AMP Minibowling - Free asynchronous multiplayer mobile minigolf+bowling
[twitter]eedok[/twitter]
quote: Original post by eedokWell, you could install it into any directory that''s in the user PATH, but the better thing to do is to install in a location like /usr/local/<your-app> and give the user the option (during the install) of adding this directory to the PATH.
what directory do I install things to so they can be ran just by typing the name of the program in the command line?
quote: 2nd, how to kill a fullscreen SDL app?Switch to another virtual terminal. X runs on terminal 6 (IIRC), which is accessed using Alt+F6. Switch to any of terms 3 through 7 (obviously skipping 6) and kill <your-app>. If you don''t know the app name (or process id), first run ps. If kill doesn''t work, then kill -9 <your-app>.
quote: Original post by Oluseyiquote: Original post by eedokWell, you could install it into any directory that''s in the user PATH, but the better thing to do is to install in a location like /usr/local/<your-app> and give the user the option (during the install) of adding this directory to the PATH.
what directory do I install things to so they can be ran just by typing the name of the program in the command line?quote: 2nd, how to kill a fullscreen SDL app?Switch to another virtual terminal. X runs on terminal 6 (IIRC), which is accessed using Alt+F6. Switch to any of terms 3 through 7 (obviously skipping 6) and kill <your-app>. If you don''t know the app name (or process id), first run ps. If kill doesn''t work, then kill -9 <your-app>.
perfect answer to 1, and thx for the speedy responce, but #2 doesn''t seem to work for me..
AMP Minibowling - Free asynchronous multiplayer mobile minigolf+bowling
[twitter]eedok[/twitter]
March 15, 2004 04:42 AM
Try
$ ps aux | grep ''app-name'' to find the pid (The first number in the list). Obviously change app-name to the actual app name
Use this as
kill <pid>
and failing that
kill -9 <pid>
$ ps aux | grep ''app-name'' to find the pid (The first number in the list). Obviously change app-name to the actual app name
Use this as
kill <pid>
and failing that
kill -9 <pid>
You can also use pkill which takes the name of the app
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
how do I run these things when I can''t get out of the frozen SDL application?
AMP Minibowling - Free asynchronous multiplayer mobile minigolf+bowling
[twitter]eedok[/twitter]
quote: Original post by eedok
how do I run these things when I can''t get out of the frozen SDL application?
First, try Ctrl+Alt+F1. That should get you to a text console. When you''re in a text console, Alt+Fn switches consoles, but if you''re in X you need Ctrl+Alt+Fn. On my system X is on VC7, so Alt+F7 gets back to X. Once you''ve got to VC1, killall appname should get rid of it.
If that doesn''t work and you''ve saved everything, try Ctrl+Alt+Backspace. That should force the X server to shut down immediately, and kill any processes that were using it. If you''re running a graphical login manager, it ought to restart the server once it dies, so you''ll get back to a login screen. Don''t do this if you''ve got lots of unsaved work though.
As for your first question, a common way to do it is to install your app into /usr/share/appname or /opt/appname, and make a symlink to the executable in /usr/bin. If you want it in your path while developing (implying that it''s in your home directory somewhere), you could add to ~/.bashrc:
PATH=/path/to/application:${PATH}
export PATH
I got a question about the one about making programs into commands again, is there a way to do it on a non root account so it only affects the user who installs it and none of the other users on the computer?
AMP Minibowling - Free asynchronous multiplayer mobile minigolf+bowling
[twitter]eedok[/twitter]
quote: Original post by eedokOnly if the users install it into their home directory, and they add the directory to their PATH (in ~/.bashrc IIRC).
I got a question about the one about making programs into commands again, is there a way to do it on a non root account so it only affects the user who installs it and none of the other users on the computer?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement