Why does lsusb show devices connected to a USB 3 port as connected to USB2 root hub?

Why does lsusb show USB2 devices connected to a USB3 port as being
  attached to the USB 2 root?

Answer :

  In USB 3.0, dual-bus architecture is used to allow both USB 2.0 (Full
  Speed, Low Speed, or High Speed) and USB 3.0 (SuperSpeed) operations
  to take place simultaneously, thus providing backward compatibility.

Source: https://en.wikipedia.org/wiki/USB_3.0

For instance, on a machine that contains two 2.0 USB ports and one USB  3.0 port, the output of the lsusb command shows:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8004 Intel Corp.
Bus 003 Device 001: ID 1d6b:0008 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 058f:6386 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 001: ID 1d6b:0007 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The extra USB 2.0 root hub is part of the USB 3.0 root hub and is available there to provide backward compatibility with USB 2.0 standards. As a result of this, when you connect USB2 devices into  USB3 port, they are shown connected to 2.0 root hub.

  Is there a way to get the physical rather than logical mapping of USB
  ports to hubs?

Answer:
Use lsusb -t

-t     Tells lsusb to dump the physical USB device hierarchy as a tree.

Source: lsusb man page

  Coming back to my original reason for looking into this, is there a
  way to tell what speed the internal SD card reader is capable of
  before buying one?

This can be done by using the following steps. Here we are considering a laptop with a built-in card reader from Alcor Micro Corp.

Use lsusb command

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8004 Intel Corp.
Bus 003 Device 001: ID 1d6b:0008 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 058f:6386 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 001: ID 1d6b:0007 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Find out the Bus number of the card reader. In this example it is 001
Use lsusb -t

$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 5: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M

At the end of each line, the negotiated communication speed for each device is shown in Mbits/s.
The 480Mbit/s is called "Hi-Speed" and is used with USB2.0.

For USB 3.0, the negotiated communication speed is 5000Mbit/s called "SuperSpeed" (5Gbit/s)

Source: https://en.wikipedia.org/wiki/USB

Result: the card reader from Alcor Micro Corp supports USB 2.0 standards and not USB 3.0 standards as 480M was mentioned in the output.


Here's a more complete answer that works from any Linux distro:

static int menu_proxy = -1;
typedef void *(*KVoidPtoF)();

void *proxylib;
KVoidPtoF gtk_menu_proxy_get;

menu_proxy = 0;
proxylib = dlopen("libappmenu.so", RTLD_NOLOAD | RTLD_LAZY);
if (proxylib)
{
    gtk_menu_proxy_get = (KVoidPtoF)dlsym(proxylib,
        "ubuntu_menu_proxy_get");
    if (gtk_menu_proxy_get && (*gtk_menu_proxy_get)() != 0)
        menu_proxy = 1;
}


Not all updates can be installed: partial upgrade

Yes, do try and run

sudo apt-get install -f

From the --help usage text we find

-f  Attempt to correct a system with broken dependencies in place

You can get to this by using

apt-get install --help

Another good way to read up on usage is with man pages. The man page for apt-get states

-f, --fix-broken
       Fix; attempt to correct a system with broken dependencies in place.
       This option, when used with install/remove, can omit any packages
       to permit APT to deduce a likely solution. If packages are
       specified, these have to completely correct the problem. The option
       is sometimes necessary when running APT for the first time; APT
       itself does not allow broken package dependencies to exist on a
       system. It is possible that a system's dependency structure can be
       so corrupt as to require manual intervention (which usually means
       using dselect(1) or dpkg --remove to eliminate some of the
       offending packages). Use of this option together with -m may
       produce an error in some situations. Configuration Item:
       APT::Get::Fix-Broken.

There's nothing wrong with running the partial upgrade, incidentally, it generally fixes the problems in the package manner. Please let me know if you continue having these problems afterward.
Best regards


Restricting IP address not working in phpmyadmin

I figured it out there is a configuration duplication. The main configuration file of PhpMyAdmin package (/etc/apache2/conf.d/phpmyadmin.conf) configure the directory "/usr/share/phpmyadmin", and ISPConfig re-configured it again in "/etc/apache2/sites-available/ispconfig.conf"! Honestly I didn't expect this duplication but I choose to disable the one in "/etc/apache2/sites-available/ispconfig.conf" and restriction now works.

ISPConfig is great but I think developers should consider this small issue and alike.


apt-get full-upgrade includes updating (or only both types of upgrading)?

No.

apt full-upgrade works the same as apt-get dist-upgrade.

You still need to update your package database with apt update first.

Note: there is officially no such thing as apt-get full-upgrade.  The full-upgrade verb can only be used with aptitude or apt.  On apt-get you need to use dist-upgrade for the same thing.


Shutdown menu missing from unity indicators

Make sure you have the package indicator-session installed.


Why is Ubuntu 18.04 battery life superior to Lubuntu 18.04 in a Dell 7577

Have you installed Lubuntu to the disk? If so, it could possibly the power draw of the HDD. A modern SSD, provided it has lower power consumption, may help. More simply power management is done by xfce power manager - have you tried tweaking there?

The most likely cause, as you've already identified though is your Nvidia driver. I don't have an Nvidia card so I can't help with that. Last time I had graphics driver issues in Lubuntu 16.04 I had to tweak settings in /usr/share '/X11/xorg.conf.d/'.

Hope you get it sorted as I'm a fan of Lubuntu too despite having a relatively powerful laptop. I also want to squeeze as many minutes out of it as possible!

Good luck!


I'm still on windows 8, will my Firewall (bitdefender total security) still function on ubuntu 12.04?

There's bad news and good news.

Bad News: You Almost Certainly Can't

BitDefender Total Security appears to be for Windows only. Assuming that is the case, it will not run when you are running Ubuntu, and there is little to nothing you can do about that.

That page doesn't explicitly say the software is Windows-only. But I downloaded the free trial, which is Windows only. Nowhere (that I can see) does it say it supports any other operating system than Windows. And I've never heard of a program like BitDefender Total Security supporting Ubuntu.

Some Windows programs can be run on Ubuntu with Wine. Firewalls cannot. The active monitoring antivirus part of the software will also not work. Manual virus scanning will probably not work either, but you could try.

A good general rule for what you can and cannot do with Wine, which is usually correct, is that anything that changes the way your Ubuntu system works for anything besides Windows programs, will not work on Wine. Generally speaking it is not possible for any program running with Wine to restrict or extend the functioning of programs and services that are running on Ubuntu but not through Wine. Wine cannot (ever) be used to install and run Windows device drivers. It cannot be used to modify the operation of Ubuntu's network stack for Ubuntu programs. All these things are things that BitDefender Total Security must do, for even its most basic operation.

(These "rules" about what can and cannot be done with Wine are not actually security restrictions. Programs running in Wine can open files outside your Wine folder, for example. You should certainly not install untrusted Windows programs on Ubuntu with Wine anymore than it would be a good idea to do so on a real Windows system. It's just that, running a program on Wine doesn't make the rest of Ubuntu act like Windows.)

Good News: You Don't Need It

The good news is, you probably do not need this software in Ubuntu.

Firewalls to block incoming connections are often completely unnecessary when your operating system doesn't run unnecessary servers and make them unnecessarily open to access from the outside. Firewalls to prevent programs from "calling out" are rarely more than an inconvenience to you, when your operating system gives you effective means of installing and using only software you trust (and when there's far less malware for your OS, see below).
If you want to use a firewall in Ubuntu, there's one built in which you can configure.
Currently there is little to no malware in the wild that exploits Ubuntu. You should not install or run software you don't trust, but that's true on any OS and regardless of what security software is installed. Note that I am not saying that there are no significant security risks to Ubuntu users. For example, you are still about equally at risk of browser XSS exploits as users of Windows or OS X (or other GNU/Linux systems). But security software rarely protects effectively against that, anyway.

BitDefender Total Security is a firewall and also antivirus software, so both types of additional resources listed are relevant:

Ubuntu UFW documentation (for enabling/configuring the firewall)
Why is the firewall disabled by default?
Reverse Firewall or Application Firewalls?
Do I need to have 'antivirus software' installed?
What antivirus programs are available?


You can switch the alt and super keys using the keyboard configuration panel. I use xmodmap to switch the left keys and do a few more things. This setup appears to be more reliable over successive system updates. Here is my annotated .xmodmap:

! xmodmap for macbook keyboard.

! Vertical and horizontal mouse/touchpad scrolls like a touch screen.
! Note that 5 4 and 7 6 are reversed.
pointer = 1 2 3 5 4 7 6 8 9 10 11 12

! Switch left command and option (super and alt).
clear mod1
clear mod4
keycode 133 = Alt_L
keycode 64 = Super_L
add Mod1 = Alt_L
add mod4 = Super_L

! Right command and option are common keys that can be remapped
! using keyboard short cuts.
keycode 134 = Menu Break
keycode 108 = Pause Clear

! Map expose and dashboard to keys that can be remapped
! using keyboard short cuts.
keycode 128 = F15
keycode 212 = F16


For me, the

sysctl -w net.ipv4.tcp_window_scaling=0

is the best. To enable that setting automatically, add the "net.ipv4.tcp_window_scaling=0" to /etc/sysctl.conf


That depends on what you want to do.

The most stable driver, and the one that probably gives the best desktop experience is of course the X.Org driver. It has rather bad gaming performance and at least on 12.04 does not support hardware video decoding.
For gaming the fglrx drivers are usually more performant, also the power consumption is lower than with X.Org drivers. They also enable hardware video decoding (with software that supports it) and OpenCL GPGPU computing.

Now to the different fglrx versions:

The fglrx package contains the version of fglrx that was available when your installed Ubuntu version was released. If you install this and it works, you can be sure, that it will not be broken by updates.
fglrx-updates contains updated stable releases of fglrx (usually not the latest, but newer than fglrx). It will be updated from time to time and these updates might break compatibility with your hardware or introduce new bugs. Nevertheless, it's also expected to be more performant than fglrx
The experimental packages contain beta drivers. There is a rather high chance that they will not work or introduce new bugs, but they are probably again a bit faster. At least on 12.04 they are not compatible with hardware video decoding and do not come with OpenCL libraries.


