How does date command interact with timedatectl?

You are asking a lot of good questions, I'll try to answer them, but I also suggest you read this unix.stackexchange q/a on time on linux.  It should provide you with some more in depth background than just the specific questions you are asking.

Some Background Info

timedatectl is a program to interact with systemd-timesyncd, which is a lightweight NTP client provided by systemd.  Run man timedatectl to get an easy-to-read description of the program.  For instance Network time on: yes just means that the systemd-timesyncd service is enabled.  That's it.

This also explains why you won't see ps faux |grep ntp return anything.
 The built-in ntp client is called systemd-timesyncd.

date is a program to query and manipulate the system date and time.  This is the time that your operating system thinks it is right now.  If you ran this with the -s argument, it will allow you to adjust your system time

About your sample machines

machine-1 you said is a machine running virtualbox.  This allows you setting the system clock normally (and even has a virtual hardware clock for you to mess with if you want).

What you describe sounds normal, you have skewed the clock a day, and the ntp client will no longer sync correctly.  This is why the ntpdate command existed for a long time in ubuntu, it's a one time command to bring the clock into alignment, and hand it over to an ntp client.  systemd-timesyncd now has this functionality built-in, but it only runs at startup, not all the time.

machine-2 you said is a laravel forge machine.  I'm not sure what that is specifically.   If you run sudo date -s '2018-04-18 12:00:00', does it let you do it?  What does it say?  It could be you don't have the ability to change the system clock on that server.  It could be a container (docker, lxd) of some kind, for instance.


I unchecked "dim the display", but it's still diming


Resolved!
Turned out to be a hardware problem and not a software one at all. The OWC external disks are just trash, that's all that that was. MyBook external disks go seamlessly between Linux and Mac, absolutely no problem with cross-mounting and cross-reading/writing.
Don't buy OWC external disks. They are also extremely slow on Linux to the point of being unusable, like transfer rates of under 1Mb/s on USB3.


You could try to add the line to your personal profile, in:

$HOME/.profile

Just type this in a terminal:

echo "PATH=$PATH:/usr/local/go/bin" in "/etc/profile" >> $HOME/.profile

Then, log out and log in again, or reload the configuration with:

source $HOME/.profile


Ctrl+Alt+T to open a terminal.
Issue the command
sudo apt-get install firmware-b43-installer
Press Y and Enter when prompted
once the operation completes, restart and see if you can connect to a wireless connection via  your network manager
The long and dandy of it:
You're running a Dell, which I assumed is an older one (since you didn't specify) and I am assuming it has a Broadcom wireless chip which requires proprietary drivers, this command will install those.
if your problem persists
Issue the command
sudo apt-get remove firmware-b43-installer
Press Y and Enter when prompted
then issue the command
lshw -C network
and post the results in an edit to your question


Ubuntu doesn't recognize Intel HD graphics 3000

Install Mesa-Utils by running these commands:

sudo apt-get update
sudo apt-get install mesa-utils

Then it will be detected.


Can not open cpp excutable after compilation

You're having problems with your source code.  It's executing.  The compiling commands were executed correctly.  The error is being generated by your program that when it runs.

You'll have to debug your source code to fix it.

It's great practice to code with a text editor.  But you might consider using a GUI such as Eclipse to assist in the debugging of your source when it grows a little big for handing.


For all those who want to watch YouTube in Ubuntu - Install YouTube All HTML5 and forget Flash forever. The downside: Videos will not be available in 240p and 1080p but in other formats you can watch.


Will Ubuntu erase my my current OS if I install it from a bootable usb?

On a ubuntu live-usb,if you run the Ubuntu installer,it tries to install the Ubuntu Os on the hard-disk.

If you choose install Ubuntu alongside windows option,the installer formats all the partitions other than windows partition(C partition) and install Ubuntu on it.
If you choose erase the disk and install Ubuntu option,the installer formats the whole disk and installs only Ubuntu.
If you choose something else option,the installer force you to manually select the partition where Ubuntu is going to be installed.


Installing Ubuntu 14.04 guest OS another Ubuntu 14.04 host machine with LXD hypervisor

sudo lxd-images import ubuntu --alias ubuntu
lxc launch ubuntu your-container
lxc exec your-container bash

That will import an Ubuntu 14.04 image into LXD and spawn a container from it, then give you a shell inside it.


Vi has to be called to the foreground to interact with it:

#!/bin/bash
vi &
pid=$!
fg
for times in {1..600}
do
        kill -0 "$pid" || break
        sleep 1
done
kill "$pid"
reset

Also, in this case, we have a loop 600 times to wait 1 second so that we can check if vi is still running. If not, then we can stop waiting and continue with the script.

In addition, this explains why reset is used at the end.


Booting Ubuntu 12.04.1 from a flash drive

If you're on Windows use the Universal USB Installer. Else, you can use the unetbootin to get it properly:

sudo apt-get install unetbootin


Which media players available in the Ubuntu repositories uses GStreamer, GTK+ and were written in Python?

Exaile is an excellent media player in the standard repositories (the exaile package) written in Python and GTK+ which uses GStreamer. The code is hosted on launchpad: https://launchpad.net/exaile Not GTK+ 3 or Python 3 yet but some work was started: https://bugs.launchpad.net/exaile/+bug/846379

Quod Libet is another option in the quodlibet package (found thanks to Timo's tip below), and the code is available here: https://code.google.com/p/quodlibet/ The 3.0 version (not in the repositories yet) appears to be ported to use GObject Introspection, but still uses Python 2 as well.


it seems that official images of Ubuntu 14.04 are not available yet. I'm trying with the Robert Nelson's tutorial to make a Ubuntu 14.04 image. I can access the console, but the x server fail to start and i don't know how to make the GUI appear. The typical

Fatal server error:
no screens found

Appears. So, for now the Ubuntu image do not work too well.


Why can't you have multiple instances of Synaptic?

Synaptic is just a graphical front-end to APT (Debian's package manager: Advanced Packaging Tool).

APT automatically locks one of a few special files (/var/lib/dpkg/lock among others) as it runs any operation. It is theoretically possible to programme APT to allow for concurrent processes to modify the package database. However, in practise, it is difficult to do so without risking corruption. Since most users don't need to use the packaging tool in this way, the developers have decided to disallow concurrency by implementing a lock.

If you want to install several packages at once, you can do this by ticking all of those packages in Synaptic, or listing them on the command-line, like this:
sudo apt-get install package1 package2 package3


On Windows

Refer to the official Ubuntu documentation here - http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows. You can find the instructions and ideal usb siz there.

If you are on a Linux Machine

You can use unetbootin.


Find files that are installed by a package

to list all files of package:
dpkg -L desmume


Ubuntu 17.10 Anyconnect vpnagentd.service: Start operation timed out

I suggest using the network manager integration for this:

sudo apt install network-manager-openvpn network-manager-openconnect network-manager-openvpn-gnome network-manager-openconnect-gnome

and then configuring the openconnect library to connect to your VPN rather than the Cisco client.


Error running a script: ?#!/bin/csh: No such file or directory

You most likely have one or more non-printing characters at the start of the script, which are invisible when you look at the script in an editor (or via 'cat') but are preventing the correct csh interpreter from being invoked. The remaining errors are probably just because the system is falling back to the default (bash) shell in which syntax like

if ($1 != "") cd $1

is incorrect, and will disappear once you fix the shebang line so that the intended shell is invoked.

I'm not sure the best way to remove non-printing characters - you could try something like

sed -i '1 s/^[^#]*//' most_plasim_run

which will delete anything up to the first # character in line 1 of the script - or you could open a new empty file and insert a 'clean' shebang line

#!/bin/csh

and then copy and paste the rest of the script in and re-save it.


Fix thunar doesn't show image/video thumbnails in xubuntu 18.04

Every post out there that tries to fix the problem of thumbnails they do the following or something similar

$ killall thunar
$ sudo apt install tumbler tumbler-plugins-extra ffmpegthumbnailer
$ thunar -q

and that's it, they open thunar, and thumbnails magically appears, but the ugly truth is You need to restart your machine.


Unable to download/ save audio files- I can only listen but not save the file

Right click on the audio file link and then select "Save Link As" option.
Give a name for that file and then select save.Now your firefox browser will automatically starts to download that audio file.


How can I change permissions on external drives?

After I purchased a new computer, I needed to get my thumb drives working on it.
Here's the procedure:

Open "Disk Utility", and look for your device, and click on it.  This will let you be sure you know the correct filesystem type and device name for it.  In my case, it was 'ext4' and '/dev/sdb1' respectively.  Next: Decide what you want to call your thumb drive.  I called mine 'USB16-C', but you choose your own name. Before closing Disk Utility, click unmount. And USER should be your login name.
Then run steps 2 to 4 in a terminal window.

sudo mkdir -p /media/USB16-C

sudo mount -t ext4 -o rw /dev/sdb1 /media/USB16-C

sudo chown -R USER:USER /media/USB16-C

Now my thumb drive is accessible, and it automatically connects when I reboot too.


you can use greasemonkey script extension in chrome.

For more information & usage  www.howtogeek.com

One more similar add-on to that Tampermonkey


Open-source drivers, called by Mesa stack. Mesa provide lastest OpenGL which your AMD card supports. Mesa 18 provide (afaik) 1.1.60 Vulkan if your card supports. Yes Mesa provide OpenCL for some cards but not so dependable.Check all:
https://www.x.org/wiki/RadeonFeature/
It says my card support ROCm while it wont work on my PC.

AMDPRO stack now supports Ubuntu 18.04, so i think you should use proprietary driver. It seems their Vulkan(AMDVLK) yields a little more performance at benchmarks. But i wonder if proprietary driver's
OpenCL works.


Wifi is not working. I have a laptp Hp with RTL8723BE. It says *-network UNCLAIMED

Try this in the terminal:

echo "options ath9k nohwcrypt=1" | sudo tee  /etc/modprobe.d/ath9k.conf

then type:

sudo modprobe -rfv ath9k

then:

sudo modprobe -v ath9k

I hope it helps!


Use dedicated gpu only on laptop running Ubuntu 20.04

After installing the graphics drivers from Nvidia, there will be an app installed called NVIDIA X server Settings. There is a section called as Prime-Profiles. Under that you can select performance mode (NVIDIA Graphics card only), On-Demand mode (like Windows, for basic task only integrated gpu, heavy task dedicated gpu), or powersaving mode(integrated gpu only).
Alternately you can run sudo prime-select nvidia which will select the dedicated NVIDIA card only.
Note: You will need a reboot to apply the changes.


How to configure two static interfaces in virtuabox ubuntu server 18.04 guest using netplan

gateway4 refers to the router used for the default route.  You should generally only have one of these.  You should not list a gateway on enp0s8 if it's only used for host connections.  You probably don't need to add any routes at all, as the local route to 192.168.1.0/24 is probably the only one you need.


How to convert "sensor" names to a /sys path?

Take a look in /etc/sensors3.conf.  This is where sensors will label and convert many of the values in /sys/devices/platform/* to what you see in the sensors output.  You may also be able to find custom entries on the internet for your motherboard, and could even create your own if you know how.

For instance, my board is nct6791-isa-0290 and there is a default entry for  "nct6791-*" already in /etc/sensors.conf.  After searching around, I found several versions of other configs for my motherboard out there, like this thread that discusses how it was generated.  http://www.spinics.net/lists/lm-sensors/msg42249.html


native FAF on ubuntu (QtWebKit on ubuntu 17.04+)

Note: the steps for Python 3 with PyQt5 are proven to work while the steps for Python 2 with PyQt4 and PySide are still experimental.

Python 3 with PyQt5 (proven to work)

It appears that the 474-feature-py3 branch of the FAForever/client GitHub repository uses Python 3 with PyQt5, which contains QtWebKit. Therefore, using this branch is the most straightforward solution. Note that PyQt5 (but not PyQt4) can in fact be installed with pip, so that makes things way more convenient.

Steps for Python 3 with PyQt5:

cd into a directory of your choice, which will be ~/Desktop/temp for the purpose of writing this answer, git clone the FAForever/client GitHub repository and git checkout the 474-feature-py3 branch:

mkdir ~/Desktop/temp
cd ~/Desktop/temp
git clone https://github.com/FAForever/client.git faf-client
cd faf-client
git checkout 474-feature-py3

Create and activate a virtualenv for Python 3 (the default is Python 3.5 for Ubuntu 17.04) and force-upgrade pip just to make sure it is up-to-date:

virtualenv venv -p python3  # replace python3 with python3.6 if you want to use Python 3.6 instead
source venv/bin/activate
pip install -U --force-reinstall pip

Use pip to install PyQt5 and from requirements.txt:

pip install PyQt5
pip install -r requirements.txt

Download the faf-uid binary into faf-client/lib and make it executable:

wget https://github.com/FAForever/uid/releases/download/v4.0.4/faf-uid -O lib/faf-uid
chmod +x lib/faf-uid

Run python on src/__main__.py:

python src/__main__.py

Python 2 with PyQt4 and PySide (experimental)

It looks like I may have figured out how to import the QtWebKit module, but I don't have the FAF game installed, so I cannot fully verify that this works and therefore this answer is a work in progress.

In a nutshell, I used apt to install python-qt4, which does not have the QtWebKit module. I created and activated a virtualenv without using the --system-site-packages option and used pip to install PySide, which does have the QtWebKit module. I then symlinked the appropriate system libraries and files for PyQt4 into the virtualenv. Then I made a couple of changes to faf-client/src to import the QtWebKit module from PySide. This solution is inspired by https://stackoverflow.com/a/28850104/486919, https://stackoverflow.com/a/36887302/486919 and https://stackoverflow.com/a/37616466/486919.

Steps:

Install python-qt4:

sudo apt update
sudo apt install python-qt4

cd into a directory of your choice, which will be ~/Desktop/temp for the purpose of writing this answer, git clone my version of the repository and git checkout the patch branch:

mkdir ~/Desktop/temp
cd ~/Desktop/temp
git clone https://github.com/edwinksl/client.git faf-client
cd faf-client
git checkout patch

This patch branch has several additional commits compared to the default develop branch: 1) it gets rid of the version specification for cx_Freeze, which was giving me installation problems if I used the 4.3.4 version previously specified, and 2) it imports QtWebKit from PySide instead of PyQt4.
Create and activate a virtualenv for Python 2 and force-upgrade pip just to make sure it is up-to-date:

virtualenv venv
source venv/bin/activate
pip install -U --force-reinstall pip

Use pip to install PySide and from requirements.txt:

pip install PySide
pip install -r requirements.txt

Download the faf-uid binary into faf-client/lib and make it executable:

wget https://github.com/FAForever/uid/releases/download/v4.0.4/faf-uid -O lib/faf-uid
chmod +x lib/faf-uid

cd to the site-packages directory inside the virtualenv and make appropriate symlinks:

cd venv/lib/python2.7/site-packages
ln -s /usr/lib/python2.7/dist-packages/PyQt4/ .
ln -s /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so .

Note the . at the end of each symlink.
cd back to faf-client and run python on src/__main__.py:

cd -  # this goes back to previous directory, which should be ~/Desktop/temp/faf-client
python src/__main__.py


What is your PC model?
Are you using legacy bios or UEFI mode?
If you are using UEFI, it should be under "boot" or "security" menu.
I installed Ubuntu and I'm using default grub without disabling secure boot!


You probably would like "Xtreme Download Manager". Visually similar to IDM and cross-platform. (You will need OpenJRE)

  Check this link : http://xdman.sourceforge.net

Xtreme download Manager can grab downloads from Firefox. Or you can use FlashGot addon in conjunction with the download managers listed here - http://flashgot.net/features


I don't have commenting privileges yet, but I just wanted to mention that I too experienced a freeze just now after updating to 20.04. That is the first and only freeze I can remember in my many years of running Ubuntu. (I am able to login though.)


2 commands:

~$ cat /proc/swaps
Filename                Type        Size    Used    Priority
/swapfile                               file        2097148 0   -1

and

$ grep swap /etc/fstab
/swapfile                                 none            swap    sw              0       0

So both point to:

$ cd / && ls -l swapfile
-rw------- 1 root root 2147483648 apr  2 18:56 swapfile

Disable and remove:

sudo swapoff /swapfile
sudo rm /swapfile

Create a 2Gb swapfile, set permissions, format it as swap and enable it:

sudo fallocate -l 2g /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile


My pc shut down automatically when I unplug the charger on ubuntu 18.04

A laptop battery can look OK, but when you increase the current you draw from it, can suddenly drop its output voltage, resulting in the shutdown you mention.

Your best way to confirm that is to replace the battery, for battery testers which work on laptop batteries are few and far between.

BTW, Asus Support at https://www.asus.com/us/support/ has free chat agents who can help you verify this theory.


How to use Kaffeine with open source drivers for nvidia

To use Kaffeine with open source drivers, disable deinterlace

On the Kaffeine menu bar, click Playback >>  Video >> Deinterlace

This answer was hidden obscurely on launchpad in a bug report.
The bug was reported numerous times but the answer is well hidden
and will only be found after considerable digging to find the
right article and sufficient reading to get to the point where
the answer is finally revealed.


Still it can not be done. Because data are too random. There is no way to find the sequence of data.


Same as everyone else...Ubuntu 16.04 won't boot past login/password

For HOME directories with no encryption

  Note: I have done the nasty solution and the epiphany, the others are
  in theory for me. The workaround to the internet connection I have
  done many times. You can reinstall a whole system even when the home folder is within the root folder if the software can match in version, in the case of an upgrade all software is up to date so you can simply re-install with latest updates.If you don't have internet connection you can try the work around. Links have nothing to do with the solutions I just wanted the Orange coloring.

Nasty steps

Boot a 16.04 Ubuntu live session and check if the software sources was correctly changed if yes then configuration files should be in order so you can delete everything but HOME where your user files are. Check the option to install updates while installing and you should be back in the game. And don't forget not to format (Don't format the disk) the disk during installation, I think you'll get a non-sense warning since you already deleted any system binaries ( Let's consider that a Bee boop ).

Nice Steps

If software sources was not installed correctly then you'll need to run the apt-get dist-upgrade command from the terminal you have logged on.

If yes then install aptitude and reinstall the ubuntu-desktop package.

Workaround the lack of internet connection

Download the software packages from another computer and copy via USB flash card to the path /var/cache/apt/archives

You can also check this folder in your installation to see if the update packages are still there just waiting for autoremove help them meet their fate.

The epiphany solution ( you computer will realize why deja-dup sounds like deja vu )

  This one works with encryption if your are logged in

In your tty console do :

cd /

Insert an external disk

lsblk to see the path to the disk

This is my output

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 223.6G  0 disk
├─sda1   8:1    0     1K  0 part
├─sda5   8:5    0 215.6G  0 part /
└─sda6   8:6    0     8G  0 part [SWAP]
sdb      8:16   0 465.8G  0 disk
├─sdb1   8:17   0     1K  0 part
└─sdb5   8:21   0 465.8G  0 part /home
sdc      8:32   1   3.7G  0 disk
└─sdc1   8:33   1   1.5G  0 part
sdd      8:48   1  29.1G  0 disk
└─sdd1   8:49   1  29.1G  0 part /media/user/DOC

My USB, AKA ( Uniform Speedy Bunker )

└─sdd1   8:49   1  29.1G  0 part /media/user/DOC

So now inside the root "/" ( you can run "pwd" to Print Working Directory ) :

cp -rva home /media/user/DOC/home_bkp

This will copy every file, hidden ones included.

Install a clean system with identical settings and copy the files from home_bkp to your HOME folder.

  Note :  Users are identified with ID's by Linux, usually a single user
  system will have an ID 1000 AFAIK


Ubuntu 20.10: Firefox 82+, Intel HD 500, Vaapi hardware acceleration

After a lot of trial and error, I was able to enable and verify that 4k/60fps vaapi video hardware acceleration is working via VP9 and X11 on my system.
Step #1:

Ubuntu should already ship with all the necessary Mesa gpu drivers by default (Intel / Radeon)
In my case, I performed sudo apt-get install i965-va-driver vainfo just to be sure
Usually sudo apt-get install vainfo should suffice

Step #2:

Open a terminal and type vainfo in order to see what codecs your gpu supports (see my initial question further above)

Step #3, launch Firefox and set the following to true via about:config:
 - gfx.webrender.all
 - gfx.webrender.compositor.force-enabled
 - media.ffmpeg.vaapi-drm-display.enabled
 - media.ffmpeg.vaapi.enabled

Step #4, set the following to false, if your gpu supports the VP8/VP9 hardware acceleration:

media.ffvpx.enabled

Step #5:

Close Firefox
Open a terminal and launch Firefox via MOZ_X11_EGL=1 firefox

Step #6:

Browse Youtube, for example, and right-click a video -> stats for nerds
Check viewport / frames for dropped frames (ideally, you should have zero dropped frames)

Step #7 (optional):

Create a shortcut with the env set to MOZ_X11_EGL=1 firefox
See here for more infos

That's pretty much it. Have fun!


403 forbidden for django + gunicorn + systemd + apache?

I know this is an ancient question, and OP may have resolved the issue, but as far as I can see, you have started Gunicorn on port 8000, and the told apache to listen to the same port. Since two applications are listening on the same port, that probably creates the conflict. Judging by the output of you processes, gunicorn is already running. It will be enough to remove Listen 8000 from apache configuration file, and restart apache again. This should resolve the problem.


How do I install video4linux2 in Ubuntu 12.10, and do I need to?

In a terminal:

sudo apt-get install v4l-utils

http://www.techytalk.info/webcam-settings-control-ubuntu-fedora-linux-operating-system-cli/


The option is there but quite hidden, you should just start typing and a filter box will appear, you can search through your history with that.

Source.


To add a PPA, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:<PPA_Name>

And then do

sudo apt-get update

To download the package lists from the repositories and "updates" them.


''Unable to install GRUB in /dev/sda'' with dual boot Win 10

You're in deep trouble. Your Windows installation uses the Windows Logical Disk Manager (LDM) configuration, aka "dynamic disks," indicated in MBR by a type-0x42 partition type. Ubuntu doesn't play nice with this Microsoft-specific partition type. It appears, though, that you've modified the LDM container partitions, which may well have damaged them.

Your best bet is to use Windows recovery tools to back up all your important data and then start again from scratch -- that is, re-install both Windows and Ubuntu.

When you move forward, I recommend installing both Windows and Ubuntu in EFI mode; using BIOS mode complicates the boot path, as described here. Before you do more, here's some extra reading:

Adam Williamson's blog entry on how EFI works -- This page describes the theory behind EFI-mode booting.
My page on installing Linux on EFI systems -- This page is a more practical introduction to EFI-mode booting than Adam Williamson's blog.
The Ubuntu community wiki entry on UEFI -- This page is a bit disjointed, but is the most Ubuntu-specific introduction to EFI and its issues.


You may first create a raw image via dd, and then convert to any supported format via qemu-img e.g.:

dd if=/dev/hda of=/path/to/dir/hda.raw
 qemu-img convert -O qcow2 /path/to/dir/hda.raw /path/to/dir/hda.qcow2

Or to save disk space omit the dd part: qemu-img can read directly from disk:

qemu-img convert -O qcow2 /dev/hda /path/to/dir/hda.qcow2

In both cases a virtual disk in qcow2 format is created. To see a list of supported formats and options, see man qemu-img. Maybe you have to execute the commands prefixed by sudo to get access to /dev/hda.


Can't put windows on a flash drive, even with dd, winusb and unetbootin

I figured it out. Windows has a unique bootloader that unetbootin - designed for linux - doesn't correctly see and use. Used a friends computer and made a flash drive with rufus with no problem whatsoever. Thanks for being completely useless for three months.


Updated ISO with all the updates already applied for LTS release?

Just go to http://releases.ubuntu.com/14.04/  and download the 14.04.1 version
applicable to you.
Its the Latest version of Trusty Tahr with all the bugs fixed and patched till this July.


Steam needs to install addition packages libgl1-mesa-dri:i386 and glx:i386

Thanks to nephente for finding the answer and the person in that thread he linked to for answering it. Solution was the following code

sudo apt-get install libc6:i386 libgl1-mesa-dri-lts-utopic:i386 libgl1-mesa-glx-lts-utopic:i386


apt update docker.com Release 404 not found

According to the docker page for Ubuntu, the problem is that it should be https://download.docker.com/linux/ubuntu instead of https://download.docker.com/linux/debian.

Run the following command to fix this:

sudo sed -i 's/debian/ubuntu/g' /etc/apt/sources.list.d/docker.list
sudo apt update

However, if that doesn't fix the issue, run the following command:

sudo sed -i 's|docker.com/linux/debian|docker.com/linux/ubuntu|g' /etc/apt/sources.list
sudo apt update


The problem is due to this bug. The cloud images only support "en_US.UTF-8" so you have to make sure that the host server (the install of Ubuntu Server which you use to SSH into the cloud install) is configured to use "en_US.UTF-8"

To do this generate the "en_US.UTF-8" on the Ubuntu server install:

$ sudo locale-gen en_US.UTF-8
Generating locales...
  en_US.UTF-8... done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... done
Generation complete.

Use the newly generated locale on the Ubuntu Server install by editing /etc/default/locale to contain only this line:

LANG=en_US.UTF-8

Reboot and then access the cloud install.

Edit:

People with a similar problem have had good luck editing (or creating) /etc/environment to contain:

LANG=en_US.UTF-8

... as well.


Ubuntu server 20.04 netplan multiple IP addresses on one network card

Netplan is very fussy about spacing, indentation, and no tabs.

Try this slight variation of your .yaml file...

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      addresses:
        - 192.168.1.100/24
        - 192.168.1.99/24
      gateway4: 192.168.1.1
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]
      optional: true

sudo netplan --debug generate

sudo netplan apply

reboot


Printing to a USB Label Printer with CUPS

I struggled for over two days over that issue.
For me the answer was pretty simple. The i386 version of cups need to be installed for the printer to do anything.
Here's my dockerfile:
FROM ubuntu:latest

LABEL Pellet Norman

# Unrelated to CUPS. Just need to set the timezone to avoid the interfactive mode
ENV TZ=Europe/Zurich
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Cups installation
RUN mkdir -p /var/spool/lpd

RUN dpkg --add-architecture i386
RUN apt-get update &&\
    apt-get install -y cups cups-bsd &&\
    apt-get install -y libcups2:i386

# Some other stuff for me
RUN apt-get install -y apt-utils &&\
    apt-get install -y nano

# Copy the drivers
COPY pt9800pcncupswrapper-1.0.1-1.i386.deb /root/pt9800pcncupswrapper-1.0.1-1.i386.deb
COPY pt9800pcnlpr-1.0.1-1.i386.deb /root/pt9800pcnlpr-1.0.1-1.i386.deb
COPY ptp950cupswrapper-1.0.0-0.i386.deb /root/ptp950cupswrapper-1.0.0-0.i386.deb

# Install the drivers
RUN dpkg -i  /root/pt9800pcnlpr-1.0.1-1.i386.deb
RUN dpkg -i  /root/pt9800pcncupswrapper-1.0.1-1.i386.deb

# Copy the access control, etc, that was defined from the WSL implementation
COPY cupsd.conf /etc/cups/

# Add root to the lp group. But ok that's not really necessary
RUN usermod -a -G lp root

# Here's I'm copying the printer ppd files that I will use later to overwrite the config given by Brother
COPY printers /home/docker/printers

# A test document to print
COPY document.pdf /home/docker/document.pdf

# The setup script
COPY setup.sh /home/docker/setup.sh

#ADD cupsd.conf /etc/cups/cupsd.conf
ENTRYPOINT /home/docker/setup.sh && /bin/bash

And the startup script:
#!/bin/sh
service cups restart

lpadmin -p PT-9800PCN-2N25 -h 127.0.0.1:631 -E -v socket://IP_ADDRESS -P /usr/share/cups/model/Brother/brother_pt9800pcn_printer_en.ppd
cp -R /home/docker/printers/* /etc/cups/ppd
lpr -H localhost:631 -P PT-9800PCN-2N25  -o media=MY_CUSTOM_SIZE /home/docker/document.pdf

And as soon as the docker runs, document.pdf gets printed !
I mostly stumbled onto the libcups2:i386 missing binaries.


I have discovered that the culprit is, in fact, /usr/share/gnome-session/sessions/xmonad.session or equivalent file.
Create or edit the file /usr/share/gnome-session/sessions/xmonad.session to be:
[GNOME Session]
Name=Xmonad/GNOME
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;
DefaultProvider-windowmanager=xmonad
DesktopName=Unity

The important line is the last one. DesktopName must have the value Unity, even if you do not use it.
Also, create or edit /usr/share/xsessions/gnome-xmonad.desktop to the following:
[Desktop Entry]
Name=GNOME with Xmonad
Comment=A GNOME fallback mode session using xmonad as the window manager.
Exec=gnome-session --session=xmonad
TryExec=gnome-session
Icon=
Type=Application

At login, choose GNOME with Xmonad from the session dropdown.
Everything, including themes, the desktop background and other minor things should work as expected.
Edit: if this does not seem to work, run gnome-session-properties (Startup Applications) and add gnome-settings-daemon to the list. (It's unlikely that this will work but it's worth a try.)

Update
For newer versions of Ubuntu, try the following for /usr/share/ghome-session/sessions/xmonad.session:
[GNOME Session]
Name=Xmonad/GNOME
RequiredComponents=gnome-settings-daemon;gnome-panel;
RequiredProviders=windowmanager;panel;
DefaultProvider-windowmanager=xmonad
DefaultProvider-panel=unity-2d-panel

If the first doesn't work, I'm not sure this one will, either, but I'd try it anyway.


Logout and there will be a setting icon,you can select the the Unity from it.

Or

Try this command on terminal 'unity --replace'


I don't know what version of Ubuntu your using, but two things:

Plugin the printer then open tha address 127.0.0.1:631 in your browser.

a. Select Administration menu and click on Find New Printers

b. If your printer is present then go ahead and click on Add This Printer

c. If your printer isn't listed then go to step 2
Go here and enter your system and printer information

a. Click next and download the required printer drivers.

b. Read through the instructions on how to install it, you will have to return to the download page to access the documentation.

This would be sh hplip-3.17.9.run from a terminal, but read through first before embarking.


Sometimes things get broken or lost during updates.

Try these two commands:

sudo apt-get dist-upgrade

This reruns updates command with some extra features. Read about the difference between apt-get upgrade and apt-get dist-upgrade here.

sudo apt-get install xserver-xorg-video-intel

This reinstalls the driver if it has been removed for some reason.


Brightness shortcut doesn't work right on an Acer Aspire 5750G

Problem solved:

I finally discovered that using the shortcut would have had the effect of XF86MonBrightnessUp or XF86MonBrightnessDown while the effect I want is given by replacing those commands in the shortcuts with xbacklight +10% and xbacklight -10%.

Of course one has to install xbacklight just typing in the terminal:
sudo apt-get install xbacklight

I don't know if there are smarter solutions to the problem but this one satisfies me.


clean, autoclean, and autoremove --- combining them is a good step?

This completely depends on what you want to achieve, they are separate for a reason. But lets see what they actually do:

apt/apt-get clean → cleans the packages and install script in /var/cache/apt/archives/
apt/apt-get autoclean → cleans obsolete deb-packages, less than clean
apt/apt-get autoremove → removes orphaned packages which are not longer needed from the system, but not purges them, use the --purge option together with the command for that.

So it is up to you to decide if you want to combine one of the first two with the last one and you can do this like below:

sudo apt autoremove && sudo apt clean

If thats what you really want to do, but now to code an extra command for it is pretty superfluous to be honest.

Further reading material:

manpage for the apt command
manpage for the apt-get command
What is difference between the options “autoclean”, “autoremove” and “clean”?


Maybe a bit late, but if you're on Ubuntu:

apt-get install libnss-mdns:i386 libnss-resolve:i386


To run MySQL from terminal, you have to have the Client package, as per you output above.  To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install mysql-client-core-5.5

Or

To install click MySQL database core client


What is the right way to automount drives for selected users using /etc/fstab?

man mount
...[bla]
Mount options for ntfs
...[blub]
uid=value, gid=value and umask=value
 Set the file permission on the filesystem.
 The umask value is given in octal.
 By default, the files are owned by root and not readable by somebody else.

I can't see any valid option to bundle user or group ids.
It's a good choice maybe to group your users and give this group access by using gid=value.


Files (Nautilus) appearing twice in GNOME dash (Ubuntu Dock)

I faced the same issue in Ubuntu 18.04 and found that there is an additional .desktop entry for nautilus under the /usr/share/applications directory (nautilus-folder-handler.desktop).
This happened after I opened an archive and extracted it with the 'open with other application' -> 'Files' option.
Just remove the extra nautilus-folder-handler.desktop entry and close any open nautilus instances, and the extra dock icon should go away.
you may do a sudo rm /usr/share/applications/nautilus-folder-handler.desktop from a terminal to remove it.


How does the Unity tweak tool work when Gnome is installed?

Unity is based on Gnome3, so that it shouldn't be surprising, the two share a lot of code.
In essence, UT is just a friendly front end for the gsettings framework, and you could achieve the same effect with gsettings set ...somepath ...somekey

That said, Unity related settings probably wouldn't work.


Deferred: Name server host name lookup failure (smart host)

Try:

define(`SMART_HOST',`[smtp-server]')dnl

It should turn off lookups for MX records. If it does not help try Ipv4 address inside square brackets.


trying live-usb 12.04.1 image on an old desktop

Is it possible to run a MEMTest; it's on your LiveUSB and you'll need to run it overnight?

I spotted in your screenshot that you have a "bad_area_no_semaphore" error. This usually means you have a hardware defect in your RAM Memory.

See this Ubuntu Guide on Faulty Hardware
https://help.ubuntu.com/community/FaultyHardware

or can you try to install with a Lubuntu Live USB or an Xubuntu Live USB? They may work better with very old hardware with low memory.

You can always install ubuntu Unity environment after the system is up and running by doing:
apt-get install ubuntu-desktop.


This question is actually a duplicate of This Question.

The effect I was looking to duplicate from 16.04 is "Text Scaling Factor". This setting can be adjusted using gnome-tweak-tool.

$ sudo apt install gnome-tweak-tool
$ gnome-tweaks

Click on the Fonts tab under Tweaks. The setting is called "Scaling Factor" which I set to 1.25 for my perfect setting.


Deploying a specific version of a software from a juju charm?

The PostgreSQL charm has a configuration option for version

http://manage.jujucharms.com/charms/precise/postgresql

Assuming your PostgreSQL service is called postgresql you would run the following command after it's deployed.

juju set postgresql version=1.0

Pre-deployment you can also pass a yaml configuration file. See juju help deploy for more information.


How to set 7z compression level using GUI in Ubuntu?

My idea was to find some hint in the file listing of the packages or in gconf, but I had no luck. Someone else knew the answer though.

Superuser: Change default compression levels for file-roller?

  Either:

$ dconf write /org/gnome/file-roller/general/compression-level "'maximum'"

  Or:

$ dconf-editor

  Select org in the left-hand pane.
  Select gnome in the left-hand pane.
  Select file-roller in the left-hand pane.
  Select general in the left-hand pane.
  Select compression-level in the right-hand pane.
  Set compression-level to 'maximum'.

  Unfortunately, you cannot fine-tune this setting for different
  compression programmes. If you want all the freedom, you can use your
  shell instead.

  Image of dconf Editor with file-roller's compression-level set to
  maximum..

That answer previously had no upvotes, so I checked if this has any effect at all and choose to compress some documents with the default settings and with maximum settings (type 7z). Result: 2,3 KB improvement on a ~300 KB archive.

Caution:

Depending on the content it can have a negative impact to compress everything with LZMA/LZMA2 on level maximum. PNGs for example are already compressed with Deflate and won't gain much from compression. It would make more sense to optimize them with PNGOUT/OptiPNG, Zopfli and then archive them with LZ4, achieving faster archive decompression and reducing file size.

I tried to find out more through file-rollers manpage and user manual, still no luck. Then I dowloaded the source package and searched for "maximum" in fr-command-7z.c (note how I avoid to say I read the source), which gave me the following:

switch (archive->compression) {
case FR_COMPRESSION_VERY_FAST:
    fr_process_add_arg (command->process, "-mx=1");
    break;
case FR_COMPRESSION_FAST:
    fr_process_add_arg (command->process, "-mx=5");
    break;
case FR_COMPRESSION_NORMAL:
    fr_process_add_arg (command->process, "-mx=7");
    break;
case FR_COMPRESSION_MAXIMUM:
    fr_process_add_arg (command->process, "-mx=9");
    if (! _g_mime_type_matches (archive->mime_type, "application/zip")
        && ! _g_mime_type_matches (archive->mime_type, "application/x-cbz"))
    {
        fr_process_add_arg (command->process, "-m0=lzma2");;
    }
    break;
}

That's as far as I can currently get, it seems like there is no ultra setting.


Failed to install the Extension Pack /home/user/Downloads/Oracle_VM_VirtualBox_Extension_Pack-6.0.4.vbox-extpack

Check your version of VirtualBox, I had v5 attempting to install Extension Pack v6 which caused the error.  Upgrading VirtualBox to v6 fixed it.
Or install the Extensions pack version for your installed version of VirtualBox.


Keep getting Error Message during System Updates

maybe a permission issue or a buggy installer, try to help the installer by creating this folder first by

sudo mkdir -p /var/log/clamav/

and run

sudo apt-get install --reinstall clamav-daemon


Switch to use Intel GPU from nvidia-settings and then execute the xrandr --output HDMI-1-1 --set "Broadcast RGB" "Full" and then switch back to Nvidia GPU.

Note that you can get the correct output (in this case HDMI-1-1) with xrandr and the output may change when switching GPUs.


acer R301L doesn't recognize boot usb I made from UNetbootin

Hold the F2 key until the BIOS screen appears. Also, if you don't want to do that, go to the Boot Menu.

Source: http://www.asus.com/my/support/FAQ/1008829/


Can't write files to a newly formatted drive

I guess, you mounted it as read-only (ro). Remount it from command line and it should be ok. If you don't know how do that, type in terminal:

sudo fdisk -l

and post here the results


How to solve "wget: unable to resolve host address"

Use the following link instead :

wget http://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.1/nagios-4.0.1.tar.gz

Note : I don't know if you have a particular reason to want 4.0.1 but the latest version is 4.1.1 :

wget http://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.1.1/nagios-4.1.1.tar.gz


How to install internet explorer with windows media player plugin via wine?

Windows Media Player can be installed using PlayOnLinux and (if I remember correctly) winetricks.

However, with the first solution, you would need to add Internet Explorer to the Wine prefix that PlayOnLinux used for Windows Media Player and run it from there.

Either way you do it, it may not work though, since both Internet Explorer and Windows Media Player work poorly at best in Wine. Furthermore, I don't think you can download Windows Media Player 9.x and previous versions any longer.

As for using another player in Internet Explorer, I've never actually tried that, but you could probably install DivX as your media player for Wine, since that does provide a browser plugin and will most likely automatically play your files.


Unity 7 and Unity 8 are using different APIs for scopes. Scopes written against the new API for Unity 8 will not work under Unity 7. However, they should work just fine under the Unity 8 preview session.


Ubuntu 16.04 freezes when connecting to iphone 6s usb tethering

Might be a driver or memory thing

Driver fix:
$ sudo do-release-update
That will update the Ubuntu version to 18.10
If that doesn't fix it update the kernel.
$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt update
$ sudo apt install ukuu
Find ukuu in the start menu once it installs
Open it, select Linux 5.0.5, press install, and once it's installed reboot.

Memory fix:
In your bios (what pops up when you start up), mash f keys until you get to select a partition (usually F1 or F4).
Under Ubuntu [version] it should say mem test.
Select that, press enter, and wait for it to pass or fail the test 2-4 times (that may take a while)
If it fails, buy new RAM.
Buying ram: In Canada use Canada Computers, in the us use Amazon/Newegg
If neither of these work, respond please!


Your screen shots aren't showing up for me. In general, multiple entries in the EFI's boot menu should not be a problem. In fact, it's common to see two such entries, one pointing to grubx64.efi and the other to shimx64.efi. If this is what you're seeing, it's perfectly normal. I wouldn't worry about this or attempt to "fix" it unless you think it's causing a real problem. I say this because mucking with these entries can cause much more serious problems, like a complete failure to boot; it's just not worth it to fix a minor cosmetic issue. That said....

I recommend you look at the BootOrder item in the efibootmgr -v output. Chances are it's set incorrectly, and setting it to boot one of the ubuntu entries (either one if you're not using Secure Boot, or the one pointing to shimx64.efi if you are) will get the system booting directly into GRUB. You can do this via the -o option to efibootmgr, as in sudo efibootmgr -o 0002,0000,0003 to boot Boot0002 as a first priority, Boot0000 if that fails, and Boot0003 if neither of the preceding options works. You must check your actual efibootmgr -v output to figure out what order to use, of course. Alternatively, you could do this using EasyUEFI in Windows.

Multiple EFI boot manager entries should not cause speed problems in Ubuntu. I recommend you post a new question about that topic. Chances are you've got a runaway process, too little RAM, or some other problem that's completely unrelated to EFI or GRUB. Typing top in a window will show details that might be helpful, so posting a screen shot of that may be worthwhile -- but please be sure you post the screen shot correctly.


I'm glad to hear you have other machines, because if you continue on this project I suspect you may need them.  If you would like a slightly outside the box solution, I believe I can help you.  It may be somewhat time consuming and a bit more work but it should result in the arrangement you are seeking.

I suggest you remove the hard drive from the computer you wish to turn into a dual boot.  Install a new drive, preferably SSD, larger, or both, and install windows 7 on this new drive.  After windows is settled in, use gparted to shrink the windows 7 partition to leave enough room for your desired Ubuntu partition.  It may be necessary to use an external USB to SATA adapter (they only cost about 12) to connect this second drive externally, where you can also resize its partition to shrink it to help it fit before cloning it to the empty area of the new drive.

Finally to provide grub for both partitions with the least personal grief I suggest you use this particular boot repair solution.


Wireless connects, but no internet access

I always find with network issues you want to try pinging in one order or the other:

ping localhost

    ping 127.0.0.1

ping you local gateway (normally 192.168.0.1)

    ping 192.168.X.X

ping an IP external to your local netowrk (Google public DNS)

    ping 8.8.8.8

ping a domain to see if you can resolve a domain

    ping google.com

depending on which of these work it will help you track down the problem, if you can't ping your router your network isn't up as advised, if you can ping further then you know you're looking in the wrong place.


Tim almost had it right- according to the tasksel manual, you can execute tasksel "tasks" using sudo apt-get, plus the caret:

sudo apt-get install ubuntu-desktop^

I had these same errors, the above command worked for me.


Try with

sudo apt-get -f install

it should install all the unmet dependencies.


The problem is with the order the arguments are passed to the compiler.

On Oneiric, the linked libraries have to be called after the name of the source file:

gcc test.c -lm

This change and the reasons for it are described in more detail here.

The problem does not appear for functions of constant values because gcc has built-in versions of them. So compiling with -fno-builtin gives the same error as with a variable in the argument.

Thanks for Jason Conti for this information.


Use Photoshop in Virtualbox, is it worth the hassle?

As I see 12.04 as a tag on your question, I assume you have a good machine box on your hand (some information about this will help to exactly answer your question).

So:

I have a dual-2.3Hz box with 6 GB of RAM (I think at least 2 GB of RAM its important to run good virtualboxs) and:

I made the transition Windows->Ubuntu 11.10 (12.04 not stable yet at this moment) very smoothly, so I really reccomend.
Windows 7 inside a virtualbox runs like a devil. No problem to easy or hard tasks, everything done quickly, no bugs.
You can have a dual-boot configuration if you insist in having Windows 7 at bare metal level(dumb option, IMHO)
With Wine, many applications(including Photoshop) runs smoothly too.

I advice a Ubuntu 11.10 with virtualbox hanging your windows to avoid little bugs in Photoshop with Wine, but maybe doesn't worse the work to set up. Wine rules too. What you have to leave behind is Windows, without fear, and be happy. After 1st tasty(sooo tasty!-), you'll never come back.


When you install a service in ubuntu it is by default automatically started at every system start. So there is no need to add them to any list.


How to recover data from a formatted partition?

Practically speaking, no, there's no way to recover data in the partition you overwrote with Mint 18.

Technically, it may be possible to recover some bits and pieces of the data (maybe even whole files, if you haven't stored anything in the /home folder under Mint) using forensic methods, but in practice the cost of paying someone to do so or the learning curve of finding and learning to use the software for this are beyond the worth of most personal data.


Importing mail files of type message/rfc822

rfc822 is also known as .EML file format, you can see all info about importing into Thunderbird HERE.

Interesting text from the link:

If you have problems importing .EML files using the ImportExportTools extension try using eml2mbx to convert the .EML files to a mbox file and then import the mbox file using the ImportExportTools extension. A Google search will find several eml to mbox conversion programs. Whats unusual about this one is that provides a lot of control over how it converts the .EML files using a "eml2mbx.ini" file.

In short you must convert EML to mbox format.

There is also info for KMail and links HERE.

Also you can use eml2mbox ruby script to convert your emails to mbox, which can be imported into Evolution. I was able to convert the sample you provided and import it. The script with all info needed can be found HERE.

regards


You can set up a transparent proxy. As Wikipedia says,

  Also known as an intercepting proxy or forced proxy, a transparent
  proxy intercepts normal communication at the network layer without
  requiring any special client configuration. Clients need not be aware
  of the existence of the proxy. A transparent proxy is normally located
  between the client and the Internet, with the proxy performing some of
  the functions of a gateway or router

Doing it with /etc/hosts is fine, as long as the user doesn't know about the file or doesn't have the permissions to edit the file. But I guess what you want to achieve would be easier if you use proxy, although it will take some time to set it up.

To set up the transparent proxy, you can use squid. Here are some quick steps to set it up:

Install squid

sudo apt-get install squid squid-common

Edit the /etc/squid3/squid.conf file:

Look for the line http_port 3128 and make sure it is uncommented. squid by default listens to port 3128.

acl bad dstdom_regex .*abcde.*
http_access deny bad

This will block every URL containing abcde.
Restart squid

sudo service squid3 restart

A very good guide is given here.

Here are some other links:

http://www.cyberciti.biz/tips/linux-setup-transparent-proxy-squid-howto.html
http://tldp.org/HOWTO/TransparentProxy.html


That's exactly why the "Install Ubuntu alongside X" option in the installer exists: To allow you the usage both of your existing system OS and Ubuntu. So you won't lose anything if the installation goes right.

When you want to install Ubuntu on another disk, select "Something else" instead of "install alongside". You have to manually set up where to install Ubuntu.

No matter what you do, I strongly recommend you to backup all your files before partitioning. Even if you know what you're doing when installing Ubuntu, you can still lose data due to partition corruption while partitioning.


Can't find ATI Mobility Radeon HD 6370 driver for Ubuntu 12.10 64-bit on HP Pavilion DV7-4285dx

Give a try to this how to and it should help you install the driver at the

AMD Linux Community


How to detect current gnome-terminal character encoding?

I recommend checking locale charmap's output (which reports the values set by $LANG, $LC_CTYPE, $LC_ALL). This one does not directly query the terminal, but it's essential for most of the applications that the locale is set up correctly, consistently with the terminal. If it reports anything else than the actual behavior, not only your app but pretty much every other app will misbehave in the terminal, and it's not your fault. Of course the user can change the encoding from the menu, but if they decide to shoot themselves in the foot, there's not much you can/should do against. It's not your task to detect a faulty system-wide setting. Also there's no way for you to notice if the user switches encoding while your app is running, so I don't think there's much point in verifying it at startup.

If you really really need to check the runtime behavior, you can emit escape sequences that query the cursor position (and report it back in a certain format as if it's been typed from the keyboard), then emit some bytes that e.g. form a single character in UTF-8 while multiple characters in any other encoding (disabling local echo in the mean time, so keypresses by the user don't advance the cursor), and query the cursor position again. It's perhaps too much trouble and really not worth the effort.


Looks like there is a problem with your openstack setup (a credentials problem or even a problem with the installation itself).

As suggested in https://answers.launchpad.net/nova/+question/179016, I advise you to have a look in the log files in /var/lib/nova/ to try to gather more information about where the problem is exactly.


Your Windows 7 BCD is most likely broken since you changed partition layout. I suggest you to use a Windows 7 CD and try to use the recovery options and choose "Startup Repair".

Windows 7 usually does not overwrites GRUB by itself. Instead it just fixes its Boot loader configuration (BCD). If it worked, go back to Ubuntu and call

sudo update-grub

Then you should have Windows 7 in your list again.


Boot a live USB Ubuntu distro (with a GUI), and try the boot-repair tool:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

You can also burn the tool as a live USB, which might be easier. (Search for boot-repair-disk.)

Hopefully this will help.


How to upgrade from Ubuntu 14.04 (32-bit) to latest Ubuntu Budgie (64-bit)?

There's no upgrade possible from 32-bit to 64-bit.
There's no upgrade possible from Ubuntu to Ubuntu-Budgie. It's possible turn standard Ubuntu into something Ubuntu-Budgie look-alike but it's moot for this question.
And even if the original 14.04 was 64-bit thus having a possible upgrade path to Ubuntu 20.04 - 14.04 (EoL) -> 16.04 (about to be EoL) -> 18.04 -> 20.04 - failure is expected and it would take days to complete therefore such process is strongly discouraged.
Conclusion: Backup personal files and install Ubuntu-Budgie 64-bit


I am guessing you probably set the keyboard shortcut for Konsole from the Kickoff Application launcher icon.

In order to remove this shortcut, right click on the Konsole launcher icon → Edit Applications → System → Konsole → Advanced Tab → Current Shortcut Key → Reset it.

(Reference)


How to upgrade ubuntu in side virtual box installed using vagrant?

You can attach the ISO image to the virtual box and the upgrade dialog should pop up. Also you can use the upgrade via Internet (upgrade manager) from within the Virtual Box.


Why don't the Function Key options and play/pause/volume work on a Mac Bluetooth Keyboard?

The article there should help you.
https://help.ubuntu.com/community/AppleKeyboard

insert the two echo linesin /etc/rc.local:

echo 2 > /sys/module/hid_apple/parameters/fnmode
echo 2 > /sys/module/apple/parameters/fnmode

Those are inserted just before the "exit 0" line.

I only use Apple keyboards and I found they are easier to manage and configure under Linux than Windows. Also, that's the ONLY hardware I have from Apple.


I just had this issue with meld (however I was trying to run it inside a docker container with X11 forwarding). My problem was that I just didn't have the icon theme on the host installed in the docker container (for me ubuntustudio-icon-theme). Meld seems to get very upset if it can't find the icons it expects.
It might be worth trying an apt install adwaita-icon-theme (I also noticed a adwaita-icon-theme-full package .. no idea if this is relevant for your problem though).
(I realise that my setup was likely different from yours and this might be a long shot to solve your issue, however I thought it was worth mentioning on off chance it helps and for all 3 people out there that are struggling to use meld inside docker)


hydrogen is in the repositories:

just open a terminal (CTRL+ALT+T) and insert sudo apt update && sudo apt install -y hydrogen, type your root-password (no characters will be displayed) and just wait till executed!


Evince PDF viewer: How to automatically reset printer settings on exit?

I just made my ~/.config/evince/print-settings config file read-only, what makes my current settings the "default" as evince can't overwrite them any more.

To do this, you may run the following command:

chmod -w ~/.config/evince/print-settings

If you remove the file print-settings, evince will recreate one with default values and file system permissions the next time it runs. So to undo any modification, it's enough to simply delete the file. No backup copy needed.


How do I download all the Proprietary drivers for offline use?

Recursive download from here: http://archive.ubuntu.com/ubuntu/pool/restricted/
e.g. wget -nH -np --cut-dirs=3 -r -l0 $URL
where $URL is above or your favorite mirror.


I'm answering my own question. @steeldriver's comment was very useful, it helped me to understand what was the problem.

  You are asking fnctl to obtain an exclusive (write) lock
  l_type=F_WRLCK, where (according to man fnctl) F_SETLKW means "... but
  if a conflicting lock is held on the file, then wait for that lock to
  be released". You may be able to see why there is a conflicting lock
  using lslocks - see How to list processes locking file?. If you don't
  want fnctl to wait in the case of conflict, then try F_SETLK in place
  of F_SETLKW. Regardless, @vidarlo 's point applies - it doesn't seem
  like a good idea to be write-locking /dev/null.

For those who are interested in this problem, it was docker daemon that locked /dev/null on my machine. Some more information can be found here:
https://github.com/moby/moby/issues/31182

As why I need to lock /dev/null, I have a testsuite that writes to /dev/null instead of writing to the network. The testsuite is for a different component, written by a different team based in a different continent. So it is not clear for me either :)


Where is pip config file on Ubuntu 20.04.2 LTS?

The default locations are ...
$HOME/.config/pip/pip.conf
/etc/pip.conf

Beware that there was a bug in pip 20.0 (used in Ubuntu 20.04) and fixed in pip 21.0 where it ignored the global and used
/etc/xdg/pip/pip.conf

locate pip.conf

only works after a sudo updatedb was performed since you installed it (happens automatically at a given interval but it is not real time).

If there is no default you can create it with ...
export PIP_CONFIG_FILE=/dir/to/pip.conf

or by just creating
~/.config/pip/pip.conf

See the documentation for more information.


Based on certain patterns exclude lines in file

Many many ways:

grep:

grep -v '^SITE' input.txt >output.txt

^SITE matches SITE at the start, -v inverts the match. Input file is input.txt, output file is output.txt
sed:

sed '/^SITE/ d' input.txt >output.txt

removing the lines (d) starting with SITE (^SITE).
awk:

awk '$0 !~ /^SITE/' input.txt >output.txt

Printing if the line does not start with SITE ($0 !~ /^SITE/)
perl:

perl -ne '/^SITE/ || print' input.txt >output.txt

Same logic different systax, printing if the line does not start with SITE
bash:

while IFS= read -r i; do [[ $i =~ ^SITE ]] || echo "$i"; done <input.txt >output.txt

Reading the input file line by line and printing any line that does not start with SITE ([[ $i =~ ^SITE ]] || echo "$i").
python:

#!/usr/bin/env python3
with open('input.txt') as f:
    for line in f:
        if not line.startswith('SITE'):
            print(line, end='')

Printing if line does not start with SITE (not line.startswith('SITE')).


'mpsyt' command runs from terminal but not from .desktop file?

Thanks to thangdc94 for the comments. I have found the solution - the exec line should be Exec=bash -i -c "mpsyt". Now it works perfect.


Install the ubuntu-desktop package.

Then don't remove it unless you really know what you are doing. ;)


Ubuntu downloaded on partion on second harddrive

I also installed Ubuntu on a complete separate HDD in one of my PCs. And told Ubuntu installer to also put GRUB on this second HDD.
Now I have to push F12 button at start to select between HDDs to start from.
When I do nothing, PC will boot from first HDD with Windows Boot Loader on it (the Kids use this for gaming).
When I manually select the "hidden HDD", GRUB pops up to boot Ubuntu.

Anyway, I did this on purpose and it requires deviation from the default parameters of Ubuntu Installer :-)

Mayhaps this is the key to your configuration, too?


How do I remove an unsuccessful installion of Ubuntu

If you still want to install Ubuntu, directly mount your bootable USB/CD/etc and you can repeat the installation process again like you did before. While installing the OS, wipe the drive that you have previously tried installing Ubuntu and install the OS on that drive.
If you want to completely remove that drive and add it back to your windows, follow this link.
Hope it helps you!


Kubuntu 16.04 window title bars keep disappearing

So this is me answering my own question - but not with any real knowledge of why this worked. The clue was in a post about lightdm.....

I opened a terminal and entered my .config directory

  cd ~/.config

then my dconf directory

  cd dconf

there I deleted the user file

  rm user

rebooting the system came back up with titlebars and a working task switcher... Really no idea why it got corrupted.

To be honest I am getting sick of having to fix stuff like this just to use my pc... arghh!! maybe time to buy a mac!


Connecting to internet after clean install of ubuntu server 12.04

edit the /etc/network/interfaces

sudo vi /etc/network/interfaces

Change the file to look like this

#The primary network interface -- use DHCP to find our address
auto eth0
iface eth0 inet dhcp

then try the following commands:

dhclient -r

/etc/init.d/networking restart


You can download it from here Brother drivers for Linux

After you download the .deb file, you can install it by giving the command
sudo dpkg -i "package name".deb


You can type the package name if you think you know what the bug is about. For example, if its nautilus causing the problem type

ubuntu-bug nautilus

in your termial or by pressing Alt+F2. Or if it is firefox then type

ubuntu-bug firefox

Hope this helps.


Is there any way for me to be able to get my surround back to my G930 Headset?

Unfortunately, at the moment, the drivers only support analog and digital stereo, as you can see here.


Stopping the default Operating System from Booting

As explained here, you need to set GRUB_TIMEOUT to -1 in /etc/default/grub file and execute sudo update-grub.


How to rename volume group of an encrypted boot drive and have it still boot?

After reading George's link (and several others), I wanted to post this here as an answer.

If you need to rename the volume group of an encrypted boot drive, these are the steps you should take. At least they seem to work well on 16.04.

Unplug all other drives and only have a LiveUSB (or similar) and your encrypted boot drive plugged in. Note, do not boot from another encrypted boot drive because both boot drives have the same volume group name (ubuntu-vg).
Boot from the LiveUSB, not from the encrypted boot drive
After the LiveUSB is running the active system, make sure lvm2 is installed (although the 16.04.2 LiveUSB does already lvm2 installed).

  sudo apt install lvm2

Mount the encrypted drive. Then, verify the name of the volume group (there should only be one because no other drives besides the LiveUSB should be connected). The default for 16.04 (and it seems 18.04) is "ubuntu-vg" (the following will assume that is the case).

  sudo vgscan

Rename the volume group to something unique

  sudo vgrename ubuntu-vg my_new_volume_group_name

You should receive confirmation that the volume group was renamed.
At this point, your encrypted boot drive will not boot because grub can no longer find the volume group named ubuntu-vg. So, you need to update grub. On the encrypted boot drive, go to the grub folder and see the file grub.cfg. If you try to open it from a LiveUSB, it will be read only so open a terminal and type:

  sudo gedit

From within gedit, open the grub.cfg file (which will be on the unencrypted part, in the grub folder.
Save a copy of this file as backup-grub.cfg just in case something goes wrong in the next few steps.
Find and replace ubuntu--vg with your new volume group name (ctrl+H, Find:ubuntu--vg Replace with:my_new_volume_group_name). That find text is correct. You should find "ubuntu--vg" (notice there are two dashes between "ubuntu" and "vg" because when you use a dash here, grub needs a double-dash.
Save the file back to grup.cfg
Reboot, removing the LiveUSB

Now, when grub loads, it will see the volume group name it expects and you will be able to load your encrypted boot drive.


Installed Ubuntu 13.04, but PC still tries to boot Windows 7

Run Boot-Repair's Recommended Repair. Write the URL on a paper.
Make your BIOS boot on the Windows disk (2TB)
Reboot the PC. You should see a (GRUB) menu with access to both Ubuntu and Windows. If any problem, indicate the URL.


How do I enable dragging files to applications minimised to Ubuntu Dock in 17.10?

As an alternative, if you enable top left hotcorner for activities, drag a file there, then drag it above the application, wait for it to activate, drop your file

You can enable it with:

gsettings set org.gnome.shell enable-hot-corners true


How to configure Apache to run PHP as FastCGI on Ubuntu 12.04 via terminal?

Thanks for previous answers they got me most of the way, but to get things working I had to combine instructions from a few places, so thought I would write up a complete set of commands.

FYI I'm running Ubuntu 14.04, Apache 2.4, and also had modphp running by default, previous instructions also left out the need to disable modphp.

I also found http://blog.starcklin.com/2013/08/install-mod-fastcgi-and-php5-fpm-on-ubuntu/ to be very informative and straightforward.

Just run the following commands in a terminal one after the other.

First install the necessary packages (I leave out php5 as this assumes it's already installed, add it back in for a first time install). Also note from Apache 2.4 up you can use the event-mpm instead of worker see http://www.vps.net/blog/2013/04/08/apache-mpms-prefork-worker-and-event/. My example shows worker, but just replace the word worker with event if you'd rather use that.

sudo apt-get install apache2-mpm-worker

sudo apt-get install libapache2-mod-fastcgi php5-fpm

Now enable mods you need, and disable those you don't.

sudo a2dismod php5 mpm_prefork

sudo a2enmod actions fastcgi alias mpm_worker

Create the php5.fcgi file and give the webserver permission to use it.

sudo touch /usr/lib/cgi-bin/php5.fcgi

sudo chown -R www-data:www-data /usr/lib/cgi-bin

Create a global config for php5-fpm

sudo nano /etc/apache2/conf-available/php5-fpm.conf

paste in the following (we'll use a socket instead of IP address)

<IfModule mod_fastcgi.c>
   AddHandler php5.fcgi .php
   Action php5.fcgi /php5.fcgi
   Alias /php5.fcgi /usr/lib/cgi-bin/php5.fcgi
   FastCgiExternalServer /usr/lib/cgi-bin/php5.fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 3600
   <Directory /usr/lib/cgi-bin>
       Require all granted
   </Directory>
</IfModule>

Enable the php5-fpm conf

sudo a2enconf php5-fpm

Restart apache and fpm

sudo service apache2 restart && sudo service php5-fpm restart

As per other instructions paste the following into a new browseable php file on your webserver.

<?php phpinfo();

Open the file you just edited in a web browser, If you see "FPM/FastCGI" next to Server API, you are now serving PHP with FastCGI!


That site appears to work fine in my Firefox for me on 10.10. Have you definitely got Flash installed? (From a command line sudo apt-get install flashplugin-installer).

Perhaps if you are still having problems you could post a screenshot to give us a better idea of the problem?


bash: /home/user/.ssh/authorized_keys: No such file or directory

You have to create the .ssh directory and the authorized_keys file the first time.

Create the .ssh directory:

mkdir ~/.ssh

Set the right permissions:

chmod 700 ~/.ssh

Create the authorized_keys file:

touch ~/.ssh/authorized_keys

Set the right permissions:

chmod 600 ~/.ssh/authorized_keys

The permissions are important! It won't work without the right permissions!

Now you can add the public key to the authorized_keys file:

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

You have to add the public key of your computer to the authorized_keys file of the computer you want to access using SSH Keys!

As terdon mentioned you can also just use this command:

ssh-copy-id user@host

This will put your id_rsa.pub (in your ~/.ssh directory) in the remote computer's authorized_keys file, creating the .ssh directory and authorized_keys file with the right permissions if necessary.


After upgrade to 18.04, Mutt shows raw html when opening html mails in chrome

What worked for me is using nametemplate=%s.html in my ~/.mailcap like:

#GUI browser if $DISPLAY is set
text/html; /usr/bin/sensible-browser %s; test=test -n "$DISPLAY"; nametemplate=%s.html

See this part of the Mutt FAQ


What is the difference between "systemctl start" and "systemctl enable"?

systemctl start and systemctl enable do different things.

enable will hook the specified unit into relevant places, so that it will automatically start on boot, or when relevant hardware is plugged in, or other situations depending on what's specified in the unit file.

start starts the unit right now.

disable and stop are the opposite of these, respectively.

This means that when you first install MariaDB, you might want to run systemctl enable mariadb.service to enable it so it starts on boot. You might also want to run systemctl start mariadb.service, or just reboot, in order to start MariaDB. To stop MariaDB, run systemctl stop mariadb.service (it will start again on next boot or when you manually start it). To disable it so it doesn't start on boot anymore, run systemctl disable mariadb.service.

Source: systemctl man page


I had this very same issue with i3-gaps on Xenial. Turns out it was a dependency that didn't get installed:

sudo apt-get install libtool

You can then run through the setup again and should be good to go, unless you are missing more dependencies.


In your PATH you have /home/cgal/anaconda3/bin:/home/cgal/anaconda3/condabin:/usr/local/cuda-9.0/bin before the systems normal paths (/usr/...) so the system finds gcc in /usr/local/cuda-9.0/bin/gcc.

Move the three entries from the beginning of PATH to the end instead. Then you will find the gcc you have set by update alternatives.

In .bashrc you have this line:

export PATH=/usr/local/cuda-9.0/bin:$PATH

change that to

export PATH=$PATH:/usr/local/cuda-9.0/bin

to avoid finding the gcc in /usr/local/cuda-9.0/bin/.
Remember to reload .bashrc by running . .bashrc or close terminal and open a new one.


Python 2 and 3 are separate beasts. If you install a script into the site-packages of one version, you are not installing it into the other.

I'd install it through pip, but you'll need the right version of pip.

sudo apt-get install python3-pip
sudo pip-3.3 install pylint

This will replace your 2.7 version. We can confirm this by checking less $(which pylint):

#!/usr/bin/python3.3
# EASY-INSTALL-ENTRY-SCRIPT: 'pylint==1.0.0','console_scripts','pylint'
__requires__ = 'pylint==1.0.0'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('pylint==1.0.0', 'console_scripts', 'pylint')()
    )


download ubuntu ( disc image ) .iso from the website.

download UUI (or something like that ) from http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

It will guide you through the necessary steps to make the usb ready. PS: it will format it.

Now the tricky-ish part is to go to the bios of the computer with no OS and enable USB booting from the boot menu. Giving us the motherboard model of that computer would help.

Best of luck.


Try installing openjdk, but using sudo update-alternatives --install /path/to/suns-java/java 1 sudo update-alternatives --config java from the terminal to set suns java to the default. (You may also have to do the same for javac, javaw and javaws).


How to change critically low battery value?

Start dconf-editor
Browse to org -> gnome -> settings-daemon -> plugins -> power
Change the values of percentage-critical and percentage-action to the level you require
Change use-time-for-policy to false
Done!

You can also do this from a terminal with:

gsettings set org.gnome.settings-daemon.plugins.power percentage-critical 10
gsettings set org.gnome.settings-daemon.plugins.power percentage-action 9
gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false


Timex Device Agent 3.0 does not detect Timex Run Trainer (USB)

Install the latest wine 1.7.x – it solved my connection issue with Garmin Mapsource (6137) connecting to eTrex Legend with a USB-Serial adapter. See: How to install and configure Wine?
Also important to ensure the com port under wine is linked to /dev/ttyUSB0, and permissions are OK.
Do:

ls -l /dev/tty*

You should see a device called "ttyUSB0".  You should see it belong to the dialout group. Add yourself to the group:

sudo adduser yourusername dialout

Reboot computer.
Make the device visible as "com1" port under wine:

cd ~/.wine/dosdevices
ln -s /dev/ttyUSB0 "com1"


I broke Firefox with bad changes in 'about:config', how do I restore the defaults?

Firefox can be easily reset to defaults after injudicious alterations in about:config by following these steps:

Close Firefox completely
Open the folder ~/.mozilla/firefox/< Profile Name >/, the < Profile Name > folder will most usually be named something like this:

Within that folder rename the file prefs.js to prefs.js_bak by right clicking on the file and selecting 'Rename...'. Again a screenshot to demonstrate the exact location:

Reopen Firefox and resolve never to break it again :)

References:

Mozilla Zine: Profile folder - Firefox
Mozilla Xine: Resetting preferences


Update to 20.04: Missing icons and icon alignments

Try resetting the icons to the standard icon theme (eg. Yaru).

Had the same issue. I was using a non-standard icon theme called "paper" that is not available for focal.

Changing to a preinstalled icon theme using "Tweak Tools" solved both problems for me.
"appearance" tab in Tweak Tools where one can change the icon theme


Create a folder shortcut in the Ubuntu server terminal

You only need to execute this command:
ln -s /var/www/html /path/to/your/new/link
This will create a symbolic link (a simple "shortcut") from /path/to/your/new/link to the destination /var/www/html.


Shortcut behaviour changed after upgrade from 16.10 to 17.04

I found another link about the issue I was trying to solve at https://answers.launchpad.net/terminator/+question/404487

It looks like apps now use dbus so they are running in the same process when launched multiple times. This changes the way windows are grouped and also that opening a new window does not automatically get the focus like you reported.

There are several recommendations in that link. For me the possible performance improvements gained by using dbus are not so critical so I disabled dbus for terminator. What worked for me to disable dbus was the following command:

# disable dbus
gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator -u'

You can check your current settings before with the following command in case you want to rollback the change:

# info useful in case of rollback needed, check it before disabling dbus
gsettings get org.gnome.desktop.default-applications.terminal exec

Regards,
Jorge


colorful screen issue when installing Ubuntu 16.04.1 LTS via VirtualBox

Now, this question is a few months old now. But I had the same colourfull image show up when I tried to install Ubuntu 16.04.1 LTS in my virtualbox environment.
I had no clue how to fix it, so I started looking around on the big ol' internet.
No answer to be found anywhere.

So to answer this to all the noobs like me. This is caused by virtualization not being enabled in your BIOS. When that is enabled, it works without problems!


You need a double backslash \\ because the single backslash is not only the regex escape character but also the one your shell uses. E.g. you escape the dot, which on shell level just interprets to a regular dot, that is then passed to apt-get and machtes every character (as a regular dot usually does).

So the answer is, first the string is interpreted by the shell, where the backslash has one meaning, and after that, it is passed to apt-get. The regex-engine of apt-get then interpretes the preprocessed string again. There the backslash has been replaced (and also has a slightly different meaning).

Another solution is to put the regex in quotes as in:

apt-file search --regexp '.*ssl.*\.so.*'


Your manual mount command NFS server IP and one you mentioned as fstab entry seems different. Assuming source IP is 192.168.1.88, try below:

192.168.1.88:/NAS    /media/nas    nfs    defaults    0 0


Installing Ubuntu first time, DELL Optiplex 755

Your friend here is a Live CD or even better a Live Flash Drive

This way you can try it on for size and see how it goes.
I'd go with Alex and suggest you try lighter versions of Ubuntu. Alex said Lubuntu, which I don't know, but I use Xubuntu daily on a 2006 entry-level machine and I like it. I also run it on a 1999 secondary machine and it's flawless. Some may say the look is spartan, I'd say it is modest and unobtrusive.

Anyway the basic answer to your question is : "Yes, it will work well".


How to add a directory to linker command line in linux

If you are compiling something and you want the compiler to search a specific directory, you can add the -L flag. Like this:
g++ -L /lib64

You can also add this directory to the environment variable 'LD_LIBRARY_PATH'. Like this:
export LD_LIBRARY_PATH="/lib64"

You can also use ldconfig to add a directory to the search path. Like this:
sudo ldconfig /lib64

Finally, you can add the directory to /etc/ld.so.conf.d/mylibs.conf (and rerun sudo ldconfig) to make this change permanent.
echo "/lib64" | sudo tee -a /etc/ld.so.conf.d/mylibs.conf; sudo ldconfig


You can write a bash script start.sh with following content:

 #!/bin/bash
 php -f somefile.php

Then start from command line /path/start.sh

Or you can write a Startphp.desktop file with this content:

[Desktop Entry]
Encoding=UTF-8
Name=Start php
Comment=Start PHP
Type=Application
Exec=/path/to/php /path/to/somefile.php
Icon=/path/to/your/icon.png
Name[fr_FR]=Start PHP
Categories=

Then start with double click on the desktop file in the file manager.


There is a hidden folder for dropbox you can remove that and it will have to reinstall is' self

If you are stuck at the boot enter recovery mode(go to the recovery option in grub) and if this does not work there is not much you can do


no sound via HDMI using Xubuntu 13.04 32 bit AMD mesa 9.2

If you're using a kernel version less than 3.10.1 and you can upgrade to that or a later version, that may solve the problem.

I had the same exact problem, and after updating the kernel, my problem is gone now. (Though problems with the fan spinning all the time remain.)


That's light-locker's lockscreen. You can either disable light-locker by opening Light Locker Settings and turning it off, or uninstall it if you do not need it:

sudo apt-get remove light-locker light-locker-settings


How safe is ubuntu touch on nexus 7 2012

Ubuntu Touch is still in development, and in beta.

The (older) Nexus 7 (gen 1, '2012 model', 'grouper') is no longer supported as reference hardware. You can run the older beta build versions, but will not be receiving (timely) updates, bug fixes, and/or further improvements.

Conclusions:

It is not ready to use as a Linux device, to replace a PC;
The Nexus 7 (gen 1) is not currently supported;
And NO (at time of writing), 'grouper' will not receive major updates (from Canonical).

All subject to change, and vagaries of market (and marketing).


Juju - cannot remove unit or application

The --force option was only added to Juju recently. It's possible that you're running a version of Juju that doesn't support it. You can check by running juju help remove-application and seeing if it references --force. Regardless, it shouldn't be necessary.

What is the output of the following?

juju remove-application myjenkins

How did you deploy the Jenkins charm?

It looks like that you've attempted to deploy it into a LXD container (see the status message: cannot assign unit "jenkins/2" to machine 1/lxd/3), which isn't supported.

It also appears that a previous installation attempt to machine 1 hasn't cleaned up things properly and the old mount point is still present. You may need to SSH into the machine and delete the mount point:

juju ssh 0
sudo rm /srv/mnt/jenkins

You should also remove the other failed applications:

juju remove-application jenkins
juju remove-application myjenkins2

Now you should be able to deploy Jenkins cleanly:

juju deploy jenkins --to 0


Run a script from every directory on ubuntu linux

There's couple things you need to keep in mind:

bash accepts a script file as argument, which is what bash trimmomatic does, however bash trimmomatic implies that the file trimmomatic has to be in the current working directory where you execute the command bash trimmomatic. Command-line parameters which are files, unless specified with full path, have to be in current working directory.
When you execute any non-builtin command in shell, such as ls or df, the shell goes through list of directories in $PATH variable.  If a file is found and is executable in any of those directories, then the shell will execute it. Of course, ~/Desktop is not on the list of directories in $PATH, so you cannot call it directly as trimmomatic

Now, you have a single-line script. Practically speaking, a full script is unnecessary in case where you have just a single command there, unless it is intended to be shared with other users on the system. A far more practical way, would be to define an alias or a function in your ~/.bashrc file. For a function, you can do

trimmomatic(){
    java -jar /home/aishah/software_library/Trimmomatic-0.36/trimmomatic-0.36.jar
}

After you append this to ~/.bashrc, run source ~/.bashrc command, and the function can be called as

$ trimmomatic

Functions don't depend on $PATH, hence you can execute them anywhere.  If you do insist on using a script, then I would suggest placing the script into ~/bin directory or ~/.local/bin. On Ubuntu ~/bin is added to $PATH when you sign in through ~/.profile config file, however ~/.local/bin  is not, so you would have to add the following line to your ~/.bashrc file: PATH="$PATH:~/.local/bin. In both cases remember to source config file to update your current shell environment. Once that is done, the shell will start looking in either of those directories, and if your script is located there, it will be executed. Of course, this way you don't need to call the script via bash trimmomatic, rather you can call trimmomatic directly.


How to map  + hjkl to arrow key functionality?

While I sympathize with you (I have a Happy Hacking keyboard, and would love to have the same layout on my laptop, with Fn + ;'[/ for left right up down respectively), the Function key Fn is almost always implemented entirely in the hardware, and there is no way to bind it as a modifier key in software.


How you install it will depend on the file type that you downloaded.

If it's a ".deb" file, then just double-clicking it should make it run and install. If that doesn't work, then open terminal, cd to where the file is, and run it from there (something like sudo name-of-installer-file.deb).

If it's a ".tar.gz" file, then it will be more involved. WineHQ has good information on how to do this, though. See the "installing without an internet connection" section.

In short, what you'll need to do is use a computer that does have a connection to download the necessary dependencies and copy them to a USB stick or external drive that you can then plug into the computer without a connection. Then, on the non-connected machine, cd in terminal to where those files are and run sudo dpkg -i *.deb to install everything.

On a side note, I noticed you tagged this question with "video-player", "media", and "media-manager". Ubuntu comes with a video player (Totem) and music manager (Rhythmbox), and there are a number of other such applications that work well, run natively, and are compatible with most MP3 players. It may be worthwhile to try them, instead, which you would install the same way as you would install Wine. The advantage to this would be that you'd install far less (to compare, installing Wine on a computer with a high speed connection can still take upwards of 10-20 minutes to download and install everything, and often needs other libraries installed to provide the necessary support). It's usually a good idea to try native applications, first.


Desktop Ubuntu 21.04 fresh Install apache2 public_html 403 Forbidden

You caused it with that:
sudo chmod -R 750 ~/public_html

Because Apache switches user to www-data from root for serving webpages, file permissions are controlled by the third digit (neither user, group, or root).  Files inside public_html need to be readable (4), and directories need to be executable (+1 = 5)
Fix with:
chmod -R 755 ~/public_html

You shouldn't need the sudo here either, as these files should all be owned by the user.
If you want only Apache and not all other users to be able to enter the directory, then also run:
chacl u::rwx,u:www-data:r-x,g::r-x,m::r-x,o::--- ~/public_html


limit output of dpkg-query -W to installed packages

The manpage on 20.04 says "all packages matching the pattern" which includes uninstalled packages. It does not claim to limit output to installed packages.

   -W, --show [package-name-pattern...]
      Just like the --list option this will list all packages matching
      the given pattern. However the output can be customized using the
      --showformat option.  The default output format gives one line per
      matching package, each line having the name (extended with the
      architecture qualifier for Multi-Arch same packages) and installed
      version of the package, separated by a tab.

Add the Package state to your output
dpkg-query -W -f '${db:Status-Status} ${Package}\n' 'linux-image-[0-9]*'

Filter the output using the package state field. All values except "not-installed" mean the package is at least partly installed.
dpkg-query -W -f '${db:Status-Status} ${Package}\n' 'linux-image-[0-9]*' | awk '$1 != "not-installed" {print}'

Limit the output to the package name
dpkg-query -W -f '${db:Status-Status} ${Package}\n' 'linux-image-[0-9]*' | awk '$1 != "not-installed" {print $2}'


Changing home folder encryption after changing user password

It depends ...

When you change your login password with the command line, it updates you login password without updating the ecryptfs password. This is to prevent other users (well root really) from accessing your encrypted data by changing your password. If you change the password with this method, your old password can be used to decrypt the data.

When you change your login password with the graphical tools, it updates both your login password and the ecryptfs password. With this your data will be decrypted automatically when you log in and can not be accessed with the old password.

See http://bodhizazen.com/Tutorials/Ecryptfs#Password for additional information.


How do I disable middle mouse button click paste?

I use gnome-tweak-tool for disabling middle button paste in Ubuntu 16.04.

Install it

sudo apt install gnome-tweak-tool

Run it by searching "tweak tool" in installed apps or just type gnome-tweak-tool in a terminal.
Go to "Keyboard and mouse" -> "Middle-click paste"
Turn off.

That's it.

Or using just CLI

gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

Tested on 16.04.


How can I host a domain/website on my new VPS?

There are many "reasonable" and "practical" ways to go about hosting a website using your domain name on a VPS running Ubuntu.

I offer this guide for a straight-forward walkthrough on setting up a hardened Ubuntu LAMP Server to power a site:
http://blog.al4.co.nz/2011/05/setting-up-a-secure-ubuntu-lamp-server/

In regards to setting up a Nameserver.... Just don't do that :) use the free dns services offered by most registrars or use a service like Afraid.org or Cloudflare to handle DNS.


Xubuntu 20LTS can not install alongside Windows 7/8.1 on legacy BIOS

Finally i can solved the problem. At least in my case.

Create Xubuntu 20 installer using Rufus 3.11.
On Rufus option: Partition MBR, system BIOS, check add fixes for old BIOSes-it's optional.
Choice write image in "DD image mode"
Finish creating the image, open explorer then go to flashdrive. Delete efi folder. I think this important step to force xubuntu installer boot on legacy Bios.

Noted:
In my investigation, this step applicable also for modern BIOS (dual BIOS).
If create xubuntu installer using ISO mode, the step also same, just delete EFI folder to force Xubuntu booting using legacy BIOS. Hope this trick can help anyone who headache during install Xubuntu (or maybe Ubuntu) alongside windows with legacy Bios.


AMD legacy driver installation failed due to missing kernel headers

Beginning with 3.7, the uapi sources have changed and this causes issues with some older drivers that can't locate version.h...

Try this:

ln -s /usr/src/linux-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-$(uname -r)/include/linux/


Was finally able to remove the packages

First I needed to do

sudo apt-get install -f

as suggested in comments and then

sudo apt-get purge virtualbox-ext-pack
sudo apt-get autoremove
sudo apt-get purge virtualbox-dkms
sudo apt-get autoremove


How to put running time constraints on rsync processes?

Old question but the coreutils timeout command can do this (albeit it won't end gracefully).

timeout 60 rsync source destination

Where 60 is the time limit in seconds


Are you using the network with the proxy? in that case, you must export the proxy by

export http_proxy="http://<proxy>:<port>/"
export https_proxy="https://<proxy>:<port>/"

or edit the file /etc/apt/apt.conf  and add

Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";

if the proxy is not the problem change the server country and try again there may be a glitch in connectivity as @antonello said


Is it still recommended to apply the cgroups patch to Ubuntu 13.04?

According to Linus, this has not been needed since kernel version 2.6.38, which shipped with Ubuntu 11.04.

https://lkml.org/lkml/2011/1/18/322

What kernel version comes with 11.04?


Can not unlock from and lock to Launcher

I found that answer. But to be more helpfule, i will show you how to debug it.

Since it's something related to Launcher, And i don't know how does Launcher work, so i just need to find something related to Launcher. Which is Appearance in Dash.(I found this by Google).
Under Behavior tab, I can't change everything, i can click the checkbox, but nothing happen.
So, now i think there should be some output information in terminal. So i need to know how to open Appearance in terminal
Found Appearance in /usr/share/applications, the command is unity-control-center appearance
Type unity-control-center appearance in Terminal. And do the same thing as step 2. Terminal show output like this:

  dconf-WARNING **: failed to commit changes
  toconf:GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code17:
  Cannot open dconf database: invalid gvdb header
  Of course i don't know what the hell it is. But i now get some new key word to search on the Google! Yeah! I searched Cannot open dconf database: invalid gvdb header
  And I found solution, just remove ~/.config/dconf/ (Of course backup first)


Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ):

dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs sudo apt-get -y remove
sudo apt-get -y autoremove

Purge config files (careful. This command removed libsgutils2-2 and virtualbox config files too):

dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge

Remove Java config and cache directory:

sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf

Remove manually installed JVMs:

sudo rm -rf /usr/lib/jvm/*

Remove Java entries, if there is still any, from the alternatives:

for g in ControlPanel java java_vm javaws jcontrol jexec keytool mozilla-javaplugin.so orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200 appletviewer apt extcheck HtmlConverter idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc xulrunner-1.9-javaplugin.so; do sudo update-alternatives --remove-all $g; done

Search for possible remaining Java directories:

sudo updatedb
sudo locate -b '\pack200'

If the command above produces any output like /path/to/jre1.6.0_34/bin/pack200 remove the directory that is parent of bin, like this: sudo rm -rf /path/to/jre1.6.0_34.


changing /etc/environment did not affect my environment variables

I don't know the reason why PATH wasn't changed (after relogin), but

EYE_HOME = "/home/mohammad/Desktop/eye"
--------^-^

those spaces prevent EYE_HOME to be set.

It should be noted that /etc/environment is not a script file, but a kind of assignment file that is read by PAM. OTOH such spaces are not allowed in script files like /etc/profile and ~/.profile either.

If you use a script file, you need to export the variables as shown in Avinash Raj's answer.

Please note that while ~/.bashrc works if you start your program from a terminal window, it may not work if you start it from the graphical environment, since it's not sourced by the display manager.


Sphinxsearch upgrade, partial search is not working


no login credentials and can't get to grub

Try these steps:

Boot into live usb or disk using your installer.
Select Try Ubuntu at the prompt.
Mount the / root partition and chroot:

sudo mount /dev/sdaX /mnt
sudo chroot /mnt

Change your password:

sudo password root

Restart your computer, then alter the grub configuration:

Change your grub configurations with sudo nano /etc/default/grub to get to grub menu:

Make this line: GRUB_TIMEOUT_STYLE=hidden, look like this GRUB_TIMEOUT_STYLE=false
Update the grub and make new configuration persist:

sudo update-grub

Now after setting the root user password use that to find the other users on the system (if you don't know) and set their password accordingly.

Source: https://help.ubuntu.com/community/LiveCdRecovery


Docker login permission denied from private repo in Kubectl

at first , you should login in docker hub or your private registry with command "docker login"


I've got the same problem, lenovo s20-30 laptop that hangs frequently on 'Linux' would probably the best title for this thread.

I'm using Xubuntu 15.10
With this lspci -k Output:

00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e)
    Subsystem: Lenovo Device 3807
    Kernel driver in use: i915

I think moving on to other Distro is not the solution? This laptop works fine under Windows 10; I think the current driver on Ubuntu doesn't work well with the hardware. And that might be the real issue here, not the Distro.


What should i do to secure vsftpd along with Firewall in Ubuntu 14.04

Secure VSFTPD server with TLS/SSL encryption in Ubuntu 16.04:
https://www.ostechnix.com/secure-vsftpd-server-with-tlsssl-encryption/

How To Enable Secure VSFTPD On Ubuntu 14.04 With SSL/TLS:
https://www.liberiangeek.net/2014/09/enable-secure-vsftpd-ubuntu-14-04-ssltls/

I just used the former to good results. The latter seems approximately the same. The answer is too involved for me to try to duplicate here.


Banshee crashes consistently - is there a fix?

Remove ~/.cache/banshee*:

rm -rf ~/.cache/banshee*

And run Banshee again. It should not crash now.