Showing posts with label Debian-Linux. Show all posts
Showing posts with label Debian-Linux. Show all posts

2021-03-25

Use ISO 8601 dates in PCManFM on Debian LXQt

I like ISO 8601 or RFC 3339 style dates.  That is, rather than "January 15, 2021", I like "2021-01-15".

This is especially useful in a file manager, having all the year-month-day lined up vertically in a column.

I also prefer 24-hr time format for the same reason.  But how to set this up?

 

macOS Finder

For Mac's file manager, it's really easy to set the date/time format:

Just open System Preferences > Language & Region > Advanced > Dates, then modify the date formats to whatever you want.  At the same time, you could go to the Times tab and set it to use 24-hr format. 

Done!  I offer this as just a point of comparison for what's below...


Debian LXQt PCManFM

On LXQt's PCManFM file manager, running on Debian, the setup was... annoyingly difficult.

PCManFM does not allow custom date/time formatting.  It only respects the system set locale.  So you have to choose the right locale.

Step 1.1: Select Locale

On LXQt, you can easily set the locale (they call it "Region") by running lxqt-config-locale in the terminal, or else click the system Preferences > LXQt settings > Locale.

Step 1.2: Which locale to choose???

You have a number of options.

Do you want:

  • English language
  • dollar denominated
  • metric
  • ISO-8601
  • but 12-hr time?

Use Canadian English (en_CA) locale.

If that's not close enough, and you really want 24-hr time as well, you can enable Detailed Settings and change the Time locale to Sweden - English (en_SE).

Be sure to see Step 2: Installing Locales in Debian, because chances are doing the above will cause system errors later!

Note that en_CA uses Canadian dollars, not USD!  You can change the Currency locale to American English (en_US) if you want real USD dollars.  Although it probably doesn't matter for formatting purposes.

Why Sweden?  It turns out lots of Europeans want something similar, as in a locale that is English language, metric, using ISO-8601 or similar style dates!

Sweden - English is an unofficial locale made up to give us that [1], but it does use Swedish kronor SEK for currency [2].  That's why you only want to set the Time locale to use en_SE, keeping the rest as en_CA (or en_US).

 

Step 2: Installing Locales in Debian

Selecting the "Region" in LXQt's locale preference app is just half the story.

PCManFM will probably work fine as is.  Qt apps are fine because it uses it's own Qt locale definition lookup system, and includes en_CA and en_SE by default.

Debian does not include en_CA by default, so you'll have to install it.  And it does not have en_SE... not at all... you'll have to add the en_SE definition file manually then install it.

You can download a copy of the en_SE locale definition written by Mikael Auno [7].  Then create this directory if it doesn't exist:

/usr/local/share/i18n/locales

Place the en_SE file into the above locales directory.  Create a text file in the above i18n directory containing this text:

en_SE.UTF-8 UTF-8

Then run in terminal:

$ sudo dpkg-reconfigure locales

You should see a list of locales you can install.  Look for and install the ones you selected in LXQt's locale preference app.  For my example above, that means en_CA, en_US, and en_SE.

Lastly, logout and re-login for the changes to take effect.

 

Fully Custom Locales in Debian: don't bother

From above, you see Debian allows you to create totally custom locales, so you can customize all the formats the way Macs can!  After all, that en_SE locale file you downloaded was just made up so to speak, and you can customize it however you want.

...but Qt won't use it.  Qt's locale system runs parallel to Debian Linux's.

So why go through the trouble of installing the en_SE locale if Qt won't use it?  Because if you don't, you'll run into problems with non-Qt apps, problems like:

Run locale in the terminal, and it'll complain:

locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Unzip certain archives using file-roller results in a dialog box complaining:

An error occurred while extracting files.
Pathname can't be converted from UTF-8 to current locale.

That occurs because a locale you chose in LXQt was not installed in Debian [8].  Qt is perfectly happy though, as it runs a separate locale system...

 

Firefox locale incompatibility

If you set your locale to Canadian or US English (en_CA or en_US), and enabled Detailed Settings to change the Time locale to Sweden - English (en_SE), Firefox will show numbers in Swedish / European style, like "3,14" instead of "3.14".

This problem happens at least in the downloads window.

Method 1: Fix by setting LC_ALL environment variable

The most reliable way to fix it in Debian is to set the LC_ALL environment variable, but only for Firefox [13].  Don't set LC_ALL globally or it'll undo the locale changes above, plus you just shouldn't as it overrides everything [12]. 

For the terminal :

With that said, all it involves is opening Firefox in the terminal like this:

LC_ALL=en_CA.utf8 firefox

You can save that in a script that's in your PATH so running Firefox always uses the LC_ALL locale.

For the Firefox icon:

The Firefox icon in Debian requires a different fix though.  That icon in the applications menu is controlled by a  firefox.desktop file located at:

/usr/share/applications/firefox.desktop  

You can modify it directly or, safer, copy it to your user's applications folder:

~/.local/share/applications

Once copied, open it in a plaintext editor and change the Exec line to this:

Exec=sh -c "LC_ALL=en_CA.utf8 /usr/bin/firefox"

 

Method 2: Fix by setting Firefox locale internally

The "official" way to set the Firefox user interface locale is via Firefox's preferences [14]:  open preferences, then go to the Language section of the General panel.

I've tried it on Debian and it doesn't work.

You could also try finding in about:config the intl.locale.requested key and set it to the desired locale [15].  I didn't test this method though because setting the LC_ALL environment variable worked perfectly for me.


Other locale options

Sweden - English (en_SE) is an unofficial locale made up to give us English language, metric, ISO-8601 date format [1].  But it uses Swedish kronor SEK for currency [2].

Denmark - English (en_DK) is another unofficial locale made up with similar English and metric formats [3].  But the date is backwards (in dd/MM/y format), and uses Danish kroner DKK currency [4].

Ireland - English (en_IE) is an official locale that, like Denmark - English, gives us English and metric units [5], and like en_DK, the date is backwards (in dd/MM/y format).  It uses Euro for currency [6] though.

So by mixing and matching Ireland, Denmark, and Sweden, you should be able to get a reasonable ISO 8601/English/Euro(pean) locale.

And mixing Canada, US, and Sweden will get you a reasonable ISO 8601/English/Dollar locale.


References

[1]: https://unix.stackexchange.com/a/62318

[2]: https://icu4c-demos.unicode.org/icu-bin/locexp?d_=en&_=en_SE

[3]: https://unix.stackexchange.com/a/272665 and https://superuser.com/a/1269909

[4]: https://icu4c-demos.unicode.org/icu-bin/locexp?d_=en&_=en_DK

[5]: https://unix.stackexchange.com/a/62317

[6]: https://icu4c-demos.unicode.org/icu-bin/locexp?d_=en&_=en_IE

[7]: https://bugs.launchpad.net/ubuntu/+source/langpack-locales/+bug/208548/comments/11

[8]: https://unix.stackexchange.com/a/269293

[12]: https://wiki.debian.org/Locale#Configuration 

[13]: https://unix.stackexchange.com/questions/34965/how-to-change-firefox-language#comment47453_34967

[14]: https://support.mozilla.org/en-US/kb/use-firefox-another-language?redirectslug=use-firefox-interface-other-languages-language-pack&redirectlocale=en-US#w_how-to-change-the-language-of-the-user-interface

[15]: https://support.mozilla.org/en-US/questions/1223719#answer-1127761


Bibliography

[9]: https://github.com/lxqt/pcmanfm-qt/issues/656

[10]: https://github.com/lxqt/lxqt-config/issues/507

[11]: https://wiki.debian.org/Locale


2021-03-18

Enable 3 Finger Drag on Linux

3 Finger Drag (3FD) is not available on Windows, and not built-in on Linux

On Windows, we can achieve something similar.  Let's call it:  3 Finger Tap to Drag Lock.  See Enable 3 Finger Drag on Windows for how.

On Linux, it is apparently possible to have pretty good 3 Finger Drag!  See below.

Pretty good but not as good as Mac's 3FD, but without Apple's tightly integrated hardware, software, OS, driver, etc., it's impossible to get Apple Mac's high quality 3FD.

What's 3FD anyway?

3 Finger Drag refers to a Mac accessibility feature.  When enabled, if you place three fingers on the Mac's trackpad or touchpad, then move those fingers in unison on the trackpad, the mouse pointer behave as if you left-clicked-and-are-dragging.

It's a better more ergonomic alternative to the tap-twice-and-drag method that's common on Macs, Windows, and Linux.

