How do I get openssh 6.9 or greater and Apache2.4.12 or greater on to my 15.04 server?

Yes, run the following commands to upgrade those packages to the newest versions available for 15.04:

sudo apt-get update

that command updates the list of packages available from the ubuntu server

sudo apt-get install openssh-server apache2

that command will upgrade those packages to the newest versions

You may want to upgrade all packages to get all the newest security u updates:

sudo apt-get upgrade

Finally, you may want to run sudo apt-get dist-upgrade to get the newest kernel updates which also include security updates for the kernel to be most secure but choose wisely when you run this command as it may make changes to the system that can have an effect on the way things function so do not run the dist-upgrade command unless you have some extra down time to spare in case you need to fix some stuff. Also, you may need to reboot after a dist-upgrade for the changes to take effect.

What is "dist-upgrade" and why does it upgrade more than "upgrade"?


Actually, you CAN slide all the way up: when using the indicator applet icon, the max slider IS 100% unamplified

To raise it ABOVE 100% (ie, to use amplified levels), you must go Sound Preferences.

So, when using the applet icont, go ahead and dont worry, it wont be amplified.

You can check this yourself: open the Sound Preferences window, and leave it open, visible on the desktop

Now access the indicator apllet icon, and slide up and down the volume level. Compare them (both will slide at the same time), and you will see that, using the applet, you can only go as far as 100% unamplified.

Hope that helps!

(i also had the same concern when i started using Ubuntu.. its a huge relief when you realize you dont have to open Sound Preferences anymore to "adjust"  it ;)


/lib/modules/2.6.38-8-generic/build: No such file or directory

you have to download the linux headers and and build a system link

apt-get install linux-headers
ln -s /usr/src/linux-headers-2.6.38/ /lib/modules/2.6.38/build


you can find it in the home directory under .wine a hidden directory. I mean

/home/your_user_name/.wine/drive_c

There you will have it.

you can also use command in your terminal.

locate drive_c


Get NVIDIA information in a friendly way?

The nvidia-smi program does have a man page:

man nvidia-smi

which lists options -q and -x for changing the output to XML.

nvidia-smi -q -x


How do I match technology to wake on lan from other services and applications

If you look the MAAS source tree under etc/maas/templates/power/ether_wake.template you'll notice that it calls /usr/bin/wakeonlan or /usr/sbin/etherwake with no parameters except the MAC address. That leaves a few possibilities about why it isn't working:

The MAC address is not stored within MAAS in a format that the tool recognizes. (it needs to be :-separated, such as 00:01:02:03:04:05.)
The tool is attempting to send packets out, but permission is denied by the operating system. (see this question, where someone suggests adding a line to /etc/sudoers.d)
The tool is sending the packets out, but on a nonexistent or incorrect interface. (according to the manual page, -i ifname is used to specify the interface, with the default being eth0)

All that said, it seems that using Wake on LAN is not a recommended way to run MAAS. Obviously it can be done, but since Wake on LAN does not support powering down machines or checking a machine's power status, it cannot be seamlessly integrated into a server management solution like MAAS.

Furthermore, it worries me when you say "connected to a router instead of a switch". If there is a layer 3 hop between the MAAS server and the machines you want to power on with Wake on LAN, chances are, it will not work. Wake on LAN generally requires the node to be on the same layer 2 segment. (on the same switch or VLAN.) In other words, you must be able to send broadcast Ethernet packets from the MAAS controller to the node you wish to power on.

A better bet would be to use an IP addressable power switch, or a machine that includes a dedicated management controller, such as IPMI or AMT.


Unable to boot newly installed Ubuntu 16.04 using UEFI mode?

Finally, I got it to boot in UEFI. The problem is with UEFI firmware which seems buggy. It does require the EFI partition to be the first one in the GPT table. The partition entries in GPT table were unordered. (EFI was the first one on disk, but 4th in the table).

I followed instruction below to fix that:

Boot using Live USB
Backup GPT table

sudo su
swapoff
sfdisk -d /dev/sda > sda.bkp

Modify new table with new order (EFI is the first)

cp sda.bkp sda.new
nano sda.new

sda.new

label: gpt
label-id: 4A4481B5-0322-411E-8D05-552FBE6189AC
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 976773134

/dev/sda1 : start=        2048, size=      409600, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=BCB6E471-44F7-4C42-81EC-B276F1D6B6E6, name="EFI"
/dev/sda2 : start=     4194304, size=   127924224, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=F1D50A87-ACB2-4868-B1EA-66C3D5223EA4, name="Linux filesystem"
/dev/sda5 : start=   136513536, size=    17825792, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=515C9B77-B282-4007-8F1A-B0C5D908591E, name="Linux swap"
/dev/sda6 : start=   154339328, size=   715456512, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=AEBBA3F2-F8B6-40C0-ABFE-9F530FC5F641, name="Linux filesystem"
/dev/sda4 : start=   874115072, size=    98463744, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=C96E6320-18EA-40B2-BA46-79FC66407917, name="Linux filesystem"

Restore the GPT table

sfdisk /dev/sda < sda.new

Now, I'm able to boot.

References:

Change the number of the partition from sda1 to sda2
How to renumber GPT partitions on an umounted disk? (simpler but i didn't try it)


Can't skype for Ubuntu 12 work on Ubuntu 14?

Are you referring to the fact that the download page at the Skype web site states Ubuntu 12.04? That's misleading. It works just as fine on 14.04.

Please note that it's more convenient to install Skype from the Canonical Partner repository in the Ubuntu archive. Just activate Canonical Partner, and you'll find that Skype shows up in Ubuntu Software Center or Synaptic.


In my case, it was also helpful to change the setting of the random port picking option to true. In transmission, you do it by following these instructions:

Edit → Preferences → Network Tab → Tick the first box


Fastboot gets stuck while sending userdata image (raring preinstalled) to nexus 7

The 'current' Raring / 13.04 image does install on the Nexus 7, and updating (with appropriate commands) brings this up to latest versions.
from: What do the updates provide in the Nexus 7 Desktop Installer?

.. Now vs updating and then re-installing, you can get essentially the same results by upgrading. However, a simple upgrade won't do, you'll need to run (on the device):
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install linux-image-nexus7

If you are trying to do something 'more clever' than that, it is probably outside the scope of this forum to assist you.

Why are you trying this method?
Have you asked the author (of the post you noted) for assistance?


Virtualbox kernel vboxdrv not loaded on ubuntu 19.10

I met the same issue and the following commands sequence helped for me:

sudo apt install --reinstall virtualbox-dkms
sudo modprobe vboxdrv


Connect to the internet and run
sudo apt update
sudo apt install git dkms
git clone -b rtw88 https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6

This will install drivers.
You also need firmware for this rtl8821ce device. Run to get it:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
sudo cp linux-firmware/rtw88/rtw8821c_fw.bin /lib/firmware/rtw88
sudo modprobe rtw_8821ce

After this the device should work.


What are the Alternatives For RemasterSys?

Relinux is the best software to use instead of Remastersys. Here is a great tutorial how to use.
Download the latest version from launchpad


In which package is the more_suggestions.scope located and what does it do?

All scopes are in the package

unity-scopes-master-default

Explanation, eg:

apt-file search searchin.scope
apt-file search recipes.scope
[..]

Scopes

A new generation of mobile experiences
Build more than just apps

Ubuntu enables the delivery of content and services directly to the screen – effectively creating a rich, fast and unfragmented experience for users, while giving developers the unprecedented opportunity to create app-like experiences that are integral to the device, at a fraction of the cost to build and maintain traditional apps. These experiences are developed using Ubuntu Scopes, a new UI toolkit available through the Ubuntu SDK.

Scopes are a complete reinvention of the content and services experience. Users have a new way to access content and apps without having to download individual apps – and developers have the opportunity to be discovered via the device’s categorized home screens. There are two types of scopes:

Aggregation Scopes – these define the device’s default experience by bringing together content and services from multiple sources and delivering them as a unified experience. For example, the video scope will display multiple video sources, and similarly a music scope can display music related content from a variety of providers. Each source can expand into an app-like, fully branded experience (branded scopes).

Branded Scopes – app-like experiences delivered directly to the screen. This is the fastest path to develop a rich mobile experience on Ubuntu, with higher discoverability and easier to develop and maintain than traditional apps. By attributing categories (music, news, videos, etc) to your branded Scopes, users can discover them from both the default aggregation Scopes and the Store. They can become integral to the device’s default experience once a user favorites your branded scope.

It’s a world away from traditional smartphones and the app icon grid, and brings a great opportunity for developers to shine.

Source


how to run a specific command via a bash script and add in to a startup

Here is the code you want to make in a shell script.

#!/bin/sh
echo -n "Enter your username and press enter: "
read name
sudo ./crclient -u $name -i eth0

in ubuntu open dash (the ubuntu button) and type startup

then you get this:

Press add and type at the command rule:

incase of the ubuntu terminal
gnome-terminal -x "sh /path/to/script.sh"

incase of xterm (which i prefer)
xterm -e "sh /path/to/your/script.sh"

then reboot and see if it works :)

---------------------------EDIT---------------------------

make a new file in /etc/xdg/autostart
using nano/vi or a text editor and name it test.dekstop

copy this into it

[Desktop Entry]
Name=MyScript
GenericName=test
Comment=test
Exec=/path/to/my/script.sh
Terminal=true
Type=Application
X-GNOME-Autostart-enabled=true

reboot the pc afterwards

______________________EDIT 2______________________

To allow the command to run without sudo asking for a password, do the following:

visudo

scroll all the way down and add this

linuxusername ALL= NOPASSWD: path/to/crclient

save and exit


I can't connect to wifi network after spoofing my mac address

I had the same problem, try to deactivate network-manager and activate it again. That did it for me.

After spoofing your mac, then run:

sudo service network-manager restart


Problems booting the 16.04 live from USB stick

They explain the issue and the fixes in these posts:

Ubuntu 16.04 final not booting from stick: gfxboot.c32: not a COM32R image

Ubuntu 14.04 LTS live USB boot error (gfxboot.c32:not a valid COM32R image)

Edit:

Here is a short version of the answer (more info in the links):

Type hit [TAB] to reveal the boot options. Then, type the option you want and hit enter. For example, type live and hit [ENTER] to boot the live image.

And, here is the best answer in my opinion:

https://askubuntu.com/a/746412/595992


Dash search function displaying 'old' result

As Ubuntu Says:

  The Dash allows you to search for applications and files, showing you
  applications and files that you have used recently. If you have ever
  worked on a spreadsheet or edited an image and forgot where you saved
  it, you will surely find this feature of the Dash to be useful.

You need to use the application from the new location for dash to remember it.


You can find it on your system by running the find command from your home ~ folder:
find . -type f -name logins*

