Monday, June 18, 2018

nice collection of bash tips

Nicely done! Article by Steve Ovens: "Bash tips for everyday at the command line"

Ovens posted the following at the end, for the "tl;dr" crowd:

Appendix 1. List of tips and tricks covered

# History related
ctrl + r (reverse search)
!! (rerun last command)
!* (reuse arguments from previous command)
!$ (use last argument of last command)
shopt -s histappend (allow multiple terminals to write to the history file)
history | awk 'BEGIN {FS="[ \t]+|\\|"} {print $3}' | sort | uniq -c | sort -nr | head (list the most used history commands)

# File and navigation
cp /home/foo/realllylongname.cpp{,-old}
cd -
rename 's/text_to_find/been_renamed/' *.txt
export CDPATH='/var/log:~' (variable is used with the cd built-in.)

# Colourize bash

# enable colors
eval "`dircolors -b`"
# force ls to always use color and type indicators
alias ls='ls -hF --color=auto'
# make the dir command work kinda like in windows (long format)
alias dir='ls --color=auto --format=long'
# make grep highlight results using color
export GREP_OPTIONS='--color=auto'

export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;33m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m' # end the info box
export LESS_TERMCAP_so=$'\E[01;42;30m' # begin the info box
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'

# Bash shortcuts
    shopt -s cdspell (corrects typoos)
    ctrl + _ (undo)
    ctrl + arrow (move forward a word)
    ctrl + a (move cursor to start)
    ctrl + e (move cursor to end)
    ctrl + k (cuts everything after the cursor)
    ctrl + l (clears screen)
    ctrl + q (resume command that is in the foreground)
    ctrl + s (pause a long running command in the foreground)
    ctrl + t (swap two characters)
    ctrl + u (cuts everything before the cursor)
    ctrl + x + ctrl + e (opens the command string in an editor so that you can edit it before it runs)
    ctrl + x + * (expand glob/star)
    ctrl + xx (move to the opposite end of the line)
    ctrl + y (pastes from the buffer)
    ctrl + shift + c/v (copy/paste into terminal)

# Running commands in sequence
&& (run second command if the first is successful)
; (run second command regardless of success of first one)

# Redirecting I/O
2>&1 (redirect stdout and stderr to a file)

# check for open ports
echo > /dev/tcp//
`` (use back ticks to shell out)

# Examine executable
which
file
command -V (tells you whether is a built-in, binary or alias)

Thursday, June 7, 2018

overwhelmed by plastic

June 5 is marked by the United Nations as World Environment Day, a day set aside since 1974 to promote “worldwide awareness and action for the protection of our environment.” This year’s theme is “beat plastic pollution.”
-- from: World Environment Day 2018: ‘Beat Plastic Pollution’
   The Atlantic, June 5, 2018

Stunning photos. What are we doing to our world??

Monday, May 7, 2018

more bionic stuff

I copied this shot from the OMG! Ubuntu! website; looks like a live session of Ubuntu 18.04, with Nautilus opened up:



The modified GNOME Shell desktop they're using has a dock along the left side, and that includes an icon at the bottom left for the Apps Menu.

Note the Amazon web launcher on the panel. Bleh.

(See: https://www.omgubuntu.co.uk/2018/04/ubuntu-18-04-download-release-features)


If I installed Ubuntu 18.04, I'd probably end up running

sudo apt install vanilla-gnome-desktop

and then logging into the vanilla GNOME session, since that's what I'm used to from Debian Stretch.

Also, I'd run:

sudo apt purge ubuntu-web-launchers

That gets rid of the Amazon launcher, and I think it should get rid of these associated files:

/usr/share/applications/com.canonical.launcher.amazon.desktop
/usr/share/applications/ubuntu-amazon-default.desktop
/usr/share/doc/ubuntu-web-launchers/changelog.gz
/usr/share/doc/ubuntu-web-launchers/copyright
/usr/share/icons/hicolor/128x128/apps/amazon-store.png
/usr/share/icons/hicolor/48x48/apps/amazon-store.png
/usr/share/icons/hicolor/52x52/apps/amazon-store.png
/usr/share/icons/hicolor/64x64/apps/amazon-store.png
/usr/share/ubuntu-web-launchers/amazon-launcher

See:
https://linuxconfig.org/how-to-remove-the-gnome-amazon-launcher-package-from-ubuntu-18-04-bionic-beaver-desktop
https://packages.ubuntu.com/bionic/all/ubuntu-web-launchers/filelist

My understanding is that the ubuntu-web-launchers package is not installed if the Minimal Installation option is chosen. Good to know.

This Amazon crap bugged me enough that I decided to quit using Ubuntu, so I haven't installed the latest release. But I think that overall the LTS releases work out quite nicely, especially after the first point release. The ubuntu-web-launchers package isn't included by default in the 18.04 releases of Ubuntu "flavors" like Kubuntu and Lubuntu; one of those might be better options for users who want to take advantage of the Bionic repos but who don't want to run the main distro.

Sunday, May 6, 2018

quick glance at helium

The Stretch-based BunsenLabs "Helium" was finally released last week. I took the live session for a spin. I wrote the image (bl-Helium_amd64+build2.iso) to a flash drive and booted up my "test" computer with it. The boot menu presents the following options:

Live (amd64)
Live (amd64 failsafe)
Live system (load image to RAM)
Install
Text based install
Advanced Options >

Under that submenu at the bottom, I found:

   Expert installer (text)
   Expert installer (GUI)
   Rescue mode (text)
   Rescue mode (GUI)
   Hardware Detection Tool (HDT)
   Memory Diagnostics Tool (memtest86+)
   Back to main menu <

Interesting. Well, I went into the live session and browsed around. Things seemed okay. There's a Welcome window that pops up at first boot:



Helium's live session ships with Firefox, Thunar, Geany, Terminator, Catfish, Mirage, xfce4-screenshooter, scrot, VLC Media Player, Xfburn, LibreOffice Writer, Gnumeric, Galculator, Evince PDF Viewer, Synaptic, GParted, and lots more.



I could access my computer's partitions with no problem via Thunar. However, when I opened GParted, I got the following message:



I clicked "Cancel" and GParted came up, but I figured it would be a bad idea to use GParted, and wasn't sure if I should attempt an installation. I'll hold off on that thought for now.

I didn't much care for the new default theming, although it does look nice enough. I prefer the old CrunchBang-style black and white, like what we got with BunsenLabs "Deuterium":



Also, I don't like that (on the tint2 panel, at the far left) the launcher icons for the web browser, file manager, text editor, and terminal emulator don't match the taskbar icons of the running apps (Firefox, Thunar, Geany, and Terminator). And, here's an instance where, even though I've got all four of those apps running, the taskbar icon for Thunar is missing:



And I don't see the point in renaming those apps -- why "BL File Manager" and "BL Text Editor" instead of "Thunar" and "Geany", for example?



Well, I've been eagerly awaiting this release ever since Debian Stretch came out last year. Not so excited about it today. I still have BunsenLabs "Deuterium" and SalentOS "Neriton" installed on my "test" computer; I think I'll keep those for now and maybe install "Helium" sometime later. Or not.

For more info, see: https://www.bunsenlabs.org/

Monday, April 30, 2018

bionic installed

I installed Kubuntu 18.04 LTS ("Bionic"), choosing the "Minimal installation" option in the Ubiquity installer. "Minimal" is kind of a stretch, turns out, but it's a good way to go -- provides the user with a nice, working system without some of the stuff that might not be wanted or needed.

I ended up with Kubuntu as the second distro in a dual-boot setup with Debian Stretch. I ran the installer from the live session by opening Konsole and using the ubiquity --no-bootloader command. Nice little trick.

The default Kubuntu 18.04 LTS desktop:



After some tweaking, my empty desktop, with vertical/left panel:



Konsole, showing off my neofetch:



I spent a good amount of time messing around with the System Settings, eventually getting things set up to my tastes. I'm running KDE Plasma with most of the desktop effects turned off. I've added a few apps -- Pale Moon, Geany, Double Commander, and some others.  I'm finding Kubuntu 18.04 to be an excellent release, in the live session as well as installed to the hard drive.



Sunday, April 29, 2018

bionic live

A few shots of the live session of Kubuntu 18.04 LTS ("Bionic Beaver"), running from a flash drive on my HP 15 notebook.

The default KDE Plasma desktop, empty:



With the desktop right-click menu opened up:



KInfocenter:



Dolphin and Konsole:



Via Dolphin, it was easy to access my hard drive's partitions right from the live session.

Here, the main menu is opened up to the Live session user's Favorites (Kubuntu 18.04 ships with Firefox 59.0.2):



VLC played my wma and mp3 files (stored on another flash drive) with no problem:



Kubuntu 18.04 LTS performed fine from the live session. For kicks, I set up a few extra desktops, and played around with the desktop cube a little:



The official release announcement: https://kubuntu.org/news/kubuntu-18-04-has-been-released/

Thursday, April 12, 2018

so long, albuquerque journal

I am a former subscriber to the print edition of the Albuquerque Journal. Several years ago, for various reasons, I decided to stop having the paper delivered to me. I still go out and pick up a newspaper sometimes -- maybe two or three times per month -- but most of the time I simply visit abqjournal.com instead.

But today, I see this:


Nope. Screw that.

Okay, here's what happens whenever one of these news sites starts pulling crap like this: I stop visiting their websites. The End.

I refuse to subscribe to the digital edition, and I will not disable my ad blocker.

I have stopped visiting elpasotimes.com and other sites for pretty much the same reason. I'm able to view some of the articles from the El Paso Times online, but it seems that most of the articles can be viewed only by digital subscribers.

Perhaps it's a good business decision for these businesses to try to strong-arm people into paying to read digital content, or to attempt to get folks to disable ad blockers. I don't know, and I don't care. What I do know is that the approach doesn't work with me.

So, goodbye, Albuquerque Journal, at least for now. You aren't all that. Seriously.

I'll check back later to see if they stop doing this stuff, but frankly, there are too many other sources for news and information out there. People have choices. I'll continue to buy the print edition a few times per month, but other than that, they won't get any money from me. I'll get my news from someplace else.