Shell script to read filename and pick most recent date by timestamp

This is the approach i used. I have a working backup script with it.

CD into the backup DIR.

cd backup_dir && ls -t | head -n 2

-t -> sort by modification time, newest first

In a script:

LAST_2_BACKUPS=$(ls -t | head -n 2)


Dual Boot on separate drives - best configuration

You're trying to apply BIOS knowledge to an EFI-based computer, and that will lead you astray. (Note that EFI/UEFI is a replacement for the older BIOS. Many people -- and even manufacturers -- refer to EFIs as "BIOSes," but this is misleading.) In particular:

  plug in all drives and configure BIOS/UEFI to select default startup disk

Under BIOS, boot loader code is read from a disk's Master Boot Record (MBR), so it's common to refer to "booting a disk" or something similar, and this is reasonably accurate. Under EFI, though, boot loader code is stored as ordinary files on an EFI System Partition (ESP). Importantly, a single ESP can contain multiple boot loaders, and you can have any number of ESPs. The computer knows which boot loader to run because that information in stored in NVRAM. Thus, although boot code is read from a disk, "booting a disk" is ambiguous at best, and downright deceptive in many contexts.

Instead, you should think of booting a file, and always keep in mind that the file to be booted is referenced in NVRAM. A further complication is that many (but not all) EFIs delete those NVRAM references if the file to be booted disappears. Thus, routinely unplugging disks so you can boot or install an OS on another disk can render the computer unable to boot the OS on the unplugged disk, even when you plug it back in. This fact makes the sort of disk-juggling you describe in your first option inadvisable. (It can be made to work, but if you try, it's imperative that you understand how your computer handles its NVRAM-based pointers to boot loaders, so that you can re-create any entries that are deleted.)

You should also be aware that Ubuntu has a bug that causes it to install its boot loader (GRUB) to the first ESP it finds (normally on /dev/sda), even if you try to tell it to do otherwise. It's possible to work around this bug by temporarily changing partition type codes.

Overall, if you intend to leave both disks in the computer for the long haul, I suggest you not be too concerned with completely isolating the two OSes from each other. In particular, don't obsess about isolating their boot loaders; just let the installers put the boot loaders where they want to put them. This should work fine for most purposes. If you intend to move the disks from one computer to another from time to time, though, you'll need to be more careful and learn more about ESP type codes, how your computer handles NVRAM entries pointing to boot loaders, etc.

As to making Windows the default OS, that's easily accomplished with a tool like GRUB Customizer. I can't offer specific advice on using it, though, since I avoid GRUB whenever possible. (I maintain the rEFInd boot manager, which can also be configured to boot Windows by default by changing the default_selection line in refind.conf.)

For more information on how EFI-mode booting works, I recommend reading one or more of the following:

Adam Williamson's blog entry on how EFI works -- This page describes the theory behind EFI-mode booting.
A question and answers on the differences between BIOS and EFI booting on Superuser.com -- This provides the basics of the preceding, but is more concise.
My page on installing Linux on EFI systems -- This page is a more practical introduction to EFI-mode booting than Adam Williamson's blog.
My page on EFI boot loaders for Linux -- This page describes EFI boot loader choices for Linux systems.
My page on the CSM -- This page covers the CSM, including when it's useful and when it's not.
The Ubuntu community wiki entry on UEFI -- This page is a bit disjointed, but is the most Ubuntu-specific introduction to EFI and its issues.

Finally, modern EFIs provide a feature, known as the Compatibility Support Module (CSM), which enables them to boot using BIOS-mode boot loaders. (See my page on the CSM, referenced above.) If learning the EFI-mode ways seems like too much hassle to you, you can keep doing things in the BIOS way by using your computer's CSM; however, that poses its own risk. In particular, many computers never completely disable EFI-mode boot support, so you can easily end up with one OS installed in BIOS mode and the other in EFI mode, which will be harder to manage than either an all-EFI or an all-BIOS installation. Also, some EFIs lack a CSM, and it's likely that manufacturers will begin dropping the CSM in the future, so sticking with BIOS-mode booting will simply delay your need to learn about EFI-mode booting. IMHO, it's better to take an hour or two to learn the basics of EFI-mode booting than to try to stick with BIOS-mode booting via a CSM.


I found the output of my failing launcher entry here:

.cache/upstart/gnome-session-Unity.log


will the PC boot from the DVD and install Ubuntu on an empty hard disk?

Yes, it will. You just need to set your BIOS for boot from DVD after installing your HD. Follow the instructions on the installation wizard and that's it.


How to setup 2 monitors and specify workplaces?

You can not assign separate workspaces for your monitors with Unitiy and Compiz.

A workaround that does the trick for many people is simply use the Always on Visible Workspace setting that can be accessed by right clicking on a window's top bar when it is not maximized.
This way the the windows set to use this option will stay in position when you change workspaces.

For real separate workspaces for your monitors you would need to use another desktop environment and/or window manager.


Looks like a problem with the program; you'd better try the support forums/ troubleshooting pages for the software itself.


Combine multiple text files into one file

To have empty lines betwen files:

cat file1 newline file2 newline file3 > newfile

Where 'newline' is file with empty line.


is there a key tracking software for ubuntu 12.04. Lenovo U400

You could try with logkeys from the ubuntu software center.
Hope it helps.


Dwarf Fortress starting during apt-get upgrade

With a question as weird as this, it's of course impossible to say for sure -- but I'll eat my hat if my first hunch isn't correct. :)

The only way I can think of, how such unrelated things could be linked is this:
After installing (well, extracting) Dwarf Fortress, instead of going to the directory every time and running it with ./df, you wanted to be able to run it from anywhere, like any old command. You added the Dwarf Fortress directory to your $PATH, before the system directories, perhaps by chance, perhaps because you noticed it didn't work otherwise, and you'd instead just get information about your filesystems.

Dwarf Fortress's executable is named df, which is also the name of a system tool for displaying disk space usage of your filesystems, creating a collision. By making it so that when you type df, Dwarf Fortress starts, you've shadowed the system tool, so when a script wants to - let's say - check if you have enough free space for unpacking an archive, instead of invoking df - the system tool - it'll start Dwarf Fortress instead. And after you quit Dwarf Fortress, the poor little script will be very confused as to why it wasn't given the disk usage information it asked for.

Anyway, thanks for the laugh, this has to be among the funniest problems I've ever seen voiced on StackExchange. :)


Inverted Mouse Axis on a Ubuntu Live USB

xorg.conf is, for all intents and purposes, no longer there. But there is now a directory, /usr/share/X11/xorg.conf.d/, that keeps configuration options for x.org.

A side note: In 10.04 Lucid, the directory is /usr/lib/X11/xorg.conf.d/.

To invert the mouse movement:

Create a file /usr/share/X11/xorg.conf.d/50-invertaxes.conf

to create this file, you need to gain root privileges. Start your favourite text-editor like this: gksu gedit. This will prompt you for a password.
alternatively, you can type this into a Terminal:

sudo nano /usr/share/X11/xorg.conf.d/50-invertaxes.conf

Put the following into the file:

Section "InputClass"
    Identifier  "Invert Mouse"
    MatchProduct    "The name our your mouse in xorg"
    MatchDevicePath "/dev/input/event*"
    Option      "InvertY"       "true"
    Option      "InvertX"       "true"
EndSection

Where you replace "the name of your mouse in xorg" with the real name as detected by xorg.
to find out what Identifer you need to use, open a terminal and type

xinput list

this will produce output similar to this:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=10   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]
[more...]

From there I can see the Identifier of my Logitech mouse, Logitech USB Reciever.

To be able to keep this configuration, you will have to have set up your Live USB drive with "Persistent storage":

Enable the option at the bottom, "Stored in reserved extra space", before creating your new USB startup disk and your settings will be kept when rebooting.


My ubuntu installation failed because of too small partitions

Restart with the USB (or CD) you used to install; use the 'install ubuntu' option; then pick 'use the whole disk to install' in the partitioning screen. Job done.

Was there anything else going on, eg wanting to keep stuff? If so, you'll want to go into 'Try Ubuntu' to get a live system up, then run 'gparted' from the menu & manually re-arrange your partitions. When done with that, there is a desktop icon to install the system.


First of all, swap should be equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.

For adding swap space, you have three options: create a new swap partition, create a new swap file, or extend swap on an existing LVM logical volume. It is recommended that you extend an existing logical volume.

Creating a logical volume for swap

To add a swap volume group (assuming /dev/VolGroup00/LogVol02 is the swap volume you want to add):

At a terminal with root privileges (sudo -s), create the logical volume of size 1024 MB (for example):

lvm lvcreate VolGroup00 -n LogVol02 -L 1024M
Format the new swap space:

mkswap /dev/VolGroup00/LogVol02
Add the following entry to the /etc/fstab file:

/dev/VolGroup00/LogVol02 swap swap defaults 0 0
Enable the extended logical volume:
swapon -va
Test that the logical volume has been extended properly: cat /proc/swaps or free.

Creating a swap file

To add a swap file:

Determine the size of the new swap file in megabytes and multiply by 1024 to determine the number of blocks. For example, the block size of a 512 MB swap file is 65536.
At a terminal with root privileges (sudo -s), type the following command with count being equal to the desired block size:

dd if=/dev/zero of=/swapfile bs=1024 count=524288
Setup the swap file with the command:

mkswap /swapfile
To enable the swap file immediately but not automatically at boot time:

swapon /swapfile
To enable it at boot time, edit /etc/fstab to include the following entry:

/swapfile swap swap defaults 0 0

The next time the system boots, it enables the new swap file.
After adding the new swap file and enabling it, verify it is enabled by viewing the output of the command cat /proc/swaps or free.

Extending swap on a logical volume

To extend a swap logical volume (assuming /dev/VolGroup00/LogVol01 is the volume you want to extend):

At a terminal with root privileges (sudo -s), disable swapping for the associated logical volume:

swapoff -v /dev/VolGroup00/LogVol01
Resize the LVM logical volume by 1024 MB (for example):

lvm lvresize /dev/VolGroup00/LogVol01 -L +1024M
Format the new swap space:

mkswap /dev/VolGroup00/LogVol01
Enable the extended logical volume:

swapon -va
Test that the logical volume has been extended properly: cat /proc/swaps or free.

Source: http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-swap-what-is.html


Incompatibilities between ASUS G771JW and Ubuntu 14.04 LTS

You should use the latest official drivers that support your NVIDIA GEFORCE GTX 960M graphics.