Example:
~$ find . -type f -name logins*
./.mozilla/firefox/k2laopy5.default-release/logins.json
./.mozilla/firefox/k2laopy5.default-release/logins-backup.json
./.mozilla/firefox/btjnapfh.default-release-2/logins.json
./.mozilla/firefox/btjnapfh.default-release-2/logins-backup.json
find: ‘./.gvfs’: Permission denied
./.steam/debian-installation/tenfoot/resource/styles/login/loginstyles.css

As we can see mine is found in ./.mozilla/firefox/k2laopy5.default-release/ or ./.mozilla/firefox/btjnapfh.default-release-2/
Hope this helps!


If you need only run the windows app just use "wine" in linux, (it runs windows apps in linux).

Linux-KVM, QEMU, Virtualbox, VMWare -these all of virtually(guest) OS runners.

Play on linux- from wine corparation, used for run the windows's video games and offices (i.e: ms office).


Turning on auto-expunge emails in Dekko?

The auto-expunge feature was disabled in accounts settings a while back, but will be re-enabled in a coming update. For the time being you will need to expunge manually from the contextual actions of the mailbox in question. You will see an "Expunge mailbox" option.


How do i run commands in Banner file before login Ubuntu server

On my Ubuntu 14.05.5, the "banner", or Message-Of-The-Day (motd) is produced through running a bunch of scripts. You could add yours to this process. Begin by reading man update-motd, which says, in part:

NAME
       update-motd - dynamic MOTD generation

