Ubuntu won't start after updating nvidia drivers from X-swat PPA

To remove the obviously non-working driver, which will get you back to the previous stage:

Boot to a root shell
Install ppa-purge to remove the x-updates ppa:

apt-get update && apt-get install ppa-purge
ppa-purge ppa:ubuntu-x-swat/x-updates

Reboot

reboot

This should replace the updated nvidia-current driver with the version from the repositories.

Alternatively (or if you don't trust ppa-purge)  you can also purge the nvidia-current driver, remove the ppa, and then reinstall the proprietary driver from the repositories from within a root-shell:

apt-get purge nvidia-current
add-apt-repository --remove ppa:ubuntu-x-swat/x-updates
apt-get update
apt-get install nvidia-current

Note: no sudo needed in the root shell


Wifi is disabled by Hardware Switch - Compaq 610

sudo rmmod -f ath9k
sudo rfkill unblock all
sudo modprobe ath9k

Then suspend and wake up your laptop. Your wifi should work.

That worked for me, but just until I shut down my laptop, then I need to do the same thing again when I turn it on.

I found the above commands in some other question.


Physical 0 is referring to your CPU.  The CPU TJmax is 100 degrees Celsius.  So 50 degrees Celsius is normal.  Also  make sure that ambient temperature is good.


How to make etckeeper use the right value for git author & email with apt-get

Looks like this is fixed in etckeeper 1.5. It happened in /etc/etckeeper/commit.d/50vcs-commit:

if [ "$VCS" = git ] && [ -d .git ]; then
  if [ -n "$USER" ]; then
    export GIT_AUTHOR_NAME="$USER"
    export GIT_AUTHOR_EMAIL="$USER@$hostname"
  fi
  if [ -n "$logfile" ]; then
    git commit $GIT_COMMIT_OPTIONS -F "$logfile"
  else
    git commit $GIT_COMMIT_OPTIONS
  fi
[ ... ]


Easy route:

Use sudo dhclient and hope your DHCP server assigns an IP address, default gateway, and name servers (DNS).

  Long route:

ifconfig on it's own only display configured network cards. It seems for now your network card is unconfigured and you are viewing your loopback adapter which is a default adaptor that should always be there.

Try ifconfig -a. This will display all cards available and the ethernet interface id for those cards. Look for something like eth0 or eth1.

To quickly configure a card, do something like this:
sudo ifconfig eth0 192.168.0.2.

Of course eth0 is dependant on the result of your ifconfig -a and the IP address is dependant on your environment.

This will bring your machine online. Now you can hopefully ping your default gateway.

To assign your default gateway do this:
sudo route add default gw 192.168.0.1

Again the IP 192.168.0.1 is dependant on your environment. If you have a Windows machine you can do ipconfig -all to get most of the required information.

Now you can hopefully ping the Internet, but you won't be able to resolve names. So you can ping 196.25.1.1 but not ping www.google.com. For that you have to assign a DNS server. To do this:

Edit /etc/resolv.conf

I use mc -e (Midnight Commander) but you might prefer to use vi which is built into most Unix systems.

Add the following to resolv.conf:

nameserver 8.8.8.8

and save. Now you should be able to ping the Internet and get online using a browser. You are temporarily using Google's public name server at 8.8.8.8.

At this point we normally install Webmin :-) http://www.webmin.com/

Webmin makes is 10x easier to configure and check network cards. In Webmin, use the Networking / Network Configuration and then:

Network Interfaces (IP address)
Routing and Gateways (Default gateway)
Hostname and DNS Client (DNS servers)

menus to configure your card.

  Checking /etc/network/interfaces

You might also want to check /etc/network/interfaces because that is where the resultant configuration information is stored. On a DHCP enabled machine you have something like this:

user@computer:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

On a fixed IP machine you will have values like this (depends on environment):

user@computer2:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The auto command
auto lo eth1

# The loopback network interface
iface lo inet loopback

# The rest
iface eth1 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    broadcast 192.168.0.255
    network 192.168.0.0
    gateway 192.168.0.1

Please note the above file contains just the IP address and default gateway.

The sum of our solution is to get the IP address, default gateway, and DNS servers (in /etc/resolv.conf) right. Good luck, this can sometimes be a bit of a nightmare if it doesn't work right out the box / upgrade.


Installing Ubuntu alongside Windows 10 on separate SSDs

Either is valid, just so you remember where you put it.
Since most folks are more likely to assume /dev/sda, that's where I put it. That's not the same as /dev/sda1 and I strongly recommend not using /dev/sda1 .
BTW, if you are installing 18.04 or later AND do not intend to hibernate Ubuntu, you do not need a swap partition; Ubiquity (the installer app) will make a swap file for you. You can back up and remove the swap partition if you wish.
The other use case for a swap partition is obsolete; the Linux kernel before late 2017 had performance issues with swap files, which are now fixed.


I both "run locate (updatedb) when I'm logged in", as mentioned above, and I keep my part of the locate database under my encrypted $HOME.

export LOCATE_PATH="$HOME/var/mlocate.db"

and then I index the files in$HOME with

updatedb -l 0 -o $HOME/var/mlocate.db -U $HOME

Now I have a complete index of $HOME but the database isn't visible unless $HOME is mounted and decrypted.


How to setup Squid Proxy Server for specific purpose?

Zend2 is a anonymous proxy service that will route your traffic through multiple locations, hiding your ip, and subsequently your location.  This is useful in many ways, but one in particular would be to get around geographical limitations for connecting to services.

Squid is a caching proxy mainly used for speeding up connections by caching files to be used again and again instead of downloading them each time you access that site.

While squid could be setup to do something similar to zend2, you would need the infrastructure to support it.  If you have a server running squid, all of your outbound connections would show from that one location.

Another alternative to zend2 would be to use the TOR project.

https://www.torproject.org/about/overview.html.en


How do I access the contents of my flash drive while booting from it? [Xubuntu]

Using Wubi:
As i recall, /host is the mount point for the Windows Drive that ubuntu is installed on using Wubi.
When booting from Flash Drive:
After searching with GParted, I found that the drive is mounted under /cdrom, not /host


Installing Clang+LLVM 3.4 from llvm.org into Saucy 13.10

Seems the instructions might be incorrect. I added the following to my /etc/apt/sources.list file:

deb http://llvm.org/apt/saucy/ llvm-toolchain-saucy-3.4-binaries main
deb-src http://llvm.org/apt/saucy/ llvm-toolchain-saucy-3.4-binaries main

Note llvm-toolchain-saucy-3.4-binaries.

Seems to work so far:

$ sudo apt-get --print-uris download clang-3.4
'http://llvm.org/apt/saucy/pool/main/l/llvm-toolchain-3.4/clang-3.4_3.4~+-1~exp1_amd64.deb' clang-3.4_3.4~+-1~exp1_amd64.deb 12571468 sha256:7a68e24fe6040fa4e5ef6a54a7c7406c04b1f7ba2bfaa5c92eee1c39adfb36b6


How to move windows buttons to left in GTK apps in KDE plasma?

Looks like it's menu, not appmenu (these days?)

https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-decoration-layout

And it was answered thouroughly at https://unix.stackexchange.com/a/412195/24383

Short version:

# ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-decoration-layout=close,maximize,minimize:menu

I have gtk-decoration-layout=close,maximize,minimize:icon for some reason, not sure I changed it at some point manually or it something generated from GUI settings.


I switched from Windows 10 to Ubuntu and now my internet is slow

I suppose the adaptor just needs more Juice. As it is already a usb adaptor the best and simplest option would be to go with the 2.4GHz band. It has good penetration capabilities over long distances. It should be able to get atleast a good 18Mbps.


Is the BIOS set to boot from the correct hard drive?

/dev/sda - Linux

/dev/sdb - Windows

What HDD did you install grub to? Try switching your default boot HDD to the other hard drive. Please make sure you have selected the correct option...


Try JReversePro

There are other command line compilers out there too - just Google.


How to enable next/previous buttons in Ristretto image viewer?

Ivan, the navigation buttons (and the slideshow button) are active if you first open Ristretto, then Open the folder of interest from within Ristretto.


When using Ubuntu on a Live CD or USB, how can I determine if a different, inactive install is 32 vs 64 bit?

Mount the partition where Ubuntu is installed on and run this command:

file /media/ubuntu-disk/sbin/init

Where /media/ubuntu-disk is the path to where Ubuntu is mounted...


If you already exhausted all solutions, you may want to take a look to your about:config page, in Firefox. It should have a boolean called network.protocol-handler.expose.magnet and it's value should be false.

If you don't have it:

Right click on an empty area of the about:config page
Select New > Boolean.
Name should be network.protocol-handler.expose.magnet and the value false.
Restart firefox and try again.


If your grub menu does not appear but the grub prompt with black screen shows, as long as your Linux system is still intact you can bypass the grub stage and boot directly into Ubuntu. Once you've done that you can easily fix grub from there. The steps to boot up are as follows:
a) First remove all external drives. Determine where your root partition is. In this case we already know it's sda5. If you don't know and you have one disk you can find out by typing ls (hd0,x)/ trying different values for 'x' which is the number of the root partition on that disk. If you have more than one disk you may have to use hd1 or a higher number if you don't know which disk Ubuntu is installed on. Once you hit the right disk/partition numbers you'll see listed the basic system folders and the 2 files vmlinuz and initrd. Note these 2 files are symlinks to the kernel and initrd image respectively but they must be present.
b) Now set the root with set root=(hd0,5) or whatever is the correct combination for disk/partition you found in (a). Press Enter.
c) Now we need to map the linux kernel to root. Type linux /boot/vm. At this point press the Tab button. The command will partially complete by offering a choice of (usually) 2 kernel versions. Take the higher number by typing it and press Tab button again. The whole kernel version number should autocomplete. You should be seeing something like linux /boot/vmlinuz-4.15.0-55-generic depending on kernel version. You still need to add root=/dev/sda5 to this line. So the whole command is linux /boot/vmlinuz-4.15.0-55-generic root=/dev/sda5. Press Enter.
d) Now we do similar for initrd. Type initrd /boot/in then press Tab button. Again it will offer 2 versions so choose the same version as in c) using Tab button again to autocomplete. You should see something like initrd  /boot/initrd.img-4.15.0-55-generic as the complete command, depending on kernel version. Press Enter.
e) Then type boot. Press Enter.
After a a couple of minutes of splash screen activity you will eventually reach the user login screen, then proceed as normal. If during boot-up you reach the intrafms prompt and booting stops, you've probably mistyped something in the earlier stages and need to start again. Remember, this process boots you into Linux. Grub still needs a couple more commands to fix it once you're in.


Ubuntu Linux UFW Firewall, Local Intranet Access

sudo ufw default deny
sudo ufw allow from 192.168.1.0/24 to any port 80

Assuming the web server is on port 80 and 192.168.1.x is your home subnet. If you explicitly want exclude your router, then assuming it's 192.168.1.1, it would be:

sudo ufw deny from 192.168.1.1 to any port 80


How to you get a flickable to do a smooth scroll?

You can make a Flickable scroll to a specific point by setting the contentY property of a Flickable. Quoting the official documentation from qt-project.org,

  ContentY holds the surface coordinate currently at the top-left corner
  of the Flickable. For example, if you flick an image up 100 pixels,
  contentY will be 100.

So if you want to scroll a Flickable smoothly with the press of a button, you could animate the contentY property change like,

Behavior on contentY {
    UbuntuNumberAnimation {}
}

This will gradually change the value of contentY instead of setting it to its final value abruptly.

You can find more about the contentY property here.


New LDAP error code 50 - Insufficient Access Rights

slapd either uses slapd.conf or cn=config for its configuration. My hunch is that the "working" server is using the former while the "broken" server is using the latter. Prove this hypothesis by looking at the slapd process with the 'ps' command on each server:

ps ax | grep slapd


The command git config -l returned:

http.proxy=http://@xxx.xxx.xxx.xxx:8080/
http.proxyauthmethod=basic
http.sslverify=false

So it's a git specific proxy. Resolved by the command:

git config --global --unset http.proxy

Now git config -l return:

http.proxyauthmethod=basic
http.sslverify=false

And git clone works properly.


You have first of all to do a port forwarding in your router that connects to the internet.
You may find your router here and follow the guide or you can read your routers manual if included or google your router to find some info.

By port forwarding you say to your router "if someone asks something in that port forward the message to this computer"

Note* the default port of apache is 80

Then you just need to know your ip address that you can find it in your router's interface or by writing in google "my ip address".

Finally go to your browser and type your ip address like this: http://77.22.33.44


How to properly copy files from hard drive to USB flash drive in tty4 terminal?

Plug in the device
lsblk to find the device name of your usb device. Naming is /dev/sdXY. Where X is any english letter and Y is integer, typically 1.

If the device was mounted, you will see the mountpoint, for example:

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb            8:0    1 15.2G  0 disk
└─sdb1         8:1    1 15.2G  0 part /media/me/4C45-110F

If not, mount it. Follow to the step #3

udisksctl mount -b /dev/sdXY , device name same as in previous step. (/dev/sdb1 in my example) The mount folder will be reported back to you to use in the next step. For example, suppose lsblk tells me this:

sdc      8:32   1   7.5G  0 disk
└─sdc1   8:33   1   7.5G  0 part

Then I will do the following:

$ udisksctl mount -b /dev/sdc1
Mounted /dev/sdc1 at /media/xieerqi/A669-34EF.

You can see it automatically created /media/xieerqi/A669-34EF folder and mounted my pen drive there. Also , big advantage is that you do not need sudo.

Use rsync or cp or mv to get your files to the folder reported in step 3. Consult manual pages on usage of these commands. cp and mv are simplest. mv FILE DESTINATION - in my example
(where FILE is the thing you want to move to the drive)

mv FILE /media/me/4C45-110F

rsync is the best for backup however.

For example, to backup TESTDIR to my usb drive, I can do this:

$ rsync -av /home/xieerqi/TESTDIR/ /media/xieerqi/A669-34EF/~
sending incremental file list
created directory /media/xieerqi/A669-34EF/~
./
file1
file2
file3

sent 228 bytes  received 125 bytes  706.00 bytes/sec
total size is 0  speedup is 0.00

udisksctl unmount -b /dev/sdXY. Remove the device

Example

$ udisksctl unmount -b /dev/sdc1
Unmounted /dev/sdc1.

NOTE: some drives mount to directories that have names with spaces. If you run rsync or mv with not quoted names like that, your data will not be copied to correct destination. Always quote pathnames that have spaces in them.


Why does Ubuntu 12.04 64bit recognize a symlink as a binary file?

When you execute ls -l in the directory (in your video), you can see that g++ is not a symlink. Here is what a symlink from my system looks like:

lrwxrwxrwx   1 root root    10 May 28 20:20 modules.conf -> ../modules

Note the string at the beginning: lrwxrwxrwx - all symlinks have this.

You can also tell that your file g++ is not a symlink, because when you open it, instead of seeing the contents of the file it points to, you see some other data.

If a file is not readable, for example it doesn't have a known header or magic number file name-of-file will return data and programs may decide it is a 'binary file'. Type man file for more about this.

To workaround this part of your problem just replace the files by making symlinks to replace the broken files, for example:

To create a symlink to your file gcc named g++ in the directory do this:

ln -s gcc g++

And then ls -l to check. You should see something like:

lrwxrwxrwx  1 zanna zanna    3 May 31 08:38 g++ -> gcc
-rwxrwxr-x  1 zanna zanna    0 May 31 08:38 gcc

But whether your envsetup script will then run is... another question.

How did this happen?

Beyond the scope of the question really, but for further investigation:

You mention that your attempt to build the environment throws stray \376 and \377. This is octal notation for \255 and \254 which is a Byte Order Mark showing that a file uses UTF-16 encoding. UTF-16 (little endian) encoding is also represented by the characters ÿþ which you see in your not-symlink. These bits of code will be reported as 'stray' if they occur anywhere other than at the beginning of a file. Windows (NTFS) and other filesystems use UTF-16 LE encoding for filenames (and the Unicode strings that store their version of symlinks) so this could be happening because parts of the pathnames are in such a filesystem. Again, fix by making new symlinks.

You can't turn a regular file into a symlink because in general symlink-ness is metadata stored in the filesystem, in inode tables.

However, since there are symlink implementations that store the path data inside the file, and this method could be used as a fallback in the event that there are not enough inodes available to store symlink paths, this might have happened because you don't have enough inodes in the partition (have a look with df -i .)


Battery backup not as long as expected and system temperature rises when using Ubuntu

Improve Power  Usage / Battery Life In Linux With TLP

  Overview

Use this to improve your battery performance and to maintain temperature. So here is how to install and configure TLP:

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

  ThinkPads

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

tlp-rdw – Radio Device Wizard - Need to enable/disable & Power saving (Wifi / Bluetooth )

smartmontools - needed by tlp-stat to display disk drive S.M.A.R.T. data

ethtool - needed to disable wake on lan

tp-smapi-dkms ThinkPad only, tp-smapi is needed for battery charge thresholds and ThinkPad specific status output of tlp-stat

acpi-call-tools ThinkPad only, acpi-call is needed for battery charge thresholds on Sandy Bridge and newer models

  Configuration

Removing default Ubuntu cpu frequency config

 sudo update-rc.d -f ondemand remove

TLP Developer

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

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

  sudo gedit /etc/default/tlp

  Parameters

General hints:

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

  0.) General

TLP_ENABLE=1

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

  1.) File System

     DISK_IDLE_SECS_ON_AC=0
     DISK_IDLE_SECS_ON_BAT=2

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

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

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

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

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

  2.) Dirty page values

 MAX_LOST_WORK_SECS_ON_AC=15
 MAX_LOST_WORK_SECS_ON_BAT=60

Leave the default value

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

  3.) Processor and Frequency Scaling

 CPU_SCALING_GOVERNOR_ON_AC=ondemand
 CPU_SCALING_GOVERNOR_ON_BAT=powersave

Remove the hash and edit it as conservative.

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

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

Governor ??

The governor decides what frequency should be used.

Module Description:

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

performance     Run the cpu at max frequency

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

powersave       Run the cpu at the minimum frequency

TLP Developer

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

  4.) Min/Max frequency

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

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

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

  5.) Turbo Boost

 CPU_BOOST_ON_AC=1
 CPU_BOOST_ON_BAT=0

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

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

  6.) Cpu Cores/Hyper-Threads

 SCHED_POWERSAVE_ON_AC=0
 SCHED_POWERSAVE_ON_BAT=1

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

  7.) Kernel

 NMI_WATCHDOG=0

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

  8.) Hard disk advanced power management level

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

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

1 – max power saving / minimum performance

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

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

192 – prevents excessive head unloading of some HDDs

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

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

Different values for multiple disks are separated with blanks.

  9.) Disk I/O Scheduler

 #DISK_IOSCHED="cfq cfq"

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

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

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

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

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

min_power/medium_power/max_performance

 SATA_LINKPWR_ON_AC=max_performance
 SATA_LINKPWR_ON_BAT=min_power

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

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

( default/performance/powersave )

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

 PCIE_ASPM_ON_AC=performance
 PCIE_ASPM_ON_BAT=powersave

  12.) Radeon graphics clock speed

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

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

 #RADEON_POWER_PROFILE_ON_AC=high
 #RADEON_POWER_PROFILE_ON_BAT=low

  13.) WiFi power saving mode

1=disable/5=enable

(Linux 2.6.32 and later, some adapters only!)

 WIFI_PWR_ON_AC=1
 WIFI_PWR_ON_BAT=5

  14.) Disable wake on lan