Uninstall the old NVIDIA drivers by executing:

sudo apt-get purge nvidia*
sudo reboot

Install the new NVIDIA drivers by executing:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-358 nvidia-prime
sudo reboot


Virtual PC error, Unable to boot - please use a kernel appropriate for your CPU

After a little more reading, it seems like VirtualPC is intended for use mainly as a way of running older MS Windows operating systems and applications.  One of the major selling points for VirtualPC is that you can run WindowsXP apps without running a separate instance of a complete Windows XP virtual machine (like VMWare Fusion on OSX).  That functionality, however, would not be available at all if you try to install a non-Windows operating system in VirtualPC.

Your best bet, if you are truly interested in running Ubuntu inside Windows 7, is to try one of the other virtualization offerings out there.  I'd recommend VirtualBox, which is available at no cost, and has a wealth of documentation on how to install other operating systems.

Someone has even put together helpful, illustrated, step-by-step instructions on how to install Ubuntu inside VirtualBox (too long to repost full contents here).


Had a similar problem with a Panasonic Smart TV, solved by selecting an "enhanced" option in the HDMI configuration of the TV.


what can be causing /etc/cron.daily/apt to hang?

What really properly fixed this problem for me was uninstalling apt-xapian-index package. None of the other suggested fixes did anything in my situation.

You may read more details from my little blog post.


OK here is your solution :

change the port number used by apache configuration file from 80 to 8080 by this command and you can change it inside ports.conf :

gksudo gedit /etc/apache2/ports.conf

restart apache .

sudo service apache2 restart

Try it

Type localhost:8080/ and try


ubuntu 16.04 - Slow after sometime and freezes

try to give this memory partition : (May solve your problem ) your /dev/sda1 is comparatively small

/dev/sda1  *         2048   7813119   7811072   3.7G 82 Linux swap / Solaris

/dev/sda2         7815166 488396799 480581634 229.2G  5 Extended
/dev/sda5       307857408 410271743 102414336  48.9G 83 Linux
/dev/sda6       410273792 488396799  78123008  37.3G 83 Linux
/dev/sda7         7815168 307857407 300042240 143.1G 83 Linux

Check here why Linux swap should be >1G


Appreciate your responding.
I managed to install Foxit Reader via https://www.itsmarttricks.com/how-to-install-foxit-pdf-reader-in-ubuntu-18-04/. Got it on Menu. Opened PDF files by Foxit. OK, but I couldn't recognize Foxit I had on Windows 7.
However new to Linux, I dare say that Foxit doesn't belong here. Why? At least because it's not listed in Synaptic PM, whereas Okular & Evince are.
So, I installed Evince, made it default, and that's it.
The matter is over. Thanks again, Igor.


Openprinting has a site to the PIXMA MX350. According to this site the driver for your printer works perfect. So you can follow the official Ubuntu help about setting up a printer:

Open the printer menu from system settings
Choose 'add' a new printer
Choose the correct printer model
give your printer a name
print a test document


Unable to access the Internet when installed within VMware player

Please check below things and update:

What is the gateway for the internet on the host.
What is the vmware network adapter state and what is the type of network adapter. (It should be bridging adapter.)
it is the Virtual network edit which is assigning the IP to your VM or it is your ISP router?
take snapshots for the same and upload. So that we will be in better possition to advice you on what could be the problem and how it can be resolved.
if you think everything it right then traceroute to www.google.com and rout IP gateway and upload it.

Best of luck!!


Take a look at the qbittorrent package, it builds two versions of the package from the same source using the new dh syntax. Here's what it might look like in your case (untested):

#!/usr/bin/make -f
%:
    dh $@

override_dh_auto_configure:
    mkdir -p build-nox && cd build-default && ../configure --prefix=/usr
    mkdir -p build-gtk3 && cd build-gtk3 && ../configure --prefix=/usr --enable-gtk3-experimental

override_dh_auto_build:
    dh_auto_build --builddirectory build-default
    dh_auto_build --builddirectory build-gtk3

override_dh_auto_install:
    dh_auto_install --builddirectory build-default --destdir debian/inkscape-trunk
    dh_auto_install --builddirectory build-gtk3 --destdir debian/inkscape-trunk-gtk3

override_dh_auto_clean:
    dh_auto_clean --builddirectory build-default
    dh_auto_clean --builddirectory build-gtk3


how download a site for a specific format with wget

You can simply use Bash's range syntax to specify the URL:

wget 'http://www.example.com/foo'{0..999}

This would be equal to the command written out like this (leaving most of the URLs in between out, because I'm too lazy to type 1000 URLs):

wget 'http://www.example.com/foo0' 'http://www.example.com/foo1' ... 'http://www.example.com/foo42' ... 'http://www.example.com/foo999'


I used to have this issue with Ubuntu 12.04.3 (64 bit). What I did was: Connect my USB mouse to the computer (it does not recognize it). Reboot the computer with both the mouse and the live USB device. Then restart. If it still doesn't work, go into the BIOS/UEFI then enable/disable/enable the internal touchpad. Then load Ubuntu on the USB drive. If it still doesn't work, tell me. Hope it helps (worked for me)


looks like you're suffering from this bug:

https://bugs.launchpad.net/ubuntu/+source/udev/+bug/646293

This problem is reportedly fixed in Natty, but there have been no suggestions about how to fix it properly for Maverick. I'll update this answer when I know more.


I hope this link will help you:

https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions


deleted ubuntu touch from galaxy nexus, now there is no os, how can i sideload os from windows

Have you read https://wiki.ubuntu.com/Touch/Install#Restoring_Android ?

The instructions would still apply for the exception of step 5 which mentions

adb reboot-bootloader

Where instead you would want to power cycle the device by pressing Power, Volume Up and Volume Down to reach the bootloader.


USB Audio Device Loopback Through Speakers

Just a warning: This answer is theoretical, because i don't own such hardware...

AFAIK you have to enable a loopback-device for pulseaudio:

pactl load-module module-loopback

After that you should see a new application under audio-settings.

If it works well, you may add a line to the pulse-audio-config to make this persistent:

sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

Good luck!

Additional info from matto1990:

  You only need to do this if you want to loopback from a device other than the microphone or line in (the default ones). Go to software center and install "PulseAudio Volume Control". Open it up and go to the recording tab. In the show dropdown select "all". In the "loopback from internal audio" section (or whatever the output device you want is) select the input device you want to loopback from (in my case the USB one).


Using the latest version of GParted will fix the issue.

The older version seems to have some bugs.

Source


Filesytem check or mount failed on System Upgrade

I found this answer where is suggested to mount the root partition and do a

sudo apt-get install -f

which reinstalled some missing files and finally the system booted right.


NTP time always wrong after reboot. It sync with ESX even with NTP setup

ntpd will not sync the time if the difference between local computer time and the time server's time exceeds a threshold.

Put ntpdate -b 0.pool.ntp.org (replace 0.pool.ntp.org with your local time server if you have one) in your rc.local or a custom startup service and it should sort it out. You should probably also make sure that timesyncd is enabled and running. systemctl enable timesyncd; systemctl start timesyncd should accomplish that.


Install AMD Topaz XT Radeon R7 driver on ubuntu 17.10

It says, driver=amdgpu, installed and in use. You don't need to install anything.

(source: comment by mikewhatever)


StaloneTray will let you add a notification area to your desktop. It's quite light and it's used often with minimalist WMs.

I have used it in the past and it did its work.


I had the same problem and

I created a 4k profile the same way you did.
I created a custom rendering profile with the following contents that I called 'Lossless 4k MKV'

acodec=ac3 ab=448k ar=44100 ac=2 vcodec=libx264 crf=15 rc-lookahead=60 coder=1 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 me_method=umh subq=10 me_range=24 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 b_strategy=2 qcomp=0.6 qmin=0 qmax=51 qdiff=4 bf=8 refs=9 directpred=1 flags2=+mixed_refs+dct8x8+fastpskip+mbtree cqp=0 wpredp=2 trellis=2 weightp=2 deblock=1:0:0 direct=auto muxer=auto aspect=%dar

I converted it to 1080p as well with the following command:

avconv -i 4k.avi -scale 1920x1080 -c:v libx264 -preset slow -crf 15 1080p.mkv


first of all let's clarify something: fis1 and fis2 are folders and not files? If yes, you must first find out where you are located (in wich directory) if you are using the terminal.
The command is: pwd

if, like me you are located in the home directory (which ends with this sign ~$ ) then you have to relocate in the Desktop directory.
You do this by writing command:
cd Desktop

After that you can use this command to copy the file:
cp fis1/perfect fis2/

I hope I helped you.


Error while loading shared libraries: libpgplot.so:

I have installed PGPLOT before on my Ubuntu Machines without much problem. Be sure you have set the LD_LIBRARY_PATH environment variable to where libpgplot.so is.


Can 'Save as' in Atril be configured to open the file chooser with most recent directory selected instead of /home/Documents for downloaded PDFs?

It seems that the only solution to this problem is a modified source and recompiled application. I have created a version with an additional command line parameter (--documents-dir) that enables the user to specify the default save as directory. For details, see this post.
I have also created binary packages for 20.04, which are available from my PPA:
sudo add-apt-repository ppa:laczik/ppa
sudo apt-get update
sudo apt upgrade atril


If we assume the date of extraction was 20th October;
find ~/Documents -maxdepth 1 -type f -newermt 'Oct 20' ! -newermt 'Oct 21' -print
After confirming these are the files you can delete them;
find ~/Documents -maxdepth 1 -type f -newermt 'Oct 20' ! -newermt 'Oct 21' -delete
Good Luck!


Ubuntu 12.04 installation CD is not booting?

The question you have asked is one that occurs frequently. The difficulty we have answering your question is that it is hard for us to determine from what you have written in your question what steps you actually performed.

The following questions and suggestions are an attempt to better understand (and fix) your problem.

Since this problem occurs frequently, there is also a great deal of help information for it. The first thing you should do is look at this BootFromCD article in the Ubuntu Community Help wiki.

While the first three topics in that help article have already been raised in earlier comments or answers, I'll review them again to make sure these possibilities have been considered.

CD/DVD was not burned properly

We need to verify that the media you are attempting to boot from was created correctly. I assume you have downloaded one of the these two Live CD ISO images:
ubuntu-12.04-desktop-i386.iso
ubuntu-12.04-desktop-amd64.iso

An ISO image file is similiar to an archive file in that it is actually a large number of separate files and folders which have been stored in a single file. What you want to burn to a CD is the content of the ISO file, not the ISO file itself.

The screen captures in this section say it all. If you open the CD/DVD you created with the file manager of any operating system, what do you see?

If you see just a single ISO file (as illustrated by this "Incorrect" screenshot) then you burned the CD/DVD incorrectly. Please try again after looking over the information on this BurningIsoHowto page.
BIOS is not set to boot from CD or DVD drive

My understanding from one of your comments is that your system uses an  Intel DG31PR motherboard, correct? If so, then  by pressing F2 when your system boots you will enter your BIOS configuration where you can make persistent changes to your BIOS settings.

You can use this method to change the boot priority settings for your devices in your BIOS.
PC requires you to hold down or press a key to boot from CD

The other approach you can use with a DG31PR motherboard is to temporarily change which device the BIOS bootloader boots from. I prefer this method because you do not have to make persistent changes to your BIOS settings. The change only applies to the current boot.

To do this press F10 when your system boots. A menu similar to the example below should appear allowing you to (temporarily) select your CD as the boot device.

Could you please look at these suggestions and update/edit the body of you question to let us know whether they helped or not? We need to make sure that your install media and BIOS boot device selections are correct before we can consider other possibilities.


What does this specific command do? How does it work?

Your assumption that this moves all files from the wordpress folder into the current folder you are in is correct.  (the proper terminology for a "folder" is actually a "directory", but that's just semantics, the general idea is the same)

In command line, . indicates "This Directory", or rather the current directory you are in.

The mv command is the "move" command.  The wordpress/* indicates that the folder you are inside has another folder called wordpress in it, and is directing the system to move all files and folders that are within the wordpress folder.  The . command then indicates the destination, the directory you are in.

This command will move all files within the wordpress folder (which exists in the directory you are currently in) into the directory you are currently in, and will keep the structure of the files and directories through the move (so instead of wordpress/wp-admin it'll be in just wp-admin without the wordpress folder name prepended.)

If you want to know what the path is to the directory you are currently in before you run the command, just type pwd on the command line, and it'll tell you what the directory path you are currently in is.  That'll be what . would be.


Ubuntu crashes after few minutes of boot

Fix the file system...

boot to a Ubuntu Live DVD/USB
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier

sudo fsck -f /dev/nvme0n1p1

repeat the fsck command if there were errors
type reboot

Windows

If you've installed any Windows drivers that allow you to read/write to Linux ext2/3/4 partitions, uninstall it asap, as it's what's been corrupting your SSD.

Check SMART

Start the Disks application. Select your SSD, then review the SMART Data & Tests window. Edit your question and post screenshot(s) of the data.

Check your BIOS

sudo dmidecode -s bios-version # should be 117

https://support.lenovo.com/by/en/downloads/ds540054 to download the newer version.

Check nvme firmware

sudo lshw -C disk # identify firmware version for Intel SSD

Then go to the Intel site and check for newer firmware for the SSDPEKKF512G8L

Check memory

Run your internal memory test, or go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Update #1:

Lenovo is sending a replacement nvme drive.


How to upgrade Ruby to version >=2.4.4 on Ubuntu 16.04? (for wpscan)

You have two possible paths.

1) Use Ubuntu Snap rather than Apt - it'll allow you to choose which version to install, the latest or any prior one. See The official Ruby snap is available post on the Ruby.org website for instructions. Main advantage is it's officially supported both by Ruby.org and Ubuntu.

2) If you prefer to stick with Debian's Apt package management tool, you can rely on Brightbox PPA Ruby packages for Ubuntu which gives you almost the same choices (at present, they have yet to provide the very recent version 2.7). Here you'd have to rely on Brightbox to continue providing optimized Ruby packages for Ubuntu as they have done for years.

Like you, I'm using tools written in Ruby by others and, in my experience, the installation of Ruby Gems can be far from trivial.


Ubuntu 13.10 New keyboard stuff bugged wine games

With d-conf i changed
Desktop -> ibus -> general -> use-global-engine = true;
                              use-system-keyboard-layout = true;

Also removed the key repetition option on the keyboard config via GUI

And it seems to have fixed this bug...
Going to post on winehq for the skyrim bug (already tested and working fine)


Unpacking and configuring kvm components

Ubuntu (and other distributions) can have multiple kernel versions installed but you can only (directly) use one at the time. The version is selected by the bootloader. I'm not sure if this applies to Chromebooks but on a normal PC, you'd hold Left Shift before Ubuntu loads and that'll show you the Grub bootloader and give you choices about which Kernel version you'd load.

But that's all academic for your purposes.

2.6 is ancient. Modern Ubuntu is on 4.x kernels. You're okay here.
Use distribution-specific documentation. You don't have to download and compile KVM support yourself. https://help.ubuntu.com/community/KVM


Why does Ubuntu 13.10 not detect my Win7 partition?

If you want to install Ubuntu 13.10, try the live version, go through the installation steps and install Ubuntu. If you have Windows on your machine, it will recognize your Windows system and save its bootloader. I've done the same way on my desktop and my laptop and it went well. I had Windows 7 on both machines.


How can I debug what's slowing down new session logins?

What I would try is to press Alt-Ctrl-F1 to switch to a text console, log in there and run top in the console. Then switch to the login screen again using Alt-Ctrl-F7, enter your login/password and while it tries to log you in switch back to the text console to see if you can spot any processes which cause the problem.


To reset everything to the way it was before you removed the applications, once you  boot to recovery mode by pressing Ctrl+Alt+F1 enter you username and password, and then reinstall the Ubuntu-desktop meta package.
Code:

sudo apt-get install --reinstall ubuntu-desktop

Then reboot with
Code:

sudo reboot


I want to do an addressage automatic with my dhcp server

You're missing semicolons in your subnet declaration, and the term host from your host declaration, the following should get you on track:

authoritative;
ddns-update-style none;
default-lease-time 240;
max-lease-time 380;
subnet 192.168.21.0 netmask 255.255.255.0 {
  range 192.168.21.30 192.168.21.70;
  option routers 192.168.21.1;
}

host flore {
  hardware ethernet 08:00:27:e1:f0:4e;
  fixed address 192.168.21.40;
}


Programs shut down immediately after opening

From the error report it looks like you have, at some time, run sudo software-center and the root user has claimed the ownership of the software-center cache.

Try

sudo chown -R wes:wes ~/.cache/software-center

As to the others - it is worth launching synaptic and update-manager from the terminal to see if you get similar error.

Its perhaps work checking that you haven't accidentally changed the ownership of .cache and some/all subfolders to root.

i.e.

ls -ld .cache

and

ls -ld .cache/*


Can I get image info (resolution, etc) inside of Nautilus on mouse over or single click?

For 11.04 and earlier, the package nautilus-columns package can be added to integrate the feature into nautilus so a resolution column can be added, like this:

Unfortunately no one has updated it for Gnome 3.x, so it won't work on 11.10 and later. On these versions of Ubuntu, I prefer to use the app gThumb rather than fight with the limited feature set of nautilus. GThumb is in the Ubuntu repositories.


Can I use the Steam client as a launcher for all my games?

If your Wine or PlayOnLinux games provide a launcher, then it should work as in Windows. As an example, adding Mahjongg to the Steam games list:

All the applications that appear on the Dash should be listed here. If the launcher is not on the list, one can use the "Browse" button to locate it (using wine they should be located in ~/.local/share/applications/wine). Unfortunately it seems "Browse" only let you select .desktop files, so if your application don't have one you need to create it.

After the selection, the game should appear on the list:


How to reveal a folder in explorer from terminal

You can type

nautilus .

But I recommend

nautilus . 2>/dev/null & disown

so that you can continue to use the terminal and close it without auto-closing nautilus, and prevent any warnings printing in the terminal

. is the current working directory

You can also just open a terminal and type nautilus Documents from home or nautilus ~/Documents from anywhere


How to avoid trying to connect to a stranger's network with known SSID?

Easiest way to do this is the change your SSID so it doesn't interfere.

Now, I don't know what your router's config looks like, but it should be fairly simple to do.


Why removing gnome-core does not remove all of it's dependencies?

gnome-core is a meta package and the case with meta packages is --
They pull packages to get installed but removing them will not remove all the pulled packages.
So, unless, you have copied the names of packages installed by gnome-core, it is virtually impossible to remove all the 600 MBs.
But, you can get the names of pulled packages by the command
apt-cache depends gnome-core

and try to remove the packages one by one. You should check always whether it is removing any necessary packages.
Or you can get the list of packages in more useful way by this:
apt-cache depends gnome-core | cut -f 2 -d ':'  | tr '\n' ' '

This will list all the dependencies of gnome-core package, ignore the package name in <> marks only.
How do I know, whether any system package is being removed?
When you see a lot of space is being freed from the command, (more that 600MB), you should know that you are removing more than you installed. apt-get will let you know how much space is going to be freed, before removing like with a message like this
After this operation, 384 kB disk space will be freed.

And When you try to remove essential system package, apt-get will show you a warning message.
Recommendation: I suggest you to get a list of packages from the first command, and try to remove them one by one. It is safer. If you see a warning, skip removing that package. I see, most of the packages in gnome-core are related with GUI, I guess removing those packages will not harm your system (if you don't want a GUI).
Hope this helps!

Some note on removing packages
How pulled packages get uninstalled when you remove the master package ?
When you install a package and that package depends on some other packages, the dependency packages also get installed and Marked as auto. That means, the Apt system mark them as Automatically installed as dependency of another package. It helps Apt system to recognize unnecessary packages.
When, you uninstall the master package, the pulled packages are also marked as obsolete or unnecessary packages in the system. You can remove them by providing autoremove option to apt-get. (aptitude automatically remove them with the master package).
An exception to this rule is, if you later install another package which also depends on the pulled packages, the pulled packages will not be marked as obsolete when you remove the first master package.
Example: You installed a package X that depends on package Y. When you installed X, Y also gets installed and marked as auto. If you do not install another package Z which also depends on Y, removing X will render Y's usefulness and Apt system will mark it obsolete and you can remove it with autoremove option.
But If you install a package Z after X which also depends on Y, then removing only X does not mark Y as obsolete package and you can't remove it with autoremove option
But note that if you remove package Y after installing X, it will remove package Y including X, because X can't stay without Y and you wanted you remove Y, that means you also wanted to remove X. Apt will remove X automatically when removing Y unlike marking it obsolete to later removal by autoremove option.
Try out examples: ubuntu-desktop package is a meta package. It was used to install the standard Ubuntu desktop. Try removing it, only that package will be removed.
Also try installing lubuntu-desktop package (You may not want to install this, because it is a big download). But, when you try to remove it, only the tiny package lubuntu-desktop will get removed.
Apt handles meta packages differently
The meta packages like gnome-core, ubuntu-restricted-extras are also called virtual packages. They are called so, because they are basically empty packages, They pull other packages by depending on them. For example, ubuntu-restricted-extras depends on (in 12.04) following packages:
ubuntu-restricted-addons
ttf-mscorefonts-installer
unrar
gstreamer0.10-plugins-bad-multiverse
libavcodec-extra-53

Where, ubuntu-restricted-addons itself is another meta package. Since, meta packages are used for only pulling packages, installing them does not mark the pulled packages as auto, they are marked as manually installed. The result? Removing only the master meta package will not mark the pulled packages obsolete and you can't remove them by autoremove option. That is why you need to remove each pulled package of the meta packages manually.
Example: You installed a meta package X that depends on packages Y and Z. When you installed it, the Y and Z packages aren't marked as auto (automatically installed as dependency of another package), instead they marked as manually installed. In later time when you want to remove X, only the  virtual X package gets removed. Both, Y and Z, remain in the system and you can't uninstall them with autoremove option.


Any idea why firefox not showing bold words?

Ok, I figured it out. I just changed the font settings.

In Preferences, Content, Fonts & Colors, Advanced, I unchecked

  Allow pages to choose their own fonts, instead of my selection above.

and it's normal again.


Same terminal, different shell.
Child processes you run from a shell, including child shells, use the same terminal automatically. This is not specific to sudo in any way--this is generally how it works when you run any program from your shell.
Shells and terminals are different things. A shell is what you use to run commands in a terminal. A shell can operate interactively--it gives you a prompt, you give it a command, it runs the command or shows an error about why it cannot, and the process repeats until you quit the shell. Or it can operate noninteractively, running a script.
Even though your terminal is (probably!) emulated, not physical, nonetheless Unix-like operating systems like Ubuntu assign device nodes to each of your terminals, and you can check what terminal you are using with the tty command. It will usually be /dev/pts/0, /dev/pts/1, /dev/pts/2, etc., for a terminal window or SSH connection, or /dev/tty1, /dev/tty2, etc., for virtual consoles. Really what tty does is to tell you which terminal, if any, input is being taken from; see below for details.
ek@Io:~$ tty
/dev/pts/1
ek@Io:~$ bash
ek@Io:~$ tty
/dev/pts/1
ek@Io:~$ exit
exit
ek@Io:~$ sudo su
[sudo] password for ek:
root@Io:/home/ek# tty
/dev/pts/1
root@Io:/home/ek# exit
exit
ek@Io:~$

You can see that, even though sudo su creates a new shell as Yaron very well explains, the terminal you are using doesn't change.
Of course, there's another way to observe that the terminal is the same: you're still writing input the same way and in the same place, and reading output the same way and in the same place.
A few technical details
Most commands you run in a shell--such as ls, cp, mv, rm, touch, wc, du, df, ssh, su, sudo, sh, bash, and many more--cause a child process to be created. This child process has your shell as its parent but it is a separate program. By default, it is connected to the same terminal as your shell.
Your shell is still running, but it waits in the background for the program to terminate (or for you to suspend it). When the program terminates, the shell is still running and it resumes operation, prompting you for your next command.
These are the major exceptions:

Shell builtins like cd don't create a new process at all, unless they are used in a construct that employs a subshell (explained here), such as ( ) grouping and pipelines.
You can tell the shell not to wait for a command to complete by running the command asynchronously. You do this by ending the command with &.  (your-command arguments... &)
You can use job control to change which command, if any, the shell waits for. With the disown builtin, you can detach jobs from your terminal.

Though I wouldn't really consider this an exception to child processes being connected to the same terminal as their parent, note that a process you run from a shell in a terminal will not always be taking input from that terminal or sending output to that terminal:

You can redirect any of the standard streams with the <, >, and >> operators.
You can pipe one command's output to another's input with |.

Since the tty command only checks which terminal its standard input is, you can "fool" it:
ek@Io:~$ tty
/dev/pts/1
ek@Io:~$ tty </dev/pts/0
/dev/pts/0

Or, less deviously:
ek@Io:~$ tty </dev/null  # not a terminal
not a tty
ek@Io:~$ tty <&-         # closes the input stream
not a tty


PulseAudio server connection failure: Connection refused

Reinstalled Ubuntu after spending so much times looking for a solution.


I don't know about a official fix of this problem, but

sudo service network-manager restart

works in the meantime.


KODI Remote control using LIRC worked and now doesn't

Here is my recent experience with Lubuntu 16.04.1 and an MCE RC6 remote.  Without even installing lirc, the remote behaves like a keyboard -- but not all of the keys on the remote work.

Using the remote with the application "Mythtv", most of the functions that I need worked without any changes (without installing lirc). But, using the regular keyboard, all of the functions are available (Mythtv can be controlled without a remote, just using the keyboard).  So, to make additional keys on the remote work (or customize remote key functions) I am using the package "ir-keytable".  This allows you to easily map keys on the remote to keyboard keys.

There are other approaches, but I was not able to make them work. For example, I was not able to get anywhere using lirc, or using udev to remap scancodes from the remote to keysyms. (On previous versions of linux, I did use lirc).


Use ubuntu so windows can print to an unsupported printer

I use Dropbox, and have directories for each of my 6 printer queues, plus a half-hourly cronjob. I can "print" from any device that can reach Dropbox.

But, for a locally connected system, you could manage CUPS from http://localhost:631, click on the Administration tab, and Enable Printer Sharing and a couple of others. Here is what I have:

First, of course, is to ensure that CUPS is working on the system where the printer is connected.

Second is to convince Windows to print to a "Generic Postscript Printer/Network Printer". GLWT (Good Luck With That)


Touchpad stops working after suspend on Lenovo T520

I have a T420 with Ubuntu 12.04.

I tried all the xinput fixes from https://bugs.launchpad.net/ubuntu/+bug/804109 which used to work with 11.10. With 12 the workaround doesn't work anymore.
What worked is to reload the mouse module, which I guess is simpler than logoff and loggin back.

Try this as root,

modprobe -r psmouse
modprobe psmouse


You could also install "Advanced Settings" using the software center. With regard to creating a folder in your home directory, I think it should be in lowercase;

instead of creating a folder called ".Themes", try creating a folder called ".themes". You might also consider creating a folder called ".icons" too.


How to make X server stop in case of kernel panic?

If you do kernel experiments, how about using kdump? That would give you more than just a fleeting glimpse of a second or two.
See https://ubuntu.com/server/docs/kernel-crash-dump


nvidia GPU and nvidia settings don't work on Ubuntu 16.04

I got it working by installing the deb network version from here.
https://developer.nvidia.com/cuda-downloads
Hope this helps someone with the same problem.


can i retrieve my files from my hdd after windows crash by booting from usb?

Your hard drive is not dead, but you won't be able to access it because Windows has marked the drive as in use.

Open a termainal, and type sudo fdisk -l. Find the name of your windows drive (example: /dev/sda5)

Now, using this, run sudo ntfsfix /dev/path/to/your/drive and it will fix the issue (or at least it should).


Installed 14.04 on a non-PAE (Pentium-M), but now I can't update ("This kernel does not support a non-PAE CPU.")

When installing on a non-pae capable system using forcepae option you may still boot without this option set in Grub. Subsequent kernel updates will then fail.

To overcome this add the following line to your /etc/default/grub (source: commment #4 to bug #1307105):

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash forcepae"

Then run

sudo update-grub

and reboot your system for changes to take effect.


Release dates of hardware are really not the focus of AskUbuntu and if you want an Ubuntu phone keep an eye out for news on it from tech news sites or Ubuntu related news sites, and/or Ubuntu on twitter, facedbook and google+.

On http://www.ubuntu.com/phone/register you can register to get the latest news if you want to receive it through mail.

The insight sites has some info on the phone and also lists the places that are going to get updated the first when there is news.

The Aquaris E4.5 Ubuntu Edition is about to get released in Europa (and then specificly Spain) but this is a flash sales, so a limited amount and a limited time. Besides a release in China and Europe by Meizu next there is nothing new.


Nautilus in Oneiric is using gsettings and not gconf, you can use this:

gsettings set org.gnome.desktop.background show-desktop-icons false


A segmentation fault occurs when a program tries to access memory outside of the area that has been allocated for it.

In this case, an experienced C programmer can see that the problem is happening in the line where sprintf is called. But if you can't tell where your segmentation fault is occurring, or if you don't want to bother reading through the code to try to figure it out, then you can build your program with debug symbols (with gcc, the -g flag does this) and then run it through a debugger.

I copied your source code and pasted it into a file I named slope.c. Then I built it like this:

gcc -Wall -g -o slope slope.c

(The -Wall is optional. It's just to make it produce warnings for more situations. This can help in figuring out what might be wrong, too.)

Then I ran the program in the debugger gdb by first running gdb ./slope to start gdb with the program, and then, once in the debugger, giving the run command to the debugger:

ek@Kip:~/source$ gdb ./slope
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ek/source/slope...done.
(gdb) run
Starting program: /home/ek/source/slope
warning: Cannot call inferior functions, you have broken Linux kernel i386 NX (non-executable pages) support!

Program received signal SIGSEGV, Segmentation fault.
0x001a64cc in _IO_default_xsputn () from /lib/i386-linux-gnu/libc.so.6

(Don't worry about my you have broken Linux kernel i386 NX ... support message; it doesn't prevent gdb from being used effectively to debug this program.)

That information is highly cryptic...and if you don't have debug symbols installed for libc, then you'll get an even more cryptic message that has a hexadecimal address instead of the symbolic function name _IO_default_xsputn. Fortunately, it doesn't matter, because what we really want to know is where in your program the problem is happening.

So, the solution is to look backwards, to see what function calls took place leading up to that particular function call in a system library where the SIGSEGV signal was finally triggered.

gdb (and any debugger) has this feature built in: it's called a stack trace or backtrace. I use the bt debugger command to generate a backtrace in gdb:

(gdb) bt
#0  0x001a64cc in _IO_default_xsputn () from /lib/i386-linux-gnu/libc.so.6
#1  0x00178e04 in vfprintf () from /lib/i386-linux-gnu/libc.so.6
#2  0x0019b234 in vsprintf () from /lib/i386-linux-gnu/libc.so.6
#3  0x0017ff7b in sprintf () from /lib/i386-linux-gnu/libc.so.6
#4  0x080484cc in calc_slope (input1=1, input2=150) at slope.c:26
#5  0x08048578 in main () at slope.c:52
(gdb)

You can see that your main function calls the calc_slope function (which you've intended), and then calc_slope calls sprintf, which is (on this system) implemented with calls to a couple of other related library functions.

What you're generally interested in is the function call in your program that calls a function outside of your program. Unless there is a bug in the library/libraries themselves that you're using (in this case, the standard C library libc provided by the library file libc.so.6), the bug that causes the crash is in your program and often will be at or near the last call in your program.

In this case, that's:

#4  0x080484cc in calc_slope (input1=1, input2=150) at slope.c:26

That's where your program calls sprintf. We know this because sprintf is the next step up. But even without it stating that, you know this because that's what happens on line 26, and it says:

... at slope.c:26

In your program, line 26 contains:

            sprintf(s,"%d",curr);

(You should always use a text editor that automatically shows line numbers, at least for the line you are currently on. This is very helpful in interpreting both compile-time errors, and runtime problems revealed while using a debugger.)

As discussed in Dennis Kaarsemaker's answer, s is a one-byte array. (Not zero, because the value you've assigned it, "", is one byte long, that is, it is equal to { '\0' }, in the same way that "Hello, world!\n" is equal to { 'h', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\n', '\0' }.)

So, why could this still work on some platform (and apparently does when compiled with VC9 for Windows)?

People often say that when you allocate memory and then try to access memory outside of it, that produces an error. But that's not really true. According to the C and C++ technical standards, what this really produces is undefined behavior.

In other words, anything can happen!

Still, some things are more likely than others. Why is it that a small array on the stack will, on some implementations, appear to work like a larger array on the stack?

This comes down to how stack allocation is implemented, which is permitted to vary from platform to platform. Your executable may allocate more memory to its stack than is actually intended to be used at any one time. Sometimes this may allow you to write to memory locations that you have not explicitly laid claim to in your code. It's very likely that this is what's happening when your build your program in VC9.

However, you should not rely on this behavior even in VC9. It could potentially depend on different versions of libraries that could exist on different Windows systems. But even more likely is the problem that the extra stack space is allocated with the intention that it will actually be used, and so it may actually be used. Then you experience the full nightmare of "undefined behavior," where, in this case, more than one variable could end up stored in the same place, where writing to one overwrites the other ...but not always, because sometimes writes to variables are cached in registers and not actually performed immediately (or reads to variables may be cached, or a variable may be assumed to be the same as it was before because the memory allocated to it is known by the compiler not to have been written to through the variable itself).

And that brings me to the other likely possibility for why the program worked when built with VC9. It's possible, and somewhat likely, that some array or other variable was actually allocated by your program (which can include being allocated by a library your program is using) to use the space after the one-byte array s. So then, treating s as an array longer than one byte would have the effect of accessing the contents of that/those variables/arrays, which could also be bad.

In conclusion, when you have a mistake like this, it's lucky to get an error like "Segmentation fault" or "General protection fault." When you don't have that, you may not find out until it is too late that your program has undefined behavior.


How to install latest version of Okular on Ubuntu 16.04?

Canonical support the version originally installed with 16.04 LTS for five years; which means any security updates are backported to the supported version.

If however you need later features not in the installed version (as seen on the website) you can always try installing a 'snap' version which is a recent alternative. I did a

sudo snap install okular

and it reportedly installed version 16.12.3 (revision 3) from KDE, so just install the snap version if you want later.

(note: Okular is a KDE app; uses Qt libs so will use more memory than using evince in standard Ubuntu which uses GTK+. Not a problem is you've got decent memory; but worth considering if you're 2GB or less)

addendum:  snap wasn't installed by default in 16.04; so you may need to install it to issue 'snap' commands.  please refer How to install snappy packages in Ubuntu 16.04


How to get a windows close/minimize buttons in top GNOME panel?

You can the gnome panel window applets.

sudo add-apt-repository ppa:tsbarnes/misc
sudo apt-get update
sudo apt-get install gnome-window-applets

Once installed you will see two new panel applets. Window title and window buttons. Place them anywhere on the panel.


If you aren't intending to install Linux on the hard drive but would like to boot Windows and run from the USB stick, you could always install a very small and minimal Linux partition on the Windows hard drive so that you boot into Windows from GRUB.

You can then edit GRUB to include the option to boot from the USB stick:

Boot from USB

It's basically a case of editing the configuration file and then updating GRUB so that it recognizes both Windows and the USB stick.


Interface has to be in monitor mode.
First bring it down with ifconfig wlo1 down
Then change it with iwconfig wlo1 mode monitor
Bring it back up ifconfig wlo1 up
Change channel iwconfig wlo1 channel 40


Please try this commands:

umount -l /PATH/OF/BUSY-DEVICE
umount -f /PATH/OF/BUSY-NFS(NETWORK-FILE-SYSTEM)

Reference:
https://stackoverflow.com/questions/7878707/umount-a-busy-device


Can't install Cura 3.1 to my Ubuntu 16.04

The current stable version of Cura is available by PPA:  ppa:thopiekar/cura:

sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt-get install cura

If you want a bleeding edge version of Cura - you can use ppa:thopiekar/cura-master

sudo add-apt-repository ppa:thopiekar/cura-master
sudo apt-get update
sudo apt-get install cura


How do I use lightscribe when burning CDs and DVDs?


How do you refresh formulas in OpenOffice/LibreOffice Calc?

Simple Recalculation:

Recalculates all changed formulas. If AutoCalculate is enabled, the Recalculate command applies only to formulas like RAND or NOW.

Choose Data - Calculate - Recalculate

F9

Press F9 to recalculate. Press Shift+Ctrl+F9 to recalculate all formulas in the document.

After the document has been recalculated, the display is refreshed. All charts are also refreshed.

The Add-In functions like RANDBETWEEN currently cannot respond to the Recalculate command or F9. Press Shift+Ctrl+F9 to recalculate all formulas, including the Add-In functions.

Source: http://help.libreoffice.org/Calc/Recalculate

References to Other Sheets and Referencing URLs or other external data

See source: http://help.libreoffice.org/Calc/References_to_Other_Sheets_and_Referencing_URLs*


How to register a shell script as the main application for a given file extension

This seems to work fine from a terminal if you do xdg-open foo.ext, however it doesn't seem to work in Nautilus unless you define your script as default for opening the *.ext file:

Select such a file,
Right-click,
Choose Properties,
Select the Open With tab,
Click on Show other applications,
Select your script (should be The script that manages .ext files),
Click Set as default, and finally press
Close.

After I did that, the script started from Nautilus.


Can't sign vboxdrv, mokutil thinks Secure Boot is not supported yet it is

Encountered similar problem, and switching Secure Boot Mode from Standard to Custom in BIOS (UEFI) setup fixed it. In my BIOS it is a separate option from Secure Boot Support, which remained Enabled. YBIOSMV.


Consider using wkhtmltopdf utility.

Example:

wkhtmltopdf http://www.google.com google.pdf

And yes, it's not installed by default, so you'll need to:

sudo apt-get install wkhtmltopdf


zenity list in forms dialog is not viewable

This seems to be a bug in Zenity. I have not found a way to directly fix this, but a "workaround".
If you add another kind of forms widget, like --add-entry, which correctly expands to the full dialog window width, the list widget will expand to full width too.
Example:
zenity --forms --add-list="interfaces" --list-values="eth0|eth1|wlan0" --add-entry="foo"

You should pick a widget which is useful for your dialog though, simply throwing a "foo" entry at the bottom of your dialogue which has no meaning is not what they call user friendliness. ;-)


BIOS
GIGABYTE H77M-D3H
You have BIOS version F10.
There's a newer BIOS available, version F12, and it can be downloaded here, for rev 1.0 motherboard, or here, for rev 1.1 motherboard, or here, for rev 1.2 motherboard.
Note: Confirm that I have the correct web pages for your model #.
Note: If you have a different revision motherboard, it'll require a different download.
Note: There's actually a BIOS version F14, but it's a beta BIOS, and I wouldn't recommend that you install it.
Note: Have good backups before updating the BIOS.


UFW blocks packets by the router, spams the log

You are denying all incoming packets from 192.168.2.1. UFW is just informing you that it's blocking the packet. You should either add a rule that allows the packet, or turn off the logging (not recommended) or just don't use UFW unless you are clear about what you are doing.


libre office can't open files in other directories or partitions

This bug has been reported on Launchpad, LibreOffice, and  Novell BugZilla.

The suggested answer is to uninstall libreoffice-gnome. If you do not have this installed no further suggestions are made.

You can then install then install the libreoffice package. Or the standalone packages like libreoffice-writer.

It would be useful to know which version of Kubuntu, which version of LibreOffice and which package you are using.

If this does not work I suggest you add a bug report to: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1085310


Taken from here: http://developer.ubuntu.com/apps/create/get-the-sdk/  :

  For Ubuntu 12.04 LTS, 12.10, 13.04 and 13.10 users:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install ubuntu-sdk

  Alternatively, for those using a development release:

sudo apt-get update && sudo apt-get install ubuntu-sdk


How to setup listening port of dropbear under initramfs-tools

I've managed to find a solution (nothing helped me on internet...), I've tried many things as change port in /etc/default/dropbear or etc/init.d/dropbear without any effect...

So, after searching how initramfs works and how dropbear is launched at boot, here is the solution:

$ cd /usr/share/initramfs-tools/scripts/init-premount
$ nano dropbear

then go to the function run_dropbear(), you should find a line with something like this:

exec /sbin/dropbear ${DROPBEAR_OPTIONS:-$PKGOPTION_dropbear_OPTION} -Fs

Just add the following option at the end of line:

exec /sbin/dropbear ${DROPBEAR_OPTIONS:-$PKGOPTION_dropbear_OPTION} -Fs -p #### (where #### is your port number)

Don't forget to run update-initramfs -u after this modification.
Reboot. Your SSH at boot time should now be on the chosen port.

Cheers


How can I clone a hard disk to a smaller SSD?

Don't bother to partition SSD disk.

I would suggest to shrink the partitions on the old disk first to fit the size of the SSD, then dd old disk to new one

But make a backup first.


Very long boot time without system logs (SSD)

Problem solved. I had a chance to put that SSD into the Lenovo L540 laptop - the system boots in a few seconds and both read & write speed test shows 500+ MB/s data transfer rate. Thus, it's definitely not a software but hardware issue - either my PC motherboard MSI P55-CD53 is broken or the SATA cable causes some problems.


Netflix-desktop app no longer exists in 14.04

It's available via a PPA. You need to add that PPA first.

https://launchpad.net/~ehoover/+archive/ubuntu/compholio


Which is the most Energy efficient Ubuntu flavour?

There are a few power efficiency benchmarks, but I'll recommend Benchmarked: The Most Power-Efficient Ubuntu 19.04 Flavor Will Surprise You

TLDR; Ubuntu Mate is activelly optimized for low power consumption.


The ifconfig command and also the route command are obsolete and are replaced by the ip command which comes with the iproute2 package.

There are some more tools that got replaced. A good starting point to get an overview is here.


How to install Concorde in Ubuntu 14.04 LTS?

There are only executable versions of Concorde and Linkern, not less, not more.

Compile your own version:

mkdir -p ~/src
cd ~/src
wget http://www.math.uwaterloo.ca/tsp/concorde/downloads/codes/src/co031219.tgz
tar xf co031219.tgz
cd co031219
./configure
make

There is no rule to install (make install). All needed binaries are in subfolders of the source folder:

  This builds the concorde library (concorde.a), header file
  (concorde.h), and several executable programs, including:

TSP/concorde the TSP solver
LINKERN/linkern the Lin-Kernighan TSP heuristic
EDGEGEN/edgegen generates edge sets
FMATCH/fmatch solves fractional 2-matching problems

  NOTE that to build the concorde TSP solver (for the exact solution of
  TSPs), you must specify an LP solver in the configure step (either
  QSopt for CPLEX).

  A short help menu for each of the executable codes can be obtained by
  executing the code without any option, for example "concorde". A
  typical way to run the concorde solver is to use: "concorde
  myprob.tsp" where myprob.tsp is a TSP instance in TSPLIB format. To
  test the concorde solver run "concorde -s 99 -k 100" (this should
  generate and solve a random geometric TSP on 100 points).#

Source


Is there a way to show external IP in top bar using GNOME 3.28.2 in Ubuntu 18.04

I've been using Indicator System Monitor for years on Ubuntu 16.04:

I haven't used it with Gnome but the link above states:

Indicator-SysMonitor - v0.8.2
An Application Indicator showing cpu temperature, memory, network
speed, cpu usage, public IP address and internet connection status .
Works with Unity, Xubuntu, Gnome-Shell + app-indicator extension
together with any other desktop environments that support
AppIndicators.
Also works with the Budgie-Desktop
Offers the possibility to run your own command and display its output.

Even though it already offers an option to display Public IP you can still write your own bash script which refreshes every x seconds with custom display information, in my case above a spinning pizza with time remaining in washing machine wash cycle (so you are told when to add fabric softener for rinse cycle).
Indicator System Monitor is maintained by FossFreedom who is a regular visitor to Ask Ubuntu website.


It's clearly written in the page you have linked:

Upstream:                               released (2.4.2)
Ubuntu 8.04 LTS (Hardy Heron):          not-affected
Ubuntu 10.04 LTS (Lucid Lynx):          not-affected
Ubuntu 11.04 (Natty Narwhal):           not-affected
Ubuntu 11.10 (Oneiric Ocelot):          not-affected
Ubuntu 12.04 LTS (Precise Pangolin):    not-affected

Also, in the same page, there's written:

  jdstrand> Debian/Ubuntu packages contain 038_no_LD_LIBRARY_PATH (see
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276670 for more information)

And if you look at the changelog included in the bug you can see:

apache2 (2.0.52-2) unstable; urgency=high
[...]
  * Move envvars to /etc/apache2/ and add patch 038_no_LD_LIBRARY_PATH to
    remove the extraneous LD_LIBRARY_PATH from envvars (closes: #276670)

This means that the bug has been fixed in Debian since version 2.0.52.

Last but not least, if you look at your /etc/apache2/envvars or /usr/share/apache2/build/envvars-std, you'll see that they don't contain any malicious LD_LIBRARY_PATH.


You just have to make sure that your task does not produce any output.

If it is a single command add ">/dev/null 2>&1" (without the quotes) to your command.


Yes...

here's how to do it-

When you boot the LIVE CD/USB for installation, you will get 3 options like the picture below- (windows 7 will be not be in your case, it will be xp)

for your Requirement,you should click on the 3rd option - Do something else.

That will take you to a partition table.

In the partition table you will see 2 partitions.
 - The 1st one will be c drive which has windows.You will be able to see it as NTFS file system.

If both are NTFS,mostly the 1st partition will be C drive.

  keeping the size of the 2 partitions different e.g 230 and 270 will help you easily recognize your c drive because there are no labels like c or d there)

Then select that other drive.

Get some free space to install :

Caution : Below steps is for deleting . Deleting a hard disk partition will make all files inaccessible everything in that partition, be sure to take back up if any.

Select that drive(other than the WINDOWS c DRIVE) from the partition table and click on DELETE. That partition will be deleted and you will see unallocated space.

Caution : Below steps is for formatting. Formating a hard disk partition will permanently erase everything in that partition.

Now,you can either directly make the complete partition as EXT4 for installing Linux or you can also add a SWAP partition.

  It is always recommended to add a SWAP area for better performance but only if your ram is below 8gb

Step 1 : Create a SWAP partition

Select the new unallocated space or free space, click on add.
Assign the space from that partition to SWAP AREA equal to double your ram.(e.g-for  1gb,swap area-2gb)
Select SWAP AREA from the file system drop down menu.
Make sure Beginning is selected in the partition position drop down menu.
Click on add.

Adding root file system

Now, after you have added the SWAP AREA,do this-

Select the remaining "Unallocated space" and click on ADD.
Select Ext4 Journaling file system from the file-system dropdown menu.
Select Primary from the partition type drop-down menu.
Select the mount point as / from the mount-point drop-down menu.
Select beginning from the Position drop-down menu.
Click on add.

After adding the partitions,from the table select the ext4 partition you see and tick in the corresponding check-box(if not already ticked)

then Select INSTALL...


Chrome has gone too large after update ubuntu 14.04 ..?

For me the following worked:
google-chrome --high-dpi-support=1 --force-device-scale-factor=1

make sure you kill all running instances of google chrome, otherwise it will just open another (broken) window ignoring the command line parameters


How do I upload a .deb created by Debreate to my PPA?

If you have a source package run

dput ppa:your/ppa  yourpackage_0.1_source.changes

Replace your/ppa and yourpackage_0.1 with your real data.


Teamviewer 7 crashing Xorg (ubuntu 16.04 and 14.04 clean install)

Teamviewer 7 is antique. Teamviewer is currently at version 11. Get the latest version at https://www.teamviewer.com/en/download/linux/

Cheers, Al


The du command recursively finds the estimated size of directories. It won't sort the output by size, though.

(You need to be root for this to work)

Really, you just alter the argument to its -d (max depth) option:

To print the size of each user's home directory in descending order by size:

sudo du -d 1 /home | sort -gr

To print the sizes of folders within each user's home directory (level 3) (warning, this is bound to be really long, you might want to pipe it to less):

sudo du -d 2 /home

(if output is long):

sudo du -d 2 /home | less

If you want to sort the subdirectories of each user by size, then you would have to run du individually for each user:

sudo du -d 1 ~user1 | sort -gr
sudo du -d 1 ~user2 | sort -gr

...and so on.

If you want to work from a different starting point, just change the last argument of du (/home above) to the directory you want to work from. Changing the argument to -d will change how many levels it recurses through.


All my Ubuntu VMs have apt-get update problems

This was a doozy.

The problem was that I had recently switched Virtualbox to NAT the Ubuntu VMs rather than bridge them. I ran several tests and found that if NAT was enabled, encoding problems developed on the incoming files. Once I returned the main interface to bridge mode the error changed to the standard BADSIG one which was fixed by grabbing the key again from keyserv and running the apt-get clean stuff.


how to convert free space to a ntfs partition

(Unedited answer to original question that only mentioned 'free space' ; later edited to specify it was in fact 'unallocated space')
Even though there is a certain ammount of free space on a drive, it doesn't mean no files are located on the outside portion of your disk where you'd like to create a new partition. Simply put free space gets fragmented and what you see in GParted or any other partition editor is just a chart that represents the percentages of free and occupied space on each partition.
What it means in practice is that creating a new partition in your case will involve some data movement thus putting the whole operation under the risk of data loss*, so make sure you make a backup copy of your most important data before you proceed.

*
Some operations done by partition editors require the partition editor to move some data around. In such a case there's a risk of data loss in case of e.g. power loss. The risk of data loss due to factors other than power loss and partition editor crash is very small. It's fastest and safest to perform partition operations on a clean disk.

The procedure to get what you want in GParted (I recommend using Parted Magic bootable USB/CD):
0. Back up your data*
 1. Resize your existing partition leaving X megabytes of free space, where X equals the intended size of your new partition.
2. Create the new partition in place of the unallocated space you got after completing step 1.

Conclusion:
Creating new partition on a disk with free space involves some data moving done by partition editor*, while creating new partition on unallocated space does not involve data moving - creating new partition on unallocated space is hassle-free and instant.


No, you cannot get previous versions of files, as Ubuntu One file sync does not support file versioning.

If you want previous versions of the file, you will need to grab them from a computer you have, which has them, but which has not synchronized the latest version. There is no other way to restore previous versions of files.


Welcome to Ask Ubuntu! Try reading this answer What are the differences between 32-bit and 64-bit, and which should I choose? and this website http://www.howtogeek.com/165144/htg-explains-should-you-use-the-32-bit-or-64-bit-edition-of-ubuntu-linux/

They should answer your question, if not, try googling difference between ubuntu 32 bit and 64 bit. That brought up several good sites.


@Terrance. Thank you, that gave me the information I was looking for.

An extended partition is a special container type that allows for more partitions than the maximum four allowed by a traditional partition table. It can hold multiple logical partitions. An operating system (such as Ubuntu) can be installed on either a primary or logical partition.

This installation just created an extended partition and installed on a logical partition, to allow for future partitioning if needed.


Remotely Ubuntu management & monitoring?

Regarding possible server monitoring solutions

Nagios - https://www.nagios.org/
Incinga - https://www.icinga.org/
Munin - http://munin-monitoring.org/
Spiceworks - http://www.spiceworks.com/
Zabbix - http://www.zabbix.com/
Cacti - http://www.cacti.net/
Monit - https://mmonit.com/monit/

I do use nagios a lot, it needs some time to get started but is worth the time if you care about monitoring.


Using trickle to limit the bandwidth of a VirtualBox VM

VirtualBox has bandwidth limiting that you can enable via VboxManage.
See http://www.virtualbox.org/manual/ch06.html#network_bandwidth_limit

  Limits are configured through VBoxManage. The example below creates a
  bandwidth group named "Limit", sets the limit to 20 Mbit/s and assigns
  the group to the first and second adapters of the VM:

   VBoxManage bandwidthctl "VM name" add Limit --type network --limit 20m
   VBoxManage modifyvm "VM name" --nicbandwidthgroup1 Limit
   VBoxManage modifyvm "VM name" --nicbandwidthgroup2 Limit


How to install picasa on ubuntu using winetricks?

404 NOT FOUND on your download of the Picasa installer means that the installer is not present at the requested URL.

This is less an Ubuntu issue, and more an issue of Picasa/Google's side.

HOWEVER, according to https://picasa.google.com/:

  Moving on from Picasa
  We’ve decided to retire Picasa in order to focus on a single photo service in Google Photos – a new, smarter photo app that works seamlessly across mobile and the web.

Therefore, you are no longer able to get Picasa from Google, and instead need to use the Google Photos system, which has no local application for it.  (Which means that you cannot install Picasa anymore anywhere)


How to install ATI Radeon 6770 drivers on 10.04?

You can check offical support for your AMD graphichs card from:

http://support.amd.com/us/gpudownload/Pages/index.aspx

Radeon HD 6770 is supported by rescent Catalyst drivers and you can get it from here:

http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx

Download the package an run it.


Open the terminal and type:

sudo apt-get install fglrx-updates

fglrx-updates is the updated version of the proprietary video driver for the AMD graphics accelerators. Reboot the computer to enable the graphics driver.

Optionally you can also install the Catalyst Control Center (Linux Edition) for the AMD graphics accelerators. Open the terminal and type:

sudo apt-get install fglrx-amdcccle


You could try this:

     blkid

and this gives you some info, and this you can use in /etc/fstab

you can also do this:

     1 | greb -f $a1

and you can also use gparted from software-center.


Second Monitor does not display after reconnecting VGA

I have this problem on the same laptop so it might be model-related. The fastest workaround is to sleep-resume (which sadly does not always work with me), or restart X server by pressing Alt-SysRq-k. The second option will force close your session but all the running programs will stay in memory so will restart very fast afterwards.


I think you should check in /cdrom folder which holds all type of optical media information rather than searching for /dev or /media..


Driver trouble with my BCM4331 on my Macbook Pro 9 2

i suggest you the first thing I done with my wifi card rfkill unblock all

or try to compile the last stable kernel on your hardware (worked for me with 10.04)


After creating swap partition, LTS won't recognize new partition

You need to edit /etc/fstab and add an entry for your new swap partition

Modify the line:

UUID=4b1e51e4-03f2-447f-94a8-6890006b7ef7  none swap sw 0 0

remove (comment out) the other line

#/dev/sda7 none swap sw 0  0

Save the changes and run swapon

sudo swapon

Post any error messages you have.

See also: https://help.ubuntu.com/community/SwapFaq#How_do_I_add_more_swap.3F


It sounds like your hard drive is partitioned into three partitions. If so, it would be much safer to install Ubuntu on a new Hard Drive, and then drag and drop everything from D and E over to the new drive.

If you want to take chances and install Ubuntu onto the partition that contained the "C" drive, then make sure you can identify that partition by its size. Click on File Explorer in Windows and then right click on the C drive and select "properties". Do this for each of the drives and get the size of each. While installing Ubuntu make sure you select custom install option or "advanced" and then select the partition that matches the C drive size.

If D and E are separate drives, remove them and install Ubuntu on the internal hard drive, and then reinsert the other drives.


Icecast2 streams microphone input instead of sound card output

Depending on our settings it may be that while streaming to Icecast Darkice will also pick up the audio from our microphone.

To overcome this we may make the following settings:

Turn on default audio device in darkice.cfg to ensure streaming from the default device:

[input]
device          = default

Disable duplex audio profile in pavucontrol :

alternatively either mute audio input, or select a non-attached input (e.g. line)


There was an old version called TimeVault but the one I found similar to what you are looking for would be Back In Time which was inspired by TimeVault itself. It takes snapshops of predefined parts of the system. You can customize this to take the whole system.

The PPA explains that you only need to do 3 things:

Where to save snapshots
What to backup
Backup frequency (manual, every hour, every day, every month)

The Stable releases can be found in the stable branch

You can install it via terminal with:

If in KDE type sudo apt-get install backintime-kde

If in GNOME type sudo apt-get install backintime-gnome

You can also install it via Software Center:

Ubuntu also comes with Deja-Dup by default which supports backing up externally to Ubuntu One, Amazon or even RackSpace. Similar to BackInTime, you can select what to backup, how often and how to restore.


In a bash script what does a dot followed by a space and then a path mean?

It's a synonym of the builtin source. It will execute commands from a file in the current shell, as read from help source or help ..

In your case, the file /etc/vz/vz.conf will be executed (very likely, it only contains variable assignments that will be used later in the script). It differs from just executing the file with, e.g., /etc/vz/vz.conf in many ways: the most obvious is that the file doesn't need to be executable; then you will think of running it with bash /etc/vz/vz.conf but this will only execute it in a child process, and the parent script will not see any modifications (e.g., of variables) the child makes.

Example:

$ # Create a file testfile that contains a variable assignment:
$ echo "a=hello" > testfile
$ # Check that the variable expands to nothing:
$ echo "$a"

$ # Good. Now execute the file testfile with bash
$ bash testfile
$ # Check that the variable a still expands to nothing:
$ echo "$a"

$ # Now _source_ the file testfile:
$ . testfile
$ # Now check the value of the variable a:
$ echo "$a"
hello
$

Hope this helps.


VirtualBox Host-only: guests can't talk between themselves?

My issue was that I was using 192.168.56.100 for Guest A. On VirtualBox's default configuration, that IP is already used for the DHCP server in vboxnet0.

I changed the guest's IP to an unused one and Guest A and Guest B could then talk to each other.

This wouldn't happen if you're using DHCP for your guests as VBox won't assign 192.168.56.100. You would only enounter this issue if you were setting static IPs for your guests like I did.


Personal crontabs are stored in /var/spool/cron/crontabs/${USER}.  These files should always be edited via crontab -e, but you can sudo rm one if it is causing problems.  It should be recreated the next time that user uses crontab -e and commits.


In order to Passthrough USB Devices you need to Install the Virtualbox Guest Addons. In the Submenu where you select USB Devices you should see that at the very bottom. Then you should see Kali Linux accepting it. You can then just open a Terminal on that virtual Drive and run the autorun file and that should do it.


No, for other lenses that are available see What lenses for Unity are available?, better use conky for that feature. Otherwise System Monitor Indicator are also available, I guess for that matter.

Try OMG! Ubuntu! - Tag Articles: conky for good conky's, that are otherwise available.


How do I get a launcher in Unity to start an app with a particular command argument?

The easiest way of doing this would probably be by using the app called "Alacarte".

Alacarte is a menu editing applications which is available for free download in the Ubuntu software center.

When the app is installed you can launch it by searching "alacarte" in the dash.

Inside the app you navigate to the app category and then edit the specific app you want by clicking "Properties".

There is a field called "Command" which you from here can edit like your example.


How does an OpenVPN client know the public IP address of my server?

The server's address is written in the server specific user configuration file client.ovpn. So after downloading client.ovpn file, if you check the file you will see remote directive snippets like:

remote openvpn.foobar.net 3194 udp

Here openvpn.foobar.net is the remote server address, it can also be an IP address:

remote 1.2.3.4 3194 udp

Now, if you can still reach the remote server even after commenting out the remote snippets from client.ovpn, then it must be cached by the client.

I have tested this on my system and getting this error instead:

Options error: --nobind doesn't make sense unless used with --remote
Use --help for more information.

but as openvpn client caches various parameters to have faster response, the response you got is presumably due to the caching.


Screencast with both mic and system sounds at the same time

Look for a way to combine sound channels instead of looking for multirecording screencast app. How to mix voice and audio on Ubuntu (archive.org copy) describes how to do it with PulseAudio. This tutorial seems to be based on Weekend Project: Record From Skype Calls and Other Apps on Linux (linux.com). IIRC there are also similar in spirit tricks for JACK)


Direct answer to your question:

You can use the lid switch to trigger a script that stops the Crashplan service. See Laptop Lid and Dock Scripts on the Help Wiki.

Also see comments and answers of Catch lid close and open events.

There are also a bunch of examples for scripts written for different kinds of events people wanted to trigger with the lid switch in the Ubuntu Forums--a bit chaotic, but the examples could be helpful as you write yours.

However, it may not actually be Crashplan that is the problem.

If your swap drive is encrypted, that could actually be what is interfering with hibernation. (In a way, Crashplan may have indirectly been the cause--I'll explain more...) You may not have knowingly set up an encrypted swap drive; this happens automatically when you choose to encrypt your home directory during installation of Ubuntu 9.10 and above.

Furthermore, you may never have noticed that your swap partition was encrypted because you would still have the ability to hibernate if your fstab identifies your swap space by UUID.

This only becomes a problem when your swap drive fills up (which it very likely might have done while you were running Crashplan, since many of its processes like file restores are long and resource/memory-intensive). When full, everything about the encrypted swap is overwritten, including UUID, so upon attempting to wake up from hibernation, your system wouldn't know where to find your swap drive--it would be searching for a UUID that didn't exist anymore.

So you may not need to write a "stop service" script activated by the lid switch at all. You may just need to deal with your swap.

Two possibilities are:

Modifying your settings so that your swap drive is identified by /dev/sdXX instead of by UUID and also the system is supplied with a randomly generated key when needed (/dev/urandom). See this answer for explicit instructions. It involves editing crypttab and fstab, both of which you should back up before changing.
Opting for unencrypted swap. Obviously, the latter is not a recommended solution, but personally I think that for the average user, it's not a huge deal to have an unencrypted swap partition. You can read more about it and decide for yourself. See here for instructions on how to do that.

Also see the Ubuntu Help Wiki on the caveats of encrypted home and how hibernation is affected.

Note: This question is 2 years old, so even though it would be best to get more information before answering, I thought it was unlikely the OP would respond, so I went ahead and posted an answer.


how to install intel corporation 2nd generation core processor family integrated graphics in Ubuntu 11.04

The additional drivers tool is there for proprietary (that is non-free, closed source) drivers that can't be distributed on the Ubuntu CD.
Intel graphics drivers, including those for the Intel GMA 4500MHD in your laptop, are part of the default Linux Kernel and X should have its counterpart installed by default (the xserver-xorg-video-intel package).
In short: you shouldn't need to do anything. It should work out the box.
If it's not, you might want to start another question, detailing the problem a little more explicitly.


how to remove 12.04 & install 12.10 or 13.04 when I have windows too?

You can install it the same way you installed 12.04. And it might look daunting at first but it is very simple. I promise :-)

2 step plan:

So burn 12.10 on to a DVD and reboot with that newly burned disc inserted into your system. Let it boot from the DVD and at some point you get asked to install.
When you get to the installer part where it asks what to do in relation to partitioning choose to erase/replace the current Ubuntu. This will remove 12.04 and install 12.10.


How to remove temp files with a command other then "apt-get autoremove"?

Try the below command to remove temp files,

sudo rm -rf /tmp/*

apt-get autoremove will remove   automatically all unused packages.


How do I download Ubuntu 14.04.3? I'm using a hp Chromebook and it says that it doesn't support the file

OSU (Oregon State University?) has a public FTP server which hosts Ubuntu mirrors. The releases are at ftp://ftp.osuosl.org/pub/ubuntu-releases/
Your browser should be able to navigate to that address in order to download an ISO.


common home partition, two systems , 32bit & 64bit

Yes it's possible. I'm assuming you want your home folder the same on both partition. They probably won't share it but you can copy(overwrite) your home folder from the 32bit system to the 64 bit system after you've done the installation.


What's the keyboard shortcut to switch to right-to-left text layout in textbox?

In GNOME (v2 and v3) the direction of a widget is set by the first character in the text box. That means that if the text you insert into the text box starts with a unicode character that has RTL directionality, the layout for the rest of the content will be RTL.

If you want to override this behavior you can insert an invisible character called RLM/LRM as the first character in your content. In GNOME this is done by right click->"Insert unicode control character"-> select RLM or LRM. keep in mind that once it's used, RLM/LRM becomes part of your string and always be displayed that way.

There is an unofficial GNOME input method that makes it easier to manage these characters, but that will probably be used by RTL users who need it more often.


Installed Ubuntu on Windows 10 - Windows not loading unless UEFI

If you haven't done much on the BIOS Ubuntu install, it is best just to reinstall it in UEFI mode.  DO NOT select "reinstall" from the install media, that wipes the disk of everything.  Select the "do something else", and select the partitions, and format them to wipe the old installation.  The actual differences of the two installs are minor, like getting the grub-efi-amd package instead of the grub-pc and mounting the efi partition at /boot/efi (fstab modification), but easier just to reinstall.


Can not enter password on lock screen in 20.04

If you want to use other screensaver application you have to disable built in screensaver in gnome-flashback:
gsettings set org.gnome.gnome-flashback screensaver false


To install Ubuntu restricted extras, these items must be removed

You do not have to worry about the message. From this guide:

  Tip: If you get a warning dialog says “to install ubuntu restricted
  extras, these items must be removed”, just click the ignore because
  -extra versions of these libraries will be installed instead, to provide additional functionality.


`alias` command in `.profile` not recognized until `source .profile` is called

TL;DR: As Gunnar Hjalmarsson says, put aliases in ~/.bash_aliases.
The commands in ~/.profile are run by login shells. That file is a good place to do things that should be done once at the beginning of each session but not repeated every time a new shell is started. ~/.profile is good for setting environment variables, which will be inherited by all descendant processes.
Aliases are not inherited, and the shell you get in a terminal window in Ubuntu is not (by default) a login shell. To define aliases for all your interactive Bash shells, the definitions need to be somewhere where they'll be run each time you start such a shell.
The usual places are either in:

~/.bashrc
~/.bash_aliases

New interactive non-login shells source ~/.bashrc (as do some noninteractive shells). Your ~/.profile, by default, sources ~/.bashrc.
The default ~/.bashrc in Ubuntu checks if ~/.bash_aliases exists and sources it.
I recommend putting new aliases in ~/.bash_aliases.

Sourcing ~/.profile works to define the aliases, but it also re-runs everything else in that file, most of which you don't need to run again, and some of which might do things you don't want. For example, ~/.profile checks if ~/bin exists and, if so, prepends it to your $PATH. If you source ~/.profile multiple times, you can get the same directory appearing multiple times in $PATH. This would have to happen quite a lot to cause a significant performance problem. But even one extra occurrence can cause confusion when you're inspecting the output of a command like printenv PATH.
If your aliases aren't defined even in initial login shells, such as when you log in from a virtual console or via SSH, then as Kulfy alludes to the issue may be that you have a ~/.bash_profile or ~/.bash_login file. If such a file exists, Bash login shells source it instead of ~/.profile. Most often you would not want to have either such file on Ubuntu, and if you did, you would most likely want it to source ~/.profile so that the commands in ~/.profile still run.
But even if that is the case, you shouldn't define aliases in ~/.profile (nor in ~/.bash_profile or ~/.bash_login), as that doesn't define them in non-login shells.


How to safely install Ubuntu alongside existing Windows 10?

Here's the simplest and safest method that has worked for me:

Create a bootable USB drive Rufus. Be sure to select "GPT partition scheme for UEFI" before writing to the drive. Other similar tools are available but for me, they didn't work with UEFI

Turn off fast startup in windows. It'll let you access your drives in Ubuntu and other distros.
Turn off secure boot. Check your BIOS, you can turn it off there.
Boot into the USB stick. You can usually do this by pressing F9 key during startup though, it varies from computer to computer.
Don't begin directly installing Ubuntu yet, run gparted from menu and,
Shrink your drive, create a new partition less or equal to your RAM size and format it as swap.
Create another drive from the space left and format it as ext4
Close the gparted window
Begin ubuntu install
AT INSTALLATION TYPE, SELECT SOMETHING ELSE
Select your previously creates ext4 partition and set the following options:
Use as: ext4 journaling file system
Mount point: \
Let the rest be default and continue with install.
You should now be able to dual-boot


How do I increase the partition size of my ubuntu 18.04 via gparted

You need to move it first, just grab the partition and drag it to the left, then resize it.


nut and nut-monitor won't connect to tripp-lite ups using Ubuntu 18.04

The list of commands that worked for me.
(Some more Tips can be found at https://linux-tips.com/t/disabling-ups-beep-under-linux/592)
sudo apt-get install nut
sudo apt-get install nut-monitor

(stop if started)
sudo upsdrvctl stop

Open / edit the following files as root
Example:
sudo nano /etc/nut/nut.conf
1- Changes to make to file nut.conf -add the lines below:
MODE=standalone

2- Changes to make to file ups.conf file -add the lines below:
[tripplite]
driver = usbhid-ups
port = auto
productid=3024
desc = "Tripp Lite AVR700U"

3- Changes to make to file upsd.conf  -add the lines below:
LISTEN 127.0.0.1 3493
LISTEN ::1 3493

[tripplite]
driver = usbhid-ups
port = auto

4- Restart nut
sudo service nut-server restart

5- Changes to make to file /etc/nut/upsd.users -add the lines below:
Example:
#admin is the username
[admin]
password = "test1234"
actions = SET
instcmds = ALL

5- Reload upsd with the new users config:
sudo upsd -c reload

6- Start driver
sudo upsdrvctl start

If you get an error saying Can't claim USB device [09ae:3024]: could not detach kernel driver from interface 0: Operation not permitted
You can use lsusb to find out the bus and device number for the Tripplite UPS
Then change permission of the device
chmod 0666 /dev/bus/usb/[bus number]/[device number]
Chmod 0666 (chmod a+rwx,u-x,g-x,o-x,ug-s,-t) sets permissions so that, (U)ser / owner can read, can write and can't execute. (G)roup can read, can write and can't execute. (O)thers can read, can write and can't execute.

Example:
Type:
lsusb

Look for the Tripp Lite line
Bus 003 Device 012: ID 09ae:3024 Tripp Lite
(Note if you unplug your usb connection and plug it back in this may change)
sudo chmod 0666 /dev/bus/usb/003/012

7- Start Driver
sudo upsdrvctl start

8- You can query the list of the commands which will be supported by your ups device with the upscmd
upscmd -l tripplite

9- To see the status of beeper
upsc tripplite ups.beeper.status

10- To disable beeper
upscmd tripplite beeper.disable

Username: admin
Password:  test1234

11- To check it's been disabled
upsc tripplite ups.beeper.status

Note: You can use a gui after the setup is complete called nut-monitor to see all the options / settings in real-time. https://networkupstools.org/projects.html


Why apt-get purge wants to remove non matching packages

retroarch depends on nvidia-cg-toolkit so it gets removed if you remove nvidia-cg-toolkit.

As a side note sudo apt-get purge nvidia* most likely doesn't do what you want:

First the shell will try to expand nvidia*. So if you have for example a file named nvidia.txt in your current folder the shell will actually run

sudo apt-get purge nvidia.txt

If the shell can't expand nvidia* apt-get will interpret it as a regular expression (not a shell pattern!) meaning "nvidi followed by zero or more a" and then search for packages with names containing a matching substring.
That is apt-get will purge all packages with a name containing nvidi (without the a because the "zero" in "zero or more").

Better use

sudo apt-get purge 'nvidia.*'

for all package containing nvidia or

sudo apt-get purge '^nvidia.*'

if you want to remove all packages starting with nvidia.


Deja Dup does not ask for password for FTP, CIFS, WebDAV or SSH

In my experience, if your backup location requires a password, Deja Dup has no way to get the user to supply that password. If you need to connect securely, you could set up SSH key authentication if your NAS supports that. This walks through how to do that if you need that: How can I set up password-less SSH login?

I back up via SSH in Deja-Dup. I've talked about how here: https://askubuntu.com/a/346005/103537 While those instructions are pretty particular to FreeNAS, something similar could work for your NAS.

Otherwise, you could try setting up a location on your NAS that does not require a password.