How to disable USB automount in Xubuntu 14.04

For udisks2:

If udisks2 is in use, following actions are needed to not automount a device. Fisrt, you need to get informations about the device to write a udev rule. Unmount the device, become root via

sudo su

then run this command:

udevadm monitor --environment --udev

After that, plug the device to the computer. Now, you can see relative informations about the device. What you need is ENV{ID_VENDOR} and ENV{ID_FS_UUID}. Especially ID_FS_UUID is important because it is a unique value for the device. Press ctrl+c to exit udevadm.

Then, run the following command to get other informations you need

udevadm info -a -p $(udevadm info -q path -n /dev/sdX)

Replace /dev/sdX with your drive. Look for ATTRS{idVendor} and
ATTRS{idProduct} values. You need SUBSYSTEM AND DRIVER values to specify which device block this rule will be applied and ENV{UDISKS_AUTO}="0" to make the device not auto-mountable. If you get all informations you need, it is time to write udev rule. Open a new rule file:

sudo -H gedit /etc/udev/rules.d/10-noautomount.rules

And write information you got to it:

SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{idVendor}=="3538"
ATTRS{idProduct}=="0070"
ENV{ID_VENDOR}=="PQI"
ENV{ID_FS_UUID}=="1A5AFC1F427754BF"
ENV{UDISKS_AUTO}="0"

Save the file and close it. A rule in /etc/dev/rules.d/ directory has the highest priority. By writing the rule in that directory, we will prevent any problem that may hinder the rule.

Now, you can test your rule to see whether it is working or not. First, you need to learn "devpath" of the device. You will see lines in the output of

udevadm info -a -p $(udevadm info -q path -n /dev/sdX)

command similar to this line:

looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5...'

Some of them is very long and is not usefull for you. You need to cut that line to a degree which is usefull for you. To learn where to cut, run this command:

dmesg | grep usb

You will see lines relative to the device similar to these lines:

usb 2-1.5: new high-speed USB device number 15 using ehci-pci
usb 2-1.5: New USB device found, idVendor=3538, idProduct=0070
usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.5: Product: PQI USB Flash drive
usb 2-1.5: Manufacturer: PQI
usb 2-1.5: SerialNumber: XQVBW9KR
usb-storage 2-1.5:1.0: USB Mass Storage device detected

Pay attantion to value after usb one (2-1.5). It shows that your device's path and where to cut. So "devpath" of this device is

/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5

Now you can test the new udev rule by running this command:

udevadm test /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5

Near the end of the output of above command, if you see the line

UDISKS_AUTO=0

it means that your new rule is working. To apply the new rule, you need to reload udev rules by

udevadm control --reload

If it does not work, run

udevadm trigger

After that, you can see wherher the new rule is working or not by un-plugging the device and re-plugging it. Your device will be shown in Unity launcher like this:

In my case, "nd" is the device to which no-automount udev rule is applied. If I press the icon of the device, it will be mounted.

For udisks

If udisks is in use, you can use ENV{UDISKS_PRESENTATION_NOPOLICY}="0" value to make the device not-automountable. Since my system ( Ubuntu 15.04) isn't using udisks, I can not give specific instructions but the process is similar. Write a new udev rule in /etc/udev/rules.d/ directory for your device with values you get above and add ENV{UDISKS_PRESENTATION_NOPOLICY}="0" value instead of ENV{UDISKS_AUTO}="0" value.

I hope this answer help you.


Best way to install Ubuntu 18.04 on Dell Precision 5530

1) Swap: See https://help.ubuntu.com/community/SwapFaq

2) Intel drivers, GPU & WiFi: The drivers are in the kernel.

3) Here are specific instructions for the P2000 proprietary drivers, which I suggest adding after standard installation completes: https://tutorialforlinux.com/2019/04/11/how-to-install-nvidia-quadro-p2000-ubuntu-18-04-driver/

4) Standard installation?  https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0


HUD causes Firefox to lag when its window loses focus

The problem is caused by this bug:
https://bugs.launchpad.net/unity/+bug/968533

Some workarounds from the thread somewhat in order of drasticness:

type about:config into the firefox address bar, set setting
ui.use_unity_menubar = false
Disable firefox unity plugins
Install compiz config settings manager and disable the alt HUD entirely
as described in How do you disable Alt as the HUD key in 13.04


Why am I getting Input/Output errors with ADATA USB drives?

Since you're having the same problems with different computers and operating systems, I suspect the drives are dead. If they're within warranty, try contacting the manufacturer for replacement.

You're having an issue using a couple USB drives. It could be a problem with the drives themselves or with your computer. You've ruled out a problem with your computer by rebooting and trying the drives with other computers.

Most likely something electrical is broken that prevents them from writing new data, which is why you can't reformat. It sounds like you pulled the drives when they got stuck "writing to disk" so the problem probably occurred before, not as a result of, your pulling them out.

Since you have two ADATA drives with this problem, you could be dealing with fakes, a bad batch, QA problems, or bad luck. If ADATA replaces them and you have no further problems, it was probably a bad batch. If you have problems with the replacements, QA problems and bad luck come into play.

Unfortunately, storage devices fail. There's not much anyone can do about it aside from backing up and purchasing from historically reliable manufacturers who honor warranties quickly and without hesitation.


Accidentaly removed ubuntu from GRUB. How do I get it back?

Whilst the question is not identical, the answer is the same as this AU Question

In summary - boot from a LiveCD and recreate your Grub as per both these linked answers.


I'm not sure where you're "double clicking" on it but if it's in Nautilus there is a setting in preferences about how to handle executable files.  It's on the "Behavior" tab of the preferences dialog.

Speaking of executable, you did chmod to make your script executable right?


Launching programs after hostname change returns error _IceTransSocketUNIXConnect: could not connect to local-host

It appears this error stems from the ~/.ICEauthority file. You can use the command iceauth list list your entries. In my case the old hostname included localhost, replace this with your old hostname.

e.g. iceauth list | grep localhost:

  XSMP "" unix/localhost@localdomain:/tmp/.ICE-unix/2640 MIT-MAGIC-COOKIE-1 7035f3aebe650bd72315b76819267a9d
  XSMP "" local/localhost@localdomain:@/tmp/.ICE-unix/2640 MIT-MAGIC-COOKIE-1 abe16eba34a1cf69087aff88bdd14a1a
  ICE "" local/localhost@localdomain:@/tmp/.ICE-unix/2640 MIT-MAGIC-COOKIE-1 1e69a0d48b1f1375167c79bffbbfa06e
  ICE "" unix/localhost@localdomain:/tmp/.ICE-unix/2640 MIT-MAGIC-COOKIE-1 f91ab2525bf0000159161db41df1aa0c

2 options:

Simple - Delete the ~/.ICEauthority file and restart machine or display manager. ~/.ICEauthority will be regenerated with your new hostname.
Advanced - Use iceauth remove to remove the bad entries and then restart your display manager (14.04 default = lightdm). Just copy paste the line from your grep above into the examples below, it removes both XSMP and ICE protocol entries.

iceauth -v remove netid=unix/localhost@localdomain:/tmp/.ICE-unix/2640
iceauth -v remove netid=local/localhost@localdomain:@/tmp/.ICE-unix/2640
iceauth list | grep localhost # Confirm they are removed.
sudo restart lightdm # @see this answer for more details or if this doesn't work for you

Further reading from man iceauth:

  list

  List (print) entries in the authority file. You may specify optional
  modifiers as below to specify which entries are listed.

  list [ protocol_name ] [ protocol_data ] [ netid ] [ authname ]

  remove

  Remove entries from the authority file.

  remove [ protocol_name ] [ protocol_data ] [ netid ] [ authname ]

sources:
https://superuser.com/questions/714015/accidentally-deleted-iceauthority-and-xauthority-files
https://codeyarns.com/2015/03/23/cannot-connect-to-non-local-host-error/
https://linux.die.net/man/1/iceauth
How to restart X Window Server from command line?


I have almost the same setup, X220 with Samsung 840 EVO and the same type of random freeze.

It seems that the actual problem is somewhere within the graphical subsystem and affects Compiz users on Intel graphics cards. See this bug report: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1511819

As a workaround you may try to switch to Gnome running on Metacity, as described in this answer: https://askubuntu.com/a/452175/168315.


Usually a second install puts its boot loader into the MBR.

If still booting Ubuntu run this and see if it adds Mint to grub menu.

sudo update-grub

If not run Boot-Repair and post link to BootInfo report.

Post the link to the BootInfo report that this creates. Is part of Boot-Repair:

https://help.ubuntu.com/community/Boot-Info

Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:

https://help.ubuntu.com/community/Boot-Repair


This issue is to do with UEFI. In Windows 8 on the start screen, type in "msconfig" (without the quotes) and in the boot tab, see if Ubuntu is listed. If it is, select the entry by highlighting it and click on "Set as default". This should hopefully load the Ubuntu bootloader instead of Windows' boot menu allowing you you boot into Ubuntu.

Also, from the start screen type in "uefi" and in the settings option on the seach charm, click on "Advanced start up options", click on it. Scroll down to the bottom of the entry and under "Advanced start up", click Restart now. You should now have an option to change the boot order.

Hope this works!

Ben


How to revert chown command Ubuntu Server

chown changes the owner a file or directory, not its permissions.
You ran it on your home directory (~), set user id 777 as the owner of that directory. Probably a user with that id does not exist on your system. Subdirectories and files within the directory haven't been touched, because you did not ran the command recursively.
So you can simply change the owner back to your normal user:
sudo chown $USER ~

(logged in as the same user as before).
or use the users ID (1001 in your case):
sudo chown 1001 ~

chmod 775 on the home folder is not a real issue. It simply means, that the group has additional write permissions in your home folder. 755 would be the default, change back using:
sudo chmod 755 ~


How to get list of all non-removable disk device names (SSD/HDD and SATA/IDE only)?

Recommended solution:

Copy the following python script to a file called internal_block_device_resource:

#!/usr/bin/env python3

import os
import re
from glob import glob

rootdir_pattern = re.compile('^.*?/devices')
internal_devices = []

def device_state(name):
    """
    Follow pmount policy to determine whether a device is removable or internal.
    """
    with open('/sys/block/%s/device/block/%s/removable' % (name, name)) as f:
        if f.read(1) == '1':
            return

    path = rootdir_pattern.sub('', os.readlink('/sys/block/%s' % name))
    hotplug_buses = ("usb", "ieee1394", "mmc", "pcmcia", "firewire")
    for bus in hotplug_buses:
        if os.path.exists('/sys/bus/%s' % bus):
            for device_bus in os.listdir('/sys/bus/%s/devices' % bus):
                device_link = rootdir_pattern.sub('', os.readlink(
                    '/sys/bus/%s/devices/%s' % (bus, device_bus)))
                if re.search(device_link, path):
                    return

    internal_devices.append(name)

for path in glob('/sys/block/*/device'):
    name = re.sub('.*/(.*?)/device', '\g<1>', path)
    device_state(name)
print(' '.join(internal_devices))

Ensure the script has executable permission:

chmod +x internal_block_device_resource

Set your DRIVES bash variable this way:

DRIVES=$(./internal_block_device_resource)

$ echo $DRIVES
sda

Initial version:

You need to filter removable devices so you can use this command:

find /sys/block/*/device/block/*/removable -exec bash -c 'echo {} | perl -ne "\$a=\$_;s/^\/sys\/block\/(.*?)\/.*/\$1/;print if (\`cat \$a\` == "0")"' \;

With a USB stick mounted as /dev/sdb, the output is just sda.


How to turn off power management for external hard drive (Seagate GoFlex)?

You can dissable the powermanagement of your device with the following command (no powermanagement = no spindown - no standby for the harddrive)

hdparm -B 255 /dev/sdX

replace sdX with the name of your harddrive

This will only last till you restart your pc.

If you want it to be permanent:
write the command in this file

/etc/rc.local


why can't I connect ubuntu 19.04 installed on windows 10 Hyper-v to the internet?

I know this is old but deserves an answer.

Go to network adapters and settings
Right click the adapter that is giving you internet
Click properties
Click the tab Sharing
Check the box allow other network users to connect through this computers internet connection

Doing this will also give your machine a 192.168 address instead of a 172.17

I am assuming, by default, it will not let you connect to the outside world, unless you choose external. I usually create an internal adapter, apply these settings, give it the IP address range I want through powershell. Then give the vm a static IP address.

Hopefully this helps someone.


How to enable DHCP server to all subnets for PXE server?

I can't guarantee it will work, but you could specify the options per subnet and not by group (though you'll lose assignment of the hostname - that's to be expected if you don't have a unique way (i.e. MAC) of identifying each system).

allow booting;
allow bootp;
subnet 172.29.32.0 netmask 255.255.255.0 {
    next-server 172.29.32.9;
    filename "/pxelinux.0";

    range 172.29.32.20 172.29.32.200;
    option broadcast-address 172.29.32.255;
    option routers 172.29.32.1;
}
#Repeat this block for each subnet
subnet 172.29.34.0 netmask 255.255.255.0 {
    next-server 172.29.32.9; #Note this is on another subnet.
    filename "/pxelinux.0";

    range 172.29.34.20 172.29.34.200;
    option broadcast-address 172.29.34.255;
    option routers 172.29.34.1;
}


sudo apt-get update shows unwanted sublime-text line every time

Removing sublime from apt-get update
The first one is showing sublime ppas on apt-get update, if you wish to get rid of it—you have to remove the ppa.
sudo rm /etc/apt/sources.list.d/sublime-text.list

Assuming you followed the steps from sublime official download manual, then above command should suffice for only removing the ppa.
kernel have been kept back
Since kernel are core system packages and can seriously damage your system if the upgrade fails, this cannot be done with just upgrade, one should issue dist-upgrade to upgrade these kind of packages.
sudo apt-get dist-upgrade

This would effectively upgrade the kernel packages.


How to completely remove an OS from VirtualBox?

It makes no sense to keep a particular Virtual Machine and change the OS inside - so remove the VM and create a new one:

Virtual Box Manager

In the graphical frontend for Virtual Box we can easily remove a virtual machine by selecting the machine to remove and go to the menu entry "Machine --> Remove" or choose "Remove" from the right-click context menu.

We will then be asked whether we wish to only remove the machine (i.e. unregister it) or if we want to also "Delete all files". The latter will completely remove the virtual machine with all files from our drive.

Command line

This can also be done from command line with the following command:

VBoxManage unregistervm --delete "<Name of Machine>"

By doing so the following files will be deleted:

  all hard disk image files, including differencing files, which are used by the machine and not shared with other machines;
  saved state files that the machine created, if any (one if the machine was in "saved" state and one for each online snapshot);
  the machine XML file and its backups;
  the machine log files, if any;
  the machine directory, if it is empty after having deleted all the above.

Source: Virtual Box Manual


user & group of a file changed after rebooting and login as another user

/media/VBOXADDITIONS_4.1.18_78361 is automatically mounted by your system upon login from a user using udev rules.

What you are seeing is just the system applying those rules. These rules are set by default so that any user can have full permissions to the mounted volumes.


If Ubuntu was reinstalled to the first partition following Windows 10 installation than your VBR (volume boot record) \ PBR (Partition Boot Record) and BPB (Boot Parameter Block) are changed.  Pointers or references to the previously known 2d logical partition need to be reestablished.  I suggest using Test Disk to search for partition.  It will find it but it might find other previous partitioning artifacts.  There will be a set of choices of which partitions are Boot (*) Primary (P) Logical (L) and Deleted (D).  Choose the ones that correlate with your previous set and then write partition info to disk and reboot.  Test Disk from CGSecurity it is open source and works fantastic.  Other proprietary partition software tend to give many false positives and not as logical in workflow.


From how to debug systemd problems, the following boot option might be of interest:

  systemd.confirm_spawn=
  Takes a boolean argument. If true asks for confirmation when spawning
  processes. ( Defaults to false )


How do you install Ubuntu in a notebook?

If you have a CD-ROM drive on your notebook:

1.1. Burn a CD-ROM with the ISO configuration. If you don't know how to do it, click  here

1.2. Boot your laptop with the CD generated on pass 1. If your laptop don't recognize  your CD, you should change the BIOS setup. If you don't know how to do it, click here

1.3. Before install, click on 'Try before Install' to check if all your hardware is recognized by Ubuntu

1.4. Be Happy!
If you don't have a CD-ROM on your notebook:

2.1. Copy the ISO to another computer that has a CD-ROM and follow process 1.

Good Luck!


It looks like you return 403:

function wp_login_failed_403_res() {
  status_header(403);
}
add_action( 'wp_login_failed', 'wp_login_failed_403_res' );

And check for 401:

[Definition]
failregex = <HOST>.*POST.*(wp-login\.php|xmlrpc\.php).* 401
ignoreregex =

In addition you should probably check your log files for the exact log message that is written, and verify that your regex does match that line.


Login loop after 17.10 upgrade with three displays

This worked for me

Try install gdm3

crtl + alt +f2(login)

sudo apt install gdm3

sudo dpkg-reconfigure gdm3

sudo service lightdm stop

sudo service gdm3 start

Ubuntu 17.04 with GNOME stuck in login loop


Running these commands in a terminal should fix it.

rm -rf ~/.bundle/ ~/.gem/
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
rm -rf .bundle/
rm -rf vendor/cache/
rm -rf Gemfile.lock
bundle install


So if I understand you correctly, the Live CD works on your system but an install does not? That's odd.

One explanation is that this could be an issue with for example the graphics card (see for example http://www.kubuntuforums.net/showthread.php?58471-Nvidia-Drivers, a similar problem with the same card is reported there). Check what your Live CD is running by starting the programme "Additional Drivers". Have you installed the proprietary drivers? If you are running a Live USB you might even try to install the other drivers, see if that reproduces the error. Just be sure that you have another Live USB in case you break the system :)

Another option would be to reinstall Ubuntu, see if that fixes your problem. I understand this is really annoying and is definitely not guaranteed to even help.

As for your GRUB issue (holding shift does not work), take a look at e.g. Grub Menu doesn't appear when pressing SHIFT. Unfortunately you'll need a working install for this, or you'll need to get into Ubuntu some other way (perhaps you can get into a terminal through your Live CD?).

Sorry that I can't give any "this will fix your problem" answers. Hopefully this post can help you think about possible solutions, though. Good luck!


How do I check the character set used by ubuntu and probably change it

Locales customize programs to your language and country. When you
  installed Ubuntu, you answered some simple questions such as
  specifying your country and language. Ubuntu used the answers to those
  questions, in part, to choose a suitable locale for your installation.

  The basic functionality is provided by the locale package, which is
  installed by default. Actual locales are installed separately via the
  language-pack-* packages.

  Most users want a single locale to be used for all aspects of their
  session. In this case, the GUI provided by System Settings -> Language
  Support does the right thing.

  Below are some of the things that you can do:

  List installed locales
  List current settings
  Changing settings temporarily
  Changing settings permanently
  (Re-)Generating locales1

Read On

1Source:Ubuntu Documentations


Extremely slow desktop and laggy. Need help with graphics driver

I am running Xubuntu 13.04 on my HP Slate 2. I still have problems with the GMA600, for example it runs smooth but the HDMI output does not work. Consider Xubuntu 13.04, it is basically Ubuntu but on a Xfce platform that is leaner and faster!


Visual Studio Code doesn't start anymore

snap-confine refuses to launch application to avoid permission attack only accomplished that I can't see Visual Studio Code in the Software Center at all. However I finally managed to install Visual Studio Code by following the instructions here. It seems like everything is working again now.


Converting a physical Linux Machine to use in VMWare

Yes, it is possible and not really difficult. You can take the advantage of the UNIX filesystem having a single root, so you don’t need to replicate the structure of mounts, RAID etc. in your copy – the system will behave the same way having all files in a single mount.
I have successfully done the procedure before, my method is based on a guide from https://wiki.archlinux.org/index.php/full_system_backup_with_rsync.
Preconditions

enough free space in your home directory on the server to store the whole server contents (compressed)
enough free space for both uncompressed + compressed server contents on your local hard drive
root access on the server
both machines must use a compatible architecture (otherwise you could not run the transferred binaries)

Instructions

Backup the complete server contents. You can use rsync from the linked guide and then compress or do it in a single step. You need sudo to access all the files.
 sudo tar --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","~/server-backup.tar.xz"} -cJvf ~/server-backup.tar.xz /

Download the created file using SCP or another suitable method.

Create a VM with a new virtual hard drive with a sufficient capacity. Boot a live distro.

Format and mount the blank hard drive.

Decompress the contents of the compressed backup file to the mounted drive. (You need to make the file available to the VM, e.g. using shared folder or another drive attached to the VM.)

Restore GRUB using the chroot method.

Edit configuration files if necessary (especially /etc/fstab, /etc/network/interfaces).

Shut down the VM, dettach the live distro media and boot your server clone.


Strange visual corruption adding another monitor

Issue was resolved by aggressively uninstalling all nvidia related everything (sudo apt-get remove nvidia* && sudo apt-get purge nvidia*) followed by installation of nvidia-340 (I was on 304 for some reason).
Followed by nvidia-xconfig --base-mosaic --sli="mosaic", then restarting lightdm, my screens work now!


Problems with nVidia Optimus secondary GPU in Ubuntu 13.10

If you don't have Bumblebee installed, enable the Universe and Multiverse repositories in /etc/apt/sources.list or in terminal Ctrl + Alt + T and type sudo gedit /etc/apt/sources.list and if it's enabled already go next:

sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

reboot

P.S. ppa for bumblebee instructed here from official Bumblebee Source and if you wish to use any unofficial or experimental ppas with the latest features bug fixes for example ppa:xorg-edgers/ppa or ppa:ubuntu-x-swat/x-updates look at the Launchpad for more details on those ppas.

"Cannot access secondary GPU" error:

In LTS 12.04.3, 13.04 and later, if your card seems to be inaccessible, i.e. [ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected. you need to edit the /etc/bumblebee/xorg.conf.nvidia (or /etc/bumblebee/xorg.conf.nouveau if using the noveau driver) and specify the correct BusID by following the instructions below. How to find out GPU run in terminal nvidia-xconfig --query-gpu-info check every detail. Then add it to xorg.conf:

sudo nvidia-xconfig --connected-monitor="CRT" --busid=nvidia-xconfig --query-gpu-info | grep BusID | sed 's/PCI BusID : PCI:/PCI:/'

You should rather manually add it as instructed above if the command won't work.

After you need to restart X (reboot works)

sudo xxxdm restart

xxx - your display manager

if it won't start run sudo dpkg-reconfigure xserver-xorg and then sudo xxxdm start

Instructions Source


Installing Windows after Ubuntu without live USB or CD

Yes, but you must carefully select the partitions you use for the Windows install to ensure you do not overwrite any partition required by the other OS.  Then, once you have installed Windows you must boot Ubuntu from a USB drive/stick.  There, you need to install Boot Repair on the USB drive Ubuntu is on and have it repair the Ubuntu Grub bootloader which will detect the Windows partition and included it in the boot options presented at normal boot up.  https://help.ubuntu.com/community/Boot-Repair - You are best to use the "Advanced Options" selection so you can select which things you want to ensure happen, such as having one of the two OS's boot as the primary OS (so that if you install a Windows or Ubuntu update when it reboots you it will load that OS when it restarts in case you are away from the computer).


When I doubt, for a desktop, use the generic kernel. For a server use the server kernel.

If you are going to run a kernel that is optimized for your hardware, I suggest you compile your own. It is intimidating to do so, but, with modern options, it is  not that difficult.

After you install ...

Get the source

mkdir ~/src
cd src
apt-get source linux-image-$(uname -r)

Install the necessary packages to compile

sudo apt-get build-dep linux-image-$(uname -r)

Now you have all the parts you need to compile. The ubuntu kernel source code has already been patched.

In the "old days" you would have to know your hardware and select what to optimize and what to compile. These days you simply run the following command in the kernel source directory

cp /boot/config-your_kernel_version .
make localmodconfig

localmodconfig will examine the modules you are using and compile those (so no need to know your hardware).

Generally the defaults from localmodconfig are fine. You can run

make menuconfig

and go to the CPU section and see what, if anything, applies to your CPU. If you do not understand the options, go with the default.

Then run

make
make install
sudo make INSTALL_MOD_STRIP=1 modules_install

And update grub, boot to your new kernel.

See:

http://bodhizazen.com/Tutorials/kernel#easy

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

Note: my instructions deviate from the ubuntu wiki, the ubuntu wiki will build the generic kernel unless you change the scripts in the debian directory and the .config files. I modified the config with localmodconfig ;)

See also : https://help.ubuntu.com/community/Kernel/Compile#Reasons_for_compiling_a_custom_kernel

Note: It is highly unlikely you will see a performance boost over the generic kernel. You might be able to benchmark it, but it is not going to make unity, your desktop, firefox, or other applications run faster.


Unable to dual boot Ubuntu and Windows 10 on separate SSDs

The install goes fine, but when I get to the boot menu, and select either Ubuntu or the first partition of the 2nd hard drive, booting fails.
If I take out the Windows hard drive from my laptop, I boot directly into Ubuntu, no problem.

I don't know what "the boot menu" is supposed to signify in this case, but since you can boot Ubuntu without issue when the Windows disk is removed, I'd say this indicates that your Windows disk "takes over" the responsibility of booting, which is your first issue. So I would, in general terms, to the following:

Go into the BIOS and make sure that your Ubuntu disk is designated as the primary boot disk. If it is, you should notice this by the fact that Ubuntu always boots, there's no way to boot Windows because that disk is ignored.
When your Ubuntu disk is designated as the primary boot disk, make sure your Windows disk is actively plugged in and run update-grub in Ubuntu. To learn more about update-grub see this page.

Hopefully the end-result should be that update-grub detects your Windows disk, adds it to the GRUB boot menu, and the next time you boot you'll have a GRUB screen that lets you choose between Ubuntu, or the Windows disk.
If you want to set one of them as the default etc. there are many configuration options for GRUB that you can look into.


Problem Creating Bootable USB Drive - v12.04 - Win XP SP3 - Asus Eeepc 901

As the error says: "Setup Extract: error writing to file C:\DOCUME~1\CHADM~1.BAL\LOCALS~1\Temp\nse18.tmplpaypal.bmp"

You still need to have some space in the hard drive to complete the installation because Universal USB Installer is trying to write in C:\

You can simply create the bootable USB in your Dell laptop.


libreoffice application does not use unity launcher

This is a known bug:
https://bugs.launchpad.net/unity/+bug/842566

It's pretty annoying, and in 11.10 you also can't switch to LibreOffice via alt-tab - it just doesn't show up. Installing "lo-menubar" doesn't necessarily help, and indeed it can make things worse, since when maximized LibreOffice applications won't show their own menu bar nor the global menu bar, making it impossible to even close the window without resorting to keyboard shortcuts.

You can restart Unity for a very temporary fix, but sooner rather than later it'll happen again, sometimes right away.


You can use scrot and put it in /etc/crontab
add this to /etc/crontab

*/2 * * * * <username> scrot

For that you need scrot, which you can install like this:

sudo apt-get install scrot

You can also give scrot the following argument to move images to your Pictures directory

scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/Pictures/'


Cannot run a program by clicking on its icon whereas it works in command line

I had to replace the following script:

#!/usr/bin/bash
#code snippet written by Dave Dopson: http://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
    APP_LAUNCHER_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
    SOURCE="$(readlink "$SOURCE")"
    [[ $SOURCE != /* ]] && SOURCE="$APP_LAUNCHER_DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
APP_LAUNCHER_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
$APP_LAUNCHER_DIR/jre/bin/java -server -Xmx256m -XX:MaxDirectMemorySize=128M -Djava.ext.dirs= -jar $APP_LAUNCHER_DIR/tuer.jar

by

/usr/share/tuer/jre/bin/java -server -Xmx256m -XX:MaxDirectMemorySize=128M -Djava.ext.dirs= -jar /usr/share/tuer/tuer.jar

because unlike the terminal, Unity ignores the first line and tries to interpret my bash script as a dash script. It showed once " 5: Bad substitution", another time "** (gtk-launch:27745): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.", another time "no such file or directory" and it claimed that the execution of the child process "tuer" had been interrupted without any detailed explanations.

I'll upload some fixed Debian packages in about ten hours.

Conclusion: Use a common Posix subset of Bash and Dash if you want to avoid any trouble under Ubuntu even though the script works in command line.


You may need to look at your BIOS settings to set the primary video device.

http://www.wikihow.com/Disable-Onboard/Integrated-Video-On-Your-Computer


How can I disable suspend during download, but the screen will still shut down?

On the edge of a dupe of this question. The difference with that question is however that you want the computer not suspended, but the screen still shut off during downloading large files nevertheless. Although seemingly a small difference, it does make a substantial difference in the answer (script).

About the solution

The solution is a background script to run as a Startup Application, that will disable suspend for as long as the download takes.
At the same time, a second thread inside the script, keeps track of the idle time with the help of xprintidle. xprintidle is triggered by keyboard- and mouse events. After an arbitrary time, to set in the head of the script, the thread shuts down the screen(s), while the other (main) thread prevents suspend for as long as the download is active.

The download is noticed by a change in the size of the Downloads folder, as measured by periodically checks, using du -ks ~/Downloads; if the size of the folder does not change any more during five minutes, the script assumes the download to be finished. It then and re- enables suspend.

Note

As always (- should be) with background scripts, the additional processor load is nihil.

The script

#!/usr/bin/env python3
import subprocess
import time
from threading import Thread

def get_size():
    return int(subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8").split()[0])

def get(cmd):
    return subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")

#--- set suspend time below (seconds)
suspend_wait = 300 # = 5 minutes
#--- set time after which screen should blackout (seconds)
blackout = 300 # = 5 minutes

#--- you can change values below, but I'd leave them as they are
speed_limit = 0      # set a minimum speed (kb/sec) to be considered a download activity
looptime = 20        # time interval between checks
download_wait = 300  # time (seconds) to wait after the last download activity before suspend is re- activated
#---

t = 0
key = ["gsettings", "get", "org.gnome.settings-daemon.plugins.power", "sleep-inactive-ac-timeout", "set"]
set_suspend = key[0]+" "+key[-1]+" "+(" ").join(key[2:4])
get_suspend = (" ").join(key[0:4])
check_1 = int(get("du -ks ~/Downloads").split()[0])

def get_idle(blackout):
    shutdown = False
    while True:
        curr_idle = int(subprocess.check_output(["xprintidle"]).decode("utf-8").strip())/1000
        time.sleep(10)
        if curr_idle > blackout:
            if shutdown == False:
                subprocess.Popen(["xset", "-display", ":0.0", "dpms", "force", "off"])
                shutdown = True
                print("shutting down")
            else:
                pass
        else:
            shutdown = False

Thread(target=get_idle, args=(blackout,)).start()

while True:
    time.sleep(looptime)
    try:
        check_2 = int(get("du -ks ~/Downloads").split()[0])
    except subprocess.CalledProcessError:
        pass
    speed = int((check_2 - check_1)/looptime)
    # check current suspend setting
    suspend = get(get_suspend).strip()
    if speed > speed_limit:
        # check/set disable suspend if necessary
        if suspend != "0":
            subprocess.Popen(["/bin/bash", "-c", set_suspend+" 0"])
        t = 0
    else:
        if all([t > download_wait/looptime, suspend != str(download_wait)]):
            # check/enable suspend if necessary
            subprocess.Popen(["/bin/bash", "-c", set_suspend+" "+str(suspend_wait)])
    check_1 = check_2
    t = t+1

How to use

The script uses xprintidle:

sudo apt-get install xprintidle

Copy the script below into an empty file, save it as no_suspend.py
In the head section of the script, set the desired "normal" suspend time (since the script will re- enable suspend), and the time before you'd like the screen to shut down:

#--- set suspend time below (seconds)
suspend_wait = 300 # = 5 minutes
#--- set time after which screen should blackout (seconds)
blackout = 300 # = 5 minutes

If you want, you can set other values:

#--- you can change values below, but I'd leave them as they are
speed_limit = 0      # set a minimum speed (kb/sec) to be considered a download activity
looptime = 20        # time interval between checks (in seconds)
download_wait = 300  # time (seconds) to wait after the last download activity before suspend is re- activated
#---

Test- run the script with the command:

python3 /path/to/no_suspend.py

If all works fine, add it to your Startup Applications: Dash > Startup Applications > add the command:

python3 /path/to/no_suspend.py


Automatically get logged out as I try to login

Are you the owner of you .Xauthority file in you home dir?

Try:

sudo chown username /home/username/.Xauthority

Replace username with your username, e.g. if your user name is alex:

sudo chown alex /home/alex/.Xauthority

And also make sire the permissions are set correctly:

sudo chmod 600 /home/username/.Xauthority


How to import Chromium Browser-Data to Chrome

Do a copy of your ~/.config/chromium directory to your ~/.config/google-chrome directory.

You can also do a symlink, like this:

ln -s ~/.config/chromium ~/.config/google-chrome

That will use the chromium config as the "authoritative"/"master" config directory, with chrome just looking into chromium.

It's also a wise decision to quit Chromium and/or Chrome so that you don't have any issues with config directories.


Thanks to @Zacharee1, I got 3.2 of Mongo installed on Ubuntu 15.10. Below are the steps taken from LiberianGeek (changed just the version to match 3.2)

Add Key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

Add Sources List

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Update your sources

sudo apt-get update

Install mongodb-org

sudo apt-get install mongodb-org

Check if working

sudo systemctl status mongod

If not working

sudo reboot

If still not working

Run this script: https://gist.github.com/sgnn7/54146c8a13c8b5ca2201

At the time of writing this, I had Mongo 3.2.1.


Prevent Ubuntu version to upgrade from 16.04.3 to 16.04.4

You need to disable your HWE (Hardware Enablement Stack). From this Q&A: How to disable HWE messages (14.04) you can turn off messages using:

sudo touch /var/lib/update-notifier/disable-hwe-eol-messages

From this Q&A: Rolling back to non-HWE stack on Ubuntu 16.04.2 you can use:

sudo apt-get remove xserver-xorg-hwe-16.04
sudo apt install xserver-xorg-core
sudo apt install ubuntu-desktop xserver-xorg libgl1-mesa-dri:i386 libgl1-mesa-glx:i386

Not specified in the linked answer, but I would run these commands from the console (Ctrl+Alt+F1) login.

Please read the links carefully and ensure they describe exactly what you want to do. If in doubt post a comment before proceeding.

Another option is to pin kernel version 4.4.0-87 so it never gets upgraded. See this Q&A: How can I avoid kernel updates?. Basically you will:

sudo apt-mark hold <package_name>
sudo apt-mark hold linux-image-generic linux-headers-generic

This isn't a specific answer but will get you started in the right direction.


There was some errors creating kit(armhf)

This worked for me. [ Thanks to +Tyrel Parker @Google+ ]

  ... This API packages contain a single tar.gz file and the post install script of the package puts the content of this tar.gz to the right place and wires it in, in the way it should be. Once the package is installed the new Kit will be automatically recognized by the IDE.

How to test these packages?

$ sudo add-apt-repository ppa:ubuntu-sdk-team/tools-development -y

$ sudo apt-get update

$ sudo apt-get install ubuntu-sdk-ide ubuntu-sdk-api-tools

$ sudo apt-get install ubuntu-sdk-api-15.04-armhf ubuntu-sdk-api-15.04-i386

After that look for the "Ubuntu SDK IDE" in the dash.


There's a typo in your PPA info,

Failed to fetch http://ppa.launchpad.net/gnome3-team/gnome3-ext/dists//ubuntu/saucy/binary-amd64/Packages  404  Not Found

Find the bolded part in whatever file you put that line in and correct it. Alternatively, just comment out the line (with a # in front) and use the command below.

In future, to add launchpad PPA's, you should use the add-apt-repository command, not editing sources.list.

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


If I understood you correctly, you need the following:

#create a directory
mkdir test_dir
#change the permissions
chmod 755 test_dir/

Now, test it:

ls -l | grep test_dir
drwxr-xr-x  2 ron ron 4096 Sep  6 14:30 test_dir

Here, ron has all the access to test_dir whereas the group and others can read test_dir but has not write access to it.


Update Manager cannot update due to dpkg error... (Ubuntu 12.10)

Try: dpkg -configure -a

This command finish a disturbed update.

or

sudo dpkg --clear-avail - that will be my last guess

then

sudo apt-get update


Is there a problem if I install Steam for Linux AND Steam via PlayOnLinux?

Unless you have two accounts, you can't be logged into both at once.  Otherwise, I can't see why you'd have a problem.


sudo command doesn't autocomplete anymore on files

Try firstly reinstalling the bash-completion package with:

  sudo apt-get install --reinstall bash-completion

Then backing up your .bashrc file:

  mv ~/.bashrc ~/.bashrc.bak

Finally, replace your .bashrc file with the default from /etc/skel/.bashrc by using:

  cp /etc/skel/.bashrc ~/

This will ensure the following 'complete' config is restored within the file:

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

Also check both the containing folder and file permissions of /etc/bash.bashrc and ~/.bashrc - ownership should be root:root and yourusername:yourusergroup respectively.  The permissions of the files are important as the shell only uses your own privilege level to auto-complete commands. Elevated permissions such as when sudo is invoked are only used after the command is committed by pressing enter.


Change the whole system to hebrew, not only keyboard

System Settings -> Language Support -> Choose one


How can I make fsck run non-interactively at boot time?

The setting I am looking for is in /etc/default/rcS, FSCKFIX=yes. This means "automatically repair filesystems with inconsistencies during boot" and causes fsck to run with the -y flag. It was set to no in both of my Ubuntu systems.

Even when set to no, the boot time fsck is still somewhat noninteractive. mountall runs fsck with -a, a synonym for -p, which means "automatically fix any filesystem problems that can be safely fixed without human intervention". Apparently -p drops to interactive mode if there are unsafe fixes to be made. To run fully automatically, you need -y or FSCKFIX=yes.

Here's the relevant bit of code from mountall.c

if (fsck_fix || mnt->fsck_fix) {
  NIH_MUST (nih_str_array_add (&args, NULL, &args_len, "-y"));
} else {
  NIH_MUST (nih_str_array_add (&args, NULL, &args_len, "-a"));
}


Ubuntu 16.04 on macbook pro 11,2 - nvidia card not recognized at all

The card is being recognized, since it is showing up in those commands. Try this page for installing nvidia drivers, I have had success with it.

Install Nvidia Drivers In Linux


external monitor / hdmi port not working on AMD-based system

I had this problem when installing Fedora 32 on a new Alpha 15. On boot, I saw messages stating

AMD-VI Completion-Wait loop timed out.

I had to add amd_iommu=off to my kernel parameters.
Credit goes to the Arch lovers who solved this problem.


Why can't Ubuntu find an ext3 filesystem on my hard-drive?

Sounds like the file system got corrupted somehow.

You can try "fsck -t ext3 /dev/sdb4" and see if that fixes your issues.

Also, make certain that ext3 is the correct file system, if I understand right fsck can corrupt data if you give it the wrong file system.


I tried updating again and it works. I guess whatever the issue was, it has been fixed by an update. No blank screen anymore. ;)


What Are My Options For 4-or-more-input Audio Recording?

I actually have one that has 4 inputs connectors, is the Intel DP35DP

And the same goes for my mother-in-law's PC. It has 2 PCI sound cards and the one that comes with the motherboard. Both PCI sound cards have more holes than a cheese from Tom & Jerry since you can connect (at least the first one I checked) 2 mics and has 4 more connections that am guessing only 2 of them are output (digital & analog). You can select which sound device to use in the "Choose a device for sound" either for input or output and then choose what specific connection for each.

Up to what I know the only cards or sound technology that was not supported 100% was the SB X-Fi Xtreme (Well the latest Sound Blaster Cards) but will be supported 100% in Ubuntu 11.10. In Ubuntu 11.04 almost all 5.1, 6.1 and 7.1 cards are supported. In the case of my mother-in-law that was a 7.1 but the other pic card might had been a 7.1, 6.1 or a 5.1. I know the one inside the motherboard is a standard 2.1.

Here is the Alsa support page: http://www.alsa-project.org/main/index.php/Matrix:Main

which will tell you what cards are supported. In many cases it will not say like "Supports Intel DP35DP sound card". Instead it will say the model of the sound card which is general for many Intel motherboards (Like Realtek).

Another post mentioning the problems with the last Creative Labs sound cards is here: How do I get a SB X-Fi Xtreme Audio CA0110 working?

This was almost a year ago. So you can imagine the changes with ALSA after that long time. If not here they are: http://www.alsa-project.org/main/index.php/Changes_v1.0.23_v1.0.24
(Watch out! They are long)

Basically if 11.04 does not support the card you want to use (Must be the very latest like yesterday) then 11.10 will.

Reference to UbuntuStudio - http://ubuntustudio.org/


I successfully overclocked my Nvidia under Ubuntu. Have to experience with Intel graphics under Linux, but found this after googling: http://blog.ffwll.ch/2013/03/overclocking-your-intel-gpu-on-linux.html


Configure a group to change date via GUI without admin privileges

The command to launch the datetime settings GUI with unity is:

unity-control-center datetime

Do not allow this command in the /etc/sudoers file because it can be used to create an admin user


"config" is a data file, not a text file that holds options. See the "transcode"  file in the same directory.

$ more transcode
# transcoding presets for mps-youtube
# VERSION 0

# change ENCODER_PATH to the path of ffmpeg / avconv or leave it as auto
# to let mps-youtube attempt to find ffmpeg or avconv
ENCODER_PATH: auto

# Delete original file after encoding it
# Set to False to keep the original downloaded file
DELETE_ORIGINAL: True

# ENCODING PRESETS

# Encode ogg or m4a to mp3 256k
name: MP3 256k
extension: mp3
valid for: ogg,m4a
command: ENCODER_PATH -i IN -codec:a libmp3lame -b:a 256k OUT.EXT

# Encode ogg or m4a to mp3 192k
name: MP3 192k
extension: mp3
valid for: ogg,m4a
command: ENCODER_PATH -i IN -codec:a libmp3lame -b:a 192k OUT.EXT

# Encode ogg or m4a to mp3 highest quality vbr
name: MP3 VBR best
extension: mp3
valid for: ogg,m4a
command: ENCODER_PATH -i IN -codec:a libmp3lame -q:a 0 OUT.EXT

# Encode ogg or m4a to mp3 high quality vbr
name: MP3 VBR good
extension: mp3
valid for: ogg,m4a
command: ENCODER_PATH -i IN -codec:a libmp3lame -q:a 2 OUT.EXT

# Encode m4a to ogg
name: OGG 256k
extension: ogg
valid for: m4a
command: ENCODER_PATH -i IN -codec:a libvorbis -b:a 256k OUT.EXT

# Encode ogg to m4a
name: M4A 256k
extension: m4a
valid for: ogg
command: ENCODER_PATH -i IN -strict experimental -codec:a aac -b:a 256k OUT.EXT

# Encode ogg or m4a to wma v2
name: Windows Media Audio v2
extension: wma
valid for: ogg,m4a
command: ENCODER_PATH -i IN -codec:a wmav2 -q:a 0 OUT.EXT

These are the options for transcoding.

Editing the configuration is done from within mpsyt using the "set" command. See help config inside mpsyt.


To my experience there are some problems that cannot easily be overcome in Wubi installations. These mainly come from the virtual Wubi file system residing within the Windows file system. If anything goes wrong with your harddisk most likely all of your Ubuntu files are completely lost. Recovering encrypted file systems is almost impossible from Wubi installations.

In addition, there have been problems in the past upgrading Wubi installations.

To avoid these it is IMO better to have a proper install of Ubuntu either in a dual boot setup or, if you don't need Windows too much let Windows run in a virtual machine within Ubuntu and share files that are stored in the Linux file system.

There are many recipes of how to migrate a Wubi installation to a proper Ubuntu installation. However you might find it more convenient and less time consuming to just backup and restore your /home folder when you haven't installed many non-standard software packages.


Displaying system information on Gnome 3 desktop

This conky tutorial is pretty good: Install Conky Lua On Ubuntu. It's quoted here to avoid link rot:

  First of all we need to install conky, you can do that by:

sudo apt-get install conky

  Secondly download conky-lua from here

  Then, go to the directory where you have downloaded the Conky-lua zip
  file and extract it. All files will be extracted in a folder called
  Conky-lua.

  Go to the folder and pick a file and extract it depending upon your
  distribution. As I use Ubuntu desktop, I extracted the file Conky
  ubuntu-lua.tar.gz.

  This will be extracted in a folder called Conky ubuntu-lua. Go to
  the directory, find the file conkyrc, and rename it to .conkyrc.
  Make sure you have put the dot(.) at the beginning of the file.

  Now, move the renamed file .conkyrc to your home directory. Hence,
  we have put the dot(.) at the beginning, this file will not be
  visible. To make sure this file is moved to the home directory, go to
  View -> Show Hidden files in your file manager.

  Then, create a new folder called .conky in the home directory, and
  copy the other 2 files to this folder (new-ubuntu-logo.png and
  clock_rings.lua).

  Now we have to mention the actual path of clock_rings.lua file in
  the .conkyrc file. Open the file .conkyrc in any text editor,

nano ~/.conkyrc

  Find the line and change the path to the new one in the home folder.:

lua_load /~.lua/scripts/clock_rings.lua

  And, change it to:

lua_load ~/.conky/clock_rings.lua

  Save and close the file. We’re done. Open terminal and run conky using
  the following command:

conky -c ~/.conkyrc &

  Now, look at your Ubuntu desktop. The conky-lua theme will be running
  and displaying all details such as date and time, usages of CPU, RAM,
  net, disk and swap etc.

(All images courtesy of https://www.unixmen.com)


Touchpad doesn't work on Lenovo ideapad-130-15IKB

You have a new touchpad model that is not supported by current Ubuntu kernels. The model is ELAN0620.

Luckily support has been added to the 4.19 Linux kernel.

I suggest installing a mainline kernel using UKUU.

Install UKUU this way

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install ukuu

Start UKUU using GUI, or by running ukuu-gtk in a terminal.
Choose the latest 4.19 kernel there and press Install.
Reboot.

The touchpad should start working.


How to set up two Gnome sessions to start automatically

I've been researching and the closest I could get to, your answer is to after have one user logged in, log the other user (almost) automatically.

1) Open Gnome Session Propertiesgnome-session-properties
2) and add this to a start up

gdmflexiserver

I will continue my research and post here if I find something else.


You must turn on X forwarding while connecting via SSH. Use -X parameter to ssh command, like:
ssh -X 10.0.0.1

Of course your local computer (the one you are connecting from) needs to have X server running.
The X forwarding must be also enabled on the SSH server for this to work. So if the above command doesn't work, you need to enable X forwarding. You must do it on the remote machine, ie. you need to first connect there via ssh without -X.
Edit the file /etc/ssh/sshd_config (you must do it from root, so eg. use the command sudo -e /etc/ssh/sshd_config for example). Find the line that contains the string X11Forwarding. It may be commented out (# at the beginning of the line), like this:
#X11Forwarding no

Change the line so that it looks like the following (if there was no such line in the file previously, just add it):
X11Forwarding yes

(note no # at the beginning of line and yes instead of no). Save the file and restart the ssh server:
sudo service ssh restart

After this, ssh -X should work.


The partition you used as /home should contain a /home folder.
And your files should be saved in a directory /home/your_name

Yes you can select the /home partition during the Ubuntu setup process : answer 'i want to do something else' when asked for disk partitioning and setup your diskspace manually.

Ubuntu setup will ask you for a user name and then it create the unix account and the personnal folder /home/new_username

Make sure to choose a new username : ubuntu will create a new folder /home/the_name
Your files will remain in same place /home/your_name and the new ubuntu profile in /home/new_username


Touchpad - Fusuma problem when changing the language

i used fusuma-sendkey instead of xdotool as suggested by the developer.
https://github.com/iberianpig/fusuma#alternatives-to-xdotool


How to migrate from Windows Live Photogallery to digiKam?

Tags and Ratings of Windows Live Gallery are imported without a problem into digiKam or Shotwell.

As @Rmano suggested I just tried it with Shotwell and digiKam (running on Ubuntu 12.04). Imported some images and all the tags and ratings were there. :)


Your question has been answered a couple of times before, dessert has a good summary of all the options available:
https://askubuntu.com/a/951207/351726

You should want to try PulseAudio Equalizer as long as you don't use any JACK software.

However, you mention having a "hollow" sound in Ubuntu compared to Windows. This shouldn't be the case. In general, the sound quality should be nearly indistinguishable between both systems.

Now, it's difficult to find out what the cause for this could be. Are you possibly used to an EQ that you have set up on Windows? Sometimes the soundcard drivers have automatic EQs that are activated without notifying you while you get the direct output in Ubuntu.

There's a possiblity that your output volume levels are set too high, make sure to check them and if they're close to or beyond 100%, turn them down a bit and listen again if anything changes.

Anything else might be a specific hardware issue.


Wifi cannot be turned on on Lenovo Yoga 910 with Ubuntu 18.04

This is a possible duplicate of This Question

According to above link you just need to blacklist a particular module from loading, in this case ideapad_laptop. So from the command line run the following command:

sudo tee /etc/modprobe.d/ideapad.conf <<< "blacklist ideapad_laptop"

and reboot.


Identical notification bubbles keep re-appearing

So I think I have figured out what was wrong, and how to fix it.

I had installed Unity Webapps extension (e.g. to integrate Youtube, Google Docs, etc into the desktop). I had a look in my Chromium extensions, and there was 4 unity webapps extensions installed. I disabled 3 of them, and now the email pop-up only occurs once!

If anyone else has this problem, this is exactly how I fixed it:

In Chromium, go Tools>Extensions. Then, ensure only one (1) Unity WebApps Chromium extension is enabled.


Change OpenVPN options with Network Manager (16.04-DT)

OK, seems like running a GUI-based server was a bad idea. Forget about the question, I'll try my luck on the commandline.


You already have a SATA 2.5" SSD in the laptop, so it is highly likely you will be able to replace your disk drive with another SSD. Since you already have an SSD, you could just open the laptop and see if it fits. I expect it will. You do not even need to boot it, just check that it physically fits and the cables are ok.

The problem of fitting a hard drive to a laptop is that sizing of the drive bays varies between different models of laptop. There are five different 2.5" hard drive form factors, each with the different heights  (5mm, 7mm, 9.5mm, 12.5mm, 15mm, see Hard disk drive form factors on Wikipedia) The internal bays of  laptops are designed only for a specific maximum height.

There are some other things to watch out for.

Older laptops may only support PATA connectors, and modern SSDs are SATA.
You might not get the full speed from a SATA drive if you laptop does not support the latest SATA standard.
You might not have a regular 2.5" hard drive bay. Some ultraportables use 1.8" drives, some modern systems are using Mini-SATA cards, some are using PCIe SSDs, and soon some will be using M.2 cards.


What is the difference between virtual terminals and Gnome terminals?

why are there many terminals and what is the point of those specially gnome terminal and virtual terminal

xterm and gnome-terminal are simply two different kinds of "terminal emulators", i.e. they make it look like you are on a real terminal (=text mode linux), but are designed to work in a GUI environment. xterm is the classical X11 terminal, while gnome-terminal is Gnome's default terminal.

The difference, apart from visual appeal, is that gnome-terminal has many more features than xterm but also requires you to be running Gnome. There are many more terminals of this kind available: xfce4-terminal, lxde-terminal, etc., with different looks, different feature sets, different dependencies and different "weights" (i.e. how much RAM they consume).

The "virtual terminals" (Ctrl+Alt+F1 to F6) are "real" terminals, not terminal emulators. If your regular desktop (Gnome) is ever in trouble, or you are having problems booting, you can try switching to another virtual terminal so that you can log in and try to fix the problem (in text mode).

This is a real terminal, as larsmans pointed out:


linux/autoconf.h has moved to generated/autoconf.h it seems in newer kernels. I don't know when this happened, but I had the same problem with a 3.2 kernel. I just renamed and this seemed to fix that specific problem. However there will probably be other changes so I suspect you will still need to port the driver to your required kernel.

See also https://serverfault.com/a/568397


Where is the database for locate/updatedb on Ubuntu?

You have the correct file, but the database is unreadable for two related reasons:

You don't have permission to access it directly.This can be overcome with sudo emacs mlocate.db
It is not a text file, so there is little utility in opening it in a text editor.  It is possible to view and edit it using a text editor, but the most likely result is corruption of the database.  Use the appropriate tools for reading or modifying mlocate.db: updatedb and locate.


how to use DWM and patch it in Ubuntu 20.04 gnome?

You probably need to use it by cloning it into a repository and installing it by using make clean install. Even this guide which is linked from the official dwm website asks you to first download the source and then install it.

I would say first uninstall dwm using

sudo apt uninstall dwm

Then follow either one of the following guides.

Installing and configuring dwm under ubuntu

This is a complete guide on using DWM Dwm: The Suckless Window Manager


Don't install xulrunner-1.9-dev, it hasn't existed since Jaunty (9.04).


When I looked through the list of loaded kernel modules on my system:

lsmod | less

I found this:

snd_ens1370      21536   0
gameport         16776   1 snd_ens1370
snd_ak4531_codec 9856    1 snd_ens1370
snd_pcm          80388   5 snd_ens1370,snd_intel8x0,snd_ac97_codec

There was no doubt in my mind - I needed to stop the kernel from loading the module snd_ens1370.

I had considered just deleting it all together:

$ locate 1370
/lib/modules/2.6.22-14-generic/kernel/sound/pci/snd-ens1370.ko
/usr/src/linux-headers-2.6.22-14-generic/include/config/snd/ens1370.h
/usr/share/alsa/cards/ENS1370.conf

But it turns out there is a more elegant way; to disable hardware in Ubuntu blacklist the module instead. Take a look at, /etc/modprobe.d/blacklist.

To disable my Ensoniq sound card in Ubuntu - I added the following lines to that file:

# disable my PCI ensoniq sound card
blacklist snd_ens1370

then just reboot...


How do I use NetPlan to configure PPPoE for the etherent interface in Ubuntu Server 18.04?

pppoeconf is still the supported method of configuring a PPPOE connection on Ubuntu 18.04.  netplan does not currently have built-in support for pppoe.

The pppoeconf package is installed by default on Ubuntu 18.04 desktop systems; for server systems it is shipped in the apt archive included on the classic ISO so that it is available for selection at install time (or after install time) for users with advanced networking requirements.  It is not currently (up to and including Ubuntu 18.04.3) available on the newer server live image, so users who use this image to install and need pppoeconf for their network will need to acquire the pppoeconf deb out of band and install it.


I entered "sudo chmod 770 /" on terminal. Is it fixable?

Luckily you haven't used -R option so you can easily revert it by following command:

sudo chmod 755 /

755 is the default permissions for the / directory.


Is Ubuntu for Android by Canonical available to the average user yet?

As far as I'm aware, no.

You can currently try the Ubuntu Touch preview (though it's only recommended for developers at this time) but I'm not aware of any public preview of Ubuntu for Android


How to install QtCurve 'tar.gz' theme in Kubuntu 12.04?

~/.kde/share/apps/desktoptheme/ [This path is for  Plasma Themes]

Your theme is a QT curve style, go to System Settings > Application Appearance > Style then where it says Widget Style, select qtcurve from the dropdown list, then click apply. You can import your qtcurve theme and configure it by clicking on the "Configure" button next it.

You must install QTcurve first with sudo apt-get install qtcurve.


The main problem with my question was in fact an issue with the PATH I defined in my cron job.
The cron job is used to trigger a job, and this job will copy the current directory into a docker container via docker run -v $PWD:/t [...].
Since the cron job is not triggered from the right directory, I had to modify the path in my script to tell docker not to use the current directory, but the directory on which the script resides.
As pointed in this answer, I modify the lines to:

 SCRIPT=$(readlink -f "$0")
 SCRIPTPATH=$(dirname "$SCRIPT")
 docker run -v $SCRIPTPATH:/t [...]


gnome-shell-extension: JS that works in looking glass doesn't in extension

I asked this on the gnome-shell mailing list -- it turns out that the extensions are loaded quite early on in the piece, before the a user's contacts have properly been loaded.

Adding a 5-second delay to the code snippet that retrieves the contact list (to give the system a chance to load all the contacts) works a charm.


Trying to install OpenVPN and can't find the Vpn Configuration in task bar

Try with

sudo apt-get install network-manager-openvpn
sudo apt-get install network-manager-openvpn-gnome
sudo apt-get install network-manager-vpnc
sudo apt-get install network-manager-vpnc-gnome


Open the Activities, type Settings --> go to Devices --> Keyboard

Then click the row that you want and you'll see the window Set shortcut

Hold down the desired key combination (press backspace to reset or esc to cancel).


error with slap.d while installing any new software


Try to install  it manually:

sudo apt-get install wine-mono

or:

sudo apt-get install wine-mono4.5.2

The second option is the latest mono, which I'm not sure is in the official repositories. The first one should install the latest  mono version for wine available on the official PPA.


grub-efi-amd64-signed package failed to install into /target/ using ISO and UEFI mode

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair-ubuntu

Search app "boot repair".
Use the advance boot option.
Finished.


Ubuntu 12.04 - Multimonitor - Office Use - Update AMD drivers?

I don't know about multimonitor but if you want to update your catalyst drivers I would suggest that you use the repository method instead of the amd-installer one.

Specifically:

1) remove the ubuntu fglrx which are currently installed:

sudo apt-get autoremove --purge fglrx*
sudo rm /etc/X11/xorg.conf

and reboot.

2) Add the xorg-edgers ppa and install the latest drivers catalyst 13.2 (beta7):

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install fglrx
sudo aticonfig --initial

and reboot.

If you are on a true 12.04.2 ubuntu installation and thus running the Quantal kernel and xorg you can leave the ppa in your system and from now on the driver will update it self automatically.
If you are using the precise kernel 3.2.xx  you should remove the ppa before the final reboot because it will break your system during the next apt-get upgrade.

To do that simply give the command:

sudo add-apt-repository --remove ppa:xorg-edgers/ppa
sudo apt-get update

you can add the repository back again the next time you'd like to update your drivers.


I/O errors usually refer to physical damage to the hardware.
Hard reset goes really heavy on the hardware, so it would not surprise me that by doing it again and again (14.04, 15.10, 16.04, how many times did you do it?) finally you managed to break your hard drive! :)

My suggestion is to stop using it immediately, switch to a live session and save as much data as you can before the situation degenerates, then test the drive (via the "Disks" application) and see if you can savage it by a simple formatting (but I strongly doubt this).

If you still have problems, your last chance will probably be to change the disk and hope that you broke only that and not also something else (like the motherboard).


Is there anything better than gnome-session-fallback aka Classic Gnome?

It sounds very much like you're describing Xfce. I think it's a perfect successor for Gnome 2, because in many regards, it's very similar, except it works the way it's intended to. It has panels, very similar to the panels in Gnome 2 and they even support most Gnome Panel applets and Indicators. Xfce4-panel also allows you to have different panels on different screens, which is very nice. Xfce is also a little less demanding of the computer than Gnome 2 was.

LXDE is also very nice. It's quite a bit faster than Xfce, but also a little simpler. I'd say it's something similar to the plain UI in Windows. The LXpanel does not support Gnome Panel applets, but it does support indicators, though I think you'll have to install a plugin for it.

LXDE and Xfce are both complete desktop environments, but you can install only their panels separately if you wish: they're called lxpanel and xfce4-panel, respectively, and you can run them with Unity if you wish.


keyserver timed out with add-apt-repository

A coworker discovered that there is some sort of weird networking going on at our site. Running the original command multiple times in a row sudo add-apt-repository ppa:git-core/ppa -y repeatedly timed out (after 60s+ of delay each time) and then, magically, it succeeded. Same command, no change to any settings.


NTFS Freespace Issue: Disk Partitioning for Dual Boot System?

Widnows build in programs wont help in shrinking the free space completely you can use "Mini Tool Partition Wizard Home Edition (freeware)"
http://www.partitionwizard.com/free-partition-manager.html

how to resize partition see here http://www.partitionwizard.com/help/resize-partition.html

It will reboot and split c drive at boot without causing any problem to windows


Free VPN for ubuntu 16.04 that connects to UK

I just found that TunnelBear can be used on ubuntu, I followed this article,

Basically just download the openvpn file they linked to in the
article, at this moment it's this one and unzip it
Import it like you import any OpenVPN settings, by choosing the country you want to connect to, I picked TunnelBear United Kingdom.ovpn
Enter your TunnelBear username and password

I just found Auto OVPN too for gnome users, I haven't tried it because I'm not using gnome but it seems decent


How to install Ubuntu on the same NVMe SSD than Windows?

I solved the problem by rebooting into Safe mode with networking

Microsoft provides their documentation for how to boot into safe mode.

Make sure that you select: "Enable safe mode with networking"

I then just had to restart my computer and Windows loaded AHCI mode just fine. Now I see my SSD in my Ubuntu Installation.


In case you want to have a 1:1 iso image of the DVD which can be played directly in some media player or mounted with the image mounter, you can just use Brasero after installing libdvdcss2. Choose the 1:1 copy and select an image file as target.

In general there are some DVD that have additional protections. In some cases it helps to try playing the DVD in different media players first.


Purple blank screen on Quitting Ubuntu Installation or Shutting Down

I am having similar problems with my m6 1045dx. Apparently between Windows 7 and HP tools 4 primary partitions exist on the hard drive and Ubuntu is unable to install as dual boot along side Windows. I am looking into deleting either the windows recovery partition or the HP tools partition to enable Ubuntu to have a primary partition.

I also experienced a blank screen trying to install Ubuntu 12.04 and eventually discovered the brightness was turned all the way down. With all 4 primary partitions already taken and brightness getting turned down when Ubuntu boots, it almost seems like a deliberate attempt to make Ubuntu hard to install on the m6 1045dx


Want to detect Android x86 in Ubuntu GRUB menu

Open 40_custom : sudo gedit /etc/burg.d/40_custom
Add Android x86 menu entry : menuentry "Android-4.3-x86" --class android {
set root='(hd*,msdos*)'
linux /path/android-4.3-x86/kernel quiet root=/dev/ram0 androidboot.hardware=tx2500 acpi_sleep=s3_bios,s3_mode SRC=/path/android-4.3-x86 vga=788
initrd /path/android-4.3-x86/initrd.img ('path' and '*' as yours)
Update grub : sudo update-grub
Restart


Where can I find the commands for the main menu items?

Actually this changes according to installation, but generally you can add applications with its command names such as skype, firefox, chromium-browser etc. You don't need the full path if those files in your path.

But, if you are looking for a way to see the full command name line, install alacarte:

sudo apt-get install alacarte

Start it with typing "Main Menu" via dash. You can find applications and their command line parts in suitable sections.


Newly Added Plymouth Theme Not Showing Up During Boot

Installing it is not enough

Each plymouth theme has a priority and by default the highest priority one is chosen as boot theme. You can override it with this command:

sudo update-alternatives -config default.plymouth

Which show something like this:

There are 2 choices for the alternative default.plymouth (providing /usr/share/plymouth/themes/default.plymouth).

  Selection    Path                                                                 Priority   Status
------------------------------------------------------------
* 0            /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth           100       auto mode
  1            /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo-scale-2.plymouth   99        manual mode
  2            /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth           100       manual mode

Press <enter> to keep the current choice[*], or type selection number:

the currently selected option (And default one) in my system is 0 (auto), you can see that by the asterisk character (*).

You can also see which is the automatically selected theme.

You should see your theme listed there, just write the number in the Selection column and press enter.

Then you need to make your change effective, to do that run this command:

sudo update-initramfs -u

You should see your new theme upon reboot.

This is all already documented at this question.


Ubuntu 18.04 fsckd is not completing the filesystem check process and also not able to cancel the process by pressing Ctrl+C

Let's check the basics first, by performing a manual fsck...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Update #1:

Ah, you've partitioned your disks slightly out of the ordinary, so we'll have to fsck the other partitions also.

boot to a Ubuntu Live DVD/USB
open a terminal window
type the following commands...

sudo fsck -f /dev/sda4
sudo fsck -f /dev/sda1
sudo fsck -f /dev/sdb1
sudo fsck -f /dev/sda5

Update #2:

We're investigating high read/seek/ECC error rates on sdb (HDD).

There may also be a Ubuntu software issue, or sda (SSD) firmware issue.

Update #3:

In looking at gparted for sda (SSD) I see /var is full.

I'd recommend:

full backup of important files from /home/username from sdb (HDD)
perform firmware update on sda (SSD) if required
wipe sda (SSD) and install fresh Ubuntu WITHOUT separate /var or /home
do not install anything on sdb and we'll do a bad block scan, and see if fsckd problem is gone

Update #4:

Bad block scan on sdb...

If sdb is not empty, use the appropriate partition number (probably sdb1 in your case) for the sdXX parameter below. If sdb is empty, assure that there's at least one large ext4 partition, which will probably be sdb1, and then use that for sdXX.

Note: do NOT abort a bad block scan!

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.  This option may not be specified at the
          same time as the -n or -p options.

Update #5:

Bad blocking completed. SMART Data indicates that read/ECC errors are now zero! If read/seek/ECC errors return, suspect a bad SATA cable or SATA port. Monitor SMART Data for sdb.

Reinstall Ubuntu with no special partitioning, except for /home on ext4 sdb1, and possibly a sdb2 NTFS partition if you share files with Windows.


How to fix blank screen with mouse pointer on Ubuntu install reboot?

Note: as commented by @asocia, you will need Internet connnection for this solution to work.
Sometimes your desktop may not load due to problem with lightdm.
Press Ctrl+Alt+F4 then login using your username and password. Enter the following commands:
sudo apt-get purge lightdm
sudo apt-get update
sudo apt-get install lightdm
dpkg-reconfigure lightdm

Now  type sudo shutdown -r now to restart.


nslookup keep using 127.0.0.1 specified in /etc/resolv.conf rather than using the name server specified in /etc/dnsmasq.conf

There's nothing wrong with this configuration.  127.0.0.1 is the address of your local dnsmasq.  When you tell nslookup to look up google, it asks 127.0.0.1 (which is your dnsmasq), and then dnsmasq forwards that query to 8.8.4.4.


Why do I get this error trying to build Komparator from source?

The INSTALL file says you need the following:

Install required packages: gettext, cmake, g++, kde and qt development packages
(including qt3support and kde4's kde3 compatibility libraries)

From the error, it appears you are missing kdelibs5 and/or kdevplatform5-libs, but to be safe I would install the kdebase-workspace-dev metapackage. In short, to successfully compile this program, run the following in Konsole:

sudo apt-get install build-essential kdebase-workspace-dev gettext libkde3support4 libqt4-qt3support

After that, cmakecompletes successfully:

kubuntu@kubuntu:~/komparator4-0.7/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
-- Found Qt-Version 4.8.1 (using /usr/bin/qmake)
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- Found KDE 4.8 include dir: /usr/include
-- Found KDE 4.8 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kubuntu/komparator4-0.7/build


Wireless chipset doesn't show up in ifconfig

Your relatively new device 168c:0036 isn't covered in your relatively old 3.2.0-xx kernel. You can correct this by installing the wireless modules backported from kernel version 3.8. First, identify your kernel details:

uname -r

Your kernel will either be 3.2.0-xx-generic or -generic-pae. Obtain a temporary internet connection and open a terminal and do:

sudo apt-get update
sudo apt-get install linux-backports-modules-cw-3.8-precise-generic

Or:

sudo apt-get update
sudo apt-get install linux-backports-modules-cw-3.8-precise-generic-pae

As needed. Reboot and your wireless should be working.


Do not gave up on lock while running apt

As far as I know, getting apt to not lock is impossible. The error is happening because the script is trying to run multiple apt sessions simultaneously. I think it would be best if you could modify the script so that apt operations are run after each other, in a queue maybe.


I would advise against trying to open that file.

  WinZix (Changed File) by WinZix, Inc.

  WARNING: WinZix is advertised as a compression tool however it appears from analysis of the files produced that it simply adds information to a file so that WinZix needs to be installed to access it. The program contains an adware component that must be installed with the program and the EULA for that component says you cannot use anti-adware software against it. In addition, use of such software may damage the component and make it difficult to remove. FILExt has removed links to this software and advises that you install it AT YOUR OWN RISK. If you receive a "compressed" ZIX file you are advised to warn the sender and ask them to resend the file in a more conventional format (e.g., ZIP)."

http://filext.com/file-extension/ZIX

edit: There do appear to be ways to open .zix files without installing spyware, such as http://www.kennethsorling.se/software/unzixwin.htm , but you would have to try running them in WINE, as they are for Windows. (This may or may not work successfully)


Where to find other versions of Opera browser as deb packages?

Here is the x86 variant of the latest version before 12 (that is, version 11.64) at Opera's own website.  Even older versions can be found here.

Note: In order to use both Opera 11 and a later build simultaneously, one of them should be an alpha, beta, or nightly build.
So, after installing version 11, the latest [bleeding-edge version][4] of Opera can be also installed and used.


Strictly speaking the natty method was

sudo service gdm stop

For oneiric lightdm has replaced gdm - therefore to stop you would use

sudo service lightdm stop


personally i would recommend updating to 16.04 as well like the above comment as that would be the best way. however, if you cant then "maybe" you might try updating your source repository temporarily. QT5 is part of the main branch so all you need is to do is add something like:

deb http://us.archive.ubuntu.com/ubuntu xenial main

then do "apt-get update"
.. install your new QT things ONLY. do not do an upgrade command if you are not running Xenial.

then you would either delete the Xenial entry or comment it out in your source list.

this is how i would go about things. it is not necessarily the right way, but it may get you what you want.


Why are items missing from System Settings; how do I get them back?

I know this is an old answer, but I ran into it while googling the same issue -- you can restore items to the gnome-control-center or unity-control-center when under xfce by going to /usr/share/applications/ and editing the *-panel.desktop files, adding ";XFCE" to the "OnlyShowIn" line.

I recommend doing this for the gnome-bluetooth-panel.desktop and the gnome-datetime-panel.desktop files if you're using the indicator applet under XFCE -- it'll let you change bluetooth devices and the clock settings.


Execute scripts for all files in a folder

Salut!

#!/bin/bash
shopt -s nullglob
for my_file in ./*.pdf; do

    filename=`sed "s/.*\///" <<< "$my_file"`;
    #yor comnd using $myfile or $filename
done;
exit;


How to copy text from (or paste to) Putty

This is really simple:

Select the text in the Putty window.
Go to Text Editor and click on right button (the scroll button). It will paste.

If you need to paste a command into putty, you can copy in other window and right click (scroll button) on Putty window.


Bypassing excessive dependencies when installing r-base-core

(2) Try

sudo apt-get --no-install-recommends install r-base-core

Ubuntu by defaults installs not only the Depends, but also the Recommended packages.

(1) If you're interested in the package resolving tree, do something like

apt-get --dry-run -o Debug::pkgDepCache::AutoInstall=yes install r-base-core

Sample output

$ apt-get --dry-run -o Debug::pkgDepCache::AutoInstall=yes install r-base-core
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
  Installing libblas3gf as Depends of r-base-core
    Installing libgfortran3 as Depends of libblas3gf
  Installing liblapack3gf as Depends of r-base-core
  Installing tcl8.5 as Depends of r-base-core
  Installing tk8.5 as Depends of r-base-core
  Installing r-recommended as Recommends of r-base-core
    Installing r-cran-boot as Depends of r-recommended
    Installing r-cran-cluster as Depends of r-recommended
    Installing r-cran-foreign as Depends of r-recommended
    Installing r-cran-kernsmooth as Depends of r-recommended
      Installing r-cran-mass as Depends of r-cran-kernsmooth
    # etc...


Split screen problem with Nivida GeForce GTX 770M

I had similar problem. You have probably two graphic controllers one is GeForce GTX770M and second is integrated in processor Intel GMA 4000. Run nvidia-settings and check which one you have currently using. After changing from NVIDIA (Performance Mode) to Intel ( Power Saving Mode) my 2 screens started to working properly.


If you do not use RAM intensive software (Video/Photo Editing) you should be fine with 4GB of RAM and no swap. I have 3GB and my swap rarely uses over a 20~30kb. If you're just looking for quickly browsing the internet you should be fine with nothing.

However, i personally would recommend having at least 1GB of swap, just in case, and, as you said, you might end up with no option to hibernate.

One thing, video converting, how large? What programme? Some will expect a considerable amount stored in the RAM.


wlan0 not found after installing ath9k from backport - ubuntu 14.04

cd backports-3.16-1
sudo make uninstall

Reboot and if it still doesn't work do:

sudo apt-get update && sudo update-pciids
sudo apt-get install --reinstall bcmwl-kernel-source


"Waiting for network configuration" then no network for 5% of boots

These messages appear while waiting for all interfaces marked as 'auto' in /etc/network/interfaces to come up. On most Ubuntu systems, that's only loopback (127.0.0.1); everything else is done later, via NetworkManager.

This usually happens if you've added something marked as both 'auto' and 'dhcp' in that file, and the DHCP server doesn't immediately respond. You'll see this screen until it does.

It might also happen if the device is "missing," for instance if the PCI card isn't seated properly and isn't recognized, or is defective.

So first, look in /etc/network/interfaces and determine what, aside from lo, is marked as auto (alternatively, use this command to print all the auto interfaces: ifquery --list --allow auto)

Probably, it'll just be your "wifi PCI card," but maybe it's another leftover device you're not using anymore? A wired Ethernet card with no cable plugged in? Remove the 'auto' from anything you don't want to come up at boot (and have to wait for).

If it is just your wireless card, did you mean to configure it this way instead of using NetworkManager? If not, I'd suggest the latter, especially for a wifi interface. Remove the 'auto' and reboot (or just run ifdown [interface] or even ifdown -a), log into the graphical desktop, and use the applet in your panel to set up the connection.

If you don't want to use NM for whatever reason, you probably still don't want to wait for the wireless at boot. In this case you'd remove the 'auto' again, and use the ifup [interface] command to bring it up later. To still do it automatically at boot (but not wait for it), ideally you would create your own upstart script in /etc/init that runs right after static-network-up. If you don't want to figure out how to do that, you could always just slap that command in /etc/rc.local, however.

[interface], by the way, is probably going to be wlan0, but you should verify this by looking at the output of ifconfig -a, when it's working.

On to the actual failure, the next time it happens you're going to have to look at /var/log/syslog to find out exactly why. Since you say it works after you reboot, it's probably not going to be a DHCP server issue. More likely, it's an issue with the device. You might see lines like this:

  Aug 13 18:45:44 ubuntu dhclient: Error getting hardware address for "wlan0": No such device

Check to see whether the device even appears in the output of ifconfig -a. If it does, you can manually retry ifup [interface] (or just ifup -a if you never removed the autos) to see if it works without rebooting. If not, start looking at the kernel boot messages (dmesg | less) for anything relevant. Normally there's something printed when the device is first detected, for example:

  [   25.770930] Intel(R) Wireless WiFi driver for Linux
  [   25.770933] Copyright(c) 2003- 2015 Intel Corporation
  [   25.773887] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
  ...
  [   26.110349] iwlwifi 0000:03:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm

Look at your own when it's working to see what it should look like. Then, compare to when it's broken. Are there any errors? Or, is the wireless stuff missing altogether? That, to me, just screams poorly seated or defective card. Make very sure it is fully and firmly in the PCI slot.

If you found other kinds of errors, in syslog or in dmesg, you should probably file a bug. Save everything relevant you found in these logs and output of commands. When you are able to connect, run the command ubuntu-bug networking to create the bug, then attach whatever you saved.


How do I grab video from webofstories.com?

Well I had written an answer for actually doing this with flvstreamer but as somebody who deals with video streaming professionally, I thought I'd check out the terms and conditions and doing what you're proposing is directly against the will of the project:

  [6. c.] you agree not to access any content made available on the Web Site including without limitation Material through any technology or means other than the playback facilities of the Web Site itself or such other means as WEB OF STORIES may explicitly designate for this purpose;

It's not just about copyright, hosting this stuff costs money. They're hosting it on S3/Amazon so it's actually costing them a lot of money. Every gigabyte streamed to you costs them between $0.12 and $0.25 on top of the S3 storage.

In short: if you want a load of their video, ask them.


How to Install XAMPP on my ubuntu 16.04 32bit

There was a SourceForge page that offer XAMPP 5.6.20 compiled for Linux 32-bit architecture, in which XAMPP 5.6.20 is compatible for 16.04 Ubuntu version.

To install this, press Ctrl+Alt+T to go to a terminal and type following command one-by-one:

wget "https://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.6.20/xampp-linux-5.6.20-0-installer.run"
sudo su
chmod +x xampp-linux-5.6.20-0-installer.run
./xampp-linux-5.6.20-0-installer.run


Gnome tweaks is missing `top bar' menu option

Logout, then click on the little gear icon on the left of the Sign In button on login window (where you enter your password). Deselect Unity and select Ubuntu. Sign in. The menu on the left side of Gnome Tweaks configuration tool should show the entry 'top bar' again.


How can I find corrupted characters in a text file?

Though I haven't tested that particular specification inside the excel file I see the sql file mappings. You just asked to locate the bad characters, not fix them like the SQL function does. From stackoverflow to just see the line of non ascii characters:

grep --color='auto' -P -n "[\x80-\xFF]" file.xml

This will give you the line number, and will highlight non-ascii chars in red.


After running boot-repair, still not booting to grub

You cannot see the GRUB menu, because for whatever reason there is no Ubuntu operating system installed on the disk anymore. Maybe something went completely wrong when you upgraded Windows 8.1 to Windows 10. So, unfortunately you will have to reinstall Ubuntu.
I am really sorry to be the harbinger of these bad news for you, but sadly this is the truth.


Removing Ubuntu from Triple Boot Windows OS?

Insert a live CD or USB for your Linux distribution and start up its partition manager (like Gparted). Find your Windows partition in Gparted's menu—it'll be listed as an NTFS drive.

Right-click on that Windows partition and choose "Delete" from the menu. Your machine may have other Windows-related partitions as well, like "System Reserved" and recovery partitions. If you want, you can delete these as well (but make sure you have recovery discs handy if you're going to delete a recovery partition).

Right-click on your Linux partition and choose "Resize/Move." Resize it so it takes up the rest of the now-free space on your drive.

Click the "Apply All Operations" button in the toolbar to perform the selected tasks. It may give you a warning saying that your computer may not boot, but with most Linux installations this shouldn't be a problem (though if it is, check out this article to fix it). This process may take some time, so let it be!

If you want to clean up, use

sudo update-grub

to remove them.


Suppose I want to create my own interface in Ubuntu?

This is probably an unrealistic goal. Don't feel bad, I wouldn't even know where to begin myself. My advice would be to seek out a website that does something visually similar to what you want. Grab the HTML & CSS from the site and start reading up on Gnome 3 documentation. Since Gnome 3 uses web technologies like CSS you might have better luck developing this menu/launcher for the Gnome 3 desktop, not Unity.

I can picture what you are describing but I think it is too localised to what you want. Redoing an OS's user interface, or even just a launcher, will require at least a few experienced programmers to start and maintain it. Good luck.


How Ubuntu can resolve the 'localhost' address without any webserver installed?

Quote from OP:

  An obscure webserver, tntnet (shipped with freemind), was listening on port 80, preventing apache to start.

Now, how to discover this? With the use of sudo lsof -i:80 | grep LISTEN:

braiam@bt:~$ sudo lsof -i:80 | grep LISTEN
nginx     4412     root    6u  IPv4 753652      0t0  TCP *:http (LISTEN)
nginx     4412     root    7u  IPv6 753653      0t0  TCP *:http (LISTEN)
nginx     4414 www-data    6u  IPv4 753652      0t0  TCP *:http (LISTEN)
nginx     4414 www-data    7u  IPv6 753653      0t0  TCP *:http (LISTEN)
nginx     4415 www-data    6u  IPv4 753652      0t0  TCP *:http (LISTEN)
nginx     4415 www-data    7u  IPv6 753653      0t0  TCP *:http (LISTEN)
nginx     4416 www-data    6u  IPv4 753652      0t0  TCP *:http (LISTEN)
nginx     4416 www-data    7u  IPv6 753653      0t0  TCP *:http (LISTEN)
nginx     4417 www-data    6u  IPv4 753652      0t0  TCP *:http (LISTEN)
nginx     4417 www-data    7u  IPv6 753653      0t0  TCP *:http (LISTEN)

As you can see, I have nginx runing in the http (80) port. There are other options like the use of netstat.


Cmake has been installed but when other program need to use it, it still says not installed

First, how did you "install cmake"? Using one of the Ubuntu package managers to install cmake=3.5.1-1ubuntu3 leaves the cmake binary in /usr/bin/, not /opt/cmake/bin.

To solve your problem, either sudo apt install cmake or add /opt/cmake/bin to your PATH. In your ~/.bashrc, add

PATH=$PATH:/opt/cmake/bin

Then . ~/.bashrc before you retry the build.


Install MongoDB shell client without server

If you just want the mongo shell, you could install the mongodb-clients package mentioned in your question. However, note that this includes an older shell version (3.6.3).

The official MongoDB packages are updated with each minor release and you should ideally install a shell version matching your MongoDB server's major version (3.6, 4.0). Significant mismatches in shell versus server versions can result in some subtle errors as well as missing or outdated helpers. For example, the MongoDB 3.6.x shell doesn't have helpers for transactions (which were added in 4.0).

The MongoDB documentation includes information on Installing the official packages on Ubuntu. There is a mongodb-org-shell package which only includes the MongoDB shell, and you may also want to install mongodb-org-tools for other command-line tools (mongodump, mongorestore, ...).

It would be best to follow the instructions in the MongoDB documentation as some details may change in future (such as the signing key), but the general steps to follow for MongoDB 4.0 on Ubuntu 18.04 (Bionic) are:

Import the public key used to sign packages from MongoDB, Inc

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

Create a package list file for MongoDB

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

Update your local package database

sudo apt-get update

Install the desired MongoDB package(s)

sudo apt-get install -y mongodb-org-shell


wireless unavailable - 802.1x supplicant failed

I managed to find a workaround. What I did is connect to the network as a hidden network, since the connection would fail whenever I tried to connect as a normal network. However, this creates a file for the network within the system-connections folder. Normally, I would still get the 802.1x supplicant error.

To get rid of the 802.1x supplicant error, I removed the

hidden = true

line that was present within /etc/NetworkManager/system-connections/"SSID-NAME".

This should fix the issue if anyone else has it.
I would appreciate it if anyone were able to give a better solution. I'm still unsure as to why the normal connect option didn't prompt me with a username/password option and just failed.


You have to forward the external port to your internal network. You are most likely under a firewall/router that blocks incoming external connections.


Why won't ubuntu install on my Hp6910 Laptop?

       you can try with Alternative install cd
       it is a ubuntu non graphical install cd. it gives you more advance options
       same problem happened to me as well i tried this.
                click here to download it


WiFi connection keeps failing on BCM4313 [14e4:4727 rev 01]

Try this command in terminalsudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/* and then try this command sudo service network-manager restart. I hope this helps.


Attempted to dual boot with Windows and now can only run Ubuntu

You want to install boot-repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

https://help.ubuntu.com/community/Boot-Repair

Be patient and follow the instructions.  Now Grub2 will let you boot windows.


/dev/sda is the whole disk. You have to mount a partition, e.g. /dev/sda1. For example:

sudo mount -t vfat /dev/sda1 /tmp


How to turn keyboard backlight off after x time of inactivity?

The keyboard backlighting problem was finally fixed for me in 17.04 on my Toshiba Satellite. You might try updating to 17.04, or at least booting to the Ubuntu Live DVD 17.04 and see if it works for you.