You are not logged in.

#1 2010-07-12 19:16:59

hwkiller
Member
Registered: 2009-07-21
Posts: 56

[SOLVED]A simple question about bash scripting

Just for fun, I thought I'd try making Arch as "parent friendly" as possible (i.e., easy to use once set up).  I've already made a nifty little "system maintenance" script that presents you with a "select" bash menu, with options being "Install, Remove, Update [Without AUR, with AUR, abs, exit], Search, Install and Search (using Yaourt), and exit"

That works wonderfully, and it only requires typing "sm" into the terminal.

But just to make it yet *more* "parent friendly", I thought I'd make a .desktop file.

This is the problem.

I want the shortcut to essentially open up the script in a terminal.  So it would have to execute, say, "xterm" and then open the "sm" script within the called terminal.

I believe this would mean I need to either add something to my "sm" script or make a new script that opens terminal and calls sm.

I'm sure this has an easy solution, but I'm a total amateur just having some fun.

Any suggestions?

Last edited by hwkiller (2010-07-13 00:32:48)

Offline

#2 2010-07-12 19:24:22

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: [SOLVED]A simple question about bash scripting

xterm -e sm

Offline

#3 2010-07-12 19:25:08

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: [SOLVED]A simple question about bash scripting

You're probably looking for the Exec= line in your .desktop file, specifically "Exec=xterm -e sm".

Offline

#4 2010-07-12 19:26:53

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED]A simple question about bash scripting

I am not a 100% on .desktop files since I never use them.

but if your command in the desktop file is something like

xterm -e /path/to/your/sm/file

that should work.

EDIT: Bah too late !

Last edited by Inxsible (2010-07-12 19:27:11)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB