Is it possible to upgrade to OpenGL 4 on Ubuntu 14.04?

The version of Mesa on the version of 14.04 you're using only supports up to OpenGL 3.3 on the Intel graphics driver. You will need to upgrade to either a newer HWE (14.04.5 HWE has same kernel/Xorg as 16.04 does), or to 16.04, to get newer Mesa which supports higher versions of OpenGL.

If you install the xserver-xorg-lts-xenial and linux-generic-lts-xenial packages, this should put you on the 14.04.5 HWE kernel and Xorg, after a successful install and reboot. Depending on what additional packages you've installed, you may hit some bumps and need to manually install more packages to resolve dependency errors.


How to push OpenPGP keys for a (custom) Ubuntu repository to clients running on Ubuntu server?

If you've still got access to the private key, you can easily extend the validity period running gpg --edit-key [key-id] and then using the expire command. This way, you should manage to have the old machines "pick up" on updates again, and then project the actual key escrow. Also read "Does OpenPGP key expiration add to security?" (edit: I overlooked that the key needs to be updated on the clients, which won't happen automatically).

A common "OpenPGP way" to deal with with rather frequent (more often than all decade) key escrow on a given schedule is keeping the primary private key offline (for example, on a dedicated computer not connected to the internet) and not escrowing it, while actual signing is performed by a signing subkey which you can escrow easily without losing trust on the machines (and you can have multiple valid ones at the same time).

As an alternative, you could install a new trusted OpenPGP key before the old one will expire.


Refreshing might help:
sudo snap refresh core18


Recognising Ubuntu VM hostnames on my local network

One of the interesting differences between Ubuntu Server and Ubuntu Desktop is that the Desktop installations will broadcast their existence to the network as {hostname}.local, whereas a Server installation will not. Fortunately, this is not too difficult to resolve thanks to avahi-daemon.
On your Server VM, do this:

Make sure that apt is up to date:
$ sudo apt update

Install avahi-daemon:
$ sudo apt install avahi-daemon

There is no Step 2.

From here your Ubuntu Server VM will broadcast itself on the local network as {hostname}.local. You should be able to ping the instance from the VM host so long as the network is configured appropriately.
Note: If you would like to have the VM accessible to all machines on your local network, then you will need to change the VM's network settings in VirtualBox to "Bridged" and setting the network device, then setting "Promiscuous Mode" to "Allow All", as in the image below:

Hope this solves your issue


Error while reinstaling apache2 E: Sub-process /usr/bin/dpkg returned an error code (1)

If you really want to reset your apache2 configuration, do the following steps.

# Rename your Apache2 configuration folder (just in case of).
sudo mv /etc/apache2 /etc/apache2.old

# Look up for all Apache2 package installed
dpkg -l | grep apache2

# Remove all Apache packages, usualy the following
apt remove --purge apache2 apache2-data apache2-bin

# Finally reinstall your Apache2 server
apt install apache2


Problems setting up Davmail in Kubuntu 11.04

http://sourceforge.net/users/raducotescu/

This is not a bug. It's a new feature in Ubuntu 11.04 where the systray is only used by indicators and not regular applications. To overcome this, you can enter the following command in a terminal and then restart your sessions (log out and log back in):

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"


Globally: /usr/share/icons/
or in your home folder : ~/.local/share/icons


What happens when we uncomment GRUB_DISABLE_LINUX_UUID=true?

Well i think the comment above that line says it all
        # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
After uncommenting that line root= will be passed as device name and not UUID.

linux /boot/vmlinuz-2.6.30-1-amd64 root=UUID=...
                to
linux /boot/vmlinuz-2.6.30-1-amd64 root=/dev/sdX
However it is not recommended to uncomment that line,coz if you delete/create a new partition the partition table will get changed.
So that you cant boot into the system.


Have previously set zsh as default, then uninstalled it, I now cannot use the bash in Visual Studio

Seems you have a wrong path configured on you editors (or its related terminal plugins), anyway i'll advise checking/updating your default shell provider too.

To check/update you shell provider config you can use sudo update-alternatives --config sh to list and change default between installed shell interpreters (ash/dash, zsh, fish, bash...).

Also you can directly set it to bash using sudo update-alternatives --install /bin/sh sh /bin/bash 100.

Then you should check on your editor's config and also the plugin(s) you are using to launch/open the terminal (atom-terminal, terminal-plus, etc.).

You should use /bin/bash where shell interpreter path is required.
Use /usr/bin/gnome-terminal or /usr/bin/x-terminal-emulator where the path of the terminal emulator app is required.

Hope it helps.


How to change plymouth theme ubuntu 19.10

To install all available themes in the repo

sudo apt install plymouth-theme-*

For listing and changing plymouth themes

sudo update-alternatives --config default.plymouth

After choosing a theme

sudo update-initramfs -u -k all

If you can't see it try

echo "FRAMEBUFFER=y" | sudo tee -a /etc/initramfs-tools/conf.d/splash && sudo update-initramfs -u -k all


If you want an automatic login without password, open the settings (top right corner, then choose the screwdriver icon), select 'details', 'users', 'unlock' with your password and switch the 'Automatic Logon' to 'ON'.


This may or may not work for you, but I had the same error you mention in a comment below your post and it was related to loading my built in bluetooth device.

  A start job is running for udev wait for complete device initialization

Followed by the USB disconnect message.

After a few reboots my syslog hinted to error -110 which is power related, this error did not show up during the first reboots.

I got it working again by shutting the computer down and disconnecting the power cord for a few seconds, after that the computer booted fast again and I got the Bluetooth device back.


When you open your computer there will be a logo of your motherboard manufacturer for example "Asus". When you see that then spam the ESC key. When the logo disapeers then you will see like a BIOS interface menu. Select "Boot Menu". There you should see your CD drive, for mine it is CD-DRIVE. BEFORE YOU SELECT THAT insert your CD, when you insert it they press enter on CD-DRIVE. Then it should boot into the disc. –


Can queued messages be moved between Postfix servers?

If anyone else has this issue, I ended up accomplishing my goal by using postcat to dump all the queued emails into separate files, copied those to the new server and injected them into Postfix using sendmail -t. The -t flag instructs sendmail to use the headers from the file instead of specifying the sender and recipient as command line arguments.


How to sync loved songs on last.fm with songs in Rhythmbox?

As far as I know, you cannot do this. The last.fm/libre.fm plug-in in Rhythmbox doesn't really know anything about what songs you have 'loved' on last.fm, or whether they relate to any songs in your local Rhythmbox library at all.

It would take a significant amount of development work I think, to implement this feature, and get it right. You should file a bug against upstream Rhythmbox though, at https://bugzilla.gnome.org/browse.cgi?product=rhythmbox .


blank terminal and default theme is lost in ubuntu

Log in to a tty (press Ctrl+Alt+F1 for tty1, Ctrl+Alt+F2 for tty2 and tty7 is for login screen/desktop)
and type your username, and enter and type in your password. Nothing will show up in the password field as a security feature.
At the prompt type in the following to reset all settings:

sudo apt-get install -y dconf gconftool

(type in your password)

dconf reset -f /org/compiz
gconftool --recursive-unset
sudo reboot

The next time you log in, it should work again. You will have to change the settings again to have it the same, but stuff (files,apps,themes) should still be  there.


How to combine two GNOME panels into one

The quickest and easiest way to combine the two panels into one is simply to add the panel widgets from one bar to the other and then to delete the empty bar.

The following panel applets make up the standard top-panel:

Menu Bar - custom menu bar
Indicator Complete

The following panel applets make up the standard bottom-panel:

Show Desktop
Window List
Workspace Switcher

In the answer below - the magic sequence to modify the panel is Alt+Win + Right Click of the mouse.

Lets first delete the bottom panel:

Next, add the panel widgets listed above for the bottom panel to the top-panel

Finally, move each of the widgets to your desired position - use the magic combination but make sure you right-click of the widget itself:

So the final combined panel could look something like:


Will the mobile network connection work on the Nexus 7?

Currently it looks like that version is not supported:

https://docs.google.com/spreadsheet/ccc?key=0ArLs7UPtu-hJdDZDNWliMmV1YUJ3Zk1pQlpDdGp4VFE#gid=0

https://wiki.ubuntu.com/Touch/Devices

You can probably build it yourself, but that is a lot of effort.

Always check the Wiki!!


Although it may seem that the tag -antupe is a 'word,' the tag itself is a combination of the tags -a -n -t -u -p -e.  This can be confirmed by comparing the output of:

netstat -antupe

And the output of

netstat -a -n -t -u -p -e

The outputs are exactly the same! As for the function (taken from man netstat):

