The best way to do it is to have the process (rtl_fm) write it's own PID to a PID file, then use the contents of that file to kill the process.

However, since rtl_fm does not have a way to write it's PID to a file, we can use a workaround.

#!/bin/bash
RTL_PID=`ps -e | grep rtl_f[m] | awk '{print $1}'`
kill ${RTL_PID}

First, we set a variable RTL_PID with the processes PID.  We get this by listing all processes, looking for rtl_fm.  The [m] is a trick that keeps grep rtl_fm from showing up in the list of processes.  Finally, take the line output and get the first field from it, which is the PID.

Note that this will send a TERM signal to the process.  If that doesn't work and you need to send a KILL, add a -9, e.g. kill -9 ${RTL_PID}.


How do I move Ubuntu dock to bottom on Ubuntu 17.10 and later?

Go to System Settings and Select Dock from the Left Sidebar. In here, you'll see the option to move the Launcher (it's called Dock in Ubuntu 17.10) to bottom or to the right.


Try to install the ibus-gtk  package, by clicking that link or running with sudo apt-get install ibus-gtk and restart you computer. That fixed this issue for me.


npm giving compatibility error in Ubuntu 16.04

First, completely uninstall nodejs and npm.

sudo apt remove nodejs npm

afterwards type npm -v or nodejs -v, and if it returns something like didn't find in folder /usr/bin/nodejs

You will need to delete the old files of npm and nodejs. For example you could try

sudo apt remove --purge nodejs npm

After deleting try again npm -v or nodejs -v

If it returns is not installed, to install type 'sudo apt-get install nodejs', then you can install nodejs and npm. This worked for me on Ubuntu 16.04


Public key authentication not working with new server

Thanks to Jakuje who pointed me in the direction by providing details on how to change the LogLevel for sshd

It also helped to return to this after a sleep...

debug1: Could not open authorized keys '/home/horuskol/.ssh/authorized_keys': No such file or directory

Because I'd named the file authorized-keys.

Fixing the filename and everything is all good now.


When we enable any service using systemctl, in which runlevel would that service run?

Actually no, it does not but you can run:

systemctl show -p WantedBy service-name

to find that in which target it would be run, for example:

systemctl show -p WantedBy tlp.service
WantedBy=multi-user.target

which indicates that if I enable tlp it would be started when I get into multi-user.target.

Also worth to mention that run-levels are deprecated and systemd uses target instead:

┌─────────┬───────────────────┐
│Runlevel │ Target            │
├─────────┼───────────────────┤
│0        │ poweroff.target   │
├─────────┼───────────────────┤
│1        │ rescue.target     │
├─────────┼───────────────────┤
│2, 3, 4  │ multi-user.target │
├─────────┼───────────────────┤
│5        │ graphical.target  │
├─────────┼───────────────────┤
│6        │ reboot.target     │
└─────────┴───────────────────┘


Is it normal that when in Ubuntu I can see all of my Windows files? Are my files created in Ubuntu private?

Yes, it is normal that you can see your Windows files in Ubuntu, and no, you cannot see your Ubuntu files in Windows.  Windows does not understand the default filesystem Ubuntu uses, although Ubuntu understands the filesystem Windows uses.


14.10 gnome classic metacity unable to hook up keyboard shortcut to binary

Here the steps:

Create a script file that starts the line  #!/bin/bash followed by your command given in the question.
sudo apt-get install xbindkeys
Type:

printf '"bash $HOME/bin/left.sh"\n Control+Alt+A\n' > ~/.xbindkeysrc
printf '"bash $HOME/bin/right.sh"\n Control+Alt+F\n' >> ~/.xbindkeysrc

xbindkeys

Now, check out if it does work.

I hope it will work.


There seems to be problems with 17.04 and encrypted swapfiles... and there are some workarounds...

Edit your /etc/crypttab like so:

gksudo gedit /etc/crypttab

Change this line:

cryptswap1 UUID=xxxx-xxxx-xxxx-xxxx /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

To this:

cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Also make sure that your /etc/fstab contains this:

/swapfile               none  swap  sw  0  0
/dev/mapper/cryptswap1  none  swap  sw  0  0

References:

Ubuntu Desktop 17.04 64bit slow boot

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1668535

https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1670336


Why do I have two bluetooth services running?

I believe that blueman was installed (redundantly) when I added one of the several alternate desktop managers or environments (Kubuntu, Xubuntu, Lubuntu, etc.).

More importantly, I was able to remove all of the blueman packages, and everything still functions.  On the upgrade to 12.10, I didn't have any issues with it re-appearing.


Accessing Cronjob Log files on AWS EC2 instance

Wrap your python3 script in a bash script, and invoke that script from your crontab. Suggested script:
#!/bin/bash
logfile="/tmp/my.log"
echo "$(date) ============ begin" >>"$logfile"
who >>"$logfile"
ps  >>"$logfile"
df >>"$logfile"
# other commands to investigate the environment >>"$logfile"
# ...
# your python command goes here. The `&>>` redirects STDOUT and STDERR.
python ...  &>>"$logfile"
status=$?
echo "$(date) exit status: $status"  >>"$logfile"
exit $status

That will get you started.


The modem will create /dev/sr1. Run "eject /dev/sr1".
If modem reboot, remove ModemManager app. ModemManager sends "At+CFUN=2" command. This command crashes the modem. Without ModemManager, use wvdial to make a ppp conection.


How to change my mouse wheel scroll rate?

The fix for me for this (I had it for months) was pretty surreal and like most folks I didn't believe it until I did it:

Some MS mice have a scrollwheel bug.

  Try unplugging the USB cable / dongle then plug back in.

Also, I noticed that if you have the dongle plugged in to the computer and the mouse has an on-off mechanism then you can just turn the mouse off and back on. That resets the data link between the mouse and dongle.

:)


Ubuntu 16.04 keeps turning off the screen after 10 minutes

Your monitor is being turned off every 10 minutes because of the setting you have in:

timeout:  600    cycle:  600

The 600 seconds timeout is 10 minutes.  You can disable this timeout by changing this setting to 0.

You can do this with:

$ xset s 0 s blank

I don't know what in your system is making this a default.  But you can make this an automatic change by creating a script to change this and placing the script in your Startup Applications configuration:

Script to disable blanking:

#!/bin/bash

xset s 0 s blank

Copy the script to ~/bin/.

Now set it to automatically run by typing start applications in the Ubuntu Search button and clicking Startup Applications

Click the option to Add, then browse to the script and add it.


Ubuntu Server 20.10 Raspberry Pi 4B unable to login using Default Password

I followed these instructions https://medium.com/vacatronics/how-to-install-ubuntu-server-on-raspberry-pi-19f34e33569d , and I was able to login to Rpi using Ubuntu 20.10.  I was prompted to change ubuntu default password, and was successful in doing so using sudo ssh ubuntu@<IP Address>.  I did wait ~10minutes before trying login, so not sure if that did anything.


Ubuntu 18.04 install crashes on Windows 7 PC: cannot install GRUB

My answer is to install Xibuntu 32 bit version, first. It will repair GRUB and install Xubuntu for you. Then install Ibuntu 64 bit version. Only had to do thus two times. Best way for me.


Sounds to me like you should report a bug. To do so press Alt+F2 and enter ubuntu-bug pitivi.


Before you treat it as a bad password, try CTRL-ALT-F1 and you should get a text-based login, verify your password is not working there. (one my box to get back to the graphical login I use CTRL-ALT-F7)

Failing that, can you connect via ssh from another machine and test out that password?

ssh username@hostname

You say you are providing the right password so try those things first.

Alternatively do you know the root password or have access? You can reboot and reset the password that way (maybe that's obvious not sure your knowledge level sorry)

Comment on how that works, please, or how you fixed it since this is a month old.

NOTE:
There are several issues posted about a different problem with 15.10 not allowing/showing the text box to type in the password but it doesn't sounds like that here.

Having said that, when I worked for Apple doing tech support, we nearly invariable found that if you are typing in your password and it doesn't work, you are not typing it correctly. Granted your case honestly sounds like the exception.


Possible bug: Playing root owned *.flv files in VLC on Ubuntu 16.04/18.04

First of all, nothing seems to be wrong with your system. But you need to understand Linux file permissions. You also should understand that changing the ownership of a file to root does not prevent data loss, it will reduce the probability of data loss though. Imagine the case your HDD/SSD fails. And there is still the possibility to delete the file accidentally when someone is logged in as root. If you can not risk to lose a file, back it up.

Each file/directory has an owner and a group associated with it. We can set permissions for

owner (the owner of the file)
group (all users who belongs to this group)
other (all other users , they are not the owner of the file nor they belong to group)

For each of them we can set the permissions separately for read-access, write-access or execute-access (rwx). The execute-permission on a directory is a bit special, it allows you to enter the directory and you must have execute-permission on a directory when you want to access files in the directory.

So what do you need in your case?

You need read and execute permissions on your directory.
You need read permission for the file in the directory.

Take a deeper look at the current permissions of your file and it's parent directory with

ls -l /path/to/your/file
ls -ld /path/to/your/directory

The output of these commands will look like this:

-rw-------  1 root root 3495 Sep 23 03:35 file
drwx------  8 root root 4096 Jun  5 03:10 directory

You can see who is the owner of the file, which group is associated with the file and the full set of permissions. In this example only the owner (root) has read and write permissions for the file and read, write and execute permissions for the directory. User who belong to the group and all other users don't have any permissions in this example.

Now we give a user who is not root and doesn't belong to the group root permissions to read the file:

sudo chmod o+rx /path/to/your/directory
sudo chmod o+r /path/to/your/file

This will grant a user the permission to enter the directory and read the file, while owner and group and their permissions remain unchanged. Only root has write access to the file and it's parent directory, so only root could edit or remove the file.

You will find tons of tutorials about Linux permissions in the internet, some are better understandable then others, search the internet a bit to increase your knowledge. In this short answer I can give you only an overview  about how permissions in Linux work. You also should take a look at the manuals for the relevant commands:

man chown
man chmod


Ubuntu 16.04 experienced an internal error

Read Me First
Looking at your error messages it appears to be the classic "Login Loop" caused by nVidia drivers. Follow these instructions apply nomodeset at boot time: Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics
Read all the instructions to see if you catch something you missed or did wrong.
If you also have Intel Integrated Graphics you can open the terminal and use:
sudo prime-select intel

This will save battery life, generate less heat, give similar performance and a lot less grief.

Answering your question
I don't think sleep 1 causes any problems but to answer your question use this answer: `grep`ing all files for a string takes a long time
sudo time grep -rnw --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var} '/' -e 'sleep 1'

