Posted: Sun Oct 23, 2005 3:38 am Post subject: [rxvt] - How to make a run dialog out of rxvt - (Solved)

I want to find a way to autoclose a shell after launching a command. I don't know if this is even a factible thing (I can't think of any way to do this). Note that I want it to lauch the command and close the term in the same instant, not to close when the program that I launched ends, just like a graphical launcher would do (in the line of gmrun).

I should have been more specify. Yes, I can launch the programs that way, for example "sylpheed& exit" into an xterm. But what I want to do is to find a way to auto-attach "&exit" to the end of any arbitrary command. In other words, what I want is to make a launcher dialog out of an rxvt, since none of the available ones (in or outside portage) has anything to offer me. Gmrun is slow (yes, slower than a term emulator, dont ask me why), I dont like grun (the text in the buttons for my language goes out of the buttons) and appart from that two I dont know anything.

Im thinking about a way to automatically attach that string to any arbitrary command and seems that I will have to do some bash scripting, since I see no easy way around. But if I use a script to read it then I will lose the autocompletion feature.

bbrun, did not know about that one. Thanks, it seems a good replacement for gmrun. I can live without autocompletion. At least it loads fast. Anyway, I will continue investigating if I can make some hack to get my idea working. The memory consumption is much less if you use rxvt to simulate a launcher (nothing critical though...).

Of course, change the prompt for any other thing that you like, configure rxvt with the parameters that you preffer and bind it to a key. The most awesome run dialog ever, with history and autocompletion... Yeshhh!! Now I can really mark as solved. _________________Gentoo Handbook | My website

I removed the ugly overlay file, since this all seems to work ok together. Also dropped bash in favour of sh (there is no need for bash just to lauch a command). Another improvement: I added another macro for the escape key, so, if you press it, a ^C is sent to the term (that is to prevent the execution of any valid command that is already in the box), the rest of the procedure is similar to the enter key one. So, enter runs a command, and escape exits cleanly.

Another thing that Im trying to do is to use this as a kind of gksu (or whatever other graphical su frontend), so far, I did this:

But it refuses to let me in, I think it is because the whole string that the macro adds gets chained into the password, so, the pass is not valid. I dont know if I will be able to workaround this in any way... If I remove the macro line the thing works, but the term stays behind (just like a normal term would do).

That's all, just thought that I would better share this before I forget how I did it Any idea about the su thingy is wellcome though _________________Gentoo Handbook | My website