Ubuntu :: Function With Closing Only Applicable Gnome-terminal?
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
ADVERTISEMENT
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
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
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
Feb 20, 2010
I have an older Gateway P4 computer running Ubuntu 9.10. I had removed the nm-applet from the systray because I wanted the system to have a static IP. That was several months ago. Today, unthinkingly, I tried to re-add the icon by going into System -> Preferences -> Start-up Applications. I put check in the box next to "Network Manager", then re-started my system. However, when my system came back up, instead of the Network Manager icon, I had two System Audio icons in the tray. One was actually for the audio; the other one just said "Notification Icon" when I put my mouse over it. Again, without thinking, I clicked on "remove from panel". That's where my problems have begun. As soon as I did that, the top and bottom bars disappeared, then reappeared. Except now they're doing that constantly. My machine has become totally unusable. I did manage to turn it off and re-start it, but it comes right back to doing this again.
I can remotely log in from another system (which is where I'm typing this message from) and see that, according to "top", the "gnome-panel" is running at anywhere from 30 - 50% of my CPU. I can provide any logs or other information necessary since I can access the system remotely.
View 1 Replies
View Related
May 17, 2011
Gnome (or XORG, I'm not sure which name to give it) freezes up not always, but about once every 24 hours after I close the laptop's cover/lid. I know this happens when I close the lid rather than open it judging by the time the clock is locked at. The cursor will move around on the screen, but noting will react to it in any way. Other services such as FTP and Samba still work just fine when the computer is "locked down". Without more details to why the problem is occurring, I have no idea what to search for or where to get started solving the problem. I have attached the XORG logs (found in var/log) in case they are of any use.
View 7 Replies
View Related
Jul 5, 2015
I have configured my system to suspend whenever I close the lid, by using the Power Management applet provided by my desktop manager (see my later comment). However, sometimes, when I reopen the lid, I see that the laptop is switched on but it won't resume, while the CPU heats up. I must shutdown forcefully. What could be causing this?
I have found this thread [URL] .... in regard to OpenSUSE. Is it relevant for Debian as well?
System info:
- Debian GNU/Linux: 8.1
- Linux Kernel 3.16.0-4-amd64
- MATE desktop 1.8.1
- GNOME Shell 3.14.4
Clarified that the suspend is a user-level setting.
View 7 Replies
View Related
Dec 10, 2010
Linux-goers. I did some research on this, but I am still fairly new to Linux. In Ubuntu 10.10 (Maverick), I accidentally overwrote my "/bin/bash" file. Dude, using "sudo" with a small typo can work disasters. Bash is now broken in the Terminal (gnome-terminal). Terminal itself still works fine, technically, but bash is still hosed/broken. Here is what I did to try to fix it: Booted from Ubuntu 10.10 live CD. Mounted my Ubuntu partition and manually copied the good/fresh "bash" file onto my hard drive. Verified copy was successful. Didn't help, as you see. Reinstalled "gnome-terminal" using synaptic package manager. Tried to reinstall bash via synaptic, it failed with error, "E: /var/cache/apt/archives/bash_4.1-2ubuntu4_i386.deb: subprocess new pre-removal script returned error exit status 2"
In Terminal, all basic commands work as far as I can tell. ("ls", "pwd", navigation, etc.) Here are some problems:My "username@computername" does not display in the prompt; only the $ sign. Bash keyboard shortcuts such as uparrow and tab do not work. Instead, each inserts a key code. I can't even move the cursor left/right. Aliases (a function of bash and .bashrc) are broken, of course. My sanity level decreases when I use Terminal now. For what it's worth, even with "sudo" I get a "permission denied" error when trying to run Google Chrome! I read something about a ".bashrc" file being a possible problem, but I don't know how to make it work, or the file's proper locations in Ubuntu 10.10. Is there something I can do with a "make" or "apt-get install" command or something?? Could this simply be a permissions problem? Is the link to "/bin/bash", "/bin/sh", or a ".bashrc" file broken? Guide me, oh Linux gurus.
P.S. I always wondered what exactly bash was and how it was different from the basic terminal. LoL, this is an excellent way to demonstrate the difference, and I WANT IT BACK!
View 9 Replies
View Related
Nov 6, 2010
I'm using 10.04, and gnome-terminal GNOME Terminal 2.30.2 . I have irssi running on screen session on remote host. And I've been struggling for quite many days to configure it to produce either visual feedback or ring terminal's bell when I receive a private message or one of those that are highlighted.
My compiz settings window in General tab has 'Audible bell' checked.
My GNOME terminal has 'Terminal bell' checked.
I also added 'set bell-style audible' to my ~/.inputrc
And I also tried to manually load pcspkr module into my kernel.
No of the above helped or at least I haven't been able to notice any difference.
I also used some commands for irssi to produce bell sign.
View 2 Replies
View Related
Jan 26, 2011
I had a dream least night in which I was on my computer and I was typing the command Netstat -a in command prompt in Ms-Dos. And I was wondering why it looks so much like a Linux terminal command? This question persisted in my mind after I woke up. So what is the story about it?
View 3 Replies
View Related
Feb 2, 2010
We use Netterm as terminal emulator on windows , it works fine , is there any terminal emulator have the similar function that can be run on Linux ?
View 13 Replies
View Related
Jul 10, 2010
After spending many frustrating hours, I finally found a solution to easily re-mux m2ts/mts files produced by Sony HDR-SR12 or other similar camcoders in order to stream them smoothly over DLNA to Samsung C-Series (55C8000) TV in full HD quality. But the solution is generic and can be used for any rendered.
First the problem: Above mentioned Sony camcoder produces 1920x1080, 60i video. However, the time-stamps on the frames in each interlaced field are wrong, both frames of a filed having same time-stamp. This is very problematic for almost all rendering devices. My first approach was to re-encode these mts files using Handbrake to convert to m4v. This worked though at a heavy computing cost. The conversion is very intensive and for 50GB of videos could easily take more than 12 hours on a core-2 processor.
One day, I was browsing Ubuntu forums, I came across this thread. This actually produced the re-muxed file in a fraction of a second as opposed to re-encoding with Handbrake that took very long time.
1. It is using mencoder + lavf, a known broken combination in presence of B-frames.
2. It does not allow to copy the subtitle track (PGS) that Sony camcoder produces. This subtitle track is very important as it contains the recording date/time information which will be valuable when using these videos in future.
The following solution overcomes all the above-mentioned problems, is rock-stable and preserves the sub-title stream as well. I use ffmpeg to simply copy all the streams and output them in an mkv container. No information is lost/re-encoded. Here is the simple answer (as often observed in scientific research, the useful answer to a complex problem can often be stated very simply ):
Code:
ffmpeg -i input.mt2s -scodec copy -acodec copy -vcodec copy -f matroska input.mkv I have written a script that converts all the m2ts files in a subfolder to mkv. The script is as below:
Code:
#!/bin/bash
# m2tstomkv_subs (Fix the faulty fps (dual frames in the interlaced fields with same time-stamps) and repackage in matroska mkv container)
time {
[code]...
The conversion is lightening fast. Finally I am able to watch the videos in their true quality.
View 1 Replies
View Related
Jan 24, 2011
gnome-terminal from the Debian squeeze does not use the 'default_size_columns' and 'default_size_rows' from the /apps/gnome-terminal/profiles/Default/ folder of gconf.
View 6 Replies
View Related
Mar 5, 2011
Is there a terminal emulator which works well in an Ubuntu desktop and provides the following features which Mac OS X's Terminal application has? Re-wrapping text when the window is resized.A Clear command which clears scrollback (as the shell clear does not) and does not clear the cursor's line (typically containing a prompt).
View 2 Replies
View Related
Dec 3, 2010
Is this howto which is based on FC5 still applicable to FC14?[URL]...
View 2 Replies
View Related
Oct 15, 2010
I have recently graduated from uni and during my time there I have developed an interest in HDL, specifically Verilog. As my current job doesn't lend itself to doing anything in verilog so I decided to keep myself sharp by designing a 32 bit processor that is similar to (but not the same as) the MIPS processor it will certainly be RISC. While starting work on it I have decided to start a blog detailing what I have done including the source file as I am entering my work into the wide world I think it needs a licence but I am not looking to make any money or even to derive any fame from what I'm doing. Like I said the main reason to do it is to keep me active in using HDLs.
I hope to gain from the blog suggestions for alternative(better) ways to do what I am doing, for people to use what I have done as an example of a medium sized project in verilog and to force me to have some form of documentation on my project. That's enough self publication to the question. Is the GPL (either version 2 or 3) applicable to work in HDL as it is not a traditional programming language but shares many of the same features? It certainly does not feel like I should use a CC license. I'm not sure this is the correct forum for this question but it seems most applicable.
View 5 Replies
View Related
Oct 28, 2009
I have just installed Centos 5.4 on my box and run "yum update", but to my surprise it says there is nothing to be updated:
# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.intergenia.de
* base: centos.intergenia.de
* extras: ftp-stud.fht-esslingen.de
* updates: centos.bio.lmu.de
Setting up Update Process No Packages marked for Update test
View 4 Replies
View Related
Jul 21, 2010
Are x-terminal-emulator and gnome-terminal different in any way? I noticed when I when I put those commands in my terminal they both opened the gnome-terminal.
View 4 Replies
View Related
Apr 29, 2010
In KDE's Konsole, I can do the following from the terminal:
dcop kwin KWinInterface currentDesktop
And it will tell me which desktop my terminal is connected to ( per [URL])
How can I determine what desktop number the current gnome terminal in a gnome session is connected to?
View 1 Replies
View Related
Aug 26, 2011
I find xcompmgr more than adequate for making a desktop look pretty modern, and I don't like the more extravagentCompiz gimmicks - but there is one thing that irritates when using xcompmgr which someone here might have worked round.
Rounded window borders don't draw and redraw properly when using the Terminal (gnome-terminal and the LXDE and Xfce ones) or system monitor and moving them from their default place. You get this little white botch at the corners. I'm not massively technical and I'm ambivalent about how much more I want to learn as I have plenty of creative outlets already, but I would like to solve this. Somehow xcompmgr is treating these programs as a different class? It's capable of drawing the window borders properly as it is just these two programs that get botched. Possibly this doesn't get noticed as maybe people usually use xcompmgr with openbox and LXDE and their square window borders. I did do a search but there was nothing matching what I saw.
View 3 Replies
View Related
May 30, 2010
I'm running CentOS 5.4 on i386 machine with 2.6.18-194.3.1.el5Whenever I login into Gnome, a gnome-termial window comes up. Instantly title says root@localhost before settling with user@localhost with current directory as ~/Downloads. Only happens with my particular user account (normal user), not with root as I tried. I also have KDE, Xfce, Fluxbox as other option at login, but terminal only shows up when I log into Gnome (not kde, xfce or fluxbox)I've done and
1. cronetab -e
Nothing there.
2. Don't have ~/.xinitrc ~/.session
3. Nothing in ~/.bashrc or ~/.bash_profile
4. Nothing in /etc/rc.local
View 4 Replies
View Related
Mar 24, 2011
I bought a multifunction stylus sx218 Espon model and I can not run the scanner function. I did some research and found a few solutions and very functional. I hope someone solves the problem. My version of openSUSE 11.2.
View 9 Replies
View Related
Nov 16, 2010
Code:
#include <iostream>
using namespace std;
[code]...
View 1 Replies
View Related
May 18, 2010
I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.
View 2 Replies
View Related
Mar 30, 2011
I'm currently using OpenSuse 11.1 web server. This is bad since 11.1 is no longer supported. the reason why I am using it is because Function set_magic_quotes_runtime() was no longer being used. (so I was told)
That being said, is there a way to get Function set_magic_quotes_runtime() to function on the newer versions of OpenSuSE?
View 9 Replies
View Related
Feb 21, 2010
the function terminates if no key is pressed for 10 consecutive seconds. I tried using the -t option as suggested in some forums, but my version of showkey doesn't have the option of changing the timeout. The options I get are:
-h --helpdisplay this help text
-a --asciidisplay the decimal/octal/hex values of the keys
-s --scancodesdisplay only the raw scan-codes
-k --keycodesdisplay only the interpreted keycodes (default).
Is it possible to write a script to use this function and still keep the function active until an interrupt is recieved?
View 6 Replies
View Related
Jun 21, 2010
how can I login into terminal istead of gnome? will I be then able to log into terminal by typing startx?
View 6 Replies
View Related
Sep 13, 2010
I would like to change the color scheme used in gnome terminal based on what host I'm connected to via ssh. Is this possible? If not, can you suggest any other terminal that has this functionality?
View 1 Replies
View Related