How to install Oracle 18c (Enterprise Edition) on Ubuntu 18.04?

Let us begin with Part-I of the answer session.

1.   Pre-requisite:
1.1.  Storage Space Required

Oracle download file is db_home.zip whose size is 4.3 GB. If you
don't have that much storage space either in $HOME directory or
/tmp, you can use a Pendrive of atleast 8GB capacity to hold the
downloaded file db_home.zip until the extraction is done.
As we are going to install Oracle on directory /opt, it should be
having unused free space of atleast 13 GB because oracle extraction
itself will consume around 9.3 GB of storage space. Use the following
command to verify /opt partition storage space:

$ df -h /opt

Figure-1: Amount of free space available under "/opt" partition.
1.2.  JDK-11 is installed in your computer.
$ echo $JAVA_HOME

Figure-2: Installation of JDK-11 is already done.
1.3.  Enable Multi-Arch Support (32-bit support).
Before enabling 32-bit support for 64-bit Ubuntu 18.04, let us verify that you have 64-bit kernel architecture:
$ dpkg --print-architecture

Figure-3: This Computer system has 64-bit Kernel Architecture.
Multi-arch support allows you to use 32-bit libraries alongside 64-bit libraries.
$ dpkg --print-foreign-architectures

Figure-4: This Computer system also supports i386 Architecture (i.e. supports 32-bit Libraries too).
If you get an output like figure-4, then you should break this step and move on to next step-1.4.
Enable multi-arch support by typing:
$ sudo dpkg --add-architecture i386
$ sudo apt-get update

It starts downloading the update and running. After that you give the following command:
$ sudo apt-get dist-upgrade
Now verify about support to i386 by typing the following and you should get an output like figure-4:
$ dpkg --print-foreign-architectures
1.4.  Install Dependancy Packages required for Oracle Installation.
Issue the following commands to install dependant packages:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential libaio1 libaio-dev rpm rpm-common ndctl

1.5.  Create Symlinks.
Create the required soft links so that the installation can find the files it needs at the places it expects them to be:
$ sudo mkdir -p /usr/lib64

$ sudo ln -s /usr/bin/rpm /bin/
$ sudo ln -s /usr/bin/awk /bin/
$ sudo ln -s /usr/bin/basename /bin/
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libndctl.so.6.10.1 /usr/lib64/libndctl.so
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0 /usr/lib64/libnuma.so

Find out to whom is /bin/sh pointing to:
$ ls -l /bin/sh

Figure-5: '/bin/sh' points towards 'dash' shell
If /bin/sh is pointing to dash shell (refer above figure-5), then you are good! Now, you break this step and move ahead to next step-1.6.

Figure-6: /bin/sh points towards 'bash' shell
If it is bash shell as seen in Figure-6, then create the following symlinks:
$ sudo ln -s /usr/lib/x86_64-linux-gnu/crti.o /usr/lib64/
$ sudo ln -s /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib64/
$ sudo ln -s /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib64/

1.6.  Configure kernel parameters with /etc/sysctl.conf:
To configure Kernel parameters, just follow the below procedure:
$ sudo cp /etc/sysctl.conf /etc/sysctl.conf.back
$ sudo vi /etc/sysctl.conf
Copy and paste the below contents into the file.
#  ------------------------------------------------
# kernel parameter configuration for 18c installation
# 1. Configure kernel shared memory segment
# Calculate shmmax and shmall based on your Computer system RAM (physical memory).
# shmmax = (half the size of RAM in bytes) = (16 GB / 2) * 1024*1024*1024 = 8589934592 bytes
#  (or)         = (one quarter of RAM in bytes) = 4294967296 bytes
# shmall = shmmax/pagesize = 8589934592 / 4096 = 2097152 pages
# 2. Configure kernel semaphore parameters which are semmsl, semmns, semopm and semmni respectively.
# kernel.sem = semmsl  semmns  semopm  semmni = 250 32000 100 128
#
# to display all kernel parameters, issue this command: sysctl -a
# to display current kernel parameters, issue this command: sysctl -p
# -------------------------------------------------------
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 8589934592
kernel.sem = 250 32000 100 128
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1

Save and exit from vi editor.
Run the following command to display the current kernel parameters.
$ sudo sysctl -p

Figure-7: The list of Kernel Parameters configured in "/etc/sysctl.conf" file.
1.7.  Configure shell limits for user oracle
Historically, resource limits for processes are defined in /etc/security/limits.conf. This file is read at login time for users logging in with PAM (via file pam_limits.so).  However, system services that are started via systemd do not use PAM for login, so the limits in /etc/security/limits.conf are ignored.
Make a GUI login and open up a terminal with Ctrl+Alt+T and issue the following command:
$ ulimit -n -s -u -l

Figure-8: Limits for a GUI login with empty '/etc/systemsd/user.conf' file.
Make a non-GUI login by the command su <username> and then issue ulimit command:
$ su krishna
$ ulimit -n -s -u -l

Figure-9: Limits for a non-GUI login with empty '/etc/security/limits.conf' file.
1.7.1.    Configure limits parameters for GUI logins with /etc/systemd/user.conf file:
To configure limits parameters system.conf, just follow the below procedure:
$ sudo cp /etc/systemd/system.conf /etc/systemd/system.conf.back
$ sudo vi /etc/systemd/system.conf

Copy and paste the below lines into the file.
DefaultLimitNOFILE=65535
DefaultLimitNPROC=65535

Save and exit from vi editor.
To configure limits parameters in user.conf, just follow the below procedure:
$ sudo cp /etc/systemd/user.conf /etc/systemd/user.conf.back
$ sudo vi /etc/systemd/user.conf

Copy and paste the below lines into the file.
DefaultLimitNOFILE=65000
DefaultLimitNPROC=65000

Save and exit from vi editor.
Reboot the computer in order to effect the changes.

Observation: When I attempted to change DefaultLimitSTACK parameter to various values in both '/etc/systemd/system.conf' and '/etc/systemd/user.conf', the system either froze or crashed up on reboot. Though I successfully restored the system most of the time but twice I had to re-install Ubuntu operating system from scratch and it was really a hard time!

Make a GUI login and open up a terminal with Ctrl+Alt+T and issue the following command:
$ ulimit -n -s -u -l

Figure-10: Limits for a GUI login with parameters configured in '/etc/systemsd/user.conf' file.
Make a non-GUI login by the command su <username> and then issue ulimit command:
$ su krishna
$ ulimit -n -s -u -l

Figure-11: Limits for a non-GUI login with empty '/etc/security/limits.conf' file.
1.7.2.    Configure limits parameters for non-GUI logins with /etc/security/limits.conf file:
To configure limits parameters in limits.conf, just follow the below procedure:
$ sudo cp /etc/security/limits.conf /etc/security/limits.conf.back
$ sudo vi /etc/security/limits.conf

Copy and paste the below contents into the file.
#-------------------------------------------------------------------------------------------------
# shell limits for users of oracle 18c
# [domain] is either username or group or the wildcard *, for default entry or
# the wildcard %, can be also used with %group syntax, for maxlogin limit
# [type] is either soft (enforcing soft limits) or hard (enforcing hard limits)
# [item] is among core, data, fsize, memlock, nofile, rss, stack, cpu, nproc, as,
# maxlogin, maxsyslogins, priority, locks, sigpending, msgqueue, nice, rtprio
#[domain][type]  [item]  [value]
#-------------------------------------------------------------------------------------------------
krishna   soft   nofile   60000
krishna   hard   nofile   65535
krishna   soft   nproc    60000
krishna   hard   nproc    65535
krishna   soft   stack    30000
krishna   hard   stack    32768
krishna   soft   memlock  3000000
krishna   hard   memlock  3145728

Save and exit from vi editor.
Reboot the computer in order to effect the changes.
Make a GUI login and open up a terminal with Ctrl+Alt+T and issue the following command:
$ ulimit -n -s -u -l

Figure-12: Limits for a GUI login with parameters configured in '/etc/systemsd/user.conf' file.
Make a non-GUI login by the command su <username> and then issue ulimit command:
$ su krishna
$ ulimit -n -s -u -l

Figure-13: Limits for a non-GUI login with parameters configured in '/etc/security/limits.conf' file.
Use vi editor and edit /etc/security/limits.conf in order to change "krishna" to "oracle" because username krishna was used to generate screenshots and to explain the concepts. The following is the desired settings for Oracle installation:
oracle   soft   nofile   60000
oracle   hard   nofile   65535
oracle   soft   nproc    60000
oracle   hard   nproc    65535
oracle   soft   stack    30000
oracle   hard   stack    32768
oracle   soft   memlock  3000000
oracle   hard   memlock  3145728

1.7.3.    How to display the limits of a user process?
To display the limits of a user process, all you have do is simply "cat" the limits file like this:
$ sudo cat /proc/PID/limits
Where PID can be find out using ps command.
$ ps -a | grep -v tty2 | grep gnome-shell

Figure-14: PID for gnome-shell.
$ sudo cat /proc/1202/limits

Figure-15: Soft limits for gnome-shell (marked in red).
MaxStackSize is 8,192 KB (8388608 % 1024), MaxProcess is 63,077, MaxOpenFile is 1,024 and MaxLockedMemory is 16,384 KB (16777216 % 1024). Compare these values with figure-11.
$ ps -a | grep -v tty2 | grep bash

Figure-16: PID for 'bash'.
$ sudo cat /proc/2697/limits

Figure-17: Soft limits for 'bash' (marked in red).
MaxStackSize is 30,000 KB (30720000 % 1024), MaxProcess is 60,000, MaxOpenFile is 60,000 and MaxLockedMemory is 3,000,000 KB (3072000000 % 1024). Compare these values with figure-13.
1.7.4.    Add pam_limits to your PAM (Pluggable Authentication Modules) Configuration.
/etc/security/limits.conf allows setting resource limits for users logged in via PAM. This is a useful way of preventing, for example, fork-bombs from using up all system resources.
Since /etc/security/limits.conf is read by pam_limits.so, you need to check that this module is enabled in the files: login, common-session, common-session-noninteractive, su.
Take backups before making changes:
$ sudo cp /etc/pam.d/login /etc/pam.d/login.back
$ sudo cp /etc/pam.d/common-session /etc/pam.d/common-session.back
$ sudo cp /etc/pam.d/common-session-noninteractive /etc/pam.d/common-session-noninteractive.back
$ sudo cp /etc/pam.d/su /etc/pam.d/su.back

Issue the following commands:
$ echo 'session    required     pam_limits.so' | sudo tee -a /etc/pam.d/login
$ echo 'session    required     pam_limits.so' | sudo tee -a /etc/pam.d/common-session
$ echo 'session    required     pam_limits.so' | sudo tee -a /etc/pam.d/common-session-noninteractive
$ echo 'session    required     pam_limits.so' | sudo tee -a /etc/pam.d/su

Note: Refer /var/log/auth.log file for any limits-related errors.
1.8.  Configure secure Linux.
To ascertain that the computer has configured for secured linux, type the command:
$ sestatus

Figure-18: Output confirms that secured linux is not installed which is good.
If you get an output like above Figure-18, then you are good! Now, you break this step and move ahead to next step-1.9.
Had you installed the package policycoreutils and if you get an output like in Figure-19 below, then you are good too! You break this step and go to next step-1.9.
$ sudo sestatus

Figure-19: Output of 'sestatus' command.
As you have already configured secured Linux, so change SELINUX flag to permissive by editing /etc/selinux/config file:
$ sudo cp /etc/selinux/config /etc/selinux/config.back
$ sudo vi /etc/selinux/config

Now, set the SELINUX flag to permissive:
SELINUX=permissive
Save and exit from vi editor.
To confirm your change, issue the following command:
$ sudo sestatus
Note: Since my computer was not configured for secure linux, I could not produce a screenshot for the above command!
1.9.  Disable Transparent Huge Pages.
Transparent Huge Pages (THP) is a Linux memory management system that reduces the overhead of Translation Lookaside Buffer (TLB) lookups on machines with large amounts of memory by using larger memory pages.
However, database workloads often perform poorly with THP, because they tend to have sparse rather than contiguous memory access patterns. The overall recommendation for MySQL, MongoDB, Oracle, etc is to disable THP on Linux machines to ensure best performance.
You can check to see if THP is enabled or not by running:
$ cat /sys/kernel/mm/transparent_hugepage/enabled

Figure-20: The output shows THP 'enabled' is set to default value '[madvise]' in this computer at present.
$ cat /sys/kernel/mm/transparent_hugepage/defrag

Figure-21: The output shows THP 'defrag' is set to default value '[madvise]' in this computer at present.
If figure-20 and figure-21 show output like [never], then THP is neither enabled nor running.
How to turn off THP during entire current session?
Now, issue the following commands:
$ su -
# echo never > /sys/kernel/mm/transparent_hugepage/enabled
# exit
$ cat /sys/kernel/mm/transparent_hugepage/enabled

Figure-22: The output shows THP enabled is stopped from this computer as indicated by the value '[never]'.
$ su -
# echo never > /sys/kernel/mm/transparent_hugepage/defrag
# exit
$ cat /sys/kernel/mm/transparent_hugepage/defrag

Figure-23: The output shows THP 'defrag' is stopped from this computer as indicated by the value '[never]'.
How to turn off THP persistently and permanently for ever?
However, once the system reboots, it will go back to its default value again. To make the setting persistent on Ubuntu 18.04, you can disable THP on system startup by making a systemd unit file:
$ sudo vi /etc/systemd/system/disable-thp.service
Copy and paste the following in to the file /etc/systemd/system/disable-thp.service:
# ---------------------------------------------------
# Disable THP in Ubuntu 18.04:
# ---------------------------------------------------
[Unit]
Description=Disable Transparent Huge Pages (THP)
[Service]
Type=simple
ExecStart=/bin/sh -c "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag"

[Install]
WantedBy=multi-user.target

To enable and run /etc/systemd/system/disable-thp.service file at start up, type the following commands:
$ sudo systemctl daemon-reload
$ sudo systemctl start disable-thp
$ sudo systemctl enable disable-thp

Figure-24: The THP disable service is enabled to start up at boot time.
$ sudo systemctl status disable-thp

Figure-25: The THP disable service has started successfully.
Now, to verify THP is turned off permanently, type the following command:
$ cat /sys/kernel/mm/transparent_hugepage/enabled

Figure-26: The output shows THP 'enabled' is turned off persistently as indicated by the value '[never]'.
$ cat /sys/kernel/mm/transparent_hugepage/defrag

Figure-27: The output shows THP 'defrag' is turned off persistently as indicated by the value '[never]'.
1.10.    Final Check Points relevant to Oracle installation.
1.10.1.   Use the following command to determine physical RAM size on the server:
$ grep MemTotal /proc/meminfo

Figure-28: Abundant Physical RAM is available (16 GB).
Note: If the size of the physical RAM installed in the system is less than the required size (2 GB), then you must install more memory before continuing.
1.10.2.   Determine the size of the configured swap space:
$ grep SwapTotal /proc/meminfo

Figure-29: Abundant Memory is available for swap partition (16 GB).
Note: If the size of swap memory in the system is less than the required size (see below table which is recommended by oracle), then you must configure more memory before continuing.
RAM                         Swap Space
Between 1 GB and 2 GB       1.5 times the size of RAM
Between 2 GB and 16 GB      Equal to the size of RAM
More than 16 GB             16 GB

1.10.3.   Determine the size of the configured /tmp space:
$ df -h /tmp

Figure-30: Abundant Memory is available for '/tmp' partition (16 GB).
Note: If the size of /tmp memory in the system is less than the required size (400 MB), then complete one of the following steps:

Delete unnecessary files from the /tmp directory to meet the disk
space requirement.
When you set the Oracle user's environment, also set the TMP and
TMPDIR environment variables to the directory you want to use
instead of /tmp.

1.10.4.   Determine the amount of free RAM and disk swap space on the system:
$ free -h

Figure-31: A glance of Free RAM (physical) and swap (disk space) available on the system.
1.10.5.   Determine if the system architecture can run the software:
Verify that the processor architecture matches the Oracle software release to install. For example, you should see the following for a x86-64 bit system.
$ uname -m

Figure-32: The output shows that the computer system has 64-bit architecture.
If you do not see the expected output, then you cannot install the software on this system
1.10.6.   Sample Partition Table for 120 GB SSD suitable to Oracle Installation:
I have a 120 GB SSD where Ubuntu was installed. Here, is my partition details:
Sl.No:  Partition  File System           Device         Allocated Size   Partition Type
1       efi        FAT32                /dev/sda1       0.5 GB           Primary
2       swap       Swap area            /dev/sda2       16 GB            Primary
3       /          ext4 with journaling /dev/sda3       6 GB             Primary
4       /usr       ext4 with journaling /dev/sda4       16 GB            Primary
5       /opt       ext4 with journaling /dev/sda5       44 GB            Primary
6       /tmp       ext2                 /dev/sda6       16 GB            Primary
7       /var       ext4 with journaling /dev/sda7       8 GB             Primary
8       /home      ext4 with journaling /dev/sda8       13.5 GB          Primary

I arranged this partition setup particularly with Oracle 18c (Enterprise Edition) in mind
1.10.7.   Verify that shared memory (/dev/shm) is mounted properly with sufficient size:
Issue the following command to check shared memory availability and its total size:
$ df -h /dev/shm

Figure-33: The tmpfs filesystem mounted on '/dev/shm' and has 7.8 GB of total shared memory.
To reduce the limit from 7.8 GB to 7.0 GB, issue the following command:
$ sudo mount -o remount,size=7G /dev/shm
$ df -h /dev/shm

Figure-34: The '/dev/shm' shared memory size has changed from 7.8 GB to 7 GB.
To restrict any modification on the size of /dev/shm permanently and to ensure that the in-memory file system is mounted when the system restarts, put this entry into /etc/fstab file as follows:
First take a backup:
$ sudo cp /etc/fstab /etc/fstab.back
Modify size parameter to 8GB:
$ echo '# To restrict any modification on the size of /dev/shm permanently' | sudo tee -a /etc/fstab
$ echo '# To ensure that the in-memory file system is mounted when the system restarts' | sudo tee -a /etc/fstab
$ echo 'tmpfs     /dev/shm        tmpfs   defaults,size=8G        0 0' | sudo tee -a /etc/fstab

$ grep tmpfs /etc/fstab

Figure-35: Entry of 'tmpfs' filesystem in '/etc/fstab' file mounted on '/dev/shm' with 8 GB shared memory.
In order to effect our changes done on /etc/fstab immediately remount /dev/shm:
$ sudo mount -o remount /dev/shm
$ df -h /dev/shm

Figure-36: The '/dev/shm' shared memory size is 8 GB.
1.11.    Network Configuration.
1.11.1. Configure /etc/hosts file.
To find out the contents of /etc/hosts file, issue this command:
$ cat /etc/hosts

Figure-37: Contents of /etc/hosts file.
Contents of figure-37 screenshot is reproduced below, so that any one who needs can copy & paste.
# <IP-address> <fully-qualified-machine-name> <machine-name>
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain
::1         localhost localhost.localdomain localhost6 localhost6.localdomain

Well, the order of name resolution is actually defined in /etc/nsswitch.conf, and you should see an entry like this:
hosts:          files dns

Type the following command to see the actual record corresponding to hosts:
$ cat /etc/nsswitch.conf | grep hosts:

Figure-38: Hosts record in '/etc/nsswich.conf' where 'files' precedes dns in order which is good.
warning: if /etc/hosts file is not configured properly, then Oracle installer will fail at some point of time!
1.11.2. Configure /etc/resolv.conf file.
To display what network interfaces are available in the system, issue the following command:
$ ip link show

Figure-39: The WiFi network adapter wlp5s0 is active, up and running.
Network configuration file netplan/.yaml should be checked for configuration details. To display the contents of the file, issue the following command:
$ cat /etc/netplan/01-network-manager-all.yaml

Figure-40: Network Manager file '01-network-manager-all.yaml' is not configured.
Find out whether /etc/resolv.conf is a static file or symlink by the following command:
$ ls -l /etc/resolv.conf

Figure-41: File '/etc/resolv.conf' is a symlink pointing to stub file 'stub-resolv.conf'.
Display contents of /etc/resolv.conf by the command: cat /etc/resolv.conf

Figure-42: The contents of symlink '/etc/resolv.conf' having 127.0.0.53 as nameserver.
The dns shown by /etc/resolv.conf, is 127.0.0.53 but not the default nameserver configured for dhcp. Issue the following command to find out the default dns server:
$ systemd-resolve --status wlp5s0

Figure-43: The default DNS server for WiFi network adapter is 192.168.43.1.
Display contents of /run/systemd/resolve/resolv.conf, by the command:
$ cat /run/systemd/resolve/resolv.conf

Figure-44: The contents of '/run/systemd/resolve/resolv.conf' indicating default nameserver. Compare with figure-43
From figure-44, you can observe that /run/systemd/resolve/resolv.conf is the one which really is carrying the default name server 192.168.43.1.
Issue the following command to change the symlink /etc/resolv.conf to point default dns server 192.168.43.1 instead of 127.0.0.53.
$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ ls -l /etc/resolv.conf

Figure-45: File /etc/resolv.conf is a symlink pointing to default nameserver which is good.
After setting up sysmlink as shown in figure-45, you must make sure that your Wi-Fi is connected, up and running, by issuing the following command:
$ nmcli device

Figure-45-a: Wi-Fi network interface adapter 'wlp5s0' is connected, up and running.
1.12.  Disable Linux Firewall.
If you have the Linux Firewall enabled, you will need to disable it, so do as given below:
$ sudo ufw disable
$ sudo ufw status

Figure-46: Disable Firewall before Oracle installation.
Note: Don’t forget to enable firewall after installation is over using the command: $ sudo ufw enable
Part-I ends here and Part-II of the answer session will begin which deals with:
1) Create oracle User, and Groups.
2) Creation of Oracle Mount, Base and Home directories.
3) Tips for Oracle account creation to download installable image file.
4) Extraction of image file.
5) Manipulation and altering of make files required for building binaries on Ubuntu Linux platform.


How can I extract and print specific parts of an HTML file?

This answer is based on a literal reading of the question.  Anyone who comes across this when searching for how to view an HTML file in a convenient, human-readable way in a terminal should instead see How can I preview HTML documents from the command line? That is not what the methods detailed in this answer do.

Sometimes a < or > character appears in an HTML file even when it is not meant to designate the beginning or end of a tag. If you have to deal with that sort of thing -- or, more generally, if you need your solution to be robust and work with arbitrary HTML documents -- then you should use a utility that actually parses the HTML.
However, if you're just generating output for your own convenience and will notice if something goes wrong (and nothing terrible would happen if you didn't notice), then you can do what you're asking with any of several text processing techniques.
The most common ways to process text using Unix system utilities treat input as a sequence of lines. Since line breaks don't have special significance in HTML, I have avoided this approach, and the methods given in this answer will work even for tags that are split across lines. However, I emphasize that these are still approximate solutions.
Extracting Text Between  Tags
This Python 3 one-liner (run it from your shell) prints all the text in index.html that appears after the first occurrence of  but before the first occurrence of :
python3 -c 'import pathlib; s=pathlib.Path("index.html").read_text(); e=""; print(s[s.find(e)+len(e):s.find("")])'

If you like, you can ungolf and enhance that into a reusable script:
#!/usr/bin/env python3

from sys import argv
from pathlib import Path

start = ''
end = ''

for path in argv[1:]:
    text = Path(path).read_text()
    print(text[text.find(start) + len(start) : text.find(end)])

If you saved the script as print-inside-html, you'd mark it executable like this:
chmod +x print-inside-html

And you'd run it on index.html like this:
./print-inside-html index.html

You can run it on multiple files at once, if you like:
./print-inside-html index.html foo.html coolstuff/index.html

However, you may notice that if there is leading and trailing whitespace between the start and end tags, that gets printed. If you don't want this, then you can use the strip function to remove it. Here's a modified one-liner:
python3 -c 'import pathlib; s=pathlib.Path("index.html").read_text(); e=""; print(s[s.find(e)+len(e):s.find("")].strip())'

And, ungolfed:
#!/usr/bin/env python3

from sys import argv
from pathlib import Path

start = ''
end = ''

for path in argv[1:]:
    text = Path(path).read_text()
    print(text[text.find(start) + len(start) : text.find(end)].strip())

However, neither of the above ways accommodates case-variant tag names (e.g., HTML instead of html) or whitespace in tags after the name. This further-modified one-liner uses regular expressions to accommodate both:
python3 -c 'import re,pathlib; s=pathlib.Path("index.html").read_text(); print(s[re.search(r"(?i)",s).end():re.search(r"(?i)",s).start()].strip())'

Ungolfed:
#!/usr/bin/env python3

import re
from sys import argv
from pathlib import Path

start = re.compile(r'(?i)')
end = re.compile(r'(?i)')

for path in argv[1:]:
    text = Path(path).read_text()
    print(text[start.search(text).end() : end.search(text).start()].strip())

(?i) makes the regular expressions case-insensitive and \s* consumes any whitespace between the tag name and the closing >. See this guide and this question for information about the features used in that code.
Removing Text That Looks Like Tags
If you're willing to treat anything that starts with a < or </, followed by a non-whitespace character (that is also not /, <, or >), followed by any number of characters besides >, followed by >, as a tag, then this prints index.html with tags removed:
python3 -c 'import re,pathlib; print(re.sub(r"</?[^\s/<>][^>]*>", "", pathlib.Path("index.html").read_text()))'

This is not parsing the HTML code as such, and the actual rules for what constitutes a tag are more subtle. Obviously this will not work in any application that requires HTML always be parsed correctly. For example, do not use this in a web browser or code sanitizer! (Really, don't use it in any application program or general-purpose utility.)
That's a somewhat more manageable one-liner (than the ones above for extracting text between  and  tags). But in case you want it as a well-formatted script:
#!/usr/bin/env python3

import re
from sys import argv
from pathlib import Path

pattern = re.compile(r'</?[^\s/<>][^>]*>')

for path in argv[1:]:
    text = Path(path).read_text()
    print(pattern.sub('', text))

If you put that in a file called remove-tagish-stuff then these commands mark it executable and run it on one file, then on a couple more files at once:
chmod +x remove-tagish-stuff
./remove-tagish-stuff index.html
./remove-tagish-stuff foo.html bar/baz.html

This doesn't modify the files; like the other code above, it simply outputs their contents with some parts removed.
When you run this on most HTML, including the sample HTML shown in your question, you'll see many blank lines. You'll probably want this, since most documents would be pretty unreadable with everything crunched together. However, if you want to turn repeated blank lines into just one and remove whitespace at the very beginning and end, then you could use this instead:
python3 -c 'import re,pathlib; s=re.sub(r"</?[^\s/<>][^>]*>","",pathlib.Path("index.html").read_text()); print(re.sub("\n{3,}","\n\n",s).strip())'

And here's that one, ungolfed into a script where you pass filenames as command-line arguments (as with the previous scripts):
#!/usr/bin/env python3

import re
from sys import argv
from pathlib import Path

tag = re.compile(r'</?[^\s/<>][^>]*>')
excess = re.compile('\n{3,}')

for path in argv[1:]:
    text = Path(path).read_text()
    detagged = tag.sub('', text)
    print(excess.sub('\n\n', detagged).strip())

If you are going to use any of these, I recommend using the simplest ones that do what you what. By the same token, it's possible to further "improve" and complicate the code to cover more cases -- < and > occurring in tag attributes, for example -- but I've avoided that here. If you need to do anything like accurately parsing the structure of an arbitrary HTML document, then you should not use regular expressions.
Why I am I showing this at all, given that commands and scripts like those shown above should only ever be used in situations that aren't at all serious? It's for the same basic reason that I might try using grep to find a word in a folder of web pages. It's brittle and far from foolproof (grep -FR tallest . wouldn't match She's the tallest!), but it can sometimes be handy so long as one remembers it's limited.


Will eclipse update from the ubuntu repositories?

You can go to Help->Check for Updates in Eclipse Juno. This will check for updates from Eclipse.org. But this will not upgrade.


SOUND: Default audio device does not work

PulseAudio driver and RealTek chips do not cooperate except for the known sound bursts during mode changes. I had to replace a 15 year old ASUS motherboard (that was working fine under 19.04 with a 5.1 system) with a current ASUS motherboard and, of course, the audio stopped working. The speakers are idle but other USB audio and the HDMI monitor speakers work fine.

BTW, all radio wave receivers transmit too (albeit on a different frequency) depending on electrical characteristics. One of the reasons why portable electronic devices had to be shutdown during takeoff/landing as a precautionary step. What these devices transmit is anybody's guess?


How to define shortcut-keys for executing certain applications?

Yes you can do this, go to System setting - Keybowrd -Shortcut -custom and click on "+" add and then put any desired name like for example gedit and command gedit and click apply  as shown in screenshort below-

after that there will a "disable" ,click on it and it will chang to "new accelrator" then just press the key you want like press Ctrl+G to assign thats it.


Steam Errors within selected Nvidia GPU on Ubuntu 16.04

Paste this:

[Desktop Entry]
Name=Steam with NVidia
Exec=LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/nvidia-361/:/usr/lib/nvidia-361/" steam
Terminal=false
Icon=steam
Type=Application
Categories=Game;

...into a file called steamnvidia.desktop and put it in the directory /usr/local/share/applications. You should see other .desktop files in there that will have a similar structure to this. Make sure this file is executable (chmod +x steamnvidia.desktop), and you will probably need root powers to get it into the folder above.

Now search in dash (may take a couple times searching for it to reindex) "Steam with NVidia", as the Name= line in the file shows.

If you have to change the execution line for whatever reason, change the Exec= line to what you need.

You might also need to give the full steam path, not sure if environmental variables will work in desktop files.


Ubuntu also uses the ttf format. Simply download any font and double click to install it.

Windows fonts are avaliable on Ubuntu, including Arial and Times New Roman.

Using the old command:
sudo apt-get install msttcorefonts

for installing Times New Roman font etc.

Source

To configure them - you want Unity Tweak Tool. Simply install it:
sudo apt-get install unity-tweak-tool

And configure them in there.


Install Ubuntu Tweak and change the Icon Theme to "Oxygen"

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak


How make VirtualBox share virtual machine list in a dual boot system (Windows 7 and Ubuntu)?

Open Virtualbox and a filemanager window. Point filemanager window to where your VMs are stored. Drag and drop desired .vbox files to Virtualbox list area.


lubuntu-desktop package interfered with the graphics for my Ubuntu desktop

I'm not quite sure how these things got sorted together but heres how I fixed it.

-Open ccsm
--reset default profile to default settings. under advanced section
---enable jpeg support in image handeling
---turn wallpaper plugin on
----choose image for wallpaper

thats all.


By default only devices mounted in "/media"  will be shown in the sidebar. And whan there is no fstab entry those devices will be mounted in "/media".

So change

/mnt/extra_storage

to

/media/extra_storage

and Nautilus will pick it up.

There is also a dconf setting that can be set to prevent mounting:


SOLVED:
Install Wine 5.9 to fix this issue.


Stuff in /usr/local/bin can only be edited by admin users. That's why users can add their own files to /home/user/bin, and add this to their path. (That's what I do.)

Do this: sudo nedit /usr/local/bin/myfile
Type in your password.
You now have admin privileges to edit this one file. That does not mean all your users will have permissions to run it or edit it. This file will have admin permissions by default, because 'sudo' makes you a temporary admin.
Edit and save the file.
Now you have to change the permissions of the file so normal users can run it. Do: sudo chmod g+rw /usr/local/bin/myfile. This changes group permissions. Make sure the users who have to run this are part of the group, whatever that may be.
If you are still having problems, give everyone permissions for this file only: sudo chmod a+rwx /usr/local/bin/myfile.
You will also have to add this dir to the user's path if it is not already.

If you get an error message that you can't use sudo, edit /etc/sudoers I think, and add your username there, one user per line.

Use whatever editor you like, even 'nano', 'vi', instead of 'nedit'.

When doing stuff with files in these "global" directories, remember to use sudo before each command. Example:

sudo cp /usr/bin/file $HOME
sudo nano /usr/bin/myfile
sudo chmod u+rwx /usr/bin/myfile


KSysGuard and htop show different cpu usage for my app

I found the answer here:

  rightclick the cpu column header and untick "divide by cpu amount"


Modifying file contents very slow on upgrade to Ubuntu 19.04

Since your issue is related to creating or deleting files, it's possible that the system's indexing/tracking activity is responsible for the delays you see.

From the release notes for Disco Dingo:

  Tracker is now included by default. This allows the desktop to keep
  track of recently used files and improves searching.

A graphical interface present in early versions of tracker has been removed in more recent versions, but going into Settings > Search provides an on/off switch (1 in the image below), as well as an interface to choose which folders are to be indexed (the little cog wheel icon next to 2 in the image below).

Turning Tracker on/off or adjusting its settings

Alternatively, one can use the terminal:

tracker --help points to tracker daemon and man tracker-daemon points to tracker daemon --kill as well as other options.

When I ran tracker daemon --kill, I got:

dkb@dkb-UM:~$ tracker daemon --kill
Found 3 PIDs…
  Killed process 1486 — “tracker-miner-apps”
  Killed process 1494 — “tracker-miner-fs”
  Killed process 1496 — “tracker-store”
dkb@dkb-UM:~$ pgrep -al tracker
dkb@dkb-UM:~$

It's quite possible that tracker hogs a lot of resources in the short term just after upgrading from a system in which tracker was not in use to 19.04 where tracker is on by default.

I came across Getting Started and First 5 minutes with Tracker which are quite simple introductory articles on tracker. If one reads those articles, it should be possible to benefit from tracker.


no display backlight after boot on my notebook

I had this problem on a laptop (different type) too. It is usually related the video driver.

As a woraround, I used xbacklight (see How to change LCD brightness from command line (or via script)?) to change the display brightness, and put a call to a script with that command to lighdm startup code (/etc/lightdm/lightdm.conf, either display-setup-script, session-setup-script, or both).


Can I have a NTFS data partition both accessible (r/w) by separate Windows and Ubuntu partitions?

The short answer is Yes.

What I did is that in Ubuntu, I modified the default location of the Documents, Pictures, Video folders etc. to point to folders on the Data parititon, by changing the ~/.config/user-dirs.dir file.

It goes without saying that the Data partition needs to be mounted at boot. So you will have to add it to your /etc/fstab file. There should be a line which should look something like this:

/dev/sda7   /mnt/Data   ntfs    uid=1000,gid=1000,dmask=027,fmask=137   0   0

Where /dev/sda7 is the partition location and /mnt/Data is where it is mounted.

In Windows, you can also personalise the location of the standard folders. This depends on your Windows version. Google it and you'll find how.


There's really not enough information in your question to help.

You mention that hibernate "starts" with an error message, but you don't mention what the error was.

Since you're running Ubuntu, you might want to try doing some initial troubleshooting and then report back here what you've discovered.

To get you started, try this site: https://wiki.ubuntu.com/DebuggingKernelHibernate

Additionally, since Ubuntu 16.04 uses systemd, you may want to focus your debugging efforts on the native systemd services for suspend and hibernate.

Best of luck!


You should not have a need for installing the drivers manually. Even on my Kubuntu 10.04 Lucid, the MS Lifecam VX-1000 webcam is automatically recognized.

After connecting the USB device the next messages show up in the kernel log:

usb 3-2: new full speed USB device using uhci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
gspca: main v2.7.0 registered
gspca: probing 045e:00f7
sonixj: Sonix chip id: 11
gspca: probe ok
gspca: probing 045e:00f7
gspca: probing 045e:00f7
usbcore: registered new interface driver sonixj
sonixj: registered
usbcore: registered new interface driver snd-usb-audio

Relevant descriptions for the modules:

gspca_main: GSPCA USB Camera Driver
gspca_sonixj: GSPCA/SONIX JPEG USB Camera Driver

I used the Open capture device (Ctrl + C) with Video for Linux 2 in the VLC player to verify that the camera works.


Is it possible to set the default lens in Unity?

This is currently not possible, however you can use the Super-F keyboard shortcut to open it directly.

In 12.04 the plan is to just let you drag the lens from the dash and put it in your panel, but this isn't implemented yet.


How do I update NVIDIA drivers on Ubuntu 14.04?

I used to run an older version of Ubuntu, some seven years ago, on a machine that had an Nvidia Geforce card installed. To install the proprietary graphics drivers, I had to direct my browser to the nvidia website and select the appropriate options.

Now, it seems to me that "GTX 640" may not actually be the card's name. There is no "GTX" 640; however, there is a GT 640 in the same family of GeForce cards. To be sure, run the command:

lspci | grep -i "vga"

in your terminal emulator of preference. (lspci prints all the pci devices installed in your machine. | takes that output and "pipes" it to grep, the search command, -i tells grep to ignore the case of the search string: "vga," which will single out your graphics card.) The output should look something like this:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

except with your gpu's information instead.

If my assumption is correct: that you meant "GeForce GT 640;" then all you need to do is navigate to the page I linked, select the Product Type (GeForce), Product Series (600), Product (GT 640), Operating System (Linux 32 or 64 bit, if you don't know which, see below), and Language (default is English). Press search, and on the next page, download the binary, NVIDIA-Linux-architecture.version.run. (<-that is a mock file name, the important part is that it ends in the extention .run)

(to find out whether you are running 32 or 64 bit architecture, run:

uname -i

you may also be interested in the output of the -a option.)

Open a terminal, change your working directory to the directory where the downloaded driver installer is kept. (If you are browsing with FireFox, the default location is ~/Downloads). execute it with:

sudo sh NVIDIA-Linux-architecture.version.run

Again, that is a mock file name. Just type the first few letters of NVIDIA and hit tab to save yourself some time.

Follow the CLI instructions, reboot, and pray.


How do i create a shortcut for a command that takes input?

Here follows a snippet of code that can be a start:

#!/bin/bash
# Save current textual clipboard
OLDSELECT="$(xsel --clipboard --output)"

# put selected text in keyboard
sleep 0.1s
SELECTION=$(xsel -b)

# Insert your code that does something with the selection here and save that back to SELECTION
###########
###########
#

# Paste into clipboard

echo $SELECTION | xsel -b -i

# paste snippet
xdotool key --delay 0 shift+Insert
sleep 0.4s   #Firefox needs long delay: 0.2 s not enough - would paste replaced selection
echo "$OLDSELECT" | xsel  --clipboard --input

First, the current textselection is saved to OLDSELECT using xsel (xclip would be an alternative tool). Then, the selected text is put to the clipboard to the variable SELECTION. This is where you then can so something with the content, i.e., insert spaces between each letter.

The end result is put back into the clipboard, then pasted using xdotool.

The resulting script can then be assigned a shortcut key.


A work-around I've found that allows me to use both my VST plugins and all my other plugins too is to use jackd audio interface and a plugin manager like carla. Unfortunately, this requires that I have jackd running and setup every time I want to record a video or stream which is a little bit of a hassle.


Can I consolidate lines in /etc/apt/sources.list

Debian has a nice page that confirms your idea:

Debian Wiki: Example sources.list

Thus the syntax of:

Archive type --> Repository URL --> Distribution --> Component --> Component --> Component

Represents your suggested line of:

deb http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/ xenial-security main restricted universe multiverse

and should be perfectly ok.

Explanatory notes:

Archive type: Normally deb or deb-src, in your case deb
Repository URL: The address of the repository
Distribution: The class of release, in your case 'xenial-security'
Component: restricted, main, universe, multiverse which can be presented, as you have suggested, one after the other separated by a space

References:

Debian Wiki: sources.list


Ubuntu 17.04: how to rename a USB network interface based on Path? (NOT based on MAC)

So I finally figured out myself what really is happening.

Alas, the problem I'm seeing that renaming USB-based network interfaces doesn't work is actually caused by the udev rule /lib/udev/rules.d/73-usb-net-by-mac.rules on Ubuntu/Debian (and thus also Raspbian). The culprit in it is here:

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
  ATTR{address}=="?[014589cd]:*", \
  TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
  TEST!="/etc/systemd/network/99-default.link", \
    IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

Notice how this specific rule checks for /etc/udev/rules.d/80-net-setup-link.rules to be present; if it's not, then NAME will be set to a MAC48-based name, and the later default install rule /lib/udev/rules.d/80-net-setup-link.rules will never get a chance to assign NAME. Now that's sad. Again.

In order to enable the ability to assign user-defined names to USB network interfaces, we need to have /etc/udev/rules.d/80-net-setup-link.rules, as this is the rule set 73-usb-net-by-mac.rules checks against before assigning NAME.

This means that simply linking from /etc/udev/rules.d/80-net-setup-link.rules to /lib/udev/rules.d/80-net-setup-link.rules is needed in order to avoid that user-assigned network interface names get ignored any longer.

sudo ln -s /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules

Reboot. Done.

Please note that a side-effect of the way 73-usb-net-by-mac.rules is set up, this causes all USB-based network interfaces to assume "old" naming eth0, et cetera, unless explicitly named in a .link file.

I don't know why the rules have been written as they are, as it would be fine to have MAC-based naming for all USB network adapters not explicitly named. On a second thought ... no, using MAC48-based names does not make any sense, unless you happen to label all your USB network dongles and constantly swap them around; but maybe the MAC-based names are used with docking stations, where it actually would make sense...?


Wired Connection shared with other computers connects then disconnects in the nm-applet

It is not fixed yet. I have had this issue just now and the workarround mentioned by the OP did the trick.

  The workaround for now is to set IPv6 options to Ignore and then sudo killall dnsmasq. Reconnect and it should work.


How can I get a copy of the Application Menu that I can access on file manager?

Customizing the Ubuntu-Studio desktop

By default Ubuntu Studio makes use of the Xfce desktop manager. This is the same as it is used in Xubuntu. Therefore all guides on how to customize our desktop on Xfce or Xubuntu will be applicable too.

Customizing the Xfce-panel

For a quick access to favorite applications we can add any number of Xfce panels on right click on the top panel, then select Panel > Panel Preferences..... Below example shows preferences for the bottom panel (red dashes):

All system wide installed applications will have a .desktop file in /usr/share/applications. These can be viewed using the file manager:

By simply dragging & dropping the icon of any application to the bottom panel we can create a launcher there for quick access.

Alternatively we can also drag & drop the icons on our desktop, or in a newly created folder on our desktop if that met our workflow. Mark .desktop files as "executable" when in a desktop folder:

Add another desktop environment

Of course you can add another desktop manager to your Ubuntu Studio installation in case any of them feels more comfortable to you. For an exemplatory guide on how to install Unity (my favourite default Ubuntu desktop manager) on top of Ubuntu Studio see:

Can I use other Desktop environment in Ubuntu-Studio and exchange whenever I want?, Xfce to Unity & Vise

Other launcher applications

In addition, you may just want to install an alternative application launcher to ease access to your applications. Depending on your personal preferences this can be just another laucher dock, or a more customizable application launcher.

Examples:

Below some examples what can be done. This list is by no means meant to be complete or give any recommendations - it is all personal preferences that matter.

Whisker

Whisker can be added as Applications Menu to the panel. It provides a search function for an  application (by name, description, or category) similar to the Xfce Application Finder, but it additionally gives access to recently used or favorite applications.

Cairo Dock

Cairo Dock is a highly customizable Mac-style dock with  a lot of eye-candy to add application launchers or file locations in a free to place and configure panel. On some systems Cairo Dock may have stability issues.


It turned out that I had an old version where the store did not have the terminal app, just as Wayne_Yux17 pointed out.

I connected to wi-fi and then went to:
system-settings -> System -> Updates Then wait for the update to download.
Then just press on the package to install it.

When the update is finished, the terminal will appear in the store.


Thinkpad T43 bluetooth problem - internal adapter not working

It looks like you have the [0a5c:21e8] Broadcom device.

Download Broadcom Windows driver.
Open it with Archive manager and extract BCM20702A1_001.002.014.1443.1459.hex file from it.
Download the tool for that

git clone git://github.com/jessesung/hex2hcd.git
cd hex2hcd
make

You will get hex2hcd folder in your home directory.
Place the firmware file to your home folder and run

~/hex2hcd/hex2hcd ~/BCM20702A1_001.002.014.1443.1459.hex ~/BCM20702A0-0a5c-21e8.hcd

Now just copy BCM20702A0-0a5c-21e8.hcd to /lib/firmware/brcm directory by

sudo cp ~/BCM20702A0-0a5c-21e8.hcd /lib/firmware/brcm

Turn of your computer off and on again. Not just reboot!

Your adapter will get firmware and bluetooth should work.


find & purchase restricted and multiverse for server?

Free here means free as in freedom, not free as in free beer. Non-free packages do not necessarily need to be purchased, but they put restriction on your freedom.

For example:

faac (multiverse): this is an open-source library that lets you listen to FAAC audio files. The problem with the FAAC format is protected by patents. From Wikipedia:

  Those intending to use this software module in hardware or software products are advised that this use may infringe existing patents.

nvidia-graphics-drivers-173 (restricted): this is one of the many nvidia drivers. The problem with them is that they are not open source, hence they can't be free software.

None of the packages in the restricted or multiverse repositories have a price.

By the way, Ubuntu offers software for purchase, but you can get it only with the Ubuntu Software Center, not with the official repositories.


Better sub-pixel rendering of fonts when monitor is in the portrait mode

The most common pixel order in displays is rgb (red on the left) (you can check your pixel order here ). When you rotate 90 clockwise, you get red on the top, which is called vrgb. For abbreviations, see this file.
This answer to a different questions gives the helpful command
gsettings set org.gnome.settings-daemon.plugins.xsettings rgba-order 'vrgb'

It seems to help, even though I run unity. For the terminal. For firefox and chrome, it does not work. So, in the end, I gave up, turned my monitor into landscape mode, and started to work.
For the setup with several monitors---thus, one monitor with rgb, another monitor with vrgb---see the answer https://askubuntu.com/a/708725/41363.
UPDATE two years later: I tried again, and it seems to affect both chrome and in terminal. However, it is still so-so.


VLC and all main Ubuntu sofwares are unauthenticated

You should upgrade your Ubuntu version, I guess this version is not supported now.

Open up Terminal by pressing Ctrl+Alt+T and execute the following command:

sudo apt-get update && sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc

Additionally you can also install it using Synaptic or by building the binary yourself.

For details: VLC for Ubuntu


Is it possible to downgrade ppa for a few days?

I is not possible. Old packages are removed when new are uploaded. This is how Launchpad works.


Is there a power saving application similar to Jupiter?
for Intel GPUs (for Intel HD Graphics as well as G45 and later):
 sudo apt-get install i965-va-driver libva-intel-vaapi-driver vainfo

Install MPlayer with VA-API support in Ubuntu

By default, the MPlayer version available in the official Ubuntu repositories doesn't support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.
 sudo add-apt-repository ppa:sander-vangrieken/vaapi
 sudo apt-get update
 sudo apt-get install mplayer-vaapi

Now you need to install smplayer or vlc
 sudo add-apt-repository ppa:rvm/smplayer
 sudo apt-get update
 sudo apt-get install smplayer

OR
 sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc

Configuration

SMPLAYER
Its in Option tab > Preferences, on the Video tab > General Video > Output driver set the video output driver to "vaapi":

VLC
Its in Tools > Preferences > Input & Codecs > Enable Use GPU Accelerated decoding


Solution found here https://pypi.python.org/pypi/SuperWires
where reader learns about new version of "livewires" which is called "superwires" and is compatible with all versions of Python incl. Python3.


How do I show the outside temperature in the indicator bar?

Indicator-Weather dev team started new series (2.0). It is available from their Stable PPA

Daily build PPA is available too, Check team page.


You could burn a live CD with Ubuntu or Mint or prepare yourself an Ubuntu USB stick to load it from there. Then you repartition your hard disk drive using gparted from within the live CD and re-install or remove it.

To prepare a live CD, just download the Ubuntu version you want to install from www.ubuntu.com and then burn it by double-clicking the ISO. If you do not have a cd burner, prepare a USB stick.

To do this, you want to use the Ubuntu "Startup Disk Creator", it can be found in synaptic but should be pre-installed on Ubuntu.

Then simply boot from your device. When restarting your machine, you might need to press the key needed to get you into the selection menu where you can choose what device you want to boot from. On my Dell XPS it's F12, but it should show on startup what key you need to press to load from the boot media.


Yes, they can run side-by-side without conflict.


A PCI device is basically any piece of computer hardware connected to your motherboard. Peripheral Component Interconnect was a standard introduced by Intel in order to easily integrate peripheral devices such as audio cards or video cards into your motherboard. If you look inside your computer a PCI connector is usually identified by a long strip of raised copper connectors- namely the PCI Bus.
The command lspci lists all the pci hardware connected to your computer- from audio cards to video cards, network cards and so on and so forth.
Answer based on: https://www.techwalla.com/articles/what-is-a-pci-device
Please look into the above link to further expand your knowledge about the subject.


Upgrade to the latest PHP version in Ubuntu

The default PHP version for Ubuntu 16.04 is 7.0. If you want to install a new version of PHP on 16.04 you need to use an additional PPA (as it is shown below) or you must compile it on your own.
My server with Ubuntu 16.04 currently uses PHP 7.2 and there are several operational instances of WordPress and MediaWiki. The web server is Apache 2.4. The commands that I've used to migrate from PHP 7.0 to 7.2 are:

# Add the repository 'ppa:ondrej/php'
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

# Install PHP 7.2
sudo apt install -y php7.2 php7.2-cli libapache2-mod-php7.2
sudo apt install -y php-imagick php-gettext php-memcache php-apcu php-pear php-xml php-xmlrpc
sudo apt install -y php-memcached php-mysql php-intl php-mbstring php-curl php-gd php-imagick
sudo apt install -y php7.2-common php7.2-mysql php7.2-cgi
sudo apt install -y php7.2-curl php7.2-zip php7.2-mbstring php7.2-xmlrpc php7.2-gd php7.2-xml php7.2-xsl
sudo apt install -y php7.2-dev php7.2-bz2 php7.2-intl php7.2-json php7.2-opcache php7.2-readline
sudo apt install -y php7.2-imap php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-bcmath #php7.2-mcrypt

# Update the Apache's PHP version
sudo a2dismod php7.0
sudo a2enmod php7.2
sudo systemctl restart apache2.service

# Update the CLI PHP version
sudo update-alternatives --set php /usr/bin/php7.2

In the repository ppa:ondrej/php PHP 7.3 is also available, I think to migrate soon to this latest version.
If there is a problem with the public key of the repository, you can use this solution.
Here are the additional tweaks of my /etc/php/7.2/apache2/php.ini that are made according to few WordPress and MediaWiki manuals:
zlib.output_compression = On
max_execution_time = 600
max_input_vars = 3000
memory_limit = 512M
post_max_size = 256M
upload_max_filesize = 128M
allow_url_fopen = Off
pcre.backtrack_limit=1000000
session.cookie_secure = True
session.gc_maxlifetime = 14400
session.cache_expire = 540
mbstring.encoding_translation = On

Update 04.2019
I've used the above set of commands to install PHP 7.3 on Ubuntu 16.04 and everything went completely fine. Just replace 7.2 with 7.3 within these commands - the entire process took about 7 minutes.

Update 02.2020
I've migrated to PHP 7.4 and everything went well, during that process I've used the following steps (note, at this date NextCloud doesn't support php7.4 yet):
# Absolutely mandatory step
sudo apt update

# Generate list of php7.4 packages on tbe base of the installed 7.3 ones
# Remove 'echo' to install the packages
for pkg in $(sudo apt-cache policy *php7.3* | grep -P '^(lib.*|php)7.3.*:$' | sed -e 's/:$//' -e 's/7.3/7.4/');
do
    echo sudo apt install "$pkg" -y;
done 2>/tmp/php7.4.install.error.log

# Inspect the error log for some fatal errors,
# Some old dependencies could missing - it's normal
cat /tmp/php7.4.install.error.log

# Mandatory step; If there is a trouble, tray: sudo apt install -f
sudo apt update && sudo apt upgrade

# Create a backup copy of the new php.ini
sudo cp /etc/php/7.4/apache2/php.ini{,.default}

# Compare the old and the new php.ini files
# Apply the necessary changes to 7.4/apache2/php.ini
# Compare the files again in order to inspect for typos
colordiff --side-by-side --left-column --width=240 --show-c-function /etc/php/7.{3,4}/apache2/php.ini | less -R

# Switch the version within Apache
sudo a2dismod php7.3 && sudo a2enmod php7.4
sudo systemctl restart apache2

# Switch the CLI version
sudo update-alternatives --set php /usr/bin/php7.4

Update 06.2020
Now I'm using Ubuntu 20.04 Server, it comes by default with php7.4, but I need php7.3. The method above, by using ppa:ondrej/php, solves my issue.


how to put files in folder with their prefix name?

Use find -exec:

find folder -name "*.txt" \
    -exec sh -c 'f="$(basename "$1")"; mkdir -p "${f%%_*}"; mv "$1" "${f%%_*}"/"${f#*_}"' find-sh {} \;

If you have multiple _ in the filename. This will cut after the first _.
Swap f%% + f# to f% + f## if you want to cut after the last _ instead.


grub "unknown filesystem" when trying to install windows

OK I was finally able to fix it with the following:

boot from ubuntu 18.04 liveCD (on USB key)  then:
sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda

After reboot the grub rescue prompt was gone. I still ended up in a weird reboot loop during windows install, I pulled the spinner drive, and then installed windows on the SSD, then once windows booted I plugged the spinner back it, removed partitions and reformatted.

Thanks for the help and I hope this is useful to others in a similar situation!


Codeblocks automatically closes on Ubuntu 15.10 x64

I did have same problem few weeks ago, and solution was reinstalling codeblocks.

sudo apt-get autoremove --purge codeblocks

sudo apt-get install codeblocks


Sound Recorder does not show "record as" option

Have you read this article? https://help.ubuntu.com/community/AudioCapture

... try recording by running the following command in a terminal window:
$ arecord test.wav
and speaking into your microphone. To stop this command press Ctrl+C.

It's not the way to make Sound Recorder work, but you can simply do records without installing complicated applications.


Once you have CTags installed

sudo apt-get install exuberant-ctags

Activate the plugin by going to Settings -> Configure Kate...

Then when the window pops up, click Application -> Plugins and check "CTags"

Next in Kate's Index Targets tab pane, click Add and enter the /path/to/project/root, then click Update Index

Now you will be able to use the CTags.

Notice the Database tab pane is where you can set the CTags command. See the man pages for options. Generally, I like to exclude my dependency package folders by adding:

--exclude=vendor --exclude=node_modules

No need to put anything in the "CTags Database File" field because Kate will automatically generate this file when you click Update Index

Note that you can, but do not need to create a .kateproject file to use the CTags.


Ubuntu Settings won't open with Gnome 3 desktop installed

Same happened to me. In the meantime a bugfix is released, you can partially sort it out by changing the control-center called from the script /usr/bin/gnome-control-center, and use the one provided with Ubuntu which doesn't crash:

$ cat /usr/bin/gnome-control-center
#!/bin/sh

# Support legacy applications that still refer to gnome-control-center in Unity
if [ "$XDG_CURRENT_DESKTOP" = "Unity" ] && [ -x /usr/bin/unity-control-center ]; then
  exec /usr/bin/unity-control-center $@
else
  #exec /usr/bin/gnome-control-center.real $@
  exec /usr/bin/unity-control-center $@
fi

--Edit:

Seems there is another workaround which allows to open the real gnome-control-center, thanks to Marius Gedminas who posted it in bugs.launchpad.net. After installing apt-show-versions:

sudo apt-get install $(apt-show-versions|grep 'newer than version in archive'|cut -d ':' -f 1|sed -e 's/$/\/trusty/')

cheers,

Sergi


The simple explanation is that there is no error reported:  3 warnings, and 3 information lines.

cryptsetup, geberating two warnings:  If you are not using encrypted volumes, containers or swap, this can be removed from your system: Problems with cryptsetup during update

"W: Possible missing firmware /lib/firmware/ast_dp501_fw.bin" is annoying but can be safely ignored: https://serverfault.com/questions/755194/ubuntu-15-10-server-w-possible-missing-firmware-lib-firmware-ast-dp501-fw-bin

The "I:..." lines are informational -

"I: The initramfs will attempt to resume from /dev/nvme0n1p4" - This indicates that if you resume (from hibernate) this is where the resume information comes from
"I: (UUID=868cf117-ffc8-40ae-a29e-128a42a8c1a1)" - the UUID of the resume information (hibernation file)
"I: Set the RESUME variable to override this." - You can change where the resume process finds it's informtion using the RESUME kernel parameter


Adjust color temperature with Intel HD graphics

Edited answer:
I believe the software you are looking for is Redshift . See this Q&A for how to install it: Is there a software utility to adjust screen gamma/brightness/contrast?

Original answer:
Ubuntu automatically detects and applies the appropriate drivers for chipsets with Intel HD graphics.*
No human intervention required.
The "blue color" you speak of is probably a physical defect with the display.
*Brand new chipsets like KabyLake might have buggy drivers, but they're there nonetheless.


Sending all outgoing TCP packets through Tor

See these instructions on using Tor as a transparent proxy.


Receiving drag events in a WebView in a QML application

I've been wrestling with the same problem, as webview seems very limited wrt drag events. In your case, since you say you need no scrolling nor zooming, then wouldn't a simple MouseArea inside the webview work? This is assuming your simply using webview for rendering and not general browsing. As an aside, I ended up using onChildrenRectChanged to capture any scrolling within the webview, kind of like a substitute for contentX, Y, Width, and Height, but this may or may not be relevant for you.


Your script should look like:

#!/bin/bash

passwd

Save it in a file, let say password.sh or simple password, then make it executable using next commands in terminal:

cd /path/to/password.sh  #or cd /path/to/password
chmod +x password.sh     #or chmod +x password

To run it from terminal, just use the following command:

./password.sh            #or ./password

or

/path/to/password.sh     #or /path/to/password

To run it only using:

password.sh              #or password

you must to add the path of the script to the PATH. See How to add a directory to the PATH? in this sense.


I gave up so I used the easy solution.

I create an alx script in /etc/init.d and when the system starts it loads the new module driver.


"Stable Release Publishing" part of developer.ubuntu.com?

As an answer, may I direct you to this link?

Developer for Ubuntu information

Note the number 3 - Publish link.

I am not sure what you mean by

  even if a new version of Ubuntu isn't out yet?

It is my understanding that

a) Each version of Ubuntu has its own repositories of applications.

b) Canonical will not place software in the repositories (Ubuntu software Centre) if that application does not work well with the version of Ubuntu being serviced by a particular repository.

In other words, if a program/application does not work well with the latest version or it  does not meet the design standards that are set for Ubuntu applications, then the application will not be put in the Software Centre for the latest version.


ubuntu live-server as rescue system - how do i log in?

on the installer screen you can go to Help -> Help on SSH access and the password will be displayed.
the cloud-init service on the live-server sets a random password for the installer user at boot. it can be found in /var/log/syslog:
ubuntu-server cloud-init [...] Set the following 'random' passwords
ubuntu-server cloud-init [...] installer:S0m3R4ndomPassw0rd

as cloud-init is running you can always provide a users: section in your datasource and configure a user.

in earlier versions is seems to have been possible to pass ubuntu-user:password as a kernel option (i can't find the reference to that now...). i tried that with installe-user:password - with the effect that the installer failed to setup the installer user
originally found on the discussion here: https://discourse.ubuntu.com/t/interactive-live-server-installation-on-ibm-z-vm-s390x/16604


My wireless/WiFi connection does not work all distro after new installation of ssd

Please open a terminal and do:

sudo -i
echo "blacklist b43" >>  /etc/modprobe.d/blacklist.conf
echo "blacklist ssb" >>  /etc/modprobe.d/blacklist.conf
exit

Reboot and tell us if it is working.


You can install only official gnome extensions available in Ubuntu repo using sudo apt-get install gnome-shell-extensions.

To install other extensions you need Firefox browser. Visit https://extensions.gnome.org/ to install all the available extention.

If you see webpage like this

It means that you need to install  GNOME 3 Integration plugin in your browser. Install it from here.

Once plugin added to your browser, you can install all the available extensions from https://extensions.gnome.org/.


How can I create Unity dash integration for my Python script?

What you want to do is writing a Unity Scope, and probably also a Unity Lens. What Unity Lenses and Scopes are is explained (with helpful screenshots) in an article on howtogeek.com.

The Ubuntu Developer Portal provides an overview and also a helpful tutorial on writing Scopes in C. You said your application is written in Python and whilst this is a supported language, it is recommended to write scopes in C.

If you still want to write your Scope in Python, the web provides you with a tutorial that makes use of GObject Introspection.


How does gnome know which applications support GIO and GVFS?

The Exec= line from the application defines what it can handle.

Example: /usr/share/applications/gedit.desktop uses %U which means it can handle URLs so gvfs will be used

See http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html for details


As the OP hasn't logged in for some time, I am not awaiting the results of the output of the commands requested in the comment, but just posting the solution for my HP laptop.

Start alsamixer in the terminal.
Make sure you've selected the internal sound card (not the HDMI or external ones) by pressing F6.
Try to locate a setting for LEDs, presented between the sliders. In my case it lists a Mute-LED Mode. Use the → to move to the right in case you have more sliders than fit on the screen.
Move to the "slider" and adjust it using the ↑ and ↓ keys in order to find a Follow Master option (or alike). Also try to toggle the LED state manually by flipping the setting On/Off.
Now move to the Master slider and press M to mute/unmute. The LED should toggle with it.
Try to use the hotkeys to mute/unmute. The LED should toggle with it again.


How to set the speed of a single mouse click

I sure would like to change mine to ~2000ms (2 seconds). I am on LXDE.

:)

I figured it out.  Just follow this procedure for Lubuntu (LXDE) 14.04 - https://sites.google.com/site/easylinuxtipsproject/lubuntu:

-From Terminal in your HOME directory(CTRL+ALT+T)

Create a hidden configuration file:
touch ~/.gtkrc-2.0
Open the newly created text file with Leafpad.
Copy/paste the following line into the text file:
gtk-double-click-time=2000
Save the file and close it.
Log out


Laptop falling asleep shortly after waking up

Go to Settings
Click on Power
Now Select blank screen time as per your requirement


How to get group write permission with Samba 4?

To fix the problem you may add the force user username to the list of valid users for the share.

In your case:

[Myshare]
...
valid users = @bureau
...

should be:

[Myshare]
...
valid users = nobody @bureau
...


You'll need to use the "manager web-app" to deploy the war file.

First: create a manager user for tomcat6. Edit /var/lib/tomcat6/conf/tomcat-users.xml and add something like the following (remember to use a unique password):

role rolename="admin"

role rolename="manager"

user username="admin" password="password" roles="admin,manager"

(Note: look at the examples in /var/lib/tomcat6/conf/tomcat-users.xml. These lines are tags but I can't post tags on AskUbuntu :( Hopefully, it's not too confusing.)
Next: restart tomcat:

$sudo /etc/init.d/tomcat6 restart
Finally, open http://localhost:8080/manager/html and log-in with the username and password that you just set. On the bottom of the page, there's a dialog box that lets you select and deploy a war file.

HTH


You could use something like that:

file -F' ' --mime-type * | awk '$2 ~ /text\/plain/{print $1}' | xargs chmod 644

This changes all permissions to 644 if a file has the mime-type text/plain. Just replace the part in the awk body to whatever mime-type you wish. See /etc/mime.types for all available ones.

Explanation:

The -F' ' flag causes file to use a space as separator between the filename and the result. It's easier for the later awk statement
The awk part prints only the name of the file if the second field ($2) of the output contains text/plain.
xargs calls chmod 644 on every item


Screen dims on opening certain applications on Macbook

On Mac

The mactel PPA modules needed on ubuntu on mac are mbp-nvidia-bl-dkms (for the LCD dimming support), and pommed (for the keyboard backlight control keys).

 sudo apt-get install mbp-nvidia-bl-dkms pommed

mbp-nvidia-bl-dkms must be in /etc/modules file to load. Open the file in an editor with:

gksudo gedit /etc/modules

And add to the end this line:

mbp_nvidia_bl shift=2

The shift option reduces the dimming range to make it more comfortable. You can tune the value as you want

for more go through this link from here I found this help
I think this will help you
I personally tried this helped me

If this not help see this link


The bind9 package is in main, which means that Canonical are committed to providing security updates for it until the end-of-life of any particular release. Note that security updates are generally backported, so you won't necessarily be able to tell what updates are included from just the version number. Instead, you should check the changelog or search for the CVE that concerns you using Launchpad's CVE search feature.

Users who care about keeping their versions up-to-date should stay updated via the official security updates.

Building the package from source will work, but you will need to watch upstream security notices and keep up-to-date yourself. One big reason to use a distribution package is to save you this trouble, since the distribution vendor does this for you.


How can I restore a corrupted Shotwell db?

Shotwell's database can be corrupted due to kernel panics and loss of power.

With Shotwell 0.10 or above, the database is automatically backed up every time the program exits; in the worst case, you'd end up losing any work since you started the program.

Unfortunately, older versions of Shotwell don't have this feature and it's unlikely that you can recover from a corrupted database.


Rename files in different directories with the same name, so each has a unique (numbered) name

This tiny script renames the files without moving them
n=0; for files in dir1/*.MOD dir2/*.MOD dir3/*.MOD; do printf -v new "${files/MOV*./%02d.}" "$((++n))"; echo mv -v "$files" "$new"; done

or more readably:
#!/bin/bash
n=0
for files in dir1/*.MOD dir2/*.MOD dir3/*.MOD; do
   printf -v new "${files/MOV*./%02d.}" "$((++n))"
   echo mv -v -- "$files" "$new"
done

Replace dir1 etc with the actual paths to your directories with the files
Remove echo (it's just to test) after checking that this gives you what you want, to actually rename the files.
This numbers the files 01.MOD, 02.MOD, etc. If you have more than 99 files, replace %02d with %03d to get 001.MOD etc

Explanation:
n=0 This just sets n as 0 which is where I want bash to start counting from.
for files in dir1/*.MOD dir2/*.MOD dir3/*.MOD

A for loop can execute commands iteratively on each file in turn. The syntax is for [variable] in [these things I want to do something to] ; do [command(s)] $[variable]; done I have called the variable files and found your files using a glob: *.MOD is expanded by the shell to any file whose name ends in .MOD (* matches any characters)
printf -v new

printf can format the new numbers with a fixed width for easier sorting. new is another variable - this is the new name for the files.
"${files/MOV*./%02d.}" "$((++n))"

Referencing the variable files from earlier and replacing MOV* (remember * is any character) with the result of the incrementing number $((++n)) (this is n from the first line of the script, go up by one each time the loop is executed on a file) formatted using the code %02d which to printf means a decimal number of a fixed width of two digits 01, 02 etc. The search and replace pattern includes the . to stop * matching the whole filename and thus removing the extension.
echo mv -v -- "$files" "$new"

I add the echo just for testing - this shows what will be done instead of actually doing it. Remove the echo when happy with the result to actually execute the command.
mv renames or moves files; its syntax is mv oldname newname. I added the -v flag which tells mv to be "verbose" and report each action. I added -- just to be safe - this tells mv not to accept any further options, which stops any filenames starting with - from being interpreted as options to the command - not needed in your case, but good practice.
Each file specified by the files variable is mved to a unique name created in the new variable. We use $ to reference variables and these should be in "double quotes" to prevent the shell from doing any other expansions on the filenames - this stops special characters or spaces in filenames from causing problems.


Is this possible?

No

  if yes how and if not why ?

Because it is design decision

If you want classic appearance try gnome-session-fallback
Instructions here

How to revert to GNOME Classic Desktop?


TL;DR:
You can safely reduce the size of a WSL instance's rootfs by deleting /mnt/<DRIVE_LETTER>/* from the WSL rootfs after unmounting the underlying disk from within WSL instance. In my case, my WSL instance had a lot of cached data from Windows' M: drive stored in /mnt/m. I cleaned it safely from within the WSL instance by:
sudo umount /mnt/m
rm -rf /mnt/m/*

If you are paranoid, first use mount from within your WSL instance to verify the drive you want to clean. Then after running the unmount command (sudo unmount /mnt/<DRIVE_LETTER>), run mount again and verify the drive no longer appears in the list. Then you can safely proceed to use rm -rf on the files from within the WSL instance to wipe the cached data without affecting the data on the underlying Windows disk.
---- My Findings ----
Looks like WSL 1 uses that rootfs folder as a data cache. I noticed after unmounting my M: drive from within WSL with sudo umount /mnt/m that some of the folders' permissions changed while others didn't (notice the color difference in the below image which was taken after unmounting /mnt/m). The folders whose permissions didn't change are the folders that were taking up space on my Windows' C: drive in that rootfs folder.

My Dropbox folder contributed to 11 GB on my C: drive but takes up much more on my M: drive. Since I knew it was already backed-up on Dropbox's servers, I wiped it from within WSL 1 (after having unmounted /mnt/m from within WSL) with the following: rm -rf /mnt/m/Dropbox then checked and confirmed from Windows with WinDirStat that my C: drive gained 11 GB more free space while my M: drive's Dropbox folder was unaffected. I closed the WSL window and reopened it to trigger auto-mount of my drives. Then checked /mnt/m/Dropbox and it was there with everything again. I unmounted /mnt/m and proceeded to delete everything from within WSL with: rm -rf /mnt/m/*. I double checked my M drive again - all files still there. Then I double checked how WSL behaved by exiting and re-launching it. ls -la /mnt/m showed everything still there. Now my rootfs on C drive is very small... Nice!


Instead of ntpdate (which is deprecated), use ntpd:

sudo service ntp stop
sudo ntpd -gq
sudo service ntp start

The -gq tells the ntp daemon to correct the time regardless of the offset (g) and exit immediately (q) after setting the time.


How do I fix the "Cannot source a directory: $HOME/.vimrc" error which pops up when I open GVim?

.vimrc is normally a configuration file, not a directory.

The directory name for additional vim/gvim files is called .vim/


I can't put my java jdk7 file into my usr/lib because it says Permission denied when I click show more

Use repositories to install jdk7 - sudo apt-get install openjdk-7-jdk


Can't access an ext4 partition in a external HD

You could try running the filesystem check from a terminal:

sudo e2fsck -y -v /dev/sdb1

However, if the filesystem is damaged beyond repair, the last option to recover files is testdisk.


sudo apt-get remove --purge package_name


Bring gvim forward when I open a new tab from the command line

Well, a bit dirty, it can be done using xdotool.

Add this to your script :

    xdotool windowfocus `xdotool search --name "/* - GVIM"` && xdotool windowraise `xdotool search --name "/* - GVIM"`

It search a window named "[Something] - GVIM" and raising it. Maybe, you can select the window with more specific title using filename and regex for example.

    xdotool windowfocus `xdotool search --name "^$filename\s\+\s\(~\)\s-\sGVIM"` && xdotool windowraise `xdotool search --name "^$filename\s\+\s\(~\)\s-\sGVIM"`

But, xdotool is must be downloaded first from apt-get. Type sudo apt-get install xdotool on terminal.


Any apps for hosting a terminal app as a website?

The problem is slightly more complicated than simply "redirecting stdin/stdout" to a port.

What you need is basically a shell session to your server with a client which runs inside a browser. This answer links to two such shells, AjaxTerm and WebShell

  Ajaxterm is a web based terminal. It was totally inspired and works
  almost exactly like http://anyterm.org/ except it's much easier to
  install

What worries me a bit is that both programs were last updated in 2008, which in web-years like 50 years ago. Please report back if you manage to run any of them.

A newer and seemingly more supported option is Shell In A Box:

  Shell In A Box implements a web server that can export arbitrary
  command line tools to a web based terminal emulator. This emulator is
  accessible to any JavaScript and CSS enabled web browser and does not
  require any additional browser plugins. Most typically, login shells
  would be exported this way:  shellinaboxd -s /:LOGIN

  This command starts a web server at http:// localhost :4200 that allows
  users to login with their username and password and to get access to
  their login shell.

  All client-server communications are encrypted, if SSL/TLS
  certificates have been installed.

It is even available in Ubuntu repositories and can be installed with

sudo apt-get install shellinabox


Use HDD Regenerator to solve your problem. See this video to check how to do it.


I just fixed it following these instructions:

https://sukritkalra94.wordpress.com/2014/05/24/audacity-fails-with-the-pa_getstreamhostapitype-error/

Thanks !


Cgroups error: cgroup change of group failed

Specifying users and groups works fine when you create a subsystem.

sudo cgcreate -t $USER:$USER -a $USER:$USER  -g cpu:testgroupcpu

"cgroup change of group failed" error with cgexec from libcgroup


I found out thanks to Zanna for mentioning the duplication and the solution by Anto. There are some problems with the ppa of google chrome in /etc/apt/sources.list.d which had to be removed.


Faced this problem today and this is what worked for me.

Make sure your device module is psmouse by running,

lsmod | grep psmouse

if its not, find the relavant module name.

$ cd /lib/systemd/system-sleep/
$ sudo vi fixtouchpad

then paste and save the following

#!/bin/bash
[ "$1" = "post" ] && exec modprobe psmouse
[ "$1" = "pre" ] && exec rmmod psmouse
exit 0

This will reload your psmouse module after resuming. Replace 'psmouse' with your module name.

Be sure to make the script executable

sudo chmod +x fixtouchpad


How do I start an application maximized without decorations in gnome-shell?

This was achieved using devilspie to start darktable maximised, followed by my linked answer to remove the window decoration.

Note - I tried this with the devilspie "undecorate" command but that just left an annoying blank space where the decoration would be

install devilspie

sudo apt-get install devilspie
mkdir ~/.devilspie
nano ~/.devilspie/darktable.ds

copy and paste the following:

  (is (application_name) "darktable")
    (begin
       (maximize)
       (spawn_sync "/home/dad/decoration.py")
       (spawn_sync "/home/dad/decoration.py")
    )

N.B. substitute /home/dad/decoration.py for the full-pathname to the undecorate script.  Save.

Finally, make sure devilspie start in your startup-applications.

Linked Question:

Remove titlebar from maximized terminal window


Is the scanner Canon Pixma MG2450 working in Ubuntu?

The drivers already mentioned in the question are just fine, only they cannot be used with the Simple San or Xsane tools, but they install a tool  called ScanGear that can be launched with the command scangearmp.

Outputs: png, pdf, pnm.

To add a .desktop launcher for that:

sudo gedit /usr/share/applications/scan.desktop

and paste this:

[Desktop Entry]
Categories=Graphics;Scanning;
Exec=scangearmp
Icon=scanner
Name=Scan
Type=Application

The same can be used within Gimp: File/Create/ScanGear MP, but ScanGear does not need Gimp in order to work.

Sources are linked in my other answer.


Error while trying to install Intel Software (in order to update graphics)

Problem #1: You have an incorrect repository defined. Change

deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu xenial main

to

deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu trusty main

or better yet, use their direct location at:

deb https://download.01.org/gfx/ubuntu/16.04/main xenial main

Problem #2: You don't have a GPG key installed. In terminal, enter

wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-4 -O - | \
sudo apt-key add - (including the ending hyphen)

For more info, head to their web site at https://01.org/linuxgraphics/downloads/intel-graphics-update-tool-linux-os-v2.0.2.

Cheers, Al


Executing a script as another user still cause some permission trouble

From terminal, using sudo visudo command, edit sudoers file, and add the following line exactly as it is:

www-data ALL=(ALL) NOPASSWD: /home/user2/bin/test.sh

See https://help.ubuntu.com/community/RootSudo#Allowing_other_users_to_run_sudo in this sense.

Then, in php use only sudo /home/user2/bin/test.sh command. For example:

<?php shell_exec('sudo /home/user2/bin/test.sh'); ?>


Weird Display issue: strange behavior and can't roll back to prior kernels

The culprit here was a wireless bluetooth mouse.  I plugged in a usb mouse and the issue went away.  I'm going to order a new mouse.  This one is a few years old.


Kubuntu cannot copy file to external drive - errno: 5

I've had the same issue, copying some large files From the NTFS HDD back to my system (ext4) HDD (home dir, ~/).
I put the files on the NTFS drive, why can't I copy them back?
It's Not All files.

I tried konqueror, krusader, terminal (knosole), console both as owner and root. Same error.

I tried copying the file to something simple eg temp.mp4. Same Error.
I tried renaming the file to a new name on the NTFS drive, as some 'Linux' utf8 characters or odd space chars mess with MS NTFS, especially if the file came from the internet in 'foreign language', but got error too.

******* So, What I Did that Worked. *******

I 'archived' (tar.gz) the file in place on the NTFS HDD then MOVED the archive to my ~/ drive and extracted it there and all was Good.

There must be a bit error in the file some where that cp does not like, but is not enough to keep the file from being view in an application.

ps. I was able to view, use the file from the NTFS external HDD, but just couldn't copy it.. I was afraid to 'Move' the file as I didn't want to 'lose' it permanently if something went wrong. Good chance it would, eh.

in short: Compress, Archive, Tar, Zip etc. Move. Then decompress, expand, extract etc.

Hope this helps. I know it's NOT a solution.. just a work around.

Landis.


how do you add files to existing programs

For an overview of the linux file system see: http://lotphelp.com/lotp/tour-linux-filesystem

Normally you would "add" to your system by using the package manager, apt, using the graphical tool, software center.

See https://help.ubuntu.com/community/InstallingSoftware

The ubuntu repositories are quite extensive and should have most everything you may need.

If there is something you need outside the repositories, you can manually add software via a number of techniques, most common is to compile it  manually. This should be avoided if possible.

For details on compiling see

https://help.ubuntu.com/community/CompilingEasyHowTo


Bind Alt+Tab to a Logitech mouse button on Kubuntu

evrouter can help to do that. It will even allow to release G9 before selecting the task from the list.

http://www.bedroomlan.org/projects/evrouter

I've built it from source and installed with checkinstall, but there is something that looks like a repository there.

Hooks

It can be configured in the ~/.evrouterrc:

"Logitech Gaming Mouse G300" "/dev/input/event.*" any key/272 "SHELL//home/velkan/click.sh"

"Logitech Gaming Mouse G300" "/dev/input/event.*" any key/275 "SHELL//home/velkan/atab.sh"

Running sudo evrouter -d /dev/input/event* and clicking around will help to compose these lines.

"Logitech Gaming Mouse G300" is the name of my mouse.

"/dev/input/event.*" means that input will be intercepted regardless of the name of device file to which the mouse is bound.

any - means that the event will be accepted with any Alt/Ctrl/Shift modifier.

key/272 - left mouse button.

key/275 - back mouse button (on G4 for me).

"SHELL//home/velkan/click.sh" - run /home/velkan/click.sh when that event occurs.

Alt-Tab scripts

So, the /home/velkan/atab.sh script (that is bound to G4 in this case):

#!/bin/bash

mktemp /tmp/evr-alt-tab-XXXX

/usr/bin/xte 'usleep 100000' 'keydown Alt_L' 'usleep 50000' 'key Tab'

It creates a temporary file that will inform the click.sh (bound to the left button) that it needs to release Alt.

click.sh script:

#!/bin/bash

if [ -e /tmp/evr-alt-tab-???? ]; then
    /usr/bin/xte 'usleep 100000' 'keyup Alt_L'
    rm /tmp/evr-alt-tab-????
fi

Activating evrouter on startup

Haven't tried that on KDE.

Launch script /usr/local/sbin/evrouter_launch.sh:

#!/bin/sh
/usr/local/bin/evrouter /dev/input/event* 0<&- > /dev/null

(or it may be /usr/bin/evrouter instead of /usr/local/bin/evrouter)

Config /etc/lightdm/lightdm.conf to start evrouter with the desktop manager:

[SeatDefaults]
autologin-user=
session-setup-script=/usr/local/sbin/evrouter_launch.sh


Do we need internet access to all the servers while bootstraping with conjure-up?

As usual, its difficult to get answers in this forum related to maas/juju/autopilot.

The answer to my question is: Yes.
Its done by MAAS server who could act like a router:
Sample firewall modifications on MAAS server is here for the same:

sudo iptables -A FORWARD -o eno1 -i eno2 -s 10.0.0.1/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o eno2 -j MASQUERADE

here 10.xxx is the internal network.


How to troubleshoot a slow wireless connection (step by step)?

Check the wireless connection
iwconfig is the tool for displaying and setting parameters for your wireless card. Below is an example showing a connection to "Your Wireless Network".

wlan0     IEEE 802.11bg  ESSID:"Your Wireless Network"
  Mode:Managed  Frequency:2.457 GHz  Access Point: XX:XX:XX:XX:XX:XX
  Bit Rate=48 Mb/s   Tx-Power=20 dBm
  Retry  long limit:7   RTS thr:off   Fragment thr:off
  Encryption key:off
  Power Management:off
  Link Quality=49/70  Signal level=-61 dBm
  Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
  Tx excessive retries:0  Invalid misc:161   Missed beacon:0

Some important information shown:

Bit Rate which is how fast data is transmitted to your wireless router
Link Quality which is a ratio of how strong your connection with the router is. A low number (e.g. 10/70) would indicate that you are either in a noisy radio environment or that your computer is too far from the router to receive adequate power.

If you suspect interference from other routers, try iwlist [interface] scanning, where [interface] is your wireless card's device name to see if there are other routers that are interfering with your router's channel, the frequencies at which your computer and the router transmit.

For more information check out man iwconfig

Check that your network is connected

$ ifconfig [interface]

  wlan0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
  inet addr:192.168.1.115  Bcast:192.168.1.255  Mask:255.255.255.0
  inet6 addr: fe80::6ef0:49ff:fe66:6c18/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:8104 errors:0 dropped:0 overruns:0 frame:0
  TX packets:7690 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:5637315 (5.3 MiB)  TX bytes:1698532 (1.6 MiB)

Important information shown in the output:

Line 3 indicates that your link is "UP"
The second line shows your ip address ("inet addr"), the broadcast ("Bcast"), and the netmask.
The third line is used only for ipv6
Lines 4-6 indicates TCP/UDP packet statistics. If there are alot of dropped packets here and your link quality is high, the problem is most likely not on your system, but on the router's end.
Line 7 shows the total number of bits sent and received over the interface

Check the routing tables and your connection from the wireless router. I'm not sure this is in the scope of your question, but it's the next logical step.


Developing OpenGLES2 apps for Ubuntu Software Center

Ok, I got the following findings:

You can request an OpenGL-ES2 context from a regular OpenGL driver, as long as the OpenGL vendor supports this.

I've confirmed that this works with:

Intel integrated graphics driver
nVidia proprietary driver
Radeon open source driver

And it does not work with:

AMD/ATI proprietary fglrx driver

The extension to check for is GLX_EXT_create_context_es2_profile.
If you use the GLFW library, you can request it by doing:

    glfwWindowHint( GLFW_CLIENT_API, GLFW_OPENGL_ES_API );
    glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 2 );


The failing bootstrap is addressed in the Troubleshooting guide in the Juju documentation.

According to the documentation there may be some .jenv files in ~/.juju/environments/ directory. Destroy the environment, remove the files, and try bootstrapping again.  You can use the --debug flag to give more information about the bootstrap process.

The networking file for LXC can be found at /etc/default/lxc-net  You may need to edit this file to work with your proxy network configuration.

Failing that we have completed a Juju Troubleshooting video that might help you troubleshoot problems with Juju.  Have a look!


You have to enable main and universe repositories.

See how to do that in this question:

Problem installing build-essential on 14.04.1 LTS


In your Ubuntu setting under software update check for Addtional drives or drivers tab it will suggest you a wifi driver (for me was Bradcom driver) install/activate it and restart you will see your wifi network now.


How to finally launch a VNC server on 18.04 without installing a different desktop?

Controlling current desktop currently is a standard feature of Ubuntu
It is called 'desktop sharing'.
VNC server is installed by the vino package and his setup available in the gnome-control-center sharing
See Cannot turn on sharing on ubuntu 18.04

sudo apt install vino
gnome-control-center sharing &


Tight VNC Server, Ubutu 12.10 and unity desktop

you didn't set gui session for xstartup file, that is why you see blank screen when try try to remotely connect to your desktop/server via vnc on ubuntu, if you want gnome, install these packages

# apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

and use this xstartup file

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &


Newest Laptops in Ubuntu Certified hardware list?

See latest probes of Ubuntu-powered laptops in this list: https://linux-hardware.org/?view=timeline

Example probe: https://linux-hardware.org/?probe=16e0fe515b

You can find manufacture year in the Host Info section of a probe. Also take a look at the Linux kernel version used.

Search for a computer by vendor and model: https://linux-hardware.org/index.php?view=search_computer&computer_vendor=Lenovo&computer_model=G570&computer_type=notebook

I'm the author of this project, feel free to ask any questions!

Enjoy!


Use bootcamp, runs like breeze.
Bootcamp use "Refind" or "Refit" boot manager and this can replace GRUB.
I run Mint Cinnamon with Docky and Wine. But you can use Ubuntu and the MacOS widgets and icons and most believe I run MacOS. Treat your old buddy and workhorse with the best, and never change a winning horse...


Importing Microsoft Keyboard Layout Creator (MKLC) files

In an effort to find an xkb to klc converter, I found this repository: https://github.com/alexriss/keyboard-layout-converter
Last commit is from 2016, but I hope it works.


Problem while Installing Gnome using Terminal?

Try this:

sudo add-apt-repository ppa:gnome3-team/gnome3-next && sudo apt-get update
sudo apt-get update && sudo apt-get install gnome-shell ubuntu-gnome-desktop
sudo apt-get update && sudo apt-get dist-upgrade

More info here


How to open a file or folder from Terminal with mouse

Gnome-terminal doesn't do this, as you are aware; unlike Nautilus, it doesn't have those sorts of extensions like open-terminal here.  This is probably an undesirable feature anyway; URL recognition can be annoying as it is, but can you imagine doing a find and having everything clickable?

For your pwd example,

nautilus `pwd`

works, (but then so does nautilus .)  For this task, I have a bash alias:

alias n="nautilus ."

so that whenever I type n, it opens nautilus wherever I am.

Otherwise, the format:

nautilus `<insert command that prints a directory here>`

works, but doesn't get you the feature you're looking for.

A workaround would be:

highlight the path with the mouse (which stores it in the buffer)
type nautilus<space> at the prompt
middle-click somewhere in the terminal (which pastes the buffer to the end of the prompt).


Why dont ProxyPass work in Apache hardy box with virtual hosts?

I would recommend that you use the address:port notation as specified in the apache manual:

http://httpd.apache.org/docs/2.2/mod/core.html#namevirtualhost

Probably something has changed in the apache code, since it looks like it defaults to port 0 in hardy, but your websites default to port 80.

E.g. change it to:

NameVirtualHost *:80

and

<VirtualHost *:80>

If that doesn't work then use:

NameVirtualHost 157.249.32.169:80

and

<VirtualHost 157.249.32.169:80>


Not by any means a satisfactory answer, but I can reproduce this problem exactly so I opened a bug for it,

https://bugs.launchpad.net/ubuntu/+source/evince/+bug/784228

You might want to subscribe to it.