File-Sharing under Linux, using Usershares – the Modernistic Way.

One concept which readers may already know, is that under Linux, we can set up a Samba-server, which makes the sharing-out of our home directories possible, and that if we fiddle with the ‘smb.conf’ configuration file thoroughly enough, it becomes possible to browse the available shares on a LAN, in a way semi-compatible with Windows computers that also reside on the same LAN.

Traditionally, this has always been a bit of a PITA, especially since the ‘/etc/samba/smb.conf’ configuration files have been finicky, and since each share practically needs to be configured individually, by a person with the ‘root’ password.

Well an alternative exists under Linux as well, which is the concept of ‘Usershares’. With this concept, each user who belongs to a specific group has the privilege, of designating a folder within his desktop manager, to share out, pointing-and-clicking. This is closer in ease-of-use, to how the process works under Windows. But, it needs to be set up correctly once, by the sysadmin, before it will work as often as simple users wish it to work.

I think that an existing Web-article on the subject, already explains well, what the settings in the ‘smb.conf’ file need to be, as well as what directories need to exist, in order for usershares to work. Except that the article I just linked to, refers to Fedora and SELinux systems and their norms. I happen to be based on Debian and KDE 4 or Plasma 5. And so I have a few observations to add:

Firstly, the following packages should be installed, under Debian also:

 


#apt-get install kdenetwork samba

 

Secondly, ‘/etc/samba/smb.conf’ needs to be edited like so:

 

screenshot_20180324_205625

 

Under Debian, the directory ‘/var/lib/samba/usershares’ already exists, If the relevant packages are installed. And its permission-bits have already been set as they should be set. Only, the feature is not configured in ‘smb.conf’ by default. And, the additional package named ‘kdenetwork-filesharing’ needs to be installed, in order for the tab to appear in Dolphin’s File-Properties box, that enables sharing from the GUI. Aside from that, enabled users need to be added to the ‘sambashare’ group, after which this membership only goes into effect, once the user in question has started a new session…

(Info Corrected 03/25/2018, 17h10,

Updated again 03/28/2018 … )

Continue reading File-Sharing under Linux, using Usershares – the Modernistic Way.

Why visual SAMBA Browsing no longer works On My LAN.

One of the routine tasks which I recently carried out on my LAN, was to retire an old computer named ‘Walnut’. A day later I discovered that I could no longer browse my LAN, by way of my SAMBA shares. BTW, all my computers are by now either Debian / Jessie or Debian / Stretch computers. So what gives with the sudden inability to browse my shares via the GUI, which is the ‘Dolphin file browser’?

(Solved as of 03/23/2018 … )

Well in my ‘/etc/samba/smb.conf’ file, I gave the option:

 


[global]

(...)

   smb encrypt = desired

 

The purpose of this was, for the Samba Server to query the Client, whether the  client supports encryption, and if affirmative, to enforce such encryption.

And, just to be sure that I haven’t made some silly mistake, I can run the following tests:

 


root@Phoenix:/etc/samba# cat smb.conf | grep "map to guest"
   map to guest = Bad User
root@Phoenix:/etc/samba# cat smb.conf | grep "obey pam"
   obey pam restrictions = no
root@Phoenix:/etc/samba#

 

But the disposition of the client to offer encryption, needed to be decided on the client machines, by creating a user-space file, i.e. a file in the home folder, which is named ‘~/.smb/smb.conf’, which contains the following lines:

 


[global]
   client max protocol = SMB3

 

This is actually required, in order for the Dolphin / GUI-client even to offer the level of security which I wanted, which is SMB3 security. Without my specifying this, Dolphin would indicate to the Server, that SMB3 is not available, and no encryption would take place. This line of code can also be put into ‘/etc/samba/smb.conf’ , but I chose to put it into my home-folder like that.

Continue reading Why visual SAMBA Browsing no longer works On My LAN.

Installing a “Wacom” graphics / digitizer tablet under Linux.

I’ve just received my “Wacom Intuos PT S 2″ digitizer tablet – aka graphics tablet – which I had specifically bought, because there is some support for the Wacom series of tablets under Linux. I was able to get it working 100%, and also did get the ‘wireless kit’ to work, that I had ordered with it.