-a, --all: Show both listening and non-listening sockets.  With the --interfaces option, show interfaces that are not up
-n, --numeric: Show numerical addresses instead of trying to determine symbolic host, port or user names
-t: (Couldn't find documentation, might be incorrect) Only looks accross tcp protocols
-u: (Couldn't find documentation, might be incorrect) Only looks accross udp protocols
-p, --programs: Show the PID and name of the program to which each socket belongs
-e, --extend: Display additional information.  Use this option twice for maximum detail


"errno 2" is a directory or file related problem that probably means your MySQL configuration is not correct.

In /etc/mysql/my.cnf check datadir for a valid directory and that this directory holds your databases and that you can write to that directory. You can do the 1st with

grep datadir /etc/mysql/my.cnf

and the 2nd with

ls -l {datadir}

where {datadir} is the value you get from the 1st command.


Add User to Specific folder in /public_html/

What you need is a group account, then you add each of those co-staff to that group.

Create group team:

sudo groupadd team

Change group ownership of that folder:

sudo chgrp -R team /var/www/public_html/wp-content/themes/

Set permissions on the folder:

sudo chmod -R 775 /var/www/public_html/wp-content/themes/

Now add them to team group by appending team group to the groups they already belong to:

sudo usermod -a -G team <team_membership_username>

# For multiple member adds use:

sudo gpasswd -M member1 member2 member3

If you need a special password for team:

sudo gpasswd team

Information:

For the merits of group passwords please see here. Not an expert but would suggest reading up on the merits of adding one before doing so. The permission of 775 could be 774 it's up to you.


Why is my desktop the same as home folder?

You can change you desktop folder i.e the folder you want to use   as your Desktop.

Open the ~/.config folder. (Press Ctrl+h to show hidden folders.)

Open the user-dirs.dirs file  in gedit.

Change XDG_DESKTOP_DIR to the folder you want to show as your Desktop folder. In your case it is XDG_DESKTOP_DIR=$HOME/Desktop

Now restart nautilus using nautilus -q or killall nautilus and again opening it from Dash.


How can I annotate PDFs so notes are compatible with Adobe Reader for Win/OSX?

Look for the package "xournal" in the software center or user apt-get to install it. With it you can annotate PDFs and export them as PDF again.


Confused over which method to use to install?

I suggest doing it the traditional way: install from a bootable USB stick. Follow the official Ubuntu community help/instructions at Installation/FromUSBStickQuick.

The instructions include a very simple and easy to follow step-by-step guide.

In my experience, traditional installations (i.e. via bootable USB stick) are better than WUBI (for reference, official instructions are at Installation/FromWindows) ones for a number of reasons.


Your device uses the rare and elusive driver 8812au. Please get a temporary wired ethernet or similar connection, open a terminal and do:

sudo apt-get update
sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
cd ~/rtl8812AU_8821AU_linux
make
sudo make install
sudo modprobe 8812au

Your wireless should now be working.

When Update Manager installs a later linux-image, recompile:

cd rtl8812AU_8821AU_linux/
make clean
make
sudo make install
sudo modprobe 8812au

Please retain the file and these instructions for that time.

We probably need to blacklist the internal driver to keep from interfering. Please tell me its driver from the command:

 sudo lshw -C network

I will then edit this answer to provide instructions.


In software center, Error "apt transaction returned result exit failed" And getting following error. Ubuntu 16.04.3

First, those are mostly warnings with one error.

If you read them it tells you the problem:

E:Failed to fetch
 http://ppa.launchpad.net/tualatrix/next/ubuntu/dists/xenial/main/binary-amd64/Packages
 404 Not Found
E:Some index files failed to download.
  They have been ignored, or old ones used instead.

The maintainer of the PPA does not have a package for xenial.

Either

contact the maintainer - https://launchpad.net/~tualatrix/+archive/ubuntu/next
Disable the PPA and find another source for the package(s) you want.


Decided to punt on this one, back up everything, scrub the installation, and install 4.4.
As of this writing, all seems to be working.
I hate it when the obvious answer is not only staring me in the face but jumping up and down and screaming "You idiot, you IDIOT."


Hardware audio keyboard keys stopped working

I had exactly the same symptoms with 14.04.

I imagined that VLC had 'grabbed' the media keys so I removed VLC. The problem persisted ...

I followed a reset suggestion that I found on the web:

Open a terminal and enter,

 gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-up
 gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-mute
 gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-down

This didn't seem to have any effect (which is why I closed the page and lost the link!). So I reinstalled VLC. But the next time I used an audio application I discovered that the media keys were working.

Maybe it was just luck and the keys will stop working again, but for now I'm a happy bunny :-)


How to get the Ubuntu Studio 20.04 LTS version when we have Ubuntu Studio 18.04

First make sure your system is up to date

sudo apt update && sudo apt upgrade

Next, take a backup. This is important as if anything goes wrong you will still have your data. You can use Deja Dup among other tools.

To upgrade to 20.04 run the following command and answer the questions:

sudo do-release-upgrade -d

Note: The -d flag denotes that you are upgrading to a development version. When the first point release happens, then you will get the official repository asking you to upgrade. It is recommended that you wait for 20.04.1 to be released before upgrading as any bug reports will be ironed out after that. 20.04.1 is being released on July 23, 2020.

After July 23, 2020 you can upgrade to the Focal by running the following command:

sudo do-release-upgrade


How can I view the load average over a shorter time period?

That's impossible because the kernel doesn't compute it.  (Well, you could patch the kernel of course...).

Remember that the load average is not a "regular average" of a set of numbers like you learned to compute in high school.  Keeping around samples for 15 minutes and computing 3 averages over that array several times a second would require way too much memory & CPU power.

The "load average" (on linux) is an exponentially damped/weighted moving average, meaning it indicates a trend over time.  See my answer to this related question for a couple of links to sites with more info.

If you know a bit of programming, it's actually easy to understand from the kernel sources too--that's how somebody teached me this.  See page 2 of the link to the Linux Journal article for that.


What should I use to backup my home partition to optical media?

I've never tried it but Dkopp claims to be able to do this:

  Dkopp is a program used to copy or back-up disk files to DVD or BD (Blue-ray) media. Full or incremental backups can be done, with full or incremental media verification. A GUI is used to navigate through directories to select or de-select files or directories at any level. Backup jobs can be saved for later re-use. New, deleted, and updated disk files are handled automatically, without re-editing the backup job. An incremental backup updates the same DVD/BD media used for a prior full backup. Files can be restored to the same or another location on disk. Large backup jobs can be done using multiple DVD media.


Java 8 is not available in the Ubuntu 12.04 repositories, but it is available from a Launchpad PPA.

You also cannot update a Java version to the next Java version, but you can install different Java versions side by side.

To install Java version 8 (OpenJDK 8 edition - not ORACLE Java 8) open a terminal and execute :

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

If you only want to install the Java Runtime Environment :

sudo apt-get install openjdk-8-jre

Note 1 :

As you said "... without it being too complicated ...", I assumed that you installed Java 7 from the Ubuntu repositories, which contain OpenJDK and did not add the WebUpd8 PPA (ORACLE Java).

Note 2 :

As you said that you get the File "/usr/bin/add-apt-repository", line 37 print _("The %s named '%s' has no PPA named '%s'" ^ SyntaxError: invalid syntax error, have a look here.

Suggestion :

Keep both versions installed side by side, some other packages or programs might rely on Java 7.

However, when you don't want to have both versions and if don't need Java 7 anymore ... remove it.


Trying to add PPA repo, stuck at GPG decryption

I figured it out :

as it happens the

-----BEGIN PGP MESSAGE-----

and

-----END PGP MESSAGE-----

are actually wanted in the block that you translate.

so copy the whole block received in your email :

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1

*********************************/****************************
*******/********************************************/*********
 *****/**********************************
 *****/*/************
=****
-----END PGP MESSAGE-----

save it to a file :

file.gpg

then in terminal :

gpg --decrypt file.gpg

you'll have to type in the password you selected when creating the key, then you'll get an output ending in :

Please go here to finish adding the key to your Launchpad account:

    https://launchpad.net/token/*****************

copy the link and paste it into your favorite web browser, you'll then be asked to confirm the adding of this key to your account, select "confirm", and you'll be greeted wit this message :


The Gnome Shell menu was crashing because of the alternate status menu extension I installed. This bug can be fixed by adding a picture to your profile.


Is there a way to access a folder and it's files from a different network?

For that and even copying files between computers I just use dropbox. Its in the standard software repo.

You can share files with the standard desktop and all ways mentioned in the question, but just local network and wifi, not over the internet.

Dropbox will have you sharing in minutes and integrates with the desktop and file explorer. Its easy, fast and free.


inspiron 7720 woofer is dead Ubuntu 18.04.2 LTS

This may not be the exact answer you're looking for but will open up some options.
Install pavucontrol:

sudo apt install pavucontrol

Then,

Hit your "Windows" key
Type "pavu" and click the "PulseAudio Volume Control" button that will come up.

From there, you'll have a much better view of what the system "sees" in your hardware configuration.  It may even offer the solution to your problem - play around with it.

EDIT:
You'll be specifically interested in the "Playback", "Output Devices", and "Configuration" tabs.


How to define specific urls like 'localhost'?

You have the right idea, but you'll need to put your "courses.php" in a folder, most likely. So your structure would be more like /var/www/courses/index.php (index.php is generally the default file a web server looks for, this allows you to do something like "http://courses" without dealing with rewrite engines).

You then need to set up an Apache virtual host to match up your new folder with a domain name. You can find this in /etc/httpd/sites-available or /etc/apache2/sites-available, depending on your setup. In your virtual host file, you'll have something like:

<VirtualHost>
  ServerName courses
  DocumentRoot /var/www/courses
</VirtualHost>

See Apache's documentation for more stuff you can do. You'll need to edit this file with elevated privileges, so in a terminal, you'll have to run gksu gedit /path/to/virtual/hosts/file.

Once you add that, make sure your virtual hosts file is symlinked to sites-enabled (if not, run sudo ln -s [/etc/httpd/sites-available/realfile] [/etc/httpd/sites-enabled/nameofrealfile] replace the stuff in brackets with the appropriate paths and file name (the symlink name is conventionally the name of the real file). Then, restart Apache, so that it picks up the new virtual host information.

If you're running PHP files, then you'll need to make sure you have PHP5 installed (sudo apt-get install php5) and make sure the Apache module is activated sudo a2enmod php5.

Finally, you need to associate you local web server with the domain name you've chosen earlier. For that, you'll need to edit your HOSTS file, which is located in /etc/hosts. Like your vitual host file, the HOSTS file requires elevated privileges, so open it with gksu gedit /etc/hosts. Then, below the other entries in it, add a line with 127.0.0.1 yourdomain (where "yourdomain" is the domain name you've chosen), then save and close the file.

Once that's done, you should be able to see the contents of your /var/www/courses folder. Ideally, you'll have an index file, and it will pick it up. If you have an index.php file, and it's not reading it, you may have to tell Apache to look for .php extensions for index files.


Package 'ttf-mscorefonts-installer' has no installation candidate

Here are two methods you can use to install the software.

Command line install

echo "deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/multiverse.list
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer

Easy install

Open ubuntu software center, click on Edit and select Software Sources from the dropdown menu.

Place a tick in the box for Software restricted by copyright or legal issues (multiverse).

You may be asked for a password.

When you are done, run the following commands:

sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer


Is there a way to sync or backup photos to Ubuntu laptop (14.04) from Android Galaxy S7 remotely

With the exception of a few motherboards (for example, my Z97) it is impossible to transfer to a device that is turned off

This makes me wonder about my own hardware at times but nonetheless, what you are describing is illogical

If you want to transfer to a device, it must be active/switched  on to receive your data, otherwise a 3rd part must be involved, this is for holding your data

Some solutions to your problem if you do not want a 3rd party involved would be installing a networked file server to your local network and accessing that from your phone, you could also have a cheap phone at home, acting a fileserver, or even your modem may have a USB port for such purposes, allow it to have access from outside WAN addresses, set yourself up with a good password and connect to it from your phone, if your modem is capable you may be able to achieve more with ww-drt


What to do for the error "RuntimeError: Python 3.5 or later is required"?

Cause: You are seeing this because pip 19.2 has dropped support for Python 3.4.
Solution: Try downgrading pip to anything below 19.2. In my case, since I use conda to manage my environments, I had to issue this commmand:
conda install "pip<19.2" python=3.4


Ubuntu 14.04 With Nvidia Proprietary Driver Problem

One of the other answers led me to a workaround solution for my T61 on Ubuntu 16.04. I was getting giant black-and-white zig-zag lines on regular boot but with the recovery boot was fine.

I ended up not having a xorg.conf file (here the 'x' was not upper-case); instead, I found an 'emergency' one and copied that in -- seems to work!

sudo cp /etc/X11/xorg.conf.failsafe  /usr/share/X11/xorg.conf.d/xorg.conf


Does LTS releases include repo exceptions like Firefox?

All supported versions of Ubuntu now receive updated versions of Firefox as soon as they are released by Mozilla, there's no need for a PPA or anything like that:

How do I install the latest stable version of Firefox?


How do I install an external hard drive?

There is no need to "install" drivers for most external devices in Ubuntu. However to be able to use them you need to mount the device.

When this happened automatically the device is shown as an icon on your desktop, and the USB drive is added to your Places menu.

Don't forget to unmount the device before unplugging.


Why can't Mint boot my cloned Ubuntu partition? (UUID issue)

My guess is that you are not viewing/editing the same grub.cfg that the bootloader is looking at.  Remember, you have two different /boot/grub directories now, and the bootloader needs to know which one to look for. update-grub is updating the grub.cfg in the currently mounted /boot/grub/grub.cfg.  I'm guessing that the bootloader is looking on the other partition.  After I finish my first cup of coffee, I may be able to confirm this by following through your post and perhaps making notes, but right now it's got to be an educated guess.

I believe what you need to do is to run sudo grub-install --root-directory=/ /dev/sda.  I'm giving the full version for extra information - the --root-directory parameter defaults to /.

This command will reinstall the boot loader on /dev/sda, telling it to look in the "root-directory" parameter (/boot/grub) for grub.cfg.  If you wanted your grub.cfg to be in a different distro, you can mount it and specify a different "root-directory", such as, for example, /mnt/my_other_distro/ if it were mounted in /mnt/my_other_distro.

Let me know if you have problems while I drink my coffee. :)

Edit:  (after coffee)
I see now one important problem... you should have changed the UUID for sda1, not sda7.  Then, when you installed Mint onto sda1, it would change it anyway if you reformat, but if you didn't change it, it might get confused.  By changing the UUID for the old Ubuntu installation, you invalidated all the mount settings in its /etc/fstab, along with the GRUB menu.  I assume Mint doesn't regenerate the menu, but only copies the entries, so it doesn't care whether it's correct or not.

Running update-grub corrects grub.cfg, but not the grub code in the MBR; this is changed only using grub-install.

And Linux Mint doesn't know what the entries in grub.cfg actually mean, as it may refer to a drive that isn't even present right then.  It simply adds the new entry to the top of the existing ones, I think.


How to disable keyboard shortcut list on holding Super key?

You can either change the launcher key:

CCSM -> Unity Plugin -> Behaviour Tab -> "key to show launcher"

or disable shortcuts list:

CCSM -> Unity Plugin -> Experimental Tab -> "Enable Shortcuts Hints Overlay"


Try to make syslog owner of this file
Example for cron.log:

-rw-r-----   1 syslog    adm               708 Mar 28 01:02 cron.log

At least this fixed the error for me...


My partitions are messed up and I don't know how to fix them

I see TWO hardware items in your output:
Here's one, your SSD, which includes your Ubuntu system:
Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: LENSE30256GMSP34MEAT3TA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3235924C-672D-45A7-AFC1-A0EF35F3F7AE

Device           Start       End   Sectors  Size Type
/dev/nvme0n1p1    2048   1050623   1048576  512M EFI System
/dev/nvme0n1p2 1050624 500117503 499066880  238G Linux LVM

Here's the other, which seems to be unpartitioned and is unused:
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM035-1RK1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Advice: Partition the HDD and start using it.


Getting error with "sudo make" command while installing aircrack-ng (Ubuntu 14.04)

You need to install the missing dependency libnl-genl-3-dev.

Install the library with the following command:

  sudo apt-get install libnl-genl-3-dev

Try sudo make again after installing the library.


You may want to check xRDP in addition to above.

Details : Run RDP server on Ubuntu 12.10


How to show a non-interactive X session for displaying and periodically reload a webpage?

XInput

You can disable mouse and keyboard using libinput

In you session, open up a terminal and run

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:16                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:16              id=7    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ xwayland-keyboard:16                      id=8    [slave  keyboard (3)]

So now you can disable the mouse, using the proper id:

xinput set-prop 6 "Device Enabled" 0

Don't use the core pointer, that will not work; so now you still see the cursor but its click does nothing.

You can disable the keyboard the same way

xinput set-prop 8 "Device Enabled" 0

Use 1 to enable them again

This is a manual method, you can turn this into a script autostarted with the session.

xtrlock

Another solution is to use the little utility xtrlock

sudo apt install xtrlock

and then

xtrlock

Your mouse cursor will turn into a lock and typing  on the keyboard or clicking will do nothing. But if you type your password, the lock will be removed.
My test shows it does not work on 2 monitors, only one (in wayland) but this is not your setup it seems.


Chrome or chromium window doesn't appear after opening

Let try this..
Go to system setting -> Select display setting
Check whether how many displays are enabled. If enabled more than one
then turn off the unused display or enable mirror option.
This can solve your issue.


Can't detect usb media while booting ubuntu 18.04 in in msi gs65 stealth thin 1060 maxq

I have just received my GS65 Stealth Thin and the first thing I did was install Ubuntu 18.04 too. :)  Aside from switching the order of the boot devices, the only other setting I had to change in the BIOS was to disable Secure Boot.  To enter the BIOS you should press the DELETE key repeatedly before the OS boots straight after power-on.

Here's a screenshot of the setting:

Make sure you Save and Exit so the changes take effect.

If you chose not to set USB drives as the first priority in the boot order, instead you can also hit F11 during boot to select a boot device for a one-off boot.


It is dangerous and therefore not recommended to run firefox with root permissions, because it makes your computer easier to attack via the internet.

If you want to run gedit and other tools with root permissions you should not use plain sudo, because it can damage configuration files in your home directory. Instead you should use

sudo -H gedit

or if the package gksu is installed

gksudo gedit

or use command line tools like the following editors: the simple nano or advanced but more difficult vim

sudo nano filename

sudo vim filename


4k Laptop with 1920x1080 external monitor

Bit late, but the best solution seems to be not to use Wayland and lower built in display to 1080p. As Xorg is the default on 18.04 anyway we'll go with that.

Connect monitor
Lower built in display to 1920x1080
Set scaling to 100% on both

Tested on driver nvidia-440

When disconnecting the monitor the resolution will set the built in display back to 4k so you shouldn't notice any difference between docked/undocked, except for the obvious loss of quality when watching videos etc (while docked).

This issue doesn't seem to get any better with 19.10 either :(


How can I select a mirror than the one apt-get chose for me?

If you only have terminal, you have to manually edit your /etc/apt/sources.list file.  There's no other way unfortunately to do this.

You'll have to replace the domain names in the sources.list of the current mirror with whatever mirror you wish to use.  The standard archives tend to be the most updated source with updated packages, however it may not be the closest to you (archive.ubuntu.com).

However, a 404 error suggests that there's a newer package version or such available; make sure to run sudo apt-get update first, then try and install the package, to rule out the mirror you're using as the actual problem.


BIOS is not showing device booting list after installing ubuntu12.10 64ibt

Pressing F9 will bring you to the boot menu but that is only part of your bios function. You need to actually enter your bios setup by pressing (usually Del, F1 or F2) and select the first drive you want to boot to. The bios normally will ignore your USB unless it is clearly set to boot to it by you. You need to add it to your boot menu. If you have never entered your bios setup before I strongly urge you not to do it. Get help from a friend who knows what he is doing.


How to switch language keyboard combination?

Ubuntu 17.10 and newer (GNOME Shell)
From this answer: After adding the desired languages (by navigating to Settings -> Regional & Language), you can use the default keyboard shortcut which is Super+Space ("super" is another name for the Windows key), or you can click on the top bar menu:

Ubuntu 13.10 to 17.04 (Unity)
As of Ubuntu 13.10, it is now called Text Entry Settings instead of Keyboard Layout
It can be reached through either of these methods

Going through System Settings -> Text Entry
Using the App Indicator as shown in the screen-shot below.

Ubuntu 13.04 and older
Seems you forgot an important step.

Download Hebrew language support. You can do this from the Install/Remove Languages section of "Language Support".
System Settings -> Keyboard Layout -> "+" -> "Hebrew" -> Add
System Settings -> Keyboard Layout -> Options -> Keys to Change Layout -> mark [alt]+[shift] (this step is optional, only if you want that custom keyboard shortcut)

An icon like this should appear in the upper-right after step two:


How can I remove the icon of Telegram-Desktop from the dashboard?

Open terminal and type:

  cd /var/lib/snapd/desktop/applications

then type

  ls

it will list something like this

  mimeinfo.cache gnome-logs_gnome-logs.desktop  telegram-desktop_telegramdesktop.desktop

now your remove the telegram named file by typing

  sudo rm ./telegram-desktop_telegramdesktop.desktop


Changing internal IP address of wireless adapter?

In the section [ipv4] of your /etc/NetworkManager/system-connections/HOTSPOT file, you can manually include your choice of address as long as you change your method of address choice:

[ipv4]
method=manual
address1=172.16.0.1/24

See man nm-settings for (a lot!) more details.


How to fix Missing operating system after ms-sys

Usage:
    ms-sys [options] [device]
Options:
    -1, --fat12     Write a FAT12 floppy boot record to device
    -2, --fat32nt   Write a FAT32 partition NT boot record to device
    -3, --fat32     Write a FAT32 partition DOS boot record to device
    -4, --fat32free Write a FAT32 partition FreeDOS boot record to device
    -5, --fat16free Write a FAT16 partition FreeDOS boot record to device
    -6, --fat16     Write a FAT16 partition DOS boot record to device
    -n, --ntfs      Write a NTFS partition Windows 7 boot record to device
    -l, --wipelabel Reset partition disk label in boot record
    -p, --partition Write partition info (hidden sectors, heads and drive id)
                    to boot record
    -H, --heads  Manually set number of heads if partition info is written
    -7, --mbr7      Write a Windows 7 MBR to device
    -i, --mbrvista  Write a Windows Vista MBR to device
    -m, --mbr       Write a Windows 2000/XP/2003 MBR to device
    -9, --mbr95b    Write a Windows 95B/98/98SE/ME MBR to device
    -d, --mbrdos    Write a DOS/Windows NT MBR to device
    -s, --mbrsyslinux    Write a syslinux MBR to device
    -t, --mbrgptsyslinux Write a syslinux GPT MBR to device
    -z, --mbrzero   Write an empty (zeroed) MBR to device
    -f, --force     Force writing of boot record
    -h, --help      Display this help and exit
    -v, --version   Show program version
    -w, --write     Write automatically selected boot record to device

    Default         Inspect current boot record

-7, --mbr7      Write a Windows 7 MBR to device

Test this:

sudo -i
ms-sys -7 /dev/sda


Well since it has been awhile I figured I would post the results that have been coming out on this.

So far some one running Arch on an XPS 13 and using the Razer Core has gotten an Nvidia 970 to run.

You can read more here for anyone who is interested.

https://www.reddit.com/r/razer/comments/4xwlt6/razer_core_gtx_970_on_xps_13_9350_arch_linux/


How to loop file names into an array or run custom code on it

If you can be sure none of your filenames contains newlines, with bash you'd write:

mapfile -t arrFiles < <(find "$folderLocation" ! -name "*~" -type f)

A bash only way:

shopt -s globstar nullglob extglob
arrFiles=( **/!(*~) )

But that will include directories. To filter them out you could

arrFiles=()
for f in **/!(*~); do
    [[ -f $f ]] && arrFiles+=("$f")
done

To examine an array:

declare -p arrFiles


Computer not recognizing 13.10 as a boot option after install from live USB

I'm also seeing this same issue. Seems to be related to GRUB. I've verified that, at least in the installer, GRUB was set up to install on /dev/sda. I'm installing on a partitioned 256GB SSD hooked up to an ASUS Crosshair V Formula-Z motherboard. The BIOS is set up to use the Legacy ROM, not EFI. Grub isn't running at all on boot, just goes right into windows. Restarted the installer from the Ubuntu 13.10 installer DVD, and verified that the partitions were created, and that Ubuntu installed (about 5GB used of 72GB). I did create a swap partition of 16GB to match the amount of RAM in the system, though I'm not sure that's really relevant to this issue... just mentioning because OP did.
I have some older Ubuntu disks around, going to try to install from 12.04 and see what that gets me, and will update this thread.


It is recommended to install Ubuntu after Windows. In order to fix the grub rescue, there is a nice tool: boot-repair. Just let boot-repair try to fix the problem. Some useful information about boot-repair can be found here: https://help.ubuntu.com/community/Boot-Repair


Firefox is always already running after copying .mozilla from a previous version

Since running Firefox as root works and gives you access to the data you had before, this is probably a permissions problem. It's likely that the user ID that owns some or all files in your old profile is different from your current user ID. You can fix this as follows:

sudo chown $USER:$USER ~/.mozilla

Make sure Firefox is not running when you execute that command.


How to change the functionality of keyboard special keys?

In your special case go to System Settings → Keyboard → Shortcuts → Sound and Media. Click onto "Next track ... Audio next" and press your ✉ email key:

This is the right place for connecting keys or key combinations with actions; it is possible to set up custom commands, too.

If you wish to configure several keys on your keyboard, go to System Settings and check out Keyboard Layout → Options. There you can edit the Caps Lock ⇪ behaviour, for example:


Add to PATH, no ~/.profile nor ~/.pam_environment

Refer to Ubuntu Enviroinment Variables, you could use also ~/.pam_environment, as you suggested.

So, create file if not exists, or edit if exists, and insert this line:

PATH DEFAULT=${PATH}:${HOME}/path/to/ffmpeg/bin


Ubuntu 12.04 , Download Flash videos from nowvideo website?

You can download videos from nowvideo with no addictional software

Go to the novideo url with Google Chrome
Open the Developer Tools CTRL + SHIFT + J
From inside the Developer Tools open the Network panel
Start the video from the browser window
now in the Network panel you can see the video connection (the longest bar)

right click on it and select "Copy link address"
open a terminal and type wget and SHIFT + INS, so that the command would be somenting like

wget http://s122.nowvideo.ch/dl/blabla/bla/blabla.flv?client=FLASH


How does one get the ambient light conditions in Ubuntu Touch?

It's indeed not yet hooked up to the backend yet (atm you can only get such sensor events using the platform-api directly). I included a story in the Phone Foundations backlog to hook this into Qt.


unable to install fail2ban on ubuntu 18.04

I got a solution with Rinzwind's saying. My sources.list had main repositiory list only. But fail2ban is available universe package list. So, I added universe list into sources.list with command-lines like this.

sudo add-apt-repository universe

Finally I could search fail2ban package successfully.


Printer problems (system-config-printer broken) after update to 16.04

While doing a totally different task (git clone something) I ran into a similar error (this time it was undefined symbol: __gmpn_cnd_add_n).

And this post helped me out : https://unix.stackexchange.com/a/279649/228682.

You basically have to remove your custom installed version of ligmp by running

rm /usr/local/lib/libgmp.so*


It was the stupidest mistake I have ever made. I setup a NTFS partition as my home directory. It was wrong. When I mounted NTFS partition, I didn't have permission for the files on it, because NTFS doesn't support Linux file system permissions, so the config files failed to load and it led to the problem.

Don't mount NTFS partition on home folder


Are there any softwares or commands that allows me to bring up a list of external commands

Unlike the rest of these answers, mine is pretty easy.
I keep a handy text document that has snippets of code, commands for installed applications - or at least how to start them, and things of that nature.
Then, beyond all that, I use the alias function for many things. I use aliases to make the commands something that I will be more likely to remember, or at least guess.
For example:
alias update="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean -y"

So, when I want to update, I just type 'update' into the terminal and it does all of those processes for me without any additional oversight.
Next, and probably the most important, is that I use these aliases across multiple installs and even with entirely different OSes. If I'm using zypper, then I have the same command but a different backend by way of alias. I don't have to remember all the various commands because I remember the aliases.
I also keep my handy text document, helpfully called linuxterminalnotes.txt and share it with the other computers I own. It doesn't require a high-tech solution, it requires a network connection or a USB thumbdrive.
The only effort required is to update it. If I install something new that requires a cryptic terminal entry, I save it to the file. I keep this file, and my various alias files, backed up across multiple devices and in multiple locations. The only tech I need is a simple text editor.


As you yourself stated in a comment, the solution is to install gnome-panel

sudo apt-get install gnome-panel should do the trick.


You should just need to install the Java Runtime Environment (JRE):

sudo apt install default-jre


How to install Jupiter on Ubuntu 14.04 LTS?

Development of Jupiter has stopped as of 12.10.

  Someone knows how to get this done to work properly?

The RPM you used is the Redhat version and this will not have code specific to Ubuntu. Regarding the indicator: there is none, so if this is to continue someone needs to code an indicator for Jupiter.

Why the RPM? You would be better of downloading the Ubuntu version of Jupiter and use that (no need to mess with alien). This one does not have an indicator either though.

I would advice to take the more obvious road: forget about Jupiter and install TLP.


Why is nic renaming every reboot? - Ubuntu 20.04 LTS

Its because the networking subsystem is not matching the hardware with previous boots.
I use the following to give a consistent name regardless of the physical type.
network:
ethernets:
eth0:
dhcp4: false
match:
macaddress:
set-name: eth0
version: 2


1.0TB DISK IS LIKELY TO FAIL SOON, Total Powered On Time 1 Month?

I recommend testing it with smartctl to be sure.

Open a terminal window
Run:

sudo apt-get update
sudo apt-get install smartmontools

Then you'll want to run:

sudo smartctl -x /dev/sdY #Replace "Y" appropriately for your system

If smartctl also indicates a failure, then I would immediately backup any data on the disk and contact HP for a warranty HDD replacement.


Is there a way to have Debootstrap automatically configure locales?

I would suggest using grml-debootstrap. This is a wrapper script around debootstrap and comes from the grml live cd. This script has a file /etc/debootstrap/locale.gen where you can put your locales and they are generated at the right time. grml-debootstrap also has lots of more advantages and its worth to look at.


If you don't specify a full path, icons must reside inside the current icon scheme location.

If you want to add a program icon that is not part of any specific scheme, put it in /usr/share/icons/.


Why does this script work in the current directory but fail when placed in the path?

"Text file busy" implies that the script is being used elsewhere. Find out what is opening the file using:

lsof | grep safe.sh

Then stop that process/es as necessary.


The message is saying that /sbin/brctl was not found. This file is found in the package bridge-utils.
sudo apt-get install bridge-utils will solve your problem.


In a default Ubuntu installation espeak may have been activated by turning on the screen reader from the accessibility tool Orca.

In case you have issues with this you may have to disable the screen reader from Orca or educate your users not to use it.


sound volume settings doesn't do anything

This could help, once my friend had this issue and following these steps fixed it:

Removed ~/.config/pulse directory.
Started Pulse Audio.

rm -rf ~/.config/pulse
pulseaudio --start

Incase if its still showing errors you will have to reinstall pulse audio and equalizer.

sudo apt-get purge pulseaudio pulseaudio-equalizer
sudo apt-get install pulseaudio
sudo apt-get install pulseaudio-equalizer
pulseaudio --start


Try find ~/ -type f -name "postgis-2.0.0" instead.

Using . will only search the current directory.  ~/ will search your entire home directory (likely where you downloaded it to).  If you used wget as root, its possible it could be somewhere else so you could use / to search the whole filesystem.

Goodluck


16.04 LTS - all wifi connectivity lost when changing wifi networks

You have upgraded to the latest LTS version of Ubuntu, and like many you have been having problems with Wi-Fi. You experienced loss of Wi-Fi on resuming from suspend. This was due to bug 1574347,  bug 1311257 or some combination of the two. You found a workaround that worked. However when you switch networks you again lose Wi-Fi connectivity with NetworkManager not seeing any Wi-Fi access points. What should you do?

The following is the approach I would recommend.

Research the problem
Ask for help
Raise a bug report
Seriously consider whether you need the latest LTS version of Ubuntu
Try an alternative to GNOME Network Manager
Control your Wi-Fi from the terminal.

Step 1 You tried researching the problem. You did not find anything about this issue on the internet.

Step 2 You posted this question on Ask Ubuntu. You posted the results of running the Ubuntu Forums WiFi diagnosis script and a screenshot of your screen. When you did not get a response you posted a bounty on the question. All great moves on your part. We have chatted about your problem and I have analysed your WiFi script results in detail. Apart from a couple of kernel error messages apparently related to the suspend/ resume issue the results show working Wi-Fi that is just not connected to an Access Point.

Step 3 This is clearly a bug in GNOME Network Manager so create a bug report. The developers need bug reports to find an eliminate errors in the code. You do this by typing ubuntu-bug network-managerin a terminal.

Step 4. Seriously consider reverting to your previous version of Ubuntu. Adding LTS to the name of a release does not make it of higher quality than any other release. What creates the quality is the amount of testing it has undergone. LTS releases are used by much greater numbers of users than development releases so once they are live they are much more thoroughly tested. As 16.04 LTS has been live for less than a month it will have far more bugs than say 14.04 LTS. On Windows my policy was never to use an operating system release until it had been live for at least a year so other people found the bugs. In your case you need a recent kernel to solve another issue so you want to stick with 16.04.

Step 5. Looking at the bug list for GNOME network manager it is clear that they are actively working on a significant number of bugs. It is going to take some time for them to address all the serious ones. Consider replacing the GNOME network manager with another one. Wicd does not appear to be being actively developed but network management standards have been stable for years. I would recommend trying this as it does not depend on GNOME and is unlikely to have the same issue. You have tried Wicd in the past and have issues with it so you would like an alternative approach.

Step 6. You don't actually need a network manager to get Wi-Fi connectivity. You can use a terminal. Detailed instructions are here. Connecting to WPA Wi-Fi from the terminal


User in sudo group cannot perform sudo operations

I think you are not clear about what group sudo represents if a user is a member of it.

By default, if a user is a member of group sudo, that user can run commands as root by impersonating root as :

sudo some command

There is a line in the /etc/sudoers file that makes this possible :

%sudo   ALL=(ALL:ALL) ALL

Again becomming a member of group sudo does not make you root or does not give permission to run commands only runnable by root on the fly. You always need to use sudo before that command. So if a user is not a member of group sudo that user won't be able to run any command as root even with using sudo.

In your case, as you were running :

mkdir -p $HOME/.ansible/tmp/testfolder

you will get permission denied message as the directory /home/ubuntu/.ansible is owned by root and there is no permission for others to write on it.

On the other hand while you were using :

sudo mkdir -p $HOME/.ansible/tmp/testfolder

you were impersonating root who has the permission to write on that directory so the command was a success.


Internal Microphone is not working on the latest ubuntu 20.04.1LTS in acer swift 3

Similar bug affects multiple users and multiple laptops, there is some information with probable solutions for it in this thread: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1840725
Unfortunately there are no fixes which would have worked for me yet, I also have an Acer Swift 3 SF314-57G.
The bug is now fixed in latest kernels. Here you can find all the information: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1877757


To access the files inside a volume encrypted with TrueCrypt you need to decrypt it with a compatible application and/or driver. For TrueCrypt there are two options in Ubuntu.

Use TrueCrypt for Linux

… or, since TrueCrypt itself is discontinued, one of its forks. The most popular and well maintained one appears to be VeraCrypt so I'll go with that.

To install

either go to https://www.veracrypt.fr/, download the most recent VeraCrypt release for Ubuntu, unpack the TAR archive with your favourite archive manager and run the GUI setup tool for your system architecture with super-user privileges, e. g.

sudo ./veracrypt-1.19-setup-gui-x64

or install from a PPA (with the usual security implication):

sudo add-apt-repository ppa:unit193/encryption
sudo apt-get update
sudo apt-get install veracrypt

Start VeraCrypt through the dash, the application menu, or the command-line (veracrypt).
Mount the encrypted volume like you would with TrueCrypt in Windows.

Use the TrueCrypt compatibility mode of cryptsetup

sudo cryptsetup open <name> /dev/sda2 --type tcrypt <options>

You can choose <name> freely.

  <options> can be [--key-file, --tcrypt-hidden, --tcrypt-system, --readonly, --test-passphrase].

More info in the manual of cryptsetup(8)

If you supply the correct key file and/or pass phrase you'll get a new virtual device at /dev/mapper/<name> which you can mount like any other file system through file managers, partition managers, or on the command-line (e. g. udisksctl mount --block-device /dev/mapper/<name> --filesystem-type ntfs).


According to https://stackoverflow.com/a/40167445/486919 and https://stackoverflow.com/a/40167000/486919, this is a bug on Ubuntu's end and a bug report has been made at https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463. Consider clicking on "Does this bug affect you?" followed by "Yes, it affects me" to bring this bug to the maintainers' attention.

For the time being, as stated in https://stackoverflow.com/a/40167445/486919, you can use pip freeze with grep -v to create requirements.txt that you can subsequently use with pip install -r:

pip freeze | grep -v "pkg-resources" > requirements.txt


The profile file is always run by login shell, and if you want other scripts to be sourced by the login shell, you mention them in profile


Error: no such file or directory, ubuntu 16.04 LTS

When people document install procedures, they often want a way to refer to the installing user's HOME directory. In this case, he/she used /home/username/..., when $HOME/.local/bin/no-internet or ~/.local/bin/no-internet would have been clearer.

Replace username with YOUR username (it is stored in the environment variable USER), and

nano /home/$USER/.local/bin/no-internet

or use the HOME environment variable to refer to your home directory ( this is better than using /home/$USER, since user home directories are not required to be in /home.

nano $HOME/.local/bin/no-internet


Forgot passphrase (encrypted hard drive), how can I use my computer again?

If you can't remember the password, then that's all she wrote.

All you can do is install a new OS. You don't need to enter recovery mode to do that. Just boot up the live USB and carry out the normal installation process. The hard drive will get overwritten.


Add support for media keys (play, stop, previous and next buttons) in Lubuntu

Modify ~/.config/openbox/lubuntu-rc.xml (it may be copied from /etc/xdg/openbox/rc.xml )

Inside the <keyboard> element add the following to support Clementine (or equivalent to support other music players):

   <keybind key="XF86AudioPlay">
     <action name="Execute">
       <command>clementine --play-pause</command>
     </action>
   </keybind>
   <keybind key="XF86AudioStop">
     <action name="Execute">
       <command>clementine --stop</command>
     </action>
   </keybind>
   <keybind key="XF86AudioNext">
     <action name="Execute">
       <command>clementine --next</command>
     </action>
   </keybind>
   <keybind key="XF86AudioPrev">
     <action name="Execute">
       <command>clementine --previous</command>
     </action>
   </keybind>

and run openbox --reconfigure to reload configuration files.

based on http://wiki.lxde.org/en/LXDE:Questions#What_about_the_Play.2C_Stop.2C_Previous_and_Next_buttons.3F and http://forum.lxde.org/viewtopic.php?f=8&t=1183


Its more a guess as I am having a similar slow down in a system. The reason there is the graphics which is using not the correct hardware accelerating driver, but a generic one which is using the CPU to emulate the things the GPU could to. Also the high load in xorg hints to that. I could imagine that your somewhat exotic installation procedure prevented the graphics driver from a correct installation.
So before doing anything else I would suggest to reinstall the graphics driver. I can not walk you through thid, but you should find plenty of descriptions by searching for your card type.


Landscape + Autopilot Openstack not allowing package management

The Autopilot turns off this feature currently.  That is by design and updates are currently up to the operator to take care of.  There are plans to change this in the future once the HA service level can be guaranteed while the upgrade is in progress.


How can I make settings persistant on Ubuntu on USB flash drive

There are three types of install to a USB stick.

1) Normal is is like a LiveCD. When you reboot, any "changes" are lost.

2) With Persistence is like having a Home partition on the stick. You can save SOME stuff to the persistent partition. Not everything will be saved.

3) A full install. If your USB is big enough. All changes should be saved.


What size in pixels are GNOME Terminal's column height and row width?

It's 80x24 characters, so the size depends on the font, e.g. with the 11pt Monospace font it's 722x434 → one character is 9x18px with 1px border around the terminal.

I suggest you make a screenshot of your terminal and determine the size by using the selection tool of GIMP (or go with the easier solution suggested by AlexTheBird - just thought if you want to make a background image, you already have GIMP locked and loaded :-)).


UEFI boot order depending if usb stick is plugged

Background: EFI uses a boot order variable stored in NVRAM to determine what to boot. (This is the BootOrder: line in the efibootmgr output.) These entries point to EFI program files stored on an EFI System Partition (ESP), to network devices, and so on. You can have multiple ESPs, and each ESP can have multiple EFI boot files. If one boot file fails, the ESP should drop back to the next one in its list.

Your problem is that, although Ubuntu is installed on your USB flash drive, that flash drive has no ESP, and it looks as if GRUB has been installed in the ESP on the hard disk. Unfortunately, your GRUB configuration relies on configuration files on the USB drive, so if the USB drive is unplugged when GRUB launches, GRUB will drop back to a grub> prompt, but it won't fail in the sense of returning to the EFI so that the EFI can launch the next boot loader. When you first installed Ubuntu, this GRUB was set as the default boot loader, so you saw the type of failure you describe. You changed the default to Windows, which causes it to boot correctly, but makes it harder to boot Ubuntu. There are several ways to clean this up:

You can live with it as-is and use the computer's built-in boot manager (the F9 key you mention) to select which OS to boot. This solution is the safest one, since it involves no changes that might make matters worse.
You can attempt to reconfigure GRUB to read its configuration file from the ESP rather than from your Ubuntu /boot directory, then reset GRUB as the default. GRUB should then present a boot menu, which will enable you to select your desired OS a bit easier. I'm a bit rusty on how to do this, though. Check this old documentation page for all the gory details (and then some). Note that GRUB won't automatically select Ubuntu if and only if the USB drive is plugged in -- or at least, if it can be configured to do that, I don't know how.
You can repartition your internal hard disk to include an Ubuntu /boot partition and copy its files there. You'll then need to re-install GRUB. In theory, it should then work whether or not the USB drive is plugged in, but it won't automatically select Ubuntu when the USB drive is plugged in and Windows when it's not plugged in. This option is one of the riskiest ones, since it involves resizing your on-disk partitions.
Create an ESP on your USB flash drive and install GRUB there using the fallback filename of EFI/BOOT/bootx64.efi. (The installation procedure is likely to be a bit convoluted, though.) You can then use your boot manager (F9) to switch between the USB drive (GRUB/Ubuntu) and Windows. Some EFIs might let you set the USB drive as default if it's plugged in, which would give you the automatic boot to Ubuntu when it's available that you want, but I can't promise this detail will work as you want. You'll definitely need to repartition the USB drive (which adds a bit of risk), and you may need to convert the disk from MBR to GPT. One advantage of this approach is that the USB drive should be independently bootable on just about any EFI-based computer of the same architecture.
You can install my rEFInd boot manager to your ESP. With a few configuration tweaks (mainly setting default_selection vmlinuz,Windows or something similar in its refind.conf file), it should boot Ubuntu by default when the USB drive is plugged in and Windows when the USB drive is not plugged in.

There may be other possible solutions, too, but these are the ones that spring to mind. The best of these are probably leaving it as-is, creating an ESP on your USB drive and re-installing GRUB there, and using rEFInd.


sudo hwinfo --bios 2> /dev/null | grep 'Memory Device: #' -A14 | grep 'Size'
this tells me about my ram sticks

~$ sudo hwinfo --bios 2> /dev/null | grep 'Memory Device: #' -A14 | grep 'Size'
    Size: 4 GB
    Size: No Memory Installed
    Size: 4 GB
    Size: 4 GB

It is always better to look on the motherboard and read the manual about memory limitations as some system BIOSes say they have more slots than they actually do


50 GB ought to be enough for Ubuntu itself. I gave it a combined 25 GB (/, /boot, /usr and /var), which is far more than necessary even though I would consider myself a power user (with multiple IDEs, a DBMS, a web server and a VM environment).
The size of your /home partition depends on your needs and is the same you would expect for the same kind of data on Windows (plus games if you want to use the default storage location of Steam, because that's on /home by default).

It is possible and relatively safe to change the size and layout of existing partitions with tools like (G)Parted, if your needs turn out to be different at some point.


Change my terminal from x-term to mate-terminal when I click open terminal here

sudo update-alternatives --config x-terminal-emulator

Then when it gives you options, choose your desired one:

  1            /usr/bin/lxterm                   30        manual mode
  2            /usr/bin/terminator               50        manual mode
  3            /usr/bin/uxterm                   20        manual mode
* 4            /usr/bin/xfce4-terminal.wrapper   40        manual mode
  5            /usr/bin/xterm                    20        manual mode


How can I speed up minecraft after buying more RAM?

I suspect the combination of low-powered CPU and graphics is causing the framerate issue, rather than RAM.

Adding extra RAM would help in situations where the machine is running out of memory. If it isn't, extra RAM will make zero difference to in-game performance.

One test would be to run top in a console while running Minecraft. If the CPU is hitting maximum (100% for single-core CPU, 200% for dual-core, etc), the CPU is probably causing (or contributing) to the low frame rate.

As far as I know the CPU in a C7 is going to be soldered onto the motherboard. Upgrade options are extremely limited (unless, as the commenters in that Tom's Hardware thread say, you're handy with a soldering iron).

Unfortunately, it's just not a gaming machine.


Title bar buttons (close, minimize, maximize) apper in system status on top bar Ubuntu 20.04, Gnome 3.36.8

Disable all your custom installed extensions. Log out then back in. Then reenable your Gnome Shell extensions one by one, using Tweaks. Each time check whether the window control buttons have reappeared. This procedure will allow you to identify the extension causing this effect. Then it is up to you to either continue using it or not.


I don't understand this statement... "The installation I made via USB with get to delete the partition of all the data.". If you deleted the boot/Ubuntu partition, how do you expect it to boot properly? You may just need to reinstall Ubuntu.

In case I misunderstood...

Since you probably can't get to the GRUB menu, and the ROOT prompt, we'll go about this the long way. Some adjustment may be required in the steps, depending on how well things co-operate.

Boot to a Ubuntu Live DVD/USB.
Open a Files window and single-click on the hard disk name in the left pane to mount the hard disk. Navigate to the /etc folder on the hard disk. Right-click on white space in the /etc folder and select Open in terminal from the contextual menu. Then type sudo nano fstab. Find the line that contains "UUID=48c4ab40-53b0-4274-82f6-0286459d5df8"... we'll need to change this UUID.
Open another terminal window and type sudo blkid. This will give us a list of UUID's for the various disk partitions. Find the correct UUID for the boot partition. Replace the UUID in the other terminal window with the correct UUID. Save the file. Reboot the computer.


Luckily, your input file has a format the shell understands when it comes to
assigning variables a value: var1=value1 var2=value2 etc. So we can simply
read each line and use the eval command to evaluate the line.

Put the following into a file, say parse.sh, do chmod +x parse.sh and
run it with your input file as a parameter.

Script parse.sh:

#!/usr/bin/env bash

while read line; do
    eval $line;
    echo "$name|$loc|$ip"
done < "$1"

exit 0;

File input.txt:

name=Joan age=42 ip=172.20.1.80 sex=M loc=UK
loc=IR sex=F ip=172.20.1.1 age=32 name=Sandra

Run:

me@ubuntu:~> ./parse.sh input.txt
Joan|UK|172.20.1.80
Sandra|IR|172.20.1.1

Please note that the values must not have a space in them. E.g.

ip=... name=Ubai salih loc=...

would not work and give syntax errors. Also, if the input file would contain a line with a bad_command that command gets executed because that is how eval works: it just executes the given string.


I'd probably use find to do this:

find -iname 'fis*.swf' -exec swfrender "{}" -o "{}.png" \;

But you could probably use other sorts of loops:

for f in fis{1..20}.swf; do
    swfrender "$f" -o "$f.png"
done


I solved the problem by starting the ubuntu in upstart mode. Upstart mode gave me an error about fstab which I have edited some time ago to mount another harddrive. After I manually deleted the UID for the  second hard drive from fstab, the system started boot properly.

Maybe the BIOS was trying to read from the second hard drive all the time because of the fstab and that is why the boot-repair gave me the error about "boot files are far from the start of the disk"


Are there any GUI man page editors are available?

It is possible to author man pages using DocBook markup and use tools such as docbook2x-man to create troff output. There are some visual ("WYSIWYM"-style) editors available for editing DocBook markup. For example, the GPL-licensed Syntext Serna Free:

Also, doclifter is a utility for converting man pages to DocBook.


Add new IP addresses in Ubuntu Server 18.04.1 LTS

I researched more and found these;

My default network configuration is here: /etc/systemd/network/50-default.network

Main IP address, gateway and other things are resides in that file.
This explains strangeness that even /etc/network/interfaces not exist and /etc/netplan directory is empty, system is still running without problem.

This page helped me to add new IP addresses:

https://docs.ovh.com/gb/en/vps/network-ipaliasing-vps/#step-1-create-the-configuration-file

I created 50-cloud-init.yaml file and fill it with these informations,

network:
    version: 2
    ethernets:
        enp96s0f0:
            dhcp4: true
            match:
                macaddress: xx:xx:xx:xx:xx:xx
            set-name: enp96s0f0
            addresses:
            - 51.189.170.192/32
            - 51.189.170.193/32
            - 51.189.170.194/32
            - 51.189.170.195/32
            - 51.189.170.196/32
            - 51.189.170.197/32
            - 51.189.170.198/32
            - 51.189.170.199/32
            - 51.189.170.200/32
            - 51.189.170.201/32
            - 51.189.170.202/32
            - 51.189.170.203/32
            - 51.189.170.204/32
            - 51.189.170.205/32
            - 51.189.170.206/32
            - 51.189.170.207/32

Then run netplan apply and it's working now.


You should check / change your DNS.

Set your DNS server to 8.8.8.8 and apply. This solution will work everywhere and you will always get the domain that you have chosen.To do this, follow the answers from this question: What is the proper way to change the DNS IP?


Mouse is slow when SD card reader is in use

I had problems with my Ubuntu 18.04 slowing down on several occasions ever since I installed it. However some weeks ago I discovered "Solution 3" of this It's FOSS article

Ever since I changed one line in /etc/nsswitch.conf my system runs perfectly smooth.

Old line:

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname

New line:

hosts:          files dns

Today I dumped an SD card on my laptop. Without this change reading the SD card took much longer and Ubuntu became very unresponsive during the process.

Before the change:

$ sudo dd if=/dev/sdb of=sdcard.img status=progress
15929001984 bytes (16 GB, 15 GiB) copied, 2580 s, 6,2 MB/s
31116288+0 records in
31116288+0 records out
15931539456 bytes (16 GB, 15 GiB) copied, 2580,5 s, 6,2 MB/s

After the change:

$ sudo dd if=/dev/sdb of=sdcard.img status=progress
15927067136 bytes (16 GB, 15 GiB) copied, 869 s, 18,3 MB/s
31116288+0 records in
31116288+0 records out
15931539456 bytes (16 GB, 15 GiB) copied, 869,426 s, 18,3 MB/s

I'm curious if this will help you as well and would be thankful if someone could explain this very strange observation of mine.


Is setting a "Master Password" essential for security of Thunderbird accounts?

Once you boot other people with physical access to the computer or hackers making use of any vulnerabilities in the system could get access to your saved passwords. So it makes sense to encrypt them via master password anyway.


Doesn't /var/log/vsftpd.log give you an idea of who's logging in and how often?

And you can bully that programmatically for a curter response:

awk '/OK LOGIN/ {print $8}' /var/log/vsftpd.log | sort | uniq -c


Xubuntu 16.04 all icons disappeared after update

This is a mime cache issue resolved using

sudo update-mime-database /usr/share/mime

and performed logout and then login, now all icons are back


Error installing oem-audio-hda-daily-dkms while getting HDMI audio to work on TV

Solved! After the ALSA upgrade failed, i opened Software center. It showed me an error that some module is not right and gave me the option to repair it automatically. I did and then ran the install again(sudo dpkg -i filename). It worked this time. Restarted the system, chose HDMI output from sound settings and voila!

I think the problem was that i forgot to install DKMS initially(the error message makes it pretty clear). So Software center must have installed it for me during the repair.


How to install the missing shared library libQtWebKit.so.4?

You can get it by installing libqtwebkit4:

sudo apt install libqtwebkit4

To figure out which package provides a particular file, you can use apt-file (install it by running sudo apt install apt-file). For the case of libQtWebKit.so.4:

$ apt-file search libQtWebKit.so.4
libqtwebkit4: /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
libqtwebkit4: /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10
libqtwebkit4: /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10.2

If you prefer to use a web browser, go to http://packages.ubuntu.com, search for libQtWebKit.so.4 in "Search the contents of packages" and you will get:

File                                            Packages
/usr/lib/aarch64-linux-gnu/libQtWebKit.so.4     libqtwebkit4 [arm64]
/usr/lib/arm-linux-gnueabihf/libQtWebKit.so.4   libqtwebkit4 [armhf]
/usr/lib/i386-linux-gnu/libQtWebKit.so.4        libqtwebkit4 [i386]
/usr/lib/powerpc-linux-gnu/libQtWebKit.so.4     libqtwebkit4 [powerpc]
/usr/lib/powerpc64le-linux-gnu/libQtWebKit.so.4 libqtwebkit4 [ppc64el]
/usr/lib/s390x-linux-gnu/libQtWebKit.so.4       libqtwebkit4 [s390x]
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4      libqtwebkit4 [amd64]


Who is the root user in Ubuntu or on any Linux based distribution?

The user having the real user id of 0 is the root user. You can check UID by grep "root" /etc/passwd or more precisely grep "root" /etc/passwd | cut -d: -f3 .

  Is by default the root password for every system running Ubuntu is
  same?

By default the root account is disabled in Ubuntu (you can enable it, although it is not recommended), you can use sudo to impersonate root.

  Many documents over WEB supports not to enable root login manually as
  it has been said that let all applications should run on User level or
  with Administrative accounts only?

Thats logical.


Is this on a laptop? If so, many laptops have hardware switches that turn of all wireless connectivity. If you can't find it then turn to the manual of your hardware.

On my laptop it is easy to accidentally switch it off.


Python script to send and click link sent as notification

I found out that using  Notify which comes with python gi.repository was way better than using libnotify. Because with Notify no extra work had to be done to make the links clickable plus it was easy to use.
It also worked when I tried it on ubuntu 16.04 which is a unity environment. Information about gi.repository and its many functionalities can be found here http://nullege.com/codes/search/gi.repository.Notify.Notification.new


1) Download your graphics driver from http://www.geforce.com/drivers
2) Press Ctrl + Alt + F5
3) Login with your user
4) Type sudo -i
5) When prompt type your super user password (Basically your password)
6) Now stop your graphics by typing: service lightdm stop
7) Change directory to your nvidia driver installation: cd $home && cd Downloads
8) Change nvidia drivers permission: chmod 777 NVIDIA*.run
9) Now execute the installation: ./NVIDIA*.run
10) Follow all steps: Install 32bit libs, Make auto config Xorg by NVIDIA Installation, etc...
11) If you don't get any errors by nvidia drivers installer reboot your system and enjoy
12) Last step is optional: Open up Unity apps menu and look for Nvidia, when you find it open it to check that everything is installed well.