It's better because there's less finger tapping movement which can develop into "trigger finger" type repetitive strain injury.  If you drag things around a lot, tap-twice-and-drag plus another tap to deactivate dragging starts to add up to being a nuisance!

And at least for me, when dragging using the  tap-twice-and-drag gesture, I often have trouble continuing to drag mid-drag if I lift my hand away from the trackpad to reposition.  And ironically, I also have trouble disengaging the drag once I've reached the target of the drag motion too!

How to add 3FD to Linux

As of 2021 January, the happy path to getting 3FD on Linux is:

  1. Use a desktop Linux system that uses libinput for handling the trackpad
  2. build your own custom 3FD enabled libinput
  3. install your custom libinput.

(1) Use a desktop Linux system that uses libinput for handling the trackpad

Fortunately, Ubuntu and Debian uses libinput.  And libinput works with both Wayland and X11.  And Gnome/Xfce/KDE/LXDE all work with libinput.  So practically everyone's standardized onto libinput for trackpad and gesture support in 2021!

(2) Build custom 3FD enabled libinput

Unfortunately, 3FD isn't standard in libinput.  And likely won't be for a very long time if ever.

But there's a patched version of libinput with 3FD added!  Here's the most recent patch:  aakside's libinput.

(3) install your custom libinput

See Dakshin Karthikeyan's article for the Linux specific instructions on how to install.

Caution: Dakshin's article references a different 3FD patched libinput that's by jafd, which is slightly older and apparently with less 3FD enabling features.

To be clear, aakside's 3FD enabled libinput is a rebasing of complyue's 3FD libinput patch onto a more updated libinput.

I wrote a State of Built-in 3 Finger Drag on Linux post earlier if you want to understand more the relationship between the various libinput patches / forks.

Alternatively...

It's work checking out another route to 3FD based on top of libinput like libinput-gestures called libinput-three-finger-drag (marsqing).  It can work alongside libinput-gestures.  However, it's stopped working as of 2021 Oct 28. But if it works, it seems less invasive than using a patched libinput?

2021-03-10

State of Built-in 3 Finger Drag on Linux

 Will we ever get built-in 3 Finger Drag (3FD) on Linux?  At this point, likely not.

Non-libinput desktop Linux

For older desktop Linux not using libinput for trackpad support, you can look into mtrack (no 3FD but...) and the p2rkw's mtrack fork which provides 3FD.  Marty's article [1] is older but explains it well for non-libinput desktop Linux.

But non-libinput is on the way out.

Libinput is basically standard in 2021

Everyone's using libinput now, pretty much.  If you're on a desktop Linux machine using Wayland, you're using libinput.

If you're using X11 still, you still could be using libinput.  Or synaptics or xf86-input-* or...  but at least on Debian buster LXDE as I am, turns out it's using libinput.

Libinput sits between your input drivers in the linux kernel and the display server.  Libinput is the present and future of gesture, event, and pointer support for trackpads on Linux.

So if you want 3FD into the future, we have to look at libinput.

Configuring libinput

If you're using Wayland on Linux, there's no way to configure libinput.  This is by design.  You should use your desktop environment's configuration to configure the trackpad.  Your desktop environment will configure libinput as needed.

Using X11 on Linux, you can still configure libinput.  Like most things X11 related, you have to change configuration files here and there.  See libinput's FAQ on this point to start.  But ArchWiki's libinput page is great with plenty of details.

There is, however, no configuration for 3FD for libinput anyway.

State of 3FD support in libinput via patches

There's two patched versions of libinput with 3FD added you could try!

  1.  jafd's libinput 
  2. aakside's libinput --- this is an updated version of complyue's libinput which had 3FD enabled but was based on an older libinput version

See Dakshin Karthikeyan's article for the Linux specific instructions on how to install.  But Dakshin references jafd's libinput instead of complyue / aakside's patch.

 If you go through the whole Request for three fingers click+movement in libinput's repository, you'll see that jafd's 3FD is possibly less featureful than complyue's.  But complyue's version was based on an older libinput.

That Request discussion thread also seems to point at the difficulty and possibly impossibility of libinput ever having 3FD enabled by default.

Fortunately, aakside updated complyue's patch to the latest libinput!

3FD via libinput-gestures

There is another route to 3FD via libinput-gestures via this patched fork of libinput-gestures with basic 3FD support.

3FD via libinput-3FD

There is another route to 3FD based on top of libinput like libinput-gestures called libinput-three-finger-drag (marsqing).  It can work alongside libinput-gestures.  However, it's stopped working as of 2021 Oct 28.


References

[1] 3-finger-drag on Linux

2021-03-04

.bashrc, .profile, .bash_profile in Lubuntu vs Debian LXDE

Here we go again... profile vs bash_profile vs bashrc dot files.

In Lubuntu

I had figured previously [1] that:

  • Desktop environment's graphical login sources .profile
  • bash started in login mode sources .bash_profile, but if that doesn't exist, then falls back to sourcing .profile
  • bash started interactively (hence in non-login, or interactive, mode) sources in .bashrc only
  • Both .bash_profile and .profile should contain code to source in .bashrc

So when does code in each file run?

.profile has code you want to run only once, and only upon your DE graphical login.

.bash_profile has code you want to run once only upon your bash shell executing in login mode

.bashrc has code you want to run every single time bash starts, or when you login (if .profile sources in .bashrc as it should), or when bash starts in login mode (if .bash_profile sources in .bashrc as it should).

In Debian LXDE

It seems that:

  • Desktop environment's graphical login AND bash started in login mode both source .bash_profile, but if that doesn't exist, then falls back to sourcing .profile
  • bash started interactively (hence in non-login, or interactive, mode) sources in .bashrc only
  • .bash_profile or .profile should contain code to source in .bashrc
  • You should not have both .bash_profile and .profile since then the latter will be ignored anyway

This meant there's no place to put code that you want to run only once, and only upon your DE graphical login.

The workaround is to put the code in .profile (and you shouldn't have .bash_profile around as it'll override .profile).

Then make that code run only if the GUI is running, which you can detect.  And also make the code only once only, by checking if it's run before.

e.g. in .profile


if [ -n "$DISPLAY" ]; then
    if [ ! -n "$RUNONCE" ]; then
        export RUNONCE="done" # like a C include guard
        cat "GUI running" > GUI_is_running.txt
    fi
fi 

In a console without a GUI, $DISPLAY is not defined.

To learn more

 Some resources from other sites:

[1] profile bash_profile bashrc on Ubuntu Linux, Macs, and Windows

2021-02-19

Remap Capslock to Control in VirtualBox Linux guest on Windows host

Let's say you have Debian Linux guest OS in VirtualBox, running on a Windows 10 host.

Here's how to map capslock to control

If it was a Mac host, it'd be super easy: install and use Karabiner-Elements to remap capslock to control in the Mac host [3]. Now both host and guest Linux will have the remapping.  Done.

On Windows, it's not so easy.

You basically have to do the remapping in both Windows and Linux.  Follow the ideas here:

  1. Remap one key to another in Windows, like Capslock to Control 
  2. Remap one key to another in Linux, like Capslock to Control

Set shift key to break capslock for greater reliability

For greater reliability, you should also set shift key to break capslock.  So adding that to the Linux command for making capslock a control key, you'd get this command to run instead:

setxkbmap -option -option caps:ctrl_modifier -option shift:breaks_caps

The first blank "-option" clears any previously set.  Then the second option sets the capslock to control.  The third option makes shift key break capslock.

This is needed because sometimes switching between Windows host and Linux guest, the capslock gets locked down.  Now a quick tap on the shift key should break that lock.

What's wrong with remapping in Windows host only?

If you remap capslock to control in Windows host only, it'll actually sort of work in the Linux guest --- except in Linux, the capslock will now function as both capslock and control!

I did that for a while and didn't notice as I tested it inside Linux guest.  Capslock-T in Firefox still created new tabs!  Works!  But if you start typing, you'll notice things are in all caps until you tap capslock again, and vice versa.

What's wrong with remapping in Linux guest only?

If you remap capslock to control in Linux guest only, it'll actually work!  Except the capslock LED light will turn on/off with each click.  And if you switch back to Windows, capslock might have been engaged as you used capslock-as-control in Linux guest.

That's why you must do the remapping in both Windows host and Linux guest.  That way they stay in sync with each other, and the LED light won't turn on.

Capslock LED light in Linux

As I was troubleshooting the Linux guest only remapping, and noticed the capslock LED light would turn on/off, at first I thought the problem was in Linux.

And in case it is for your situation, here's how to fix or check.