Y = Yes , N = No

 WOL_DISABLE=Y

  15.) Audio power saving for Intel HDA

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

 SOUND_POWER_SAVE=1

  Disable controller too (HDA only): Y/N

 SOUND_POWER_SAVE_CONTROLLER=Y

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

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

  BAY_POWEROFF_ON_BAT=1

  Optical drive device to power off (default sr0)

 BAY_DEVICE="sr0"

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

  RUNTIME_PM_ON_AC=on
  RUNTIME_PM_ON_BAT=auto

  Runtime PM for all pci(e) bus devices

 RUNTIME_PM_ALL=1

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

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

  18.) Usb autosuspend

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

 USB_AUTOSUSPEND=1

  19.) System Start and Shutdown

 RESTORE_DEVICE_STATE_ON_STARTUP=0

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

0 – disable, 1 – enable

 DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"

Disables builtin radio devices upon system start:

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

Multiple devices are separated with blanks.

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

 sudo nano /etc/rc.local

And add the following line before exit 0

 rfkill block bluetooth

Save & Exit & Reboot

  Working with TLP

After installation TLP will be automatically activated upon system start.

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

  sudo tlp start

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

 sudo tlp-stat

Check You system temperature

 sudo tlp-stat -t

Show battery information only:

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

Show configuration only:

tlp-stat -c
tlp-stat --config

Show radio devices switch state only:

tlp-stat -r
tlp-stat --rfkill

Show temperatures and fan speed only:

tlp-stat -t

Apply Battery Settings (ignoring the actual power source):

sudo tlp bat

Apply AC Settings (ignoring the actual power source):

sudo tlp ac

You can check Which I/O you are using.

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

  Trace Mode

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

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

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

 tlp-stat -T

Or

 grep "tlp" /var/log/debug

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

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

And restart the daemon

 sudo /etc/init.d/rsyslog restart

  Sources and additional help

There is very good support at TLP Website

Useful Config Link 1

TLP Settings

ALPM

Optional tweaks

  Tweak your CPU frequency with indicator-cpufreq

Installation

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

 sudo apt-get install indicator-cpufreq

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

 indicator-cpufreq -f

Screenshot

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

Changing CPU frequency

Click on indicator

  PowerSavingTweaks for Intel Graphics

Configuration

 sudo nano /etc/default/grub

change:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.lvds_downclock=1 drm.vblankoffdelay=1"

and run:

 sudo update-grub

Reboot to apply the changes. You do not need other tweaks as they are already added by defaults.

Additional Advice

  Regularly discharging the battery

Discharge the battery atleast twice a week.

I have been using Dell utility in windows and it shows my battery health to be 94%. I had 76% before because I was not discharging it. Now that I am discharging it twice a week it's at 94% and I get almost 5 hours of battery life.

@Syzygy

Battery discharges Read before discharging the battery

Update

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

Overview

I have tested VA-API Hardware Acceleration in Ubuntu 13.04 and it save around 2 to 4 watts of battery and save cpu usage when playing movies, I would recommend it because it has no downside.

  About VA-API

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

Help full Links

webupd8

Official Intel Drivers are using VA-API

Support video codecs

  Install Intel / AMD VA-API drivers in Ubuntu

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

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

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

 sudo apt-get install xvba-va-driver vainfo

  Install MPlayer with VA-API support in Ubuntu

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

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

Now you need to install smplayer or vlc

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

OR

 sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc

  Configuration

SMPLAYER

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

VLC

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

Helpful Links

How to correctly enable/test VA-API on Intel Sandy Bridge?

Command line flag for mplayer to use hardware acceleration?

UPDATE

  PowerSavingTweaks for Intel Graphics

 sudo nano /etc/default/grub

change:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

 GRUB_CMDLINE_LINUX_DEFAULT=""quiet splash pcie_aspm=force i915.lvds_downclock=1 drm.vblankoffdelay=1  i915.semaphores=1"

and run:

 sudo update-grub

  Added 2 new options

1 = pcie_aspm=force , 2 = i915.semaphores=1

As the test results shows it save around 0.75 to 1 watts of battery

Before

  Summary:
    9.40 Watts on Average

After

  Summary:
    8.56 Watts on Average

I will try to update more test results, This update is still in beta process, i have tested only twice, please share your results also.

Helpful Links

3x+ battery life

If you google i915.semaphores=1 & i915.semaphores=1 battery save you will find very good links


Is warning on newly partitioned 4TB hard drive after 16.04 install a problem?

sda1 is flagged bios_grub, so it does not have a filesystem -- it is just raw disk space for grub's core.img file.  You need such a partition on a GPT disk booting legacy, but not the older MSDOS partitioned disks because there was room on the MSDOS disks after the partition table, but before partition 1.

Bullet #3 under the Warning is "There is no filesystem availale (unformatted)" which is the case for that partition.  Ignore the warning.


Don't remove python 2!!

Ubuntu versions, later then 12.04 already have python 3 installed. This is an additional version, not instead of.

A lot of software (still) depends however on 2.7, removing it will break the system. On Ubuntu, python 2 is called by:

python

or

python2

while python 3 is called by

python3

See the current version(s)

If you run:

python3 -V

you will get your current version of python 3, while

python -V

will output the current version of python 2


I had the same problem with Ubuntu 14.4 on an AMD64 box;

Not sure how I ended up in that state, but it was obvious that, inside of firefox, the pipelight/silverlight plugin tried to load two dynamic libraries, and could not find them.

Both were attempted to be loaded as 32bit variant (more specificaly from a directory explicitly designated for 32bit libs.)

The related library files for 64bit architecture where present

p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/p11-kit-trust.so: /usr/lib/i386-linux-gnu/pkcs11/p11-kit-trust.so: cannot open shared object file: No such file or directory
p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: cannot open shared object file: No such file or directory

I read about some hackish approaches like ubuntuforums about "p11-kit error Workaround WINE in AMD64 Ubuntu 12.04, and tried to install packages with similar names to get the libs.

The tricky part was that the libs are not in the packages where you'd expect them from the packages name, but slightly similary named packages.

So, I found out that these two packages

p11-kit-modules:i386 and libp11-kit-gnome-keyring:i386

need to be installed to fix the two  "couldn't load module" cases.

Note that this did not resolve a third error message line followed direcly to the the lines discussed above:

err:secur32:schan_AcquireClientCredentials Could not find matching protocol


Did I break my computer? Stuck on "Please remove the installation medium, then reboot"

Remove the LiveUSB, force a power off, then power back on. If the newly installed OS will not boot, then reboot from the LiveUSB and reinstall.


Why don't some of my applications show up in the launcher when opened?

Just my thought, not sure if it's the right direction:

In Compiz Config, go to "Opacity, Brightness and Saturation" and try to add a window specific setting. There's a tool which lets you "grab" some information about any window. Test your mysterious app window with that tool and tell us if there is anything special.


The following shellscript works for me. I have problems with json_pp, it complains about malformed JSON string, neither array, object, number, string or atom.

#!/bin/bash

counter=0
while read line;
do
# wget "$line" -O "${line##*/}$((counter++))"
 page=$(curl -s "$line")
 echo "$page" > "loot_$((counter++))"
done < links.txt

I prefer lower case variables (to decrease the risk of conflict with already existing environment variables).
I redirect from the input file (and avoid calling cat)
I update counter inside the loop
I use local variables loot_... for testing, but you can keep the subdirectory in the path if you wish.
Please notice that I have quoted, "...", the variables when used in the script.


suddenly can't SSH (connection refused), sshd service not recognized

This might sound silly to you, but have you checked all the dpkg.log.* files? Some will be gzipped, you can grep them using zgrep or scroll through them using zless.

I don't know for sure, but I think sometimes you might stumble over weird dependencies, so maybe you removed some package that happened to trigger openssh-servers removal? Did you do anything with dpkg, apt, or any other tools that use them?

(This is an "answer" because I can't comment yet. I don't see why I would need reputation for commenting, but...?)


If at 5 dots it usually is too late.
You use Escape key after UEFI screen but before grub normally shows.
Or if BIOS you press an hold shift key from BIOS screen until grub menu loads.
If you have UEFI fast boot on, you may not have time to press any key.
And if you changed grub timeout to 0 you may not be able to get grub menu.
Cold boot or full power down, may then then have system go back thru the full POST and give you just enough time to press keys.
If grub timeout at zero, check Boot-Repair's advanced options or a full reinstall of grub.
https://help.ubuntu.com/community/Boot-Repair
https://sourceforge.net/p/boot-repair/home/Home/


Set the default program to PDF Studio 8 Pro

Right click on a PDF → Properties → File Type Options
In Application Preference Order → +Add
Instead of selecting from that tree view, Use browser button

Browse to PDF Studio 8 executable


How to have a OpenLDAP Multi master replication setup?

It depends what tool they will use to do the load-balancing. If they are using BIND for your DNS you could use SRV records and OpenLDAP is one of the few applications that supports it. The attached link will give you greater info, but basically you need to determine a priority value along with a weighting value as well. You basically need to determine how even of a load that you want across the systems and set your values as such.

For the LDAPS certificate you may run into issues if it validates the CN, which in your case would be ldapserver.example.com on all three hosts. If it resolves the locat hostname to the cert it may not work.

BIND SRV Record Type for Load Balancing


Ubuntu Touch don't (currently) have an office app in the core-apps nor have anyone created one that I know of. The Ubuntu phone uses QT so if you want to port one then the easiest would be to port/fork one that is written in QT - but a lot of work will still be required to get it to work with the screen size.

Since the phone uses QT you won't be able to install Libre, so Libre will not be the default.


In order to help ld to find your hdf5 library you can add the following flag:

-L /usr/lib/x86_64-linux-gnu/hdf5/serial

i.e.

~$ gcc -lhdf5 -L/usr/lib/x86_64-linux-gnu/hdf5/serial

  man gcc

-Ldir
   Add directory dir to the list of directories to be searched for -l.

Official install instructions

Configure the HDF5 version

Note: this is a quick fix for a minor bug / issue with the version of libhdf5. If you know a better / proper way to solve it, let me know. If this section doesn't apply to you, omit it.

Go to the libraries directory:

cd /usr/lib/x86_64-linux-gnu

Set LD_LIBRARY_PATH for libraries in Anacoda, such as libhdf5.so.10, libhdf5_hl.so.10:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/ubuntu/anaconda/lib" >> ~/.bashrc

Update the "Dynamic Linker":

sudo ldconfig


I think this link may help you solve your problem or, at least, help you tell us what you need ;)

Please, provide some information about your steps and the hardware you're using.


I have the same issue on my Dell 1501.  I had no problem in shutdown/poweroff/reboot on i386 Kubuntu 14.04.   I could not shutdown/poweroff/reboot it on AMD64 Kubuntu 18.04.1 LTS any more.

Adding boot options do not work.

To work around it, I use the old kernel.  I downloaded and installed the 4.4.0-141 image manually.

root@dell1501:~# dpkg -l linux* | grep -v none
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
||/ Name                                   Version              Architecture Description
+++-======================================-====================-============-===============================================================
ii  linux-base                             4.5ubuntu1           all          Linux image base package
ii  linux-firmware                         1.173.2              all          Firmware for Linux kernel drivers
ii  linux-generic                          4.15.0.42.44         amd64        Complete Generic Linux kernel and headers
ii  linux-headers-4.15.0-42                4.15.0-42.45         all          Header files related to Linux kernel version 4.15.0
ii  linux-headers-4.15.0-42-generic        4.15.0-42.45         amd64        Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii  linux-headers-4.4.0-141                4.4.0-141.167        all          Header files related to Linux kernel version 4.4.0
ii  linux-headers-4.4.0-141-generic        4.4.0-141.167        amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ii  linux-headers-generic                  4.15.0.42.44         amd64        Generic Linux kernel headers
ii  linux-image-4.15.0-42-generic          4.15.0-42.45         amd64        Signed kernel image generic
ii  linux-image-4.4.0-141-generic          4.4.0-141.167        amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-141-generic    4.4.0-141.167        amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-generic                    4.15.0.42.44         amd64        Generic Linux kernel image
ii  linux-libc-dev:amd64                   4.15.0-42.45         amd64        Linux Kernel Headers for development
ii  linux-modules-4.15.0-42-generic        4.15.0-42.45         amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii  linux-modules-extra-4.15.0-42-generic  4.15.0-42.45         amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii  linux-sound-base                       1.0.25+dfsg-0ubuntu5 all          base package for ALSA and OSS sound systems

I kept the new kernel around just in case we need it.  To trick grub to use the older kernel as default, I hard linked the older vmlinuz and initrd.img to a new version say 9.1.1.

Now my Dell 1501 boots up on the 4.4.0 kernel to work around the issue.

uname -a
Linux dell1501 4.4.0-141-generic #167-Ubuntu SMP Wed Dec 5 10:40:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

If ubuntu has a fix, please wake me up.

Thanks.


All-in-one web-administration tool, alternative to Webmin

There is something called Ebox. I've only heard good things about it. It's free software and it's in the archives. It has many modules for different things, like network. They've renamed it to Zentyal, but it's still called Ebox in the archives. You can read about it here: http://www.zentyal.org/


For 12.04
Thanks to @duffydack's hint, I discovered this:

In the Password application, right-click the Passwords: default

Select Change password
Enter the old password, and no new password then click OK
Confirm to use unencrypted passwords:

... But oddly, this does not work: after rebooting, I must enter the password again. Any hints?


You can manually edit file  /etc/apache2/sites-enabled/000-default.conf (I am supposing you have a strictly default Apache configuration on your server).

You then change the line

    #ServerName www.example.com

and put in whatever IP address you use to connect from your clients, probably the server's IP address on eth0:

    ServerName 192.168.0.100

If you have a local DNS service up, you could also use your server's name, such as:

    ServerName www.localserver.local

In this case, both the clients and also the server will need to resolve this name.

Once this is written to the file, restart the Apache service (or reboot the computer) and the annoying message should go away for good.

HTH


Prevent airplane mode from turning on when lid is closed in ubuntu gnome 17.04

This guide is what helped solve the issue for me: http://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/

Basically, open your preferences using sudo gedit /etc/systemd/logind.conf and change the line starting with HandleLidSwitch to HandleLidSwitch=ignore


Almost a year has passed since this question was asked, but it's something that can create a lot of stress for people who are not prepared.
When you see a message like InnoDB: Database page corruption on disk or a failed ... file read, then you're looking at one of a handful of problems:

the hard drive has physically gone bad
the system was in the middle of a long write when power was cut to the machine, now the InnoDB tables are in an incomplete state
the hard drive is full
the hard drive has run out of inodes

To resolve this, there are really only two options that I have found work consistently. The first is to switch over to the hot-swap server and carry on, which is not very realistic for most people running MySQL. The second is to set the mysql_force_recovery value in mysqld.cnf and hope that the system can rebuild enough of itself to allow a mysqldump, followed by a database restoration.
This is how you do it:

Open a Terminal or SSH into the server

Open the mysqld.cnf file as root:
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

Note: You can use any text editor that you prefer. vi here is more about muscle memory than an implicit recommendation.

Add the following to the end of the file:
mysql_force_recovery=4

Restart MySQL:
sudo service mysql start

The rebuild process may take a long time depending on the size of the database. I have seen 5GB databases need as much as 15 minutes to come back online. Once the database is accessible again, export as much of the data as possible:
mysqldump -h {host} -u {user} -p --events --routines --triggers --all-databases > full-export.sql

Restore this to a test/development machine, see what's missing or what needs to be fixed, then begin building a new production server. Do not trust the old one after it has failed you, regardless the reason.


Use common data folders for two users instead of separate ones

Don't move anything. Just use links. For example, say your normal user is usera and your second one is userb. Presumably, userb is a brand new account and doesn't have any data you want to keep. So, delete the directories in question and recreate them as links, then set up the right permissions:

Delete the directories and recreate as links

sudo rmdir ~userb/{Desktop,Documents,Music,Pictures,Public,Templates,Videos}
for i in Desktop Documents Music Pictures Public Templates Videos; do
    sudo -u userb ln -s ~usera/"$i" ~userb
done

Create a new group and add both users to this group:

sudo groupadd foo
sudo usermod -aG foo usera
sudo usermod -aG foo userb

Change the group ownership of the directories you want to share to this new group:

chgrp -R foo ~usera/{Desktop,Documents,Music,Pictures,Public,Templates,Videos}

Set the permissions on the target directories to rwx for the group and set the SETGID bit on the directory so that new files will belong to the right group.

chmod -R g+rwxs ~usera/{Desktop,Documents,Music,Pictures,Public,Templates,Videos}

Set the Access Control List settings to set the permissions for newly created files/directories:

setfacl -d -m g:foo:rwx ~usera/{Desktop,Documents,Music,Pictures,Public,Templates,Videos}

That's it. Now, the directories in ~/userb are links to those in ~/usera and both users have read/write access to them.


How to get Lubuntu to work on a PC from the year 2004?

I would try to install Debian stable in case Ubuntu fails.

Also, Ubuntu 12.04 LTS is reasonable option. But make sure you try to boot with both graphic cards to see if that is the case.

But, you didn't gave us much more details except that one. Maybe you can update your question with exact types of GPU you have?


since you are using the server edition, I will state all the necessary steps:

Download the deb

32 bit:

 wget http://www.teamviewer.com/download/teamviewer_linux.deb

64 bit

wget http://www.teamviewer.com/download/teamviewer_linux_x64.deb

after that just install teamviewer:

sudo dpkg -i teamviewer_linux.deb

or teamviewer_linuxx64.deb if you downloaded the 64 bits version.

It should work without wine, I just tested that.

But shouldn't you use another vnc client? Because teamviewer is nice and easy, but gives no particular use for a server.


How do I check the version of the Selenium API installed?

Here's how i checked for the version of selenium in Python.

>>> import selenium
>>> help (selenium)
Help on package selenium:

NAME
    selenium

FILE
    c:\python27\lib\site-packages\selenium\__init__.py

DESCRIPTION
    # Licensed to the Software Freedom Conservancy (SFC) under one
    # or more contributor license agreements.  See the NOTICE file
    # distributed with this work for additional information
    # regarding copyright ownership.  The SFC licenses this file
    # to you under the Apache License, Version 2.0 (the
    # "License"); you may not use this file except in compliance
    # with the License.  You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing,
    # software distributed under the License is distributed on an
    # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    # KIND, either express or implied.  See the License for the
    # specific language governing permissions and limitations
    # under the License.

PACKAGE CONTENTS
    common (package)
    selenium
    webdriver (package)

DATA
    __version__ = '2.48.0'

VERSION
    2.48.0


Is there an alternative to CoreTemp on windows

I like to use conky to monitor temperature, CPU utilization % by core, CPU clock frequency and GPU clock frequency:

A good place to see user conky creations is Ubuntu Forums. The relevant code for the 22 second .gif above is:

${color}Today is:${color green}$alignr${time %A,}$alignr ${time %e %B %G}
${color}Distribution:${color green}$alignr ${pre_exec cat /etc/issue.net} $machine
${color}Kernel:$alignr${color green} $kernel
${color orange}${voffset 2}${hr 1}
${color2}${voffset 5}Intel® i-7 6700HQ 3.5 GHz: ${color1}@  ${color green}${freq} MHz
${color}${goto 13}CPU 0 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
${color1}All CPU ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 0 temp 1}°C ${goto 250}${color1}Up: ${color green}$uptime
${color green}$running_processes ${color1}running of ${color green}$processes ${color1}loaded processes.
${color}Load Avg. 1-5-15 minutes: ${alignr}${color green}${execpi .001 (awk '{printf "%s/", $1}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $2}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $3}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4}
${color orange}${hr 1}${if_existing /tmp/nvidia}
${color2}${voffset 5}${execpi .001 (nvidia-smi --query-gpu=gpu_name --format=csv,noheader)} ${color}@ ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.sm --format=csv,noheader)} ${alignr}${color}Temp: ${color green}${execpi .001 (nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)} C
${color}${voffset 5}Ver: ${color green}${execpi .001 (nvidia-smi --query-gpu=driver_version --format=csv,noheader)} ${color} P-State: ${color green}${execpi .001 (nvidia-smi --query-gpu=pstate --format=csv,noheader)} ${alignr}${color}BIOS: ${color green}${execpi .001 (nvidia-smi --query-gpu=vbios_version --format=csv,noheader)}
${color}${voffset 5}GPU:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader)} ${color}Ram:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.memory --format=csv,noheader)} ${color}Pwr:${color green}${execpi .001 (nvidia-smi --query-gpu=power.draw --format=csv,noheader)} ${alignr}${color}Freq: ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.mem --format=csv,noheader)}
${else}
${color2}${voffset 5}Intel® Skylake GT2 HD 530 iGPU @  ${color green}${execpi .001 (cat /sys/class/drm/card0/gt_cur_freq_mhz)} MHz
${color}${goto 13}Min. Freq:${goto 120}${color green}${execpi .001 (cat /sys/class/drm/card0/gt_min_freq_mhz)} MHz${color}${goto 210}Max. Freq:${goto 320}${color green}${execpi .001 (cat /sys/class/drm/card0/gt_max_freq_mhz)} MHz
${color orange}${hr 1}