Ubuntu actually has a built-in "guest user" account that might meet your needs. You can enter a guest session from the user switcher or by logging out and then choosing "Guest user" instead of your normal username.

To quote the Ubuntu help page about it:

  Once in a while a friend, family member, or colleague may want to borrow your computer. The Ubuntu Guest Session feature provides a convenient way, with a high level of security, to lend your computer to someone else. A guest session can be launched either from the login screen or from within a regular session. If you are currently logged in, click the icon at the far right of the menu bar and select Guest Session. This will lock the screen for your own session and start the guest session.

  A guest cannot view the home folders of other users, and by default any saved data or changed settings will be removed/reset at logout. It means that each session starts with a fresh environment, unaffected by what previous guests did.

https://help.ubuntu.com/stable/ubuntu-help/shell-guest-session.html

You might want to give it a try (since it doesn't require any extra software or setup) and see if it's what you're looking for.

Please let me know if this is helpful, or if you have any further questions!


aarch64-linux-gnu-gcc: error trying to exec 'cc1plus' : execvp: No such file or directory

cc1plus is the internal front end program name for the Gnu Compiler Collection's C++ compiler. It's being called in this case because gcc has detected that test.cpp is a C++ file rather than a C file.
You would get it by installing the corresponding g++ package for the C compiler that you are using. For the aarch64-linux-gnu-gcc cross compiler, that would be g++-aarch64-linux-gnu I think.
You should then use aarch64-linux-gnu-g++ to compile your .cpp sources.


What am I doing wrong with the code for timezone fix?

tl;dr: on current systems sudo timedatectl set-local-rtc 1 is the correct way.

You have been caught by a change in the way time is configured on Ubuntu. Editing /etc/default/rcS was how it worked before systemd as init system. (Either initd or upstart were used then).

In any case when you edit a file beneath /etc you set how the system acts after the next boot. To have the setting effective immediately you almost always have to give an additional command (either reload a daemon/service or talk to the kenel or ...)

So from 15.04 onward the setting in /etc/default/rcS is probably entirely ignored. See NTP in the Ubuntu server Guide, whereas UbuntuTime in the communit WiKi is a bit outdated and only mentions timedatectl way below.


There is no way, you can bind kp_enter key. Instead you can use this command - bind "enter" "buy vesthelm"

kp_enter is not bindable, follow this post - https://github.com/ValveSoftware/Counter-Strike-Global-Offensive/issues/51


sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl


OpenVPN connects but doesn't access any sites on Ubuntu 12.04

Nevermind, I just found the solution.

There's a catch in Ubuntu 12.04.

To to make it work go to IPv4 Settings and change Method to: Automatic (VPN) addresses only. After that go to DNS servers and enter the address of your favorite DNS server. I like OpenDNS, so the addresses will be: 208.67.222.222, 208.67.220.220.


My computer's not starting up without the Ubuntu usb

Sounds like grub has been installed to the usb.
From your booted Ubuntu system, open a terminal, then use the following commands to install grub to the internal drive  :

sudo grub-install /dev/sdX
sudo update-grub

Replacing sdX with the actual drive, which will probably be sda, but use disk utility to double check if you are unsure.

Accidently installed grub to usb


apt list --installed | grep -i amdgpu-pro


The solution is to wait for the Ubuntu developers to re-upload Python 3.4.3 to the updates repository. This should happen any day now. Keep your eyes on bug #1348954.

Edit: Fixed. Installing python3-dev works again.


Has there been a change in 19.04 with switching applications using (Super + tab)?

Wayland was the problem. When I switched the login setting from "Gnome" to "Gnome on Xorg" the probem was fixed.


Bash variable expansion behavior when using single or double spaces

This is a classic case of word splitting, done by shell, on unquoted variable expansion.

Basically when you do, $TEST (without quotes ("$TEST")), the shell:

Performs word splitting, based on the value of IFS environment variable (default: space, tab, newline), and splits the whole expansion into separate words
so as you have two consecutive spaces, the word splitting (and also pathname (glob) expansion if any of *, ?, [] is present) is done, and when the output string is rebuilt the words are joined by space, as a result you have only one space between right and <--HERE!. This would be true for any combination of IFS characters.

In a nutshell, quote your variable expansions:

"${variable}"


You should set the lock switch off in the System Settings/Brightness and Lock.

You can enter the System Settings with pressing down the “windows button” and type system settings.

Well this is not an elegant resolution, but works,


Getting errors in update in ubuntu 16.04

Remove the references to "http://deb.playonlinux.com...." and to "http://ppa.launchpad.net/pmcenery/..." from /etc/apt/sources.list


You need to consult your laptop's manual to find out what those beep sounds mean?

Regarding the various options in grub menu like ubuntu and advanced options etc...that's very standard. Please refer to this for more details.

Mine(/etc/default/grub) looks like this

ashu@ashu-700-430qe:/etc/grub.d$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

  [1]: https://help.ubuntu.com/community/Grub2

If you are having a lot of un-necessary grub entries, please refer to my thread here.

Hope this helps?


I found this web page.

libbow_20020213-10_i386.deb

It's a deb package which we can instantly install libbow without compile manually needed, but It has x86 compatible versions and MIPS version also.

Moreover, I found NLTK toolkit, an alternative tool that quite similar to libbow.


A quick Google shows a few people struggling with the older versions of Moodle. And looking at a package search for moodle, 10.04 ships a pretty ancient version.

There's almost certainly value in dumping the package version (with sudo apt-get purge moodle) and grabbing the official version from moodle.org. This will mean you'll need to go through the documentation manually and look after the install in the long term but these are honestly things you should be considering anyway.

Alternatively you might have more luck with a more modern version of Ubuntu. 10.04 is only supported until next year anyway, so an upgrade to 12.04 (and then 14.04 soon) might be the best course of action.


How to uninstall the WSL installation of Ubuntu 20.04 from Windows 10?

Uninstall a WSL installation of Ubuntu like a normal Windows 10 application. To uninstall Ubuntu, right-click the Ubuntu shortcut in your Start menu and click Uninstall.
To reinstall Ubuntu, download it from the Microsoft Store once again.

To (optionally) also uninstall Windows Subsystem for Linux:
Open the Control Panel and go to Programs -> Turn Windows Features On or Off. Uncheck the Windows Subsystem for Linux option there and click OK. Windows will uninstall Windows Subsystem for Linux, bash.exe, and lxrun.exe commands.

All that was good advice so far. The bad way to do it if nothing else works is to install an unlocker program in Windows 10, and unlock the file so that you can delete it.


I'm not 100% certain here but I think you are having issues with name resolution.

You will need to update the IP address the domain name mydcserver.mydomain.local points to.

Here is the link to the samba documentation on administering DNS records. I would propose that you need to delete the existing record for your domain controller and then add a new record pointing to the updated address.

Leave any comments and ill try and assist where I can!


Not installing softwares after changing the server

You can edit the /etc/apt/sources.list file manually. From there, you can change all the servers back to http://mirror.learn.ac.lk/ubuntu . On my desktop, this is listed as the Sri-Lanka mirror. You can use gedit, nano, leafpad, vi, or your favorite text editor to open the file with sudo permissions. Example:

sudo gedit /etc/apt/sources.list

The file should look like this or roughly similar based upon individual user prefrences.

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.learn.ac.lk/ubuntu precise main restricted
#deb-src http://mirror.learn.ac.lk/ubuntu precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.learn.ac.lk/ubuntu precise-updates main restricted
#deb-src http://mirror.learn.ac.lk/ubuntu precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirror.learn.ac.lk/ubuntu precise universe
#deb-src http://mirror.learn.ac.lk/ubuntu precise universe
deb http://mirror.learn.ac.lk/ubuntu precise-updates universe
#deb-src http://mirror.learn.ac.lk/ubuntu precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirror.learn.ac.lk/ubuntu precise multiverse
#deb-src http://mirror.learn.ac.lk/ubuntu precise multiverse
deb http://mirror.learn.ac.lk/ubuntu precise-updates multiverse
#deb-src http://mirror.learn.ac.lk/ubuntu precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirror.learn.ac.lk/ubuntu precise-backports main restricted universe multiverse
#deb-src http://mirror.learn.ac.lk/ubuntu precise-backports main restricted universe multiverse

deb http://mirror.learn.ac.lk/ubuntu precise-security main restricted
#deb-src http://mirror.learn.ac.lk/ubuntu precise-security main restricted
deb http://mirror.learn.ac.lk/ubuntu precise-security universe
#deb-src http://mirror.learn.ac.lk/ubuntu precise-security universe
deb http://mirror.learn.ac.lk/ubuntu precise-security multiverse
#deb-src http://mirror.learn.ac.lk/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
#deb-src http://archive.canonical.com/ubuntu precise partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
#deb-src http://extras.ubuntu.com/ubuntu precise main

Here is a condensed version of that list if it makes it any easier for you. In fact, you don't really need all that other stuff and the file will function the same with just these lines:

deb http://mirror.learn.ac.lk/ubuntu precise main restricted
deb http://mirror.learn.ac.lk/ubuntu precise-updates main restricted

deb http://mirror.learn.ac.lk/ubuntu precise universe
deb http://mirror.learn.ac.lk/ubuntu precise-updates universe

deb http://mirror.learn.ac.lk/ubuntu precise multiverse
deb http://mirror.learn.ac.lk/ubuntu precise-updates multiverse

deb http://mirror.learn.ac.lk/ubuntu precise-backports main restricted universe multiverse

deb http://mirror.learn.ac.lk/ubuntu precise-security main restricted
deb http://mirror.learn.ac.lk/ubuntu precise-security universe
deb http://mirror.learn.ac.lk/ubuntu precise-security multiverse

deb http://archive.canonical.com/ubuntu precise partner

deb http://extras.ubuntu.com/ubuntu precise main


I had exactly the same issue. Something changed between 11.10 and 12.04 concerning the connection between SAMBA and CUPS

Basically, until it gets fixed, you have to specify the printer manually.

Under XP and Vista, connect using (Add printer dialog, network printer):

http://ip-address-of-server:631/printers/PrinterName

Under Win7, connect using:

\\ServerName\PrinterName

This is a high priority confirmed bug. See http://ubuntuforums.org/showthread.php?t=1971847 etc.


Nautilus wont launch (Symbol lookup error)

You have a second installation of libgtk3 in /usr/local/lib that is incompatible with Nautilus (and likely other GTK applications from the package repository). Please either remove that GTK installation altogether or remove /usr/local/lib from the default search path for shared libraries.

I recommend the former (deinstallation of the GTK library) as it appears you don't know how it got there which means it likely servers no (more) purpose:

Go to the source code directory from which you originally built and installed the GTK library to /usr/local/lib. It should contain a file called Makefile or GNUmakefile.
Invoke its uninstallation routine:

sudo make uninstall


The solution is that apt has to be corrected configured with the proxy, which must be done both in /etc/environment  and /etc/apt/apt.conf For example, in /etc/environment I should have something like this:

http_proxy="http://XXX.XX.XXX.XX:XX"
https_proxy="http://XXX.XX.XXX.XX:XX"
no_proxy=1,2,3,4,5,6,7,8,9,0

whereas in /etc/apt/apt.conf

Acquire::http::Proxy "http://XXX.XX.XXX.XX:XX";
Acquire::http::proxy::XX.XXX.X.XXX "DIRECT";
Acquire::https::Proxy "http://XXX.XX.XXX.XX:XX";

of course with the Xs replaced by the correct numbers.


How to change page in libreoffice by terminal?

xdotool to the rescue.

Write a little script (install xdotool first if you haven't already):

#!/bin/bash
mywindow=$(xdotool search --class libreoffice)
xdotool windowactivate $mywindow && xdotool key --window $mywindow Next

This finds the handle of the Libreoffice window (make sure that you have only one open), activates it (i.e. brings it to the foreground) and sends the Next keystroke to it. Next is the official name for the keystroke event associated with the PageDown button (PageUp would be Prior, I had to look that up using the xev command).

Save the script, make it executable, and execute it.

For some reason though, it doesn't always work the first time. In LO Writer, for example, it would put the cursor at the bottom of the first page. Subsequent executions would actually page through the document. I haven't tried it with an Impress presentation though.


How to find a program which is preventing sleeping?

I think I figured it out.

I used:

dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors

to get the list of inhibitors, like:

array [
   object path "/org/gnome/SessionManager/Inhibitor71"
   object path "/org/gnome/SessionManager/Inhibitor72"
]

Then I did:

dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager/Inhibitor71 org.gnome.SessionManager.Inhibitor.GetAppId

Which returned:

string "firefox"

It seems Firefox is preventing it. It seems that now when YouTube is playing it prevents sleeping.


Kubuntu 16.04 Where is apps store? and How do I install packages?

The "App Store" in Kubuntu is called "Muon Discover". You should look for this name.


In "System parameters > Mobile Phone > Operator > Name of the access point" or equivalent, check that your internet access point is enabled.


This is not possible, because notebooks with intel and NVIDIA hybrid graphics use are using the intel graphics as default. When you you want to select which graphics to use, you have to install the proprietary NVIDIA drivers and Optimus support. Then you can switch between the intel and the NVIDIA graphics adapter by using the NVIDIA X Server Settings application  -> PRIME Profiles.

To install the latest stable NVIDIA drivers open a terminal and execute the following commands :

sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot

Note : This assumes that you are running the latest stable Ubuntu 16.04 edition. In case you are running Ubuntu 14.04 or 15.10, you have to install nvidia-352 drivers instead of nvidia-361.


dpkg: error: unknown option --add-architecture

According to your guide, that's just for MultiArch support, I think that's already enabled by default in current Ubuntu's so it shouldn't matter... but apparently Ubuntu 12.04 (if that's what you're using, not sure at this time) isn't "fully multiarch" so if you get the "unknown architecture" messages try these:

Ensure the only file in /etc/dpkg/dpkg.cfg.d/ is multiarch then run echo 'foreign-architecture i386' | sudo tee /etc/dpkg/dpkg.cfg.d/multiarch
sudo dpkg --add-architecture i386
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" (to make sure the partner section repository is enabled)
sudo apt-get update && sudo apt-get install skype

And if those give problems, aptitude is supposed to be more persistent, this might yield better results:

sudo aptitude install skype


Maximum screen brightness not enough on Lenovo K49

You can try to add acpi_backlight=vendor as a bootparameter in GRUB.
Ubuntu will use the backlightproperties of your notebookvendor.
When I use it, I can change the Light much more smooth. Maybe you can make it brighter then, aswell

Read here for information about how to add a bootparameter to grub. I think this is a pretty good tutorial.

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

First you should try it temporarily. If it works as expected, you can add it permanently.


The home directory contains per-user settings, /etc contains system-wide settings and /var/lib/dpkg contains package state information. With that information, you can restore your system fully on a new installation.
A backup of your settings is the key solution: Comparison of backup tools

To make a disk clone (disk image), see How to make a disk image and restore from it later?

If you want to experiment, consider using a Virtual Machine with VirtualBox. Using VirtualBox, you can take snapshots of the system (even if running) which can be restored later.


Do not edit Xorg.conf.

If you installed Ubuntu 12.10 recently, then it is normal that the minimization animation is slow. This was made on purpose by the designers. It is to show how minimization works.

You should see that the animation gets faster and faster with time. This is automatic.


Mutter is the default window manager in gnome-shell. You don't have to start it manually, let alone with super user privileges. All you have to do is install gnome-shell and use it as session instead of Unity.


The "Permission denied" error and the "are you root?" message mean you don't have permission to do Apt installs, since you need to run the program as the root user.

You do that by using sudo in front of apt-get, as in:

sudo apt-get install linux-image-generic-pae


What can I do if a package is not available on the newest version of Ubuntu (18.04) but is available on older versions?

The easiest solution is probably to Download it from here and install it with software center. This is what I would recommend.

Alternatively, if you need a bunch of older software, it is possible to add older repos to your apt list. If you want to install stuff from Artful when it's not available in Bionic you need to add its repo to your list.

If the library is available in Artful do the following:

First create a file in sources.list.d with your options:

$ sudo nano /etc/apt/sources.list.d/artful.list

Add the following lines and save:

deb http://us.archive.ubuntu.com/ubuntu/ artful multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ artful multiverse

Then update and install:

$ sudo apt update
$ sudo apt install libesd0-dev


Playing a few seconds of the video with VLC solved the problem.

After using VLC to view the DVD for a few seconds, then closing VLC, I was able to use Acid Rip just by clicking Load (still with /dev/dvd) and Start.

I guess VLC has initialized something that Acid Rip did not do. Or it needed some more time or to be played at least by some player to be used in Acid Rip.


open windows share in Nautilus Ubuntu 19.04

You did not provide enough information to answer the question so I am going to guess. The assumptions I will use for this guess are:

** Your Windows machine has SMB1 disabled on the server side.

** You are trying to access the shares through "discovery": Nautilus > Other Locations > Windows Network > Host > Shares.

It's a bug in the way gvfsd-smb-browse operates:

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1778322?comments=all

https://bugs.launchpad.net/gvfs/+bug/1828107

There is no way around this issue at the moment but not being able to connect to the share via "discovery" does not mean you cannot access the share at all. You just have to do it by naming the host specifically in Nautilus:

smb://hostname/share

smb://ip-address/share

OR if you are running Windows 10 and have enabled mDNS through its firewall by its "mDNS hostname"

smb://hostname.local/share


In my opinion ssh is the best way to do it.  You can set it up so that you don't have to send a password at the login time.  You can copy the local ssh key to the server so that when you send the ssh command there is no password required.  NOTE: This works with any login on the remote host including root.

ssh-copy-id user@server

You would change user in the above command to whatever user can perform the shutdown.  To do root it would be ssh-copy-id root@server.

When the ssh copy is complete, then you should be able to send the commands without a login prompting for a password.

Then in your script or what ever sends the command to the remote server it would look like so:

ssh root@server 'shutdown -h now'

There would be no password required and the server would shutdown.

Hope this helps!


How to verify that the ISO I downloaded is bootable before I burn it?

isoinfo can probably tell you if it has the right files to boot if you want quick and dirty.
isoinfo -l -i is_it_bootable.iso will list the directory structure so you can check for files a live cd / bootable cd should have.

isoinfo -d -i is_it_bootable.iso will tell you if the CD has an El Torito section.  Ubuntu's live CD iso reports:

Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Key 55 AA
Eltorito defaultboot header:
    Bootid 88 (bootable)
    Boot media 0 (No Emulation Boot)
    Load segment 0
    Sys type 0
    Nsect 4
    Bootoff 8F 143


Forgot username while in recovery mode (have password), what to do?

I wanted to write this as a comment, but it's just too long. This presumes that you didn't wipe the partition during the install/upgrade and that it's still there. This presumes that you just updated/upgraded and didn't choose the format partition(s) option.
The following also presumes that you installed in a normal fashion and that you made no drastic changes to how your system operates.
Assuming all those are true...

Boot to your live instance as you're already able to.
Open "Files" from the dock on the left.
Click on "Other Places" (in the left sidebar of Files).
Find your hard drive. This may take a few guesses. It will be one of the larger partitions, more likely than not. It'd look a bit like this:

When you find your drive/partition, find the /home directory and open it.
Inside that directory, you'll find one more. THAT folder should be named the same name as your username. It looks like this:

If my images don't make sense due to the size, that's because I used a VM that's already installed and then booted to the live instance of Ubuntu over it. Thus it looks like my HDD is 10 gb, which it virtually is. Obviously, your username will be whatever you named it.


How to change brightness before logging in?

Running a script before or once login screen appears

There are two ways to approach this:

Place command or call to script in /etc/rc.local. For instance

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# path to my script. Note the & at the end, it's important
/home/serg/bin/brightness_set.sh &
exit 0

The login screen is actually known as desktop manager, and Ubuntu in particular uses lightdm desktop manager. Its configuration file /etc/lightdm/lightdm.conf can take greeter-setup-script= parameter to execute something before login screen actually shows up. For instance, you could do:

[Seat:*]
greeter-setup-script=/opt/set_brightness.py

NOTE: Older versions of the header [SeatDefaults] is deprecated now, use [Seat:*]. Also, if  you have never edited /etc/lightdm/lightdm.conf it will be blank - that's the normal behavior since 14.04 Ubuntu version.

Controlling the brightness:

Setting brightness will have to be done by writing to brightness file in  /sys/class/backlight/<NAME> directory. There are couple different <NAME> versions than can appear, for example mine is /sys/class/backlight/intel_backlight , so you will need to figure out the name your own computer uses or alternatively use /sys/class/backlight/*/brightness. There is also max_brightness file in the same location, which you can use as 100% value to calculate brightness to set. Both files accept integer value.

Common way to write into that file is via echo 123 | sudo tee /sys/class/backlight/*/brightness from command line. If you are running a script via /etc/rc.local or via greeter-setup-script= parameter mentioned above, sudo is not necessary, as both method run scripts with root privillege ( which is also important to remember for security reasons, so ensure your script is accessible only to your user or root only )
.

There are also alternatives to writing into /sys , but not all of them are good. In my experience xbacklight doesn't work for Ubuntu users and xrandr --output SCREEN_NAME --brightness INT is only a software solution (i.e., it doesn't actually decrease power of the screen, only makes screen turn darker color).

Additional resources

If you want more flexible control over brightness and set specific level based on time of day, see my script on the related question here
Arch Wiki article contains plenty of information about backlight and ways to control it.


Sir,
First find out which version of PHP your Apache2 is picking up for your running website. You can check it via
<?php
phpinfo();

Then to run multiple PHP version I'll suggest having a look how to install multiple version and to configure them via FPM. Just a caution, FPM works great on local but not for servers. So, install multiple version from either of the links.
First Link
Second Link
For FPM installation see this link.


proFTPd -- Operation not permitted on line 36 of '/etc/proftpd/proftpd.conf'

All you have to do is change permissions of password file.

sudo chmod o-rwx /etc/proftpd/ftpd.passwd

sudo service proftpd start

(alternative way: sudo /etc/init.d/proftpd start)


Installing 'wine' triggers a kernel panic, what can I do about this?

If nothing worked for you then you should give it a try!

When your system starts chose Safe Mode (2nd option in grub menu. Hold Shift while boots if your system starts directly without Grub Menu).
From the Menu just go to Grub option, it will give a message like Updating grub will mount your system in read/write mode. Just chose yes to mount your system in read/write mode. It will update your grub and will exit from Grub menu.
chose network option it'll enable your network.(May take some time)
Then chose dpkg menu from the list, chose yes for all.
Finally chose root option and login. Execute following commands one after another:

# apt-get autoremove
# apt-get autoclean
# apt-get -f install
# dpkg-reconfigure -a (it would take some time)
# apt-get update
# apt-get dist-upgrade (skip if don't want to upgrade)
# apt-get upgrade (skip if you don't want to upgrade)

Then finally execute following command to remove Wine

# apt-get autoremove wine
# apt-get --purge remove wine

Reboot your system and check if your problem is solved or not.

# reboot

Reply if something goes wrong.. or you need some help!


How can I fetch lyrics for all my music and store them within the files?

This is a semi answer as I don't know your environment and the code I provide is intended to serve as an example only - running it as is shouldn't do any harm but I can't give any guarantee.

Tasks like this can be dealt with using simple bash scripts, e.g. in the following example I use eyeD3 to extract artist and title, then a free wikilyrics mirror to fetch the lyrics and then eyeD3 again to save the new tag. I encourage every one who will use this code to look up another lyrics API, as exploiting the same service over and over can be considered malicious.

#!/bin/bash

_TPL='http://makeitpersonal.co/lyrics?artist=<artist>&title=<title>'
_SRY="Sorry, We don't have lyrics for this song yet."

[ "$1" ] && _PATH="$1" || _PATH=$PWD

cd $_PATH

for _FILE in {*.mp3,*.m4a}; do
    if [[ -r $_FILE ]]; then
        _SONG=$(eyeD3 --no-color "$_FILE" | grep title)

        _ARTIST="${_SONG#*"artist: "}"
        _TITLE="${_SONG%"artist: "*}"
        _TITLE="${_TITLE#"title: "}"

        echo -n "$_ARTIST - $_TITLE"

        _ARTIST="${_ARTIST// /+}"
        _TITLE="${_TITLE// /+}"
        _URL="${_TPL//"<artist>"/$_ARTIST}"
        _URL="${_URL//"<title>"/$_TITLE}"

        _LYRICS=$(wget -qO- $_URL)

        if [ "$_LYRICS" != "$_SRY" ]; then
            eyeD3 --lyrics=eng:Lyrics:"$_LYRICS" "$_FILE" 1>/dev/null
        else
            echo "No lyrics found... skipping!"
        fi
    fi
done

cd $OLDPWD

Instructions (run commands in terminal):

install wget and eyeD3 by issuing sudo apt-get install wget eyed3
save above code to a file, e.g. /home/user/lyrics_fetcher.sh
add permission to run the file: chmod u+x /home/user/lyrics_fetcher.sh
run the file (mind the quotes): /home/user/lyrics_fetcher.sh "path_to_my_album"
you can stop script execution at any time by pressing ctrl+c

I checked this code with "AM" album by Arctic Monkeys and it did sweetly.

If you really want to fetch lyrics for all of your albums at once you can run the script in a loop for each directory, I guess. Still, I wouldn't use it as a final solution - wikilyrics and everyone who supports it by mirroring are good guys and this answer is here to promote thinking, not abuse.


does apt-get checks cache directory before downloading packages

If you have the packages (.deb files), apt-get is not the best tool. Read man dpkg and use dpkg -i to install the .deb files.


How to change the application when opening a folder on the desktop

Ok, thanks to the hint of user vanadium I found out that thunar can not handle the desktop:
Question at stackexchange.com

So I have to deal with it...


Difficulty installing a dependency required to compile Doom 64 EX

Manual Installation

If you wish to install libsdl2-net-2 manually in Ubuntu, download the deb file from here.

  This is a small, low-level, cross-platform networking library, that
  can be used  with the Simple DirectMedia Layer library.

  This package contains the shared library.


What they ask you to do is ...

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update

This will update all the software that that repository holds (and that includes dota2).


Is Nitroshare transfer limited to a certain file size?

Update:

  As of NitroShare 0.3.0 (released March 21, 2015), this limitation no longer applies. NitroShare can now transfer files of any size. It also displays transfer progress on both the sending and receiving device.

  I was able to transfer files but only up to a certain size.

This is indeed a limitation of the current stable version (0.2).

  I see here that in fact the free version is the lite one, with clear limitations.

Actually, your screenshot is from the new website being prepared for NitroShare 0.3, which has not yet been released. You can safely ignore anything stated there when referring to NitroShare 0.2, which does not artificially impose any limitation on file size.

  But if that's the RAM, even the bugged limit is far larger than what I've experienced.

The underlying problem here is that NitroShare 0.2 loads each file into memory when transferring it over the network - so the size of the file is limited by the amount of available memory to the application. And that number depends on quite a few variables.

  Also, I do not see any progress bar in the "share box" on the desktop as supposed and illustrated here, not even when the transfer works.

If I remember correctly, NitroShare only displays progress on the machine sending the files. If you are not seeing progress on either machine, then that's a bug.


which OS version do I have: Linux (rpm) or Linux (deb)?

You want .deb

Ubuntu is a distribution based on Debian Linux, and as such it is (typically) compatible with Debian packages which have names ending with .deb


Just run amdcccle from terminal, you can also make a shortcut, to run as root use sudo amdcccle.


Have you tried to just double click the .deb file? That should install it using Ubuntu Software Center.


https://qgis.org/ubuntu/ is a separate repository.

HowTo add qgis-3 to Ubuntu → https://gis.stackexchange.com/questions/133033/installing-latest-qgis-version-on-ubuntu : QGIS 3.x will run on Ubuntu 18.04 ...

sudo sh -c 'echo "deb http://qgis.org/ubuntu bionic main" >> /etc/apt/sources.list'

The gpg.key will have to be added too.


The shift is not doing anything useful.

alt + n searches through your history forward; fetches the next command.


What's the latest version of Unity and Compiz in Ubuntu 14.04 LTS?

Currently the latest versions are

Unity: 7.2.6+14.04.20151021-0ubuntu1
Compiz: 1:0.9.11.3+14.04.20150313-0ubuntu1

To install the latest versions, you have to enable trusty-updates in Software & Updates.

Or edit the sources.list

sudo nano /etc/apt/sources.list

and add the lines below

deb http://archive.ubuntu.com/ubuntu trusty-updates restricted universe main multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-updates restricted universe main multiverse

to enable trusty-updates for all available repositories (restricted, universe, main, multiverse).

Add a # in front of deb-src … if you don't need source codes.


The easiest way to regenerate any package-provided file, including documentation, is to reinstall the package.

sudo apt install --reinstall package_name

However, sometimes documentation is provided by a different package:

dpkg -L package_name        // List of files installed by the package
apt depends package_name    // Other dependency packages, including doc packages

If you are unsure which package provided a file, it's easy to look up:

dpkg -S /path/to/file_name

And one tip: The package manager (apt/dpkg) cares about the presence of a file. Never manually remove a file placed by apt/dpkg. However, apt/dpkg cares not a whit for the content of that file. If you really wish, you can easily replace large doc files with tiny dummy files (at your own risk, of course).

sudo rm /path/to/file_name          // Warning: rm cannot be undone!
sudo touch /path/to/file_name

The 'du' command is very useful to determine if the space savings are worthwhile. Undo the substitution by reinstalling the package.


How to quick select which access point (or BSSID) to use for a given wireless network (aka SSID)?

I don't know of anyway to make the GUI show different connections for different BSSIDs, but the CLI tool, nmcli offers this option:

con    Connections
       Get information about NetworkManager's connections.
    COMMAND := { list | status | up | down | delete }
    ...
    up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>]
       [--nowait] [--timeout <timeout>]

This offers two ways to script a switch in access points:

Two connections, with different UUIDs, each with a BSSID specified in the connection settings.
One connection, with the script using the ap parameter to tell NM to connect to an AP.

I have never tried either, but both should be equivalent.


XPS 13 without Ubuntu. Can I take it to an OEM state?

Yes. simply install Ubuntu 12.04.

Source: http://www.ubuntu.com/partners/dell/dellxps

How: https://help.ubuntu.com/community/GraphicalInstall


Depending on what you want, you can use who's cousin w:

$ w
 17:40:49 up 11 days, 22:38,  4 users,  load average: 0.14, 0.13, 0.10
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
muru     tty7     :0               12Jan17 11days  2:24m  0.37s /sbin/upstart --user
muru     pts/24   127.0.0.1:S.0    17:36    0.00s  0.41s  0.00s w
muru     pts/26   127.0.0.1:S.2    17:38    2:33   0.19s  0.19s -/bin/zsh

It runs the active command on the login terminal. You can use the terminal ID to see which shell I started originally:

$ w -h | awk '{print $2}' | xargs -L1 pgrep -oat
1969 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
12703 -/bin/zsh
13398 -/bin/zsh

pgrep can:

match using a terminal (-t)
print the oldest matching process (-o)
print the whole command line (-a)


Package conflict while installing ms-sql in ubuntu. Broken packages

You should drop the .list from your sources.list line. The without list, it points to a directory (that apt expect). With .list, it is a file with a sources.list line.
Note that every change you do to that file (including its initial addition), only gets effective when you run apt update.

The easiest way should be just use the file msprod.list as downloaded, although I'm not sure what exactly was your initial problem. I usually solve those using aptitude, which has a nice interactive solver.

Oh: and unixodbc (= 2.3.7) is sadly not yet in debian (or Ubuntu).


The solution for this problem is to add a custom route like:

up ip route add 10.1.1.0/24 dev ethOI src 10.1.1.3 table adsl1
up ip route add default via 10.1.1.1 table adsl1
up ip route add x.y.z.64/26 dev ethGTC src x.y.z.82 table adsl2
up ip route add default via x.y.z.65 table adsl2
up ip route add 10.1.1.0/24 dev ethOI src 10.1.1.3
up ip route add x.y.z.64/26 dev ethGTC src x.y.z.82
up ip rule add from 10.1.1.3 table adsl1
up ip rule add from x.y.z.82 table adsl2


Advertisements shown when page is viewed in Chromium but not when viewed in Firefox

I use Adblock Plus free extension on my desktop and I never see annoying ads! Via the Acceptable Ads initiative, Adblock Plus allows some small and static ads, and users support websites that rely on advertising but choose to do it in a non-intrusive way. I know this reply probably seems like an ad but honestly, it works. It does exactly what it says it does with no nasty surprises.


