Install Ubuntu to an external USB disk and switch it with internal disk later

The main difficulty of Installing Ubuntu to an external drive (or a second internal drive) is that the default and easy installation choices won't work. You have to manually select the correct disk and partition the disk manually. This may be a bit daunting. A small mistake may erase the wrong disk.

Yes you can! Using the ISO installation file

Ubuntu can only be installed from the installation USB/DVD or the ISO file. The ISO file is the file one downloads from the Ubuntu website. Normally one uses the ISO file and an utility to create the Live Installation USB.

In any case, you will need the ISO file. Download it from the Ubuntu Downloads site.

You will use it from within the Ubuntu in Disk A.

Alternately create an installation USB disk (C).

Steps for preparing Ubuntu in Disk A

The simplest way to start the installation process from Disk A is to install an utility called grml-rescueboot.

sudo apt install grml-rescueboot
Create a folder where the ISO file will be:

sudo mkdir /boot/grml
Move the ISO file to the folder:

sudo mv ~/Downloads/ /boot/grml/
Update grub so that you get the option to boot from the installation ISO file.

sudo update-grub

Steps to install Ubuntu in Disk B (USB)

Restart Computer. You will see the grub menu with the choices:

Yours may be a bit different. The top choice Ubuntu is Ubuntu in Disk A. Look for Grml Rescue System towards the bottom of the menu

Select Grml Rescue System (name of the ISO file).

Connect disk B via USB
Install Ubuntu on disk B

Chose Something Else to manually select Disk B

You will see a list of disks and partitions like this:

Make a New Partition Table. to do this highlight the new disk, in my case /dev/vdb and click on the button New Partition Table.... You will see a warning:

Click Continue. Now you will see a new row below /dev/vdb called free space.

Create EFI System Partition (only if your computer has UEFI and boots in UEFI mode)

Highlight the Free Space under /dev/vdb and click on the + to create the first partition. The first partition will be a 200 MB EFI system partition. Change the size to 200 MB and the Use as:

(If you don't see the EFI System Partition option in the above, then you don't need it. Go to the next step.)

The Create Partition window should now look like:

Once you click OK, you will see partition /dev/vdb1 type efi in the window. Yours may be /dev/sdb1 or something else.

Highlight the free space below /dev/vdb1 and click on the + to create the next partition. This will be the main partition.

Create root system partition / in ext4 format

Once done, your disks and partitions will look like:

Similarly:

Create /home partition in ext4 format (only if you want to)
Create swap partition (needed for 16.04. 18.04 does not need it)
Make sure the boot loader is installed in disk B. See the above image.

Shutdown the system running live from ISO on disk A
Remove disk A
Insert disk B (i.e. connect it via SATA)
Boot new system from disk B

Alternately Use USB Disk (or Stick) C

Create an installation USB using the Startup Disk Creator in Ubuntu (booted from disk A).

Steps are almost the same. I am omitting the pictures:

Run Ubuntu 16.04 on disk C, Live USB

Connect disk B via USB
Install Ubuntu on disk B

Chose Something Else to manually select Disk B
Create EFI System Partition (only if your computer has UEFI and boots in UEFI mode)
Create root system partition / in ext4 format
Create /home partition in ext4 format (only if you want to)
Create swap partition (needed for 16.04. 18.04 does not need it)
make sure the bootloader is installed in disk B

Shutdown the system running live from USB on disk C
Remove disk A
Insert disk B (i.e. connect it via SATA)
Boot new system from disk B

My answer to Dual Booting win 10 and Ubuntu 18.04 on two separate physical ssds has pictures of manual partitioning and other details.

Or you can clone Disk A to Disk B

If you want to keep your customization and data (make external backups to be safe.) you can clone all the partitions related to Ubuntu (there may be one or more) into your disk B.

However, to do this, you will still need the installation USB stick (disk C). This is because you should not clone a system partition while Ubuntu is running from that partition.

You will need to boot from the Installation USB disk C and choose the option Try Ubuntu without Installing. Then use Gparted to copy all the partitions you need from disk A to to the new disk B.

If your disk B is larger in size than disk A, you may want to expand the copied partition(s) to fill the whole disk B.

Note, the cloned partitions will have the same UUID in both the old disk A and the new disk B. This means Ubuntu may get confused at boot time if both the disks are connected. So, you must disconnect the old disk A before you boot from the new disk B.

Steps:

Boot from disk C (the Installation USB)

Connect disk B via USB. Make sure the disk B is detected.
Use Gparted to clone the partitions from disk A to disk B.

Apply the changes after each copy partition operation.

Expand the / partition if there is no separate /home partition. Otherwise expand the /home partition in disk B

Apply the changes after each expanding partition operation.

Shutdown the system running on disk C (the Installation USB)

Remove disk A
Insert disk B (connect it via SATA)

Boot new system from disk B

Hope this helps


NTP daemons don't want to do a sudden massive jump in system time. For one, it borks the chronology of entries in your log files, system daemons might freak out, etc. What it does instead is "drift" your system clock into place. If you want to check how far off from "the actual time" you are you can query an ntp server:

ntpdate -q pool.ntp.org

NTP works by adjusting the length of a second on your system by a slight bit so that you slowly get the correct time. It can take a while for the drift to happen if your offset is high. What you can do though is force a hard sync once:

service ntp stop
ntpdate pool.ntp.org
service ntp start

Edit: in response to the comments below.

Set this line up in /etc/default/ntpdate

NTPDATE_USE_NTP_CONF=yes


How do I add shell programs to the Unity search results?

You would need to create, or copy an existing .desktop file, for the application, into your $XDG_DATA_HOME/applications directory.


Lost windows Partition Reinstalling Ubuntu

How did it "vanish"? Plz be specific. Is it unused space? Or is it simply that your GRUB is broken and Win 8 chainloader not accessible? In the latter case, you can get back your chainloader with a Win sysrestore dvd and then reinstall Ubuntu alongside Win.


Server: After upgrade from 16.04 to 18.04 ssh and ftp refuses connections

Actually, turned out my provider has a rescue mode in which I could figure out the problem and fix it.

The OpenSSH version got update to a newer one. My OpenSSH configuration was invalid with the current version. I needed to remove hmac-ripemd160 from the MAC list and that was  all (at least for this problem).

OpenSSH should really working on better error messages and/or upgrade processes. Getting locked out is not that much fun.


Picasa-like image viewer for Ubuntu (to flip quickly through large numbers of images)

You can install Googles Picasa in Ubuntu by wine. HQ here


If I open Unity tweak tool, it mentions com.canonical.unity.webapps is missing

Install the necessary packages. From terminal:

sudo apt-get install unity-webapps-common

Now try to execute tweak tool.

sudo unity-tweak-tool


Trying to run sudo apt update and I'm receiving errors

Ok guys, I feel stupid. What had happened was my roommates back home failed to pay our internet bill while I've been on the opposite coast, so I am still able to SSH in, but my box has no internet access. So, the question and answer that @MichaelBay pointed me towards hit the nail on the head: upstream network issues. In my case, failed to pay my bill...
Very interesting though, I never realized I could still shell in...there's gotta be a way around getting my internet cancelled then


rename doesn't work that way; you need to specify a PCRE (Perl Compatible Regular Expression) pattern and replacement to work with it.

For this purpose, mv is enough; a fast way to rename all the .htaccess files in /var/www would be to use find itself:

find /var/www -type f -name '.htaccess' -execdir mv {} old.htaccess \;

Sample output on a test hierarchy:

user@debian ~/tmp % tree -a
.
├── 1
│   └── .htaccess
├── 2
│   └── .htaccess
└── 3
    └── .htaccess

3 directories, 3 files
user@debian ~/tmp % find . -type f -name '.htaccess' -execdir mv {} old.htaccess \;
user@debian ~/tmp % tree -a
.
├── 1
│   └── old.htaccess
├── 2
│   └── old.htaccess
└── 3
    └── old.htaccess

3 directories, 3 files


I've solved the issue by blacklisting acer_wmi and rfkill unblock all after.

Source: A comment by OP.


Use ~/.config/inkscape/keys/default.xml instead of ~/.inkscape/keys/default.xml


New SPI TFT LCD display requires different kernel.img?

I was able to get this SPI TFT LCD display working by following the instructions on this page:

http://osoyoo.com/2016/09/13/install-raspberry-pi-3-5-touch-screen-driver-for-raspbian-jessie/

Don't forget to enable SPI on the Pi using raspi-config.

Everything works great. I installed matchbox-keyboard to display a small keyboard on the display using these instructions:

http://ozzmaker.com/virtual-keyboard-for-the-raspberry-pi/?utm_source=feedly

But... I'm still not sure if it was the right thing to do in replacing kernel.img and kernel7.img - or how this effects me in future Ubuntu updates. If anyone is able to shed some light on these 2 files and how replacing them effects future updates please comment and let me know!


GNOME desktop freezes when laptop lid is closed

Workable solution found:

Screenshot of finding LID node

1) Find lid switch node with

cat /proc/acpi/wakeup

2) Unbind by echoing that node into the directory:

/sys/bus/acpi/drivers/button/unbind

3) Close lid

4) Restart display manager after lid close:

sudo systemctl restart display-manager


ClamTk is a graphical front-end for the ClamAV terminal program. To install it in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install clamtk

You can also take a look at the Gnome/Nautilus extension clamtk-gnome - GNOME (Nautilus) MenuProvider extension for ClamTk. This package contains a nautilus plugin to allow right-click support for easy virus scanning with ClamTk and thus ClamAV in GNOME. To install it in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install clamtk-gnome


Error message using SMARTCTL for fixing bad sectors on HDD

Your smartctl test error is likely the result of using a USB adapter. Many external drive adapters are not supported. However, they are sometimes easy to disassemble, so if you can take the enclosure apart (without wrecking it) you could remove the HDD and plug it to a motherboard SATA port. If it looks too difficult, use the model number to find a tutorial, or simply don't bother.

badblocks -wsv is an effective way to deal with bad sectors. If successful your drive won't report the previous errors so you won't have to deal with some pesky bad-sector issues like SMART tests stopping at the first bad sector, DBAN stopping before it even starts, and the /dead.letter 24 hour repeat add-ons. As long as other sectors don't fail you should be okay and your drive will function like everything's fine. If more sectors fail look for a new drive.


No, there's no need to do that. Having more desktops installed means you'll get slightly more updates to download. You'll also get more apps than you need that will appear in menus, but if you don't find that particularly annoying, there's really no need to.

I have at least five desktops installed and I switch between them all the time. Apps are completely independent on the desktop. You don't even need to have a desktop installed in order to use VLC, for instance although that'd be slightly uncomfortable in most cases. :)

