WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (b)ash & inxi problem  (Read 3248 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
(b)ash & inxi problem
« on: January 13, 2016, 01:26:56 AM »
Hi!

I need a help with inxi.tcz

My problem is: I want to define a shortcut for fluxbox to call inxi.
Code: [Select]
Mod4 i :Exec aterm -geometry 100x25  -e inxi -F The call works but after the command is executed, the window closes. It's like inxi runs as a somehow embedded process and does not rest within the shell.

When i call inxi "by hand" within an aterm window all is correct. And the kind of calls by shortcut from within fluxbox works for other instances, e.g. htop
Code: [Select]
Mod4 h :Exec sudo aterm -geometry 110x30 -e htop
Any ideas. Thanks a lot in advance.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: (b)ash & inxi problem
« Reply #1 on: January 13, 2016, 05:04:10 PM »
As far as I know (I might be wrong), ATerm cannot be executed in a way that it stays active or waits for further input after it has done what it was commanded to do via command line parameters (i.e.  -e some-cmd). It just does what it was told to do (f.e. executing a script) and exits. Maybe there are tricks that can be used? Would like to know too.
Download a copy and keep it handy: Core book ;)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: (b)ash & inxi problem
« Reply #2 on: January 14, 2016, 05:45:41 AM »
xterm has a -hold option, not sure if aterm does.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: (b)ash & inxi problem
« Reply #3 on: January 14, 2016, 11:48:09 AM »
Hi emninger
The terminal closes because the command has finished running. It works with  htop  because it's still running. The
second you tell  htop  to quit, the terminal closes. What you need is something that keeps running after  inxs
completes its task. Here are a couple of examples using the  ls  command:

Code: [Select]
aterm -e sh -c "ls; stty -echo; while true; do sleep 1; done" &After  ls  completes, echo is turned off so that keyboard input won't scroll the screen. Then an endless sleep loop
executes keeping the terminal open. Click the  X  button to close the terminal.

Code: [Select]
aterm -e sh -c "ls; exec sh" &In this example, after  ls  completes, it invokes a new shell which gives you a command prompt keeping the window
open. You can now execute other commands from the window. Type  exit  or click the  X  button to close the window.