Thursday, September 29, 2011

Managing menus in Edubuntu for LTSP fatclients

While one might imagine it would be a simple thing to delete a few games from the computer menu, such was not the case.  One solution that was great but is currently full of bugs is Sabayon--it needs constant update and it doesn't get it.  A solution that was more efficient but just designed for menu management is Edubuntu menu-editor is working in Lucid, but appears to not work well with the Games menu for specific reason.  The approach I used successfully and document below is a combination of edubuntu menu-editor and deleting applications.  Thanks to Hyperbyte for a great link, mgariepy for help with menueditor and alkisg for help deleting files (not as easy as it sounds).

Using Edubuntu menu-editor with fatclients
This is difficult because one has to use the menu editor while sitting at the fatclient, create the profile, associate it with the group you want it associated with, and finally unpack the tarred profile into the chroot in the right place and more the .listing file to the correct place as well. [arg! the following is white background because it was copied from my googledoc I use as my tech log--oh well.]
  1. At the fatclient opened Applications/system/Edubuntu menu editor and made a profile where no games were active, called the profile mrgg.
  2. Went to System>Administration>Edubuntu menu editor--Profile manager
  3. Imported the mrgg profile and associated it with the group: testg1.
  4. I edited the /etc/desktop-profiles/testg1-mrgg.listing and removed the group name from the top and bottom (XDG_DATA and XDG_CONFIG) lines.  I did this since I wanted it applied to ALL users, irrespective of their group.  just left the semi-colons delineating the fields of info.  Looks like this (note the ;; this had the group name testg1)
    1. XDG_DATA-testg1-mrgg;XDG_DATA;/etc/edubuntu-menueditor/mrgg/share;10;;#This file is managed by ProfileManager, Do not edit by hand
      XDG_CONFIG-testg1-mrgg;XDG_CONFIG;/etc/edubuntu-menueditor/mrgg/xdg;10;;#This file is managed by ProfileManager, Do not edit by hand
  5. Still on the fatclient I cd’ed to the chroot with cd /opt/ltsp/i386/etc/edubuntu-menueditor/ and made a folder in which to untar the profile: sudo mkdir mrgg
  6. Then I cp the mrgg tar to /opt/ltsp/i386/etc/edubuntu-menueditor/mrgg and extracted it while in the .../edubuntu-menueditor directory with: sudo tar -xzvf mrgg/
  7. I cp the profile.listing file (testg1-mrgg.listing) to the chroot: sudo cp /etc/desktop-profiles/testg1-mrgg.listing /opt/ltsp/i386/etc/desktop-profiles/
  8. updated the image, rebooted and the education and internet menus were as I had configured, presenting a simple list of necessary apps and nothing more--very nice!...
  9. but the games menu was untouched!  Next to get rid of the unwanted games...
Deleting the games
  1. To remove the games I got this command: "sudo apt-get remove gnome-games-common gbrainy" from here.  It worked great, however...
  2. that still left 2 games “Potato Guy” and Ri-Li so I tried entered the chroot with: sudo ltsp-chroot -c -p and typed: sudo apt-get remove ktuberling (the package name of potato guy) BUT, this also wanted to remove ubuntu-edu-secondary.  Not good.  I knew there were a lot of apps I liked in that package.
Removing individual applications that are part of a package
  1. Instead of removing the apps I could have made them non-executable with chmod -x $(which ktuberling) 
  2. Another approach is to find out what the package ubuntu-edu-secondary contains, then by “installing” all these apps separately will mark them all as “manually installed” so removing  the package ubuntu-edu-secondary will not remove any of the apps.  Finally, I just need to remove the 2 games, leaving everything else.  This is what I did:
    1. apt-cache show ubuntu-edu-secondary | egrep '^Depends|^Recommends'
    2. and it will show: Depends: dia-gnome, inkscape, kalgebra, kalzium, kbruch, kig, kmplot, kstars, ktouch, ktuberling, kturtle, kwordquiz, marble, parley, qcad, ri-li, step, vym
    3. apt-get install dia-gnome inkscape kalgebra kalzium kbruch kig kmplot kstars ktouch ktuberling kturtle kwordquiz marble parley qcad ri-li step vym Marks them as manually installed.
    4. Now I can sudo apt-remove ktubering, and even though it also removes the package ubuntu-edu-secondary, it removes none of the included apps.
    5. And finally I also sudo apt-remove ri-li and I am done!  All menus are as they need to be!

No comments:

Post a Comment