On my system the results are too numerous to list, so here's the abridged version:
$ sudo time grep -rnw --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var} '/' -e 'sleep 1' | wc -l
11.55user 8.05system 0:38.33elapsed 51%CPU (0avgtext+0avgdata 8364maxresident)k
21161832inputs+0outputs (0major+3286minor)pagefaults 0swaps
283

It takes about 38 seconds to run and 283 files contain sleep 1 or sleep 1.0. Most, if not all, the files were not modified by me but, released that way by the developers.

Answering your comment
As far as your comment concerning:
$ find . -type f -mtime -7 -exec ls -l {} \;

This command only lists files in the current directory and all subdirectories below matching a certain file type. It doesn't modify these files in any way.
On my system the abridged version (starting from my home directory) is:
$ time find . -type f -mtime -7 -exec ls -l {} \; | wc -l
4026

real    0m5.614s
user    0m0.092s
sys     0m0.572s

There are 4,026 files found. Keep in mind on my system the find command caches all filenames every 10 minutes, so your results might be substantially longer than 5.6 seconds.


There's a list of third party Rhythmbox plugins here. At time of writing, it doesn't look like there is a Mixcloud plugin available.

I don't believe it's possible to get the Soundcloud plugin to work with Mixcloud either - their APIs are likely completely different.


Can't install from usb after messing up UEFI

Think this article might help you out, it goes into detail on how to fix grub and remove it etc..
Easy linux tips project

Ive added the how to from the above link below so the site rules are followed.

id suggest to anyone before installing any Linux on a partition or hard drive to try it out on a virtual machine first. if your only going to use it for your internship then id just use a VM full stop that's what i do all the time, means i can also break the OS then just reinstalling it without any hassle aswell.

  Boot problems with Windows 8 or 8.1, can often be solved in the following manner.

  If you don't have an install DVD of Windows 8.x, then download a free evaluation copy of Windows 8.1 at Microsoft itself.

  If you don't have a Windows Live account, you need to create one for this. It's free, and >it's not necessary to fill out your real name.

  Burn the iso on a DVD in the right way. That can be done in the same way as with an iso of Ubuntu.
  Boot your computer from the Windows 8 DVD and select:
  Repair your computer (down left, do NOT select "Install now") - Troubleshoot - Advanced >options - Command Prompt
  Now type the following command line (note the required space between "bootrec" and "/fixmbr"):

  bootrec /fixmbr

  Press Enter.

  Then:

  bootrec /fixboot

  Press Enter.

  Then:

  bootrec /scanos

  Press Enter.

  Then:

  bootrec /rebuildbcd

  Press Enter. Confirm the action by typing y and press Enter again.

  Remove the DVD and turn your computer off (press the hardware power button for five seconds).
  Turn your computer on again and press the key for one-time boot changes. For Acer computers this key is usually F12, but this differs for each brand.
  Select "Windows Boot Manager". After a short while you should be presented again with the (in)famous tiles of Windows 8.
  If you have a dual boot computer, with Linux alongside Windows, then you might need to restore Grub, in order to make your Linux bootable again.


Slow boot in Kubutnu 20.04, initramfs problems

To remove the 2x30 second boot process for apt
open a terminal and type
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer

sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service

Assumung systemctl works in Kubuntu which I am unable to test ATM.


Trust SSH server based on key instead of if key+IP match

Add a nickname for your server in ~/.ssh/config, and turn off CheckHostIP for this server.

Host nickname
HostName example.dyndns.org
CheckHostIP no

Before you connect to the server for the first time, you can copy the public key out-of-band: grab /etc/ssh/ssh_host_rsa_key.pub from the server, remove the root@hostname part at the end of the line, add example.dyndns.org at the beginning, and append the line to ~/.ssh/known_hosts. Optionally run ssh-keygen -H to hash the host name (this is only useful if you're concerned about the privacy of that entry if someone steals your hard disk or your backups, which for 99.99% of people is useless because the information is present in some other nearby location anyway).


Partition Configuration to avoid reinstalling applications after update

A common solution for this is to install specific software under /opt or /usr/local and add a separate partition for that directory.


what does this command do?find command with options

find /var instructs find to start the search at the directory /var.

-name "[0-9]*test[A-Z]" is the search pattern to instruct find to return only files/folders that match the pattern "[0-9]*test[A-Z]". If you do not quote the search string, your shell would expand that search pattern and would try to execute the result. By quoting the search pattern you pass it as an argument to find /var -name.

The -exec... part of the original question has an syntax error and it should be -exec  {} /root/{} ';' (note the space before ';' as commented by dessert and daisy).
It instructs find to execute the following arguments, where {} is replaced by the search result of find. You normally should quote those as well to prevent shell expansion.

Lastly, the ';' defines how the -exec section should handle the search results when executing the command. ';' instructs find to run the command of -exec for each single find result. When using '+' instead the -exec command is run with all find results expanded. This also has to be quoted or escaped to prevent the shell of expanding it and making an argument to find...-exec.

A little example that illustrates the difference between ";" and "+" is as follows.

[user@localhost test]$ find . -name "[0-9]*test[A-Z]" -exec echo "{}" ";"
./12ltestA
./1ltestA
[user@localhost test]$ find . -name "[0-9]*test[A-Z]" -exec echo "{}" "+"
./12ltestA ./1ltestA


How can I update my gnome to gnome 3.18?

Not for 15.04. You need Wily, available since of today, and at least one PPA

sudo apt-add-repository ppa:gnome3-team/gnome3

To get more bleeding edge versions of the components, additionally

sudo apt-add-repository ppa:gnome3-team/gnome3-staging

Update the package database and upgrade

sudo apt-get update
sudo apt-get dist-upgrade

And if you have problems, start the commands below to go back to the version of the official Ubuntu repositories

sudo ppa-purge ppa:gnome3-team/gnome3
sudo ppa-purge ppa:gnome3-team/gnome3-staging


GRUB Failing to Boot to graphical interface

you can try boot repair, it resolves the out of range error. First try recommended repair, if still you get error then boot to live usb, then get the boot repair and then advanced options. Here you can select the out of range error check box.


Here's the standard /etc/apt/sources.list file :
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

Copy-paste it after making a backup of your current source.list file then run sudo apt update.And also when you want to add a PPA note that the codename of the ubuntu 20.04 is FOCAL not eoan which is 19.10.


It is actually safe.
 you can also zero them out
 > /var/log/nginx/error.log for example.
You can also but these in a script and call it with cron

Crontab:
1 5 */2 * 0 /home/user/scripts/delnginxlogs.sh

Actual script:

cd /var/log/nginx
rm *.gz
> domain-ssl-access.log
> domain.org-ssl-error.log
> domain.com-ssl-access.log
> domain.com.-ssl-error.log

etc,etc


Yes, you can define any drive to be any mount point you like.

There are many ways to do make drive mapping permanent; most are pretty confusing.  However the instructions here are not to bad:
http://refugeeks.com/how-to-automatically-mount-a-network-share-in-ubuntu/


How can I permanently erase data on INTERNAL HDD?

Boot with a live CD. Then issue the command lsblk to list the block devices. Find the device name of the harddrive. Issue the command

sudo shred -n 1 /dev/sdX

where /dev/sdX refers to the device you found.

If you're paranoid, you can overwrite more than once. Increase the 1 above to your desired number. If it's a SSD, a secure erase is quicker and better for the drive: https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

Secure erase can be used on a normal hard drive as well, but it is more complex than simply running shred. It may be better, as it may overwrite unaccessible areas, or in case of encrypted drives, simply erase the encryption key.


Forget about that, there's nothing like that for the LXDE menu, use Synapse.

Install it from the terminal: sudo apt-get install synapse

Synapse review with screenshots
http://www.omgubuntu.co.uk/2010/11/synapse-gnome-do-launcher-app-review-ubuntu

The correct, fancy name for it is semantic launcher BTW :)

Other related stuff:
Zeitgeist - indexing tool used by Synapse
Gnome Do - another launcher similar to Synapse, older


Second monitor won't work at correct resolution onToshiba Satellite P50-C with (GeForce GTX 950m) on Ubuntu 19.10 (works fine in Windows 10)

I'm in exactly the same situation as you.  Geoforce GTX 1080 and Acer CB270HU monitor.  Everything works perfectly in Windows 10 but in Ubuntu 19.10 only my two Samsung Monitors work, the Acer one flickers very noticeably.

Edit: I tried Linux Mint 19.3. With Cinnamon it doesn’t work, but with the MATE desktop it does! No more flicker!


You can do this with Openshot video editor on standard Ubuntu. If you use KDE, the best option would be KDEnlive.

The technique is to stop the video, make a still of the last frame and use this for the text with the title generator. Afterwards, you splice this into your clip with the desired length. This can be done in all but the simplest video editors.

Here is a YouTube tutorial video which shows how to do the freeze frame with KDEnlive.


PHP 7 is not available for Ubuntu Trusty in the standard Ubuntu repositories (2016-01-02).

You could use the PPA ppa:ondrej/php

sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0


How to fix error while loading shared libraries: libwx_gtk2u_html-2.8.so.0 while installing BOINC?

BOINC is available in the Ubuntu software repositories; unless you have a very specific, unusual need, you can just use this version. (Downloading and installing the version from the BOINC website can lead to dependency issues like the one you've encountered).

Simply run

sudo apt install boinc

and you will have a basic installation of the client and the manager.

Other boinc packages (for SETI@Home, Boinc Screensaver, etc) are available; you can see the list  http://packages.ubuntu.com/search?keywords=boinc&searchon=names&suite=xenial&section=all


Any GUI apps / Easy method for creating Wifi Hotspot in Lubuntu

Delete every last connection you made and install these packages:

Network-manager-pptp-gnome
Dnsmasq-base

and reboot once.

Then try to create another connection manually:

Edit Connections >> Add a new connection >> select Wi-Fi
Select Hotspot in mode
Select device to be a access point
Set password in Wi-Fi security
Click Save


After Installing Ubuntu on laptop and restarting, Ubuntu still not installed

I found out what I did wrong. So everything I had done in my original answer was correct, but once I was prompted with something like "Please take out the installation media and press enter", and once I did both of those things, I went directly to the BIOS and enabled secure boot. I then changed the boot order so that my hard drive was at the top of the list. If the secure boot option isn't able to be highlighted, then one would have to go to the tab in BIOS where it lets you set passwords for the secure boot. Once a password is made, press f10 to save everything and Ubuntu was working. I was using an Acer laptop for the installation process and the information I got for this workaround comes from How to install Ubuntu on an Acer with preinstalled Windows 10 Home.


Ubuntu 18.04 don't recognize Droidcam as a sound input device

Update: Works perfectly also in linux client. Checked on Ubuntu 20.04
Seems not impemented in linux client yet:
https://github.com/aramg/droidcam/issues/1


How to disable Qt accessibility in 12.04?

The package maintainer at KDE level provided a hint.

  If everything fails, check which package installs
  /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so
  and try to remove it. If you cannot, because of dependencies, you can
  manually move the file away as root, and restart the desktop. This
  should remove support for Qt accessibility.

On Ubuntu 12.04 that boils down to sudo dpkg --purge qt-at-spi which effectively disables Qt accessibility.

This is a bit brute force (for example, it does not allow to enable accessibility for some users only), but it does answer the question with an effective solution, right ?


This is like asking "Why it doesnt work" without giving any further information.

I guess that this might be caused by log files left out without clearing for long. If the SSD is your primary disk check the size of the /var/log folder.

Also run sudo apt-get autoclean it will clear out any unnecessary packages


Win 7 Virtual Box VM fails to start after upgrade to 12.04

The probably-related VirtualBox bug ticket says it is fixed in VirtualBox source, and also details a workaround via grub.

https://www.virtualbox.org/ticket/10528

Hopefully the patch will be applied to Ubuntu-12.04 .


Accidentally began localepurge installation, didn't select locales to keep, not sure what to do

If all you did was run localepurge then you have nothing to worry about. All it does is remove language support files for unneeded languages; those can easily be reinstalled from the System Settings / Language Support if you change your mind.

Beware that localepurge "will be automagically  invoked by  dpkg  upon  completion  of  any apt installation run" (from man localepurge); I would suggest that you remove it with sudo apt-get purge localepurge after the first run. The manual page of localepurge has more information, including a warning that "it is a hack" and it "is  not  integrated  with Debian's  package  management system".


Cygwin compiler is used to compile POSIX programs (like those used on Linux) to MS-Windows. It hardly ever useful on a Linux desktop, unless you want to "cross-compile" programs for MS-Windows from your Ubuntu desktop.

I suspect that you what you want to do is to download software that comes in .tar.gz archives (also known as "tarballs") and use these on your Ubuntu desktop. To do that you need a compiler, but not Cygwin - you need GCC. Use Ubuntu's Software Center to install "gcc", then open your tarball (the archive that ends with .tar.gz) to an empty directory, open a terminal and cd to that directory then run ./configure and if that completes without errors, run make and make install. That will get the software installed for your local user. You might also want to read the Compiling Easy How To document to learn how to best approach this process.

Its important to note that most software you'd want to use is already included in Ubuntu's Software Center, so I suggest you always start your software search there - software distributed by Ubuntu is much more likely to be safer and better then what you download from the internet. Even if you can't find exactly what you are looking for likely you can find useful alternatives.


How to disable Spotify indicator in the top panel?

For Spotify version 0.8.8 and earlier

The best way to do this is to remove the icon used by spotify to display the indicator. This can be done by executing the following command in the terminal,

sudo mv /usr/share/spotify/theme/other/_linux/icon.ico /home/user_name/icon.ico

Replace user_name with your user name. This should effectively disable the spotify indicator. Exit spotify and restart spotify to notice the change.

For versions higher than 0.8.8

open up a terminal and open the zip file as root:

gksu file-roller /opt/spotify/spotify-client/Data/resources.zip

Then, inside the zip file, navigate to the _linux subfolder and delete the .ico files inside it. That's it.


Ubuntu Core on Pi3 : Name resolution with network-manager

I still shut off Network Manager and just use /etc/network/interfaces files.  You can set your DNS there and resolv.conf should pick them up.

 dns-nameservers 192.168.1.1 8.8.8.8 208.67.220.220

Simply restarting networking doesn't always work right, so either a reboot or a

ifdown eth0 && ifup eth0

...usually does the trick.


How to run 'ufw' without interactive mode?

Use

ufw --force enable

You may want to have a look at the Gufw source code, it's written in Python.
At least in Ubuntu 14.10 the  calls to ufw are in the file gufw/model/ufw_backend.py.

You can download the source code using

apt-get source gufw


How should I setup MAAS so that it can be used by the Canonical OpenStack Autopilot?

These are the networking requirements for a successful OpenStack Autopilot run.

Internet access

MAAS and its nodes will need to be able to reach the internet, or at least these sites (http and https):

maas.ubuntu.com
cloud-images.ubuntu.com
streams.canonical.com
an Ubuntu archive (archive.ubuntu.com or a mirror)
api.jujucharms.com
manage.jujucharms.com
jujucharms.com
store.juju.ubuntu.com
keyserver.ubuntu.com
ppa.launchpad.net
usn.ubuntu.com

If opening holes in a firewall, be mindful that these addresses may resolve to multiple IPs.

Network layout

There are two basic network layouts that we support. Let's call them "flat network" and "split network". In both these models, at least one node needs to have two network interfaces connected to networks that MAAS knows about. We will call them private and public networks.

Keep in mind that OpenStack floating IPs will always come from the public network.

In the following diagrams, the "cloud" that is above the router does not necessarily mean the Internet directly, just that eventually devices on this network can reach the Internet.

Flat network

The flat network model is the most basic one. Here we trick the system and simply say the public and private networks are the same and connect both NICs to it:

OpenStack floating IPs will come from the same network as MAAS node IPs in this scenario.

Split network

In the split network topology, we have two actual distinct networks:

MAAS only manages the private network, for which it will setup DNS and DHCP, but it has to know about the public one. An easy way to handle that automatically is to just hook up a second NIC to the MAAS machine and connect it to the public network as shown. MAAS will then automatically know about it.

Installing MAAS

This is how the MAAS server should be installed:

Install Ubuntu server 14.04 LTS on the machine you want to use for MAAS
sudo add-apt-repository ppa:maas-maintainers/stable
sudo apt-get update
sudo apt-get install maas
Access the MAAS UI at http://maas.ip/MAAS/ and follow the instructions to create the administrator, then login with those credentials
Import disk images for 14.04 LTS (Trusty) 64 bits. This will take a few minutes, depending on your bandwidth.
Add your SSH key to your user profile - http://maas.ip/MAAS/account/prefs/
Go to the Networks tab in MAAS and verify that you have auto-created networks for each NIC of your MAAS server. You may have networks created for virtual interfaces like lxcbr0 or virbr0: we don't care about those, only about real physical interfaces.
Fill in the missing details, like gateway and DNS, in the networks that were auto-created for each NIC

Configuring the MAAS cluster

Click on the "Clusters" tab and then click on your cluster
Choose a DNS zone name
You should see a list of NICs on the machine. Click the edit symbol for the NIC that's connected to the private network, that is, the network where all the nodes are
Set this NIC to manage DHCP and DNS.
If needed, configure the IP, subnet mask, broadcast IP.
Set the "Router IP" to the default gateway for this private network
Carve up your network space into ranges like this:

for the split network case: dynamic range and static range
for the flat network case: dynamic range, static range and floating IP range

Where:

dynamic range: used by all the NICs in the nodes while they enlist and commission.
static range: used by nodes when they are allocated to a user
floating IP range: used by OpenStack floating IPs. This is not a MAAS configuration, but you should leave room for them

Save the changes.

Enlist and commission machines

Ensure all other machines are set to PXE boot, if possible disable all other boot options (including local disk) in the BIOS
Enlist the machines by powering them on. This can usually be done by some sort of virtual console. Eventually they will all appear in the node list in MAAS and be powered down again.
Edit each machine in the nodes list and fill in the Power type and power parameters so that MAAS can turn them on and off as needed
Select all of the machines and, using the Bulk action dropdown, Commission them
Wait until all machines are commissioned (i.e. in Ready state)

MAAS networks

Go to the Networks tab and verify that you have the nodes listed in what is your private network and with their respective NICs selected
If using the flat network topology, the node that has two NICs should have been automatically detected as having both NICs connected to the network. Just verify that this is the case.
If using the split network topology, edit the public network and look for the node that has two NICs. Select the NIC that is connected to the public network.

Testing things

To make sure juju can drive MAAS and provision machines, let's take it for a spin. It's best to try it out now and fix any issues before more complex services like the Autopilot make use of it.

On the machine being used to drive the installation, run these commands:

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju-core juju-deployer
Follow Juju docs for configuring MAAS

The remainder of this document will assume that the MAAS Juju environment you just configured is the default one.

For a simple test, we will deploy Ubuntu to all nodes. On the machine that is driving the installation, run these commands:

juju bootstrap this will use one of the MAAS nodes to bootstrap juju. It will take a few minutes to complete
juju deploy ubuntu -n N deploy ubuntu to all remaining nodes. Replace N with the number of nodes minus one, which was used for the bootstrap above. This command returns after a few seconds, but it just starts the process.
watch the nodes list in the MAAS UI. You should see nodes being allocated and deployed
watch the output of juju status periodically until everything is started
login into a random node via ssh and try to reach the internet from it. For example, try juju ssh ubuntu/0 and wget http://www.ubuntu.com from there
if everything worked correctly, destroy the environment juju destroy-environment $(juju env)

MAAS is setup and ready to be used by the OpenStack Autopilot.


Merging two partitions (Gparted) - Error: Cannot delete partition

You cannot do this from a running system.
Boot from the Ubuntu installation media.
Open GParted and merge the partitions.


Regarding the error you mentioned, use as xmodmap -e "keycode 77 = w W braceleft"

get the keysym from xev command.

KeyPress event, serial 37, synthetic NO, window 0x2200001,
    root 0x195, subw 0x0, time 470232, (535,249), root:(623,392),
    state 0x2001, keycode 34 (keysym 0x7b, braceleft), same_screen YES,
    XKeysymToKeycode returns keycode: 16
    XLookupString gives 1 bytes: (7b) "{"
    XmbLookupString gives 1 bytes: (7b) "{"
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2200001,
    root 0x195, subw 0x0, time 470424, (535,249), root:(623,392),
    state 0x2001, keycode 34 (keysym 0x7b, braceleft), same_screen YES,
    XKeysymToKeycode returns keycode: 16
    XLookupString gives 1 bytes: (7b) "{"
    XFilterEvent returns: False

If I understood correctly, your keycode 77 is Num_Lock

so, you want to make your Num_Lock key as w W and braceleft

to achieve this..

xmodmap -e "remove Mod2 = Num_Lock" this will remove the Modifier Num_Lock from the Num_Lock Key..

Note: Assign Num_Lock keysym to anyother keycode other wise you will loose Num_Lock. (this is not covered at this stage)

xmodmap -e "keycode 77 = NoSymbol NoSymbol w W braceleft"

you dont need to worry about removing the Modifier as above two changes will not persist after a logout or reboot.

Example for Swapping of Num_Lock and braceleft keysymbols

$ xmodmap -e "remove Mod2 = Num_Lock"
$ xmodmap -e "keycode 34 = bracketleft Num_Lock"
$ xmodmap -e "add Mod2 = Num_Lock"
$ xmodmap -e "keycode 77 = braceleft"
$


systemctl set-property assignment parameters

I discovered how to productively navigate the man pages, and found what I was looking for.
FailureAction
DisableControllers


Why do some some files in /etc have a numeric prefix?

Yes it is for ordering and usually anything not starting with a number is ignored.

The files then get read and executed in order.

So for example in /etc/grub.d/

$ ls /etc/grub.d/
00_header    10_linux      20_memtest86+  30_uefi-firmware  41_custom
05_debian_theme  20_linux_xen  30_os-prober   40_custom     README

The grub script to create the boot entries (like update-grub, that by default writes them in /boot/grub/grub.cfg) will first read the 00_header and create the header, then look for Linux systems, then the memtest, then UEFI, and so on.

When you look at the output

cat /boot/grub/grub.cfg

you will see that the entries are exactly in that order.

$ cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
[...]
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
[...]
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
[...]
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
[...]
### END /etc/grub.d/20_memtest86+ ###

[...]


How to open piped path with text editor?

To convert input to arguments, use xargs:

some command | xargs gedit

Since you "don't like" the correct method, be careful of spaces in filenames and the like.

Just so you know, the most suitable way is:

gedit "$(command -v some_script)"


I've just tried on Ubuntu 16.10 and it works.
Try running the commands line by line and not do a copy and paste of the full thing. make sure that there are no funny characters added at the beginning and end (like $ and ~) so that the phrase is exactly the same as you see it. Sometimes when copying and pasting from the web extra characters get added. To paste on the command line use Ctrl+Shift+v.
Do you get any message in return?
After running the first line, run cat /etc/apt/sources.list | grep heroku to see if the new heroku repository is there. If it is not, then the first line did not work. You should see something like this:

deb https://cli-assets.heroku.com/branches/stable/apt ./
# deb-src https://cli-assets.heroku.com/branches/stable/apt ./

The second line should add the key to authenticate, so you should not be getting the error saying that the data cannot be authenticated. To verify that it is added after you run it, type sudo apt-key list | grep heroku. You should get something like this:

uid           [ unknown] Heroku Release Engineering <release@heroku.com>

Then do the update and install and you are good to go :)


