Programming :: Get Bash Script Using Zentity To Exit If The User Presses The Cancel Or Close Buttons?

Feb 3, 2011

I am trying to get bash script using zentity to exit if the user presses the cancel or close buttons.The exit codes are working fine; they read 1 or 0 depending on the status but it always assumes 0. This is the portion of the script: PHP Code:

function settings(){
result=$(zenity --height=30 --width=300 --list --checklist --title='Selection'--column=Boxes --column=Selections --column="Options" 

[code]...

View 2 Replies


ADVERTISEMENT

General :: Exit Bash Script - Add - Del - Edit User From Certain File Using Different CASE Variables

Mar 6, 2010

I have made a simple bash script through which i can add, del, edit user from certain file using different CASE variables. like
case
1. adduser
2. del user
3. edit user

Now i want to add a exit CASE like
1. adduser
2. del user
3. edit user
4. exit

Now i want to make a script such a way that, if user input is 4 then only script quit. I used with exit function also but it didn't work. if user press ENTER or other keys then also it quit the program.

View 6 Replies View Related

Programming :: Bash - Propogate Exit Status ?

Jun 10, 2010

I am running a command pretty similar to the one below:

Code:

I need to capture the exit status of that part of the command.

What I am trying to do is set a variable that can be modified within my_job.sh, and used to exit.

However, no matter what I set "status" to in my_job.sh, it exits with "0".

What can I do differently?

View 3 Replies View Related

Programming :: Bash - Using Exit Status For Decisions

Mar 3, 2010

How exactly can I use the exit status of a command in an if statement ?

Something like this:

Code:

View 3 Replies View Related

Programming :: Bash Syntax \ See 1 If The Exit Value Of Diff Is 0, And Otherwise Wanna See 0?

Dec 26, 2010

I'm new to scripting and I have a trouble with if statement syntax. The code is: Code: #there is a diff command here, and it does what i want but#i wanna see 1 if the exit value of diff is 0, and otherwise i wanna see 0.#the problem is here: (syntax error near unexpected token "then")

if["$?"==0];
then
echo 1

[code].....

View 1 Replies View Related

Programming :: Counting The Number Of Exit Variables - Bash

Jul 1, 2010

Is there a way to count the number of errors- an exit variable $? from one function?

The output from the exit variable (either erroneous or correct (1) or (0)) is it possible to add the erroneous one ups?

View 3 Replies View Related

Ubuntu :: Terminal Pauses Execution Until The User Presses A Key

Sep 9, 2010

I can't seem to find the Unix command that pauses execution until the user presses a key (i.e. the equivalent of "pause" in DOS). Obviously, I need this for programming. I know about all the performance and security issues of system calls, so please don't recommend I used ncurses or some other library instead. I only plan to use it in small programs that I write to test various algorithms and where perfection isn't needed.

View 3 Replies View Related

Programming :: Bash - Ps - Psgrep And Read /proc/$pid Make Script Exit

Mar 22, 2011

I have not been able to write bash to use a PID file to ensure no other instance of the same script is running! All three methods I can think of to see if the PID in the PID file is another instance of the script make the script exit with a return code of 1 but the same commands run at the command prompt work as expected.

The first attempt was:

Code:

The first attempted workaround was:

Code:

The second attempted workaround (with debug to make the following command prompt copy and paste meaningful) was:

Code:

Here's the command prompt session, testing with a stale PID file and then manually running the problem command and it behaving as expected:

Code:

This on Slackware64 13.1 which has bash 4.1.7.

In desperation I tried rebooting but the behaviour was the same.

View 2 Replies View Related

Programming :: Physical Memory Leaked By User Application Process Is Not Reclaimed Back After Exit?

May 2, 2010

Whenever I'm running my application process, I've 1M physical memory usage is increasing for every 2 hours.This I observed using 'free -m' command.But 'top' command did not showing any increase 'RSS' size.It is same as it was started initially.Even though I stopped my process,the increased memory was not released back. If I start my application process then again memory usage start increasing by 1M for every 2 hours. increase of memory usage observer with 'free' and that too when my application is running, but top command is not showing any change in the RSS sizeIf my application is leaking any memory which is allocated by new/malloc, that should be released back whenever my application exit and the size increase will be show through top command for that process, right? This is not happeningThis proves that there is no potential leaks in my process.But why physical memory is increasing when only my process is running?

View 14 Replies View Related

Ubuntu :: Cancel The Startup Bash Script?

Jan 8, 2011

I made a mistake on my home server. I installed the eXist xml db, and wrote a bash script so that it would start up when the machine boots up. But now, the server just hangs before the system asks for a user logon, so I can't ssh into the machine, and when I have the monitor and keyboard hooked up to it, it's not letting me logon or cancel the script. Anyway to kill the current running process and get to the logon, so I can delete that bash script?

View 1 Replies View Related

Programming :: Exit In Script Files Cause Konsole Terminal Itself To Exit?

Apr 11, 2010

I noticed that if I have "exit" in a bash script file., e.g. script.sh,that when the word "exit" is reached, and the script file being executed is not in the PATH nvironment, i.e. ". script.sh", the whole konsole shell profile is exited! What gives here? Is there another command compatible to "exit" to prevent this, or will I just have the leave the "." part in the PATH enviroment, which is, to my understanding, is not recommended? I desire for a "goto" function in bash script files

View 11 Replies View Related

Programming :: Why New Threads Exit When Main Thread Exit

May 22, 2010

In linux, creating thread is same as process (clone()), except the virtual address space gets shared with the parent.If a running main process(thread) creates new thread, and if main thread exits, why should the new thread too exit? both are different entities, The same doesn't happen if the child thread exits, the parent thread would be alive.

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

Software :: GNOME Terminator 0.93 Doesn't Close After Typing 'exit'?

Aug 23, 2010

I like the features of Terminator very much. It save my time. But on 2.6.31-gentoo-r10, I got a little problem: after typing 'exit', the system echo 'exit' and hang at with a mouse cursor (can't type anything):

Code:
quanta@dhcppc6 ~ $ exit
exit

[code]....

View 3 Replies View Related

Software :: JACK Windows Will Not Close Or Resize - No Exit Button

May 24, 2010

Why don't JACK windows behave in the standard way windows have, on every piece of software. for all OS's for many years? I haven't had the opportunity to test Jack audio in/out yet because of these problems. However, Jack does appear to start and indicates it is connected. After the Jack control panel loads normaly and appears to be connected, if I open the patchbay or messages panels, they cant be closed as individual windows. To close them I must QUIT Jack, and reopen, and reconnect. There is no exit button on the upper right corner of these windows.

If I right-click on these windows, the close option is shaded, preventing it's use. The Jack control panel does not appear to have drop-down menus to close them, either. If I accidentally do click the button in the upper right corner, which is habitual, the window will maximize to a scale that is somewhat larger than the size of the desktop on my screen, making resizing by dragging edges (top, bottom, corner) impossible. If I right click on the Jack Window's title bar (top) I can resize the window to my preference by clicking this option on the drop-down menu. It took me three or four weeks to find this option.

Also, I've seen some posts regarding Jack problems related to Firefox. Does Jack actually start Firefox when it opens or is connected? My system can't afford to have background processes or applications. System resources are too limited. I don't understand the difficulties involved with making Jack windows function as others do. It seems to my uneducated self, for example, that if the development of Jack had been done on some "visual" high level language, (Like C/C++ or Java, for example) making the windows function like others packages would simply be a matter of dragging GUI elements and defining their functions.

Here's a list of my system:
Old Single processor Intel box, P4, 3.0 GHz, with one Gig DDR memory
A old Sound Blaster 16 sound card. (works okay with linux)
(all hardware seems to be fully functional in all other Linux programs)
Linux Mint, (version 8) derived from Debian.
Ubuntu Studio, (version 10.4) also Debian.
Jack (version 0.3.4) on both distros. (Mint updated through repository< I believe, but I culd be wrong)
Firefox (version 3.5.9)

I prefer GUI solutions, but can generally get along okay with a terminal or file editor window. When it's absolutely necessary. The windows behave the same if I have another audio program running or not. The system works fine with ALSA drivers (MIDI.)

View 4 Replies View Related

Ubuntu :: Firefox Close Buttons And Tab Size

Aug 1, 2010

the size of the min,max, close buttons in the corner of firefox. They are very small and I can't find a way to increase them. I've tried different themes but that doesn't work.

The other thing I would like to increase is the size of the tabs. I DON'T WANT TO MAKE THEM LONGER, I WANT TO MAKE THEM TALLER so they are easier to hit when laptop is hooked to TV. Right now they are very short and I use the mouse on the arm of my chair (cloth) and it's a little difficult to hit them.

I've searched and read tips for the past week and none have what I need. They all tell me how to make the tabs longer or shorter and how to add or remove close boxes in the individual tabs. These don't do what I need done. Can these simple things be done in firefox or am I SOL?

View 2 Replies View Related

Ubuntu :: 10.04 Resize And Close Buttons Reversed?

Aug 22, 2010

The close, minimize, and resize buttons are all on the left side, which I like. But recently I've noticed that the Close and Resize buttons are switched. How can I fix this? Click the picture so you can see it.

View 4 Replies View Related

Ubuntu :: No Close Minimize Maximize Buttons?

Jan 9, 2011

all the windows i am trying to open don't show the close, min, max buttons. also, rhythm box and grooveshark (inside of chrome) won't play audio, i click play and the progress bar in the playing stays at zero. however audio in runescape works so its not the audio card...

View 2 Replies View Related

Ubuntu :: Min / Max / Close Buttons Moved After Update?

Jan 12, 2011

after i udated to ubuntu 10.04LTS, i applied updates one night and after reboot the minimize, maximize and close buttons had moved from the upper right corner of ALL windows to the upper left corner. i would like to move them back to the original location but don't know where or which config file to look in.

View 1 Replies View Related

Ubuntu :: Close / Minimize / Expand Buttons All Gone

Aug 1, 2011

I have just gotten back into Ubuntu and installed 11.04. However I happen to see alot of issues with this. Trying to run compiz and all bejesus is breaking loose on me here. The biggest frustrating one is this new desktop, after searching I found how to go back to old school way I use to use it.So, now I get into this desktop, start compiz after the other desktop totally barfed on me, this one is doing the same as well.I lost all of my little boxs at top to close minimize and expand the windows.

Seriously, they took something and turned it into this just so ppl quit complaining about moving from windows to this. I for one dont like it and it doesnt work right with nothing,(Sounds like windows ughh) very hard to navigate, where you think one thing is suppose to be and they totally moved it, took me half of yesterday to get my wifi working but only after I went back to old desktop, video wasnt working properly, only after I went back to old desktop.

View 3 Replies View Related

Ubuntu :: No Minimize And Maximize And Close Buttons?

Mar 6, 2009

Some how I managed to get rid of this buttons. I tryed to write ?sudo aptitude purge ubuntu-desktop && sudo aptitude clean && sudo aptitude update && sudo aptitude install ubuntu-desktop && sudo /etc/init.d/gdm? in terminal, and then restarted my laptop. There is still no effect I wrote ?metacity? in terminal and I got this message ?Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager. So how should I fix this problem.

View 6 Replies View Related

Fedora :: Missing CLOSE - MINIMIZE - MAXIMIZE - Buttons

Jul 19, 2009

I just had an update and after that it required a reboot. When I logged on the system there was no CLOSE, MINIMIZE, MAXIMIZE buttons on windows!

View 9 Replies View Related

Ubuntu :: Title Bar - Minimise And Close Buttons Are Missing?

Feb 24, 2010

After a week or so i noticed that the title bar (the one with the minimise and close buttons) is missing. After a little search i found that in terminal if i type metacity --replace it would come back.And that it did.However, everytime i reboot i need to do it again.Starting to get a little annoying now.

View 3 Replies View Related

Ubuntu :: Maximize, Minimize, And Close Buttons Not Showing At All?

May 16, 2010

After I completed the upgrade to Lucid, my maximize, minimize, and close buttons disappeared. I looked around on the forums and i didn't see any other posts about this problem. I'm sorry if i might have over looked one though. Anyways, the buttons are not on the left or the right, they just don't show up. I tried messing with the theme settings and I also tried some of the things that were recommended on the main sticky about bugs with Lucid, and i still don't have them. Dose anyone know how to fix this or will it fix itself with updates?

View 9 Replies View Related

Ubuntu :: Minimize, Maximize And Close Buttons Disappear?

Aug 21, 2010

I seem to have caused my minimize, maximize and close buttons disappear. Is there a GUI way to turn them back on?

View 1 Replies View Related

Ubuntu :: Moving Close - Minimize - Maximize Buttons ?

Sep 12, 2010

I have ubuntu 10.04 and installed a theme that I really love. However, this theme puts the buttons in the top-right corner of the window (close, minimize, maximize) is there any way to move them back to the left?

View 2 Replies View Related

Ubuntu :: Close / Minimize And Restore/maximize Buttons Gone Sometimes

Feb 1, 2011

The close, minimise and restore/maximise buttons are randomly gone! Its kinda irritating, it seems to consistently happen with Open Office word processor. So is there anything i can do about this?

View 9 Replies View Related

Ubuntu :: Lost Window Title Bar And Min/max/close Buttons

Apr 30, 2011

Just recently,on occassion when I log in to my main user, I don't get the Title Bars, or windows minimize, maximize, close buttons.

I have tried changing theme

I have noticed that running the "compiz" command from the main manu will restore the title bars etc, and that my second user (created yesterday) does not have that problem.

How can I diagnose what is going wrong ?

View 9 Replies View Related

Ubuntu :: Minimize / Maximize / Close Buttons In Unity

Jun 17, 2011

how to get the minimise,maximise,close buttons on a menu in Unity Ubuntu 11.04 ?

View 7 Replies View Related

Debian :: Maximize And Close Buttons Missing With Squeeze?

Jul 22, 2009

About a month ago I upgraded from Lenny to Squeeze and everything seemed fineBut sometime between then and now I lost the maximize and close buttons (I still have the minimize)This is only a minor annoyance for me but a major one for my wife.I searched the web and some other forums but have found no help.

View 3 Replies View Related







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