Announcement

Collapse
No announcement yet.

[SOLVED] What are the 'variables' and what do they mean?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] What are the 'variables' and what do they mean?

    Cryptic, no?

    Okay, this is what I mean. The 'default' command (GUI) in Kubuntu Jaunty to launch Kate is:
    Code:
    kate %U
    What does the %U mean? And I know there are others. So where can one find out what they are and what they mean?
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    Re: What are the 'variables' and what do they mean?

    From the KDE User's Manual:

    26.1.3
    The Exec option in .desktop files
    Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run:
    %f A single file name; used when dropping file on icon, or with file associations.

    %F A list of files; use for applications that can open several local files at once.

    %u A single URL: if the app can handle e.g. FTP or HTTP URLs itself, otherwise KDE.

    %U A list of URLs; will download the file first and pass a local file to the app (!!)

    %d The folder of the file to open; useful if app needs to have file in current working directory.

    %D A list of folders, not very practical.

    %i The icon; --icon option; KDE app will use icon from Icon= line in taskbar.

    %m The mini-icon; legacy.

    %c The caption; --caption option; KDE app will use name from Name= line in taskbar.

    Examples: Exec line: ksirc %i, Command executed: ksirc --icon ksirc

    Exec line: cd %d; kedit $(basename %f), Command executed: cd /tmp; kedit file.txt
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: What are the 'variables' and what do they mean?

      Thank you. However, while the %c 'looked' promising, it doesn't do what I want. Here is what I have in
      K Menu > Applications > Utilities:
      Name: Kate - ROOT
      Description: Advanced Text Editor [ROOT]
      Comment:
      Command: kdesu kate
      In this way, Kate launches 'as root' after providing my password, with an 'untitled' blank document (the default behavior). The Title Bar of the running application shows: Untitled - Kate

      Editing the entry to add the %c to the command - kdesu kate %c - results in Kate launching 'as root' after providing my password, with a *named* blank document called Kate - ROOT. The Title Bar of the running application shows: Kate - Root - Kate

      What I want, is to have Kate launch with an Untitled blank document, but have the Title Bar show Kate - ROOT
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Re: What are the 'variables' and what do they mean?

        Originally posted by Snowhog
        What I want, is to have Kate launch with an Untitled blank document, but have the Title Bar show Kate - ROOT
        Code:
        kdesudo 'kate --caption "Kate - ROOT"'
        Should do that

        Comment


          #5
          Re: What are the 'variables' and what do they mean?

          YES! That did it. Thank you SO much!!

          That was included in the reply from GreyGeek:
          %c The caption; --caption option; KDE app will use name from Name= line in taskbar.
          But I only tried the %c.

          Thank you again. One more 'minor' issue solved.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: What are the 'variables' and what do they mean?

            I was also wondering what those meant. The other day I took a look at Google Chrome BETA command and I saw that "%U" at the end. Well, now I know xD

            Comment

            Working...
            X