While installing Hadoop in ubuntu for the command '$sudo gedit ~/.bashrc' I'm getting unable to init server: Could not connect: Connection refused

It looks like you're running on a text terminal. gedit needs a GUI terminal.
Use a different editor, nano, vi, vim, ed, ...


GRUB not appearing after upgrade to Windows 8.1

It looks like a Windows 8.1 installer overwritten the GRUB in the MBR with Windows boot loader. Fix is easy, just follow the steps in Ubuntu Help - recovering Ubuntu after installing Windows and you will have GRUB with operating system choice again.


Lost wireless connectivity after installing older kernel

You are missing several drivers including wireless drivers because you need to also install:

linux-image-extra-3.13.0-27-generic

from here .


I resolved the issue, by forcing a bind on the local ip of eth0, of OpenVPN - afterwards, I created another routing table for eth0.
I then added a default gateway for eth1 as well, the regular way - no table :)

Thank you for having taken time to look at my original post :)


iPerf :WARNING: did not receive ack of last datagram after 10 tries

This warning indicates the client didn't receive an acknowledgement from the server about the final packet or end of test.  The client indicates to the server that it wants to end the traffic test by sending a negative sequence no.  Either the server didn't receive those packets or its acknowledgement back to the client got dropped.  The output from the server would help diagnose.


Just connect your Dell with a WIRED internet-connection, and install the extra required driver (look for it in systemsettings/  additional drivers under hardware; the driver is (I've had the same model as you) one for Broadcom) . After installation reboot and connect to you Wifi-network.

You should come out fine by doing this action.


A little late though. I guess you will need to install all the dependencies with the package.
Try running:

apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev


Fresh Lubuntu 20.04.5 - Continuous HDD I/O operations while in idle

One way is to find the processes that are accessing the file system is to use fnotifystat:
sudo apt install fnotifystat
sudo fnotifystat

There are normally I/Os occurring on pseudo file systems that can be excluded using:
sudo fnotifystat -x /sys,/proc

..finally one can classify the activity to the device using:
sudo fnotifystat -x /sys,/proc -D


ROS melodic instalation for Ubuntu 20.04

Towards answering your question...
I began down the path suggested by @HimnashuTanwar, building melodic from source, but ultimately concluded that a full ros melodic install is not viable in 20.04.
A few notes:

Adding a -r to the rosdep command immediately exposed all of the
dependencies related to Python2 Most such dependencies could be met
using pip install -U [package].
A notable exception was pyqt5, which in turn depended on sip.  At first I endeavored to build the sources of these two, as per https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html#building-and-installing-from-source, but settled on this solution instead: How to get PyQt5 for Python2 on Ubuntu 20.04
What caused me to abandon the build was a nasty dependence of
melodic's tf2 on an earlier version of Boost.  It turns out that 20.04 runs on libboost1.71, wherein boost-signals has been deprecated and deleted, and this breaks the build of tf2 -- this issue is of course remedied in Noetic.

So in the end, it's probably best to stick with the supported version pairs: melodic on 18.04 or noetic on 20.04+, as per (http://wiki.ros.org/Distributions)


How to test a Live-CD/USB + add drivers for Broadcom wireless card + reboot and continue the Live-CD/USB testing?

This is a very similar question as this AU Question and step-by-step answer.

Ignore the "nightly download" part of the answer - just use the ISO you have downloaded to install onto a USB stick.

Once installed, you can Activate the broadcom drivers in the Additional Hardware window.


Found a nifty way to do this.
Programs that you might need are rar and imagemagick.

sudo apt-get update
sudo apt-get install rar imagemagick

Next, rename all the files extension that you want to convert, from *.cbr to *.rar.

Example: comic.cbr -->  comic.rar

Next, use rar and extract all the .rar files. You should get .jpg files as output.

Next, use imagemagick to covert all into one. Make sure you are in that directory.

Example use in terminal:

convert *.jpg comic.pdf


How to handle "invalid signature" in apt-get

Is there something fundamentally wrong with that Yorba PPA?

Aside from it being an antique? ... No.

Well, that's exactly what's wrong here.

Note that signature itself is fine:

% gpg --no-default-keyring --keyring ./key.gpg --verify Release.gpg Release
gpg: Signature made Tue 31 Mar 2015 07:20:40 JST
gpg:                using RSA key 10975893E549B1AC
gpg: Good signature from "Launchpad yorba" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 90B0 64CA E4CB A8A6 C34F  04D1 1097 5893 E549 B1AC

But the way it was made is no longer fine:

% gpg --list-packets Release.gpg
# off=0 ctb=88 tag=2 hlen=2 plen=156
:signature packet: algo 1, keyid 10975893E549B1AC
    version 4, created 1427754040, md5len 0, sigclass 0x00
    digest algo 2, begin of digest e2 e8
    hashed subpkt 2 len 4 (sig created 2015-03-30)
    subpkt 16 len 8 (issuer key ID 10975893E549B1AC)
    data: [1018 bits]

digest algo 2 is SHA-1, which is no longer consider secure, It's now an error to have Release signatures be made using SHA-1.

There's nothing new about this. It was already a warning in 16.04 (How to fix apt: Signature by key uses weak digest algorithm (SHA1)?):

# apt update
...
W: http://ppa.launchpad.net/yorba/ppa/ubuntu/dists/vivid/Release.gpg: Signature by key 90B064CAE4CBA8A6C34F04D110975893E549B1AC uses weak digest algorithm (SHA1)

And returned the same error in 18.04 as in 20.04.


How to remove weird screen glitches in Ubuntu 13.04?

Try reinstalling your Nvidia Drivers using the following commands in the terminal:

sudo apt-get purge nvidia*
sudo apt-get install nvidia-current

If this doesn't help, bumblebee could be the issue and you could try to remove it:

sudo apt-get purge bumblebee*


Here's a not so elegant way of doing it:

Install RecordMyDesktop from the Software Centre.
Fire up one of those programmes that produce the "moving images".
Record the "moving images" window with RecordMyDesktop (it also captures the sound).


Nautilus will list devices nicely if you put their mount points in /media, but not in /mnt You can call the mount point anything you like, for example /media/my-drive can be set as your mount point in the GUI dialog and this mount point will be created for the device you specify


How to set application name when creating .deb, using Quickly

You need to fill in and uncomment the description and long_description in the setup.py file before you run any Quickly packaging command. This is where Quickly gets the short and long descriptions for your app shown in the Ubuntu Software Centre.


I have a problem with what I think is a broken link

The index.html~ is meant to be a backup of the file.

When you edit a file with Gedit, Ubuntu saves the original as filename~. The backup file is supposed to reflect what the original file looked like before it was edited.

It doesn't contain a whole backup history. It just keeps the last version of the file for you.


In the terminal open up sudo visudo

Add the entry: %admin ALL=(ALL) /bin/kill

You set the passwords with the passwd <user> command.


Well a graphical interface feels more comfortable, it is of limited value on a server as most of what you are going to be doing is starting / stopping services, editing configuration files, and or installing software, all of which can be done from the command line.

It is overwhelming , the Ubuntu Server Gide is a great place to start, gui or not.

ssh + screen allows secure, remote access (use keys, disable passwords).

If you still want a graphical interface, try to install as light an interface as possible, perhaps fluxbox or openbox, or perhaps Lubuntu. If you are not familiar with Ubuntu yet you can always go with gnome or KDE, but that is sort of overkill and installs unnecessary packages.

Do not get the wrong idea, a traditional desktop is helpful as you learn the basics of a server, but many people find it less helpful in the long run.

A very nice alternate is any of the various web interfaces, from Webmin to phpmyadmin There are interfaces you can purchase as well, such as cpanel.

The advantage of web interfaces are three fold

They are graphical.
You can access them from anywhere.
Unlike a "desktop" such as gnome or kde they are targeted at the activities you will do with a server.

The disadvantage is that they are a potential vulnerability as others can log in to the control panels, use strong password and fail2ban.

So, pick your poison, but I do suggest the Server Guide.


In Nautilus (Files) your can change the default view via Edit -> Preferences -> Views tab - Icon Views Default and checking Text beside icons. Unfortunately, even with Have file manager manage the desktop set via gnome-tweak-tool (Advanced Settings) this doesn't change the desktop icons view, only for folder views within Nautilus.


Ubuntu started in console only mode, how can I go back to GUI?

On the Console type

sudo systemctl isolate multi-user.target

and then reboot your system.
This should work in most cases but if it doesn't try if you are using gdm

sudo systemctl enable gdm

--

sudo ln -s '/usr/lib/systemd/system/gdm.service' '/etc/systemd/system/display-manager.service'

reboot.


Problem when trying to install multiple apps with snap

Looks like server side problem

https://status.snapcraft.io/

27 Apr? «Snap downloads — Service Interruptions: 14:49 - 14:53».


Try out this link. However it works only for some applications like the terminal and vscode. I dont think so it will work for chrome. However its still a good option.
Terminal titlebar after applying the changes
PS: if you are looking for a clean browser, I suggest to use Firefox and in Customize section you can reduce the bars width and even remove some of them. Gives a nice clean look.


Display a graphical web page on Ubuntu Server

You can combine two options to do this.

You can directly launching a program (e.g. Firefox, Chrome) from terminal by passing it as a parameter to startx
You can use the Kiosk mode of a browser that supports it (Chrome?) Or the full screen mode of any browser, where you set the default home page to the URL that you want to show.

See for more help:

How to start firefox in fullscreen mode?
https://superuser.com/questions/219511/browser-instead-of-window-manager


How to mount drives to access them via XnView or other software

You can go to /media/(your-username)/(drive-label) after it's mounted. As long as you don't have too many drives plugged in, if you don't know the drive label you can dig around pretty easy to find what you want.

Also, if this is on a live system the (your-username) part will be ubuntu.

Hope that helps!


How to avoid problems when installing Ubuntu and Windows 7 in dual-boot?

Most of the scare your read about comes from an unlucky installation message from Grub that misled users to install Grub to their Windows partition boot sectors thus making Windows unbootable. As this is fixed now there is only a small risk left.

If you take care not to touch your Windows partitions when installing Ubuntu, and if you follow the standard installation process provided with Ubuntu you are on the safe side.

As always when installing a new OS or changing partitions backing up your data is absolutely necessary. I'm sure you have done that already.

For deeper insights into dual-boot setups read the Community Wiki.


How to convert audio and change its quality bitrate?

SoX is "the Swiss Army knife of audio manipulation". With that tool, you can read and write audio files in different formats, and you even can apply effects to them. Install sox with:

sudo apt install sox

Read about how it works:

man sox


HDMI problem with monitor, Ubuntu 18.04.1

Maybe it helps installing the newest HWE-Stack by

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

See also https://wiki.ubuntu.com/Kernel/LTSEnablementStack


Linux kernel on ubuntu 20.04 crash frequently

I have upgrade the kernel from 5.4.0-58 to 5.8.0-36 for nearly 20 days and the crash has disappeared since then.
For those who share the same problem, you can upgrade your kernel from the official repository of ubuntu:
sudo apt install linux-image-5.8.0-36-generic

Best wishes.


When it asks for a password just press enter.

This happens because the system has been coded to function without a password being expected even if the password is blank.


What are the pros and cons of having a separate home partition?

The biggest pro, in my opinion, is that you can easily install a newer Ubuntu version (or any Linux distro for your architecture, really), without losing most of your custom settings, configurations, downloads, etc., since such a step usually involves wiping out the existing system/boot partitions. You simply choose to preserve your /home in the partitioner during install, and you're set. It is also possible to do this with /home on your / partition, but is a little more complicated.
It also makes resizing/migrating to a larger home partition easier, if you ever need more space.
It isn't going to affect the speed of file access much, UNLESS you tend to have lots and lots of small files in your home directory. e.g., if you are a developer, or you have lots of sources lying around. That MAY affect overall file access speed on the entire partition with some filesystems. In that case, go for a separate /home.
There aren't any risks to making a separate home partition.

Bottom-line: In your place, I wouldn't go for a separate home partition unless I had a second physical drive I wanted to use for it. But if you're not very familiar with Linux or the command-line, and you intend to try out different Linux distributions, a separate /home is recommended.


Avoid the yellow message at the top of the gnome-terminal window that states "The child process exited normally with status 0."

Basically, don't let the program you are running terminate!
That yellow line indicates that the command you called within gnome-terminal finished sucessfully. You can even hit "relaunch" to start the program (in this case, your command line twitter) again.

I would do the following: Since you are most likely interested in a continuous update of the twitter messages, run your program within the watch command. This way, you can even define the interval "twitterTimeline.py" is run again!

Change your twitterText.desktop into the following:

[Desktop Entry]
Type=Application
Terminal=false
Icon=vinagre
Name=Text Twitter Timeline
Exec=/usr/bin/gnome-terminal --window-with-profile=Microblog --hide-menubar --command="watch -t -n 60 '/usr/bin/python /home/htplainf/twitterTimeline.py'"

Have a look at the Exec command in the last line:

watch -t -n 60 '/usr/bin/python /home/htplainf/twitterTimeline.py'

-n 60 means that your python script is executed every 60 seconds. You can easily set a different interval. Also, have a look at man watch to discover its compete functionality!

By using watch, your command never stops, so you will not see the yellow message bar on top of gnome-terminal. And your tweets are updated!


Backup Linux configuration, scripts and documents to Gmail

Edit May 7, 2021
Historical posts in next sections
The original part of the answer and first major edit are left intact in the next sections for historical references about trial and error.
April 29, 2021 was the last successful time the older script ran. Starting on April 30, 2021 google started scanning the backup archive to see if any filenames ended with .exe, .js, etc. This caused google to reject the attachment.
The solution now is to encrypt the backup archive file with a password.
Updated script
Remember to replace capitalized words below with your real words:

HomeDir="/home/USER_NAME"               # Required for cron compatibility
EmailAddr="EMAIL_ADDR@gmail.com"        #  where $HOME is not setup for us.

daily-backup.sh
#!/bin/bash

# NAME: daily-backup.sh
# PATH: /mnt/e/bin
# DESC: Backup scripts, documents and configuration files to .tar
# PARM: $1 = Filename for backup (without .tar extension)

# DATE: July 11, 2017. Modified May 7, 2021.

# NOTE: Requires zip package because pbzip2 doesn't provide encryption:
#           sudo apt install zip

HomeDir="/home/USER_NAME"               # Required for cron compatibility
EmailAddr="EMAIL_ADDR@gmail.com"        #  where $HOME is not setup for us.

# tar removes leading / to make restores painless, suppress this error for cron
exec 2> >(grep -v "Removing leading '/' from member names" >&2)

# NOTE: To recover backup, download .64 backup format from google and use:
#       base64 -di backup.tar.gz.64 > backup.tar.gz

# NOTE: To include MBR (Master Boot Record) in backup create an image using:
#       sudo dd if=/dev/sda of="$HOME/.mbr.sav" bs=512 count=1

# NOTE: CLONE CURRENT INSTALLATION TO NEW MACHINE
#       =========================================

#       To restore use Live USB to install Ubuntu alongside Windows 10
#       Connect to network with password xxxxxxxxx

#       Install Google Chrome
#       (https://askubuntu.com/questions/510056/how-to-install-google-chrome):

#           wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub
#               | sudo apt-key add
#           echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/
#               stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
#           sudo apt update
#           sudo apt install google-chrome-stable

#       Open gmail.com and download attachment `$1` which is usually called
#           Backup-yymmdd-DayOfWeekName.tar

#       Create home/ sub-directories which tar doesn't create automatically:
#           mkdir ~/bin
#           mkdir ~/eyesome
#           mkdir ~/python
#           mkdir ~/gmail
#           mkdir ~/roboto
#           mkdir ~/sony

#       Restore the daily backup using:
#           download .64 backup format from google and use:
#           base64 -di backup.tar.gz.64 > backup.tar.gz
#           sudo tar -xvf Backup-yymmdd-DayOfWeekName.tar -C /

#       Patch /etc/default/grub with new machine parameters, ie for nvme use:
#           acpiphp.disable=1

#       Use `sudo apt install aptitude-common`
#       Clone packages using `aptitude-create-state-bundle` on Source
#       Copy state-bundle.tar file from Source to Target machine
#       Restore packages using `aptitude-run-state-bundle` on Target

#       Manually copy ~/Pictures, ~/Videos, etc. not in daily backup.

#       sudo update-grub        # NVMe suspend/resume acpiphp.disable=1
#       sudo update-initramfs   # to get plymouth sunrise splash screen

if [[ $# -ne 1 ]]; then
    echo 'One argument required for file name, e.g. "Backup-2017-10-21-Saturday"'
    echo '.tar will automatically be added as a file extension'
    exit 1
fi

Filename="$1.tar"

cd $HomeDir || exit 1                   # Change to homedir, exit on failure

dpkg --get-selections > .packages       # List of installed applications

tar -cpf "$Filename" bin                # create .tar & add user scripts
# find all "$HOME/." files using "-maxdepth" to skip ".config" directory
# Fpr example this includes .roboto
find .* -maxdepth 0 -type f -exec tar -rpf "$Filename" {} +
tar -rpf "$Filename" .config/autostart  # autostart programs configuration
tar -rpf "$Filename" .config/mserve     # music library and location playlists
tar -rpf "$Filename" .local/share/nautilus/scripts
tar -rpf "$Filename" Desktop            # files and links on desktop
tar -rpf "$Filename" Documents/*.od*    # Libre Office: *.ods, *.odt, etc.
tar -rpf "$Filename" eyesome            # ~/eyesome - Development version
tar -rpf "$Filename" gmail/*.py         # gmail daily backup management scripts
tar -rpf "$Filename" gmail/*.sh         #  and configuration files. Excludes
tar -rpf "$Filename" gmail/go           #  message data files
tar -rpf "$Filename" gmail/BackupSets   #  which exceed 8 MB and can be
tar -rpf "$Filename" gmail/BackupDays   #  downloaded if needed again.
tar -rpf "$Filename" python/*.py        # Python scripts
tar -rpf "$Filename" roboto/roboto      # Script only, no download files
tar -rpf "$Filename" sony               # Sony TV via REST API over HTTP
#July 20, 2018 - /boot/grub takes 5MB+
#tar -rpf "$Filename" /boot/grub        # Custom grub fonts and splash...
tar -rpf "$Filename" /etc/apt           # 3rd party keys, repositories, etc.
tar -rpf "$Filename" /etc/cron*         # crontab, cron.d, cron.daily, etc
tar -rpf "$Filename" /etc/default/grub  # bootstrap loader
tar -rpf "$Filename" /etc/environment   # PATH backup
tar -rpf "$Filename" /etc/fstab         # UUID partitions
tar -rpf "$Filename" /etc/grub.d        # 00_header, etc. changes
tar -rpf "$Filename" /etc/hosts         # IP configuration
tar -rpf "$Filename" /etc/NetworkManager # .conf and .dispatcher.d
tar -rpf "$Filename" /etc/rc.local      # Startup script: calls zaprestore.
tar -rpf "$Filename" /etc/sudoers       # 120 minute sudo, stars in password
tar -rpf "$Filename" /etc/systemd       # systemd files: login.conf, etc.
tar -rpf "$Filename" /etc/udev/rules.d
tar -rpf "$Filename" /etc/X11/xorg.conf # /etc/X11/xorg.conf.d crashes
tar -rpf "$Filename" /lib/systemd/system-sleep
tar -rpf "$Filename" /lib/systemd/system/rc.local.service
tar -rpf "$Filename" /mnt/e/bin         # /mnt/e - shared WSL + Linux scripts
tar -rpf "$Filename" /mnt/e/Documents
tar -rpf "$Filename" /usr/local/bin     # add global root-based scripts
tar -rpf "$Filename" /usr/share/plymouth   # ... screen (plymouth)
tar -rpf "$Filename" /usr/share/grub/themes/Tuxkiller2/

# gsettings modified from default. To restore see answer at:
# https://askubuntu.com/questions/420527/how-to-dump-all-the-manully-altered-gsettings-keys
dconf dump / > dump.dconf
tar -rpf "$Filename" dump.dconf

# Get list of all filenames in backup archive (tar file).
tar -tvf "$Filename" > BackupLog    # list filenames and sizes
chmod a+w BackupLog                 # give user delete access

# From: https://internetlifeforum.com/gmail/2251-gmail-some-file-types-blocked-fix-how-go-around/
#   to create base64 file:
#       cat archive.tar.gz | base64 > file
#   then i sent the file via email:
#   then mail was delivered properly! Then when one need to get readable archive
#   again, he need to decode it by base64. In my case i do it with:
#       cat file | base64 -d > decodedarchive.tar.gz

# NOTE: To recover backup, download .64 backup format from google and use:
#       base64 -di backup.tar.gz.64 > backup.tar.gz     # < May 6, 2021
#       base64 -di backup.tar.zip.64 > backup.tar.zip   # > May 6, 2021

# https://support.google.com/mail/answer/6590?hl=en#zippy=%2Cmessages-that-have-attachments
# May 6 2021 - Google has started scanning contents and rejecting zipped files
#              If they contain certain file extensions. It reports an error
#              without giving the filename. Solution is to use zip with
#              password protection emcryption. Filename is backup.tar.zip
zip --password daily-backup --quiet "$Filename.zip" "$Filename"

# Attachment has to be base64 to avoid google errors: backup.tar.zip.64
# NOtE: prior to May 7, 2021 gzip was used and file extenion was '.gz.64'
Filename64="$Filename.zip.64"
cat "$Filename.zip" | base64 > "$Filename64"

#echo "Compare size to 24 MB"
size=$(stat --printf="%s" "$Filename64")
if [[ $size -gt 24000000 ]] ; then
    echo "=================== Backup > 24 MB aborting. ========================"
    ls -la "$Filename64"    # list backup file attributes
    tar -tvf "$Filename"    # list backup file contents with total size below
    tar -tvf "$Filename" | awk '{sum += $3} END {print sum}'
    exit 1                  # Abort backup
fi

# email the backup as base64 attachment with list of files in message body
mail -a "$Filename64" -s "$Filename64" "$EmailAddr" < BackupLog

rm "$Filename" "$Filename64" "$Filename.zip"

exit 0

Edit July 9, 2019
Historical post in next section
The original part of the answer is left intact in the next section for historical reference to trial and error
Backup script to create .tar file
This is the current backup script:

#!/bin/bash

# NAME: daily-backup.sh
# PATH: /mnt/e/bin
# DESC: Backup scripts, documents and configuration files to .tar

# DATE: July 11, 2017. Modified July 7, 2019.

HomeDir="/home/USER_NAME"                    # Required for cron compatibility
EmailAddr="EMAIL_NAME@gmail.com"

# PARM: 1=backup file name. Extension .tar.gz automatically appended.

# NOTE: To include MBR (Master Boot Record) in backup create an image using:
#       sudo dd if=/dev/sda of="$HOME/.mbr.sav" bs=512 count=1

# NOTE: CLONE CURRENT INSTALLATION TO NEW MACHINE
#       =========================================

#       To restore use Live USB to install Ubuntu alongside Windows 10
#       Connect to network with password xxxxxxxxx

#       Install Google Chrome
#       (https://askubuntu.com/questions/510056/how-to-install-google-chrome):

#           wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub
#               | sudo apt-key add
#           echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/
#               stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
#           sudo apt update
#           sudo apt install google-chrome-stable

#       Open gmail.com and download attachment `$1` which is usually called
#           Backup-yymmdd-DayOfWeekName.tar

#       Make missing home/bin directory which tar doesn't create automatically:
#           mkdir ~/bin

#       Restore the daily backup using:
#           sudo tar -xvf Backup-yymmdd-DayFfWeekName.tar -C /
#           yar -xvf Backup-yymmdd-DayFfWeekName.tar -C /

#       Patch /etc/default/grub with new machine parameters, ie for nvme use:
#           acpiphp.disable=1

#       Use `sudo apt install aptitude-common`
#       Clone packages using `aptitude-create-state-bundle` on Source
#       Copy state-bundle.tar file from Source to Target machine
#       Restore packages using `aptitude-run-state-bundle` on Target

#       Manually copy ~/Pictures, ~/Videos, etc. not in daily backup.

#       sudo update-grub        # NVMe suspend/resume acpiphp.disable=1
#       sudo update-initramfs   # to get plymouth sunrise splash screen

if [[ $# -ne 1 ]]; then
    echo 'One argument required for file name, e.g. "Backup-2017-10-21-Saturday"'
    echo '.tar will automatically be added as a file extension'
    exit 1
fi

Filename="$1.tar"

cd $HomeDir ||
    exit 1

dpkg --get-selections > .packages       # List of installed applications

tar -cvpf "$Filename" bin               # create .tar & add user scripts
tar -rvpf "$Filename" .config/autostart # autostart programs configuration
tar -rvpf "$Filename" /usr/local/bin    # add global root-based scripts
tar -rvpf "$Filename" /etc/cron*        # crontab, cron.d, cron.daily, etc
tar -rvpf "$Filename" /etc/system*      # systemd files: login.conf, etc.
tar -rvpf "$Filename" /lib/systemd/system-sleep
tar -rvpf "$Filename" /etc/rc.local     # Startup script: calls zaprestore.
tar -rvpf "$Filename" /etc/sudoers      # 120 minute sudo, stars in password
tar -rvpf "$Filename" /etc/environment  # PATH backup
tar -rvpf "$Filename" /etc/default/grub # bootstrap loader
#July 20, 2018 - /boot/grub takes 5MB+
#tar -rvpf "$Filename" /boot/grub        # Custom grub fonts and splash...
tar -rvpf  "$Filename" /usr/share/plymouth   # ... screen (plymouth)
#included above tar -rvpf "$Filename" /usr/share/plymouth/themes/earth-sunrise/
tar -rvpf "$Filename" /usr/share/grub/themes/Tuxkiller2/
tar -rvpf "$Filename" /etc/grub.d       # 00_header, etc. changes
tar -rvpf "$Filename" Desktop           # files and links on desktop
tar -rvpf "$Filename" Documents/*.od*   # Libre Office: *.ods, *.odt, etc.

# Trusted keys to install from third party PPAs
tar -rvpf "$Filename" /etc/apt/trusted.gpg
tar -rvpf "$Filename" /etc/apt/trusted.gpg.d

# Sources for repositories - 1) Main single file - 2) directory of files
tar -rvpf "$Filename" /etc/apt/sources.list
tar -rvpf "$Filename" /etc/apt/sources.list.d

# find all $HOME/.config files and add to .tar
find .* -maxdepth 0 -type f -exec tar -rvf "$Filename" {} +

# Nautilus custom scripts
tar -rvpf "$Filename" .local/share/nautilus/scripts

# /etc/udev rules
tar -rvpf "$Filename" /etc/udev/rules.d

# /etc/rc.local
tar -rvpf "$Filename" /etc/rc.local

# /etc/X11/xorg.conf.d
tar -rvpf "$Filename" /etc/X11/xorg.conf.d

# /mnt/e - shared WSL + Linux
tar -rvpf "$Filename" /mnt/e/bin
tar -rvpf "$Filename" /mnt/e/Documents

# ~/eyesome - Development version
tar -rvpf "$Filename" eyesome

# ~/gmail - Python and Bash scripts but NOT huge data files
tar -rvpf "$Filename" gmail/*.py
tar -rvpf "$Filename" gmail/*.sh
tar -rvpf "$Filename" gmail/go
tar -rvpf "$Filename" gmail/BackupSets
tar -rvpf "$Filename" gmail/BackupDays

echo "Complete file list with sizes..."
tar -tvf "$Filename" > BackupLog    # list filenames and sizes
chmod a+w BackupLog                 # give user delete access

echo "Compressing with gzip..."
gzip "$Filename"
Filename="$Filename.gz"

echo "Emailing: $EmailAddr"

# From: https://internetlifeforum.com/gmail/2251-gmail-some-file-types-blocked-fix-how-go-around/
# cat archive.tar.gz | base64 > file
# then i sent the file via email:
# echo "Base64 encoded file" | mutt -a file -s subject -- mymail@gmail.com
# then mail was delivered properly! Then when one need to get readable archive
# again, he need to decode it by base64. In my case i do it via linux command line:
# cat file | base64 -d > decodedarchive.tar.gz

Filename64="$Filename.64"
cat "$Filename" | base64 > "$Filename64"
mail -a "$Filename64" -s "$Filename64" "$EmailAddr" < BackupLog

ls -la "$Filename" "$Filename64"
rm     "$Filename" "$Filename64"

exit 0

Replace USER_NAME above with your user name. Replace EMAIL_NAME@gamil.com with your actual gmail address. Change the directory /mnt/e/bin to the directory you store your bash scripts. Save the file and exit. Then use:
chmod a+x /mnt/e/bin/backup

This makes the script executable.
Notice how the MBR (Master Boot Record) is saved to backup. A separate earlier step to create ~/.mbr.sav using sudo dd ... is required as described in script comments.
Notice the dpkg --get-selections line. This creates backs up a list of all installed application names.
Simplest way to automate sending email
From Send email alerts using ssmtp we find the simplest way of sending email automated from terminal or script. The installation steps are straight forward:
sudo apt install ssmtp
sudo nano /etc/ssmtp/ssmtp.conf
# Change "MyEmailAddress" and "MyPassword" to your own.

There  is one step not mentioned; Google will send you an email confirming you want to allow a "less secure" application to send mail with your account:

After installing and configuring ssmpt one more package is required in order to attach your .tar backup file to an email message:
sudo apt install sharutils

This package contains the program uuencode which is need to convert binary files for transmission.
Setup cron daily to call backup script
Create the file /etc/cron.daily/daily-backup containing:
#!/bin/sh
#
# NAME: daily-backup
# DESC: A .tar backup file is created, emailed and removed.
# DATE: Nov 25, 2017.
# CALL: WSL or Ubuntu calls from /etc/cron.daily/daily-backup
# PARM: No parameters but /etc/ssmtp/ssmtp.conf must be setup

# NOTE: Backup file name contains machine name + Distro
#       Same script for user with multiple dual boot laptops
#       Single machine should remove $HOSTNAME from name
#       Single distribution should remove $Distro

sleep 30 # Wait 30 seconds after boot

# Running under WSL (Windows Subsystem for Ubuntu)?
if cat /proc/version | grep Microsoft; then
    Distro="WSL"
else
    Distro="Ubuntu"
fi

today=$( date +%Y-%m-%d-%A )
/mnt/e/bin/daily-backup.sh Daily-$(hostname)-$Distro-backup-$today

Save the file, exit and use:
chmod a+x /etc/cron.daily/daily-backup

This makes the script executable.
What cron emails you every morning
Every morning after /etc/cron.daily/daily-backup is run cron sends you two emails. One is the backup Backup-YYYY-MM-DD.tar file which in my case is 5.2 MB that I cannot show you. The other is a listing off all the files in the backup which the tar command had reported to cron:
Anacron <Me@gmail.com>
6:58 AM (1 hour ago)

to root, bcc: me
/etc/cron.daily/daily-backup:
bin/
bin/.websync.new
bin/log-gsu-del
bin/now
  (... SNIP ...)
.xscreensaver
.xsession-errors
.xsession-errors.old

Summary
It took a month waiting for an answer and then a month writing an answer but, now the project is finished. Going forward it's simply a matter of adding additional directories to the backup script.
The next project will be a full backup but it is 6 GB large and will be copied to gdrive (Google Drive) because gmail is limited to 25 MB. That script is called /usr/local/bin/full-backup and is included here if you are interested:
#!/bin/bash

# NAME: full-backup
# PATH: $HOME/bin
# DESC: Full system backup - must call with SUDO

# DATE: July 16, 2017. Modified July 26, 2017.

apt autoclean   # reduces size of /var/cache/apt/archives

cd /tmp         # tar must be created in directory not backed up.

time tar -cvpzf backup.tar.gz \
--exclude=/backup.tar.gz \
--exclude=/proc \
--exclude=/tmp \
--exclude=/mnt \
--exclude=/dev \
--exclude=/sys \
--exclude=/media \
--exclude=/usr/src/linux-headers* \
--exclude=/home/Me/.cache \
--exclude=/var/log \
--exclude=/var/run/ \
--exclude=/run \
--exclude=/var/cache/apt/archives /

Historical section
This will be more a "journey" than an answer as available options are explored.
Backup what is most important to you first
I have two directories where I have invested most of my time since August 2016:
/home/rick/bin
/usr/local/bin

When I first created a tar file (tape archive) using these two directories and tried to email them to myself I received this error:

gmail.com won't accept files > 25 MB
How can two directories of scripts written over 10 months be larger than 25 MB? On closer examination they are are > 190 MB. Whhaaatttt?
In turns out to be a single file created for testing purposes:
-rw-rw-r--  1 rick rick 191143744 Dec 23 17:27 log-gsu-gedit.tst

So delete this test file and rerun the commands:
tar -cvf scripts-2017-06-05.tar /home/rick/bin
tar -rvf scripts-2017-06-05.tar /usr/local/bin

The first command creates the .tar file using one directory of script files and the second appends to the .tar file using the second directory of script files.
The .tar file is now a more respectable size of 1.3 MB:
-rw-rw-r-- 1 rick rick 1341440 Jun  5 17:27 scripts-2017-06-05.tar

The simplest way is to email as an attachment
Now that the .tar file is created, simply go into gmail.com and email the file to yourself as an attachment. In the next step we'll want a cron job that creates the file daily and emails it automatically using MTA (Mail Transport Agent). An option needs to be setup in gmail.com to delete all these emails older than 30 days. That way only 400 MB or so of total scripts backups will be stored.

Edit June 25, 2017
I discovered tonight some configuration files difficult to backup until I stumbled across this thread. The files in question are in my home directory:
.bashrc
.conkyrc
.websync # one of my own databases
.bafman* # Another one of my own databases

Using the link above I created a script called ~/bin/backup with:
#!/bin/bash

if [[ $1 == "" ]] ; then
    echo 'Parameter required for file name, ie "Backup-2017-06-26"'
    echo ".tar will automatically be added as a file extension"
    exit
fi
tar -cvf $1.tar /home/rick/bin
tar -rvf $1.tar /usr/local/bin
find .* -maxdepth 0 -type f -exec tar -rvf $1.tar {} +

To view what is in the .tar archive use the command:
tar -tvf Backup-2017-06-26.tar

Remember to replace "Backup-2017-06-26" with the parameter you used when creating the backup.

Edit July 1, 2017
Similar Q&A was posted in November 2014: Send backup by email with crontab. The accepted answer is included below:
This following command worked for me when I tested in my machine.
echo "This is the message body" | mutt -a "/path/to/file.to.attach" -s "subject of message" -- recipient@domain.com

So probably the approach to follow will be something like,
tar -zcf /home/blah/backup.tgz /home/blah/
echo "Please find attached the backup file" | mutt -a "/home/blah/backup.tgz" -s "File attached" -- recipient@domain.com

I will save the above script as backup_email.sh and schedule the cron job as,
0 1 * * * /path/to/backup_email.sh

References

How do I send a file as an email attachment using Linux command line?


How do I assign a bug to myself in Launchpad?

To assign a bug to yourself in Launchpad, first navigate to the bug page (e.g. https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/397393 )

This shows that the bug is not assigned to anyone at the moment. Click on the Unassigned link

Finally, click on the Assign Me link (the little yellow exclamation point)

The bug is now assigned for you to work on it.


Can't install PECL on Xubuntu (unable to locate package)

There's no php-pecl package.  The pecl binary is contained in php-pear package, e.g. do:

sudo apt-get install php-pear

You can use apt-file from apt-file package to search for files contained in package not installed locally.  Try:

sudo apt-get install apt-file
apt-file update
apt-file search /usr/bin/pecl


Use program cfdisk to create logical partitions, extended partition containing them will be added automatically. The cfdisk program is quite easy to use.


Problem with nVidia GPU, not working lightdm

As you tried all drivers from the Ubuntu repositories without success,
 install the latest stable NVIDIA drivers 358 from the GPU Drivers PPA.

First remove the currently installed NVIDIA drivers.

Open a terminal and execute :

sudo apt-get purge nvidia*
sudo reboot

Install the latest stable NVIDIA drivers for GT 650M.

Open a terminal and execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-358 nvidia-prime
sudo reboot

In case it still does not work ... perform the installation in a different way :
Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On login screen press Ctrl+Alt+F1 - enter user name and password - execute the commands.

Update addressing your feedback that you can't see the GRUB boot menu

Boot from Ubuntu installation media and select Try Ubuntu without installing.
When the Ubuntu desktop appears ... open a terminal and mount the system :

sudo mount /dev/sdXY /mnt

Replace XY with the partition number (e.g. sda1) to which Ubuntu is installed.
To identify the partition open GParted - it is included in the installation media.

sudo gedit /mnt/etc/default/grub

Add # in front of the GRUB_HIDDEN_TIMEOUT=0 line, so that it reads exactly :

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true

Save the changes and reboot the PC ... now you will see the GRUB boot menu !


How to fix / reconstruct corrupt fstab Ubuntu 16.04 to regain access to partitions

Read man fstab. Your fstab is OK. It uses UUIDs to identify partitions, rather than /dev/ paths. You show:

/ mounted on UUID 617469bb-1180-4678-8274-5f88084f7162 (was /dev/sdc1 at installation)
swap on UUID fc44ce96-8676-46c6-be06-0113bbc716de (was /dev/sda3 at installation)
swap on UUID 6251911e-b45b-444a-9ac5-c365cb8dca5e (was /dev/sdc2 at installation).

/etc/mtab shows what is mounted at this instant, /etc/fstab shows what will be mounted.


Where is search on Ubuntu Software Center?

Maybe this answer is just silly, but it is not just the case that the window is not big enough to show the Search textbox? If i resize my window to that size, the Search disappears because there's no space to it be shown.


How to find unspecified repetition in lines of text

awk '$2 == $4 {print NR ":" $0}' filename

will output all the offending lines with the line number.


GUI application for controlling Samsung Smart TV connected to the same LAN of ubuntu desktop

You can use YAD to create GUI front end to CLI commands.

As a comment points out there is a CLI controller for the Samsung Smart TV:

https://github.com/Ape/samsungctl

You just need to install Yad with sudo apt install yad and create a GUI window like this:

Using this command:

yad --title "Remote Control" --text "Samsung Smart TV" --width 250 --height 400 --form --columns 2 --field "Power:FBTN"  --field "Vol +:FBTN" --field "Vol -:FBTN" --field "Input:FBTN"  --field "Chan +:FBTN" --field "Chan -:FBTN"

Additional code is required to link each button to the Samsung Control program:

samsungctl --host <host> [options] <key> [key ...]

If I had a Samsung Smart TV I would enjoy writing the full script. However my Smart TVs are Sony and Toshiba. I will try to write a remote control GUI script soon for those TVs.

Seeing it in action

I created a little demo where instead of calling the Samsung Smart TV commands are echoed to the screen.

The one-liner code is a little longer now:

yad --title "Remote Control" --text "Samsung Smart TV" --width 250 --height 400 --form --columns 2 --field "Power:FBTN" 'bash -c "echo Power"'  --field "Vol +:FBTN" 'bash -c "echo Volume Up"' --field "Vol -":FBTN 'bash -c "echo Volume Down"' --field "Input:FBTN" "bash -c 'echo "Input"'"  --field "Chan +:FBTN" 'echo "Channel up"' --field "Chan -:FBTN" 'bash -c "echo Channel Down"'

As mentioned in comments if you have a Samsung TV newer than 2016 you will also need to download the websocket-client


How can I install Matlab from the Mathworks website?

In order to install Matlab using this installer, you have to install the official Sun Java JRE. This is no longer available in Maverick's repositories.

One workaround for this is to select the archives from Lucid and install JAVA from there.


Cannot remap Alt-Tab combination after switching Ctrl and Alt

On Ubuntu 14.10 I've solved this issue by installing  compizconfig

sudo apt-get install compizconfig-settings-manager

In compiz go to Ubuntu Unity Plugin > Switcher and set "Key to start the Switcher" to Ctrl+Tab


Scan with hplip for HP Envy 5055 printer only scans bottom 1.5 inches of scanned document

After much additional reading of documentation, supported devices lists, etc., I've come to the conclusion that xsane doesn't support my printer.  I've installed Simple Scan, which is working just fine.  I'll have to reconfigure my preferences in hplip if I want to scan from within that GUI.  But I don't know that I'll bother.  It's just as easy to launch Simple Scan.


How do I run a executable (application/x-executable) file?

Bash is a shell, it can't execute binary files.

Presuming the file is already executable, you can simply type ./Zodiac_linux.

If it isn't executable yet, you can set the executable bit with sudo chmod +x ./Zodiac_linux and then run the above command.


Although you can not make your compiled application close the terminal window in which it is running, it is easy to make this happen by changing the way how you execute your program.

For example, if your executable application can be started using ./myprogramm, you could just type the command below in your terminal to first run myprogramm and as soon as it finishes, run the exit command to close the shell and with it the whole terminal window:

./myprogramm ; exit

Or maybe it would be even better to only close the terminal window if your application exited successfully, without any error (indicated by an exit status code other than 0). You can use && instead of ; to run the second command only if the first command was successful:

./myprogramm && exit

A third alternative would be to replace the shell running in your terminal window with your application, instead of running your application inside the shell. That way, the terminal window will close as soon as your application exits and you don't have to exit the shell at that point any more:

exec ./myprogramm

One big difference between the first two approaches (; exit and && exit) and the last one using exec is, that in the first case, you can kill the command you ran by hitting Ctrl+C and you will be back in the shell, the window will stay open. If you used exec, this will also kill your application, but as there is no more shell inside which it is running, the terminal window will close immediately as well.


Allocate less memory to processes to load a 6.8 GB dataset into R running on 8 GB machine

After restart immediately launch the terminal and issue the command

free -m

Then look at values in the second row(-/+ buffers/cache:). Under second column(used) you'll see the actual RAM consumption of your system.


this worked for me (ubuntu 16.04 upgrading from 15.10)

installed font manager from: http://fontmanager.github.io/

then, in the terminal:

sudo add-apt-repository ppa:font-manager/staging
sudo apt-get update
sudo apt-get install font-manager

and downloaded font from fonts.google.com and extracted, then opened each font with right click -> font manager

confirmed 'install'


Can't install anything. Terminal shows 404 errors

I had similar issues like this, couldn't fetch files from the Ubuntu server, this might help it worked with me, Go to software & updates > Ubuntu software> Re choose the closest server. Now Try sudo apt-get update


Try disable 3D acceleration in about:flags : same issue in Windows and Ubuntu 10.10 fixed with it.


It's possible your SD card may be corrupted. If it's not and you're using an SD adapter, there's a little switch that you have to toggle to disable write protection. If that doesn't work, 99% of the time, it mean your sd card is corrupted.


What is the default window manager in 12.04?

The default window manager is called compiz. Open a terminal and type

which compiz

to get the full path. Type

dpkg -l | grep compiz

to see in which packages it is replaced. Unlike what was suggested in a deleted comment, metacity is not responsible for Compiz window decoration, but a Compiz plugin called aptly "Decorations".

If, however, you log in using the "Unity 2D" option, you will be using a different window manager, called metacity.


There was another thread about MagicJack on AskUbuntu here:  Does magic jack work on Ubuntu?

There seems to be some possibilities.

Magic Jack, though claiming once that they would support Linux has not done so yet, so it could be as Tim said, and not work.


New Ubuntu install - Resolution stuck at 640 x 480

I guess you're missing video drivers, try to install them from cli:

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

Then reboot.


Please help a noob out with installing Ubuntu

Download Ubuntu 13.10 64 bit version:

http://www.ubuntu.com/download/desktop/thank-you?release=latest&bits=64&distro=desktop&status=zeroc

Use Universal USB installer to create the pendrive:

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

Use the following guide to install:

http://www.ubuntu.com/download/desktop/install-desktop-latest


How can I use cron to restart apache in some conditions

Rather than doing a check every minute, I'd suggest running an endless script checking for your memory threshold and make it a systemd-service:
#!/bin/bash
#memory_check.sh
while [[ "free -m | awk '/Mem:/{print $4}'" -lt  500 ]] ; do
  sleep 5
done

#service called e.g. mem_check.service
[Unit]
Description=continuously monitors memory
After=apache2

[Service]
ExecStart=/path/to/memory_check.sh
Restart=on-failure
#let's give apache some time:
RestartSec=10s

Then add a restart dependeny to your apache2.service in  the [Unit] section with:
PartOf=mem_check.service

The PartOf= dependency forwards the restart of mem_check to apache2.

PartOf=
Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one-way dependency — changes to this unit do not affect the listed units.
When PartOf=b.service is used on a.service, this dependency will show as ConsistsOf=a.service in property listing of b.service. ConsistsOf= dependency cannot be specified directly.

(from https://www.freedesktop.org/software/systemd/man/systemd.unit.html)


How can I get my Brother DCP-135C to scan properly?

You may need to edit your /lib/udev/rules.d/40-libsane.rules file. For scan acess by a normal user in 11.10 add the following lines:

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

See also Brother FAQ for other distributions and Ubuntu versions.


How to install Ubuntu on encrypted luks+lvm on btrfs, replacing grub with systemd-boot? [SOLVED]

So here are the steps:
1. Follow the installation instructions from https://mutschler.eu/linux/install-guides/ubuntu-btrfs/
The tutorial offers two options for the swap, I used a @swap subvolume inside btrfs (Section: "Option B: Swapfile")
You should not follow the section "Add a key-file to type luks passphrase only once". I did follow it and I got a system that unlocked luks without asking for keyphrase. I guess it's because the script of second tutorial (see below) copies initrd.img to EFI partition, and initrd actually contains the keyfile. So just ignore the key-file part.
As for the bootloader ("Install the EFI bootloader") I guess you don't need to follow it. In my installation I did install grub, but then I followed the second tutorial and I uninstalled it, after being sure that systemd-boot works. So you either install systemd-boot straight away BEFORE rebooting, or you install grub (as said in the tutorial), then install systemd-boot and then remove grub.
You then do the rest of the tutorial.
2. Follow the instructions to replace grub with systemd-boot from https://blobfolio.com/2018/replace-grub2-with-systemd-boot-on-ubuntu-18-04/
As for the variables at the beginning of the script, you run the command blkid and take the relevant parts:
-----> /dev/nvme0n1p2: UUID="a32af785-9b88-476b-b63a-2903827df8fc" TYPE="crypto_LUKS" PARTUUID="f1415895-5fa6-864c-8d0f-701b2c0179bb"

type is crypto_LUKS, so you copy UUID.
So the result is:
UUID="a32af785-9b88-476b-b63a-2903827df8fc" # the uuid I took from blkid output

VOLUME="cryptdata" # if you followed the first tutorial, 'cryptdata' is fine

ROOTFLAGS="subvol=@ quiet splash"

You follow the rest of the tutorial, but before running the command apt-get autoremove, be sure you don't remove something you need. In my case the autoremove command attempted to remove Nvidia drivers:
sudo apt-get autoremove
[sudo] password di atti:
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto
I seguenti pacchetti saranno RIMOSSI:
  libdpkg-perl libfile-fcntllock-perl libnvidia-cfg1-460 libnvidia-common-460 libnvidia-decode-460 libnvidia-encode-460 libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-gl-460
  libnvidia-ifr1-460 libreoffice-help-common libxnvctrl0 nvidia-compute-utils-460 nvidia-kernel-source-460 nvidia-prime nvidia-settings nvidia-utils-460 pkg-config
  screen-resolution-extra xserver-xorg-video-nvidia-460

So I had to mark as manually installed whatever had the name "nvidia" in it:
sudo apt-mark manual libnvidia-cfg1-460 libnvidia-common-460 libnvidia-decode-460 libnvidia-encode-460 libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-gl-460 libnvidia-ifr1-460 libxnvctrl0 nvidia-compute-utils-460 nvidia-kernel-source-460 nvidia-prime nvidia-settings nvidia-utils-460 xserver-xorg-video-nvidia-460

Then I could "apt-get autoremove" safely.
NOTE: I'm sure Nvidia drivers were necessary because after autoremove, Nvidia card was not working anymore, and I had to restore the previous btrfs snapshot.


Why is Ubuntu taking up a different quantity of space in a partition than is allocated to it?

The confusion here comes from the inconsistent usage of two unit prefixes, metric/SI and binary.

Technically correct would be:

1 GB = 1 Gigabyte = 1000³ byte = 1.000.000.000 byte
1 GiB = 1 Gibibyte = 1024³ byte = 1.073.741.824 byte

Unfortunately the term Gibibyte is not very commonly used, at least colloquially, and instead Gigabyte (or GB) is often used for both the metric and the binary unit, leading to slightly different numbers.

In your case, the Ubuntu Devices GUI reports the size of the file system as 134.2 GB whereas lsblk and the Windows disk manager show 127.5 GiB for the partition size. Doing the maths on that:

Partition (lsblk/Windows):   127.5 GiB = 127.5 * 1024³ bytes = 136.902.082.560 bytes
File system (Disks GUI):     134.2  GB = 134.2 * 1000³ bytes = 134.200.000.000 bytes

The remaining difference of around 2.7 GB could be due to rounding errors and/or that the Ubuntu Disks GUI already subtracted some space for file system structures etc. from the total space.

You can get the exact partition size in bytes with e.g. lsblk -b. That number should 100% accurately reflect the outer size of the partition, with no unit conversion or rounding going on and without taking anything about the contained file system into account.

The exact total inner size of the file system in bytes should be reported by df -B1. It is slightly smaller due to the mentioned internal file system structures etc. taking up some space too.


How to make Ubuntu Budgie terminal open the already running terminal instead of opening new window

In order to make a launcher for your terminal open an existing terminal instead of opening an new instance, edit the Exec= line of the corresponding .desktop file. You will find the launcher for your terminal in /usr/share/applications.
To customize the launcher, copy it first to ~/.local/share/applications. Then change the command on the Exec= line according to one of the following methods. That local copy of the launcher will replace the system wide one. The advantages of this approach over editing the system wide file are that 1) you do not need to be root to do the changes, and 2) changes will never be overwritten by a system update.
The approach given here is universal. It is not limited to your Budgie desktop environment, can work for any application and can also be used in shortcut keys.
Option 1. wmctrl
A very simple trick is to use the following command for your shortcut key:
sh -c "wmctrl -x -a gnome-terminal-server || gnome-terminal"

This will try to switch to a window with class "gnome-terminal". If that fails, it will launch the terminal. Of course, you need to substitute gnome-terminal-server and gnome-terminal by the actual WM_CLASS and command, respectively,  for your terminal application.

You can find the correct window class for your application with the command xprop | grep WM_CLASS. After running the command, click the window about which you want to have the information, and you will see the WM_CLASS.
wmctrl is not installed by default: you may need to install it first.

Option 2: jumpapp
A more "luxury" approach involves using a utility jumpapp, which actually relies on wmctrl for the "hard work". This tool exists on Github, and is not available within the standard Ubuntu software repositories. A .deb file is available for easy installation, though.
It allows for some more flexibility, avoiding the need for some scripting. For example, if more than one application window is open, repeatedly pressing your hotkey will cycle through the windows. See an extended article on it here.


So does the package management. lt is not intended that individual patches are downloaded. That would mean that the software must be recompiled on your system. For this Ubuntu is the wrong distribution. You should try in this case Gentoo.


How to set up a mail server with multiple domains (12.04)

You can use Virtual Mailboxes which can be used for multiple domains and then it's also easier to add other mailboxes, aliases and other future domains.

I'm running several Ubuntu LTS 12.04 servers with this configuration using Postfix/Dovecot with IMAPS - you can use pop if you want.

If this is for an external (Internet facing server) then you need to create or point your DNS records MX to your server and add the relevant host entries to your server and Postfix configuration. You need to provide more specifics about your scenario and setup so we can help you further.

Here are some tutorial guides on a mailserver setup that may help you:
https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin
https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/

That first guide you refer to with the section that states does not work with 12.04 and above is referring to dovecot.conf file. Here is a sample file that works with 12.04 and I believe 14.04 - you WILL want to modify it to suit your server especially if on the Internet and not just an internal server:

auth default {
  mechanisms = plain cram-md5

  user = root
  socket listen {
    client {
      # The client socket is generally safe to export to everyone. Typical use
      # is to export it to your SMTP server so it can do SMTP AUTH lookups
      # using it.
      path = /var/spool/postfix/private/dovecot-auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}

base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n

passdb {
 args = /etc/dovecot/passwd
driver = passwd-file
}

protocols = imap pop3
service auth {
  executable = /usr/lib/dovecot/auth
  user = root
}
service imap-login {
  chroot = login
  executable = /usr/lib/dovecot/imap-login
  user = dovecot
}
service imap {
  executable = /usr/lib/dovecot/imap
}
service pop3-login {
  chroot = login
  executable = /usr/lib/dovecot/pop3-login
  user = dovecot
}
service pop3 {
  executable = /usr/lib/dovecot/pop3
}

service imaps {
  executable = /usr/lib/dovecot/imap
}

service pop3s {
  executable = /usr/lib/dovecot/pop3
}

ssl = yes
ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key

userdb {
 args = /etc/dovecot/users
 driver = passwd-file
}

valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}


How long does it take to reinstall Ubuntu version 16.04

I am suggesting you backup everything you need on a flashdrive or external disk and do a clean install. I have never even noticied the re-install option you are alluding to but I couldn't expect it to work reliably. Too many edge cases.


Can I convert a .dxf to .png or .jpg with a command tool?

There are a number of vector drawing programs that support DXF files to varying degrees, and have commandline convert capabilities, including dia, inkscape, and even libreoffice.

dia appears to support dxf input and png output e.g.

dia jcsample.dxf -e jcsample.png

or, with explicit output dimensions,

dia jcsample.dxf -s 744x1052 -e jcsample.png

however the result was an empty file in the first case and corrupted in the second, on the sample file that I tried - you may have better luck.
inkscape also appears to support the same functionality e.g.

inkscape -f jcsample.dxf --export-png=jcsample.png

however again the result was unreadable. What did work for inkscape was converting to Encapsulated PostScript first

inkscape -f jcsample.dxf --export-eps=jcsample.eps

and then converting eps to png or jpeg, for example using Ghostscript

gs -sDEVICE=png16m -dNOPAUSE -dBATCH -dSAFER -sOutputFile=jcsample.png jcsample.eps

or

gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r100 -sOutputFile=jcsample.jpg jcsample.eps

[Note that the same trick did not appear to work for dia, even though it also supports PostScript output]

The downside with inkscape is that the dxf import filter pops up a dialog to confirm the default scaling and encoding, making it not truly non-interactive: as far as I know there is not currently a way to prevent that, although there is an outstanding feature request for it (adding the -z or --without-gui switch doesn't seem to help).
libreoffice appears to work directly to either png or jpg

libreoffice --headless --convert-to png jcsample.dxf

libreoffice --headless --convert-to jpg jcsample.dxf

however on the same sample file, the resulting images were scaled to fit centrally in a portrait page; again, the solution may be to use an intermediate vector format e.g. pdf

libreoffice --headless --convert-to pdf jcsample.dxf
pdfcrop jcsample.pdf
gs -sDEVICE=png16m -dNOPAUSE -dBATCH -dSAFER -sOutputFile=jcsample.png jcsample-crop.pdf

Sorry this isn't a one-size-fits-all answer - but hopefully it will give you some things to try.


Can't install nvidia driver 340 ( GT 230M )

You can force installation of the problematic deb package with

sudo dpkg -i --force-all /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb

and then resume package installation:

sudo dpkg --configure -a
sudo apt install -f
sudo apt update
sudo apt dist-upgrade


Installation issues using Ubuntu 13 CD endless load after connecting to WIFI

Most probably your installation has failed resulting in corrupted file system.
U need to post further deatils like where there are other operating systems present, whether u r able to boot into them or is there a grub rescue mode,etc.


Can't reset my JAVA_HOME to new Open JDK 11 Java installation

To Answer the question
The answers and some comments focus on how to set JAVA_HOME to version 11 but the question is partly about "where is version 8 being set?". To answer that see:

`grep`ing all files for a string takes a long time

Use this command:
$ sudo grep -rnw --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var} '/' -e '/usr/lib/jvm/java-8-oracle' | grep JAVA_HOME

/etc/profile.d/jdk.sh:4:export JAVA_HOME=/usr/lib/jvm/java-8-oracle
/etc/profile.d/jdk.csh:4:setenv JAVA_HOME /usr/lib/jvm/java-8-oracle
/home/rick/.gradle/daemon/4.6/daemon-14831.out.log:53:20:45:23.553 [DEBUG] (... SNIP ...) /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin (... SNIP ...) Configuring env variables: {PATH=/home/rick/bin:/home/rick/.local/bin:/mnt/e/bin:/mnt/e/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin,  (... SNIP ...)

This is what my system returns. Yours will likely be different. To make a long story short the culprit is /etc/profile.d/jdk.sh:
$ cat /etc/profile.d/jdk.sh

setenv J2SDKDIR /usr/lib/jvm/java-8-oracle
setenv J2REDIR /usr/lib/jvm/java-8-oracle/jre
setenv PATH ${PATH}:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
setenv JAVA_HOME /usr/lib/jvm/java-8-oracle
setenv DERBY_HOME /usr/lib/jvm/java-8-oracle/db

You probably surmise /etc/profile.d/jdk.csh needs changing too. Indeed it contains the exact same contents as /etc/profile.d/jdk.sh

To address the XY problem
There is a better way than going through files line by line and changing an 8 to an 11.
The easiest method is using Java installer. From this Ask Ubuntu Q&A: Setting JDK 7 as default

To get a list of your installed Java platforms, run the following command from the terminal:

sudo update-alternatives --config java

This will give you a list output similar to this:

There are 2 choices for the alternative java (providing /usr/bin/java).
   Selection    Path                                           Priority   Status
  ------------------------------------------------------------
  0            /usr/lib/jvm/java-6-oracle/jre/bin/java         1070      auto mode
  1            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1051      manual mode
* 2            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1069      manual mode
Press enter to keep the current choice[*], or type selection number:


Custom keyboard shortcut for switch to specific window in unity Switcher

This would take a bit of work but you could do this with scripts and keybindings.

There is a tool called xdotool and it lets you simulate keyboard presses. You can bind your keyboard keys to run scripts that utilize this tool.

Using whatever language you prefer to pipe terminal commands, you can find specific process IDs with
ps aux | grep "process here"

Using xdotool search --pid "process ID here" you will get back multiple window IDs for a single application. I don't know how to sort through them to find the correct one, so what you could do is have your script, iterate thought the found IDs into

xdotool windowactivate "window ID here" which will bring up your window.

For example, my 1 key will be binded to run a script that find the process ID for "filezilla". Then it will find the window IDs with xdotool, take those IDs and then pass them through xdotool to pull up the window. The 2 key, could be "google-chrome"


Installing Ubuntu 16.04 drivers for Nvidia Geforce 820M

The Nvidia adapter will be seen if you instead of grep VGA will use grep 3D.
nvidia-340 is wrong for this adapter. Install nvidia-375.

You have only main and universe repos connected. Go to System Settings -> Software & Updates and enable all other repos, especially restricted. xenial-updates is not connected either. You need to enable it as well.

You may need to update the system before you install the driver.


Gpu works good only if i reset the pc while attempting to the first boot or in live usb mode

solved:

nomodeset

The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

This way you can boot safely, and then dish out to X the business of selecting the appropriate drive for your needs. You might even decide to do no programming whatsoever, and see whether the simple command

dpkg-reconfigure xserver-xorg

(this works on Debian and derivatives, which is your case) might do in your case.

EDIT:

it is possible to disable a graphical boot completely. Copy

  cp /etc/default/grub /etc/default/grub-orig

The edit /etc/default/grub, comment out this line,

  #GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

modify this line to look like

  GRUB_CMDLINE_LINUX="text"

then uncomment this line,

  GRUB_TERMINAL=console

Save, run

   update-grub

when you reboot,if you do not have a broken installation, you will kind yourself in text mode. After reconfiguring X, youmay start the graphical session with

   startx


Which program on XP can I use to open the Lubuntu image I've downloaded?

You downloaded an .iso file, which is a disk image containing all the Ubuntu files you need that can be burned to either a DVD or a USB, and installed off of those mediums. You do not simply open it to install.

I would suggest reading about installing on the Ubuntu Wiki


How do I prevent Adobe's pdf reader from opening a pdf within firefox?

You would have to go to about:addons, select "Plugins" and disable the adobe reader plugin:

There is also another option, which is a bit more complicated:

Go to Edit->Preferences->Applications
Type pdf in the filter box

Choose to "save file" by default instead of opening with the default plugin


How can I completely reinstall gnome-control-center and reset default settings?

Re-installing the package should bring back the files you deleted
sudo apt install gnome-control-center --reinstall


There are several arguments:

Use Repositories/PPAs because they will keep you both stable and up to date with security fixes.

This is mostly true. If, for example, you install python-django as I have, you get security updates. This is good because you only have to keep on top of apt but you still have to test things before you push updates (although testing should be fine each time).

You could argue that if you used pip, you might never check for updates.
Use pip so you can use the proper "stable" versions.

There's no doubt about it: The repos lag behind the real world. Django is 2.0 but the repos for the LTS version of Ubuntu (that a lot of people stick with for servers) you only get 1.8 on Ubuntu 16.4 lts with Python 2 but still get security updates on it.

pip gives you the latest all the time. You just have to update them yourself.
Upgrading a repo-used Python install can be a nightmare

When you dist-upgrade Ubuntu to the next version, it upgrades a lot of packages. Lots of things change. I know in Django this means you have to take care to watch out for code-incompatibilities, deprecations... But the same applies to all other Python code.

The same is true for pip but with pip you get to do one thing at a time. You know what causes the problems so you know where to look to find the fix.
pip+virtualenv lets you keep things separate

virtualenv lets you have portable, little Python environments. This allows you to have several different Python environments running alongside each other on the same machine.

The obvious boon seems to be for maintenance as you can manage the environment in the same way as you manage the code. Even store the environment in the VCS too... but you should remember that having twelve different virtualenvs means twelve environments you need to check on and update.

Edit: After a horrible series of upgrades on a server to get it from Lucid to Precise, I've switched from a mixed Apt+pip (nr 1 and 2) to a pure pip+virtualenv (nr. 4) situation. Instead of having one virtualenv per site, I've got one shared one between a dozen-or-so sites. This is working for now.

I've also had to write a little script that checks the status of packages installed with pip. If there are updates I have to apply them manually (which is good because I test them locally, in a local virtualenv). This is all still a little more painful than it was originally but much better in the long run.


hdajackretask in alsa-tools-gui breaks PulseAudio conf of on-board audio dev in Ubuntu 16.04 LTS

Since I am all new to Linux the method I propose may not be the most efficient one, fyi.

The strange behaviour described in the question is due to alsa being misconfigured either during system setup or upgrade. Besides, if hdajackretest is run with sudo from the very beginning the jack retasking configuration will also fail because hdajackretest cannot properly read “user profile data” as root.
Reinstallation of the entire alsa framework worked for me. Since the system audio service (PulseAudio) works hand-in-hand with alsa reinstallation of PulseAudio is also recommended.

Using the reinstallation command from a package manager e.g. Synaptic won’t work because such reinstallation does not clear up config files created by the application. You must first purge, then reinstall, finally reconfigure. I know this sounds like Windows troubleshooting, but with Ubuntu becoming more and more GUI-dependent there seems to be good reason to think in Windows way on Ubuntu, too.

Detailed steps:

Install aptitude. This is required.
Learn how to use aptitude; there is no mouse support, by the way.
Configure your computer network to automatically connect to the Internet via a cable connection with DHCP enabled and no manual DNS specified. Otherwise you’ll suffer later.
Reboot into recovery mode. Enable network to load more device drivers. Enter root “command prompt”.
Use aptitude to purge uninstall PulseAudio and alsa. Specifically, purge any package containing the pattern “pulseaudio” or “alsa”. You must take a note of all the dependant packages uninstalled together with the two, which includes the Ubuntu desktop shell (so that you won’t have GUI now). Pay attention to version number.
Restart and enter the root command prompt again. Use ping to test network connection. If you don’t have network access, search online with another computer on how to configure network in Linux from the command line.
Use aptitude to install PulseAudio and alsa anew.
Use aptitude to install the dependant packages anew also.
Reboot into normal mode. Your audio configurations are all lost and restored to a fresh-install state.
Run hdajackretask w/o sudo prefix, and do jack retasking config as you like. When prompted for sudo privileges do it.
You should be having functional audio jack retasking now.

If you tried but still things don’t work, I suggest you go back to Windows or Mac for multimedia stuff. Sometimes things just don’t work in Linux as in other OSes and Linux enthusiasts may simply think they don’t need so either.


Disabling bluetooth on start not working

How to make /etc/rc.local work as expected

Since upstart starts its service asynchronously, it's pretty common that not all services are ready when /etc/rc.local is started. So you need to add sleep 3 (or another number, you need to find out yourself) at the beginning of you script.

You have to take care that the script isn't interrupted by a program that return's an error. Example: I can switch between two graphics-cards on my laptop (pre hybrid-graphicscard) and depending on which one is turned on I must use a different /sys/class/backlight/...-file to set its brightness.
The easiest thing is to set both. But to ensure that the non-existing one doesn't interrupt the /etc/rc.local-script I append || true at the end of each command.

So this is how my rc.local-script looks right now (sans the comments at the beginning):

sleep 3

echo 2 > /sys/class/backlight/sony/brightness || true
echo 2 > /sys/class/backlight/nv_backlight/brightness || true
rfkill block bluetooth

exit 0


Ubuntu 12.04LTS becoms slow and jerky randomly for a mintue and then becomes normal by itself

I recommend you determine what system resource is limiting performance during slow down. By that I mean is your CPU at 100% or maybe your hard drive is running like mad. There are system monitor tools that will give you this information in real time such as "gnome-system-monitor".

The system monitor can also tell you what process is using the resource. You could also use a terminal program like "top" or the nicer looking "htop" to identify the process.


Dash, command substitution not inserting newline?

This behavior is actually part of the POSIX specification for command substitution:

  The shell shall expand the command substitution by executing command
  in a subshell environment (see Shell Execution Environment) and
  replacing the command substitution (the text of command plus the
  enclosing "$()" or backquotes) with the standard output of the
  command, removing sequences of one or more  characters at the
  end of the substitution. Embedded  characters before the end
  of the output shall not be removed; however, they may be treated as
  field delimiters and eliminated during field splitting, depending on
  the value of IFS and quoting that is in effect. If the output contains
  any null bytes, the behavior is unspecified.

So the normal quoting rule "$(...)" only preserves non-trailing newlines.

Some suggestions for preserving trailing newlines are given in shell: keep trailing newlines ('\n') in command substitution

See also When printing a variable that contains newlines, why is the last newline stripped? for discussion of the rationale behind the specification.


Moving only those files that appear in the list

If the list is in the file /tmp/list.txt you can do in the following way:

cat /tmp/list.txt | xargs mv -t /app/dest/

or shorter:

xargs mv -t /app/dest/ < /tmp/list.txt

Is a combination of commands:

mv -t /app/dest/

For move all SOURCE arguments into DIRECTORY using the option  -t or --target-directory=DIRECTORY

And using the command xargs which execute command lines from standard input, but in this case every line on /tmp/list.txt because we made a redirection using the <

credit to this other Q&A https://unix.stackexchange.com/questions/115734/move-file-by-list-in-file-with-leading-whitespace


Sometimes os-prober is wrong.

Look at the UUID of your Windows 10 partition, for exemple:

sudo blkid /dev/sda2

Then edit /etc/grub.d/40_custom, and at the end of the file add:

menuentry "Windows 10" --class windows --class os {
   insmod ntfs
   search --no-floppy --set=root --fs-uuid $your_uuid_here$
   ntldr /bootmgr
}

Don't forget to change the UUID.

And finally update your grub config file:

sudo update-grub

Source


To replace the Ubuntu logo with Apple logo in Powerlevel10k prompt you need to add the following parameter to ~/.p10k.zsh:
typeset -g POWERLEVEL9K_LINUX_UBUNTU_ICON='\uF179'


What is the difference between using System Monitor and Terminal to kill a process?

There is no difference between the kill command and the System Monitor's 'kill'. The System Monitor just gives some arguments to kill that I assume you don't know.

When you kill <process-number>, it's actually sending a signal to that process to cleanly exit. This is called a SIGTERM. In order to kill a process unconditionally, potentially causing data loss, you need to send a different signal:

kill -9 <process-number>

This sends a SIGKILL to the process, which immediately ends its execution. System Monitor uses kill -9 when you ask to 'kill' a process rather than simply 'close' it.

This answer on the SuperUser Stack Exchange should be of help.


Screen resolution not right on a new install

Unfortunately the support for VIA Unichrome in linux is not that great - I've read that there are some development activity (search on Phoronix) - but whether this leads to something better, we'll have to wait.

You could try the following to create a new resolution - however it may not work for your graphics card & open-source driver.

xrandr -q gives you list of modes and displays which should list the two resolutions you see in the Monitor resolution screen

Look for what output device you are connected to e.g. LVDS1, VGA1 etc

First type:

cvt 1024 768

This should output something like this

1024x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
Modeline "1024x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

copy everything AFTER Modeline and paste to xrandr --newmode.
:

xrandr --newmode "1024x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

Now type the following - n.b. substitute VGA1 for your output device

xrandr --addmode VGA1 1024x768_60.00
xrandr --output VGA1 --mode 1024x768_60.00

now that should adjust your resolution, look in the monitors applet in system prefs, should be there, set it and apply...


Juju and problem with subcontainers deployment on LXC

The OpenStack Autopilot will (under the hood) use the MAAS provider for Juju, you can't use the Landscape OpenStack Autopilot with a local Juju environment.

That said, you can use the Ubuntu OpenStack Installer's single installer mode to limit your hardware footprint to one machine. It will install OpenStack in LXC containers on your machine.

Your error from attempting to nest LXCs is solved by following the steps in the Server Guide, note that using nested LXCs this way to deploy OpenStack is unsupported, please follow the single installer path if you can't have enough hardware to deploy OpenStack in the Autopilot.


You can trust them as much as you trust the people who put them up. Anyone can put up a PPA; a repository owned by some random user is obviously less trustworthy than the official LibreOffice PPA, for example.


There will be no files recoverable from your old Windows installation without using forensic software tools.

If you really want to bleach a drive clean, boot a LiveCD, open a terminal.

List the available disk and partitions (to work out which device your disk is)

sudo fdisk -l

And then copy zeroes over the whole surface

dd if=/dev/zero of=/dev/sda bs=8M

Replace the /dev/sda with the disk device that you wish to wipe (/dev/sda being the first available hard drive in most modern systems). Be very careful. If you have external backup drives, etc, I recommend you unplug them before doing this

Argument reference

dd ; a raw file copy / convert tool
if input file, in this case, a virtual device full of infinite zeroes
of output file, your disk device (in Unix, everything is a file)
bs block size ; we use 8M to make things go faster


Is it possible to run Gnome 3 without 3D acceleration hardware?

GNOME 3 has GNOME Shell (requires 3D acceleration) and GNOME Fallback (does not require 3D acceleration, it's similar to the traditional GNOME 2 Panel).

There are no plans to make GNOME Shell to work without 3D acceleration, so sadly you are out of luck.

Reading your question, I think it would help if you can run

/usr/lib/nux/unity_support_test -p

which will show whether your driver for the graphic card is capable for 3D acceleration. Post the results in your initial question.


That password policy is not 19.04 but was introduces years ago. At least 14.04 did it the same way. It is a feature of PAM.

Use

sudo nano /etc/pam.d/common-password

and change

password     [success=1 default=ignore]    pam_unix.so obscure sha512

to

password     [success=1 default=ignore]    pam_unix.so sha512 minlen=4


How to safely shutdown Guest OS in VirtualBox using command line

If you open up Gnome Power management preferences, you can set what actions to take when the power button. If you set it to shut down, it will shut down gracefully when you press the virtual power button with the VBoxManage controlvm Ubuntu acpipowerbutton
 command.


Why syntax error near unexpected token `fi' is coming

If it's a bash script, make sure you have included "#!/bin/bash" on the first line of your script file.


Instant Messager that supports video and voice chat

Empathy and Pidgin support video and audio chats over Google Talk/Jabber/XMPP protocol. You could also give the recently launched Google Video and Voice Chat an try.

Skype also supports video and voice chat on Linux.

Or you could use Ekiga (VoIP client) for video and voice.

Gyachi has this on their web page:

  This Yahoo! client for Linux operating
  system supports almost all of the
  features you would expect to find on
  the official Windows Yahoo! client:
  Voice chat, webcams, faders,
  'nicknames', audibles, avatars,
  display images, and more. Yet, it
  remains very light-weight and
  memory-friendly.memory-friendly.

Meebo is a web service that supports voice and video chats on Linux.


You'll have to change your permissions back to what they were. Many system programs have specific permissions requirements, and changing permissions outside of your home directory isn't a good idea unless you specifically know that it's safe to do.

If you changed a bunch of permissions and don't know their original values, you're looking at a reinstall. Fixing a large number of permissions would be really difficult to do correctly.

If you aren't able to use the chmod and chown commands due to your messed up permissions, boot into the live CD, mount your hard drive, and fix the permissions from there.


Is this bug (Intel BayTrail Freeze) fixed in Ubuntu 17.10?

I am using Ubuntu 17.10, and I have Intel BayTrail graphics. No freezes encountered so far.

The patch mentioned in the linked post was merged in kernel 4.11 and is still present in kernel 4.13, which 17.10 uses.

While this may not fix the problem for all BayTrail devices, it's widely reported to have improved or fixed this issue.


Valgrind - problem with held broken packages

You can get a list of actual held packages with:

dpkg --get-selections | grep hold

Another method of troubleshooting may be to use aptitude rather than apt-get to try to install your package:

sudo aptitude install valgrind

Aptitude will give up less easily, and will attempt to find solutions which may involve modifying other packages. It may give you more explanation of the problem and options for fixing it.

source


How can I know who is using my wireless?

Install iftop.

sudo apt-get install iftop

This will install a little package which will let you listen for incoming connections. Of course, this could have its limitations if you are using this to detect unwanted intruders in your network who may be able to fly under the radar. But for the use case where you think a general user is using your wifi or something, this will do the trick. Use iftop as follows (Must be run as root) -

sudo iftop


Suddenly sudo gets error 'usr/bin/sudo must be owned by uid 0

Is it possible that you ran a recursive chmod command at the root level recently?  Accidentally or otherwise?  Resetting chmod to a standard value like 0755 will remove all setuid bits.

There are dozens of files on your filesystem that require special permissions to work correctly and for which a simple permission like 0755 or even 0777 won't work.

There isn't a reliable way to undo this without reinstalling, since this is a lossy operation: there's no way to revert each file to the permissions it was previously.


Can't run pip from virtualenv - Segmentation fault (core dumped)

I solved this by first creating an environment using Python 3.6: pipenv --python 3.6. In this environment, both pip and pip3 worked. I then exited this environment, deleted both Pipfile and Pipfile.lock and then created another environment using pipenv --python 3.7.2 in the same directory and both pip and pip3 worked again.

I guess it must be an issue with Python 3.7.2?

Edit:

As Shaun mentioned below, it could be to do with anaconda being installed alongside vanilla Python and removing anaconda fixed it.


Ended up I had a virus.
Solved using the information from here.
CPU 100% with kswapd0 process, although no swap is needed


It seem that ufraw is unmaintained => https://en.wikipedia.org/wiki/UFRaw

You can use instead dcraw .


nm-applet disappeared from top panel Ubuntu 12.04

Do:

sudo apt-get install --reinstall network-manager network-manager-gnome

that should reinstall nm-applet to the tray, you may have to reboot.


Find and print first word with matching pattern

You can do this using grep with PCRE (-P) :

grep -Po '.*(?=\(son\))' file.txt

(?=\(son\)) is the zero width positive lookahead pattern ensuring that (son) follows after the match i.e. only (-o) the names followed by (son) will be shown on the output

Example :

$ cat file.txt
Name                   Age
Ashok Kumar(father)    32
Deepak khan(son)      19
Nirmal khan(son)       21

$ grep -Po '.*(?=\(son\))' file.txt
Deepak khan
Nirmal khan


External display mirroring builtin on Lenovo G560

display settings doesn't have much with BIOS settings, to change output from mirror to dual screen you have to go to "System Settings" then to "Display and Monitor" (I think that it has same name in Ubuntu and Kubuntu), click on monitor and set resolution and position (drag second monitor icon to the left or right of first one). There you have also an option to mirror displays that you have to uncheck.


You should mention your system configuration in little more detail. Anyways the minimum system requirements for running Ubuntu (from https://help.ubuntu.com/community/Installation/SystemRequirements) are

1 GHZ processor
1 GB RAM
15 GB Harddisk space
Graphics card and monitor capable of 1024 by 768

Based on the specs for your laptop, that I found on internet, it is well above the minimum requirements. So you should have no problem running Ubuntu 10.10 or Ubuntu 11.04 on it. If you cant boot Ubuntu using live CD on your laptop then it is some other problem and you can ask question about it here.

In my experience Ubuntu runs easily on machines with lot less capable hardware. I ran Ubuntu 9.10 on a Pentium 3 with 384 MB of RAM but XUbuntu ran a lot better on that machine. So for your old PC I would suggest you install XUbuntu. Its UBuntu with different Desktop Environment i.e XFCE which is a lot lightweight than GNOME or KDE. From the same webpage I mentioned above the minimum hardware requirements for XUbuntu are

256 MB Memory
2 GB of disk space
Graphic card and monitor capable of 800 x 600 resolution

As you can see this is not much to ask for.

Good Luck