You are not logged in.

#1 2011-03-19 20:57:13

codeRage
Member
Registered: 2011-02-20
Posts: 29

Linux Port of a Popular Windows Program

Haha just kidding... actually its just the run dialog... go ahead and flame away tongue

#!/bin/bash
# A wholly misguided attempt at emulating the windows run dialog

xterm -geometry 30x1+600+0 \
     -rv \
     -fn 7x14 \
     -T "Run Program" \
     -e 'echo -n "> "; read -e CMD; nohup $CMD & \ ; sleep 1; exit'

I am curious how I can send command to the background, i.e. start an arbitrary program and have it fork so the window doesn't stay open forever.

Edit:
Fixed with falconindy's suggestion. Exec doesn't seem to work, but nohup does (for somethings).

Last edited by codeRage (2011-03-20 18:41:45)

Offline

#2 2011-03-19 21:00:40

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Linux Port of a Popular Windows Program

two choices:

1) nohup $cmd &; exit;
2) exec $cmd

programs like dmenu, bashrun, gmrun do a lovely job of this...

Offline

#3 2011-03-19 22:23:24

Awebb
Member
Registered: 2010-05-06
Posts: 6,662

Re: Linux Port of a Popular Windows Program

We already have exactly 2⁹⁷⁶⁸⁹⁵⁴⁷⁸ pieces of software that do what your program does. But it's far away from being a waste of time... I'm amazed to see, how simple things can be.

Offline

Board footer

Powered by FluxBB