Does installing Ubuntu on my Nexus 7 void the warranty?

According to Google, as long as Stock Android is running and the bootloader is re-locked, the warranty will still be valid.

To return the device to stock android, please follow the directions on Installation. To re-lock the bootloader, place the device into fastboot mode, and run

sudo fastboot oem lock


To install the latest Firefox in Ubuntu 11.10, download the desired file either the 32Bit or 64Bit package depending on your system from Here.  Once downloaded, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to where the file was downloaded, and run the command below:

sudo dpkg -i <package_name>

As far as your comment on how to highlight the commands in the question, just type the command(s), and press the <$> on top of the box.


So this isn't really an Ubuntu answer but I am using a user agent masker in Chrome right now.

Google for the latest Chromebook user agent string and use this https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg


How to bypass ISP restrictions in ubuntu?

You need internet access for this. If ethernet is out all you have is wireless. If there is no access point you need to move to a location that has.

If the institute you are at does not want you to update your system nor install software you are not going to get this working over their network.


Ubuntu 12.10 running on VMWare Fusion 3.1.1

VMware Fusion 3.1.x is quiet old. The release notes says it only supports up to Ubuntu 10.04 LTS. I don't think 12.10 is well supported anyway, especially when you run Unity.

http://www.vmware.com/support/fusion3/doc/releasenotes_fusion_31.html

Try to ssh to your guest and install VMware tools in it. Also try to install a different DM/WM like xfce4, lxde, fluxbox/openbox or awesome and see if that works better.


Intel Centrino Wimax 6250 - Constant Slow and Dropped signal (Ubuntu 13.10)

I suggest you try the infamous trick for these devices. Please open a terminal and do:

sudo -i
echo "options iwlwifi 11n_disable=1"  >>  /etc/modprobe.d/iwlwifi.conf
exit

Reboot and tell us if there is any improvement.


Ubuntu 16.04 (Mate) - Draining Battery when powered OFF?

make sure you shutdown and do not suspend or hibernate
if the battery drains when the system is shutdown this is a -hardware- related problem. Not of the operating system
powertop and any software will need the operating system to be running yes.
5% could be what it costs you to boot your system.
check if it is actually draining: is it 10% after you did not use the system for a week for instance? If it is always 5% ... I do not call that "draining when powered off".

  How can I troubleshoot this?

Not from inside the operating system.

edit: check that USB is turned off. Maybe your BIOS is keeping an USB 3.0 port active (one that can be used to charge something while the system is down). Maybe go through your BIOS?

  Is there any way to conduct a software check on the battery health? (although new laptop)

Example:
How to check battery status using terminal?


There is 32-bit version of the Open Office in the same directory. Just download file Apache_OpenOffice_4.0.1_Linux_x86_install-deb_en-US.tar.gz, untar and install.

After installation, create files like this ~/.local/share/applications/openoffice-writer.desktop for Writer, Calc, Draw, Impress and others:

[Desktop Entry]
Version=1.0
Terminal=false
Icon=openoffice-writer
Type=Application
Categories=Office;WordProcessor;X-Red-Hat-Base;X-MandrivaLinux-Office-Wordprocessors;
Exec=openoffice --writer %U
Name=OpenOffice Writer
GenericName=Word Processor
Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using Writer.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Text;Letter;Fax;Document;OpenDocument Text;Microsoft Word;Microsoft Works;Lotus WordPro;OpenOffice Writer;CV;odt;doc;docx;rtf;
InitialPreference=5
StartupWMClass=openoffice-writer
X-KDE-Protocols=file,http,smb,ftp,webdav


May be your BIOS do not support booting from USB in which case nobody can help you. You will have to use a VD/DVD. Another possible way that uses Unetbootin is described in this post: Install Ubuntu without CD and USB , how? Check it out.


Why isn't chmod doing what I want it to?

In short because you're removing the permision for user when you do not specify what to change. You can specify which of the user, group, other to set permissions for:

$ ls -l bar
-rwxrwxrwx 1 vidarlo users 0 Nov 11 10:52 bar
$ chmod u-w bar
$ ls -l bar
-r-xrwxrwx 1 vidarlo users 0 Nov 11 10:52 bar
$ chmod g-w bar
$ ls -l bar
-r-xr-xrwx 1 vidarlo users 0 Nov 11 10:52 bar
$ chmod o-w bar
$ ls -l bar
-r-xr-xr-x 1 vidarlo users 0 Nov 11 10:52 bar

The u, g, o in front of the permission indicates which of the permission fields to change - for user, group and other.

In addition you have the special all:

$ chmod a+w bar
$ ls -l bar
-rwxrwxrwx 1 vidarlo users 0 Nov 11 10:52 bar

A shorthand commonly used by many is the octal permissions, which is built up with three digits, 0-7. First digit represents user, second group and third other.

In the octal system, 1 means expecute, 2 means write, and 4 means read. You add together the modes you want, so read and execute is 5, and read only is 4. To make the file read + execute for all, and write for owner in octal you'd do chmod 755 filename. A mode of 740 would be all for owner, read for group and none for other.

The good thing about octal modes is that you set all modes at once, so theres no hidden surprises left over.

To reserve editing of a script for root, you'd have to first set the owner of the file to root, using sudo chown root:root filename, and then sudo chmod g-w,o-w filename - or using octal sudo chmod 755 filename

If you go to line 301 of the source code you'll see a the source code responsible for printing this warning message. Basically it calculates what naive users may intend, and print the difference. It's slightly interesting behaviour I was not aware of :)


How do I un-screw up a Python/Pip installation after doing the mistake of running sudo pip multiple times?

In theory you can remove the corresponding local Python directories in /usr/local/lib/ for the Python versions you want to reset (3.5 and 2.7 for a 16.04 Xenial system).

Namely the directories you'd purge would be /usr/local/lib/python3.5/dist-packages and /usr/local/lib/python2.7/dist-packages, then log out and log back in.

In testing, this erased the 'local' non-system-maintained (that is, not maintained by apt/dpkg) library sets.  Removing those directories did not destroy

However, as I know nothing about your systems and were using basic test environments, containers, and VMs to isolate from my primary system, I can't guarantee this will totally fix your system, there may be other underlying issues that are not described or touched upon here that may be in play.

Also, if you do this, there is a chance a large number of things relying on the 'newer' versions will break, not enough to really mess with your system but enough to cause maybe your local projects to barf until you install the modules in userspace or in the dedicated virtual environments for each project.


Cannot create eclipse4 terminal command or add to launcher

New launcher:

The old launcher is one of those two files:

/usr/share/applications/eclipse.desktop

/home/YOUR_USERNAME/.local/share/applications/eclipse.desktop

Delete whichever of these files exists.

Then you can just launch Eclipse by directly running its executable and then right-click on its launcher icon and select "Lock to launcher". This will probably create a simple .desktop file for Eclipse in the second location listed above (in your home directory).

Or if the automatic generation this way fails, you can still create s simple little .desktop file manually. Follow the steps below or look at How to pin Eclipse to the Unity launcher?

Open your favourite text editor, for example gedit.
Paste these lines into the editor:

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=~/eclipse/java-mars/eclipse/icon.xpm
Exec=~/eclipse/java-mars/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse

Replace the path for Icon= and Exec= with the correct locations, if needed.
Save the file as ~/.local/share/applications/eclipse.desktop.
If it doesn't appear in the Dash's application lens, log out and back in.

New command:

To get an eclipse terminal command, follow the steps described below.
I will assume that the Eclipse executable is ~/eclipse/java-mars/eclipse/eclipse (that's how I remember the default installation path, please correct me if I'm wrong).

Create the directory ~/bin (default directory for custom or user-specific binaries) if it doesn't exist yet:

mkdir ~/bin

Ignore possible errors that end with File exists.

Only if ~/bin did not exist yet (or if you're not sure), you have to do this step to let the Shell know that it should look for executables here:

Close and reopen the terminal window or run the command below to re-source the .profile script.

source .profile

Make a symbolic link to the Eclipse executable inside ~/bin.

ln -s ~/eclipse/java-mars/eclipse/eclipse ~/bin/eclipse

Make the new link executable for your user:

chmod u+x ~/bin/eclipse

Now you should be able to just enter eclipse into your terminal to open the IDE.


After upgrading to 16.04 keyboard and mouse lock up at random times

I have had some issues with 16.04 myself and it all seems to stem from Nvidia. Please check out the numerous links contained with in this Ask Ubuntu post:

Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics


Which cloud provider can be mounted with EncFS?

All the cloud storage services like DropBox basically mirror a specific local directory, so anything you can do with a local directory & files (sparse files and some file attributes might be problems) you can do with your local copy of cloud files. There were a couple that are supposed to support built-in encryption, but they hold the files and it's their software, so ultimately they control the security

Using just about any encryption should work, a LUKS/dm-crypt container, an EncFS folder (it may not be the best for cloud storage, see below), or an eCryptfs folder (though it usually keeps config files separately in /home), or CryFS is new & appears specifically designed for cloud storage.


How can I install steam games to an external drives/mount points with Ubuntu 18.04? (solution found)

In the end, I found out the reason for the problem.

Steam (or at least my version of Steam) is installed with Flatpak. Flatpak does not actually have access to the /home directory filesystem. it creates a sandbox environment in Home/user/.var/app/com.valvesoftware.Steam

To manually override this, I created a mount point outside of /home (IT IS IMPORTANT TO DO THIS OUTSIDE OF HOME OR IT COULD MESS SOMETHING UP) I named my mount point /media/1.0TB-Hard-Disk

Then

flatpak override --user --filesystem=/media/1.0TB-Hard-Disk com.valvesoftware.Steam

More information about this can be found here: https://github.com/flathub/com.valvesoftware.Steam/wiki/Frequently-asked-questions


renaming a large tree of "folder_names" to "folder names"

If you really want to go back to spaces, here is the command, only for files

find /path -type f -iname '*_*' -exec bash -c 'echo mv -i "$1" "${1//_/ }"' _ {} \;

This only shows what would do, remove the echo to really exec.

Next you can change also directory substituting -type f with -type d.


Ubuntu installer does not detect Windows 7

By default Ubuntu 20.04(and 18.04 )'s live USB(made bootable using rufus) installs using UEFI mode. Therefore it is unable to detect drives in computer which uses BIOS. Installation mode can be switched by selecting Boot from next volume option in the GRUB menu followed by the required installation type.


Just install an VM and test it there ;-)


Ubuntu to windows 7 share cifs mount going dormant

if it works after a sudo mount -a, may be check this :
/etc/default/rcS and add this ASYNCMOUNTNFS=no

good luck


Dell XPS 13 9343 - keyboard backlight on at boot Ubuntu 15.10

Hereafter the script I use at login/resume:
(updated: 21/12/15 + Example of implementation)
(updated: 23/12/15 fix symlink reported command + add launchpad issue ref)
(updated: 23/12/15 less piped + /usr/local/bin)
(updated: 09/01/16 implement on {ac|battery}

#!/bin/sh
#
# script for setting/restoring xps13 kbd backlight state
#
# Cf https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1510344
# Cf http://askubuntu.com/questions/689907/dell-xps-13-9343-keyboard-backlight-on-at-boot-ubuntu-15-10
# Copyright: Copyright (c) 2015 r2rien
# License:   GPL-2
#
## Exemple of implementation:
#
# saved as executable in:
# [/usr/local/bin/xps13-kbd-backlight]
#
# using preferences set in ${BL_CONF}
# [/etc/xps13-kbd-backlight]
# (without "#~ " prefix)
#~ ## 0 : off
#~ ## 1 : min
#~ ## 2 : max
#~ default=0
#~ current=1
#~ on_ac=2
#
# usable at login from desktop file:
# [/etc/xdg/autostart/xps13-kbd-backlight.desktop]
# (without "#~ " prefix)
#~ [Desktop Entry]
#~ Version=1.0
#~ Type=Application
#~ Terminal=false
#~ Exec=xps13-kbd-backlight
#~ X-GNOME-Autostart-enabled=true
#~ X-GNOME-Autostart-Phase=Initialization
#~ Icon=keyboard
#~ Name=xps13-kbd-backlight
#~ Comment=set/restore xps13-kbd-backlight
#~ Categories=Utility;
#
# usable at resume|thaw linking it in /etc/pm/sleep.d
# [ln -s  /usr/local/bin/xps13-kbd-backlight /etc/pm/sleep.d/20_xps13-kbd-backlight]
#
# usable at on_battery|on_ac linking it in /etc/pm/power.d
# [ln -s  /usr/local/bin/xps13-kbd-backlight /etc/pm/power.d/20_xps13-kbd-backlight]

BL_CONF=/etc/xps13-kbd-backlight
[ -f ${BL_CONF} ] || exit 0

BL_SYS=/sys/class/leds/dell::kbd_backlight/brightness

BL_SYS_CURRENT=$(cat ${BL_SYS})
BL_CONF_CURRENT=$(awk -F = '/^current/ {print $NF}' ${BL_CONF})
BL_CONF_DEFAULT=$(awk -F = '/^default/ {print $NF}' ${BL_CONF})
BL_CONF_ON_AC=$(awk -F = '/^on_ac/ {print $NF}' ${BL_CONF})

case "${1}" in
    suspend|suspend_hybrid|hibernate)
    # save in conf new current from sys
        sudo sed -i "s/current=${BL_CONF_CURRENT}/current=${BL_SYS_CURRENT}/" ${BL_CONF}
        ;;
    resume|thaw)
    # set from current in conf
        echo ${BL_CONF_CURRENT} |sudo tee ${BL_SYS}
        ;;
    true)
    # on battery power:
    # set from current in conf
        echo ${BL_CONF_CURRENT} |sudo tee ${BL_SYS}
        ;;
    false)
    # on ac power:
    # save in conf new current from sys and set from on_ac in conf
        sudo sed -i "s/current=${BL_CONF_CURRENT}/current=${BL_SYS_CURRENT}/" ${BL_CONF}
        echo ${BL_CONF_ON_AC} |sudo tee ${BL_SYS}
        ;;
    *)
    # set from default in conf
        echo ${BL_CONF_DEFAULT} |sudo tee ${BL_SYS}
        ;;
esac


use locate command to find only files, excluding symbolic links and directories

locate itself does not have an option to filter out links (it can only follow or not follow links. You can filter out links using something else:

locate() {
    command locate -0 "$@" |      # print filenames separated by \0
      while IFS= read -rd '' f    # read filenames separated by \0
      do
          [[ -l "$f" ]] ||        # test for links
             printf "%s\n" "$f"
      done
}

Save this in your .bashrc; then in a new shell, locate -i Jaynes will not list links.


Why did my server repeatedly request the packages.bz2 file from a mirror for 24 hours?

apt-get update isn't logged in the APT logs.

To me, it appears that the server didn't get the file, or it was invalid. Another possibility is a strange cron script.

Now the reason is a bit more interesting.
Either

There is maybe a cron to run apt-get update
Someone (another admin and/or hacker) was spamming apt-get update

Why it would run 23 hours... Maybe a bad cron entry?

Also, not really an expert on UFW/blocking.

Personally, I would check cron, and auth.log as @Braiam suggested.


where has the file deleted with `sudo trash` gone?

When /home is on the same partition

With either trash or sudo trash, the files usually get stored under ~/.local/share/Trash/files.

When /home is on a different partition

From another answer, if /home is on a different partition than /tmp/test, sudo trash will put the files in one or two subfolders of the root folder of /tmp/test's partition (which can be gotten with df -P /tmp/test | tail -1 | rev | cut -d' ' -f 1 | rev):

.Trash/0/files
.Trash-0/files

Note that 0 in both is the Linux user ID of the user (root has user ID 0) who trashed the file. You can run id [username] to find out the user ID of a user and then replace 0 with that uid number to access that user's trash folder(s) on that partition.

If you delete two files with the same name

Note that if you trash two files with the same name, the more recently trashed file might be stored with a trailing _1 on its filename.


Problem installing canon software SCANGEAR MP

Reviving an old question, but I had the same issue today:

There are build errors in the scangearmp packages for 14.04. You can try installing the packages for your architecture (32bit/64bit) from the ppa for 13.04/raring manually. This has worked for me (Canon MX920 over WLAN).

scangearmp-common 32bit

scangearmp-common 64bit

I guess you also have to install device specific package, in my case scangearmp-mx920series


This sounds similar to a problem I posted a question about: Why does my screen not return to full brightness when waking a Lenovo B570 from sleep mode?

In this case there is a bug in the kernel which is causing the screen to be black when returning from suspended state (actually the brightness is just turned down to the lowest level). This is the bug report for the problem: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652 If this sounds like your problem (can't be sure as you haven't supplied much in the way of details) then there is a solution which worked for me in Comment #55 of the bug report which involves updating the kernel. When the next official update to the Ubuntu kernel is released the patch will be applied also.

Here you would have to add the following ppa to your system: ppa:kamalmostafa/stuck-backlight and enter:

sudo apt-get update && sudo apt-get dist-upgrade

Though please be VERY VERY careful and make sure the situation really does apply to you before making such changes as this, as updating the kernel can cause a lot of problems. This would only be effective if you are running the 11.10 version of Ubuntu.


I ran in to this problem also. I had installed Chrome Remote Desktop in the past. Once I removed that (sudo apt-get autoremove chrome-remote-desktop) everything seems to work again, including terminal and nautilus.


How to make script support file:/// notation?

I don't know of any commands that convert between file urls and file paths, but you can convert with python, or any other language with bindings to gio. E.g.:

$ python -c 'import gio,sys; print(gio.File(sys.argv[1]).get_path())' file:///home/user/path/file%20with%20spaces
/home/user/path/file with spaces


Two examples of shared library problems, is this a 18.04 issue?

The issue about dependencies was created on GitHub project page, now it is fixed.

The binary is 32-bit, so we need to enable 32-bit support

sudo dpkg --add-architecture i386
sudo apt update

then download the package

cd ~/Downloads
wget https://nerdur.com/Todour-v2.17.deb

and install it:

sudo apt install ./Todour-v2.17.deb

and enjoy:

Note: for original problem with dependencies for 2.16 see previous revision of this answer.


Getting a tar file for latest linux patches

As the error says, and the URL indicates, it's not a bzip2 file. It's an xz file, so the option for tar should be -J, not -j:

... | tar -xJkf -


What does “imagemagick [security]" mean in the online package list?

The mark [security] means that the package comes from the security updates repository, rather than the main repository. The security updates repository is always enabled and you should never disable it. It contains packages that are identical to the original package from the main repository except that one or more security vulnerabilities have been fixed.

The same package is also provided in the <version>-updates repositories. These repositories contain bug fixes and other recommended updates. These updates are pushed in batches, unlike security updates which are released as soon as possible.

That the package imagemagick is also provided by graphicsmagick-imagemagick-compat is unrelated. Graphicsmagick is a software project that started as a modification of Imagemagick and then evolved independently. Graphicsmagick includes an interface that is compatible with Imagemagick; this interface is distributed in the package graphicsmagick-imagemagick-compat. If you have graphicsmagick-imagemagick-compat installed, then packages that depend on imagemagick will work, therefore the graphicsmagick-imagemagick-compat package declares that it provides imagemagick. You can choose which implementation you prefer.

Ubuntu will automatically install the most recent version of a package among the repositories that are enabled on your system (except for versions or repositories that are excluded from automatic installations through preferences — for example, backport repositories are set up so that you only get backported packages upon explicit request).


Activities/Application Button doesn't show thumbnails of applications when I search - Ubuntu 19.10

I found that the problem was in a Theme called High_Ubunterra.

To solve it, just execute:

sudo apt install yaru-theme-gnome-shell --reinstall

It was replacing a default Theme CSS file.


Is there any Gtk+ 3 port of the Redmond theme?

Look for Redmond like themes here http://b00merang.weebly.com/redmond-collection.html


'file --mime-type' and 'mimetype' Commands Returning Different Results

file gets its results from /etc/mime.types.

From there:

application/mathematica-old
application/ms-tnef
application/msaccess                            mdb
application/msword                              doc dot
application/news-message-id
application/news-transmission
application/ocsp-request
application/ocsp-response

mimetype gets it from ...

ENVIRONMENT

   XDG_DATA_HOME
   XDG_DATA_DIRS
       These variables can list base directories to search for data files.
       The shared mime-info will be expected in the "mime" sub directory
       of one of these directories. If these are not set, there will be
       searched for the following directories:

               $HOME/.local/share/mime
               /usr/local/share/mime
               /usr/share/mime

       See also the "XDG Base Directory Specification"
       http://freedesktop.org/Standards/basedir-spec
       <http://freedesktop.org/Standards/basedir-spec>

Worth noting is this part in the man page for mimetype:

  For naming switches I followed the manpage of file(1) version 4.02 when  possible. They seem to differ completely from the spec in the 'utilities' chapter of IEEE Std 1003.1-2001 (POSIX).

So you might call it a bug against file /etc/mime.types since vnd.ms-excel is more accurate.


How do I mount shared folders in Ubuntu using VMware tools?

Most other answers are outdated. For Ubuntu 18.04 (or recent Debian distros), try:

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

If the hgfs directory doesn't exist, try:

sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000

You may have use a specific folder instead of .host:/. In that case you can find out the share's name with vmware-hgfsclient. For example:

$ vmware-hgfsclient
my-shared-folder
$ sudo vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000

If you want them mounted on startup, update /etc/fstab with the following:

# Use shared folders between VMWare guest and host
.host:/    /mnt/hgfs/    fuse.vmhgfs-fuse    defaults,allow_other,uid=1000     0    0

I choose to mount them on demand and have them ignored by sudo mount -a and the such with the noauto option, because I noticed the shares have an impact on VM performance.

Requirements

Software requirements may require installing the following tools beforehand:

sudo apt-get install open-vm-tools open-vm-tools-desktop

Others have claimed the following are required:

sudo apt-get install build-essential module-assistant \
  linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools


Run this in a terminal

  sudo apt-get install plymouth-theme-ubuntu-logo

if the following command returns There is only one alternative.. just skip it!

sudo update-alternatives --config default.plymouth
then type the selection number of /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth
Finaly, apply changes by typing :

  sudo update-initramfs -u


Lowering Graphics and Processor Clock Nvdia GeForce 570

Problem permanently fixed. The graphics card died, likely due that overclocking issue. Bought a new one.


You and your colleague are talking about two different bits, so it's understandable that you don't agree on what they do.

The sticky bit, the setuid bit and the setgid bit are three distinct bits in a file's (or directory's) mode. See e.g. the chmod(2) man page.

You're both right, your reference for the sticky bit is accurate, your colleagues reference for the SGID bit is too.


History list without timestamp and unique the results

Addition to answer by @devav2

Clear/nullify the history timestamp environment variable

HISTTIMEFORMAT="";

Export the following command,

export HISTCONTROL=ignoredups --> This will ignore the duplicates that are executed in sequence


Trackpad too sensitive to use in a laptop with Ubuntu 16.04

Currently I am on Elementary OS Loki. I had automated the fix of this problem by creating following shell script at /etc/X11/Xsession.d/56touchpadfix :

export `xinput list | grep -i touchpad | awk '{ print $6 }'`
xinput --set-prop "$id" "Synaptics Noise Cancellation" 20 20
xinput --set-prop "$id" "Synaptics Finger" 35 45 250
xinput --set-prop "$id" "Synaptics Scrolling Distance" 180 180
true

You need to tune values for your hardware. Mine work for Sony SVS series laptop. You may also want to try tuning other values listed by command :
    xinput --list-props "SynPS/2 Synaptics TouchPad"


I assume that when you say 'connects' you mean link-up on the interface ports of your PC and router.
However, I don't understand why that should happen only after you use static-IP -- maybe your interface was configured down initially.
If your router IP is 192.168.1.1 it is very likely to be a Class-B subnet configuration.
This means the netmask would be 255.255.0.0.
By using a Class-C netmask and a network number of 192.168.1.0,
you have placed your PC in a different subnet from your router.
That would explain the ping unreachable case.

So, I think you should try with,

iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.0.0
    network 192.168.0.0
    broadcast 192.168.255.255
    gateway 192.168.1.1

You can check the physical connectivity with mii-tool.
It is part of the net-tools package.


Installer hangs when selecting full disk encryption

I submitted this question to the System76 support team and they very quickly came up with a solution that worked for me. This is the main reason I bought from a vendor that pre-installs Linux and I have to say it has paid off.

When the installer boots up, select "Try Ubuntu". After the desktop loads, open a terminal and run:

sudo dd if=/dev/zero of=/dev/sda status=progress

Then start the installation normally.

Note that I already had tried removing the old partitions that were on the drive before running the installer but that was not enough. I had to overwrite the drive with 0s first. Selecting the option to "Overwrite empty disk space" during the install might have also worked but I don't plan on testing that.


IntelliJ IDEA 13 CE on Ubuntu 12.04: native file watcher executable is outdated

Usually this is an indication that the file watchers are unable to function properly.  it should go away if you set bin/fsnotifier64 and bin/fsnotifier as executable

chmod +x /path/to/intellij/bin/fsnotifier64


how to shutdown a linux machine, including the root password, in 1 line?

Yes, sudo has a '-S' a switch that allows it to read in the sudo password from stdin. All you have to do is echo your root password - so for your instance it would look like this (replace [PASSWORD] with your root password)

history -d $((HISTCMD-1)) && echo '[PASSWORD]' | sudo -S shutdown now


Chinese input doesn't work outside "Activities system search" (super key) on Ubuntu 18.04

I had exactly the same problem! I used fcitx previously and decided to switch to use IBus after upgrading to 18.04. However the Chinese input only worked for system search and did not work for any other applications.

I fixed it eventually by uninstalling fcitx.

sudo apt-get remove fcitx
sudo apt-get purge fcitx
sudo apt-get autoremove

Other things to note (just in case you haven't checked them) are

add Chinese to "language support", and
set keyboard input method system to be IBus.

This is a screenshot of the language-support dialog:

祝好运!


Getting wrong resolution on old samsung monitor

Try to change the resolution manually via the Settings App under Display.


I installed PHP7 but apache2 directory in /etc is not created. Now what?

You need to install a package for that. D'oh!
Running:
sudo apt-get install libapache2-mod-php

resolved the problem.


In addition to the suggested duplicate methods, what you can do is this:

Find your battery interface path via upower -enumerate:

bash-4.3$ upower --enumerate
/org/freedesktop/UPower/devices/line_power_ACAD
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/DisplayDevice

Then use upower --show-info and trip its output. In my example that would be like so:

bash-4.3$ upower --show-info /org/freedesktop/UPower/devices/DisplayDevice | awk '/percentage/{gsub(/\%/,""); print $2}'
100

All you have to do now, is use a simple script to compare if that output value is less than or equal to certain threshold

#!/bin/bash

get_percentage()
{
     # Note, | \ must have only new line after it, no space
     upower --show-info /org/freedesktop/UPower/devices/battery_BAT1 |\
     awk '/percentage/{gsub(/\%/,""); print $2}'
}

main()
{
    while true
    do
        pcent=$(get_percentage)
        [ $pcent -le 10  ] && notify-send "Battery Low" "Please plug in charger"
        sleep 60 # check every minute
    done
}
main

As for notifying via beep, you could use aplay command and any audio file instead of notify-send. If you don't have GUI, you can also use wall command like so wall <<<  "Battery low" and it will print to screen a message. NOTE: because of recent updates in gnome-terminal this doesn't work in gnome-terminal, but in TTYs and other terminal emulators it still does


Ubuntu 18.04 fails to boot after install (lvmetad)

This recovery method seems to be the best one I found so far, and the only one that works every time:

At the initramfs prompt, type

fsck /dev/mapper/ubuntu--vg-root -y

(Although you may have to substitute your particular root file depending on the "flavor" of Ubuntu you have.  For example, I have Ubuntu Studio, so my root file is actually ubuntu--studio--vg-root. You can ls your /dev/mapper directory to verify the root file name.)

This should scan and auto-fix the root file issues. Once it is done and you are back at the prompt, type reboot and it should now boot normally.  If you get the Ubuntu version list after you reboot, just select Ubuntu.

Also, keep a copy of the 18.04 ISO handy, either on burned disc or USB stick.  If this does not fix your issue, then you will have to recover using that.

You are definitely not the only one with this issue.  This seems to be a persistent bug with 18.04, as I have been dumped into initramfs many times now, even with consistent updates and no other version before this has dumped me to initramfs, only 18.04.  Hopefully 18.10 will fix this root file corruption issue.


Case - I

As you are looking to rename a file 01 - This is a song.mp3 to This is a song.mp3 trimming 01 - at the beginning. It can be done like this,

$ echo "01 - This is a song.mp3" | sed 's/^[0-9]* - //'
This is a song.mp3

How it works:

First identify the common part (two numbers at the beginning of the filename followed by a space, a hyphen and another space) that you want to replace from all the filenames here.
Next we need a regexp for the common part.
The caret ^ matches the position before the first character in a string and the character set [0-9] matches a single digit between 0 and 9.
The asterisk ^[0-9]* matches one or more digits between 0 and 9 at the beginning of string.
So ^[0-9]* - is our desired regexp which matches one or more digits between 0 and 9 at the beginning of string followed by a space, a hyphen and another space.

From man sed

s/regexp/replacement/
          Attempt to match regexp against the pattern space.  If successful,
replace that  portion  matched  with replacement.

For example, try it in terminal

$ echo "Good day" | sed 's/day/night/'
Good night
$ echo "Good day" | sed 's/day//' ## replacement is kept blank
Good

Let us look back to our original problem. We don't want the matched part to remain in the expression and replaced with blank using sed.

Case - II

The second set of files you want to rename from This is a song - Some Artist.mp3 to This is a song trimming - Some Artist at the end. Try

$ echo "This is a song - Some Artist.mp3" | sed 's/ -.*/.mp3/'
This is a song.mp3

How it works:

First identify the strings to be replaced. Here it is the part of string starting from a space followed by a hyphen and the rest of the string. But we want the extension .mp3 to be intact.
Here my approach was to match the whole string after a space followed by a hyphen and replace that with .mp3 so it remains in the string at the end of the string after replacement.
The dot . matches a single character, without caring what that character is. The only exception is line break characters.
-.* matches one or more any characters after a space and hyphen. Note that it will match .mp3 as well.
Hence using sed I have replaced the matching part with .mp3

you can learn more on regexp on the regular-expressions.info

A better regexp for case-II

This part I have lifted from steeldriver

echo "This is a song - Some Artist.mp3" | sed 's/ -[^.]*//'
This is a song.mp3

How it works:

Here the approach is to match the part of string after a space followed by a hyphen before the dot . of .mp3 and to replace the matching part with blank.
[^.] matches any character but not a dot .
Finally the regexp -[^.]* matches a space followed by a hyphen one or more any character but not a dot . or in other word before encountering a dot . which is our desired regexp.

File renaming

Rename files using sed and for loop in bash shell

To rename files as described in case-I you can use:

for i in *.mp3; do mv "$i" "$(echo $i | sed 's/^[0-9]* - //')" ; done

To rename files as described in case-II you can use:

for i in *.mp3; do mv "$i" "$(echo $i | sed 's/ -.*/.mp3/')" ; done

A better alternative to avoid loop+sed using rename

rename -v 's/^[0-9]* - //' *.mp3  # For the first set
rename -v 's/ -.*/.mp3/' *.mp3   # For the second set


Apache restart only for one web page Ubuntu 20.04

There is no concept of "only this site" in a simple Apache virtual hosting setup, as all sites are defined in one configuration typically built from many files. There is one server process that may spawn additional processes or threads to serve requests but they each just see the whole config.
To put a configuration change into effect you can mostly do a graceful reload, which is what is happening when you do service reload apache2 or systemctl reload apache2 or apache2ctl graceful. This takes care to finish serving every outstanding request with the old server process and then hand new connections to the new server process that sees the new configuration. There will not be noticeable unavailability. I say "mostly" because there are a couple of configuration changes that do require a full restart.
You asked in comments how production services handle this, if the web server has to be restarted every time there is a configuration change. The answer is that setups which desire high availability would put load balancers in front of web servers so that there were multiple servers available to answer requests. That way a configuration change can be done by rolling reload without clients noticing.
This is done not only for configuration changes; it also helps to protect against problems with any small number of web server hosts. In your current setup you have just this one web server host: if anything happens to it, it all the sites are down.
Very popular web sites will eventually also exceed the ability of a single web server to serve them, so a load balancer is the way to scale horizontally.
The single point of failure then becomes the load balancer, so that too must be made highly available and so it goes on, with ever more complex setups.


TP-Link WN-772N does not work under Linux

In your paste, we see:

  ath9k_htc: Unable to allocate URBs

It is a known bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1088809 The fix is a later kernel version than 3.2.0-xx. I suggest you install Ubuntu 14.04 LTS which uses 3.13.0-xx.


I strongly suspect that what they meant was "boot from Ubuntu LiveCD/LiveUSB to be able to access Windows 7 files from the live session". Installing Ubuntu on the hard drive is likely to destroy your files forever, especially if you don't know what to do.

You need to somehow make a bootable Ubuntu CD/USB and boot from that. Then you'll be able to access your Windows filesystem and backup your files (to an external HDD, for example).


graphics problem and no volume control icon after installation

First open a terminal.
Then write :

For your package problem :

sudo dpkg --configure -a

(you'll have to write your password)

And for the sound problem :

gnome-volume-controler-applet &


What Packages/How Do I Uninstall Propriety AMD Catalyst Driver

Here is the correct way to remove the ATI drivers:

sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Note: ignore any errors you may have got form running the first 2 commands.

Remove your xorg.conf file

sudo rm /etc/X11/xorg.conf

Re-install xorg

sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core

Configure xorg

sudo dpkg-reconfigure xserver-xorg

Reboot:

sudo reboot

Source form Install ATI official drivers in Ubuntu


Updating windows 10 to 1511, dual booting with Xubuntu

I had problems with my Win 10 upgrade as well (dualboot with Ubuntu 16.04).

I went to microsoft.com and chose to update my Win 10.
I downloaded the auto-update software (https://www.microsoft.com/en-us/software-download/windows10) and the rest was done automatically.


Sometimes it pays to just leave things alone for a day or two and not look at them.  Then come back to it fresh.  In the end, setting up a bridge seemed to be fairly straightforward, with the following two steps:

Update /etc/sysctl.conf

Uncomment the line that says ".net.ipv4.ip_forward=1"

Update /etc/network/interfaces

For me, this was the entirety of the file.  If you have more interfaces, you may want to adjust accordingly.  enp3s0 was the ID of my physical interface.

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown
iface enp3s0 inet manual

auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
   bridge_ports enp3s0
   bridge_stp off
   bridge_fd 0
   bridge_maxwait 0

I used an IP address reservation in my router to make sure my VM always got the same IP address.  Using DHCP made configuration overall a bit easier for me.

Thanks again to RobertRSeattle and Doug Smythies for putting up with me.


Find the UUID of your EFI partition in Terminal as follows:-
lsblk -o name,partlabel,fstype,uuid|grep -i efi. It's shown in the last column, and you will need this shortly.
Make a copy of your grub.cfg file from Terminal - sudo cp /boot/grub/grub.cfg /boot/grub/grub2.cfg.
Open grub.cfg with sudo gedit /boot/grub/grub.cfg.
Click the 3 vertical dots (top right panel) and select Find, and in the box enter menuentry 'Ubuntu'. That first Ubuntu menu entry will highlight. Then scroll several lines down to the closing brace after the initrd...line. Make a new paragraph after this closing brace, then add/paste the following lines:
 menuentry 'Windows Boot Manager (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-efi-UUID' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  UUID
        else
          search --no-floppy --fs-uuid --set=root UUID
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }

Note, where I've put UUID (uppercase) in the code you now need to substitute the actual UUID you found earlier. There are 3 instances of it. With the first one (first line) there is no space after the hyphen. Make sure the last line of code is a closing brace as shown, then save the file. Do not update grub, but reboot.

Note this grub entry assumes your Win 10 booting files have not been altered or corrupted, as any missing or defiled entries in the ESP will result in booting errors for Windows. Grub isn't responsible once it hands over control to Windows.


Couldn't copy file from Windows external hard disk to Lubuntu USB

One concern is that modern Windows 10 systems almost never actually shutdown and instead hibernate. You would be surprised the amount of additional work needed to fully shutdown a modern Windows system. Without fully shutting down the hard drive is often left in a state that may not be accessible. Although, typically when this happens the disk will not mount at all and you wouldn't be able to see the directory contents.

The other concern is that when using USB thumb/pen drives they typically have very poor reliability. They are designed to be written to infrequently and running a full operating system on them usually degrades their write cycles to the point where writes fail. (See Thumb Drive and Memory Wear)


Ubuntu 18.04, Xorg and system-journald consuming CPU

OP’s own answer moved here from the question body:

  I was using gdm3 as login manager. I switched to LightDM and the gnome stopped consuming 100% of the CPU.

sudo dpkg-reconfigure gdm3


Thanks to @muru there is a simple solution

[Service]
User=xy
Group=z
AmbientCapabilities=CAP_NET_BIND_SERVICE


Reinstalling CUPS fixed my issue. sudo apt install --reinstall cups

Thanks @Terrance.


Automatically choose "Try Ubuntu without Installing" after booting from USB Startup Disk

I'm not really sure what you want, but if you want it to behave this way you should install Ubuntu on the usb disk rather than installing the Live-CD on it.


open program in xsession from command line environment

You may declare a shell function that modifies autostart file and launch openbox-session instead.

This will show 2 windows one for target GUI program and an xterm for openbox. To kill the xsession, close that xterm window.

obox () {
  echo "$@ &" > ~/.config/openbox/autostart;
  startx openbox-session;
}

Example:

obox gedit ~/.config/openbox/autostart
obox winecfg


The package you linked builds several drivers including rtl8192ce. Which one you require depends on your specific device. I assume you know you need rtl8192ce, but, if you have any doubt, please give us some additional details about your device:

lspci -nn | grep 0280

The correct format in /etc/modules is simply the driver name without the .ko extension:

rtl8192ce


Is there a way to change so that Alt + tab will work similar to windows?

Install compizconfig-settings-manager with sudo apt-get install compizconfig-settings-manager from a terminal or search for it in the software center. It allows you to alter the behavior of alt+tab, among other things.

Answered here: How do I revert Alt-tab behavior to switch between windows on the current workspace?

(just flagged question as duplicate)


sudo apt-get --purge remove mysql-client mysql-server mysql-common

sudo apt-get autoremove

sudo rm -rf /etc/mysql/

I hope you get some help. :)


dual booting ubuntu 14.04.03 LTS along side with my windows 7, but windows doesn't LOAD!

Probably your grub is having an issue. open terminal run following commands.

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair

Open boot-repair and repair your bootloader. Windows will start showing after complete the setup.


how do I know what process requires the keyring to be unlocked

Ubuntu stopped showing the offending process because it's a security fault.

Some workarounds are:
- set the keyword password to blank (VERY unsafe, they're stored as plaintext!)
- If you don't have autologin, you delete the Default keyring and re-add your passwords to the 'login' keyring so that when you login you unlock the entire keyring all at once. If you have autologin you can't do this.

Similar question over here (askubuntu): An application asks to unlock the keyring on startup, but it doesn't say which one

Their problem was network manager.


The zpool was waiting to be imported. Running this command did it.

$ zpool import -d /dev/disk/by-id poolname


Recovering eCryptfs partition with ecryptfs-recover-private not working

I figured out my problem. I was running the command and giving it my HOME directory, and for some reason it was saying it was successful in mounting it. However, it was lying. Turns out you need to run the command with the .Private folder that each user has, its located in

sudo ecryptfs-mount-private /home/.ecryptfs/<username>/.Private

The command is supposed to recurse and find that folder for you, but I was impatient and gave it my home folder. I'm not sure why it said it was successful when it clearly wasn't, but if you give it that .Private folder, and then enter your login password, it should mount it to a folder inside /tmp/ and you can do whatever else you want to do with the data =)


Can't adjust brightness on a Sony Vaio T13 ultrabook

This answer worked for me.

Open a terminal

Type sudo su root and press Enter

Type echo 400 > /sys/class/backlight/intel_backlight/brightness. Use the brightness level you wish.

Type exit

Close terminal


Is there a piece of software that will let me run .exe files as soon as I install the program

Natively? That is called WINE or the add-on to it called PlayOnLinux.

  without having to go through a complicated process like Wine or PlayOnLinux makes me do?

No, that is what WINE was created for. PlayOnLinux is difficult and peculiar but I can not say it is complicated. In general PlayOnLinux requires you to follow specific instructions to the letter.

  I would like to run Terraria on my Ubuntu system and I was hoping that there would be a simple way to do this.

The simplest and most efficient way to play this is either over a dual boot system or using a Virtual Machine with a Windows installed in it. The only downside to a VM: it will be a bit slower.

If you really want this to run natively: it seems Terraria runs on Steam with wine. Installation:

  Install wine and winetricks. Install Steam from the Website. This will update Steam and exit at 26%, Start Steam: This will update steam completely. After this,
  log in.

cd ~/.wine/drive_c/Program\ Files/Steam
wine Steam.exe

  Download Terraria and install. This will install XNA Redist as
  well. Exit Steam.Start Terraria manually with wine

cd .wine/drive_c/Program Files/Steam/steamapps/common/terraria
wine Terraria.exe

  This will tell you that you need Mono for Windows.

  Install Mono 2.10 and 2.8 via winetricks. People have reported
  there is no need to install xact and xinput. If you run into trouble
  after this point, install them and see if it fixes the problem you
  have.

  Start Terraria.exe again. (With wine and mono). You will be
  told that it can’t find Microsoft.Xna.Framework.

  Install .NET 4 from the Full Installer from here!

wine dotNetFx40_Full_x86_x64.exe

  If you get a message that .NET is already installed, use
  regedit to remove this Node: HKEY_LOCAL_MACHINE\Software\Microsoft\NET
  Framework Setup\NDP\v4 Then return to Step 9 above.

  Copy .NET 4 Files to Terraria directory

cd .wine/drive_c/Program Files/Steam/steamapps/common/terraria
cp ~/.wine/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/* .

  Start steam and run Terraria

Untested.  Good luck with this and you will get it working natively but I still would suggest to keep away from WINE/POL and to prefer the dual boot method or to use a Virtual Machine.


How to automatically sync files between local folder and Dropbox folder?

Your problem could be due to Dropbox no longer supporting encrypted filesystems.

You can tell if you have an encrypted HOME directory

walt@bat:~(0)$ df -m $HOME
Filesystem          1M-blocks   Used Available Use% Mounted on
/home/walt/.Private    316201 141080    159038  48% /home/walt

Using my pathlld tool ( https://github.com/waltinator/pathlld.git ) to examine the situation more fully, it shows:

walt@bat:~(0)$ pathlld $HOME
drwxr-xr-x 27 root root 4096 Nov 18 10:06 /
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro,stripe=32589,data=ordered)
# / is /dev/sda5 and is an ext4 filesystem
drwxr-xr-x 7 root root 36864 Sep 10 12:08 /home
/dev/sda7 on /home type ext4 (rw,relatime,stripe=32748,data=ordered)
# /home is /dev/sda7 is an ext4 filesystem
drwx------ 255 walt walt 282624 Nov 18 12:25 /home/walt
/home/.ecryptfs/walt/.Private on /home/walt type ecryptfs (rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=1e8eb7b6d86aafbf,ecryptfs_sig=c2ba21b5be0aa03e,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)
# /home/.ecryptfs/walt/Private on /home/walt is an
# "ecryptfs" decrypted view of an encrypted filesystem,
# visible (mounted) only while I'm logged in.

The solution (works for me on Ubuntu 16.04LTS and 18.04LTS ) is to create the Dropbox directory on an ext4 partition, e.g., /home

walt@bat:~(0)$ ls -l ..
total 304
drwx------   3 walt  walt   4096 Nov  5  2018 Dropbox
drwx------   2 root  root  16384 Jan 29  2018 lost+found
drwx------ 255 walt  walt 282624 Nov 18 12:25 walt
walt@bat:~(0)$

I did this:

sudo mkdir -m 0700 /home/Dropbox
sudo chown $(id -u):$(id -g) /home/Dropbox

Then, I opened "Dropbox Preferences" from the icon in the top row, clicked on the "Sync" tab, and, after specifying the new "Dropbox folder location" (/home/Dropbox) clicked on "Move".


Can't install gnome extension after upgade to Ubuntu 20.04 LTS

Did you upgrade from Ubuntu 19.04? If not, then your issues may be the result of "skipping" versions. You can read up on it here. In which case you should backup your data and do a fresh install of Ubuntu 20.04 and it should work properly.
If you're interested in why "skipping" versions is a problem, read the first answer to this.


Please, don't do anything until someone else reviews it. I could miss something.

As /home is already configured, move /usr/share

Using a live CD, start gparted
Unmount swap, lvm's and any mounted partitions
Resize the partition you like to get space from, apply

If that partition is so big, try removing space from the end. So gparted will not shift the whole partition.
Create the needed partition as ext4, apply
Still using gparted: Right click on the new partition → Properties → Copy UUID
Mount the created (share) partition with the ubuntu partition which gonna copy from
Copy share folder. cp -a to preserve all (permissions, ownership, links..)

Replace <ubuntu_part> and <share_part> with your partitions mounting paths

sudo cp -a /media/<ubuntu_part>/usr/share/* /media/<share_part>/

Rename /usr/share as backup

sudo mv /media/<ubuntu_part>/usr/share /media/<ubuntu_part>/usr/backup_share

Backup /etc/fstab

sudo cp /media/<ubuntu_part>/etc/fstab /media/<ubuntu_part>/etc/backup_fstab

Same as /home add /usr/share, (use UUID copied before) something similar to:

sudo gedit /media/<ubuntu_part>/etc/fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=e3725608-ee2f-408d-9d53-4f172070ca1f /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda5 during installation
UUID=1063be7e-2105-434c-a9e9-75cf3d02e969 /home           ext4    defaults        0       2
# /usr/share was on /dev/sda6 during installation
UUID=34c6fc4b-3c63-4e58-a3dd-3b70926c58c9 /usr/share      ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=bde0f592-e4fe-4eb6-9d75-eec161e349a1 none            swap    sw              0       0

Lines starts with # are just comments
Reboot
If it's OK, delete backups

sudo rm /media/<ubuntu_part>/etc/backup_fstab
sudo rm -R /media/<ubuntu_part>/usr/backup_share

Note:

Disk Usage Analyzer (or du on command line) can be used get size info. It is more practical to analyze an already used system so all tools needed installed.
 So space distribution depends on user behavior, some install much -doc's, -dev's, wine programs in /home/user/.wine, ...


I had the same problem, but the solution was really different. When you install OS on your computer, secure boot is on. This means that your OS is going to have less abilities including connecting to WiFi.
- HOW TO TURN OFF SECURE BOOT?
Go to BIOS system. For doing that, you will need to turn off a PC. Every computer developer has its own way to go to BIOS. For example, I have HP laptop. When I start it, I press esc button and get the menu, then press F10 and go to BIOS. So look for your way to get there. Then look through BIOS menu options until you will see "Secure boot" one. Change the value to "Disabled" and save the settings. Then start Ubuntu. That may work, I am not sure, but anyway, try it. Secure boot is default on so it can block your WiFi driver.


First, I'd like to clear up some terminology: In the context of EFI boot loaders for Linux, "EFI stub" refers to a boot loader that's built into the Linux kernel itself, enabling the kernel to be launched as an EFI program. You seem to be using this term to refer to any EFI boot program, but that usage could create confusion.

That dealt with, os-prober on Arch should have detected your Ubuntu installation. I don't know why it didn't, but as Arch's os-prober is part of Arch, not Ubuntu, you might want to ask about that on an Arch forum. OTOH, if you follow my advice, you won't be using Arch's GRUB, so this point will become moot.

Arch gives its kernels fixed names that do not change when you update the kernel, whereas Ubuntu's kernel names include a version string, and therefore change when a new kernel is installed. This is important because GRUB configuration files, which refer to the kernel, are created by the OS that controls GRUB. Thus, if you use Arch's GRUB, you'll need to reconfigure GRUB in Arch whenever you update an Ubuntu kernel. This is likely to be awkward. If you use Ubuntu's GRUB, OTOH, its configuration will not need to be updated when you update an Arch kernel. (When you install a new Ubuntu kernel, Ubuntu's scripts will automatically update Ubuntu's GRUB.) Thus, of the two, I'd recommend using Ubuntu's GRUB, not Arch's GRUB.

You can switch to Ubuntu's GRUB by using efibootmgr in either distribution:

Type sudo efibootmgr to see a list of entries. Pay attention to the BootOrder line and to the Boot#### entries for Arch and Ubuntu. The BootOrder line tells you the order in which the computer will try to launch specific boot entries. Given your OSes, chances are Arch's GRUB will be first in the BootOrder list.
Once you've identified the Ubuntu Boot#### number, you can pass a new boot order to the firmware by using the -o option to efibootmgr, as in sudo efibootmgr -o 0004,0002,000A. This sets the boot order to use Boot0004 first, then Boot0002 if that fails, and finally Boot000A if both of the earlier ones failed. The details will vary for you, of course; you should ensure that Ubuntu's entry is first. What comes after that is likely to be irrelevant, although I'd recommend ensuring that at least one known-working entry is in the list, so that the system will boot to something even if the Ubuntu entry fails.

After you reboot, Ubuntu's GRUB should appear, but it might or might not have an entry for Arch. You can run sudo update-grub to generate a fresh Ubuntu GRUB menu and try again. This might or might not detect Arch's kernel. If it doesn't, you can edit /etc/grub.d/40_custom or use GRUB Customizer to add an entry for Arch. Something like the following should work:

menuentry "Arch Linux" {
    set root=(hd0,1)
    linux /vmlinuz-linux root=/dev/sda5 ro quiet splash
    initrd /initramfs-linux.img
}

This is just a crude example and could likely be improved upon. If nothing else, you'll probably have to change the root=/dev/sda5 option to point to Arch's true root (/) partition. You might examine Arch's GRUB configuration or ask for help on an Arch forum if you want to improve on this example, or if you have problems with it.

As an alternative to the preceding, you could use something other than GRUB. Most boot loaders will require more in the way of manual configuration than GRUB, but that manual configuration is likely to be easier than GRUB's manual configuration. See my page on EFI boot loaders for Linux for a rundown of what's available. My own rEFInd boot manager tends to be easier to configure for multi-boot scenarios because it actively scans for kernels every time it boots, so it doesn't suffer from the need to keep updating a configuration file with every kernel update. OTOH, because Arch's kernel name doesn't change, if you use Ubuntu's GRUB, you won't suffer from the usual multi-distribution GRUB problems, so rEFInd won't be an improvement on this score.

One final point: With your configuration, your Arch kernels are stored on your EFI System Partition (ESP). This is a common Arch configuration, but you should be sure that your ESP is big enough. Sometimes the ESP is as small as 100 MB (or conceivably even smaller), which may leave little extra space once your kernels are in place. You can use df to see how much space is used and available on a partition, as in df /boot/efi. If your ESP is nearly full, you may want to put your Arch kernels somewhere else. Although using the ESP to store kernels is a common practice in Arch, it's not necessary, so you can do something else.


How to force an immediate clock/time synchronization/ntp update in 16.04?

Using tlsdate:

sudo apt-get install tlsdate
sudo tlsdate -H mail.google.com

to make it auto

Make a script (e.g. ~/.update_time.sh):

sudo gedit ~/.update_time.sh

add these lines:

#!/bin/bash
tlsdate -H mail.google.com

Save and close the file.  Modify the ownership:

sudo chmod 4711 ~/.update_time.sh
sudo chown root ~/.update_time.sh

Edit ~/.bash_profile:

sudo gedit ~/.bash_profile

and add this:

at -f ~/update_time.sh now + 1 minute

Save and close the file.

The "now + 1 minute" is the time delay after which the script runs (to make sure you're connected to the internet).  You may need to install at:

sudo apt-get install at

WARNING: The following uses the deprecated ntpdate package

I followed this answer and it worked for me:

sudo apt-get install nptdate
sudo ntpdate pool.ntp.org

to make it auto

Make a script (e.g. ~/.update_time.sh):

sudo gedit ~/.update_time.sh

add these lines:

#!/bin/bash
ntpdate pool.ntp.org

Save and close the file.  Modify the ownership:

sudo chmod 4711 ~/.update_time.sh
sudo chown root ~/.update_time.sh

Edit ~/.bash_profile:

sudo gedit ~/.bash_profile

and add this:

at -f ~/update_time.sh now + 1 minute

Save and close the file.

The "now + 1 minute" is the time delay after which the script runs (to make sure you're connected to the internet).  You may need to install at:

sudo apt-get install at


I wouldn't do it in Ubuntu at all. Depending on the device, I'd remove the network hardware or disable it in the BIOS.


What credentials do you enter to use a network printer?

How did you share the printer? There are two methods, one is via samba (windows) and the other is via ipp/cups (unix). As far as I know, cups doesn't require authentication by default unless you've set it up that way. Samba on the other hand does by default.

I would recommend using cups sharing, ipp works in windows clients as well as any other client and is well supported in Ubuntu. You simply go to your System > Administration > Printing and select Server > Settings.

You can then visit the ip address of your server in any web browser at port 631 to check you get a connection and access to the printer:

`http://192.168.1.20:631/printers`

If you do this, your other machine should see this shared printer automatically. Configuration should then be automatic and you should not have any passwords to deal with.


How to detect Linux machine power off state using Python

You can add this to catch SIGTERM, SIGINT and SIGKILL signals.

import signal

signal.signal(signal.SIGINT, sigterm_handler)
signal.signal(signal.SIGTERM, sigterm_handler)
signal.signal(signal.SIGKILL, sigterm_handler)

You need SIGTERM for the power off. Mind though: pressing the buttons means the system will start a shutdown, so there is a limited amount of time before anything you want to do needs to be done.


From the control panel on the computer with the small disc you tell syncdaemon to no longer sync the folder you need to empty:

and then you can delete the folder and/or its contents without them being removed from Ubuntu One. If later the situation changes and you decide to re-enable sync, syncdaemon will do a “merge”, which should result in any new files in that folder getting added to the sync, but no deletions.


Can't boot Acer laptop into Ubuntu 19.10 after dual boot install

19.10 comes with a new version of Grub 2.04 that many have reported bugs with.

A common solution is to turn off TPM in BIOS. However other options are detailed in the bug reports and there other things to try if that doesn't work.


Kernel > 2.6.32-20 doesn't boot (root file system does not exist)

If you are still having this problem:
  1. Go to launchpad and file a bug. A new bug. Don't add a "me too" to an existing bug.
  2. Go to #ubuntu-kernel on freenode (this is an irc channel on an irc server). The Ubuntu kernel team hangs out there almost 24 hours per day, Monday through Friday. Please, don't pop in, ask a question and if you don't get an answer right away, disconnect. If you are patient, you can get someones attention and they will try to help. Really, they are not scary people :-)


There are admittedly few tutorials on this topic. A point to start with is

JackAudio FAQ
Jack Documentation
Ubuntu Help - Jack How To (maybe outdated)
Ubuntu Help - Ubuntu Studio
Using Jack audio and getting audio to play though headphones
How can I use Jack for all my system sounds?
Playing a MIDI keyboard without JACK / how to use JACK and PulseAudio/ALSA
Arch Wiki: Pulseaudio and Jack
PulseAudio Documentation

You may also find installing the ubuntustudio-audio  package helpful.


Brother HL-4150CDN prints text with wrong resolution on Ubuntu 12.04 - how can I fix this?

The workaroud provided by @ewienik points out to the right direction: the Brother PPD files are missing a required parameter (*Resolution) which bugs the pdftops component (or some other filter ?) which fallbacks to 100dpi. Here is a sample pour HL-4150CDN :

*%==== Resolution auto Features =================================
*OpenUI *Resolution/Quality Auto: PickOne
*OrderDependency: 14 AnySetup *Resolution
*DefaultResolution: 600x600
*Resolution 600x600/Normal: " "
*Resolution 2400x600/Fine: " "
*CloseUI: *Resolution


Battery percentage is not visible on top bar of Ubuntu 20.04 LTS for Surface Pro (Surface_Pro_1796)

Here are the commands I ran in sequence to install linux surface kernel:
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | sudo apt-key add -
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" | sudo tee /etc/apt/sources.list.d/linux-surface.list
sudo apt-get update
sudo apt-get install linux-headers-surface linux-image-surface linux-libc-dev-surface surface-ipts-firmware libwacom-surface
sudo apt-get install linux-surface-secureboot-mok
export GRUB_CONFIG=`sudo find /boot -name "grub.cfg"`
sudo update-grub
sudo grep 'menuentry ' $GRUB_CONFIG | cut -f 2 -d "'" | nl -v 0
sudo grub-reboot 1
sudo reboot

Reference: https://github.com/jakeday/linux-surface/issues/666


Ubuntu says USB harddrive should be checked for errors

It's okay. Sometimes the stock checkdisk utilities come in short to solve big issues.

Download testdisk here: TestDisk

This thing revives any old chap.


To redirect only stderr of evince to /dev/null and send it to the background at the same time you need to specify:

evince name.pdf 2> /dev/null &

Where :

evince name.pdf 2> redirects the output of the errors only
/dev/null redirects the output to the null device
& sends it the program to the background


Share files between Ubuntu 11.04 and 10.04 over LAN

If you're only using Ubuntu or other free operating systems, then I would recommend installing http://apt.ubuntu.com/p/openssh-server. Just install it on both machines. You don't have to configure the service in any way. Then, on the client in Nautilus, select File > Connect to service.. In that dialog, choose the SSH protocol, provide username and password. You can choose to remember the password for one connection, for the desktop session or forever. If you're on a local network, then you can just use hostname.local as address (for instance, mypc.local). If you're on the internet (because SSH supports that in a secure way) you can enter the IP address.

Now you can use folders on the other PC as if they were local. You can also remote control it using that server, so it's useful in other cases too.


Getting error as Mysql: command not found

Most likely you've not installed MySQL command line client. In 16.04 the client can be found from package mysql-client-core-5.7.


set "UsePAM no" in sshd_config file

You don't want to turn of PAM.

  If I want to be able to login as root and otheruser using only SSH keys, what changes do I make?

To achieve this, these options are related:

PermitRootLogin without-password
ChallengeResponseAuthentication no
PasswordAuthentication no
AllowUsers root otheruser
PubkeyAuthentication yes     # missing in your list, but should be on by default)

  If I want to prevent remote root login at all what changes do I make (and how much more secure it is as compared to remote root login using SSH keys)?

Set PermitRootLogin no and AllowUsers otheruser.

  If I prevent remote root login at all by making changes to sshd_config file, how will I ever be able to login as ROOT if I want to in future?

You will log in with your non-root user and use sudo to edit the configuration files and restart sshd.


Very strange 16.04 wired internet connectivity issues

The problem, from the results of the test in the comments, is your access point connection.  The immediate resolution is to bypass the Apple Time Capsule and connect directly to the modem.

Using and configuring the Apple Time Capsule router will have to be configured to properly handled by supporters of the hardware.

It's the failure to load certain sites is a common problem with users of the device as a apple time capsule some sites fail to load  search reveals.

Some report it as a faulty device.

There are two things you can try, which includes resetting the device to factory reset and disabling IPv6 on your computer.

You can disable IPv6 on your computer with:

Edit your /etc/sysctl.conf file and append this to the bottom:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then run this:

$ sudo sysctl -p

You can verify that IPv6 is disabled with:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

The output will be:

1

Now load your site.

If at some time you decide to reenable IPv6 just remove the appended lines added to the /etc/sysctl.conf file.


I had a same problem and I solved it. Problem with login loop showed up after irregular shutdown. I have solved the problem as follows:

I saw that my home folder did not have w attribute.
I added w attribute and reboot.
Click Ctrl + Alt + F1 and type in the console

sudo chmod -R +w ~
sudo reboot

Note: ~ home folder, +w add write attribute, -R recursive.
That's all.


Dell Latitude E5570 overheats on a single spot when running Ubuntu, not with Windows

By default, Linux writes to the disk every time a read operation is carried out.

You could try disabling atime and diratime on the mounted disk to see if it helps.

Open /etc/fstab and find the mountpoint and add "noatime" and "nodiratime" to the row.

The row usually looks something like:

UUID=DriveIDStringHere /               ext4    errors=remount-ro,noatime,nodiratime 0      1

Disabling this might also prolong the longevity of your SSD.


To check the version of MySQL installed, open up the terminal and type:

mysql -V

Mine is version 5.7.18

mysql  Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using  EditLine wrapper

To use MySQL

Type mysql -u username -p Then give in your password you set when installing. The username is usually root. Then start writing SQL commands.

Mine:

subroot@subroot:~$ mysql -u root -p
Enter password: ********

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.18-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


Ubuntu Server USB installation with installer's output on ttyS0 (serial port)

56700 speed is an invalid console speed.
Try adjusting your config files to use either 115200 speed or 38400.

sh-3.2# cu -l /dev/cu.usbserial -s 56700
cu: Unsupported baud rate 56700


Static IP for external device TCP connection at the same time than having automatic DHCP for internet connection

I was able to solve the problem by making alias for my ethernet. It was just that I needed to add the original interface into /etc/network/interface followingly:

  auto enp0s31f6
  iface enp0s31f6 inet dhcp

  auto enp0s31f6:0
  iface enp0s31f6:0 inet static
          name Ethernet alias LAN card
          address 192.168.1.20
          netmask 255.255.255.0
          broadcast 192.168.1.255
          network 192.168.1.0

My problem was that since originally my ethernet was not defined in the etc/network/interfaces and I didn't define it, the system lost it's connection to the network.


Can I use an old home directory in my new Ubuntu installation?

You most certainly can. I've been doing that for a while now.

During installation, you should make sure that you select the old home partition to be used as "home" and that you do not format it. That is basically all there is to it; that's how you use your old home partition.

Now, because you mentioned you did some things wrong, you will probably want to delete your old settings as well. Most (all? Any gurus here to confirm?) of these are stored in the dot folders and files (e.g. /home/zignd/.filezilla/ or /home/zignd/.config/). By moving all the dot folders and files away from /home/zignd/ to for example /home/zignd/backup-dotfiles you can reset all the settings. By moving instead of removing you can restore the settings you'd want. For example, the .filezilla folder might contain some settings you can still use and is most likely not responsible for the issues you have.


.run file is not working. I double click and get: could not display, file is of unknown type

.run files are usually scripts. You can open them with text editor to see what is inside. In most cases, double clicking them should either run, or prompt asking you whether to run.

If the GUI does not provide an option to run them,

Open a terminal ( Shortcut Ctrl+Alt+T )
Change directory. Type cd /path/to/file and hit Enter
ls -l <file-name>.run and see the output.

If you dont see a 'x' in the first collumn, Type chmod +x <file-name>.run and hit Enter
If you see something like -rwxrwxr-x , skip to next step.
 This is to check if the file is executable, and make it if it is not.

Type ./<file-name>.run and hit Enter


Lost info when changing language on Ubuntu

I notice that in RECENT access can see OLD files. in HOME folder are both folders. english and spanish, al content are on that old folder. just need to cut and past.


I use ndiswrapper to connect to wireless on ubuntu 12.04
which you can find a tutorial here
https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper


Can't find Lubuntu option alongside Mac OS X

It looks like you've got a mixed BIOS-mode/EFI-mode installation. These can be tricky, although on average they're less tricky on Macs than on PCs. Nonetheless, using a BIOS-mode GRUB to boot OS X will be difficult to impossible. Your easiest course of action is likely to be to install my rEFInd boot manager in OS X. Once installed, it should detect your Lubuntu installation and enable you to boot it directly. (It will probably also offer an option to boot Lubuntu via the GRUB on /dev/sdb, which might or might not work.) If you can boot directly (via the boot\vmlinuz-* options), you can remove the redundant or non-functional BIOS-mode GRUB by editing refind.conf: Uncomment the scanfor line and ensure that hdbios is not among the options.

One caveat: If you're running OS X 10.11 ("El Capitan"), you'll have to jump through some extra installation hoops, as described here.

One final comment: Your /dev/sda has a hybrid MBR. This is ugly, unnecessary, and dangerous. I recommend you replace it with a conventional protective MBR. Doing any trivial operation on the disk with GParted will do this; or you can use gdisk: Type x to enter the experts' menu, followed by n to create a new protective MBR, and then w to save the changes. Your /dev/sdb uses an MBR (with no GPT). This is unusual in the context of a Mac, but it should be fine and cause no real problems if you follow my advice. I can't say how GRUB or the Mac's built-in boot loader would react to the mixture of GPT on the first disk and MBR on the second, though.

EDIT:

Oh, wait. I hit the post button when I realized something: You have no EFI System Partition (ESP). This complicates matters. There are at least three possible ways to proceed:

Install rEFInd from OS X, but do so by running the refind-install --notesp command (adding the --notesp option). This will install rEFInd to the main OS X partition on /dev/sda2.
Convert /dev/sdb from MBR to GPT (by running gdisk on the disk) and make /dev/sdb1 your ESP by giving it a type code of EF00 (in gdisk; this is called a "boot flag" in parted and GParted). You should then be able to install rEFInd with its default options, which will put it on your ESP (/dev/sdb1). Note that this approach presupposes that /dev/sdb1 is not currently being used for anything else. (Based on its size and location, it does look like it might have been intended as an ESP at some point.)
Use gdisk or GParted to create an ESP on /dev/sda. There's enough room before /dev/sda1 for an ESP, so I suspect that one might have existed there at one point but been deleted. In any event, if you use GParted for this (make it FAT32 and give it a "boot flag"), it will also remove the hybrid MBR. You can then install rEFInd normally and it will be installed to the ESP on /dev/sda (probably /dev/sda1).


Only minutes after posting this question, the initial resync cancelled itself again by moving the oldest of my disks to a "spare" location, before even hitting 100%.

Even though the device did not reveal any smartclt issues, it turned out that it was in fact broken. This was established by badblocks, which revealed thousands of broken sectors.
Replacing that disk with a new one fixed the issue for me.


why everything is reverted back in PATH env variable after reopening shell?

Put your permanent path changes into your .profile   "reopening" is starting another terminal from scratch, and it get the PATH from the system (or your) PATH setups, not from some past session.


Unity Launcher 'Background' Will not Auto-Hide With Launcher Icons

unity --reset should reset your unity configuration if you're on 12.04 or earlier release.  Not sure what the command is for 12.10.

As an alternative to ccsm - which is not a bad program but seems to cause problems for some people - the MyUnity app is available from Software Center and will let you change the launcher behavior including auto-hide and transparency.


How to set the default network interface for dhcp?

I suggest that you edit the netplan file to change enp4s0 to enp5s0 and save. Follow with:

sudo netplan generate
sudo netplan apply

and then reboot. Did you get an IP address? Check:

ping -c3 www.ubuntu.com

If you get ping returns, you are well and truly connected


Stability of the latest daily build iso image for the released version of Ubuntu?

Daily isos of final releases are updated and stable.
I suggest to keep them daily updated with zsync.

Linked Question:

How do I update an ISO with zsync?


does the problem also occur with another shell?

You could e.g. open the terminal, then start another shell by typing:

sh

and then work with this shell. Is the problem reproducible using sh (instead of e.g. bash)?

Greetings from Switzerland, Michael


How to display network traffic in the terminal?

Here are some nice tools in the Ubuntu repositories for command line network traffic monitoring:

bmon -  shows multiple interfaces at once

slurm - has nice colored graphs

tcptrack  - A favorite. Tells how much bandwidth is being used and also what protocol (service/port) and destination the transmission is taking place to.
Very helpful when you want to know exactly what  is using up your bandwidth


I am in no way certain about this, but I suspect that it refers to the usage calculation and not the RAID implementation in itself. It's true that the RAID 5/6 implementation has known bugs and limitation, but it is none the less implemented.

If I'm mistaken I would gladly be corrected!

edit: Looks like I might be right


This can be achieved with an altered version of the script which can be found here.

#! /bin/sh
find /etc/apt/ -name '*.list' | while read -r apt do
    grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" "$apt" |
        while read entry ; do
            user=$(echo "$entry" | cut -d/ -f4)
            ppa=$(echo "$entry" | cut -d/ -f5)
            echo "ppa:$user/$ppa" | grep "$1"
        done
done

So in order to search for PPAs which contain a certain string run it as follows (in this example I have assumed that you have saved the file as searchPPAs and have also made it executable (chmod +x searchPPAs — make sure you do this in the same directory you save the file in)):

./searchPPAs <stringToSearchFor>


How extract strings from a .ui file (glade) with gettext?

You need to tell xgettext that your file is a Glade file:

 xgettext -k_ -kN_ -L Glade -o messages.pot *.ui


Looking for a pci wireless card for a ubuntu-based access point. Any recommendations?

Indeed there are many adapters that work, however there may always be some compatibility issues when upgrading. My recommendation would be to install an external WLAN adapter that connects to the Ethernet LAN adapter thus being OS independent.

For me, the Buffalo WLI-TX4-AG300N Wireless-N Nfiniti™ Dual Band Ethernet Converter just does it's job and I can highly recommend this device even though it's priced slightly higher than an external or internal WLAN N card. In your case, when you run short of PCI slots you may find it very convenient.


Which circuit simulator can be used with ubuntu 16.04?

Looks like Qucs is what's recommended in the UbuntuEngineering wiki:

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

It's stated to be available in the Ubuntu Software Center


Make shell script default to run file extension

You can try creating a .desktop file in /usr/share/applications (or ~/.local/share/applications, if only for one user) like explained here (works for other desktops too).

To link this program to .asm files you first have to create a mimetype for .asm files.

In order to do so you have to add/modify the line

text/x-asm                asm

in /etc/mime.types

In the .desktop file you should add the line

MimeType=text/x-asm;

so it's added to the "Open with" menu.

To finally make your script the default application for .asm files add

text/x-asm=yourscript.desktop

to /usr/share/applications/defaults.list

Edit: To make it work immediately you should probably run update-desktop-database after your changes.


Nvidia Current shows 304 driver but i require a 331 driver

If you install or upgrade to Ubuntu 14.04 you can install nvidia-331, NVIDIA CUDA toolkit and the NVIDIA CUDA 5.5 Runtime library directly from the default Ubuntu repositories. libcudart5.5 is the package name of the NVIDIA CUDA runtime library. libcudart5.5 requires the nvidia-331 or more recent graphics driver. There is also an NVIDIA CUDA toolkit package (nvidia-cuda-toolkit) in the Ubuntu Software Center for Ubuntu 14.04, and like libcudart5.5 it is also version 5.5. Yes, I know the version in Ubuntu 14.04 is lagging behind NVIDIA CUDA toolkit 6 (See this answer for information about how to install NVIDIA CUDA toolkit 6).

This answer has a screenshot showing that the NVIDIA CUDA runtime library is running on an Nvidia GeForce GT610 graphics card in Ubuntu 14.04.


Install native texlive in parallel to repo version

Disclaimer: I have found a solution and it seems to work well.

Update: I can now confirm that the procedure below works as well with Texlive 2015.

In general it looks like working with parallel installations is easier than expected. To setup the native version I did the following:

Download the net installer, and extract it in a temporary location (the net installer is an interactive command line tool, allowing to modify various settings during setup).
Run the installer portable mode, i.e., install-tl -portable. This will bring up the main menu of the installer.
In this setting menu, I simply changed the TEXDIR (by pressing D) to a path within my home, e.g., ~/bin/texlive. This automatically changes the other TEXDIR* as well. I did not change anything else (installation scheme was set to scheme-full). Overall, the installation with the net installer is very convenient.

Inspired by the documentation section "Environment variables for Unix" I created a file setenv.sh in the installation directory with the following content:

dir=`cd \`dirname $0\` && pwd`
export PATH="$dir/bin/x86_64-linux:$PATH"
export MANPATH="$dir/texmf-dist/doc/man:$MANPATH"
export INFOPATH="$dir/texmf-dist/doc/info:$INFOPATH"

In order to switch to the new texlive distribution I simply source this file. So far, it looks like everything is working well with both the existing and the new texlive distribution.

It looks like Kpathsea is the tool in texlive which is responsible for locating the different parts/directories of the distribution (Kpathsea path searching). I wrote the following script to check whether switching to the new distribution really changes all those TEXMF* directories:

echo "which kpsexpand: `which kpsexpand`"
echo "TEXMFDIST:       `kpsexpand '$TEXMFDIST'`"
echo "TEXMFLOCAL:      `kpsexpand '$TEXMFLOCAL'`"
echo "TEXMFHOME:       `kpsexpand '$TEXMFHOME'`"
echo "TEXMFCONFIG:     `kpsexpand '$TEXMFCONFIG'`"
echo "TEXMFSYSCONFIG:  `kpsexpand '$TEXMFSYSCONFIG'`"
echo "TEXMFVAR:        `kpsexpand '$TEXMFVAR'`"
echo "TEXMFSYSVAR:     `kpsexpand '$TEXMFSYSVAR'`"
echo "TEXMFCACHE:      `kpsexpand '$TEXMFCACHE'`"

Running this without sourcing my setenv.sh file gives the following output:

which kpsexpand: /usr/bin/kpsexpand
TEXMFDIST:       /usr/share/texmf-texlive
TEXMFLOCAL:      /usr/local/share/texmf
TEXMFHOME:       /home/bluenote/texmf
TEXMFCONFIG:     /home/bluenote/.texmf-config
TEXMFSYSCONFIG:  /etc/texmf
TEXMFVAR:        /home/bluenote/.texmf-var
TEXMFSYSVAR:     /var/lib/texmf
TEXMFCACHE:      $TEXMFCACHE

This shows that the standard texlive from the Ubuntu repositories is in use. After sourcing, the output becomes:

which kpsexpand: /home/bluenote/bin/texlive/2013/bin/x86_64-linux/kpsexpand
TEXMFDIST:       /home/bluenote/bin/texlive/2013/texmf-dist
TEXMFLOCAL:      /home/bluenote/bin/texlive/2013/../texmf-local
TEXMFHOME:       /home/bluenote/bin/texlive/2013/../texmf-local
TEXMFCONFIG:     /home/bluenote/bin/texlive/2013/texmf-config
TEXMFSYSCONFIG:  /home/bluenote/bin/texlive/2013/texmf-config
TEXMFVAR:        /home/bluenote/bin/texlive/2013/texmf-var
TEXMFSYSVAR:     /home/bluenote/bin/texlive/2013/texmf-var
TEXMFCACHE:      /home/bluenote/bin/texlive/2013/texmf-var:/home/bluenote/bin/texlive/2013/texmf-var

I don't fully understand why using a different binary causes all these "tex variables" to change as well. I was expecting that the binary has no information that it is part of a different distribution, but fortunately it has! Note that these "tex variables" are no unix-like environment variables (that's why it is important to use single quotes when passing them to kpsexpand). I'm a bit surprised that I did not have to modify any of them via export -- in fact, they are all undefined. But so far everything seems to be working.


Ubuntu Kernel Source Code for NAT Firewall

To find the Linux source:

$ apt-cache search linux-source
linux-source - Linux kernel source with Ubuntu patches
linux-source-3.13.0 - Linux kernel source for version 3.13.0 with Ubuntu patches

To install the Linux source:

$ sudo apt-get install linux-source linux-source-3.13.0

To see what you got:

$ dpkg -L linux-source-3.13.0

Then, to find files with "_nat" or "nat_" in the name:

$ tar tvf /usr/src/linux-source-3.13.0.tar.bz2 | egrep '_nat|nat_'


Could try:
su -l user;exit;

That would switch to the user, then drop the root session if the user logs out.


High System Load, Low CPU/RAM Utilization on Ubuntu 15.04

This ended up being what I believe to be a kernel bug. Upon updating to 4.0.0-040000-generic #201504121935 my CPU wait has been normal and system load under .10 in most cases unless something is happening on the hosted servers.

Anyway, I used the following link to help : http://ubuntuhandbook.org/index.php/2015/04/upgrade-to-linux-kernel-4-0-in-ubuntu/

and just to keep in compliance with the rules, I did the following as root and then rebooted the machine:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000_4.0.0-040000.201504121935_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-image-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb
dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb
update-grub

As far as how I came to this - after reading through countless forums and newsgroups/mailing lists and getting nowhere (tried messing with BIOs, boot options, commit=60, disabling services, changing physical server location, etc.) I decided to either downgrade or update the kernel...being that 15.04 is new I updated. Still unsure the root cause as I haven't seen any other reports of this issue, my assumption is when I used rsync from my old 14.10 system a faulty driver was copied over or a faulty kernel file - why 4.0.0 fixes this is beyond me...but at least no more kworker writing every 5 seconds to kern.log and my harddrives.


php5-imap on Ubuntu 14.04 is not enabled

Yes this is a little odd. The steps involved to install this (for future users who have problems are as follows)

sudo apt-get install php5-imap
sudo php5enmod imap
sudo service apache2 restart


That may be because you have not assigned the filesystem type (ext4).
Maybe this question can also help you => "No root file system defined" error while installing ubuntu


convert crt and key openvpn files to ovpn

I suggest you follow the Digital Ocean tutorial found here. Start at Step 4 - Creating a Unified OpenVPN Profile for Client Devices.

A summary of the process -

Edit the .ovpn file to include your server's address
Paste the contents of the ca.crt, client1.crt, and client1.key files
directly into the .ovpn profile
Make a few other small modifications as listed


I think a couple of minutes of boot time is a bit much than normal, but is still possible most than likely on some old machines. You didn't include your hardware configuration details, but the measured time is more than 115 sec, which makes me think that at least you have a hard drive disk in there not a solid state drive.

If you are looking for performance increase I would suggest upgrade/change your hard drive to SSD. It's not a tricky turn after all if you are not about purchasing a new computer.

Even having SSD drive in old machine will bring a performance increase because the device will not suffer with big time delays due to fragmentation.


How to remove the upper bar of applications

For Chrome/Chromium go to Settings -> Appearance and turn off the 'Use system title bar and borders' option:

For Firefox go to ☰ -> Customize and turn off the 'Title bar' option in lower left corner:

Also for all applications you can use GNOME extension called Pixel saver. It removes title bar only from maximized windows but you will have access to maximize/minimize buttons in GNOME panel.


Hardrive is full with 0 space left can't access admin account

During boot up does it try to start a graphical environment then hang?

If so, you should be able to press Control-Alt-F1 to break out to a text terminal session. This might let you login.  Press Alt-F7 to return to your graphical environment.

Original install media (DVD/CD/USB)

Lastly, you may have to bite the bullet and boot from your original install media to get a recovery session and clean up some space on your boot drive.


Ubuntu 16.04 – Disable internal WIFI while enabling external WIFI adapter

Use ifconfig to control the interfaces. You can type ifconfig into terminal.

Both your WiFi cards would pop up as "wlan0" or "wlan1" or other names. Shut down the interface using ifconfig wlan0 down. If you found that you shut down the wrong one, use ifconfig wlan0 up to enable it.
You need root privilege to do this, so use sudo ifconfig ...


Defining two different partitions for home for different users

Here is what I did to accomplish what I was trying to achieve:

I changed the mount point for /dev/sda9 to /aux rather than /home/cjowett.

I defined user cjowett letting all files go to the normal spot on /dev/sda8
then a created a temporary link /tmplnk under /home pointing to /aux.

I moved everything:

mv /home/cjowett/* /tmplnk

then I deleted /home/cjowett and renamed the temporary link.

I had to change some ownership's and permissions along the way so steeldriver was onto something with his question above. It was likely ownership and permissions that was creating the problem in the first attempts.


About multi-user accounts, multiple programs in Ubuntu

If using a standard installation procedure then yes, User B will be able to use the software installed by User A.

There are however utilities that once installed locally will only work locally. (E.G. simple utilities installed in /home/user/bin)


Is there a way to get mouse cursors bigger than 64x64?

Welcome to AskUbuntu!
It looks like you've already exhausted the cursor options in the GUI system settings accessibility menu in GNOME.
To set a custom cursor size using the terminal, you can use the following command:
gsettings set org.gnome.desktop.interface cursor-size 96

The 96 at the end of this command appears to be the largest size that works when I test this on Ubuntu 20.04.  You can also set this value to 24, 32, 48 and 64.

Now I'd also like to address your question asking if you might have a better experience using a different desktop environment:
TL;DR:
Other desktop environments can offer more fine-tuned customization at the expense of a uncomplicated and consistent UI experience.
The GNOME3 desktop used in the "vanilla" flavor of Ubuntu has advantages and disadvantages for sight-impaired users.
For its benefits, GNOME tends to have wider margins around text.  This makes things easier to read.  GNOME devs have also put a lot of effort into making the desktop a consistent UI experience.  That consistent experience means that nearly all of the time, you can expect to find UI elements in a consistent location without having to scan the whole screen.
For its disadvantages, in comparison to other Ubuntu flavors, GNOME generally has fewer customization options for the end user using the built in "System Settings" menus.  This means that it might be more difficult to fine tune the UI to exact specifications.
Just using one example of this, in GNOME3, there is an ON/OFF option in Universal Access for "Large Text" which makes all of the text a little bit bigger.  This is the extent of the user options to adjust the appearance of text using the built in System Settings.  That's not to say that this is the end of the road with GNOME; there's additional software like "Gnome Tweaks" that add additional functionality to system settings, and there are often ways to further customize the desktop with terminal commands or by creating configuration files.
By comparison, In Kubuntu (KDE), the default "System Settings" model under Appearance > Fonts allows you to set the font and its size, style, and weight-- and you can set these separately for each of the following UI elements: General, Fixed Width, Small, Toolbar, Menu, Window Title.  You can also customize the font DPI and you can also fine-tune font anti-aliasing or turn it off completely.

As for the cursor settings in KDE you can actually choose a cursor theme.  Cursor themes can support multiple sizes.  The two built in cursor themes (white w/ black outline and black w/ white outline), they only support sizes of 24, 36, 48, as well as "resolution dependent".  The cursor is not as big as the size 96 in GNOME, but there are currently 959 cursor themes in the KDE store.  It would be fairly tedious to go through them, but if you want to find the perfect cursor, you've sure got a lot of options.

In my experience, the most accessible workstation is the one tailored to the abilities of the specific individual user.
What I would definitely recommend is that you "TRY" out some of the different flavors of Ubuntu before you commit to anything. You can boot from USB installation media for any of Ubuntu's flavors and use the "Try Ubuntu" option and it will not affect your existing installation.  This will let you experiment with different applications and see what kind of features they have that you could benefit from.
Here's a link to the official "flavors" of Ubuntu:
https://ubuntu.com/download/flavours


How to copy from a pdf to another pdf in ubuntu/linux

uPDF is an editor tool to write and paint to an existing pdf file. uPdf can insert pages of another pdf, insert new pages, remove and extract pages, rotate pages, paste a text or an image in the existing pdf, and much more.

You can install it in Ubuntu using ppa. For the moment, as I checked on https://launchpad.net/~atareao/+archive/updf, the uPDF ppa supports only Ubuntu 12.10 and 12.04. To install it, open a terminal and run next commands:

sudo add-apt-repository ppa:atareao/updf
sudo apt-get update
sudo apt-get install gir1.2-rsvg-2.0 updf

If you use KDE you may also need to install the following dependency:

sudo apt-get install-0.1 gir1.2-appindicator3

More info: Install uPDF (effective pdf editor) in Ubuntu 12.04 /12.10

Another tool for editing pdf files and that can be found in Ubuntu Software Center is Master PDF Editor  - a complete solution for view, print and edit PDF and XPS files.


Try logging in at the usual login screen with Xorg instead of Wayland. Click the gear icon to the left of the  Sign In  button and select Ubuntu on Xorg from the dropdown menu. This selection will be persistent across reboots unless you switch back to Wayland.

If that doesn't work try switching the login display manager from gdm3 to lightdm. LightDM is a more lightweight login display manager than gdm3. Open the terminal and run the following commands:

sudo apt install lightdm
sudo dpkg-reconfigure lightdm
sudo reboot

sudo dpkg-reconfigure lightdm will open up a new window allowing you to select lightdm as the default login display manager. Use the arrow keys to select lightdm, press the Tab key to put the focus on <OK> and press Enter. Then reboot by running sudo reboot


How can I allow ap-hotspot in ufw Ubuntu 14.04?

From what I can tell

dnsmasq uses port 53 tcp/udp, as well as port 67/udp

dhclient by default uses port 68/udp

So a generic way to get this setup would be

 sudo ufw allow to any port 53
 sudo ufw allow to any port 67 proto udp

 sudo ufw allow to any port 68 proto udp

Or if you want to just open these ports for a particular IP address (not sure if you get a static address)

 sudo ufw allow from xxx.xxx.x.xx to any port 53
 sudo ufw allow from xxx.xxx.x.xx to any port 67 proto udp

 sudo ufw allow from xxx.xxx.x.xx to any port 68 proto udp

You can also add the entries to /etc/services and then ufw will understand when you try

 sudo ufw allow dnsmasq
 sudo ufw allow dhclient

To do so just edit

 sudo nano /etc/services

Take a look at the file and it pretty straight forward, but basically you will add

 dnsmasq 53/tcp
 dnsmasq 53/udp
 dnsmasq 67/udp

 dhclient 68/udp

And then

 sudo ufw allow dnsmasq
 sudo ufw allow dhclient

Should work.


How do I install a Java plugin for Google Chrome?

http://www.iasptk.com/ubuntu-oracle-java7-jdk7-jre7-firefox-chrome-plugin

Ubuntu. Oracle Java 7. Install the Firefox/Chrome Oracle Java 7 plugin

In a terminal:

mkdir ~/.mozilla/plugins

Remove the IcedTea plugin, if it has been installed.

sudo apt-get remove icedtea6-plugin

Remove a former version of the Java plugin (may or may not be present)

sudo rm ~/.mozilla/plugins/libnpjp2.so

Now you can install the plugin, by creating a symbolic link (you tell Firefox, where the plugin is located).

sudo ln -s /usr/lib/jvm/jre1.7.0_09/lib/i386/libnpjp2.so ~/.mozilla/plugins/


Ubuntu 14.04.1 LTS: tc filter rule hits not shown

echo 1 > /sys/module/sch_htb/parameters/htb_rate_est