Programming :: Xdialog - How To Save Checklist Selection
Jan 31, 2011
I am creating an script with Xdialog.The checklist option is confusing me a litte. Can someone tell me how to save the checklist states so they can be used in a script? As an example:
Code:
Xdialog --checklist "Choose toppings:" 10 40 3
1 Cheese on
2 "Tomato Sauce" on
3 Anchovies off
I would then like to put these values through if/else statements to perform different things with respect to the user selection.
View 2 Replies
ADVERTISEMENT
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
Jun 18, 2010
How can I change the behavior of the selection buffer or a program that uses it ( I have xclip) to not send me text until the mouse button is released while clicking and dragging? This causes havok in the software I'm developing that tries to make use of the selection buffer. I need the full selection, not bits more bits more bits and then the full selection.EDIT: I cannot listen for mouse events such as button release outside of the GUI of my program.
View 2 Replies
View Related
Sep 18, 2010
I am creating a program that need menu with multi selection option for shell (CLI).I am using of Bash scripts.something that will look like that:
Menu:
[ ] option 1
[x] option 2
[code]...
View 2 Replies
View Related
Oct 18, 2010
I am trying to create an array that will allow me to print a list after selection such as:
1) Location A
2) Location B
3) Location C
Would you like to print selected locations? Print I have no idea how to approach this problem and don't know whether Perl, Bash or shell script would be the most useful in this particular situation.
View 5 Replies
View Related
Jan 11, 2011
Given the following data structure: Quote:
[Code]...
What is the minimum possible MySQL query to get a random data selection that includes each Index number only once and ordered ascending. The maximum index number is known. For example running the query should get the following data: 01, 06, 07, 02. Running the query again, you may get the same data or another possible combination like: 01, 05, 07, 04. Of course you could run a loop for 1 to max_index and process a random ordered data selection until the next index number is found. But I think this will result in too many database access. Also you could run max_index queries to get all IDs that correspond to the given index and randomly select one ID for each index.
View 3 Replies
View Related
Aug 1, 2010
I'm trying to use buildroot to cross compile some libraries for me. To do so I've set up build root to point to my working tool chain in the menuconfig.All seems fine however when I try to make (buildroot) I get the following error
rm -rf /root/buildroot-2010.05/output/build/buildroot-config
mkdir -p /root/buildroot-2010.05/output/build
cp -dpRf package/config/buildroot-config /root/buildroot-2010.05/output/build/buildroot-config
Checking external toolchain settings
Incorrect selection of the C library
make: *** [/root/buildroot-2010.05/output/stamps/ext-toolchain-installed] Error 255
I know it's pointing to the correct files and gcc as any wrong paths are reported in make menuconfig.
View 1 Replies
View Related
Nov 11, 2009
I am trying to evaluate the returning expression of a zenity checklis dialog.By creating the checklist. for example like this:retvalue=$(zenity --list --text "help me with the return value" --checklist ....and here the listI get some return likeapple | tree | cowHow would I now
if retvalue contains apple
commmand blabla
fi
[code]....
View 8 Replies
View Related
May 19, 2011
For a new Ubuntu box, what would be the security checklist for a new box?
View 4 Replies
View Related
Jul 10, 2011
That's the title of article at[URL]Did ubuntu do all this already or is it that ubuntu isn't secure out of the box that it is assumed to be?explain if these steps are applicable to ubuntu and why/why not.
View 5 Replies
View Related
Feb 1, 2011
What is the reason to drop Xdialog from the new release; is any replacement on the horizon? (beside zenity that is really crippled version of Xdialog).
View 6 Replies
View Related
Mar 30, 2010
How do I increase my font size in xdialog?
View 4 Replies
View Related
Mar 23, 2010
am trying this command
"Xdialog --title IMR --yesno IMRCAME 8 25 &"
Popup is comming but nothing showing on popup window. and getting below mentioned error on terminal. Gtk-WARNING (recursed) **: Failed to load module "libcanberra-gtk-module.so":
libcanberra-gtk-module.so: cannot open shared object file: No such file or directory
View 4 Replies
View Related
Feb 16, 2010
From inside my bash script, is there a way to increase my Xdialog default font size? If not, is there any other way to do it? I found a commercial program using Xdialog with instructions on increasing the font size, but they did not say how they did it. But, it does mean it can be done:[URL]...
View 3 Replies
View Related
May 8, 2010
I had Xdialog installed on a Jaunty machine. According to Synaptic, it comes from the section "Miscellaneous - Graphical (Universe)". I did a fresh installation of Lucid 10.04. But, Synaptic doesn't find Xdialog. I tried downloading the RPM build from the website, but alien seems unable to correctly convert it. I know that we're "supposed" to use zenity, but zenity doesn't have some of the features that I need.
View 9 Replies
View Related
Jan 21, 2011
I have a HP laptop, and recently I configured the Remote Control to control the sound, and make a funny joke when a curious friend press the Power button in the remote control. To make this work, I want to make a shell script that calls a dialog, not a console dialog, but a GTK dialog. Then I tried to install the package "xdialog", that is no longer present on the official repositories, and I tried to find a similar package, but no success. What comes closest is "dialog", but this shows only a console dialog.
View 2 Replies
View Related
Feb 15, 2010
From inside my bash script, is there a way to increase my Xdialog default font size? If not, is there any other way to do it? I found a commercial program using Xdialog with instructions on increasing the font size, but they did not say how they did it. But, it does mean it can be done: [URL]
View 3 Replies
View Related
Apr 1, 2010
need a script to achieve saving multiple text files as 0001 0002 0003 etc.or moving files to a folder displayed this way..there prolly is an " if " statement involved also...if 0001 exist then %+1 and so on.
View 1 Replies
View Related
Mar 28, 2009
I need to read from a file called ranking.txt the name of the players and the respective score. The file is something like this:
Code:
24145 John Burt
12442 Kate Blair
[code]...
View 2 Replies
View Related
Jul 22, 2010
I am new to linux scripting, but I have programming experience. I need to save the UUID for /dev/sda1 as a variable, lets call it id. I am sure there is a way to do this with the awk and blkid commands, but I do not know any of this well enough yet to figure it out and after a couple of hours of reading I am still lost as to exactly how I would put this together. I need to save the uuid as a variable so that I can run an if statement with it
if [ -f /media/$id/file ]
then
echo "copy successful"
else
echo "oh crap!"
honestly all I need the uuid for but I cant check this by doing the same if with /dev/sda1/file so I need to be able to save the uuid into a variable
View 7 Replies
View Related
Feb 7, 2011
i'm sniffing network packets with pcap in ubuntu, i need to save these packets somewhere in the memory and after a while read ans send them. how can i do this?
View 1 Replies
View Related
Jul 18, 2011
I am an avid user of gmail. Recently I have been receiving some important e-mails, and I want to download only those e-mails from that specific person to a folder.
View 1 Replies
View Related
Aug 13, 2010
less doesn't save command history, i.e. file .lesshst isn't created. If I create it manually, nothing writes to it too.OS AIX 5.3 I think linux users can have the same issue, hardly this issue depends on OS.
View 9 Replies
View Related
Apr 26, 2011
I create the file mytest.txt. Since this process is using this file. if I run this code in background and simply run "rm -rf mytest.txt" than file gets delete.Please help me how to save this file from other process.Here is my code
int main()
{
FILE *fp;
[code]...
View 9 Replies
View Related
Oct 7, 2010
Lets say I wanted to save my bash history permanently. I.e., so I could look in a log somewhere and find some command I used 6 months ago, like the one I used to get my printer drivers installed
View 1 Replies
View Related
Dec 9, 2010
Is there any simple example on how to take a screen cap and save it to a file?
View 11 Replies
View Related
Feb 20, 2010
I have created a file using open() and written data to it. Data appears as normal characters in the file. How to save these characters in a binary format in that file using C language? Here I mean that the characters should be actually stored as 0 and 1. Do I have to convert the whole data using some function or there is some standard way to do it in Linux?
View 14 Replies
View Related
Jun 26, 2009
I'll just say I am a complete Linux beginner, but I have done vbs, js, php, html web type stuff so I'm not a complete beginner to programming.However I've been trying to learn C and python but it's not making a huge amount of sense.I am wanting to make a simple low level program that copies an image from a mjpeg stream on 192.168.0.1/videostream.cgi for example to a variable then save that variable to a file on my system.I am aware that there are programs out there that would do this but I still want to make my own.
View 1 Replies
View Related
Jan 25, 2010
I wanna learn how to store data in text file and be able to modify it and save as well using C++.
Note: im using Turbo C++ 3.0
View 9 Replies
View Related
Jan 27, 2010
Browsing some websites I've found a code for online form where a user provides name, number, etc. Everything is created in html/javascript. I'm just wondering whether it's possible to collect this input and present it in a database form so that I'd be able to see who's provided data and all the details they entered.Actually, it doesn't have to be a proper database (it would probably require php/mysql). It could be a weekly/monthly report (a text file) of people who provided details. The website is hosted by a third party company.This is an html bit:
Code:
<body id="main_body" >
<img id="top" src="top.png" alt="">
[code]...
View 4 Replies
View Related