General :: Bash - Checking Which Window Is Active In A Script?
Aug 8, 2010In a Linux bash script I can do several things with windows using wmctrl but I'm trying to figure out how to determine what the currently active window is.
View 1 RepliesIn a Linux bash script I can do several things with windows using wmctrl but I'm trying to figure out how to determine what the currently active window is.
View 1 RepliesI run my own icecast2 server. In the near future it looks like, I will be doing some shows. I would like to beable to change my link, so if I am broadcasting, to go to the stream if not pop a box for my schedule.Now from when I was checking to see if my webcam was up or not, i used this.does anyone know haw to change my code for this? I know when I'm not stream it generates a 404 error, in winamp (on windows)
View 3 Replies View RelatedI have been playing around with Ubuntu 10.10 for a few days. I had the functionality of when my mouse left the active window it would fade and any window behind it I moused over would come into focus. I liked this feature, but I broke it somehow. I was playing around with Compiz and all its cool animations, cube transitions, and other stuff. I am not sure if I did something in Compiz to break it or if that is unrelated.
View 3 Replies View RelatedI'd like to set my ESC key to close any active window. Is it possible ?
View 4 Replies View RelatedIs there a way to make conky stay behind my active windows?
View 1 Replies View RelatedI am using an automated bash script to upload some files to a remote ftp server . The script is working fine as it is , however I need to check if it uploaded the file successfully or not , so it can remove them. This is the ftp part of the script which is working fine for uploading files.
[Code]...
I like openSUSE 11.3 very much. When I move the mouse pointer to the upper left corner of the screen, my active window is immediately replaced by 4, smaller windows (I think that at the beginning I had a cube). I'm afraid this gobbles up a lot of memory and henceforth slows down my computer. Is it possible to have only one window "active" at the time? If I want, say a terminal screen, I can always activate it via the "Computer" button?
View 6 Replies View RelatedIt drives me craxzy, and I can't find anything I can do about it.When I start a new app--say FireFox, and I return to the window I was in, as soon as each window loads it insists that IT should become the active window.This is a general issue with me--all window type OS's seem to do this, but what I want (and THAT is supposed to be what the computer will do 4 me--what I want!No matter what, I want the active window to remain the active window regardless of what other windows are doing--including newly opening windows. If I want to do something with a new window, I'll go there on my own.I'm often writing and want to research something so will open a browser window, but it takes time for the programs to load & during that time I usually want to continue with whatever I was doing until I finish the thought. As is, I'm reading or typing along, and suddenly the machine pops me into the newly opened window--a real pain,
Of course, if I could tell it to either become active or not depending upon how I call the program, or which program or which program is active, that would be perfect.I'm not sure where the fix might be, but since it's a desktop intee problem, I'm posting it hereBaring a solution, any suggestions as to where that kind of action originates
So I was thinking of having my bottom panel just for harbouring active windows. I thought also to uncheck expand so it will grow larger when more windows are active. All of which is not a problem. But there's one thing stopping me from doing this.
Currently the active window stops when it reaches either panel.
[forgot to edit the green bar out. Ops. Ignore it.] So in either bottom corner nothing is displayed. How can I get the active window to go all the way to the bottom of the screen. Whilst the panel still appears above the active window? [Probably won't have transparent panel when doing this.]
Detect the current window that has the focus. For example at the moment am using firefox therefore teh function should say firefox is the main window.
View 2 Replies View RelatedI have a bash script that checks for contents in a folder every 15 seconds and then acts on it's contents. This works great for the average size file however on very large files it starts acting on the file before it's completely written. Is there a facility in bash shell to get a file complete signal or such? here is trigger to launch a larger script.
Code:
#!/bin/sh
while true
do
$HOME/bin/hpgl.sh >/dev/null 2>&1 &
[code].....
Fresh install of Debian 8.1, have not changed a single setting anywhere. Was scrolling in the web browser and noticed that if I scrolled up or down fast enough the active window changes. Using kde as the desktop environment. Also this has nothing to do with the browser as it happens with anything I have open. Heck trying to scroll in console and having a document open just flips between the two of them. Only way this does not happen is if I scroll slow enough.
View 1 Replies View RelatedI generally use dolphin as a file manager under KDE 4.4.1.
This is set up as a split window. Now, whenever I open dolphin, the right hand window is the "active" one. How does one make the left window the active one by default?
11.2
KDE 4.3.5
I have desktop effects on and window shadows enabled. The main windows don't seem to follow this, nor does any taskbar pop-ups when you hover your mouse over them. I even set the shadow settings to high/annoying settings but I only see it on context/right-click menus.
I don't like the blue shadow because it is too light, but I can't seem to find where to change it. This seems to also apply to in-active windows as far as the size of the shadow but with a gray shadow instead. Still, if the desktop effects were effecting this, then the shadows I see should be large. Plus, desktop effects only give you one color choice with it just being darker on the active window. How to change this?
There's something very annoying about how Nautilus opens "image viewer" windows.
They open, I can see them, but when I press the keyboard, it's still Nautilus which gets the commands.
This is because Nautilus stays the active window!
Most annoyingly, when I want to have a quick look at an image, and then close it, Nautilus closes instead (Alt+F4).
Does anyone know what I'm talking about?
How to solve it?
Compiz often keels over and then I have to restart the comptuer because even though I made a special script to restart it, I am unable to invoke it as I cannot change active window.However, since Metacity restarts itself, so should compiz. The question is - how?
View 5 Replies View RelatedSometimes at startup I get this message "Checking disk 1 of 1". Does that mean it's checking all partitions on the hd? After a bad shutdown there is no prompt for fsck to run and the system just boots up. In fstab I have both options set to "1" for the partition Ubuntu is on, all others set to "0". Any ideas on both?
View 3 Replies View RelatedI'd like to create a bash script that's mapped to hotkey to bring up my Empathy contact list if it's on a separate workspace, mimized to tray, or hidden and hide the window if it's focused.I think I need to use something like wmctrl -l and wmctrl -R, but I can't figure out how to get the window status (minimized to tray, different workspace, etc.)
View 1 Replies View Relatedhow to setup an Active/Active Load Balanced and High Available (If one of the nodes is down the system still runs) MySQL cluster. I have found quite a few howto's but I have some things unclear in my mind. I found a few solutions like this one: [URL] or this: [URK] Those are using two or four MySQL nodes, two Load Balancers to avoid a single point of failure but only one MySQL cluster management server. What happens if the MySQL cluster management fails?
I have also found a "MySQL Master-Master Circular Replication" technique but from what I read, with this option there is a chance that conflicts will arise if node A and node B both insert an auto-incrementing key on the same table.
Is it possible to split a bash terminal window in to two colums so you can run and see multiple commands at once instead of having to flick between?
View 4 Replies View RelatedI have a bash script and I'm dropping a file on script launcher shortcut. Everything seems fine, only that after executing the script console window closes, so I can't see if some messages were produced during execution.
As I just recently switched from Windows, this kind of problem is solved there by adding 'pause' command in batch script, on which user has to press key and script will then continue (finish) or by launching through 'cmd /k' which makes console window persistent.
Googling I found about 'sleep' command and more appropriate for me 'read' command, so I did this:
Unfortunately, I can't see any effect of 'read' command as console windows again terminates after execution. Execution is successful BTW. So what's the catch?
this has been driving me crazy all week, no matter what I try it just wont work.I have written a script that installs several programs, half way through it requires the machine to be rebooted.what I've been trying do do without success, is when the system restarts a terminal window opens and the script resumes.I've googled this, and it seems other people have aslo tried and failed to acheive the desired result.ok, I know it would be easy to just run the script without the terminal window (using cron @reboot or rc.local), but I really need the verbose output as the user must make 2 selections on the remaing installations.
View 3 Replies View RelatedIs there any way to get the name(s) of the file(s) selected in the window manager (gnome 2.32) in a bash script?
View 7 Replies View RelatedI like to start Emacs as part of a login script and leave it running for the duration of my login session (which is typically weeks).
I have scripts to call emacs-client which will allow me to use a file-manager or Windows Explorer to locate files and right-click to edit them in Emacs.
I often end up with a lot of emacs windows (frames) open and I like to just be able to close them by clicking on the MS-Windows or KDE X button at the top-right.
The trouble is, if the window is the last one, this will shut down emacs which will lose all kinds of interesting history information.
As a work-around I use C-x 5 0 which won't let me close the last frame but this is often not as convenient as using the mouse
Does anyone know how to configure Emacs so that it can intercept the Window-Close button of the last frame to either request confirmation or simply disallow it?
On MS-Windows, disallowing closing of the last window may cause logoff to hang if emacs is still running but I'm not too worried about that.
I chose Mint 8 Fluxbox and have the iso. I cannot figure out how to check the iso for errors and the MD5 signature.I'm using Windohs XP so I tried to install MD5sum.exe. When I double click on it to run it all it does is flash and then nothing.When I type in the commands it says it can't find it or it can't read it or something.I may be typing the commands incorrectly. I'm just not understanding.I need to check the iso for errors but can't understand how to check it.
View 5 Replies View RelatedI'm trying to determine if IE is viewing my web page with the following HTML code:
Code:
But I don't see anything except "Test for IE". It is like the tests are being treated as comments? Do I need to turn something on in the server?
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END
[code]...
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
I run Ubuntu 9.04 and was recently told by my university that my computer is massively port scanning the network. I am interesting in learning more about figuring out what is happening to stop it, but I am lost at where to begin. What steps should I take (or files to look at) to figure out what is happening?
View 3 Replies View RelatedI'm writing and correcting API documentation in Sphinx using reStructuredText. Does anyone know of a good spellchecker that will handle this format, or a bunch of Unix/Linux tools that will allow me to use Aspell with it?
View 1 Replies View Related