{"id":1886,"date":"2009-11-24T18:04:23","date_gmt":"2009-11-24T17:04:23","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=1886"},"modified":"2009-12-20T11:07:28","modified_gmt":"2009-12-20T10:07:28","slug":"adding-a-matlab-icon-to-the-gnome-applications-menu-in-ubuntu","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=1886","title":{"rendered":"Adding a MATLAB icon to the GNOME Applications menu in Ubuntu"},"content":{"rendered":"<p style=\"text-align: left;\">One of the problems with the Linux MATLAB installer is that it doesn&#8217;t add any items to the menu in windows managers such as GNOME or KDE so you have to do it manually.\u00a0 Now, there are several ways to do this but one of the easiest is to use the GUI tools provided with Ubuntu (assuming you are using Ubuntu of course).\u00a0 For the record I am using Ubuntu 9.10 (Karmic Koala) with the default GNOME windows manager along with\u00a0 MATLAB 2009b but I imagine that these instructions will work for a few other configurations too.<\/p>\n<p style=\"text-align: left;\">First things first, you&#8217;ll want to download a nice, scalable MATLAB icon since the ones included with MATLAB itself are a bit crude to say the least.\u00a0 I tried to create one directly from MATLAB using the logo command and the <a href=\"http:\/\/www.mathworks.co.uk\/matlabcentral\/fileexchange\/7401-scalable-vector-graphics-svg-export-of-figures\">Scalable Vector Graphics (SVG) Export of Figures package<\/a> on The File Exchange but the result wasn&#8217;t very good (see below).<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/svg_preview.png\" alt=\"SVG preview\" \/><\/p>\n<p style=\"text-align: left;\">Fortunately someone called malte has created a much nicer .svg file (using inkscape) that looks just like the MATLAB logo and <a href=\"http:\/\/hpmalte.blogspot.com\/2009\/04\/matlab-vsg-icon.html\">made it available via his blog<\/a>.<\/p>\n<p style=\"text-align: left;\">Once you have the svg file you can start creating the shortcut as follows:<\/p>\n<ul>\n<li>On the GNOME Desktop click on<strong> System<\/strong>-&gt;<strong>Preferences<\/strong>-&gt;<strong>Main Menu<\/strong><\/li>\n<li>Once the Main Menu program has started choose where you want your MATLAB icon to go and click on <strong>New Item<\/strong>.\u00a0 In the screenshot below I have started to put it in the Programming submenu.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome1.png\" alt=\"MATLAB GNOME integration 1\" \/><\/p>\n<ul>\n<li>Give your shortcut a name and put <strong>matlab -desktop<\/strong> in the <strong>command<\/strong> field.  If you didn&#8217;t create a shortcut to the matlab executable when you installed the program then you may need to put the full path in instead (i.e. something like  \/opt\/MATLAB\/2009b\/bin\/matlab )<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome2.png\" alt=\"MATLAB GNOME integration 2\" \/><\/p>\n<ul>\n<li>Now let&#8217;s sort out the icon. Click on the spring on the left hand side of the above window to get the window below.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome3.png\" alt=\"MATLAB GNOME integration 3\" \/><\/p>\n<ul>\n<li>Click on Browse and then select the folder that contains the .svg file you downloaded from malte&#8217;s blog.\u00a0 I put it in my Desktop folder for the screenshot below.\u00a0 Note that the svg file doesn&#8217;t appear in the preview pane.\u00a0 Click on Open.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome4.png\" alt=\"MATLAB GNOME integration 4\" \/><\/p>\n<ul>\n<li>Choose your icon.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome5.png\" alt=\"MATLAB GNOME integration 5\" \/><\/p>\n<ul>\n<li>Click on Close and you are done<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.walkingrandomly.com\/images\/matlab\/matlab_gnome6.png\" alt=\"MATLAB GNOME integration 6\" \/><\/p>\n<p style=\"text-align: left;\">If you are using the Student version of MATLAB then the process is slightly different and has been covered by my friend <a href=\"http:\/\/blog.crossedstreams.com\/ubuntu\/matlab-from-the-ubuntu-menu\/\">Paul Brabban over at CrossedStreams.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the problems with the Linux MATLAB installer is that it doesn&#8217;t add any items to the menu in windows managers such as GNOME or KDE so you have to do it manually.\u00a0 Now, there are several ways to do this but one of the easiest is to use the GUI tools provided with [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,11,32],"tags":[],"class_list":["post-1886","post","type-post","status-publish","format-standard","hentry","category-linux","category-matlab","category-open-source"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-uq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1886"}],"version-history":[{"count":52,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1886\/revisions"}],"predecessor-version":[{"id":1956,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1886\/revisions\/1956"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}