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


ADVERTISEMENT

Programming :: BASH: Dialog Menu With Descriptions?

May 5, 2010

I am envisioning a dialog menu with 2 sections, the top 2/3 a menu, then the bottom 1/3 is a message box. When you highlight a menu item it gives you a description of what it does in the message box. However I am not sure it is possible. Can this be done in BASH?

View 2 Replies View Related

Programming :: Grabbing Window Content Requires Drawable

Apr 9, 2010

I'd like to write a C/C++ program, that would grab content of window (in form of pixmap), which belongs to another application and do something with it. However, I ran into problems already at the beginning. In all toolkits I have searched through, I only found one function that claims to do what I want, namely XGetImage from Xlib. However, among other parameters like Display, coordinates, etc., it requires a Drawable. How do I specify a Drawable, that would correspond to the window I want to grab content of? Is there any easier way to achieve this?

View 2 Replies View Related

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

Ubuntu :: Unable To Select <OK> Or <Cancel> In A Bash Dialog?

May 27, 2011

I am attempting to put a SystemRecoveryCD ISO onto a USB drive by using a shell script that is bundled with the ISO file (usb_inst.sh). When I run this script, I am presenting with a dialog box with a blue background (see attachment) with two options: <OK> and <Cancel>. I am able to switch between the options by using the arrow keys and Tab, but if I try to select an option by pressing Enter, O, or C, a new terminal line appears (as in the attachment), preventing me from selecting anything in the dialog. I feel like I'm not doing something extremely obvious;

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

General :: How To Refresh A Graphical Display Through Bash Script?

Jul 25, 2011

I need to display a message graphically using a messagebox or textbox through bash script. However the message should be keep changing every 4 secs . I input the message from a file and use "gxmessage" to display it .

I do not like this solution and it looks ugly too , because it is visible that the message box is getting killed and forked every time..Can't I use the same gxmessage message box for all the messages just by putting new messages and hence refreshing the same box.Any idea , anything other than gxmessage will do , if a solution is somewhere else.

View 1 Replies View Related

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

General :: Bash - Use A Graphical Or Text Based EDITOR On Logging In Locally Or Remotely?

Aug 17, 2010

I can set my EDITOR variable in my .bashrc to e.g. gedit, which is a nice graphical editor on ubuntu. But when I log in over PuTTY that editor will fail.What is the best way to detect if I'm logged in and can run a graphical editor, or not, and set EDITOR appropriately?

View 2 Replies View Related

Programming :: Programmatically Getting Standard File Dialog

Jul 14, 2010

Is it possible to do the following in C/C++ in Linux:Without direct linking (my program should NOT depend on Qt or GTK), display a GTK or Qt based file dialog.The behaviour should be something like this when my program runs, when you want to open a file:The program scans whether you have Qt installed. If so, it somehow manages to link itself to Qt (e.g. dynamically loading the .so file) and display its file dialog and get the path from it. If Qt wasn't found, it tries the same with GTK. If that also wasn't found, it displays a less powerful replacement dialog instead (better than nothing).

Or is there any other simple way in Linux to get a standard file dialog somehow (similar to when compiling for Windows you can very easily get its standard file dialog, no matter what version of Windows, in your code, even if your program doesn't use any other Windows GUI at all).

View 4 Replies View Related

Programming :: Popup A Dialog On Application Start?

Apr 6, 2011

Anyway, here is something that is puzzling me and cannot think up a good way around it: I call the constructor and show elements of LoginDialog in the constructor of my QMainWindow, like this:

PHP Code:

MainWindow::MainWindow(QWidget *parent) :    QMainWindow(parent),    ui(new Ui::MainWindow){    ui->setupUi(this);    LoginDialog *lid = new LoginDialog(this);    lid.show();} 

LoginDialog is a QDialog and it does show up on application start... but...
It is not active! The QMainWindow is the active window, even if I put lid->activateWindow();

So, the question is: how do I pop up this dialog on application start in such a way that it will show the LoginDialog on startup as active window?

View 4 Replies View Related

Programming :: Cannot Get Conditional Statements To Work In XDialog/Dialog

Feb 5, 2011

I cannot seem to get if else statements to work. if $choice == Dog then i want it to say "you selected Dog" The variable choice has the value Dog in it as proved at the end by echo "yes $choice is $choice" following the error Code: ./test.sh: 37: [$choice: not found How do i get the conditional statement to work? What's wrong here? This is the full script:

Code:

#! /bin/sh
: ${DIALOG=dialog}
: ${DIALOG_OK=0}

[code]....

View 7 Replies View Related

Programming :: Graphical Programming Front - For Beginners?

Oct 31, 2010

What graphical programming front is best to use for Java and Objective-C programming. I have something in mind like Xcode on Mac.

View 4 Replies View Related

Programming :: Make Radiolist Dialog Which Content So Many Options What Is The Value Of The Variable?

Dec 14, 2010

How can I make radiolist dialog which content so many options what is the value of the variable?Quote:

echo "How many options?"
read=VAR
dialog --title "sdf" --backtitle "sdff" --radiolist "ffdsfsd" 15 60 5 "1" "first" on "2" "second" off "3" "third" off "4" "fourth" off etc..

I must explode dialog in loop and add options? or something like that?

View 2 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Ubuntu :: Graphical Volume Manager - Finding Graphical Partition Editors That Work With Lvm2

May 9, 2010

I know how to manage them from a commandline but I was wondering if there are any graphical partition editors that understand and work with lvm2?

View 1 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

Ubuntu :: Any Software For Grabbing The Video

Oct 3, 2010

is there any software for grabbing the videos even before it actually play back

View 2 Replies View Related

General :: Grabbing RE From String - Any Utility?

May 20, 2010

What's the best command to use to grab just a regular expression from some text input? I've got is some input is in the form:

<uninteresting><start-marker><good stuff><end-marker><uninteresting>

I can construct a RE to match <start-marker>.*<end-marker>, but is there a utility that would return *just* the <good stuff> I'm interested in? I realise that the alternative is something along the lines of:

Code:
cat <input-file> | awk -F'start-marker' 'print ${2}' | awk -F'end-marker' 'print ${1}'
but it would be better if I could do it all in one go.

View 5 Replies View Related

Programming :: Use Glade With C/python To Create A Graphical User Interface

Jan 30, 2011

I am working with ubuntu (linux) and have to create a graphical user interface. The GUI is a 2-D plot that have to plot a point. The point ( x and y co-ordinates) are not hardcoded, and are coming from another file (another piece of code written in c / python). I was thinking to use Glade with c/python to create this. But, I am not sure how to start with this.

View 4 Replies View Related

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 Replies View Related

Ubuntu :: Grabbing Edge Of Windows When Resizing

Aug 17, 2010

I've got a basic install (i.e., nothing fancy, no compwiz or whatever) of 10.4 (64 bit) on my computer, running gnome desktop. I find it very difficult to "grab" the edge of a window, when I want to resize it longer or wider and frequently I just wind up selecting the window below it when I try to drag it wider or longer. Is there a way to increase the border area in which that arrow-pointing-to-edge (as opposed to the usual cursor) appears to make it easier to grab the damn thing?

View 2 Replies View Related

Ubuntu :: Script - Grabbing Variables From Output

Jun 9, 2011

I want to be able to grab some text from a directory listing in a bash script, and then apply that text to future commands in the same script. For instance, say I do "ls -lais /media/Movies" and get:

2147560409 712544 -rwxr-x--- 1 root users 729645056 1999-03-07 11:45 Young Guns (1987).avi
2147560410 712400 -rwxr-x--- 1 root users 729497600 2002-01-09 01:11 Young Guns II (1990).avi

Then say I want to grab the year from this output and then use that information as part of the command to modify the file timestamp, such as:

touch "Young Guns (1987).avi" -t 198701011200
touch "Young Guns II (1990).avi" -t 199001011200

So that the result of ls -lais is:

2147560409 712544 -rwxr-x--- 1 root users 729645056 1987-01-01 12:00 Young Guns (1987).avi
2147560410 712400 -rwxr-x--- 1 root users 729497600 1990-01-01 12:00 Young Guns II (1990).avi

Anyway, that's just one example, but I often find myself needing to do this type of thing, and I'm sure its possible, just not really done enough scripting recently to know how to do it.

View 5 Replies View Related

General :: Grabbing TTY Output From Remote Machine

Mar 24, 2011

Here's the scenario, rsync is running in RMT on tty2. I (LCL) am connected to RMT remotely as root over ssh. Is it possible to grab output of RMT's tty2 on my LCL? I don't want to redirect RMT's tty2 out to my pts, just get a mirror output.

View 6 Replies View Related

Networking :: Grabbing Wiki Code Using WGet

Aug 2, 2010

I would like to grab wiki code from a wiki page using wget. Running this grabs HTML:
wget -O wikihtml.html [URL]
The first attempt at getting wiki code was to pretend to edit, and run:
wget -O wikiedit.html [URL]
but of course that grabs GUI HTML. I thought perhaps the text inside the text box would be in tact, but HTML is througout. How to get just the raw wiki code?

View 2 Replies View Related

Ubuntu :: Grabbing Short Clip From Audio File

May 12, 2010

I've got a short mp3 file from the BBC's League of Gentlemen comedy show. In the clip, Papa Lazarou tells his dwarfs to put a poster in the local shop. Then he says "Tell them the circus is coming to town."I'd like to grab that sentence "Tell them the circus is coming to town" so I can make it into a ringtone for my phone or something.

View 1 Replies View Related

Programming :: Using "dialog " To Generate Menu Base On Dir Contents

Oct 20, 2010

I'm just messing around trying to create a script that will give me a menu driven method of selecting a file from a directory. After doing some searching around on the web, I found that the "dialog" command might be able to provide what I need, but I'm not sure exactly if what I want is possible.

I was messing around with the --menu option and am getting pretty close, but not exactly what I want. Here's a snip of what I've been working with:

Code:

This gets me the results I want for the first option in the list, but the rest comes out a bit weird, as it's taking the directory contents and applying to the "tag" field as well. In fact, if there wasn't a need for the tag field, it would probably be working exactly as I want it to.

I plan on messing around a bit more to see if there is a workaround, but figured I'd post this just in case someone else had accomplished something similar. Essentially, this will be embedded in a script where each file in my $DIR variable will show in the menu and the selected file will end up in a variable for later use.

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







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