2

How can I pass an option from a Unity shortcut? For instance, can I invoke "gnome-terminal --maximize" instead of "gnome-terminal" from the Unity shortcut?

4 Answers 4

1

One way might be to add a Quicklist for the parameters. You can find out how to do that here: What Custom Launchers and Unity Quicklists are available?

1
  • This appears promising, but I am unable to get it to work. If I strike any luck, I'll report back.
    – Tohuw
    Nov 10, 2012 at 17:52
1

If you want to pass the option every time you launch an app by clicking on the launcher in the launch bar, this is what you could do:

Install the app called "Alacarte" (also known as "Main Menu") from the Ubuntu Software Center. In this app, you can modify the command called by each launcher, or even create new custom launchers. I think you will like it.

2
  • Unless it has changed completely since I last used it, this would not let me make a Unity launcher. I'm not seeking to replace the Unity launcher at this point.
    – Tohuw
    Nov 10, 2012 at 17:51
  • 1
    Alacarte should help you make launchers. Otherwise, it is a bug. If you report this bug on Launchpad, your help will be much appreciated.
    – Agmenor
    Nov 12, 2012 at 4:13
0

I don't know if by "Unity shortcut" you mean a launcher in the launch bar or any button in the Unity Dash. If you mean the latter, keep on reading.

You can "launch" (execute) commands from Unity with the keyboard shortcut Alt+F2. This opens up a "Run a command" interface, where your previous commands are conveniently remembered.

1
  • Yes, I'm aware of Alt+F2, but I meant the former option, not the latter. I have seen the launchers called "Unity Shortcuts" whereas I would think of anything inside Dash as a "Dash Shortcut". I'll try to use more specific terminology in the future.
    – Tohuw
    Nov 10, 2012 at 15:08
0

First off, I apologize to Agmenor for my lack of understanding in his solution.

I now see that the launchers you can modify in alacarte are the same items generated in Dash. Therefore, I was able to customize the terminal item and add the needed parameter, remove the existing Unity launcher, then add the launcher back after executing it from Dash. While this is still a little clunkier than I wanted ideally, it did work.

I consider this question now solved. I will take the time to learn exactly what Alacarte is modifying and perhaps post a future self-answer with details on how to achieve the same effect with no extra tools.

Thank you to everyone who contributed to this solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .