Creating a Launcher for a terminal app w/ options solved

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Creating a Launcher for a terminal app w/ options solved

Postby jakobcreutzfeldt on Mon Oct 27, 2008 1:14 pm

Hi,

I'd like to create a launcher for GVim when I use it in a special case. I have a plugin for GVim to interface it with GNU R (stats program). In order for this plugin to work, GVim must be launched from a terminal. Once GVim is running, to start the plugin I use the command ":set ft=r", which works fine. From the console, I can run gvim -c ":set ft=r", which successfully starts GVim with the R plugin working. However, when I try to create a launcher (type = Application in Terminal, command = /usr/bin/gvim -c ":set ft=r"), the plugin does not start when GVim opens and when GVim opens the document's name is ":set".

Is it possible to create a launcher that recognizes command-line options? Am I just doing this wrong?

Thanks!
jakobcreutzfeldt
Level 1
Level 1
 
Posts: 13
Joined: Mon Oct 27, 2008 1:03 pm

Linux Mint is funded by ads and donations.
 

Re: Creating a Launcher for a terminal app w/ options

Postby Husse on Wed Oct 29, 2008 8:34 am

Two things comes to mind immeditately
Have you selected "Application in terminal"
One way that I have had to recommend to some is to make a small script and start the app via that script
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Creating a Launcher for a terminal app w/ options

Postby jakobcreutzfeldt on Wed Oct 29, 2008 8:46 am

Yes, I said in the post that I selected "Application in Terminal." How does one create a script in Linux, though? A simple text file of a certain format?

Thanks for your help!!!
jakobcreutzfeldt
Level 1
Level 1
 
Posts: 13
Joined: Mon Oct 27, 2008 1:03 pm

Re: Creating a Launcher for a terminal app w/ options

Postby Husse on Wed Oct 29, 2008 5:05 pm

?
If you use Gvim I really thought you knew how to make a script - vim being a really difficult beast :)
Make a text file named as you please
Content like this
Code: Select all
#!bin bash
gvim -c ":set ft=r"

Make the file executable
Double click to test > Select Run in terminal
If ok make a launcher that points to it
Put the script somewhere in home, where ever you like
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Creating a Launcher for a terminal app w/ options

Postby jakobcreutzfeldt on Wed Oct 29, 2008 5:23 pm

Great! That worked! Thanks!!!

Heh....once upon a time I learned a bit of vi so I only have a cursory knowledge of how to use the program. I learned all of this ":set ft" business while I was trying to set up this R plugin. But, I suppose I'll be using gvim for my R work now so I guess I'll be becoming a bit more familiar with it....

Anyway, thanks for your help! I knew that in the end this would boil down to being a newbie problem. :P
jakobcreutzfeldt
Level 1
Level 1
 
Posts: 13
Joined: Mon Oct 27, 2008 1:03 pm


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot], ktheking and 37 guests