LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2011, 06:43 PM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Rep: Reputation: 53
Find all menus available for GUI: Actual proof.


I was wondering if there was a bash command or something that would probe an application to maybe list the GUI menus (arguments) you could input to the application. This would also be interesting for CLI.

Let's say there was not a manual page for a bash command (options) and you wanted a "tire on the road" proof and not just recall something that is assumed to be correct or you did not want to click here there and e very where to see if a menu opened for a GUI?

I assume that this process could also work on the source code by searching for a input type of command.

This is just something I though would be a helpful hack type of thing and I'm not involved in a project for this type of functionallity. It's a shame that GUIs dont always list what they are capable of.

Last edited by theKbStockpiler; 04-21-2011 at 06:44 PM.
 
Old 04-21-2011, 07:06 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I'm not following you here.

What do you mean by listing GUI menus? Surely the most effective way to see what the GUI can do is simply to look at it? Are you talking about some kind of hidden options in the GUI that would not normally be visible?
 
1 members found this post helpful.
Old 04-21-2011, 08:13 PM   #3
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
Maybe

When I had Mandriva I used to Click on everything to see if a menu popped up;and sometimes one unexpectedly would, and you could not get any info for it anyways which is another topic. If you have a RPM distro you can click onto a RPM file that you downloaded and a menu to (install) will appear.You see or read threads where a member wants to install a RPM file and they get a CLI explaination when they are a beginner and GUI solution is perfect. Whether it is Gnome of whomever they don't have it together enough to convey what the hell their suite is capable of and if you don't find it by mistake it remains a mystery. Some good capabilities of GUI that was coded goes to waste. For example Opera has a GUI (argument) I presume or a GUI option that will let you appear to a server as a different browser but I can not figure out or search on the net how it is done.

I could probably try to find all the popup windows a GUI has stored in a file and track it down that way.
 
Old 04-21-2011, 08:20 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
Originally Posted by theKbStockpiler View Post
I was wondering if there was a bash command or something that would probe an application to maybe list the GUI menus (arguments) you could input to the application. This would also be interesting for CLI.
Are you referring to switches or options that can be passed to an application on startup?

If so, those would depend on the application, not on BASH.

If the application has a man page, the man page normally includes that information.

I know that the Opera browser installs a man page; so does OpenOffice.

I guess you could do some kind of regex/grep type search to parse all the man pages looking for switches, but it would hardly be worth the effort, not even as an academic effort.

Just my thoughts.

Last edited by frankbell; 04-21-2011 at 08:24 PM. Reason: clarity
 
1 members found this post helpful.
Old 04-21-2011, 09:01 PM   #5
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
Bash was just an analogy

I think it would be usefull if INSTEAD of seeing if there was a man page for a CLI command option, You could run an interactive application that would test to see what menus could be opened up by a said APPLiCATIONS GUI. I'
m probably wrong but it seems that the only way to interact with an application with GUI is through a menu so if you don't stumble across the menu ,it's full capabilities remains unknown. With CLI they spell it out for you in writing but with GUI you are really never sure.

Just doing a manual search to find the applications menus would be easier I imagine. Like when you click on to the desktop a menu appears to create a folder or whatever,if I could find the file that stores the options file the menu the application offers , I would know exactly what the GU interface is capable of.

I admit that this is somewhat of a stupid thread but looking in a file of stored menu items would not be that hard.
Let's say that we wanted to know if we had to install a RPM file with the CLI or not. Besides for probalbly being furnished by Gnome and just clicking on the icon, how would we be sure that there are no GUI provisions to install an RPM file? This is not a bash verse gui thing. They both have their strengths and I'm using bash as just an example or an analogy to a GUI program. So what I'm saying is I want to circumvent the GUI's documentation and not waste my time clicking on every icon there is. GUI applications should have a List that can be consulted to see what menus can be open.
 
Old 04-21-2011, 09:14 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I'm still not sure exactly what you mean, though I think I'm getting a little clearer--am I correct in thinking that you are primarily concerned about command line switches in applications called by a menu entry?

Any menu item can be edited to add or alter switches.

I guess that, if you use a GUI that automatically adds new programs to the GUI the way KDE and GNOME do, without asking any configuration questions, the initial menu configuration can be problematical, but opening the menu editor will reveal the switches, if any, and allow them to be edited.

I use Fluxbox, so the only way anything gets added to my menu is if I add it in a text editor.

Am I getting closer to identifying your concern?
 
1 members found this post helpful.
Old 04-21-2011, 10:21 PM   #7
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
I think so. This is really a GUI OOP question.

Let's say we are using an editor of kate or gedit. I go to the top of the window and at the menu bar if you click on to something like spell-checking,we know that the application is capable of spell checking. A different example is that konsole will only store so many lines of code so if the command goes on and on like strace I can not go back to the first like of code. How would I know if konsole is capable of allowing the user to backup to the first line the command used as output? In a GUI application there is most likely a file that the application is consulting for this kind of GUI data because the menu has to have it as a selection as in ,(Only store so many lines of Command output) or (Allow all command history of command out-put to be viewed). This is only really an analogy because CLI's usually have manual pages to consult where as a GUI all you can do is imagine where to try to open up a menu and click on the icon.

Let's say that X has facilities for Gnome to have menus appear and that depending on the application Gnome will insert choices that these menus display. I would need this file to see what the GUI of this application is capable of.There has to be a (system program) that consults this particular file that inserts choices for this (generic) menu.

