Ubuntu :: Avoiding Terminal Closing After Running Script
May 7, 2010
[using Ubuntu 10.04 - Gnome] I know this is probably a dumb question, but after few years of not using linux i'm back to it and trying to catch up what i already forgot... i'm trying to make a shell script were when all the commands end or when i interrupt it (using ctrl+c) it wont close my terminal window.
i made a test scrip like this:
#!/bin/sh
echo hi there
and created a launcher by right clicking create launcher, selected console application, naming it and putting in the command field: sh "<path to file>/test.sh". (without sh at start it wont work)
so how can i avoid shell window closing after running/terminating the script? and is there any way i can do this by doing something like right click>add new link... i think that in kde it works like that...
View 8 Replies
ADVERTISEMENT
Oct 26, 2010
I wrote this little function that I use from my '~/.bashrc' (from a script I also made, with help) to run a program on a timer, however there is one small issue I'm having.
Code:
##### Run program on a timer
# Usage: program-timer <program> <runlength (in secs)>
function program-timer()
{
$1 &
mypid=`eval ps ax|grep "$1"|grep -iv "grep"| awk '{print $1}'`
[Code]...
Basically, it works just fine, but the issue I'd love to get help with is when the timer runs out, it doesn't shutdown the program. That is, not until I close gnome-terminal. I've tried 'exit' in several places, but it doesn't seem to close it.
Now, the above script does what I want, but using 'killall gnome-terminal' not only closes the gnome-terminal window I am running the function on, but ALL gnome-terminal windows I may have open.
Does anybody see a simple way to fix my small dilemma, to have it close only the gnome-terminal window I'm running the function on?
View 9 Replies
View Related
Jan 15, 2011
I've made custom launchers for programs that can only run in terminal. They open fine within the Terminal window, but it closes right after the program is finished, before I can read the report.
Is there a way to keep the Terminal window open, using launchers? I don't want to manually type the commands after opening a Terminal.
View 2 Replies
View Related
Feb 21, 2011
if i start an application using the terminal.. it gets closed if i close the terminal.. how can i not let this happen?
View 4 Replies
View Related
Apr 21, 2015
Running Gnome on Jessie. Have had Gnome hang a few times over the past few months. The hangs seem to be related to having open and / or closing a root terminal. It has happened on a Gateway AMD Phenom II tower and on my Gateway NV59 lappy with Pentium P6200.
View 7 Replies
View Related
Jun 30, 2009
When closing the gnome-terminal a dialogue box opens that says:
Close This Window?
There is a process still running in this terminal.
Closing this terminal will kill it.
Nothing is running it's complete, so I have to close the box then the terminal closes. I know I'm a perfectionist. how to get rid of this?
View 6 Replies
View Related
Apr 5, 2011
I would like to hear about a (telnet) terminal for Linux that can run VB scripts. The need is for configuration of a target board. I like secureCRT very much, but I can not use it from a Linux workstation.
View 4 Replies
View Related
Feb 7, 2011
my brand new Squeeze system, I cannot stop the Iceweasel. It just keeps going and going and going ... Specifically, after closing the browser a firefox-bin or xulrunner-stub process (never both) keeps running and consumes an entire CPU (according to top). To make matters worse, Mozilla does not accept responsibility for the problem. Instead it blames extensions, Java applets, plugins, etc.. They blame everyone but themselves. To see that the bug is in "Firefox/Iceweasel," run:
cd $HOME
mv .mozilla/ .mozilla-bkp/
/usr/lib/iceweasel/firefox-bin
Then shut the browser. The process must be terminated manually.
kill $(ps -A | grep -E "xulrunner-stub|firefox-bin" | awk '{print $1}')
View 7 Replies
View Related
May 29, 2011
I have recently purchase some audio equipment and am wanting to get the most out of it. From what I've read, an OS/media player will tend to "resample" audio frequencies at the software/soundcard level before sending it, and from what I gather, that isn't a perfect 1-to-1 copy of my audio to my speaker. My equipment:
Ubuntu: 11.04 x64
Mobo (integrated sound): ASUS P5QL-CM - S/PDIF out on Intel G45 chipset / VT1708B, 8-Channel High-Definition Audio CODEC
AV receiver: Onkyo HT-R380 (PDF manual)
Speakers: Stereo (connected to 'A' ouput on AVR) - Acoustic Research Red Box II (circa early 90s)
I have the ASUS S/PDIF 'addon' and I have Ubuntu set to send audio through that. I think "bit streaming" is what I am after but I am at a loss as to how to make it happen.
View 1 Replies
View Related
Jan 28, 2011
Is it possible to for me directly RDP into my company's RDP server from my Linux OS, in same way I can RDP into it from my Windows OS on my work computer or home computer, which has the RDP setup settings you use to create the session?
Of course I can get into the work machine, and then the RDP session, but is there a way to go straight into it without using the Windows Desktop to click on RDP? Does Linux have an RDP program similar to the setup using on the Windows side, in terms of being able to configure the settings to get into an RDP directly?
View 2 Replies
View Related
Jul 18, 2011
Slackware is very stable and very geek-friendly. I happen to love it... Unfortunately, I've found it unsuitable for day-to-day stuff in recent years, because it doesn't have a whole lot of software in its repos - and installing stuff from source can quickly lead you into dependency.
But pkgsrc has a vast amount of software in it, and can run on Linux. So it could be a solution, right?
The problem with pkgsrc is that the dependency resolution doesn't recognize stuff installed through standard Slackware packages. If you try to compile Gnash with it for instance, it will drag in Firefox and waste a few hours compiling that, even if you already installed Firefox through pkgtools. So with a default setup, pkgsrc is suitable for building on a very minimal Slackware system, but not for extending a preexisting Slackware desktop with Xfce and Firefox and whatever.
Is there any way of changing this, so that pkgsrc registers preinstalled binaries as providing whatever dependency? Or is that not possible? If not, is there any other system that could provide dependency resolution for compiling stuff?
View 11 Replies
View Related
Jun 27, 2010
I have two modules A and B in the kernel which i am trying to hack by introducing a variable in A which is of type 'extern' (and using EXPORT_SYMBOL) and then calling it in B. Now the problem is how to introduce that variable in module A. Currently i have made a global variable and it works fine but global variable in kernel is a bad bad thing.
I tried having an 'extern' function in A which have that variable and calling that function in module B, but then again how would module A use my variable unless the variable is available outside the scope of that function and that again means a global variable.
View 3 Replies
View Related
Jun 16, 2011
Thanks to a recommendation and extensive help at phpbuilder.com, I have a multithreaded PHP script running in the cloud which fetches images and stores them the cloud. It's fast and seems quite stable.However, I believe I'm faced with a situation where I need to introduce an additional lock to my code so I'm faced with the task of managing multiple locks while avoiding deadlock.I was wondering if anyone had experience managing multiple locks in a MT environment and could recommend specific functions and data structures. I've been reading up on resource management in MT code and understand a few things:
1) Any shared resource (global and static vars, memory, file descriptors, etc.) generally needs to be protected by some kind of mutex, lock, or other sync var.
2) There are certain necessary conditions for deadlock to occur.
3) You generally need a sequence or hierarchy of your resources so that all threads request them in the same order. This sequence must be the same and immutable for all participating threads, whether local or remote.
4) Recursion is a very common cause of deadlock, so a process should know what locks it has acquired previously in order to avoid blocking in the attempt to re-acquire those same locks again.
5) There are a variety of algorithms described such as the Banker's Algorithm, the Chandy/Misra solution, etc. to help avoid deadlock.
I'm hoping to come up with a technique for properly handling multiple locks/mutexes/sync vars that I can re-use in the future, but I'm still coming to grips with the algorithm descriptions and am unsure precisely what sorts of data structures or functions I'll need.
View 3 Replies
View Related
Apr 24, 2010
I'd like to know if there's a way to disable system suspension during mplayer playback, I'm using kde 4.4.2 by AlienBob on my slackware64-current, and powerdevil as the power manager. In powerdevil I've setup the performance profile to suspend the system after 30 minutes with no user interaction, and the presentation profile is setup not to use suspension at all, but I always forget to switch the profile before playing some long video on mplayer and the system goes down after 30 minutes of playback.
Does someone knows a way, a hidden mplayer setting (powerdevil setting would be ok too) that lets me disable suspension only when mplayer is working and nobody is using the system for more than 30 minutes??
View 2 Replies
View Related
Jun 5, 2011
Few days back when I tried to install java application using software manager, I got the message that my software manager has broken down. Since then I was not able to install any of the applications either through terminal or the software manager. Luckily, I got another fresh copy of Linux Mint 10(Julia) installed on my laptop. Looking for some efficient method of installing the required applications(java and its associated applications) so that I do not face such problems again in the future.
View 5 Replies
View Related
Aug 25, 2010
I'm trying to run a script that launches a GUI using DirectFB while su'd as a different user. I probably have to add environmental variables but I'm not sure exactly what to do to get this working.
Here's the error I'm getting:
Code:
(*) DirectFB/Core: Single Application Core. (2009-06-02 06:26)
(*) Direct/Memcpy: Using libc memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
--> No such file or directory
[Code]....
View 2 Replies
View Related
Apr 11, 2010
I am trying to boot debian on my nexus one the guide i am using is telling me to run these commands
I am getting to the point where i type the command # cd /sdcard/debian but it tells me cd: can't cd to /sdcard/debian.
View 9 Replies
View Related
Apr 11, 2011
I'm trying to run a .jar file from the terminal (so that I can set up a launcher) but I can't seem to get it to work. The file is marked as an executable, and all works fine if right click the file and open with java in gui, but when I enter:
Code:
java -jar minecraft.jar
... from the directory the jar is located in, I get:
[code]...
View 7 Replies
View Related
May 13, 2011
Ive got my webserver linked up to my ubuntu computer, and i want it to act like a server controller (for srcds games or w/e) Basically, When i click the start button, the SSH launches 'css.sh' by doing this 'sh css.sh'... Anyway, the .sh file has this inside it cd sourceds/srcds_1/orangebox clear ./srcds_run -console -game cstrike +map de_dust -maxplayers 16 -autoupdate
But either way, that is becides the point. When it launches i dont see the terminal window, its invisible.... (but its running) How do i see it when i go to my ubuntu desktop and how to i put more commands in it once its launched in the background.
View 3 Replies
View Related
Jun 26, 2011
I'm trying to run flasm from the terminal prompt but I don't really know what I'm doing.
It may be an incompatible program for all I know but as I don't know how to run any .exe from the Terminal I have no way of knowing.
I've tried entering the directory, as in:
Code:
But it say's the directory doesn't exist. But it does...
Code:
View 5 Replies
View Related
Jan 16, 2011
either install complete Desktop Environment like Gnome, KDE, Xfce or install Xorg only. Desktop Environments will install a lot of other packages too but xorg will install core packages necessary to run X Server only.
I'm going through the same problem as Tkeins. I recently loaded Ubuntu 10.10 Maverick server, further I loaded KDE also. So while I can run Konquerer from within the KDE, but not the firefox. Further when I try it from console I get the same message 'No Display specified.
View 1 Replies
View Related
Jan 18, 2010
Still trying to get my openVPN running.I can get the daemon running from terminal but nothing is configured. I copied my config file over from Windoze partition. My openVPN works flawlessly on both my windoze boxes.
Following this but came to another dead end when Im instructed to: Next, edit /etc/openvpn/easy-rsa/vars adjusting the following to your environment:
export KEY_COUNTRY="US"
export KEY_PROVINCE="NC"
export KEY_CITY="Winston-Salem"
export KEY_ORG="Example Company"
export KEY_EMAIL="steve@example.com"
I cant edit that,I tried but its a 'read only'. Are these instructions designed for long time users?
View 9 Replies
View Related
Jan 23, 2010
I am building a Terminal Server Client using debootstrap for work. I found a couple post that suggested that I can change my inittab configuration to not load login. However it is my understanding that inittab has been replaced by upstart. I would like to know how to modify upstart so that instead of the user seeing a login: prompt my script is automatically loaded (rrdesktop)(revisedrdesktop) and the user is brought off a live cd to my terminal server.
View 2 Replies
View Related
May 15, 2010
So, this may have something to do specifically with conky, but I don't understand how sometimes when I run 'conky' from the terminal and then once it loads I close the terminal, it kills conky. But other times, I do the same thing, wait for it to load, and it just keeps running! In both cases, I don't get a "user@computer~:$" prompt back after running 'conky' either. That happens sometimes with other things like gedit too..
View 3 Replies
View Related
Jul 10, 2010
I'm writing a bash script to move files around based on various bits of metadata. For a few reasons, this script will be run regularly both from the terminal, and from the nautilus-scripts folder ("graphically", if you will). What I'm stumped on is having the script defer outputs based on which mode the script is running in. For example, how can I have the script know whether to echo error statements, or pump them out to zenity based on the method of invocation?
View 2 Replies
View Related
Jan 19, 2011
Code:bash: /dev/cgroup/cpu/user/8841/tasks: No such file or directorybash:/dev/cgroup/cpu/user/8841/notify_on_release: No such file or directoryAfter these two lines I get a normal working bash prompt.Could be related: Installed Xubuntu, then installed ubuntu-desktop and removed xubuntu-desktop&all xfce stuff.
View 3 Replies
View Related
Feb 14, 2011
I have a shell script that I want to be able to run from the terminal just by typing "topcat", regardless of where I am or what user I'm under. How would I go about changing the bash configuration files (if I have to) in order for that to work, for me and for the other users on the computer (I have root access)? As it stands right now, I have to type "/bin/topcat/./topcat" in order for it to execute
View 3 Replies
View Related
May 14, 2011
I am relatively new to linux but i need to run a command in the terminal so i can prevent wireless power save from happening every time i switch to battery power. I dont really want to go into the terminal every time i switch to battery mode so i want to be able to launch this command upon start up:
Code:
sudo iwconfig wlan0 power off
View 2 Replies
View Related
Jun 7, 2011
so i've just been sitting here, compiling and running some c++ programs (with g++ from the terminal), I looked away for one minute to open a file that had just been written out (opened it with gedit if that makes a difference), now my terminal says:kbuildsyscoca4 running...so I'm wondering if anyone knows what this is about?hy it suddenly started running and why it has appeared on my terminal. I'm basically just curious as I though bash shells were entirely separate virtualizations of shells, and unrepresentative of other processes. i'm also wondering what kbuildsyscoca4 is/does (i've got gnome going on and generally gnome varieties of programs). I found a post from about a year ago mentioning the same thing, though no replies.
View 1 Replies
View Related
Jul 9, 2011
After a momentary power failure My server did not reboot due to a disk error. I rebooted and ran an disk repair and the machine booted fine. Now if I got to the update manager and try to update I get the following error:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_lucid-updates_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.
I checked the file location listed the file is there (hidden). Should it be a hidden file? If so how do I repair this error? I went to the preferences of update manager and changed the following, Updates every 2 days from weekly, Changed the server location from US server to main server. The update manager ran and updated 13 files. I don't know what change repaired my issue but a guess is, changing the download location from the US server to the Main server.
View 5 Replies
View Related