Installed Ubuntu as second OS - how to remove the old OS?

There is always some risk when deleting and resizing partitions so take backups of anything you cannot afford to lose. As long as you have a working bootable live environment to get into you can fix any issues that could arise but that shouldn’t be necessary
To get rid of Manjaro just start GParted and delete partition 1. You can do that from Ubuntu without booting a live environment. Then update grub and Manjaro should effectively be gone.
You have MBR partitions which has a limit of 4 without using an extended partition. Partition 5 is inside partition 4. I know you don’t want to do this but you could reduce partition 5 and add a 6th partition. Then it would be apparent 4 contains 5 and 6.
You might want to:

Delete partitions 1 and 2.
Move partition 3 to the start of the drive
Expand partition 4 to take up all the space
Expand partition 5 to take up all the space inside partition 4.

Alternatively you could move partition 5 from being inside partition 4 with a copy paste operation in GParted and then get rid of partition 4. You would have to reduce the size of partition 5 temporarily to do this and possibly edit /etc/fstab to get it booting correctly.


Import Error while executing spyder3-Beta version- It can't find opencl 2.1

Sounds like you need to install the python opencl libraries . Try running

sudo apt-get install python3-pyopencl


How to re-configure X for external display (HDMI)

Normally you could configure the new monitor with the Displays control panel, but since you can't see the desktop there's a "chicken and egg problem".

The xrandr command can be helpful in this case. It can do whatever the Displays control panel can do and can be run from tty1.

Typically X has started on display :0. You can run ps aux | grep X to check this. Mine starts with /usr/bin/X  :0

Enter the command xrandr -d :0 and you should see names and information for both displays.

If the display you need to turn on is VGA-0, for example, you could then try:

xrandr -d :0 --output VGA-0 --auto

You could also set the resolution you need using the same command.


How can I install linux games on Windows and play them from Ubuntu? (Dual boot)

Short answer: YES!

You can use your Windows partition for storage of anything, including games.  Just make sure you don't choose the Hibernate option in Windows, or else you won't be able to access that partition from Ubuntu.


Connected to a wired network, but internet doesn't work Ubuntu 17.04

What happens when you do the following?

sudo /sbin/modprobe -v -r r8169
sudo /sbin/modprobe -v r8169

If your r8169 comes back into service, then:

Had your machine previously suspended?  That is a well-known weakness

in the r8169 kernel object: suspend followed by resume seems to disable the r8169 driver for some reason, going back a few years.
The 2 command lines above work-around that.
I wound up creating a systemd service to automate the work-around for my laptop.


The Helvetica from Adobe fonts are not ttf so it's likely that it will be very ugly. You may replace them with something similar to Helvetica like fonts-freefont-ttf package, or use sans-serif, as described in the Debian FAQ:

nano -w ~/.fonts.conf

This will create the fonts file, now just put the following:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>

<!-- Helvetica is a non true type font, and will look bad. This
replaces it with whatever is the default sans-serif font -->

<match target="pattern" name="family" >
<test name="family" qual="any" >
<string>Helvetica</string>
</test>
<edit mode="assign" name="family" >
<string>sans-serif</string>
</edit>
</match>
<dir>~/.fonts</dir>

</fontconfig>

This will replace any finding to the helvetica font for sans-serif.


How do I turn off touchpad acceleration?

We will use SynapticsTouchpad and synclient AccelFactor=0 command to solve it.

If you don't have SynapticsTouchpad and synclient command does not work, then install SynapticsTouchpad(If you already got it go to step 2).

1.1 Open Terminal (Ctrl+Alt+T or Super(Win) key => Terminal)

1.2 Install SynapticTouchpad sudo apt install xserver-xorg-input-synaptics

1.3.1 Enable SHMConfig sudo gedit /etc/X11/xorg.conf"

1.3.2 Paste this into the document and save the document:Section "InputClass"
    Identifier "enable synaptics SHMConfig"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Option "SHMConfig" "on"
EndSection

1.3.3 Close the document, reboot your system.
Open Terminal and type synclient AccelFactor=0

Tested in Ubuntu 18.10 a few hours ago. Everything fine.


How do I setup a redirect/alias for the Ubuntu wiki?

You need to add a redirect on the libreoffice page at the top:

#REDIRECT LibreOffice


Any luck with this yet?  I'm trying to do the exact same thing.
This blog suggests that netplan dhcpv6 doesn't support DUID but I can't find anything else concrete.
https://gist.github.com/Hermanverschooten/40c701b7f52e256502c9fe78473912e4


Moving Wubi Installed on an External Hard Drive to a Laptop

Since you have installed Ubuntu while on your desktop as Wubi installation, I believe there will be no grub installed on the desktop harddrive. Wubi modifies the vista bootloader to provide a Ubuntu boot option. It does so by modifying the boot.ini in the vista partition.

If, for example, Vista is installed in C drive, you would find C:\boot.ini which is a text file specifying the boot options. You can open that file on the host system to see how this is done on the desktop system.