Installing okular on a barebone ubuntu container where there is no add-apt-repository command

I was able to overcome this problem by installing the software-properties-common package. Then apt-add-repository is available. So the whole procedure to install okular is:

apt-get update
apt-get install -y software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y okular

(Thanks David Trudgian for this tip!)


You can try following:
Download binary of required FF version from this ftp, unpack it somewhere in Your home folder, and run it from there.


Desktop theme becomes ugly after running "unity-greeter" from terminal

I did the exact same thing, and also got ugly desktop theme...

As also mentioned in:
Tragedy after login Unity from unity-greeter (lightdm) launched from processing unity, guest account desktop theme is not affected by this issue, then I thought this must be related to some files created in my home directory. I went to delete HOME/.config, it seemed fix the issue..

Be aware that this may remove other configurations you've done, like the icons on the launch bar, etc.


Graphics problem in notification area of xfce panel

I uninstalled xfce4-goodies and gtk3-engine-xfce.


Chrome App Icon is in low-resolution during the application switch

Chrome uses a site's favicon for it's application icon. Many of these are low resolution. In this question I link to some resources where you can find higher resolution icons:

How do I put a web application on the Launcher?


How will upgrading my hard drive affect performance?

Because hard disks have become faster over the years, an upgrade might slightly speed up boot time, launching applications and loading files. I would not expect any radical improvement, but it definitely will not become any slower.


Terminator doesn't render layout correctly

(In case someone is still looking for an answer)

Maybe you're using the version 1.90 which is known to have problems when rendering layouts.

After installing 1.91 I've successfully setup the default layout without problems, I've made a document describing this and how to setup the default layout properly.


Ubuntu equivalent to windows cmd command

title in cmd seems to be a command for changing title of terminal, in bash, you can do this:

echo -ne "\033]0;The Message You Want\007"

terminal under linux do not have the command prompt, but you can set PS1 variable:

PS1="the prompt you want"

For the variables which can be used in PS1, you can try

man bash

and search for the prompting section


Suspend mode reset my configuration to internal microphone instead of keeping usb microphone as default

This fixed my problem :

A)

  Create a file /etc/pm/power.d/10_alsa-restart.
  Edit the file add the following:

#!/bin/sh
/sbin/alsa force-reload

  3) Save the file and make it executable.

Source: http://daybydaylinux.blogspot.ca/2011/09/alsa-no-sound-after-suspend-in-lucid.html

B)

Also, in the file "etc/modprobe.d/alsa-base.conf", I added:

options snd-hda-intel=1
options snd-usb-audio=0

And I commented all options lines after this one:

# Prevent abnormal drivers from grabbing index 0

I found the name of devices and index with:

cat /proc/asound/modules

C)

Also, in the file etc/pulse/default.pa, I added this (uncommenting the last line and replacing source with the name of my device):

set-default-source alsa_input.usb-046d_0821_3961BAE0-00-U0x46d0x821.iec958-stereo

I had found the name of my device with:

pacmd list-sources


I was having the same problem. The issue may have been caused by a custom unity instances, I tried reverting but that did not really help. So I ended up sudo apt-get install -f which appeared to have fixed the issue.


how to be attached to a another user Byobu session

I usually achieve this by first becoming the target user via sudo, and launching byobu as that user:

sudo -i -u targetuser
byobu


As I understand after the windows 8 installation, now you cant boot ubuntu because the grub menu disappeared. All you need to do is re-install the grub.  you can do it by creating a bootable USB  using wubi. There are lots of tutorials in the web, If you want more assistance please ask below.


Unable to uninstall MySQL 5.6.17 from Ubuntu 12.04

I understand you've manually installed MySQL, without using apt. Any program you install manually is not registered by apt, so apt can't remove it.

You can prevent MySQL from starting by stopping MySQL and then removing the init script.

sudo update-rc.d -f mysql.server remove

Replace mysql.server by the name of MySQL's init script.

Now MySQL is stopped you can remove the user:

sudo deluser mysql

The only thing left are MySQL's files. If you want to save space you can remove them.


Can i open a port on a single interface (tun0) only while using a ufw profile

The general answer

I'm afraid adding network interface into an application profile is not possible, because under the 'Application Integration' section in UFW's manual page for the syntax is written:

  Syntax for the application profiles is a simple .INI format:

[<name>]
title=<title>
description=<description>
ports=<ports>

And there is not presented an interface directive.

Create Rules manually

According to the question There are two approaches to allow TCP and UDP simultaneously:

Add rules for each port separately:

sudo ufw allow in on tun0 to any port 36892
sudo ufw allow in on tun0 to any port 23976
sudo ufw allow in on tun0 to any port 19827

Add rules for each protocol separately:

sudo ufw allow in on tun0 to any port 36892,23976,19827 proto tcp
sudo ufw allow in on tun0 to any port 36892,23976,19827 proto udp

To allow access only from a specific address, add from 10.8.0.xxx to the declaration - for example:

sudo ufw allow in on tun0 from 10.8.0.110 to any port 36892,23976,19827 proto tcp

More examples: UFW Essentials: Common Firewall Rules and Commands.

Create Application profile and create Rules based on it

Let's create a new profile file, called custom.ufw.profile, located in /etc/ufw/applications.d/. The content of this file could looks as this:

[CustomApp 1 Full]
title=The first Custom Application
description=Custom Application Description
ports=36892|23976|19827

[CustomApp 1 TCP]
title=The first Custom Application - TPC only
description=Custom Application Description
ports=36892,23976,19827/tcp

[CustomApp 1 UDP]
title=The first Custom Application - UDP only
description=Custom Application Description
ports=36892,23976,19827/udp

We can check if the syntax is correct via the command ufw app info "app name":

$ sudo ufw app info "CustomApp 1 Full"
Profile: CustomApp 1 Full
Title: The first Custom Application
Description: Custom Application Description
Ports:
  36892
  23976
  19827

Now we can create new rule based on this profile:

sudo ufw allow in on tun0 to any app "CustomApp 1 Full"

Check if the rule looks correctly:

$ sudo ufw status numbered | grep CustomApp
[10] CustomApp 1 Full on tun0       ALLOW IN    Anywhere
[20] CustomApp 1 Full (v6) on tun0  ALLOW IN    Anywhere (v6)

Create custom command to automate the rules enable/disable process

If we intend to have a way for fast enable or disable couple of UFW rules we can create custom command for this purpose. We can use a function that could looks something like this:

function ufw-custom {
        if ! ufw_loc="$(type -p "ufw")" || [ -z "$ufw_loc" ]; then
                printf "\nUFW is not installed yet.\n\n"
        elif [ "$1" = "enable" ]; then
                sudo ufw allow in on tun0 to any port 36892
                sudo ufw allow in on tun0 to any port 23976
                sudo ufw allow in on tun0 to any port 19827
                echo ""
                sudo ufw reload
                echo ""
                sudo ufw status numbered
        elif [ "$1" = "disable" ]; then
                sudo ufw delete allow in on tun0 to any port 36892
                sudo ufw delete allow in on tun0 to any port 23976
                sudo ufw delete allow in on tun0 to any port 19827
                echo ""
                sudo ufw reload
                echo ""
                sudo ufw status numbered
        else
                echo ""
                sudo ufw status numbered
                printf "Use 'ufw-custom enable' or 'ufw-custom disable'.\n\n"
        fi
}
export -f ufw-custom

Place these lines into the end of ~/.bashrc file and then source ~/.bashrc. Now we have a custom command called ufw-custom which can handle enable or disable as arguments. For example, to enable the rules, use:

ufw-custom enable


Problem with making a new folder in Ubuntu

Two partitions with NTFS file systems were found:

$ for i in $(lsblk -l -f|grep -i ntfs|cut -d ' ' -f 1) /etc/mtab;do grep "/dev/$i" /etc/mtab;done
/dev/sda2 /media/mo/0A9392143BD31443 fuseblk ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdb1 /media/mo/My\040Passport fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

/dev/sda2 is mounted read-only ro
/dev/sdb1 is mounted read-write rw

I think default_permissions,allow_other should make it possible to write files and create a directory when mounted read-write.

You cannot write anything (and not create a directory) when a Microsoft partition is mounted read-only.

Try to check permissions with the following commands

ls -ld /media/mo/0A9392143BD31443
ls -ld /media/mo/'My Passport'

See How do I use 'chmod' on an NTFS (or FAT32) partition? with detailed instructions how to mount an NTFS or FAT32 partition to make it useful.

If Windows is hibernated or semi-hibernated (alias Fast Startup), the Windows file system(s) are not ready for writing by Linux, so Linux (and Ubuntu is Linux) does not want to mount it with write permissions.

What about your partition /dev/sda2? Please check, and if necessary, turn off Fast Startup in Windows and try again.


How can I backup my full system (Ubuntu and Windows) to my external hard drive using free Ubuntu software or methods?

I will be assuming you booted with a LiveUSB or LiveCD througout my explanation and you need root for basically anything I explain here.

First lest me explain what "dd" is. The abbreviation means "disk dump" and can make an image over basically everything that is a block device (that's disks to you) of files.    Let's go over the basics:

dd if=source-device of=target-device bs=blocksize count=numberofblocks

if Input File, aka, where the data comes from
of Output File, aka, where the data goes to
bs Block Size, aka, how much data you want to "buffer" in memory.  If you do not use this, it basically copies directly from one device to another and will be slooooooow.  For most operations, do specify something.  I usually use something like bs=1G.  Of course, you must have 1GB of free RAM to actually do that
count How many "block" (quantity defined by bs) you want to move.  In the general case this is not needed, because you want all blocks.

Now, imagine you have a SSD of 128GB, named /dev/sda, and you want to "image" it (that's what the operation is called) fully, including everything that's on it.  Partition tables.  You have a backup disk with plenty of space on /mnt/bigdisk.  To image the whole disk, you issue the following command:

dd if=/dev/sda of=/mnt/bigdisk/backup-20160812.img bs=1G

This will take quite a while (but you haven't lived until you do this on a 4TB disk), and finally you will  find a 128GB file named backup-20160812.img in /mnt/bigdisk.  dd will not give any output during that time and you will notice a big degradation of system performance.  Oh, and for the love of all what is good: make sure nothing, not a single partition, is mounted or using /dev/sda.

Once you have the big file, you can do whatever you want with the real disk (well, except destroying it physically).  If you want to restore, you do:

dd if=/mnt/bigdisk/backup-20160812.img of=/dev/sda bs=1G

These are bit-exact copies which means the following:

The size of the big file is exactly the size of the disk
Obviously you cannot restore to a disk, smaller than that size
Even if you restore to a disk larger, it may not work.  Usually, it winds up being the partitions you want followed by a huge free space block.  You'll have a lot of resizing to do and if it's an SSD, check alignment.
Should the source disk be defective, dd will stop upon errors.  If you do not want this, you need to specify extra parameters.  The man pages are obviously your friend.
Again, everything is imaged even unused space.  If you have a disk of 100GB, and it's only 10% used, your file will be 100GB large and it will have wasted 90% of it's time on copying unused blocks.

With this knowledge, logic says, you can use dd to backup a single partition.  Look at the following command an you may see why:

dd if=/dev/sda1 of=/mnt/bigdisk/backup-sda1-20160812.img bs=1G

The only difference is using /dev/sda1 instead of /dev/sda (and I used another target filename).  Why? Because /dev/sda represents the full disk, and /dev/sda1 represents the first partition on that disk.  That's it...  All the remarks about being a bitwise copy persist.

The file generated to dd can be gzipped and will result in smaller files.  You can do this using pipes.  The image command would look like:

dd if=/dev/sda bs=1G | gzip > /mnt/bigdisk/backup-20160812.img.gz

The restore command something like this:

dd if=/mnt/bigdisk/backup-20160812.img.gz bs=1G | gunzip > /dev/sda

Some general remarks for understanding:  Omitting the of will send all output to stdout.  This data is send to gzip (or gunzip) using the pipe |.  Since gzip/gunzip have no specifed file, they use this data, and gzip it.  The output is send to stdout, which we then send to a file using the > symbol.

Now off to ntfs partitions.  ntfsclone  There are other associated tools you might want to look into (ntfsresize, ntfsfix.  Type ntfs on the command line and do tab completion)  Instead of just copying all bits, ntfsclone will copy the filesystem structure and data (unless you tell it not to), and thus ignore unused space.  This translates into the fact that the files are much smaller and aren't much bigger than the actual "used" filesize of the ntfs partition.  Of too the command:

ntfsclone -s -o /mnt/bigdisk/backup-20160812-sda2.ntfsclone /dev/sda2

It will give all sorts of information while it's working, which is much more reassuring than dd.  Anyway, what does it all mean?

-s Means you want to save an image (and not do a device to device clone)  - -o Where do you send the data to.  In this case a file.  If the file exists, it will refuse to overwrite it.
The last option in the command is the source, in this case the partition two of sda.

Here for the restore:

ntfsclone -r -O /dev/sda2 /mnt/bigdisk/backup-20160812-sda2.ntfsclone

Again, soothing information and here is what the options mean:

-r means restore from image.  It basically is -s pendant for restore.
-O is where to write the data, in this case it's an upper case -O because that causes it to overwrite the file.  This is necessary, because /dev/sda2 exists already and you want to overwrite it.
The final option, again, is the source of the data.  This is, obviously, the file we just made with the first command.

The size of these images are not changeable.  You're not going to restore it to a smaller disk/partition, even if it would fit based on the filesize.  The structures of the file system that have been backed up, are bound to the size of the disk.  So, even though that image you made of a 100GB partition with 10GB data could fit on a smaller 50GB, it's not going to work.  You can restore to a a larger partition, but again, the structures stayed the same, so, you'll have to use ntfsresize in order to actually be able to use that extra space.

Let's get to dump.  As I mentioned in my comment, I haven't used this in ages.  I just backup my data files, as I know that Linux re installations are basically painless, especially if you keep /home on a different partition. What is writen here is basically what I found out while I wrote it.  My OpenBSD backup scripts that use dump are so old, I wouldn't dare to say that I still know how they work.  To dump.

dump -0 -f /mnt/bigdisk/backup-20160812-sda3.dump /dev/sda3

Again, what does this mean?

-0 is the level of the dump. This is to do incremental backups and is very useful, but for now, you'll remember that a level 0 dump means the full filesystem.
-f The data of the dump is sent to the specified file, in this case: /mnt/bigdisk/backup-20160812-sda3-level0.dump

Restore?  Well, you need to know that you can only restore to a clean filesystem and mounted filesystem, so you first have to make sure the target is formatted an clean and mount it:

mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt
cd /mnt
restore -r -f /mnt/bigdisk/backup-20160812-sda3-level0.dump

-r means restore
-f from file
The target is the current directory, hence the /mnt

It will probably give you an warning like restore: ./lost+found: File exists, because lost+found exists on any newly create filesystem.

Interestingly, given the way it works, you should be able to restore to a smaller disk, but I haven't tried.

Now that I addressed "mounting".  Doing any of these operations, shouldn't be done on mounted disks, except for the restore part of dump.

Finally, backing up the MBR and GPT:
The MBR is easy and to be honest, I prefer using it as long as my disks don't exceed 2TB.  Anyway, the MBR is basically block 0 on your disk, of which the first part is the boot code and the second part is the partition table.  The first 446 bytes of the first sector, the next 66 Bytes are the partition.  So, exctracting only the boot code, looks like this:

dd if=/dev/sda of=/mnt/bigdisk/backup-20160812-bootcode.dd bs=446 count=1

Extracting the boot code with the partition table looks like this:

dd if=/dev/sda of=/mnt/bigdisk/backup-20160812-mbr.dd bs=512 count=1

That's it.  Obviously, you can only restore these to exactly the same disk (or one with exactly the same characteristics).

As you see MBR is simple.  GPT is not and it's a pain.  GPT is variable length, and you better Google it for a better understanding.  I have no GPT disks on the machine I'm testing this, so double check everything.  From what I Google, the tool to use is gdisk.  Alas it seems to be an interactive tool.  That's fine, but we want a simple one-liner:

printf "b\\n/mnt/bigdisk/backup-20160812-gpt.gdisk\n" | gdisk /dev/sda

Basically, send the text:

b
/mnt/bigdisk/backup-20160812-gpt.gdisk

to the applicaton gdisk working on device /dev/sda.  The file /mnt/bigdisk/backup-20160812-gpt.gdisk should now contain a backup of the GPT.
The restore should be something like this, but I did not try, so use at your own risk.

printf "b\\nr\\nl\\n/mnt/bigdisk/backup-20160812-gpt.gdisk" | gdisk /dev/sda

This should the following text to to the interactive gdisk menu, to go onto recovery mode and restore from file.

If you start Googling GPT in conjunction with dd, you'll see many people who warn you not to do this because of the uuid used by GPT.  That is most certainly true: you will get problems if you have two disks active in the same system with the same uuid.  Except of course, that's not what you are doing here.  At no time, you'll have two identical uuids in the system if you stick to copying to files (which is what all my examples do)

As you see, this is rather a big chuck of information to digest and I'm not going to even bother reading it again for spelling mistakes, typos, etc.  If it's all too much, look into Clonezilla.  It might be closer to what you actually need.  I might have even saved so much writing, had I started off with telling you that.


The issue you are running into is that MAAS requires authentication before it will return the node listing. MAAS normally authenticates API requests through OAuth, not HTTP Basic Authentication which is what curl -u uses by default for web URLs.

Luckily, MAAS also provides a Python client library called apiclient which is included in the python-maas-client package. Using that library would allow you to trivially issue the query with an apikey, which you can get from http://$MAAS_URL/MAAS/account/prefs/. Assuming you have APIKEY and MAAS_URL, the below snippet demonstrates how you'd fetch the listing:

APIKEY = "foo:bar:baz"
MAAS_URL = "http://my.maas.host/MAAS/api/1.0"

from apiclient import maas_client
auth = maas_client.MAASOAuth(*APIKEY.split(":"))
client = maas_client.MAASClient(auth, maas_client.MAASDispatcher(), MAAS_URL)
print client.get(u"nodes/", "list").read()

Incidentally, AIUI curl -X GET is the query type curl issues by default.

[*] I believe marking the path as unicode should not be necessary, but there's an assertion in the code that may be a bug. Reported https://bugs.launchpad.net/maas/+bug/1418158.