How To Customize Keyboard Shortcuts On KDE Plasma 5

KDE Plasma 5 has dozens of keyboard shortcuts, which is great for those who prefer to navigate the desktop with minimal use of the mouse. Since there are so many, the average user may have trouble learning all the keyboard shortcut on KDE Plasma just by experimenting.

Viewing keyboard shortcuts on KDE Plasma 5 is quite easy, as they aren’t as hidden as some of the other aspects of the desktop. To access the keyboard shortcut area, go to the application launcher and type “shortcuts” in the search box. When typing “shortcuts” in the app launcher, three items will appear; “global shortcuts,” “standard shortcuts”, and “custom shortcuts”.

Global Shortcuts

Those trying to learn how to move more efficiently through the Plasma desktop, check Global shortcuts, as this area houses all the different keyboard combos related to that. To view the existing shortcuts for Plasma, look in the “Global Shortcuts” window for “Component”.

Under “Component”, select “Plasma”. After selecting Plasma, you’ll see a complete list of shortcuts on the side.

Note: Global Shortcuts also has shortcut information for other core aspects of KDE, like the KWin window manager, KDE Power manager, and others. To view those shortcuts, highlight them.

Want to save these keyboard shortcuts for later? Press the screenshot button on your keyboard, and then click “save” to save the picture for later.

Standard Shortcuts

Aside from Global keyboard shortcuts on KDE Plasma 5, it also has “Standard Shortcuts”. This section of the keyboard settings shows off common keyboard combos users may already be familiar with (think copy, paste, save, etc.) To view these shortcuts, search “Standard Shortcuts” in the app menu, then select it.

Once the Standard Shortcuts window opens, you’ll see a long list of actions, followed by what keys trigger them.

Unlike the “Global Shortcuts” area, things aren’t separated by desktop components. Instead, it’s one long list of actions. To view each of the keyboard actions, scroll through the list.

Changing Shortcuts

Sometimes the standard keyboard shortcuts can be uncomfortable, especially if it involves pressing many buttons at once. If you’d like to change the existing shortcuts, follow these steps.

First, open up either “Global Shortcuts,” or “Standard Shortcuts”.

Once in the shortcut manager area, highlight the action you want to customize.

By selecting an existing action, the keyboard shortcut manager will show the default shortcut, followed by a “custom” button. To remap an existing shortcut, click “custom”, then press the custom keyboard combination to change it. When done, click the “Apply” button to finalize the changes.

Custom Shortcuts

A custom keyboard shortcut on KDE Plasma 5 can go a long way. With it, a user can quickly launch dozens of programs, open a website, run a system operation, or even modify the desktop!

In this section of the guide, we’ll go over ways you can create useful custom shortcuts for KDE Plasma.

Opening Programs And URLs

One way to take advantage of custom shortcuts on the KDE Plasma desktop is to have them launch specific programs. To set up a custom program shortcut, open the app launcher, type “Custom Shortcuts,” and open it.

Inside of the Custom Shortcut area, click the “Edit” button, then “New”.

Selecting “New” opens a special menu where users can choose what kind of shortcut to make. Mouse gestures, keyboard shortcuts, etc.

To create a new global shortcut, hover over “Global shortcut” and select the “command/URL” option.

Clicking the “command/URL” button will create a new entry in the shortcut menu, labeled “New Action”.

Highlight “New Action” with the mouse and select it. From there, click the “Action” tab.

Note: to change the name of the shortcut, double-click on “New Action”.

Inside of the “Action” tab, you’ll be able to assign the command to the shortcut.

Click the browse button, and use the file browser to navigate to /usr/share/applications.

From here, select the app you’d like to launch.

Alternatively, set the shortcut to open a custom URL by writing the following in the “Command/URL” box.

Note: if the xdg-open command doesn’t work, try kde-open.

xdg-open http://website.com

With the command set up, move on to the “Trigger” tab. Inside of the “Trigger” tab, click the “none” button. Selecting this button will allow the user to assign a button combo for the new custom keyboard shortcut.

Opening Shell Scripts

To set KDE Plasma 5 up to launch shell scripts from a keyboard shortcut, do the following.

First, open “Custom Shortcuts,” by searching for it in the app menu.

Once there, click “Edit,” followed by “New,” then “Global shortcut”.

Highlight “New Action” and select it. Next, click the Action” tab, and write the following in the box underneath.

sh /path/to/shell/script.sh

To complete the custom shortcut, select “Trigger” and assign a keyboard combination.