SYNOPSIS
       /etc/update-motd.d/*

DESCRIPTION
       UNIX/Linux system adminstrators often communicate important information
       to console and remote users by maintaining text in the file  /etc/motd,
       which  is  displayed  by  the  pam_motd(8)  module on interactive shell
       logins.

       Traditionally, this file is static text,  typically  installed  by  the
       distribution  and  only  updated on release upgrades, or overwritten by
       the local administrator with pertinent information.

       Ubuntu introduced the update-motd framework, by which  the  motd(5)  is
       dynamically assembled from a collection of scripts at login.


Try

System Settings > User Accounts > Automatic Login Toogle - Turn it Off / Disable it

Reboot System to check


krunner unreadable black text on black background. File a bug? Where?

At here: Kubuntu 12.04 beta 2 . Normal Krunner with the transparency & blur:

Disabling the desktop effects at startup - rebooting - the Air plasma theme has a gray background:

But - If I use the Alt+Shift+F12 then the background is darkish:

Maybe the plasma needs a restart ?


SSH keyfiles not found after changing desktops

It is weird that the command works on Unity, because normally the keys are read from ~/.ssh/id_* unless they are overridden. You can rename key and key.pub to id_* and id_*.pub respectively, where * is dsa, rsa, ecdsa or ed25519, depending on the type of key (which you can obtain from the public key file).

Alternatively, create ~/.ssh/config with IdentityFile ~/.ssh/key in it.

EDIT: You can also use ~/.ssh/config to specify keys on a per-host basis, with things like

Host host1
    IdentityFile ~/.ssh/key1

Host host2
    IdentityFile ~/.ssh/key2


To remove this residue from the steam configurations, just remove the hidden .steam folder:

rm -r ~/.steam

(no sudo needed, don't use it, just type the command as it is)


How to integrate Skype into the messaging menu?

There is a how-to on OMGUbuntu to do exactly what you are asking.


SSH doesnt restart on reboot after upgrade to Ubuntu Vivid Vervet 15.04

With Ubuntu 15.04. We have a systemd however upstart scripts should work as well. If you have upgraded and the SSH daemon is not starting automatically. Please do the below via a Terminal.
sudo systemctl enable sshd
After this the System will start ssh daemon (sshd) automatically at boot.


How do I delete the list of Bluetooth DUN connections?

All the DUN connections can be found in the /etc/NetworkManager/system-connections Choose your pick, or delete all of them.

The command to delete the connection is

sudo rm /etc/NetworkManager/system-connections/name-of-connection

Alternatively, you can delete all using the following command:

sudo rm /etc/NetworkManager/system-connections/*

Just a word of advice, it will delete any wi-fi or ethernet connections too.

If this does not delete the entries, try disabling and then enabling networking by clicking on "Enable Networking".


If you would like to use AMD proprietary driver and switch between AMD and Intel GPU when necessary (e.g. using Intel GPU only when running on battery) you might like to have a look at this: How do I get AMD/Intel Hybrid Graphics drivers to work?


Experiencing the same issue!

Edit: This solved my problem. The OS thought I had two displays. Settings > Devices > System Display > Change to single display.
https://ubuntuforums.org/showthread.php?t=2376761


Unable to connect to server: Starbucks wifi and newly installed Ubuntu

You might try opening up a terminal and running:

sudo dhclient

A lot of these public wifi spots use weird hacky ways to get that portal screen to pop up and I find that Linux often does not automatically get an IP address.

Running that command should basically request a new IP from the DHCP server at Starbucks. Usually that does the trick for me.


@TygerTy Thanks for that. I forgot to post a follow up a few weeks ago. This is what I came up with that worked for me:

#!/bin/bash
#
# Creates a backup
cp /etc/netplan/01-netcfg.yaml /etc/netplan/01-netcfg.yaml.bk_`date +%Y%m%d%H%M`
# Changes dhcp from 'yes' to 'no'
sed -i "s/dhcp4: yes/dhcp4: no/g" /etc/netplan/01-netcfg.yaml
# Retrieves the NIC information
nic=`ifconfig | awk 'NR==1{print $1}'`
# Ask for input on network configuration
read -p "Enter the static IP of the server in CIDR notation: " staticip
read -p "Enter the IP of your gateway: " gatewayip
read -p "Enter the IP of preferred nameservers (seperated by a coma if more than one): " nameserversip
echo
cat > /etc/netplan/01-netcfg.yaml <<EOF
network:
  version: 2
  renderer: networkd
  ethernets:
    $nic
      addresses:
        - $staticip
      gateway4: $gatewayip
      nameservers:
          addresses: [$nameserversip]
EOF
sudo netplan apply
echo "==========================="
echo


properly delete files for flash drives, but still retain trash bin

AFAIK, the deleted files will be put in the hidden directory .Trash inside the media. Use SHIFT+DELETE instead of just DELETE to bypass the trash and permanently delete files. For the files in your internal hard drives you can use just DELETE which will put them in the trash.


After more testing, executing of one project and getting a node_module trough npm, I can say that using the method described here: https://nodejs.org/en/download/package-manager/ do work, without needed any further config.

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

  Alternatively, for Node.js v6:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

  Optional: install build tools: To compile and install native add-ons from npm you may also need to install build tools:

sudo apt-get install -y build-essential

I have node, I have git, and vi, and I'm happy with Ubuntu Touch :)

Edit because i just found this post, and think it's revelant and important to add to this response.

Consequences of using apt-get in ubuntu touch

So it work, but there can be consequences.


You ought to completely remove the ~/.local/share/Steam folder, then run
sudo apt-get purge steam.
After that, reinstall steam.


How to find the specific `*Release` apt state information file for a given package?

Based on the research I've done, there is no direct way to solve this problem.

However, according to the Debian repository format document, the naming of the state information files has precise rules, that can be used.

Therefore, one can find a package's _Packages corresponding filename via apt-cache showpkg, then process it according to the repository format rules:

if the respository has a component, the name will have a suffix _<component>_binary-<arch>_Packages
otherwise, the suffix will be just _Packages

then:

replace the suffix with _InRelease, and test the resulting filename
if the file exists, all done
if not, replace the suffix with Release (which is an alternative naming for state files with an external signature)


How to keep a window from overlapping into another workspace?

There doesn't seem to exist an option to do that in Compiz.

You can install the CompizConfig Settings Manager (package compizconfig-settings-manager, program ccsm) and raise the Edge Resistance Distance in the Snap Window plugin options in the Window Management section:

This will help to prevent pushing a window outside of the screen. However, if you move the window too fast it won't be triggered, so it's no optimal solution.

Maybe this issue is worth a mail to the Ayatana mailing list? :-)


browser-plugin-freshplayer-pepperflash is in multiverse, so open the Software & Updates tool and enable multiverse there.

With that said, you may want to study the Flash page in Ubuntu's official desktop documentation:

https://help.ubuntu.com/stable/ubuntu-help/net-install-flash.html


What's the difference between "restart X" and "/etc/init.d/X restart"?

The commands start, stop, restart, etc., are links for initctl, and only work for upstart jobs.

Calling directly the script in /etc/init.d/ will give a warning for upstart jobs, for which the use of the script is allowed for convenience, through a wrapper symlinked common script.

Calling the service command always works, both for upstart jobs and for traditional sysv init scripts, so it is the preferred way.


WTD: Method to Launch/Run Web app in a Window and minimize it to tray

In newer versions of Chrome and Chromium, Google has hidden/changed the "save application shortcut" capability. I discovered that one can invoke the kabob menu on the right, and select more tools and then use "Add to Desktop," which prompts you whether you want to "Open as Window." This places a shortcut on your desktop, but also within ~/.local/share/applications with your intended target (I deleted the one on the desktop). I was able to then add this to my start up applications. I then remembered I could use gDevilspie (https://launchpad.net/gdevilspie) to get it to start minimized. Still would like two further tweaks: 1) how to launch this at a certain window size (although it seems to remember the last size) 2) how to get it to go into the tray


How to delete all data from the package?

Run the following:

find . -type d -name rhythmbox

find . -type d -name clementine

That should find all folders named rhythmbox and clementine.

For example, the first one returns this

./.cache/rhythmbox
./.local/share/rhythmbox

...but I've no idea where Clementine's data is.


Where should I put my script so that I can run it by a direct command?

It depends on who will use your script:

Yourself only - $HOME/bin like @waltinator said
You and other local users - /usr/local/bin
root only - /usr/local/sbin

That way you have your own scripts separated from the distribution-provided binaries.


Finally issue solved. I tried to access root user via Recovery Mode. I edited the /etc/passwd file. What I saw is a duplicate id of two users. The previous one and the one I created from the root. Finally, I changed the id of the newly created user and everything works fine now.


I solved this problem in the following way: I installed CDBC on Ubuntu software store, also UnixODBC by terminal, also mysql-shell on Ubuntu software store. I don't know if all of these were really necessary, but I did.
Than, I installed and used playonlinux to install my Database interface app. And, the most important, I installed "mdac28" component into the virtual disc created to run Database interface app. This mdac28 component is necessary to the Database interface app can talk to remote Database server. You can install mdac28 clicking over your Database interface app created inside playonlinux, than, click (in the left side) on "configuration", than clicking on "install component". Scroll up to down until to find mdac28. Than click or double click over it and install it.
After all, click run to use your app.
OK.
Best regards.


/usr/sbin/grub-probe:error:failed to get canonical path of /cow. From Live USB with Persistent Storage (mkusb)

Modifying GRUB on a Bootable USB
There are several types of Bootable USB.
Some USB tools clone the ISO file to USB as an ISO9660 partition. These do not have an editable grub.cfg file. They include mkusb-Live-only, dd, Etcher, Win32DiskImager, Startup Disk Creator and Gnome-Disks.
Prior to 20.10, some USB tools used Syslinux to boot in BIOS mode and GRUB in UEFI mode. For BIOS mode you need to edit either syslinux.cfg or txt.cfg. These include UNetbootin, Rufus, Universal and MultiBootUSB. Syslinux.cfg and txt.cfg can be manually edited similar to grub.cfg.
I only know of a couple of tools that before 20.10 used GRUB2 for both BIOS and UEFI, mkusb and YUMI. YUMI has a version for BIOS boot that uses grubfordos and syslinux and a GRUB2 version for UEFI boot. The GRUB version now works with 20.04 in BIOS mode.
Ventoy boots ISO files using GRUB2 but the grub.cfg file is very complex and the one file can boot most varieties of Linux.
To summarize: you can only edit grub.cfg on Live and Live Persistent USB's made using mkusb, UNetbootin, Rufus, Universal, YUMI and MultiBootUSB. Most of these will need Syslinux.cfg or txt.cfg edited if you are booting Ubuntu in BIOS mode prior to version 20.10.
You can not easily edit grub on USB's made using: mkusb-live-only, dd, Etcher, Win32DiskImager, Startup Disk Creator, Gnome-Disks and Ventoy.


Can't install software, dpkg returns error while processing python3-distupgrade

Removing python solved the problem. Reïnstalling python gave the same error. While I do not use python3 I do not mind. But it seems a bug to me.


adding an application into the search computer menu

If you want to be able to open this program, when searching it with the dash, it is advisable to add a desktop launcher to it as described here:

How can I edit/create new launcher items in Unity by hand?


As long as you have php installed, you run a PHP file using

/usr/bin/php /path/to/php/file.php

Or if your $PATH is set up properly to include /usr/bin, then simply

php /path/to/php/file.php

You can check if PHP is installed, by running

which php


For the new my-sql 5.7 if password is left empty then it uses auth_plugin.

In that case login with sudo privilege.

$ sudo mysql -u root -p

After login you can simply use this to update password.

$ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password';

For complete refrence check here.

EDIT:
One can also use this (without -u root):

$ sudo mysql
$ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password';


How to completely remove ubuntu (18.04 Gnome) dock on apps screen

I found the solution, sorry for question! :)


Reinstall is the fastest way to fix this and any other hidden problem that may come up later.


Disable file search in KDE Kickoff Launcher

After posting the issue to the KDE forums, the solution was simply to do the same with the file /usr/share/kservices5/plasma-runner-baloosearch.desktop, i.e. copy to  to ~/.local/share/kservices5/ and set X-KDE-PluginInfo-EnabledByDefault=false


Autocomplete dotfiles without typing the leading dot

There’s a Readline variable for that:

match-hidden-files
This variable, when set to ‘on’, causes Readline to
match files whose names begin with a ‘.’ (hidden files) when
performing filename completion. If set to ‘off’, the leading ‘.’ must
be supplied by the user in the filename to be completed. This variable
is ‘on’ by default.

As the variable is set to “on” by default, you should search for the line which sets it off and delete or comment it, e.g. in your ~/.bashrc:
grep match-hidden-files ~/.bashrc

If you can’t find where it’s set or want to set it explicitly, add the following line to $BASH_IT/lib/custom.bash (if you’re using Bash-it1) or ~/.bashrc (if not):
bind 'set match-hidden-files on'

1 Bash-it overwrites the ~/.bashrc when you update it, to keep the configuration you need to set the variable in any of Bash-it’s custom configuration files. Bash-it doesn’t set match-hidden-files off by default.

Here’s the exact opposite question: How to make bash stop tab autocompleting hidden directories


IOError: [Errno 5] Input/output error: '~.cache/software-center/software-center.log'

These three commands worked for me:

rm -r ~/.cache/software-center
sudo apt-get remove software-center
sudo apt-get install software-center


Installing Ubuntu on a HP Envy 17-j083ca

i've been trying to set one of these up and it is possible but very tricky.

i got it mostly working but the dual graphics card option is flakey and unreliable , it seems to make a mess of unity.

the touchscreen works great out of the box and the system feels fast but really not much more than my hi end core 2 duo i. This is the i7 + 12GB RAM + leap one .

i don't think i can be arsed to go through the very tedious process forcing the intel graphics to get it to boot then of sneaking bumblebee into the install (to make the graphics work) and then having to install bumblebee again to once the system is installed and then having to reset unity and the enable the plugins again.  i still couldn't get the panel indicators or global menus back so it wasn't really usable.

if you are thinking of buying one of these you will need to give at least a week of headscratching before its usable. I have nearly 20 years linux experience and this reminded me of the bad old days. do not attempt this if you are newbie.

i don't think thats particularly HP's fault but ubuntu seriously need to release an installer that includes bumblebee because most new laptops now have this setup.


Unable to boot into LVM/LUKS on second disk

It turns out that the problem involved the way the LUKS encrypted partition was unlocked.  I had be using the GUI tools to unlock it, by clicking and entering the passphrase.  My guess is that this confuses things somehow by assigning a different label to the encrypted partition.  It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....

Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).


best way to copy your ubuntu to a new hard drive

using timeshift you can backup current OS and then restore it some other computer after installing fresh setup first. it will restore your personal files and installed software


Many people in many forms are reporting exactly this. This is the result of a net-wide search in past week about this:

Beginning with MT4 version 600, about, extra Windows features than what has yet been implemented in 2019 with Wine in Ubuntu is necessary for the MT4 installation program to run. Running earlier versions of MT4 may easily lead to login issues (ie, MT4 reporting 'No connection'). (If you could get an earlier MT4 issued by the exact brokerage, it may however work.)

Some claim that by extra installation of .net features through WineTricks, and extra .DLL's, they are able to address some of the issues that are reported, but I have seen no claim that it solves the entire set of issues with MT4 installation in Wine.

The best bet, I believe (as suggested in another answer on AskUbuntu) is this: it is the installation program that requires new hard-to-get features of Wine. The resulting program, after proper initialization, may run perfectly well in standard Wine, if copied to Ubuntu and opened in Wine. Credits for this trick: Wine doesn't run Metatrader 4 | asks for Proxy


Access application and folders located in host from the guest machine

Folders shared from settings will show up on desktop if you install the Guest Tools. (while in machine, go to devices menu and click Install Guest addions. Execute the install bash script from the dvd that mounts.

That shared folders are accessible also via "browse network" in the sidebar of Nautilus (the file manager of Ubuntu).

Any files can be copied using the shared folders (place them in the folder from the guest and take them from the host or vice-versa).

About netbeans, just go to Ubuntu Software Center and download it. You can't use the Windows one.


BURG - Cant Boot computer because of BURG (PLEASE HELP!!)

If you just want to remove BURG

Startup your system
In a terminal type: sudo apt-get remove --purge burg
After the above reinstall grub grub-install <target> where the target is /dev/sda or whatever is your bootdisk.

Hope that helps

You may need to do sudo update-grub to do a search for the OSes.


What do the dependencies of 'Finch' (CLI IM client) do

Finch is just a CLI for Pidgin.

It uses all the same backends and all of those need their dependencies filling. As such, a lot of garb you wouldn't be able to even use on a headless server gets pulled in.

I don't think there's a clean way around that short of formally separating the two projects and cherry-picking code from the pidgin backends and pulling that into Finch.


File manager with search functionality for Lubuntu or Xubuntu

Use the Nemo file manager under Xubuntu.

Just set it as the default file manager, but don't delete the default Xubuntu File Manager.  Just have it as an additional (and default) file manager.


Activities overview hotkey customisation

You may use a GNOME extension called "windowNavigator". This extension does

  Allow keyboard selection of windows and workspaces in overlay mode.

Once you have installed and activated the extension (you may have to re-login once) press Super to get to Activities overview. Then press and hold Alt. A unique number will appear over each window (see screenshot below). Press the number corresponding to the window you want to switch to while still holding Alt.

Unfortunately, you can use this feature for up to 9 windows per workspace (can't press two-digit numbers).


virt-manager (kvm virt-viewer) pauses itself

Check if your disk is full. Cleaning mine worked.


which gsettings schema controls "show my login name in the menu bar"?

Show name:

settings set com.canonical.indicator.session show-real-name-on-panel true

Hide name:

settings set com.canonical.indicator.session show-real-name-on-panel false


In Ubuntu 20.04, the expected configuration of /etc/resolv.conf is to point to a local systemd-networkd resolver:

nameserver 127.0.0.53

To check which upstream nameservers your local resolver is configured for, you can check the output of resolvectl status.  This should show, for each of your network interfaces, the nameservers that have been associated.

You also show a netplan config that says to use the networkd renderer, but mention Network Manager in your question.  If you are expecting your wireless interface to be manageable through NetworkManager, then you need to change this netplan config (or else, you have other netplan config already on your system that you didn't list here).


I actually cannot recommend the way to install the drivers as far as I even cannot understand the question. The newest driver is called PulseAudio, the oldest driver that is still being used is called Alsa. These are probably the two best drivers. Alsa is still the official Linux driver.

If some day you get the Alsa driver correctly installed and you get no sound at all you can test if your speakers or headphones are not disabled, this is what happened to me.

From the Terminal you download the tool that lets you enable your speakers, type:

sudo apt-get install gnome-alsamixer

From the main menu call this program and enable your speakers.

Otherwise you can use Synaptic and try to install almost what I did install:

To show information about your system you could do:

me@ubuntu:~$ sudo apt-get install inxi
me@ubuntu:~$ inxi -v 7

If you don't want to install anything and look for the most known command:

me@ubuntu:~$ lspci

The most important tools for any user are always the logfiles:

me@ubuntu:~$ gnome-system-log


"Can not compile without isnan function or macro" when trying to compile geos on 14.04

If all of the existing answers do not help you, as was my case, you can try ensuring that the macro is being defined during compile time.

When you have identified the include that is supposed to ensure the macro can be compiled in my case: Coordinate.inl

in the case of geos-3.3.3 the macro is defined in platform.h

Just replace line 24, with:

#define HAVE_ISNAN 1

Done.
I really hope you got help from a different answer before you went for this one, but it definitely fixes the raised issue.


When I 'make' Python why don't I get a 'bin' directory (or "why don't these instructions work any longer" ?)

Run make install to install files to /opt/Python-3.6.4/.

Files don't have to be compiled on /opt/Python-3.6.4/ to install it there.
When running ./configure step, you can provide the target directory as the prefix.
Example:
./configure --prefix=<target_directory>

More information: https://askubuntu.com/a/191391/116563


Can't install FLUXION 5.9 dependency “mdk4” on ubuntu 18.04

You need to do this prior to the make and make install

sudo apt-get install build-essential autoconf automake libtool pkg-config libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev libpcap-dev libsqlite3-dev libpcre3-dev libhwloc-dev libcmocka-dev hostapd wpasupplicant tcpdump screen iw usbutils clang

then

git clone https://github.com/aircrack-ng/mdk4
cd mdk4
sudo make
sudo make install

sudo is not necessary for the make part, only the make install part but I use sudo for make to ensure no errors occur as some compilations fail without it.

I just did this on my ubuntu 18.04 and it worked fine. Fluxion detected it as installed after these steps and everything is working smoothly with the RTL8812AU chipset using the RTL8812AU DKMS kernel module installed.


The output of uname -r only shows the version up to the "ABI" number, but there can be revisions of the ABI. Only when the ABI changes do third-party modules need to be recompiled.

For more details about what you're running, read the file /proc/version_signature:

cat /proc/version_signature
Ubuntu 2.6.24-28.80-generic

This will show the kernel package version you're currently running which may differ from the most recently installed kernel. For example, in the above, the ABI is "28", which is as much as uname -r will show:

uname -r
2.6.24-28-generic

Then you can see what you have installed with dpkg:

dpkg -l 'linux-image*' | grep ^.i
ii  linux-image-2.6.24-27-generic              2.6.24-27.69                            Linux kernel image for version 2.6.24 on x86
ii  linux-image-2.6.24-28-generic              2.6.24-28.80                            Linux kernel image for version 2.6.24 on x86
ii  linux-image-generic                        2.6.24.28.30                            Generic Linux kernel image

In the above case, if the next kernel package that got installed was versioned as 2.6.24-28.81, it would only be the "micro release" that changed.  Since module compilations are tied to the ABI, no recompilation is needed, but you still need to reboot to get the kernel fixes. If the next kernel installed was versioned as 2.6.24-29.81, then the ABI will have changed, and you'll need to recompile modules after you've rebooted.

For more details about the ABI, see https://wiki.ubuntu.com/KernelTeam/BuildSystem/ABI


Installing Ubuntu on (for example) Virtual Box is quite easy :]
And it is really worth trying.


I was entering the wrong password.  I have corrected my own error.  Thanks for looking.


chromium-browser is stuck at version 37.0.2062.120 on Ubuntu 12.04 (using precise-updates)

No, it is not. Only security patches for major security holes and apocalyptic-level bugs are issued in "maintenance support" period. If you don't want to upgrade release, you can either use backports or add chromium PPA or switch to Google Chrom.


What is the Deal with the Copyrights Issue of Ubuntu and Canonical

I think there are two things here.
First : Ubuntu is and will remain free. At least, that's what they claim.
This should answer some of your concerns.

Then there is Canonical. This company is a for-profit company, supposed to make money by contributing/supporting Ubuntu. Since Ubuntu is free, they obviously need to find other means of making money. And this is where the problem lies : in order to make money, they plan to add new services/features that will not be part of Ubuntu, but sold alongside it.
Ubuntu One is an example.

What is debated here is their way to achive that : by forcing evey contributor to give up their freedom in licencing model, and let canonical "own" everything contributed. This giving up of freedom is an ethical problem. It goes against the "mind" of the free software licences. And could break the free spirit of Ubuntu itself.

I think the main issue is a question that we can't answer now: how much of Ubuntu will stay "free" as it is claimed, and how much will be optional services sold by canonical ?
If more and more "super-features" are being added as paying options, you could argue that Ubuntu is less free than it should... Especially if those features are proprietary software (lacking even the "free-as-in-speach" side of the "free" meaning).

Right now, I think Canonical is still doing its job, and I still appreciate it. Ubuntu is a really solid and user-oriented distribution, and I won't change because of this article. But that's a personal statement, and since I'm not a defenser of the free software, it cannot be seen as "the" answer to the question.

Moreover, I really don't have a crystal ball to look at the future :-) In some years from now, maybe I will change my mind and start using something else because Canonical has been pushing too far their commitment for profitability... I really hope that's not going to be the case.


Internet Download speed decreases over wifi

This is apparently a known kernel bug. The launchpad bug report is here, and there is a workaround listed in comment 161 which may work for you.


Is it possible to access and use all the files in the hard disk in both windows as well as Ubuntu?

Windows uses the NTFS file system by default, whereas Ubuntu uses the ext4 file system. Windows cannot read ext4, whereas Ubuntu can read NTFS. Therefore you have two options, the first one preferable:

Create 3 new partitions. One very large one for Data (e.g. photos, music, documents) as NTFS that both OS can use. One medium sized one (say 10-20GB) for the actual install of Ubuntu as ext4. And one smaller one (say 4-8GB) for swap.
Or, if you don't make the Data partition, Ubuntu will be able to see files that are on Windows, but Windows will not be able to see files that are on Ubuntu.

In order to create those new partitions (from the Live USB) you first have to shrink your windows partition (usually OS C:) from Disk Management inside windows.

The swap area is basically just extra RAM (much slower than actual RAM of course) that lives on a separate partition of your hard drive.

As for actual installation, there are numerous guides available. Refer to any of the following and post a new question if you have a specific problem.

http://www.everydaylinuxuser.com/2014/05/install-ubuntu-1404-alongside-windows.html
https://help.ubuntu.com/community/WindowsDualBoot
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI
How to use manual partitioning during installation?

If you are unsure, having a friend who is familiar with linux install it for you is a great idea.


Where can I find the Ubuntu WebApps source code?

On the code section of its Launchpad projects page.


how to build a "sudo" starter/shortcut on desktop

Not a solution but it should be a workaround

Open Terminal and open your FileManager using sudo
Ex. sudo thunar &

The "&" at the end will allow the Terminal to continue to run and not be "locked" with the file managers process just in case we need to type another command.

Ok now that you have a File Manager running as root we can do some adding of files. Navigate to /etc/sudoers.d and create a document / plain text. Name the file your user name... for this example I will use orion for the user name. Ok now in the /etc/sudoers.d directory I have a file called orion. Click (double click or whatever) to open the file and enter the following:

%orion ALL=(ALL) NOPASSWD: ALL

save the file and that should be it. You will no longer need a password in terminal when using sudo and you will now be able to create that "shortcut" using sudo leafpad /etc/hosts

I will say that this will make your system less secure and not something that should be done on a "public machine" but I'm lazy and hate typing my password all the time :)


Rebooting seems to have fixed the problem. Evidently logging out and in is not sufficient.


Removing Unity on Desktop Ubuntu 15.04 and using Gnome 3

Well, I have no words. The time that I decided to post this as a question it decides to work.

One thing to note, though, I turned off the Maximize and Minimize titlebar buttons.

Either way, I'm a happy camper


It's more complicated to install a package from source. Maybe it would be easier to install it directly by using apt-get install apache2

Otherwise with your downloaded file, you can install it too...

Extract the file

gzip -d httpd-NN.tar.gz
tar xvf httpd-NN.tar

Go on your extracted folder

cd httpd-NN

Configure

./configure --prefix=PREFIX

Compile the package

make

Install it

make install


New user home directory not recognized / accepted upon login

It turned out somehow the /home directory was owned by the first created admin user for some reason, with permissions 700. Changing the owner back to root:root and setting permissions to 755, now I can log in successfully with user me.


Saving and restoring Ubuntu settings for fresh Ubuntu installations

They are all stored as config files in ~/.config/ or ~/.<software-name>

So if you copy over your home directory, or at least that (hidden) folder, you should see most(all?) your settings restored


Unlike a your root file system, you can use any method to copy your /home to a new destination.  There should be nothing under /home that needs to be installed.
It should be sufficient to copy the  files to a flash drive or other interim media and then paste it into the new destination /home/username.
Make sure that you use a POSIX-compatible file system like ext4.
Because your user should be the owner of the home folder and its contents, you may need to run sudo chown -R $USER:$USER $HOME after copying the files.


Delete all files and folders in /tmp older than a day

First, use find to select these files:

find /tmp -mmin +1440

will find files that were modified more than 1440 minutes ago. (There is an option to use days instead of minutes, but it rounds upwards and +1 will mean 2 days or more, unfortunately. See notice below).

Try this, and if you are satisfied that this finds the right files, delete them in one go:

find /tmp -mmin +1440 -delete

See man find for other possibilities (last status changed time, access time).

Notice on the usage of -mtime +1:

  In man find

  It says:

  -mtime n

  File's data was last modified n*24 hours ago.

  But it also says:

  See the comments for -atime to understand how rounding affects the
  interpretation of file modification times.

  The comments for -atime say:

  When find figures out how many 24-hour periods ago the file was last
  accessed, any fractional part is ignored, so to match -atime +1, a
  file has to have been accessed at least two days ago.

In other words,  -mtime can count only in units of 24 hours or one day each so as far as  -mtime +1 goes, this means exactly more than one day by at least one day ( ie. two days+ )

-mmin on the other hand can count in minutes. So, if strict accuracy is vital, then -mmin +1440 ( 1440 minutes = 1 day ) could be used instead of -mtime +1


MacBook pro Yosemite - unable to dualboot with Ubuntu 14.04

Found out that macbook 9,2 is only supported by Ubuntu 12.04. I have now installed this successfully using an external hard drive.


Move a sequential range of numbered files to new directories

If it's a one-time task, you could use shell expansion like so:

mkdir subdir1 subdir2 subdir3 subdir4
mv sb_604_dpm_{0089000..0108999}.dpx subdir1
mv sb_604_dpm_{0109000..0128999}.dpx subdir2
mv sb_604_dpm_{0129000..0148999}.dpx subdir3
mv sb_604_dpm_*.dpx                  subdir4

{1..5} expands to 1 2 3 4 5, so the above commands expand to the first/second/third 20,000 files, and the last line handles the rest.


Recovery mode -> Kernel Panic, "purple screen of death" on default boot

I did a workaround be installing Ubuntu 16.04 from a bootable USB stick I had in my computer bag's pocket.  It got me running again when none of the exploration I tried worked. More drastic than a reboot for "blue screen of death" but it got me online and working again.


One could solve the issue in the following way:

cat file | some_sed_command | tee file >/dev/null

No.

The chances file will be truncated drop, but there's no guarantee cat file | some_sed_command | tee file >/dev/null will not truncate file.

It all depends on which command is processed first, as as opposed to what one may expect, commands in a pipe are not processed left-to-right. There's no guarantee about which command will be picked first, so one might as well just think of it as randomly picked and never rely on the shell not picking the offending one.

Since the chances for the offending command to be picked first in between three commands are lower than the chances for the offending command to be picked first in between two commands, it's less likely that file will be truncated, but it's still going to happen.

script.sh:

#!/bin/bash
for ((i=0; i<100; i++)); do
    cat >file <<-EOF
    foo
    bar
    EOF
    cat file |
        sed 's/bar/baz/' |
        tee file >/dev/null
    [ -s file ] &&
        echo 'Not truncated' ||
        echo 'Truncated'
done |
    sort |
    uniq -c
rm file

% bash script.sh
 93 Not truncated
  7 Truncated
% bash script.sh
 98 Not truncated
  2 Truncated
% bash script.sh
100 Not truncated

So never use something like cat file | some_sed_command | tee file >/dev/null. Use sponge as Oli suggested.

As an alternative, for thighter environments and / or relatively small files one may use a here string and a command substitution to read the file before any command is run:

$ cat file
foo
bar
$ for ((i=0; i<100; i++)); do <<<"$(<file)" sed 's/bar/baz/' >file; done
$ cat file
foo
baz


Ubuntu 12.04 installation on Sony Vaio VGN-UX390N - monitor blank on right, vertical lines on left

I have recently ditched my Sony Vaio, however I had fun using it With Ubuntu. The problem you are experiencing is due to the Graphics Driver.

Firstly, start the computer and at the GRUB menu, click the down key until you select advanced mode, or something like that. continue to load Ubuntu with the default drivers, I'm sorry but I don't remember the exact menu items. then...

...because the Graphics Card you have is probably a Nvidia one, what you need to do is to open System Settings and then click on Software and Updates. Go to the Additional Drivers tab and click on it. From the list of alternative drivers, select one that is not selected, I'd try to run with the highest spec first and work my way down until I found something that worked.

I hope this helps.


Open a file with default application that is not listed in "Open WIth"

If you have (server-start) in your ~/.emacs init file, you can select gnuclient in Properties->Open With

Thus, you're not constantly starting and stopping emacs.


Have you tried to remove all the extensions on it?

Launching it with --disable-extensions could help.

Also, try to check here:

https://bugs.chromium.org/p/chromium/issues/list


Streaming video to iOS devices is rather a special case as they don't support the RTSP protocol most commonly used for streaming video. Rather, they only support the Apple-invented HTTP Live Streaming. While I might be wrong as I'm yet to actually try it, the experience I have with MPEG4 and h.264 tells me that HTTP Live Streaming will be rather computationally intensive—you'll end-up encoding up to 4 h.264 streams for one stream, and h.264 takes more 'effort' to encode than MPEG2.

I've been looking at the same thing for my MythTV box, and the most promising thing I've found so far (though I'm yet to actually try it) is Carson McDonald's HTTP Live Video Stream Segmenter and Distributor.

I've also considered grabbing an Elgato turbo.264 as there are apparently linux drivers available.

Oh, and if you're in a country that uses h.264 for HD broadcast (like the US—I'm in Australia where we use MPEG2 for everything) you may not even need to transcode the video (at least for the high-bandwidth stream).


X : conditional xorg.conf file during startup

I solved this by having the /etc/init/monitors.conf file to contain the following:

description "configure monitors"

start on login-session-start

exec /home/myuser/.x11/monitors.sh


Try installing bfgminer, is more easy to configure with asic:

sudo apt-add-repository ppa:unit3/bfgminer

Then:

sudo apt-get update

Finally:

sudo apt-get install bfgminer

How to use:

  bfgminer -o http://eu.triplemining.com:8344 -u dansanti_linux -p dansanti

here are more info how to build cgminer, in case you want to use it anyway


Group the values based on the name of the cell and find out the unique number from group?

This can easily be done using awk arrays. Copy and paste your highlighted cells into a text file and then follow the example given in this link:

https://www.datafix.com.au/BASHing/2019-06-07.html


OpenStack AutoPilotBeta: on Dell R610 servers - Any work around for the disk size can't be 'NoneType' issue?

UPDATE: 06 Apr 2015:  As of this date, the official instructions are now installing LDS 15.01 that gets around this problem.

I believe you are running into github issue 374 which has been addressed in LDS 15.01.

Notice in the release notes that upgrading the juju deployed LDS is not directly supported (though it can be done if you follow the non-quickstart upgrade steps closely and understand a bit about juju).

Instead, we recommend installing fresh.  You can follow these steps for something very quick (after releasing the resources already allocated in MAAS):

sudo apt-get install juju-quickstart
juju quickstart u/landscape/landscape-dense-maas/12

# After it's done... get the ip address of the apache2 node:
juju status apache2

# And connect to that in your web browser


What alternatives are there to Fiddler debugging proxy?

NetTool is a developer tool for monitoring and manipulating
  application-level network messages, particularly useful for debugging
  web applications and web services. There are two components to
  NetTool: the HTTP Client, and the TCP Tunnel.1

  Paros is for web application security assessment.  It is free of
  charge and completely written in Java. Through Paros's proxy nature,
  all HTTP and HTTPS data between server and client, including cookies
  and form fields, can be intercepted and modified.2

1Source:Sourceforge

1Source:Paroproxy


What's the difference between tun/tap vs bridge+vnet vs macvtap? (For virtualization KVM)

It really depends what exactly you want to achieve

TAP/ TUN

Doesn't matter it's VM or physical machine. TUN brings you a tunneled network and TAP a device. In short, you go through a tunneled network to reach out another network.

For instance, when configuring an OpenVPN network, you'd be given 10.8.0.6 on your client. VPN server 10.8.0.1 routes your request to another network (eg 192.168.x.x) behind. When using TAP, you'd receive an IP (192.168.10.10/24) directly from your target network (192.168.10.x/24). Simple.

Bridge

"Linux Bridge" bridges VNET (from VM) to physical ethernet. If you want a VM (KVM based), bridge is a must between vnet and ethernet on host


Youtube video freezes until I move my mouse- Chrome/ium

It is happening to me either in Ubuntu Budgie 18.04.

How to fix: Disable the hardware acceleration in your browser:

Chromium/Chrome.
Search 'hardware'.
Uncheck Use hardware acceleration when available.
Restart browser.

Best regards.


Ubuntu 18.04 - no login screen it stay black screen

I have remove the nvidia drivers

sudo apt-get remove --purge 'nvidia.*'


Gnome terminal not working in Ubuntu GNOME 17.04

you need to add dbus-update-activation-environment --systemd --all into ~/.xinitrc

or download scripts from followings

https://github.com/3togo/useful_bash_scripts/blob/master/fix_gnome_terminal_dbus_problem


How to insert data into a binary file with an hex editor in ubuntu?

Install Bless:
sudo apt update
sudo apt install bless

Bless hex editor (hexadecimal editor) is a cross platform application available for major operating systems like Linux, Microsoft Windows, MacOS.
Can open any number windows using Tab.
You can quickly find for some content and replace it.
We have advance level of copy and paste feature in Bless Hex editor (hexadecimal editor).
You can use Bless best hex editor to edit large number of data files and also block devices.
One of the best part of this application is you can get more features as per your need by installing required plugins.
By default you can export data in .txt and .html format but for more other formats you can use plugins.


what happens if we install two boot images in a pendrive?

I have tried the merging of iso files it worked
both the images working fine.... i merged

Ubuntu 12.04
Hiren's Bootcd 15

And it looks like the below while booting..

              MultiCD - Created Oct 19, 2013

Boot from hard drive
--> Hiren's BootCD - main menu
--> Ubuntu (32-bit) 12.04.2 Menu
Memtest86+ v4.20

The same happened, when i tryed to write another image without formating the
pendrive With "Universal USB installer"

The same thing Happened.. i downloaded it from UBUNTU site itself..
this is my first post..
Thank you..


Automatic USB boot up and persistence fil

the first is typically set in your BIOS somewhere.

Second, how did you set up your persistence ? Here is how I do it.

Mount your usb device, and cd to the root of the device. Assuming it is mounted at /media/Live

cd /media/Live

# this will make a 1 Gb file for storage
# increase / decrease the count as needed
dd if=/dev/zero of=./home-rw bs=1M count=1000

# Make a file system.
mkfs.ext4 home-rw

mke2fs 1.41.14 (22-Dec-2010)
home-rw is not a block special device.

# Answer ‘yes’ here
Proceed anyway? (y,n) y

#Remove the reserved blocks
tune2fs -m 0 -L home-rw home-rw

When you boot, you need to add the boot option persistent to the options.

NOTE the file nema home-rw is for a persistent /home directory only (IMO it works better). If you want a persistent / directory, change the name from home-rw to casper-rw. Take care with a persistent /, I would not advise you install or upgrade a bunch of packages, it takes a lot of space and is not always reliable, IMO better to remaster the live CD.

See

https://help.ubuntu.com/community/LiveCD/Persistence#Booting_the_Live_CD_in_Persistent_Mode

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


Audio card is not working using Kubuntu 14.04

From your alsa-info, various faders from your internal soundcard are muted. The problem is the standard volume controls the default sound card which is the HDMI  on your pc, not the internal soundcard. Try this:

Install and run pavucontrol (Pulseaudio volume control), go in "output device" tab, scroll down to main soundcard , set its volume and check "mute" state . Also click the green button near it to make it default.
If no luck, try to launch Alsamixer in a terminal, press F6, select 2nd sound card and increase all volumes (with arrow keys) and check mute state (press "m" to mute/unmute).


The observation is a feature of rhythmbox - it has always been done this way.

So - "Is there any way around this?"

Yes & No.

First the No.

There is no method directly from the library browser - this is (as its name suggests) - built for searching and navigating your music library.

Yes

From the library browser you can create playlists - you can highlight all the tracks from an album - right click and create a playlist of your album.

Thus you can play from the playlist and when the album finishes, no more tracks are played.

Yes - this sounds like a workaround - that's how the default rhythmbox works.

better way

First the disclaimer - I'm the author of the following.

Rhythmbox handling of albums is rather lacklustre - which is why I created the coverart-browser plugin.

By playing from the plugin:

Double clicking the album, or
pressing the space-bar when an album icon is highlighted, or
right clicking and choosing play-album

Rhythmbox will then play all the tracks for the album - and more importantly finish playing at the end of the album/albums that were initially selected.

Linked Question:

How to browse by album art in rhythmbox?


18.04 to Lubuntu back to 18.04 - Computer not getting passed the start-up loading page

I ran

sudo dpkg-reconfigure lightdm

on the terminal and instead of using lightdm I switched it to gdm3. Restarted and worked. I do notice upon start up that it STILL tries to switch to lubuntu (the screen turns from a black red to a black blue color -- 18.04 is black red and black blue is lubuntu) so I do believe there is still a problem but at least it loads up and functions again. If anyone has any idea there, I'd appreciate some feedback.


Want to create a bootable CD with Linux to run/install on an old Thinkpad iseries 1300-1171! I have to create the CD on my Mac (Catalina)

You should look for a 32 bit version of linux (AntiX download for example) since your Thinkpad can not cope with a Ubuntu 64bit system. Do not install gnome- it will be to heavy on your resources.
There are other distros out there (also puppy is recommendable) that might fill this great peace of hardware with life.
To get it on cd just download the iso file and burn it onto a CD.
EDIT
I've looked up the specs. Your device is a PAE PIII processor, so the Ubuntu flavours will be too heavy on this device. A stripped down MXLinux/AntiX should work


How do I test virtual hosts in Apache before I buy the domains?

Please note that the standard name-based virtual hosts depend on receiving a correct domain name from your browser request to serve the appropriate site (vhost).

The right way to test out multiple vhosts on your local machine is to give them any domain name you can think of, and simply map that domain to 127.0.0.1 (localhost) by adding it to /etc/hosts.

For example:

&ltVirtualHost *:80>
    ServerName www.iamnotawizard.com
    DocumentRoot /var/www/iamnotawizard
</VirtualHost>

will work great as long as you add this line to /etc/hosts:

127.0.0.1      www.iamnotawizard.com

Note that Apache will throw a Could not reliably determine server's FQDN warning whenever started/restarted; you can safely ignore it.


After update, Cheese doesn't find external webcam? Why?

This could be a bug in Cheese. Take note of the last version of Cheese which worked if you can, and consider filing a bug against it in Launchpad.


Autodesk Eagle 9.6.2 on Ubuntu 20.04 fails to start

Create a desktoplink
[Desktop Entry]
Type=Application
Name=Eagle
Name[de_DE]=Eagle
Comment=Test the terminal running a command inside it
Exec=env LIBGL_ALWAYS_SOFTWARE=1 /home/YOUR_PC/eagle-9.6.2/./eagle run
Icon=/home/YOUR_PC/eagle-9.6./bin/eagle-logo.png
Categories=Development;
Terminal=false
And eagle start


Your error messages are probably related to the fact that you have Gnome-3 PPA enabled.

A recent change in this PPA promoted the use of python-gobject and deprecated the use of python-nautilus.

Basically you can't have python-nautilus installed.

You have a couple of choices:

Stick with using the PPA and you cannot continue using nautilus-actions etc.
ppa-purge the Gnome-3 PPA and you will then be able to use nautilus-actions etc.

You should perhaps post a bug-report on the Gnome-3 PPA to see if they have any thoughts on backporting nautilus-actions from Precise to Oneiric.


Ubuntu 14.04 nvidia-prime "is it supported? no"

I have the same portable, I was using bumblebee before. But since 14.04 it was not working anymore and so now I switched to nvidia-prime. This is what I did:

Steps

Install Nouveau driver through "Software & updates"
Remove bumblebee or other installed nvidia drivers:

sudo apt-get purge bumblebee*
sudo apt-get purge nvidia-*

An then reboot
Install nvidia 331-updates driver through "Software & updates" (should also install nvidia-settings and nvidia-prime)
Then reboot

Now run again nvidia-settings. This did it for me, more info here.


Ubuntu base linux distro for windows 7 alternative as windows gets slow for pentium 4 dual core cpu

Ubuntu family desktop systems

Please find out and tell us if your computer can run a 64-bit operating system. For one and a half more year you can run for example Lubuntu and Ubuntu MATE version 18.04.x LTS, but after the end of life in April 2021 there will be no supported 32-bit Ubuntu family desktop operating system (with a graphical desktop environment).

Ubuntu Server

But there is Ubuntu Server and its 18.04.1 LTS version will be supported for a longer period, for at least 5 years, maybe even 10 years, so at least until April 2023, and by that time maybe you should allow your old computer to retire.

Ubuntu Server comes without any graphical desktop environment, only a text screen. It should run fast on your old computer, and you can easily connect to it via the network.

Graphical window manager in Ubuntu Server

It is not generally recommended for a server, but possible and maybe suitable in your case, to install basic graphics with a window manager rather than a full graphical desktop environment. It would have a light foot-print and might work fast enough in your old computer.

In the server you need an ssh server, for example openssh-server and at least some basic X tools, for example xinit and fluxbox (and the programs and libraries that they need). You must also install the application programs that you want to run, I suggest xterm and the graphical application programs that you want to run.

You start a [local] graphical session with startx

See more details at the following links,

old-releases.ubuntu.com/releases/18.04.1/

What is the simplest way to have remote GUI access to Ubuntu 16.04 “server” from Ubuntu 16.04 “desktop”?

Old hardware brought back to life


How to get Lilliput USB monitor working?

It's actually working... and I all did was restore xorg.conf.backup. Weird. Oh well.


Issue with "ureadahead" and "util-linux" packages

Simply follow the error message's instructions:

dpkg: error processing package ureadahead (--configure):  package is
 in a very bad inconsistent state; you should  reinstall it before
 attempting configuration

Try: sudo apt install --reinstall ureadahead

Do the same for util-linux.


Can't rename each 'file' to 'file.text' (using xargs)

In case anyone ever stumbles upon this question: John1024's comment to the question is the correct solution, though there's one thing to notice - the error messages generated by the attempt to print out the contents of non-existing files are generated by xargs rename "s/.*/$&.text/", therefore if you need to redirect your error messages to a different file, you have to append 2>error.text to the rename command, and not write another one | xargs cat 2>error.txt


