LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-13-2010, 12:53 PM   #1
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Rep: Reputation: 16
GNOME:(Convenience) Any way to input shell commands without bringing up a terminal?


Hi! First post. hooray!

Q: Is there any way, in GNOME, to input simple no-output commands like

Code:
gedit & exit
without bringing up a virtual terminal (or the likes)?

I'm a person who inputs commands and then end up with 15 inactive gnome-terminal's per hour. Partly because I haven't yet specified an alias with
Code:
& exit
appended, but also because this code does not necessarily kill the terminal.

I'm looking for a way to, for example, start firefox by holding the SUPER-key and typing firefox (then possibly execute said command by releasing SUPER-key.)

I know there are GNOME keyboard shortcuts. But each of them needs to be configured, and there is a finite number of physical keys. (For some reason)

In a pseudo-specification: The program I'm looking for would probably dump any output in /dev/null and send any input to the "standard IN stream". Probably some sort of daemon with no GUI component.

Thanks for your time. It's not an urgent matter.



EDIT: The pseudo-specification implies that it's not GNOME-specific in any way; more like an alternative to BASH that is neither GU- nor CL-I.

Last edited by kopatops; 03-13-2010 at 01:12 PM. Reason: Typo
 
Old 03-13-2010, 01:50 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Yes, there are at least two ways:

1) Run a application window: on the gnome standard keyboard shortcuts, hit Alt-F2 and type any command you want, like gedit, firefox, etc

2) If your keyboard have special shortcuts keys, bind one of them to a special command. Go to System/Preferences/Keyboard Shortcuts. On the panel you can see several actions pre-defined and its keys.

What I would like to know is how to create my own action on this list. When you figure out this, please, give me a note, ok ?

regards,
 
Old 03-13-2010, 01:59 PM   #3
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 16
How to add GNOME keyboard shortcut (reply)

Hi!

Thanks for the reply.

I'm aware of the GNOME keyboard shortcuts function. To add an action of your own I think you simply click "add" and define the command together with a name.

To bind the action to a key you need to click on the far right of the entry and it should prompt you for a key combination.

What I'm looking for is more of a way to send commands in the background (not the command, but the sending/request itself). Much like gnome listening for shortcut key combinations, but a "daemon shell" that listens for *any* keyboard input and "redirects it to stdIN" (pseudo), provided some super-key is being held down.

It might just be a crazy idea, though. I can see how this can be downright dangerous.

Last edited by kopatops; 03-13-2010 at 02:21 PM. Reason: More information
 
Old 03-13-2010, 03:04 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
If you want any kind of interaction, you have to use a terminal---I missed a reason that you do not want to use a terminal...?

If you are in a GUI and open a terminal emulator, then any process you start there will die when you close the terminal.

You can also use one of the consoles accessed with ctrl-alt-F1 (and F2, F3, etc.)
 
Old 03-13-2010, 03:19 PM   #5
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Ok. Thanks for the answer.

What I would like is to input commands to the system without a visible interaction.

Sort of like an invisible shell. I'm not sure if this even makes sense, but I don't see why it should be impossible.

Thought of a workaround:

Bring up the gnome application runner with ALT-F2. Make this window class 100% transparent with compiz.

That would sort of reproduce what I'm looking for. (In fact, it's far from it, but the behaviour might give a clue to what I want.)

Bare with me

Quote:
Originally Posted by pixellany View Post
If you are in a GUI and open a terminal emulator, then any process you start there will die when you close the terminal.
I don't really need the terminal ever to close, just for it to run in the background, like a daemon.

As for the reason I don't want to use a terminal;
I don't need a shell to get in my face, just to do it's job.

Last edited by kopatops; 03-13-2010 at 03:34 PM.
 
Old 03-13-2010, 03:57 PM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Quote:
Originally Posted by kopatops View Post
What I'm looking for is more of a way to send commands in the background (not the command, but the sending/request itself).
ohh, I see. No, sorry, looks cool but I never heard about such program.
I guess you need to write your own daemon....
 
Old 03-13-2010, 04:05 PM   #7
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Yea, if I could do more than some java programming, I might have given it a try

I guess I'll hope for either someone else finding it to be a reasonable idea and code it

Or telling me it is a linux-versial impossibility (and why it is).

Also, there's these popup consoles:
http://www.linux.com/archive/feature/119067

Which are quite neat. But are just frontends to the shell, like gnome-terminal is.

Last edited by kopatops; 03-13-2010 at 04:08 PM.
 
  


Reply

Tags
alternative, bash, commands, input, simple


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Determine If Shell Input is Coming From the Terminal or From a Pipe LXer Syndicated Linux News 0 02-11-2010 06:30 AM
[SOLVED] How to get gnome terminal execute different commands from diff. tabs? kusti85 Linux - General 2 01-06-2010 05:16 PM
How to stop gnome terminal 2.16.0 suddenly switching to Japanese input gnreeke Linux - Newbie 3 06-03-2009 03:44 PM
Editing terminal input prior to passing it to shell / application otho Linux - Software 4 09-10-2008 02:18 PM
Terminal Commands in Gnome connor Linux - Newbie 7 09-25-2003 09:19 AM


All times are GMT -5. The time now is 10:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration