Programming :: Possible To Check Which Window Has Focus Using Shell Script

Nov 7, 2009

I'm playing a game through wine (fullscreen), when I alt-tab back to my ubuntu desktop, the resolution doesn't change back, but stays at the game resolution.I'm currently using a shellscript that changes the resolution back to my origional resolution (using xrandr -s 0)

Is it possible to check which window has focus using a shellscript.If the game doesn't have focus change resolution to my origional resolution.

View 3 Replies


ADVERTISEMENT

Programming :: Check If Directory Exists Using Shell Script

Apr 20, 2009

I am trying to write some small script file that will check if a USB stick is connected to my pc or not. I can't seem to get it to work, but I am sure it is a very simple fix.

I am running on Fedora core 10.Can anyone help me figure out what the problem is?If I run these lines through console it works fine (meaning, I type the commands in this file straight in the command line/console).

View 9 Replies View Related

Programming :: Shell Script / How To Check File Size?

Jan 21, 2009

I have a file that's supposed to be growing in size 24/7. I want to check every 10 minutes via cron that it's actually growing. If not, send an email. Does anyone know how to write a script to do that?

View 3 Replies View Related

Programming :: Write A Shell Script Which Will Check A File Name In A Dir And Copy It?

Apr 2, 2010

I am a novice to the shell script. In my system from db server the log files are enerating with the name log1.txt,log2.txt..... It is capable of keeping 10 files at a time in dir called /db/sis/log1.txt. I want to copy the log1.txt to another directory when ever it generating by attaching the time stamp to it for the back-up purpose. this files will be there for a period of 24 hours. after that the back-up dir should be cleared and it start copying again the fresh file from the same dir.

View 3 Replies View Related

Programming :: PHP - Ping Test In Shell / CMD Window

Mar 4, 2010

I'm trying to do the following. from a php webpage click on a link, that opens a shell/cmd and runs an open ping to the device. so it must actually open a shell (for linux) or cmd (for windows) and run a ping to the specified ip. Currently i'm running an exec command, but for this i need to wait for the result to be fetched and print it out. I want to monitor it in realtime, by just clickingon the button. How to get this working?

View 1 Replies View Related

Programming :: Shell Script To Check Whether Directory Exists On Remote Server

Jan 17, 2011

I am new to scripting, would like to have a script that tests whether a directory exists on remote host & display the message accordingly. The remote hostname can be provided by means of file containing list of hostnames. Can use rsh for connecting to remote host.I tried with couple of scripts by searching google but didn't get desired result. Please help me, below is my efforts, $file contains list of hostnames.

View 10 Replies View Related

Ubuntu :: Click Window To Focus Not Top Bar

Nov 20, 2010

Before in 10.04 and previous, when I clicked on a window it was brought to the front. In 10.10 it doesn't, it accepts input but the other window over it stays over it until i click the windows top bar.

View 3 Replies View Related

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

Applications :: New Window Focus Bug In Pypanel

Nov 26, 2010

Pypanel is a great lightweight panel for window manager users, but I'm seeing a problem for which I've been unable to find a fix, or patch. Unfortunately pypanel has been inactive with no further development for a number of years so it's not likely to see any new releases with a fix any time soon.

The problem is that when a new window is opened in most window managers, the new window gains focus by default, and it shows at the top of the window list. However, pypanel does not show the new window focused within the panel unless you click on the task button in the panel, or you click somewhere on the newly opened window. All the other panels that I've tried focus new windows immediately after they open by default, just like most windows managers do.

I've run across others having the same issue, but no fixes or patches found after many hours of searching. Would any of you happen to know of a fix, a patch, or a work around other than using a different panel application?

View 3 Replies View Related

Ubuntu :: Unity: Maximized Window Not In Focus?

Aug 5, 2011

Using Natty 11.04. Often when maximizing an application from the launcher or opening them from the indicator area the application will have focus but will be behind the application I had open before. So if I would then close the window I see I actually close the application I had just opened as the menu area is for the new application.Example.

