Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Gnome and Matlab - missing icon

  1. #11
    Join Date
    May 2010
    Beans
    25

    Re: Gnome and Matlab - missing icon

    One thing that I noticed when messing around with this is that all the windows would again appear whenever I switched between different Appearance settings - from Normal to None to Extra - no matter what selection I chose it would cause all of the windows missing from the GNOME window list to immediately appear.

  2. #12
    Join Date
    Oct 2007
    Beans
    12

    Re: Gnome and Matlab - missing icon

    This problem has been bugging me for a while with Matlab. I finally decided to write a script to iconify then focus all my open Matlab windows when I see they are missing from the window list. Basically I added a custom launcher for this script to my panel and click it when I need to. This is a pretty crude solution but it's an improvement for me since I lose my matlab windows constantly. I would like to make it automatically figure out that matlab windows are missing from the list but I have no clue how to get the current window list from the window list applet (not anywhere near a proficient programmer).

    For my uses, I typically only have the main matlab window open with an editor and figures; hence, this script only looks for those windows to fix.

    Code:
    #!/bin/bash -x
    # This script requires the program XWIT, available from Ubuntu repo's
    
    
    # Find the Matlab main window's ID
    winID=`xwininfo -display :0 -root -children|grep "MATLAB "|awk '{print $1}'`
    if [[ $winID ]]
    then
    	xwit -iconify -id $winID
    	xwit -focus -id $winID
    fi
    
    
    # Find the Matlab editor window's ID
    winID=`xwininfo -display :0 -root -children|grep "Editor"|awk '{print $1}'`
    if [[ $winID ]]
    then
    	xwit -iconify -id $winID
    	xwit -focus -id $winID
    fi
    
    
    # Find all Matlab figures
    winID=`xwininfo -display :0 -root -children|grep "Figure $i"|awk '{print $1}'`
    i=1
    while [[ $winID ]]
    do
    	xwit -iconify -id $winID
    	xwit -focus -id $winID
    	i=$(($i+1))
    	winID=`xwininfo -display :0 -root -children|grep "Figure $i"|awk '{print $1}'`
    done

  3. #13
    Join Date
    Jul 2008
    Beans
    23

    Re: Gnome and Matlab - missing icon

    I have the same problem, looking for a solution and just had a few comments.

    deezer: Yes, the MATLAB desktop is based on Java.

    wiltk: Having to use a workaround is annoying, but yours is the closest to a solution I've found. Did you know about the -names option for xwit though? I was messing around with your code and reduced it to this:

    Code:
    xwit -iconify -names MATLAB Editor Figure
    xwit -focus -names MATLAB Editor Figure
    The nice thing is, you can call this using the unix() or system() function directly from the matlab command line (or create a script called fixwindows.m or something).

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •