site  contact  history  index

network-manager-applet patched for EasyOS

September 22, 2019 — BarryK

Yesterday was a coding marathon, until the wee small hours of this morning. I tackled problems with 'network-manager-applet', that prevented it from being integrated into EasyOS. The same problems apply to Puppy.

The EasyOS Pyro and Buster builds have a primitive text-mode GUI, named 'nmtui', which comes with the 'NetworkManager' package.

 The executable 'NetworkManager' is a daemon, that automatically manages network connectivity, doing stuff like automatically connecting when it detects an active network interface. The package also has 'nmtui' and 'nmcli', the former, as mentioned, is a GUI, and the latter is a CLI utility for configuring 'NetworkManager'.

There is a package named 'network-manager-applet', or 'network-manager-gnome'. It contains two GTK3 GUI applications named 'nm-applet' and 'nm-connection-editor', for managing 'NetworkManager'. The former is a tray applet, the latter is a standalone app.

Problem #1

This is the biggest problem, that prevented me from integrating 'network-manager-applet' into Easy. App 'nm-connection-editor' is mostly (but not completely) only for editing existing connections. It is weird, you can setup a wi-fi connection manually, but it lacks wi-fi scanning. On the other hand, 'nm-applet' does do all setup, including wi-fi scanning, but can only be launched by clicking on the icon in the system tray.

That's the big problem. I need to be able to bring up the full connection setup GUI standalone. It has to integrate with the "connect" icon on the desktop, and be able to co-exist with the older network connection methods (such as SNS).

I did of course google this issue, and found many people wanting to do the same thing, but told they can't.

Problem #2

When I was testing the 'nm-applet' tray app, I immediately noticed a shortcoming compared with the 'network_tray' app used previously in EasyOS (and a fork of network_tray is also used in the puppies). What 'network_tray' does is show you network traffic, indicating if data is flowing in or out. This is so convenient. Say you are downloading a file, and it is happening in the background, by looking at the 'network_tray' applet, you can see the incoming-traffic green light flashing, so you know it is still downloading. It is also nice to see whenever something is uploading!

Not so 'nm-applet'. The icon just sits there, unchanged. I personally found this to be quite unsettling, and a big turn-off.

nm-applet hacked

So what am I leading up to? I hacked the source code, and solved problems #1 and #2. What I have done is a bit primitive, but works. I can't get 'nm-applet' to run standalone, however, I can get it to popup, simulating either a left-click or right-click mouse button on the tray icon.

What you do it this:

# touch /tmp/easyos-trigger-nm-applet

...this will simulate a mouse left-button click. The created file will be immediately removed. Or this:

# touch /tmp/easyos-trigger-nm-applet-status

...this will simulate a right-button click. The file will be immediately removed.

I then imported icons and code from 'network_tray', that will replace those in 'nm-applet', and will flash green to show data traffic in or out. Yay! A snapshot is needed:

img1

...the menu shown is the result of a simulated left-click.

You can see that both 'nm-applet' and 'network_tray' are running, with identical icons. Note that in 'nm-applet' although I have substituted my own icons, other icons will display, for example when a connection is being established, 'nm-applet' displays a whirling animation. Once the connection is established, the icon will revert to my replacements.

Source patches

I have uploaded the patches and a build script. It is for 'network-manager-applet' version 1.8.20. I chose this particular version as that is what Debian Buster 10 uses. The source package and a tarball with the patches is here:

http://distro.ibiblio.org/easyos/source/alphabetical/n/

Next up, have a bit of work to do, to seamlessly integrate 'network-manager-applet' into Easy. It will be the same mechanisms as for Puppy, so this work will likely also be of great interest to the Puppy developers. 

Tags: easy

ROX-Filer dynamic handling of mimetypes

September 19, 2019 — BarryK

ROX is an old application, but still keeps getting better ...like old wine.

Mid-2018, a system for automatic generation of right-click "Open with" apps, appropriate for the file being right-clicked-on, was implemented in WoofQ:

http://bkhome.org/news/201805/rox-filer-right-click-open-with-menu.html

Not for ROX, but related, late in 2017, don570 reported that 'update-desktop-database' needs to be run for correct "Open with" in some applications, such as Mypaint:

http://murga-linux.com/puppy/viewtopic.php?p=972909#972909

...that utility creates /usr/share/applications/mimeinfo.cache. WoofQ runs that utility in 3buildeasydistro, and in a running easyOS runs /usr/local/petget/installpkg.sh when the package manager installs a package.

When you left-click on a file in a ROX window, it will automatically open the file in an appropriate application. Right-click gives you a choice, left-click will open immediately in the number-1 app for that mimetype (which may be one of the /usr/local/bin/default* scripts, see "Default Chooser" in Setup menu).

The way this left-click opening works, is there are scripts in /root/Choices/MIME-types, or can be elsewhere, such as /etc/xdg/rox.sourceforge.net/MIME-types. These scripts are manually created, one for each mimetype. This means there are going to be gaps.

Puppy forum member mistfire has devised a dynamic system, that does not required the manually-created scripts:

http://murga-linux.com/puppy/viewtopic.php?t=116952

This is really great, simple and works. I have put it into WoofQ. From the v1.3 PET, have populated rootfs-skeleton/etc/xdg/rox-sourceforge.net/MIME-types, and copied 'rox-xdg-open' and 'sync-rox-icons' to rootfs-skeleton/usr/sbin (not usr/bin, as want to be consistent with some other scripts that are in usr/sbin).

Then in the '3buildeasydistro' script, have this:

#190919 previously had manually-created files in /root/Choices/MIME-types
#dynamic system created by mistfire, ref: http://murga-linux.com/puppy/viewtopic.php?t=116952
#a rox-filer pet may have brought stuff with it...
mkdir -p rootfs-complete/etc/xdg/rox.sourceforge.net/MIME-types
rm -f roofs-complete/etc/xdg/rox.sourceforge.net/MIME-types/* 2>/dev/null
[ -d rootfs-complete/root/Choices/MIME-types ] && rm -f rootfs-complete/root/Choices/MIME-types/* 2>/dev/null
#repopulate...
cp -a ../rootfs-skeleton/etc/xdg/rox.sourceforge.net/MIME-types/* roofs-complete/etc/xdg/rox.sourceforge.net/MIME-types/

That should be enough documentation so that the woof-CE developers can also implement it. 

EDIT 2019-09-20:
Stop the press! I have discovered problems with this new system:

http://murga-linux.com/puppy/viewtopic.php?p=1037367#1037367
http://murga-linux.com/puppy/viewtopic.php?p=1037370#1037370

Mistfire's work has been good for me, as have rethought how the rox mime handling works. However, the end result is removal of mistfire's system. I have reverted to the old system, except for one change, fallbacks.

That is, have created scripts 'audio', 'image' and 'video' in /etc/xdg/rox.sourceforge.net/MIME-types. These are fallbacks. For example a PNG image, there is script 'image_png', which rox will run. But what if 'image_png' is not there, then rox will fallback to running 'image'.

The above changes to '3buildeasydistro' have been kept, to override whatever the rox pet has.

This is enough, I don't have a need for mistfire's "dynamic" solution.  However, I have kept his 'rox-xdg-open' script in WoofQ, just in case may want to use it sometime. 

EDIT 2019-09-21:
Have done a general tidy-up and refinement of mimetype handling for rox, for both the left-click and right-click on a file.

With left-click, the app to run is determined by scripts in /etc/xdg/rox.sourceforge.net/MIME-types, and I have greatly reduced the number of these scripts, due to 'audio', 'video', 'text' and 'image' scripts handling most cases.

With right-click, the apps to run are determined by entries in /etc/xdg/rox.sourceforge.net/OpenWith. There is a popup menu, which will offer a choice of which app to run. For example, for a png file, the choices might be 'mtPaint', 'Gpicview' and 'GIMP'. There are also two levels, at the top-level of the menu are choices that are an exact mimetype match, then in the "Open with..." submenu there are all choices that are capable of opening a png file, for example 'mtPaint', 'Gpicview', 'GIMP', 'Inkscape' and 'LibreOffice-Draw'. 
This handling has been improved, and expanded to more filetypes. Note, there is a script, /usr/sbin/build-rox-sendto, that is called every time a package is installed, to populate
/etc/xdg/rox.sourceforge.net/OpenWith. 

Tags: easy

Cutting the solar distiller runoff tube

September 18, 2019 — BarryK

I posted this morning, an experiment cutting a slot in 16mm diameter aluminium tube, using a jigsaw:

http://bkhome.org/news/201909/cutting-a-slot-in-aluminium-tube-with-a-jigsaw.html

From that experiment, it was determined that a larger diameter tube is required. Bunnings only stock 25mm the next size up from 16mm, and I decided that didn't want to go that big.

Needed to rethink. There is the en-route router, which can be pressed into service to cut aluminium. However, there is another way: a rotary saw.

Dug out my old rotary saw, and found a metal-cutting disc. Popped down to Bunnings and bought 16mm 1m aluminium tube, cut it to required length. It was quite easy to make up a jig to hold the tube:

img1

...those are timber offcuts from the previous prototypes. One length is screwed on top as a guide for the rotary saw.

The actually sawing was pretty straightforward, wearing face protection of course. Four g-clamps were needed, the two extra to stop the work from moving, and they had to be moved as the rotary saw moved:

img2

One thing to be careful with, is if move the saw backwards, as it may suddenly try to "climb out" of the hole it is cutting -- the saw has to be held firmly down.

As is to be expected, the cut has large burrs, and required a lot of filing and sanding to finish off. But the result is good:

img3

Posting these steps on the blog, however it is anticipated that everything will be gathered together into one DIY page eventually. 

Tags: nomad

Cutting a slot in aluminium tube with a jigsaw

September 18, 2019 — BarryK

I posted yesterday about a plan to use a small router to cut a slot in aluminium tube:

http://bkhome.org/news/201909/figuring-out-how-to-cut-with-a-router.html

I would like to thank scsijon, Derek and sage, who responded with advice on using the router to cut aluminium. Scsijon advised to make sure the work piece is very securely clamped down, to avoid a disaster, and he and Derek advised to use a good quality router bit -- Derek advise to use the dual-flute design as the single-flute tends to pull to the side.

The router is somewhere on the highways crossing over from the other side of Australia, so I decided why not have a go using a jigsaw.

The problem with a jigsaw is the vertical movement of the blade. I chose 16mm outside-diameter pipe, with 1mm wall thickness. I realised that the vertical movement of the blade is likely to be such that it will come completely out of the slot that is being cut. Which was found to be the case.

Anyway, decided to give it a go. Recycled tube out of prototype #1, so not throwing away money if I wreck the tube. Firstly, I cut a hole as a starting point. This was done by drilling a hole, then using small round and flat files:

img1

Then packed it so that the blade would just reach the bottom of the inside of the tube, but not actually hit it:

img2

However, the blade was still coming out of the tube, about 3mm. When the blade comes out and plunges back down again, it is liable to catch on the side of the cut, however, I found that by cutting extremely slowly, it did actually cut:

img3

However, where it became too difficult is doing the other side. A 10mm slot is required in the tube, and cutting the other side, when the blade plunged down, it would push the middle piece of aluminium down, completely jamming things up -- it is a wonder that the blade did not break.

I think that this technique is feasible if a larger diameter tube is used. Well, the proposed prototype #3 will accommodate a larger tube. This tube is to be the runoff for the waste water, and I already have some plastic pipe that will slide onto the 16mm tube, for runoff into a container. But, should be able to acquire larger-diameter plastic pipe.

Stay tuned, will try 25mm (1 inch) aluminium pipe... 

EDIT:
The 16mm tube has been successfully cut, using a rotary saw. See next blog post:

http://bkhome.org/news/201909/cutting-the-solar-distiller-runoff-tube.html 

Tags: nomad

Figuring out how to cut with a router

September 16, 2019 — BarryK

I have extremely basic tools in my garage, just a few hand tools. Planning for solar water distiller prototype #3, I realised that I need a router. So, I ordered the cheapest one on eBay, just AU$30.77 delivered. So cheap, not much power in that motor, but it should do the job:

https://www.ebay.com.au/itm/1-4-Woodworking-Electric-Router-Hand-Trimmer-Wood-Laminate-Palm-Jointer-580W/383091519405

img1

...no, it wasn't sent via Australia Post. They have used Fastway Couriers and it is coming by truck from the other side of Australia.

I need to cut 3mm (1/8 inch) grooves, about 1/4 inch deep, down the entire length of some pine:

https://www.bunnings.com.au/64-x-19mm-2-4m-premium-grade-dressed-pine_p8401461

I didn't order any router bits off eBay, and looking at Bunnings, they are not cheap. The cheapest 1/8 inch bits are these, at AU$12.79:

https://www.bunnings.com.au/ultra-6-4-x-3mm-straight-router-bit_p6370779

These are single-flute. A question, if anyone reading this has some experience with routers -- would the single-flute design be OK for cutting the grooves? The dual-flute bits are twice the price.

There is a second question. I need to cut a slot down the length of some aluminium tube, this tube:

https://www.bunnings.com.au/metal-mate-25-x-1mm-3m-aluminium-round-tube_p1079454

The slot will not start from the end, and will be about 600mm long. I have watched videos on YouTube showing that small routers can be used to cut aluminium, and even cheap router bits used.

The challenge will be to mount the tube in such a way that the guide that comes with the router can be used. It is do-able I reckon, however, the question again is whether that single-flute bit will do the job?

I am extremely reluctant to buy a router bit that costs almost as much as the router!  Especially if it becomes dulled after using it with aluminium and has to be discarded. 

Tags: nomad

WoofQ 20190915 tarball uploaded

September 16, 2019 — BarryK

WoofQ is the build system for creating EasyOS. It forked from Woof2 in 2013, and was used to build Quirky Linux, a derivative of Puppy Linux, until Quirky was retired in 2018. Woof2 was also forked as Woof-CE which is currently used to build Puppy Linux.

WoofQ is not available as an online version control system repository, only as tarballs. Here is the latest, as used to create EasyOS 1.2.3 (Pyro series) and 2.1.3 (Buster series):

http://distro.ibiblio.org/easyos/project/woof/woof-project-20190915.tar.gz 


Tags: easy

EasyOS Buster version 2.1.3 released

September 15, 2019 — BarryK

EasyOS version 2.1.3, latest in the "Buster" series, has been released. This is another incremental upgrade, however, as the last release announced on Distrowatch is version 2.1, the bug fixes, improvements and upgrades have been considerable since then. So much, that I might request the guys at Distrowatch to announce version 2.1.3. With that in mind, here is an announcement blurb:

EasyOS version 2.1.3 is the latest in the "Buster" series. Since version 2.1 there have been significant bug fixes, improvements and upgrades.
Significant upgrades include building from Debian 10.1 binary packages, and bumping the SeaMonkey web browser to 2.49.5.
There have been many refinements and improvements, including constraining of all apps Open|save|Download dialogs to default path within "/home" (this path has a special meaning in EasyOS different from other Linux distributions). Sharing of files between containers and the main desktop is also streamlined in folder "/home/shared". There have been many improvements to the management of containers, and the downloading and installing of SFS files.
A small band of very keen testers have identified various issues, and there has been intense bug fixing. This includes correct operation of the new "Copy session to RAM & disable drives" boot menu option (this is a secure mode of operation, isolated from the PC drives and having no persistence. It can be considered as an alternative to containers).

Detailed release notes are here:

http://distro.ibiblio.org/easyos/amd64/releases/buster/2.1.3/release-notes-2.1.3.htm

It is also recommended to read this:

http://distro.ibiblio.org/easyos/amd64/releases/buster/2.1.3/readme.htm

Download from here:

http://distro.ibiblio.org/easyos/amd64/releases/buster/2.1.3/

...note, there are also German and French builds.

If you need guidance on how to write the 'easy-2.1.3-amd64.img.gz' file to a USB-stick and boot from it, see here:

https://easyos.org/install/how-to-write-easyos-to-a-flash-drive.html

Read why EasyOS is different from other Linux distributions:

https://easyos.org/about/how-and-why-easyos-is-different.html

Feedback is welcome. We use this thread in the Puppy Forum:

http://murga-linux.com/puppy/viewtopic.php?t=109958

...please do not post anywhere else in the Puppy Forum, as EasyOS is not Puppy, and it creates confusion.

Finally, a snapshot of the desktop. This was taken on a 1024x768 monitor, which is the smallest resolution that EasyOS will work with:

img1

Note also, a PC with 64-bit CPU and at least 2GB of RAM is required. You might get Easy to work with less RAM, but I haven't tried it. 

Tags: easy

EasyOS Pyro version 1.2.3 released

September 15, 2019 — BarryK

Another incremental release of the Pyro series. Although this series is considered to be in maintenance mode, it does have all of the improvements as in the latest Buster release.

Download from here:

http://distro.ibiblio.org/easyos/amd64/releases/pyro/1.2.3/

Note, there are also German and French builds. 

Tags: easy