Surenoo LCD2USB LCD display in lcd4Linux

Some time ago i bough a 20×4 LCD display with an LCD2USB controller mounted from AliExpress (https://www.aliexpress.com/item/4000219655381.html).

My idea was to use this for an Openmediavault Server when i need to go to a LAN party, to prevent the need for a Monitor connected to the server i could use the display to show the IP and possible other usefull information, that could be handy.

Seems there is little information around the internet, about how to get one of these, displays working compared to back in the days.

Every note that i can locate says that when powering on the display from the USB port it should come up and say lcd2usb version x.xx but in my case the display is blank and looks to be more or less dead, in the beginning i was sure that i had bought a bad display, until i remembered that if the controller somehow was setup to keep the display in a low contrast and brightness in off mode, that would result in a display looking to be dead, so tweeking the contrast and brightness paramaters made the display come to life.

My lcd4linux.conf file:

Note: contrast and brightness are are still a work in progress, but it works.

Display LCD2USB {
Driver 'LCD2USB' #Model: LCD2USB
Size '20x4' #LCD dimension: 1602
# Port '/dev/usbdev3.2' #Port: /dev/usbdev3.2
Contrast 80
Brightness 40
icons 0
}

Widget IPaddress {
class 'Text' #Type: Text
expression netinfo::ipaddr('ens33') #eth0's ip
prefix 'IP:' #display "IP:"
width 16 #display width: 16
align 'C' #display: central
update 1000
}

Widget Time {
class 'Text'
expression strftime('%a %H:%M:%S',time())
width 16
align 'C'
update 1000
}

Layout Default {
Row1 {
Col1 'IPaddress' #Display Widget IPaddress in the first row and first column
}
Row2 {
Col1 'Time' #Display Widget Time in the second row and first column
}

}

Display 'LCD2USB'
Layout 'Default'

to test you can use the following command

root@Debian-test:/etc# lcd4linux -vv -F

the output should look something like this:

root@Debian-test:/etc# lcd4linux -vv -F
LCD4Linux 0.11.0-SVN-1193 starting
Dump of /etc/lcd4linux.conf:
Display 'LCD2USB'
Display:LCD2USB.Brightness 40
Display:LCD2USB.Contrast 80
Display:LCD2USB.Driver 'LCD2USB'
Display:LCD2USB.icons 0
Display:LCD2USB.Size '20x4'
Layout 'Default'
Layout:Default.Row1.Col1 'IPaddress'
Layout:Default.Row2.Col1 'Time'
Widget:IPaddress.align 'C'
Widget:IPaddress.class 'Text'
Widget:IPaddress.expression netinfo::ipaddr('ens33')
Widget:IPaddress.prefix 'IP:'
Widget:IPaddress.update 1000
Widget:IPaddress.width 16
Widget:Time.align 'C'
Widget:Time.class 'Text'
Widget:Time.expression strftime('%a %H:%M:%S',time())
Widget:Time.update 1000
Widget:Time.width 16

[DBus] Error connecting to the dbus session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

plugin_mpd.c: [MPD] v0.83, check lcd4linux configuration file...
[MPD] WARNING: Plugin is not enabled! (set 'enabled 1' to enable this plugin)
[raspi] WARNING: Plugin is not enabled! (set 'enabled 1' to enable this plugin)
lcd4linux.c: initializing driver LCD2USB
LCD2USB: $Rev: 1130 $
LCD2USB: scanning USB for LCD2USB interface ...
LCD2USB: found LCD2USB interface on bus 001 device 008
LCD2USB: echo test successful
LCD2USB: firmware version 2.02
LCD2USB: installed controllers: CTRL0
initializing layout 'Default'
layout.c: Layout:Default: migrating 'row1.col1' to 'Layer:1.row1.col1'
layout.c: Layout:Default: migrating 'row2.col1' to 'Layer:1.row2.col1'
Creating new timer group (1000 ms)
widget 'IPaddress': Class 'text', Parent '<root>', Layer 1, Row 0, Col 0 (to 0,16)
widget 'Time': Class 'text', Parent '<root>', Layer 1, Row 1, Col 0 (to 1,16)
lcd4linux.c: starting main loop
Timer #0 skipped 31 interval(s) or 3100 ms.

and tada!, the displays show information.

How to See Samba Shares on a Windows 10 Network

wsdd is a service by christgau on GitHub, which implements a Web Service Discovery host daemon for Ubuntu. This enables Samba hosts to be found by Web Service Discovery Clients like Windows 10.

If you are experiencing any issues with this service, please let us know in the comments or submit an issue on GitHub.

Change to /tmp directory.

cd /tmp

Download and unzip the archive.

wget https://github.com/christgau/wsdd/archive/master.zip

unzip master.zip

Rename wsdd.py to wsdd.

sudo mv wsdd-master/src/wsdd.py wsdd-master/src/wsdd

Copy to /usr/bin.

sudo cp wsdd-master/src/wsdd /usr/bin

Copy wsdd to /etc/systemd/system.

sudo cp wsdd-master/etc/systemd/wsdd.service /etc/systemd/system

Open wsdd.service in nano and comment out User=nobody and Group=nobody with a ; semicolon.

sudo nano /etc/systemd/system/wsdd.service
[Unit]
Description=Web Services Dynamic Discovery host daemon
; Start after the network has been configured
After=network-online.target
Wants=network-online.target
; It makes sense to have Samba running when wsdd starts, but is not required
;Wants=smb.service



[Service]
Type=simple
ExecStart=/usr/bin/wsdd --shortlog
; Replace those with an unprivledged user/group that matches your environment,
; like nobody/nogroup or daemon:daemon or a dedicated user for wsdd
; User=nobody
; Group=nobody
; The following lines can be used for a chroot execution of wsdd.
; Also append '--chroot /run/wsdd/chroot' to ExecStart to enable chrooting
;AmbientCapabilities=CAP_SYS_CHROOT
;ExecStartPre=/usr/bin/install -d -o nobody -g nobody -m 0700 /run/wsdd/chroot
;ExecStopPost=rmdir /run/wsdd/chroot



[Install]
WantedBy=multi-user.target

Save and exit (press CTRL + X, press Y and then press ENTER)

Start and enable wsdd.

sudo systemctl start wsdd
sudo systemctl enable wsdd

Output:

Created symlink /etc/systemd/system/multi-user.target.wants/wsdd.service → /etc/systemd/system/wsdd.service.

Now check that the service is running.

sudo service wsdd status

Output:

wsdd.service - Web Services Dynamic Discovery host daemon
Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-06-10 10:51:39 CEST; 8s ago
Main PID: 40670 (python3)
Tasks: 1 (limit: 6662)
Memory: 10.8M
CGroup: /system.slice/wsdd.service
└─40670 python3 /usr/bin/wsdd --shortlog



jun 10 10:51:39 ubuntu systemd[1]: Started Web Services Dynamic Discovery host daemon.
jun 10 10:51:40 ubuntu wsdd[40670]: WARNING: no interface given, using all interfaces

You should now be able to browse your Ubuntu machines and Samba shares in the Windows 10 file explorer. You may need to restart the Windows 10 machines to force discovery.

You may also want to reboot the Ubuntu server just to make sure the wsdd service starts up automatically without issue.
How to Uninstall wsdd

If you want to completely uninstall wsdd, stop and disable the service.

sudo systemctl stop wsdd
sudo systemctl disable wsdd

Remove wsdd from /usr/bin.

sudo rm /usr/bin/wsdd

Remove service file.

sudo rm /etc/systemd/system/wsdd.service

list package after size in Debian/Ubuntu

I had a Ubuntu system where the root drive almost was full i suspected it was some packages that apt-get autoremove couldn’t remove, that was using the drive.

This small script will list the installed packages on your system ending with the biggest.

dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n

On my system this was a huge amount of old kernel images, and kernel sources that was installed.

to remove the packages i used:

apt-get remove --purge

to see the total amount of storage used and exclude the /mnt (all my discs are mounted here) use:

du -shc --exclude /mnt /*