I am browsing using Firefox. I open X-Chat from the indicator area. I still see Firefox. I decide to close Firefox (or minimize) to get to X-Chat. All I end up in doing is closing (or minimizing) X-Chat because it had focus, the menu at the top was for X-Chat and not Firefox.This has had me launch and close many applications in error. The annoyance factor for this is ten.(Searched the forum but not being sure what the best search words for this issue would be I didn't find anything relevant)

View 5 Replies View Related

Fedora :: Change Window Focus Mode In Compiz In F14?

Nov 25, 2010

How can I change the window focus mode in compiz in F14? I prefer point focus rather than click focus, but the 'system -> preferences -> windows' cannot run in compiz environment.

Also, can I save the position of the terminal in compiz? I don't want to adjust the terminal positions manually after each logging in.

View 1 Replies View Related

General :: GNOME Is There A Way To Focus/activate A Window On Mouse Over?

Jan 26, 2011

I recall a partner in a CS class who changed my setup to focus a window on mouse over and that was really handy for programming with a ton of terminals open. I've seen Dwell Click under accessibility options, but that doesn't seem to do anything. I know that sometimes the GUI control applets have features undisabled that don't really do anything (i.e. WINS) if you don't have the right stuff installed. How do I get mouse over pretty much just simulate clicking the window.

View 1 Replies View Related

Ubuntu :: Stop Apps From Stealing Window Focus?

Jun 30, 2010

I have found a couple of posts complaining about this problem but none offering solutions. In a nutshell, I want to prevent ALL programs from creating new windows that steal the keyboard focus away from whatever window I was just using. The most common offender is Synaptic when running updates/installs. I will be typing an email, playing a game, whatever, and all of a sudden a new window will pop up, steal focus, and if I'm not paying enough attention, whatever I'm typing will interact with it and cancel something or say yes to something before I even realize it. Another really bad offender is Firefox with the dialogs to accept cookies or entering/leaving a secure website. I still want all of those dialog boxes to appear but I don't want them to automatically steal focus from my other applications. Another user suggested having them blink in the task bar and I like that well enough if it is possible.

Is there a way to lock the focus to the active program/window unless the end user switches it away (i.e. no stealing)?

One post said something about window rules but gave no details. A lot of posts talk about the mouse cursor position selecting the window option (which I do not want and would not fix this problem anyway). One post said it was fixed in Feisty (guess it came back...)

View 4 Replies View Related

Ubuntu :: Window Focus Does Not Work In Mozilla Thunderbird

Aug 19, 2010

i have ubuntu 10.04 installed and i haven't touched anything apparently relevant in its configuration. many times, when an application opens a new window and this should receive focus, it doesn't. for example, i'm in mozilla thunderbird and i click on "write" to write a new message, and i keep waiting, "why does it take so much to open???" - until i realised that the new message window was immediately opened but it didn't get focus, it is just blinking (in a barely pereivable way) in the panel on the bottom and i have to click on it to give it focus. it is not just thunderbird - just about any program, but not always. sometimes the same happens when switching some flash player web application to fullscreen mode (such as videos or megavideo): the full screen does not appear, i have to click on the icon on the panel on the bottom.

sometimes, even more weired behaviour are observed. for example, let's suppose i have windows a, b and c open and none of them is minimized. i'll call "icon" a window's button on the bottom panel. i click alternatively on icons of windows a, b, c, a, b, c and so on. expected: every time i click on a window's icon, the window should get focus and be brought to the front. observed: when i get to window a, it toggles its state from open to minimized and viceversa, that is, when i switch from c to a, it does as if i was already on a, so instead of bringing it to front, it minimizes it; then next time i come back to a, it gets restored.

View 6 Replies View Related

Ubuntu :: Make Focus Window-shifter Alt-tab Under Compiz

May 9, 2011

I upgraded to 11.04 and now the mouse focus doesn't change to the newly-selected window when I switch between windows with Alt-tab.

View 2 Replies View Related

Slackware :: Compiz-fusion Window Focus Not Properly Switching?

Mar 13, 2010

I'm hoping that this is a stupid question with a very simple answer that I just can't find.I've been playing around with compiz-fusion on -current64. When I have two windows open, if I close the top, active window, I would expect that the next window in the stack would receive the focus. However, it does not. I have to alt-tab to it or click it with the mouse.

View 3 Replies View Related

General :: Where To Switch Window Focus By Moving Mouse Over (in Fedora / Gnome)?

Oct 18, 2010

I am using Fedora11/Gnome and I frequently use several windows for input. I would like to focus on a window just by moving the mouse over it (but not pop up). However, I can not find anywhere to set up this option.

View 12 Replies View Related

Ubuntu :: Small Area Of The Screen Grabs Focus Doesn't Let Any Window Receive Mouse Actions

Jul 4, 2011

One of those things that make yo go "WTF?" After browsing the internet with Firefox, there appears a peculiar problem: if I move the pointer to a certain area of the screen, I can't click (left, right, middle) nor use mouse wheel. The area can be of variable size, but usually it's small, in the lower part of the screen, it's x dimension greater than y one (a horizontally placed rectangle). The problem doesn't go away when I restart Firefox (obviously it does when I reboot). It obstructs any window under it (I can't even click on the desktop where 'it' is). It's as if there is an invisible window that 'steals' focus when I move the mouse over it. I'm on 11.04, Classic Ubuntu (Gnome 2.3x).

A quick UPDATE: dragging an icon and dropping it on the said area behaves as if I dragged an item and dropped it where it doesn't belong (i.e. it just slowly returns to it's original position). Also, I tried killing it with Force Quit applet, but only my desktop reloaded.

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

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

Fedora :: [GNOME 3] A Keyboard Shortcut To Bring Into Focus The "Type To Search..." Window?

May 27, 2011

How to bring the "Type to search..." window into focus directly, not by switching to the "Windows view" first?Anybody knows the relevant keybord shortcut? I went though at a number of introductions to GNOME 3, and also examined various tabs at:

Code:
User
> System Settings

[code]...

View 4 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

Programming :: Check Menu & Check List In Utility Dialog?

Aug 19, 2010

I want to put check menu & check list in utility dialog.i dont know how i do this

View 1 Replies View Related

Programming :: Shell Scripting / Create A Shell Script Similar To Ls?

Jun 5, 2011

I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.

Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....

View 10 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Ubuntu :: Check If Window Is Maximized?

Aug 2, 2010

I was just curious if there was an easy way to check if a window is maximized in terminal (preferably with wmctrl and not by checking the x,y dimensions of said window)?

View 1 Replies View Related

Ubuntu :: Check If There Is Any Window Fullscreened?

Feb 23, 2011

I have following configuration: as you can see, I have two monitors, and my panels are located on the right monitor. Left monitor is a little bit smaller than the right one, so I prefer watching films on the right one.ut if there's a video fullscreened on the right monitor I can't use my computer because all icons are located on the right monitor. I'd like to move panels to the left monitor(it's easy),