Last edited by theKbStockpiler; 04-21-2011 at 10:26 PM.
 
Old 04-22-2011, 07:41 PM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I still can't fathom how this would be useful to anyone. If you wanted to see what options there were when right-clicking on the desktop, why would you consult a file that lists the menus instead of...just right-clicking on the desktop? I don't see how there is any situation in which it would be more efficient to read a listing of possible options instead of just using the program itself.

That said, I think you might be vastly underestimating how this all works in the first place. Programs do not contain a list of possible menu items within their code, so there is nothing to check or scan for. The best you could hope to do would be to return a listing of the UI strings (I.E. all of the text the GUI contains), but there would be no reliable way to link those to where they would appear in the program or how to access them. So you would have a listing of a bunch of totally unorganized lines of text without any useful context.
 
1 members found this post helpful.
Old 04-22-2011, 11:44 PM   #9
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
Just out of curiosity.

Code:
tmp$ strings /usr/bin/konsole
/lib/ld-linux.so.2
libkdeinit_konsole.so
_Jv_RegisterClasses
__gmon_start__
_init
_fini
kdemain
libstdc++.so.6
libm.so.6
libgcc_s.so.1
libc.so.6
_IO_stdin_used
__libc_start_main
_edata
__bss_start
_end
GLIBC_2.0
PTRh
[^_]
tmp$
Not terribly useful :-/

Count me among those who are left puzzled by this question.

Last edited by Telengard; 04-22-2011 at 11:46 PM.
 
Old 04-23-2011, 08:12 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by theKbStockpiler View Post
I was wondering if there was a bash command or something that would probe an application to maybe list the GUI menus (arguments) you could input to the application. This would also be interesting for CLI.
How would it benefit knowing the menu args? Why use the GUI to begin with? Point of a GUI is just that: a visual application to provide the user a means to perform action(s). How would knowing menu args aid the user? Remember that GUI menu's are specifically written for the very reason your asking for definition, not necessary. You trust the authors to have done complete task(s) to allow the user to trigger the event/app.

If you are speaking of launching apps from the cli then look at the info or man for the application.

I stand with other members: How is this beneficial or even practical?
 
Old 04-23-2011, 08:31 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
If you have a RPM distro you can click onto a RPM file that you downloaded and a menu to (install) will appear.
This wouldn't be an menu option for rpm packages. It is the default program associated with the rpm mime type in the file browser.

GUI programs do sometimes have command line options. For example, acroread has an option to convert pages of the pdf to postscript. You can start firefox with a particular profile. Kpatience starts with a selection of 12 card games. "kpat --spider" starts spider solitare directly. You could create a new shortcut to kpat and add --spider in the command line for the desktop icon.

If your complaint is that some GUI programs don't have help center entries describing the menu items, there I would agree with you.
 
1 members found this post helpful.
Old 04-23-2011, 05:54 PM   #12
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
I'm a big fan of Mandriva's MCC. Look what happened to them.

Let's say your mouse broke over the weekend and you did not know to Shift> Number-lock at the same time. How would you know that you could move the cursor with the number-pads arrows? If you press the tab charter in a webpage the cursor will move from one input box to the next and so on. These are not GUI examples but it gets the point across. If you don't know it is there you can't use it. I know a lot of computer users that don't know how to drag and drop.

I thought that maybe these menus might be in file like icon images.Open one file or run a script and you would not have to point and click on every icon that there is. It might be possibe because the window-manager is a different application and it is getting data from the application for the menu.

Can anyone expand on how the window manager receives the choices for the menu, useless or not.Thanks!
 
Old 04-24-2011, 02:07 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
GUI programs work by listening for signals. The signal might be a key press, a key shortcut, or a menu item selection. If an application doesn't handle a particular signal, it is ignored and the system picks it up instead. (I'm not certain offhand if the desktop sees the signals before the application, or the other way around. But basically, unknown signals are ignored, and they are passed on.) For keyboard shortcuts, you can modify application and system shortcuts yourself. Gnome, KDE and others have a program to do that easily. You can also use xmodmap to modify xorg key definitions, such as for pause, vol up, vol down, etc. I once had a ~/.xmodmap file so the volume wheel on my laptop would work.

The best interface for presenting program menu items is the menu itself. You can use the mouse to quickly explore the menu items and sub-items.
 
1 members found this post helpful.
Old 04-24-2011, 02:26 AM   #14
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by theKbStockpiler View Post
A different example is that konsole will only store so many lines of code so if the command goes on and on like strace I can not go back to the first like of code. How would I know if konsole is capable of allowing the user to backup to the first line the command used as output?
Do you mean to ask if a command fills the screen with its output and you want to see all of it including the first line, but since Konsole allows you to scroll up only a limited number of lines, you can't see the first line of the output?

If yes, then Settings->Edit current profile...->Scrolling->Unlimited Scrollback.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I find the actual Virtual -> Physical Memory Map Pages? VorlonInfoTech Linux - General 0 12-23-2008 09:17 AM
kickstart GUI cannot find on RHLE 4? hocheetiong Linux - Newbie 2 10-06-2007 03:11 PM
I need a GUI that can find duplicate files davidguygc Linux - Software 2 05-17-2007 05:54 AM
Where can i find keyboard shortcuts in GUI anilkumar Linux - General 3 02-17-2004 06:06 PM
mplayer can't find gui or fonts shanenin Linux - Software 3 09-24-2003 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration