{"id":546,"date":"2013-02-23T10:13:56","date_gmt":"2013-02-23T18:13:56","guid":{"rendered":"http:\/\/..\/?p=546"},"modified":"2013-02-23T10:13:56","modified_gmt":"2013-02-23T18:13:56","slug":"gmenu2x-update","status":"publish","type":"post","link":"https:\/\/blog.engine12.com\/?p=546","title":{"rendered":"GMenu2x update&#8230;"},"content":{"rendered":"<p><a href=\"..\/wp-content\/uploads\/2013\/02\/gmenu2x.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-586\" style=\"border: 1px solid grey\" alt=\"gmenu2x_22\" src=\"..\/wp-content\/uploads\/2013\/02\/gmenu2x.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/gmenu2x.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/gmenu2x-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>I should have this post broken up into several, so it&#8217;s going to get pretty long.\u00a0 This <a title=\"gmenu_jffs2_rc22.tar.bz2\" href=\"http:\/\/engine12.com\/files\/gmenu-zipit\/gmenu_jffs2_rc22.tar.bz2\">version<\/a> of the OpenWRT-ZipIt distro featuring\u00a0GMenu2x is jammed with awesomeness.\u00a0 And jammed is a pretty good word.\u00a0 Not only is the rootfs compressed, but several binaries including gmenu2x have been upx&#8217;d to reduce even more space.\u00a0 Additionally, with some smooth sleuthing by deeice from the irc #zipit channel, a few new switches were included in the build of the C++ based packages.\u00a0 This removed some serious bloat, it really was amazing to see the reduction in size.\u00a0 It was a huge win for the C++ lover too, as the code became equivalent in size to what C would produce.\u00a0 So if you compare RC12 or prior to the latest version you&#8217;ll be floored when you find all the new apps and functionality that is now included in the flashed jffs2 rootfs.\u00a0 There is over 1Mb in new stuff and still there remains\u00a0 ~200Kb free for config files.\u00a0 Installation instructions are the still same as for <a title=\"..\/?p=340\" href=\"..\/?p=340\">NodeZ2<\/a>, and mozzwald also created a <a title=\"http:\/\/mozzwald.homelinux.net\/node\/174\" href=\"http:\/\/mozzwald.homelinux.net\/node\/174\">new version of the flash scripts<\/a> to make the process even easier.<\/p>\n<p>Most of the new apps, scripts, and functions revolve around the Links web browser and mpg123.\u00a0 Besides normal graphical web browsing with SSL capability, Links has been configured to start playing Internet radio streams courtesy of mpg123.\u00a0 There is also a choice to start StreamRipper directly from Links for the ease of collecting Internet streams to go, and if all that mp3 streaming and ripping is just ho-hum, there is an option to relay the tcp stream onto a multi-cast channel of your LAN.\u00a0 Of course the ZipIt can also play that multi-cast stream, and it doesn&#8217;t get any easier to set this up, just turn it on\/off like you would shuffle or repeat.\u00a0 Multi-cast streaming works quite well over a B.A.T.M.A.N.\u00a0 mesh network, I have a USB Ethernet dongle bring in an Internet stream which I then relay onto the wireless mesh interface.\u00a0 And just in time for the cut, wej released a brand new <a title=\"http:\/\/wejp.k.vu\/gmu\/gmu_0_9_1_released\" href=\"http:\/\/wejp.k.vu\/gmu\/gmu_0_9_1_released\">0.9.1 version of GMU<\/a> that&#8217;s also included for a more elegant playback experience of mp3, ogg\/vorbis, flac, speex, and wav formats.\u00a0 The new version comes with a web server and two different interfaces for remote control.\u00a0 The configuration is in <span style=\"color: #ff9900\">\/root\/.config\/gmu\/gmu.zipit-z2.conf<\/span>.\u00a0 The Play\/Stop\/Prev\/Next keys are configured to control GMU when it&#8217;s active.\u00a0 See the <a href=\"..\/?attachment_id=578\" target=\"_blank\">Table of Hotkeys<\/a>.<\/p>\n<p><a href=\"..\/wp-content\/uploads\/2013\/02\/app_list.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-full wp-image-587\" style=\"border: 1px solid grey\" alt=\"app_list\" src=\"..\/wp-content\/uploads\/2013\/02\/app_list.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/app_list.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/app_list-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>My favorite new feature is that Gmenu2x can now launch an app without closing, similar in experience to full scale systems.\u00a0 As in prior versions, the Home key returns to Gmenu2X, but the action will now leave the current app running in the background.\u00a0 It&#8217;s a really nice feature when combined with the zram driver, thanks go to mozzwald for the <a title=\"http:\/\/mozzwald.homelinux.net\/node\/172\" href=\"http:\/\/mozzwald.homelinux.net\/node\/172\">details on configuring zram<\/a> in the Linux kernel.\u00a0 When GMenu2x is active, pressing the Tab key will produce a list of running apps.\u00a0 GMenu2x will switch to the selected apps&#8217; controlling terminal.\u00a0 Apps in the list can also be stopped instead, by using the BackSpace key on the selected item.\u00a0 There are a few ways to navigate between the open virtual terminals.\u00a0 The easiest way is to use the Home key to return to GMenu2x and then press Tab to show the list of running apps, then just select the one you want to switch to.\u00a0 Alternatively, the Alt+Tab, Alt+LeftArrow and Alt+RightArrow key combos will increment and decrement the virtual terminal.<\/p>\n<p><a href=\"..\/wp-content\/uploads\/2013\/02\/links2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-581\" style=\"border: 1px solid grey\" alt=\"links2\" src=\"..\/wp-content\/uploads\/2013\/02\/links2.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/links2.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/links2-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>I primarily use the ZipIt to stream Internet radio from one of two different web sites, somafm.com and shoutcast.com.\u00a0 SomaFM displays a playlist for the selected station that gets updated frequently, just make sure Auto-Refresh is enabled.\u00a0 When a stream is chosen, Links will ask you how you want to handle it.\u00a0 The first option to Relay\/mp3_out is the most impressive, it will acquire the Internet stream and re-broadcast it onto a multi-cast channel of your LAN.\u00a0 It makes setting up a multi-zone audio system a snap, and portable too.\u00a0 After you select the stream and start broadcasting it, you can listen to it by opening blkMp3Player on any ZipIt that is connected to the network, press i for the &#8216;mp3_IN&#8217; option and the stream should begin to playback.\u00a0 With a little effort, you can synchronize playback across the ZipIts, be sure all of your ZipIts are set to run at the same CPU clock setting.\u00a0 The Rip\/Listen option receives a stream and also runs a tcp server that rebroadcasts it onto your LAN, it is set up to listen on the localhost only,\u00a0 so that you can Rip and Listen.\u00a0 See the script <span style=\"color: #ff9900\">\/usr\/local\/sbin\/ripStream.sh<\/span> to change configuration for the Rip\/Listen option.\u00a0 The third option starts up mpg123 and plays the stream.<\/p>\n<p>Bec<a href=\"..\/wp-content\/uploads\/2013\/02\/blkmp3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-589\" style=\"border: 1px solid grey\" alt=\"blkmp3\" src=\"..\/wp-content\/uploads\/2013\/02\/blkmp3.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/blkmp3.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/blkmp3-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>ause I want the ZipIt&#8217;s Play and Stop buttons to control playback of the stream at anytime, in any program, system wide, I always run mpg123 in remote mode.\u00a0 I patched mpg123 to be more aggressive and it now restarts an Internet stream that has lost connection, the Play button will pause and restart an Internet stream, even after a suspend.\u00a0 Also notice that the +\/- keys on the right side of the ZipIt will control the volume at all times.\u00a0 The blkMp3Player app is a frontend for mpg123.\u00a0 It will show a banner of the current playing Internet stream, but more useful is it&#8217;s ability to play a directory of mp3&#8217;s.\u00a0 I added a notification callback to mpg123 so it can run in remote mode and still work with blkMp3Player.\u00a0 When a track has ended mpg123 will notify blkMp3Player.\u00a0 You can have more than one instance of blkMp3Player running and controlling a single mpg123, but since there isn&#8217;t a centralized playlist, the behavior is a little goofy.\u00a0 Select the mp3_OUT option to multi-cast the playback onto your LAN or mesh network.<\/p>\n<p>Links is configured to run in graphics mode, but it also can be started in text-only mode.\u00a0 I have an entry in the mutt mailcap file that instructs Links to parse and display text-only versions of html mail, it&#8217;s a good feature to know about.\u00a0 I set the user-agent to a value appropriate for mobile clients, but this will also prevent some sites from serving you a page.\u00a0 Experiment with different values if you like.\u00a0 Also something to try with Links is watching YouTube videos.\u00a0 The ZipIt has been able to watch YouTube vids for some time now, mozzwald even has a custom ZipIt YouTube portal, I just added some scripts and configured Links to make it seamless.\u00a0 You need to install movgrab and mplayer from the repo&#8217;s for this to work.<\/p>\n<p>Most of the included apps have been set up to start the new way, with OpenNewVt set to true.\u00a0 The setting can be found in the link properties dialog of GMenu2x.\u00a0 A wrapper script is also needed for the app to be listed in GMenu2x. \u00a0 The wrapper script should call &#8216;launch&#8217; with parameters appropriate for the app.\u00a0 The launch script will create entries in \/tmp\/vt and \/tmp\/apps and will clean up these entries when the application ends.\u00a0 Read the script at <span style=\"color: #ff9900\">\/usr\/local\/sbin\/launch<\/span> to understand the parameters more thoroughly.\u00a0 Also see some of the existing scripts for an example, grep the \/usr folder for a list.\u00a0 The script \/usr\/bin\/links should be used as a template for launching SDL apps.\u00a0 If starting a daemon use the launch.d version.<\/p>\n<p>There isn&#8217;t a memory management system running that will protect you from starting too many apps, and doing so can really bog down or even lock-up the ZipIt.\u00a0 The Home key should return you to GMenu2x, although it may take several minutes, rebooting may be a faster option.\u00a0 The key combo of Alt+Home is also an alternative to consider in dire situations.\u00a0 See the script at <span style=\"color: #ff9900\">\/usr\/local\/sbin\/onAltHome<\/span> for the details.<\/p>\n<p>I upda<a href=\"..\/wp-content\/uploads\/2013\/02\/mutt.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-582\" style=\"border: 1px solid grey\" alt=\"mutt\" src=\"..\/wp-content\/uploads\/2013\/02\/mutt.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/mutt.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/mutt-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>ted quite a few of the packages in the openwrt repos to make better and more consistent use of the keyboard.\u00a0 This <a title=\"Table of HotKeys\" href=\"..\/?attachment_id=578\" target=\"_blank\" rel=\"attachment wp-att-578\">Table of HotKeys<\/a> is formated for viewing with the ZipIt.\u00a0 Be sure to install all of the apps on the list too.<\/p>\n<p>A worthwhile project is setting up the email client mutt.\u00a0 There are config files included for using mutt with gmail but first install <a title=\"mutt_1.5.21-1_pxa.ipk\" href=\"http:\/\/engine12.com\/files\/gmenu-zipit\/packages\/mutt_1.5.21-1_pxa.ipk\">mutt_1.5.21-1_pxa.ipk<\/a> and ssmtp from the repo.\u00a0 Edit <span style=\"color: #ff9900\">~\/.muttrc<\/span>, <span style=\"color: #ff9900\">\/etc\/ssmtp\/ssmtp.conf<\/span>, and <span style=\"color: #ff9900\">\/etc\/ssmtp\/revaliases<\/span>.\u00a0 There is excellent coordination of mutt, nano, Links, nupdf, and zgv when viewing email.\u00a0 Using the enter, backspace, Tab, and Esc keys, you can navigate your email quite easily.\u00a0 I also created nano keybindings that reflect more of the standard for word processing hotkeys.\u00a0 Here&#8217;s a screen shot of mutt running with the split screen option enabled and the sidebar patch. Note the lack of ads in or around my email too.<\/p>\n<p><a href=\"..\/wp-content\/uploads\/2013\/02\/htop.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignright  wp-image-635\" style=\"border: 1px solid grey\" alt=\"htop\" src=\"..\/wp-content\/uploads\/2013\/02\/htop.png\" width=\"320\" height=\"240\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/htop.png 320w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2013\/02\/htop-300x225.png 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a>The two programs, bldaemon and ebindkeys are being started in inittab with special respawn tty&#8217;s.\u00a0 The bldaemon in particular was going down unexpectedly so I had put that one on a respawn tty awhile back, but when I was working to solve the problem with Links and SDL crashing and locking the terminal, ebindkeys was also going down, so I gave it the same treatment.\u00a0 The system requires two instances of ebindkeys, so I also created a pair of scripts to start them and make it easier to distinguish between the two when I need to restart one of them.\u00a0 Start up htop to show what&#8217;s running.\u00a0 The &#8216;F&#8217; keys in htop are accessible by first pressing &#8216;f&#8217; and then choosing the number, for example press and release &#8216;f&#8217; then press Alt+w and htop will receive the F2 keystroke.\u00a0 The patches and source code for the project can be found on my <a title=\"https:\/\/github.com\/engine12\" href=\"https:\/\/github.com\/engine12\">github page<\/a>.<\/p>\n<p>It should be noted that upx&#8217;d binaries do take much longer to start up than their non-compressed counterparts, so if you are setting up an overlay image to install packages to, you can speed up the start time of Links by installing Links via the repo with ovpkg.\u00a0 Also check the following line in the script at <span style=\"color: #ff9900\">\/usr\/local\/sbin\/ovmount<\/span><\/p>\n<p><span style=\"color: #ff9900\">mount -t overlayfs -o rw,noatime,lowerdir=\/${CHK_ROOT_DIR},upperdir=${dir} ${dir} \/${CHK_ROOT_DIR}<\/span><\/p>\n<p>The line above will configure the mounted overlay image to be the upper directory and requires that you have an SD card that is capable of writing.\u00a0 If your SD card will not write then you should edit the script and change the line to read as follows.<\/p>\n<p style=\"text-align: justify\"><span style=\"color: #ff9900\">mount -t overlayfs -o rw,noatime,lowerdir=${dir},upperdir=\/${CHK_ROOT_DIR} ${dir} \/${CHK_ROOT_DIR}<\/span><\/p>\n<p style=\"text-align: justify\">If you need help or have questions you can send me an email or ask for assistance on the freenode irc channel #zipit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I should have this post broken up into several, so it&#8217;s going to get pretty long.\u00a0 This version of the OpenWRT-ZipIt distro featuring\u00a0GMenu2x is jammed with awesomeness.\u00a0 And jammed is a pretty good word.\u00a0 Not only is the rootfs compressed, but several binaries including gmenu2x have been upx&#8217;d to reduce even more space.\u00a0 Additionally, with <a href='https:\/\/blog.engine12.com\/?p=546'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts\/546"}],"collection":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=546"}],"version-history":[{"count":0,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts\/546\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}