"Hidden" options when booting (with GRUB)?

This is a standard feature of GRUB. The only difference is that the key to bring up the GRUB menu is either Shift or Esc.

To change the settings for GRUB, bring up your favorite editor and edit the file located at /etc/default/grub. Using the terminal app, like so:

gksudo gedit /etc/default/grub

At the top of the file, you'll see a number of settings that you can change, like so:

GRUB_DEFAULT=saved        # change this line
GRUB_SAVEDEFAULT=true     # add this line
GRUB_HIDDEN_TIMEOUT_QUIET=true
#GRUB_HIDDEN_TIMEOUT=0    #uncomment this line
GRUB_TIMEOUT=10           # change this line
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

As shown, the first two lines will save the last OS selection that you made, and then boot to the same operating system again at next boot. You'll probably need to add GRUB_SAVEDEFAULT=true yourself.

If you decide that you'd ALWAYS like to default to the same OS, set GRUB_DEFAULT=n, where n is the GRUB menu positional OS number (count starts at zero) that you'd like to boot (ie: GRUB_DEFAULT=3 for Windows OS), and you'd comment out the GRUB_SAVEDEFAULT=true by placing a # at the front of that line.

The #GRUB_HIDDEN_TIMEOUT=0 and GRUB_TIMEOUT=10 lines are the ones that you want to change.

Uncomment #GRUB_HIDDEN_TIMEOUT=0, by removing the # from that line, and try with the setting =0. If you find that it's not picking up your Shift or Esc keys at boot time, you can increase this setting to 1-3 seconds.

Change GRUB_TIMEOUT=10 from the default of 10 seconds to display the menu before continuing to boot, to 0 seconds, like so: GRUB_TIMEOUT=0.

Once edited and saved, you need to update your GRUB on disk, like so:

sudo update-grub


I found the answer in this post: Ubuntu 20.04 no driver loaded for Intel Iris Xe Graphics
I used this comand and there is no blink now.
apt install linux-oem-20.04 && sudo reboot 0


lvmetad not active ubuntu--vg-root clean NO BOOT due to AMDGPU-PRO

The problem is really due to AMDGPU-PRO. My previous version was 16.30. It seems it doesn't work on Ubuntu 16.04.2 LTS anymore, you need to go to 17.10

Solution:

go to http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx from another computer
Download on the other computer the driver (version 17.10)
you can unpack it as explained on the amd website
copy to a usb stick
start in normal mode your faulty computer, go to tty (ctrl + alt + F1)
mount the usb stick (note your usb might be elsewhere than on /dev/dbb1)

mkdir /media/usb
mount /dev/dbb1 /media/usb
cp media/usb/amdgpu....tar.xz /tmp

after copying to /tmp, first uninstall the previous version amdgpu-pro-uninstall
then follow amd's website install procedure as usual.
after rebooting, I had problems with login in. you need to check who owns .Xauthority: ls -lA. If it is root:root instead of your username, then do sudo chown username:username .Xauthority (with username being your real username ;) )

I still have weird issues around, but at least I can use my computer correctly.


How do I write a rules file for Blockify?

As I've tested building package (Didn't install it), the new way, which is documented in Debian, working just fine:

#! /usr/bin/make -f

#export DH_VERBOSE = 1
export PYBUILD_NAME = blockify

%:
        dh $@ --with python2,python3 --buildsystem=pybuild

Reference: Debian Packaging: Python LibraryStyleGuide


I got it installed and working with these. Open a terminal and run the following commands:

Add the Bitcoin Ubuntu PPA repository in your Ubuntu:

sudo add-apt-repository ppa:bitcoin/bitcoin

Update package lists

sudo apt-get update

Install bitcoin-qt

sudo apt-get install bitcoin-qt

Ready! Look for Bitcoin under "Applications menu"


System freezes during Bash auto-completion with Tab or Ctrl+R

Do you have unreachable or disconnected nfs mountpoints? I had the same symptoms as you describe and that was the cause in my case.


arm-none-ebai-gcc does not work from mounted directory

Solved!

Problem was the next: my Ubuntu is 64-bit. So for the correct work need to install "libc6-dev-i386".
Now it works!


Trying do-release-upgrade on 18.04: "system is unable to reach snap store"

The suggestion to run apt update and apt upgrade fixed my problem but it's also a good idea to have a backup on hand, thanks to @KGIII & @Jakke.


Windowed SDL apps are all flickering with a SiS graphics card

SiS graphics cards are well known for their bad support on linux (and in addition to that, they often have a broken VESA BIOS too).

There are some alternative sis graphics drivers that can be found on the internet, both open and closed source, but they often only support the specific or close enough hardware that they were distributed with.


How do you install Android Studio for Ubuntu 14.04 LTS

The first time you run studio.sh do it using the terminal and not by double-clicking. (e.g. ./<path>/android-studio/bin/studio.sh)

After it opens, you can go to Configure-->Create Desktop Entry to have a permanent shortcut to the application that you can use from there on.


You cannot have two HTTP servers listening on the same port in the same machine(The exception is when you put them on different interfaces or when you use Bridge Network Connections) .Looks the nginx server is running in your system , so if you want to use Apache2 instead , you can stop the nginx service :
sudo service nginx stop

and if you want to prevent nginx to start automatically at boot time (which might prevent apache2 to start or even vice versa) you can disable its service via systemctl :
sudo systemctl disable nginx


Skype detects webcam, but it is disabled in calls

You should try reinstalling skype:

sudo apt purge skype*
skype_link="https://go.skype.com/skypeforlinux-$(uname -m|cut -d '_' -f2).deb"
wget -c ${skype_link} -O skype-install.deb
sudo dpkg -i skype-install.deb
sudo apt-get install -f


Every Video in Fast forward motion 14.04

I get this issue when selecting an alternative sound output. If I have the analogue output selected all is fine. Do you have more than 1 output option in sound settings? If you do try changing it.


How to install a last but one version of a package?

The specific version of a package is provided by repository. The official repository indexes are located at https://packages.ubuntu.com . Also this list may be obtained by using apt-cache policy thunderbird on the local machine.

The current status of repositories for Thunderbird is available by using search on the same site.
For 18.04 LTS you now get:

  bionic (18.04LTS) (mail): Email, RSS and newsgroup client with integrated spam filter
  1:68.8.0+build2-0ubuntu0.18.04.2 [security]: amd64 i386
  1:52.7.0+build1-0ubuntu1 [ports]: arm64 armhf ppc64el
  bionic-updates (mail): Email, RSS and newsgroup client with integrated spam filter
  1:68.8.0+build2-0ubuntu0.18.04.2: amd64 arm64 armhf i386 ppc64el s390x

As you can see there is no 68.7 here. Also there is no such package version on the mirror.

If you really know what and why you are trying to achieve - download package manually and install it from LaunchPad.

Also please note that downloading old package version may have security issues.


Will packages work with older Ubuntu releases?

It depends on package dependencies, in general is not safe to use packages from different releases, even when they can be installed they may cause packaging conflicts and other unexpected issues.


Before Installing Ubuntu Disable Secure Boot in BIOS setting and Disable Fast Shutdown in Windows.

Note : Read step 10 carefully, the image of step 10 doesn't show what is written

Follow these steps :

Step 1 :
Download ubuntu 14.04 from here

Step 2:
Create a bootable usb stick on windows (Click here for guide)

Step 3:
Attach external HDD to USB (if not already attached)

Step 4:
Download Mini Tool Partition Wizard from here

Step 5:
Partition properly your external HDD. Create 100 gb partition of format ext 4

Step 6:
Restart your system and boot from USB

Step 7:
Click Install

Step 8:
Check both boxes

Step 9:
Choose something else and click next

Step 10:
Choose /dev/sda in "Device for boot loader installation" and Select partition of type ext 4 for Ubuntu installation (its device name would be something like /dev/sdb1) and click change.

Step 11:
Change Mount Point To /

Step 12:
Press "Install Now" to continue. Rest process is easy.


apparently devlink is not in ubuntu 16.04 but it is in 18.04.
I got it working after upgrade the system to 18.04.


The important thing to remember is that anyone can register a PPA. The main question you need to ask yourself is do you trust the PPA's owner. The level of trust needed depends on the package and what you hope to do with it. I might trust a PPA for an indicator based on the recommendation of a blog that I follow, but I'd want to know a lot more about the PPA owner if I were looking to upgrade X on my desktop or Ruby on a production server.

You should look at the PPA's owner on Launchpad. Is it team maintainer? What else is the owner involved with? Is the owner involved with the software upstream? Is the owner an Ubuntu developer?

Remember when you add a PPA to your sources, the main concern isn't the installation of a single package, it's that you are more or less giving the PPA root access to your machine through the ability to push updates.

Though it works the other way as well. Is the owner still actively providing security updates? foo 1.0 in Lucid might be a bit old, but at least it is still receiving security updates. foo 1.2 from Joe Bob's PPA might be more recent, but if a security bug is found to affect both version is he going to provide an update? Check their Lauchpad profile to make sure they are at least active.

Here's a scary story. I was investigating a PPA to possibly recommend to you for getting Ruby 1.9.2 on Lucid. Unfortunately one seeming popular one I came across is run by an "open" team. Team membership confers upload right to the team's PPA. As it now stands, someone could potentially join the team and upload a compromised version of the software in the PPA at anytime.


Copy to clipboard does not work in a terminal

I found the problem:  The Glipper app grabbed this shortcut key, but silently failed to open it's applet, providing no visual clue.

Solved!


Unable to remove a file which has a name like a command argument

There are many ways of doing this:

Use the -- which signifies the end of option flags and the beginning of the list of arguments for many programs (including rm).

rm -- -r

Use the full path

rm /home/you/directory/-r

or, from the same directory (your current directory is referred to as .):

rm ./-r

Use find

find . -name "-r" -exec rm {} \;

or, to get all such files

find . -name "-*" -exec rm {} \;

Use an ugly hack. Move everything to a different directory (this will fail for the -r file for the same reason as rm does) and then delete the original directory (which will remove the file) and move everything back again. So, assuming your -r file is in ~/foo:

$ mkdir ~/bar
$ for f in *; do mv "$f" ../bar/; done
mv: invalid option -- 'r'
Try 'mv --help' for more information.
$ rm -rf ~/foo
$ mkdir ~/foo && cd ~/foo
$ mv ~/bar/* .
$ rmdir ~/bar


How to fully maximize window in Xubuntu by dragging title bar to top edge?

Simple answer is no, this feature does not exist in Xfce 4.10

You could:

maximize the window by double clicking on the window header
use keyboard short-cut:

Alt+F5 Maximize current Width

Alt+F6 Maximize current Height

Alt+F9 Minimize current window.

Alt+F10 Maximize the current window.

Or create your own shortcut using the Window Manager in the settings

I found this: LINK


Ubuntu 12.04 resolution stuck on 640x480

Been there today!  12.04 on a VGA output board.  Same error as yours.

Success came as follows:

Set up TV so that its PC input (VGA in this case) offers the TV's best ie 1368x768
(and later, had to adjust TV's horiz and vert position to get the image fully on screen)
Boot Ubuntu and go through the above errors.  Just close that error window.
cvt 1368 768 60
gives a modeline statement.  I'm not on that set up now so can't show that, but here's the one from the PC I'm on now:
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
xrandr --newmode [copy from the space after cvt Modeline output]
eg
xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
xrandr
to see the extra in the list of modes available
xrandr --addmode VGA1 [or whatever] 1368x768_60.00
which in my case not only made that new mode available on VGA1 but switched over to using it immediately. You might need an xrandr --output command

I believe, but haven't yet tried, that adding lines 4 and 6 to /etc/lightdm/lightdm.conf might make it happen after a restart.  I just put lines 4 and 6 in a desktop text document with name ending .sh, props that and make it executable.  After reboot, double click the document, choose RUN, and hopefully you have the desired resolution.  Now you can waste your time watching those TV recordings in proper full 16:9 display!

Best of luck

Apols if the code above is not 100% spot on.  It's from memory as I am not at the system in question.


I can't install anything in Ubuntu Software Center

You can try this to remove lock:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock

Then clean:

sudo apt-get clean
sudo apt-get --purge autoclean

Now try to update:

sudo apt-get dist-upgrade
sudo dpkg --force-all --configure -a
sudo apt-get -f install


Fn Media keys slow/delayed on ubuntu gnome 17.04

For some reason my Gnome freezes when using Fn keys, or when I try to use 2 keyboards.
A friend of mine pointed to me that it occurs when switching to a keyboard layout that has Scroll Lock enabled, so I disabled it in the X11 keyboard layout file for my language and it solved the problem.

The steps I followed are:

Opened the keyboard layout file for my language, in my case:

sudo nano /usr/share/X11/xkb/symbols/br
Commented the line:

modifier_map Mod3 { Scroll_Lock };
Logged out and logged in again or run command setxkbmap.

These steps are specific for the Brazilian Portuguese ABNT2 Layout and may not work for other layouts, but it can help you find a similar solution.


You have not mentioned your browser, so question is a bit vague. But if you were using Chromium then you have to install pepperflash by running this command in your terminal-

sudo apt-get install pepperflashplugin-nonfree


Setting up my new 3G usb modem "D-Link DWP 156 in ubuntu 13.10

Switch to su mode, plug-in your modem

type lsusb in terminal and note down the product id and vendors id
     mine was Bus 002 Device 012: ID 2001:7d0b D-Link Corp. here product id is 2001 and vendors id is a403.
type /dev/sr press tab twice. The last one is your modem. mine was sr1.
type mkdir /media/cdrom for creating the directory
mount your device as cdrom. type mount /dev/sr1 /media/cdrom
open the user manual for linux
type eject /media/cdrom for ejecting the usb device.
type modprobe usbserial vendor=0x2001 product=0xa403 for switching your device to modem (please pay attention to give your product and vendor id which was noticed by you in step 1)

Wait for some seconds or disable and enable networking.

You can see your mobile broadband connection enable it and configure it with the help of manual which you opened in step 5

you have to mount the device to cdrom and eject it each time when you plug-in/reboot your system

Thats it..! you can see your d-link dwp modem blinking... but it may shows no range , never mind. you are connected now.!!!


You can install pip for python3.9 using get-pip.py as the official documentation as well as the github page describes it:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.9 get-pip.py

This script will also place binaries in your ~/.local/bin, so you can optionally add this directory to PATH.
echo 'export PATH=~/.local/bin/:$PATH' >> ~/.bashrc
source ~/.bashrc

When you do that, you might want to remove ~/.local/bin/pip and ~/.local/bin/pip3 and only keep ~/.local/bin/pip3.9 to not replace the already available commands.

Finally, check the proper installation:
$ pip3.9 -V
pip 21.0.1 from /home/user/.local/lib/python3.9/site-packages/pip (python 3.9)


Maybe somehow the folder was somehow renamed.  Try to rename the folder, and see.

Here is what I did, just to reproduce the problem.  I right clicked on the documents folder, and renamed it /home/xxxx/Downloads.

Then did cat .config/user-dirs.dirs the output is below:

I then renamed the folder back to Documents, and did cat .config/user-dirs.dirs, and everything was back the way it was.


How to make bash script run with a latency (i.e. wait 1 sec at each iterations)?

Simply use sleep 1 in Bash.

for (( i = 1 ; i <= 160 ; i++ )); do
  sleep 1
  qsub myccomputations"${i}".pbs
done


Login fails after upgrade of Ubuntu 20.04 kernel and headers

Solved
I traced the problem to a modification in my .bashrc that was placed there by Anaconda as part of the routine install of Anaconda, conda, the Jupyter software, and python3.  Conda edits the PATH at the end of the file to have their executables first in the search order. Removing that code fixed the problem— reinserting the code resulted in the problem returning.
So, I suffered loss of the functionality of Anaconda’s well designed tool suite briefly to attend to more urgent matters.  Today I downloaded Anaconda’s installer and, by executing it with the -u option, updated their installation. As before, I allowed their edit of my .bashrc; however, this edition of the change caused no problems.


I would suggest to upgrade the driver.

Run in a terminal

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-418
sudo apt upgrade

Most likely this will fix the issue on the 5.3 kernel.


How to Make Your Linux PC Wake From Sleep Automatically

Want to put your Linux PC into sleep or hibernate mode and have it automatically wake at a specific time? You can easily do this with the rtcwake command, included by default with most Linux systems.

This can be useful if you want your computer to do something at a specific time, but don’t want it running 24/7. For example, you could put your computer to sleep at night and have it wake up before you do to perform some downloads.

Using rtcwake

The rtcwake command requires root permissions, so it must be run with sudo on Ubuntu and other Ubuntu-derived distributions. On Linux distributions that don’t use sudo, you’ll have to log in as root with the su command first.

Here’s the basic syntax of the command:

sudo rtcwake -m [type of suspend] -s [number of seconds]

For example, the following command suspends your system to disk (hibernates it) and wakes it up 60 seconds later:

sudo rtcwake -m disk -s 60

Types of Suspend

The -m switch accepts the following types of suspend:

standby – Standby offers little power savings, but restoring to a running system is very quick. This is the default mode if you omit the -m switch.

mem – Suspend to RAM. This offers significant power savings – everything is put into a low-power state, except your RAM. The contents of your memory are preserved.

disk – Suspend to disk. The contents of your memory are written to disk and your computer is powered off. The computer will turn on and its state will be restored when the timer completes.

off – Turn the computer off completely. rtcwake’s man page notes that restoring from “off” isn’t officially supported by the ACPI specification, but this works with many computers anyway.

no – Don’t suspend the computer immediately, just set the wakeup time. For example, you could tell your computer to wake up at 6am. After that, can put it to sleep manually at 11pm or 1am – either way, it will wake up at 6am.

Seconds vs. Specific Time

The -s option takes a number of seconds in the future. For example, -s 60 wakes your computer up in 60 seconds, while -s 3600 wakes your computer up in an hour.

The -t option allows you to wake your computer up at a specific time. This switch wants a number of seconds since the Unix epoch (00:00:00 UTC on January 1, 1970). To easily provide the correct number of seconds, combine the date command with the rtcwake command.

The -l switch tells rtcwake that the hardware clock is set to local time, while the -u switch tells rtcwake that the hardware clock (in your computer’s BIOS) is set to UTC time. Linux distributions often set your hardware clock to UTC time and translate that to your local time.

For example, to have your computer wake up at 6:30am tomorrow but not suspend immediately (assuming your hardware clock is set to local time), run the following command:

sudo rtcwake -m no -l -t $(date +%s -d ‘tomorrow 06:30’)

Help


Yes, I believe that it's safe to share your credentials with Juju. If you're running Juju locally, then you are granting it similar access than you might be grant s3cmd.

To protect your account, you should create an IAM user that has restricted access. This is standard practice and is appropriate for every automation tool.

Juju needs to be able to manage virtual machines, networks and storage. It doesn't need access to every AWS service.


In Ubuntu 12.10 Rygel didn't work for me as well for this purpose. Since then now I use Ubuntu 13.10, and Rygel has been updated to version 20, which works for me flawlessly. This GNOME Wiki! article tells us that Rygel has two PPAs:

https://launchpad.net/~yg-jensge/+archive/gupnp

To add this: sudo apt-add-repository ppa:yg-jensge/gupnp
https://launchpad.net/~yg-jensge/+archive/gupnp-unstable (this is unstable of course)

To add this: sudo apt-add-repository ppa:yg-jensge/gupnp-unstable

Both has packages back to Precise of Rygel, so if you are still using 12.10, and those repositories do not have Rygel version 20, then you might want to try using these PPAs.

Also, if something else would be the problem, here's my config to compare:

[GstLaunch]
enabled=true
title=@REALNAME@'s stream
launch-items=myaudioflac;myaudiompeg

myaudioflac-title=FLAC audio on @HOSTNAME@
myaudioflac-mime=audio/flac
myaudioflac-launch=pulsesrc device=upnp.monitor ! flacenc

myaudiompeg-title=MPEG audio on @HOSTNAME@
myaudiompeg-mime=audio/mpeg
myaudiompeg-launch=pulsesrc device=upnp.monitor ! lamemp3enc target=quality quality=6

[Playbin]
enabled=true
title=Audio/Video playback on @REALNAME@'s computer

[general]
interface=

[MediaExport]
uris=@MUSIC@;@VIDEOS@;@PICTURES@;


How to change the window color (default: white)?

The tweakability of Oneiric has suffered due to the switch to gnome 3, so for #2:

gedit supports the themes available in package libgtksourceview2.0-common, and if you are willing to, you can create your own or download a large selection from the net.

Click on Edit/Preferences, on the preferences dialog switch to Fonts & Themes and pick a theme.


Unwanted right clicking with touchpad and mouse on Lenovo e470

This may be due to a defective touchpad.

The simple way to fix this is to completely disable the touchpad in BIOS settings and use an external mouse.

If that fails, it might be worth contacting the seller to see what they'll offer for a defective touchpad.  Most likely what's happening is the touchpad giving spurious multi-touches -- depending on the laptop, a double or triple touch might be sent to the OS as a right click, resulting in your menu openings and other issues.  Disabling the touchpad will stop this completely, but if you need to use  the computer in situations where it isn't practical to use an external mouse (airline seats, for instance, or college lecture desks) it's something that will need to be fixed -- and might well be the reason your computer was for sale.


folders and files permissions please help

For this we need to assume that x is member of group g and neither y nor z are member of that same group. Then we can set the (group) ownership and access permissions as follows:

chown -R x a
chown -R y:g b
chown -R z:g c

chmod -R u+rwX,go-rwx a
chmod -R ug+rwX,o-rwx b c

This removes the read and traversal permissions for all other users (aside from x, y, and z) on all three directories as well.


Testing existing Ubuntu scopes without a supported device

You can create an emulator from Qt Creator to see and explore the existing scopes on a virtual device. Here's a screenshot of how to create one.

Go to the Devices tab in Qt Creator
Click on the "+" button on the bottom left hand side to open the Emulator creation dialog
Give the emulator a name, select the devel-proposed channel and press the Create button

Additionally, here are some screenshots of the default scopes: http://imgur.com/a/4NaGQ


How can I use bash command to move a set of directories from one location to another

You can just add a condition to check if the item is a folder.

for i in *; do
  if [ -d "$i" ] ; then
    mv "$i" /home/some_user/some_folder/"$i"
  fi
done


Your question is not clear on where you're trying to set your netmask.  The below will count for both ZenMap scan parameters and your system.

Your System

0.0.0.0 isn't a valid netmask for a local IP address.  The IPv4 private spaces are (in CIDR notation, thanks to ARIN:

10.0.0.0/8 (aka 10.0.0.0/255.0.0.0) IP addresses: 10.0.0.0 - 10.255.255.255.
172.16.0.0/12 (aka 172.16.0.0/255.240.0.0) IP addresses: 172.16.0.0 - 172.31.255.255
192.168.0.0/16 (aka 192.168.0.0/255.255.0.0) IP addresses: 192.168.0.0 – 192.168.255.255

Either use one of these, or use the one actually assigned to the network you're on.  Netmask 0.0.0.0 is not safe to use with a system IP address netmask, nor will it actually work as you think it will.  It's also not really a 'valid' netmask, it's a 'special' one that isn't really usable in addressing...

ZenMap Scanning Parameters of Netmask to scan for

The net mask 0.0.0.0 (in CIDR, /0) denotes "Every address to exist in all the universe" which is an invalid netmask for a specific IP range - you typically only see this with the IP address of 0.0.0.0, which with CIDR is 0.0.0.0/0 denotiong the entirety of the Internet.

If you are trying to scan all local IP addresses, you're going to be working within the confines of your network.  The first place to start is by determining the netmask for your private network segment (in a home router, probably 192.168.1.0/24 which indicates only the last octet changes).

Some other common 'private IP space' scans I've used, from 'fastest' to 'most evil':

192.168.1.0/24 - scans 192.168.1.0 through .255 - Fairly fast, < 10 minutes with small networks, for me.
192.168.0.0/16 - scans the entire 192.168.* range (which is the entire IP range for this set of private IP groups) - Takes a long time to complete
172.16.0.0/12 - scans the entire range of 172.16.0.0 through 172.31.255.255 (which is the entire IP range for this set of private IP groups) - takes a VERY long time to complete
10.0.0.0/8 - scans the entire range of 10.0.0.0 through 10.255.255.255 (which is the entire IP range for this set of private IP groups) - takes an EXTREMELY long time to complete.

Ideally, though, you know the address space you're scanning, and the exact netmask you want to be using.  Most home-grade private networks are 192.168.x.*, where x denotes a specific octet, such as 100, and * denotes any other address in the final octet.  You also typically see common home networks with a CIDR of /24 (old style netmask of 255.255.255.0) on these nets.

ZenMap tl;dr: Don't use 0.0.0.0 or /0 for your netmask/CIDR amount.  Either use the CIDR/netmask for the private IP space you're focusing on in its entirety, or use the netmask that you know the network is using.  (DO NOT use 0.0.0.0, you'll end up scanning the Internet!)


Im not an expert with openstack but I might know the solution to your issue. When I deployed openstack I had a similar issue where the proxy on my network was interfering with the download of Landscape. It was odd because I was able to ssh into a node and install packages with apt-get but when I tried to deploy openstack the Landscape setup failed. After some troubleshooting I found that the download was failing. I temporarily removed the proxy and it worked. Hope this helps!


Ubuntu 16.04 won't boot after AMD Radeon (radeon VCE init error -22)

In case someone face this problem also, here is the solution which worked for me:

Boot Live CD (I was using Mint, but it's not obligatory, can use other distribution probably)
Open terminal and type sudo su
use sudo mount /dev/sd** /mnt (instead of * you have to find out on which partition your root is stored, and use it)
And then with chroot /mnt you can change root to use it's terminal
After that type the command for uninstalling driver which made you problem, that comand for me was amdgpu-pro-uninstall

Hope this will save hours for somebody, cause I was trying a lot solutions for few hours today and none of them worked, but this one.


How to turn on the typographic layout in Xubuntu 16.04

Some keyboard layouts include 3rd and 4th level symbols, some don't. Those which do, such as the Ukrainian layout, enable the lv3:ralt_switch option automatically, so normally that's not necessary to set manually via dconf (or gsettings).

The English (US) and the basic Russian layouts don't include 3rd and 4th level symbols.

AFAIK, the xkb-option lv3:ralt_switch does not apply when using IBus input methods.

Edit:

One way to enable extra typographic characters system wide is to open the /etc/default/keyboard file for editing and make sure it includes the line:

XKBOPTIONS=misc:typo

Hopefully that makes a difference at next reboot.


Dell 5471 Ubuntu 16.04 Fan Noise and overheating

You should overtake the fan speed control from the BIOS.
You can install dell-bios-fan-control and set it up as service.

git clone https://github.com/TomFreudenberg/dell-bios-fan-control.git
cd dell-bios-fan-control
make
sudo mv dell-bios-fan-control /usr/bin/

Than, create a service file /etc/systemd/system/dell-bios-fan-control.service with the following contents:

[Unit]
Description=Disables BIOS control of fans at boot.
Before=i8kmon.service

[Service]
Type=oneshot
ExecStart=/usr/bin/dell-bios-fan-control 0
RemainAfterExit=true
ExecStop=/usr/bin/dell-bios-fan-control 1

[Install]
WantedBy=multi-user.target

Now, enable the service using

sudo systemctl enable dell-bios-fan-control

Than start the both services (i8kmon and dell-bios-fan-control). It should be fine.


A question about installing security updates

If your system is a server, there is a server updating program in the repositories you can use that will apply updates automatically:

https://help.ubuntu.com/14.04/serverguide/automatic-updates.html

If you use a desktop system, applying the updates via GUI is sufficient. You can choose the regularity of updating in the system settings, e.g. "apply security updates daily".


How to get a new version of a system file that I have messed up

The easiest solution I can think of is to download the GNOME Shell .deb package and extract the .css file from there, if you don't want to reinstall.

You can get the .deb for your architecture (the .css is platform independent really, but just in case) from this page: https://launchpad.net/ubuntu/+source/gnome-shell

Next time you want to edit the .css file, make a backup :).


Why can I not access any of the options when using dconf-editor?

yes you are missing something really obvious. You have to click on the arrows, to get to the sub items:


How do I set FBReader as the default mobi ebook reader?

Install FBReader:

sudo apt-get install fbreader

Associate with .mobi format:

xdg-mime default /usr/share/applications/FBReader.desktop application/x-mobipocket-ebook


At the end I found a really easy way to fix my problem.
I started the terminal and runned 'sudo apt full-upgrade' and then 'sudo apt autoremove', I rebooted and saw everything perfect, only the network manager applet missing (it seems an old bug)


What happened to the graphical PolicyKit settings?

Very little information has been available about the long absence of a policykit gui until it was discussed last year at a session of Ubuntu Developer Summit. It was discussed there in detail, and in that 'blueprints' session discussing desktop authorisation it was indeed noted that there

  is currently no simplified utility to customize policies

for policykit. However, an important point arising from the discussion was that

  PolicyKit upstream is against something as complex as policykit-1's "Authorizations" window

So it seems this may be one of the problems in implementing such a program.

Nonetheless, it was conceded that the command-line interface available was 'too hard to use' and so while the idea of a policykit gui seems to have been well received, I don't know whether there are any firm intentions to bring back a policykit gui anytime soon; it looks like a wishlist item really.

However, somebody with official connections might be able to give some further useful information on the current situation.


Ubuntu 12 and 14 installers do not load properly and/or do not complete installation on Lenovo ThinkCentre M900

As per DougSmythies' comment, the Intel i7 vPro chip (a "skylake" processor) does not seem to respect prior versions of Ubuntu.

Ubuntu 16.04 64-bit installed without a hiccup.

Post-installation, the OS runs mostly fine, but it does have some issues (it stalls on loading sometimes or cannot get past the login screen on some other tries).  But having started the machine about 30 times since installation, these hangs seem to be random and infrequent.  Still, they might point to some residual incompatibility between the OS and the chip.


Ubuntu 18.04 - Is there a way to disable the alt+½(the button right above tab) shortcut

You can disable the key by changing a setting. Either use dconf-editor, which is not installed by default, or execute a terminal command.
Using dconf-editor:
Navigate to /org/gnome/desktop/wm/keybindings/switch-group. The default setting is ['<Super>Above_Tab', '<Alt>Above_Tab']. Delete the <Alt>Above_Tab key so it becomes ['<Super>Above_Tab'].
Using the terminal:
Execute the command
gsettings set org.gnome.desktop.wm.keybindings switch-group "['<Super>Above_Tab']"

You can always reset a setting to the factory default:
gsettings reset org.gnome.desktop.wm.keybindings switch-group


it seems that Unity Hub download are non-resumeable, so any problem with the network will cause the download to fail (usually without any message).

Sadly the easiest solution is to retry the download until it succeeds.

There are alternative method by manually downloading and extracting the component required but keep in mind that is is not officially supported. You can follow the following steps if you want to try downloading it manually

Find the url of Unity download by using one of the following ways

Check Unity Hub log at ~/.config/UnityHub/logs/info-log.json
Open https://public-cdn.cloud.unity3d.com/hub/prod/releases-linux.json

Download the package manually
Extract it to a known location
Use the "Locate" button on Unity Hub and give the path of the extracted package


Difference between "bootable flag" and /boot mount point

As for boot flag, see here. It is usually not needed for Ubuntu installation.

Boot mount point is the partition you mount your /boot to, if you use a separate /boot partition. If you do not have a separate /boot partition, /boot is just a directory under /. See here for more about partitions and mount points used in Ubuntu installation.


You could easily download LXDE and all the dependencies with apt-get.

First, clean the cache.

sudo apt-get clean

Now, run the following

sudo apt-get --download-only install lxde

The downloaded packages will be in /var/cache/apt/archives


How do I start a persistent terminal running service on a headless server?

The above suggestions by AlexP and user535733 both work.

With screen I start it, detach the screen session, and close the SSH browser.  Have to remember not to close the screen session, just detach it.

Nohup works, although the log file can grow quite large since the output is pretty verbose.  I think there's a way to direct it to null and no log is created.  Still testing that.

Thank you both very much for your help.


If you know which package you need (probably firmware-iwlwifi) you can download and install it seperately.

You mention the use of the live cd, so what exactly are you after?


Loss of nautilus menu functionality in Ubuntu 16.04 LTS

The budgie-remix PPA includes a version of nautilus that does not have the unity patchwork to display menus.

budgie-desktop does not work very well with the older version of Nautilus in the main repository for 16.04.  This issue only affects 16.04 users - 16.10 and later versions use the main repository version of Nautilus.

Given that you have purged budgie-desktop I presume you have finished experimenting.  You will need to purge the PPA as well so that nautilus is downgraded from the GTK+3.18 version in the PPA to the older GTK+3.14 version that is in the main repo.

sudo ppa-purge ppa:budgie-remix/ppa


Build .deb package from source, without installing it

You might want to try out debuild to create a binary (deb) file out of source. You would have to prepare the debian folder like you are packaging it. Once you got it right, run the command debuild -b from inside the source directory and it will create a deb file for you.

You would also want to take a look at Introduction to Debian packaging.

If all that is crazy stuff, you would have to just make do with checkinstall messing with system files.


Creation of swap space failed on install

[UPDATE] I've managed to install Ubuntu now but it ended up on my C drive. I was under the impression that I should partition in Windows, and had been doing that exclusively. In addition Windows kept telling me that it couldn't shrink the C drive as much as I needed, even though it had lots of free space. Eventually I ran it without partitioning in Windows and used the Install Ubuntu alongside Windows 10 option. I should note that before this stage I had not seen the allocate disk space screen in the Ubuntu installer.

The first time it tried to install on my E drive (this was the only option available to me) and failed. The second time it gave me the C drive as the only option, and allowed me to allocate a suitable amount of disk space. I've restored the E drive and everything seems to be good for now.


change DNS server in a non-persistent way (on the command-line) [rescue mode]

i found a way to do this:

kill the dns service (there may be a more subtle way?)

# killall dnsmasq

restart the service using the desired upstream server:

# dnsmasq --server=192.168.2.1

on a newer ubuntu (one with systemd) this would be:

# systemd-resolve -i enp0s31f6 --set-dns=192.168.2.1  # --set-dnssec=true

check with:

# systemd-resolve --status


Bluetooth Keyboard only printing numbers. Ubuntu 19.04

It happened to me as well. I managed to fix it with:

numlockx off

If it works for you you can just add it to your .bashrc.


You give to your strictly FTP users no real shell account on the Gnu/Linux system.

Use the following command to create ftp users.

This step must be done for each additional new user you allow to access your FTP server.

sudo su
mkdir /home/ftp
useradd -d /home/ftp/user1/ -s /dev/null user1 > /dev/null 2>&1
passwd user1

The mkdir command will create the ftp directory under the /home directory.

The useradd command will add the new user named user1.

The passwd command will set the password for this user user1.

Edit the /etc/shells file, and add a non-existent shell name like null.

This fake shell will limit access on the system for FTP users.

sudo su
nano /etc/shells

Content:

# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash

Add line /dev/null, like this:

# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/dev/null

Control + O, save file. Control + X, close nano.

Edit your /etc/passwd file and add manually the /./ line to divide the /home/ftp directory with the /user1 directory where the user user1 should be automatically chdir'd to.

sudo su
nano /etc/passwd

Change:

user1:x:504:504::/home/ftp/user1/:/dev/null
To
user1:x:504:504::/home/ftp/./user1/:/dev/null

Control + O, save file. Control + X, close nano.

The account is user1.

The first part /home/ftp/ indicates the filesystem that should be considered their new root directory.

The dot . divides that from the directory they should be automatically chdir'd. change directory'd into, /user1/.


How do i find my username when locked out

Get to root shell as described there
Run following command to find user(subfolders are usernames): ls /home
reboot and login with one of usernames find at above step


The ISP had given the login id in lower case and the actual login was in upper case. This was the reason for the failure to connect to net.
The modem was also reset due which it could not be setup properly.

These led to the problem.

The problem was solved by resetting the modem with proper parameters.


The answer to this question depends on the filesystem you used for your Ubuntu installation. If it's ext*, you can for instance use gparted (from a live-CD) to shrink the Ubuntu partition.

After that you'll probably have to reinstall the bootloader, but if you install Windows, it will overwrite the bootloader, so you'll have to reinstall it after Windows installation anyhow.

Beware, that Windows 8 (at least the 64bit version) requires your PC to boot using EFI, what might cause troubles if you installed Ubuntu using BIOS emulation (Ubuntu might not boot at any more at all - and I don't know how to fix that).


Where do I find Firefox NoScript .xpi on my system?

Using locate was a good idea, but Firefox extensions are referred to by UUIDs, unique names rather than human readable ones to prevent different extensions from having the same name.

As NoScript's is 73a6fe31-595d-460b-a920-fcc0f8843232, you should find:

locate *73a6fe31-595d-460b-a920-fcc0f8843232*

to be more helpful.


Remove context menu options in Files, Ubuntu Gnome 16.04

Some of the right-click options in Files (nautilus) are determined by systemwide nautilus extensions, and may indeed be removed by removing that extension.

To remove the "E-mail" option:

sudo apt remove nautilus-sendto

Removing the "Compress" option is less obvious. This comes installed with the file compression utility file-roller. You will remove the option with the following command, but you also will remove the file compression utility file-roller:

sudo apt remove file-roller

If you want to remove only the option, but keep the application file-roller, then you need to resort to an unsupported hack: rename (or delete) the file `/usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so'.

sudo mv /usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so /usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so.old

To restore, just switch the two file paths.

This is "unsupported", because you operate out of the packet management at the file level. An upgrade in file-roller will put the file back, so you then will need to repeat the process.


Laptop battery life drastically decreased compared to Windows 7

use powertop and see where the power goes


I've heard that there's a bug in the Ubuntu installer that prevents it from showing the "install alongside" option when a disk has four or more existing partitions. This really shouldn't be an issue for EFI-mode installs, but if the reports are correct, it is. (I've not tried to verify this myself.) Thus, you may have no choice but to use the "Something Else" option for partitioning. You could check this question and answers for general guidance on that issue. Alternatively, perhaps you could back up and delete one partition before proceeding, but without knowing what the partitions are, I can't recommend a specific one to delete. Certainly you should not delete the EFI System Partition (ESP) or the Windows C: drive. Recent versions of Windows also like to have a Microsoft Reserved Partition, which is normally empty but should not be deleted.

In terms of EFI-mode installation, my Web page on Linux EFI-mode installs covers the basics, but it's not Ubuntu-specific and it's not a step-by-step guide. The Ubuntu wiki has a UEFI page that may also be helpful.