Removing Transmission Bit torrent client

The package name is transmission-gtk, so:

sudo apt-get purge transmission-gtk


Reinstall kernals - I have two kernals that I cannot boot from

For several days this virtual machine would only allow me to reboot, by manually selecting the older kernel 4.4.0.121 from the grub menu.

Not sure that this is a complete answer, but it may help someone else. I saw this post about reinstalling grub2 Ubuntu doesn't boot after kernel update

I decided to try reinstalling grub2 to see if it would finally update my grub menu. I executed "sudo grub-install --recheck /dev/sda". Low and behold my system now boots after manually removing the other kernels. I still have a minor issue with the grub boot menu not being visible during boot any more - progress.


Apport aptget returning E: Sub-process /usr/bin/dpkg returned an error code (1)

You need to reinstall pycompile, try this

sudo apt purge apport # purge apport
sudo apt reinstall python-minimal # reinstall python-minimal
sudo apt install apport # install apport
sudo dpkg --configure -a && sudo apt-get install -f # resume last APT session

purging apport makes sure that you can start a clean fresh installation of apport and re-install python-minimal installs pycompile, which is needed for apport


Misaligned titlebar icons in Google Chrome

I have been able to fix the problem using the following settings:

In gconf-editor, go to apps-> metacity -> general and set the button_layout to something like "menu:minimize,maximize,close". This solves the problem.


Automatically adjust display brightness based on sunrise and sunset

Updated Post from 2019 - Eyesome

Eyesome is a bash script running as a deamon and sleeping most of the time 24/7. It automatically adjusts screen brightness (and optionally gamma too) for your laptop display via hardware interface and up to two other monitors using xrandr's software control.

At sunrise (the time is automatically obtained from the internet each day), your screen brightness (and optionally gamma too) is adjusted gradually. The gradual adjustment is defined by you but, 120 minutes works for me. To keep the adjustments unnoticeable set a sleep interval between adjustments. Anywhere between 15 and 60 seconds is probably best and the default is 60.

Eyesome daemon sleeps many hours until sunset transition starts. Inversely to sunrise transition, the sunset transition gradually decreases screen brightness (and optionally gamma too) so it is unnoticeable. 90 minutes before sunset is recommended but you can set any period you like.

During sunset transition gamma may be defined to increase. For example Red gamma may be defined as 1.0 during day and 1.2 during night to reduce eye strain. Blue gamma in turn may be defined as 1.0 during day and .8 during night so it will decrease instead.

To reduce resources, eyesome sleeps the entire period between sunset and sunrise transitions. There are one time exceptions when resuming from suspend or hot plugging external monitors. It depends on where you live and the season of the year but, the average sleep will be 12 hours.

You can download Eyesome from Github

Original Post from 2017

Introduction

This a bash solution with no need to install additional programs. It requires an Internet connection (if you are reading this you have one) to automatically get sunrise and sunset times each day. It provides a user-friendly configuration screen. It starts up automatically with cron and requires no user interaction.

This answer is divided into multiple parts

Automatically get sunrise and sunset times each day with cron
Configure brightness settings and transition time
Main script to adjust brightness based on time of day
Start display-auto-brightness automatically every boot with cron
Instant/transparent brightness adjustment resuming from suspend
Summary

Automatically get sunrise and sunset times each day with cron

There are many websites to report sunrise and sunset times for your location. This script uses (https://www.timeanddate.com/) which has been a well-known site for a long time.

With sudo powers edit the file /usr/local/bin/sun-hours and paste this:

#!/bin/bash

# Called daily from /etc/cron.daily/sun-hours
while true; do

### "-q"= quiet, "-O-" pipe output
echo $(wget -q -O- https://www.timeanddate.com/sun/canada/edmonton | grep -oE 'Sunrise Today.{35}' | awk -F\> '{print $3}' | tr --delete "<") > /tmp/sunrise
echo $(wget -q -O- https://www.timeanddate.com/sun/canada/edmonton | grep -oE 'Sunset Today.{35}' | awk -F\> '{print $3}' | tr --delete "<") > /tmp/sunset

## If network is down files will have one byte size
size1=$(wc -c < /tmp/sunrise)
size2=$(wc -c < /tmp/sunset)

if [ $size1 -gt 1 ] && [ $size2 -gt 1 ] ; then
    cp /tmp/sunrise /usr/local/bin/sunrise
    cp /tmp/sunset  /usr/local/bin/sunset
    chmod 666 /usr/local/bin/sunrise
    chmod 666 /usr/local/bin/sunset
    rm /tmp/sunrise
    rm /tmp/sunset
    exit 0
else
    logger "/etc/cron.daily/sun-hours: Network is down. Waiting 5 minutes to try again."
    sleep 300
fi

done

Before saving the script replace the two occurrences of /canada/edmonton with your own country and city. Visit the site www.timeanddate.com to get the exact name or number. For example, "Paris, USA" has dozens of names so they'll contain a number such as /worldclock/@5205082 for "Paris, PA USA".

Use cron to run sun-hours script each day

With sudo powers edit the file /etc/cron.daily/sun-hours and paste this:

#!/bin/sh
#
# Each day /etc/cron.daily/sun-hours will get sunrise and sunset times.

sleep 60 # give time for network to come up.
/usr/local/bin/sun-hours

Mark both files as executable with sudo chmod a+x ___/sun-hours where "___" is the directory for each file.

Use Conky to monitor sunrise / sunset time changes each day

Conky is a popular tool for monitoring your system. Here are the commands for it to display sunrise, sunset and brightness setting:

${color orange}${voffset 2}${hr 1}
${color}${goto 5}Day: ${color green}${execpi 300 cat /usr/local/bin/sunrise}  ${color}Night: ${color green}${execpi 300 cat /usr/local/bin/sunset}  ${color}Level: ${color green}${execpi 10 cat cat /sys/class/backlight/intel_backlight/brightness}
${color orange}${voffset 2}${hr 1}

This is what it looks like:

Note: this Conky code uses intel_backlight which you need to change depending on your display adapter as described in sections below.

Configure brightness settings and transition time

You don't want your display to change to full brightness on sunrise and full dimness on sunset. A transition period is needed. Additionally a configuration file is required to record the variables for full brightness and full dim. This is the configuration screen:

The screen is built using standard zenity command and as such existing values are shown in labels with "(value)" tag and you key in new values if needed. Otherwise the existing files are kept when new values are blank.

Replace intel_backlight with your display driver if different. To find out your name use: ls /sys/class/backlight/*/brightness.

Using sudo powers create the file /usr/local/bin/auto-brightness-config and paste in this code:

#!/bin/bash

# Read hidden configuration file with entries separated by " " into array
IFS=' ' read -ra CfgArr < /usr/local/bin/.auto-brightness-config

# Zenity form with current values in entry label
# because initializing multiple entry data fields not supported
output=$(zenity --forms --title="Display Auto Brightness Configuration" \
        --text="Enter new settings or leave entries blank to keep (existing) settings" \
   --add-entry="/sys/class/backlight/??????/brightness driver : (${CfgArr[0]})" \
   --add-entry="Day time maximum display brightness : (${CfgArr[1]})" \
   --add-entry="Transition minutes after sunrise to maximum : (${CfgArr[2]})" \
   --add-entry="Night time minimum display brightness : (${CfgArr[3]})" \
   --add-entry="Transition minutes before sunset to minimum : (${CfgArr[4]})")

IFS='|' read -a ZenArr <<<$output # Split zenity entries separated by "|" into array elements

# Update non-blank zenity array entries into configuration array
for i in ${!ZenArr[@]}; do
    if [[ ${ZenArr[i]} != "" ]]; then CfgArr[i]=${ZenArr[i]} ; fi
done

# write hidden configuration file using array (fields automatically separated by " ")
echo "${CfgArr[@]}" > /usr/local/bin/.auto-brightness-config

Mark the file as executable using:

chmod a+x /usr/local/bin/auto-brightness-config

Main program display-auto-brightness

Using sudo powers create the file /usr/local/bin/display-auto-brightness and paste in this code:

#!/bin/bash

# NAME: display-auto-brightness
# PATH: /usr/local/bin
# DESC: Set display brightness based on min/max values, sun rise/set time
#       and transition minutes.
# CALL: Called from cron on system startup with @reboot option.
# DATE: Feb 17, 2017. Modified: Dec 2, 2017.

# NOTE: Only sleep for 1 minute to make display brightness changes gradual.
#       Configuration file can change any time so variables reread when waking.
#       The file is maintained by /usr/local/bin/auto-brightness-config script.

#       Sunrise and sunset time obtained from www.dateandtime.com using
#       /usr/local/bin/sun-hours script. The script is called from cron using
#       /etc/cron.daily/cron-daily-sun-hours. Variables stored in am/pm format
#       in /usr/local/bin/sunrise and /usr/local/bin/sunset.

#       When suspending at 6 am it might be dark with setting at 300. When
#       resuming at 4:30pm it might be full sun and setting needs to be 2000.
#       It will take between 1 and 59 seconds to adjust screen brightness with
#       sudden jump in brightness. To correct this create kill sleep command
#       during suspend with /lib/systemd/system-sleep/display-auto-brightness
#       script.

# TODO: Add support for external monitors connected via HDMI / DisplayPort.
#       xrandr --output HDMI-0  --brightness .799
#       xrandr --output DP-1-1  --brightness 1.15

if [[ $(id -u) != 0 ]]; then # root powers needed to call this script
    echo display-auto-brightness must be called with sudo powers
    exit 1
fi

# global variable
LastSetting=""

function set-and-sleep {
    if [[ "$1" != "$LastSetting" ]]; then
        sudo sh -c "echo $1 | sudo tee $backlight"
        echo "$1" > "/tmp/display-current-brightness"
        LastSetting="$1"
    fi
    sleep 60
}

re='^[0-9]+$'   # regex for valid numbers

function calc-level-and-sleep {
    # Parms $1 = number of minutes for total transition
    #       $2 = number of seconds into transition

    secTotal=$(( $1 * 60 )) # Convert total transition minutes to seconds
    Adjust=$( bc <<< "scale=6; $transition_spread * ( $2 / $secTotal )" )
    Adjust=$( echo $Adjust | cut -f1 -d"." ) # Truncate number to integer

    if ! [[ $Adjust =~ $re ]] ; then
        Adjust=0   # When we get to last minute $Adjust can be non-numeric
    fi

    calc_bright=$(( $min_bright + $Adjust ))
    set-and-sleep "$calc_bright"
}

while true ; do

    # Although variables change once a day it could be weeks between reboots.
    sunrise=$(cat /usr/local/bin/sunrise)
    sunset=$(cat /usr/local/bin/sunset)

    # Read hidden configuration file with entries separated by " " into array
    IFS=' ' read -ra CfgArr < /usr/local/bin/.auto-brightness-config
    backlight="/sys/class/backlight/${CfgArr[0]}/brightness"
    max_bright="${CfgArr[1]}"
    after_sunrise="${CfgArr[2]}"
    min_bright="${CfgArr[3]}"
    before_sunset="${CfgArr[4]}"

    # Current seconds
    secNow=$(date +"%s")
    secSunrise=$(date --date="$sunrise today" +%s)
    secSunset=$(date --date="$sunset today" +%s)

    # Is it night time?
    if [ "$secNow" -gt "$secSunset" ] || [ "$secNow" -lt "$secSunrise" ]; then
        # MINIMUN: after sunset or before sunrise nightime setting
        set-and-sleep "$min_bright"
        continue
    fi

    # We're somewhere between sunrise and sunset
    secMaxCutoff=$(( $secSunrise + ( $after_sunrise * 60 ) ))
    secMinStart=$((  $secSunset  - ( $before_sunset * 60 ) ))

    # Is it full bright day time?
    if [ "$secNow" -gt "$secMaxCutoff" ] && [ "$secNow" -lt "$secMinStart" ]; then
        # MAXIMUN: after sunrise transition AND before nightime transition
        set-and-sleep "$max_bright"
        continue
    fi

    # Daytime - nightime = transition brightness levels
    transition_spread=$(( $max_bright - $min_bright ))

    # Are we between sunrise and full brightness?
    if [ "$secNow" -gt "$secSunrise" ] && [ "$secNow" -lt "$secMaxCutoff" ]; then
        # Current time - Sunrise = progress through transition
        secPast=$(( $secNow - $secSunrise ))
        calc-level-and-sleep $after_sunrise $secPast
        continue
    fi

    # Are we between beginning to dim and sunset (full dim)?
    if [ "$secNow" -gt "$secMinStart" ] && [ "$secNow" -lt "$secSunset" ]; then
        # Sunset - Current time = progress through transition
        secBefore=$(( $secSunset - $secNow ))
        calc-level-and-sleep $before_sunset $secBefore
        continue
    fi

    # At this stage brightness was set with manual override outside this program
    # or exactly at a testpoint, then it will change next minute so no big deal.
    sleep 60 # reset brightness once / minute.

done # End of forever loop

Mark the file as executable using:

chmod a+x /usr/local/bin/display-auto-brightness

NOTE: Unsuccessfully revised August 26, 2017 to correct bug where program would stop when last brightness level was equal to minimum or maximum brightness and current minute's adjustment value is blank (zero). Successfully fixed December 2, 2017 but not published until February 17, 2018. Ooops!

Start display-auto-brightness automatically every boot with cron

Cron is used to start the main application every boot. Create the file /etc/cron.d/display-auto-brightness with sudo powers and copy in this:

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@reboot   root    /usr/local/bin/display-auto-brightness

Instant brightness adjustment resuming from suspend

You can suspend your computer at 6 am when it before the sun rises and your setting is at 300. You can resume it at 4 pm when the sun is bright and the setting should be 2000 but you have to wait 1 to 59 seconds for display-auto-brightness to reset the display. When the display does reset the change is dramatic. To solve this a systemd script is needed. Create the file /lib/systemd/system-sleep/display-auto-brightness containing:

#!/bin/sh

# NAME: display-auto-brightness
# PATH: /lib/systemd/system-sleep/
# DESC: Restart display brightness when resuming from suspend
# CALL: Automatically called when system goes to sleep and wakes up
# DATE: August 2017. Modified: June 10, 2018.

# NOTE: Gives instant display brightness adjustment instead of waiting 1 to 59 seconds.

logger -t "logger -t "test" "\$0=$0, \$1=$1, \$2=$2" test" "\$0=$0, \$1=$1, \$2=$2"

case $1/$2 in
  pre/*)
    echo "/lib/systemd/system-sleep/display-auto-brightness: Going to $2..."
    ;;
  post/*)
    # March 28, 2018 On AW17R3 this script runs too fast
    sleep 2

    echo "/lib/systemd/system-sleep/display-auto-brightness: Resuming from $2..."

    # Find running tree processes containing "display-auto" AND "sleep"
    ProgramTree=$(pstree -g -p | grep display-auto | grep sleep)
    # echo's below will print in /var/log/syslog. Comment out with # to suppress
    echo "pstree -g -p | grep display-auto | grep sleep"
    echo "============================================="
    echo "$ProgramTree"

    # extract sleep program ID within `pstree`. eg we would want "16621" below:
    # |-cron(1198,1198)---cron(1257,1198)---sh(1308,1308)---display-auto-br(1321,1308)---sleep(16621,1308)
    pID=$(echo "$ProgramTree" | cut -f 6 -d '(' )
    pID=$(echo "$pID" | cut -f1 -d",")

    kill $pID  # kill sleep command forcing screen brightness to adjust immediately
    rm /tmp/display-current-brightness
    echo "display-auto-brightness: sleep pID: '$pID' has been killed."
    ;;
esac

Mark the file as executable using:

chmod a+x /lib/systemd/system-sleep/display-auto-brightness

Summary

Display current brightness level is systray

In addition to Conky example presented earlier, indicator-sysmonitor you can display the current brightness in the systray through bash:

In this systray example brightness is set at 418 and it is about 20 minutes before sunset. At sunset the value will be 250 and the daytime full brightness is 1200. On this machine intel_backlight=4882 is possible but, if you are indoors with curtains open the screen is like staring into the sun.

The systray indicator is setup using this code:

#!/bin/bash

if [ -f ~/.lock-screen-timer-remaining ]; then
    text-spinner
    Spinner=$(cat ~/.last-text-spinner) # read last text spinner used
    Minutes=$(cat ~/.lock-screen-timer-remaining)
    systray=" $Spinner Lock screen in: $Minutes"
else
    systray=" Lock screen: OFF"
fi

if [ -f /tmp/display-current-brightness ]; then
    Brightness=$(cat /tmp/display-current-brightness)
    systray="$systray Brightness: $Brightness"
else
    systray="$systray Brightness: OFF"
fi

echo "$systray" # sysmon-indidicator will put echo string into systray for us.

exit 0

This Q&A (Can BASH display in systray as application indicator?) describes how to setup indicator-sysmonitor.

Future Enhancements

Migrating bash scripts for this answer to github
Adding support for external monitors using xrandr
Adding support for more red/less blue using xrandr


Any advantage to installing Ubuntu-only system with UEFI vs Legacy?

There is almost no difference. Boot time on UEFI may be a bit less.

Besides UEFI has native support of GPT disks.

But it is possible to get bios support of a GPT partitioned disk by creating a special partition this way.

It is not worth the effort to force installing with UEFI if there are problems.


is opencv::dnn module compatible with Ubuntu

First and before everything, make sure you have CUDA and CuDNN installed.
Second, follow these steps to install opencv with CUDA support.

Let's install some dependencies:

sudo apt update -y
sudo apt upgrade -y --no-install-recommends
sudo apt install -y build-essential pkg-config cmake git wget curl unzip
sudo apt install -y libgtk-3-dev
sudo apt install -y ffmpeg
sudo apt install -y libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev
sudo apt install -y libyaml-cpp-dev libgoogle-glog-dev libgflags-dev

Then install the following packages:

sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install libhdf5-serial-dev

We will install opencv 4.2.0 in /opt/ folder, so run cd /opt/
Then run the following command to download OpenCV 4.2.0:

wget -O opencv.zip https://github.com/Itseez/opencv/archive/4.2.0.zip

After that, run the following command to download the contrib modules of OpenCV:

wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/4.2.0.zip

Once you finish, unzip the downloaded files:

unzip opencv.zip
unzip opencv_contrib.zip

We are now ready to use cmake to configure our build. Take special care when running these commands:

cd opencv-4.2.0
mkdir build
cd build

Once you create the needed folder, run this command to start compiling opencv:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib-4.2.0/modules /opt/opencv-4.2.0/ -D BUILD_EXAMPLES=ON -DBUILD_opencv_cudacodec=OFF -D OPENCV_DNN_CUDA=ON -D WITH_CUDNN

cmake will take around 5 min to build all OpenCV and Cuda NVCC library. After this,  execute the following command:

make-j4

Once make-j4 completes, run:

make install

If you get errors, run sudo make install instead.

Finally, run:

ldconfig

Or sudo ldconfig if you encounter permission denied.

Credits:  Compile Opencv with Cuda from the source.

Addtional resources:
- Accelerate OpenCV 4.2.0 – build with CUDA and python bindings
- How to use OpenCV’s “dnn” module with NVIDIA GPUs, CUDA, and cuDNN


#!/bin/sh ... Where is the hashbang my friend?

The hashbang is missing in the script:

  udev does not run these programs on any active terminal, and it does
  not execute them under the context of a shell. Be sure to ensure your
  program is marked executable, if it is a shell script ensure it starts
  with an appropriate shebang (e.g. #!/bin/sh), and do not expect any
  standard output to appear on your terminal.

source: Writing udev rules
Another way, call it with /bin/sh

ACTION=="change", SUBSYSTEM=="power_supply", RUN+="bin/sh /usr/local/bin/power-change.sh true"

I was wrongly looking for what going on in the rule for around two hours. That a lesson for me too.

BTW, You can debug and test your udev setup.

sudo udevadm test /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP1


The best way how to apply a patch is installing a new kernel binary. That's the easier way for most of the population.
If you have Ubuntu 12.10, the last kernel binary could be found here:
 - http://kernel.ubuntu.com/~kernel-ppa/mainline/

Under directory "v3.6.3-quantal" (date 21-Oct-2012 18:04).
Your referenced patch date is Wed, 25 Apr 2012, so I guess that the 3.6.3 will already contain it (will check in a few moments).

In order to install the kernel packages, please follow steps described here:
 - How do I add the kernel PPA?


Use $foo to get the value of variable foo. So:

patt_gen -del -s "$size" -o delaychange -f delay.txt


Why does Truecrypt ask for administrator password?

TrueCrypt asks you for a password because mounting a filesystem requires superuser privileges. Do not circumvent it by allowing to run truecrypt as root without password, this is insecure as a malicious script can get elevated privileges by mounting a special-crafted container, and gain root privileges from it (e.g. setsuid binaries on in an ext2 filesystem or mounting on /).


As far as I know the mail library has always been an external download.  It's currently located on github at https://github.com/javaee/javamail/releases.  Download it and add it to your classpath in Eclipse.


Eclipse can't find index libraries of GCC or G++

I had a similar problem with the HelloWorld example. "namespace Std" and "cout" gave a "not resolved" error. I fixed this by simply restarting eclipse. Seems it does not recognize all include paths after a fresh installation / project creation.


how to test on smartphone application on notebook: connection issue

It is necessary to add a rule on your firewall to allow incoming connections on port 1234:

$ sudo ufw allow 1234

Or better allow by IP address and port:

$ sudo ufw allow from 192.168.1.2 to any port 1234


Reboot your machine and enter into your BIOS and Enable legacy USB support, Restart and it will Works..


Is there a way to track a run away process?

Preramble aside - is there a way that I can track what process is going out of hand (maybe by a log?) so I can fix it later?

If you suspect it's a specific process, just start it from within a bash script, calling ulimit -v N first, where N is the max virtual memory in kilobytes you want to give it before the kernel kills it. You'll know what it is when it dies ;)

You could also try setting a simple cron job which appends the output of ps with specific parameters (for memory) to a log every minute and parse later.

Finally, try monit (in repos), which monitors processes and can take actions such as killing, restarting, etc. when specific thresholds are exceeded.


Falling back to unity-2D after an update

I found a solution after looking the question Heather posted as a comment.
Source of solution is here
These are the steps that have to be done:

sudo apt-get purge nvidia*
sudo apt-get install --reinstall xserver-xorg-video-intel  libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf

After these, I've restarted my system and unity-3D is loaded.


Redirect user to a sub folder after logging in FTP

SFTP is a file transfer protocol over SSH and has nothing to do with FTP (except parts of the name). To add to the confusion: there is FTPS which is FTP, but with SSL. So if you want to restrict SFTP it is wrong to edit the config of the FTP-Daemon. For SFTP restriction http://www.debian-administration.org/articles/590 might help.


I am unable to boot into Ubuntu 12.10. no matching password file entry in /etc/shadow add user

This means your /etc/shadow file is missing user varun. Information about the /etc/passwd and /etc/shadow can be found here.

Use a live CD or a GRUB rescue prompt. For the 2nd one follow the answer with images here How do I reset a lost administrative password?

Have a look at your /etc/passwd file with more /etc/passwd|grep varun  and at your /etc/shadow file with sudo more /etc/shadow|grep varun. if the 1st does contain a line and the 2nd does not you can re-create your shadow file with the command

sudo pwcon

After that you can use passwd varun to create a new password.


port forwarding to docker instance for rdp

This should do it, I'm not familiar with Docker and its configuration, but this should get the data to where you want it.

iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination 10.10.0.5:3389
iptables -t nat -A POSTROUTING -p tcp -d 10.10.0.5 --dport 3389 -j SNAT --to-source 192.168.0.2


E: Unable to locate Ubuntu-restricted-extras

Go to Ubuntu Software Center -> edit -> software sources
Check this:

Main
universe
restricted
multiverse
canonical partner (optional)
indepedent

and open terminal and doing this:

sudo apt-get update && sudo apt-get install ubuntu-restricted-extras

If you install ubuntu restricted extras it will automatically install flash.
I hope this help and can close your case.


How to customise window decoration whilst using Compiz on Xubuntu?

installing gnome-tweak-tool would pull almost the entire Gnome as dependencies. I had the same problem today and I didn't want to install such a lot of unneeded stuff only to change one little setting and spent some time researching how these things are related and it seems it is indeed possible with gconf-editor (or gconftool-2) alone.

The key in gconf-editor is /apps/metacity/general/theme.

Type the name of an existing metacity theme into the text field (such as greybird and note that greybird is starting with a LOWERcase letter while most other themes are not!), hit enter and it should immediately change.

You can also change the arrangement of window buttons in /apps/metacity/general/button_layout (for example to move the window buttons to the right side where they traditionally belong use this: menu:minimize,maximize,close). Most other options in this section describe window behavior rather than style and don't have any effect on compiz, they would only be used by metacity.


Thanks to barotto I found out that this bug has been in Ubuntu for some years but it is very rare in newer versions. (There has been only one report on 16.04 )

I installed Ubuntu 16.10 and that fixed the bug.


Are there any plans to improve mtp support on future Ubuntu releases?

Yep, here's the fix you're looking for:

https://bugs.launchpad.net/ubuntu/+source/udev/+bug/903422

This is fixed in 13.04.

As of Jan 28th

  Upgrade Gvfs in Ubuntu 12.10 and 12.04 to get Android 4.0 support for devices which don't support USB Mass Storage interface

Add the PPA to your system

sudo ppa-purge ppa:webupd8team/gvfs-libmtp
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update

Then, launch Software Updater (previously known as Update Manager) and install the available updates.
Once everything has been updated successfully, restart your computer, unlock your Android device, connect it via USB and it should show up in your file manager.

Please refer to What are PPAs and how do I use them? if you have questions about anything related to a Personal Package Archives (PPA) and refer to the source on OMG Ubuntu (it has some comments worth reading).


Preseed proxy setting for local repository

As such, I am using a workaround. The proxy I have set in preseeding is an HTTP proxy, so naturally HTTPS and FTP connections are unaffected. However, the installer does not support HTTPS as a transport mechanism (possibly apt-transport-https has to be installed somehow). So the option that remains is setting up an FTP server for the signing key, which I did using vsftpd. I didn't want the apt-cacher to do any work for the local repository, so I set up vsftpd to serve as an FTP repository as well.


fatal error: linux/i2c-dev.h: No such file or directory 34 | #include

Try this in terminal:
sudo apt install linux-headers-`uname -r`

and try compiling again. On my system, i2c-dev.h is part of the kernel headers of the kernel that I use.


Your problem is almost certainly because you're running an older version of youtube-dl.

You should uninstall the apt version with

apt-get purge youtube-dl

and then install it with pip instead.

pip3 install youtube-dl

If you don't have pip3, you can install it with,

apt-get install python3-pip

or see this for more help on that.

The youtube-dl package in the apt repo for jessie(and maybe even trusty) hasn't been updated in almost a year.