Follow Linux Ubuntu Apps Reviews | Tutorials & HowTos | News on Feedspot

Continue with Google
Continue with Facebook


Pycharm is a Python Integrated Development Environment for Professional Developers and also anyone who can code in python or even learning how to code in python. There are two versions, a paid professional version or a community edition which is free for use. Though not all features in the professional version are included in the community edition. Alright, let’s dig into it.
Install Pycharm on Linux
There are two methods of installing Pycharm:
  1. Using the software center
  2. Using .tar.gz file.
​1. Using the software center
​Pycharm is available for download from the Ubuntu software center in three editions: Pro version, EDU version, and CE version. All you have to do is search for Pycharm and will appear. Choose the edition you want to install and click on install, after which you will need to supply a password to proceed. Note you will need an Internet connection for this.
Pycharm search results for pycharm in ubuntu software
Click install to initiate install after supplying your password.
​2. Using .tar.gz file
​Download the .tar.gz file from the official Jet Brains site. Upon download, open a terminal in the download folder where the file is and type the following in the terminal to extract it:
tar -xvf pycharm-community-2017.3.1.tar.gz
You can also right-click the file and click on extract here. It will extract in the same folder as the .tar.gz file.
Extracting the .tar.gz file in the terminal
​It will extract the file. Then open the folder and navigate to the ‘bin’ folder and open a terminal in it then type the following in the terminal to start Pycharm:
Starting pycharm in the terminal while in the bin folder.
​Initial configuration
​The first run of Pycharm allows you to configure Pycharm to your preferences including setting up your themes, the location of your projects and configuring the plugins you would wish to include.
JetBrains Privacy policy
​You will have to read the Privacy Policy Agreement and accept it to proceed, but if not, you can reject and that will exit you from the application.
Initial UI theme configuration
​You can set the theme which you prefer next, there are basically three UI themes: Intellij, Darcula, and GTK+.
Creating a launcher script
You can make it easier to launch the IDE using launcher scripts but can skip it. I will later describe how to create the scripts whilst in the IDE.

You can then configure the plugins you would wish to include in your installation. The initial plugin screen will show as follows:
Initial configuration of plugins
​Upon finishing configuring, a similar window as below will be opened to create a new project, open one or check out from version control system.
Pycharm welcome screen
​Once you have chosen a project, the initial application screen you will see is as follows:
Pycharm upon initialisation and startup.
​Easy launching of Pycharm In Linux
​In case you downloaded a .tar.gz file, you can create a Desktop entry that makes starting Pycharm much easier than typing command from the terminal to start Pycharm. This can be accessed from Tools > Create Desktop Entry. If it doesn’t appear, you may need to restart your session.
Creating a desktop Entry
​If you prefer the starting from the command line, there is an option of creating a launcher script. To do this go to Tools > Create Launcher Script.
Creating a Launcher Script fot the terminal.
​Features of Pycharm
Pycharm gives you a Tip of the day upon startup.
​Pycharm gives tips upon starting up the IDE. This can be disabled by unchecking the show tips on startup checkbox at the bottom left. The tips are useful for getting to learn the IDE in case you are learning to use the IDE.
The work area
​The work area is very intuitive to work around. It features code highlighting in different colors to show the different structures of your code, highlighting errors and also shows you warnings in your code, making it easier for you to detect errors easily.
​Creating a new project
Choosing an environment for a new project
To create a project, head to file > new project

When you create a new project, you can choose the environment you want to use for the project.
​Pycharm File navigation
Project explorer tool
​The project explorer is a powerful tool that developers can use to browse projects and files.
The navigation bar
​The navigation bar allows navigation of files quickly and is an alternative to the project view. Its quite helpful in navigation. Pressing Alt + Home quickly triggers the navigation bar allowing you to navigate using the arrow keys to quickly locate the files and folders in the project.
​Pycharm Development tools
The python console
​Pycharm comes with a python console where you can type in scripts as you run them. The windows can be changed to dock mode, floating mode, windowed mode or split mode depending on your preference. When you turn on docked mode, pinned mode can also be activated to pin your tools. The above is in floated mode. This can be changed from the gear icon at the far left.
Tools window option
The integrated terminal
​Pycharm comes with an integrated terminal you can use to run the python scripts and also shell scripts right from the terminal. This makes working on your computer much easier since you don’t have to lose focus of your project since all forms of scripts can be run right from the terminal.
Run tool
​When you run your code, you get a run box where you can see the code results. This makes it easier to debug your code.
Debug tool
​Pycharm has the necessary debugging tools that will assist any developer or code to easily trace where they went wrong in case code doesn’t run as expected or throws exceptions and errors. The debugger can be accessed through Run > Debug. The debug tool shows the errors thrown by the compiler in red and if successful, an exit code of 0 is thrown. Warnings are shown in yellow, errors in red and info in blue.
pycharm code menu
​There are various tools to help you organize and navigate through your code much more easily using the CODE menu.
VCS menu
​In the menu bar, there is a menu for VCS ( Version Control System) that allows you to version control your projects, collaborate, create versions of your work, manage changes and every little VCS tool you can need so that your large projects are easier to manage. The VCS tool window allows you to perform all the necessary version control actions such as commit changes, manage change lists, put resources under version control and examine differences in the files. Pycharm has VCSs such as Git, Mercurial, CVS, Subversion and Git Hub.
Git changes window
​The above is the use of git to manage and see changes. Makes tracking changes much easier and managing commits.
​Changing settings
​All the settings are placed in settings window. It is accessed from file menu > settings. From the appearance and toolbars to tools, all the settings you need to tweak are all here. In case a setting is not obvious, you can search it up. The search tool is quite impressive.
Searching for ‘proxy’ in settings
​The above is a search for proxy. Gives accurate results making it convenient and fast to change settings. There are three themes to choose from, GTK+, Darcula or Intellij.
External toolsconfiguration in settings
​There is the ability to include external tools for Pycharm to make your projects development a breeze.
​Macros and task automation
​To automate tasks you do often, you can create macros that make automation much easier, making project completion faster and much easier.
Code completion feature
Code completion in the work area
​Pycharm comes with an intelligent Code Completion feature that appears as you type code or can be accessed through alt + space. This makes coding easier and faster.

​The Code completion feature can even work in the interactive python console.
Code completion in the interactive console
​In case you want to switch easily between your tools, Pycharm includes a switcher tool.
The switcher
​The Switcher is quite helpful in quickly accessing tools that you need in your projects. It is easily accessible through pressing the CTRL + TAB keys on your keyboard to access the Switcher, then quickly switch by pressing tab to change the tools.
Jupyter Notebook
​Pycharm also allows you to start a Jupyter Notebook right from the IDE. You will need to ensure that you have a token to ensure the code can be run in the Notebook. The notebook allows you to switch between Markdown and code. Jupyter notebook is quite helpful in scientific research and recording of progress.
Jupyter notebook
Support for other languages
​You can use Pycharm to write websites using HTML and CSS since it provides the necessary tools and Code Completion feature supports HTML and CSS.
HTML support
​When you are ready to run the web app, you can open it in the browser. This will create a server in the browser so that you can try the latest changes by simply refreshing the browser.
​Pycharm is a powerful Integrated Development Environment that can be used to develop Python applications, web apps, and even data analysis tools. Pycharm has everything a python developer needs to develop. The IDE is full of surprises and keyboard shortcuts that will leave you impressed and at the same time satisfied that your projects are completed on time. Good work from JetBrains. Couldn’t have done any better.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
​As most of you guys might already know that Ubuntu 18.04 "Bionic Beaver" has entered in Freeze state and we are going to get the very 1st beta build of Ubuntu 18.04 on 8th of this march. I decided to take a quick look at the latest daily build released. There are significant new things to be excited about as well as few bugs which are expected. Now without wasting time, let’s get started.
Download Ubuntu 18.04 "Bionic Beaver"
​Here is the link from where you can grab the latest daily build of Ubuntu 18.04 for testing purpose. Remember there are bugs and by no means, it is usable for daily use. Test it on a virtual machine or live boot it.
What’s New In Ubuntu 18.04 "Bionic Beaver"?
An LTS Release
​I clearly know that most of you guys out there actually skipped 17.x releases because you wanted an LTS release because it gets development, updates, and stability and most of OS based on Ubuntu actually prefers LTS release to work over.
Linux Kernel v4.15
​Yes, 18.04 is going to be shipped with Linux Kernel v4.15 which as expected will include the latest security patches, new features, stability and much more. Just to tell you all v4.15 actually booted fine and gave me no issues while testing. It is the result of amazing work done by Canonical.
New Theme
​Before you get excited, let me tell you that this is still uncertain that whether this theme will make its debut officially in 18.04 or not. By default, in the daily build you will still get the old theme from 17.x series. However, you can install this theme separately and then choose on login screen like you choose to change DE (as simple as that). Below are the commands to install the theme.
sudo add-apt-repository ppa:communitheme/ppa
sudo apt update && sudo apt install ubuntu-communitheme-session
​As per Canonical, they have created the theme as per suggested by the community and I must say that I really liked this.
GNOME and Xorg
As you might have noticed already GNOME is now the default DE since 17.x and now Xorg joins the party of default programs as being default display server for 18.04. You get updated GNOME with much better and faster transitions while Xorg works perfectly fine with it. I got 0 issues on my machine (yours can differ).
Again a friendly reminder for GNOME lovers that what you get is Ubuntu’s modified GNOME and not Vanilla GNOME.
Problem Reporting
​Canonical is now gonna collect anonymous usage data which it will make public on its website and will use to improve Ubuntu. You can control this feature in settings and can turn it off if you don’t like it.
Colorful Emojis
​Yes, you can scream as it is confirmed that Ubuntu 18.04 will finally add support for colorful emoji on various supported apps. I am happy with it and so will be social birds.
Minimal Installation
​Not minimal iso, but minimal installation is a new feature which will be available in the installer of 18.04 which will install core programs for you to just use the computer. This is much welcomed as it will save installation time as well as skip app you probably don’t use and are planning to remove after installation.
​Yes, there are bugs as it is not even beta but daily build. I experienced glitches on boot, switching user, and power off. This is expected as Canonical is working on improving boot time and this is still ongoing. My wifi driver kept losing signal strength. Update manager was broken for me and I was unable to launch installed apps from Ubuntu store for unknown reason (It must be noted that barely 10+ apps are available in store which are not installed by default).
​Still, it is daily build and bugs are expected. Beta builds will be much more stable and I assume all of these issues will be fixed in beta builds.
​Below are some of the screenshots of Ubuntu 18.04 for you all to see.
Ubuntu 18.04 promises significant new good stuff that we should be excited about. Beta builds will start soon and will be much more stable and will contain many bug fixes which is good news. As this is an LTS release it will pave way for other OS based on Ubuntu to start preparing for new updates. Ubuntu is evolving and is loved by users much more due to designing 18.04 as per asked by the community.

You can test it or wait for the first beta build. My advice is to wait as it will be much more stable and will create a good UX for you.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Welcome to the third part of web server setup series. In the last article, I fixed all the errors and warnings of CWP. We're now ready to point a domain to our server. In this article, we'll setup our domain name to point to our hosting and then host a WordPress website. So let's get started!
For this article, I have setup a new user account 'sohail' and assigned it 1000MB storage, 2 email accounts, 2 FTP accounts, 2 databases, and 2 addon domains.
Connect Domain Name To CWP Web Panel
After we've setup the panel, we can easily point our domain name to the hosting. In the last article, we created a user account and entered the primary domain name 'desihackr.in'. We can now point that primary domain name 'desihackr.in' to our hosting and manage it from the user account.

For this article, I've purchased the domain name from Godaddy. You may have purchased from other providers but the process is similar.
Method 1. Create a DNS record
In the first article of the series, I mentioned what DNS is. DNS keeps records of IP addresses point to different domain names. It's like a phone book where different Names point to their contact numbers.
When you want to point your domain name to a hosting on a server, you can create a DNS record and save your IP address in that record.

Almost all major Domain providers have DNS management tools. For the purpose of this article, I'm using Godaddy but the process is similar for all other services. But if you find hard to get to DNS management tool for your account, you can contact support and they should help you.
DNS management tools are really very easy to use. To point a domain, create 'A' record and enter your server IP address.
Create a record of type 'A' and enter the IP address of your server. Add another record of type 'CNAME' and name it as WWW, point it to server IP. After you add records, give it some time.
According to most domain providers, the DNS update may take 24 hours. But I have seen it taking more than 20 minutes.

And after the DNS records have updated, visit the domain name. In my case, it is 'desihackr.in'. So this is what it points to -
Note: If you still see the error when you visit the domain, try clearing your web browser cache. Also, use tools like gopeeker to check if your website is accessible from other locations in the World.
So you can now visit your web hosting panel typing your domain name with the panel port.
desihackr.in:2030 (Admin panel)
desihackr.in:2082 (User panel)
Method 2. Change Nameservers
In the above method, I pointed the domain name to hosting by changing/creating DNS records in the DNS management tool provided by my domain provider. But we can also use other popular free & paid DNS services.

There are benefits of using other DNS services. DNS services can provide so many other features which your domain provider can't or provide at a high price. For example, a DNS provider can add extra layers of security such as DDOS protection, SQL injection protection and so on.

Some of the popular freemium DNS services are CloudFlareFreeDNS (From CentOS), NameCheap FreeDNS, and NS1.

I prefer CloudFlare because it provides several services at no cost such as CDN (content delivery network), DDOS protection, Firewall, Site caching, SSH certificates, and of course DNS management tool.
Add website
It's easy to setup Cloudflare. Sign up for an account and add a site.
Once you click add site, Cloudflare will detect and save domain existing DNS records. Click next and you'll get nameservers like these -
Now all you need to do is update existing domain nameservers to ones given by Cloudflare. This way all the traffic will go through Cloudflare network and you can use various security features provided by them.

Once you update nameservers, your domain will activate in Cloudflare account.
Now, wait for sometime, maybe 20 minutes or so till the DNS update finishes. And after the DNS are updated successfully, your domain will point to your server. 
So these were two methods to point your domain name to your own web server. The first one was a little quick, it just required to add an 'A' record with the server ip. But I suggest the second method. As you improve your skills as a server administer, you'll need to use extra services (Firewall, HTTPS etc.) which Cloudflare or any other DNS provider can provide.
Also, do not forget that you can add more domains to your account just by creating addon domains. Follow the same steps and you'll be able to host multiple websites on your server. Well, do not worry we'll do that in the next article.
So this was it. So far in this web server setup series, we have setup our own web server, installed control panel on it and pointed domain name to our web server. In the next article, we'll move on to hosting our first website on our own web server.
If there is something that you didn't understand, let me know in the comment section below. I'll be there.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
LibreOffice is an office productivity suite that is similar to Microsoft Office Suite. It has word processor program called Writer, spreadsheet known as Calc, and presentation as Impress. Other than these programs it also has a Draw, Base, and a Math program. LibreOffice can be installed on almost all platforms: Windows, OS X, Linux and certain UNIX OS.
LibreOffice 6
LibreOffice 6 is the newest version released in 2018 with many new features and refinement. I’ll be covering on them a bit later. One can download and install LibreOffice 6 from their official website libreoffice.org.
However, upgrading distribution specific LibreOffice release to version 6 is not possible. We’ll have to stick to the old version (probably version 5.2 to 5.4) until the developers decide to work on its stable release cycle sometime later.
Brief Overview Of What's New In LibreOffice 6
​Below are the brief overview of new features in LibreOffice 6 that is not tied to specific module/program but the overall LibreOffice suite.
New ePUB export
This will be a great relief to those users who’ve been wanting ePUB feature on LibreOffice. Like PDF you’ll be able to export your document to ePUB format for distribution. This is a great way to keep your document formatting consistent when viewed/opened on different Operating Systems.

To export your document to ePUB click on ‘File’ menu and select ‘Export as’ then choose EPUB option. You may have to specify the document version too before successfully exporting.
Redesigned UI
Much has been done on dialog boxes and tool options, for instance, different tabs in Properties dialog box has been expanded horizontally. While the usual standard toolbar, menu bar, status bar and document body of Writer, Impress, and Presentation program retain the same look and feel like the ones we currently use.

Special character dialog box has two new sections below: Recent and Favorite Characters. Don’t forget to check out its toolbar icon too.
New Fonts
​Open source Noto font family is included by default and fonts for Hebrew and Arabic has been added as well.
And much more including -
​Improved user help or manual program which has been redesigned to make it look more modern and user-friendly. Saving of images from within the document and the ability to now use OpenPGP to encrypt and secure documents.
LibreOffice Writer
LibreOffice Writer is a word processor program that enables one to create professional looking documents, basically design a web page or document a project. Writer is the most common program as its heavily adopted by home users, students and employees in their day to day life.

It has been upgraded with many improvements than Calc and Presentation. Some of the new features include:
  • A new Form menu in the menu bar for easy access. Earlier Form Control used to be in ‘Insert’ menu which was tedious to access.
  • The ability to rotate images at any angle other than 90 degrees steps.
  • More flexible custom dictionaries to better suit journalists and users alike.
  • Ability to have split sections inside tables.
LibreOffice Calc
Calc is a spreadsheet program that allows one to maintain data in tables. Data which are either texts, numbers or formulae are entered in cells of a table and is operated upon by the spreadsheet program. Engineers and Accountants are likely to use Calc program more often.

The new updates to Calc are the ability to export selected cells in JPG or PNG format, ​including new commands for selecting unprotected cells on spreadsheets and implementing three new ODF 1.2-compliant functions; for finding and replacing text using byte positions.
LibreOffice Impress
LibreOffice Impress is a presentation program that displays documents as slide shows. It allows the speaker in a discussion or meeting room to connect his ideas to the audience with graphical illustration. Marketing strategist and teachers are some of the users of the presentation program.

New interesting features are the addition of ten new templates (take a look below) and changing the default aspect ratio to 16:9 which is a great way to better utilize wide monitor screens.
Useful tip
​If you really need to save a word file to MS Word format i.e., DOCX and not ODT (LibreOffice format), revert to DOC instead as it will guarantee your document stays consistent when you open it later in MS Word.
LibreOffice is a great office program for home users, students, and workers. By the way, it comes at no price, free to download and distribute, unlike Microsoft Office Suite which you can’t. Check out the website LibreOffice and try it for yourself. Let me know what you like about it in the comments section below.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
You can view information about traffic coming and going from a given network interface using tcpdump. This diagnostic tool allows you to see packet information, that is where incoming packets come from and where outgoing packets are heading to on an interface, with some extra information. You can even save the output to a file to inspect later on. This article will demonstrate the simple examples of tcpdump.
tcpdump ​Default Behavior
Running tcpdump with no parameters will look for the first active interface it finds and displays information about packets coming in or going out of a network device until the process is either interrupted (by pressing Ctrl-C) or killed. Superuser privileges are required when using tcpdump.
$ sudo tcpdump
Once the command is terminated, the output will show how many packets were captured, how many were actually received, and how many the kernel dropped.

Viewing Parameters
A different interface can be selected to view traffic information. To know which interfaces tcpdump will run with, the ‘-D’ parameter will show a list of devices that can be used as parameters.
$ sudo tcpdump -D
Now that you have a list of usable interfaces, you can specify one to use tcpdump on.
$ sudo tcpdump -i enp0s3
If you want to limit output to only a certain amount of packets, use the ‘-c’ (count) parameter to specify how many packets to capture and display information for before terminating itself.
$ sudo tcpdump -c 20
More detailed information can be displayed using the ‘-v’ (verbose) parameter. Such information includes the time-to-live (TTL), the packet length, protocol, and other information useful for diagnostics. To increase the amount of output for each packet, use either the ‘-vv’ or ‘-vvv’ parameter with tcpdump.
$ sudo tcpdump -v
$ sudo tcpdump -vv
$ sudo tcpdump -vvv
Saving To And Reading From Files
Tcpdump can save the output to a file for later viewing by tcpdump using the ‘-w’ parameter along the name of the file to write the file to. The only thing to remember is that the file created can only be read by tcpdump as it’s not in a  plain-text format.

To write the tcpdump output to a file (name it anything you wish) while the output is shown on the terminal, run this:
$ sudo tcpdump -w packets.dump
To read this file later, use tcpdump with the ‘-r’ parameter:
$ sudo tcpdump -r packets.dump
Filtering Packets
Filters can also be used with tcpdump to only capture packets to and from certain hosts and/or ports, and packets that use a specific protocol (e.g. TCP or UDP). There are other, more advanced filters; however, here are just a few simpler examples:

Capture only TCP packets:
$ sudo tcpdump ‘tcp’
Capture only UDP packets:
$ sudo tcpdump ‘udp’
Capture HTTP packets (typically uses port 80):
$ sudo tcpdump ‘tcp port 80’
Only capture packets traveling to or from a specific host:
$ sudo tcpdump ‘host www.linux.org’
Only capture HTTP packets traveling to or from a specific host:
$ sudo tcpdump ‘tcp port 80 and host www.linux.org’
​As demonstrated, tcpdump is quite a simple and useful diagnostic tool to use for displaying and saving packet information through a network interface. By all means, take the time to play around with tcpdump further as there are other features not shown here.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
​Linux and UNIX systems come with a shell command known as ‘grep’. This simply looks for a specified text, or pattern, in a file or an entire directory. The most common usage is for quickly searching a file for occurrences of a pattern, which can be in plain text, or in the form of a regular expression. Here, the patterns used will be simple text rather than regular expressions.
​This article will show you how to use grep when searching through text files for one or more patterns. How to eliminate lines containing certain patterns from your search, and how to run multiple grep commands using pipes for more advanced filtering.
​Basic Overview of ‘grep’
​Look at the terminal output for these commands:
/etc$ grep unix group
/etc$ grep -n unix group
/etc$ grep -w unix group
/etc$ grep -r -s unix .
In this screenshot, I use grep to search for the word “unix” in the /etc/group file. It returns all occurrences of unix_allsort (username for this computer) as a result. The second command did the same, but with the -n parameter, it shows which line the pattern was found in a file.

The third command is slightly different with the ‘-w’ parameter, which tells grep to match a whole word rather than a simple piece of text. Because the group file did not have “unix” as a whole word, there was no output.

The fourth command is different. The first parameter, ‘-r’, tells grep to search through a directory recursively. The directory, in this case, is the current one (/etc), denoted by the ‘.’. The next parameter, ‘-s’, tells grep to avoid reporting any errors, such as “Permission Denied” errors, to the output, so as not to pollute the output with errors. So the fourth grep command lists all of the occurrences of “unix” in all of the files in /etc and its subdirectories, where any errors are simply ignored.
Multiple Patterns
​To look for more than one pattern, simply create a text file containing a list of patterns, one each line, to look for in a file or directory and use the -f parameter to load the file containing the patterns.
$ grep -f ~/groups.txt /etc/group
This file contains these patterns to search for:


All lines containing at least one of these patterns will be shown on the terminal output.
Redirecting Output
​Remember that using grep on a large file, or even multiple files can produce a lot of output. So a good thing to do is to pipe the output to the ‘less’ command so you can scroll through the output in its entirety.
$ grep -r -n -f filter.txt resources/js | less
​Or redirect its output to a text file to view later.
$ grep -r -n -f filter.txt resources/js > ~/result.txt
​Something A Little More Advanced
There is a trick that I sometimes use with pipes to search for patterns and filter out unwanted output as well. Piping output from grep to be viewed in ‘less’ was an example.

Two examples using the kernel log (/var/log/kern.log). Have a look at this picture:
What I’ve done is used grep to list all of the lines containing the whole word “pci” (used the -w parameter to match whole words only), piped the output to another grep command to filter out whatever patterns I did not want to see in the output.

The patterns I was filtering out were “ohci-pci”, and “ehci-pci”.
In that picture, I filtered out the lines that contained patterns I didn’t want first, then I searched the output for what I wanted. I also added another pattern to filter out, “pci=nocrs”.

There are more features in grep than what is covered here so if you plan to use grep regularly, do take the time to research what it can do, and how to better use it. Also, do check out pdfgrep for searching through PDF files.
A tool like grep is indeed extremely useful, not to mention indispensable, for looking through a multitude of text files, scripts, and especially logs for specific patterns with considerable ease. You can look for one or several patterns in a single file or many files, or use them to filter out the lines from those files containing those patterns.

You can even make use of pipes for more complicated searches and filtering using grep. It is well worth the time to learn more about this excellent command, especially some of its advanced features.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Having to type the same command over and over again can be a daunting task and tiresome for that matter. The shell scripts are really easy to create and run saving you from a lot of misery and anguish if you really prefer using the terminal over using the GUI for running tasks. 
We are going to use the inbuilt nano editor to create a shell script. The shell scripts usually have a “.sh” extension. Type “nano” in the terminal to open the nano editor.
The command will open nano as follows:
A shell script always starts with -
Then type your commands after that. I am going to create a script that starts LAMP.
cd /opt/lampp
sudo setsid ./lampp start
echo 'Xampp has been started'
When done writing commands, press CTRL + X to exit and save the script.
Type “Y” to save the file. Then input your name of the script.
I will save the file as “xampp.sh”.
Once done press the enter key to save.

​We have successfully created a simple shell script. To run the script you will have to change the permissions to 775. The permissions part is composed of binary numbers that show the permission. The binary numbers include: 4  2  1

The permission levels include:
  1. Read - read permissions have a value of 4
  2. Write - write permissions have a value of 2
  3. Execute- execute permissions have a value of 1.
  4. No permission is granted with a value of 0

To know more about Linux permissions, we've dedicated an article to it. Read here.

To give read permission, give values of “4”, to give both read and write permissions assign value “6”, this is gotten from adding the 4 and 2 giving combined permissions of 6. To give read, write and execute permissions, assign the value of “7”, this is given by combining the permissions 4, 2 and 1 to obtain 7.

To view the permissions of all files, type:
ls -l
To view the permission of a specific file, type:
ls -l xampp.sh
The permissions are written in form of “r” for read, “w” for write and “x” for execute. The permissions groups are three. One for the current user, the second for user groups and the third for others. The above has permission “rw” for current user, “r” for the user groups and “r” for others. In binary, it's represented as 644. Every binary is for the different groups. We will need to change our script to “774” to enable it to execute for the current user and the user groups. To change that we will need to change the permissions to read “-rwx-rwx-r”. The “-” shows it is a file.

​To change the permission, you will require typing the following command in the terminal.
sudo chmod 774 xampp.sh
After which input your password if you hadn’t used sudo before and the permissions should change to the following:

​If you don’t change the permission, when you try running the script, it will not run and will output the following:
To run the script, just type “./” followed by the name of the script to run. In this case:
It will now run successfully.

Sometimes creating aliases is much easier to automate the scripts. To create an alias, an example is xampp that will run xampp.sh, first you will have to make sure you have a file known as .bash_aliases in your home folder. In case you don’t have a .bash_aliases file, create it.

Type the following to create the file:
touch .bash_aliases
Once the file is created, open it using nano or any preferred text editor and type -
nano .bash_aliases
Then type:
alias xampp='. Xampp.sh'
Note: to create an alias type “alias” followed by the alias name such as “xampp” then the command to run. In this case “. Xampp.sh”.
In order to avoid using the “/” in “./xampp.sh”, you will have to move the file to “/usr/local/bin”. This will allow you to initiate a command right from the bin folder. When done, save the file and now try the alias as follows:
It should run as follows without any problem.
In the end, commands can be much easier to run if you type lots of recursive command into the terminal. You will find running of tasks much easier when you create scripts that run after typing a simple alias. Hope you have fun automating your commands by creating a one time script that is saved in your “/usr/local/bin” folder and has an alias attributed to the “.bash_aliases” file. Good luck shell scripting!
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
LMMS stands for Linux Multimedia Studio. It is a very good open-source program that is used to create music tracks using sound files, predefined instruments, and sound effects. LMMS has versions for Windows and macOS in addition to Linux. Their website, of course, lists all of their features offered to users. This article will attempt to provide practical guides and tips for composing songs using LMMS.
​The version I will be using in these tutorials is 1.1.3. I shall include sheet music at the end of each tutorial as an invitation to test your knowledge by translating sheet music into a production with LMMS.
Quick Overview of LMMS Interface
If LMMS is run for the first time, you will be greeted with the settings window where you can set up LMMS. Here you will want to make sure the sound driver is correct under Audio Settings (ALSA). A warning will popup after you close the settings dialog that some changes require restarting LMMS.
The interface presented consists of the sidebar, toolbars, and the main controls, which consist of the song editor, beat and bassline editor, sound FX mixer, and controller rack. The sidebar has tabs for instrument plugins, sound samples, preset instruments, and filesystem navigation for locating and loading custom sound files into a project (discussed in a later tutorial).

At the top are the usual, new, open, save, and export controls, as well as the different views that can be accessed. Controls for tempo, time signature, master volume, etc. are located at the top.
In later tutorials, I will explain the rest of the interface in further detail.
Sounds and Instruments
LMMS comes with a huge collection of sound samples and instrument presets. These are accessible from the aforementioned sidebar on the left-hand side. The sound samples are located in the samples tab and are in OGG format. WAV format is also supported as well for custom samples. Pressing an entry in the list will play the sound so you can decide what you wish to use in your projects.

Instrument presets are located in the presets tab. Here are predefined instruments that have been created using the various plugins. The plugin category with the most instruments is ZynAddSubFX where there are numerous folders containing hundreds of instruments in your repertoire. Like samples, selecting each entry will give you a sample of the instrument; however, the note played will usually be A4 (two tones below C5). Also, the sounds are generated dynamically and will require more CPU power. If you have a lot of these instruments playing at once in your project, you may notice a severe performance hit as the CPU has to process all of these instruments at once. The better your PC is, the more capable it can process those sounds as you play them.
​You can adjust the volume of each track to your heart’s content.
Creating a Simple Piece
​We are going to create a short and simple musical piece in 4/4 time at the default tempo of 140 beats per minute. The key will be C major, which has no sharp or flat notes. There will be simple drum activity provided by a beat/bassline track.
Simple Beats
Let’s begin by experimenting with beat and bassline tracks. I use these to simulate the drums. I am going to create a beat line using a few sound files under the drums section of the samples tab.

Navigate to the “My Samples” tab in the sidebar and expand the ‘drums’ folder (refer the screenshot above). As you can see there are hi-hats (open and closed), snares, drums, bass drums, and other effects at your disposal. Select each entry to help decide which sounds to include in your “drum kit”.

In the song editor, click on a bar in the Beat/Bassline 0 track and a block should appear. Double-click on that block to open the Beat/Bassline editor. By default a typical beat spans only one bar in a song; however, that can easily be increased by adding steps. Likewise, removing steps will shrink the entire beat line by one bar. For now, let’s keep the number of steps limited to one bar. We will have a bass drum, a snare, and a hi-hat.

Here is an example:
Basic Melodies
​What is a song without a melody? Simple melodies can be constructed in the Piano Roll window. The piano keys on the left will always be visible wherever you scroll in the piano roll window. In the LMMS settings, you are able to specify whether or not you wish to display the names of each note on the piano roll if you wish. C notes will always be pointed out on the keyboard with a number from C0 to C8, with C5 being middle C.

The instrument used was ‘0001-Soft Piano 1’. It is located in the ‘My Presets’ tab, under ‘ZynAddSubFX’, under ‘SynthPiano’ (refer to the screenshot of the samples and presets).

​Here is what I have composed as an example:
I have used crotchets (quarter notes), quavers (eighth notes), and a minim at the end (half note). I have also used a couple of rests as well. I have the sheet music of the melody here:
Do It Yourself
Try to compose this piece on LMMS:
Feel free to experiment with your own drum beats that you feel may match the melody. In the next tutorial, I will demonstrate the creation of chords, and creating music in different keys. I will also touch upon sound effects as well.
​This was really just a quick tutorial to become familiar with the interface and how to create simple beats and melodies right away. In later tutorials, I shall cover more advanced topics on using the features found within LMMS to create effects, high-quality tracks, and eventually different plugins.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
​Welcome to the second part of the web server setup series. In this part, I'll show you how to fix CWP (CentOS web panel) errors and warnings, create new user accounts, create hosting packages, and create FTP account. So let's start.
​In the last part, I installed CentOS web panel on my virtual private server. If you've not installed it, read the first part to install CWP on your server.
​Fix errors and warnings on the control panel
Set root email
​When you login to the CWP control panel, you'll see several errors popping up in the header. It's important to fix these errors before moving forward.
​The panel requires a root email account for further notifications from the control panel. To fix it, click the button 'Set root email' and type your email address.
You can also forward all system emails to the root email. Hit save to save the changes.

After setting up root email, log out of the panel and log back in.
Change default SSH port
The SSH protocol is a method to securely connect to remote server. The default port for SSH communication is 22. It is suggested to change the default SSH port 22 to something else to improve the security of our server.

Change default SSH port by either clicking the link on the error /etc/ssh/sshd_config or from the sidebar options.
​Now to set the ssh port manually, uncomment the line "Port 22" and replace 22 with your desired port. To uncomment, remove the hash '#'.
Now save settings. We also need to update port number in the firewall settings so that we can connect through the new port.

From the sidebar go to Security > Firewall Manager.
​Click Configuration > Main Configuration and it will open up the settings. Now search the following TCP incoming and outgoing ports and add your ssh port in here.
​Now save changes and restart SSH server and firewall.
​Enable Firewall. If you had already enabled it before adding port, then restart it.
And that's it. You have changed the default SSH port, allowing the connection through that port in the firewall. Now re-login to the panel and the message to update the port should go away. If you still see the message, make sure to save the changes after changing the port.

And that's all. We have fixed all the warnings. If you still see some of the initial warnings, please check you saved the settings after making changes. Also, remember that from now on we'll have to provide the SSH port while connecting to the server otherwise you'll get error "Connection refused".
ssh username@server-ip -p port-number
Create hosting packages
In future, you'll have multiple users or clients hosting their own websites on your server. You can charge your clients based on the resources you provide to them. For example, you can create a package for new developers allowing them 1GB storage, 1GB bandwidth, 2 email accounts, 2 FTP accounts etc. You can do that by creating a new package.

Packages allow the admin to easily control the resources on the server. To create a new package, from sidebar click the Package > Add a package. It'll show you the following screen.
It's very simple to add a package. Fill in all the fields and hit the create button. You can leave a field empty and cwp will assign a default value to that field.

You can create multiple packages and when creating an account, you'll be given an option to assign that user a package. We'll see that in the next step.
​You can see all the packages by going to Packages > List packages.
Create new User account
​After creating multiple packages, it's time to create a user. Creating a new user is also very easy. Go to User accounts > New account.
In the first field enter the domain name that the user wants to point to the server. Enter a username, password, email account, Server IP, and packages. You can see all the packages that you have created plus a default one. Select a package for this account.

In the screenshot the Inode option is hidden. Inode means the number of files that the user can host on the server storage. All other options are pretty clear. Just fill them, hit Create button and the user has been created.
Now it'll print all the new user details such as username, password, email address and the login panel for the user. Save this somewhere in a document. Now notice that the login panel for this new user is not the same for admin. For admin, we have server-ip:2030 but for users the panel allows dashboard access at server-ip:2082.

Now visit server-ip:2082 which is user login page.
Enter the username and password.
The user dashboard has less options than the root dashboard. Server stats and processes should not be visible to all users so they're not appearing on the user dashboard. Right sidebar shows all the resources available to the user such as databases, emails, domains, and FTP accounts. Some quick actions such as antivirus scan and file system lock are also in the right sidebar.

All other management options are under sidebar navigation menu and dashboard. I'll suggest you take a look at these options one by one so that you can get the idea what cwp can do.
 Hide all processes if not owned by the user is NOT activated on your server
​After creating a new user, you will see another warning on the root user dashboard. On the panel, you can monitor all the processes running the server. By default, all users' processes are visible. The panel recommends hiding the processes if not owned by current user. Click the link in the error and it'll take you to the settings page.
​Click "Enable protection" and that's it.
Create FTP account
If admin has allowed FTP account to the user, then FTP accounts can be created right from the dashboard option. Click FTP accounts.
Click FTP accounts and click create FTP account. You'll have the following dialogue. Simply fill in the information and that's it. Now you can use FTP clients such as Filezilla to connect to the server.
​So this was the second part of web server setup series. We have fixed all the warnings, improving the security of our server. In this part, I also wanted to point a domain to our server but due to the length of this article, I'm going to do that in the next article. If you have any suggestion or doubt then do tell me in the comment section below.
Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
​I have reviewed a very good Linux distribution that I first used full-time as opposed to just playing around with it 8 years ago. You could say that I was suckled on it so to speak. What attracted me to PCLinuxOS distribution was mainly how simple to use it was. They released a new ISO to download in November so I decided to give this release a go.
Quick Overview PCLinuxOS
PCLinuxOS is a rolling-release distribution, meaning, theoretically, you can continue to update your system with the latest packages without having to reinstall a new version of the same distro every few years (like you do with distros like Ubuntu and Fedora).

It was once based on Mandriva Linux, but since 2010, it has used its own codebase (indeed, distrowatch.com lists PCLinuxOS as being “Independent” in the “Based On” field). Like any rolling-release distros, however, I would recommend updating as often as possible to reduce the risk of things breaking on you too much. However, I digress. PCLinuxOS was the first distro that I used full-time instead of Windows (which, like many other poor souls, would only be kept for certain games and other software that wouldn’t run on Wine properly). It was, and still is, a no-frills distribution, it just did the job.
Download PCLinuxOS
Install PCLinuxOS
​I proceeded to install the system in Oracle VirtualBox, loaded the ISO into it, selected “Live CD” in the boot menu, and let it load up.
I selected the “US keyboard” option and it took me to the desktop as the “guest” user. The “guest” user is deleted once the system is installed.

I noticed that the time was incorrect on the VM, so I attempted to correct it before I installed the system to disk. However, it didn’t give me the option to authenticate as it should have, and it gave me an error.
Perhaps it may have been a KDE bug, but I’m not sure. Whilst quickly checking out the KDE 5 Plasma interface, the interface was quite basic, easy enough to find what you want. I managed to find and open up LibreOffice Writer using the application menu.

I then ran the wizard by running “Install Me” on the desktop.
As you’ll find, nothing really fancy here. A simple introduction screen, and then a drive configuration option: use the entire disk, or customize the partitions yourself. If you have another operating system installed on the disk, it will be detected and the option to use PCLinuxOS alongside it will appear as well. I decided to use the customized option.

​A simple partition editor greeted me. I decided to press “Auto allocate” to see what it would give me. The root (‘/’) partition, the swap space, and the ‘/home’ partition were given to me. I accepted those settings and proceeded to format the partitions and install Linux on them (with the usual warning, of course).
You may be greeted with a dialog to remove unnecessary packages during installation so that the live system does not have them. You may skip this part. If you choose to delete the packages, I would recommend clicking “Advanced” first to see which packages are being removed. If you have a laptop with hybrid graphics support, like Intel CPUs with discrete NVIDIA graphics via Optimus, if the list contains anything related to NVIDIA, I would keep them for installing bumblebee/bbswitch. You can install them again later if you wish.

After installation, the bootloader configuration was presented to me with the bootloader to use, the time to pass before the default option is run, and the password to enter if desired.

I tried to install GRUB2, but it crashed with a Perl error.
So I rebooted, the drive failed to boot of course, so I re-ran the ISO to see if I could run some commands at the terminal. After that I rebooted, the grub console came up. So I reinstalled.

It still crashed. After having a proper look at the log, which is what I should have done first, I confirmed that this had something to do with the password I entered into the password fields, which was a shame. I reinstalled, this time leaving the password out. Maybe it was a program error, or my password had invalid characters; I don’t know.

The bootloader installed! I was now able to run PCLinuxOS.
Starting the System
​Once restarted, the bootloader appeared and I proceeded to start the system normally. Everything went well here so far. I was able to select my timezone and set up my account and root password.
​Logging into the computer was a straightforward process, as expected, leading me to the KDE Plasma desktop. I was able to change the time, but by setting the time to use the hardware clock instead of using a time server.

​The desktop is pretty basic. I’m not really a fan of the background colors (just my taste in backgrounds), but that can be changed easily.
​The startup menu resembles a basic Start menu for Windows. However, I prefer a more updated look. I can use an alternative start menu widget such as the “application launcher”. It comes with a lot of programs installed, including, of course, LibreOffice, Firefox, Thunderbird, VLC, and numerous other programs. Navigation was easy; I could find what I wanted without fuss using the app menu, which is what I expect from a system aimed at beginners.
Configuring the System
​PCLinuxOS uses a very tidy configuration GUI that covers all of the essentials, such as hardware settings, account management, networking, and other administration programs. Each option is its own program that is run in this shell, and the user interface of each is quite basic. Again, no gimmicks, just simplicity that allows you to get on with the job.
​See there are options to import stuff from a Windows partition as well if one exists.
​Managing host definitions.
​Managing users.
Installing Software & Updating the system
​Synaptic Package Manager is the program used to manage software and updates on your computer; therefore, it requires administrative privileges. Normally Synaptic is used with Debian packages (*.deb); however, PCLinuxOS uses RPM packages with Synaptic. RPM packages were used because the distribution was once based on Mandriva Linux, itself a distro with roots in Red Hat. Packages are cataloged into numerous categories on the left-hand side. Also, if you are looking for something specific, there is a search tool to use.
The installation process is quite simple: select the package you wish to install, which may be installed with dependencies, press “Apply” to view what changes are going to be made, and start installing. “Mark All Upgrades”, as implied, simply tags all upgradable packages to be installed, and, again, press “Apply” to perform updates.
NOTE: You will want to update your system regularly to ensure that each update is as smooth as possible.
General Use
I have installed an older version of PCLinuxOS on real hardware a few months back. It works really well. I can boot it up, use LibreOffice, play a couple of games, was able to install bumblebee to be able to use the discrete NVIDIA graphics with minimal fuss (a blessing, trust me), and basically have some fun with it.

I keep it updated from time to time to keep up with releases, and to avoid any major problems breaking my system down the track if ever I needed to upgrade.
Help & Support
​The PCLinuxOS forum is a very good place to find information about any problems you might encounter while using PCLinuxOS. The community will usually have answers to your questions if you look around. Otherwise, you can, of course, join the forum. Every month they also have a new edition of their online magazine in a PDF. Even you don’t end up using PCLinuxOS, they do contain tutorials, tips, and guides that may be beneficial when using other distros as they have guides on different programs.
Definitely, check this distribution out whenever you get the chance. It doesn’t have all of the bells, whistles, and gimmicks that are found in other distros, but this one is still a very usable solid operating system. Installing it in VirtualBox wasn’t all smooth sailing; however, if you wish to install PCLinuxOS on a physical computer, you should have a positive experience with this Linux. Installing and updating packages to keep the system up to date is easy and straightforward, so is configuring your Plasma desktop.

The only major thing that occurred was not being able to enter the password when installing the bootloader. Minor issues did present themselves, but nothing that would greatly impact the overall experience with the system. So, PCLinuxOS isn’t perfect (well, what is?), but quite a solid distribution worth trying.
Read Full Article
Visit website

Read for later

Articles marked as Favorite are saved for later viewing.
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free year
Free Preview