If anybody was able to find it successfully, it would be either because of Dual boot in other Partition, Torrents Downloads or Untrusted Third party sharing or Downloading. I never found it in my system.
Ubuntu is not immune to any trojan named under win32.

And you don't have to worry about that. DigiNotar is Not Trusted by Default. To see, select the Edit trust option under it. So it is as good as non-existent. Just make sure that the option Ask me Every time option is selected.

To confirm, the Security team did address this issue here under version nss (3.12.11-3) unstable; urgency=high stating it as Explicitly Distrust not Deleted, whereas current version stands at nss (3.13.1.with.ckbi.1.88-1ubuntu6.1) precise-security. So you don't have to worry at all.

Actually there are two Certificates menus in Certificate Manager as Server and Authorities. DigiNotar is present in my Server section, the first listed one is Expired, need to delete it manually.

Only the Affected Certificate authority or Security testing team can confirm.


It is important to understand the following:

Your .exe program is not a FORTRAN program, it's a Windows executable, and nor Bash nor a FORTRAN compiler will understand it.

When I say that it's not a FORTRAN program I really mean it.

It might have been a FORTRAN listing on some engineer's computer, but once compiled, it is indistinguishable(*) from a Windows executable built in BASIC, Pascal or C++.

http://en.wikipedia.org/wiki/Compiler

So the way to go here is to load it in a Windows emulator - Wine, for example:

$ wine yourprogram.exe

Of course you can also run it in a Windows virtual machine using VirtualBox or the virtualization environment of your choice.

If you can get the FORTRAN sources (and it's not overly complex or dependent on specific libraries) you might want to try to compile it under Linux.

(*) This is not entirely correct, but that's the gist of it unless you want to delve into the topics of reverse engineering and decompilation :)


SSH connection problem with "Host key verification failed..." error

"Host key verification failed" means that the host key of the remote host was changed.

SSH stores the host keys of the remote hosts in ~/.ssh/known_hosts. You can either edit that text file manually and remove the old key (you can see the line number in the error message), or use

ssh-keygen -R hostname

From man page:

  -R hostname Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts .

(which I learned from the answer to
Is it possible to remove a particular host key from SSH's known_hosts file?).


Executing PHP gives error on command line interface, but works in browser

By starting with ../, which is relative to the current working directory of the process, the require will only work if you are in the right directory. If you have control of the script, change it to use the full, absolute path starting at /,


I would do something like

sudo rsync -avx --exclude=".gvfs" / /path/to/backup/folder/

(The -x option makes it ignore other filesystems, which makes it work even on a running system, which is great for backups!) You will want to do this step for each partition you decide to back up.

Once you have the partitions the way you want and windows installed, I would boot a Ubuntu LiveCD/USB. Then mount the new partition and backup partition and run something like

sudo rsync -avx --exclude=".gvfs" /path/to/backup/folder/ /path/to/new/mounted/partition/

You will want to do this step for each partition you want to restore.

Run sudo blkid to get the uuid of each of the new partitions. Then run

gksudo gedit /path/to/new/mounted/partition/etc/fstab

and change the UUIDs and then save the file.

Then I would follow the instructions on Grub2 Reinstalling from LiveCD in the "Method 3-Chroot" section to install Grub and let it detect the new disk layout.


How do I resize the application launcher / start menu in Kubuntu 20.10?

What you are calling a "start menu" is more often referred to as an application launcher.
Specifically, you are currently using the default application launcher for KDE which is the Kickoff application launcher.
I'm not sure that you can easily make changes to the size of the Kickoff application launcher, but you can just use a different launcher that better suits your needs.
Here's a list of alternative "start menu" style application launchers for KDE Plasma.

To change the launcher:

Right click on your current launcher and select Show Alternatives...

Next, choose the launcher that you want to use.

I would suggest using the Kicker launcher (also called "Application Menu").  Kicker has a much smaller footprint than Kickoff (which is non-descriptively called "Application Launcher")


Connecting PC to the internet over ethernet

For my VPN, I try to keep non essential traffic off of the VPN as it's slow.  The basic premise is to remove the default route to the VPN, and add in specific routes that you use for the VPN.  Mine has 'default' instead of 0.0.0.0 but I'll assume it's the same.  My delete looks like this:
route delete -net default gw 0.0.0.0 dev vpn0

So yours might be something like:
route delete -net 0.0.0.0 gw 128.0.0.0 dev proton0

This should route all traffic back through the ethernet, but it may break the VPN.  You have other proton0 entries so it may work fine.  From there I add specific networks that I need.  For instance 172.16.0.0 is a common one, as is 10.0.0.0:
route add -net 172.16.0.0 netmask 255.240.0.0 dev vpn0
route add -net 10.0.0.0 netmask 255.0.0.0 dev vpn0

You would need to use the routes that you need for the VPN, and set the device to proton0.  If things break completely, you can turn off and on the network and vpn and it should reset the settings.
If you manage to get this working, you can make this permanent by adding the file /etc/network/if-up.d/proton0 and inside you do something like this:
#!/bin/sh

if [ "$IFACE" = "proton0" ]; then
   route delete -net 0.0.0.0 gw 128.0.0.0 dev proton0
   route add -net 10.0.0.0 netmask 255.0.0.0 dev proton0
   route add -net 172.16.0.0 netmask 255.240.0.0 dev proton0
fi

Only replace the route commands with what you used to get it working.  You may have to do more than this to get the 2nd computer routing properly as this is setup is for keeping the internet traffic off the VPN.  I'm not 100% sure it will fix the second computer.


Unable to install Ubuntu 20.04 with pre-existing software RAID with 2 disks

Installing Ubunto Desktop 20.04.1
After some digging I got a bit more insight I want to share:
Removing the software raid by removing the harddisks allows to install Ubunto via the installer without a glitch. The ubunto installer does not work with software raids, while the installed ubunto system does. Then reconnect the harddisks of the software raid, and boot a live system (like parted magic). Copy the files to places on the raid and update all configuration files that connect to partitions.
Method in detail:

Remove the harddisks that make up the raid.
Do not add a harddisk - but NVMe SSD, otherwise the BIOS will attempt
to reorganise the missing the software raid.
I added an NVMe SSD installed Ubunto there.
Just add anything you can install ubunto on. Make sure the
root partition is not btrfs (I used ext4), as this will facilitate to copy
the root partition to a software-raid partition.
Using btrfs will add subvolumes that are cumbersome to copy (especially
when using this filesystem for the root partition).
Install Ubunto 20.04.1 from an USB stick.
Make sure to use a /home partition during the install, located on the NVMe SSD
Do not use BTRFS for the root partition.
After the installation is complete start ubunto and install mdadm
apt-get install mdadm
After that, shut down the ubunto system and
reconnect the harddrives that made up the software raid.
Start Ubunto and edit /etc/fstab
reconnect /home to the software raid partition
Option: move ubunto partitions to the software raid
The best option is that you boot using a live system that is not
the installed ubunto version.
7.1 copy the content of all ubunto partitions to partitions (ideally of
equal size) on the software raid
7.2 edit /etc/fstab and connect all partitions to the ones on the software raid
7.3 Use efibootmgr to update (or create) the BIOS entry to start the
ubunto system from the raid (use UUIDs which you query with the command blkid)

Eventually it worked. I can run multiple linux distributions including ubunto on the software raid.
It is kind of sad that ubunto does not support software raids, which do improve system stability and especially the ability to recover from HDD or SDD failures. The solution with the software raids allowed me to run several systems for more than 7 years with minimal changes.
Now some speculation as to what went wrong:
I gave up looking for the source code of the installer and the grub version that comes with it. I could reproduce the error given by the installer: cannot stat /cow which is most likely a simple parsing error in grube-probe, which is called from grub-install.
Grub2 used by OpenSuse Leap 15.2 does not have this kind of problem.
References:
This is a description of how to go about installing Ubunto Server.
Install Ubuntu 20.04 Focal Fossa with RAID 1 on two devices
Comment: I have not tried the solution above but based on my experience it will work most likely. I did not try that as it involved the destruction of the existing raid, which I did not want (unless absolutely necessary - and it turned out that it was not necessary at all)


Check if g++ is installed with dpkg --list | grep g++. In my case:

ii  g++                                       4:4.6.3-1ubuntu5                                    GNU C++ compiler
ii  g++-4.6                                   4.6.3-1ubuntu5                                      GNU C++ compiler

ii stands for installed. Then check with which g++, it should output something like this:

/usr/bin/g++

If the which command outputs nothing it is not installed or the patch where the binary is stored is not in your $PATH variable.

To install g++ compiler:

sudo apt-get install build-essential

Finally the last check whould be g++ --version, in my case:

g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If that all works everything is fine with your compiler. After g++ is installed and available retry your ./configure and make commands. Let me know if it works.

EDIT Compilation errors:

So I got it. I organized the package you try to compile form another forum and compiled it myself. The problem is, gcc has cleaned up header dependencies, so with a gcc version >=4.3 some code isn't compiling anymore. See http://gcc.gnu.org/gcc-4.3/porting_to.html for what to include to avoid compile errors. In your folder where you executed the ./configure and make command, open the file src/parser.h file and add this lines to the include statements at line 15 under #include <iostream>:

#include <iostream>
#include <sys/types.h>
#include <stdio.h>
#include <cstdlib>
#include <algorithm>

Then the run the make command again. It should not fail. In my test is was a success.


Can I boot Ubuntu from a DVD and which version should I use?

A DVD is a DVD is a DVD; all have the same formatting, whether created on/for a Mac, Windows PC, or Linux PC. What's on that DVD may be an Ubuntu installer that's fresh, or stale, but it's equally readable on all major operating systems.

The currently supported versions of Ubuntu and its flavours are 16.04 LTS, 18.04 LTS, and 19.10.

Your Toshiba has an old AMD Sempron SI-42 (2.1 GHz) CPU and SATA-I (not SATA-III) drives, so with the standard 2 GB of DDR2 RAM, ATI Radeon 3100 GPU, and 802.11 b/g WiFi, you might find the standard Ubuntu 18.04 with its demanding GNOME3 Desktop Environment kinda poky.

Instead, https://ubuntu.com/download/flavours shows versions with different Desktop Environments which are less demanding (except for special distributions like Studio and Kylin). I'd suggest you consider one of those instead.

Once downloaded, that ISO file you use to create a LiveDVD should be checked for download errors by https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#0 .

Once verified, you can create a LiveDVD for testing and installation using Ubuntu, Windows, or MacOS X.


Who is ubuntu-etherpad and why did they take ownership of my bzr branch?

This isn't a PPA; it's a bzr branch.

You are indirectly a member of the ubuntu-etherpad team. See your team membership information.

This presumably means that you can write to this team's bzr branches, which you appear to have done unintentionally. Can you delete from https://code.launchpad.net/~ubuntu-etherpad/+junk/cup-pdf-zel too, using the web interface?

Can you try being explicit when you push? Use, for example:

bzr push lp:~lantzr/+junk/cup-pdf

Does this work as you expect?

Edited to add: so I don't think ubuntu-etherpad has taken ownership of anything; you have been pushing and accessing its bzr branches all along, instead of your own as you intended.


You've got the installation for Windows. You need to use the installation for Linux.

You can get the installer for Linux from the Comsol website:
https://www.comsol.com/product-download

and select the appropriate options (version of Comsol and type of operation system Linux/Windows/MacOS)
If you are performing the download on a windows computer then standard settings will make you automatically download the iso for windows)

Using this link you will go to the specific site to download the Linux version but you may still wish to change the Comsol version depending on your license:
https://www.comsol.com/product-download/5.3/linux


Cannot install snap because it won't accept my Ubuntu One password

Its an internal issue they have, your account is fine. Will be soon fixed in the next update, make sure to install it.


With no IP address in ifconfig and no route details, it doesn't appear that you have connected to the router. However, syslog shows that you connect with no obvious and therefore fixable issues, but immediately disconnects.

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit. Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.


Whats the package name for WebKitGtk dependency gobject-introspection-1.0?

I got a solution from here

sudo apt install libgirepository1.0-dev


how do I uninstall chrome OS with only my chromebook

There is a tutorial for this here: https://ubuntu.com/tutorials/install-ubuntu-on-chromebook#6-conclusion. Please note the following warning on the first page:

crouton is not part of the Ubuntu project
While we love the value that crouton provides, please note that crouton is a third-party script. It is not provided by nor supported by Canonical nor by the Ubuntu project. Updates to Chrome OS may also make Ubuntu installations inaccessible, as has happened in the past. Use of crouton is at your own risk.

If this is a school or work computer, you should get approval from your administrator to do this, and if this is a personal computer, make sure you are aware of and accept the risks of using third-party software.


You should use the service command instead of calling /etc/init.d:

sudo service gdm stop

And then to start it again:

sudo service gdm start


Why does the login screen in 14.04 only change when I set a picture background, but not when I use a solid color?

The easiest way that I know of to change the background on the lightdm login screen is to use Ubuntu-Tweak. If you don't have it, install it from the software-center, or the terminal, by typing

sudo apt-get install ubuntu-tweak

Open Ubuntu-Tweak and go to Tweaks>Login Settings. Click 'unlock' at the top of the window and enter your password, then click the icon for changing the login screen background. Select the picture you want and click 'open'. Of course, this selects an image from /usr/share/backgrounds.

Go to the internet and find a black image and save it to /usr/share/backgrounds. Select that image from Ubuntu-Tweak.
Saving to /usr/share/backgrounds will require you to save the image somewhere else first, and then copy it to there. Open the Terminal or press Alt+F2, and type

gksudo nautilus

and enter your password. This will open nautilus as root and allow you to navigate and copy to /usr/share/backgrounds.

Hope this is helpful.


Restart doesn't work on Ubuntu 12.04 but shutdown

Had a similar issue while 12.04 was in beta. Its gone now though. My recommendation is to make sure you install the latest kernel update (i.e. make sure your system is 100% up-to-date) and try reinstalling your video drivers (if they are proprietary or otherwise self-installed). I've had issues with booting when I don't reinstall my ATI drivers after a kernel update, though I'm pretty sure they wouldn't cause an issue with shutting down.

If that doesn't work, you may want to look to see if there's anything in the system logs, though I'm not entirely sure which ones would be applicable.


Updating R 3.5.3 to R 4.0.2 on Ubuntu 18.04

You have to remove problematic PPA (it does no publish packages for 18.04 LTS - bionic) first with:
sudo add-apt-repository -r ppa:grass/grass-stable

and then update your package lists
sudo apt-get update

and install new updates with their dependencies by
sudo apt-get dist-upgrade

You have added R 3.5 repository (see bionic-cran35 in its URL), instead of needed R 4.0 (bionic-cran40). You have to remove wrong repository with
sudo add-apt-repository -r 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

and then add correct one:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
sudo apt-get dist-upgrade
sudo apt-get install r-base r-base-core r-recommended


Why has the "Ubuntu app" full access to my Google account?

"Why does Ubuntu have full access to your Google account?" Well, the answer is quite obvious here. You did not remove the specific access from within your Google account before installing the system.

Additionally, the entry gets created when you sign in to Google from within the Chromium browser; as Chromium is part of Ubuntu when installed from the repos, it shows as Ubuntu in the Google account.

On other Linux distributions the entry gets named in a different way, for example, when you sign in to Google with the Chromium browser on Fedora, the entry getting created is called 'Chromium Fedora'.

The reason why it shows a 'http' entry might be, that the web address that is relevant for the account setup is (still) not 'https' by default. Anyway, nothing to worry about - there is no malicious code at all.

When you want to revoke the access, just open "My Account" in a web browser, go to tab "Sign-in & security", go to "Apps with account access" and then click on "Remove Access" in the Ubuntu entry.

Of course the entry gets re-created once you sign in again with Chromium and grant the application access to your Google account. Please note that it happens by design and so is expected behavior.


How to create snap YAML file of program written in golang sciter library?

Nothing too special with Sciter other than the requirement that libsciter-gtk.so to be installed (copied) in the same folder as resulting go executable.

So you will have basic Go rules: https://docs.snapcraft.io/go-applications/7818
and libsciter-gtk.so (x64) listed in fileset : https://docs.snapcraft.io/snapcraft-filesets/8973


Please help me, install Ubuntu alongside Windows 8

try copying ubuntu bootmgr file to drive where windows is installed!!


Ubuntu Software Center "software requires mouse, but none setup" win installing a purchased app

This is something to get understanding why this warning appear:

https://bugs.launchpad.net/developer-portal/+bug/1029301


I haven't tried Das Keyboard 4 but I have Das Keyboard Ultimate S and Scroll lock key doesn't work on Ubuntu 14.04, on Windows it works but not on Ubuntu. Hope this helps somehow.


Error using usb flashdrive - what usb error codes mean?

Try something like the command below (in a terminal).

strings /usr/src/linux-headers-3.13.0-74/include/uapi/asm-generic/errno.h

Use uname-a to find out what kernel you are running, and use that in place of the 3.13.0-74 that is in my example.


How to install gfortran-4.6 or gcc-4.6 on ubuntu 20.04

This fortran version was available in Ubuntu 14.04 LTS.
I can suggest to create schroot with 14.04 LTS and install old fortran here:

sudo apt-get install schroot debootstrap -y

cat <<EOF | sudo tee /etc/schroot/chroot.d/trusty.conf
[trusty]
description=Ubuntu 14.04
directory=/srv/chroot/trusty
root-users=$USER
type=directory
users=$USER
EOF

sudo mkdir -p /srv/chroot/trusty
sudo debootstrap trusty /srv/chroot/trusty

cat <<EOF | sudo tee /srv/chroot/trusty/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
EOF

schroot -c trusty -u root apt-get update
schroot -c trusty -u root apt-get install software-properties-common sudo
schroot -c trusty -u root apt-get install gcc-4.6 gfortran-4.6

Then execute your program inside the schroot by using command like:

schroot -c trusty /home/user/old-program


you can download it here

you shouldn't have to pay for it. "Ubuntu is completely free to download, use and share." Donations are of course accepted. If you do not widh to donate, click this button at the bottom of the donate page:

Source: http://www.ubuntu.com/download


How to make an automatic installation ISO image based on ubuntu-18.04-desktop-amd64.iso

This scenario of yours is covered in the Ubuntu installation guide.

Read the section Automatic Installation for how to go about achieving that. Next, you can choose from either of the two methods described to do that.

Lastly, there is another option to automate it even more. Use the net boot iso to automate the disk inserting part. Just boot up the PC/image without any other boot media, and set up the PXE/dhcp/tft server and you are mostly done.

Lastly about the grub choice. If you remaster the image, you can put a grub config with default pre selected option and a default timeout.
I think the default installation image already supports that.


Cannot pass the login screen after upgrade to 12.04 from 11.10

I had the same problem. This is how I solved it (parts only in German, sorry; try e.g. Google Translate):

chroot:
http://wiki.ubuntuusers.de/chroot/Live-CD
Look for the post of bowman Mai 2011 12:52:
http://forum.ubuntuusers.de/topic/daten-retten-mit-live-cd-2/#post-2922047
Run the following commands in a Terminal:

sudo apt-get clean
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install --reinstall ubuntu-desktop

This did the trick.


Why changes to any partition with a lower number than a mounted partition are not permitted?

Marty may be generalizing. You can make changes to partitions before a mounted partition that do not affect the mounted partition. So you can shrink them, but not expand.


Edit postgresql.conf and change listen_address:

listen_addresses='*'


I realized that not only by changing the theme the day name will appear again, but also by resizing the system font or rescaling the screen. Then, one permanent solution is to create a script that runs on startup, just like this one:
#!/bin/bash
set -eu
gsettings set org.gnome.desktop.interface text-scaling-factor 2
sleep 10s
gsettings set org.gnome.desktop.interface text-scaling-factor 1

I put 10 secs because in my laptop with less than that the script won't work. You can change that value according to your system.


Mark shuuttleworth (owner of canonical- Company behind ubuntu ) has declared in his blog. Development is going on for both products.  He has mentioned in the development of both products will be line up in next 6 months. check out
this post.

.


How can we make our ubuntu server router as gateway mode to router mode?

You'll need to turn on IP forwarding if your static routes are already in place. To do that run sudoedit /etc/sysctl.conf and look for the following segment:

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

Do as it says and uncomment the second line so it looks like:

net.ipv4.ip_forward=1

Save and exit. Then run sudo sysctl -p /etc/sysctl.conf to reload the configuration. You might then have to reload the networking stack (sudo restart networking) but after that your 192.168.7.x machines should be able to reach 192.168.0.*


Which Gnome environment is going to appear in Ubuntu 18.04?

ubuntu-gnome-desktop is a meta package that installs GNOME Shell, Ubuntu-specific settings, and any other packages that the Ubuntu GNOME team feel should be on a default install. That is what we will be seeing in 18.04's Ubuntu (and there will not be a separate Ubuntu GNOME flavour). From the release announcement of Ubuntu GNOME 17.04:

  As announced last week by Ubuntu founder Mark Shuttleworth, Ubuntu
  18.04 LTS will include GNOME instead of Unity. Specifically, it will be GNOME (including gnome-shell) with minimal Ubuntu customization.
  Next year, if you are using either Ubuntu 16.04 LTS or Ubuntu GNOME
  16.04 LTS, you will be prompted to upgrade to Ubuntu 18.04 LTS. For normal release users, this upgrade should happen with the release of
  17.10.

  As a result of this decision there will no longer be a separate GNOME
  flavor of Ubuntu. The development teams from both Ubuntu GNOME and
  Ubuntu Desktop will be merging resources and focusing on a single
  combined release, that provides the best of both GNOME and Ubuntu. We
  are currently liaising with the Canonical teams on how this will work
  out and more details will be announced in due course as we work out
  the specifics.

GNOME Flashback (originally called GNOME Fallback) is still available and will continue to be available. However, it is not the main desktop shell from GNOME, GNOME Shell is.


My minitube stopped playing, any suggestions why?

This is a well-known bug. A new version is on its way.

Edit: Minitube 1.9 has already been pushed out on the webupd8 test ppa. Shouldn't been long before its available from the main webupd8.org PPA.

Related questions you should read before installing from a PPA:

What are PPAs and how do I use them?

Are PPA's safe to add to my system and what are some "red flags" to watch out for?


Installing 12.04 onto a Dell studio with Windows 7 drops to grub rescue prompt

Well the problem seems to be the corrupted grub. You may have to reinstall the grub because what my experience tell is that it is really messed up. You can use BOOT-REPAIR tool to do the repair task. But what I could use if I do not has any sort of thing?

I would rather use a pendrive having windows installer on it and would start the window repair to bring up the command prompt screen at boot time. Now, I would fix the MBR by-

x:\sources>bootsect.exe /fixmbr

If still there would be some problem, I would use the command-

x:\sources>bootsect.exe /fixboot

Maybe that could assist you as a workaround.


Google Meet Microphone issues, "Helium" Voice

I couldnt solve the problem, it seemed to be related to the onboard sound card drivers.
I bought a new sound card, now it works.


Mounting

Loop mount works without specifying the file system, when you mount 'normal' linux iso files like Ubuntu family iso files.

$ sudo mount -o loop ubuntu-16.04.1-desktop-amd64.iso /mnt/lp1
[sudo] password for sudodus:
mount: /dev/loop0 is write-protected, mounting read-only

It might help to specify the file system with some other kind of iso file. The file system may not be iso9660, but udf or something else. You have to guess here unless you clone the iso file to a USB pendrive or burn it to a DVD disk and look at that with sudo lsblk -f

$ sudo umount /mnt/lp1
$ sudo mount -t iso9660 -o loop ubuntu-16.04.1-desktop-amd64.iso /mnt/lp1
mount: /dev/loop0 is write-protected, mounting read-only

Checking

$ df -h /mnt/lp1
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      1,5G  1,5G     0 100% /mnt/lp1

$ sudo lsblk -f /dev/loop0
NAME  FSTYPE  LABEL                    UUID                     MOUNTPOINT
loop0 iso9660 Ubuntu 16.04.1 LTS amd64 2016-07-19-21-27-51-00   /mnt/lp1

$ sudo lsblk -m /dev/loop0
NAME   SIZE OWNER GROUP MODE
loop0  1,4G root  disk  brw-rw----

$ ls -l /mnt/lp1
total 56
dr-xr-xr-x 1 root root  2048 jul 19  2016 EFI
-r--r--r-- 1 root root   232 jul 19  2016 README.diskdefines
dr-xr-xr-x 1 root root  2048 jul 19  2016 boot
dr-xr-xr-x 1 root root  2048 jul 19  2016 casper
dr-xr-xr-x 1 root root  2048 jul 19  2016 dists
dr-xr-xr-x 1 root root  2048 jul 19  2016 install
dr-xr-xr-x 1 root root 18432 jul 19  2016 isolinux
-r--r--r-- 1 root root 21439 jul 19  2016 md5sum.txt
dr-xr-xr-x 1 root root  2048 jul 19  2016 pics
dr-xr-xr-x 1 root root  2048 jul 19  2016 pool
dr-xr-xr-x 1 root root  2048 jul 19  2016 preseed
lr-xr-xr-x 1 root root     1 jul 19  2016 ubuntu -> .
$

An example with udf

$ sudo mount -o loop LXDE_on_Leap_42.1_openSUSE_by_kolAflash.x86_64-0.1.1.iso /mnt/lp2
mount: /dev/loop1 is write-protected, mounting read-only

$ sudo lsblk -f /dev/loop1
NAME    FSTYPE LABEL UUID                                       MOUNTPOINT
loop1   udf    CDROM 2015-11-10-19-42-39-00                     /mnt/lp2


Why is the tree command not included in Ubuntu server?

I suspect tree is not installed by default because it is in universe (applications have to be in main before they can be installed as default).

A quick look through the changelog doesn't show a record of security issues, and there are no bug reports in Ubuntu, even going back as far as Dapper.

So my advice would be to just go ahead and install tree on your server, it's probably safer than a lot of popular server applications.


How do I set battery full alert tone in ubuntu 18.04 to save battery wear out?

Probably not the best way, but you can do something like the following.

First you'll need acpi. Install it by running

sudo apt install acpi

Next you need to create a bash script. Create an empty text file, say battery-full.sh and add the following lines

#!/bin/bash
while true
    do
        export DISPLAY=:0.0
        battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
        if on_ac_power; then                                #check if AC is plugged in
            if [ $battery_level -ge 90 ]; then              #check if the battery level is over 90%
                notify-send -u critical "Please unplug your AC adapter" "Battery level: ${battery_level}% (charged above 90%)" -i battery-full-charged
             fi
        fi
      sleep 300                                             #wait for 300 seconds before checking again

    done

Make the script executable and run it. You'll get a persistent notification if the battery is charging and the level is over 90%.

You can also get a sound alert by adding a suitable a audio-playing command after the notify-send command in the script above. For example you can you the play command from the sox package (for other options, see this). First install it by running

sudo apt install sox

Then modify the notify-send line in the script as follows

notify-send -u critical "Please unplug your AC adapter" "Battery level: ${battery_level}% (charged above 90%)" -i battery-full-charged; play /path/to/audio-file

(Replace /path/to/audio-file by a valid path to an actual audio file present in your system).

You may also consider adding the script to your startup applications so that it starts automatically every time you boot your laptop.


You need to edit the ~/.config/user-dirs.dirs file. Make sure the contents of the file are like the following:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/Share"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Then restart nautilus:

killall nautilus

or

nautilus -q

Then, open nautilus via Unity menu (press the Super key) or using the run command (Alt+F2)


First, install last BIOS :
https://www.zotac.com/dz/files/download/by_product?p_nid=582520&driver_type=238&os=All

In BIOS :

Boot : Pure UEFI

Boot secure :

Attempt Secure Boot : Disabled

Secure Boot Mode : Standard

Save and exit

Boot on usb key, and in Grub, select (not press) "install ubuntu" and press "e" for edit command.
Add "nomodeset" just between "...quiet splash" and " ---"
Press "F10" for validate.

Install Ubuntu.

When first start, press "Echap" for display Grub (not automatic if only one OS installing)
Select "ubuntu" and press "e" for édit command.
Add "nomodeset acpi=off" just next "$vt_handoff "
(acpi=off is maybe not necessary)

"F10" for validate

Next, in Ubuntu, you must install NVIDIA drivers :
In "softwares & updates" / "drivers optionals", "select "use NVIDIA drivers...". Validate.

You can install "NVIDIA X server Settings" in "applications ubuntu".

Next : "settings" / "devices (?)" / "displays"... select your screen resolution, frequency...

Reboot.

It's fine.


how do I change the default icon size of smooth tasks plasma taskbar?

I found that using the "minimal icon space" parameter in the settings menu of the widget allows me to change the contracted/non-expanded button width by pixel dimension


Sound Preferences (gnome-volume-control) is part of the package gnome-media. You can install it using Synaptic Package Manager or from the command line:

sudo apt-get install gnome-media


Can't switch from Unity to Gnome using gear icon

I had the exact same problem solved it by switching to gdm3 and then the gear icon worked sudo dpkg-reconfigure lightdm - this command allows you to switch to gdm3

I think easier and better than reinstallation:)


First of all, you need the package name. It is probably simplenote, but because I don't know, here is a way to get it:

grep simplenote /var/log/dpkg.log

An example line would be: 2014-01-02 11:20:08 status installed libmime-lite-perl 3.020-2ubuntu2 (libmime-lite-perl is the important part AKA package name)

Then, you can uninstall it:

sudo apt-get remove --purge [packagename]


Configure trackpoint on Dell Latitude 5470

To make your trackpoint more precise, just increase the Device Accel Constant Deceleration value (15 is fine for me):

xinput set-float-prop 'AlpsPS/2 ALPS DualPoint Stick' 'Device Accel Constant Deceleration' 15

Make it persistent

echo "xinput set-float-prop 'AlpsPS/2 ALPS DualPoint Stick' 'Device Accel Constant Deceleration' 15" >> ~/.xsessionrc

Not working ?

Find out your trackpoint device name , it's usually DualPoint Stick or something like that.

$ xinput list

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=12   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD                      id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=14   [slave  keyboard (3)]
    ↳ DELL Wireless hotkeys                     id=15   [slave  keyboard (3)]

List available properties, to see, if Device Accel Constant Deceleration is present

$ xinput list-props 13

Device 'AlpsPS/2 ALPS DualPoint Stick':
    Device Enabled (139):   1
    Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (265): 0
    Device Accel Constant Deceleration (266):   15.000000
    Device Accel Adaptive Deceleration (267):   1.000000
    Device Accel Velocity Scaling (268):    10.000000
    Device Product ID (260):    2, 8
    Device Node (261):  "/dev/input/event6"
    Evdev Axis Inversion (304): 0, 0
    Evdev Axes Swap (306):  0
    Axis Labels (307):  "Rel X" (149), "Rel Y" (150)
    Button Labels (308):    "Button Left" (142), "Button Middle" (143), "Button Right" (144), "Button Wheel Up" (145), "Button Wheel Down" (146), "Button Horiz Wheel Left" (147), "Button Horiz Wheel Right" (148)
    Evdev Scrolling Distance (309): 0, 0, 0
    Evdev Middle Button Emulation (310):    1
    Evdev Middle Button Timeout (311):  50
    Evdev Third Button Emulation (312): 0
    Evdev Third Button Emulation Timeout (313): 1000
    Evdev Third Button Emulation Button (314):  3
    Evdev Third Button Emulation Threshold (315):   20
    Evdev Wheel Emulation (316):    1
    Evdev Wheel Emulation Axes (317):   6, 7, 4, 5
    Evdev Wheel Emulation Inertia (318):    10
    Evdev Wheel Emulation Timeout (319):    200
    Evdev Wheel Emulation Button (320): 2
    Evdev Drag Lock Buttons (321):  0

Finally, try not using literal names, but ids:

xinput set-float-prop 13 266 14


Is there a way to keep the application switcher active on the screen all time?

AFAIK this is not possible. You can switch your applications easily by pressing the icon on the launcher to the left. Isn't an application switcher annoying which appears permanently in front of all windows?


Several problems: Can't get multi monitor setup to work (or nvidia drivers/cuda toolkit), tty console not working aswell

Honestly, I would stick with single monitor for Linux.
I tried multi-monitor setup, but it screwed up my screens and I had to reinstall/format/do the whole damn installation again.\

Depending on your graphics card, I would get the drivers from the site, if there are any. I know that some AMD/ATI cards work like plug-and-play.


Is there a way to set build preference on Launchpad?

Is there a way to set the build preference to x64 before x86?

Well, AFAIK builds are scheduled in parallel, it just depends on where you are in the queue (x86_64 is typically more backed up than i386). If you wish to build an Architecture-All package only for x64, then you can simply modify the debian/control file, changing all instances of Architecture: all to Architecture: amd64; that way no i386 build will take place.

If you really need something built now, you could also change the urgency in the changelog to jump ahead in the queue, but one has to be mindful about misuse if this is purely a personal-type PPA build :)  IMO I would simply dpkg-buildpackage it if this was a one-off thing.


As a partial answer to your question, I managed to swap the pause and delete keys for the HP Omen 15 https://gist.github.com/kellpossible/d2d7992b4aa6b9214577596843d307b6


I wonder why you add the '2.8.0~xenial' to your command.  The official installation page recommends to install with:

sudo apt-get install --install-recommends winehq-devel

Do you have special reasons to try to force a specific version (I guess this is what you want)?


Know how to change boot order, Have Ubuntu 13.04 on a bootable usb stick, but won't load

Check your BIOS again, I bet your USB stick is recognized as HDD, so what you have to do is to take a look (in BIOS) at the HDD priority, set your USB stick as first HDD, then change the boot order and making it to boot from HDD first.


Dock and Desktop icons disappeared after disk error on 20.04 (with dual boot Windows 10)

I installed dash to dock and that solved the dock problem, but the icons problem still persists


Unable to remove maven using 'sudo apt-get remove maven2'

Actually it shows that you already removed it. You can go ahead and use sudo apt-get install maven


LVM Hard disk partitioning after Ubuntu installation

As we can see on the screen shot from the question you are currently using LVM on the partition /dev/sda5. Gparted have limited support of LVM and this is the reason to show it as full while in fact it is not full.
If this is a new installation the easiest way is to backup your user's files, reinstall the OS and split the disk during the installation process - but this is another question. Otherwise backup your user's files and follow the next steps on your own risk.
Here is short manual how to shrink this partition step-by-step. I'm assuming you are running Live Ubuntu from an installation CD/USB and you want to resize the existing Ubuntu installation. For the current example I'm using virtual machine (powered by VMWare) and some outputs could be slightly different from the real situation.

Investigate your LVM setup
There are two basic terms:

VG - volume group - that you can imagine as equivalent of the entire free space (disk drive) within LVM.

LV - logical volume - that you can imagine as equivalent of partition.

Open new terminal window and execute the command sudo lvs that will output all VGs and their LVs. If you've used the automatic installation process of Ubuntu the output should be as the follow.

$ sudo lvs
  LV     VG        Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   ubuntu-vg -wi-a----- 21,52g
  swap_1 ubuntu-vg -wi-a-----  8,00g

Here we have VG called ubuntu-vg, one LV called swap_1 and another one called root, that we want to resize.
To output the current characteristics of the root LV you can use the command sudo lvdisplay /dev/ubuntu-vg/root. To check the free space on this LV you can use df -h /dev/ubuntu-vg/root, but first you should mount it:
$ sudo mount /dev/ubuntu-vg/root /mnt
$ df -h /dev/ubuntu-vg/root
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root   22G  5,0G   16G  25% /mnt

We can see there is 16G free space. Here is what Gparted shows for this installation at this point (it is identical with your case):

Shrink the partition
The main source of this part is the article How to Extend/Reduce LVM’s on TechMint. The first advice given there is: Before starting, it is always good to backup the data, so that it will not be a headache if something goes wrong.
Here we will reduce the root logical volume, then will move swap_1 into the beginning of the free space within the volume group and then we will resize /dev/sda5.
1. Mount the file system and defragment it:
sudo mount /dev/ubuntu-vg/root /mnt
sudo e4defrag /mnt

2. Unmount the file system for reducing (check if it is unmounted by the command: df -h):
umount /dev/ubuntu-vg/root

3. Check for the file-system error using following command (the test must pass in all 5 steps; 0.1-1% of non-contiguous files will give us good chance to reduce the file-system):
sudo e2fsck -ff /dev/ubuntu-vg/root

4. Reduce the file-system with 5G (for this example) and Reduce the LV  with 5GB:
sudo resize2fs /dev/ubuntu-vg/root 17G  # 22 - 5 = 17
sudo lvreduce -L -5G /dev/ubuntu-vg/root

5. Resize the file-system back and check for the file-system errors:
sudo resize2fs /dev/ubuntu-vg/root
sudo e2fsck -ff /dev/ubuntu-vg/root

If there is any error that means the file-system is corrupted and maybe we should reinstall and use our backup. If there is no error the process should be successfully finished. Note: At this point you could create another LV.
6. Move the free space out of VG. The command pvs could show us where the free space is located within the partition /dev/sda5. In this example the swap is to the end, so we will delete and create it again (using its PE size), thus it will be moved into the begging of the free space.
$ sudo pvs -v --segments /dev/sda5
    Using physical volume(s) on command line.
    Wiping cache of LVM-capable devices
  PV         VG        Fmt  Attr PSize  PFree Start SSize LV     Start Type   PE Ranges
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g     0  4229 root       0 linear /dev/sda5:0-4228
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g  4229  1280            0 free
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g  5509  2048 swap_1     0 linear /dev/sda5:5509-7556

$ sudo lvremove /dev/ubuntu-vg/swap_1
  Do you really want to remove and DISCARD active logical volume swap_1? [y/n]: y
  Logical volume "swap_1" successfully removed

$ sudo lvcreate -n swap_1 -l 2048 ubuntu-vg
  Logical volume "swap_1" created.

$ sudo pvs -v --segments /dev/sda5
    Using physical volume(s) on command line.
    Wiping cache of LVM-capable devices
  PV         VG        Fmt  Attr PSize  PFree Start SSize LV     Start Type   PE Ranges
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g     0  4229 root       0 linear /dev/sda5:0-4228
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g  4229  2048 swap_1     0 linear /dev/sda5:4229-6276
  /dev/sda5  ubuntu-vg lvm2 a--  29.52g 5.00g  6277  1280            0 free

$ sudo pvresize --setphysicalvolumesize 25G /dev/sda5
  Physical volume "/dev/sda5" changed

7. Now you can use some tool like Gparted to resize the partition /dev/sda5 and create a new one or leave the space unallocated to use it for the another OS installation.

Note the small gap of empty space that we commit due to incorrect calculations. We can make more precise calculations (honestly I've lost my self within GB, G and GiB) or we can add it to some of the LVs by a command as this:
sudo lvresize -l +100%FREE /dev/ubuntu-vg/root
sudo resize2fs /dev/ubuntu-vg/root

Use sudo pvs -v --segments /dev/sda5 to investigate the new state.
8. Now you can reboot the system. Within the example I created one NTFS partition - /dev/sda6, shown on the next image.

9. The final step is to enable the swap (as it is show on the picture above):
sudo mkswap /dev/ubuntu-vg/swap_1 # we could do that in the previous step 7
sudo swapon /dev/ubuntu-vg/swap_1 # or reboot the system

References:

How to Extend/Reduce LVM’s (Logical Volume Management) in Linux – Part II

Reduce the size of an LVM logical volume

How to reduce Volume Group size in LVM?

Move free space out of LVM

How to Defragment Linux Systems


For being able to dual boot, I would say that most laptops should be able to boot the live USB in EFI mode so you shouldn't have to change to legacy to dual boot.

The more important part about choosing a laptop to install Ubuntu is hardware support and the ASUS Q504 looks ok. It uses Intel integrated graphics and has an Intel wireless card, which usually work under Ubuntu.


how to cp syslog to other places when install OS using preseed before reboot ubuntu16.04

I find the install log in /var/log/installer/syslog after install reboot

and other install logs is here /var/log/installer/

So I consider it addressed and close the issue.


What you've installed is Ubuntu Kylin, which by default comes with Chinese locale. As with any Ubuntu flavor you can do the following in terminal:

sudo apt-get install language-pack-en
sudo update-locale LANG=en_US.utf8
check-language-support | xargs sudo apt-get install
reboot

If that still doesn't help you, you may want to create live usb for original Ubuntu and install that

More info on locales: https://help.ubuntu.com/community/Locale


Finally solved!

Go to see the clown Pagliacci.

Install Ubuntu/Xubuntu/Budgie with "safe graphics"

Boot into recovery mode from Grub

Open the root prompt and enter:

sudo update-initramfs -u
Press Enter and wait. When the update is complete and the prompt returns, press Ctrl + D (or whatever) to continue, and proceed with normal boot.
I booted into a normal Linux with this.


Whatever system backup you do should include your /var/spool and /etc directories anyway, so there is nothing special you need to do in order to backup your cron tables.

The per-user cron tables are in /var/spool/cron/crontabs/.  You do not edit these files directly, instead you use crontab -e to edit them (or crontab -l to view them).

The system-wide cron table is split into multiple files that reside in /etc/cron.d/

The additional directories such as /etc/cron.daily/, /etc/cron.hourly/ and so on do not hold cron tables but instead hold scripts that are called at that frequency by your system cron tables.  They are designed to allow packages to drop in tasks to these directories if they need a task run regularly.

If you want to change the user that a cron runs under, the safest way to do it is to crontab -e as the first user, delete the line from their cron table, log in as the second user, crontab -e, and then add the line to that user's cron table.

If you want to place an entry in the system cron table, you could write up a cron table and place it in /etc/cron.d/.  Though unless you are installing your own software system-wide, it usually makes sense to stick with the per-user cron tables.


If you don't want to use bzr, or aren't familiar with debian packaging, and updating the changelog, etc, you can simply generate a diff ( preferably with -u ) of the file you changed, and attach it to the bug report and tag it with the tag 'patch' and hopefully someone else will take care of applying it properly and uploading it.

If you are comfortable with updating the debian change log ( dch -i ), and applying any upstream changes in a quilt patch ( assuming the package in question uses quilt ), you can do that, build the new package, and then use debdiff to generate a full diff between the old and new package version, and attach that to the bug report.  Assuming it also affects debian, you should file a bug there and attach the diff there as well, and link the launchpad bug report to the debian one.


I cant write/delete anything on my Laptop disk

SOLUTION:
As i checked no HDD damage, i formatted the entire unit and installed W10 and the the linux and it worked perfectly.


Ubuntu 14.04 latest update Beyond Compare and TortoiseHG issues

The problem appears resolved after the update on Nov 6, 2015 and a reboot.


Extremely slow and unstable WiFi connection using TP-Link TL W727N

Searching for the message in your log:

  rt2800usb_txdone: Warning - Got TX status for an empty queue 2,
  dropping

...returns many hits and no real solution. I suggest that you check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router. In many cases, rt2800xx devices seem to work much better with the router set to B and G speeds only. After trying these changes, in each case, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo modprobe -r rt2800usb
sudo modprobe rt2800usb nohwcrypt=Y

If it helps, make it permanent:

sudo -i
echo "options rt2800usb nohwcrypt=Y"  >>  /etc/modprobe.d/rt2800usb.conf
exit


It is answered in top command on ubuntu multicore cpu shows cpu usage >100%

By default, top displays CPU usage as a percentage of a single CPU. On multi-core systems, you can see percentages of CPU usage are greater than 100%. You can toggle this behavior by hitting Shift + i while top is running to show the overall percentage of available CPUs in use.

htop is a better alternative of top. In htop, you can see how your programs consuming all of the 32 cores.


Why does xclip -t text/html -selection c not work?

Thank you to IRC #gnome.
So turns out that
echo "ABCDEF" | xclip -selection c -t text/html

does work - but, the thing that caught me is that you cannot paste back into Terminal! In the Terminal UI (right click), the clipboard is showing as disabled.
So run the above command and paste into an application that can accept text/html (like Google Docs). That works!
The error from
echo "ABC" | xclip -t text/html -o

is because -o reads from the selection and pastes. So the 'echo ABC' doesn't make sense.
Try
echo "ABCDEF" | xclip -verbose -loop 0 -selection c -t text/html

to get more info. I am not sure whether the 'loop' is needed - seems to work without.


How do I enable HDMI output on Nvidia GTX 650?

Are the correct drivers installed?

First of all, check that you actually have the correct nvidia drivers installed (this will check whether they are installed and install them if they aren't already):

Fire up a terminal, and then:

If you want the stable (tested, but old) drivers, do:

sudo apt-get install nvidia-current

If you want the latest (possibly untested, but fresh from nVidia) drivers, do:

sudo apt-get install nvidia-current-updates

Once you're done with that, restart your computer to check that the drivers are working correctly (check the bottom of the post if they aren't).

Now, shut down your computer (or just shut down the X server(s)), and then remove the VGA cable. Then, plug in the HDMI cable.

Now start up your computer. Is it working?

If not, check that the monitors you have work with another HDMI output (ie: X360, PS3, DVD Player, etc.). If they don't, it might just be your monitors.

If the monitors work but the card isn't working, it may be a defect with the card, or an alternate setup may be required.

If the (newly installed) drivers weren't working:

Hit Ctrl + Alt + F1

You will be shown a terminal. Log in using your username and password.

Stop whatever display manager you're using:

LightDM (Default): sudo service lightdm stop
GDM (GNOME): sudo service gdm stop
KDM (KDE Plasma Workspaces): sudo service kdm stop
Any other display manager (custom/other desktop environments): sudo service [display manager name] stop

Then, uninstall the nvidia drivers:

sudo apt-get remove nvidia-current nvidia-current-updates

Once this is finished, reinstall the nvidia drivers as shown at the top of the post.

Restart the computer:

sudo reboot now

Did it work out in the end?

If all of the above doesn't solve the problem, tell us what didn't work.
If it did work, mark the solution, and upvote it.


[Dual system, Ubuntu 20.04]nvidia-gpu: i2c timeout error; ucsi_ccg: i2c_transfer failed -110, ucsi_ccg_init failed

I also have this issue in my Windows 10 + Arch Linux. It seems to be a bug in nvidia driver, as discussed in this link. Some nvidia cards don't have USB Type-C interface, yet still try to load its i2c driver. Hopefully this problem will be fixed in the next version of the driver.
As far as I know, there are two solutions for this problem in the meantime:

You may try to patch your linux kernel, see the link above. If I understand correctly, the patch downgrades level of the error.
You may want to create a file /etc/modprobe.d/blacklist_i2c-nvidia-gpu.conf with these contents: blacklist i2c_nvidia_gpu. This file prevents loading the problematic driver.

Personally, I use method 2, since my card doesn't have USB-C interface.


How to see the current dpkg-reconfigure value

I don't know a way to query for specific keys, but you can dump all the selections and use grep e.g.

$ sudo debconf-get-selections | grep display-manager
lightdm shared/default-x-display-manager    select  lightdm

Alternatively, if you can guess which package is currently configured you can confirm with debconf-show

$ sudo debconf-show lightdm
* shared/default-x-display-manager: lightdm

However you should be able to get the same information by looking in the /etc/X11/default-display-manager file:

$ cat /etc/X11/default-display-manager
/usr/sbin/lightdm


How can I be able to start Windows 7 from Ubuntu, and not from grub?

Install grub. It is the only way possible to recover it strictly from Ubuntu. Other methods are possible but GRUB is the easiest. It is very simple to install as well.

Right from Ubuntu's support pages:

sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda

If you later wish to return to the Windows Boot Loader, it is possible and there are many guides on the internet. I would highly recommend that you install your own partitioned and completely seperate Ubuntu. It works much more elegantly.


When I had my issues getting sound out through my HDMI, it was related to not having the up to date driver for my AMD Graphics card. https://wiki.ubuntu.com/DebuggingSoundProblems may help, I've also heard that installing Pulse Audio from the Software Manager can assist as well