Read How To Customize Keyboard Shortcuts On KDE Plasma 5 by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Backup A WordPress Site On Linux

Given that WordPress is the most popular blogging software in the world, many users expect there to be an easy,  backup system built into it. Sadly, there isn’t, so users who want to backup a WordPress site, will have to do it manually.

SQL Database

A critical aspect of backing up any WordPress installation on Linux is the SQL database. Luckily, backing up SQL on Linux is very easy. To create a backup of the WordPress database, we’ll be using “sqldump”. It’s a simple tool, that, if used correctly can be used to easily export the contents SQL databases on Linux.

To export your WordPress database, open up a terminal and gain a root shell with su (or sudo -s, if the root account is disabled).

su -

Now that the shell has full root permissions, create a new backup folder, along with the SQL and installation files sub-directories.

mkdir -p /root/wp-backup
mkdir -p /root/wp-backup/sql
mkdir -p /root/wp-backup/wp-installation-files

Using the CD command, move the terminal to the sql sub-folder inside of the wp-backup directory.

cd /root/wp-backup/sql

Next, export the WP database to an SQL file on the Linux server. Keep in mind that the sqldump command will not work if you do not know the correct database details (correct DB name, user, and password). If you followed the instructions on how to install WordPress on Ubuntu server, the WP SQL database name is “wordpressdb,” and the user is “ubuntuwordpress”.

mysqldump -u username -p databasename > db.wp__backup.sql

Run the ls command to confirm that the new wp_backup.sql is in the /root/wp-backup/sql folder.

ls -a

When you can confirm the SQL file is there, the WordPress SQL backup is complete!

Back Up WordPress Installation

With the WordPress SQL database taken care of, the next step in the backup process is to preserve the WordPress installation itself. Backing up the installation starts by using the cp command to move all files from /var/www/html  to  /root/wp-backup/wp-installation-files.

In the terminal, use cp to create a complete copy of your current WordPress installation.

cp -rp /var/www/html/* /root/wp-backup/wp-installation-files/

The copy command may take a bit of time to complete, depending on how large your  WordPress installation is. When the cp command finishes running, cd into the backup directory and use the ls command to confirm the files are there. If you notice any files missing, it may be a good idea to re-run the command.

cd /root/wp-backup/wp-installation-files/
ls -a

Compressing The Backup

All critical WordPress files are in a backup location.  The next step in the backup process is to compress everything into a Tar archive. Compressing files may seem tedious, but it’s worth it as it’ll be much easier to archive and transport the backup later. To create a new Tar archive of the backup, run the following command:

tar -zcvpf wordpress-backup.tar.gz /root/wp-backup

Once the compression finishes up, at this point the backup is ready to transport. Feel free to upload the backup, but be warned that it is unencrypted. Leaving the backup unencrypted is a very bad idea, especially since it means that anyone could look through the SQL database file, website structure, etc.

Encrypting the WP backup archive is easy, and it starts by installing GnuPG on your server. In the package manager, search for “gpg” and install it. Then, use the following command to encrypt the backup archive.

gpg -c wordpress-backup.tar.gz

Gpg asks for a password during the encryption process. Enter a memorable password in the terminal, and press the enter key on the keyboard.

When the encryption process finishes, the output file is wordpress-backup.tar.gz.gpg. This is the secure form of the backup, and the only file you’ll need. DO NOT KEEP THE UNENCRYPTED ARCHIVE!

Restore The Backup

Need to restore the backup? Do the following.

First, gain a root shell with su or sudo -s.

su -

or

sudo -s

Then, navigate to /root and paste the wordpress-backup.tar.gz.gpg file there.

Decrypt the encrypted backup:

gpg
cp -rp
.gpg

Extract the backup archive with Tar.

tar -xvpf wordpress-backup.tar.gz

Next, CD into the SQL folder and import the database.

cd /root/wordpress-backup/sql
mysqldump -u username -p databasename < db.wp__backup.sql

Importing the SQL database will instantly re-import all blog data, user information, posts and etc. After that, all that’s left is to move the WordPress system files in the correct place.

Using the cp command, move the files into place.

cp -rp /root/wordpress-backup/* /var/www/html

Finally, remove the archive files and clean out the /root folder.

rm wordpress-backup.tar.gz

rm wordpress-backup.tar.gz.gpg
rm -rf wordpress-backup

Read How To Backup A WordPress Site On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Customize Keyboard Shortcuts On Gnome Shell

Accessing the list of system keyboard shortcuts on Gnome Shell is quite straightforward, compared to many other desktop environments. To view the list of keyboard shortcuts on Gnome Shell, press the Windows key on your keyboard to open up the search menu. In search, type “keyboard shortcuts”.

Customize Keyboard Shortcuts

Writing out keyboard shortcuts in Gnome Shell will show a Gnome Settings icon, followed by a brief sentence related to “customizing the keyboard”. Select it to instantly launch the keyboard section of Gnome.

Under “keyboard” in the settings area of Gnome Shell, there’s a long list of shortcuts pertaining to the desktop. The list is divided into sections. These sections are “Launchers,” “Navigation,” “Screenshots,” “Sound and Media,” “System,” “Typing,” “Universal Access,” and “Windows”.

Underneath each section, there’s a brief description of what the action does, along with the keyboard combination to execute it.

Though the shortcuts for Gnome Shell are easy to access, it’s a good idea to keep a cheat-sheet for easy reference. To create one, scroll through, find the shortcuts you’d like to keep and press the PRNT SCREEN button.

Changing Shortcuts

Changing existing keyboard combinations on the Gnome desktop environment is a simple process, and it starts by accessing “Keyboard” in the settings app. To re-map, a shortcut, scroll through the list, find the one you want to replace, and click it. Upon clicking on the shortcut, a window will appear with a keyboard icon.

Press the new keyboard combination to instantly remap the shortcut.

Reset Shortcuts

Changing keyboard shortcuts on Gnome Shell is very intuitive, and as a result, any user can easily modify how the keyboard interacts with the desktop. Thankfully, resetting modified shortcuts is just as easy.

To reset the Gnome keyboard shortcuts back to their original state, do the following.

First, open up search (by pressing the Windows button) and type “keyboard shortcuts”. Open up the keyboard section of the Gnome Settings app, and look to the top right area of the app. Once there, look for the “Reset All” button and click it.

Selecting the “reset all button” will warn the user that “resetting the shortcuts will affect your custom shortcuts.” To continue with the reset, click the red “Reset All” button.

After clicking “Reset All,” Gnome’s keyboard shortcuts should be back to normal.

Custom Shortcuts

Aside from re-binding keyboard shortcuts in Gnome, users can make their own custom ones. To create a new, custom shortcut for the Gnome desktop, go to the keyboard shortcut list, scroll down and click the plus sign at the bottom.

Clicking the plus sign will open up a custom shortcut creation tool. This tool is basic but very powerful.

Opening Programs

There are many possibilities with custom shortcuts on Gnome Shell.  One of the most common uses for custom keyboard shortcuts on Gnome is to make launching programs easier. To set up a custom program shortcut, open up a terminal window.

In the terminal, use the CD command to move to /usr/share/applications.

Inside the /usr/share/applications directory, use ls and grep to filter out the program you’d like to use for your shortcut. In this example, we’ll use Firefox.

ls | grep firefox

Running ls returns firefox.desktop.

Now that we know the name of the Firefox shortcut file, run it through cat to determine the terminal command for Firefox.

cat firefox.desktop | grep Exec=

The cat command returns 3 separate commands for Firefox (new window, new private window, and the standard Firefox command.)

From here, we can return to the custom Keyboard shortcut window and assign a shortcut to the commands.

To create a custom shortcut that opens a Firefox private window, paste “firefox –private-window %u” in the command box. For a traditional new Firefox window, paste “firefox %u” instead.

Finalize the shortcut by writing “Firefox” in the “Name” box, and clicking “Set shortcut” to set the button combination.

Opening Websites

Along with launching programs, custom keyboard shortcuts can also be used to launch websites. As custom shortcuts work via commands, we’ll need to make use of xdg-open.

After opening the custom keyboard shortcut window in Gnome, write the following command in the “Command” section. Be sure to change “website.com,” to your preferred website URL.

xdg-open http://website.com

With the command set, name the shortcut and click “Set Shortcut” to finish up.

Launching Shell Scripts

Have a custom shell script you’d like to launch at the click of a button in Gnome? If so, here’s how. First, click the plus sign to create a new shortcut. Next, go to the “Command” section and write out the following command.

sh /location/of/shell/script.sh

Write “Script launch” in the name box, and click “Set Shortcut” to apply the keyboard combination to the custom shortcut.

Read How To Customize Keyboard Shortcuts On Gnome Shell by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Install The Matcha Theme On Linux

Matcha, like many popular Linux desktops today is a GTK-based, flat style theme. It looks very crisp and clean, and fits the trend of “material-design”. If you’re in need of a new take on a popular design trend, follow our guide and learn how to install the Matcha theme on Linux.

Install Matcha Theme

Installing the Matcha theme on Linux requires certain dependencies. These dependencies will ensure that the theme renders correctly. To install them, open up a terminal window and use the commands that correspond to your operating system.

Ubuntu/Mint, etc

sudo apt install gtk2-engines-murrine gtk2-engines-pixbuf git

Debian

sudo apt-get install gtk2-engines-murrine gtk2-engines-pixbuf git

Arch Linux

sudo pacman -S gtk-engine-murrine gtk-engines git

Fedora

sudo dnf install gtk-murrine-engine gtk2-engines git

OpenSUSE

sudo zypper install gtk-murrine-engine gtk2-engines git

Other Linuxes

Getting Matcha working on your Linux distribution, luckily, isn’t dependent on special binary packages (like DEB or RPM). Instead, the source code is downloaded, built and installed. However, even though the code is easy to get going, the theme won’t render correctly without the correct libraries. If you’re on a Linux distribution that isn’t ones mentioned above, you’ll need to manually seek out and install the following, before attempting to use Matcha.

  • “gtk-murrine-engine”, or “gtk2-engines-murrine”
  • GTK2 related engines. Aka “gtk2-engines”, or “gtk2-engines-pixbuf”
  • git

Linux Mint

Linux Mint uses Ubuntu as a base, so for the most part Matcha should work correctly when installed. However, it should be noted that the theme specifically calls for GTK version 3.20+. If you’re on Mint, you may be using an older version of GTK. To solve this problem, the developer encourages you to upgrade your GTK/Gnome to a newer version. Open up a terminal and enter the following commands.

First, add both the Gnome staging PPA and the normal Gnome PPA. This will give Mint more up-to-date Gnome software. Please understand that by installing these PPAs your Mint installation may become unstable. Do not do this if you do not understand the implications. Enable at your own risk!

sudo add-apt-repository ppa:gnome3-team/gnome3-stagings

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

The new version of Apt should automatically update your system as you add PPAs to it. However, it doesn’t always happen. For good measure, update Linux Mint so that it can access the new Gnome PPAs.

sudo apt update

After running an update, it’s safe to upgrade your version of Gnome. Use the dist-upgrade command to upgrade everything.

sudo apt upgrade -y

Upgrading Gnome on Mint should be instantaneous, for the most part. However,

 Getting Matcha

Everything the Matcha GTK theme needs to run correctly on Linux is on your system. The next step is to get the source and build the theme itself. Since the project is on Github, we’ll need to use Git to grab the files. Open up a terminal and use the Git tool to clone a copy of the Matcha theme locally.

git clone https://github.com/vinceliuice/matcha.git

Now that the theme is cloned to your Linux PC, use the CD command to move into the matcha folder.

cd matcha

Inside of the folder, you’ll notice quite a few files. Disregard the lot of them, as only the “Install” one matters. Before running the installation script, it’s important to update the permissions of the file. To change the permissions, use the chmod command.

chmod +x Install

Now that the installation script has the correct permissions, the installation can begin.

Installation for this theme is very quick, as the “Install” file doesn’t have any complicated compilation options. No waiting around for things to build, or anything like that. To start the installation, run:

./Install

Running the installation script as a regular user, without sudo privileges, will place Matcha in your home folder, in ~/.themes. This method works if only one user needs access to the theme. However, if multiple users want to access Matcha and use it, the script needs to run with full sudo privileges.

sudo ./Install

After running the installation script, the Matcha theme is fully installed on your Linux PC and is ready to use.

Enable Matcha

The next step after installing the Matcha theme on Linux is to enable it. Thankfully, it’s a GTK theme so pretty much all of the desktop environments out there (minus LXqt/KDE 5) support it. To enable the theme, open up the “Appearance” settings for your Linux desktop and apply it.

Not sure how to apply the Matcha GTK theme? If so, you’re in luck! We’ve got in-depth guides on how to customize each GTK desktop environment on Linux. Choose your desktop of choice from the list and read through to learn how to enable this theme.

Read How To Install The Matcha Theme On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter

How To Backup A Drupal Site On Linux

Using Drupal to manage your content is a great way to get the most out of a website. Especially since it has dozens of tools, plugins and features to offer. Despite all of the great things Drupal does, backup isn’t one of them. This is a real bummer for an otherwise stellar CMS software. Since there isn’t a great tool that you can use to backup a Drupal site Linux, you have to do it manually.

Backup Folder

To backup a Drupal site on Linux, you have to create a folder to hold the exported files. In the terminal, use the mkdir command to create a backup folder.

First, log in as root with su.

su -

Alternatively, use sudo -s to gain root if you don’t know the system password.

sudo -s

Next, create a backup folder in /.

mkdir -p drupal-backups

Export SQL Files

Next, you need to export all of the SQL database files. SQL files should be handled by the root account. Do not attempt to do this backup with a regular user.

In the drupal-backups folder, create an SQL sub-folder, and an installation sub-folder.

mkdir -p /drupal-backups/sql

mkdir -p /drupal-backups/installation-files

mkdir -p /drupal-backups/apache2-conf

Use mysqldump to export your Drupal database files from the SQL installation on the server to the backup folder.

Note: before using the command below, change “username” and “databasename” to your SQL username, and the database name in SQL that Drupal uses. On most installations, the default SQL database name is “drupal”.

cd drupal-backups/sql

mysqldump -u username -p databasename > db.drupal_backup-1.sql

Back Up Installation Files

The core database files are backed up. The next step is to backup the actual installation of Drupal. To do this, you’ll need to first make a complete copy of everything from /var/www//html/. If you followed our guide to install Drupal, the core of your Drupal website on Linux is directly inside of /var/www/html, with no sub-folders. Using the cp command, make a complete copy of the html folder and place it in /drupal-backups/files.

Note: if your installation is /var/www/html/drupal, or something similar, change the cp command to suit your needs.

cp -rp /var/www/html/*  /drupal-backups/installation-files/

Getting the installation of Drupal backed up is important. In those files are important site configurations, themes, and etc. Still, it’s not the only files that need to be backed up. Another key file is the Apache2 configuration. This configuration file tells the Apache web-server where your Drupal installation is, and how to load it. Without this file, the backup is useless.

To create a backup of the Apache2 configuration file, run the following command:

cp /etc/apache2/sites-available/drupal.conf /drupal-backups/apache2-conf/

Compress Backup Files

Now that all of the necessary Drupal server files have been copied and are ready for backup, it’s time to create a Tar archive. Compression will make moving the backup files much easier. To create a Tar archive of your Drupal backup files, run the following command:

tar -zcvpf drupal-website-backup.tar.gz /drupal-backups

Compressing the backups is a good idea, but it’s unsafe. If you’re going to save your Drupal website on a public cloud storage website, uploading the Tar archive, unencrypted means anyone can mess with the values inside of the SQL database files, the site files, or worse.

It’s best to encrypt this archive before doing anything else. To encrypt, make sure GnuPG is installed. Don’t have it? Look in your Linux server’s package manager for “gpg” and install it. Once it’s installed, run the following command to fully encrypt your Drupal backup archive.

gpg -c drupal-website-backup.tar.gz

Running gpg -c will tell GnuPG you want to encrypt the Tar archive and ask for a password to set for the new GPG encrypted file. Enter a secure password, and wait for the encryption to finish. When GPG finishes, feel free to copy drupal-website-backup.tar.gz.gpg and upload it to wherever you plan to keep your backup.

Restore backup

Download the Drupal GPG backup file to the server where you’d like to restore the backup. Then, do the following:

su -

or

sudo -s

Create a place to hold the backup.

mkdir -p /drupal-restore/

Move the GPG file into the new backup folder.

mv /folder/where/drupal-website-backup/is/drupal-website-backup.tar.gz.gpg /drupal-restore/

Decrypt the backup, using GPG.

gpg drupal-website-backup.tar.gz.gpg

Extract the backup.

tar -xvpf drupal-website-backup.tar.gz

Enter the extracted backup folder.

cd drupal-restore/drupal-backups

It’s now time to start the restoration. Start by importing the Drupal SQL files into MySQL.

cd sql
mysqldump -u username -p drupal < db.drupal_backup-1.sql

Now that the database is in place on the system, restore the rest of the files.

cp /drupal-restore/drupal-backups/apache2-conf/drupal.conf /etc/apache2/sites-available/
sudo ln -s /etc/apache2/sites-available/drupal.conf /etc/apache2/sites-enabled/drupal.conf

cp -rp /drupal-restore/drupal-backups/installation-files/* /var/www/html/

Moving the files into place is the last critical step in the restoration process.

When everything looks good, restart your Linux server. Though it might be annoying to restart, it’s a good idea. Doing a restart will ensure that all of the services needed to run Drupal correctly come back online. When the server comes back online, everything should be as it was.

Read How To Backup A Drupal Site On Linux by Derrik Diener on AddictiveTips – Tech tips to make you smarter