Under Linux, we need to have at least these two packages installed, in order to get this hardware to work:

  • ‘xserver-xorg-input-wacom’
  • ‘libwacom2′

If available, the following should also be installed:

  • ‘libwacom-bin’

Additionally I should mention that I did this on the Debian / Stretch computer I name ‘Plato’, on which I have Plasma 5 as my desktop manager. Although Debian and Linux do support Wacom, apparently, Plasma 5 as such does not. This effectively means that individual applications may have tablet-support, but that We’re not given a graphical module for the System Settings panel, from which to customize our tablet. For that reason, I needed to write a shell-script which does this for me:

 

#!/bin/bash

xsetwacom --set "Wacom Intuos PT S 2 Finger touch" Touch off
xsetwacom --set "Wacom Intuos PT S 2 Pen stylus" Button 2 key "shift"
xsetwacom --set "Wacom Intuos PT S 2 Pen stylus" Button 3 key "ctrl"

xsetwacom --set "Wacom Intuos PT S 2 Pad pad" Button 1 key "button +3"
xsetwacom --set "Wacom Intuos PT S 2 Pad pad" Button 3 key "del"


xsetwacom --set "Wacom Intuos PT S 2 Pad pad" Button 8 key "ctrl" "c"
xsetwacom --set "Wacom Intuos PT S 2 Pad pad" Button 9 key "ctrl" "v"

xsetwacom --set "Wacom Intuos PT S 2 (WL) Finger touch" Touch off
xsetwacom --set "Wacom Intuos PT S 2 (WL) Pen stylus" Button 2 key "shift"
xsetwacom --set "Wacom Intuos PT S 2 (WL) Pen stylus" Button 3 key "ctrl"

xsetwacom --set "Wacom Intuos PT S 2 (WL) Pad pad" Button 1 key "button +3"
xsetwacom --set "Wacom Intuos PT S 2 (WL) Pad pad" Button 3 key "del"


xsetwacom --set "Wacom Intuos PT S 2 (WL) Pad pad" Button 8 key "ctrl" "c"
xsetwacom --set "Wacom Intuos PT S 2 (WL) Pad pad" Button 9 key "ctrl" "v"

 

Presumably, any other users with Plasma 5 desktop-managers will need to write similar scripts. Simply typing in the command ‘xsetwacom’ without any arguments, will display its basic usage.

It should also be noted, that after an X-server module has been installed, that will act as the input driver, at the very least, the X-server also needs to be restarted, before that driver will be loaded.

(Updated 03/24/2018 : )

Continue reading Installing a “Wacom” graphics / digitizer tablet under Linux.

How to Add a Web-browser to GNURoot + XSDL.

In This earlier posting – out of several – I had explained, that I’ve installed the Android apps “GNURoot Debian” and “XSDL” to my old Samsung Galaxy Tab S (first generation). The purpose is, to install Linux software on that tablet, without requiring that I root it. This uses the Android variant of ‘chroot’, which is actually also called ‘proot’, and is quick and painless.

However, there are certain things which a ch-rooted Linux system cannot do. One of them is to start services to run in the background. Another is, to access hardware, as doing the latter would require access to the host’s ‘/dev’ folder, not the local, ch-root’s ‘/dev’ folder. Finally, because XSDL is acting as my X-server, when GNURoot’s guest-software tries to connect to one, there will be no hardware-acceleration, because this X-server is really just an Android app, and does not really correspond to a display device.

This last detail can be quite challenging, because in today’s world, even many Linux applications require, direct-rendering, and will not function properly, if left just to use X-server protocol, à la legacy-Unix. One such application is any serious Web-browser.

This does not result from any malfunction of either Android app, because it just follows from the logic, of what the apps are being asked to do.

But we’d like to have a Web-browser installed, and will find that “Firefox”, “Arora” etc., all fail over this issue. This initially leaves us in an untenable situation, because even if we were not to use our Linux guest-system for Web-browsing – because there is a ‘real’ Web-browser installed on the (Android) host-system – the happenstance can take place, by which a Web-document needs to be viewed anyway – let’s say, because we want to click on an HTML-file, that constitutes the online documentation for some Linux-application.

What can we do?

Continue reading How to Add a Web-browser to GNURoot + XSDL.