Ubuntu 18.04.1 desktop live dvd install does not see existing installation

You can try using the latest pro driver from nvidia.

Start by adding the graphics drivers ppa:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update && sudo apt upgrade

Now you can install the nvidia 390 driver:

sudo apt install nvidia-driver-390

Then reboot and you should be good to go.

IF you want to try the newest driver (not recommended, see below):

sudo apt install nvidia-driver-396

NOTE: This driver (v396) breaks my system and X won't load. If you end up with not being able to get X to start, purge the NVIDIA drivers, and install a different version instead. To purge your nvidia drivers:

sudo apt purge nvidia-*

And then install a different version per above instructions.


How to set/reset mysql password after Installation?

At least I found following solution with user and password from /etc/mysql/debian.cnf without start-/stopping any service nor sudo:

Log in from standard shell:

$ mysql -udebian-sys-maint -p
Enter password:

Then inside mysql:

mysql> use mysql;
mysql> set password for 'root'@'localhost' = password("xXnew_pwXx");
mysql> flush privileges;
mysql> quit;

Now, without restarting any service I am able to log in with just

$ mysql -u root -p
Enter password:

and the new password xXnew_pwXx.

Now it's clearly to see root's password has been changed.

mysql> select User, password_last_changed, password_lifetime, account_locked  from mysql.user;
+------------------+-----------------------+-------------------+----------------+
| User             | password_last_changed | password_lifetime | account_locked |
+------------------+-----------------------+-------------------+----------------+
| root             | 2019-07-11 16:49:52   |              NULL | N              |
| mysql.session    | 2018-11-21 17:02:48   |              NULL | Y              |
| mysql.sys        | 2018-11-21 17:02:48   |              NULL | Y              |
| debian-sys-maint | 2018-11-21 17:02:55   |              NULL | N              |
+------------------+-----------------------+-------------------+----------------+
4 rows in set (0,00 sec)

That's it ;)


So I had a total disaster with "Bumblebee". I entered the above commands but they caused all sorts of weird responses resulting in me having to give up and just re-install a clean copy of ubuntu 20.04 (not the reinstall option but the replace install option).

So how did I fix it?
Well I didn't use bumblebee and instead did this:

From terminal I entered sudo ubuntu-drivers autoinstall
When I restarted, I got the login problem. So selected ctrl+alt+F4
Entered sudo apt-get purge nvidia*
Then sudo apt-get install nvidia-driver-440
Then sudo apt-get install sddm
Then sudo dpkg-reconfigure sddm (I got an option for choosing gdm3 or sddm, I chose sddm)
Finally reboot

This gave me a different login screen, BUT I could actually login and the nvidia driver was running (and its control panel properly activated).


Why is my Ubuntu installed on a FAT partition, and can I change it?

My suspicion is that Zagroda is seeing the EFI System Partition (ESP), which is FAT. Another possibility is that an OS X utility is reporting partition types based on their type codes; Ubuntu 13.04 still uses the same type code for its data partitions as Windows uses for FAT and NTFS. A fix to libparted has been in the works for two years, but the libparted developers have been sluggish in pushing it out. The output of both sudo parted /dev/sda print and sudo gdisk -l /dev/sda would be informative. (The latter will require installing the gdisk package.)
If this is the case, it's because Disk Manager is using the GPT type code data, which Linux sets incorrectly. You can fix this by using gdisk from either Linux or OS X: Launch it, type p to view the partitions, and then use t to change the type code of any Linux partition shown as being of type 0700 so that it's of type 8300. When you're done, review your changes with p and then type w to save them.


Basically you are trying to know file format using file command.

file ./-*

Here, ./-* this shell glob will pick up the all files which starts from - (minus sign) and it will print the file format of the file.

In your case you are running this command to find the human readable file so that you can read password from it. You can read ASCII text file content.

More about file command:

NAME
     file — determine file type

SYNOPSIS
     file [-bcEhiklLNnprsvzZ0] [--apple] [--extension] [--mime-encoding]
          [--mime-type] [-e testname] [-F separator] [-f namefile]
          [-m magicfiles] [-P name=value] file ...
     file -C [-m magicfiles]
     file [--help]

DESCRIPTION
     This manual page documents version 5.25 of the file command.

     file tests each argument in an attempt to classify it.  There are three
     sets of tests, performed in this order: filesystem tests, magic tests,
     and language tests.  The first test that succeeds causes the file type to
     be printed.


I have a much more underpowered machine than yours (512Mb RAM, 700MHz processor) and it runs Bodhi Linux (Ubuntu with the Enlightenment desktop) fine.


To sort numerals you need to use -g parameter.

sort -g <file_name>

Example:

pilot6@Pilot6:~$ cat nums
-100
-10
0
99
11
-56
12
pilot6@Pilot6:~$ sort -g nums
-100
-56
-10
0
11
12
99

If only integers are used, sort -n is preferred. It should work faster.


How to send packets at 512 nano sec delay using Socket Programming and UDP socket

The problem with nanosleep is that it includes rather significant overhead. Users tend to expect accurate delays down to very low values, which isn't really practical for the CPU yielding sleep routine. The expectation is this:

actual delay = nanosleep(requested delay)

whereas, in reality users get this:

actual delay = nanosleep(requested delay) + the fixed overheads.

On my test computer, with forced CPU affinity (to remove scheduler effects) and the CPU frequency scaling governor set to performance, the fixed overheads are 52 microseconds.

A possible solution for your problem is to replace the call to nanosleep with a delay loop. Then the CPU would not yield, going into idle, nor incur operating system call
overheads. Of course, a delay loop can be difficult to calibrate as to actually get the desired delay. I made two programs, one using nanosleep and one using a delay loop to demonstrate. In order to make other overheads negligible, the sleep and delay loops are run a great many times for each time and print type calls:

For reference, the programs used:

nanosleep version:

/*****************************************************************************
*
* test_slp2.c 2019.09.18 Smythies
*       Create data to determine the lower limit of nanosleep.
*
* test_slp.cpp 2017.11.25 Smythies
*       Of course, none of this stuff works the way it used to.
*
* test_slp.cpp 2012.01.24 Smythies
*          I need to be able to yeild (sleep), but for less than a second.
*          Experiment with nanosleep and usleep functions.
*
*****************************************************************************/

// prevent warning about nanosleep
#define _POSIX_C_SOURCE 199309L

#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

#define CR 13

unsigned long long stamp(void){
   struct timeval tv;

   gettimeofday(&tv, NULL);

   return (unsigned long long)tv.tv_sec * 1000000 + tv.tv_usec;
} /* endprocedure */

int main(){
   unsigned long long start, now;
   long i, j, k;
   int ns;
   struct timespec time;

   time.tv_sec = 0;
   start = stamp();
   for(ns = 500; ns < 100000; ns = ns + 500){
      for(j = 0; j < 100000; j++){
         time.tv_nsec = ns;
         nanosleep(&time, &time);
      } /* endfor */
      now = stamp();
      printf("%d %llu\n", ns, (now - start));
      start = now;
   } /* endfor */
   return(0);
}

And the delay loop version, including a crude calibration, which the graph shows, is not great:

/*****************************************************************************
*
* test_slp3.c 2019.09.18 Smythies
*       Now, do the same as test_slp2, but use a waste time loop instead of
        nanosleep.
*
* test_slp2.c 2019.09.18 Smythies
*       Create data to determine the lower limit of nanosleep.
*
* test_slp.cpp 2017.11.25 Smythies
*       Of course, none of this stuff works the way it used to.
*
* test_slp.cpp 2012.01.24 Smythies
*          I need to be able to yeild (sleep), but for less than a second.
*          Experiment with nanosleep and usleep functions.
*
*****************************************************************************/

// prevent warning about nanosleep
#define _POSIX_C_SOURCE 199309L

#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

/* for my test computer */
#define CALIBRATION 26

unsigned long long stamp(void){
   struct timeval tv;

   gettimeofday(&tv, NULL);

   return (unsigned long long)tv.tv_sec * 1000000 + tv.tv_usec;
} /* endprocedure */

int main(){
   unsigned long long start, now;
   long i, j, k, m, loops;
   int ns;
   struct timespec time;

   time.tv_sec = 0;
   start = stamp();
   for(ns = 500; ns <= 10000; ns = ns + 100){
      loops = ns * CALIBRATION / 50;  /* will have rounding issues */
      for(m = 0; m < 10000000; m++){ /* this is just to slow things down, so we can test */
         for(j = 0; j < loops; j++){
            k = j;  /* make sure any compile optimizer doesn't take out the loop */
         } /* endfor */
      } /* endfor */
      now = stamp();
      printf("%d %llu\n", ns, (now - start));
      start = now;
   } /* endfor */
   return(0);
}

Anticipated question: Why no gettimeofday jitter in the delay loop test, when you (I) claim it is the reason for the jitter in the nanosleep version?
Answer: Possibly becuase the delay loop method ran for much longer per sample than the nanosleep version. Or, I was wrong.

CPU affinity was forced for these tests. i.e.:

time taskset -c 3 ./test_slp3

I timed the overall test just as a sanity check, as the sum of the individual times should equal the overall time. They did.

The CPU frequency scaling governor was set to performance:

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
performance
performance
performance
performance


Keyboard not working after installing Windows 8

The USB keyboard is not being seen by the system, Change it to a serial keyboard till it boots then after password, install the USB keyboard. Remember you can hook up a USB with the system running.


Changing my desktop environment on Ubuntu 18.04

It is dangerous to uninstall the standard Ubuntu GNOME desktop, however you can install Cinnamon desktop environment and make it your default. Since there is no longer an official Cinnamon port for Ubuntu, we can use this unofficial PPA which still works perfectly.

Add the PPA to your system with sudo add-apt-repository ppa:embrosyn/cinnamon.
Refresh sources with sudo apt update.
Install Cinnamon with sudo apt install cinnamon
Logout of your current session (no need to reboot).
Now click the gear icon next to the "Sign in" button.
Select "Cinnamon" from the options that appear.
Now when you click "Sign in" you will be greeted with the Cinnamon desktop environment.


Method 1:

sudo apt-get autoclean
sudo apt-get autoremove

Method 2:

Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working


PPA package: Specify different dependencies for different Ubuntu versions

In the case libtool/libtool-bin, I think an OR relation might work:

Build-Depends: libtool-bin (>= 2.4.2-1.10) | libtool (<< 2.4.2-1.10)

The version numbers are that of utopic, when the split was imported from Debian. Note that in 2.4.2-1.10, libtool still depends on libtool-bin. The dependency was reversed in 2.4.2-1.11, which is why this change is now needed.

Depending on what you do, it might be simpler and safer to add a combined libtool to a separate PPA and depend on it. Since this is a B-D, it needn't be installed by your end-users, so depending on a separate PPA should be safe.


Is it legal to install msttcorefonts package? Is Wine legal?

msttcorefonts is considered globally legal for installation because the license for the fonts allow them to be installed and by omission, installed on non-Windows operating systems, without a Windows license.

In short: It's not a case of copyright law because Microsoft allows the redistribution of the font installers and it allows users to install the fonts (regardless of OS).

It does not allow for redistribution of the TTF font files on their own, so, for example, it would not allow for a distribution like Ubuntu to include them by default.

Sidebar: The newer (Vista-era) fonts like Consolas, Segoe, Cambria, Candara have explicit "only for Windows" junk in their licenses, but these fonts aren't included in msttcorefonts so that doesn't matter.

Wine is less black and white.

From a copyright stance, great effort seems to go into making sure that all of the Wine code is completely original (eg people who have seen Windows code are not allowed to contribute) and that helps to keep the copyright side of things fairly clean.
But technology wise, it's aim is essentially to redevelop the core of Windows. I'd be surprised if there weren't more than a couple of Microsoft patents it trod on. Microsoft has been filing patents for every other line of code for 20 years and the USPTO has been more than willing to grant them all sorts of silly, super-obvious patents.

Anyway, this shouldn't affect you directly (yet) because there hasn't been any legal action (AFAIK) and even if there were, it would be likely to happen in the US. I'm not a lawyer so I can't say how this would affect you either.

If you need a bullet-proof legal way to run a Windows application from within Ubuntu, virtualisation is probably the key. A real licensed copy of Windows running will do almost anything you want it to (with a performance hit).


dual booting with windows 7 and ubuntu 12.04 and partitioning

Install windows first. Go to start type Disk Management

Now shrink your windows partition to however space u want ubuntu to you. Right click and delete free space, you now have unpartitioned disk space.

Boot up the ubuntu cd and install ubuntu. It will automatically configure grub for you meaning when u boot up you will have a screen that says: ubuntu (auto selects this in 10sec), memtest, and windows.

Windows bootloader doesn't configure itself for linux, but grub does for windows so need not worry.


Which bit-torrent app has these specific features?

Qbittorrent client supports the second feature. You can get it here: http://qbittorrent.com


Ubuntu 15.10 running slower than exepcted?

Make sure you have the proprietary drivers for your GPU. You may also try Lubuntu or Xubuntu for the best performance. I cannot give you much more advice from your question, maybe edit it with more specific content?


After locking the screen in Ubuntu 14.04, password is not accepted, How can it be fixed?

I've found that in some cases the input language is set to Hebrew even though it shows a "EN" icon in the gnome systray, hitting the input language changer sequence does nothing visibly but when I enter the password again it works.


Upgrade from 10.10 to 13.10 without administrative privileges

It sounds like you installed 10.10 via wubi, which is no longer supported.  To properly remove it from Windows you will simply have to get administrative privileges.  If you want to install 14.04 ( 13.10 is about to reach end of life, so don't bother ), then you can boot from the cd and install it along side windows, which will shrink the windows partition to make room for Ubuntu.


The solution was to use systemd instead of network manager.
I used vi to create this file: /etc/netplan/03-wireless.yaml:
network:
  version: 2
  renderer: networkd
  wifis:
    wlp1s0:
      dhcp4: true
      access-points:
         "the SSID":
            password: "the password"
(the SSID and the password shall be the actual SSID and password)
I created the run time config file and applied the config:
sudo netplan generate
sudo netplan apply
then I stopped and disabled network manager:
sudo systemctl stop network-manager
sudo systemctl disable network-manager
then I enabled and started systemd-networkd
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkd
with the command networkctl I checked the status:
networkctl
and got this response:
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 wlp1s0           wlan               routable    configured

2 links listed.
after this i restarted the PC but I don't think that was necessary.


In spite of information initially to the contrary when upgrading the Dropbox Personal (free) account to Personal (Plus) the Smart Sync feature is not available for Linux (and thus Ubuntu).
quote from Dropbox support:

If I understand correctly, you would like to be able to use Smart Sync
on your Linux device, is this correct?
There are some things that it is not possible to use when using the
Dropbox client on Linux.
These are as follows:
Camera Uploads
Screenshot Uploads
Two Accounts
Custom Folder Icons for Shared Folders
Smart Sync
New Dropbox Desktop App

I apologize for any inconvenience that this may cause.

In other ways Dropbox integrates extremely well with Ubuntu and it is a shame that the new and more able features are not available but hopefully, this question will assist any other user thinking along the lines of upgrading their account to Personal (Plus) or Professional.
To their credit, Dropbox have immediately refunded the upgrade fee without any question, returning the account to it's free status without any data loss and I do not hesitate in continuing to recommend the usefulness of Dropbox for cloud storage.


How can I setup Juju(MAAS/OpenStack) on two dedicated hosting servers?

You will need a minimum of 6 machines in order to set up OpenStack. However you can use one as a MAAS server to deploy the other one, but that wouldn't be a good use of that server.

These tools are more designed for larger deployments, and having a way to use them for one or two servers isn't really a use case we're aggressively pursuing with these tools, though there is a wishlist item for juju to deploy via normal vagrant-style virtual machines.


Dual boot Win 7 Ubuntu - home and boot partitions have no mount point

Your /etc/fstab doesn't contain any file system except /. Hence nothing else is mounted automatically during boot. You can either

reconfigure your system to use the additional volumes (requires (re-)mounting, moving stuff around, editing fstab, and update-grub), or
format the Linux partitions and reinstall Ubuntu and tell the installer about your custom partition setup (choose the option "something else" when asked).

If you break your installation during 1., you can still go with 2. though.


From the command line in a Terminal window, enter the following commmand.

ftp {user}:{password}@{server}

Change the {} parts to your username, password and server name, and if all goes well an ftp session will start allowing you to issue ftp commands, e.g., to get files from or put files to the server.


I think you need to try mounting the card using something other then your camera - a card reader or maybe another camera.

Some cameras use PTP so they're not mounted as a normal USB mass-storage device though it may look similar from Nautilus. Because of that, photorec has no direct access to the card's filsystem, so it can't recover anything.


Unable to shut down: failed to execute child process "lubuntu-logout" (no such file or directory)

I know is too late, but I encountered the same problem today, I was installing Lubuntu and removing Xubuntu, both from terminal.

Just reinstall Lubuntu Desktop in order to reinstall (or repair) the desktop enviroment

sudo apt-get install lubuntu-desktop

Regards,


Can I update Ubuntu from a point release CD?

The alternate CD is actually a mini-apt repository. You can download the point release alternate CD and then insert it into the machine while it is booted up, after burning it.

Then go to Software Center-> Software Sources and use the Add Volume button to add the CD.

Image credit Jorge Castro

This will work, but the CD does not contain every package which might be installed on your system, as it only contains what is needed to get a working system(except for some drivers). You still need to update any other packages you want to update using your internet connection(s).

The default packages (and a few more) will be updated to the point release version. These non-default packages were on the CD as they are commonly installed, but not installed by default. These may include common drivers.

For Quantal and later:

Quantal no longer has an alternate CD. You can, however, use AptOnCD as follows:

Download aptoncd on a Ubuntu machine (of the same version and architecture(32/64-bit)) with a fast internet connection and install it:

sudo apt-get install aptoncd

And use the update manager to update packages. You can also select packages with:

sudo apt-get install --download-only [packages]

which should get packages and dependencies into the apt cache. You can then create an aptoncd CD and burn it with the packages it gives you from the selection. You can select any package that has been downloaded since the last sudo apt-get autoclean operation.


Not a single Software download from ubuntu software centre

To install vlc type the following commands in terminal.

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update

If there shows no error.Then type

sudo apt-get install vlc

For any error,report. :)


How to install animation addon plugin of compiz in Ubuntu 16.04?

Yes, simply go to your terminal and run this command:

sudo apt install compizconfig-settings-manager compiz-plugins-extra

...then open the compiz configuration settings manager and the effects should show up.


Conky (or other apps) on Gnome-screensaver unlock screen

I have put the following in /usr/lib/xscreensaver (in debian/CrunchBang) i use the name conkyslide for that file.

glslideshow -root -pan 0 -fade 3 -zoom 100 -titles -delay 10 &
killall conky &
conky -q &

remember to do "chmod +x" on the file.

a problem is "killall conky" that kills the desktop conky also

i am thinking of writing a script that reruns conky now and then to put it back on the desktop but has not yet done that.

a nother problem is that my conky does become transparent but black backgrounded.

You can read about a similiar solution and inspiration on: http://crunchbang.org/forums/viewtopic.php?id=4093

this puts the conky on the screensaver. But stays for me during onlock.


Sudo ownership changed, can't use sudo to fix it

If you really just changed the ownership of the sudo command--that is, the file /usr/bin/sudo--then you can fix this by using pkexec instead of sudo to run chown and change the ownership back. This command does that:

pkexec chown root: /usr/bin/sudo

pkexec will prompt you for your password (as would sudo if you were able to run it).

root: means the same thing as root:root, in case you had changed the group owner as well.

If you have changed the ownership of many more files besides /usr/bin/sudo, and in particular if you have changed the ownership of all files in /usr/bin (which would also happen if you changed permissions on / or /usr but passed the -R flag to chown, specifying recursive operation), then that will not be sufficient.  But based on the description you have given in the question--that you have specifically changed the ownership of /usr/bin/sudo--running that one pkexec command should be sufficient.


Thanks. The problem was already answered by this question:

I had to change permission for my home directory:

sudo chown -R <username> /home/<username>


Removing a module when I add a new better one?

That's not another module. That's probably been added (mistakenly) by you. Note that the "module"'s name is 8192cuvhba which is just the name of the module you actually want (8192cu) plus the name of the module on the next line (vhba).

It looks like you just did a blind copy/paste at some point and added that line. Delete it and everything should be fine. Your file should end up like this:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

lp
8192cu
vhba


» I need to install some packages with python 3.3 (lxml, ftplib,
  etc...) and for that I need pip «

Then please do dpkg -L python3-pip to know that the python3-pip is /usr/bin/pip3

Installing with pip3 : pip3 install [package]


Ubuntu 18.04 not detecting a partition for installer

Go back into Windows, right click on the Windows icon, choose Disk Management, and see if the disc was formatted as a Basic drive or a Dynamic drive.

If the latter, you will need to convert it back from Dynamic to Basic (alternate) before you can install Ubuntu or anything else.

HOWEVER: Repartitioning a drive is the easiest way to erase everything on it and lose all your data, programs, and operating system. Go carefully; make two backups to external media or the cloud, and verify each before you proceed, unless you are 100% ready to permanently remove Windows and all its data.


No Sound on my Toshiba Satellite L455D-S5976

Have you tried with the headphones? Also, I have something like this going on with my Sony VPCZ114GX, there is a workaround posted for my model at this bug report: https://bugs.launchpad.net/bugs/960124 Basically involves loading up David Henninsson's hda-jack-retask from his ppa at https://launchpad.net/~diwic/+archive/hda and then try Wouter van der Graaf's workaround on comment #7.

As for getting the model of your sound card, I tried the below. Although the problem may be that your machine doesn't know what model to use for sound in the first place.

Found with: $ aplay -l ** List of PLAYBACK Hardware Devices ** card 0: Intel [HDA Intel], device 0: ALC889 Analog [ALC889 Analog] ...

Then to get the model to put in alsa-base.conf: $ gunzip -c /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz |grep -i "alc889" intel-alc889a Intel IbexPeak with ALC889A intel-x58 Intel DX58 with ALC889


Audio only works after plugging and then unplugging headphones

Use the Ubuntu tools that are provided for configuring the sound devices.  The gui tools are called Sound with is already installed by default, and Pulse Audio Volume Control which can be installed from the repository.

$ sudo apt install pavucontrol

Open the Pulse Audio Volume Control app.  From the Output Devices tab check the desired device that is providing sound by noticing the visual slider showing the output.  Click on the Configuration tab and set the profile for the one that is working, by choosing from the options available in the drop-down.

Now go into the built in Sound apt, and match the same output device there.

When you had completed the match and settings, this should stick and survive reboots.  It's also a convenient way to check and adjust when you experience other sound issues.


Network configuration: resolv.conf and hosts

1) Normally your system would use the DNS server on your 'resolv.conf'. If you visit www.yahoo.com your system will contact the DNS, the DNS returns the IP address of that address and your systems then knows what IP address corresponds the address www.yahoo.com.

2) It uses hosts before trying to resolve an address because hosts file is used to override any address you are trying to resolve. ie: you already have probably an entry there, 127.0.0.1 localhost tells the system that if you are trying to contact the host with the name "localhost" it will do so by using the address 127.0.0.1, in this case its your lopback interface on your eth0.

3) After the system knows an address of a host either looking directly on your hosts or by contacting the DNS servers in 'resolv.conf' it will look at the routing table to see which of the rules explains what to do with the traffic with destination to the IP address obtained.

Ie: Imagine you have 2 computers on your network with hostnames of "Ubuntu-One" and "Ubuntu-Two", each computer will probably have this assigned at the host file:

127.0.0.1 localhost Ubuntu-One for computer Ubuntu-One
127.0.0.1 localhost Ubuntu-Two for computer Ubuntu-Two

This is done automatic and its the reason you can resolve 'localhost' and 'Ubuntu-One" and "Ubuntu-Two" on each respective terminals.

Try to ping Ubuntu-Two from Ubuntu-One and Ubuntu-One will contact the DNS servers at your resolv.conf file, the servers will say "I dont know any IP related to that address" and you PC will reply "Unknown hostname". Add the line <IPADDRESSFROMUBUNTU-TWO Ubuntu-Two to the hosts file of Ubuntu-One and one you try to ping again the system will see that on the hosts file the IP address from Ubuntu-Two is x.x.x.x, will then check your routing table to see which rule applies to that IP or IP range and will contact the host using the specified gateway (or none). Thats is why hosts is ever before resolv.conf.


GDM3 is programed to start on VT1. Is there a way to change it

it looks as usual they have f*cked it so that the only way to change it
is to set the environment variable XDG_VTNR.

For example, Environment=XDG_VTNR=9 in gdm.service

Or -e XDG_VTNR=9 on your docker command.

On a regular desktop this is apparently set by pam-systemd, presumably based on some other configuration.


How do I make Ubuntu not ask me for my password?

While this statement is a general attitude that I dont agree with, in the spirit of answering your question, I'll continue without further biased objectification.

There are a few areas of the system that you can utilize to process this request. First being the "Screensaver Password" that you mention. Go to System > Preferences > Screensaver
In there, you need to disable the checkbox titled "ALock screen when screensaver is active"

On the login screen you can set an auto-login to a user. System > Preferences > Login (this may be system > administration > login.. please verify as I'm not in-front of my Linux PC) you can then set the system to auto-login a given user.

However please note that after you have logged in, if you have stored passwords in your couchdb it will prompt you to enter your password to unlock the keyring so your wifi can auto connect (as an example)

Regarding your software installation password, there is no way to default this that I'm aware of, as sudo will ask you for a password. This security model is enabled so you have to think about what you're doing before you make system-wide changes such as installing software.

Please see: this link. it will help to explain why the current security model should  be the default.


It's telling you that the account-plugin-google_0.13+16.10.20160929.1-0ubuntu1_all.deb package (aka account-plugin-google) is trying to overwrite a file (/etc/signon-ui/webkit-options.d/accounts.google.com.conf) that was installed by a previously installed package, kaccounts-providers 4:16.04.3-0ubuntu1 (aka kaccounts-providers).

The quick and dirty fix is to

sudo mv /etc/signon-ui/webkit-options.d/accounts.google.com.conf \
        /etc/signon-ui/webkit-options.d/accounts.google.com.conf.original

Retry the installation, then compare the two files and decide to use one, or the other, or a combination.

Or, you could uninstall the kaccounts-providers package, BUT This May Have Side Effects. Side effects could include being asked to uninstall other crucial packages, destroying your access to what kaccounts-proveders provides, and nightmares you haven't even considered yet.


Will there be another Ubuntu 16.04 point release (16.04.7)?

I think the answer is now a YES
Refer http://iso.qa.ubuntu.com/qatracker/milestones/416/builds
ie. there a QA-testing page for

Xenial 16.04.7

Ubuntu 16.04.7 has now been released

The Ubuntu team announces the release of Ubuntu 16.04.7 LTS (Long-Term Support) for its Desktop and Server products, and the Ubuntu Kylin flavor.
Similar to the 16.04.6 point release, 16.04.7 is a security-targeted release for the purpose of providing updated installation media which protects new installations from the recently discovered GRUB 2 vulnerabilities (USN-4432-1). Detailed information about USN-4432-1 can be found here:
https://ubuntu.com/security/notices/USN-4432-1

http://fridge.ubuntu.com/2020/08/14/ubuntu-16-04-7-lts-released/
https://ubuntu.com//blog/mitigating-boothole-theres-a-hole-in-the-boot-cve-2020-10713-and-related-vulnerabilities


Problem with LightDm on Ubuntu 14.04 server

On ubuntu-server if you want to also use it as a desktop you will have to install a desktop environment. Run the following commands to install ubuntu desktop:

sudo apt-get update

sudo apt-get install ubuntu-desktop

Now you will be able to start the graphical desktop with existing username and password.


Can't update Ubuntu 12.04 - failed to fetch repository info

I don't know how but some how it started to work. :)
I can't tell what made it work but here is my current system status when it started to work.

The Server was set to Main Server
There were no 3rd party repositories.

The MAIN part is some how make the system auto check for updates
That solved my problem and should maybe solve your problem too.


You can only run one OS at a time, you reboot into it.

The only exception would be if you ran them in a Vritual Machine, such as Virtualbox.

https://www.virtualbox.org/

There are many other options for Virtualization, VMWare, KVM, LXC, OpenVZ ....

You can run multiple OS with virtualization, your only limitation then would be hard ddrive space and RAM.


"Could not load /lib/modules/3.5.0-4-generic/modules.dep: No such file or directory" when running update-initramfs

Try sudo update-initramfs -d -k 3.5.0-4-generic.

It looks like the initramfs did not get removed for some reason when the kernel did.


Ubuntu 12.10 detecting wrong graphics card

Do you have two graphics cards? One onboard and one discrete? Or what do you mean with "detecting the wrong one"? Is it just the fans, or is the unit getting hot as well?

Linux has still trouble with laptops having hybrid graphics, but you can try a few things with vgaswitcheroo, if you have two graphics cards.


Hplip, succesful driver download but then fails to get the driver

The latest versions of hplib expect the sane libraries to be in different directories. This can be solved by adding symlinks to the actual locations of these libraries:

# create missing dirs
sudo mkdir /usr/lib/i386-linux-gnu
sudo mkdir /usr/lib64/x86_64-linux-gnu

# make missing symlinks:
sudo ln -s /usr/lib/sane /usr/lib/i386-linux-gnu/sane
sudo ln -s /usr/lib64/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
sudo ln -s /usr/lib64/sane /usr/lib64/x86_64-linux-gnu/sane

After running the above commands, hp-setup should be able to install the plugin successfully.

Thanks to user zaskar_84's post here: https://www.linuxquestions.org/questions/linux-software-2/hplip-keeps-looping-at-plug-in-installation-4175647505/


Sometimes, packages go broke. This can happen for several reasons, the most likely of which:

Somehow apt crashed or failed in an install process
Apt was running last time you shut down the computer
you told dpkg to force install something

in any case, this command usually fixes the problem:

user128825@askubuntu-pc:~$ sudo apt-get install -f

Then try running the command to install wine.

If you can still install other packages, try to install the synaptic package manager. It can effectively diagnose problems like this one at startup, and even give you a list of broken packages.

Hope it helps!

--user128825

Edit: check the broken status category in Synaptic too. If you don't have it, find a way to install synaptic-package-manager. Try installing from there and you will get more details on what went wrong.


Application icons in system settings disappear after deleting Text Entry

FYI

To restore the Text Entry and other icons in System Settings:

$ sudo apt-get install unity-control-center

You don't need to install the whole ubuntu-desktop package.

BTW, the icon for input method on menu bar is the indicator-keyboard package.


Broadcom BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) does not connect

thanks all solved my problem thanks to: https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx

once it purged the Broadcom STA proprietary driver and installed the  brcmsmac driver
it worked perfectly on reboot


Grub will not freak out if you reformat the partitions.

In fact, if you are on a single boot computer (just one Lubuntu installed),
Grub itself will also be formatted and reinstalled.

Ergo: There is no such risk.

The process is to make your Lubuntu install USB, boot from it, and tell it to "Erase and Install Lubuntu".

Be sure to fist copy all important files to the cloud or a USB drive.


Why is 'my_global.h' from libmysqlclient-dev is missing in Ubuntu 20.04

Well, I found out, that my_global.h doesn't contain any necessary information for work with database, therefore it was deleted in new Ubuntu releases (and my_global.h in libmariadb-dev is also empty), so it can be safe deleted from any dependencies. In my case, as I found out, it was used only to include math.h and TRUE/FALSE constants.


My battery is not charging on Ubuntu 18.04 while in use

Similar thing happened to me last week:

The battery was holding it's own but was not charging to full capacity when plugged in and turned on. Even when turned off and plugged in it still wasn't charging to full capacity.

The solution was to have it turned on, unplugged and then plug it back in at 6% life left. The other part of the solution was to not suspend while it was plugged in and still charging.


What do "i2c_hid_get_input" errors mean?

This problem was reported as a bug here. If you are affected by this bug you should subscribe to it.
FWIW I don't get this on my 18.04 system with kernel 4.15.0-39 generic.


Grub from Ubuntu 12.04 to Ubuntu 14.04 32 bit

May be you have installed Ubuntu 12 in another partition, that's why its being displayed in Grub Menu.

If in case you just have Ubuntu 14.04, then you can update Grub by typing this command in Terminal.

sudo update-grub


Wondering if I could use Ubuntu Server as a backup server for my windows?

If you are going to install a dual boot system for the first time make sure you have the windows install disk for your machine.  Use the windows built in backup system (I think it saves things to DVD).  Although it has been a good few moons since my first install of a dual boot system here is my method:

Go down to the local village computer shop and buy a hard drive.  It's worth it for the extra space, drives get bigger all the time.

Remove your old hard drive (this is now a windows backup) and fit the new one in its place.  Install windows on it and THEN Linux.

Check this works as a dual boot system.

Do it again because you made a mess of things, drink coffee/red bull, try again.

Install your old drive as a second hard drive and copy across any of the required old windows files.

If anything goes wrong, you make a mistake or want to change something you can disconnect your old drive, scrub the new drive and start again.

If you do not like Ubuntu you can just put the old drive back and format the new one as drive D:

If you are thinking of installing for the first time on a laptop DONT! Use a USB drive.

I know people will be shouting that Ubuntu is easy to install but I SNAFUed so many machines when I started that this is the method I now use if the machine is important.

Hugs.

Mandy


"CPU is not supported" when I attempt to run .sh files on a 32bit version of Ubuntu

Well, it sounds like your cpu is not supported...

You can check your cpu type from the command prompt: cat /proc/cpuinfo This will tell you, among other things, the model of your cpu. Check to see if this matches the requirements for Intel Composer.

Check this in the host OS as well.


What is the reason for '' error file '/boot/grub/i386-pc/normal.mod' not found'' in ubuntu?

During grub-install needed files are copied from /usr/lib/grub/i386-pc/ to /boot/grub/i386-pc/
Maybe this works. Can you boot a live-linux? Mount your /-Partition from your system and try to copy the missing file and reboot. When you have access to your System reinstall grub and update grub-configuration.


is the GRUB essential to have Ubuntu?

GRUB is the boot loader (and Ubuntu loader) program which loads Ubuntu from the disk to the Memory to be run. So, yes, Such a program is essential to have Ubuntu and it is Grub by default. But there are other bootloader too, such as LILO (LInux LOader) and recent BURG.

Grub is only essential to boot Ubuntu, not for Ubuntu users to learn. But You might want to know some of the basics of Grub for odd situations.

To learn Grub, You can use the Grub manual here : manpage for the grub command

I recommend you to read the GNU info pages, those are very extensive and helpful. To view it, write info grub in a terminal.

There is a graphical front-end for Grub, called Grub-customizer. It is on a PPA. To install it, execute these commands one by one in a terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

You may be asking this question for knowledge about repairing grub. To simplify your task, there is a boot-repair program which is very handy.

To install it, Use these commands:

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

Also take a look at this page for a general introduction to boot repair: https://help.ubuntu.com/community/Boot-Repair


Install Java 6 for a single project while leaving the default for the rest of the system at Java 7

This sounds like this similar answer by me could help:

Install both Java versions and choose the default one for the system:
update-java-alternatives vs update-alternatives --config java

Not sure what the android SDK includes etc., I haven't used it.
But if you work with Eclipse, you can choose a Java Version in the Settings.

The alternative, as written in the answer above, is to create a script that will edit PATH or use update-java-alternatives to change the VM and start your application.


wifi bridged to ethernet on a DIY router, not working

seems it's just my phone, I just checked the dhcp clients list and my printer and chromecast seem to have zero problems. I just printed something over wifi.

one thing I will note, I made a minor change:

in /etc/network/interfaces I set the bridge (br0) to auto-start wifi and dhcp

iface br0 inet static
    post-up service hostapd start
    post-up service isc-dhcp-server restart
    address 10.1.10.1
    netmask 255.255.255.0
    broadcast 10.1.10.255
    network 10.1.10.0
    dns-nameservers 10.1.10.1 8.8.8.8 8.8.4.4
    dns-domain 10.1.10.1 magi.andsat.org
    bridge-ports enp3s0 wlp1s0
    post-up iptables-restore < /etc/iptables.up.rules


I finally found the answer to this.  Click and hold on the body of the note, and a little vertical bar will appear to the right of the note.  The bar has a red x at the bottom.  Release your mouse, click the x, and good riddance to a really really really annoying app.


Set UFW to accept connection from local source only

Well, I am not sure what I did, but this line helped.

ufw allow in from 172.17.0.2 to any port 42111 proto tcp

P.S. Don't forget that Docker messes with UFW unless started with argument --iptables=false


Preseed Ubiquity success command executed incompletely

Maybe :

chroot /target bash /install/postinstall.sh;

instead :

chroot /target bash -c "/install/postinstall.sh";

Following good for me(xubuntu 18.04) :

bash -c "/cdrom/tools/run.sh";

I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.


Possible to sync bookmarks between ubuntu touch browser and Firefox?

Currently thrte is no way to sync the bookmarks in the default browser. This is due to the fact that you cannot add firefox account details on. Thia however would be a great feature and for that reason I would suggest you ceeate a feature request for this in Launchpad.


This is a known bug with ubuntu2d apparently.

There is a python script used by one of the users on that bug report that might work for you.

Add your issue to that bug report to push developers to solve it ;)


I finally figured out the answer to the real question I was asking. "would Ubuntu be taken over by RetroPie, or would it run in a window."

I watched this install instruction video which showed the install, how to run it, and how to escape it and get back to the desktop.

I know the instructions for the install are the same as what was posted already, here and on github, but none of them explained if the GUI would take over my Ubuntu desktop environment or not. I now know that it will run as a normal full-screen app, which you can easily shut down when done playing with it.


Where can I find the syscall-number mapping table/file in Ubuntu 11.04 (x86)?

You can find it on the Ubuntu website here.


Ubuntu installation freezes - Pavilion Gaming Laptop 15-cx0058wm

I had a similar issue a while ago when i was installing Ubuntu on my custom built machine. The BIOS setup turned out to be the problem (it was also very old version) and after resetting to default settings i was able to install Ubuntu without encountering any problems. If that fails you could check the bios version and consider updating it.


I believe you want netstat. If it is not installed, open your terminal and...

sudo apt-get install netstat

Then:

netstat -man

Or, for a more quick way this should give you more information than you want:

netstat -a -v

Depending on how deep you want to go then Wireshark is an option as well.


Why is gnome-session and gconfd-2 using 10+% CPU each?

found the problem of gconfd-2, I am running vncserver and it was starting metacity, stopped that from happening and now its all good.

gnome-sessions is behaving for now.


How to run a cron job using the sudo command

I won't get into how much this is a bad idea; simply put, running sudoin crontab requires your password to be stored somewhere in plaintext.

It's a bad idea.

The following is the preferred method of running administrative tasks through cron. Since you don't really need to write sudo in the crontab, if you are modifying root's crontab.

Use root's crontab

Run the following command:

sudo crontab -e

This opens up root's crontab. sudo is not necessary to run your command in this context, since it'll be invoked as root anyway.

Therefore, you would simply append the following to root's crontab.

@hourly rm somefile

Now, if you absolutely want to be unsafe and take risks with your password, the following will run your command from your own crontab, and enter your password automatically when prompted by sudo.

Again, this is not recommended.

In your own crontab, write your command like so:

@hourly echo "password" | sudo -S rm somefile

The obvious disadvantage here is that, should anyone ever access your crontab, your password will be readable in plaintext.

You shouldn't do this.


Keep getting error "Call to undefined function curl_init()"

Try these two things:

sudo apt-get install php5.6-curl

create a page to show you <?php phpinfo(); and make sure that you're using php 5.6. Do you have multiple php's installed? Once you figure out which exact version you are using, install curl for it: apt-get install php<VERSION>-curl -y


Scp uses ssh per definition, rsync does not. You have to tell rsync to use ssh with --rsh=ssh. E.g

rsync -av --rsh=ssh user@server:/file /filex

For more information, see man rsync.


Can I install Desktop-Environment from distro's iso file?

On an installed Ubuntu install, cache of installed packages is stored at /var/cache/apt/archives so they don't need to be downloaded again if they are needed to be re-installed.

On an install disk (Ubuntu 14.04, should be the same as the Xubuntu one), the compressed file-system appears to be at casper/filesystem.squashfs. So you should be able to decompress the squashfs file (I wouldn't do it as root, odd things may happen then), and extract the cached deb archives. Then you could install from the debs the dependencies listed here.

The problem is that the packages may be installed on the compressed filesystem, but not cached, so installing from the disk becomes impossible. I tried this with a normal Ubuntu install disk (a 1GB 14.04 one downloaded from here - using the command unsquashfs '/run/media/wilf/Ubuntu 14.04 LTS i386/casper/filesystem.squashfs in a empty directory), and there were no cached packages.

As cached packages use up an awful lot of space, when trying to fit a system installer to a ISO which has to fit on a CD or DVD, it is not surprising these are left out - especially on the Xubuntu disk, as it is more for low-spec systems. Unless you copy the installed data over, which is not a good idea, you can't really install from the iso. Cached packages may be included on the larger 4GB install ISOs available for some systems.

So you are probably stuck with installing xubuntu-desktop - great idea though.


Laptop fails to detect USB I want to boot from

Congratulations :-) You found a solution

  I have another USB stick, 1GB in size, lying around which has an LED
  that is illuminated when plugged in, blinks when being read
  from/written to. I thought I'd give that a try in the problematic
  laptop, as I had a suspicion that maybe the laptop just wasn't
  powering the 4GB USB stick I was using before—I'd be able to see
  whether it was being powered based on whether that LED was on or not.
  As it is only 1GB in size, I couldn't put Ubuntu, Lubuntu, or Debian
  on it, so I went with Arch Linux (~500MB), and lo and behold, for some
  reason, the laptop dealt with that USB stick just fine... I'm doing a
  successful backup with rsync as I write this.

  I suppose this issue is "solved" in the sense that I'm now able to do
  what I wanted, but the issue of why my other USB sticks weren't
  working still remains a mystery. If anyone has any ideas, feel free to
  comment them for anyone who happens across this thread in future.

Analysis and comments

USB systems in computers and pendrives are not completely standardized. Most of them work as expected, but some hardware and (built-in) software have problems communicating in all situations. They are not compatible.

Almost all USB pendrives work as mass storage devices in all computers
Most USB pendrives can be made into bootable live/install drives, but some pendrives will not boot all computers, and some computers will not boot from all USB pendrives. This can be independent of brand name, but can be specific to the model or number series of the product.
I have Kingston pendrives, that work in my Toshiba. I have no pendrive made by HP (or branded by HP).
I have also noticed that 'no name' pendrives may be 'more compatible' than branded ones (but they are often rather slow).
The following current Ubuntu family ISO files can be cloned to a 1 GB USB pendrive and used as a live operating system,

xubuntu-18.04-core-amd64.iso and xubuntu-18.04-core-i386.iso, which are uploaded by a member of the Xubuntu team. They are even small enough for a CD disk (less than 700 MB) — Supported until April 2021.
lubuntu-16.04.1-desktop-amd64.iso and lubuntu-16.04.1-desktop-i386.iso, scroll down to find this 'first point release' — Supported until April 2019.

Read more

help.ubuntu.com/community/Installation/FromUSBStick
Ubuntu Forums tutorial "Howto help USB boot drives"


Ubuntu 19.10 - System BootOrder Not Found Initializing Default. HP Elitebook 8570w

On my HP EliteBook Folio 1020 G1, there is no option to choose a trusted UEFI file.
However, there is an option for "custom boot" under the "boot options" menu.
Add a custom boot path and enter EFI\ubuntu\shimx64.efi. It must be a backslash \, and not a slash /.
Then put "custom boot" on top of the boot priority list.
Save and reboot.


Unable to bind to port 80 [bitnami, OSQA, Ubuntu 12.04]

To find out what processes are using which ports, you can use the '-p' option to netstat (this must be done as root).  the command I always use is:

sudo netstat -alutp

This shows all open, listening, udp, tcp sockets, and what process has them open.


Installing Ubuntu 19.04 in HP Omen 15, RTX 2070 Max Q, 32GB RAM, 12 cores

You can try booting with the options libata.noacpi=1 or acpi=off. Here on Turn Off ACPI while Booting Ubuntu via Grub2 - Ubuntu Sharing, you can find how to do that.

Sources:

Turn Off ACPI while Booting Ubuntu via Grub2 - Ubuntu Sharing
ACPI Error: Una tontería de GNU/Linux que me ha vuelto loco | Quijote Libre


Ambience theme error on Gnome Classic (12.04)

This is a bug in compiz. Use Gnome Classic (no effects) and all those bugs will disappear. You may get back your transparent terminals etc while using (no effects) by enabling metacity compositing:

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true


18.04 and 16.04: Touchpad failed after updating software packages

solved!!

In new update of Ubuntu, this problem is solved.


How do I disable fading animation when changing wallpapers?

To disable this fading is to turn off the hole gtk animations. Do this by editing or creating the file ~/.gtkrc-*.0 and add this line:

gtk-enable-animations = 0

Then log-off and on again.

Note: * refers to your gtk version (2 or 3) so replace it with yours.


What's the difference between the keyboard shortcut commands and bash ones?

Shortcuts in System Settings -> "Keyboard" -> "Shortcuts" -> "Custom Shortcuts" are not run in a shell.

That's why gnome-screenshot -a -f /home/manuel/Desktop/"`date`".png creates a file named "`date`.png"; the /home/manuel/Desktop/"`date`".png part is not interpreted and is passed verbatim to gnome-screenshot, which creates a file named "`date`.png".

bash -c "gnome-screenshot -a -f /home/manuel/Desktop/"`date`".png" instead doesn't work simply because you're not escaping the second level of quotes, which makes Bash run date in an uquoted subshell which is subject to word splitting.

So just escape the second level of quotes:

bash -c "gnome-screenshot -a -f /home/manuel/Desktop/\"`date`\".png"

Or even better use single quotes in the outer command so to not have to escape a second level of quotes:

bash -c 'gnome-screenshot -a -f /home/manuel/Desktop/"`date`".png'

On a side note using `` is deprecated and discouraged; it would be better to use $():

bash -c 'gnome-screenshot -a -f /home/manuel/Desktop/"$(date)".png'


Input signal out of range after logging in KDE

It's Fixed!
It looks like it was a bad refresh rate.
I found four files in ~.local/share/kscreen/ (Two were in that directory, and two in ~.local/share/kscreen/outputs.)
The contents looked something like this:
{
    "id": "<redacted>",
    "metadata": {
        "fullname": "xrandr-HP S2031-3CQ2210QR9",
        "name": "DVI-I-1"
    },
    "mode": {
        "refresh": 60,
        "size": {
            "height": 900,
            "width": 1600
        }
    },
    "rotation": 1,
    "scale": 1
}

Except the number following "refresh" in two of them was 120.  I used a text editor to change it to 60.


Uninstall Apache2 from terminal on Ubuntu14.04

This would do what you want

sudo apt-get remove apache2*


Extract A Squashfs To An Existing Directory

The source you link to tells you what you need to do:

  The tool does not extract a squashed file system on already exsisting
  directory unless the -f option is specified.

So this should work

sudo unsquashfs -f -d /media/location1 /media/location2/file.squashfs


Why am I asked for my password when I want to mount a drive

It depends on which method you use to mount your internal volume.
Remark: The cryptic numbers are the UUID of your volume. Every partition in the world has its own unique UUID to identify it. Using it as mount-point basically a makeshift. Developers are talking about a better algorithm to find more appropriate, human-readable mount-points involving the disk-label, size, vendor etc. We'll see, what the future brings.
Mounting is done by shell
If you're mounting partitions in a shell and you do not want to enter your password each time, you can configure sudo to run the mount and umount (for unmounting) commands without a password. This will introduce a security risk as a special crafted command can grant the user root privileges.
If you want to sacrifice security for ease of use and enable this rule, you need to edit your sudoers file. Do not edit /etc/sudoers directly, but run sudo visudo. Replace yourUser by your usernameL
yourUser ALL=(yourUser) NOPASSWD:/bin/mount,/bin/umount  # insecure!

To avoid having to type sudo, put the next line in the ~/.bashrc file:
alias mount='sudo mount'

As for the naming: Simply use another mountpoint. That can be any empty folder of your choice you have write permissions to. man mount in shell will tell you how to do that.
Mounting is done by nautilus (in gnome)
In case you are having nautilus (ubuntu's default file manager - similar to windows explorer) auto-mount the system, it's a bit trickier. You need to add the volume to your fstab. As in the shell based method you can specify a mount point there as well to get rid of the cryptic numbers. It goes like in my answer to automounting a ntfs volume with the exception, that you need to replace 'ntfs' by the actual filesystem of your volume.
So you basically just have to add a line similar to tat one to the fstab:
UUID=7258CB9858CB598D /media/win ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0   2

The users option is important to be able to mount and unmount the volume without a password query. Also gid and uid should be set right for that purpose. Note the "Don't reboot with errors" part in my link.


Failed to update Zotero after changing permission with chmod 707

With that command you only changed the permissions for the executable file, not for all the files the program uses (and probably needs to update).

I recommend that you chmod the /usr/bin/zotero file back to 755 and instead run the Zotero updater with sudo and it should have the rights needed to update itself.

EDIT:  It is recommended to run sudo su to open up a root shell and then just run zotero as a command line command to open it with root rights. Directly running sudo zotero is not recommended because it uses your real home directory and you may end up with root-owned files in your home directory.


Supermicro motherboard and upgrade to Ubuntu 16.04 LTS

Upgrading distributions to a newer version rarely causes hardware support issues because in the kernel, support for hardware is rarely (if not never) removed, only added.

If you really want to be sure, try it with a live usb with 16.04 without installing it, that usually is a good indicator of what to expect when you actually install it. And if that works, you can be quite sure that it will work.


Using LVM with two hard drives, 1 Solid State

You will indeed be able to choose where the logical volumes take their physical extents from.  For illustration (taken from shell history):

sudo lvcreate VG -n LogicalName --alloc cling -L 500M /dev/dev0

The above flags can also be passed to lvchange when the volume already exists. This will move data from one disk to another:

sudo pvmove -n LogicalName /dev/dev0 /dev/dev1

Also, to avoid micromanagement of which file goes on which drive, I recommend running bcache on top of LVM.


Boot with "noacpi" automatically from hard drive?

If you're using GRUB2 (clean-installs of Ubuntu 9.04 and later), edit /etc/default/grub and change the following line: (this may look different on your system, I just took it from mine as an example)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Add noacpi, or whichever kernel option you want, anywhere in the line.

If you're using GRUB Legacy (if you upgraded from a version of Ubuntu before 9.10), please see the GRUB page in the Ubuntu Wiki for details on how to edit your /boot/grub/menu.list to accomplish the same as above.


Install gparted.  Make new partition table on the thumb drive and choose gpt.  Then create a new partition for the drive. Fat-32 is easiest for all operating systems.  If only for Ubuntu then ext4 is great.  Between Linux and Windows NTFS works fastest with the least limitations.


Unity Lenses Missing (files/folders, applications)

Make sure you have those packages installed:

unity-lens-applications
unity-lens-files

Make sure you have those two files in /usr/share/unity/lenses:

applications.lens
files.lens

If it still doesn't work, try to reinstall the two packages:

sudo apt-get purge unity-lens-applications unity-lens-files
sudo apt-get install unity-lens-applications unity-lens-files

If it still doesn't work, I suggest reporting a bug report:

ubuntu-bug unity # if unity is the wrong package, others will fix it


How to install Grub2 on Macbook Pro with the grub-install command without warning about "blocklists" requiring the use of --force?

My first reaction is to note that you're using a hybrid MBR, which is an ugly and dangerous hack that Apple uses to simplify dual-boots with OS X. Your fdisk output only shows the MBR side of the hybrid MBR, but both OS X and Linux ignore this, instead favoring the GPT side. To show the GPT partitions, you'll need to use parted, gdisk, or some other GPT-aware utility.

Second, the "blocklists" error suggests that you've booted in BIOS mode (using the compatibility system Apple created for use by Windows), but your GPT doesn't include a BIOS Boot Partition, which GRUB 2 uses on GPT disks to store part of its BIOS-mode boot loader. One way around this error is to tweak your partitions so that you do have a BIOS Boot Partition. This can probably be done relatively painlessly, but there might be unintended consequences to such a change. In particular, if you need to resize any partitions with GParted, it's likely to wipe out the hybrid MBR, which will prevent the system from booting Linux in its current configuration because the hybrid MBR is what activates the Mac's BIOS compatibility mode. This problem can be corrected by creating a fresh hybrid MBR.

Since you don't seem to have Windows, you may want to look into booting Linux in EFI mode, which will obviate the need for the BIOS compatibility layer and the hybrid MBR. I've got a Web page about doing this: http://www.rodsbooks.com/ubuntu-efi/index.html. In brief, the procedure from a working Ubuntu installation is to uninstall grub-pc and to install and configure grub-efi or some other EFI-capable boot loader. This method has its drawbacks, though. In particular, on some systems some hardware (possibly including video hardware) may not be activated, which in extreme cases can make the system unusable.

Incidentally, rEFIt isn't likely to be a problem; it's an EFI-mode boot manager that doesn't conflict with BIOS-mode boot programs. rEFIt seems to have been abandoned, though. My fork, rEFInd, picks up development, adding features and fixing bugs. It's got some options that are particularly useful for booting Linux, but some of these apply only if you've got a 3.3.0 or later kernel, which no version of Ubuntu yet provides.


How to restart gnome shell but daemonise it from a script?

You can do in your script or in your terminal:

gnome-shell -r &
disown

This will start the program in background from the terminal and disowns the task then.

NOTE: The disown command has to come directly behind the command which starts something in background, otherwise it will not work.

Or if you already have started the program you want to detach from the terminal without the & you can press ctrl+d and type after that:

bg
disown

This will run the task again in background and then detach it from terminal.


Unable to connect to postgresql after migration to 16.04

As you have upgraded from 14.04 to 16.04, I can guess postgresql packages has also get upgraded.

If that is indeed the case, there might be new configuration files from the updated package. And during configuring stage, it might have changed the port because the older port was already occupied by older version of postgresql.

I experienced a similar problem recently. In my case, when I installed 9.5 over 9.4, it's configuration files then started using port 5433 instead of default 5432. As a result, I couldn't make a connection.

The solution was removing 9.4 and changing the value of the port in /etc/postgresql/9.5/main/postgresql.conf file to 5432 Again and then restart the service.

Here is the answer I wrote on StackOverflow about the problem and it's solution. You might want to read answer especially if you're using Rails with postgresql - Connection refused (PGError) (postgresql and rails)


Wireless Connection Freezes on a Macbook Pro (early 2010 model) with a BCM4322

try to see here, seems like someone already reported something similar: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/903437

I'll have a look around when I get back home to see if there's anything else to verify this is actually the same driver problem.


How I made my new ubuntu server 17.10 installation only use WiFi

This worked for me:

1) Install the required packages:

sudo -s -H
apt-get install wireless-tools
apt-get install wpasupplicant

2) Check wifi adapters (mine is wlp4s0):

iwconfig

3) Search available wifis for "my_wifi" essid:

iwlist wlp4s0 scan | grep my_wifi

4) Edit netplan config file: /etc/netplan/01-netcfg.yaml

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  wifis:
    wlp4s0:
      dhcp4: yes
      dhcp6: yes
      access-points:
        "my_wifi":
        password: "my_passord"

5) Reconfigure netplan:

netplan --debug generate

netplan apply

6) Finally reboot:

shutdown -r now; exit

That should restart your ubuntu server, and connect to "my_wifi" with WPA2   "my_passowrd" (change wlp4s0, "mi_wifi", and "my_password" for the appropriate ones).

Happy year 2018 !


You can remove all fonts from the /usr/local/share/wine/fonts and /usr/local/share/fonts directories.

source


how to wake sleeping isc-dhclient manually

use retrytime option. specify it with a small number of seconds, like 60


How to recover partially formatted ext4 partition (testdisk did not help)

You may have run into this problem, but that's not really clear. If so, yours is the first case of its kind that I've heard of, and you can thank the GNU parted developers for sitting on a fix for over two years.

As a practical matter, your best bet for recovery is this:

(Optional, but strongly recommended.) Do a low-level backup of the damaged disk. For instance, sudo dd if=/dev/sdc of=/path/to/backup.img backs up /dev/sdc (if that's the damaged disk) to /path/to/backup.img (you can change this target directory or filename, if you like). Obviously you must have sufficient free space in /path/to to hold the backup. This means you may need to buy a new backup disk, prepare it, and mount it at /path or /path/to. You can skip this step, but then if you make matters worse, it will become harder to recover -- perhaps to the point of becoming impossible to recover.
Use fdisk (if the disk used MBR) or gdisk (if the disk used GPT) to re-create your original partitions. Since you say you had a single partition on the disk, chances are that it started at sector 2048 and extended to the end of the disk. Thus, deleting the current partition(s) and re-creating that one may work. Do not create a fresh filesystem on the disk; just create an empty partition. (GParted likes to create a fresh filesystem and so should be avoided. It's possible to get it to create an empty partition, but why take the risk?)
Reboot. (This just ensures that you're using the new partition table. There are less radical ways to do this, but this one is easy to describe.)
Run e2fsck on the partition you just created. If you're very very lucky, it may locate enough of the ext4fs data structures to bring the disk back to live, although probably with some missing files or other problems. You might want to use fsck.ext4 to make sure, that it recognizes properly that it is a ext4 filesystem. Fiddling with e2fsck options (such as -b) may improve your odds of recovering data, but these options are very advanced. See the e2fsck man page for details.
If this fails, run PhotoRec on the disk. This should enable recovery of individual files, although they'll probably lack filenames or any sort of organization, so you'll need to sift through them to figure out what they all are.


Google TalkPlugin repo disappeared in 16.04

It's because google hasn't updated their repo to keep up with the changes in apt.

The only option as fas as I know is to use the .deb which you can download from google

Install it with

sudo dpkg -i google-talkplugin_current_amd64.deb

or if you use the 32 bit version

sudo dpkg -i google-talkplugin_current_i386.deb


how can I prevent the login screen to be shown after suspending?

yeah you have to do like , open your system settings and open screensaver settings and uncheck the password option for screensaver .


Icons missing and misbehaving in Gnome Panel since 15.04 upgrade

I found the following two solutions:

For sound, running this at the command line restored my sound icon:

gsettings set com.canonical.indicator.sound visible true

For Dropbox and for my IME input indicator, it seems that removing everything from the Gnome panel, and then adding "indicator app complete" and "notification area", and then restarting helped. However, my Dropbox icon and IME icons both look jacked up:

Oh well, at least they're back now. Note the icon that says "En" never changes, even though the one that says "US" will change to show what input method I am currently using.


Android Studio 1.0 RC aapt permission denied error

I had the same problem and found a solution here, it's a link to an answered question in stackoverflow.
try these:

sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1


I have had the same problem, an you could try enter this in the terminal:

sudo umount -a
sudo mount /dev/sdc2 /media
sudo mount -a

and it might work fine this way.


Display current layout (language code/country flag) in keyboard indicator

10.10

Yes, the icon doesn't reflect the language chosen. I think it may have something to do with the fact that showing "flags" would often be inappropriate. (Examples: flag of Great Britain in India, flag of Germany in Austria, flag of France in Senegal).

The current metaphor, i.e. KEYBOARD → Langauge is very much in accordance with user experience guidelines.

The behaviour you're describing was removed quite some time ago. It was another application (can't remember the name) that dealt with keyboard layouts then. (At least I remember something like that, I'm not quite sure now come to think of it)

What i did to get the above screen shot was go to Keyboard-Layouts, select add, Hebrew/Israel and add it to the list. My system has been upgraded since 9.10, so it should be the same on nearly every Ubuntu installation.

The old behaviour is still lurking in the system. If you want the indicator to show Flags, you can open gconf-editor, got to /desktop/peripherals/keyboard/indicator and enable "showFlags". However, you'll need the relevant flags to be in /home/<username>/.icons/flags (press CTRL+H to show directories that start with a period). The flag of israel should be named il.png (which is israels ISO 3166-1 alpha-2 country code).


How do I fix my graphics settings - messed up openGL I think!

Just thought I would close this one out by letting people know that I upgraded from 10.04 to 10.10 (finally) and it sorted it all out.

I was kinda resigned to doing a total reinstall but the update seemed to do the trick!

Hmm no when will I upgrade to natty?


rEFInd boot menu gone after updating Mac OS in a dual boot with Ubuntu

One possible solution would be to reinstall Yosemite. You can then bless rEFInd. There are different ways to accomplish this. Below are the steps to one such way. Basically, you will be making a image of a Yosemite install in a virtual machine. Next, you will restore Yosemite to a new partition on your internal drive.

Make sure File Sharing is enabled for Big Sur. See the Sharing pane of the System Preferences application.

Download Yosemite from the Apple website How to get old versions of macOS. The file InstallMacOSX.dmg should download your Downloads folder.

Open the InstallMacOSX.dmg file and install the Install OS X Yosemite application to the Applications folder.

Download VMware Fusion Player. This is a free product.

Install VMware Fusion Player

Install Yosemite in a virtual machine. Open the VMware Fusion application and create a new virtual machine. Drag and drop the Install OS X Yosemite application from the Applications folder to the VMware Fusion application window shown below.

Complete the installation of Yosemite.

Once booted to Yosemite, open the Disk Utility application and create a second partition. The new partition should to be at least 8 GB in size. Below is what I chose.

When finished, quit the Disk Utility application.

Open a Terminal application window and enter the command shown below.
diskutil rename disk0s2 MyYosemite
sudo nvram "recovery-boot-mode=unused"

Close all Finder application windows, quit all applications and restart the virtual machine. The machine will boot to OS X Recovery.

Open the Disk Utility application and highlight the MyYosemite volume. Select New Image and enter the following in the popup window, then select the Save button.

When finished, highlight the MyYosemite.dmg file, then select Images> Scan Image for Restore from the menu bar. When finish, restart the virtual machine. The machine will boot to Yosemite.

Connect to the Big Sur host and transfer the MyYosemite.dmg file from the MyBackup volume to your Downloads folder on the host.

Close all Finder application windows, quit all applications and shutdown the virtual machine.

If necessary, delete the virtual machine to make more space available.

Quit the VMware Fusion application.

Download the latest rEFInd. Currently this is version 0.12.0. The refind-bin-0.12.0 folder should be created in your Downloads folder.

Open a Terminal application window and enter the command below. Basically, the APFS container is being shrunk by 25 GB to make a new partition for the Yosemite volume.
diskutil apfs resizecontainer disk0s2 140.8G jhfs+ NewVolume 0

Next, enter the commands below to install the Yosemite volume in the new partition.
cd ~/Downloads
diskutil unmount disk0s3
sudo asr restore --source MyYosemite.dmg --target /dev/disk0s3 --erase
diskutil mount disk0s3

Finally, enter the commands below to transfer the rEFInd download to the Yosemite volume.
xattr -rd com.apple.quarantine refind-bin-0.12.0
mv refind-bin-0.12.0 /Volumes/MyYosemite/Users/Shared

When finished close all Finder application windows and quit all applications.

Select to restart to MyYosemite from the Startup Disk pane of the System Preferences application.

Once booted to Yosemite, either bless or reinstall rEFInd. If reinstalling, you might want to first backup the refind.conf file, although the rEFInd installer will probably rename the existing refind.conf file to refind.conf-sample.

I believe reinstalling is the safer alternative.

If rEFInd was installed using the default options, then the commands below will bless rEFInd.
sudo diskutil mount disk0s1
sudo bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/EFI/refind/refind_x64.efi --shortform
diskutil unmount disk0s1

The command below will reinstall rEFInd using the default options.
sudo /Users/Shared/refind-bin-0.12.0

If you have any questions, post a comment.


Conduit Synchronizer Don't delete empty folder

Alternatively you can Synchronize between two folders/Directories by following command in Terminal:

rsync -av --delete "<path/to/source>" "<path/to/destination>"

Where --delete option delete also files/folders which doesn't contained by source and if exist (not-deleted) in destination.

So, I am using rsync which is best and suitable for me. Hope this helps


No ttyACM0 for Arduino Nano on Ubuntu. How can I attach it?

I was able to find the Nano with the CH340 chip (or CH340G, the Amazon item wasn't clear) on Ubuntu 18.04 just by installing the Arduino IDE (1.8.x) and giving myself permissions to the port with:

sudo usermod -a -G dialout <my linux username>

Then I was able to see the /dev/ttyUSB0 port in the Arduino IDE (it isn't ttyACM0 like in the documentation).
You can find out what port it is by unplugging your Nano, then running:

ls -l /dev/tty*

Then plug your Nano back in and run it again and compare the list.  The new device should be at the bottom of the second list.
I was able to upload a sketch by changing the processor from ATmega328p to the Old Bootloader.


Ubuntu 15.04 after reboot lost Ethernet connection

Some hardware revisions of this Ethernet adapter have issues with kernel driver r8169. In this case a specific driver can be installed, it is in Ubuntu repository. Just run:

sudo apt-get install r8168-dkms


Running python on trying version without installing

Getting a SyntaxError on that particular line certainly means that you are running Python 2 instead of Python 3 (since this is valid Python 3 syntax, but invalid Python 2).

Make sure that you are running the python3 command rather than python.

Edit

Regarding the matplotlib loading issue, Python looks for dynamic linked libraries using paths listed in LD_LIBRARY_PATH. Make sure LD_LIBRARY_PATH includes /usr/local/lib, and try again.


One way to do this would be to set it up as a systemd service:

Create a .service file, which, once enabled, will be run by systemd upon booting.  In a text editor, create a file called mykeyboard.service and include the following (change the path/to/ part with the actual path to your script):

[Unit]
Description=MyKeyboard service

[Service]
ExecStart=setxkbmap -model abnt2 -layout br -variant abnt2

[Install]
WantedBy=multi-user.target

Place your new .service file in the directory /etc/systemd/system/
To run and have it run on boot, you would use sudo systemctl enable --now mykeyboard

That should do it!


How much extra storage space does eCryptFS use?

I did some testing that indicated eCryptfs has a minimum file size of 12,288 bytes, and seemed to add about 8k to larger files (as Colin correctly says).

For example, a file that's 10,485,760 bytes ends up encrypted as 10,493,952 bytes, so increased by 8,192 bytes.

Not significant for large files, but for lots of tiny files (like home configuration files usually are, or some other applications) the size could balloon significantly. Even a 1 byte file becomes 12,288 bytes.

You can just add a new user with sudo adduser --encrypt-home newguy then login (in a terminal if you don't want to log out of your regular user - sudo login) and experiment & compare the different file sizes yourself.

Encrypted files are in /home/.ecryptfs/newguy/.Private/ and (when logged in) the decrypted versions are in /home/newguy/

eCryptFS has some quirks, like long filenames (over ~200 characters) may not work or be truncated, and file permissions may not work so well (chmod seems to report success, but ls keeps listing ----------. If you want a fixed size encrypted container file (or partition) you could use LUKS too/instead.


Can't mount any partition due to "/usb: Adding read ACL for uid 1000 to /media/evil' failed: Operation not supported" error

It is bad advice to use permission 777 on anything. Any user on the system gets read/write access to your files.

sudo mkdir /media/${USER}
sudo chown ${USER}.${USER} /media/${USER}
chmod 750 /media/${USER}


With some help, I was able to find this bug, which was what was causing the health_warn in ceph.  I haven't resolved the error yet with a work around, but I'll update this answer when I do.

https://bugs.launchpad.net/charms/+source/glance/+bug/1492742

Adding OSDs will resolve the warning.  The nice part is, juju handles it all for you.  Once the drive is put into the server, maas and juju play nice, and make it immediately an OSD.

ubuntu@juju-machine-0-lxc-4:~$ sudo ceph status
    cluster eabab000-231c-4edb-855c-dd30b1bab56d
     health HEALTH_OK
     monmap e2: 3 mons at {juju-machine-0-lxc-4=10.14.0.53:6789/0,juju-machine-1-lxc-0=10.14.0.62:6789/0,juju-machine-2-lxc-4=10.14.0.60:6789/0}
            election epoch 12, quorum 0,1,2 juju-machine-0-lxc-4,juju-machine-2-lxc-4,juju-machine-1-lxc-0
     osdmap e356: 13 osds: 13 up, 13 in
      pgmap v133686: 1091 pgs, 14 pools, 101133 MB data, 26747 objects
            278 GB used, 3735 GB / 4014 GB avail
                1091 active+clean


Make a text file
Name it backup.sh
Put in the file,

#!/bin/bash
java -jar $HOME/path/to/file.jar

save the file
change permissions so it’s executable

chmod u+x ./backup.sh

To execute via the terminal, use

./backup.sh


Desktop (dual boot with windows) with AMD GPU upgraded from ubuntu 18LTS to 20.04 LTS breaks login GUI

As you are able to access TTY3 you could try to uninstall some software you do not need. You can start with:
sudo apt autoremove

You can also try "ncdu" CLI utility to find what is taking your space. Just run it from / directory. Maybe you find some old backups or files you do not need. Here more on how to use ncdu.
What is your RAM usage when you log in?
free -m

I once tried to boot with Graphical environment into RAM and because of its size, it was too slow and eventually, it got stuck...


you could set up a cron script to run this (if /dev/sdd is the external image backup drive):

dd if=/dev/sda of=/dev/sdd

That will copy the image of /dev/sda (first HDD/SDD/USB/ETC) onto /dev/sdd (fourth HDD/SDD/USB/ETC)


Can't get permission for deleting a file - not even as root!

You're using fuse to mount the images. From man mount.fuse (section on SECURITY):

3. No other user (including root) can access the contents of the mounted filesystem.

Even though the mount options say rw, I think you cannot use it to modify ISOs. You'll have to use other tools like
isomaster for that.


How to install gitolite on Ubuntu 10.10 server?

gitolite is in the repos. Check if you have this line in your /etc/apt/sources.list file:

  deb http://security.ubuntu.com/ubuntu maverick-security main universe

If you don't have, add it. If you already have but commented, just remove the # character in front of the line.

After that you can update your repos and install gitolite.


Actually, there is a solution in plain bash !

The only limitation is incompatibility with duplicate prevention in bash command history. So if you don't mind having duplicates in your bash history you can set the following in your ~/.bashrc :

HISTCONTROL=ignorespace

function pprompt {
   local hcount=$(fc -l -1)
   echo ${hcount}
   hcount=${hcount%%[^0-9]*}
   if [ "${hcount}" != "${ocount}" ]; then
      PS1="\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w:\[\033[00m\]\n>>"
   else
      PS1=">>"
   fi
   ocount=${hcount}
}

PROMPT_COMMAND=pprompt

By default HISTCONTROL=ignoreboth which is equivalent to ignorespace:ignoredups so you have to change it.

The pprompt function gets the last command in the history and compare its number to the previously stored value. If you just hit enter the number doesn't change, so if this number have changed, we set PS1 to the full prompt, otherwise, we set it to >>.

Finally PROMPT_COMMAND=pprompt thells bash to execute pprompt before echoing the primary prompt ($PS1).

NB1. If you don't like to display your home path as ~, you can replace \w by `pwd`.

NB2. If we could get the actual bash command number (the one we can display using !# in the prompt) instead of the history command number, we would get a solution compatible with history deduplication.


Optimize battery lifespan on a LENOVO ideapad 510

Afaik there is no Linux tool for charge thresholds on non-ThinkPads.

Your only option is to install Windows dual boot and configure the thresholds with Energy Manager or Lenovo Companion. thresholds are stored in hardware and persist when you boot Linux again.


First step I would suggest is trying to boot into ubuntu recovery mode

Failing that I would recommend connecting into the system with a live CD making a back up of any files you need to keep. Then go through and reinstall Ubuntu, this will allow you to keep any essential files; while making sure that you have a clean install of Ubuntu which works.


How Do I Change a Forgotten User Password Without Booting?

No, that's not possible as that would defeat the purpose of a password-protected super-user account.

Boot recovery mode blindly

I recommend that you first try to boot to recover mode “blindly”, i. e. try to open the Grub menu and selecting the boot entry for recovery mode without actually seeing what you're doing. It may a few tries, maybe 10 or 20 until you find the right key sequence and timings. The secondary screen is going to start to work during the boot process probably. See How do I reset a lost administrative password? for general instructions and refer to this answer for the current structure of the Grub menu to reach the recovery mode entry.

The key sequence should be:

Shift at the right time to cancel the countdown for the default boot option and to show the Grub menu (if it's configured to not show without user interaction).
↓ (downwards arrow key) and Enter to select “Advanced options for Ubuntu.”
In the sub-menu, ↓ (downwards arrow key) and Enter again to select “recovery mode.”

Reset password from Live DVD/USB

If you can't find the right key sequence or timings or the image doesn't show up on the secondary screen, you can reset the password from a live system.

Create a Live DVD/USB  (if you don't have one ready) and boot it as if you wanted to install Ubuntu.
Choose the “Try Ubuntu” option in the boot menu.
Open a terminal (Ctrl+Alt+T).
Identify the device path of the partition of your Ubuntu installation. You can use (among other)

the graphical Gnome Disks application (sample screenshot) or
the terminal command:

sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT

You can recognise the right partition through properties like the size, the label (if you set one), and the file system type (“ext4” in a default installation).

For the sake of simplicity let's assume that your Ubuntu installation is on the device with the path /dev/sda5.
Mount the identified partition:

Gnome Disks has a “mount” button. In recent versions it looks like the playback symbol (▶) which is replaced by the stop symbol (■) when a file system is in mounted state.
On the terminal:

udisksctl mount --block-device /dev/sda5

On success both will show you the mountpoint, i. e. the path where the file system content is made available. Let's assume it's /media/my-ubuntu-installation.
On the terminal run

sudo passwd --root /media/my-ubuntu-installation <USERNAME>

where you replace <USERNAME> with the name of your user account. Enter a new password when asked (twice).
Reboot normally and you should be able to log in with that password and authenticate as super-user with sudo and friends.


I suspect your grub is configured for a "quiet" boot.

You can edit grub at /etc/default.

Run "info -f grub -n 'Simple configuration'" in the terminal to get the manual on what to change and how to get your desired effect.

Don't forget to run "update-grub" after you've saved your changes.


Partition and Boot problem Ubuntu 20.04 (GRUB 2.04)

As mentionned by @oldfred, partitionning was messed up and probably the cause of the problem. I did a new fresh install following these instructions and it all works well now.


Unfortunately "Connect Automatically" allows the VPN to connect when you try to visit a service that's not otherwise reachable, which means it won't work for maintaining VPN connections used only (or even primarily) for privacy purposes.

The only way I've found to keep VPN up is to have a crontab entry that runs

nmcli con on id YourVPNName

This assumes you've got your VPN configured via NetworkManager, which you probably do.


How can I upgrade a computer to 12.10 beta via Landscape?

Sorry, the Ubuntu Release upgrade feature of Landscape won't give you the option to upgrade to a beta release of Ubuntu.


How to determine FS type of windows partition

Thank you all for your answers. I tried them but it still didn't work. However, while looking at the disks utility in Windows, I noticed something that came out of my mind while installing: the disk is actually encrypted with bitlocker.

This is the reason why lsblk was not able to show the FS type. So, I went to this post and was able to decrypt and mount my Windows drive.


Can I change the image of the icons on my taskbar?

Check this: Where are the Unity Launcher .desktop files?

Open the .desktop file you want the icon changed for and there will be a

[Desktop Entry]
Version=
Name=
Comment=
Exec=
Icon=

Obviously the file name behind "Icon=" is what you need to replace. From UnityLaunchersAndDesktopFiles:

  Icon field is the icon that should be used by the launcher and represents the application. All icons that are under the directory /usr/share/pixmaps don't need to have their full path specified, but their filename without the extension. For example, if the icon file is /usr/share/pixmaps/wallch.png, then the Icon field should be just 'wallch'. All other icons should have their full path specified.


I suggest that you edit connections in Network Manager to set a static IP address. It is important that the address selected be outside the DHCP pool used in the router. There is one correct way to do this. It is to check the configuration pages of the router to check. http://www.mindspacesolutions.com/assets/images/D-Link_Router_Config_-_DHCP.jpg In this example, the pool for DHCP is from 10.1.1.2 to 10.1.1.32 and so we'd recommend a static IP address of 10.1.1.33 or above; say, 10.1.1.100. Of course, your details will be very different.

The second method is to guess. I gather that, when you switched back to DHCP, the router assigned 192.168.1.114. Compare this to other devices on the same network; phones, iPads, Windows computers, etc. I'd guess that they are all in the x.110, x.111, x.112, etc. range. Therefore, if we were to guess a static IP, we might guess 192.168.1.200.

Also, compare the gateway address and DNS nameserver addresses on other devices on the network.

Next, fill in the details in Network Manager like this: https://www.youtube.com/watch?v=Hvi2cTMmTq0 Of course, your details will be different.

Save and close. Reboot and test:

ifconfig

Did you get the desired address?

ping -c3 www.ubuntu.com

If you get ping returns, you are all set.


How to recover password from ubuntu installed on sd card?

A partition is (normally) not password protected, so you are having two separate problems:

How to mount my SD card
How to reset a password in a root partition by use of a different boot system

For question number 1, if it is complaining about fstab it means you did not use the complete command, it is missing data which it looks for in fstab.

The directory to mount to should already exist, so first make it by using:

sudo mkdir /mnt/sdcard

Now the command should be:

sudo mount /dev/mmcblk0 /mnt/sdcard

( and sometimes additional settings like type and mount options but normally this is not necessary )
if it is not working it could be because the partition is actually named differently, you can check by inserting the sdcard and after a couple of seconds run dmesg, the last lines will mention the disk.

Now for problem number 2,chroot to your installation:

sudo chroot /mnt/sdcard/

Change the root password:

passwd

Exit from the chroot:

exit


ASUS notebook hangs on shutdown with 14.04. Nvidia related...?

Might have posted a few minutes too soon, looks like I might have resolved it (at least it has shutdown properly 3 times a row and nvidia-detector doesn't hang the system). I want to leave the question up for others who run into this problem

I simply went to "Additional Drivers" in Dash and selected the Nvidia proprietary driver that was available:

NVIDIA binary driver - version 346.82 from nvidia-346 (proprietary, tested)

instead of the previously selected, non-proprietary driver:

X.Org X server - Nouveau display driver from xserver-xorg-video-nouveau (open source)

Note that I've left my /etc/default/grub with the line:

GRUB_CMD_LINE_LINUX_DEFAULT="acpi=force apm=power_off"


Ok, so until this bug is fixed, i made a quick and dirty script that wiggles the mouse by 1px every 185s (my screen lock is set at 3 mins), so worst case scenario screen will not be visibly locked for 6 mins.

Here is the essential part of the code:

user@somepc:~/bin$ cat ./jiggle.sh
#!/bin/bash

while :; do xdotool mousemove_relative 1 0 mousemove_relative -- -1 0; sleep 185; done

Then I added this script to the "startup programs" and never looked back..


Grub2 "ls" command does not list FAT32 USB Stick

Boot USB Stick Using Internal GRUB
Sometimes a computer does not want to boot a USB using the USB's bootloader.
A Bootable USB can usually be booted using the Linux computer's GRUB.
Add the following menuentry to /etc/grub.d/40_custom and then run sudo update-grub
menuentry "Boot Ubuntu USB" {
search --set=root --fs-uuid 2020-07-31-16-51-12-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
    initrd  ($root)/casper/initrd
}

Where 2020-07-31-16-51-12-00 is the UUID of the Live USB.
This method should work for any live or Persistent USB that boots ISO9660 files,
but may vary with the Linux version on the USB.


It seems you have ImageMagick binaries installed already, so you can use the following command:

$ montage your_gif.gif -tile x1 -geometry +0+0 -alpha On -background "rgba(0, 0, 0, 0.0)" -quality 100 sprites.png

That should create a file named sprites.png, with the gif's frames.


How Do I know if a software has KDE or GNOME dependencies?

Here's a small script that maybe useful:

#!/bin/bash

echo "enter Package"
read Package

apt-cache depends --no-pre-depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances $Package | grep -E "(qt|gtk|kde)"

I called it zzxx and saved it to ~/bin which is in my $PATH
and made it executable. If you don't have ~/bin in your $PATH, you can use $HOME/path/to/script/zzxx (and make an alias for it).

Sample output:

$ zzxx
enter Package
chromium-browser
  Depends: libgtk-3-0
$ zzxx
enter Package
evince
  Depends: libgtk-3-0
$ zzxx
enter Package
firefox
  Depends: libgtk-3-0
$ zzxx
enter Package
lxappearance
  Depends: libgtk2.0-0
$ zzxx
enter Package
qterminal
qterminal
  Depends: libqt5core5a
  Depends: libqt5dbus5
  Depends: libqt5gui5
  Depends: libqt5widgets5
  Depends: libqt5x11extras5
  Depends: libqtermwidget5-0
$ zzxx
enter Package
vlc
  Depends: vlc-plugin-qt
$

Programs described as "Desktop Independent" in your first link such as libreoffice may come up empty when you run the script.

$ zzxx
enter Package
libreoffice
$

Notes:

You need to enter the correct package name using the appropriate case (mostly lower case) and apt search in helpful for this purpose.
The script will obviously work only for software available in the repositories you have enabled.
I used apt-cache depends instead of apt depends to avoid a routine message: "WARNING: apt does not have a stable CLI interface. Use with caution in scripts."
The script isn't a substitute for looking at the entire output of, for example, apt show firefox which will provide a lot more information.
The script may fail with "transitional packages".


I believe Top lists the percentage per thread (logical core), so on your computer you could have up to 4 processes each listed as 100% CPU. Unless you write a program to be idle and wait for hardware interrupts anything you run will take 100% of the thread it is running on as long as it runs. A processes you run will only be on a single thread unless you explicitly program them to be multithreaded, although you may call a multithreaded function without knowing it (some FFT algorithms are multi-threaded).

In WSL top only shows Linux processes, so WSL is using 200%/4=50% of your total, but Windows shows everything together so it is taking up the other 20% to get up to 70% of the total CPU time. "mpstat -P all" seems to be picking up on the Windows processes (perhaps it's a lower level hardware call) and reporting as a percentage of total CPU time, so max would be 25% per thread, but within a couple percent may be as close as it actually gets. The only thing I'm not sure about is why Windows isn't showing 2 threads pegged at 100%.


Something has stolen my Ctrl+Shift+F12 shortcut key after a recent update. How can I find out what has stolen it?

I found the problem! :) Turned out that I had pressed the F-Lock key on the Microsoft keyboard. And it doesn't have any indicator lights so I didn't know. And restarting the computer had no effect on it either.


You can simple enable UFW. More about UFW you can find here

sudo ufw enable

When enable ufw without any allow rule everithing is deny.

Complete command for rule in ufw is

sudo ufw [--dry-run] [delete] [insert NUM]  allow|deny|reject|limit  [in|out on INTERFACE] [log|log-all] [proto protocol] [from ADDRESS [port PORT]][to ADDRESS [port PORT]]

Based on this rule template you can allow from xxx.xxx.xxx.xxx on port 22 with this rule

for specific host

sudo ufw allow proto tcp from xxx.xxx.xxx.xxx to any port 22

if you wont to allow any to access your web server

sudo ufw allow proto tcp from any to any port 80

if you wish to allow access from specific network

sudo ufw allow proto tcp from xxx.xxx.xxx.xxx/yy to any port 80

where

xxx.xxx.xxx.xxx - represent network ip

yy - represent network mask

If you have DNSservice on server use make rule for port 53 and proto tcp and proto udp.

sudo ufw allow proto tcp from xxx.xxx.xxx.xxx/yy to any port 53
sudo ufw allow proto udp from xxx.xxx.xxx.xxx/yy to any port 53


You have to use {print$n} to print the nth word. So in your case it would be {print$3}

The Final command becomes,

awk -v word=two '$0 ~ "[^[:alpha:]]" word "[^[:alpha:]]" {print$3}'

which will give output

three
four


How can I prevent a LDP Printer from printing a blank page at the end of the job?

Try adding this option at the bottom of /etc/printcap

:sf:\