Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Unity. The Quicklists feature is really useful. I added some entries in the nautilus quicklist from Ubuntu Tweak. Those commands were easy to figure out.
But now i do not know how to find the commands that should be used to add a quicklist. Every app has different way of a command.

For example:

While nautilus commands are like- nautilus /home/username/Music. Chrome commands are completely different. like this- /opt/google/chrome/google-chrome

Now how do i figure out them for applications which do not have any by default?

share|improve this question
    
Sorry could you give an example of some of the specific things you want to do? your nautilus example has nautilus open a specific folder, whereas the chrome example is just the path to the chrome application itself. Do you want to know the locations of various applications (most are stored in /usr/bin/, chrome is kind of an exception), or the extra functionality you can add in with a command switch (like opening a specific folder or webpage automatically)? –  adempewolff May 27 '12 at 13:28
    
Yes i would like to do that...And alos,in software center have update manager,etc.Or in Nitro have direct entries for add a task etc...BTW i found this too-askubuntu.com/questions/35488/… i would still like to know how to find the commands –  Nirmik May 27 '12 at 13:32
    
@Alvar...Thanx...I have to rite the question inthat manner many times coz with the size being small,i always get the error "It does not match quality standards" –  Nirmik May 27 '12 at 13:36
2  
@Nirmik You get that error bcoz you indeed aren't typing the question properly i.e too many "!" or "?" or no proper full stops, line-breaks etc... –  Ashu May 27 '12 at 15:03
add comment

2 Answers 2

it is very easy

[NewIncognito Shortcut Group]
Name=New Incognito Window
Exec=/opt/google/chrome/google-chrome --incognito
TargetEnvironment=Unity

you must add a line like this

X-Ayatana-Desktop-Shortcuts=XXXXX;XXXXX;XXXXX here XXXXX is name in [ ] except Shortcut Group

now for example,

you can give any name in between [ ] like here is NewIncognito Shortcut Group. but you must write Shortcut Group after name. it means that you can give any name in [NewIncognito Shortcut Group] in place of NewIncognito only.

Name= Can be anything but meaningful to know what it does.

Exec= is path to that executable(only if the directory is not in PATH variable) file like Exec=/opt/google/chrome/google-chrome

now the actual thing which is main thing for all this fuzz is parameter passed while opening the executable. here it is --incognito.

You always know which executable you want to start but your main problem is

Which parameter to use? or how do I know to use this one or that one?

just open terminal cd(no need to cd to dir if it's in your PATH variable) to directory where your executable is located.

now write name of your executable file(here is google-chrome) and then write --help. so You would type

google-chrome --help

this will show you different options or parameters which can be passed and other info about them. here is output

OPTIONS
       Google  Chrome has hundreds of undocumented command-line flags that are
       added and removed at the whim of the  developers.   Here,  we  document
       relatively stable flags.

   --user-data-dir=DIR
          Specifies  the directory that user data (your "profile") is kept
          in.  Defaults to ~/.config/google-chrome .   Separate  instances
          of  Google  Chrome  must  use  separate  user  data directories;
          repeated invocations of google-chrome  will  reuse  an  existing
          process for a given user data directory.

   --app=URL
          Runs URL in "app mode": with no browser toolbars.

   --incognito
          Open in incognito mode.

   --version
          Show version information.

this output is very long and i should not paste all here.

google-chrome --help opens manpage actually. but most of the time only text output is given in terminal.

lets take example of banshee

if you run banshee --help it give something like

Usage: banshee [options...] [files|URIs...]

Help Options

  --help                   Show this help
  --help-playback          Show options for controlling playback
  --help-query-track       Show options for querying the playing track
  --help-query-player      Show options for querying the playing engine
  --help-ui                Show options for the user interface
  --help-debug             Show options for developers and debugging
  --help-all               Show all option groups
  --version                Show version information

they have divided help category wise. Now I want to know options for playback so I will type

banshee --help-playback

which shows,

Playback Control Options

  --next                     Play the next track, optionally restarting if the
                             'restart' value is set

  --previous                 Play the previous track, optionally restarting if
                             the 'restart value is set

  --restart-or-previous      If the current song has been played longer than 4
                             seconds then restart it, otherwise the same as
                             --previous

  --play-enqueued            Automatically start playing any tracks enqueued on
                             the command line

  --play                     Start playback
  --pause                    Pause playback
  --toggle-playing           Toggle playback
  --stop                     Completely stop playback
  --stop-when-finished       Enable or disable playback stopping after the
                             currently playing track (value should be either
                             'true' or 'false')

  --set-volume=LEVEL         Set the playback volume (0-100), prefix with +/-
                             for relative values

  --set-position=POS         Seek to a specific point (seconds, float)
  --set-rating=RATING        Set the currently played track's rating (0 to 5)

Now you know how to make it play next or previous or pause. So you can create entries like

Exec=banshee --next for next song

Exec=banshee --pause to pause song

Exec=banshee --previous to Play the previous track

share|improve this answer
    
okay m trying all that you told but can you tell me will this-askubuntu.com/questions/35488/… work in precise?? I tried te terminal and software center one but it dint work... –  Nirmik May 27 '12 at 14:07
    
@Nirmik though I don't use precise, it supposed to work. –  virpara May 28 '12 at 14:07
    
@virpara...The ones with comletely new desktop entries worked...but the ones with only quicklists additon dint...and in chrome etc,i wanted to add new tab and history and stuff like that which i do not get in the above method u mentioned... –  Nirmik May 28 '12 at 14:10
    
@Nirmik quicklist is idea to start app with different parameters which it have. I could not figure out how to tweak for new tab and history. –  virpara May 28 '12 at 14:19
    
@Nirmik I'll try to solve that give me time. already got two other projects to do and exam. I'm keeping everything noted. thanks to tomboy. –  virpara May 28 '12 at 14:34
show 1 more comment

Most applications are either stored in the directory /usr/bin/ or have a link in that directory to where they are stored. Graphically you can navigate to the directory with Nautilus (the default file browser) and press Ctrl+F to search for the application name. Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.