xmodmap -e 'clear Lock' is suppose to clear the capslock LED from being turned on [1].  Try that, despite xmodmap being a deprecated system.

You can check if the LED is being turned on by Linux by running this command:

cat '/sys/class/leds/input5::capslock/brightness'

Turns out the LED property is represented as "just a file" on Linux you can open and read [2].

In my case, that command showed the LED was always off from Linux guest's point of view.  Turned out Windows host was controlling it.


Reference

[1] How to prevent the caps-lock toggle effect, without remapping or disabling it?

[2] Turn the Caps Lock LED on, while keep Caps Lock status is off

[3] Actually, I think Mac's System Preferences even have a built in setting for doing this remapping, so Karabiner might not even be needed for this single simple remapping.

2021-02-10

Remap one key to another in Linux, like Capslock to Control

Linux is known for choice and customizability.

So it's ironic but when it comes to keyboard and mouse key remapping and scripting, Linux is the more challenging than Windows (using AutoHotKey) or Macs (using Karabiner-Elements).

I'll link to some guides and answers below, but some big picture ideas to be aware of in 2020 for Linux key remapping:

xmodmap is deprecated

Prefer using setxkbmap if it'll do what you want.

Some xmodmap functionality remains, but it's clearly a deprecated system and it sometimes doesn't work.

I tried to do some simple key remapping with it on Debian LXDE and it didn't work for me.

setxkbmap is preferred but complicated

It has many common remappings like turning capslock to control [1]:

setxkbmap -option -option caps:ctrl_modifier

The first blank "-option" clears any previously set.  Then the second option sets the capslock to control.

Swapping the left control and alt keys can be easy to do as there's a direct option for it too.

Running setxkbmap only affects the current session, so logging out will wipe the settings. To make it auto set on login, put it in a script run from .bashrc or similar.

Limitations

But what if you want to swap the right control and alt keys instead?  Or some weird 4 way switch of keys?

There many be some set of xkeyboard-config options that'll work, but it's not straightforward the way it is on a Mac with Karabiner-Elements.

You also may have to find and use keycodes or events generated by your keyboard or mouse interactively.  Do this using the xev command line app [3].

 If you want to go down this route, be sure to check out:  A simple, humble but comprehensive guide to XKB for linux.  But if you want an easier way, check out the last section below because, of course, there's an app for that!

Show setxkbmap options

To find what options are supported by setxkbmap, you can run [2]:

man xkeyboard-config

man xkeyboard-config is not complete: e.g. right alt to right control

More annoyingly, turns out running man xkeyboard-config does not list a complete list of what setxkbmap can do!

For example, let's say you want to make the right alt another right control key.

It's not listed in man xkeyboard-config but it is easily possible!  Just run:

setxkbmap -option ctrl:ralt_rctrl

It is listed in a lower level description file at however [4] :

/usr/share/X11/xkb/rules/evdev

And if you're up to it, you can change the low level description files that setxkbmap uses to give you great control over the keyboard remappings.  But it's not easy the way it is on Macs and Windows!

Remapping single keys using hwdb files

This is lower level than setxkbmap, but it's not deprecated like xmodmap, and for single key to single key remapping, it seems to work well.

Detailed instructions found at: Remapping keys using hwdb files

Use an app to intercept and inject keys

This method allows more complex hotkeys and combos to be remapped to almost arbitrary input.

This is really new.  Try out  sezanzeb's key-mapper.  It works with X11 and Wayland, and has an easy GUI interface to it.

Here's a nice guide for it: Remap Keyboard And Mouse Buttons On Linux With The New Key Mapper GUI (Supports X11 And Wayland).

Since key-mapper is a Python program, you'll need Python to run it anyway.  So on Debian, you might as well just install Python and pip, then use pip to install it.

Key-mapper is not available in Debian's package system, so you'll have to download and install it from the key-mapper Github repository.

In fact, Debian has a package called "keymapper" that is not the key-mapper you're looking for.  Using apt to install key-mapper, even key-mapper's own pre-packaged .deb file, kept suggesting the wrong "keymapper" package instead.

Probably easiest to just install it with pip!

(NEW!)  Check out kinto if you're interested in mac-style hotkeys on Linux and Windows!


References

[1] How to swap Ctrl and Caps Lock keys in Linux

[2] List all valid kbd layou ts, variants and toggle options (to use with setxkbmap)

[3] How to prevent the caps-lock toggle effect, without remapping or disabling it?

[4] Map right alt to left control

2020-12-30

How to reduce PDF file size on Macs and Linux?

 Of the suggestions I saw, using the "shrink PDF" script files with Ghostscript was the best.

Install Ghostscript first.  On Linux, apt install ghostscript or on Macs using homebrew, brew install ghostscript.

Save that shrink PDF script into a shrinkpdf.sh file.  Make sure to chmod u+x shrinkpdf.sh to allow it to execute.

Then use it, /path/to/shrinkpdf.sh in.pdf out.pdf.

On my old Mac running Sierra macOS 10.12, Ghostscript had trouble running because the way brew built it, Ghostscript was looking for the libXt.6.dylib library in the wrong place.

You need XQuartz installed first.  But XQuartz installs X11 libraries into /opt/X11.  But Ghostscript looks for X11 libraries in /usr/X11.

Easy fix?  Symlink the X11 directory to where Ghostscript expects it.

Go to where Ghostscript looks for X11: cd /usr

Then symlink to where the X11 libraries actually are: sudo ln -s /opt/X11.

Done.

2020-09-23

synaptic doesn't run after entering password in GUI

Clicking on synaptic (which runs synaptic-pkexec), I can enter my password in the "sudo" (gksu?) window, but then synaptic GUI doesn't actually appear.  I'm on Debian buster and LXDE.

Synaptic runs fine from the terminal (via sudo synaptic)!

Turns out I needed to install the policykit-1-gnome package.

It's the same issue as described in pkexec won't launch polkit GUI in Lubuntu / LXDE but on Debian.  I have no idea why policykit-1-gnome isn't marked as a dependency for LXDE but it is.


2020-06-21

Migrating to Debian LXQt - great apps, tips and fixes

I like LXQt and use Lubuntu.  I'm trying out Debian LXQt because of... snap issues.  So here's the Debian LXQt edition of my previous Lubuntu productivity software to install and  migration notes.

TL;DR...

After installing the standard Debian testing distribution (currently bullseye), I like to:

# for building some kernel modules
sudo apt-get install build-essential dkms linux-headers-$(uname -r)

# enable contrib and non-free repos
sudo sed -ri 's/^(deb.*main)$/\1 contrib non-free/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade

# productivity software I like (note nomacs is in Debian unstable repository)
sudo apt-get install chrony file-roller xournal evince nomacs graphicsmagick ghostwriter emacs gimp gimp-plugin-registry gimp-gmic default-jdk gcc make ttf-mscorefonts-installer ruby vlc  libsecret-1-0 libsecret-1-dev keynav gedit restic rename git gitk git-gui

# enable libsecret for git
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret


# because where I am, it's hard to contact a time server except Apple's...
echo 'server time.apple.com iburst' >> /etc/chrony/chrony.conf

# make an icon for GraphicsMagic
cat > ~/.local/share/applications/GraphicsMagic\ display.desktop << EOM
[Desktop Entry]
Encoding=UTF-8
Name=GraphicsMagick display
Comment=GraphicsMagick display
Exec=/usr/bin/gm display %F
Icon=lximage-qt
Categories=Graphics;Viewer;RasterGraphics;2DGraphics;Photography;
Type=Application
MimeType=image/jpeg
Terminal=false
EOM

# install aws-cli 2 using curl,unzip,install, like this:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install


Note: ttf-mscorefonts-installer might require user interaction to install, so don't walk away from it overnight thinking everything will be done by morning.

Then install by hand VS Code, Chrome, Netbeans, and LibreOffice dictionaries and plugins etc.


Finally, also set up file-roller integration.


Software to Download and Install by Hand

The default package manager using the default Debian software sources (testing channel) are pretty good at keeping up with the versions.  I like doing that most of the time to reduce on maintenance.

Some things are worth the manual install though.

1. LibreOffice needs some extensions, dictionaries, and settings:
  • an extension I rely on a lot:  MultiFormatSave.  Let's you save a document to multiple formats at the same time, great for archival compatibility.

     
  • it needs a dictionary for spell checking!  For English, these dictionaries from LibreOffice are good.


  • this setting is essential to prevent previews of recent documents on the start screen, which is quite a privacy blunder:
    • Tools menu > Options > LibreOffice > Advanced > Open Expert Configuration > Search for RecentDocsThumbnail property > toggle to false.

2. Google Chrome is self-updating.  I prefer Firefox, which is installed by default, but sometimes you need Chrome.


3. Apache NetBeans.  This requires as a dependency the Java JDK at least version 8.
  • So use muon to install the default-jdk because the default is version 11, which works fine so far.

  • And get the "Maven Remote Search" plugin before Netbeans starts downloading and extracting the maven index that's apparently more than 1 GB in size (froze my computer since I have very little disk space...).

4.  VS Code.

    Screen Saver Lock Screen Madness

    It's madness, there are at least 3 places to set the screen saver / lock screen / sleep settings:
    1. Preferences > LXQt Settings > Session Settings
    2. Preferences > LXQt Settings > Power Management
    3. Preferences > Screensaver
    They seem to interact with each other, and each has slightly different settings and uses.

    My default Screensaver sometimes ran the CPU real hot, so maybe set that to something less energy intensive first.  I used Deco with settings reducing the framerate.

    I'd suggest using each tool for orthogonal tasks:
    1. use Screensaver purely for setting the screensaver and when it turns on.

    2. Set when the screen locks using Power Management (Idle tab).

    3. Use the Session Settings to set whether the screen locks before suspending the OS (I think it defaults to locking after suspending).

    File compression tool

    For reasons, I like file-roller.  So just install file-roller via apt-get.

    The default file explorer PCManFM-Qt has a preferences option to integrate with file-roller instead as well for ease of use.




    Explanation of certain software choices


    Basic graphics editing

    The default graphics viewer LXImage is actually a bit of a pain to use, especially coming from Mac Preview, which really has a great mix of UI, UX, and editing features for graphics and PDFs...

    There's no equivalent to Apple's Preview, but for graphic files, nomacs Image Lounge is pretty good.  nomacs has a UI UX reminiscent of Preview, and has some basic graphics editing features too.


    Little more graphics editing features

    The default graphics viewer LXImage has some annotation tools, I guess, but nothing more.  nomacs has some more graphics editing features, but I sure miss the Mac Preview tool.

    Anyway, ImageMagick or the more updated GraphicsMagick fork is quite useful (but beware it has a very... historic?... dated?... GUI).  It can be installed via apt-get, but it doesn't seem to install a default app launcher icon --- well, it's meant to be used from the terminal, but I like to deal with the GUI.

    So I added a blank file to ~/.local/share/applications called "GraphicsMagic display.desktop" with the following text saved to it:

    [Desktop Entry]
    Encoding=UTF-8
    Name=GraphicsMagick display
    Comment=GraphicsMagick display
    Exec=/usr/bin/gm display %F
    Icon=lximage-qt
    Categories=Graphics;Viewer;RasterGraphics;2DGraphics;Photography;
    Type=Application
    MimeType=image/jpeg
    Terminal=false


    Now you can use it like LXImage (in fact, it uses the LXImage icon because, why not?).

    If I need more intensive graphics editing, I'll use GIMP.


    Time Clock Auto Update Synchronization Problem

    Debian looks to use timedatectl by default for setting time, including synchronization via NTP Network Time Protocol.  It doesn't allow me to force a sync though.

    You could instead use chrony.

    It lets you do things like chronyc sources to see the currently available and selected time sources.  Perhaps your network is blocking NTP updates?

    Or chronyc sourcestats to see your clock's time offset from the various NTP sources.

    You could do a single time offset check, without setting the time: sudo chronyd -Q

    Or manually force a time synchronization with: sudo chronyd -q

    Oh, and I like to add to /etc/chrony/chrony.conf  : server time.apple.com iburst because where I am it's hard to get to a time server except Apple's.



    Microsoft Fonts

    Install ttf-mscorefonts-installer.  Some instructions for this but it's straightforward from the package manager.  Just use sudo apt install ttf-mscorefonts-installer.



    Markdown editor

    I like Ghostwriter so far.


    Backup

    For file backup, restic looks great.  Some people like borg.


    Remember Git passwords securely

    Git is great.  Remember Git passwords securely is even better, but requires manual install though.


    Misc

    keynav  ---  Didn't have it in Lubuntu, but it exists for Debian!!!!

    skippy-xd  --- It hasn't been updated and doesn't work anymore for Lubuntu (OpenBox, LXQt).  Debian LXQt uses Xfwm though, so somewhat similar functionality is already built in!