What component is the source code for determining desktop icons in?

If you're using Ubuntu's Unity 7 shell, start by looking at the code for the BAMF project.  Yeah, sure, guy who named the project had a sense of humour, but that's the component where the icons mostly get figured out.


Ubuntu boots on terminal only after installing ubuntu desktop, how do get GUI desktop

Finally found one solution from YouTube,
i run these command

sudo apt-get update
sudo apt-get upgrade
sudo apt-get tasksel

and then select the fetures i wanted to install, i had selected Ubuntu desktop and basic ubuntu servers then press ok. it will install the GUI and after that reboot the OS usingsudo reboot commnand.


Beginner's Guide to configure VPN to work in Windows 7?

This was the guide that I was going to use for my client. They aren't being responsive however so I'm not sure if it will work for you:

Windows 7 PPTP setup

If you're having issues with internet particularly you need to make sure that HTTP is allowed through your PPTP as the default seems to be to deny access.


How can I get an Ubuntu 15.10 (Wily) Beta1 installer (if I'm ready to test it)?

Here is the link to the current install iso files -> http://cdimage.ubuntu.com/daily-live/current/

Concerning the upgrade of 32 bit system to 64 bit : It's not recommended, make a new install.


My Ubuntu 16.04 keeps disconnecting from the Wi-Fi (eduroam). Why?

I suspect that your wireless card is attempting to roam to another instance of eduroam from among the several that I suspect are nearby. Confirm:

sudo iwlist scan

You can also check:

dmesg | grep assoc

I think you will find that your card is trying to associate with one and then another instance of eduroam. They will each have a distinct MAC address; something like a4:2b:b0:dc:45:99 and a4:2b:b0:dc:45:88 or some such. If that is the case, you may have better luck if you bind Network Manager to the MAC address of the strongest access point: Ubuntu connect drops. Worked for a while then started dropping again


Go to the option 'Something else' .you'll get the partition table.Select the partition you want to install.

Then set the filetype to ext4.Select the format checkbox.Select root  '/' as mount point.

Next before installation go to "device for boot loader installation"(see the image) and select the partition you've created just before.then press 'install now'.

After booting with live usb/cd ,Run following command in terminal,

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

provided:  boot repair

I hope this will help.


The OP solved the problem (originally written as an edit to the question):

  Problem solved. I chose to install the bootloader to /dev/sda but
  after the computer didn't boot at all. I booted using the USB and
  started the reinstall process again, didn't get any errors and it's
  working fine now.


Laptop goes to sleep right after boot with lid closed and external monitor connected

The problem appears to be you have one setting for when user is logged in and another setting when you're at the greeter (lightdm).

I solved this problem by editing /etc/UPower/UPower.conf and changing IgnoreLid=false to IgnoreLid=true at the end of the file.

After restarting, closing the lid didn't put the computer to sleep anymore.

I used this question as reference: Stop laptop from suspending when closing lid in lightdm

Note: someone asked there if this wouldn't disable the lid behavior for every users. I really don't know.


After changing hostname, Ubuntu does not recognize the name

not sure what file you changed but try the following:

typing in your terminal:

hostname

will display the current hostname for the system and:

sudo hostname a-new-hostname

will change the system hostname.


How can I limit the space assigned to Déjà Dup backups?

Assign a disk quota on your backup account on the server, and deja-dup will take care of it.


run sudo apt-get install libjpeg

packages it might have uninstalled: compiz, unity, vino,


Maybe you will be interested in Mutiny.

It is a Unity-style layout for the MATE in Ubuntu MATE 16.04.


Possibly archive.ubuntu.org is slow, or just slow from where you are. Read this:

How can I get apt to use a mirror close to me, or choose a faster mirror?


Lenovo Battery threshold on Z570 still not working; even with tlp

after some attempts to set up the charging thresholds on ubuntu for my ideapad u330 I can tell you that it won't work for ideapads. tlp needs additional kernel modules to do this, either "tp-smapi-dkms" or "acpi-call-tools" (http://thinkwiki.de/TLP_-_Linux_Stromsparen#Ubuntu_12.04_bis_13.10 [link is in german]), both of which only work for certain thinkpads, not ideapads.

what eventually did the trick for me though was using the preinstalled win8 on my laptop (which I still have as a dual-boot backup) and set the thresholds there using the "Lenovo Energy Manager" software. Those changes affect the battery on a sub-OS level, so they also work on Ubuntu. It is a shame that we have to rely on Windows here, but that's what it is when Hardware companies have crappy Linux support.


Password stopped working after upgrade to 11.10

Your question is a bit unclear, but do you mean the password that is requested when you try to, eg, update packages?

I think you have tried to follow https://help.ubuntu.com/community/LostPassword

Did 'The Standard Way' not work?

Can you edit your original question with information as to what went wrong? It shouldn't be necessary for you to need to be editing grub config (which is what you ended up doing, by the sound of it, when changing ro to rw etc).


Load up CompizConfig Settings Manager (ccsm from the terminal - sudo apt-get install compizconfig-settings-manager if you don't have it installed). Then just search for the Unity plugin and disable it by unchecking its box.

Warning: What are some of the issues with CCSM and why would I want to avoid it?


I added to /etc/modules a new line:

i2c_i801

restarted kmod:

sudo service kmod restart

And now its working!


I have successfully installed ubuntu 16.10.  Make sure you have the UEFI settings in place, turn off fast boot, secure login, etc..

Install ubuntu. (make sure you have a partition for uefi, aka 'esp' with > 100 mb)

at boot type 'e' to change grub.
set nouveau.modeset=0 worked for me,

After Upgrade from 14.04 to 16.04 login screen runs in a loop while console login works

select the kernel recovery mode turn on networking

login as root

$echo "nameserver 8.8.8.8" > /run/resolvconf/resolv.conf

install the latest nvidia driver.

http://www.webupd8.org/2016/06/how-to-install-latest-nvidia-drivers-in.html

if you are in bootloop hell at this point, go back to your grubfile and remove anything you may have added like nomodeset or noveau.modset=0

bootup, and i was good to go.  now i'm woking on wireless and ethernet... which works!  but there are firmware issues.


Trying to Install OpenJDK Package 'openjdk-7-jre' has no installation candidate

if you really want to install JDK7, add these in your /etc/apt/sources.list file,

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

by issuing a following command,

sudoedit /etc/apt/sources.list

then run,

sudo apt-get update

run apt-cache search openjdk-7-jre to verify.


Why does Ubuntu come with three different software update managers preinstalled?

From left to right:

Software & Updates is a utility for managing repositories. You can
change update mirrors, add/remove PPAs, etc. There is no way to install anything, other then a few graphics and wifi drivers.
Ubuntu Software is just a user friendly way for
installing/uninstalling software.
Software Updater is for updates, and upgrades. You can't install programs or manage repositories.


After a debugging dialogue, the bug was found and squashed. The problem was some confusing data due to a floppy drive (a bug that only affects very old computers) in the function p_list_drives in the program dus:

grep -v zram --> grep -v -e zram -e ^fd

A new version can be installed via the following commands

sudo add-apt-repository ppa:mkusb/unstable
sudo apt-get update
sudo apt-get dist-upgrade

The current update (2017-04-02) installs mkusb version 12.0.9

Edit: After further testing (2017-04-03) this version is uploaded to the stable PPA, ppa:mkusb/ppa and can be installed via the following 'standard' commands

sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get dist-upgrade


Stock Ubuntu images in Digital Ocean cloud

The only public clouds that receive official Ubuntu images are listed on this page: http://partners.ubuntu.com/programmes/public-cloud

Currently Digital Ocean is not on that list, so there's no way for us to confirm that you're getting an official image.


How to read and write email in terminal? Does gmail require a special software?

Installing mutt pulls in a Message Transport Agent, because mutt by itself can only (on today's internet) talk to your local MTA.  If you prefer a different MTA than Postfix, you can choose Exim or Sendmail (for example) instead, but I recommend you stay with Postfix.

For your scenario, it sounds like you would want to define Gmail as your smarthost (where Postfix sends all outgoing mail for further delivery).  Another popular model is to use your ISP's smarthost.

SMTP (not MSTP) is the protocol which mutt uses to submit an email message to Postfix, and which Postfix uses to talk to other mail servers.

fetchmail is a popular tool for pulling down email from a remote account (such as Gmail) to a local set of mail folders.  It used to be popular for people who had intermittent Internet access through a metered connection; it still makes sense if for some reason you want your email to be stored in local files (perhaps because you want to process them programmatically, and can't run stuff over IMAP, or locally on a remote mail server).


Why does my keyboard suddenly stop working?

Try this
So, to fix this, go to:

System Settings → Universal Access → Typing (tab): switch off "Slow keys"

Also switch off "Enable by Keyboard" if you want to stop it happening again.

It don't know why the login screen ignores this setting, tho.

Update

I just did this again (d'oh!) which brought me back to this answer and gave me the initiative to find out what triggered it.

Apparently, if you have Enable by keyboard on and then you hold down the Shift key for eight seconds, it will enable/disable slowkeys.

This was a new setup, and I had enabled Enable by keyboard because I wanted a way to flip between touchscreen and keyboard mode easily. Might not be worth the effort, tho!

Thanks to tudor, I guess.
All keyboards stopped working after login screen


No keyring secrets found for [ssid] /802-11-wireless-security

I have experienced this issue with an Atheros card (not sure which driver), and swapped it out for an RALink that uses RT2790.
MY laptop is an Asus EeePC 1000HE
Fresh install
This laptop worked with many previous Ubuntu versions from 9.04 to at least 11.04 (I was running stable on 10.10 for a long time) This issue only appeared in 12.04?
I switched to xfce because unity killing my machine (fan was on all the time). Yes, I do have a Panel at the bottom?
This happens even when I don't have any windows open at all. For me, it rarely happens when I am actively using the laptop. It will usually only happen if I leave it for any length of time. When I come back I could have dozens of prompts for wifi password.

Both of your potential work arounds will fix this issue. I am currently running a cron job to check for network status, and run those commands if it is not connected, but it is not a good solution.


How to automatically lock screen on closing the lid and keep programs running (not sleep) on HP Laptop

There's a fairly long way to do it so let's get to work.

It is important to understand that these events will be caught by processes owned by root. A fix is needed to allow root to run processes in the normal user's X environment. In order to make the environment variables available for root:

gedit ~/export_x_info

and paste the following contets

# Export the dbus session address on startup so it can be used by any other environment
sleep 5
touch $HOME/.Xdbus
chmod 600 $HOME/.Xdbus
env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.Xdbus
echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.Xdbus
# Export XAUTHORITY value on startup so it can be used by cron
env | grep XAUTHORITY >> $HOME/.Xdbus
echo 'export XAUTHORITY' >> $HOME/.Xdbus

Save and close. Then make it executable:

chmod 700 ~/export_x_info

Now set it to run at startup. In Gnome 2, System> Preferences> Sessions and click Add. In Ubuntu Unity, click the gear icon in the upper right, select Startup Programs, and click Add.

Name: X Environment Variables
Command: /home/your_user/export_x_info

Now you need to edit your /etc/acpi/lid.sh file which catch lid open and close event

gksudo gedit /etc/acpi/lid.sh and paste

/home/your_user/lid_event just after #!/bin/bash. Save and close.

Now you need to create a script for close event so that you can lock your screen.

gedit ~/lid_event and paste the following. Change user_name with your user name

#!/bin/bash
grep closed /proc/acpi/button/lid/LID0/state
 if [ $? = 0 ]
 then
 source /home/user_name/.Xdbus
 DISPLAY=:0.0 su user_name -c "gnome-screensaver-command -l"
 fi

also check for /proc/acpi/button/lid/LID0/state file using you file manager becouse LID0 may be LID.

Now restart your ACPI using

sudo /etc/init.d/acpid restart

Make sure that the Power Management option for laptop lid closed is set to do nothing

source


Successfully installed Ubuntu 20.04 LTS into C:\ (windows partition), but windows still boots but not Ubuntu. Please help

A) UEFI/BIOS

Set to "UEFI mode only" (no legacy/CSM).
Disable "secure boot"
Disable "Intel Rapid Start" (if equipped)
Disable "fast boot" in UEFI (note this is different than the "fast startup" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Boot Menu

Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

  Note:

  Make sure it says UEFI in front of the USB stick in the boot menu.

  If not,  recreate your USB stick with ensuring you choose the UEFI/GPT (only) option.

C) Boot into USB Stick

Boot into Linux live environment and begin the install.

D) Installation type

When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.

E) Create partitions

Find your C: partition. It will be called /dev/sda2.

Select it and press the "-" sign to delete it and create "free space".

Do the same for your /dev/sda1 (WinRE partition).

1st Partition / Root

Select "free space" that you created by deleting the C: drive.
Select "+"
Partition the target drive as follows:

  Size: min. 10 GB (25GB+ recommended. I have 40GB)
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: ext4
  Mount point: Choose "/"

2nd Partition / Swap (Only needed if you want to Hybernate. I don't have it!)

Select "free space"
Select "+"
Partition the target drive as follows:

  Size: Depends on your RAM. See Swap FAQ.
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: swap

4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition. It seems you save your personal files in D: and E: so you may not need this.)

Select "free space"
Select "+"
Partition the target drive as follows:

  Size: Remainder of "free space" or any size you want. (You will need to leave some space if you want to make another partition. Of course, you can always shrink "/home" partition later)
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: ext4
  Mount point: Choose "/home"

F) Installation & Reboot

Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

G) Upon reboot

Boot into Linux
Install any updates

H) Changing the extended partition to primary

Unfortunately, I don't think you can change the extended partition into a primary partition without formatting it again. You can back up all your data in that partition to some other external drive or whatever, and delete and create the partition again as a primary partition and copy everything back if you want.

**I) Setup Automout for D: and E:

Open the "Disks" utility.
Select the partition you want to automount. (D:)
Click the icon with 2 cogwheels. (Additional partition options)
Select "Edit Mount Options".
Turn the "User Session Defaults" option to "Off".
Check the box "Mount at system startup" Make sure "Show in the user interface" is also checked.
Replace the line that says nosuid,nodev,nofail,x-gvfs-show to users,uid=1000,dmask=027,fmask=137,x-gvfs-show,utf8.
Change the "Mount point" to something less complicated like /mnt/D.
Change the "Filesystem Type" to ntfs-3g.
Do the same for E:
Click "OK" and you are all set!

Borrowed and edited from user613363's answer. (Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives)


Do not try run Skype on PlayOnLinux and install Skype for Linux Alpha. I think it's more comfortable and easier.


Where does the folder /usr/lib/windows95 come from and how can I get rid of it?

To find out which package this path belongs to, run:

dpkg -S /usr/lib/windows95

it will returns something similar to:

[package-name]: /usr/lib/windows95

then use the package name to remove it:

sudo apt autoremove [--purge] package-name

PS: it might be from felixrieseberg/windows95


Select Top N files based on modification date and rsync them

If you know for sure that the filenames don't contain whitespace or non-ASCII characters, you can use

rsync `ls -tp | grep -v / | head -n <n>` <destination> <options>


I can't see in the dash the filter function

The filter function only works on the 'Search Applications'  'Search Files & Folders and 'Search Music Collection'

These are accessed on the bottom of the open Dash via the icons.


Thinkpad screen stays blank after resuming from sleep

I had this exact issue on my Lenovo, it may be related..
To fix it I disabled power management functions:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
If this doesn't work and you need to undo this:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target


Automatically installing security updates on desktop system more than once per day

Here you can find information about how to make a cronjob. Make one with the timing you want and this command:

/usr/bin/update-manager

This will open the graphic update manager which then searches for updates.

If you like graphical applications, you can just install a graphical cronjob manager with this command:

sudo apt-get install gnome-schedule

Its called "Scheduled tasks" in the dash. If will easily allow you to have this command run for example once an hour.

However, please don't use the default setting of every full hour but instead choose a random minute different from 59, 0, 1, 2 and 3, so the servers don't get queries from an awful lot of people every full hour.


There is no guarantee with either snaps nor apt/dpkg, that the app you are using, is relying on system-wide shared libraries, for every dependency they have.

Depending on how a snap is built, it may be using some libraries shared with other snaps (the core snap includes a libc and libstdc++ for example), but neither direction is as simple as it might seem, when it comes down to stability, security, and ensuring users get the latest features in apps.


custom libindicator icon is not displayed

Try running the command:

sudo gtk-update-icon-cache /usr/share/icons/ubuntu-mono-dark/

That will update the icon cache for the ubuntu-mono-dark theme, which should solve your problem.


I suggest installing libjson-c-dev package instead of building it from source.
sudo apt install libjson-c-dev


With a /29 your gateway address is not valid

248 = 11111 000
176 = 10110 000

Since it is a network address, not a valid host one.

Edit: Try router .177, winbox .178, linbox .179 and you should be fine.


Accidentally uninstalled Ubuntu 14.04 system settings. How to get them back?

Finally found this was unity-control-center. I expected it to have keywords "settings" or "system" or "configuration", but I did not use the full power of my imagination :)

 sudo apt-get install unity-control-center

gets everything back.

Important note. Never try to uninstall things that seem system-dependent using apt-get purge. In my case I wanted to get rid of ibus because I never need it. But it uninstalled unity-control-center as a dependency. Others might be frustrated with bluetooth or printer or whatever services running on their machine, which they consider unneeded. Do not try to just purge those things, there should be another way.


Move clock to center in Gnome Shell 3.24

I just encountered the same problem, and found a fix.

In /usr/share/gnome-shell/modes there's a classic.json file that holds the configuration for the current shell -

{
    "parentMode": "user",
    "stylesheetName": "gnome-classic.css",
    "enabledExtensions": [LIST_OF_STUFF],
    "panel": { "left": ["activities", "appMenu"],
               "center": [],
               "right": ["a11y", "keyboard", "dateMenu", "aggregateMenu"]
             }
}

All you need to do is to move the "dateMenu" item to the center.
I also had the Window List extension enabled after every boot, and removing it here solved the problem.


This occurs when you retrieve an entry from history list by history expansion or using arrow keys and modify the entry.

From help history:

  Display the history list with line numbers, prefixing each modified
  entry with a `*'.

So in your case as the command field is null, you have retrieved that entry from history file/buffer and made it null by removing the command altogether i.e. the modified command will be shown.


Why not make .txt file executable instead of .sh file to run scripts?

There is no need for the file extension to match anything specific, as you correctly found out.

On Unix-like systems, file types are usually derived from the content of the file (i.e. the "magic number" or other characteristic structures in the first few bytes) and not from their name. You could also completely omit the extension, which is often done for executables.

Check the file command, it shows you the information it can find out about a file type from its content.

For an executable script, the system expects a so-called "shebang" in the first line, which looks e.g. like

#!/usr/bin/env python3

and indicates which program to run as interpreter with the script file as argument. If you execute a text file without such a shebang, it will use your default shell, i.e. Bash to try and interpret it.

So on Unix/Linux systems, file name extensions are mostly a hint (but no guarantee) for the human user to quickly recognize what to expect a specific file to contain. It's also a convention that can help e.g. finding files faster.

Note that there are some exceptions though, where the name and extension matters (e.g. some system config files which must follow a naming convention, or many image viewers and editors also require the extension to indicate the file type).

You can also have a look at Do file-extensions have any purpose (for the operating system)?


Here's the spec for your current 4G RAM SODIMM. Get a similar spec for your additional RAM. Always configure memory with matched-pair SODIMMs.
HP687515-H66-MCN Kingston 4GB
PC3-12800 DDR3-1600MHz
non-ECC Unbuffered
CL11 204-Pin SoDimm
1.35V Low Voltage Single Rank Memory Module

See https://starmicroinc.net/kingston-4gb-pc3-12800-ddr3-1600mhz-non-ecc-unbuffered-cl11-204-pin-sodimm-1-35v-low-voltage-single-rank-oem-memory-hp687515-h66-mcn/


How to auto-mount a copied encrypted home

Looking at what you want to do, I would say use symlinks.

The auto mount I would do with fstab.

this is how I'd do it:-

run sudo blkid to get the UUID of the partition

sudo cp /etc/fstab /etc/fstab.backup
Then, edit fstab (with for example sudo nano or gksu gedit) and add this line:

UUID= /media/Media ntfs defaults 0 0
Make sure that the mount location, /media/Media, exists before doing this, then reboot.

Remove all existing symlinks(having backed up all files prior)

rm -rf ~/Videos && ln -s /media/Media/your-folder/Videos ~/Videos
Repeat for all the folders you want to appear in your Home directory.

If this is a pain, you could use Ubuntu tweak as this give you a GUI to manage the folder locations.  I would make sure the auto mount si setup first though.

Hope this helps.


ImportError: cannot import name 'sysconfig' on python

It seems your Python installation was incomplete/broken, launch your terminal by pressing Ctrl + Alt + T and run following command:

sudo apt install python3-distutils

This will install the required package to fix the error, as you can see on your error output.

Source: https://github.com/pypa/pip/issues/5356


append any line that starts with  with the previous line in whole document

If it is just one long file, you could open it with LibreOffice and work with search&replace, using regular expressions.

https://help.libreoffice.org/Common/List_of_Regular_Expressions


What is similar option in ubuntu for remote desktop connection?

I use Remmina regularly. I can add the RDP to a list, and click on the one I want to use.

They have a self-named website, installation was quite trivial. I believe this will do what you want.


Suppose you have a directory named silico.

Put the directory in any location, suppose /opt

Now your silico directory path will be /opt/silico, and there is a bin folder in silico dir.

Now open your ~/.bashrc file and put these line in the end of file.

export SILICO_HOME=/opt/silico
export PATH=$PATH:$SILICO_HOME/bin

Then restart terminal or execute source ~/.bashrc.


Ubuntu supports C/C++, Python, SQL, and R for sure. Don't worry about this.

For R:

 sudo apt-get install r-base

For Python:

sudo apt-get install python

You can write the code (Geani for example) and compile with GCC.
For C:

sudo apt-get install build-essential
sudo apt-get install gcc

For SQL:

sudo apt-get install mysql-server

Docs:

https://help.ubuntu.com/12.04/serverguide/mysql.html
http://www.r-project.org/
http://www.python.org/
http://gcc.gnu.org/wiki/InstallingGCC


Nautilus is frozen, cannot be used, and cannot be killed

FYI, I was having the same issue. In my case, it appears to be caused by a faulty mount point somewhere in my FS tree.

Specifically, the culprit was a samba mount (cifs) that failed due to me losing VPN. As nautilus mentions these under 'Network' in the left sidebar, I'm guessing this caused it to hang. As a work-around I remounted all my volumes (sudo mount -a) and now nautilus is responsive again.


Simply use your script in your desktop file:

Exec="full_path_and_script_name" %f

and change your script to:

#!/bin/bash
/usr/bin/wine "C:\\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe" "$1"

Note the double quotes for $1.


Unable to get wireless internet Qualcomm Atheros QCA6174 802.11ac

For the QCA6174 probably the easiest thing to do is upgrade to Ubuntu 15.10 (you can use the Ubuntu software updater rather than installing 15.10 from scratch) as this has the kernel 4.2 and the ath10k firmware


Startup script can be run multiple times despite pid file

I find out what was the problem, my script was not verifying if the process was already running so it just started as many process as you run it, but adding:

    if [ -f $PIDFILE ]; then
      echo "supervisord already running: $PIDFILE"
      exit 1
    fi

in the start) case solved my problem, this verifies if supervisord has generated its respective .pid file and if it exists it does nothing.


This might seem stupid, but it worked in my case once:
Shut down, power off router, unplug the power cord of the tower and the router. Then wait for 1-2 minutes, plug it back in, power on.


No bass from my laptop's build in subwoofer on Ubuntu GNOME 16.04 LTS

You can change your sound settings in the System Settings app.

In the sound section you will have a list of sound cards , you might need to experiment with the Mode dropdown list to find the right mode to drive your speakers.

if they run from a single mini jack/headphone socket then use Analogue Stereo

if they run from multiple jack outputs or optical or spdif then chose the a surround mode.

If this doesn't fix it for you then its possible that the mapping of the various outputs (left,right,sub) is not correct for the ports you have.

As this is a laptop i would expect it to only have a single jack socket.

If the speakers are built into to the monitor then you should just need to configure the correct mode in Sound settings.


Cannot connect to postgresql on port 5432

This issue comes from installing the postgres package without a version number. Although postgres will be installed and it will be the correct version, the script to setup the cluster will not run correctly; it's a packaging issue.

If you're comfortable with postgres there is a script you can run to create this cluster and get postgres running. However, there's an easier way.

First purge the old postgres install. The issue currently lies with 9.1 so I will assume that's what you have installed

sudo apt-get remove --purge postgresql-9.1

Now simply reinstall

sudo apt-get install postgresql-9.1

Note the package name with the version number. HTH.


How do I stop Compiz from crashing when I change some configuration?

On your desktop, make a file (it doesn't matter what it's called). Open it, and type this:

compiz --replace

close and save it.  Make it executable.  While you are changing the settings, make sure it's visible.  When compiz crashis, double click it and run it, and compiz should restart itself (not the computer).
This won't stop it from crashing, but now you won't have to restart your computer.


Ubuntu 17.10 Use PHP7.0 instead of PHP7.1

I found the answer.

The following way is to switch PHP version for Apache.

sudo a2dismod php7.1
sudo a2enmod php7.0
sudo service apache2 restart

And for switching PHP version for Command Line, we need this,

update-alternatives --set php /usr/bin/php7.0


reset root password :

While boot press shift and choose recovery mode :

drop to root shell
then use following commands :

mount -o rw,remount /
passwd root

to add new user use :

adduser username

and choose a password for the user

finally:

reboot


apt update check for updates. Once you check, then, you upgrade your packages with apt upgrade.
I don't see any problem in your output.


growisofs with file of specific extensions

the answer, if ever, is in the man page of mkisofs, because growisofs forwards
the arguments about content to this program.

The newer releases of cdrtools support an option -find
with mkisofs. See
http://cdrtools.sourceforge.net/private/man/cdrecord/mkisofs.8.html

After reading the description of -find, examples, and dead link, i would try

growisofs -Z /dev/dvdrw -R -J  -find /some/files -name '*.jpg'

In practice i don't try this, because i have my own program
xorriso for such jobs. :))

xorriso -outdev /dev/dvdrw -blank as_needed -joliet on \
        -findx /some/files -name '*.jpg' -exec add_missing / --

This will copy the *.jpg files underneath /some/files into
the ISO and create the directories which host them.
E.g. file /some/files/dogs/wuffy.jpg will become /dogs/wuffy.jpg in the ISO.

Have a nice day :)

Thomas


How do I create a ... recovery drive for Ubuntu? It seems that I can do this via Clonezilla but I'm not 100% sure how. Is this step even necessary for Linux because I have already created a bootable USB to install Ubuntu? Oh, you hit the nail on the head. Since you can reinstall Ubuntu in just a few minutes, a Windows-style recovery drive is not required.

Second, it has you create a full image backup, that you can use to restore your computer to the state it is currently in... If you can quickly reinstall Ubuntu and the programs you use, a clone isn't necessary. Oh, you could make one with Clonezilla and their FAQ and tips are mighty useful, but after you've read all of this post, you just might think you can do without. You see, clone images get big... and since you can quickly reinstall the OS and apps (more on that in a minute), you just don't need to back up everything including the kitchen sink with Ubuntu.

Reinstalling apps: If you make a list when you install an app of all the apps installed, you can reconstitute your system by just installing the fundamental Ubuntu, then installing the apps you've added since original install.  Making that list is sooo easy: just do sudo apt list --installed > ~/all-my-programs. (all-my-programs is just a text file you overwrite with every program addition and you could use any unique file name instead of all-my-programs.) Once you've reinstalled the basic Ubuntu, and your data from home, just do sudo apt update && sudo apt install {insert list of apps here and don't include the curly braces}. See here for alternative methods to backup a list of programs and reinstall if needed.

Finally, it has you do daily file backups. How do I do this with Ubuntu? Is there a built-in tool like there is with Windows? Ooodles and oodles of tools to do it; to copy to USB, another partition, another drive (internal or external), another PC, or into the cloud. The Daily backup could grab EVERTYHING or just grab everything since a predetermined event; the latter is much quicker but it depends on your having the EVERYTHING file.

Take a look at What's a good back-up strategy for 1 desktop PC? , https://www.lifewire.com/backup-ubuntu-4126286, http://manpages.ubuntu.com/manpages/bionic/man8/backup-manager.8.html ,  and https://help.ubuntu.com/community/BackupYourSystem , then return if there's more you need to know.

PS: When Someone in the Linux world refers to an archive, that's a compressed file which has many files inside it, like a ZIP file. It could be a complete backup, a chunk of a backup, or a buncha files you're sending elsewhere.


Can't login because password contains characters not in keyboard

You will need to reset you password. First restart your PC, wait for the GRUB menu to appear(similar to this)

Now, select the Advanced option for Ubuntu and click Enter
There will be two options, select the option to go to recovery mode.

Now you will be present with different options of recovery mode. Now you have to  choose Root Drop into root shell prompt

You need to have write access to the root partition. By default, it has only read-only access using the command

mount -rw -o remount /

Now, list all the users that are present in the system

ls /home

Use the command

passwd username

where username is the  user from the list whose password is to be reset. passwd is used to set a password

It will prompts for a new password. Enter the new password twice (there will be no visual feedback i.e: you wont see any characters on the screen)

Then exit the root shell prompt by typing exit

When you exit, you will be back to the recovery mode menu. Select resume for normal boot option.


What is a makefile exactly and how we can create one?

to answer your question I cant give you a one line / paragraph answer because it deals with every thing.Read the first link it have everything you need with examples too.

Good tutorial that can explain everything about make

http://mrbook.org/tutorials/make/
http://manpages.ubuntu.com/manpages/raring/man1/create_makefile.1.html
http://manpages.ubuntu.com/manpages/raring/man1/make.1.html


Libre Office bibliography short entry not showing correctly

Unchecking [View] -> [Field Names] solved the problem.


Add custom command in the open with dialog?

There is a workaround for this issue. as an example i am adding sublime(an ide) to the list.

1). Open a terminal and run this command:

 cp /usr/share/applications/gedit.desktop ~/.local/share/applications/sublime.desktop

2). Edit the new file and make necessary changes

vim ~/.local/share/applications/sublime.desktop

[Desktop Entry]
Name=sublime2
GenericName=Sublime2 - IDE
Comment=Edit text files
Exec=/home/aneesh/Sublime2/sublime_text %U
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=/home/aneesh/Sublime2/sublime.jpeg
Categories=GNOME;GTK;Utility;TextEditor;
X-GNOME-DocPath=gedit/gedit.xml
X-GNOME-FullName=Sublime2
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gedit
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.2.0
X-GNOME-Bugzilla-ExtraInfoScript=/usr/share/gedit/gedit-bugreport
X-Ubuntu-Gettext-Domain=gedit

Please note that you might end up with duplicate launchers in your dash with this method. To prevent this you can add NoDisplay=true to your newly created launcher.

Save the file . That's it, done.


Well based on the error it sounds like you've enabled some sieve features somewhere in your configuration.  It's a handy tool, but it does have it's own independent install:

To add sieve to dovecot:

apt-get install dovecot-sieve dovecot-managesieved

Alternatively, probably in the protocol lmtp section (on my server this is in the conf.d/20-lmtp.conf file) you'll find the word sieve listed on the mail_plugins line, you could just remove this to allow dovecot to start without.


Okay, it was something in the generated .profile file. But I don't see what was wrong.

I'm posting this as "Answered", but in case anyone wants to see, here are the contents of .profile; I don't see anything wrong, myself:

    # ~/.profile: executed by the command interpreter for login shells.
    # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
    # exists.
    # see /usr/share/doc/bash/examples/startup-files for examples.
    # the files are located in the bash-doc package.

    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    #umask 022

    # if running bash
    if [ -n "$BASH_VERSION" ]; then
        # include .bashrc if it exists
        if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
        fi
    fi

    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi


I found that there were some old Timeshift snapshots. I deleted the snapshots on /dev/sda2 and was able to compress the disk.

It escaped my noticed because I had long since removed and purged timeshift, but the snapshots had remained and bloated due to all the movement on the filesystem.


Update GCC compiler in Ubuntu 14.04 to 4.9

Some core packages never get their versions upgraded in a release. GCC is one of those. Neither GCC 4.7 nor 4.8 were ever available for Ubuntu 12.04 officially (even via backports). GCC 4.9 is only being built for 14.10 and 15.04. You'll have to use the Toolchain PPA:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9


If you are using compiz, go to System/Preferences/Compizconfig Settings Manager" and lead to the "Desktop Wall" options.

Make sure you are using Desktop Wall, otherwise you may be using "Desktop Cube" in which case you should open "Rotate Cube".

In both cases, first make sure that the check box that enables the feature is activated, then properly configure your key bindings.

If they are already set and your keyboard don't activates the function, try with a different combination. Please inform if this didn't help in order to look for a different solution.

BTW: If you change key bindings and can't return to your initial screen, where "CompizConfig Settings Manager" is, try using the Super + E in order to activate "Expo", when open you can choose the desktop where you wish to go with the mouse or moving your selection with the arrow keys.

Good Luck!

A screenshot is placed here for you to see the Desktop Wall key binding config section.


I found a very good tutorial online, and I was able to install those infamous Nvidia drivers on two computers without a problem. Here is what you do:

Preparation

1) First, you need to open up a terminal shell. You can either start up your computer and go to a virtual shell

Ctrl+Alt+F1

or login and open up the gnome terminal

Ctrl+Alt+t

2) Then In the terminal, run the following commands:

This command will refresh your packages

 sudo apt-get update

Then you will need to install the linux headers if those are not already installed.

 sudo apt-get install linux-headers-generic

Next, you will need to do a dist-upgrade, which upgrade some packages of your system

 sudo apt-get dist-upgrade

When that is all done, you will need to reboot your system

 sudo reboot

The Installation of the Drivers

1) Repeat step one to open the terminal.

Now install the Nvidia drivers

 sudo apt-get install nvidia-current-updates

You have one more step, or else, you will have a high chance that you just soft-bricked your system. For safe measures, run this final command:

sudo nvidia-xconfig

*There was a well known bug that the Nvidia installation script did not run that command. If that config file is not created, your graphics will not work.

Now reboot your system:

 sudo reboot

Congratulations! You should now be using Nvidia Drivers.

Confirming it Worked

One quick way to check is to click on the gear cog at the top

Then click About This Computer

In the line that says Graphics, It should say your Graphics driver:

This is what mine looks like:

You can also click on graphics to get more details:

Cheers!

Source: http://falkvinge.net/2013/02/15/how-to-install-nvidia-drivers-in-ubuntu-12-10-quantal/


External monitor on 13.04: mouse flickers, weird refresh

I've been dealing with this very problem for some time now, and I'm beginning to think it has something to do with the GT 540M itself. From what research I've done, it seems these sorts of issues are invariably resolved by installing bumblebee (https://wiki.ubuntu.com/Bumblebee). I presume you have already tried this and had no success?

For what it's worth, this problem also surfaces on Mint and Fedora. What puzzles me, however, is that the slow refresh rate and lag vanishes when I'm watching a video, be it on youtube or VLC, only to reappear immediately once the video file is closed. Have you observed this too? If HD videos can run smoothly on the nouveau/intel drivers, why do less intensive applications lag?

You could give Compiz a shot and manually increase refresh rates, but I haven't had success with it: https://apps.ubuntu.com/cat/applications/compizconfig-settings-manager/


How does one clear the Rhythmbox music library database?

Close Rhythmbox and delete the Rhythmbox database in ~/.local/share/rhythmbox/rhythmdb.xml.

If you also want Rhythmbox to forget your library paths (the directories where it automatically looks for music), then you need to delete them from dconf:

gsettings set org.gnome.rhythmbox.rhythmdb locations "['file:///dev/null']"

You can then set new paths in the Rhythmbox GUI, under Edit -> Preferences -> Music.

(Note that

gsettings reset org.gnome.rhythmbox.rhythmdb locations

does not work correctly, since then Rhythmbox tries to be "smart" and uses your home directory as a default value.  Using /dev/null above prevents this; alternatively you could directly set the library paths using gsettings set).


updating java by setting home path variable

Then you have (at least) two java versions on your machine, right?

Besides setting JAVA_HOME you probably want to modify the PATH variable, and you want to change it persistent. Assuming you use e.g. the ~/.profile or ~/.bashrc file for the purpose, you can add these lines:

export JAVA_HOME=/usr/java/jdk.1.8.0_60
PATH="${JAVA_HOME}/bin:$PATH"

Then relogin (in case of ~/.profile) or simply close and reopen the terminal (in case of ~/.bashrc).


Building driver for Ralink RT5370 USB WiFi WLAN Dongle

I use a Tenda W311M that uses the same chip.
Thanks for mentioning the download URL for the driver.

This thread http://ubuntuforums.org/showthread.php?t=1285828 mentions the solution.

I hope it works for you.


Clean unneeded folders under /usr/share/doc/

It's safe to delete empty folders, although empty folders take up very little disk space, so you won't save much disk space by deleting them. Many programs are able to create a new folder if it's necessary to replace an old folder that was deleted. Be careful that what you delete doesn't have any files in it, so that you don't do something irrevocable.


Brightness with AMD/Intel open source drivers Ubuntu 12.10

Well try this link http://www.refreshit.info/2012/08/solved-brightness-increase-and-decrease.html
I have fixed the brightness problem ..


I was able to exit scrollback by pressing ctrl+c or Enter.


How can I boot via USB with GA-945GCMNX-S2 BIOS?

So I've found my answer: PLoP Boot Manager. For who don't have a CD they will need one but for me I have built-in MS-DOS which is really helpful. I boot up my old Windows and copied the PLoP Boot Manager extracted to C:/ and renamed for easier typing.

After that I booted into MS-DOS (via Windows Boot Manager) and cd into the install directory, ran plpinst.com then fully installed the PLoP boot manager. Since then I can be able to boot into USB whenever I want and also force the BIOS to do so.

Link to PLoP Boot Manager: https://www.plop.at/en/bootmanager/download.html

P/S: FreeDOS is ok.