Caution Wubi installs are by-design not portable across Windows installations (even between 2 machines having same version of Windows - Pls don't even try to copy the boot.ini anywhere else.). This is because of the following

Wubi installs the entire ubuntu OS + persistent data into what appears to be a file to windows (see the 2nd item in this section of wubi faq
Location of the mount point of the drive is not expected to consistent across all systems and hence the location of this above file as the bootloader sees it can vary from one pc to another.

Installing Ubuntu onto an external harddrive is an excellent option of being able to have your favourite os on-the-go and due to the above reasons doing it in a "Wubi-mode" kind of defeats that purpose.

My suggestion would be, if possible, to have Ubuntu on the external hard-drive as a normal install. If you could eke out some space for a new partition in the disk using gparted in the livecd/liveusb then you could follow this tutorial to even migrate your existing Wubi install into the new partition.

This link has comprehensive info on wubi that might be helpful.


Startup Disk Creator "Checksums do not match"

when i had this kind of problem i usually format the usb drive, but if you do not want to format then there is a program, called unetbootin, which is available in software center.

Just install it and show it the iso file in your hard disk, and you have to specify your usb drive, unetbootin will replace previous data.


How do I synchronize a Palm PDA with Evolution 2.30?

I couldn't tell you if that is indeed the problem, as I don't own a palm device, but I can confirm by looking at evolution's build log that that flag was not passed. http://paste.ubuntu.com/512047/

If you'd like to try building evolution with that flag, here are some steps.

apt-get source evolution # Download the evolution source package
sudo apt-get build-dep evolution # Install all of evolution's build dependencies
sudo apt-get install devscripts # Tools for working with Debian packages
sudo apt-get install libgnome-pilot2-dev # Extra build dependency need for the "--with-pilot-conduits" flag.

Next, you want to edit the debian/rules file. Find the section that looks like:

DEB_CONFIGURE_EXTRA_FLAGS += \
    --with-openldap \
    --enable-nls \
    --disable-scrollkeeper \
    --disable-pilot-conduits \
    --with-krb5=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --enable-plugins=experimental \
    --enable-python \
    --disable-pst-import \
    --disable-image-inline \
    --disable-contacts-map

And replace the --disable-pilot-conduits \ flag with --enable-pilot-conduits \

You'll probably want to bump the version number in debian/changelog as well. You can do that by hand, or run something like dch -v 2.30.3-1ubuntu6+pilot-build -m "Enable pilot-conduits"

Next, the line debian/tmp/usr/share/gnome-pilot must be added to the debian/evolution-common.install file and debian/tmp/usr/lib/evolution/2.30/conduits/*.so must be added to debian/evolution.install

Then you can build the package by running debuild from inside the evolution-2.30.3 directory. Finally, install the resulting debs.


The QML toolkit will down-scale images to meet your resolution-independent size, see the Bitmaps section on http://developer.ubuntu.com/api/ubuntu-12.10/qml/mobile/resolution-independence.html


Try updating your graphic drivers to recent stable release. Intel provides beautiful GUI based graphics update tool for linux which updates the graphic drives to latest release. You can download it from here

I hope this will help you.


Banshee is more than capable of syncing content from your library to your iPhone however it depends on the model of iPhone and the software version installed on it.

The current version of gtkpod does not support the iPhone 4 (and essentially iOS 5) see the SourceForge release notes here


This will do the job:

find . -maxdepth 1 -type f -name 'a*.txt' -exec split --additional-suffix=.txt -l 20 {} {} \;

Run the above command from within the directory that contains the files you want to split. It will:

find all the text files in the current path with names starting with a.
split them and keep the original split filename (so that you know from which original file it was split) and add letters to it.
add .txt to the end of each newly created file name for easier file type identification.


How to add third-party app to Unity launcher and dash?

For it to be integrated in search, etc. the easiest way is to install alacarte. You can install it either from the Software Center, or with this command:

sudo apt-get install alacarte

Alacarte is the old menu editor used in earlier versions of Ubuntu. After it is installed, fire up alacarte, and make a menu item under the appropriate application menu (Programming for this example). It will now show up in your dash and you can pin it to your launcher like any other program.


What are the new features of Ubuntu 11.04 (Natty Narwhal)?

The release notes for Natty has just been released - it highlights the key features in the ubuntu server release.

As to "Is it worth to upgrade" - that depends on whether the new stuff is what you need.


I haven't used Cloudmin personally, but the network engineer in me says this is probably not possible. If you're using a bridged adapter, all the machines are effectively separate entities, with their own MAC/IP combo, and this is how ARP is able to locate them. Pushing them all on one MAC address wouldn't work in a traditional setup, and I don't see how it could here, unfortunately. You will have to ask them to either turn off port security for your port, or add all of your VMs to the trusted MAC list.

Alternatively, using a NAT bridge instead of a bridged adapter should also work.


Updated stuff with Updatemanager problem

Follow these steps

When you system opens press Ctrl+Alt+F1 to go to tty1 CLI Mode.
Login with your credentials
Execute these commands in series(one by one):

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get dist-upgrade

If you get any error in any particular command, just mention it with the error message. All the commands should execute without any error.
Now execute following command:

sudo dpkg --configure -a
sudo dpkg-reconfigure lightdm

One list will open which will prompt to chose the display manger. Chose lightdm from the list and then ok. You'll need to press Tab to highlight Ok.
Then restart your system by following command:

sudo reboot

After reboot your system should work fine.. Reply if something goes wrong or for further assistance..


Get internet working on newly installed ubuntu

The only possibility I can think of is V2Ray.

There is a list of the 301 whitelisted websites on the Internet. Github is listed among them. Therefore you should be able to reach https://github.com/v2ray/v2ray-core/releases and download the V2Ray client for Ubuntu. I believe v2ray-linux-64.zip is the download you need for the client. I do not know if it will work without access to apt update.

For the server, you will need access to a VPS outside Kashmir, or to a friend who can set the VPS up for you. You would need to disguise the VPS as one of the 301 whitelisted web servers. Configuring the server is a little bit complicated, and you would need to follow a tutorial if you have never done it before.

Once you have configured the server, you can configure the client with matching details.


No free space on ubuntu 16.04 running on virtual box

Thanks to @user4556274, I read the answer he gave here, I just used the command :

sudo lvm lvextend -r -l +100%FREE /dev/ubuntu-vg/root

and I got the free space I needed


Due to some issues with 'X' upstream, booting Ubuntu from CD/USB on some graphics cards (mostly Nvidia and ATI) results in a black screen or a weird display with horizontal or vertical lines. Just as if there is no display output from the graphics card, or the resolution is not being read by the monitor. Actually, there is an output, but it is out of sync. In order to solve this, you need to pass the nomodeset boot parameter, or some other parameters listed at the end of this guide.

Live CD/USB Environment

Pop in your CD/USB and boot from it. As soon as the computer starts booting from the boot media, keep on pressing any key until you are presented with this page:

Once you see this page, press F6 and you'll see some boot options popping up. Navigate to the "nomodeset" entry and hit Enter. You'll see a mark in the beginning. Press  and now choose "Try Ubuntu Without Installing" or "Install Ubuntu", whichever you want.

Hopefully, you'll see the desktop this time.


Error while loading shared libraries: librtmp.so.0

I've suffered the same issue. Open terminal and add the following line, this works for ubuntu x86_64.

sudo ln -s /usr/lib/x86_64-linux-gnu/librtmp.so.1 /usr/lib/x86_64-linux-gnu/librtmp.so.0


Type this in terminal (Ctrl+Alt+T) to turn on the backlight of your keyboard:
xset led on

to disable it type:
xset led off

Hope this works for you. It worked for me.


Try this:

sudo gedit /etc/default/grub

Find the line: LINUX_CMDLINE_DEFAULT and add this between the "": quiet nosplash nohz=off

Then:

sudo update-grub

Do all this in a terminal window, of course, and then reboot.


(How) can I keep my PC usable while under high load?

There are three options I can think of off the top of my head:

nice ⇢ to run a program with a modified scheduling priority
renice ⇢ to alter the priority of an already-running process
cputool ⇢ to limit the amount of CPU usage a process can access

Option 1 — nice
This is a simple tool that comes built-in with just about every version of Linux that has shipped since the 90s, allowing you to set the priority (niceness) of a process. There are 40 values available ranging from -20 (Top priority! Everything else waits!) to 20 (This can wait).
To set the niceness of a process, you can use this syntax:
nice -n niceness-value [command args]

So, for example, if you're going to gzip compress a massive file but it doesn't need to finish ASAP, you can do this:
sudo nice -n 10 gzip -9 really_big_database_export.sql

This will set the niceness to 10, which is pretty far down the stack.
Option 2 — renice
This allows you to change the priority of an already-running process:
renice -n -15 -p 9999

-n is the niceness and -p is the process ID, or PID. You can find the PID of your processes by using top, htop, glances, and/or ps -eo pid,ppid,ni,comm. There are lots of tools to show this number.
Option 3 — cputool
This one is a bit different from nice and renice in that it allows you to specify the resources available to an already-running process. For example, if you find that your modelling is hitting 100% CPU far too often, you can do something like this:

Use top, stop, glances, and/or ps to get the PID
Call cputool:

cputool --cpu-limit 33 -p 9999

This will limit PID 9999 to use just 33% of the CPU.
If you do not already have cputool on your machine, you can install it with:
sudo apt install cputool

Hope this gives you a little bit of processing power to work with.


ubuntu 15.04 uses too much energy on macbook pro retina

I can't take credit for this but this tutorial has an answer:http://teslabs.com/articles/ubuntu-15-04-mbp-11-2/#comment-2020153043

High CPU usage by kworker
The most important issue I have found so far is the high CPU usage by kworker (i.e. Linux Kernel worker thread), which seriously affects the battery life. Apparently this is caused by an interrupt storm on ACPI interrupt GPE06, as described here. You can verify it by checking if interrupt GPE06 contains a high value:

$ grep . -r /sys/firmware/acpi/interrupts/

...

/sys/firmware/acpi/interrupts/gpe05:       0   invalid
/sys/firmware/acpi/interrupts/gpe06: 2938373   enabled <---
/sys/firmware/acpi/interrupts/gpe07:       0   enabled

...
A quick solution for this issue is to disable this interrupt, i.e.

echo disable > /sys/firmware/acpi/interrupts/gpe06

In order to disable it on every boot, you can add the previous line to /etc/rc.local, just before exit 0.


Ubuntu 20.04 LTS Freezes (show lit up black screen) after GRUB Menu on My HP Laptop

I had a similar problem today and hopefully the following will also work for you.

I had updated today and was not able to boot after.
First, you can try to boot in an older kernel in advanced options.

For me, what worked was adding dis_ucode_ldr to the kernel command.

Advanced Options -> press E for the option you want to run -> add dis_ucode_ldr for the end of the line starting with linux -> press ctrl+x

It's seems like it occurred from the latest intel-microcode update so you can also have a look at topic related to that.
Hope it will help you.


Will it be possible to use GTK3.2's HTML5 extension in 11.10?

Not in Oneiric, it seems, but it should be possible in 12.04. Since this was only released a couple of days ago, it was probably too late to get it in 11.10. The GTK applications will just work. You'll run them like this: GDK_BACKEND=broadway someapp.


How to find outdated apps through the terminal?

Run the command given below in the terminal to find the packages which can be upgraded :-

apt list --upgradable

It will list all the packages and apps that need to be upgraded.


How to correctly get RIGHT KEYSEQ for readline in .inputrc?

I found solution: use emacs -nw and function insert-quoted (default bind to Ctrl+q).

Ctrl+q ↑ will result in ^[[A
Ctrl+q F1 in ^[[[A

Lines in ~/.inputrc will then be following (results may vary depending on environment  - mostly $TERM variable):

"\e[[A": "pressed up key"
"\e[[[A": "pressed F1"

Motivation to change your .inputrc can be following.

Don't you like emacs-like keys for navigating along line and history?
I don't and I prefer ErgoEmacs key bindings because they are logical and I want to use them not only in Emacs but system wide.

"\ej": backward-char
"\el": forward-char
"\ei": previous-history
"\ek": next-history
"\eh": beginning-of-line
"\eH": end-of-line
"\eu": backward-word
"\eo": forward-word
"\eg": kill-line
"\eG": backward-kill-line
"\ee": backward-kill-word
"\er": kill-word
"\ed": backward-delete-char
"\ef": delete-char
"\ez": undo
"\ex": kill-region
"\ec": copy-region-as-kill
"\ev": yank
"\e;": forward-search-history
"\e:": reverse-search-history

I have written "sudo aptitude install" so many times (usually after fresh install) that I have M-a M-i (ie Alt+a Alt+i) as shortcut for that (because alias to same thing don't autocomplete)

"\ea\ei": "sudo aptitude install "

There are plenty other reasons why you should have your own ~/.inputrc ...


How can I install a package without installing its dependencies?

There are two kinds of dependencies for alacarte: “depends” and “recommends”.

Alacarte depends on Python and various Python libraries (which in turn pull in some libraries); the “depends” level says that alacarte won't work without these. APT-based tools won't let you install alacarte without those dependencies. You can ignore all dependencies with dpkg --force-depends, however this will confuse APT when alacarte is involved in a dependency calculation later (for example when a newer version of the package appears), hence doing this is not recommended. Furthermore it's unlikely that you'll get any use of the package without these dependencies.

Alacarte depends on gnome-panel (which in turns depends on many other parts of Gnome) at the “recommends” level. This indicates that alacarte is rarely useful without gnome-panel, but can be in some circumstances. Here, alacarte is indeed useful without gnome-panel if you have a different Freedesktop-compliant menu application.

By default, apt-get install installs all dependencies at the “depends” or “recommends” level. Pass the --no-install-recommends option to tell it not to install “recommends”-level dependencies. You can make this the default setting by adding APT::Install-Recommends "false"; to /etc/apt/apt.conf.d/zzz_mpmcfarlane.

With aptitude on the command line, pass -R or --without-recommends to avoid installing “recommends”-level dependencies. In the Aptitude full-screen UI, marking alacarte for installation also selects gnome-panel, but you can unmark it before proceeding with the installation. The APT preference also influences aptitude.

In Synaptic, marking alacarte for installation also selects gnome-panel. However you can go and unmark gnome-panel before applying the changes. There is a preference (in the “General” tab) to “Consider recommended packages as dependencies”.


Booting via GRUB
The easiest way to boot from a USB Drive is to boot via GRUB. To check if your BIOS is able to detect the USB drive and hand it over to GRUB, just run GRUB from your hard drive if it already installed, or from a GRUB boot floppy or CD. At the GRUB menu, hit the C key to enter command mode. Now search for your USB drive, using the root command to choose a drive/partition and the find command to see if you found the right one.
You can go through your devices like in this example:
grub> root (hd0,0)   # first harddrive, first partition
grub> find /[tab]    # type the slash then press [tab], and it will try to list files on this partition
Error 17: Cannot mount selected partition   # Oops no file system here
grub> root (hd0,1)   # first harddrive, second partition
grub> find /[tab]
 Possible files are: lost+found var etc media ...   # That was my hard drive with my linux install
grub> root (hd1,0)   # second hard drive usually is the USB drive if you have only one internal drive
grub> find /[tab]
 Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg  # Bingo, that's the USB stick

Note: If you have two internal drives including your CD/DVD drive, the USB drive probably is hd2,0 and so on.
Boot the drive by entering:
chainloader +1
boot

For convenience, add these commands to your GRUB configuration (usually in /boot/grub/menu.lst):
# to boot from a USB device
title    Boot USB drive
root     (hd1,0)
chainloader +1
boot

You can check the documentation for more info : BootFromUSB
Unetbootin
Unetbootin can help you, but only if you have 2 hard-drives.
By using a hard-drive as a usb-key, you can install ubuntu directly from it !
But there's a catch : Ubuntu can't be installed on the disk who is running the live-session. So you need 2 drives.
So on your second hard-drive you need to create a new partition - for exemple at the end - with gparted.
Now with Unetbootin, you need to choose this partition : check the option "Show All Drive" and select the proper partition.
#BEWARE THIS ACTION WILL REWRITE THE BOOT SECTOR OF THE SECOND DRIVE
More Information about Unetbootin : From Ubuntu Wiki


Unable to load Google products in Google Chrome

Just follow this:

sudo apt-get purge google-chrome-stable
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Then

sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

Finally, do

sudo apt-get update
sudo apt-get install google-chrome-stable


How to share files and folders on a forum so that anyone can download without having an Ubuntu One account?

On one.ubuntu.com
You can share a certain file by using the button "Publish file". This option is revealed when you click the "More" button on the right.

Once clicked, it will provide an URL you can share with everybody. As far as I know this doesn't work for folders.
On your machine
You can even share a certain file from within your UbuntuOne-Folder. Right-click it and choose Ubuntu-One -> Publish.
In the same right-click menu the same menu you can Copy the URL to clipboard (for me this point is always greyed out, whether the file is published or not. It works anyways.)


Environment variables - where are they stored by linux, how do I change them and is it safe to do so?

The Global environment variables of your system are stored in /etc/environment.
Any changes here will get reflected throughout the system and will affect all users of the system. Also, you need a Reboot, for any changes made here to take effect.

User level Environment variables are mostly stored in .bashrc and .profile files in your Home folder. Changes here only affect that particular user. Just close and open the terminal for configuration changes to take place.

Edit : If you don't want to Reboot or restart your terminal, you can make use of the source command.
Eg. source /etc/environment or source .bashrc


Maybe you can run service from /etc/rc.local with &&

edit /etc/rc.local

sudo nano /etc/rc.local

and add command

start service first && start service second

&& lets you do something based on whether the previous command
completed successfully

To be More precisely, && will evaluate the second expression iff the first expression returns 0.


Software to 'lock' computer every half hour

You can use brainbreak.

sudo add-apt-repository ppa:brainbreak/daily
sudo apt-get update
sudo apt-get install brainbreak


Stop auto-powering-on my USB drive after I power it off

Did you try some other dd/usb-port/usb-cable ?

I had the same problem with my old DD. It was not getting enough power from my usb cable. It connected without problem and disconnected when I tried to use it. Maybe you have the same problem.


AFAIK, Macs will not boot in BIOS/CSM/legacy mode from legal GPT disks; they require an MBR or hybrid MBR to boot in BIOS mode. rEFInd, though, doesn't check for this detail; it tries to start a BIOS-mode boot when asked to do so, even if the disk uses GPT. From your description, I suspect that this is what's happening. Thus, if you've got a BIOS-mode installation on a GPT disk, it won't work; you must create a hybrid MBR. Note that rEFInd will only attempt an EFI-mode boot if it detects an EFI-mode boot loader, which it sounds like you have not installed. Thus, rEFInd is almost certainly not attempting an EFI-mode boot of Ubuntu.

BTW, I'm the author of GPT fdisk and maintainer of rEFInd. Hybrid MBRs are dangerous things -- I've answered far too many questions from people who've wiped out their disks because of hybrid MBRs. Unfortunately, Apple designed its firmware to use them as a "key" to unlock BIOS-mode booting, so you're pretty much stuck with them if that's what you need.

Backing up a bit, most Macs will boot Linux in EFI mode just fine. Given your description, though, you may have a 32-bit EFI. You can check this in rEFInd by reading the About/Info page; it should identify your firmware as being 32-bit or 64-bit (check the Platform: line). If you have a 32-bit EFI, you must use a 32-bit boot loader to boot Linux in EFI mode. This is difficult to do for various reasons -- the installers for 32-bit versions of Ubuntu can't be booted in EFI mode, and the installers for 64-bit versions of Ubuntu come with nothing but the 64-bit EFI boot loader. There are ways around this, but they involve significant hoop-jumping. See this question for more on this subject.


installation under vmware gets into installation loop

Hit the space bar to exit the loop and continue with the install.


r8168 and 16.04.5, kernel 4.15.0-33 internet unstable (not wifi)

Using the latest supported kernel for 16.04.5 (4.15.xx)...

Purge...

r8168-dkms v8.041

Reinstall...

r8168-dkms_8.046.00-1_all.deb

Edit /usr/src/r8168-8.046.00/dkms.conf...

PACKAGE_NAME="r8168"
PACKAGE_VERSION="8.046.00"
BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"

Add add this line...

MAKE="'make' -j$PROCS_NUM KVER=${kernelver}"

Then redo the dkms commands...

sudo dkms build...
sudo dkms install...

Then recheck the r8168 version info...

modinfo r8168 | grep -i version

reboot


Skype requires the sni-qt:i386 package to be installed to integrate with the indicator area in Ubuntu 11.10.  To install this package, run the following from the commandline:

  sudo apt-get install sni-qt:i386

Then kill and restart skype again.  After that, you should always have the icon in the panel and be able to get to it even after closing the window.


Have a look at this (matches drivers to 14e4):

http://wireless.kernel.org/en/users/Drivers/b43

I've had problems with the broadcom wireless in my netbook and found that unfortunately the solution for one release does not necessarily work for the following one.


How to set environment variable in .NET systemd service?

When using SystemD, you can define environment variables inside your unit. (this is per the SystemD docs on service files and declarations and configurations.)

Example syntax:

[Service]
...
Environment=VARNAME=VARCONTENTS

So in this case, try adding Environment=DOTNET_CLI_HOME=/temp to your Service declaration in your service file.  Then run your typical:

sudo systemctl daemon-reload
sudo systemctl start myservice.service

which should then utilize the newer setup/environment variable as defined in SystemD.


Yes, you can change the xmodmap. First thing to do is find the keycode for the key you want to use as replacement. To do that, open a terminal, then run xev in the terminal. Move the mouse pointer into the small white window that opens up, then hit the key on the keyboard that you want to use as replacement. In the terminal you should now see a KeyPress event and a KeyRelease event. Make a note of the keycode number it shows, then close the white xev window.

Now, if you don't already have a ~/.Xmodmap file, create one with the current mapping by running

xmodmap -pke > ~/.Xmodmap

Then edit the file with your favorite editor. e.g.  gedit ~/.Xmodmap.

Scroll down to the line for the keycode you noted earlier. If the keycode you want to use is 62 for instance, change the line that starts with keycode  62 = to read:

keycode  62 = Return NoSymbol Return

Next time you log in, you'll be asked if you want to load that modmap, so do that, and afterwards that key should work as a return key. For making the change in your current session, load the file with:

xmodmap ~/.Xmodmap


unable to install/recover jenkins after upgrading from ubuntu 12.04 to 14.04

Jenkins was removed from the official Ubuntu repositories in Trusty. The reasoning was given in https://bugs.launchpad.net/ubuntu/+source/jenkins/+bug/1294005, but the short version is that it's more secure and easier to keep up-to-date if you use the upstream repository from now on. Details on how to do that are available at https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu


I ended up doing a fresh install and now it works perfectly


As you can see from http://packages.ubuntu.com/search?keywords=python3.4&searchon=names&suite=xenial&section=all, there is no package for python3.4 for Ubuntu 16.04. You can compile and install Python 3.4 from source, but if you are not familiar with doing it or prefer to install packages using the APT package manager, I would recommend installing it from a well-known PPA that provides a variety of versions of Python for many Ubuntu versions.

Add the deadsnakes PPA (read more about it at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa):

sudo add-apt-repository ppa:deadsnakes/ppa

Install python3.4:

sudo apt-get update
sudo apt-get install python3.4

According to https://askubuntu.com/a/682875/15003,/usr/bin/python3 should still be symlinked to /usr/bin/python3.5. Therefore, if you want to call Python 3.4, you would need to type the full path to it, which is /usr/bin/python3.4. To avoid accidentally breaking other programs, I strongly recommend you to not change the symlink that /usr/bin/python3 points to and instead just use /usr/bin/python3.4 whenever you need to call Python 3.4.

Alternatively, a popular method to manage multiple versions of Python, which I personally recommend, is to use virtualenv. You can read more about it at https://virtualenv.pypa.io/en/stable/; further elaboration of it in this post seems too far off the intent of the question.


Déjà Dup does not allow to change google drive account from which restore the files

The bug I experienced is described here. They basically said that they are not going to fix it since there are some workarounds to this issue. What I did was mounting the google drive account in which my backup is to Nautilus. Then, the files there are accessible through the option "local folder" of deja-dup. I think this is faster an easier than downloading all the files.


In your /usr/share/applications/google-chrome-stable.desktop change the "exec" command to something like this:

Exec=sh -c "export LANGUAGE=pt_BR.UTF-8 && /usr/bin/google-chrome-stable %U &"


Ubuntu 16 Stuck in Login Loop after Installing Nvidia 364 Drivers

If you've been successfully running 16.04 with your video driver before, but the login loop issue happens after the latest software update, try this, it worked for me after trying EVERYTHING else. This is the equivalent of searching for "additional drivers":

sudo ubuntu-drivers list

then use:

sudo ubuntu-drivers autoinstall

For me, this updated the driver for my nvidia quadroFx 3800 in a way that using sudo apt-get install nvidia-current would not.

After autoinstall, invoke another tty (ex. ctrl+alt+f1) and

sudo service lightdm restart


Can't see YouTube videos in either Firefox or Chromium

It may be due to Flash Player whose version is too old (11.2). I get it with Chromium on Ubuntu 12.04.


How do I mount an encrypted /home directory on another Ubuntu machine?

You can use ecryptfs-recover-private.

ecryptfs-recover-private /media/<UUID>/home/.ecryptfs/<USERNAME>/.Private

It will promt for the mount password, unlock the wrapped-passphrase and mount the directory in read only mode under /tmp/ with just single command. Use the flag --rw to mount the encrypted filesystem as read and write.

You can check the man page for more information.


Black screen where once there was a login screen after installing Shotwell

I'm assuming that you have used this AU question and answer.

The easiest way to confirm this is to either boot into recovery mode or CTRL+ALT+F1 for a TTY

Then run a ppa-purge on the type PPAs

sudo ppa-purge ppa:flexiondotorg/shotwell
sudo ppa-purge ppa:gstreamer-developers/ppa

This will downgrade gstreamer and shotwell back to the standard repository versions.

Once done, reboot.

If you still have a black-screen, then it is not the shotwell/gstreamer PPAs that have caused your black-screen issue.


20.04.1 LTS kernel 5.8.0-34 nvidia build fails

I got the same error and just found out the solution.
First thing I did was to uninstall the 5.8 kernel and rever to the 5.4.0-60. That however didn't solved the issue. So I realized that the nvidia-smi utils was stating that I had a version mismatch. So I removed all nvidia drivers and reinstalled with the correct version, that would be (on my case) 450. What I reinstalled was:

linux-modules-nvidia-450-5.4.0-6-generic
nvidia-dkms-450
nvidia-kernel-common-450
nvidia-kernel-source-450
nvidia-utils-450

After a reboot, the nvidia-smi util was working, but still no X. Then I found out that the xserver-xorg-video-nvidia-450 was removed, so I reinstalled and now everything is back to normal.
You may need to install other packages, such as:

libnvidia-common-450
libnvidia-gl-450

Hope that helps


how to deploy charm to a machine which is already installed with some other charm?

The Juju-Jitsu project is at this point depracated. The project is essentially un-maintained and doesn't work with juju-core (juju > 1.0). However, if you're using juju-core, you can use the --force-machine options during deploy to point the service to a machine. In the coming months support for containerization will land allowing you to more safely co-locate services on the same machine.

juju deploy --force-machine 0 wordpress

If you're using juju 0.7 still, you can use jitsu to co-locate services using the following syntax

jitsu deploy-to 0 wordpress

In both examples 0 is the machine number you're trying to deploy to.


This is probably more of a routing issue than a name resolving issue.  Try:

netstat -r

And see what your routes look like.  Your local network should go directly to the Ethernet interface in question, e.g.

192.168.1.0     *               255.255.255.0   U         0 0          0 eth1

Also check the configuration of your ethernet adapters with

ifconfig -a

Maybe your netmask is incorrect and it's not routing through the correct adapter if the server has more than one port.


How to know what version of PHP is used on my xampp?

Put this in your root directory:

<?php
phpinfo();
?>

Save it as phpinfo.php and point your browser to it (this could be http://localhost/phpinfo.php)

More information (you can get much more information than just the version).
Example (random image):


Solved!

I had a link to home folder on my desktop. So I opened it and I went to /usr/bin/ from location bar. Then I started gnome-terminal.

In terminal I opened ccsm (compiz config manager) and enabled Unity Plugin again.

And now it works normally!!

What an awful weakness this is for a desktop OS, isn't it?

Shouldn't it have a default thing for these situations to run (automatically)?


How to add user without useradd command?

It's not recommended to manually modify /etc/passwd, /etc/shadow, /etc/group or /etc/gshadow because the risk of breakage. If you're looking for an alternative command that is easier to use, take a look at adduser(8). All you have to run is:

sudo adduser user

The shell will be /bin/bash by default per /etc/adduser.conf.

Usually, if you wish to add a user with the bash shell, thereby create a home directory /home/user and a user group, you would use:

sudo useradd --create-home --shell /bin/bash --user-group user

This command is basically determining a free User ID $UID and Group ID $GID and then executing the next commands:

echo "user:x:$UID:$GID::/home/user:/bin/bash" | sudo tee -a /etc/passwd
echo "user:x:$GID:" | sudo tee -a /etc/group
echo "user:!:$DATE_OF_LAST_PASS_CHANGE:0:99999:7:::" | sudo tee -a /etc/shadow
echo "user:!::" | sudo tee -a /etc/gshadow

..and thereby possibly making a backup of the files.

The next manual pages about the file formats may be of interest to you:

passwd(5)
group(5)
shadow(5)
gshadow(5)


So that this can help others going through the same thing, here's how I solved it.  When it connected, it was almost always connected in Mass Storage mode.  lsusb listed it as Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode).  After upgrading to the latest ubuntu, it actually started listing the files in the mass storage mode.  It has linux installation files which you can use. Switch to root using sudo -i and run the installer shell script.  If you're on a 64 bit machine, you will get get the error libusb-0.1.so.4: cannot open shared object file: No such file or directory.  You can solve that by doing apt-get install libusb-0.1-4:i386.  This is all you need to get it working consistently.


Where is .deb file created after running the command sudo make install in qt 4.8 installation process in Ubuntu?

It's not necessary to compile Qt4 from source because Qt 4.8 is provided by the qt4-default package in all currently supported versions of Ubuntu. To install it open the terminal and type:

sudo apt install qt4-default

After you have installed qt4-default you can run the following command to list other available Qt4 packages:

apt search qt4-*


From where can I install my nVidia drivers?

Since Quantal Quetzal the Additional Drivers application is not installed by default in Ubuntu. But you can search for Software Sources in the dash and look at the Additional drivers tab.

You can also go to System configurations and you will see Software Sources right there.


Can't default printer to black and white on 18.04

Here are some steps to try:
Install hplip
Open a terminal by pressing Ctrl+Alt+T and type:
sudo apt install hplip hplip-gui

This will install the two apps if they are note already installed.
Run setup
Make sure the printer is connected and turned on. Type the following command in the terminal:
hp-setup

This will open the HP printer setup app. If it does not find your network printer, you may have to use manual discovery and enter the IP address of the printer.
After this, you may have two printer icons in the setup. Try the new one and see if it allows you to print in black and white.
Remove the Extra Printer
If you end up with two printers you can remove the one you don't want from the System Setup > Printers. Or use the following command:
sudo hp-setup -i -r

It will offer you a list of printers to choose from if it detects two or more HP printer setups. If it detects only one printer it will delete that printer. Thanks to PJ Singh for this tip.
Hope this helps


Nbconvert is part of IPython only since 1.0. If it is not yet in Ubuntu repository, you could try to add Julian Taylor IPython PPA that should have more rencent version backported on Ubuntu. You will find information on how to add this PPA on your system on the PPA page. Be carefull, the PPA also contain bleeding edge version of IPython builded every night this is usually usable, but might not be what you like. I'm not a PPA/Ubuntu user myself so I cannot go much further into details.


NVIDIA-SMI not working, struggle with installing the right cuda for my driver on dell inspiron fresh ubuntu 20

Thank God I fixed the issue after a lot of search !
Here's what I did exactly:
#To get connected to the card, you need to get the exact same model of your GPU
#Use the command: sudo lshw -C video
#My card is GF117M==> GeForce 100M series
#Download the driver of it from nvidia website: https://www.nvidia.com/download/index.aspx?lang=en-us
Now; it's clear what I should do with cuda too; the same exact steps: searching for the proper version of CUDA for the "GF 100M series" and download it and I'm good to go !
-------UPDATE------
I completed the driver installation and NVIDIA-SMI works finally; this is the result:
+------------------------------------------------------+
| NVIDIA-SMI 340.108    Driver Version: 340.108        |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 820M        Off  | 0000:08:00.0     N/A |                  N/A |
| N/A   48C    P8    N/A /  N/A |    113MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+
So I moved to the next step which is getting "CUDA". I checked this link to find out about the compatibility of my driver with CUDA:
https://developer.nvidia.com/cuda-gpus
From that link, I chose "legacy drivers" since my GPU is quite old:
https://developer.nvidia.com/cuda-legacy-gpus
My GPU is not listed there, so I'm depressed a little -_- but my machine is from 2013-2014 so...
It's good to know though and it's good to fix :) at least I know more info about my device and I fixed a very big confusion for me that costed me a whole OS a week back.
I hope you find it useful**


How can I run a command if all processes of a certain name crash?

There are actually many ways to accomplish this goal, and it can go from trivial home-grown (eg, while true; do my_process; done (ps: don't do that)) to more complicated patterns (eg involving my_process.pid with init scripts and custom log file rotations)... but before going down that rabbit hole, look at existing solutions that accomplish the same thing. For example: supervisor (see also this tutorial ) or monit, both available via apt install ..., but both just requiring some additional configuration.


How do I change the backlight brightness on an iMac 12,2?

Have you tried adjusting the acpi_video0 with a terminal?

To check max value you can use run:

cat /sys/class/backlight/acpi_video0

To check current brightness:

cat /sys/class/backlight/acpi_video0/brightness

To change brightness (input between 0 and your max_brightness):

echo YOUR_BRIGHTNESS_HERE | sudo tee /sys/class/backlight/acpi_video0/brightness

If this doesn't work perhaps your bootloader is messing something up or this video driver doesn't work on your machine.


I had the same problem and I solved it by running the following command:

sudo man <command>


how to configure a mounted drive to not show up under devices

I changed /dev/sdc1 in fstab to mount at /home/Backup and now all three drives appear as one device. Don't really understand why that changes anything but it works. If anyone knows why that makes the difference feel free to comment. Thanks.


Where does Gnome Color Manager store the ICM or ICC files?

You can find your colour profiles as ICC files in ~/.local/share/icc. (Where ~ is your home folder).

The files have slightly cryptic names, but you can open them (with the ICC Profile Installer) to see a little more information. Otherwise, open the Color settings panel and click the View details button with a profile selected. The "Filename" field in that dialog should point you in the right direction.


How can I get a USB floppy drive to work?

The following procedure worked instantly on Ubuntu 12.04:

REMARK:
The df command shows that /dev/sdd show that d the last assigned drive in use. I need to know this to find the next available one, which is used in the subsequent sudo mount ... command. In my case, the next drive will be /dev/sde .

You will need to determine the correct drive for your own system.   For example, you might have /dev/sda, or sdb, or sdc.

So, first, to see the drive information:
 df

Next, run mkdir and mount :

 mkdir /mt/ee1

 sudo mount -t vfat /dev/sde /mt/ee1 -o uid=1000

For automatic execution at boot time, I normally use Perl scripts, which detect and adapt automatically and give stable names to the partitions.

I do not need this at this point of time for floppies, and therefore I didn't optimize it. Perhaps the command "mount ..." is not optimal....)

A more general but a bit primitive solution would be to create a bash/batch file with multiple lines as above with sudo... , with the several probable possible variants /dev/sd... on the specific PC.

Then there might be a call of this file in the settings of "Startup Applications".
I did not test this.

In addition, this does not deal with the aspect of removing or inserting a different floppy disk. This could be done in some automatic or at least semi-automatic manner....

I do not know if the way above is optimal. I just wanted to add helpful information, after having settled my own problem with the preceding answers.


Why does deploying juju charm openstack40.yaml cause network failure?

Prolog

I work with Deva at IBM on a proof of concept that brought this issue up.
We were able to make the juju OpenStack 40 charm get by this issue.  Note that
this pertains to using the charm for ppc64el deployment.

Charm: https://jujucharms.com/u/openstack-charmers-next/openstack-base/40

The documentation suggests "Two cabled network ports on eth0 and eth1 (see below)."  This is a bit skimpy on what is really needed.  OpenStack setup for
neutron (networking) is a bit complicated.  See the OpenStack documentation link provided below.  OpenStack would like to have network interface 1 for management use (eth0).  It would like to have network interface 2 for use of neutron based on the eth1 definition in the charms used by the openstack 40 bundle.  Now we originally had eth1 as the external.  But since neutron wants
to use eth1 per this bundle setup it then intends to use eth1.  When this occurs
having the external ip address on eth1 ends up being ignored and the server
looses external connectivity.

What we needed to do was follow OpenStack documentation to use eth0 as the management interface, we used private network.  We set up eth1 as the
way OpenStack suggests. See section "To configure networking:" in below
OpenStack URL.   eth1 as

# The external network interface
auto INTERFACE_NAME
iface INTERFACE_NAME inet manual
    up ip link set dev $IFACE up
    down ip link set dev $IFACE down

Now this has eth0 and eth1 setup per the openstack 40 bundle documentation of
having two network interfaces.  You still have the problem that you need
to define the external ip address so adding a bridge fixes that problem.  Something list so:

auto br0
iface br0 inet static
       address 9.3.80.444
       netmask 255.255.255.0
       network 9.3.80.0
       broadcast 9.3.80.255
       gateway 9.3.80.1
       bridge_ports eth1
       bridge_fd  9
       bridge_hello 2
       bridge_maxage 12
       bridge_stp off

So the way we got our initial manual environment server (vm2) to get external access is by fixing /etc/network/interfaces as shown below.

OpenStack Install Instructions

Need to put https: in front of following URL:
//docs.openstack.org/kilo/install-guide/install/apt/content/ch_basic_environment.html#basics-networking

/etc/network/interfaces

auto lo

auto eth0
iface eth0 inet static
   address 192.168.93.76
   netmask 255.255.255.0

auto eth1
iface eth1 inet manual
      up ip link set dev $IFACE up
      down ip link set dev $IFACE down

auto br0
iface br0 inet static
       address 9.3.80.444
       netmask 255.255.255.0
       network 9.3.80.0
       broadcast 9.3.80.255
       gateway 9.3.80.1
       bridge_ports eth1
       bridge_fd  9
       bridge_hello 2
       bridge_maxage 12
       bridge_stp off

#dns-* options are implemented by the resolvconf package, if installed
        dns-search aus.stglabs.ibm.com
        dns-nameservers 9.3.1.200 9.0.128.50


Why are the hidden settings-folders not deleted when purging an application?

If you mean the folders in your home folder: No, the package manager never touches anything in a users's home folder.

I don't know of any tool that assists you in cleaning your home folder from config files you don't need any more - but that sounds like a nice idea.


What unused key combinations are available for use with AutoKey or other apps?

There's a couple of places I can think of to check for used key combinations.

If you have dconf-editor installed you could try navigating to org>gnome>desktop>wm>key bindings.
Another way is through System Settings->Keyboard->Shortcuts, however this groups key combinations by function, such as sound, windows, so it's not as easy to see all the keys in one hit.


How to select a file from a network share with file manager file open dialog

I have found an answer, but I do hope its not the best one. I found it in that post: https://forums.linuxmint.com/viewtopic.php?t=144053. Its a workaround, really.

The desktop file managers mount network shares not in the home directory, but in the the linux directory tree. Actually an idea with consequences, because network shares contain user permissions. That means not every user is able to get access to very share. That means you can have the same share connected by different users at the same time, each with different permissions. That means, that the share can not be stored by share name, but there must be a destinction by user.

So in my case they have decided to put all shares mounted by a file manager to

 /run/user/1000/gvfs/

In that directory are all shares. The 1000 is my current the 'user id'. On a system with multiple users it could be 1061 or whatever. 'gvfs' is about the file system technology involved. The names are a bit cryptic like 'smb-share:server=myserver,share=images' but at least recognizable.
Currently I fail to see the advantage compared to /home/username/shares, or ~/shares, which would be accessible from each application with 2 clicks. maybe someone can enlighten me.

So as described in the post the workaround is based on the fact that local bookmarks actually are listed in the file open dialogs (shares are not). So just goto your version of

 /run/user/1000/gvfs/

and add a bookmark. That is listed in the file open dialog, and then you are in the list of shares. You see a bookmark 'gvfs' which you can rename to "Network Shares"

So its solved principally and its event 2 clicks only, but it still somehow is a very bad solution and a workaround. I still can not browse the network. I can not see anything when I did not mount the share in a file manager.
All the function is already there in the file manager, what could possibly block a decision to expose that function to the file open dialog? Please do not hesitate to add a comment that help a new user to understand that.

Thanks and hope for better answers.


You can use the following command from the shell:

camorama -d=/dev/video1


I have been able to resolve this issue by using node version manager

Step1

Run either:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash

Use either wget or curl

step2

close current terminal and open another

nvm ls //should show if you have nodejs previous versions if none itll indicate

Step3:
Install latest version of nodejs by today its version 8

nvm install v8.6.0

check the latest version and replace the numbers

Now nodejs should be installed

node -v
npm -v

The above steps are also found Here on this gist


grub-pc [rescue mode] error:unknown filesystem

I aswer my own question because I think I found an answer by myself...

I've finally bought an external CD/DVD player and boot from this device (with a live CD of Ubuntu inside) and then I could reinstall the whole system.

Note that I initially wanted to erase the old partition, so reinstalling was not a problem for me. Of course, my sollution is not a free one (I've choosen a model ~ 40€...), but it works.


Fractional scaling Gnome 3.26/Ubuntu 17.10

According to one recent OMG! Ubuntu! article

  Despite the best efforts of many fractional scaling wasn’t ready for the GNOME 3.26 release earlier this month.

As it is now finalised that Ubuntu 17.10 is going to have GNOME shell v3.26 most probably fractional scaling won't be included in Ubuntu 17.10.

But the same article provides a workaround to enable experimental fractional scaling in GNOME 3.26, although it works only in the Wayland session. Apparently it can be activated by running the following command

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

Then you should see a number of extra scaling options in the Scale section of Settings > Devices > Displays.

(Screenshot from the same article)


Help installing Broadcom 43142 with no internet access

After installing Ubuntu 12.04 for testing I noticed the package names were different. They were merged on future releases. So for your case I would recommend doing the following and please let us know how it went:

   sudo apt-get update

Then

  sudo apt-get install firmware-b43-lpphy-installer

Now reboot. If that one does not work then remove it and install one of the following:

  sudo apt-get install firmware-b43legacy-installer

Or

  sudo apt-get install firmware-b43-installer

Reboot and let us know how it went. But just in case I highly recommend updating to 14.04 or even 15.04 when it comes out. The broadcom drivers are much better there and even have better range and speed.


Problem was related to the encryption of home directory. As stated in Google Authenticator libpam

  If your system encrypts home directories until after your users
  entered their password, you either have to re-arrange the entries in
  the PAM configuration file to decrypt the home directory prior to
  asking for the OTP code, or you have to store the secret file in a
  non-standard location

. If you're the only user of your laptop, below are the steps to follow to boot Ubuntu 18.04 with 2FA:

create an unencrypted directory, let's call it ga:

sudo mkdir -m 700 /home/ga
sudo chown yourname:yourgroup /home/ga

when you run and configure Google Authenticator (i.e., command google-authenticator in a terminal), it creates a configuration file at the root directory. Copy this file to your unencrypted directory:

sudo cp ~/.google_authenticator /home/ga/.

finally add this line at the end of the file /etc/pam.d/gdm-password:

auth required pam_google_authenticator.so secret=/home/ga/.google_authenticator

Boot your computer and you should be good to go.

Sources

https://github.com/google/google-authenticator-libpam#encrypted-home-directories

Google Authenticator for Desktop (lightdm or gdm plugin)

https://wiki.archlinux.org/index.php/Google_Authenticator#Desktop_logins

Possible to Create Unencrypted Folder Outside Ecryptfs Home?


Booting problem after upgrade, /dev/sda2 clean

I think you have no problem. It's just a normal procedure in ubuntu versions 15 and newer. I offer a link to the explanation given by its author https://answers.launchpad.net/ubuntu/+question/293967

  Ubuntu versions 15.04 and newer perform a quick file system check on the root disk and report the result on the screen.

  The message
  /dev/sda2: clean, 286631/6111232 files, 2586472/24413952 blocks
  has the following meaning:

  The partition that was checked is "/dev/sda"
  The file system is "clean", i.e. there are no inconsistencies
  "286631/6111232 files": The file system has been created to allow a maximum of 6,111,232 files, and currently there are 286,631 files,
  "2586472/24413952 blocks": The storage capacity of the file system is 24,413,952 blocks (probably 4096 bytes each), and 2,586,472 blocks currently are in use.

  This is an informational message confirming that the file system is ok. There is nothing that needs to be resolved or repaired.


'accept' and 'deny' buttons are greyed out when receiving appointment request in Evolution

I got the same problem using evolution 2.32.2: I couldn't respond to Outlook invitations because the program waited forever with the message "searching for an existing version of this appointment".

I use a google calendar account as my default calendar, so the solution I found was to delete that calendar, and then add it again (not nice, but the best I could think of).

If you're not able to delete the calendar by right clicking on it (what seems to be another problem with evolution), then you have to open the gconf-editor, go to /apps/evolution/calendar/sources and delete the entries corresponding to the google calendar.

HTH,
Damian.


Grub only gives boot options and launches the appropriate boot loader.
Thus putting it on the SSD will not speed up booting since the actual boot is done from the drive with the OS on it.
Edit /etc/default/grub. Change GRUB_DEFAULT=0 to point to the menu entry you want to be default.
For example: GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"
Windows can not change the grub boot order.


The best is to not install Wubi, but to do a proper dual-boot install (if you want to keep Windows).

Please follow this documentation:

https://help.ubuntu.com/community/WindowsDualBoot

Hope it help, if not please answer back.


Most likely Windows is assigning D: to what you earlier know as I:, as Windows cannot work with Unix-Filesystems. You can change the assignment on your System-configuration of windows. But this is something for Superuser ;)


remote connection using rdp protocol failure connecting to 12.04

I had the same issue just now. I think the problem is that compiz doesn't work correctly across the RDP connection on account of it needing a 3D card.
There are some solutions out there that tell you to change the gnome-session information. Doing this will leave you with an account that, when you log in on the local computer, will have none of the nice effects from your 3D card.

What I did to alleviate the problem was. On the Local Ubuntu computer:

Create a new user from > System Settings > User Accounts
(with same permissions as your normal account. I just used "username-rdp" where "username" is your current username)
Make sure the user is activated by giving it a password in the User Accounts window.
log in with that new user account
go to the terminal and run:

echo "gnome-session --session=ubuntu-2d" > ~/.xsession

Restart the computer.

This should leave your computer in a state where your normal user is untouched and can still do 3D and Compiz. Your new user will work through the RDP connection and will be limited to the 2D Ubuntu session without harming your normal user.

If you don't care about 3D then just follow steps 4. and 5. and then use your normal user account over RDP.


reboot on both resume on boot and wake from hibernation

I figured that since the suspend to ram and suspend to disk didn't work on both ubuntu and windows 10, it can't be a kernel problem and must be a bios problem (turned out virtualbox aiding tool to disable secure on EFI bios boot messed up with it) I flashed my BIOS to latest update and voila! everything back to normal except that I had reinstall virtualbox-dkms package.


Cannot boot Ubuntu 14.04 Installation DVD

unable to open '/dev/sdb'

Assuming that your DVD-ROM is /dev/sdb your problem is probably hardware related. Did you try running a hardware diagnostic? Check to see if that's possible in your BIOS before boot.

In the meantime, however, a possible alternate solution to your problem may be to use a USB device instead of a DVD.


I have Ubuntu 20.10 with Gnome 3.38 but I want to return to Gnome 3.36

While it is not advisable to downgrade core packages that many other components rely upon, this answer demonstrates the method to install a specific version of a package, which can be a prior one.
apt-get install «pkg»=«version»
That said, the issue you were having appears to have been fixed and made available in GNOME 3.28.2, made available in the repositories at the end of December 2020.


transmission-remote: How to monitor list of torrents in terminal?

The watch command can be used to run a program periodically and show the output.

I don't have transmission installed so I can't test this, but something like

watch --interval 5 'transmission-remote -n 'user:pwd' -l'

should do what you want.

More information on watch by typing man watch or here


Computer doesn't recognize hard drive for booting windows 8

1)you have to use a GNU parted disk as util fdisk doesnt support GPT

if this doesnt fix it then,

2)you have to re-install the hard disk, most hard-disks self install themselves but when you tried to install Ubuntu you could have deleted these drivers. you can search Google on how to do this.

3)secondly your hard disk could be loose and thus cant communicate with a computer.

4)last of all this could be because you wrote Ubuntu over windows and now windows cant read the hard disk.


Unable to boot 12.10 AMD64 Live USB on GT5436E

It's a problem in the /syslinux/txt.cfg of the bootkey.
Where it says /casper/vmlinuz, this has to be /casper/vmlinux.efi. Rename it, then you should be set.


How to ssh to a running X instance remotely?

An X program needs two pieces of information in order to connect to an X display.

It needs the address of the display, which is typically :0 when you're logged in locally or :10, :11, etc. when you're logged in remotely (but the number can change depending on how many X connections are active). The address of the display is normally indicated in the DISPLAY environment variable.
It needs the password for the display. X display passwords are called magic cookies. Magic cookies are not specified directly: they are always stored in X authority files, which are a collection of records of the form “display :42 has cookie 123456”. The X authority file is normally indicated in the XAUTHORITY environment variable. If $XAUTHORITY is not set, programs use ~/.Xauthority.

You're trying to act on the windows that are displayed on your desktop. If you're the only person using your desktop machine, it's very likely that the display name is :0. Finding the location of the X authority file is harder, because with gdm as set up under Debian squeeze or Ubuntu 10.04, it's in a file with a randomly generated name. (You had no problem before because earlier versions of gdm used the default setting, i.e. cookies stored in ~/.Xauthority.)

If this is a one-shot, you can detect the values of DISPLAY and XAUTHORITY from a running process. This is awkward to automate. You have to figure out the PID of a process that's connected to the display you want to work on, then get the environment variables from /proc/$pid/environ (eval export $(</proc/$pid/environ tr \\0 \\n | grep -E '^(DISPLAY|XAUTHORITY)=')).

A long-term, automatic solution is to copy cookies when you log into your desktop X session. Add the following lines to ~/.profile (or some other script that is read when you log in):

case $DISPLAY:$XAUTHORITY in
  :*:?*)
    # DISPLAY is set and points to a local display, and XAUTHORITY is
    # set, so merge the contents of `$XAUTHORITY` into ~/.Xauthority.
    XAUTHORITY=~/.Xauthority xauth merge "$XAUTHORITY";;
esac

Then you can run programs on your remote X display simply by setting DISPLAY:

ssh foo.example.com 'DISPLAY=:0 restart teamviewer'

This answer is adapted from a more complete answer to a similar question on Unix Stack Exchange.


What does the Alt-Shift-Esc keyboard shortcut do?

From the GNOME Shell documentation:

  Alt+Esc

  Cycle through all open windows on a workspace.

Adding Shift to a cycling shortcut usually just reverses the order (compare Alt+Tab and Alt+Shift+Tab).


14.04 - Unable to lock/move items to/from unity launcher

Find the associated .desktop file and remove it.

Look for the .desktop file in these folders:

/usr/share/applications
~/.local/share/applications/

When you find it, remove the file with sudo rm -f file.desktop. Next time you reboot it should be gone. If you can't find it, you can always search the entire hard drive with:

sudo find / -name "*.desktop"


Wifi available networks not showing up suddenly

Reset WiFi after long suspend period
A few months ago some of us discovered the network card (Ethernet) and wifi card would not reconnect if the laptop was suspended for a long period (+2 hours IIRC). For the 8 months prior to that, suspending and resuming worked perfectly.
This script is written for iwlwifi` which is the common Intel driver name. If your's is different change that name below:
#!/bin/sh

# NAME: /lib/systemd/system-sleep/iwlwifi-reset
# DESC: Resets Intel WiFi which can be flakey after a long suspend.
# DATE: Apr 1, 2017. Modified August 30, 2017.

MYNAME=$0

exit

restart_wifi() {
    /usr/bin/logger $MYNAME 'restart_wifi BEGIN'
    /sbin/modprobe -v -r iwldvm # This removes iwlwifi too
    /sbin/modprobe -v iwlwifi   # This starts iwldvm too
#    systemctl restart NetworkManager.service
    /usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESSED)'
    /usr/bin/logger $MYNAME 'restart_wifi END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
    hibernate|suspend|pre*)
      ;;
    resume|thaw|post*)
      restart_wifi;;
esac

NOTE: Sometimes simply resetting network manager is all that is needed. In that case un-comment the line above by removing #. Then comment out the two lines above it by putting # at the beginning of those two lines.
You'll need to create this script, called iwlwifi-reset, with sudo powers and save it into the directory /lib/systemd/system-sleep.  Then mark it executable using:
chmod a+x /lib/systemd/system-sleep/iwlwifi-reset


"Can't cd to /var/cache/flashplugin-installer" error when I try to install Flash

There is a bug, that sometimes prevents installing the flash plugin. Actually there are several reports, I just picked one with a possible workaround:

Check if the directory exists: ls /var/cache/flashplugin-installer
If not, create as root: sudo mkdir /var/cache/flashplugin-installer
Re-run the install command.


Can not authenticate bugzilla to LDAP with any user but administrator

Your question is not entierly clear

If I understand you correctly. You don not want to use an Admin account for the ldap bind to your ldap server. But using another user fails to bind.

You don't specify what LDAP server you are using. I presume its MS Active Directory becasue of the term "Domain" and "Domain Administrator".

In Active directory you either have to allow anonymous ldap queries or make sure that the user account you specified has read permission on the part of THE AD where you want to read out information.

You could verify the correctness of your settings outside outside of bugzilla  using ldapsearch from the command line on a Linux machine

anonymous:

 ldapsearch -LLL -H ldap://yourdomain.com:389 -b 'dc=int,dc=yourcompanmyname,dc=com' -D 'DOMAINNAME'  '(sAMAccountName=usernametosearchfor)'

with credentials:

 ldapsearch -LLL -H ldap://yourdomain.com:389 -b 'dc=int,dc=yourcompanmyname,dc=com' -D 'DOMAINNAME\binduser' -W  '(sAMAccountName=usernametosearchfor)'


Installing Ubuntu workstation and ubuntu server in a multi partition environment

Yes, this is something grub is very much designed for. By default, when grub gets control during boot, it offers you an interactive menu on your console screen that lets you select which OS you want to run.  You can configure grub to automatically run your preferred OS after a delay, or right away, for your convenience.

You might like to be aware that with two Linux systems (in this case Ubuntu systems) installed, you can expect to have a /boot/grub directory on each disk partition, and grub gets some files from there, in particular the menu.lst that controls the menu offered to you during boot.  Grub will always use the same /boot/grub directory once both Linux systems are both installed unless and until you ask for re-installation of grub itself, so it is not a big deal.

And yes, grub will recognize your windows installs and all of your Linux installs.


Installation shows no disk space available

Remove your 100 MB FAT partition again and leave the space empty. After that, the installer will use the free space taken by that partition you created.

Ubuntu needs empty, unformatted and unpartitioned space for automated installation next to another operating system. Either it will use unallocated space that is there, or first automatically shrink partitions (e.g. automatically installing besides Windows - I am not sure if the Ubuntu installation utility can resize a Mac partition).

Of course, advanced users can also create the partitions themselves and indicate in the installer how the partitions should be taken into use.


From About Ubuntu on ubuntu.com:

  Where did it all begin?

  Linux was already established as an
  enterprise server platform in 2004.
  But free software was still not a part
  of everyday life for most computer
  users. That's why Mark Shuttleworth
  gathered a small team of developers
  from one of the most established Linux
  projects – Debian - and set out to
  create an easy-to-use Linux desktop:
  Ubuntu.

  The vision for Ubuntu is part
  social and part economic: free
  software, available free of charge to
  everybody on the same terms, and
  funded through a portfolio of services
  provided by Canonical.

To find out who was involved it is best to checkout the relevant Ubuntu mailing lists. An example would be ubuntu-devel from 2004 ordered by users.


What is the best type-2 hypervisor in Ubuntu (14.04) to run a mix of Windows and Linux VMs?

Your question title is about which hypervisor is best in Ubuntu, yet the body of your question mentions a specific Virtualbox step-by-step guide. I'm suggesting an alternative to Virtualbox here.

KVM (or QEMU-KVM) is a native Linux virtualization technology, built-in to the kernel. This means you already have it installed just by running Linux!

Check first if you can use KVM, as it requires some hardware acceleration to be able to run. Be sure to enable VT-x "Virtualization support" in your BIOS to get it to work (which is a good idea to enable for either which hypervisor you're going to use!).

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

To get started quickly, I would suggest to install the GUI front-end first: Virtual Machine Manager

The Virtual Machine Manager pretty self-explanatory. My suggestions when using Windows as a guest:

Install the VirtIO Windows drivers for network and disks. See Installing VirtIO drivers in Windows Server 2008 on how to do that. This is similar to what "Guest tools" are in VirtualBox terms.
Don't use the built-in console. It's rather slow and sluggish unless you move to SPICE (which I wouldn't recommend for server installations). Use RDP instead (remote desktop) via the network.

As a big bonus, you can just use SSH to manage other hypervisors in your network or via the internet.


Java command not found even after "sudo apt-get install openjdk-6-jdk"

Did you try this command?

sudo update-alternatives --config java

This will list all the Java versions installed and configured.

If you see one or more installs, it will give you a list each element starting with a number. Just choose the number that corresponds to the version you want to use by default.

If you don't see any installed then something is not right. In that case take a look at this question.

While that question is for Oracle Java 7, it lists methods common to both Java 6 and Java 7, for installing Java and getting Ubuntu to see and link to the new Java installation. If you want version 6, just download the version 6 JDK and follow the instructions provided in that question, changing the filename accordingly.


How do I download and install Handbrake?

There are two official HandBrake PPAs, ppa:stebbins/handbrake-releases and ppa:stebbins/handbrake-git-snapshots.

The former contains stable releases, which are updated about once a year. These releases tend to be rather out-dated when their end-of-life is approaching. The current stable version (0.9.8) was released on 2012-07-18.

The latter contains nightly builds, which are updated daily (or nightly, as it were). These are of course less stable, and undocumented to boot, but they are good software nonetheless. Additionally, as the stable release ages, the developers tend to start recommending users to try the nightly builds instead.

To add one of these to your sources, simply run:

sudo add-apt-repository ppa:stebbins/handbrake-releases

or

sudo add-apt-repository ppa:stebbins/handbrake-git-snapshots

depending on which you want. To install HandBrake with the GUI, run:

sudo apt-get update
sudo apt-get install handbrake

Alternatively, if you would prefer the CLI (command-line interface) over the GUI, replace the last line with:

sudo apt-get install handbrake-cli


Try this:

wget -c "http://ipc.informatik.uni-freiburg.de/Planners?action=AttachFile&do=get&target=seq-opt-base.tar.bz2"

Note that change view&target to get&target and quote the link.


setting date format in menubar on top of desktop

With the dconf editor, set com.canonical.indicator.datetime.time-format to custom and com.canonical.indicator.datetime.custom-time-format to whatever format you want to use.


Alt+tab-ing games (like Trine or Aquaria)

I had the same problem and found that  Ctrl + G will release the mouse from the window, then you can minimize it or whatever from there.

Source: Frozenbyte forum topic

I am not sure if this is specific to the linux version of the Trine game, I will have to install Aquaria.  Love these Humble bundle games!

EDIT: Yes, works for Aquaria too.  Although, when you move the cursor over the window, it immediately recaptures it. whereas in Trine you have to Ctrl + G to get back into the window.


I found the method. I just created a document file for the application I needed with execution path given as location of script, icon, and mime type etc. Saved it as application.desktop and copied it to /usr/share/application. Now the os recognises that script as application and it is visible in application menu as well as open with menu etc.


How to remove third Linux OS from disk and grub menu?

Boot into Ubuntu, reinstall grub (maybe sudo update-grub is enough), remove the Linux Mint partition and run sudo update-grub.
Also, don't worry. Just make a Live USB before doing any change. You will always be able to set things straight again, in one of the bad cases by doing a so called chroot. I would actually encourage you to fail and try to fix it, you will learn a lot.


update manager in ubuntu 12.10 can't access repository, but software center can

If you are using a proxy, you will not be able to use the Update Manager without configuring your system appropriately.

The Ubuntu Update Manager uses the same proxy configuration as apt-get, the problem with this is that the system proxy setting does not alter the apt-get proxy setting. This must be done manually by editing sudo nano /etc/apt/apt.conf and add the relevant data. An example of a http proxy server is

  Acquire::http::proxy "http://username:password@proxy:port/";

Make sure that your password does NOT contain any non-ASCII chars as this might create some problems due to the files encoding.


Connection refused from Ubuntu VM to Snappy Ubuntu Core VM

I had the same issue and did the following to solve the problem

cd
sudo mv /etc/ssh/sshd_not_to_be_run .
sudo service ssh start


The thread: Problem with certificates helped me to solve the problem.
user mirabilos explain the commands to reinstall the ca-certificates

sudo apt-get install --reinstall ca-certificates
sudo apt-get -f install
sudo dpkg --purge --force-depends ca-certificates
sudo apt-get -f install


This commmand should fix your (untrusted-package) :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9


I fixed it. Hope this will also help others. Forget about the power outage, completely unrelated. I was downloading and building lots of files over night and the disk filled up to its limts. The steps I took to fix it:

On login screen:

Ctrl+Alt+F1 //(thanks Stefano)

commands I used:

to check the disk usage: df -h
to check directory size: du -h /home/lucas/some_gigantic_directory
remove a gigantic directory: rm -vR /home/lucas/some_gigantic_directory
and reboot: sudo reboot


Ubuntu 11.10 Classic Desktop opens all windows twice with same

You got a dupe panel.
Just means its being displayed twice. So... easiest way is to delete the panel and make a new one, use the alt combo (I think its alt... might be control)
So after you delete it, make a new one. Combo the desktop and click "Add panel"
then combo the panel and "Add to panel" and I believe its called "notification area"
If you got dual monitors, however, there might be another reason... but on 11.10, iunno.


How to speed up MySQLl loading from dump file of a very large database around 1T of tables?

faster : mysqlimport

mysqlimport [options] db_name textfile1 [textfile2 ...]

More info : https://dev.mysql.com/doc/refman/5.7/en/mysqlimport.html

You can also temporary tune the mysqld config

max_allowed_packet = 1024M
innodb_buffer_pool_size = 4G


"tcl.h: no such file or directory error" in compilation of cgnstools

There is an app from apt family called apt-file. With this app you can search by filenames and it will return the package (or packages) that provides the searched file.
You can install it with apt-get install apt-file, then execute apt-file update. After that, you can search your file with apt-file search tcl.h. For me (Debian 9 here), the results where (the list is long, I cut it here) :

...
tcl8.5-dev: /usr/include/tcl8.5/tcl-private/generic/tcl.h
tcl8.5-dev: /usr/include/tcl8.5/tcl.h
tcl8.6-dev: /usr/include/tcl8.6/tcl-private/generic/tcl.h
tcl8.6-dev: /usr/include/tcl8.6/tcl.h
tcllib: /usr/share/doc/tcllib/html/me_tcl.html
...

In my system, I would install one of the packages tcl8.5-dev or tcl8.6-dev. Also, may be necessary to indicate where the lib is located. Usually it is done through an option on the ./configure script. Try execute ./configure --help | less for finding all available options.


How to allow DNS lookup with iptables on Ubuntu 18.04 server

OK, I'll answer my own question.
The cure was to add an external interface in the iptables line, so it now looks like this:

ExtIF=eno1 ##Change this to the name of your external (Internet) interface
iptables -t nat -A POSTROUTING -o $ExtIF -j MASQUERADE

Maybe some iptables guru would be able to answer in the comments why the DNS lookup is failing only from localhost, only in Ubuntu 18.04.


I think Ubuntu pocket guide this book is much to beginners and less for the advanced users

http://www.ubuntupocketguide.com/download_main.html


If you recently installed a new kernel your old kernel should still be installed as well.  You should be able to interrupt the boot and select a previous kernel from the bootloader menu; for grub (the default bootloader on standard PC systems) hold SHIFT as the BIOS finishes and then select Previous Kernels and pick a known good kernel from there.


Ubuntu 20.04 newly installed; No ethernet connection

Create the file with sudo in terminal.
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf


How do I stop Geoip from connecting to the internet every time I boot?

I stumbled upon a way to disable this connection (this may only apply to 12.10).

Open your dconf editor: $ dconf-editor
Navigate to the com/ubuntu/geoip option
Set the value of geoip-url to nothing "".

Done. Happy days, no more geoip connections.

Disclaimer: I don't know if there any negative effects of disabling geoip provider connections in the way described above, because I still don't fully understand why this connection must call home.

See the SO question I have permanent connections to Canonical servers, what are they for? for more details.


Is there a power saving application similar to Jupiter?

Improve Power  Usage / Battery Life In Linux With TLP

Overview

TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, so you may just install and forget it. Nevertheless TLP is highly customizable to fulfil your specific requirements.

Features

Kernel laptop mode and dirty buffer timeouts
Processor frequency scaling including "turbo boost" / "turbo core"
Power aware process scheduler for multi-core/hyper-threading
Hard disk advanced power magement level and spin down timeout (per disk)
SATA aggressive link power management (ALPM)
PCI Express active state power management (PCIe ASPM) – Linux 2.6.35 and above
Runtime power management for PCI(e) bus devices – Linux 2.6.35 and above
Radeon KMS power management – Linux 2.6.35 and above, not fglrx
Radeon dynamic power management – Kernel 3.11 and above, not fglrx
Wifi power saving mode – depending on kernel/driver
Power off optical drive in drive bay (on battery)
Audio power saving mode – hda_intel, ac97

Also Check Additional functions

Installation

Also Check Prerequisites

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw smartmontools ethtool

ThinkPads

sudo apt-get install tp-smapi-dkms acpi-call-tools tlp tlp-rdw smartmontools ethtool

tlp-rdw – Radio Device Wizard - Need to enable/disable & Power saving (Wifi / Bluetooth )
smartmontools - needed by tlp-stat to display disk drive S.M.A.R.T. data
ethtool - needed to disable wake on lan
tp-smapi-dkms ThinkPad only, tp-smapi is needed for battery charge thresholds and ThinkPad specific status output of tlp-stat
acpi-call-tools ThinkPad only, acpi-call is needed for battery charge thresholds on Sandy Bridge and newer models

Additional

TLP Indicator for Unity
A Unity Indicator created to comfortably switch between AC and BAT Modes.
Use it at your own risk.
Download here: indicator-TLP.py

Configuration

Removing default Ubuntu cpu frequency config

sudo update-rc.d -f ondemand remove

TLP Developer

( This is not a general prerequisite for TLP but is only needed if the user decides to change the default governor. If a user issues the command without changing the TLP setting too, he ends up with "perfomance", which is quite bad for battery life.), Apply to section 3.) Processor and Frequency Scaling

The main config file of TLP is at /etc/default/tlp

sudo -i gedit /etc/default/tlp

Parameters

General hints

Parameters ending on _AC are effective with the power supply connected
Parameters ending on _BAT are effective when running on battery
Parameters containing blanks must be enclosed in double quotes like this: ""
Some parameters are inactive by default; remove the leading '#' to activate

0.) General

TLP_ENABLE=1

Set to 0 to disable TLP (Reboot needed), It should be enabled so leave the default value

1.) File System

   DISK_IDLE_SECS_ON_AC=0
   DISK_IDLE_SECS_ON_BAT=2

DISK_IDLE_SECS_ON_BAT=2 = You can either leave the default value (2) or you can edit it as 5, By default Ubuntu uses 5, its up to you, read the gives below help

cat /usr/lib/pm-utils/power.d/laptop-mode

This controls how agressive the system is at trying to avoid
writing to disk.  The longer the disk is idle, the more power you can save.

This is only active on battery power, and it restores these values
to kernel defaults when on AC power.

Defaults 5, which enables laptop mode and forces the system to wait
5 seconds whenever something asks to write to disk to flush out as much
data as we can.

2.) Dirty page values

MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60

Leave the default value

Defaults 60, which means that the kernel will not start forcing process
to write out file information that has been changed but not saved until 60%
of usable system memory is filled with dirty information.

3.) Processor and Frequency Scaling

CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=powersave

Remove the hash and edit it as conservative.

Its up to you what you want, you can also use ON_BAT=powersave

Select a cpu frequency scaling governor: ondemand/powersave/performance/conservative

Governor ??

The governor decides what frequency should be used.

Module Description:

ondemand        Dynamically switch between CPU(s) available if at 95% cpu load

performance     Run the cpu at max frequency

conservative    Dynamically switch between CPU(s) available if at 75% load

powersave       Run the cpu at the minimum frequency

TLP Developer

To use "conservative" over "powersave – especially on AC – should not be
a general recommendation but only an option for hardware that produces
excessive heat or fan noise.

4.) Min/Max frequency

#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0

Set the min/max frequency available for the scaling governor.
Possible values strongly depend on your cpu. For available frequencies see
tlp-stat output, Section "+++ Processor".

Hint: Parameters are disabled by default, remove the leading # to enable them,
otherwise kernel default values are used.

5.) Turbo Boost

CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0

Set the cpu "turbo boost" feature: 0=disable / 1=allow ,Requires an Intel Core i processor and kernel 3.7 or later.

Important:
This may conflict with your distribution's governor settings, A value of 1 does not activate boosting, it just allows it

6.) Cpu Cores/Hyper-Threads

SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1

Minimize number of used cpu cores/hyper-threads under light load conditions

7.) Kernel

NMI_WATCHDOG=0

Activate kernel NMI watchdog timer (0 = disabled/save power, 1=enabled). A value of 1 is relevant for kernel debugging only.

8.) Hard disk advanced power management level

DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"

Set the "Advanced Power Management Level". Possible values range between 1 and 255:

1 – max power saving / minimum performance

Important: this setting may lead to increased disk drive wear and tear because of excessive read-write head unloading (recognizable from the clicking noises)

128 – compromise between power saving and wear (TLP standard setting on battery)

192 – prevents excessive head unloading of some HDDs

254 – minimum power saving / max performance (TLP standard setting on ac)

255 – disable APM (not supported by some disk models)

Different values for multiple disks are separated with blanks.

9.) Disk I/O Scheduler

#DISK_IOSCHED="cfq cfq"

Select io scheduler for the disk devices: noop/deadline/cfq (Default: cfq)
Separate values for multiple devices with spaces.

noop is often the best choice for memory-backed block devices (e.g. ramdisks) and other non-rotational media (flash) where trying to reschedule I/O is a waste of resources

deadline is a lightweight scheduler which tries to put a hard limit on latency

cfq tries to maintain system-wide fairness of I/O bandwidth

10.) SATA aggressive link power management (ALPM):

min_power/medium_power/max_performance

SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power

ALPM
Aggressive Link Power Management (ALPM) is a mechanism where a SATA AHCI controller can put the SATA link that connects to the disk into a very low power mode during periods of zero I/O activity and into an active power state when work needs to be done. Tests show that this can save around 0.5-1.5 Watts of power on a typical system. ( For more check " Sources and additional help " )

11.) PCI Express Active State Power Management (PCIe ASPM):

( default/performance/powersave )

Hint: needs kernel boot option pcie_aspm=force on some machines

PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave

12.) Radeon graphics clock speed

(profile method): low/mid/high/auto/default

auto = mid on BAT, high on AC; default = use hardware defaults (Kernel >= 2.6.35 only, not with fglrx driver!)

#RADEON_POWER_PROFILE_ON_AC=high
#RADEON_POWER_PROFILE_ON_BAT=low

13.) WiFi power saving mode

1=disable/5=enable

(Linux 2.6.32 and later, some adapters only!)

WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5

14.) Disable wake on lan

Y = Yes , N = No

WOL_DISABLE=Y

15.) Audio power saving for Intel HDA

Enable audio power saving for Intel HDA, AC97 devices (timeout in secs). A value of 0 disables / >=1 enables power save.

SOUND_POWER_SAVE=1

  Disable controller too (HDA only): Y/N

SOUND_POWER_SAVE_CONTROLLER=Y

16.) Power off optical drive in UltraBay >> (ThinkPads only)

Set to 1 to power off optical drive in UltraBay (ThinkPads only), when running on battery. A value of 0 disables this Feature (Default). Drive can be powered on again by releasing (and reinserting) the eject lever or by pressing the disc eject button on newer models. Note: an UltraBay hard disk is never powered off.

BAY_POWEROFF_ON_BAT=1

  Optical drive device to power off (default sr0)

BAY_DEVICE="sr0"

17.) Runtime Power Management for pci(e) bus devices

RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto

  Runtime PM for all pci(e) bus devices

RUNTIME_PM_ALL=1

Runtime PM for all pci(e) bus devices: 0=disable / 1=enable, Warning: experimental option, could cause system instabilities

Some times my usb mouse dongle didn't work when i plug it in usb 3 port, work fine when i plug it in usb 2 port, and all my usb 3 devices are working properly no issue.

18.) Usb autosuspend

Set to 0 to disable/1 to enable usb autosuspend feature

USB_AUTOSUSPEND=1

19.) System Start and Shutdown

RESTORE_DEVICE_STATE_ON_STARTUP=0

Restores radio device state (builtin bluetooth, wifi, wwan) from previous shutdown on system startup:

0 – disable, 1 – enable

DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"

Disables builtin radio devices upon system start:

bluetooth
wifi – Wireless LAN
wwan – Wireless Wide Area Network (UMTS)

Multiple devices are separated with blanks.

I have an error that my Blue tooth device is not Disabled on start up, so if you face this problem just do the following config

sudo nano /etc/rc.local

And add the following line before exit 0

rfkill block bluetooth

Save & Exit & Reboot

Working with TLP

After installation TLP will be automatically activated upon system start.

To start it immediately without reboot or to apply changed settings use:

sudo tlp start

Use the tlp-stat terminal command to check if TLP is working properly

sudo tlp-stat

Check You system temperature

sudo tlp-stat -t

Show battery information only:

sudo tlp-stat -b
sudo tlp-stat --battery

Show configuration only:

tlp-stat -c
tlp-stat --config

Show radio devices switch state only:

tlp-stat -r
tlp-stat --rfkill

Show temperatures and fan speed only:

tlp-stat -t

Apply Battery Settings (ignoring the actual power source):

sudo tlp bat

Apply AC Settings (ignoring the actual power source):

sudo tlp ac

You can check Which I/O you are using.

sudo tlp-stat  # Check the section +++ Storage Devices

Trace Mode

To examine suspected problems in TLP more closely, activate trace mode in /etc/default/tlp:

TLP_DEBUG="lock nm path pm rf run sysfs udev usb"

Add above mentioned line in the end /etc/default/tlp , The accumulated trace data may be read at any time with

tlp-stat -T

Or

grep "tlp" /var/log/debug

In case the trace output is missing, you have to modify your rsyslogd configuration. Create the file /etc/rsyslog.d/90-debug.conf containing

*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug

And restart the daemon

sudo /etc/init.d/rsyslog restart

Sources and additional help

There is very good support at TLP Website

Useful Config Link 1

TLP Settings

ALPM

Optional tweaks

Tweak your CPU frequency with indicator-cpufreq

Installation

indicator-cpufreq will help you change your CPU frequency on the go:

sudo apt-get install indicator-cpufreq

Go to Dash > search for Startup > edit indicator-cpufreq add -f or copy paste the following command:

indicator-cpufreq -f

Screenshot

With the indicator you will be able to monitor your current CPU frequency & can change CPU frequency

Changing CPU frequency

Click on indicator

Additional Advice
VA-API (Hardware Acceleration For Intel / AMD GPUs)

Overview

The main motivation for VA-API (Video Acceleration API) is to enable hardware accelerated video decode/encode at various entry-points (VLD, IDCT, Motion Compensation etc.) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3). Extending XvMC was considered, but due to its original design for MPEG-2 MotionComp only, it made more sense to design an interface from scratch that can fully expose the video decode capabilities in today's GPUs.

Help full Links
webupd8

Official Intel Drivers are using VA-API

Support video codecs

Install Intel / AMD VA-API drivers in Ubuntu

for Intel GPUs (for Intel HD Graphics as well as G45 and later):

sudo apt-get install i965-va-driver libva-intel-vaapi-driver vainfo

for AMD Radeon GPUs (you also need the proprietary drivers!):

sudo apt-get install xvba-va-driver vainfo

  Install MPlayer with VA-API support in Ubuntu

By default, the MPlayer version available in the official Ubuntu repositories doesn't support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.

sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi

Now you need to install smplayer or vlc

sudo add-apt-repository ppa:rvm/smplayer
sudo apt-get update
sudo apt-get install smplayer

OR

sudo apt-get install vlc

Configuration

SMPLAYER

Its in Option tab > Preferences, on the Video tab > General Video > Output driver set the video output driver to "vaapi":

VLC

Its in Tools > Preferences > Input & Codecs > Enable Use GPU Accelerated decoding

Helpful Links

How to correctly enable/test VA-API on Intel Sandy Bridge?
Command line flag for mplayer to use hardware acceleration?

PowerSavingTweaks for Intel Graphics

sudo nano /etc/default/grub

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT=""quiet splash intel_pstate=disable i915.lvds_downclock=1 drm.vblankoffdelay=1 i915.semaphores=1 i915_enable_rc6=1 i915_enable_fbc=1"

and run:

sudo update-grub

Helpful Links

3x+ battery life


Ubuntu 20.04 very slow response or freeze at login after setting Prime Synchronization for Nvidia optimus laptop

Answering my own question here. It appears that the problem is caused by an old bug in gdm3 when Prime Synchronization is enabled. I found two potential solutions (or workarounds) from the discussions of the bug:

Use lightdm instead of gdm3. To do this, run the command sudo apt install lightdm, then choose lightdm as the default display manager when the terminal prompts you to do so. However, using lightdm will disable screen locking, and has a annoying bug that the mouse will change color at the desktop. Therefore, I use the second solution.
Continue to use gdm3 as the display manager, but add needs_root_rights=yes to /etc/X11/Xwrapper.config, then reboot the machine.

I experienced no further problems when using the second solution. However, I am not sure about the potential security consequences of giving root access to Xwrapper. Many some experts on X11 or X server can comment on this.