General :: Bash - Detect When A Terminal Gets Focus?

Jun 23, 2011

I want to be able to time how long I spend in front of a terminal. I'm thinking the best way will be to have some sort of timer that starts and stops when the terminal gains/loses focus. And it will have to work with multiple terminals...

I'm using GNOME.

View 3 Replies


ADVERTISEMENT

Ubuntu :: Focus On Window From Terminal?

Aug 2, 2011

Is there a command to focus (make active) a window based its process id

View 2 Replies View Related

Programming :: Graphical Dialog From Bash Without Grabbing Focus

Jun 28, 2009

I want to display an un-intrusive graphical dialog to notify the workstation user that a bash script has finished running. It should be "top level", so visible to the user when it appears but should not grab focus, so the user can continue working in the current window and dismiss the notification when convenient. Researching gdialog, xdialog, xmessage and zenity it seems none of them can do this; they all grab focus.

View 3 Replies View Related

Ubuntu :: Ensure A Gnome-terminal Is Kept In Focus?

Mar 8, 2010

how do I ensure a gnome-terminal is kept in focus?

View 3 Replies View Related

General :: My Terminal Cannot Detect The Flash Drive

Nov 26, 2010

My terminal cannot detect the flash drive at all time.

View 4 Replies View Related

Debian Multimedia :: Focus Is Trapped And Left Mouse Click Doesn't Transfer Focus?

Aug 9, 2011

I'm hit with a very annoying bug: mouse clicks do not give focus anymore, focus stays trapped and sometimes right clicking the element that last had focus allows the next left click to move focus. I'm running wheezy with kde. Searching the web it I found no solution but it seems my problem is close to what is reported there:e issue: after alt+tab the window decoration changes as if the focus had moved to the new window but it stays trapped in the previous window. Rebooting does not fix the issue.I have nvidia graphics set up with dual screen through the nvidia drivers but this setup has been working good for several months, so I don't think it's related.

View 4 Replies View Related

Applications :: Create Keyboard Shortcut/binding That Would Give Window-focus Back To Tilda Terminal?

Dec 20, 2010

is it possible (and how) to create keyboard shortcut/binding that would give window-focus back to Tilda terminal? Currently, it is necessary to LMB-click inside Tilda (or at least drag mouse-cursor over Tilda) to resume typing.

View 3 Replies View Related

General :: Detect And Kill Zombie Processes Left From The Command Line Of A Terminal?

Apr 28, 2011

how do I detect and kill zombie processes left from the command line of a Linux terminal?

View 3 Replies View Related

General :: Bash - Using Terminal Vs KDE?

Mar 18, 2010

Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get

How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal?

How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE?

View 3 Replies View Related

General :: [Bash] Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.

View 6 Replies View Related

Ubuntu :: Regain Focus Of "&'ed" Processes In Terminal

Dec 6, 2010

If you run the command:

Code:

How would you go about regaining "focus" of mpg123... if mpg123 is currently awaiting keyboard input so you can control next song, volume, etc?

View 3 Replies View Related

Debian :: Change Dragora Bash Terminal To Default Jessie Terminal

Feb 29, 2016

I mainly use debian jessie , recently i have installed daragora as my second os to get a feel of gnu/linux . the problem is that dragora uses bash , and it's commands are different from debian jessie terminal is there a way that i can use the same commands here in dragora?

View 4 Replies View Related

Ubuntu :: Bash Broken, Lost Functionality In Terminal (gnome-terminal)?

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

Ubuntu :: Terminal Bash / -bash: Ls: Command Not Found

Jun 5, 2011

I got a problem with terminal, since i'm really a noob with terminal i don't know how to fix it.Everytime i type in a command it shows for example:

-bash: ls: command not found

Even the basic commands don't work... just cd <directory> and those things works

View 9 Replies View Related

General :: Bash - Get Colored Output When Using Tab Completion In A Terminal?

Feb 27, 2011

Is there a way to get colored output when using tab completion in a terminal? My colors are fine everywhere else so I know that I've enabled a color terminal successfully. Using bash in Ubuntu (10.10).

View 1 Replies View Related

General :: Bash - Catch Or Stop A Shut Down From The Terminal?

Sep 12, 2011

Is there a way to catch or stop a Linux shut down after a reboot, halt or shutdown command has been entered?sudo shutdown -r +10 I should now have 10 minutes before the computer shuts down. If I change my mind and decide that I still want to continue running, how could I stop the shut down?

View 1 Replies View Related

General :: Bash Script Works In Terminal But Not In Cron?

Feb 17, 2011

I'm really running into a wall trying to figure this out. I have a Bash script and narrowed down the one command that doesn't seem to work via cron and it's my pgp decrypting line. Works fine if I run the command via terminal but if I run it via cron it doesn't output anything.crontab -e shows the cronjob and it runs, creates the log file with no output. Is there maybe something I need to run as well? Permissions look set, unless the cron is running as a different user(was under the assumption if it showed up under crontab while logged into that user, then it would run as that user.

View 14 Replies View Related

General :: Put Custom Text On Terminal (bash Script)?

Jan 19, 2010

This code:

Code:
#! /bin/bash
echo Okay.
echo
Does not do it....

P.S. I want to show my parents what happens when I do:

Code:
sudo make me a sandwich
and have it say "Okay."

View 11 Replies View Related

General :: The Terminal Displays Bash-2.3-$ Instead Of Username@computename?

May 11, 2011

My terminal is showing bash-2.3-$ instead of Username@computename.

View 5 Replies View Related

General :: Copy Previous Output From Bash Terminal To File?

Oct 26, 2010

I know how to redirect the output of a terminal to a file. For example, if I want to list all the files in ~/Documents and output to a file called test.txt, I would do this: ls ~/Documents > test.txt The question is, can I copy the output to test.txt AFTER I have carried out the command? This would mean that I wouldn't have to know in advance whether I want to copy the output to file. I want to do something like this: ls ~/Documents Then this: <bash command for copying standard output to test.txt>

View 2 Replies View Related

General :: Select Text In BASH Terminal Using The Keyboard Without Mouse?

Jan 2, 2011

How to select text in BASH terminal using the keyboard without mouse? I'm using Ubuntu 10.10

View 1 Replies View Related

General :: Bash - Sync Files Between 2 Remote Computers Using Terminal

Jun 25, 2011

I want to be able to synchronise files between 2 remote computers in both directions. Say for example that I want to synchronize my /home/Documents directory with <username>@example.com:/home/Documents What's the easiest way to update the folders in both directions, so that new/updated files on my home computer get transferred to the remote computer, and new/updated files on the remote computer get transferred to my home computer?

View 2 Replies View Related

General :: Delete Bash Terminal History Upto Certain No. Of Commands?

Jan 12, 2010

i want to delete some say 10 previous commands in bash shell!

View 3 Replies View Related

General :: Gnome-terminal/bash - Cancel Inserted Commands That Will Be Executed Later?

Mar 13, 2011

$ execute_some_long_command <command is executing> <Accidently press middle button that inserts bunch of garbage (including, for example, `rm -Rf ~/*`) into console>

How to let execute_some_long_command finish, but not execute inserted things?

View 1 Replies View Related

General :: Bash Script - Obtain Current Workdirs Of All Konsole Terminal/sessions?

Jan 15, 2011

I am trying to write a bash script that would save the current state of my konsole terminals and sessions. I'm using KDE3.X and for some reason the "profile" save does not save the current working directories... Anyway, I would like to know if there is an elegant way to obtain the current workdir of each terminal and session ? I've managed to do something with a clever use of DCOP extended functions, but it requires me to start every konsole with the --script option enabled, and I don't want to do that.

View 9 Replies View Related

Ubuntu :: 10.10 - Cannot Detect Subdirectory (Bash CD Error)

Dec 21, 2010

I'm trying to change to a subdirectory:
Code:
tony@advent:~/scratch$ cd Home-Arch
bash: cd: Home-Arch: No such file or directory

So I list the contents of the current directory:
Code:
tony@advent:~/scratch$ ls
duhome Home-Arch qcad_1.dxf qcad_1.svg runme stdout

OK, I assume I have mis-typed the subdirectory name in ways I cannot detect, so I copy the sub-directory name from the output of the 'ls' command, while within the terminal window, and paste it into the next 'cd' command:

Code:
tony@advent:~/scratch$ cd Home-Arch
bash: cd: Home-Arch: No such file or directory

I browse the directory and sub-directory in Nautlius - everything is there where I expect it to be. The folders/files are not hidden. What is happening here?

View 8 Replies View Related

Ubuntu :: How To Detect When EthX Interface Is Down From A Bash Script

Jun 11, 2011

I'm trying to write a small script and there's one part of it that makes me sick:

Code:

ifconfig eth$num down
sleep 6
ifconfig eth$num hw ether $mac
ifconfig eth$num up

The problem is that the ethX interface doesn't go down immediately after the first line is executed. So sometimes the change of MAC is called while ethX is up, no matter how big is the sleep time, which results in an error. Is there a way to make this work right?

View 1 Replies View Related

Programming :: Bash If *sometimes* Fails To Detect Embedded Newline

May 21, 2011

Using xsel I pass a selection into a variable. I then check that the variable includes an embedded newline to be sure that the selection returned by xsel is complete. If the selection content preceding the newline is just a single word, the check fails to detect the newline, thus

Code:

g fnm=`xsel`
g cat <<< "$fnm"
Whatis
apropos sear

[code]....

View 14 Replies View Related

Slackware :: If Close Terminal Ran Bash Script Inside / Bash Script Stops

Apr 28, 2011

I've noticed something, and hoped there was a work around.when I write a simple bash script, and run it, if I close the terminal i ran the bash script inside, the bash script stops. What are the solutions for this? Basically I want to run my bash script and close the terminal, keep the bash script running.

View 6 Replies View Related

Programming :: After USB Boot - Detect Which Device The Ramfs Was Loaded From - Bash Or Python

Sep 22, 2010

How one could determine (for use in a Bash or Python script) which device (eg /dev/sda1, /dev/hda1... etc) a ramfs was loaded from when booting from a USB drive.

I have a RIPLinux/Tinycore live USB disk that automatically needs to run a script that is stored on the same USB drive but not part of the RIPLinux/Tinycore image. (Please note that I do not want to put this script into the RIPLinux image.) I therefore would like to remix the RIPLinux/Tinycore ISO to automatically run this script once it has started up. After RIP linux has booted I would like to automatically mount the USB drive that RIPLinux/Tinycore was booted from. I need help detecting which device this is.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved