which Ubuntu should I install for a low spec computer

Welcome to askubuntu!

Ubuntu can run nicely on older PCs. If you need something even lighter, you can try out different flavours, including very lightweight ones, such as Xubuntu or Lubuntu.

It's not very hard to set up dual-boot, i recommend you to follow the steps on this arcticle.
If you need any help, feel free to ask!

Regarding the release, you can chose between a regular release and a LTS one, both have their pros and cons.

Regular: Released every 6 months and Supported for 9 months, they're a great choice if you want to always get the latest features and packages.
The current latest release is (At the time of writting)  15.10 (Wily Werewolf).

LTS: Released every 2 years, they are Supported during 5 years. They're the best choice if what you're looking for is stability.
The current latest LTS release is (At the time of writting) 14.04.3 (Trusty Tahr).

If you want to read more about the different releases, here's a few links:
https://wiki.ubuntu.com/Releases
http://www.ubuntu.com/info/release-end-of-life

PS: If my post answered your question, please remember to mark it as the accepted answer.


Where can I find API reference documentation?

The closest thing to a comprehensive API reference for Ubuntu can be found at the Resources section of the App Developer site. If you're making a normal quickly app, your most important references will be the Quickly, Python, and Platform pages.

You can also get a manual for the quickly command line tool by typing:

man quickly


Why are there PPAs for each Ubuntu version?

I'm not sure what you mean.  A single PPA has pockets for every release, so you just have to add the one PPA and apt will get the appropriate package for your release.

As for why there are different packages for each release, that is because the package depends on the libraries in the release for which it was built and may not work on another release.


These 2 lines are needed one time only:

$ cd /usr/local/lib
$ sudo curl -O http://www.antlr.org/download/antlr-4.4-complete.jar

It is for download the antlr jar file so this is only needed once.

These lines need to be edited into a start up file for your session (or any user on your system that needs to use this).

$ export CLASSPATH=".:/usr/local/lib/antlr-4.4-complete.jar:$CLASSPATH"
$ alias antlr4='java -jar /usr/local/lib/antlr-4.4-complete.jar'
$ alias grun='java org.antlr.v4.runtime.misc.TestRig'

I would suggest .bashrc in /home/$USER/

Regarding classpath: Classpath unsets after restarting
Regarding aliases: How do I create a permanent Bash alias?


point domains to folders under LAMP (Work of AddonDomains)

There is a pretty good "how to" description for adding virtual hosts to your one Apache web server in the Ubuntu serverguide. (see basic settings) There are also links to further references.


Are you looking for sudo service networking start ?

I believe network-manager handles the networking and interface on Ubuntu 12.04 so it should be like:

sudo service network-manager start

[EDIT]
Just an update in support of my comment below, for automating SUDO when piping the password to it from external source use:

echo "password" | sudo -S service network-manager start

Which will not ask for the password interactively.

-S Switch here make sudo to read the password from standard input and not from terminal.


The same here.
But in my case pulseaudio discovers a remote source, but not sink. However, there are typical error messages in log for both of them.

Another thing to mention is that fail message about module-tunnel-source is different from the one about module-tunnel-sink.

The second has server address argument written in IPv4 form (192.168.0.x) while the first mentions address in IPv6 form. Don't know why there is that difference, but it remains the whole time and somehow module-tunnel-source with an IPv6 address is loaded, but sink is not.

Maybe it's just a bug and we should think how to file a bug report correctly.

EDIT:

I think I've already found solution:

http://lists.freedesktop.org/archives/pulseaudio-bugs/2009-October/003348.html

According to it you should disable IPv6 in avahi-daemon and restart it. It worked for me.


Ubuntu One music store - in my currency?

There is no support for changing the display currency in the store.  Since the purchases are via credit card, there shouldn't be any problems making purchases with the current exchange rate being used for the transaction.


How do I concatenate multiple files in multiple directories with their names?

Provided that "in order" means in your locale's collation order, you can use simple shell globs.
Ex. given
$ tree root
root
├── dir1
│   ├── s1
│   └── s2
└── dir2
    ├── s3
    └── s4

2 directories, 4 files

then
$ for f in root/*/*; do { printf '%s (%s)\n' "${f##*/}" "${f%/*}"; cat "$f"; printf '\n'; }; done
s1 (root/dir1)
Contents of file 1

s2 (root/dir1)
Contents of file 2

s3 (root/dir2)
Contents of file 3

s4 (root/dir2)
Contents of file 4

If you just need something quick'n'dirty and don't need that specific format, then you could use head with a number of lines that is larger than the known line count of any of your files:
$ head -n 100000 root/*/*
==> root/dir1/s1 <==
Contents of file 1

==> root/dir1/s2 <==
Contents of file 2

==> root/dir2/s3 <==
Contents of file 3

==> root/dir2/s4 <==
Contents of file 4


Should the root folder (/root) be empty?

/root is simply the homedir for the root user.

By default, all that should be in there are some dotfiles, like .bashrc and .profile.


Ubuntu on Mac cannot locate via OSX or boot it throught rEFIt...

Try creating a USB flash drive with rEFInd (download the USB flash drive version and write it to your USB drive as described in the documentation). When you boot from it, the flash drive should give you options to boot both OS X and Linux. If this works, install rEFInd from OS X from the binary .zip file, and be sure to install the EFI driver for the filesystem you used for Ubuntu (ext4fs by default).


What is the number after the index in terminal?

That number is the PID of the application.

PID is a process identifier. Each application run by a user is assigned a number. To learn more about it please refer to Wikipedia


how to run ubuntu 13.10 along windows 8?

You have to prepaire Windows as the main system.
Download and install within Windows this:
https://neosmart.net/EasyBCD/

Then create wihtin Windows 2 partitions:
1 for You're Linux version. (minimal 10 GB) and
1 for You're Linux swap. It should be as great as You're internal Memory+ 1GB
  In my case 5GB as a swap file/dir/drive...

Make it NTSF primair. Bootup Windows again to check this out. After installing Linux, You don find these drives back.

OK:
throw in the Linux DVD/CD and startup. Goto manual installation.
Be secure to install everything on the Linux-drives. Don't select the main drive.
(/SDA:) for the Grub install...
After installing bootup You're PC.
If everything is all right, Windows (7/8) will come up. That's good:
Check out You're drives. Windows won't recocqnize You're Linux-partitions.
That's also good.

Here You have to startup EasyBCD. It will find all the Grub-installations on You're PC.
Give it a New name.  Reboot again.

A selection will apear:
- Windows 7/8 (Standard)
- Linux (New Name)

Of course select Linux. And be amazed how fast it is:
On my ssd within seconds Linux Mint is ready...

Build out the old HD's and build in SSD's. Linux=freedom...
No OEM required...

Greetings and succes with You're Linux installation...


Cannot open Android project first time in new install of Android SDK in Eclipse IDE

Please note that I have no idea as to the path of your JVM, as I have yet to install Java on my fresh Ubuntu 16.04 VirtualBox image, but this should get you started on the right path (pun intended).

You should have an eclipse.ini file located at $ECLIPSE_HOME/eclipse.ini

Open the above file: gedit $ECLIPSE_HOME/eclipse.ini.  For in-depth coverage of the file, refer to the References below.
Find the line that reads -vmargs.  Insert a blank line above it.
On the Blank line add: -vm, and hit Enter to create another new line.
On the Blank line, enter the PATH value for your Java machine, i.e. /opt/jdk-1.8.0_91/bin/java.  Please note that the path could be very different.
Make sure JAVA_HOMEand JDK_HOME are set. See How to set JAVA_HOME for Java?.  Be sure to look at the pastebin comment if you have multiple versions.
Logout and back in to accept the changes from Step 5.
If all works well, I believe you can set -vm to the exported value in JAVA_HOME.  If that fails after restarting Eclipse, I'll remove this step.

Regarding issues with Eclipse, I haven't had any major issues, but for Android Development, I actually prefer Android Studio, as it's the official IDE endorsed by Android.  The reason you might consider it bloated is because the IDE settings are configured in such a way that the increased bloat is used to support those settings, I.e. type-checking for a hard-coded string, and the integrated layout editor.

References

java.lang.NullPointerException when creating first android app in OS X 10.9.4

Eclipse Wiki - eclipse.ini


Suspend not working on Lenovo Yoga 510-15ISK

Related to Ubuntu 16.04 LTS cannot suspend / fails on suspending ?

I have the same problem, although it seems to be a bug rather some kind >of misconfiguration, so there is nothing we can do about it right now. >Let's hope the fix will be released soon. There is related bug report you >can follow: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1566302
EDIT
In discussion from the link above, someone pointed out that the bug was  >fixed in kernel 4.4.8 and in fact it solves the problem for me. That
the issue was identified and we can expect an update in a few days.


echo -e "First Line" | tee ~/output.log
echo -e "Second Line" | tee -a ~/output.log
                            ^^

From man tee:

   Copy standard input to each FILE, and also to standard output.

   -a, --append
          append to the given FILEs, do not overwrite

Note: Using -a still creates the file mentioned.


Problem in converting math in Latex to epub using pandoc

EPUB doesn't have any general way of displaying latex math.  The EPUB3 standard includes MathML, but few readers support this yet.  You can try adding -t epub3 to your command line to get an EPUB3 document.  You could also try using the --webtex option, which will use a web service to convert the tex to an image.


Triple booting Windows 10, Ubuntu 15.10 and Remix OS Alpha

You can't install RemixOS to your hard drive you can only boot to it through your USB flash drive, your flash drive must be USB 3.0 and as you mentioned above it seems like you went to the boot menu and booted into your flash drive "Sandisk Cruzer", it's not called RemixOS because the name of your flash drive is that(Sandisk Cruzer), the reason your PC booted into Ubuntu is because you didn't install RemixOS properly on the flash drive. Install RemixOS on your flash drive and try again.


Ubuntu 18.04: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) after installing XAMPP

If you want to run the XAMPP`s mysql you should run:

/opt/xampp/bin/mysql instead of mysql

The error may be because you already have mysql package installed via apt

NB: XAMPP includes MariaDB not MySQL


Why Disk utility shows different size than df -h?

My guess is that the disk utility has a different method to calculate free space.
It appears you have approximately 4.5GB of free space.


Edit /etc/default/grub.

Modify GRUB_CMDLINE_LINUX_DEFAULT to

GRUB_CMDLINE_LINUX_DEFAULT='pcie_port_pm=off acpi_backlight=none acpi_osi=Linux acpi_osi=! acpi_osi="Windows 2009"'


qtcreator says file not found in issues list

It turns out the file has to be part of the qtcreator project. This often happens right after a new file has been created externally to qtcreator. To fix, right click on the project, choose "edit files" and add the new files.


To open Nautilus as a different user follow these steps:

Press Alt + F2
Type in gksu and press enter.
Choose the user and type in nautilus in the command box.
Hit enter.


dig doesn't work in Ubuntu 14.10, works in 12.04 in the same network

Right now I had the same problem on fresh installed 14.10 64-bit.  Quick Internet research gives me nothing therefore I decide to re-install package before to go further. Surprisingly the dig starts working after that.

sudo apt-get install --reinstall dnsutils


GDB crashes with: ImportError: No module named libstdcxx.v6.printers

This is a bug in /usr/lib/debug/usr/lib/$triple/libstdc++.so.6.0.18-gdb.py; if it were operating correctly, you would only see the ImportError once, and the pretty-printers would work.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701935#18 for some information about what's going wrong here.  This worked okay in Debian's gcc-4.7, but until recently did not work in gcc-4.8 on Debian.  I'm not sure if I even tried this with gcc-4.6.

Regardless, you can patch that file to look in the right place.


Can I define keyboard shortcuts using the Super key?

This happens because in Natty Super/Mod4 is a shortcut to the Unity panel. You can change that in Compiz.

Install the compizconfig-settings-manager package.
Hit Alt+F2, type about:config and hit Enter to open the Unity configuration.
Change the shortcut for Key to show the launcher as you like to free your Super key:

In this example I've changed from Super to Super + L

Now your mod key is free to use as you like.


Empathy wont connect to my gmail account

Double check that you have the mail servers correct, then try to enter the password in the browser based gmail. If the password doesn't work there, then you have been putting the wrong password into Empathy.


Ubuntu upgrade from 16.04 to 18.04 LTS facing issues

run fc-cache -fr in command line
reboot the system


Your MiniSD seems Damaged in some way. Since its not only your pc, I suggest you try another SD card.


Searching through output of more command

I'd use a regexp to match spaces:

egrep 'typedef\s+struct\s+audiodev' your_file

Here \s+ corresponds to one or more spaces


Will Ubuntu work on this laptop - Dell E7270?

According to its spec sheet, Ubuntu 14.04 LTS works well on Dell Latitude E7270 .

Here is a link where you can see (some of) the OSs supported by this laptop:

Windows 7, 8.1 Pro ,10 32/64bit
Ubuntu Linux 14.04
NeoKylin v6.0


Asus ul80vt hybrid graphics - how to disable the Intel GPU?

This link would help you to use your nVidia GPU.

https://wiki.ubuntu.com/Bumblebee#Installation


To me it certainly sounds like hardware related.
Maybe some loose wiring?  or maybe your touchpad has a physical button that disables it that you happen to switch?


I had several similar issues:

Problem:
The "libwebkitgtk-1.0.so.0: cannot open shared object file" is because the dependencies have not been installed

Solution:
Follow the quick start guide, specifically

64 bit machines

/usr/local/pulse/PulseClient_x86_64.sh install_dependency_packages

32 bit machines:

/usr/local/pulse/PulseClient.sh install_dependency_packages

Problem:
Not being able to find "libgnome-keyring.so.0", this was because libgnome-keyring installed as "libgnome-keyring.so.0.2.0"

Solution:
Create a sym link, for me this command worked:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0

Problem:
The credentials window disapears. This was because the setup created the following folder using the "root" user.

~/.pulse_secure

Solution:
Change the ownership of the folder to the current user.

sudo chown -R `whoami` ~/.pulse_secure

The Linux quick start guide can be found here.


Missing Partition Space After Installation

Looks like you have installed ubuntu trought wubi, on some windows partition that you had 100GB spare space left, didnt changed size of installation. If so, you can store files to your windows partitions as well, looks like you have one in /media/B6E... and you can access partition that wubi was installed on trough /host .

If it is not true, add output of command

sudo fdisk -l /dev/sd[abc]

//edit

this command will print partition sizes of your disks sda sdb sdc, but not needed.

As mentioned here http://ubuntuforums.org/showthread.php?t=777797 , wubi is not intended to be long time solution, i wouldn't  recommended wubi for storing lot of data there because of speed ( it is slower than regular install ).

Navigate to folder /host, you can see that you have rest of that 100gb available there...


Are there any apps that can download lyrics for all the music files in a folder?

The programs that work with lyrics and other music metadata can make use of a library named libglyr.
There is a program providing a command line interface to it's features, glyrc. I could not see which lyrics file formats are used in the man page, but it seems to be worth a try.
(Possibly it is somethinig like the standard minimal UI for libglyr library development - then, it may be cryptic, but very complete.)

From man glyrc:

 NAME

        glyrc - search engine for music-related metadata

 USAGE

               glyrc GETTER [options]
        where GETTER must be one of:
        · cover
        · lyrics
        · artistphoto
        · artistbio
        · similarartists
        · similarsongs
        · albumreview
        · albumlist
        · tags
        [...]


One line:

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10

Example output:

1  211  21.1%  ls
2  189  18.9%  sudo
3  58   5.8%   man
4  52   5.2%   cd
5  43   4.3%   ping
6  40   4%     apropos
7  34   3.4%   less
8  22   2.2%   cat
9  18   1.8%   which
10  18   1.8%   aspell

This site provides a little more information.


Network problems under dualboot with win 7

The problem is described here:
https://sites.google.com/site/easylinuxtipsproject/internet#TOC-No-wired-or-wireless-internet-on-a-dual-boot-computer

  This may be due to a flaw in Windows, which can be repaired easily.

  If you have a dual bootable PC with Windows, and you've just used Windows, you may not get an IP address after a reboot in Linux. And so no internet connection.

  This has the following reason: every network card has a unique MAC address. This address is ingrained in your NIC. The DHCP server in your router remembers this MAC address.

  When you access the internet in Windows and then reboot in Linux, in many cases you'll get no IP address from the DHCP server in your router. Because this server will recall that it previously issued an IP address for that very same MAC address, and won't issue a new one.

  You can solve this by forcing Windows to release the IP address, before you reboot the PC. By the way: Linux by default does release the IP address on shutdown. So a reboot from Linux into Windows causes no problems.

  Tip: Did you forget to force Windows to release the IP address, and you don't want to boot Windows to do it as yet? Then simply boot Ubuntu or Linux Mint twice in a row. After the second boot of Ubuntu or Mint you can probably connect.

  A. Manual method
  1. Open a DOS window in Windows

  Windows XP:
  Start - Programs - Accessories - Command Prompt

  Windows 7:
  Start - All Programs - Accessories - Command Prompt

  Type:
  ipconfig /release

  (note the space between ipconfig and /release)

  And press Enter.

  B. Semi-automatic method
  By means of a shortcut on your desktop, you can apply a semi-automatic solution for this.

  Open Notepad
  Windows XP: Start - Programs - Accessories - Notepad
  type the following text:
  ipconfig /release
  Save this text file as release.bat and place it on your desktop. Now you can always simply double click this file, before you exit Windows.

  As I said, Linux releases the IP address by default on shutdown. So a reboot from Linux into Windows causes no problems.


Had the same error, the following patch fixed it:

Open /usr/share/anki/aqt/qt.py, and change line 13 from:

from PyQt5.QtWebEngineWidgets import QWebEnginePage

to:

from PyQt5.QtWebEngineWidgets import *

Then save the file and that should do it.

Source: https://bugs.launchpad.net/ubuntu/+source/anki/+bug/1825722


Same problem here since fresh install of 12.10 64bits. My card is AMD Radeon HD 5450 / catalyst 12.6.
I had no problem on my previous 12.04.

After logging graphically, there is a black blinking cursor overlaid on X11, and this cursor is captured when doing a full-screen screenshot.

The black cursor is the input of the Alt+F1 tty : if I use Alt+F1, I do not switch to the usual black console but the console text is overlayed on top of X11.


How should i set up dual boot of my usb for ubuntu(full install) and tails(with persistent storage)?

Full Install Ubuntu USB with Tails Persistent ISO Option
There are various methods of making a Ubuntu Full install that boots in both BIOS and UEFI mode: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step
The simplest method is to flash a Full install image to the USB: How should I make my partitions for a Full Install USB?
Once the Full install USB has been created, expand the FAT32/NTFS Data partition to fit the Tails ISO file, copy the ISO file to the USB.
Copy The Tails menuentry to /etc/grub.d/40_custom on the USB
menuentry "Tails-4.12-ISO"{
    set isofile="/iso/tails-amd64-4.12.iso"
    loopback loop (hd0,1)$isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 quiet findiso=$isofile
    initrd (loop)/live/initrd.img
}

Boot the Full install USB and run sudo update=grub to add Tails to your boot menu.
Note that the menuentry will vary with the version of Tails.
Ref: https://tails.boum.org/blueprint/usb_install_and_upgrade/archive/
Persistence
If you start Tails from a USB stick, you can create a Persistent Storage in the free space left on the USB stick. The files and settings stored in the Persistent Storage are saved encrypted and remain available across different working sessions.
See: https://tails.boum.org/doc/first_steps/persistence/index.en.html
Neither Rufus, balenaEtcher or gnome-disk provide for Persistence.


Location of the setting file of indicator-multiload

The setting is stored in dconf.

To backup, run the following command:

dconf dump /de/mh21/indicator-multiload/ > ./backup

And to restore it, run the following:

dconf load /de/mh21/indicator-multiload/ < ./backup


Custom GTK Themes always have menu bars with no padding

Simple answer is those themes are incompatible with your system. Both the themes require GTK+ 3.20 or later, whereas Ubuntu 16.04 LTS has GTK+ 3.18 (or some lower version, you can check it by running apt-cache policy libgtk-3-0). So naturally those themes don't work properly in your system.

You can try requesting the developers of these themes to provide support for GTK+ 3.18 and hope that they'll do so.

You may also consider upgrading to a newer release like Ubuntu 17.10 or Ubuntu 18.04 LTS, both have GTK+ 3.22.


Make sure you have installed related wireless drivers.

Workaround:

When it gets disconnected, first restart the network manager:

  sudo service network-manager restart

Then bring back the tray applet:

  nm-applet

If this works, the solution for now, is to make a bash script which you can simply execute when it gets disconnected again.

Running a command like,

  ping www.google.com -S 1

will help with keeping the connection alive.


Network Manager keeps creating new profiles for the same network

After searching for a couple of days, I finally found the solution!

Open your terminal and type in the following.

sudo nautilus

This will open your file manager with root permission.

Go to the following location with your file manager:

/etc/NetworkManager/system-connections

Delete all networks located in this folder.

(there were some networks in this folder that were not shown by the network manager, deleting everything fixed my problem)

After that just restart your pc.

All your saved network connections will be deleted but the problem will disappear.


Yes, attach the containers to the host network.
Use --network host with docker run and your container will be connected to your RPI's network and will see all its interfaces.
Then you can fiddle with VPN.


No internet connection on Virtualbox (Windows 7 as guest, ubuntu 13.04 as host)

I was having the same problem on Ubuntu 12.10 64bit using Virtualbox 4.2.22. Here are the steps I took to solve my problem:

Open Virtualbox Manager
Select the machine you cannot get internet on in the left pane
Click the Settings button in the top menu
Click Network in the left pane in the settings window
Switched to Bridged Adapter in the Attached to drop-down menu
Select the name of the network adapter you are currently using on your host machine. I am using wireless so I chose eth0 which is my wireless network adapter. You can check which adapter you are currently using by opening the terminal (CTRL+ALT+T by default) and running ifconfig. It will probably be the eth adapter that shows an inet addr and shows data transfer next to RX bytes.
Under Advanced, make sure the machine is using the Desktop Adapter Type
Under Advanced, make sure Promiscuous Mode is set to Allow All
Under Advanced, make sure Cable connected is checked on
Hit OK to save your changes
Start your VM

At that point you should be able to start a web browser in your VM and get a connection. This video provided the information I listed above, even though they are using a Windows 7 host with a Windows Server guest.
This is an image showing an example of the settings you need (taken from this answer).


Access and edit .bashrc via ssh on terminal

If you want to load environmental variables from .bashrc, you can use

source ~/.bashrc

If for some reason you want to execute it, you have to change permissions first:

chmod u+x ~/.bashrc

After that, you can execute it with

~/.bashrc

However, it doesn't do that much, as it only initializes your shell options.


Is it possible for a network administrator to detect easily if I am running Ubuntu on VirtualBox using NAT mode for networking? If yes how to hide it?

If you are using a NAT Virtual Card, then it should not be detectable outside of the host computer. Virtualbox uses the host's network stack to perform network operations when operating with a NAT Virtual Network Card. This is not the case if you are using a Bridged Network Card, since Virtualbox will bypass the host networking stack in order to expose the virtual machine to the wider network.
To Quote the Virtualbox Manual:

The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet; you cannot run a server this way unless you set up port forwarding (described below).
The network frames sent out by the guest operating system are received by VirtualBox's NAT engine, which extracts the TCP/IP data and resends it using the host operating system. To an application on the host, or to another computer on the same network as the host, it looks like the data was sent by the VirtualBox application on the host, using an IP address belonging to the host. VirtualBox listens for replies to the packages sent, and repacks and resends them to the guest machine on its private network.

For further reading on the subject, you can check out Chapter 6 of the Virtualbox Manual


mate-tweak: "window manager is unknown" ubuntu 17.10

You do not need sudo to run mate-tweak.

Usually when started from System -> Preferences -> Look and Feel -> MATE Tweak it does not ask for password (no need of sudo here).

The problem may be caused by wrong permissions of ~/.config directory. You can try to restore owner with:

sudo chown -R $USER:$USER ~/.config


Remove windows XP after installing Ubuntu

GParted would probably be your easiest solution.  Just delete the NTFS partition and run update-grub.  Both would be need to run as root/via sudo.


python installed in ubuntu but python command not found

As suggested in comments, you could create an alias as follows:
alias python='python3'

by adding it to the ~/.bashrc file at the end of this file, exiting and reloading it in the current terminal using the next command: . ~/.bashrc
Or using linking:
As you can see below, my python points to python2, python2 points to python2.7.
To achieve the same, use sudo ln -s /usr/bin/python2.7 /usr/bin/python2 && sudo ln -s /usr/bin/python2 /usr/bin/python
If you want python pointing to 3th version, you could use the same, but the last command should be: sudo ln -s /usr/bin/python3 /usr/bin/python
Example
$ whereis python
python: /usr/bin/python3.7 /usr/bin/python2.7-config /usr/bin/python2.7 /usr/bin/python3.7m-config /usr/bin/python3.7-config /usr/bin/python /usr/bin/python3.7m /usr/lib/python3.7 /usr/lib/python2.7 /usr/lib/python3.8 /etc/python3.7 /etc/python2.7 /etc/python /usr/local/lib/python3.7 /usr/local/lib/python2.7 /usr/include/python3.7 /usr/include/python2.7 /usr/include/python3.7m /usr/share/python /usr/share/man/man1/python.1.gz
user@lenovo:~$ ls -ailh /usr/bin/python*
1446954 lrwxrwxrwx 1 root root    7 жов 10 14:32 /usr/bin/python -> python2
1446952 lrwxrwxrwx 1 root root    9 жов 10 14:32 /usr/bin/python2 -> python2.7
1465834 -rwxr-xr-x 1 root root 3,6M лис  7 12:07 /usr/bin/python2.7
1447155 lrwxrwxrwx 1 root root   33 лис  7 12:07 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
1447156 lrwxrwxrwx 1 root root   16 жов 10 14:32 /usr/bin/python2-config -> python2.7-config
1442842 lrwxrwxrwx 1 root root    9 лют 12 00:23 /usr/bin/python3 -> python3.7
1449245 -rwxr-xr-x 2 root root 4,9M лис 20 11:21 /usr/bin/python3.7
1447339 lrwxrwxrwx 1 root root   33 лис 20 11:21 /usr/bin/python3.7-config -> x86_64-linux-gnu-python3.7-config
1449245 -rwxr-xr-x 2 root root 4,9M лис 20 11:21 /usr/bin/python3.7m
1447340 lrwxrwxrwx 1 root root   34 лис 20 11:21 /usr/bin/python3.7m-config -> x86_64-linux-gnu-python3.7m-config
1447341 lrwxrwxrwx 1 root root   16 жов  2 15:31 /usr/bin/python3-config -> python3.7-config
1442843 -rwxr-xr-x 1 root root  384 січ 30  2019 /usr/bin/python3-futurize
1442847 lrwxrwxrwx 1 root root   10 лют 12 00:23 /usr/bin/python3m -> python3.7m
1447342 lrwxrwxrwx 1 root root   17 жов  2 15:31 /usr/bin/python3m-config -> python3.7m-config
1442844 -rwxr-xr-x 1 root root  388 січ 30  2019 /usr/bin/python3-pasteurize
1447157 lrwxrwxrwx 1 root root   14 жов 10 14:32 /usr/bin/python-config -> python2-config
1455649 lrwxrwxrwx 1 root root   58 лип 10  2019 /usr/bin/pythontex -> ../share/texlive/texmf-dist/scripts/pythontex/pythontex.py
1450999 -rwxr-xr-x 1 root root  306 лип 10  2019 /usr/bin/pythontex3


How do I disable my talking login screen?

The key combination you accidentally used was probably Ctrl + S. It is a toggle switch, so if you use it again, Orca will quit and not bother you at next logon.


The problem was evidently that the file was not using a .php file extension. While Unix-like systems typically don't care what the file extension is (i.e. programs should be able to tell filetype without the extension in most cases), the web server does rely on the file extension to tell it whether or not it needs to do preprocessing.

The solution, of course, is to use a .php extension for the file rather than some other extension.

As a suggestion for troubleshooting in the future, the linked image from the text editor shows based on its coloring that it, in fact, believes something stops at the > character in the if statement. While it is easy to identify this as the result of a wrong file extension in retrospect, it could have been a clue that the issue did not lie in an error in the web server.

Credit for the solution goes almost exclusively to md5madman on for the answer to this question on Stack Overflow.


How to create sources.list.d directory in ubuntu 16.04

By default that directory is empty, and if you did had any files in there but deleted the directory permanently (with rm -rf for example) you can't easily recover the files anyway so it's just a matter of creating the directory again like @karel mentioned in the comment above:

sudo mkdir /etc/apt/sources.list.d


Ubuntu doesn't work after installed in win8

You need to boot into a live CD/USB and install & run boot-repair.


Are you modifying .cpp (or .C .cc etc.) files or header files? Some Makefiles are written very poorly and don't have decent dependency information (gcc -MMD or makedepend). This means the project is not rebuild correctly if you modify some files (often header files). You can check what files are triggered by modification (and why) with the command:

make --debug=b -n


Increasing MAX UPLOAD limit for Word Press (I Tried it all)

Seems you have edit php.ini in wrong location.
Create in document root and open in browser this file, name it like info.php:

<?php
phpinfo();

Find where php.ini located(from browser output), change or add lines:

upload_max_filesize = 64M
post_max_size = 64M
file_uploads = On


How to make unity set window properties (sticky, on top) to some windows (google talk)

See http://wiki.compiz.org/WindowMatching, a specific "on top" example, as well as a similar Q&A (for reference):

one way would be to install CCSM,
learn to (regex) identify your window,
and finally use CCSM's Window Rules plugin (as described in more detail in the links above) to achieve your goal.

Note that CCSM should be handled with care (or be avoided altogether).


SSL3_GET_RECORD:decryption failed or bad record mac

It only seems to be happening on this website.

I think it is a bug in the site itself. And it only happens deep inside the connection, i.e. the critical phase of SSL (the initial handshake) is long done. You will probably fail to receive the data using another program or the browser too.


Wine: How can I make Wine applications look like Windows 8?

Take a look at this post (really useful) or at this article (though it's a bit outdated, it could sill work)

An idea would be to use GTK themes for wine, namely a specific Windows 8 GTK theme. Details here, as initially posted in a comment above by @ElderGeek.

But gtk themes for wine can be used only with the winehq-staging package.


1-day old kubuntu 15.10 doesn't close windows even though the program is closed

Eeeer, I don't know what exactly happened... I played around in the compositing configurations and set on openGL 3.1. Everything was f***ed up. switching back and rebooting kinda fixed the mentioned problem. Running now.
Kubuntu 15.10 seems like the most unstable release of an ubuntu distro I used since 8.04... very unconveniently unstable. Maybe i'm doing something wrong but I still recommend 14.04.01 LTS for nice and working release.


New Ubunu 16.04.3 installation extremely slow

You can find what is slowing down your machine using top or htop if the problem is CPU related and using iotop to find problems related to high disk usage.

You have probably to install htop and iotop before using them.

sudo apt install htop iotop

iotop must be run using sudo iotop.


Restarting network not working for a Ubuntu Server Hyper-V instance

On a standard Ubuntu Server, network-manager would be installed by default, including the file network-manager.service. However, in your case, it appears the package wasn't there, wasn't correctly installed, etc. So first, check whether the package has been installed or not:

apt policy network-manager

This will tell you if it's there. If not, install it with sudo apt install network-manager.


wget has --limit-rate option for limiting the download speed; from man wget:

  --limit-rate=amount

  Limit the download speed to amount bytes per second.  Amount may be expressed in bytes, kilobytes with the k suffix, or megabytes with
  the m suffix.  For example, --limit-rate=20k will limit the retrieval
  rate to 20KB/s.  This is useful when, for whatever reason, you don't
  want Wget to consume the entire available bandwidth.

  This option allows the use of decimal numbers, usually in conjunction with power suffixes; for example, --limit-rate=2.5k is a
  legal value.

  Note that Wget implements the limiting by sleeping the appropriate amount of time after a network read that took less time than specified
  by the rate.  Eventually this strategy causes the TCP transfer to slow
  down to approximately the specified rate.  However, it may take some
  time for this balance to be achieved, so don't be surprised if
  limiting the rate doesn't work well with very small files.

FWIW, curl also has a similar --limit-rate option for controlling both upload and download speeds. Check man curl.


This is extremely broad, and I would recommend visiting a third-party site like linuxacademy.com to learn about the basics of GNU/Linux, UNIX, and BSD.  However, here are some basics to start with to get around.  Type in each of these commands in order and see what happens.

cd
ls
mkdir test
ls
pwd
touch file.txt file2.txt
ls
rm file2.txt
ls

After doing this, then type man cd and man ls etc., and read the manual pages about each of these commands.  To get out of the manual pages type q.

When you are done exploring, visit this site - http://man.he.net/man1 - and ready every chapter until your mind explodes.  After that, please note how to exit.  Depending on whether this is a server or shell emulator, these options will help you in quitting, restarting, or shutting down.

exit
sudo reboot
sudo poweroff

Best luck in *nix land.


Ubuntu 10.04 on Dell XPS 1702x: wlan0 No such device

It looks like the solution to your problem is to update your kernel to 2.6.38

Quote from the theunsheydenrych from this forum post about the problem

  I can confirm that the wifi is working after i installed the 2.6.38
  kernel.

  I have a Dell XPS 17 702x , with Ubuntu 10.04 (Lucid Lynx)

  You helped a lot in sorting this issue out, thanks

to do this you will need to add a ppa and update the kernel from it

open a terminal and enter this command

sudo add-apt-repository ppa:kernel-ppa/ppa

then update..

sudo apt-get update

finally install the kernel and headers..

sudo apt-get install linux-headers-2.6.38-1-generic linux-image-2.6.38-1-generic

hopefully this will get your wi-fi up and running


Open the terminal.  An icon for this application will appear in the Launcher.  Right-click this icon (the one that appeared in the Launcher) and select "Lock to Launcher" from the context menu that appears.

For the other issue, please ask a separate question. (One question per post).


First disconnect you machine from internet, being connected to the internet will make installer download some packages from ineternet (if possible!) and that's why you have to wait a long time, then I think you will be able to finish installation properly, so boot loader will be installed correctly. Also try to make sure that your downloaded iso image file has been downloaded properly. You can do this by checking md5sum.


How to delete high score of the gnome-mines game?

Under Xenial Xerus the high scores for gnome-mines are contained within the text file:

~/.local/share/gnome-mines/history

If this file is deleted the high scores are removed from the game...


Ubuntu installer skips first installation type page

I found my original installation usb, and it worked, it seems it had something to do with either the way I installed Ubuntu to the usb or the USB itself, the one that didn't work was a SanDisk Ultra, while the one that did was an imation nano pmap.


Slow Ubuntu 10.04 after long time unused

Check your HDD, for examples of how to do it go to e.g. this thread.

BTW statistics show that drives most often fail within the first year or after long years of use :)


I eventually tracked down the issue to a plugin I had installed a while back that allows you to modify the header information to look like your using a different OS and browser so the sites I visited were thinking I was on Windows and using an older version of Firefox.


How to add grant permissions to a group?

You can do that by using chmod.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

chmod g+rwx <directory_name>

For more information on the use of chmod see chmod Man Page


How to unhide the recovery partition in ubuntu that is hidden in windows 7?

I was pointed to a programme in the Ubuntu Software Centre called GParted, this will let you do most things with the Recovery partition.

It appears to be a powerful tool.


Lets try this method I just tested that prevents access to any other folder but only to the one given ownership to that user.

Steps:

Create user without home directory:

sudo adduser --no-create-home koko

Then create the folders for user koko:

sudo mkdir -p /koko/k1/k2

Give access to user koko for the folder k2

sudo chown koko:koko /koko/k1/k2

Remove permission others from current home folders in /home so koko can't access those files or folders

sudo chmod 750 /home/folders

Now koko switch to usaer koko and try to access any other fodler, you will get a permission denied error, but user koko can change into the created /koko/k1/k2 folders.


How to setup the web browser to show help pages in Eclipse

Select in the menu Window -> Preferences

Then open General -> Web Browser. There select Use external web browser and select Firefox

If the entry for Firefox is missing then hit the New... button. Enter Firefox as the name and /usr/bin/firefox as the Location (which is the default location for the Firefox web browser)


Ubuntu 14.04 not using ATI Radeon HD 3450, instead using Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits)

Solved by enabling the graphics card in the BIOS.


Unetbootin has worked well for me.  Very straight forward GUI.

Also, I would always format your pen/thumb/flash drive as FAT32, as any OS can see it.

http://unetbootin.sourceforge.net/


How to install mssql-cli at UBUNTU 18 LTS?

mssql-server-2017 is not supported on 18.04 yet. You should wait for Microsoft to support it and then change your apt source file accordingly. The instruction you should find here, once it is ready:

https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017#install

Currently this only covers the installation for 16.04, and a corresponding APT repository for 18.04 does not exist yet.

As an alternative to waiting you can install Ubuntu 16.04 and use Microsofts instructions linked above to install mssql-server. 16.04 is still a supported and widely used Ubuntu version.


ASUS PN50 AMD RYZEN 5 4500U - Graphic Drivers

To fix the brightness problem you need the 5.8 linux kernel.
You can install Ubuntu 20.10 that has this kernel, or upgrade the kernel of the 20.04.1 release by running
sudo apt install linux-generic-hwe-20.04-edge

Reboot after the kernel is installed. Brightness control should work.
You don't need any additional drivers.


What DAB+ radio tuners work well with Ubuntu?

I recommend you try any of the DAB+/DVB tuners based on the Realtek RTL2839U  chipset (of which there are many); drivers for that chipset are actively developed in the community, by both people interested in the radio/TV aspect as well as people interested in the software-defined radio capabilities of the chip (it is capable of tuning to any signal between 64-1700 MHz with the appropriate antenna/software).

USB tuners are available which provide internal audio (as requested), and are capable of decoding metadata.

Here are some resources:

Driver for 3.2 kernels; others are also available
A popular USB DAB+ radio with the RTL2839U
Other models which are verified to work with the driver in (1) are:

DIKOM USB-DVBT HD (ID 1b80:d394)
NILOX DVB-T Stick N15 (ID 1b80:d393)
TRUST 16738 (ID 0bda:2832)
TERRATEC Cinergy T Stick BLACK (ID 0ccd:00a9)
TX Hollywood DVTB (ID 1d19:1101)
DIGIVOX mini II v3.0 (ID 1d19:1101)

For even more compatible models, see this Ubuntu Forums thread
Players that work with DAB+ include Kaffeine, as well as more general DVB players/applications.


Disk naming convention in preseed vs manual installation

Check your Virtual Media settings in iDRAC6. I had Virtual Media attached with Floppy Emulation checked on one of my R710's that kept displacing the SCSI disk ID's from sda to sdc. Detaching and unchecking fixed it and I was able to preseed without issue (with sda specified in partman).

You will also see in the system BIOS an extra Virtual Floppy and Virtual CD selection in Boot Options. I didn't check to see if you can disable the Virtual Media here.

Here's how to check via racadm:

/opt/dell/srvadmin/sbin/racadm -r DRACIP -u root -p XXX getconfig -gcfgRacVirtual
Security Alert: Certificate is invalid - self signed certificate
Continuing execution. Use -S option for racadm to stop execution on certificate-related errors.
cfgVirMediaAttached=1
cfgVirtualBootOnce=0
cfgVirMediaFloppyEmulation=1
cfgLCDriveEnable=1

To fix use:

racadm config -g cfgRacVirtual -o cfgVirMediaAttached 0
racadm config -g cfgRacVirtual -o cfgVirMediaFloppyEmulation 0


I am unable to enable wireless networks. How can I enable it?

Provided that the wireless adapter actually works (for example, can you try it under a Windows installation?), your options may be limited.  I had a nearly identical experience with an HP Envy dv6 7200, and posted a number of potential solutions that I tried for enabling wireless (see How do I turn on wireless adapter on HP Envy dv6 7200 under Ubuntu (any version)?).  After several days of futzing around with it, I finally returned it an bought a Dell Inspiron instead (works great with Ubuntu 12.04).

You might find it useful to step through the solutions I tried and see if any of them work for your model.

If your laptop is no longer under warranty, you can try messing with the actually wireless card itself (see Solution 3 in the above link, as well as the answer that follows).  Apparently people do have success with this approach, but obviously it's more involved and possibly risky.

Good luck!


Error "is required to build" while installing from tar.gz

tar is nothing more than a compressed file. There is not a certain way to "install" a tar. If what's inside is install-able software, it's up to the notes that accompany that software, to define how you are going to install it. Usually that notes are in plain txt file under the name of README. If there is a make file, then you will have to issue the above commands that you just mentioned. Else you will have to follow these instructions.

Though, since you are not downloading the software from a repository, you might face a series of dependencies that your machine will need. In some cases if all dependencies are identified by your package manager, all you have to do is a sudo apt-get -f install. You seem to run ./configure, which it seems like a script that runs some commands to check those dependencies. Else you will have to debug step by step the installation process, by installing the packages yourself by sudo apt-get install <package>.


MATE tries to automount floppy drive every login even if empty. How to make it stop?

Can you uncheck this setting in mateconf-editor: /apps/caja/preferences/media_automount ? On my setup I could stop the SD card automounting after every logon or resume from standby.


Instead of specifying your image as step1.png, use this (relative) path in place of it:

../media/step1.png

This should cause it to be accessed in the right place, since .. represents the parent directory of wherever the application is currently looking (in this case, apparently /home/jtp/projectnamme/data), and the actual file is located in /home/jtp/projectname/media.


Alias in .bash_aliases executes incorrectly

You need to escape the $ to prevent it being expanded by the shell; since it expands to nothing, your alias becomes equivalent to

alias print="echo a b | awk '{print }'"

Try instead

alias print="echo a b | awk '{print \$2}'"


How can I fix a microphone that gets disabled during a call?

SO. After looking into some issues other people were having with USB A/V inputs and seeing that a lot of it was dependent on which USB ports (and types of ports) were involved I decided to experiment.

When I was having issues with the microphone, the webcam was plugged
into a USB 3.0 port.
When I moved the webcam to a USB 2.0 port after
seeing that it didn't need 3.0, I lost the other USB peripherals
(keyboard/mouse) that were plugged into the neighboring ports.
When I moved the other peripherals to a different group of ports, everything is magically working as it should.

In case anyone finds this and is wondering how it was fixed: the port shuffle was a suitable workaround; the problem of fixing the disabling of components was not actually resolved.


Is it possible to change the File-System of usb without loosing data and without taking backup?

From File system  Wiki

  On Linux, ext2 can be converted to ext3 (and converted back), and ext3
  can be converted to ext4 (but not back), and both ext3 and ext4
  can be converted to btrfs, and converted back until the undo
  information is deleted.These conversions are possible due to
  using the same format for the file data itself, and relocating the
  metadata into empty space, in some cases using sparse file support.

So it seems it is not Back-Convert-Compatible and Converting from ext4 to NTFS will require Formatting  , since they are totally different File-systems , also holds true for ext4 to Fatxx format .That means without data loss

ext2 >> ext3 possible

ext3 >>ext4 possible

ext3 & ext4 >> btrfs possible

ext4 >> ntfs not possible w/o Format

ntfs >> extX not possible w/o format

Please refer this question on superuser also.


How do I pipe each command given to the shell?

You can trap and abuse bash's DEBUG signal:

trap 'bash -c "$BASH_COMMAND" | cowsay' DEBUG

Example run

$ trap 'bash -c "$BASH_COMMAND" | cowsay' DEBUG
$ echo "AU is awesome!"
 __________________
< AU is awesome! >
 ------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
AU is awesome!

However, this will still execute the command afterwards. Thanks to ilkkachu I found a way around that:

$ shopt -s extdebug
$ trap 'bash -c "$BASH_COMMAND" | cowsay; false' DEBUG
$ echo "AU is awesome!"
 __________________
< AU is awesome! >
 ------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


Issue with “Unable to access address of buffer” MInecraft 1.10.2 on Ubuntu 16.04

I had the same problem as you until I downgrade Java to version 8. And that did solve my problem. In Ubuntu I install "oracle-java8-installer" and check path and JVM arguments that it was as described above.


How to use application indicator for KDE application?

Application indicators are based on KStatusNotifierItem.

I'm not too familiar with it but here's a tutorial on how to get started. That's all you really need to get it to work, the app icon and it's menus should then render properly regardless of which desktop it's in.


Can I just download the Ubuntu ISO file to my USB and run it straight away with no installers?

The answer is yes and no.

No you cannot just copy the file to a usb and have it run, it will be missing important files to allow the boot.  You could burn the ISO directly  to a DVD(instructions HERE)  and boot from the DVD(a CD is too small for 12.10 but can be used for 12.04)

You can, however use a program to install it ISO file onto the USB so that it can be booted.

The instructions to make a bootable USB in Windows are HERE.  You can then use the USB stick to try Ubuntu.

Note: Using either the LiveDVD or the LiveUSB will allow you to try out Ubuntu and check to see if you like it and that it will support your hardware but the speed will be considerably slower.  The LiveUSB will be faster than the LiveDVD  but still slower than a full install.

When you boot from the LiveUSB you will be presented with a menu, just select Try Ubuntu and it will boot into a fully functional (but slower) Ubuntu environment.


Where can i find the lightdm folders and and images

dpkg -L lightdm

lists you all the files installed by the lightdm package.

If you want to have a look at the source code of lightdm use

apt-get source lightdm


You can do that with iptables.

On a terminal add the rule to iptables

sudo iptables -A OUTPUT -p all -m owner --uid-owner username -j DROP

where username is the user that you want to disable the Internet connection. Save the file and exit.

This will add a rule to iptables saying that any outgoing packages created by the specified user will be automatically dropped by iptables.

If you want to do the same for a complete group I sugest that instead of --uid username you use --gid-owner groupname, that will have the same effect for a complete user group.

So to prevent the group Security from accessing the Internet the command would look something like this

sudo iptables -A OUTPUT -p all -m owner --gid-owner security -j DROP

To make the rule permanent you can create a script in /etc/network/if-up.d/, add the necessary lines to it and make it executable.

As an option use iptables-save to save your current rules and restore them on boot.

Save the current iptables rules

sudo iptables-save > /etc/iptables_rules

Open /etc/rc.local with your favorite text editor and at the end of the file add

/sbin/iptables-restore < /etc/iptables_rules

That will restore the saved rules on each boot.

For more information visit the [iptables manpage] page for more information on several iptables options.


Ubuntu "Server" but with a better terminal?

You shouldn't use the server directly at all, but rather connect to it from your host. On almost any kind of server, you'll want to have openssh-server installed. Then you just open a terminal on your host and connect to it using ssh. You might want to run a byobu/screen session on the server.

In other words; use your normal terminal emulator and connect to the server.


That might be because of the port you are using. I heard that some ports are supposed to be reserved for keyboard/mouse. If you use a different port, like the one at the back instead of the front), this may help. I know that Windows has issues if I change the mouse to another port while it runs. and if I change to another port, it may not be detected at all as Windows starts, although Ubuntu will detect it no problem.

BTW: Try to avoid hubs for keyboard and mouse.


How do I restore pip after upgrade from ver 9 to ver 18 on Ubuntu 18.04 Desktop Vm?

You don't have to remove python2.7 as well. Create a symbolic link at /home/person/.local/lib/python2.7/site-packages/pip which references to file /usr/local/bin/pip. Open the terminal and type:

sudo apt install python-pip # installs version 9.0.1
cd /home/person/.local/lib/python2.7/site-packages/
rm -r pip
which pip # check pip location
sudo ln -s /usr/bin/pip /home/person/.local/lib/python2.7/site-packages/pip # /usr/bin/pip may be /usr/local/bin/pip for some users

Check to see if pip 9.0.1 is installed.

python2.7 -m pip --version


Showing progress in whiptail while using sshpass and SCP

I am unfamiliar with sshpass. scp however, has a progress bar using the -3 option.

 $ls -l
-rw-r--r-- 1 root     root     50043369 Jul 17 21:59 gv.tgz

j0h@M0h:~$ scp -3 -P 7935 gv.tgz  j0h@123.1.2.3:/home/j0h/
j0h@123.1.2.3's password:
gv.tgz                       100%   48MB  11.9MB/s   00:04

Durring the upload, the last line was changing, indicating progress from 0% to 100%. is this something you can use?


How do I get resolvconf to regenerate resolv.conf after I change /etc/network/interfaces?

service networking restart is not always a reliable way of down-upping all interfaces.

The resolvconf -u command only updates resolv.conf from resolvconf's own database. You need to update the database.

To update the database you have to call resolvconf with the -a or -d option. That happens behind the scenes when you run ifup or ifdown. So, normally, as with any other change to /etc/network/interfaces, to activate changes to the dns-* options you have to ifdown the interface in question and ifup it again. Or you can reboot.

If you want to make changes to an interface without ifdownupping it (perhaps because you are administering the machine remotely and happen to be connected via that interface, natch) then you can achieve the same result by running resolvconf directly from the command line. This requires a bit more knowledge of resolvconf's semantics. Assume the relevant /e/n/i stanza is

iface IIII FFFF static
    address ...
    ...
    dns-nameservers X.X.X.X Y.Y.Y.Y
    dns-search SSSS

where FFFF is an address family ("inet" or "inet6").

To activate these dns-* options you run resolvconf as follows (yes, with newlines in the string piped to resolvconf).

echo "nameserver X.X.X.X
nameserver Y.Y.Y.Y
search SSSS" | sudo resolvconf -a IIII.FFFF

For the stanza given in the question this would be the following.

echo "nameserver 192.168.3.45
nameserver 192.168.8.10
search example.com" | sudo resolvconf -a eth0.inet

Consult the resolvconf(8) manual page and the resolvconf package README file (/usr/share/doc/resolvconf/README.gz) for more information.


Is it possible to get VM guest ip in Nat network virtualbox

I believe you can use nmap like this. You may first need to install it:

sudo apt-get install nmap

Then, you can find your VM, if it's running and online:

nmap 192.168.15.1-254

It should show up in the results.


Ubuntu 15.04 Client doesn't create xrdp desktop?

There is currently a bug with xrdp 0.6.1-2 doesn't work via sesman-X11rdp. See bug report bug report. At the time of this answer the bug was not fixed, but there is a possible workaround here.

There are many workarounds others have posted to this site.I hope this helps! Good luck. :)


Cannot change screen resolution in ubuntu 12.04

Are you using a VGA (blue din) cable, and is it a Samsung Monitor ? Try a DVI cable. This is common on Ubuntu derivatives (such as Zorin/Mint etc.). Are you using an nVidia driver ? Nomodeset can also work, have you tried Grub Customiser ? I am pretty sure it works by tweaking GRUB_GFXMODE.


Can Ubuntu open .tgz archive from TotalCommander?

Yes you can.

.tgz is the same as .tar.gz, just like .jpg and .jpeg represent the same file extension.


How to completely disable Nouveau, as other tutorials aren't helping?

ctrl+alt+f1
Login
sudo service lightdm stop
sudo modprobe -r nouveau
sudo service lightdm start


Browsers can not open the HTML from HDD (ebook)

The spaces in one of the directory names is breaking things for you. USB copy has the spaces replaced with %20. You can Either rename the directory removing the spaces By Changing the Directory name to PolarisSFCDvol2 or the easiest solution is to right click on the file in your file manager (Nautilus suggested) and choose "open with Firefox Web browser"


Ubuntu DWM using beep as battery warning

Hi everyone I thought I should post my solution as this is a problem many are likely to face when using a WM like dwm.

I have found a solution that plays a short mp3 in the background on boot as well as resume from sleep. This seems to have worked perfectly I also took advantage of the resume script to remap my custom keys as these are lost after sleep. Feel free to pm me if anyone needs help in the future.
-----------------------------------------------------------------

.xinitrc

Modprobe needed to enable system beep that is blacklisted on ubuntu.

Note:
init is my executable initialisation script to be called on startx from .xinitrc and resume from 99Wake.sh

Note:
batt_warn is my executable script to check the battery

slstatus -d &
nm-applet &
./suckless/clipmenu/clipmenud &

./suckless/init &

modprobe pcspkr &
while true; do
    ./suckless/batt_warn
    sleep 15s
done &

exec dwm

init

Sets caps as esc if pressed and as ctrl if used as leader
Sets reasonable backlight and volume
Uses mpv to play short mp3 clip start.mp3

#!/bin/bash
setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape'
setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape;Control_L=Escape;Control_R=Escape'

xbacklight = 50 &
amixer -q sset Master 75% &
amixer -q sset Beep 35% &

cd ~ && mpv suckless/start.mp3 &

batt_warn
Polls battery using acpi and plays beep if below 5% and discharging

#!/bin/bash
BATT=$( acpi -b | sed 's/.*[charging|unknown], \([0-9]*\)%.*/\1/gi' )
STATUS=$( acpi -b | sed 's/.*: \([a-zA-Z]*\),.*/\1/gi' )
if ([ $BATT -le 5 ] && [ $STATUS == 'Discharging' ]); then
    beep && sleep 0.05
    beep && sleep 0.05
    beep && sleep 0.05
fi

99Wake.sh

This file has been made executable with chmod +x
And moved to the dir /usr/lib/pm-utils/sleep.d\
Scripts in this dir are run on resume. Here I am calling init again.
Note: As I am storing the script in my local users directory i had to add the sudo line but this was just done so .xinitrc and 99wake.sh could share the same init file rather than duplicating.

#!/bin/bash
case "$1" in
thaw|resume)
sudo -u matthew env DISPLAY=:0 zenity --info --text "do stuff on resume"
./home/matthew/suckless/init
;;
esac


Can I install ubuntu 20.10 or 20.04LTS on dual boot with windows 10 without USB Drive?

20.04 is a LTS version, i.e. Long Term Support -> 3 or 5 years support --> more stable
20.10 is a more recent version
I'd recommend using 20.04
There seem to be ways to install linux without usb drive - I have never tried them
My main recommendation is to make a good backup of your PC before you start even if you do it with a usb-drive !
Any issues with your install without a backup and you'll have an unusable PC.
https://linuxnetmag.com/how-to-install-linux-without-usb/
the site says the following
Using UNetbootin to install Linux in your PC directly from the hard drive.
First download UNetbootin from http://unetbootin.github.io/.
Then, download ISO image for the Linux distributions or flavors supported by UNetbootin.
Next, you have to launch UNetbootin and choose Diskimage, select ISO, and then browse through to pick the ISO image file for the Linux.
Choose Hard Disk for Type, C: for Drive and then you click on the OK button
This will copy files from the selected ISO image straight to your hard drive, add a bootloader to your hard drive, and then you will see an “installation complete” message displayed.
Now after you reboot your Windows PC, it will show a UNetbootin boot entry. You can choose this new entry to boot into the Linux OS and finish installing Linux on your hard drive. Make sure you choose to install it alongside Windows and do not overwrite the Windows partition.
Once the installation is finished, it will reboot into the installed version of Linux through Grub. You can use these instructions for adding Windows to Grub menu after installing Ubuntu or Debian based Linux distributions.
Once Linux has been installed, you can boot back in Windows and launch UNetbootin one more time to delete UNetbootin from your system.


Start a tmuxinator session in gnome-terminal on login

Don't know anything about tmuxinator so excuse me if offbase here

Your 'Startup Applicaton' is simply a .desktop, typically stored in ~/config/autostart/

What you may want to try is to simplify the Exec=, a number of ways

A start up delay can be set on a new line in the .desktop, Ex.

X-GNOME-Autostart-Delay=10

Additionally you could have the command run in a terminal with a line

Terminal=true

What may also be useful is to consider running your actual command thru a script, then setting the Exec= line to

Exec=/path/to/scriptname

If your script runs fine then it should work ok in the Startup


WiFi not working on laptop Acer Aspire E15 (E5-576G-55Y4)

Anzipex try retarting your network manager. Follow this link for more get help
How to restart WiFi connection?


Ruined my system, how to save all firefox data?

Your firefox bookmarks, cookies and passwords should be in ~/.mozilla. All of the items except your logins can be copied over and used on the new OS. The login info will be encrypted and cannot be decrypted when transferred between os'es. So, firefox will see that there is a file with the login info, but will not be able to use it.


The best solution for what you want is probably using SLAAC (with optionally stateless DHCPv6 / other config flag for communicating the DNS resolvers) and enabling privacy addresses on your Ubuntu boxes. By default it uses the EUI-64 algorithm based on the MAC address, but that is easy to change in /etc/sysctl.d/10-ipv6-privacy.conf:

# IPv6 Privacy Extensions (RFC 4941)
# ---
# IPv6 typically uses a device's MAC address when choosing an IPv6 address
# to use in autoconfiguration. Privacy extensions allow using a randomly
# generated IPv6 address, which increases privacy.
#
# Acceptable values:
#    0 - don’t use privacy extensions.
#    1 - generate privacy addresses
#    2 - prefer privacy addresses and use them over the normal addresses.
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0

In your case you probably want to set both those options to 2.


RDP From Windows 8.1 To Virtualbox Ubuntu 15.04

Maybe you should configure port forwarding in Virtualbox:

Open Virtualbox and open the settings dialog for your virtual machine
Choose "Network" -> Advanced -> Port Forwarding
Add a new rule with the "+" button on the right
Enter a new rule name "RDP"
Protocol = TCP
Host IP = 127.0.0.1
Host Port = 3389 (for the port number: see this link, "Forward TCP port...")
Guest Port = 3389
Leave the Guest IP addresses empty
Confirm everything
Restart the vm

This means: forward all tcp traffic coming into host port 3389 to the guest (vm machine port) 3389.


"Failed to execute default File Manager" error when opening the trash folder

Try to re-install the file manager i am going to assume you are using the default manager nautilus.

sudo apt-get remove nautilus

This will un-install then you can re-install with

sudo apt-get install nautilus

Hopefully this will replace any missing files or folders an get it working again.


Phoronix discussed the steps required for a different Tegra 3 device, so it's doable, but it is by no means as easy as an x86 or X86-64 install with a standardized distro.

Also, Rivera151 reported elsewhere:

  The MS agreement with manufacturers of Windows RT tablets specifically
  states that the manufacturer may NOT provide means to access the UEFI
  settings (i.e. like BIOS settings, you would set the boot
  disk/partition here). Thus, there will not be a way of booting to an
  alternate partition until that agreement gets fixed.

Therefore, I am not optimistic, contrary to my earlier optimism.


Right now the options are very limited. The available apps can be found by running:

snappy search '*'


Access python os.environ var in virtualenv with sudo?

BASH Variables are scoped.  This means they are only available to certain things and not shared system-wide.

When you instantiate a variable, it is available for the current shell (x="apple").  When you export, that variable is available in the current shell, and subsequent shells/functions (export x="apple").  If you close that shell/terminal, you lose that variable.

For this reason, common variables are added to user profiles so that they are loaded properly.  This is typically done using export in ~/.bashrc or ~/.bash_profile.

Similar to how the variable is lost if you close your terminal, these variables are lost if you switch users.

If you want root to have access to a BASH variable, you have to declare the variable within the root shell.  You can duplicate your (assumed) exports in your ~/.bashrc into the root user's /root/.bashrc file, and have that sourced properly.

You may be able to export/push all variables by looking at man sudo (look at -E), as I know it has a few options on whether to switch to the new user's directory and possibly share variables, but this isn't the approach I would take.

Instead, similar to how you'd share a web server directory (/srv/www/) by having a shared group own the file (www-data, g+rwx), and making sure only that group can read the file (o-rwx), we will create a shared file to source and secure against unauthorized users. So,  you can add the following to each user's ~/.bashrc file that is in the group and you want to have access to the variable:

$ touch /srv/www/.bashrc_shared
$ chown www-data:www-data /srv/www/.bashrc_shared
$ chmod g+rwx /srv/www/.bashrc_shared
$ chmod o-rwx /srv/www/.bashrc_shared
$ vim /srv/www/.bashrc_shared

#!/bin/bash

export MY_SECRET_VAR="super_secret_var"

Now, ensure ~/.profile sources this file, or your ~/.bashrc which then sources this file, or run sudo with the -i flag:

cat ~/.profile
# ~/.profile
#

[[ -f /srv/www/.bashrc_shared ]] && source /srv/www/.bashrc_shared

OR

sudo -i your_command # Source config files


I figured it out: on a Dual Boot, you can enter these settings in the Menu where you choose which OS to boot into. In my case, that is the GRUB menu. There, instead of choosing Windows or Ubuntu, I select the UEFI settings.


How to recover Ubuntu from changes made to files in gnome-shell/theme/

You have to reinstall the packages which provide these files - backup and reinstall:

Backup:
cp /usr/share/gnome-shell/theme/gnome-classic.css ~/
cp /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource ~/

Reinstall:
sudo apt-get install --reinstall gnome-shell-extensions yaru-theme-gnome-shell

Then reboot.


sudo gedit /etc/default/grub
Change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="acpi_osi=Linux"
Save the file & exit gedit.
Then type: sudo update-grub
Finally sudo reboot


What is the explanation behind the key combinations to enlarge and decrease font size in terminal?

By default its actually Ctrl + and Ctrl -.

Depending on your keyboard layout you'll need Shift to get a +, like on a US keyboard, where + is Shift =. On such a keyboard Ctrl + is actually Ctrl Shift =.


What is the safest way to remove a swap partition?

Try to monitor your swap memory usage in a terminal with top or htop, which is more user friendly.  If you don't have htop installed, you can install it with:
sudo apt-get install htop

With your amount of RAM, I would say that your swap usage is 0% a lot of time.
If you want to format your swap partition, first you have to disable the swap with the swapoff command.  Then format the partition with mkfs.ext4 or mkfs. After that you need to edit your /etc/fstab so that the system will mount your new partition at the boot time.
You can also use a graphical application like Disks, which ships with Ubuntu.


Computer stuck after quitting installation

You could try to hold the button longer, it sounds weird to me that it won't turn of using the power button. If it still does not want to turn off, the best thing you can is unplug the computer, as one time doing that won't mess up the system. (Or you have bad luck.) And why did you stopped the installation in the first place? Ubuntu can do the partitioning for you!


Screen resolution is sometimes too narrow on boot, fixed by rebooting

I don't know why it would switch but as a temporary solution does doing xrandr to force it to the specified mode you want work?

xrandr --output LVDS1 --mode 1366x768

You can also check this article for more useful information:
https://wiki.ubuntu.com/X/Config/Resolution#Setting_xrandr_changes_persistently


Just install GRUB from your Ubuntu:

sudo update-grub
sudo grub-install /dev/sda

In this case GRUB is installed to /dev/sda which is what your computer seems to boot automatically.


Is it possible to boot a LiveCD of Ubuntu via PXE using HTTP (not NFS)?

yes, ubuntu iso
     for test on windows i am use tftp32 and freenfs and vmware
          c:\tftpd32\ubuntu\ (unziped iso)
       path tftp32 c:\tftpd32\
       path nfs c:\tftp32\

LABEL Ubuntu linux Install
KERNEL ubuntu/casper/vmlinuz
APPEND root=/dev/nfs boot=casper only-ubiquity netboot=nfs nfsroot=192.168.0.1:/ubuntu ip=192.168.0.5:192.168.0.1:192.168.0.1:255.255.255.0:linux::none file=preseed/ubuntu.seed initrd=ubuntu/casper/initrd.lz quiet splash locale=ru_RU --

LABEL Ubuntu linux Live Boot
KERNEL ubuntu/casper/vmlinuz
APPEND root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.1:/ubuntu ip=192.168.0.5:192.168.0.1:192.168.0.1:255.255.255.0:linux::none file=preseed/ubuntu.seed initrd=ubuntu/casper/initrd.lz quiet splash locale=ru_RU --


Geforce GTX 1650 - nvidia-settings 'ERROR: Unable to load info from any available system'

It looks like the Intel GPU is selected in your system (and disabled in BIOS) as the primary.

Run the followng command:

sudo nvidia-xconfig

Then run this command to select the Nvidia:

sudo prime-select nvidia

or, for Intel use the following command:

sudo prime-select intel


How do I replace the following missing files?

Open a Terminal window (Ctrl+Alt+T) and run this command:

sudo apt-get install --reinstall software-center


`ls -l` output duration instead of date/time eg "5 mins"/"6 hours"/"7 days" etc?

I use stat to get metadata info on the files. Some examples:
stat -c $'%y\t%n' * | sort -n

Output looks like this:
2020-01-27 11:52:25.681249958 +0200 CHANGELOG.md

Then to lookup a single file
stat CHANGELOG.md

and output looks like this:
  File: CHANGELOG.md
  Size: 94          Blocks: 8          IO Block: 4096   regular file
  Device: fd00h/64768d  Inode: 6029378     Links: 1
  Access: (0644/-rw-r--r--)  Uid: (  998/example)   Gid: (  998/example)
  Access: 2020-11-12 17:47:34.768793021 +0200
  Modify: 2020-01-27 11:52:25.681249958 +0200
  Change: 2020-11-12 17:47:02.282093672 +0200
  Birth: -

Otherwise you might need a small bash script to show you the difference between when the file was created and current time.
 LastUpdate="$(stat -c %Y myfile)"
 now="$(date +%s)"
 let diff="${now}-${lastUpdate}"


I assume that you don't need MySQL anymore and you have already taken backup of your important databases. I suggest you to take backup of your important MySQL databases.
Note: Your all mysql data will be lost.
First make sure that MySQL service is stopped.
sudo systemctl stop mysql

Remove MySQL related all packages completely.
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*

Remove MySQL configuration and data. If you have changed database location in your MySQL configuration, you need to replace /var/lib/mysql according to it.
sudo rm -rf /etc/mysql /var/lib/mysql

(Optional) Remove unnecessary packages.
sudo apt autoremove

(Optional) Remove apt cache.
sudo apt autoclean


Why won't my Bluetooth keyboard pair with my desktop?

I finally found a command that worked:

sudo hciconfig hci0 sspmode 0

This command sets Secure Simple Pairing mode to 0 for the device hci0. This was a new pairing mechanism introduced in the Bluetooth 2.1 spec. However, it seems to cause trouble with my keyboard and disabling it solved the problem for me.

There is still one downside - the setting doesn't persist. That means I need to run the command on every boot. I'm still searching for a way to make the setting persist.

Source: http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=37482


Ubuntu 16.04 with LAMP - MySQL 5.7 show_compatibility_56

SOLVED

This is the information I found:
1. Problem description:

When performing a MySQL database backup, the following error message is received in the backup report:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE / FROM GLOBAL_STATUS': The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled: see the documentation for 'show_compatibility_56' (3167)

Cause:

show_compatibility_56 is deprecated

Resolution:

Run the following query in your MySQL database:

set @@global.show_compatibility_56=ON;

So it looks like it was a very simple fix after all. I ran the code in the MYSQL console inside PHPMYADMIN.

Credit for the fix goes to this page: https://support.servosity.com/hc/en-us/articles/221071687-ISSUE-The-INFORMATION-SCHEMA-GLOBAL-STATUS-feature-is-disabled-see-the-documentation-for-show-compatibility-56-


Is blu-ray writing support reliable yet?

I've so far found blu-ray writing using growisofs to Verbatim BD-R disks using an LG BH10LS30 blu-ray writer to be reliable.  I've only burned a small handful of disks so far, though.


XRDP stopped working after Java 8 install

The same issue happened to me after running sudo apt upgrade.
The following commands fixed the issue:

sudo apt remove xrdp
sudo apt purge xrdp
sudo apt autoremove
sudo apt install xrdp
sudo systemctl enable xrdp
sudo service xrdp start

I think apt autoremove is the key command.


Ubuntu installer can't find unallocated space on a M.2 PCIe NVMe Solid State Drive

You don't need to reinstall Windows...
Make sure to have a backup of your important Windows files!
You've got a single SSD set up in RAID mode, and the Ubuntu installer won't recognize your SSD until you switch your disk setting in the BIOS from RAID to AHCI.
Making that switch comes with some problems though, as you've seen, Windows will no longer boot.
Do it this way...
Source: See http://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/

Right-click the Windows Start Menu. Choose Command Prompt (Admin).
If you don’t see Command Prompt listed, it’s because you have already been updated to a later version of Windows.  If so, use this method instead to get to the Command Prompt:
Click the Start Button and type cmd
Right-click the result and select Run as administrator
Type this command and press ENTER: bcdedit /set {current} safeboot minimal
If this command does not work for you, try bcdedit /set safeboot minimal
Restart the computer and enter BIOS Setup (the key to press varies between systems).
Change the SATA Operation mode to AHCI from either IDE or RAID (again, the language varies).
Save changes and exit Setup and Windows will automatically boot to Safe Mode.
Right-click the Windows Start Menu once more. Choose Command Prompt (Admin).
Type this command and press ENTER: bcdedit /deletevalue {current} safeboot
If you had to try the alternate command above, you will likely need to do so here also: bcdedit /deletevalue safeboot
Reboot once more and Windows will automatically start with AHCI drivers enabled.


There may be a neater way to do this in lightdm, but it should presumably be possible to edit the session files in /usr/share/xsessions. Replace the Exec line, eg Exec=gnome-session --session=ubuntu with the path to a wrapper script which calls your scripts and then starts the session.

This should be executed in the user's context and not be disableable.


Can I install ubuntu over Vista on a laptop computer?

Check out the WUBI installer: http://www.ubuntu.com/download/desktop/windows-installer

This gives you the impression that you are installing Ubuntu 'over' your existing OS. In reality, it's just a nifty tool that does replaces the legwork need to go the old fashioned route of having a 'dual-boot' setup in which you have a separate disk partition (or physical disk) for each OS you want. There is a selection screen (called a bootloader) after the BIOS at which point you can select which OS you'd like to boot.

The only way to truly have one OS 'over' another OS is to use virtualization of some sort. There are many options here. If you want to go that route, it would be best to do some research and come back here with questions :)


HELP NEEDED -- Enabling SSH on Rpi with Ubuntu 20.10 without screen

I'm using same version of Ubuntu Desktop on same model of Rpi (Ubuntu installed on SD card using rpi-imager), it seems ssh client is installed by default but not the ssh server. This means you can only use ssh from the Rpi to access another remote machine, not to ssh (or use scp) from remote machine to the Rpi. Attempting to use ssh from remote machine to Rpi will return error:
ssh: connect to host <Rpi IP address> port 22: Connection refused

To install the ssh server on the Rpi do:
sudo apt install openssh-server

For more details see How to fix: Connection refused by port 22 Debian/Ubuntu.


How to host server on local PC(ubuntu) and set up virtual hosts

The two most common tools for this are the Apache and nginx servers.

Notes:

You'll need to edit a few system configuration files. If you're uncomfortable with vim, replace vim with nano, or gedit in the following commands. For example, sudo vim will become sudo -H gedit or sudo nano.
Once you're done setting it up, have a look at How to avoid using sudo when working in /var/www?
A more detailed guide is available from the Ubuntu LTS Server Guide.

Apache

First, install Apache:

sudo apt-get install apache2

The Apache configuration files are located in /etc/apache2. You'll typically be interested in:

/etc/apache2/sites-available - contains the Virtual Host definitions. Definitions are enabled and disabled using the a2ensite and a2dissite commands. The enabled site definitions are linked to /etc/apache2/sites-enabled.
/etc/apache2/conf-available - contains custom configuration files. They are enabled and disabled using the a2enconf and a2disconf commands. The enabled site configuration files are linked to /etc/apache2/conf-enabled.
/var/www/html - the default directory that Apache serves.

For most instructions, I'll assume we are in /etc/apache2.

VirtualHost setup

Let us create a new site. There's a default configuration available in sites-enabled/default.conf. We will make a copy of this, and work on it:

sudo cp sites-available/000-default.conf sites-available/my-name.conf
sudo vim sites-available/my-name.conf

Change the ServerName, so that it uses, for example, myname.com:

ServerName myname.com

Change the DocumentRoot, so that it uses, for example, /var/www/my-name:

DocumentRoot /var/www/my-name

Save the file, and enable it:

sudo a2ensite my-site

Now, we need to set up the directory for the site:

sudo mkdir /var/www/my-name

We'll set permissions for convenience:

sudo chown $USER:www-data /var/www/my-name
sudo chmod g+s /var/www/my-name

Add a few HTML files here.

Since the virtual host is to run locally, we need to map myname.com to a local address. To do this, we need to edit /etc/hosts:

sudo vim /etc/hosts

Add a line like so:

127.0.0.2 myname.com myname

Save, and then restart Apache:

sudo service apache2 restart

Now, you can browse to http://myname.com or http://myname, and the contents of /var/www/my-name will be displayed.


Split a text file into two files, without losing revision history?

Currently this isn't possible. This bug is reported here.

Until then this is the only way (though you'll lose history for file2.py):

bzr mv file file1.py
cp file1.py file2.py
bzr add file2.py


File sharing from GUEST VirtualBox ( 12.04 ) to HOST ( 10.04 )

Setting up shared folder can be done from Virtual Box as it was further elaborated in answers to these question:

Error mounting VirtualBox shared folders in an Ubuntu guest
Mount VirtualBox SharedFolder in Ubuntu VM on boot

However because it is so much easier to set up (and they safer in addition) I usually share folders to and from a virtual machine using basic network shares from the Nautilus right click "Sharing Options" menu. These can be set up anytime and will immediately be accessible from the "Browse Network" entry in Nautilus.

After right click on a directory from your HOME for Sharing Options we may be asked to download samba packages - do so. Then we tick the Share this folder box and give the needed permissions for this share to enable sharing over the network.

We may have to restart our session for changes to take effect. After having defined our shared directory we can browse it using Nautilus Browse Network where our share appears in the Windows Network/WORKGROUP/ directory.

Fo ease of use I have set my network adapter to bridged in the Virtual Box Manager.


Packaging and uploading to launchpad is possible from Ubuntu based Linux?

Uploading a package to a launchpad personal archive is indeed designed to be done from an Ubuntu system (it would be surprising if it required a different platform). Only command-line tools are required which hopefully satisfy the requirements for a lightweight system.

Packaging/PPA/Uploading explains the process, using the dput tool.


Where to set the password for an OpenVPN server with login/password authentication?

You'll either use:
auth-user-pass-verify vpn_user.sh via-env
or:
plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so /etc/pam.d/login
In first one, vpn_user.sh is your custom script to verify password.
In second, a user should be created in your OS for authentication.


The problem is a bug, and it is caused by no just one service, but a set of these, see this tread for further information.

Most likely dnsmasq, dhclient, modem-manager and network-manager are the involved services.


Can't create VM from Kubuntu 16.1: "Unable to find a medium containing a live file system"

I'm very sorry that nobody was able to answer you then. I had this same issue and Googled it, but nothing popped up. I did, however, figure out the solution thanks to an offhanded comment on a Reddit post.

Kubuntu, among other distros, does NOT like VMware's "Easy Install" feature, so you will need to get around that. What I did was select the "I will install the operating system later" option during the creation of the VM. If you already have the VM created, just remove the autostart.iso that it has connected to your VM's drives in "Removable Devices."

Hope that helps anyone who comes across this post in the future.


Lenovo P14s slow despite most recent driver

I kind of "solved it".
On Ubuntu I wasn't able to find the cause of this on Ubuntu. After messing around with grub (you apparently shouldn't do that), I was not able to boot Ubuntu anymore. It stuck at
dev/sda5: clean, xxx/xxx files, xxx/xxx blocks
So I gave up and installed Arch.
There I had a different problem (or maybe the same, but this time I identified it?): running inxi -G showed both GPU's (Nvidia Quadro and intel UHD) with correct drivers but the OpenGL renderer was set to the Intel one instead of Nvidia's. Also, despite running Teams and IntelliJ Idea with prime-run, the load on the Nvidia card was at 4% (I found out running nvidia-smi -i 0) while the load on the Intel card was really high all the time (I found out running intel_gpu_top, load at ENGINE Renderer/3D/0 70% when doing things like scrolling in a window). I tried to set the Nvidia card as the renderer and the intel one as sink with
xrandr --setprovideroffloadsink 1 0 which gave an error:
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x218
  Serial number of failed request:  16
  Current serial number in output stream:  17

I tried reinstalling drivers and stuff, but that also didn't help.
Finally, I installed optimus-manager from pacman and ran
optimus-manager --switch nvidia

After a reboot in runs smoothly.
inxi -G now shows:
Graphics:
  Device-1: Intel UHD Graphics driver: i915 v: kernel
  Device-2: NVIDIA GP108GLM [Quadro P520] driver: nvidia v: 460.32.03
  Device-3: IMC Networks Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting,nvidia
  resolution: 1: 1920x1200~60Hz 2: 1920x1200~60Hz
  OpenGL: renderer: Quadro P520/PCIe/SSE2 v: 4.6.0 NVIDIA 460.32.03

The load on the intel card dropped to 10% max.
I still switched to Teams Web Client like pointed out by @Matigo. That still helps.
Thanks, and hope somebody finds this useful.


Gnome-Shell panel disappeared - How to get it back?

Something similar happened to me. I think the issue is that some of the extensions are buggy and crash the shell. I am not certain but I think this might be because they were badly upgraded from gnome shell 3.0 (I'm not much of  an expert as you can probably tell).

Anyway, I fixed problem by logging on in Unity (so I got a fully workable desktop) and then using synaptic to remove packages starting "gnome-shell-extensions-" -

Try removing the alternative menu status one first- that is reported as buggy as far as I can see.


Ubuntu goes into read-only mode randomly

The Issue

The reason it randomly switches to read-only is that if the kernel detects a filesystem error, it immediately switches to read-only mode to prevent further trashing the disk.  (That is, the problem isn't with the hard disk itself, but with the filesystem on the hard drive.)  If you continue using such a corrupted filesystem, it will only get worse, not better.  The easiest way to fix it is to use a live CD/DVD; the Ubuntu install disk will do.

The Fix

It goes without saying, but step zero is, Ensure you have a backup of vital data.

Boot your computer from the live disk.
The easiest way to perform these operations is in the terminal, so go ahead and open one with Ctrl-Alt-T.
Run sudo blkid to get a list of all the block devices on the computer.  You are looking for the partition you installed Ubuntu to; it will likely be /dev/sdaX, where X is some number.  If you have absolutely no idea which one it is, it will likely be the only one formatted as ext3 or ext4 (TYPE="ext4").
Run sudo umount <your partition> to ensure the partition is unmounted; the filesystem checker will refuse to operate on a mounted disk.
Run sudo fsck -Cy <your partition>.  The -C option displays a progress bar and is entirely for show.  -y tells fsck to go ahead and fix everything it finds.  If it comes back with errors, use your best judgement, or post them here and I'll look at them.
Reboot; hopefully, you're done!  If you'd like, you can run fsck more than once to ensure that it really did fix everything.


How to resize images to either 900-pixels-height for vertical ones or 900-pixels-width for horizontal ones?

This should be enough:
mogrify -resize 900x900\> *.jpg

From https://legacy.imagemagick.org/Usage/resize/#noaspect

Aspect ratio is preserved basically so that any circles in the input image will remain a circle in the output image. That is the image will not be squashed or squeezed, only resized, unless you tell it otherwise.

and

Only Shrink Larger Images ('>' flag)
Another commonly used option is to restrict IM so that it will only shrink images to fit into the size given.   Never enlarge.


The attempt to mount a file system with type vfat in SSI1(0,0,0),partition#1(sda)at/boot/efi failed

I had exactly the same problem today while installing Ubuntu Server on a UEFI machine. I received the following message:

The attempt to mount a file system with type vfat in SCSI1 (0,0,0), partition #2 (sda) at /boot/efi failed.

I created an EFI partition and a normal linux partition on a USB disk with the gdisk command. fdisk -l gave the following result for the disk:

Device       Start     End Sectors  Size Type
/dev/sdc1     2048 1050623 1048576  512M EFI System
/dev/sdc2  1050624 7831518 6780895  3.2G Linux filesystem

I then tried to mount the EFI partition with mount /dev/sdc1 /test/, but got the following response:

mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

I also tried mount -t vfat /dev/sdc1 /test/, but received the same response. I then formatted the EFI partition with mkfs.vfat /dev/sdc1. I then tried to mount the EFI partition again with mount /dev/sdc1 /test/. It worked perfectly.

My conclusion is therefore that the Ubuntu Server installer needs the EFI partition to be formatted when it tries to mount it to /boot/efi.


System time drifts terribly on Ubuntu 12.04.5 Dual boot

Well, after dmesg | grep unstable I got
Marking TSC unstable due to check_tsc_sync_source failed

Putting this message into Google I found http://www.overclock.net/t/1347771/sb-e-marking-tsc-unstable-due-to-check-tsc-sync-source-failed-xpost-intel-cpus that has same problem with similar mainboard Asus P9X79 (mine is Deluxe, theirs is Pro.) They suggest the problem is with the BIOS and in a comment on page 4, they said that BIOS version 4701 can solve this. So, I tried updating BIOS to 4701 and everything works fine until now.

Seems like this mainboard is having compatibility problem with Ubuntu.

Sorry for asking and solving it too fast.


Ubuntu 17.10 - External monitor not detected when using Nvidia drivers

Figured it out. So apparently if you boot in secure mode, it prevents the Nvidia driver modules from being loaded in. So you follow the instructions here Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? to disable secure boot, it works.


In dmesg towards the end

npviewer.bin[2448]: segfault at 10 ip 00000000f62abc52 sp 00000000ffa7e310 error 4 in libflashplayer.so[f5e41000+b5f000]

See the phrase segfault this is a kernel crash and results in the cryptic last line in kdm log ddxSigGiveUp: Closing log meaning the X server doesn't start hence no screen picture. The file causing crash is npviewer.bin.

Can't really advise how to fix this.


LibreOffice: bubble text suggestion won't go away

This looks like word completion to me. You should be able to disable it by navigating to Tools → AutoCorrect Options... → Word Completion and unchecking Enable word completion.

Source:

http://ask.libreoffice.org/en/question/4600/is-there-a-way-to-turn-off-predictive-text-feature/


Kubuntu 19.10: Application Menu button on titlebar not showing

I fixed the issue by importing ~/.config folder from the new KDE account to the old one.


System Log: Bios may corrupt low RAM, working around it

This warning message basically means that some systems are known to have a BIOS that uses some parts of the low 64K memory region as a temporary storage, which means this memory should not be used by Linux at the same time (you get weird memory corruption bugs).  The kernel has detected that your machine is on the list of machines known to suffer from this problem and has marked this memory region so that it cannot be used by Linux.

This prevents any clashes between the BIOS and Linux.  So, you don't need to worry, the kernel has taken care to prevent any memory corruption issues for you automatically.

The error message comes from arch/x86/kernel/setup.c in the kernel.


Intel HD Audio does not work after instaling linux-image-4.2.0-22-generic

I can confirm this issue.

The built-in speakers work fine, but headphones won't work.

lspci | grep Audio
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)

I'll have to keep using 4.2.0-21 until this is fixed.


This happens to me occasionally, but I just lock my screen and unlock it, and then the icon problem is resolved.


ldconfig creates the necessary links and cache to the most recent
  shared libraries found in the directories specified on the command
  line, in the file /etc/ld.so.conf, and in the trusted directories
  (/lib and /usr/lib). The cache is used by the run-time linker, ld.so
  or ld-linux.so. ldconfig checks the header and filenames of the
  libraries it encounters when determining which versions should have
  their links updated.

Please check ldconfig manual man ldconfig


How to search for all the man files that contain certain keyword?

From man man:

-K, --global-apropos
      Search for text in all manual  pages.   This  is  a  brute-force
      search,  and is likely to take some time; if you can, you should
      specify a section to reduce the number of pages that need to  be
      searched.   Search terms may be simple strings (the default), or
      regular expressions if the --regex option is used.

-w, --where, --location
      Don't actually display  the  manual  pages,  but  do  print  the
      location(s) of the source nroff files that would be formatted.

Combined:

man -wK 'Richard M Stllman'

Though manpages typically have just Richard Stallman, with a variable amount of space between the two words, so a regex might be appropriate:

--regex
      Show all pages with any part of  either  their  names  or  their
      descriptions   matching   each   page   argument  as  a  regular
      expression, as with  apropos(1).   Since  there  is  usually  no
      reasonable  way  to  pick  a  "best"  page  when searching for a
      regular expression, this option implies -a.

So:

man --regex -wK 'Richard *Stallman'


Upgrade from Ubuntu 10.04 LTS to 12.04 LTS Errors

Not quite sure what I did, but the upgrade is finally going through. I think for whatever reason, the netbook version of 10.04 didn't like wanting to upgrade via disc or usb.

However, using the same disc on my tower, the upgrade option was present and went through fine.

My advice for anyone else with this error, just keep trying.


Your system is formatted with GPT instead of MBR, so there are no Extended partitions to deal with (simplifies matters).

If you are using Ubuntu 18.04 or newer, and do not use Hibernation, you do not need a separate swap partition, and can use a swap file instead. There was a problem in the kernel, fixed in late 2017, that made swap files slower.

If you don't use hibernation, you can unlock /dev/sda7 by right-clicking on it. Delete it; we will make a swap file later after rebooting into Ubuntu from your system drive. Then, you can extend /dev/sda5 across the space formerly used by the swap partition into the unallocated space.

Remember, with gparted, to make one change, then click the green check mark in the power bar before making another change.

/dev/sda1 is also useless, for you do not use Windows any more. However, you can't easily get at that space, without deleting and recreating the EFI boot partitions; it would be easier to

backup and verify the backup matches the source data
make another backup to different media (disk or cloud) and verify that, then
wipe the disk completely and
reinstall then
restore.

Commands to make, then enable, a swap file (second command makes a two GB swap file with the bs= option, resize as it suits you):

sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=2G count=8
sudo mkswap /swapfile && sudo swapon /swapfile


What damage will an accidental move of /bin do?

Looking for SETUID binaries in /bin:

$ find /bin -perm -4111
/bin/umount
/bin/su
/bin/mount
/bin/ping6
/bin/ping
/bin/fusermount

Of these, mount and umount are the really important ones.


Ubuntu Server and QEMU - "Could not initialize SDL"

Try with -vga qxl (you must modprobe the qxl module first), or -vga virtio.