In fact, from time to time, I've mixed elements from different desktops at the same time, such as in this case, where I run Unity with two monitors and added a panel from Xfce on my second monitor (the bottom panel). That's fine.


Look for the following lines in wpa_supplicant.conf:

# needed for wpa_gui to work
ctrl_interface=DIR=<Dir on Gentoo: /var/run/wpa_supplicant> GROUP=<Group on gentoo: plugdev>
# needed to allow wpa_gui to alter the configuration
update_config=1


You can't, download 64bit iso from Ubuntu website, burn it in to a usb via Startup Disk Creator, boot and follow the standart installation

This should not be a problem since you've not added personal files yet.

I assume you have a  fully functional system right now


I want to open Thunderbird at system start up, but keep it minimised

Use this solution I posted to do the same thing for Empathy...

How to start Empathy hidden in 13.04?

(One word of caution, however, thunderbird takes a while to connect, so you may notice some sluggishness when you login into your desktop.)


Prevent other users to login as me and view my files

If another user can sudo (or know your password, or can login as root directly if enabled), then yes they can login as you and see your files.

Check which groups your login belongs, as well as the other user:

$ groups
user-3121 adm cdrom sudo dip lpadmin wireshark

$ groups other_user
...?

Most systems use group sudo by convention to enable sudo access, rather than explicitly adding usernames to the sudoers file. Ubuntu historically used admin.

If a user is in group sudo or admin, then they can run sudo, and change to any user. Additionally, as you've done, check the sudoers file directly (typically by running $ visudo), and see if individual users are explicitly granted sudo privileges.

Note release notes as of 12.04,

Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the "admin" Unix group. In Ubuntu 12.04, administrator access will be granted via the "sudo" group. This makes Ubuntu more consistent with the upstream implementation and Debian. For compatibility purposes, the "admin" group will continue to provide sudo/administrator access in 12.04.

Edit: one option to avoid other admin (sudo) users from reading  your data is to encrypt it, and require a passphrase to decrypt. While you're using the file, however, the other user might be able to access it. See Is there a tool to encrypt a file or directory?


Pause other media when browser starts playing

I've managed to find this piece of code, which should be added to the firefox.desktop file:
X-PulseAudio-Properties=media.role=phone

More info:http://www.webupd8.org/2013/06/how-to-automatically-mute-music-when.html
This mutes other sources, however, I haven't found a way to pause other sources that could be paused.


graph created by matplotlib.plot.show closed automatically after the python script finished through command line

This is more a question for stackoverflow.com that askubuntu.com

Anyway, the fix is simple. You called plt.show() with block=False. So that's why it exists at the end of the script.

Just add a single line like:

plt.show()

at the end of your script and the plot will stay open.


Typically, you would select /dev/sda, unless you know/have been told that you have to select /dev/sda5.

Therefore, it is probably best to select /dev/sda unless you have a very specific setup (which would have never warranted this question).

Select the menu item with your SPACE key, and then hit ENTER to proceed with the install.


As suggested by @Maarten Klop, adding the vendor ID to adb_usb.ini seems to help:

mat@ACA80164:~$ cat .android/adb_usb.ini
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2a45

After doing that:

mat@ACA80164:~$ adb devices
List of devices attached
750ABLMPX44Y    device

mat@ACA80164:~$ adb shell
phablet@ubuntu-phablet:~$ ls
Documents  Downloads  Music  Pictures  Videos

This works on my MacBook, but it isn't working nearly as well for me on my Ubuntu Raspberry Pi.


How to force native resolution on secondary monitor?

It depends on what your /var/log/Xorg.0.log is outputting. In some cases it could be due to the fact that the EDID is not being detected properly. Tragically, it means you have to do some fancy footwork to make this work properly.

In previous attempts I also tried setting the xrandr to not avail. Then I discovered this little tip (http://ubuntuforums.org/archive/index.php/t-1470168.html)

Research:

Go to the monitors website and determine the proper horizontal and vertical refresh ranges.

Modifications:

Edit your xorg.conf -  sudo nano /etc/X11/xorg.conf
Within the Monitor section (see below) add your new ranges

Section "Monitor"

Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "CRT-0"
HorizSync      LowValue - HighValue
VertRefresh    LowValue - Highvalue
Option         "DPMS"

EndSection

Note: You do need the dash between. Also it's recommended that you add a # in front of the old lines so you have a copy that you can undo if all else fails.

Reboot your machine


TINKER Molecular Modeling Troubleshooting

Not knowing how to use the program will make it very difficult!

I downloaded TINKER and the example files, and if I use a totally bogus filename, TINKER just prompts for another filename. Not having error messages makes the program a little unfriendly to beginners.

If I specify a filename by path, eg. ~/tinker/fulldist/tinker/example/hexanes.xyz I get a little blurb about hexanes, then prompted for another filename.  So, I don't think you have a setup issue, but you should probably find a fellow student who uses the program and ask for a short tutorial.


The fact that your program calls brk(2) so many times (8843) leads me to think that your code is requesting too much memory from the system. And generally, on Linux, when a program requests too much memory, it is killed with SIGKILL.

More details

brk(2) is one of the two ways a program has to request memory. The other way is mmap(2). The malloc(3) and friends implementations offered by the GNU C Library use a mix of the two.

Generally speaking, whatever way your program allocates memory, Linux does not complain. Even if no memory is available, it is possible that the kernel still return valid addresses.

That's because Linux allocates memory lazily, in the sense that memory is not "physically allocated" until you start using it. This is a great performance optimization.

Now, what happens when you try to use some memory, but your system's RAM and swap are full? If Linux has allocated your memory physically, then there are no problems. Else, a component called OOM killer starts killing processes that consume most of the memory, with the aim of keeping the system usable.

About access

You noted that strace -c is reporting 4 access(2) failures. This is surely not a symptom of a problem. It is perfectly fine for a system call to fail. Problems occur when your program does not handle failures.

An example:

$ strace -e trace=stat -- ls /abc
stat("/abc", 0x1df2e30)                 = -1 ENOENT (No such file or directory)
ls: cannot access /abc: No such file or directory
+++ exited with 2 +++

I've told ls to list the contents of a non-existent directory (/abc), therefore the call to stat(2) has failed with ENOENT. This is not a problem for ls itself: it has detected the failure and displayed an error message.

Problems would have occurred if ls didn't check the return value of stat(2).

About your specific problem: it's difficult to know why access has failed. The output of strace -e trace=access or strace -C would give you some hits. However I firmly believe that such failures are not a problem for you, as they probably come from the GNU C Library:

$ strace -e trace=access -- ls
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
...


Cairo dock workspace switcher and weblet dissapear on minimize

I was able to restore the weblet and workspace switcher by switching the weblet and worspace-switcher OFF and ON again in cairo-dock settings. Even though I was unable to unminimize the windows, I was able to restore them by this procedure.


is it okay if I went on using a virtual machine for development or will it be difficult, slow and has lots of drawbacks?

For development you will not really notice the difference. A VM is all about tweaking it to your liking... too slow? add more RAM to the machine. Not enough space? Increase the machine.

But for development itself... unlikely you notice it.

Drawbacks. Nah. Only thing that annoyed me in the past was the constant switching between system and VM session. For all other purposes it worked very well.

  how can I get versions of these drivers specifically for Ubuntu ?

Linux uses generic drivers to set up your initial system. So IF the hardware is supported the driver will automatically install it for you. For your graphic card it can be useful to install the proprietary driver. This one will also be included in your system but as an option to install after the system is installed. See "dash","additional drivers". After a little search it will show all it can find based on your hardware (besides the graphics card it sometimes also list one for your wireless (Broadcom for instance)).

General advice: boot up one of the Ubuntu Live DVDs and have a look for yourself. In general: it it works during the Live session it will work after a normal install. If it does not you are 1 search on AU away from getting it working.


Logitech Wireless H800 Headphones not working in Ubuntu 14.04

Can you see your headphones in the output from aplay -l?

Mine looks like

....
card 1: Headset [Logitech Wireless Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Did you try the sound test program:

speaker-test -c 2 -r 48000 -D hw:1,0  (with 1,0 changed to necessary to match your listing from aplay -l)

Use your system | sounds | test function as well if you haven't already.

In the answers to
this question it is mentioned that devices can be secretly muted - Did you check it's not muted?

Ashamed to say it, but I finally got my Logitech USB headphones and HMDI speakers to work by banging on keyboard and trying everything until it it suddenly worked, and I couldn't tell for sure exactly why they started to work.

UPDATE: 9/13/2017

I see from your comment discussion with Tom Yan that you are not using the USB dongle that came with the headphones.  FYI if you lost it you can easily get another generic replacement.  As for using the on-motherboard builtin Bluetooth adapter, you need to understand that there are multiple Bluetooth protocols in existence for different purposes and what you want to do might not be physically possible.(c.f.  Bluetooth profiles).  The first question to ask is would it make economic sense for the manufacturer to have added bluetooth headphone capability to an on-board bluetooth adapter?  My guess is "no", because all headphones already come with dongles.

You've already completed part 1 of the investigation by experimentally seeing if it works out of the box.  If you really think it's worth finding the definitive answer, I would recommend finding out the on-board bluetooth adapter part number, finding the specs for that part, and seeing if they include the protocol for connecting to bluetooth headphones.

IMHO you should have disclosed in your initial question the fact that you were bravely challenging the known limits of bluetooth technology and trying to bypass the dongle.


Ok, I found out, that it has something to do with the sata3 ports. I justed switched the sata ports used for my ssd and t


WUBI install, reinstalled Windows, can't work with Ubuntu now

This post outlines a procedure to restore Ubuntu with Wubi after reinstalling Windows:

Install Wubi with the same version as before. You should obviously install this in a different locaton that your old installation was, as to not overwrite that.
Restart your computer and let Ubuntu finish installing.
Reboot again, select Ubuntu but instead of starting Ubuntu, press the "e" key to edit.
Look for the lines set root=(hdX,Y) and linux /boot/xxxxx root=/dev/sdMY xxxx.
Take notes of the values on these lines.
Reboot your computer (press ESC to return to the menu, press "c" to go to the GRUB prompt and type "reboot" to reboot).
Go back into Windows and copy the root.disk from your saved installation over the root.disk in your new installation.
Reboot again, press "e" again to edit and replace the values with those previously noted. Also delete the line search --no-floppy xxxxx.
Press Ctrl+X to reboot.
Once booted, open a terminal and type sudo update-grub.


The GUI login process may source /etc/profile and ~/.profile for setting up environment variables, etc., and it may use /bin/dash or /bin/bash for that. Ask Ubuntu has many instances of GUI login failing because of errors in ~/.profile or /etc/profile. You shouldn't be exec'ing something else in these files without checking for interactive usage at the very least. For example, the default .bashrc has this at the top, which you could adapt:

~ head /etc/skel/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac


Is there a target package list for Ubuntu phone?

That is still being finalized, we should have a pretty good answer by the time the Nexus Galaxy images and source code is released


Booting in graphical interface like desktop version

yes should be able to no problem install unity with sudo apt-get install ubuntu-desktop then rweboot to see if it works if not try adding to your /etc/rc.local unity && startx


Ubuntu does not restore user state on power up

Regular Ubuntu doesn't restore the previous session but if this is an important feature you can switch to kubuntu. This answer has a sample screen I've recycled to display the setup:

You can configure regular Ubuntu to automatically startup your favourite applications but they will not continue where they left off. There are a few exceptions such as web browsers which continue where they left of.

Use the Startup Applications app to define which applications automatically load when you sign on:


linux bash script to create folder and move files

You can also remove the ls *.jpg and simply use shell globbing:

#!/bin/bash

for full_filename in *jpg; do
  extension="${full_filename##*.}"
  filename="${full_filename%.*}"
  mkdir -p "$filename/picture"
  mv "$full_filename" "$filename/picture"
done

Please create and run this script inside /root/Desktop/My_pictures.


error while loading shared libraries, file too short

There was probably an error copying/extracting the libraries.
libvtkWidgets.so and libvtkWidgets.so.5.4 should not be files but symbolic links.
Try the following:

rm libvtkWidgets.so.5.4 libvtkWidgets.so
ln -s libvtkWidgets.so.5.4.2 libvtkWidgets.so.5.4
ln -s libvtkWidgets.so.5.4 libvtkWidgets.so

Anyway you should check if the software that you are installing is available from the software center.
If it is not available and if the above fix does not work you will need to contact the application provider.


How do I change the hostname without a restart?

It's easy. Just click the Gear icon (located at upper right corner of the screen), open "About this computer" screen (located at Gear icon ) and edit "Device name".

Or, in a terminal, use the following command:

sudo hostname your-new-name

This will set the hostname to your-new-name until you restart. See man hostname and How do I change the computer name? for further information. Do not use _ in your name.

Note

After a restart your changes in /etc/hostname will be used, so (as you said in the question), you should still use

sudo -H gedit /etc/hostname

(or some other editor) so that file contains the hostname.

To test that the file is set up correctly, run:

sudo service hostname start

You should also edit /etc/hosts and change the line which reads:

127.0.1.1     your-old-hostname

so that it now contains your new hostname. (This is required otherwise many commands will cease functioning.)


Ubuntu 18.04 : Orange dotted line appearing at the bottom of the screen

as a workaround try to log in with different desktop sessions other than the present one and see.

for example:
while at login screen, click the gear icon and choose "Ubuntu on Wayland"

and then again login with default session.


The best method would be for you to learn to create a copy yourself before editing a file.

That said ...

  Is there a way to prevent files to be overwritten

Yes. From command line set the "immutable" attribute (only the admin can remove that option) and nobody will be able to alter the file (edit, remove, move etc.). You do that with ...

sudo -i
{password}
chattr +i {file}

(-i to remove it)

  Either it should ask for root password

Ubuntu does not have a use able root password.

You can modify a file (even if it's read-only) if you own it and have write access to the directory. See for instance Why can I modify a read-only file? on how to save from vim.  It will then complain that you need to take an extra action before you can save it.

Not exactly what you asked but it is a method to get some sort of notification before you overwrite it.

  or simply save it with a new name, like windows does, adding numbers to names.

You will need a script for that when doing that on command line. Here are some examples: https://stackoverflow.com/questions/12187859/create-new-file-but-add-number-if-filename-already-exists-in-bash


How do I restore the default permission on a directory/folder?

The quick answer is that you're screwed. There is no undo. Be careful what you do with sudo. The quick solution is to reinstall.

But as this is just /var we could perhaps try to fix it. I could for example run this command on my system:

 find /var -exec stat --format "chmod %a %n" {} \; > /tmp/restoreperms.sh

This would give a script that you could run, and would try to reset all permissions as they are on my system. This should fix most issues. But I'm not sure how similar my installation is, as I'm using 12.10.


File says it doesn't exist but it is right there

It searches in demoCA.

According to your Filestructure, your directory is called democa.

You should probably take care of the case sensitive directory names.


Trouble with Installation on Acer Aspire One Cloudbook 14. "Kernel panic - not syncing: IO-APIC + timer doesn't work"

Assuming you have booted in legacy mode, installed via USB, and are now trying to boot up your freshly installed Ubuntu 14.04. then:

The correct boot alteration as detailed here in the Arch wiki

Is to add the following parameters to the file /etc/default/grub in the line that begins GRUB_CMDLINE_LINUX:

GRUB_CMDLINE_LINUX="quiet edd=off noapic modprobe.blacklist=pinctrl_cherryview"

After changing this file, to make the changes effective, run

sudo update-grub

This worked for installing Ubuntu 14.04

If having trouble booting up initially, press e at the boot options (GRUB) menu and add the parameters at the end of the line with quiet splash:

edd=off noapic modprobe.blacklist=pinctrl_cherryview

I have bought  the Acer Cloudbook 14 and installed Ubuntu 14.04 on it.


How can I remotely stream videos to my tablet?

I think you have two options. first you can start a vpn server, so you and your girl friend can be in one network range, then you can use some simple video streaming software like vlc to stream videos. second you must look for some p2p video streaming software. anything that will make you able to browse and choose. I haven't seen any ;)


Log folder files extremely large can't log in

Try the following:

 sudo -s
 shopt -s globstar                  # if needed
 truncate -s 0 /var/log/*.log       # first-level logs
 truncate -s 0 /var/log/**/*.log


How to disable running applications in unity launcher?

If you want to quit a running application from the launcher, right-click on that icon and select Quit.

If you want to remove a pinned application from the launcher, right-click on that icon and select Unlock from Launcher.

Update:

I'm not aware of being able to not display unpinned/running applications. However, you can auto-hide the launcher so that you don't have to see them. Go to System Settings/Appearance/Behavior and enable auto-hiding.


How to instruct wkhtmltopdf choose high resolution image files in html

I advise you to use cutycapt instead.

  CutyCapt is a small cross-platform command-line utility to
  capture WebKit's rendering of a web page into a variety of vector and
  bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP

sudo apt-get install cutycapt

To save a html as PDF

cutycapt --url=http://whatever/ --out=output.pdf


How do I go back to Windows 7 from Ubuntu

You need to have a System Image Recovery.  To do so please follow the guide Here


HTC One (GSM) Cannot Connect to Ubuntu 14.04 (Android 4.4.3)

You need to turn on Developer Mode in your settings. To actually activate the developer options you need to do the following steps:

got to settings/about/software information/more.
From there you will tap on the Build Number 7 times (you will see a countdown to the number of times left to tap)

See this for further information.


System apps missing fonts after update to 19.10

Try to clean font cache:

sudo rm /var/cache/fontconfig/*
rm ~/.cache/fontconfig/*
fc-cache -r


Will Ubuntu check if it can be installed on boot?

A 64-bit installer will not proceed if it finds 32-bit only hardware.
If it works your hardware supports 64-bit instructions.


Being warned that there are programs open before logging out

Credit: This answer is based on a script found here. It is for x11 systems, not Wayland, and requires that wmctrl be installed.

The first image shows Ubuntu 19.04 with several applications open and on various desktops:

The output of wmctrl -l in the terminal next to the dock lists eight open applications on various desktops.

From top to bottom:

1 Firefox (with more than one tab open)
2 GNOME terminal
3 GNOME Settings
4 Gedit with an unsaved file open
5 LibreOffice Writer with an unsaved file open
6 Geany with an unsaved file open
7 Konsole with man man running
8 Kate (partially seen) with an unsaved file open

While the dock shows that several applications are open irrespective of their location, it's possible users may have chosen to autohide the dock.

On running the script, which I bound to Ctrl+Super+W, applications that don't need to interact with the user are shut down immediately. In the image below, gnome-terminal and gnome-settings have already been shut down. What remains (as seen in the dock) are applications needing the user to make a decision.

The next image shows a stack of native dialog windows for open applications allowing users to decide whether to save their work in each application or not. In particular, LibreOffice Writer closed this way will not present a "Recovery" prompt the next time it's started.

In this example, the last decision is whether to close Firefox. Again, the GUI is that of Firefox itself, thereby ensuring a clean closure.

The script (based on the BunsenLabs link):

#!/bin/bash
# close_all_windows
# depends on wmctrl
# johnraff's close windows before shutdown from https://forums.bunsenlabs.org/viewtopic.php?id=508

windows_list=($(wmctrl -l | awk ' { print $1 } '))

for i in $windows_list
do
    wmctrl -i -a $i
    wmctrl -i -c $i
done

It generates a list of open windows along with the desktops they're on. The window ID's are then passed to wmctrl which raises each window and then causes the parent application to ask the user for guidance.

If this approach is suitable, just add shutdown on a new line to the script. That will shutdown the system after one minute. Alternatively, choose some other value from man shutdown.


From my understanding, you can't modify the critical trip point - if you were to increase it to stop your machine shutting down then you risk damaging the silicon.  The sole reason for the critical trip point is to avoid permanent damage of the system due to thermal overrun.


In the end I installed successfully using another installer (gdebi).

sudo apt-get install gdebi-core

Thanks for all the help!


Nothing extra will happen.
Revert it aback
1. Global rules:  to revert it back, it depends on where did you add the reboot statement, for example if it's a cron rule like:
@reboot reboot

then you can revert it back to normal by doing a chroot into the system with a live medium or while booting change the init system to a shell like init=/bin/bash to bypass the cron service.
2. User depended: If it's a user depended rule, then you can simply add a new user, or find the  exact file and remove it from other user account, remember you can always use Ctrl+Alt+Fx to go into another tty to login into root account (If it's enabled, you can enable it if it's not but that's an another question).
or take the user privileges for running reboot, you can even temporary remove exec bit of the command for anyone except the root, then login to the effected user, remove the startup lines, and fix the command permissions again.


How can I prevent any program starting at boot of the system? Is the procedure different for TeamViewer?

You need to open Settings Manager (or xfce4-settings-manager) and then navigate to Session and Startup (or directly xfce4-settings-manager), then open Application Autostart tab and uncheck some items here:

(be careful here, some components are essential)

TeamViewer uses other auto-start mechanism - it starts with system by SystemD. To disable it use:

sudo systemctl disable teamviewerd.service


set nginx server_name variable from command

you can use sed command

cp /home/dokku/appname/nginx.conf /home/dokku/appname/nginx.conf.backup
sed -i 's/appname.wrongname.co.uk/appname.dokku.me/g' /home/dokku/appname/nginx.conf

in this command search a content in the specific file and replace it with new content format for use it :

sed -i 's/searchForContent/replacementNewContent/g' addressToFile


Have you tried xkill? Run that from a terminal or a run window, click the window and it should nuke it.

If it's a common issue, it might be worth making a desktop launcher so you can run xkill with a double-click. You can do that the normal way or just throw this into a terminal:

echo "[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
Icon=gnome-panel-launcher
Exec=xkill
Name=xkill" > ~/Desktop/xkill.desktop


Agree to the above answer as well as comment from oldfred. If you are new to Linux(and not that comfortable and more comfortable with Windows) then some more suggestions:

You might be using 2TB hard drive for Windows as well as Ubuntu so
within Windows - just go to Disk management and create partitions for
Windows and Linux according to your needs.
Both Windows and Linux needs to be installed in EFI mode
Completely disable secure boot in BIOS
Disable fastboot and hibernation from Windows.
Create a Linux bootable USB with your favorite ubuntu iso using
this
Then follow the instructions and install ubuntu with default
settings.


How do I mount a digital camera via the command line?

I suppose you mean from the commandline while you are not in GNOME?

You can use gphotofs for that.

sudo apt-get install gphotofs


Is there an 'offical' way to store data in uTouch-Apps?

I don't believe there are any 'official' ways as off yet, the platform is so young things like this are still being worked on.

I am currently working on SQLite for UTouch and a "SimpleStore" for more basic things like JSON objects and strings etc.

Short answer, no, not yet.


Not able to install Ubuntu 12.04 in VMWare workstation 9 - Operating System not found Error

Check the ISO's SHA sum.
Try specifying manually the boot drive with pressing "ESC" at boot.
Check your HDD in the VM if the manual boot is not working.

Easiest way it to re-create the VM and that will make sure your CD is connected, and the HDD boots properly.


Is the Linux system in one runlevel after bootup or does it go from one runlevel to another during the process of bootup?

SySVInit

Referring to older Linux systems that still used SySVInit and the runlevel process. The correct understanding would be that it only goes to the one runlevel. The one runlevel has particular services associated with it, and only those services would be started. To clarify though, a service can be associated with multiple runlevels. So if a service is set to start with runlevel 3 and 5. Either runlevel can start that service. However, if a service is only associated with runlevel 3, going to runlevel 5 will not start that service.

Upstart

Upstart also still used and acknowledge runlevels but in a more robust way than SysVInit. The method of handling runlevels was the same as SySVInit though.

Systemd

Systemd does not use runlevels but rather targets. Targets utilize starting services in parallel and have other nifty features making it much better and faster than the previous two "init" based systems. Systemd however, still has the same principle in the area to which you are asking. If I were to go to "runlevel" or target "graphical", it would not go through "multi-user" or any other target before-hand.


Power management dies after suspend in Kubuntu 15.10

As it sometimes happens, taking the time to formulate a question in writing can give one ideas. It came to me I might take a look at what powertop says when power management doesn't work and it does show (after sleep) that power saving is off for wifi (probably not significant) and also that USB auto-suspend is off for the 3G modem so it's active 100% of the time. So just doing what powertop proposes after sleep is one part of it. Although I have never done this for systemd before (i.e. run my own script after suspend), I just have a script for it so far.

The other part of this issue seems to have do with the way KDE power management works these days: it basically disables power management when it thinks some app is busy. At least that's shown in the battery applet but usually that means it thinks Chromium is busy. So sometimes killing Chromium is needed as well.


how to find ppa location for bitcoin- 0.15.1-zesty1

You have mis entered the command - you entered sudo-add-apt-repository ppa: but the correct command is shown below.  These commands should be entered in a terminal window.  To open a terminal press Ctrl+Alt+t

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt update
sudo apt insall bitcoin-qt bitcoind
exit

The first command adds the repository, the second updates repository lists on your computer.  The third command installs bitcoid-st and bitcoind, and the final command closes the terminal window.


So currently with Eclipse on 16.04 there is a known GTK3 issue. There are a number of ways to work around this issue, but it looks like you just want to click Eclipse icon and work away. In your eclipse directory as above, open the eclipse.ini file. Add:

--launcher.GTK_version
2

before --launcher.appendVmargs

This will tell eclipse to launch with GTK2 instead.

As you're upgrading Eclipse by not using the Ubuntu repos (a very good move, MARS has a very retina friendly dark theme) when you try to run Eclipse you may get prompted for a jre. Simply unzip your latest downloaded JDK and open it to find the jre folder. Copy and paste the jre folder into your eclipse directory. Double click the eclipse icon and it should run perfectly.


Need help with wireless driver for Lenovo E545 (Realtek RLT8188ee

Although the link you gave asks that you compile backports-3.11, you compiled the much older and incompatible backports-3.2. In fact, rtl8188ee is included in Ubuntu 14.04, which uses kernel 3.13, by default! There is no need to compile anything:

ubuntu@ubuntu:~$ modinfo rtl8188ee
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/rtlwifi/rtl8188ee/rtl8188ee.ko
firmware:       rtlwifi/rtl8188efw.bin
description:    Realtek 8188E 802.11n PCI wireless
license:        GPL

Please give us some diagnostics so we may see what is going wrong:

lspci -nn | grep 0280
rfkill list all
dmesg | grep rtl

As the results may be lengthy, please paste them here and give us the link: http://paste.ubuntu.com. I will then edit this answer to propose a solution.


Ubuntu 11.10 randomly crashes to a screen full of numbers?

Your problem with Windows 7 was probably a hardware related problem which is why it still shows up in Ubuntu.

I suggest you verify your memory with Memtest86+. You can see a great presentation on how to use Memtest86+ here: http://www2.corsair.com/training/how_to_memtest/

The presentation explains how to burn a ISO image on Windows 7 but on Ubuntu you can just burn it with Brasero and the rest of the presentation will work with any operating system.

You should also use the Ubuntu Disk Utility (found under System>Administration), click on SMART Data and then run a test for all of your hard drives.


Can not authenticate in Gnome to install packages

Use the new sudoer's password to authenticate in the Ubuntu Software Center. The new sudoer's password is not a problem since you can change it with the passwd command :

wbad_prompt-$ su

<login as root>

root_prompt-# sudo passwd new_sudoer_username

<write new sudoer's password twice>

root_prompt-# exit

<log out as root>

wbad_prompt-$ exit


Ubuntu 18.04 LTS and how to handle point releases

The way point releases work for LTS cycle is thus:

XX.04 - initial release
XX.04.1 - second initial release with same kernel version
XX.04.2 - first HWE release, using HWE kernel (from XX.10 release)
XX.04.3 - second HWE release, using HWE kernel (from XX+1.04 release)
XX.04.4 - third HWE release, using HWE kernel (from XX+1.10 release)
XX.04.5 - final HWE release, using HWE kernel (from xx+2.04 LTS release)

The non-HWE kernel is supported through the full cycle, and the final HWE kernel is supported through the full cycle. The interim HWE kernel updates come from the interim (non-LTS) releases which only have 9 months of support, 3 months after their release (so you only get 6 months with that kernel). Any interim HWE release will get upgraded to the final HWE kernel with the 18.04.5 release. One can switch to the HWE kernel from the non-HWE install if they choose.


Keep getting error "E: Unable to locate package [package name]"

Because you uses Raspberry Pi, the architecture you had is arm— unfortunately those two program you mentioned does not support ARM Builds.

https://raspberrypi.stackexchange.com/questions/57456/installing-atom-text-editor-on-rasberry-pi
https://raspberrypi.stackexchange.com/questions/54711/installing-sublime-text-on-raspberry-pi

So to answer the main question, yes the packages does not support your machine at the moment. Hopefully in the future it will.


Span Wallpaper Fails When Monitors Different Sizes

I've done this on Windows 7, but my monitors both had a height of 900px, so that made it easier.

What you need to do is create a new image that's 2944 x 1080, and expand your picture to fill the entire canvas. Then set it as background using the "span" mode.

You hit the nail straight-on in your comment. The image needs to be the width of the two screens combined and the height of the largest screen.


Probably this a blur problem.
Install Unity Tweak Manager.
Choose Unity - Search.
You should change Background Blur from OFF to ON.


1. Install R

The latest version of R is 3.5, but version 3.4 is also available. Do one of the following, depending on which version of Ubuntu you are using, and which version of R you want.

R 3.5 with Ubuntu 14.04 Trusty Tahr, 16.04 Xenial Xerus, 18.04 Bionic Beaver

For the latest R 3.5 packages, add the R repository and key.  For more information, see The Comprehensive R Archive Network, Ubuntu.

echo "deb http://cran.stat.ucla.edu/bin/linux/ubuntu `lsb_release -sc`-cran35/" | sudo tee --append /etc/apt/sources.list.d/cran.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt update
sudo apt install r-base

(If http://cran.stat.ucla.edu/bin/linux/ubuntu does not work, or you want a mirror closer to you, replace cran.stat.ucla.edu with one of the URLs listed at CRAN Mirrors).
R 3.4 with Ubuntu 14.04 Trusty Tahr, 16.04 Xenial Xerus, 17.10 Artful Aardvark

For the latest R 3.4 packages, add the R repository and key.  For more information, see The Comprehensive R Archive Network, Ubuntu.

echo "deb http://cran.stat.ucla.edu/bin/linux/ubuntu `lsb_release -sc`/" | sudo tee --append /etc/apt/sources.list.d/cran.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt update
sudo apt install r-base

(If http://cran.stat.ucla.edu/bin/linux/ubuntu does not work, or you want a mirror closer to you, replace cran.stat.ucla.edu with one of the URLs listed at CRAN Mirrors).
Universe Repository

Sometimes R may not available from The Comprehensive R Archive Network for your version of Ubuntu (this usually happens when a new version of Ubuntu has just been released),  or you may just want to install the version of R packaged specifically for Ubuntu. In that case, r-base can be installed from the Universe repositories.

Ensure "Community maintained free and open-source software (universe)" is selected in the Software & Updates tool.  Then do the following.

sudo apt update
sudo apt install r-base

2. Prepare to Install R Studio

R Studio requires the JPEG runtime library, so install it.

    sudo apt install libjpeg62

Prior to Ubuntu 17.10, R Studio required the GStreamer libraries, so do one of the following, depending on which version of Ubuntu you are using.

Ubuntu 12.04 to 16.04

sudo apt install libgstreamer-plugins-base0.10-0 libgstreamer0.10-0

Ubuntu 16.10 to 17.04 (32 bit)

wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_i386.deb
wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_i386.deb
sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_i386.deb
sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_i386.deb
sudo apt-mark hold libgstreamer-plugins-base0.10-0
sudo apt-mark hold libgstreamer0.10

Ubuntu 16.10 to 17.04 (64 bit)

wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb
wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb
sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
sudo apt-mark hold libgstreamer-plugins-base0.10-0
sudo apt-mark hold libgstreamer0.10

(For more information, see https://mikewilliamson.wordpress.com/2016/11/14/installing-r-studio-on-ubuntu-16-10/).
Ubuntu 17.10 and higher

No additional packages are needed.

3. Install R Studio

Download the binary version of R Studio and install.

Be sure to use the latest version in the wget command.  You can get the URL for the latest release by right-clicking on the Ubuntu Debian installer near the bottom of the R Studio Download page.

Ubuntu 12.04 to 15.10 (32 Bit)

wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-1.1.463-i386.deb
sudo dpkg -i rstudio-*-i386.deb

Ubuntu 12.04 to 15.10 (64 Bit)

wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-1.1.463-amd64.deb
sudo dpkg -i rstudio-*-amd64.deb

Ubuntu 16.04 to 18.10 and higher (64 Bit only)

wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-xenial-1.1.463-amd64.deb
sudo dpkg -i rstudio-*-amd64.deb

4. Optional

Prior to Ubuntu 17.10, if you want to show R or R Studio in the "Education" category in the Unity Dash, instead of the "Development" category, do the following, respectively.

sudo sed -i "s|Graphics;|Education;|g" /usr/share/applications/R.desktop
sudo sed -i "s|Development;|Education;Math;|g" /usr/share/applications/rstudio.desktop


how to add a user directory in apache on ubuntu

Use

sudo a2enmod userdir

to enable moduserdir (if it isn't already enabled).

Add

UserDir somefolder

to your VirtualHost's configuration to set the diectory name to somefolder (by default it's public_html.

Add something like

   <Directory /home/*/somefolder/ >
     Require all granted
     Options +Indexes
   </Directory>

to your VirtualHost's configuration to allow access to the user directories.


After you have upgraded your packages, dpkg will save its new configuration file with a .dpkg-new suffix (if you chose to keep your own changes):

diff -u /etc/foo.conf /etc/foo.conf.dpkg-new

If you chose for overwriting your conffiles, it will be renamed and get a .dpkg-old suffix:
    diff -u /etc/foo.conf.dpkgold /etc/foo.conf

As tumbleweed said, you can also extract the .deb file. First you need to get the .deb file from somewhere and then you will be able to extract it. If you have not run apt-get clean before, you should have a .deb file already available in /var/cache/apt/archives/ which means that you can skip the apt-get download part and adjust the path for dpkg-deb -x accordingly.

apt-get download foo
dpkg-deb -x foo_<version>_<arch>.deb fs
diff -u fs/etc/foo.conf /etc/foo.conf


Universal USB Installer does not recognize the iso file

Try Unetbootin ,select the appropriate installer  file based on your Current OS and also verify the md5sum of ISO before using it.

A suggestion , see screenshot

Don't select the first option Distribution , because it does not lists the current   Ubuntu Precise Pangolin 12.04 edition. So rather ,
Select the Diskimage option , then Browse to the location of the Ubuntu ISO image from the ....  button.
IMPORTANT option , select the Type and Drive Option Very Carefully to avoid data loss . If it is Usb Drive , most probably will be sdbX , sdcX, do a cross check and Proceed with OK option.


How to convert a command to start a server to a service?

Add a systemd service file e.g.

cat <<EOF | sudo tee /etc/systemd/system/dapperdox.service
[Unit]
Description=This is dapperdox
Wants=network-online.target
After=

[Service]
Type=forking
User=dapperdox
ExecStart=/sbin/startproc /full/path/to/dapperdox -spec-dir=examples/specifications/tc -bind-addr 129.19.20.55:4096
ExecStop=/sbin/killproc -TERM /full/path/to/dapperdox

[Install]
WantedBy=multi-user.target

EOF

Now try if you can start it.

sudo systemctl start dapperdox.service

Adjust the different things as you need them.

Afterwards you want to enable it so it starts during boot.

sudo systemctl enable dapperdox.service


Convert .csv file to .ods using terminal

I used the LibreOffice commandline to convert a sample csv file:

soffice --convert-to ods koko.csv --headless

So to use it in a batch command would be

for i in "$1"/*; do soffice --convert-to ods "$i" --headless; done

Usage: ./converter.sh /path/to/folder


What is the correct driver to use for a Samsung CLP365W printer?

I solved this problem by this way:

sudo su
(enter password)
./uninstall.sh
./install.sh

As I understood, any changes made by previous installation attempts, were disturbing to a new one.


Removed swap when editing fstab file-not sure

From what I'm reading, I don't think that you have removed the swap partition. Getting the swap partition's UUID is easy by typing in a terminal: blkid. One of the lines should contain the word swap. That line should look something like this:

/dev/sda5: UUID="e911d747-0add-49dc-a37d-7b6b16656c2f" TYPE="swap"

Now, edit /etc/fstab by typing in the terminal: sudo gedit /etc/fstab. Add a line saying:

UUID=swap's-uuid-number none swap sw 0 0

So, in my case, it should be:

UUID=e911d747-0add-49dc-a37d-7b6b16656c2f none swap sw 0 0

Save the file, reboot. You should have your swap partition mounted automatically again.

If blkid doesn't show a swap partition, you should create a new one. I'd advice you to do that via the tool gparted. Install it via sudo apt-get install gparted or via the Software Center, then run it. In gparted, select an unused area, then click on the new partition button (it looks like a document with a green plus sing on it), and make sure you format it as linux-swap or swap, can't really remember what it's called again. A good swap partition should be 2 times the size of your RAM. So if you've got 2GB of RAM, make sure that your swap partition's size is 4GB. When you've done that, blkid should show have a line containing swap. Continue using the instructions above.


What is the differences between mysql-client and mysql-client-core?

mysql-client-core - containts core client binaries for mysql database support while
mysql-client - depends on mysql-client-core and contains other extended features and utilities (for ex perl support)


Can I download updates, but not install them with apt-get

According to its man page, apt-get upgrade --download-only will only retrieve packages; it will not unpack them or install them.

Still according to the man page, apt-get upgrade --no-download --ignore-missing will force APT to use only the .debs it has already downloaded.


Xubuntu notification menu is randomly empty

OS: Xubuntu 18.04

Click on the notification bell icon
Turn off "Do not disturb"
Then, in Notification settings …, open the Log tab, and set Log notifications to always and Log applications to all.

General Tab

Applications Tab

Log Tab

Notifcation bell icon dropdown


How to install Skype from ".tar.gz" in Ubuntu 14.04

Open a terminal and navigate the directory where skype-4.3.0.37.tar.bz2 is and run:

tar -xvjf skype-4.3.0.37.tar.bz2

Which will untar it to the current directory.Normally (99% of the time) it will create it's own subdirectory so you don't need to worry about that.
Just so you know:
tar - Tape ARchiver
And the options:
x - extract
v - verbose output (lists all files as they are extracted)
j - deal with bzipped file
f - read from a file, rather than a tape device

tar --help will give you more options and info.
From how to extract a "tar.bz2" file?.

To install run these two commands:

sudo apt-get install dconf-tools
dconf-editor

Expand desktop->unity->panel and add the following to the
    systray-whitelist item: 'Skype', 'skype'
    Finally logout and login again from Unity. Navigate the skype-4.3.0.37  directory (where skype-4.3.0.37.tar.bz2 initially was). Then do:

./skype

If the Skype  does not appear in the Tray, a workaround can be:

sudo apt-get install sni-qt:i386

From skype-4.3.0.37 README.


Remove all non-numeric characters from text files

With sed:

sed 's/[^[:digit:]]\+//g'

[^[:digit:]]\+ matches one or more (+) non-digits ([^[:digit:]]) and we're replacing that with empty string, globally (g)

Use sed -i (or sed -i.bak for keeping the original with a .bak extension) for in-place editing of the file.

Same thing with awk's sub(Regex, Replacement, Input) function:

awk 'sub("[^[:digit:]]+", "", $0)'

Use --inplace for in-place editing of the file.

Example:

% cat file.txt
Sydney  33
Castle hill  47
Lake's town hill  79

% sed 's/[^[:digit:]]\+//g' file.txt
33
47
79

% awk 'sub("[^[:digit:]]+", "", $0)' file.txt
33
47
79


Error when enlarging a LUKS encrypted partition with Gparted

I got the same issue running Gparted 1.0.0 on Parrot 4.8. It seems that the problem is that cryptsetup resize asks for the encryption passphrase and gparted is not expecting that.

Try running the sudo cryptsetup -v resize 'sda5_crypt' command manually in a shell instead of through gparted.

If you need to shrink the partition I think you would need to do the entire process manually on the command line (cryptsetup luksOpen, resize2fs, cryptsetup resize, cryptsetup close, parted).


"Command 'gksu' not found" error on Ubuntu 18.04

gksu has been deprecated.

It's been removed from Ubuntu 18.04, as well as Debian and other newer Linux distributions. If you do a web search with the phrase "Ubuntu man gksu", you will see there's no 18.04 version available. Here are alternatives:

Alternate[0]: use "-H"

sudo -H nautilus

Alternate[1]: Use "admin://"

gedit admin:///etc/udev/rules.d/somefile.rules

Alternate[2]: Use "pkexec"

pkexec gedit


To stop pulseaudio from suspending a sink when idle we may comment out (by adding #) the following line in our default.pa (located in /etc/pulse/, or in ~/.pulse) to look like follows:

 # load-module module-suspend-on-idle

Restart the pulseaudio server to take effect (by running pulseaudio -k in a terminal)


Mount Mac OS Extended Journaled Filesystem and share via AFP

Yes, I supposed it would be possible to host an HFS+ partition over AFP/netatalk, but a more permanent solution would be to copy the files from the HFS+ partition over to an EXT4 directory. In addition, it's far simpler to setup a Samba server on Linux and the Macs should still be able to access the files.

Adding Samba to your server isn't too difficult, as outlined here

Install samba with sudo apt-get update && sudo apt-get install samba
Create a new samba user with sudo smbpasswd -a <user_name>
Make the directory to be shared mkdir /home/<user_name>/<folder_name>

At this point, you should copy the files over to this directory so that they will be shared on the samba server.

You will have to disable journaling on the Mac to mount the drive on Ubuntu. The first answer at https://superuser.com/q/84446/663873 descibes how to disable journaling

On your Mac

Open Disk Utility under Applications -> Utilities
Seect the volume to disable journaling on.
Choose Disable Journaling from the File menu. (On later Mac OS versions you'll have to hold down the option button when you click the File menu. Or if you like Apple+J)

After you connect the drive, mount the partition, as another answer on the question says:

First, make sure that you have hfsprogs installed. Example installation command:

sudo apt-get install hfsprogs

Next, mount or remount the HFS+ drive; commands need to be as follows:

sudo mount -t hfsplus -o force,rw /dev/sdx# /home/<user_name>/<folder_name>

Then we continue setting up the Samba server

Backup the default samba config file sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
Edit the file sudo nano /etc/samba/smb.conf

Add this to the end

[<folder_name>]
path = /home/<user_name>/<folder_name>
valid users = <user_name>
read only = no

Then restart Samba with

sudo service smbd restart

Then to access the files from a Mac, go to the file manager select Go > Connect To

And enter
smb://<ip of server>


How to resolve libgtksourceview-3.0-common (>= 3.10.2-0ubuntu1~saucy1) dependency?

You have the GNOME3 PPAs (presumably added while you were using 13.10, and so still using the 13.10 tag). Update the PPA entries to use trusty instead of saucy, or remove the PPAs altogether:

sudo sed -i 's/saucy/trusty/g' /etc/apt/sources.list.d/*.list
sudo apt-get update

Note that if you do choose to remove the PPA, you will have to use ppa-purge, considering the extent of the effect the GNOME PPAs have.


did you try to disable acpi or acpi ext in the advance settings? Sounds most likely like it is a video-usb conflict.


Using certbot with 18.04 - issues with "add-apt-repository ppa:certbot/certbot"

Try:

nano /etc/resolv.conf

add blow 2 lines if not present already.

nameserver 8.8.8.8
nameserver 8.8.4.4


Detect processor during preseed post-install script

It turns out that uname is implemented by BusyBox during preseed, and it supports uname -m but not uname -p. You can verify in a normal shell with BusyBox installed:

$ uname -p
x86_64
$ busybox uname -p
unknown
$ busybox uname -m
x86_64

In all the cases I care about, the values happen to be the same.


Can't remove bogo-python in keyboard indicator

My first suggestion would be:

Reinstall ibus-bogo
Log out and log in again
Go to Text Entry and remove the item
Uninstall ibus-bogo

However, since the OP reported that this was not sufficient, and since he only wants the English (US) keyboard layout, the solution was to change ~/.config/dconf/user via this command:

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us')]"


Installing Roccat Tyon driver and libgaminggear

You need three steps:

add ppa with roccat-tools to your system :

sudo apt-add-repository ppa:berfenger/roccat

resynchronize the package index files from their sources:

sudo apt-get update

install roccat-tools (with libgaminggear as dependency):

sudo apt-get install roccat-tools

Now you can find roccat-tools in dash search


The premise of your question is mistaken. The Lotus Notes web client needs to be installed on the server side by your e-mail provider so you can use it in any modern web browser on the client side. There's nothing you can do about that as an end-user (except to ask your e-mail provider to set up Lotus Domino on their end).

However, there are multiple mail user agents ready for installation in Ubuntu's package repositories. See for instance the following questions:

What E-mail clients are available?
Mail program for Netbook


Unable to connect to wired DHCP connection via my PC?

The kernel incorrectly matches this NIC with the r8169 kernel module.  This is shown by the lshw trace where it shows that the NIC has been disabled.
According to this article, the NIC should be associated with the r8168 kernel module.  With the incorrect kernel module you will either get slow speeds or no connection what-so-ever.
According to Launchpad - this is also a recognised bug with Oneiric - however, it looks like it has been resolved for 12.04 since Precise uses a newer kernel (v3.2)

hardware issues
First, let's rule out a NIC hardware failure - NICs can go bad (the firmware/ROM) - an indication of this is the fact that the MAC address is recognised as FF:FF:FF:FF:FF
If you last had a working NIC with Natty (or previous Ubuntu version) - then boot your PC with a LiveUSB/LiveCD.
Test your wired connection - rerun sudo lshw -class network.  Look for the MAC address.  Also look to see if it still says disabled.
If it still fails to connect via a live usb/cd with the version of ubuntu it last worked with then you have a strong indication of hardware failure.

potential software solutions
Once you have ruled out hardware issues, then lets concentrate on possible software solutions.
For the solutions below you will still need a valid internet connection...
If you have a spare NIC card that is not of this model I would insert this into your PC and connect to the internet via a wired connection.  If you can connect via wireless - do so.  Otherwise, you may need to move your hard-drive into another computer to do the following and then transfer it back to your original PC.
FIRST - BACKUP YOUR SYSTEM with a good backup tool such as Clonezilla
Suggested Fix 1
According to the launchpad bug report, this is potentially fixed if you enable the proposed repository in software sources and install the package linux-backports-modules-3.0.0
Suggested Fix 2
You may be able to download the Precise kernel (v3.2) and install this.
From the mainline kernel area of launchpad:
Download the amd64 headers.deb,  headers_all.deb and the image_amd64.deb files
then install the kernel using the syntax:
sudo dpkg -i [package_name].deb

Suggested Fix 3
This is something you may be able to resolve by downloading the realtek driver and compiling it yourself.
Download the Linux source - at the time of writing this it is v8.028.00
Unpack the tarball :
tar vjxf r8168*.tar.bz2

Change to the directory:
cd r8168-8*

Compile:
sudo ./autorun.sh

You can check whether the driver is loaded by using following commands.
lsmod | grep r8168
ifconfig -a

If there is a device name, ethX, shown on the monitor, the linux
driver is loaded. Then, you can use the following command to activate
the ethX.
ifconfig ethX up

Finally, blacklist the r8169 driver add the following to /etc/modprobe.d/blacklist.conf
#blacklist r8169 driver
blacklist r8169

Potential workarounds
A similar bug-report mentioning odd-MAC addresses for the r8169 kernel module on older kernels gave a couple of suggested workarounds.
work around 1
Once booted stop and start the kernel module:
sudo rmmod r8169 && sudo modprobe r8169

work around 2
Boot from your Natty live CD - run ifconfig -a and record the MAC address for eth0.
Boot into oneiric. Examine your udev persistent rules and map the correct MAC address to eth0
sudo cp /etc/udev/rules.d/70-persistent-net.rules /
sudo nano /etc/udev/rules.d/70-persistent-net.rules

change the MAC address.  If in doubt - please add to your question the contents of your rules file.


Since Ubuntu 15.04 you can use the NetworkManager GUI for that:

  How to configure a Linux bridge with Network Manager on Ubuntu

  The easiest way to create a bridge with Network Manager is via nm-connection-editor. This GUI tool allows you to configure a bridge in easy-to-follow steps.

  To start, invoke nm-connection-editor.

$ nm-connection-editor

  The editor window will show you a list of currently configured network connections. Click on "Add" button in the top right to create a bridge.

  Next, choose "Bridge" as a connection type.

  Now it's time to configure a bridge, including its name and bridged connection(s). With no other bridges created, the default bridge interface will be named bridge0.

  Recall that the goal of creating a bridge is to share your Ethernet interface via the bridge. So you need to add the Ethernet interface to the bridge. This is achieved by adding a new "bridged connection" in the GUI. Click on "Add" button.

  Choose "Ethernet" as a connection type.

  In "Device MAC address" field, choose the interface that you want to enslave into the bridge. In this example, assume that this interface is eth0.

  Click on "General" tab, and enable both checkboxes that say "Automatically connect to this network when it is available" and "All users may connect to this network".

  Save the change.

  Now you will see a new slave connection created in the bridge.

  Click on "General" tab of the bridge, and make sure that top-most two checkboxes are enabled.

  Go to "IPv4 Settings" tab, and configure either DHCP or static IP address for the bridge. Note that you should use the same IPv4 settings as the enslaved Ethernet interface eth0. In this example, we assume that eth0 is configured via DHCP. Thus choose "Automatic (DHCP)" here. If eth0 is assigned a static IP address, you should assign the same IP address to the bridge.

  Finally, save the bridge settings.

  Now you will see an additional bridge connection created in "Network Connections" window. You no longer need a previously-configured wired connection for the enslaved interface eth0. So go ahead and delete the original wired connection.

  At this point, the bridge connection will automatically be activated. You will momentarily lose a connection, since the IP address assigned to eth0 is taken over by the bridge. Once an IP address is assigned to the bridge, you will be connected back to your Ethernet interface via the bridge. You can confirm that by checking "Network" settings.

  Also, check the list of available interfaces. As mentioned, the bridge interface must have taken over whatever IP address was possessed by your Ethernet interface.

  That's it, and now the bridge is ready to use!

(Source)

Other resources:

Network Connection Bridge (Community Wiki)
Bridging Network Interfaces (Community Wiki)


Dual-boot Ubuntu/Windows 7 upgrade to Ubuntu 16

What version of Ubuntu do you currently have installed?

You can install Ubuntu on the same partitions were the old version of Ubuntu is the process is the same as any other installation

When you run the live session of Ubuntu and begin your installation choose Something else, them choose the same partition were the old Ubuntu is installed and begin the installation

Don't not touch any of the Windows partitions and you should be good to go


tlmgr: Local TeX Live (2019) is older than remote repository (2020)

Personally I would recommend to install all the LaTeX stuff from official Ubuntu repository.
For Beamer use :
sudo apt-get install texlive-latex-recommended

as it contains needed beamer.cls. You will get not too old 2019 version which is really enough to typeset documents. Newest 2020 is not needed here at all.


proFTPd issues to update WordPress Plugins, etc after upgrade from Ubuntu 18.04 to 20.04

Right answer is to set size 12 for data type int on column bytes_in_used.


"Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS"

Spotify is having some problem with their repository URL being incorrectly resolved on DNS level. As a temporary solution replace the URL in your repositories list. By default, i.e. when installed from official Spotify instructions for Ubuntu users, you'll find it in /etc/apt/sources.list.d/spotify.list. For different distributions the line might be in /etc/apt/sources.list or in any of the files under /etc/apt/sources.list.d/. Change it to read as follows (mark the -origin part):

deb http://repository-origin.spotify.com stable non-free

Afterwards clean the apt lists cache and update as usual:

sudo rm /var/lib/apt/lists/*
sudo apt-get update && sudo apt-get -y upgrade

It should work.


Ubuntu install on Chromebook ARM (samsung)

Simply type in your password, which will not appear, and press Enter.


Ubuntu 12.04 Server as VMWare Guest: Unable to Ping and Access Apache from Host

Run 'nslookup hostnameofguest' on the Win 7 host to make sure the dns is resolving the hostnameofguest to the correct ip address.

If the firewall isn't the issue, then you will likely have to modify the Apache config  to allow http://[GuestIPAddress] to work.

  This is probably not a firewall issue--I I have that disabled (using Firestarter, I think) otherwise even ping to guest IP shouldn't work?

A firewall can be configured to block http but allow icmp (ping) to work.


Wireless disabled by hardware switch on an Asus X550V

Is the module asus_nb_wmi loaded? Check:

lsmod | grep asus

If so, please try a driver parameter:

sudo -i
echo "options asus_nb_wmi wapf=0" > /etc/modprobe.d/asus.conf
exit

Reboot and see if the Fn+F2 behavior is changed.

If the above does not work, redo it again but replace asus_nb_wmi wapf=0 with asus_nb_wmi wapf=1, and if that does not work, replace it with asus_nb_wmi wapf=4 instead.


I'm not 100% positive of this, but my guess is that there's been a GRUB update that's causing a mismatch between different GRUB components -- the main GRUB binary, GRUB modules stored in /boot/grub, and/or the GRUB configuration file. It's possible that Boot Repair is interacting with this, because that tool re-installs GRUB, which could result in mis-matched components.

If I'm right, sticking with GRUB 2 will be difficult, because you'll need to manually re-install it. There are several ways to do this. One of the more complex is described here. A less complex procedure is here. Note that none of these is guaranteed to work; GRUB 2 is notoriously finicky and can be very easily misconfigured. It's even possible that the attempt will make matters worse by making it impossible to boot to Ubuntu. The only reason GRUB 2 works reasonably well is that GRUB and Ubuntu developers have created extremely complex configuration scripts that get things right most of the time. When they don't, you're on your own with an overly-complex tool.

Another option is to abandon GRUB 2 in favor of another boot loader. I describe several here. My own rEFInd is likely to be the easiest to get working:

If Secure Boot is enabled, disable it, at least temporarily. (You should be able to re-enable it later.)
Download the USB flash drive or CD-R version of rEFInd from its downloads page.
Prepare a boot medium.
Boot to the rEFInd boot medium. You should then be able to boot either Windows or Ubuntu. Test both.
If you can boot both Windows and Ubuntu with rEFInd, boot to Ubuntu.
Install the rEFInd Debian package or PPA.
Test that you can boot from the hard disk via rEFInd.
If desired, re-enable Secure Boot. Note that you'll need to enroll the EFI\refind\keys\refind.cer or EFI\refind\keys\refind_local.cer key when you first boot if you re-enable Secure Boot. This is a one-time task. See the rEFInd Secure Boot documentation for more on this subject.


How do I get my Ubuntu install (in dual boot) to boot using UEFI?

You cannot easily switch from BIOS to UEFI boot. First you need to enable UEFI in the VM before operating installation. The entire layout of the disk drive (boot loader, partition table, etc.) is different for UEFI compared to BIOS.


I accidentally changed the gnome panel background color, how can I change it back?

I haven't found a way to do this in the Compiz based gnome-flashback, but you can change it in flashback-no-effects and it will take effect in the regular gnome-flashback too.

Log out and log into gnome-flashback-no-effects.  Then Alt +  Right Click  the panel and click "Properties".

Switch to the "Background" tab and select "None (use system theme)".

Then log out and log back into the regular gnome-flashback.


There is a r/Ubuntu post in Reddit by jmobastos69 that details how to install League of Legends (LOL) in PlayOnLinux (POL). This answer is a cleaner and slightly modified version of that post.

Remove wine and playonlinux and their dependencies that you have installed previously and remove retrieved package files:

sudo apt purge wine playonlinux
sudo apt autoremove
sudo apt autoclean

Clean install the staging branch of winehq  and wine for the 32-bit architecture using Wine's installation instructions for Ubuntu:

sudo dpkg --add-architecture i386
sudo add-apt-repository ppa:wine/wine-builds
sudo apt update
sudo apt install --install-recommends winehq-staging
sudo apt install wine:i386

Install playonlinux:

sudo apt install playonlinux

Start playonlinux as a background process in the terminal:

playonlinux &

Save the following script with a name of your choice (note that I copied and pasted the script from jmobastos69's link to this answer so that the script can be audited by everyone here):

# Date : (2012-04-12)
# Last revision : (2015-05-31 08:27)
# Distribution used to test : ArchLinux, Debian Sid
# Author : Quentin PÂRIS, Valentin PERRUSSEL, Pierre ETCHEMAITE
# Licence : GPLv3
# WineHQ: http://winebuild.playonlinux.com/wine/wine-patches/LeagueOfLegends2/

# Changelog
# (2012-05-11) 22:50 - Quentin PÂRIS
# - New wine patches for better perfomances
# (2012-05-11) 23:38 - Quentin PÂRIS
# - Dirty hack that fixes problems
# (2012-05-12) 09:45 - Quentin PÂRIS
# - Patches for osx
# (2012-05-28) 11:00 - Quentin PÂRIS
# - Checks for recent version of PoL (InsertBeforeWine is bad supported by 4.0.14)
# (2013-03-10) 22:51 - Pierre ETCHEMAITE
# - Use web downloader
# (2013-04-07) 22:23 - Pierre ETCHEMAITE
# - Reverted as they somehow broke PMB (not even installed)
# (2013-04-13) 20:12 - GNU_Raziel
# - Added POL_Wine_SetVideoDriver function
# (2013-09-07) 21:17 - Pierre ETCHEMAITE
# - Fix for newer LoL versions
# (2014-09-01) 21:17 - Quentin PÂRIS
# - Fix for newer LoL versions (added d3dx9)
# (2015-01-09) 00:54 - Pierre ETCHEMAITE
# - Update Wine to fix missing libgcrypto symlink
# (2015-02-10) 20:25 = Pierre ETCHEMAITE
# - Use official standalone installer/patcher
# (2015-05-31) 08:27 = Pierre ETCHEMAITE
# - use Wine 1.7.44-LeagueOfLegends2 to fix patcher issue
# (2016-01-26) 12:55 (UTC) - Jeddunk
# - upgrade Wine to 1.9.2-LeagueOfLegends5

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

WINEVERSION="1.9.2-LeagueOfLegends5"

TITLE="League of Legends"
PREFIX="LeagueOfLegends"
SHORTCUT_NAME="League of Legends"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"

POL_SetupWindow_Init
POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.18 is required to install $TITLE"
POL_SetupWindow_SetID 1135

which glxinfo || POL_Debug_Error "$(eval_gettext 'glxinfo is not installed. Please install mesa-utils package')"

if ! glxinfo | grep -q GL_EXT_texture_compression_s3tc; then
POL_SetupWindow_message "$(eval_gettext 'Warning! S3TC compression is not available on your system.\n\nIf you have a free driver, you might need to install a proprietary driver \n\nOtherwise, you can enable it by installing libtxc-dxtn0 package, but you might get slower results')"
POL_Debug_Warning "S3TC not enabled!"
fi

POL_Debug_Init

POL_SetupWindow_presentation "League of Legends" "Riot" "http://www.riotgames.com/" "Quentin PÂRIS, BlondVador" "LeagueOfLegends"

POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"

if [ "$INSTALL_METHOD" = "LOCAL" ]; then
cd "$HOME"
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"

if strings "$APP_ANSWER"|grep -q '\(name="Pando Media Booster Downloader"\|Advanced Installer\)'; then
NOBUGREPORT="TRUE"
POL_Debug_Fatal "$(eval_gettext 'Cant install using the official downloader, sorry')"
fi
FULL_INSTALLER="$APP_ANSWER"
else # DOWNLOAD
POL_System_TmpCreate "$PREFIX"

# http://forums.na.leagueoflegends.com/board/showthread.php?t=1474419
POL_SetupWindow_menu "$(eval_gettext 'Select installer to download:')" "$TITLE" "$(eval_gettext 'North America')~$(eval_gettext 'Europe West')~$(eval_gettext 'Europe Nordic and East')" "~"
case "$APP_ANSWER" in
"$(eval_gettext 'North America')")
DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseNA.exe"
DOWNLOAD_MD5="9d44b68bd02d7b5426556f64d86bbd16"
;;
"$(eval_gettext 'Europe West')")
DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseEUW.exe"
DOWNLOAD_MD5="eb5d7b007b6022ee555c0dd9fd71263e"
;;
"$(eval_gettext 'Europe Nordic and East')")
DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseEUNE.exe"
DOWNLOAD_MD5="f08d7b70776b0989eabb016bae77fdaa"
;;
esac
DOWNLOAD_FILE="$POL_System_TmpDir/$(basename "$DOWNLOAD_URL")"

POL_Call POL_Download_retry "$DOWNLOAD_URL" "$DOWNLOAD_FILE" "$DOWNLOAD_MD5" "$TITLE standalone installer"

FULL_INSTALLER="$DOWNLOAD_FILE"
fi

POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

POL_Call POL_Install_corefonts
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_vcrun2008
POL_Call POL_Install_d3dx9

Set_OS "win7"

POL_SetupWindow_message "$(eval_gettext 'Warning: You must not tick the checkbox "Run $TITLE" when setup is done')" "$TITLE"

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$FULL_INSTALLER"

Set_OS winxp

# Set Graphic Card informations keys for wine
POL_Wine_SetVideoDriver

POL_Call POL_Function_OverrideDLL builtin,native dnsapi
POL_Shortcut "lol.launcher.admin.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" "Game;RolePlaying;"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
# Free some disk space
POL_System_TmpDelete
fi

if [ "$POL_OS" = "Linux" ]; then
if [ "$(cat /proc/sys/net/ipv4/tcp_timestamps)" = "1" ]; then
FORUM_URL='http://forums.euw.leagueoflegends.com/board/showthread.php?t=2058453'
POL_SetupWindow_question "$(eval_gettext 'If you get connection errors when attempting to login, try disabling tcp_timestamps in the kernel.')\n$(eval_gettext 'Do you want to read original thread in League of Legends forums?')" "$TITLE"
[ "$APP_ANSWER" = "TRUE" ] && POL_Browser "${FORUM_URL}"
fi
fi

POL_SetupWindow_Close
exit 0

Choose "Run a local script" from the "Tools" menu of PlayOnLinux and select the script you have just saved.
Follow instructions to install League of Legends. Remember to uncheck the "Launch League of Legends" box at the end of the installation wizard.
In PlayOnLinux, press "Run" on the League of Legends app.


Just press Ctrl+Alt+T to start a user terminal.

Alternately, press Alt+F2, type gnome-terminal and press enter.


Expanding ubuntu partition with unallocated space

You can only grow partitions if there is adjacent unallocated space. If you have unallocated space at a different location, you need to move all the partitions in between the two first. GParted offers a "move" operation. Moving large partitions may take a long time.

As with most operations that change the geometry of a partition, there's a significant chance of failure and data loss. So back up your data.


How to rdiff-backup / rsnapshot / backupninja from LOCAL to REMOTE machine?

in short, yes, these tools can work for the purpose you want.

here's a great article on setting that up.

http://www.debian-administration.org/articles/351


Brother ADS-2000 ADF Duplex Scanning not working

For duplex scanning you can try the GUI application xscanimage provided with the Ubuntu package sane.
You can see there the options Scan Source: Automatic Document Feeder and ADF Mode: Duplex

EPSON provides too a very good GUI for scanning ADF in duplex iscan .


Dual boot Win 8.1 and Ubuntu 16.04. Neither system bootsup

Check your UEFI settings in BIOS. UEFI will usually make it impossible to dual boot in any scenario.

If your UEFI is already disabled, try changing the secure boot setting and turn it off.

Doing this should help you. It did for me and I'm currently typing this on an ASUS X550LA that is dual booting to win 7.

Also, considering that you already reinstalled Ubuntu, and still nothing changed, you may have to reinstall Ubuntu again to get the GRUB selection screen to work properly. I think that UEFI/secure boot may be overwriting the GRUB overlay, thus preventing you from getting into your install.


How to convert existing ubuntu installation into iso [ GUI ]

You cannot convert an installed system into an iso file in an easy way. The tools that you link to have been used and can be used, but they are not easy to to use.

That said, I can describe a method that is much easier:

Ubuntu OEM install

Create the system that you want to distribute by installing a fresh system.
Treat the installed system (that you want to distribute) by installing program packages, tweaking the system language and other settings and maybe adding desktop files and other common user files according to the following link,

help.ubuntu.com/community/Ubuntu_OEM_Installer_Overview

into an OEM install system.
Distribute [compressed] cloned images (img files) to the end users. (This is how systems for Raspberry Pi are distributed.)
When an end user installs the system, the user ID, password and computer's network ID will be created so that they will be unique.

An Ubuntu OEM system is an installed system, which is portable between computers, much more so than Windows, but not as portable as a live Ubuntu system made from an iso file.

This will work, if the computers are fairly similar, and particularly if no proprietary drivers are necessary. So if your computer works best with some proprietary driver, typically for graphics or wifi, you had better not install it and rely on the built-in linux drivers. The end user can install a proprietary driver if necessary and maybe some boot option if needed for some hardware, for example nomodeset for newer and more powerful nvidia graphics.


Pulseaudio CPU load after Skype starts during session restoring

In previous versions the answer was to go into Skype Options, select notifications then unset the audio notification for Skype Login.
I don't know if it works on this version consistently, though I'm having some luck with it so far.


How to remove all the images in a document in LibreOffice Writer?

You can also use a short macro from within LibreOffice to remove all images in a document:

Sub RemoveImages

   Dim oDoc as Object
   oDoc = ThisComponent

   Dim oGraphics as Object
   oGraphics = oDoc.getGraphicObjects()

   Dim oImg as Object

   For Each oImg in oGraphics
       oDoc.getText().removeTextContent(oImg)
   Next

End Sub

This example could also be modified to change the properties of images (such as making them all a uniform size) as well as handling shape objects, etc.

Creating Macros

LibreOffice provides a Basic language as well as in IDE to create, debug, store, and run code.

To open the macro dialog, use Alt + F11 or, from the menu, Tools > Macros > Organize Macros > LibreOffice Basic

Code is placed in modules, which are organized into libraries. You can create your own, but for most purposes you can use the built-in MyMacros library and the built-in Module1.

Once the macro dialog is open, highlight Module1 and press Edit. This opens the IDE.

Code is organized into Subs and Functions. Borrowing from VBA, Functions are used to return a value and Subs do not return a value. You can define your own subs and functions anywhere below Main. So to use this code to remove images, you just paste it in the module.

Using Macros

You can run the code right from the IDE by clicking anywhere inside the Sub you want to run and press F5. (Functions, since they return a value, need to be called from a Sub.) You can also use the dialog buttons or menu to run the code. The IDE includes an integrated debugger, which is crucial when writing new code.

The next time you open the macro dialog, you will see the sub listed as a macro and it can then be run without opening the IDE. Individual macros can also be assigned to menu or toolbar items.

Note: This macro will run on whatever is the active document. When running a macro from the menu or macro dialog, this can be assumed to be the document where you just pressed the button; but when using the IDE to create, run, or debug code, make sure you haven't made another document the active document.

LibreOffice Basic

LibreOffice Basic is very similar to VBA, but that similarity can also be deceiving since the object model is completely different and the syntax also has many differences.

For example, in VBA, once you have a reference to an image object, the image object would have a delete method. Here, objects have or inherit very few methods. To delete the image object, you use the document element with a structure and syntax very similar to a browser-based DOM.

LibreOffice Help has links for getting started with LibreOffice Basic.


Is it possible to get a usable Ubuntu 15.04 running in Virtual Box on OS X?

Upgrading to VirtualBox 5.0.4 fixed the issue:

$ /usr/lib/nux/unity_support_test -p
pci id for fd 4: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
[...]
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
OpenGL vendor string:   Humper
OpenGL renderer string: Chromium
OpenGL version string:  2.1 Chromium 1.9

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       yes

It still can't load vboxvideo but 3D is working and Unity is now usable.


Migrating Thunderbird Mails from Windows 7 to Ubuntu 14.04 ?

Best is to Use IMAP if you insist on POP se the alternative at the bottom.

Since you are using the POP protocol in your mail client. Mails are most probably being downloaded to your email client and removed form the server
(check your email client settings to verify this)

If you were running IMAP already  you would only need to to Step NR 3

1) Set up IMAP on your old mail client.
Disable checking of email with the POP account but do not remove it
and re add another  the same email account in your windows email client, but this time with IMAP support instead of POP support.

Since IMAP will not download and remove emails from the mail server ,but simply make an cached version of your emails in your email client. Allowing you to read delete and otherwise interact with your emails from multiple devies.

2) Move emails back to server

Once that is done , drag and drop all your emails from your pop3 inbox in your mail client into the IMAP inbox you should be having.
This will basically re-upload the emails onto your e-mail providers server.

3) Configure IMAP on thunderbird.

Once all email have been moved back.
You can simply configure your thunderbird on linux or any email client
to gain access to your emails.

In general IMAP is always preferred over POP as it has better support for handling email when using multiple email clients in multiple locations.

If you insist on continuing using POP:
Since the Thunderbird file format is the same between different operating systems you can actually extract the data file manually from the install folders.

But it might be easier just to install the import export add on ,
export the emails with it , move that file to the new place and import it with the same add on.


What is the difference between "vlc" and "VLC media player" in Ubuntu Software in Ubuntu 16.04?

The one titled "vlc" is a snap package. You can verify that checking its source, it should say something like "Snap Store".

You can use any of them.


you should install PHP and change Nginx config file

first, install PHP follow line:

sudo apt install php7.2 php7.2fpm

and change Nginx config file like the following:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;
    index index.php index.html index.htm index.nginx-debian.html;

    server_name server_domain_or_IP;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}


Automatically Refreshes Chrome/Firefox multiple times!

It looks like your F5 key got stuck.

F5 makes your browser refresh the page and/or prints ~ into the prompt.

Try a different keyboard and see if it resolves the problem.


How to install Minecraft Pi edition on a PC/Laptop using Ubuntu

As pointed out in some of the comments, the reason it wont run on Ubuntu, or Lubuntu, is that Minecraft Pi is specifically compiled to run on the Raspberry Pi hardware.

It's not a a slightly customized version of the regular, Java based Minecraft, which will run on most platforms where java is available. Rather, it is an an executable program that has been hard-wired for the Raspberry Pi' which has, generally speaking, fewer resources than a regular desktop PC, and also a somewhat different internal operating system structure.

There is really no simple workaround for this. Minecraft-Pi was developed to meet a particular need, which it does awesomely, IMHO. It's just not a general purpose Minecraft client or server.

If you want to achieve the same outcome, namely using Python to create and interact with your Minecraft world, you certainly can, it's just a little bit more work than running mcpi on the Raspberry Pi.  A great place to start is this Instructable.


See for example

6 of the Best Free Linux CAD Software
The LUnIx Linux CAD Links: Extensive list of more than 50 alternatives with their licence type.

Not exactly the same as Solidworks or Autocad, but it really depends on what you are going to do. Reviews says that many free software do have good quality, but unfortunately that's really subjective.


The solution suggested here worked for me: How to set up VIA chrome9 screen driver?

I've just installed Lubuntu on my old HP Mini (coincidence!) and had the same issue with the screen resolution. Running

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

and rebooting worked for me.


Could be a kernel problem or a failing hard drive, we need more information.

First, you can you install and run smartmontools

sudo apt-get install smartmontools

# See if any of the following commands yields any problems with the drive.

sudo smartctl -s on /dev/sda
sudo smartctl -t short /dev/sda
sudo smartctl -a /dev/sda
sudo smartctl -l selftest /dev/sda

Second, did the problem resolved with an updated kernel ?

Third, this page might also be of assistance https://help.ubuntu.com/community/DiskPerformance


Referring to an existing environment variable in another

You can't do that in /etc/environment. It's not a script file, and variable expansion does not work there.

To modify PATH system wide, a file with a .sh extension in the /etc/profile.d folder is a better method. It can be named myvars.sh or just about anything, as long as it has the .sh extension. In your case it might look something like this:

export JAVA_HOME=/usr/apps/jdk1.8.10_1
PATH="$PATH:$JAVA_HOME/bin"

That way you keep the default PATH definition in /etc/environment, and modify it in your own file.

Please see the EnvironmentVariables page for reference.


How to disable Synaptics pinch-to-zoom support in evince (PDF viewer)?

Looks like it's as simple as evince --disable-gestures. But check your version to be 3.2.1-0ubuntu2+ :
https://bugs.launchpad.net/ubuntu/+source/evince/+bug/873866

If you want this to affect at opening files from file manager, you need to edit evince.desktop. Here is a one-line fix:
$ sudo sed -i 's/^Exec=evince %U$/Exec=evince %U --disable-gestures/' /usr/share/applications/evince.desktop


Why was pulseaudio installed on Ubuntu server 14 after dist-upgrade?

Don't remove it, it's part of the system.
Pulseaudio is installed by default, something else must of gone wrong here but to answer your question.
To stop pulse restarting run
echo "autospawn = no" > $HOME/.config/pulse/client.conf

This makes a file client.conf in .config/pulse that disables its autospawn, now you can kill it if you want
pkill -f pulseaudio

The system should fall back on ALSA, post a comment if no audio
Pulse should restart on boot but if it does not and you need it back then remove the file you made
rm $HOME/.config/pulse/client.conf

To stop it restarting at boot
cp $HOME/.config/pulse/client.conf .config/autostart


Change a user's password with the usermod and ssh commands

See this related answer.
In short, SSH passes whatever follows it as a string, not as a list of arguments, so enclose it in quotes. And you may want to insert a && before that last sudo.