Archives For November 30, 1999

There are quite a few ways to transfer files over home network. One of the easiest ways is to run a single python command in terminal.

Python contains a script that sets up simple http server. No need to install anything, and even no internet connection required.

1. Simply right-click on the folder that contains the files you want to transfer, then select ‘Open in Terminal

2. When terminal opens, run the single command:

python3 -m http.server

UPDATE: You can specify the listening port (e.g., 9900) if you get “Address already in use” error, by running command:

python3 -m http.server 9900

That’s it!

Now any device in the same network can access the http file server by going to (change 8000 if you specified another listening port): http://server_ip:8000

In addition, you may run python3 -m http.server & instead to start the http server in background, so the terminal window can be closed.

To check your IP address, go to Settings > Wi-Fi (or Network), click on the gear button after your connected network and check the IPv4 Address.

Need to do some work in the black & white command line console? You can press Ctrl+Alt+F3 on keyboard to switch from the current session to tty3 text console, and switch back via Ctrl+Alt+F2.

From the startup grub boot-loader menu entry, you may select the Advanced Options > recovery mode > Drop to root shell prompt to get into text mode. However you need to run command mount -o rw,remount / to get file system write permission.

If you want to make Ubuntu automatically boot into the text mode, configure grub settings by doing following steps one by one:

1. Open terminal and run command to backup the configuration file:

sudo cp -n /etc/default/grub /etc/default/grub.backup

2. Edit the configuration file via command:

sudo gedit /etc/default/grub

When the file opens, do:

  • disable GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" by adding # at the beginning.
  • set GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="text"
  • remove # from the line GRUB_TERMINAL="console" to disable graphical terminal.

3. Save the file and apply changes by running command:

sudo update-grub

4. One more command is required as Ubuntu now uses systemd:

sudo systemctl set-default multi-user.target

How to Restore:

To restore changes, simply move back the backup file via command:

sudo mv /etc/default/grub.backup /etc/default/grub

And run sudo update-grub to apply change.

Also change the setting back in systemd via command:

sudo systemctl set-default graphical.target

Transmission BitTorrent

Transmission, Ubuntu’s default BitTorrent Client, released new major 3.00 version a days ago. Here’s how to install it in Ubuntu 20.04, Ubuntu 19.10, Ubuntu 18.04.

Transmission 3.00 features:

  • Allow RPC server to listen on IPv6.
  • Limit incorrect authentication attempts to prevent brute-force attacks.
  • Add Peer ID for Xfplay, PicoTorrent, Free Download Manager, Folx, Baidu Netdisk torrent clients
  • Make transmission slightly faster by adding TCP_FASTOPEN support
  • Add support for mbedtls and wolfssl, LibreSSL
  • Add queue up/down hotkeys
  • Improve Qt UI look on hi-dpi displays
  • And much more other changes.

How to Install Transmission 3.00 in Ubuntu:

The official Transmission PPA has built the packages for Ubuntu 20.04, Ubuntu 19.10, Ubuntu 18.04.

packages for Ubuntu 18.04 and Ubuntu 16.04 are broken at the moment of writing, check the PPA link before getting started.

1. Open terminal either by pressing Ctrl+Alt+T on keyboard or by searching for ‘terminal’ from your system application menu. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:transmissionbt/ppa

Type user password (no asterisk feedback) and hit Enter to continue.

2. Then launch Software Updater (update manager) and upgrade the torrent client:

How to Restore:

For any reason, you can restore the BitTorrent client to the stock version by running command in terminal:

sudo apt install ppa-purge && sudo ppa-purge ppa:transmissionbt/ppa

Audacity audio editor 2.4.0 was released a few days ago. The release was paused due to a critical bug. Now version 2.4.1 arrived with quick fixes.

What’s new in Audacity 2.4.1:

  • Works on Mac Catalina.
  • New Time Toolbar.
  • Presets for more effects can be imported and exported.
  • New Multi-View mode for tracks.
  • Export audio to Opus in Windows, Linux.
  • Easier to convert labels between point labels and range labels.
  • New Loudness Normalization effect.
  • New RMS measurement analyzer.
  • New Noise Gate effect.
  • New Spectral Delete effect.
  • Tons of bug-fixes.

How to Install Audacity 2.4.1 in Ubuntu:

The unofficial PPA has built the new release packages for Ubuntu 20.04, Ubuntu 19.10, Ubuntu 18.04, and Ubuntu 16.04.

1. Open terminal either via Ctrl+Alt+T keyboard shortcut or by searching for ‘terminal’ from application menu. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:ubuntuhandbook1/audacity

Type user password (no asterisk feedback due to security reason) when it prompts and hit Enter to continue.

2. If you have a previous version installed, you can upgrade Audacity via Software Updater after adding the PPA.

upgrade audacity

or run following commands one by one to check updates and install (or upgrade) audacity 2.4.1:

sudo apt update

sudo apt install audacity

Uninstall:

To remove the PPA repository, launch Software & Updates utility and navigate to ‘Other Software’ tab.

To remove Audacity audio software, either use system package manager or run command in terminal:

sudo apt-get remove --autoremove audacity audacity-data

Kodi media center 18.7 was released today. Now it’s available to install via PPA in Ubuntu 16.04, Ubuntu 18.04, Ubuntu 19.10, and Ubuntu 20.04.

Kodi 18.7 is a bug-fix release that contains following changes:

  • Add more PVR context menu support.
  • Add scroll to plot on PVR Channel Guide Dialog
  • Add an icon for Blu-rays
  • PVR addon API documentation updates and fixes.
  • improve bluray menu detection.
  • allows encrypted dvd playback on ios
  • Add “Get all” button to Controller dialog.
  • Fix playing games with VideoPlayer when emulators are disabled
  • And much more other changes.

How to Install Kodi 18.7 in Ubuntu:

Though it’s not been officially announced in Kodi website, Kodi Team PPA has made the packages for all current Ubuntu releases and derivatives.

1. Open terminal either from application menu or by pressing Ctrl+Alt+T on keyboard. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:team-xbmc/ppa

Type user password (no asterisk feedback) when it prompts and hit Enter to continue.

2. Then either upgrading Kodi from an existing version via Software Updater:

upgrade Kodi

or refresh system package cache and install Kodi 18.7 via commands:

sudo apt update

sudo apt install kodi

Uninstall:

To remove the Kodi PPA repository, simply open Software & Updates -> Other Software.

To remove Kodi, run command:

sudo apt remove --autoremove kodi kodi-data kodi-bin

HP Linux Imaging and Printing

HPLIP, HP print, scan, and fax drivers for Linux, released 3.20.5 a few days ago with new printers and Linux distributions support.

HPLIP 3.20.5 added following new devices support:

  • HP DeskJet 1200, Ink Advantage 1200
  • HP DeskJet 2300 All-in-One, Ink Advantage 2300 All-in-One
  • HP ENVY 6000 series, Pro 6400 series.
  • HP DeskJet Plus 6000, 6400 series
  • HP DeskJet 2700 and Ink Advantage 2700 All-in-One Printer series
  • HP DeskJet Plus 4100, Ink Advantage 4100 All-in-One Printer series
  • HP LaserJet Enterprise M610dn, M611dn, M611x, M612dn, M612x
  • HP LaserJet Enterprise MFP M634dn, M634z, M635h, M635fht, M636fh
  • HP LaserJet Enterprise Flow MFP M634h, M635z, M636z

The new release also added support for Debian 10.3, and Manjaro 19.0.

There’s also known issues that USB print and scan will not work on Vasari and Taccola on Ubuntu 20.04, please refer to link: manpages.ubuntu.com.

How to Install HPLIP 3.20.5 in Ubuntu:

Due to requirement of old legacy python 2 libraries, HPLIP 3.20.5 does not install on Ubuntu 20.04.

1. To install the software, download the package “hplip-3.20.5.run” from the link below:

HPLIP Download Page

2. Then open terminal either via Ctrl+Alt+T or by searching for “terminal” from app launcher. When it opens, run command to give executable permission:

chmod +x ~/Downloads/hplip-3.20.5.run

3. Finally run command to start installing the driver:

./Downloads/hplip-3.20.5.run

Follow the terminal output and answer some questions. If everything goes OK, plug or re-plug your HP devices and enjoy!

Want to convert your video files (e.g., mp4, wav, mkv) to mp3 or other audio formats?

Without struggling with FFmpeg command line tool or any other video editor, SoundConverter offers a clean and easy interface that can do the job just with a few clicks.

SoundConverter supports reading Ogg Vorbis, AAC, MP3, FLAC, WAV, AVI, MPEG, MOV, M4A, AC3, DTS, ALAC, MPC, Shorten, APE, SID, MOD, XM, S3M, etc…, and converting to Opus, Ogg Vorbis, FLAC, WAV, AAC, and MP3.

1.) First install SoundConverter either from Ubuntu Software Center:

or by running command in terminal:

sudo apt install soundconverter

2.) Launch the tool, add your video files, choose output format, and click convert.

The program will use as many cores as possible to speed up the conversion if you have huge number of files to process.

For KDE users, there’s SoundKonverter (install it from Ubuntu Software) with more features including rapping CD to mp3.

FlightGear Flight Simulator 2020.1 was released a week ago. Now it’s finally made into PPA for Ubuntu 16.04, Ubuntu 18.04, Ubuntu 19.10, Ubuntu 20.04, and their derivatives.

FlightGear 2020.1 was released as current preview release that contains many exciting new features, enhancements and bugfixes.

