Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

gdk issue

Programming languages, Coding, Executables, Package Creation, and Scripting.
Message
Author
User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: gdk issue

#31 Post by GarryRicketson »

How else would you generate a menu to perform multiple functions.
That is a good question, but I don't want to derail the topic, but anyway, since you ask.
I like a "text" style menu, better the "graphics", and this can be done using a bash script, here is one I have, actually the first "menu" I tried, using a bash script,
Image
------------------
Image
This (above)was one I experimented with, but really did not like much, because "open box" all ready has the kind of menus I like,I did not go any further with it.
Then years ago, with DOS, and qbasic the "choice" command was a very simple
way to create a text menu, below is a example of a "quick basic" menu,
Image
But when I started using Linux, I needed to learn a different way make a menu, with multiple functions, so I started looking at bash.
I also like what can be done with perl, I do not remember the "program" off hand, but
on Debian, when I ran the command, I got a nice "text" menu, with explanations of the options, and blank input prompts, to enter my choice, it was a configuration, script.
I would have to do some searches, to find which command and program it was, I can not remember, but any way I like it, and noticed it was written using Perl, so that
is another option, I have just barely "scratched" the surface on that though.
After all said and done, I really do not know much, practically nothing about "programming" and script writing, how ever, with searches I usually can find "scripts" all ready written, and I find both Perl and bash easy enough to understand, "proof read", etc. So I am able to check the code/script and be sure it will not harm my system.
And it is easier to start modifying, to suit my needs if I need to.

rac8006
Posts: 28
Joined: 2016-05-02 15:33

Re: gdk issue

#32 Post by rac8006 »

@GarryRicketson
Why is it that most things in Linux desktop are graphic menus that you use the mouse to select what you want to be done. Yet you think I should
use a text menu using bash. Will bash allow me to open a USB port and read/write to that device? Since you like a text menu better than a graphic menu.
I would assume that you don't use gnome or KDE or any other type of graphical desktop. We are spending too much time talking about how to accomplish the
task and nothing about the task itself. Does it matter that you clock on a button or you type a number. The object is to switch PC. Not develop a better
way to do it.

Now that the program works. Im' done working on the program.

Thanks
PS I've used bash perl PLM algol dcalgol espol newp basic c c++ pascal cobol ASM machine language z80 6502 8080 8086-80x86

rac8006
Posts: 28
Joined: 2016-05-02 15:33

Re: gdk issue

#33 Post by rac8006 »

@tomazzi
Thanks for you help. The object of this exercise was was to write a program to duplicate what the program on windows did.
Now that it is working I'm off to work on more important projects. I didn't plan om learning GTK it just was one of the way
I found to do what I wanted to do using google.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: gdk issue

#34 Post by GarryRicketson »

by rac8006 »Yet you think I should
use a text menu using bash.
I am sorry, I guess you misunderstood, I do not think you
should use a text menu using bash, I meant to say you can create one using bash, if you want to.
But to clarify, you should use what works for you,
You asked,me,
by rac8006 »@garryRicketson
Thanks for helping with the images. How else would you generate a menu to perform multiple functions.
So this is all I was doing, is responding , that is how I would do these kind of thing,
but in no way am I trying to say, or think it is how you , or anyone else should
do it.
I am sorry if it sounded like I was trying to tell you what to do or how, I guess it would have been better to ignore the question, since it also lead to another topic.
my apology.
To clarify a little more, I my self use quite a few programs, that use GDK, and QT as well, when I said , I try to avoid using it, I mean that when I need to write a simple program or script, and , I do not use GDK, nor QT to do that, simply because I do not understand the process, and it seems to complicated to me, so why bother, when I can accomplish what I need to using something I understand better, like perl, or bash ?
But that is not to say I think someone else should do use that, every body should use
what ever suits them best.
Oh, and your welcome , on the images :D
--------------- edited-------------
by rac8006 » Will bash allow me to open a USB port and read/write to that device?
No , "bash" by it's self can not do that, but it can be done from a terminal, or or command line, and yes a bash or perl script can be made/written, that would do all of that for you, simply by typing in the "command" or name of the bash script:
Example:

Code: Select all

./run-my-script.sh
Assuming the script is written correctly, when you run it , it would detect and "open" the USB port, mount the device, and you could read or write to it, manually or via the same script, could tell it what files to write to, or copy etc.
The script can include menus, or input options, when input is needed, for example:

Code: Select all

output: this package will take 55mb disk space,
and remove these other packages,.bla,bla,bla
Continue: Yes or No
The input is yes or no .

Code: Select all

Download this package: Yes or No 
Perl is even better, then bash.
How do you think programmers started writing programs, before they had all the GUI's,and windows junk ?
by rac8006 » I would assume that you don't use gnome or KDE or any other type of graphical desktop.
:
Well, I do use a DE, sometimes but you are right, not very much, and you are right I do not use Gnome, or KDE.
I use "Mate", however Mate is actually a extension of gnome, and depends on having at least a minimal gnome environment.
More often I use "openbox".

I like to be able to use both hands on the keyboard, and sometimes do find it extremely annoying to have to reach over to the mouse and move it around, and then click it.
Fortunately, it is pretty easy to do everything from the keyboard.

But any way, I use the methods that work best for me, and I would try to encourage anyone else to use what ever method they prefer. When I read, or see someone complaining they are having trouble or problems with that method, I only am trying to share what works for me, maybe it would for them as well, but it is not intended to be saying they have to use it.
by rac8006 » The object of this exercise was was to write a program to duplicate what the program on windows did.
Now that it is working I'm off to work on more important projects.
Well that is good you got it working, the way you want it too.

Post Reply