View 9 Replies View Related

General :: Check Status Of A Shell Script?

Aug 2, 2010

I'm running CentOS 5.5 and have created an init script. The start of the script contains:

# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi

The start bit works fine, but I'm having problems with the status and stop part:

status)
echo -n "Status of script: "
status "/bin/sh /path/to/script.sh"
RETVAL=$?
echo
;;

In PS AUX the command appears as "/bin/sh /path/to/script.sh" and I can see the PID. But when I run:

./my_init_script status

It says the script is not running. Should I be using the /bin/sh bit, or just the full script path, or just the script filename?

The stop part of the init script utilises "killproc". Again what command should I be using to successfully kill all occurrances of the script?

View 1 Replies View Related

Ubuntu :: Check What Window Manager Currently Using (via Terminal)?

Mar 10, 2010

How can I check what window manager (compiz/metacity) I am using in the terminal? I know how to change from one to the other or to just visually see what is currently running, but I need to know a way to check in the terminal for a script. How can I do this?

View 7 Replies View Related

General :: Check If Remote Server Is Up - Shell Script?

Sep 10, 2010

I need to add something to an existing shell script that will check whether a remote server is up or not.basically (but I can't figure it out) :-

if [ -the server to check- ] ; then
echo "Server is Up"
else

[code]....

View 12 Replies View Related







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