bugGNU Octave - Bugs: bug #37330, desktop() function


bug #37330: desktop() function

Submitted by:  Guillaume <gyom>
Submitted on:  Tue Sep 11 14:57:43 2012  
Category: Octave FunctionSeverity: 2 - Minor
Priority: 3 - LowItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: GuillaumeOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Tue Aug 20 18:37:34 2013, comment #14:

Added new function in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/5ff843d739fc). Closing report.

Rik <rik5>
Project Administrator
Sat Aug 17 03:22:28 2013, comment #13:

I reviewed your patch and am ready to commit it. How would you like to be credited? We usually do "firstname lastname <email@address>". Would you like to be added to the list of contributors as well?

Rik <rik5>
Project Administrator
Thu Aug 15 13:14:21 2013, comment #12:

Please find attached a new version of desktop.m reflecting recent discussion.
Is there a way in Octave to start the GUI from the command line?

(file #28849)

Guillaume <gyom>
Wed Aug 14 16:13:54 2013, comment #11:

I just checked in MATLAB: if the GUI is already running, typing "desktop" is a no-hop.
Calling "desktop" with more than one arguments returns an error:

and only two arguments are accepted:

Guillaume <gyom>
Wed Aug 14 15:36:37 2013, comment #10:

I think we're all in agreement the only thing this function should do in Octave is tell whether the GUI is running for compatibility.

The proposed script that Guillaume attached treats zero args as an error, regardless of if the GUI is running. I'd even say treat more than one arg as an error.

Mike Miller <mtmiller>
Project Administrator
Wed Aug 14 15:20:28 2013, comment #9:

What should happen if the desktop is already running and you type "desktop"? Should that be an error, a no-op, or should it start a second desktop?

John W. Eaton <jwe>
Project Administrator
Wed Aug 14 14:03:02 2013, comment #8:

I was not sure where the file should be (scripts/general or scripts/ui?) so the attachment is not a changeset but a straight file.
You might also have changed your mind after the recent discussion on the maintainer list regarding on whether to call isguirunning() or not.

(file #28840)

Guillaume <gyom>
Tue Aug 13 18:51:46 2013, comment #7:

Sure. That sounds fine. If you can prepare a changeset I will commit it.

Rik <rik5>
Project Administrator
Tue Aug 13 12:23:24 2013, comment #6:

Thanks. I was not aware of isguirunning(). Is the conclusion that we could add a desktop("-inuse") function that would call isguirunning() in Octave?

Guillaume <gyom>
Mon Jul 29 19:31:12 2013, comment #5:

True, it could call isguirunning(). I was going by the OP's example, where desktop -inuse means I can print HTML to the console. Or who knows what other capabilities scripts might infer from it. Might be safer to have the function exist so there's no error, but always return false.

Mike Miller <mtmiller>
Project Administrator
Mon Jul 29 18:46:24 2013, comment #4:

I think 'desktop ("-inuse") is closer in equivalency to isguirunning() for Octave since we won't use a Java desktop even if the GUI is running.

Rik <rik5>
Project Administrator
Mon Jul 29 17:04:11 2013, comment #3:

I can't find any public reference to this function either. However, from the description it seems that

is identical to

Any other form of calling desktop() would be an error with invalid argument.

Mike Miller <mtmiller>
Project Administrator
Tue Sep 11 18:11:56 2012, comment #2:

I couldn't find it on the MathWorks' website as well; that's why I copied the help text.
There is no mention of this function being deprecated though. It is the matlab/general folder and is mentioned in the Contents.m there:

An example of use is the following:

When not using the desktop, you don't want the HTML code being displayed in your console.

Guillaume <gyom>
Tue Sep 11 17:40:48 2012, comment #1:

Has this function been deprecated by Mathworks? The complete list of functions for 2012A is available at http://www.mathworks.com/help/techdoc/ref/funcalpha.html and I don't find this function.

There is the function workspace() which is maybe related.

Rik <rik5>
Project Administrator
Tue Sep 11 14:57:43 2012, original submission:

In MATLAB (at least since 7.4 (R2007a)), there is a desktop() function:

It could be added to the list of Octave's unimplemented function; but having at least the option desktop('-inuse') to return false would help compatibility, in case the other options are not relevant in the Octave GUI framework.

Guillaume <gyom>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #28849:  desktop.m added by gyom (1kB - application/vnd.wolfram.mathematica.package)
file #28840:  desktop.m added by gyom (1kB - application/vnd.wolfram.mathematica.package)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by gyom (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Aug 20 18:37:34 2013rik5StatusNeed Info=>Fixed
    Thu Aug 15 13:14:21 2013gyomAttached File-=>Added desktop.m, #28849
    Wed Aug 14 14:03:02 2013gyomAttached File-=>Added desktop.m, #28840
    Mon Jul 29 17:04:11 2013mtmillerCategoryNone=>Octave Function
      Priority5 - Normal=>3 - Low
    Tue Sep 11 17:40:48 2012rik5Severity3 - Normal=>2 - Minor
      StatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup