System Tray applications - control with bash script

Please post all general support questions for LXDE here.
Locked
sean0000
Posts: 5
Joined: Sat Aug 09, 2014 1:42 am
Location: South Central Pennsylvania

System Tray applications - control with bash script

Post by sean0000 »

Friends,

I have no idea why I was not a member here until now, I browse this site often. I have posted this question on other sites today, with no replies yet.

I have searched and searched, and probably don't really know what to ask, so this may be a doozy..........or I may just be standing in the middle of the forest.

How can I "focus/start/activate/bring up/open/show the window of" a systray application from the command line or better yet, from a shell script?

There must be many ways to do what I'm looking for, but I don't know any :-)

I'm composing "text messages" with an editor, then just copying the text to "Mutt" and sending it off. I have made a very simple bash script to open "gedit" and "Mutt" simultaneously. If I add "Osmo" to the shell script, I get an error message saying an instance of "Osmo" is already running. I would like to open all three applications simultaneously. My "Osmo" is already started "minimized" to the "systray" on boot-up. Osmo is used to keep recipient's cellphone carrier addresses.

How can I focus/activate (open the window) "Osmo" which is minimized in the systray? What command must I include in my shell script to do that? It should be just like using the mouse to click on the "Osmo" systray icon (or using a keyboard shortcut), which brings up an open window of "Osmo".

Using Lubuntu 14.04, 32 bit, so involves LXPanel, and the System Tray I'm using is the default plugin offered under Panel Preferences/Panel Applets.

Thanks for any help,

Sean
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: System Tray applications - control with bash script

Post by drooly »

a good application would have a command line option to do exactly that. so "man osmo" or "osmo -h" is the first step.
many also have hotkeys.
you can use xdotool to simulate key- or mouse presses.
also a tool like wmctrl might come handy.
sean0000
Posts: 5
Joined: Sat Aug 09, 2014 1:42 am
Location: South Central Pennsylvania

Re: System Tray applications - control with bash script

Post by sean0000 »

drooly,

You made my day. xdotool satisfied my needs perfectly.

THANK YOU :-)

Sean
Rex Bouwense
Posts: 1093
Joined: Sat Aug 27, 2011 5:44 pm
Location: Sierra Vista, Arizona USA
Contact:

Re: System Tray applications - control with bash script

Post by Rex Bouwense »

Great. It is always nice to have your first problem solved so rapidly. Welcome to the LXDE forum. As you probably already know, we are a small forum that deals with Lightweight X11 Desktop Environment. There are even a smaller number of active members. We welcome your contribution and hope that you will stay around a long time.
Rex
Locked