Enhancements since 2019.1 include a developer preview of the upcoming Compositor graphical rendering framework as a separate pre-built binary, better aircraft carrier support, improvements to both the JSBSim and YASim flight dynamics models, better view options, more efficient and better looking OpenStreetMap buildings and translation of the UI into Polish. Major aircraft updates include the Boeing 777, Airbus A320, Antonov AN-24, F-16, Piper J3Cub, Saab JA37 Viggen, Piper PA28 Cherokee, Bombardier Q-400, Space Shuttle.

1.) To install the flight simulator, first open terminal either from system application menu or by pressing Ctrl+Alt+T on keyboard.

Package for Ubuntu 20.04 needs to be rebuilt, check the link before getting started.

When terminal opens, run command to add the PPA repository:

sudo add-apt-repository ppa:saiarcot895/flightgear

Type user password (no asterisk feedback) when it prompts and hit Enter to continue.

2.) Then refresh system package cache and install the software via command:

sudo apt update

sudo apt install flightgear

If an old version was installed, you can also upgrade it via Software Updater utility.

Uninstall:

To remove FlightGear PPA, either go to Software & Updates > Other Software, or run command:

sudo add-apt-repository --remove ppa:saiarcot895/flightgear

And remove the flight simulator if you want by running command:

sudo apt remove --autoremove flightgear flightgear-data

SuperTux 0.4.0

SuperTux, classic 2D jump’n run video game inspired by Super Mario Bros, released 0.6.2 a few days ago to celebrate its 20th anniversary.

SuperTux 0.6.2 features reworked graphics and levels, release highlights include:

  • A new worldmap, “Revenge In Redmond”, which includes new enemies and sprites !!!
  • New and improved backgrounds and sprites
  • Improvements to many levels in the Icy Island and forest world
  • Speed improvements for levels using a huge amount of lava tiles
  • An issue causing the bridge in the forest world to not be shown in certain cases was fixed

How to Install SuperTux 0.6.2 in Ubuntu:

For Ubuntu 18.04 and higher, SuperTux Snap package (runs in sandbox) can be installed directly from Ubuntu Software Center.

If you prefer Ubuntu .deb package, I’ve uploaded the packages into the unofficial PPA for Ubuntu 16.04, Ubuntu 18.04, Ubuntu 19.10, and Ubuntu 20.04.

1. Open terminal either from system application menu or by pressing Ctrl+Alt+T on keyboard. When it opens, run command to add the PPA:

sudo add-apt-repository ppa:ubuntuhandbook1/supertux

Type user password (no asterisk feedback) when it prompts and hit Enter to continue.

2. If an old version of the .deb package was installed, upgrade it via Software Updater:

or run commands to install Supertux 0.6.2:

sudo apt update && sudo apt install supertux

Uninstall:

To remove the PPA, either go to Software & Updates -> Other Software or run command:

sudo add-apt-repository --remove ppa:ubuntuhandbook1/supertux

To remove the game, run command:

sudo apt remove --auto-remove supertux supertux-data

This simple tutorial shows how to change the action (e.g., power off, hibernate, do nothing, or lock) when laptop lid is closed in Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 24.04, while it suspends Ubuntu by default.

NOTE: This tutorial is also tested and works in Ubuntu 22.04, and Ubuntu 23.10 with default GNOME desktop environment.

Dconf editor offers options to change the action to take when the laptop lid is closed on AC or power, but it doesn’t work!

So far as I know, you can edit the logind.conf file to change the action. And it should work on all Ubuntu desktop, server, and flavors.

1.) Open terminal (press Ctrl+Alt+T on Gnome) from your system application menu. When it opens, run command:

sudo gedit /etc/systemd/logind.conf

Type user password (no asterisk feedback) and hit Enter. For Ubuntu 24.04, replace gedit in command with gnome-text-editor or nano command line text editor depends on your desktop environment.

2.) When the file opens, find out the line #HandleLidSwitch=suspend and change it to one of following :

  • HandleLidSwitch=lock – lock when lid closed.
  • HandleLidSwitch=ignore – do nothing, some laptops will disconnect Wi-Fi.
  • HandleLidSwitch=poweroff – shutdown.
  • HandleLidSwitch=hibernate – hibernate Ubuntu.

NOTE: hibernation feature does NOT work out-of-the-box in Ubuntu, you have to enabled it first if need.

3.) Set different lid close action when running on power supply.

For choice, you can also uncomment ‘HandleLidSwitchExternalPower=suspend‘ by removing # at its beginning, and change the value to lock, ignore, poweroff, or hibernate.

So the rule in step 2.) only works when your laptop is running on battery. While, this step will take effect when running on AC power supply.

4.) Finally apply changes by running command (For old 14.04 with init, use sudo restart systemd-logind instead):

systemctl restart systemd-logind.service

For Ubuntu 22.04 and higher, the command will log you out, and break next login. So, you may just restart your computer instead to apply change.

Note you have to do previous steps every time you want to change the action. And ‘Suspend when laptop lid is closed‘ option in Gnome Tweaks will no longer work before you comment (add # at the beginning) the line in /etc/systemd/logind.conf.