Is there a way to see the commands that would be executed based on /etc/network/interfaces stanzas?

Hah, found out how to do it. I am not sure this will work equally on older versions of Ubuntu (I am running 14.04), but here is how I was able to see the commands using ifup(8):

ifup -anv

which in long command line options is more readable as:

ifup --all --no-act --verbose

This should read your /etc/network/interfaces and show you what's going on.

However, I got a more complete result by running:

ifup -nv --force $(ifquery -l)

Since I was able to run this from an unprivileged user account, I am positive, that this doesn't attempt any weird actions, so don't be fooled by the --force option.

If you want to test out with another interfaces file, assuming you have that file's path in an environment variable ENIFACES, this should do the job:

ifup -nv --force -i "$ENIFACES" $(ifquery -l -i "$ENIFACES")

Here's an example interfaces:

$ cat testif

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.16.33
        netmask 255.255.255.0
        gateway 192.168.16.254
        dns-domain mydomain.net
        dns-nameservers 8.8.8.8
        dns-search mydomain.net sub.mydomain.net myotherdomain.com

auto _br1
iface _br1 inet static
        address 10.1.0.0
        netmask 255.255.0.0
        pre-up brctl addbr $IFACE
        post-up route add -host 192.168.16.1 $IFACE
        post-down brctl delbr $IFACE

auto _br2
iface _br2 inet static
        address 10.1.0.0
        netmask 255.255.0.0
        pre-up brctl addbr $IFACE
        post-up route add -host 192.168.16.2 $IFACE
        post-down brctl delbr $IFACE

iface eth0 inet6 static
        address 2000:dead:beef:4::1234:5678
        gateway 2000:dead:beef:0::1
        netmask 64

... and the output produced:

Configuring interface lo=lo (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts --verbose /etc/network/if-up.d
Configuring interface lo=lo (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts --verbose /etc/network/if-up.d
Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
ip addr add 192.168.16.33/255.255.255.0 broadcast 192.168.16.255          dev eth0 label eth0
ip link set dev eth0   up
 ip route add default via 192.168.16.254  dev eth0
run-parts --verbose /etc/network/if-up.d
Configuring interface eth0=eth0 (inet6)
run-parts --verbose /etc/network/if-pre-up.d
modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.

sysctl -q -e -w net.ipv6.conf.eth0.autoconf=0
ip link set dev eth0   up
ip -6 addr add 2000:dead:beef:4::1234:5678/64  dev eth0
 ip -6 route add default via 2000:dead:beef:0::1 dev eth0
/lib/ifupdown/settle-dad.sh
run-parts --verbose /etc/network/if-up.d
Configuring interface _br1=_br1 (inet)
brctl addbr $IFACE
run-parts --verbose /etc/network/if-pre-up.d
ip addr add 10.1.0.0/255.255.0.0 broadcast 10.1.255.255           dev _br1 label _br1
ip link set dev _br1   up

route add -host 192.168.16.1 $IFACE
run-parts --verbose /etc/network/if-up.d
Configuring interface _br2=_br2 (inet)
brctl addbr $IFACE
run-parts --verbose /etc/network/if-pre-up.d
ip addr add 10.1.0.0/255.255.0.0 broadcast 10.1.255.255           dev _br2 label _br2
ip link set dev _br2   up

route add -host 192.168.16.2 $IFACE
run-parts --verbose /etc/network/if-up.d


Any simple way to do for loop pipe , such as ` ls | grep ".*.7z" | 7z -e {}`

I'm not sure this is a straight answer to the question (there are much more than one questions), but I think you are asking for something like:

for loop with command substitution or
while loop with process substitution.

for loop with $(command substitution)
Command substitution allows the output of a command to replace the command itself. We can combine this functionality with the for loop in this way:
for item in "$(find . -type f)"
do
    echo "$item" | tee -a ./"file-list.txt"
done

while loop with <(process substitution)
Process substitution allows a process’s input or output to be referred to using a filename. We can combine this functionality with the while loop, by the help of the built in read, in this way:
while IFS= read -r item
do
    echo "$item" | tee -a ./"file-list.txt"
done < <(find . -type f)

Within the final part < <(find . -type f), the first < means the stdin of the while loop and <(find . -type f) will be treated as a file. More about the construction IFS= read -r line you can read in this great post of Stéphane Chazelas.
You can achieve the same as the above by using pipe instead of process substitution (but this option is not preferred, because it could cause errors):
find . -type f | while IFS= read -r file
do
    echo "$file" | tee -a ./"file-list.txt"
done

Pipe the output of a loop to another command
Further we can pipe or redirect the output of the loop to another command or function:
while IFS= read -r -d '' item; do
    # Compose the name of the new file
    DIR="$(dirname "${item}")"
    FILE_NAME="$(basename "${item}")"
    NEW_FILE_NAME="new-${FILE_NAME}"

    # move the file and suppress the potential output
    # of the 'mv' command by redirecting it to a log file
    mv "${item}" "${DIR}/${NEW_FILE_NAME}" >>/tmp/mv-loop.log 2>&1

    # output the name of the new file in order to be processed
    # by the next (piped) command
    printf '%b' "${DIR}/${NEW_FILE_NAME}"'\0'
done < <(find . -type f -print0) | xargs -0 -I{} 7z a -t7z "the_archive_name.7z" {}

Note within the above example a null delimiters is used everywhere:

find . -print0,
IFS= read -r -d '' item - reference,
printf '%b' a'\0'b - reference,
xargs -0 (in this case we do not actually need -I{} and {} within the xargs command).

This example will move (rename) all files recursively, but within the archive the directory structure wont appear.


nagios NRPE CHECK_NRPE: Socket timeout after 10 seconds

On my case I had to increase the command timeout. I created my own plugin and this is my check command: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_nvr -t 3600

I run a find command that takes a longtime to execute


Ubuntu Gnome Live USB won't display anything after boot

I found the issue.

Apparently, it was trying to load in such a way that couldn't display on my video card (Nvidia). I had to append "nomodeset" to the command line for launching.


How do I make the hardware power-off button show a menu/zenity message on fluxbox or other alternative window managers (16.04)?

From: Fluxbox Wiki - Shutdown computer with dialog

Fluxbox doesn't come with some nice eye candy way to shutdown your computer. But, if you're using GDM to log in, you can also tell it to shut down. For ease of use, a script giving you some confirmation dialog can be used.

First, we'll create a dialog:

xmessage -nearmouse -buttons No:1,Yes:0 "Really shutdown?"

There are other ways to do this, we're not bound to use xmessage here. It's an easy way, though.

If the user clicks the "no" button, nothing else needs to be done, except maybe giving him some advice on using his mouse. If he clicks on "yes", we'll shut down his computer.

To do so, we'll first tell GDM that we want to shutdown by the time fluxbox exits:

gdmflexiserver -a -c 'SET_LOGOUT_ACTION HALT'

Then, we kill fluxbox:

kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}')

Some string and tape adds up to a script to add to your menu:

#!/bin/sh
if xmessage -nearmouse -buttons No:1,Yes:0 "Really shutdown?"; then
  gdmflexiserver -a -c 'SET_LOGOUT_ACTION HALT'
  kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}')
else
  xmessage -nearmouse "Then why did you press that big red button?"
fi

Caveat: I don't use Fluxbox. Any clarifications on material on their Wiki page will have to be asked to them. I've cleaned up some of the grammar after copying their website instructions above, but it's still not perfect.

You can find a rather heated argument about the "Shutdown Button" between a user and Fluxbox (developers?) on Source Forge. At the end of the argument someone posts source code and it appears /usr/bin/shutdown might be where you want to put in the hook. ie Create your own /usr/bin/shutdown which calls /usr/bin/shutdown2 which is the original copy.


I try and install Windows 7 such that all drivers will work. Then I install Ubuntu 14.04 alongside this. Will this possibly make it work?

No. The 2 operating systems have no correlation.

Besides that:

You are taking your Windows experience to another operating system. That is never a good idea. Ubuntu does not work like Windows and the system we are built on (Linux) had a total different approach of what an operating system is.

We have generic drivers that either support your system or it does not. If it does not someone (you?) needs to report those issues as a BUG against the package(s) it related to. If someone did that in the past for all your 3 issues they are bound to be fixed in a future release of that package. If nobody has the maintainer of that package probably does not know there is a problem related to your system (he is bound to have another brand computer).

  Unstable wireless (have not found a solution)

You will need to be more specific to get this fixed. Please have a look around Ask Ubuntu for wireless related problems and how to identity what brand NIC you have.

Also have a look at your system and router log files. Unstable wireless does not have to be an operating system related problem. It can also be a problem with setttings in your router (maybe you get so many incomming connections the router decides you are being DOS'd). I myself used to be able to kill my wireless playing Guild wars on my Ubuntu system. The system decided I was being hammered and my home router could not handle it. I updated the firmware of my router and only when I started using DDWRT I could fix it by getting access to options I did not have before that.

When you have gathered all information please open a new question dedicated to fixing your wireless.

In case you (or anyone) needs help gathering info have a look at this post on ubuntuforums. That script will take care of gathering all information.


Oracle Java web start silently dies (Ubuntu 12.10)

http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/tracing_logging.html gives some info on logging and tracing output.

Annoyingly the command line options don't seem to work, but running /usr/lib/jvm/java-7-oracle/bin/ControlPanel and settings the options there works (log files are in ~/.java/deployment/log)

Apparently there's a bug with Oracle Java 7u9 where it can't parse its arguments property. Manually editing the JNLP or downloading the referenced jar file and running that manually works. See http://www.oracle.com/technetwork/java/javase/7u9-relnotes-1863279.html

In my case I had to remove java-vm-args="-XX:MaxPermSize=128m"


I am not sure if a server installation of Ubuntu is really the right way to go, because of what you are describing sounds like a job for archlinux or similiar to me.

You will need to do a lot of customization on your system, which is when a "take a base system and add anything needed" approach is easier than a "use a full-fledged installation and remove anything unnecessary (e.g. apport, apparmor, dhcp ...)" one.

But anyways, there actually IS a wiki entry all about reducing boot time. The commands may not translate 1to1 for your Ubuntu system, but this entry might point you in the right direction:

https://wiki.archlinux.org/index.php/Improve_boot_performance

I am sorry, but reducing device-specific boot time is nothing a short answer on askubuntu can handle, you will have to look at every item in your startup routine and decide whether it is necessary or not and disable the system components accordingly.


Windows 10 as guest not activated inside virtualbox with Ubuntu 18.04 as host

It depends whether you activated a license with you Microsoft account. When yes, then simply login to Windows using your account. If you are trying to transfer OEM license to Virtualbox, then you are going the wrong way. For activating inside Virtualbox you will need a retail license. There are plenty of websites where you can get a license for a reasonable price. The question is whether you need it right now, because a standard installation of Windows 10 allows a trial period of 90 days...


Is it possible to have both vi and vim installed so that they can be used separately?

As user1326419 notes, vi is part of the Debian alternatives system. To change what vi runs, do:

$ sudo update-alternatives --config vi
There are 3 choices for the alternative vi (providing /usr/bin/vi).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/vim.gnome   60        auto mode
  1            /usr/bin/vim.basic   30        manual mode
  2            /usr/bin/vim.gnome   60        manual mode
  3            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/vi (vi) in manual mode

Then:

$ vi --version| head -5
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:02)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Small version without GUI.  Features included (+) or not (-):
$ vim --version| head -5
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:47)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):

vim.tiny is the minimal version you get when you first install Ubuntu.


When will the break of iwlwifi be fixed in Ubuntu 19.10?

Kernel 5.5 won't be packaged for Ubuntu 19.10 for the simple reason that 19.10 will reach End Of Life (EOL) in July 2020, a mere few months from now.

Ubuntu 20.04 is currently running Kernel 5.4.21, and will be released with some newer version of 5.4...but still 5.4. Look for a newer (like 5.6 or newer) with Ubuntu 20.10.

While it may be "well known," and bugzilla has the bug as a High priority, I have not been able to find any record of any Ubuntu participants asking the Ubuntu Kernel team to patch 5.4 for this bug. Ubuntu works best when the community participates.


Just type gpg --decrypt in the terminal, paste your code and press CTRL-D. You should then see the decrypted result.


Remove Bitlocker encryption on Ubuntu 16.04

You can install polarssl and dislocker on Ubuntu 16.04
by following TuxDiary - dislocker: decrypt BitLocker encrypted volumes.

Open the terminal and type:

sudo apt-get install libmbedcrypto0 libmbedtls-dev libfuse-dev

If git is not installed on your system you can install git by running the following command. Open the terminal and type:

sudo apt install git

Then you can install dislocker from source using git. Open the terminal and type the below commands.

git clone https://github.com/Aorimn/dislocker.git
cd dislocker
cmake .
make
sudo make install

Now you can start using dislocker. It works fine.


Upstart doesn't have any "suspend" stanza, what you can do is to set up two upstart script with different stop on stanza.


Changing “/usr” directory permissions under Ubuntu recovery mode

if you want to edit in recovery mode you need to type the following command:

mount -o rw,remount /

that will remount the root / with read/write permissions. Then if you knew what the original permissions are you could set them back but ... that would probably be a nightmare

Now the sudo problem .. if I had more information about that I may be able to resolve that for you also .. but I would need the information that I commented about in my first comment.


How to recover Ubuntu data if it's installed inside Windows?

The data can be recovered if Windows is unbootable but you can still access the filesystem. All of the data is stored inside of a filesystem image called C:\ubuntu\disks\root.disk.

Simply boot an Ubuntu livecd, mount the NTFS partition and then mount that image (sudo mount -o loop /path/to/root.disk /mnt), get to where you mounted it (/mnt if you used the above command) and backup your data.

If you cannot mount the root.disk and you suspect filesystem corruption, then you should do the following (the order is important):

Run chkdsk /r from Windows to fix any NTFS file system corruption
Mount and fsck the root.disk from a live CD in case there is ext3/4 corruption

If there is no file system corruption you can also access the root.disk from within Windows using ext2read


Several applications not lauching after upgrade (Ubuntu-Gnome 16.04 to Ubuntu 18.04)

Steam gaming bug
You appear to be affected by this bug reported on Github:

Arguments to dbus_message_new_method_call() were incorrect #5103

which has been closed as a duplicate of this bug:

Thread synchronization object is unusable on Fedora 26 #5101

and summarized in this bug:

Steam Client's SDL broken by XMODIFIERS #5201

You should read all bug reports from top to bottom but to summarize a couple of solutions.
Work-around from first link

A workaround is to opt-out the beta and to restart the client:

mv ${HOME}/.local/share/Steam/package/beta ${HOME}/.local/share/Steam/package/beta.disabled

Work-around from second link

The dbus_message_new_method_call() message is non-fatal and the

ln -s ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libdbus-1.so.3 ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32/libdbus-1.so.3

workaround from #5099 gets the steam client to start.

Related bug you may or may not encounter
In the future you may also find yourself affected by this gaming bug: D-Bus bug in 18.04 i386 SDL: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed
If so click on the link and subscribe to the bug. The more people reporting being affected by the bug the sooner it will be fixed.
In the meantime there are work-arounds posted by other users you can try.


How to remove Google Chrome error popup - "your preferences cannot be read..." on Ubuntu?

I opened the folder .config/google-chrome to do as suggested in Tim's answer and happened to notice a file "Local State" whose group and owner was root and the file had a date stamp of the day since when the problem had started.

I changed the group and owner to self and the error got resolved.


Three monitors, clicks on right monitor triggers on left monitor (and vice versa)

You need to install Nvidia drivers.

However, there have been some problems with these drivers, and the 5.3 kernel found in Ubuntu 19.xx.

The drivers found in Software & Updates are probably older Nvidia drivers.

Go to https://www.geforce.com/drivers and download/install version 440.44, (from Dec 11, 2019) of these drivers.


How do I debug an x-terminal-emulator that fails to start?

It turned out that this was a permission issue. I deleted every file in mu home directory and started XServer again with startx and it worked.

I should have instead done chown -R ... and chgrp -R ....

The first time I logged in, lightdm created these files and lightdm runs as root and the files created belonged to root :-(


The correct command to install linux-tools for actually used kernel (from official repository) is:

sudo apt install linux-tools-`uname -r`


OK -so I found a way, although it seems more like a workaround than an actual solution:
I used GGleb's answer in this thread to enable system tray icons: How to re-enable the systray (indicator panel) after latest updates.
His solution is to install the Indicator Systemtray Unity. His instructions was:

sudo apt-add-repository ppa:fixnix/indicator-systemtray-unity
sudo apt-get update
sudo apt-get install indicator-systemtray-unity

This enabled the wicd icon in the system tray. I still had the default Network Manager showing up and giving me notifications. I used Synaptic to completely remove everything connected to Network Manager and rebooted. Now I only have wicd's icon.

It even seems that my wifi connection is more stable than before.


Why is /dev/rfcomm0 giving PySerial problems?

It turns out the Bluetooth buffer on the PC was overflowing because I was never calling recv() in the Python script.

The Bluetooth accessory was sending characters to the PC, which the script ignored and which inevitably led to a buffer overflow. This overflow apparently causes the rfcomm channel to lock up until the buffer is read.

Here is the working script, for future reference:

import psutil
import serial
import string
import time
import bluetooth

sampleTime = 1
numSamples = 5
lastTemp = 0

TEMP_CHAR = 't'
USAGE_CHAR = 'u'
SENSOR_NAME = 'TC0D'

filename = '/sys/bus/platform/devices/applesmc.768/temp2_input'

def parseSensorsOutputLinux(output):
    return int(round(float(output) / 1000))

def connect():
    while(True):
        try:
            gaugeSocket = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
            gaugeSocket.connect(('00:06:66:42:22:96', 1))
            break;
        except bluetooth.btcommon.BluetoothError as error:
            gaugeSocket.close()
            print "Could not connect: ", error, "; Retrying in 10s..."
            time.sleep(10)
    return gaugeSocket;

gaugeSocket = connect()
while(True):
    usage = psutil.cpu_percent(interval=sampleTime)
    sensorFile = open(filename)
    temp = parseSensorsOutputLinux(sensorFile.read())
    try:
        gaugeSocket.send(USAGE_CHAR)
        gaugeSocket.send(chr(int(usage)))
        #print("Wrote usage: " + str(int(usage)))

        gaugeSocket.send(TEMP_CHAR)
        gaugeSocket.send(chr(temp))
        print gaugeSocket.recv(1024)
        #print("Wrote temp: " + str(temp))
    except bluetooth.btcommon.BluetoothError as error:
        print "Caught BluetoothError: ", error
        time.sleep(5)
        gaugeSocket = connect()
        pass

gaugeSocket.close()

The key change is in the addition of the line

gaugeSocket.recv(1024)

which cleans the buffer of the "okay" messages sent back from the remote device.


Gnome-shell does not display top toolbar panel using a Mobility Radeon 5650

The new 12.1 are 100% working on both my mobility and desktop ATI card but only if the dependencies listed below are installed first (i.e. don't download off the installer and try to execute it otherwise it breaks gnome 3). To properly install 12.1, type the following in terminal:

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases
sudo apt-get install ia32-libs
cd ~/; mkdir catalyst12.1; cd catalyst12.1/
wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-1-x86.x86_64.run
sh ./amd-driver-installer-12-1-x86.x86_64.run --buildpkg Ubuntu/oneiric
sudo dpkg -i fglrx*.deb
sudo aticonfig --initial -f

Then restart.


ath10k (QCA9377) firmware still keeps crashing on E200HA

Solved:

I disabled the wifi power management and the problem hasn't recurred since.

In /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf I changed the line

wifi.powersave = 3

to

wifi.powersave = 2

No connections dropped since.


After fiddling with a whole lot of things and several reboots, the missing icons have reappeared. I think I've figured out what happened. I had forgotten that I did the following (not sure if it's all relevant):

sudo add-apt-repository ppa:jconti/gnome3
sudo apt-get update
sudo apt-get install indicator-applet-complete
sudo reboot

I guess that solves my problem, except it would still be nice to be able to access the "Add to Panel" menu. As I said above, the special right-clicks still don't work.


another limits.conf question : limit nofiles specifically for a process

If it helps anyone, based on the comment from @Rinzwind I added a line in /etc/group

couchdb:x:10000:couchdb

and it did the trick.


Ok, I still don't understand what happened but I solved this now:

In Sourcetree on Windows it still worked. Just for trying I edited my profile and tried to reset the password => Worked before but now it sayd authentication error

So I went to the Github webpage, logged into my account (still using this same credentials ?!) and changed my password ... and than I changed it back again.

Now everything works fine.


Windows 7 disappeared in list of Grub while loading

Maybe the there was a little error when rebuilding grub during the update process
Try to do a

sudo update-grub

and see if it generates it or not


Canon Printer "Does not accept Jobs" on Ubuntu 18.04

I was having the same issue after upgrading to 18.04 and was finally able to resolve it.  It seems to be related to an error between adding a printer directly through CUPS vs. using the add printer device option. I also noticed the CUPS errors when attempting to add the printer generically through settings, and after researching CUPS errors here is what I did that resolved the issue:

1) Removed the printer through the interface

2) Shut down the printer completely and re-connected it to the WIFI network.

3) Added the printer back selecting the driverless option through the Add Printer interface

(Note: steps 1-3 may not be completely necessary, but I did them anyway in the interest documenting a path to resolution)

4) From there, I accessed CUPS through: http://localhost:631/admin

(Note: after logging in I noticed the same thing that you did - that the printer wasn't listed at all)

5) From here I proceeded to Add a new printer directly through the CUPS admin page

The printer showed up (Cannon MX922) and I selected to add it using the Default settings.

After that, the printer then showed up through the Device settings (as well as in CUPS), and I also noticed that it not only shows as Ready, but I also have the ink levels showing as well.  I then successfully printed a test page and things appear to be working normally (I tried to upload a screen shot for the link below as verification).

Screenshot from Printer listings

From here, I intend to add printers directly through the CUPS admin page vs. the Device settings, as this seems to be the root of the issue.

Hope this helps.


What is the difference between modprobe and dkms?

Modprobe
Loads and runs a kernel module
dkms
Compiles and installs a kernel module from source for the specified kernel (current running kernel if none are specified.
To autoload modules at boot
Edit the file  /etc/modules. add each module you want to load one per line.
Example file contents:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

fuse
lp
sbp2
cpufreq_userspace
powernow-k8


linux kernel - trying to cross compile on ubuntu (for rpi zero)

the official doc explains things a bit better and in a more "recent way" of doing things
https://www.raspberrypi.org/documentation/linux/kernel/building.md
first mod and source .bashrc file and add at the end :
if [ -d "$HOME/tools/arm-bcm2708/arm-linux-gnueabihf/bin" ] ; then
    PATH="$PATH:$HOME/tools/arm-bcm2708/arm-linux-gnueabihf/bin"
fi

to build kernel do :
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev

git clone --depth=1 --branch rpi-4.19.y https://github.com/raspberrypi/linux

cd linux
export KERNEL=kernel
make bcmrpi_defconfig

cd ..
git clone https://github.com/raspberrypi/tools ~/tools

cd linux

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

hope this helps someone else too


Ubuntu partition vanished after distro upgrade

***** This is an advice before the screenprint of gparted was shown, it is not enought to follow 1-3, you would need 1/ detect the problem 2/ to consider the text in italics *****

You dont need to find the partition for a fresh install.

There are few dangers, you could loose all your partitions, so backup first.

My experience is that Ubuntu takes about 15 GB, you need some /tmp space and /home space. Personally, I would a) defragmented Windows7, booted from USB with gparted and tried to make some reasonable space for Ubuntu on behalf of Windows7. Anyway, if you dont feel strong, or you dont care:

1) boot with Ubuntu 16.04 (you evidently use LTS editions)

2) Start with install, manually create 4th partition, that will contain two (at least) logic partitions - a 1) swap partition of a size of your RAM*2 (maybe it is possible to omit swap nowadays?) and ext4 for Ubuntu (/) that fills the last bytes of the disk.

3) Install to a new partition, grub should take care about the rest.


How to disable/enable/toggle touchpad in a Dell laptop

You can switch the touchpad off with this command:

xinput disable 13

Enable it back by

xinput enable 13

The device is not controlled by psmouse. It is controlled by synaptics_i2c. And it is device 13.

You can also toggle it by name as you tried before, not to depend on the ID. But if you do not connect new input devices, the ID should stay.

See this answer for some details.

To remove a wrongly detected device you need to add i8042.nopnp kernel boot parameter.


Ubuntu by default does not allow login as root. This is for security reasons. Ubuntu uses sudo, which allows users to issue commands with administrative privleges.

The user created during installation is automatically made an administrative user, meaning is already set up to use sudo.

Don't use the graphical file manager. Instead use the terminal.

ctrl+alt+t will open the terminal.

cd /var/www will get you to the directory.

You can delete files with sudo rm [files to delete].

You will be prompted for your sudo password, which is the same as your regular password. Nothing will show on the screen as you type your password.

Be very careful. rm removes files immediately and is generally not able to be undone. Check and double-check for typos.

You can use rm -i [filename] to get an Are you sure? prompt.


How to create UEFI folder in ubuntu 16.04

Does /boot/efi exist? If so, you are already in UEFI. If not, you must reinstall Ubuntu and make sure it is flagged with efi.


mate-power-manager not showing battery tray icon after ubuntu 18.04 upgrade

I hit this too.  In my case the power manager was missing.  It didn't show up in the settings.  'sudo apt-get install mate-power-manager-common' fixed this then you have to go into the settings->power-manager-preferences->on-battery-power and select.  I also did several things on the indicator-power-service to get it working but installing the power manager may have fixed this too. Look at this response on the power indicator for help on that.  Where he says "OnlyShowIn=Unity;XFCE;GNOME;" you need to add "MATE;" to get the battery indicator to show up.


Using an external monitor on an LG R590 laptop

OK, I managed to solve this all by myself(with some help from the Internet... and a friend who knows some Linux...)

I just had to download and install the NVidia driver, reboot, and than System->Preferences->Monitors will open the NVidia's control panel instead of the default Ubuntu one, and allow me to set everything I need plus it made me an xorg.conf file.

Now the only problem left is how to make it work in terminal mode...


Laptop shutdown frequently after 15 minuts of watching videos

seems like this is a hardware issue and not a software issue.

Does the laptop feel warn or the fan makes loud noises whilst watching videos?
It could be that the laptop needs to be cleaned internally, or its GPU (especially if it has a discrete GPU) is dying....


I've solved my problem. Just turn off hotkeys in BIOS fix all the problem.


apparmor displays errors when evince is opened

Install

"sudo apt-get install apparmor-utils apparmor-profiles "

When doing this below, only Allow changes for programs that you want to for the time being.
Run

sudo aa-complain evince

Open evince from your desktop as a regular user. Try running some
searches in a file, opening closing and saving a file.

sudo aa-logprof  Allow/Deny changes as you wish.

Repeat steps 2 and 3 until you have a profile that allows you to
do what you want to do.

sudo aa-enforce evince

If that doesn't work
Run

sudo aa-cleanprof evince

sudo aa-genprof evince
Steps 3- 5. same as above.


upgrading libglu1-mesa to its latest version

Just sudo apt-get install libglu1-mesa should upgrade it to the latest version currently available in Ubuntu repositories. A reboot (or just relog) after that should, hopefully, restore your machine to its previous state.


Can I change actions upon inactivity and timeout for that from command line?

That's a dconf value. It can be easly set via gsettings. Type this command in a terminal:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 600

600 is the value in seconds. If you set it to 0 it is the equivalent to never suspend.


Cannot add anymore "Time in othe location" since 15.04 update

bug in 15.04

https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1440157
Why this place needs 30 characters is weird so ...


Read the next paragraph to its end before doing anything!

Switch to a TTY by pressing Ctrl + Alt + F1. It also works for F2 to F6. If something is running on TTY1 (used F1), use the next one. Log in and enter sudo apt-get purge gnome-terminal. To get back to the graphical session, press Ctrl + Alt + F7.

You might want to remove the profile files before reinstalling gnome-terminal (by typing in sudo apt-get install gnome-terminal). To do so, delete ~/.gconf/apps/gnome-terminal, if it exist on your system. I have no idea where it is on Ubuntu 15.04, so maybe google this one.

Edit: I figured out the path on Ubuntu 15.04: /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml.


The find command finds files in 'directory' order (23.jpg, 66.jpg, ...). you could put a |sort after the find.

But your methods are overcomplex.

for i in $( seq 1 500 ) ; do
    j=$(( $i + 500 ))
    mv $i.jpg $j.jpg
done


It happened to me also with Plasma 5.3. I had to go back to Plasma 5.2 to be able of shutting down from the gui menu.


Failed to fetch during update. something is going wrong with ppa

That PPA is not yet ready for oneiric. Try change oneiric to natty in sources list


How to input Chinese (Zhuyin) on Ubuntu 16.04?

Chinese input methods and fonts can be easily installed on an English-language Ubuntu system, or any other non-Chinese Ubuntu system. You do not need to install a localized Chinese desktop.

Go to System Settings > Language Support

When the language support window opens, click Install/Remove languages

Click on Chinese Simple and Chinese Traditional and then click on Apply

Then give your password and authenticate

Close the window.

Again go to

System Settings > Text Entry

Click on the + icon

Select Chinese (Chewing) (IBus)

Close the window.

Click on the EN icon in the right area of the top menu bar/panel and choose Chewing.

Now you have Chinese keyboard.

Enjoy

If you couldn't find Chewin in Chinese selections. Try to search 'Chewin' instead of Chinese or Zhuyin.

If there is no Chewin in all options. Then run these commands:

sudo apt-get update
sudo apt-get install ibus-chewin


Install Ubuntu on HP Pavilion (Vista SP2) dv6397ea

Taking in account the hardware, I would suggest installing 32-bit version of Ubuntu 14.04 or Xubuntu 14.04. I do not expect any serious hardware problems. If there are any, you are welcome to ask questions.

But before you install, you can boot from installation usb or DVD, choose "Try Ubuntu" and test how everything works.


Remove Spaces between variable and its value.

USER='user'
PASS='password'
FILE='path/filename.txt'

Assignment in bash scripts cannot have spaces around the =

For more understand = also is compare operator. see this example:

if [ "$a" = "$b" ]

  Note the whitespace framing the =. In this case we are comparing "$a" and "$b".

if [ "$a"="$b" ] is not equivalent to the above.

Testing with example:

kasiay@kasiyaPC~:$ a=2
kasiay@kasiyaPC~:$ b=3

Then we run if [ "$a" = "$b" ]; then     echo "equal"; else    echo "not equal"; fi, the result will "not equal" and it's true result.

But if we run if [ "$a"="$b" ]; then     echo "equal"; else    echo "not equal"; fi, the result will "equal" and it's wrong result!!

Why in this case we are wrong result?

When we are using if [ "$a"="$b" ], it parsing as if [ A_TOKEN ], then in this case the if condition always return true result. for example:

if [ "$a"="$b" ]; then    echo "TRUE"; fi
#result is TRUE

if [ 2=3 ]; then    echo "TRUE"; fi
#result is TRUE

if [ anything ]; then    echo "TRUE"; fi
#result is TRUE

And finally when you are using USER = 'user' (I don't know which section parse this), then you are getting "not found" . and Why is "not found"?? since the parser looking for value of USER variable to compare with 'user' value. and it's "not found" right?


Old SSD filled up, couldn't boot, cannot mount

Let's check the file system on the old SSD...

boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdc2, replacing sdXX with the number you found earlier
repeat the fsck command if there were errors
type reboot


How do I use string variable (which contains double quote) in grep

When you use single quotes the the pattern is taken as a literal string, so

grep '"name": $DNS_RECORD_NAME'

will try to match the literal string

"name": $DNS_RECORD_NAME

the variable is not expanded.

For it to work you can:

grep "\"name\": $DNS_RECORD_NAME"

or

grep '"name": '"$DNS_RECORD_NAME"

here the variable $DNS_RECORD_NAME is expanded.


How to resize window icons (min, max, close), Ubuntu 18.04 Gnome

To increase the size of all user interface elements, you need to change the scaling factor in "Settings" - "Displays". Unfortunately, that can only be set in integer values. Once this factor set, you can then use the "Scaling factor" to adjust the size of the fonts. Try the combination that works best.
Alternatively, you may try to reduce the resolution of your monitor in order to have all elements displayed larger.
These are all not optimal solutions.Currently, there is no better option in GNOME Shell. Work is underway to support fractional scaling, which would resolve the entire issue.
On the other hand, this may be subjective. On my HD screen (1920 x 1200), these icons are quite similar in size to the ones you show in your screenshot. So another option for you may be to live with it a little time to see if you get used to it.


Lost ubuntu partition after Win7 removal

Not a very technical Ubuntu user here, but I have just recovered an Ubuntu partition and I may help you with your problem. I think it may be a bit overkill for your case, but here it goes.

If the problem is that you cannot access a partition properly, you can try rewriting the partition table with TestDisk. You can use it in Ubuntu and in Windows. This program is useful to discover disappeared partitions and to rewrite their status. In this case it should be quite simple: run testdisk, analyze sda (first option) and change the status of your Ubuntu partition to "logical". Then it should be accessible from your bootable Ubuntu. Since your partitions are not hidden, it should not take you more than a couple of minutes.


"3 nodes deployed"

It sounds like you're allocating the nodes in the MAAS ui before running the bootstrap.  Don't do that, it means juju has no machines to allocate to itself.

Use maas-cli to release the nodes (this functionality is not in the UI yet) and I think bootstrap will then be able to allocate a node, or if not re-run bootstrap.


How long should the loading screen last when installing?

I ran the "check disk for defects". It tells me an error was found in one file

That's enough to say that your live disc is broken. Do not use it (may I suggest to trash it?). Try to burn a new DVD or create a USB bootable drive.

If you choose to use a DVD, I suggest performing again a check disk before starting the Ubuntu setup. If no problems are found, you can proceed with the setup. If you find again some problems, you can probably have some hw/sw issues with your DVD drive.


I replied to a previous SO post on statically assigning an IP address to a WiFi interface and allowing a mix between NetworkManager and networkd to provide Ethernet connectivity:
network:
  version: 2
  renderer: NetworkManager
  wifis:
    renderer: networkd
    wlp1s0:
      addresses: [192.168.1.231/24]
      dhcp4: no
      dhcp6: no
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1]
      access-points:
        accesspointename:
          password: passwordgoeshere


eclipse for embedded c/c++ developers couldn't be launched on Ubuntu 20.04

I found solution:
first, I downloaded the wrong package, it should be "eclipse-embedcpp-2020-12..."
second, sudo tar xzf eclipse-embedcpp* -C /usr/share, then sudo chmod +x eclipse, then ./eclipse


Broadcom driver issue with TP-Link Archer T6E AC1300 14.04

A quick fix may be to remove the ndiswrapper driver with
sudo ndiswrapper -r bcmwl6
But since it appears you may have deleted bcmwl6, you may need to
sudo apt-get purge ndiswrapper
Reboot


preseed ubuntu 14.04 vim-nox package not available

I'm pretty sure this was my mistake. I am configuring for a specific subnet that is not available in my testing environment. Clearly any packages not on the installation media would be unavailable. I won't be able to confirm this with testing until next week, but it seems pretty clear this is the cause.


Bangla Complex Font problem in system Tray

You can raise the precedence of the Lohit Bengali font by adding this configuration file:

$ cat ~/.config/fontconfig/conf.d/10-bangla-preferred.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Lohit Bengali</family>
        </prefer>
    </alias>
</fontconfig>

Steps:

Create the directory:

mkdir -p ~/.config/fontconfig/conf.d

Open the new document for editing:

gedit ~/.config/fontconfig/conf.d/10-bangla-preferred.conf

Copy the above (as from "<?xml version="1.0"?>") and paste it into the document.
Save.

Hopefully it will result in a difference after next reboot.


iptables start on boot at Ubuntu 18.04 and cannot be removed

I believe the service in 18.04 is called "netfilter-persistent.service"


How edit anyway .conf on symlink using vim?

Your symlink

test1.conf -> ../new-path1/test1.conf

is a dead link. It points to a non-existing directory.
You said there's a file below ../new-path/
but the link points to ../new-path1 instead.
Fix the link:

ln -fs ../new-path/test1.conf test1.conf

After your edit it got clear that you created a self-referencing symlink
from ../new-path1/test1.conf to ../new-path1/test1.conf, i.e. in
the directory new-path1 exists a symlink named test1.conf that
points to itself. So test1.conf is a symlink to test1.conf
which is a symlink to test1.conf which is a … :

pduck@host> ls -L ../new-path/test1.conf
ls: cannot access '../new-path/test1.conf': Too many levels of symbolic links

Drop that symlink (rm test1.conf) and create it afresh and make it point
to an existing file.


apt-get install xserver-xorg-input-synaptics-dev

reboot

wget https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1166442/+attachment/3941591/+files/psmouse-elantech-x551c.tar.gz
dkms ldtarball psmouse-elantech-x551c.tar.gz
dkms install -m psmouse -v elantech-x551c
rmmod psmouse
modprobe psmouse


How to remove Python 2 from Ubuntu 20.04?

Before proceeding make sure that you do not really have packages which depend on Python 2.

Then you need to install special package which set aliases for you:

sudo apt-get install python-is-python3

And optionally remove all trails of Python 2 packages manually by

sudo apt-get autoremove --purge


Sound board beeping compulsively after installing Ubuntu 12.04

This issue was solved by installing the 3.2 kernel package and then setting it as the default GRUB option.


Inconsistent mouse X events for Acer T231H multitouch monitor

Solved this myself

Analysis of the main bug

I've dug through the sources of both evdev and the core x server. Turns out that this bug is not in evdev after all, but in xserver-xorg-core. A commit there (which is also included in the Xorg upstream) removed the only piece of code which ever set the TOUCH_END flag for an event. Without this flag, UpdateDeviceState will not remove the button from the state, thus leading to the "Button is always pressed" behaviour from my original question. Simply reverting that commit restored main core events functionality, i.e. the button was marked released right after the ButtonRelease event.

Minor bug on mouse press event

One issue remains in the xev output, though: The ButtonPress event already has state 0x100, but the state should reflect the state of the mouse buttons before the event occurred. This appears to be due to the way changes to the ownership of a touch sequence are handled. At one point in that ownership management code, the touch history is replayed using TouchEventHistoryReplay, but the internal state of the device isn't set to what it was prior to that replay. I haven't formulated a patch for this yet. When I do, I'll attach it to the bug report. I consider this question here answered even without a patch for that minor point, as it is a separate issue.

How to debug this

In case someone reads this with a similar problem: I had considered using gdb, but I was far from certain whether I'd be able to properly switch vt if the X server was stopped in the debugger, and I didn't have a working ssh server configured on that machine. So I used one of the oldest debugging aids ever and liberally scattered ErrorF calls all over the code, Xi/exevents.c in particular. I then recompiled the code (which I had initially compiled using debuild) without installing it, and ran the compiled binary (build-main/hw/xfree86/Xorg) as root like this:

$ make -C build-main
$ sudo -s
# apt-get install openbox
# ( sleep 3; DISPLAY=:1 exec openbox; ) & build-main/hw/xfree86/Xorg :1

This recompiles the code (takes ages even for a minor modification, so it seems that dependency management in the makefiles is suboptimal, but I didn't feel like digging into that as well). Then after becoming root, it starts the new X server, and starts openbox on that server a few moments later. Note that you'll be running openbox as root, so this is strictly for testing only.


how to create an audio clip from a video file using command line?

See my blog post about that:

$ ffmpeg -i youtubemusicvideo.flv -vn -acodec libvorbis result.ogg

Selecting the start time can be done with option -ss hh:m:ss, and the length of the resulting clip can be configured -aframes 1234. Have a look at the ffmpeg man page for more details.


How to convert Excel spreadsheet 2007 to pdf in Linux

You can use Libreoffice Calc (always work on a copy)
. Open the file and Export as pdf.

Also you could run from the command line

libreoffice --headless --convert-to pdf *.xlsx


Try

sudo apt-get install -f

then just run Steam through the Terminal (at least the first time). That's always worked for me when I had issues with dependencies.


Add terminal session with network to login in screen

Create a file called terminal in /usr/share/xsessions with the following content:

[Desktop Entry]
Name=Terminal
Comment=This session logs you into Terminal
Exec=gnome-terminal
TryExec=gnome-terminal
Icon=
Type=Application


Where can I download the Ubuntu Touch developer preview?

The steps mentioned in Install page state that you need to install phablet-tools and other tools on your system to flash the device. This fetches the most recent image and downloads to your device.

More information

OMGUbuntu - How To Install Ubuntu Touch Preview on Nexus Devices
Video - How to Install Ubuntu Touch Developer Preview on Nexus Devices


Accept Google Voice incoming calls with Empathy (or any other chat) on 13.04

You can do audio/video call for XMPP procotol, I am not aware of what google voice uses but surely is not XMPP.

I also have notice since the google+ stuff and gtak becoming hangouts I can no longer make phone/video calls to my google contacts with Pidgin.


While the amount of swap you need is always dependent on your workload, that is certainly an excessive amount of swap and almost certainly can be attributed to an overly-simplistic "swap = RAM * x" type calculation.

Short answer: in my opinion, 4GB swap is almost always more than enough.

Long answer: Swap is always designed to stand-in for times where your system is operating abnormally - that is, your RAM usage by processes is nearing or exceeding the amount of physical RAM you have.  If the processes you are running use a very predictable amount of RAM (eg a database server that you've configured a certain heap limit) then your RAM use is going to be somewhat stable and swap is unlikely to ever be used.  If you are certain that RAM use by processes will never near or exceed physical RAM, you don't even need any swap.  But on a typical server, there is usually the random possibility that tasks will run which eat up large amounts of memory for a certain period, and when this causes RAM usage to near or exceed physical RAM, swap will step in and save your system from killing processes or running out of enough cache space to run efficiently.

I say that 4GB swap is usually more than enough swap even on a system with a large amount of RAM, because I feel as if that's enough for 1 or 2 relatively memory-hungry processes to exceed physical RAM by if your system is already working near its limit.  I feel as though if your are in deficit by more than 4GB, something a lot more serious is wrong which would need to be fixed by configuring your memory-hungry processes.  Processes which occupy significantly more than 2GB RAM will usually be programmed to somehow self-limit their RAM use either by configuration or by being intelligent about how much physical RAM is remaining.

Other opinions on how much swap is "more than enough" will vary of course.  Some will say 1GB, 2GB, 8GB, etc.  Some will say you don't need any with that much physical RAM (but I'd disagree).

One more thing: "hibernation" requires enough swap space to write all process memory, so if your swap space is significantly smaller than physical RAM you are not going to be able to hibernate.  On a system with 128GB RAM, you probably won't want to hibernate anyway - reserving that much swap space just for the privilege of hibernating would not only eat significantly into your disk space (especially for an SSD) it would also be pretty slow - imagine loading ~128GB from disk on resume, that would be significantly slower than just a normal boot.


Wireguard is started via systemd-networkd. The installation also creates a new interface wg0.

The configuration is done via two files (somename can be anything, for instance wg0 or wireguard)(1)

/etc/systemd/network/somename.netdev

This file will hold the configuration of the interface and peers. It uses [WireGuard] and [WireGuardPeer] instead of the usual [Interface] and [Peer] (see (1))

[NetDev]
Name = wg0
Kind = wireguard
Description = Wireguard

[WireGuard]
ListenPort = 51820
PrivateKey = <your private key>

# laptop
[WireGuardPeer]
PublicKey = h/trC+5Z8qbGBJtroYITQGMNUn5XQZ/JRqVR3iIH5Ro=
AllowedIPs = 192.168.20.2/32

/etc/systemd/network/somename.network

This file will hold the IP-related configuration of the interface (nothing specifically wireguard-related here)

[Match]
Name = wg0

[Network]
Address = 192.168.20.1/32

[Route]
Gateway = 192.168.20.1
Destination = 192.168.20.0/24

These configuration files are read upon a systemctl [re]start systemd-networkd.

(1) Note that the configuration file referred to in various documentations (/etc/wireguard/wg0) is not used with systemd-networkd. It would be used if you ran wg-quick commands.

This answer is here thanks to @Rinzwind and him pointing to systemd-networkd and its configuration files


Create a clickable desktop shortcut for an alias

To be exact there is a method, i.e. running the alias in an interactive shell;

I.e., create a desktop file with the following Exec= line:

Exec=bash -c 'exec bash -i <<<"gotoheaven"'

bash -c '[...]': starts a non-interactive shell (this is required to take advantage of the <<< redirection) and runs [...] in it;
exec bash -i <<<"gotoheaven": replaces the non-interactive shell with an interactive shell and redirects gotoheaven to the interactive shell's STDIN, which sources ~/.bashrc and runs the alias.

However since this requires more or less the same effort of copy-pasting the command from the alias into the new desktop file but runs an additional shell, I suggest you to just go for copy-pasting the command from the alias into the new desktop file as outlined in one of the answers to this question.

You seem to be stuck on the fact that the shortcut must run the alias and not an identical command, which just doesn't make sense unless you need to run the command in the environment set by ~/.bashrc (which doesn't seem to be the case). Just create a desktop file that runs the same command.


Move my personal data and apps to another computer with SSD + HDD

I would just reinstall the system and reconfigure the applications myself.

Keep your system files on 1 disk, so the SSD. 20Gb is enough to install all the software you will want to install (well not if you install everything in the repositories ;) ). Otherwise get a bigger SSD.

I myself did the following:

/ on the SSD in a 20Gb partition
/home on the SSD in a 5Gb partition. I do not use this for my own files only to store the hidden directories the system itself installs.  (I have a 120 Gb SSD and the remainder is kept unallocated).
Partition /discworld on my HDD.

I changed ~./config/users-dirs.dirs to use /discsworld so all my directories from /home are there. Basically all my personal data is on the HDD.

Yes, you can split the system into 2; it used to be normal to mount all the different root-directories onto their own partition on servers.

If you create a mountpoint called /var on the HDD the contents of /var will be stored on the HDD. Have a look at the filesystem hierarchy for a list and explanation...

bin Essential command binaries
boot    Static files of the boot loader
dev Device files
etc Host-specific system configuration
lib Essential shared libraries and kernel modules
media   Mount point for removeable media
mnt Mount point for mounting a filesystem temporarily
opt Add-on application software packages
sbin    Essential system binaries
srv Data for services provided by this system
tmp Temporary files
usr Secondary hierarchy
var Variable data

But ... if either your SDD or HDD breaks you can't boot your system. Plus it is a lot more work when you want to re-install.


About the error in the first screen (/etc/rc2.d/S99tpb: tpb: not found )
reinstall IBM thinkpad buttons software or remove softlink "S99tpb" from /etc/rc2.d

About the second screen (and the question in the subject line):

1) The script that you added to autostart has to be removed first (because it is probably the reason for this behaviour).

2) post your /var/log/Xorg.0.log

3) post the script that you added to autostart

What I want you to do next:

Uninstall virualbox for the time being

add a new user from scratch and log in as that user and tell me if that works okay.


Why couldn't I use ' ~ ' instead of ' /home/username/ ' when giving the file path

You need to understand that ~ is normally expanded by the shell; the programs you call never see it, they see the full pathname as inserted by bash. But this only happens when the tilde is at the start of an argument (and is not quoted).

If the Python program you are running uses a module like getopt to parse its commandline, you can give the argument of the --data-path option as a separate "word" to allow tilde expansion:

$ python ptb_word_lm.py --data_path ~/anaconda2/lib/python2.7/...

In your own code, you can use getopt or argparse for argument processing, and could also manually expand tildes as @JacobVlijm's answer suggested.

PS. The tilde is also expanded at the start of a shell variable assignment expression like DIRNAME=~/anaconda2; although the tilde in your question also follows an equals sign, this usage doesn't have special meaning for the shell (it's just something passed to a program) and doesn't trigger expansion.


Delete swap partition, create in other drive allocated to ntfs

You can have more than one swap partition. Create the new swap partition in the other drive (with gparted), check the UUID with

sudo lsblk -f

and create a line in the file

/etc/fstab

that looks pretty much like the current line for /dev/sda5 but pointing to this new swap partition. It will be activated at reboot or manually with

sudo swapon -a

(when it is found in /etc/fstab).


Create a Server in Ubuntu 14 / 15 compatible with W7 / W10

You will be able to access your database from the other computer on your network, if that's what you're asking. Your servers will be running on your Ubuntu machine, and the other windows machines will have clients to access those servers.

For the other questions:

The main difference will be that by default, a server distribution will not have a desktop environment, so you will have to manipulate it with command lines.
Server distribution will also have a smaller footprint in terms of needed resources.
Yes, you can.
Yes, you can.
I'm not sure what you're asking, but you can create a test VM to try your setup. You can also create VMs in Ubuntu (ie. with VirtualBox)
You can run a mail server on your Ubuntu machine, and access it with thunderbird on your windows machines. You can also install Thunderbird on your Ubuntu machine, if it has a Desktop environment.


Can I change the theme for only one program in Ubuntu 13.10?

See How can one make Firefox ignore my GTK theme entirely? for how to make gtk2 applications like Firefox or LibreOffice have distinct themes.

How do I find out if a program uses GTK 2 or 3? indicates that Inkscape is a gtk2 application.

For gtk3 applications, if your system's GTK3 version is higher than 3.10, you can use the GTK_THEME environment variable like this:

GTK_THEME=Adwaita:dark gnome-calculator

I don't know about qt applications.

I use this script to launch LibreOffice with its own theme:

#!/usr/bin/env bash

GTK2_RC_FILES=/usr/share/themes/Numix/gtk-2.0/gtkrc libreoffice --calc


How to change "Show Apps" icon on Ubuntu 17.10

"Show Applications" icon is usually the view-app-grid-symbolic.svg file under your icon theme directory. So you can change the "Show Applications" icon by overriding that file.

For example, in case of Adwaita icon theme, the view-app-grid-symbolic.svg file is located at /usr/share/icons/Adwaita/scalable/actions/. To change it with a custom icon of your choice (say my-icon.svg), just copy my-icon.svg to the aforementioned directory and rename it as view-app-grid-symbolic.svg. You may run the following command to do that

sudo cp /path/to/my-icon.svg /usr/share/icons/Adwaita/scalable/actions/view-app-grid-symbolic.svg

Note a couple of things:

Be very careful while making changes inside the root directory. It's always better to take a backup of the file before replacing it. In case anything goes wrong you'll be able to revert the change.
The change you'll make most probably be overwritten once an associated package gets updated. So you'll have to make the change again.

For other icon themes the correct location of the view-app-grid-symbolic.svg file may be /usr/share/icons/ICON_THEME_DIRECTORY/actions/symbolic or /usr/share/icons/ICON_THEME_DIRECTORY/symbolic/actions. Or if the icon theme directory is located inside your home directory, try ~/.icons/ICON_THEME_DIRECTORY/... or ~/.local/share/icons/ICON_THEME_DIRECTORY/... etc.


You can use curl. Make a file that contains the following:

#!/bin/bash
curl -o target/path/filename URL

Where target/path/filename is the folder you want to save it to /tmp and URL is your specified link.

So

#!/bin/bash
curl -o /tmp/world.o http://example.com/your.file

If curl is not installed, you can install it with sudo apt-get install curl.


Chromium won't start on Ubuntu Mate 16.04 LTS Raspberry Pi

After thinking about it being a version problem, I decided to look around and found this website: http://ports.ubuntu.com/pool/universe/c/chromium-browser/, the official website for the chromium found in APT repositories.

So I looked around, tried out a few versions, and finally, managed to get chromium working by installing

chromium-codecs-ffmpeg_57.0.2987.98-0ubuntu1.1348_armhf.deb
chromium-browser_57.0.2987.98-0ubuntu1.1348_all.deb
chromium-browser-l10n_57.0.2987.98-0ubuntu1.1348_all.deb

In that order. See How do I install a .deb file via the command line? if unsure; you can, for example, cd to the download directory and run

sudo apt-get install ./<name of package>.deb


Broken Dependencies Installing NPM on Ubuntu 18.04.3 Server

I know you already solved this by reverting the VM using a snapshot but in the future you can check what dependencies are required by doing after installing the repo:

apt update
apt-cache depends nodejs

It'll return this:

$ apt-cache depends nodejs
nodejs
  Depends: libc6
  Depends: libgcc1
  Depends: libstdc++6
  Depends: python-minimal
  Depends: ca-certificates
  Conflicts: nodejs-dev
  Conflicts: <nodejs-legacy>
  Conflicts: npm
  Replaces: nodejs-dev
  Replaces: <nodejs-legacy>
    nodejs
  Replaces: npm


I figured it out! It was a latency problem. I had it set at 128 in the frames/period and port maximum settings in Qjackctl. After I changed this setting, it worked.


Solr doesn't start and log file is getting deleted

Just update java version to java 8

Run command:

sudo bin/solr start

For example:

Vostro-3550:/opt/solr-6.0.0$ sudo bin/solr start

Then open browser and the past:
http://localhost:8983/solr/


How does one get tab-completion in gsettings from zsh?

The zsh-comp-gsettings plugin gives you that.

Just follow the instructions on the repo:

Download the _gsettings file here, and
Move (sudo mv) it into one of your $fpath directories (I put it in /usr/share/zsh/functions/Completion/Zsh/_gsettings).

Simple as that!


Ubuntu 16.04 - discover what services failed on startup

After a bit sleep and more digging I found this helped me:

journalctl -b0 _PID=1 | grep Failed

PID=1 is the systemd process, which apparently is the one handling the whole boot process.

I have gotten of "cheap".

Fail2ban, opendkim, atd.service and smartd.service had stopped working.

Now I just have to figure out why. :-)


How do I dump all the manully altered dconf / gsettings keys?

dconf provides such an option (Ref: man dconf)

To dump only user-altered (non-default) keys:
  dconf dump / > dump.dconf

To restore:
  dconf load / < dump.dconf


Cannot acces linux (server) shared folder via windows

Add the following in your /etc/samba/smb.conf file at the bottom

[PreferedNameForSharedFolderOnNetwork]
path = /path/to/your/folder/to/be/shared
available = yes
valid users = user1 user2 user3
read only = yes
browsable = yes
public = yes
writable = no

Note: above users should be on samba group

create / add user for samba

Run the following command to create new samba user or add an existing user to samba and create password for samba.

sudo smbpasswd -a username

Finally, restart samba

sudo systemctl restart smbd.service

From windows enter the valid user you've allowed in samba and samba-password you created.


Network issue with Ubuntu 14.04.3 in Hyper V environment / not running stable

After I had reinstalled 14.04.2 on the pysical PC and just made apt-get upgrade (not dist-upgrade), everything works fine (the login screen shows 14.04.3, but the kernel is still 3.16.0.30).

I made the same steps on the VM and there it works fine, too.

So I think the problem is part of the kernel (3.19) which is installed from the 14.04.3 installation ISO file.


Installed Ubuntu software is not showing

You can find installed software in many ways, two of them would be:

from a terminal press CTRL+ALT+T to show one and write dpkg -l | less

from the GUI press ALT+F2 and write software-center then go to installed tab

Sorry not sure what you want to mean with "applications folder"


How to print out memory usage by applications?

free, top, htop all do what you ask for: they can show the memory used by the applications.

free is aggregated, while you can order top to show it by usage (with < and > you can choose the sorting column)


Yes.  The instructions are listed here:

https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu
https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

Instructions for Windows:

Download the Rufus USB installer
Open Rufus and select your USB stick in the 'Device' dropdown
Click the CD Rom icon next to the 'FreeDOS' dropdown, then find your downloaded Ubuntu ISO and click 'Open' and then 'Start'
Click 'Yes' when it asks to download Syslinux software
Click 'OK' to write in ISO Image mode
Confirm that your USB stick is selected and then 'OK' to continue

When it is finished, just restart your computer and start using Ubuntu, or you can install Ubuntu

Good luck!


How to stylize terminal's container with "add new tab" and list of tabs items?

It's TerminalWindow .notebook .button . This works for me:

@define-color bg-grey #222;
@define-color active-grey #333;
@define-color border-grey #555;

TerminalWindow .notebook {
  border: 0;
  padding: 0;
  color: #eee;
  background-color: shade(@active-grey, 1);
}

TerminalWindow .notebook tab:active {
  border: 1px solid @border-grey;
  background-color: shade(@active-grey, 1);
}

TerminalWindow .notebook tab {
  background-color: shade(@bg-grey, 1);
}

TerminalWindow .notebook .button,
TerminalWindow .notebook .button:active {
    padding: 2 2 2 10;
    background-image: none;
    border: 0;
}


You don't need the fstab to mount a file system once, you can use the mount command for that. Only if you want the file system mounted at startup would you enter a line in the fstab. However, on the mount command, you need to specify more parameters. First you need to create a mount point, let's say:

sudo mkdir /mnt/nas

Now tell mount what to do. Specify the file system type (CIFS for Samba) with the -t flag:

sudo mount -t cifs //192.168.0.200/volume1 /mnt/nas

Notice position and number of the slashes. If this command is successful, the contents of your NAS are accessible under /mnt/nas.

Depending on the settings of the NAS you may need to specify other parameters, like username/password, but try this first. When that works, edit the fstab.


Need Japanese IME with Dvorak keyboard with 13.10

Here's how I fixed my problem:

I looked in /usr/bin for all ibus related programs (ls /usr/bin/ibus*).

I saw "ibus-setup" and ran it.

In the 詳細 tab under キーボードレイアウト I checked システムキーボードレイアウトを使用する。

(Did I mention I installed Ubuntu localized for Japanese?)

There's nothing in the system settings that brings up this dialog, is it hidden somewhere or am I just missing something?


Ubuntu installation gets stuck at "[sda] Synchronising SCSI cache"

I managed to get this to work, the problem indeed were the graphics drivers. I added 'nomodeset' to grub boot options to boot into the live USB and then started the installation from there, did the same thing once more after the installation to boot into Ubuntu and it worked, from where then I installed nvidia drivers. Rebooted, and everything seems to be fine now so far.


printers.conf saves password in plain text - encryption?

You can use encryptfs to have any text-based config file encrypted and decyphered in memory when user logins. It is used mostly for encrypting whole /home folder, but you can tweak that. Read guides on it's setup.


So i managed to figure out a solution. run this command

xmodmap -e 'pointer = 1 0 2 3 4 5 0 0 0 0 0 0 0'

this command will disable the second button which is middle click. the touch pad doesn't have a middle click but some how when you press the extra clicks on top of the touch pad this the OS thinks you are holding the button down which causes some trouble including mouse malfunction in some areas.

The settings for the mouse will return to their default state so your gonna have to do this each time on startup.


Ubuntu 16.04, hdmi monitor: no signal in login screen

Depending on your keyboard, you should press the keyboard with the screen on it. PS : your may have to press several times and also configure the display resolution


Start web application automatically on log-in

I followed one of the options given in the top answer to this question, the one where it says "Non GUI approach". I moved the Chromium web app to ~/.config/autostart, and it works now.


GOCR from
is an OCR (Optical Character Recognition) program.It converts scanned images of text back to text files.
CLARA is another good graphical option.
OCRAD from
is an OCR can be used as a stand-alone console application,or as a backend to other programs.
KOOKA from
is a KDE application but works fine,in addition you have to install actual OCR programs like GOCR and OCRAD.After installing Kooka and the OCR programs,you have to point Kooka to the OCR install location in order for it to be able to convert the JPEG to text.
OCRFeeder from
is a document layout analysis and optical character recognition system.
Tesseract from
is Command line utility and it is very simple to use.You can install language package tesseract-ocr-eng from  here.

Have a look at this page.

Note:
To run tesseract goto terminal and type the following

tesseract imagefile.tif outputfile.txt

Tesseract can only read a TIFF file - if you've got a JPEG or PDF or whatever, you'll have to convert it. Also, the filename extension must be .tif, not .tiff, otherwise tesseract errors out.


Showing text file content right-to-left in the terminal

The command you need is rev, e.g.:

$ rev <<<pa4080
0804ap
$ echo -e "pa4080_1\npa4080_2" | rev
1_0804ap
2_0804ap

Of course this also works with files:

$ >test echo -e "pa4080_1\npa4080_2"
$ <test rev # see annotation below
1_0804ap
2_0804ap

rev filename instead of rev <filename is possible but not preferable, as Stéphane Chazelas explains.

As part of util-linux rev is installed on every Ubuntu system by default.

This and alternative approaches can be found on HowTo: Reverse a String In Unix / Linux Shell? · nixCraft.

By the way: rev is to echo like tac is to cat, so to reverse the order of lines in a file:

$ >test echo -e "pa4080_1\npa4080_2"
$ <test tac
pa4080_2
pa4080_1
$ <test tac | rev
2_0804ap
1_0804ap


/etc/postfix/transport missing; what should it look like?

You need to create it and add your transport map to it. Example:

test.com smtp:your.other.mailserver.com

After saving you need to rebuild the transport database file with...

postmap /etc/postfix/transport

Restart postfix and every mail that is sent to test.com will relay through your.other.mailserver.com.

transport - Postfix transport table format has some good information and other ways of setting up maps.


Can't install alongside Windows 7 64-bit

I see there is one more option named "Something Else". You could click on this and create a new partition for your Ubuntu.

More information could be found in this video: http://www.youtube.com/watch?v=qBCHsgry2RQ

Nam


Reboot is required only after if you want to update kernel by running the command "apt-get dist-upgrade" other upgrades do not require reboot of server. This "apt-get dist-upgrade" updates your system only if there is new kernel available.


You can do this easily using vim or gedit.

As vim and gedit can edit the zipped files, you can do :

vim "$(man -w tsql)"
gedit "$(man -w tsql)"

$() is the shell command substitution pattern, which will be replaced by the output of man -w tsql. So if the output of man -w tsql is /usr/share/man/man1/tsql, the above commands are equivalent to :

vim /usr/share/man/man1/tsql
gedit /usr/share/man/man1/tsql


Ubuntu 14.04 & Macbook Pro - Reset Touchpad Settings

Issue has been resolved by doing the following:

Deleted .gconf and all folders relating to gpointing-device-settings from the hidden directories under my home folder

Creating a "xorg.conf" in "/etc/X11" with the following:
Section "InputClass"
Identifier         "Touchpad"
Driver             "synaptics"
MatchIsTouchpad    "on"
Option         "ClickFinger3" "2"
Option         "HorizTwoFingerScroll" "1"
Option         "VertScrollDelta" "85"
Option         "HorizScrollDelta" "85"
Option         "TapButton1" "0"
Option         "TapButton2" "0"
Option         "TapButton3" "0"
Option         "FingerHigh" "8"
Option         "FingerLow" "8"
EndSection


Migrating from 16.04 to 18.04 : Why is the "For long-term support versions" option not yet activated?

I agree that the option should say "For any new version" OR "For long-term support versions" (and that page now does say that).

I suspect that a prior page is used as a template, and as 3 of 4 Ubuntu releases are standard  (not LTS), it's easier for the delegated release manager to just copy & paste the prior release page making as few changes as possible which is why it I suspect it doesn't say both (it'd be a bad idea if your release was say 18.10 and you selected 'For long-term support versions' as you'd miss the mandatory upgrade to 19.04 when it came out)

Currently the switch (see Should I be offered the option to upgrade to 18.04.1?) hasn't been enabled for the 16.04 LTS upgrade to 18.04 LTS so yes, you do in fact need the "For any new version" currently, but it is my belief that this will very shortly change.

As for the page not using LTS for 18.04

Ubuntu 18.04 is a LTS. Ubuntu first releases on even numbered years (in April, except for 6.06 which was June) are LTS. Again I think that's just copying a prior page, and making the least number of changes possible. The change I made was the least I felt I could, and I don't think adding LTS for every reference makes it easier to read.

As for 18.04 & 18.04.1: To me there is no difference between a fully updated 18.04 LTS install, and a fully updated 18.04.1 LTS (if you ignore that the .1 will have HWE kernel installed; where the 18.04 does not come with HWE kernel enabled/installed).


Brostrend AC1200 wifi suddenly stopped working

Your kernel got upgraded to 4.10.

You need to install the driver from zesty repo to build against the 4.10 kernel.

wget http://mirrors.kernel.org/ubuntu/pool/universe/r/rtl8812au/rtl8812au-dkms_4.3.8.12175.20140902+dfsg-0ubuntu5_all.deb
sudo apt install rtl8812au-dkms_4.3.8.12175.20140902+dfsg-0ubuntu5_all.deb


Create & burn an ISO Image from a source Blu-Ray under Linux

You can get the block size by using blockdev --getbsz /dev/sr0 where "/dev/sr0" may change, depending on the amount of drives you have and the block count by using blockdev --getsz /dev/sr0, multiplied by 512 and then divided by the block size.
You can test this using isoinfo -d -i /dev/sr0 on a normal DVD.

From my understanding dd will work just fine, creating a perfect copy of your blue-ray, even with no size or count variables set.
These variables are only used when skipping unwritten parts of the disc, parts that physically exist but do not store information, as is common when the data isn’t as large as the disk.

I tested creating an ISO of a blue-ray without the size and count variables and using bit wise comparison cmp to compare it with the disc, and it didn’t give me any error.
I assume that the reason it didn’t work for you was that you burned it to yet another disc, which (as @JonasCz said) won't work due to copy-protection.

The ISO will play just fine, though.
I successfully opened and watched a blue-ray ISO using leawo on windows.

For example:

blockdev --getsz /dev/sr0 shows me 16142856.
blockdev --getbsz /dev/sr0 shows me 2048.
16142856 * 512 = 8265142272,
8265142272 / 2048 = 4035714.

This equals the output of isoinfo -d -i /dev/sr0
when used on a DVD:

Logical block size is: 2048
Volume size is: 4035714


Unity greeter does not display custom wallpaper

In current Ubuntu 14.04 (October 2014), there is no need to hack gsettings manually. If the wallpaper file is available to others (read permissions), the greeter automagically displays everyone's background as you select the login name.

My wallpaper lives inside the Dropbox folder which has the permissions drwx------ and thus the greeter can't access it. Copying it to the pictures folder which has permissions drwxr-xr-x and using it from that folder solves the issue. Probably linking via ln -s works as well (although I didn't try).

You can check the permissions of everything in a folder using the -l option for ls.


You will have to send a Kill Signal SIGKILL with a value of 9 which terminates the process with a given Process ID.

kill -9 PID

Depending on the Job, if it is a background job, you may have to kill it by using kill -9 $! PID command.

Alternatively, you can use the top command. Run Top command which will list all
your Processes and then use k to kill the process.

You can always get help using the man pages. such as man kill command will give you the detailed information.

Good Luck!


How can I mount remote folder on D-Link 320 automatic?

You should install cifs-utils: sudo apt-get install cifs-utils

Create a Directory inside your home folder: sudo mkdir /media/Musicas

Edit fstab file with sudo nano /etc/fstab and add the following line at the end

//192.168.254.7/Volume_1/Musicas  /media/Musicas  cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode  0  0

After editing the file do a sudo mount -a, that should make it work.


Unstable WiFi connection Ubuntu 14.04 - Lenovo G40-70 rtl8723be

You can install a better driver

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms linux-firmware

And reboot


Try setting yourself as the owner of the config-directory:

sudo chown -R yash:yash ~/.eclipse


Your Ubuntu release uses already Upstart for starting services.  That's why you can't find the init script for squid anymore in /etc/init.d/.  Instead, you have to start squid via

sudo service squid3 start

BTW, you cannot use su here to become root and then call service squid3 start. For more information see Ubuntu bug #1303769.

The script /etc/init/squid3.conf is the init script used by upstart and nothing we should normally edit.

Instead, use /etc/squid3/squid.conf for setting your configuration options.


If you would like your Ubuntu firewall to function in a similar way to RedHat/Fedora, in Ubuntu 18.04, you probably want these:

sudo apt install iptables-persistent netfilter-persistent

Then edit the rules in /etc/iptables/rules.v[46]

Other commands that might be useful:

netfilter-persistent save
netfilter-persistent start

iptables-save  > /etc/iptables/rules.v4
ip6tables-save > /etc/iptables/rules.v6

systemctl stop    netfilter-persistent
systemctl start   netfilter-persistent
systemctl restart netfilter-persistent

If you ever find that your rules aren't correctly applied at boot, you can run these commands to test that there are not errors in your config files:

iptables-restore  < /etc/iptables/rules.v4
ip6tables-restore < /etc/iptables/rules.v6

The two packages are similar, but provide slightly different functionality. If you only install iptables-persistent, you won't get the service definition file for correct handling in systemd, eg /lib/systemd/system/netfilter-persistent.service

If you only install netfilter-persistent, you will find that rules are not correctly applied at boot, as per the README

netfilter-persistent and its plugins
------------------------------------

netfilter-persistent does no work on its own. You need the accompanying
plugins (for example, iptables-persistent) to load and save filter rules.

However, commands are run from netfilter-persistent. For example, to save
all filter rules:

   netfilter-persistent save

or to load them:

   netfilter-persistent start

For more details, see `man netfilter-persistent`.

The system service will try to load rules at startup if enabled, but by
default it will not flush rules at shutdown. This behaviour can be changed
by editing /etc/default/netfilter-persistent.


Does ubuntu come with java installed already?

I dont think so. If I remember correctly I had to install it. If i'm mistaken, and you got it packaged to go then you should be able to remove it with the software center tool


How to change the graphics driver from i915 to intel?

You shouldn't need to do anything, the "intel" driver covers i915 card already and it's the default driver in Ubuntu anyway.


Unable to connect to internet with VirtualBox using bridged adapter?

In fact, the problem was not with my computer, but with the network I was working with at work. Sorry for the confusion, but after people fixed the screwy network, it solved my issue. Thanks!


Will data in my new volume be encrypted if I mount it in my full disk encrypted system?

As I see, encrypted directory is separate file system. When you mount new volume to this directory, you change file hierarchy tree but the encrypted file system is still separated from other ones.

So yes, you should singly encrypt each file system.

It's easy to test this. Create text file at simple volume, mount volume to encrypted directory. You'd see that you still can read text file right there, without decryption.


I cant watch YouTube videos on Firefox in Lubuntu 13.10

Upgrading to a supported release likely will be the best solution - however if you go to https://www.youtube.com/html5 , you should be able to enable the HTML5 player:

This does not need flash installed, though you will need a recent enough version of Firefox, and probably the needed video codecs.


I will try to help you. I recently bought the same printer, and got it to work. First, put the DVD in the computer. Then, go here:

Next, right click and go to the Windows Emulator screen. Then, after this, select Go Online instead of running it from the DVD.

If you don't have an account already, register.

Then after you have done this, log in:

Then click add printer.

I got an error message at the very end but the printer works fine, I hope this helps.


How do I prevent PolicyKit from asking for a password?

You can trick PolicyKit and suppress ALL password prompts by substituting the action with a wildcard.

DISCLAIMER: The following will suppress ALL password prompts globally for everyone belonging to the admin group, with the exception of the login screen. It is EXTREMELY dangerous and should NEVER be implemented because chances are YOU WILL END UP BREAKING YOUR SYSTEM!!

Don't say you weren't warned!

NOTE: If you are running 12.04 or later, substitute "admin" with "sudo"!

Replace "username" with your actual user name:

usermod -aG admin username

Switch to root:

sudo -i

Create a new policy:

gedit /var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla

Add the following:

[Do anything you want]
Identity=unix-group:admin
Action=*
ResultActive=yes

Save and exit. Then go try something that usually requires a password. :)

NOTE: It doesn't matter what you use as your .pkla file name. You can name it anything you want.

And last, this is the ONLY policy you'll need when it comes to suppressing password prompts because again, it does so globally.


How to get command result out of minecraft server screen session?

One way is to use the logs. Everything printed to screen is also printed to log:
My minecraft server is located at /home/minecraft, and runs as the 'minecraft' user (not me).

Send message:
screen -p 0 -S minecraft-server -X eval 'stuff "say TEST MESSAGE..."\\015'

Read the output several ways:

tail /home/minecraft/logs/latest.log

less /home/minecraft/logs/latest.log plus CTRL+G to advance to the end

less /home/minecraft/logs/latest.log plus CTRL+F to keep monitoring new output as it arrives.


If your bookmarks are the only thing you are worried about, you can recover them from
the terminal by running cp ~/.config/google-chrome/Default/Bookmarks* ~/. This will copy your Chrome bookmarks to your home folder directory.

You should sync Chrome through Google, it is one of the major selling points of chrome. http://www.guidingtech.com/3125/chrome-bookmarks-sync/

I also recommend you do the following: open the terminal and run
Chrome. It will crash but give you an output of what may have happened.
You can use the command

tail -f /var/log/syslog

to see what may have gone wrong.

My advice for you though is to make a new profile: Briefly, after backing up your data, open nautilus (home folder), press CtrlH to display hidden files,  navigate to .config/ and delete both chromium and google-chrome folders and start Chrome over. A totally clean profile will be recreated automatically. Let us know what happened, so I can improve my answer.

The official version on creating a new profile in Chrome is here: Create a new browser user profile.


How can I migrate from single-partition Ubuntu to dual-booting Ubuntu/Windows 8?

Follow these steps :(includes formatting the entire disk and will get a fresh system)

Step 1:

  Boot from windows 8 disk and modify the partitions as you wish. Keep in mind that you will need partitions for
  1. Windows
  2. Ubuntu
  3. Swap space
  4. Other Data
  So, install windows in the partition you prefer.

Step 2:

  Insert the Ubuntu disk and install Ubuntu in the partition you prefer by allocating some Swap space.

That's it. Normally both the OS will dual boot without any problem. But if you are not getting any GRUB (Boot menu) , You should run the Boot repair. Use the following link as a reference for Boot repair : https://help.ubuntu.com/community/Boot-Repair


After updating ubuntu 14.04, only the mouse shows onscreen. How do I fix?

If you have an Nvidia or AMD graphics card, or a laptop with Optimus or switchable/hybrid graphics, the issue may be the fact that it is does not have the proprietary drivers installed. If this matches your setup, check This out. Specifically, the section

"Black/purple screen after you boot Ubuntu for the first time"

The answer is to boot (only need to one time) using the nomodeset option and then install the proprietary drivers. Once those are installed, you should have no more issues.

See the link for exact directions and screenshots.


git removal script throwing error: syntax error near unexpected token `('

You are running a bash script as an sh script. You haven't shown your actual script, but based on the error, I am guessing you either have an sh shebang:

#!/bin/sh

Or you are calling the script with sh instead of bash:

sh yourScript.sh

The <() operator you are using is a bash feature and isn't available in the sh shell (which is a basic shell called dash on Ubuntu systems). To fix this, just replace your shebang line with:

#!/bin/bash

Or, if you are calling the script manually, use bash:

bash yourScript.sh

To illustrate:

$ cat script.sh
wc < <(echo foo)

Now, if I run this with bash:

$ bash ./script.sh
      1       1       4

But with sh:

$ sh ./script.sh
./script.sh: line 1: syntax error near unexpected token `<'
./script.sh: line 1: `wc < <(echo foo)'

Actually, the error you get is not what dash would print, so I assume you aren't actually running this on an Ubuntu system. In this case, it makes no difference since the same basic issue would happen on Ubuntu as well, but next time, please ask on http://linux.stackexchange.com instead.


Opera Browser install wont open in ubuntu 16.04?

After downloading the .deb file from the opera website, you should be able to open it by double clicking it. After installation Opera can simply be opened from Dash or you can open a new terminal and type opera <enter>. I just installed it and works perfect.
Maybe you should first uninstall whatever you just installed. Be sure to download it from here:

http://www.opera.com/computer/linux

Good luck!


Should I keep an experimental Kubuntu PPA?

There is nothing to say you can't keep the experimental ppa. Personally I would, here's why.

If the current (stable) Muon is not working and you have a bug report then something is breaking the stable version. This needs to be dealt with and will. As soon as the bug is fixed and you feel more comfortable then revert back to it.

In the mean time there is always a way to get updates.


Is Ubuntu usable for tablet mode on laptop?

I can't say for any particular model and I don't know what "Tablet Mode" is or does different to normal mode but if it's any use...
I installed ubuntu on a Asus Transformer 3 Pro T303UA (maybe 19.10 at the time, now 20.10) and without doing anything special it supported automatic screen rotation (and ability to lock rotation via top-right ubuntu menu). As well as a basic on-screen keyboard.
But touch support is very basic. You can click on things and drag windows/scroll bars but that's about it. Some apps will allow scrolling by dragging inside windows but most won't. e.g. it's just a "touch screen" Ubuntu desktop, not in any way a proper tablet.
It may be possible to custom-add things to make it more tablet-like but I use primarily for a home automation (e.g. lights/music) controller/display and it's all I need and have never looked into it further.


glxgears segmentation fault using open video driver

After updates from xorg-edgers (didn't noticed when exactly) the problem solved itself


Dell has a driver, but they don't list 12.04.  You can try using it, and see if it works.

Note: The driver has 32-bit support only.

Installation Instructions:

Do not attach the printer via USB to the Linux machine.
Extract the driver file file.
Run the installer script file by double-clicking on the file icon and
then click the Run in Terminal button or run the script file via command-line.
Follow the instructions in the installer screen.Dell

Click Here to download the driver.


Hello, It is legal to charge for installing Ubuntu to another person?

Yes.  You're not selling the software.  You're selling the act of installing the software.  They're two distinct things.  It's perfectly okay to sell an act of installation or maintenance of FOSS.  I morally wouldn't sell FOSS itself, but some licenses allow it.  Either way, selling the act of installing or repairing is always OK.  The act of selling FOSS may not be depending on license and modifications. (US)


Open Firefox and click on "addons" and select "plugins". Scroll to the java plugin and make sure it is set to either "ask to activate" or "always" (note: it should not be set to activate when not in use for security reasons).

If the opensource java plugin is not compatable, you can install the non-free proprietary java and plugins using the following commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Again, you must use Firefox as these plugins are not compatable with chrome or chromium.

source: install-oracle-java-8-in-ubuntu-via-ppa


Here's what I'd try.

Ensure Unity is installed:

sudo apt-get install unity

and reconfigure your entire system:

sudo dpkg-reconfigure -a

(that last command will likely take a long time)


Can ls -l be made to separate fields with tabs rather than spaces to make the output useful in a spreadsheet?


Is there any software that can fill XFA forms in Ubuntu?

I was searching for the same thing and came across this answer at Stack Exchange:

The accepted answer to download and install Master PDF editor worked for me.


name node formatting HDFS file not found error in Hadoop2.4.0

First, check whether JAVA_HOME is set correctly in .bashrc file. Use echo $JAVA_HOME to check whether it is set or not. If not, set it using

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

Note: After making changes to .bashrc file, you'll need to reload it either by logging out and back in or by using . ~/.bashrc as pointed out in "How do I reload .bashrc without logging out and back in?".

It seems like the JAVA_HOME variable is incorrectly set in your hadoop-env.sh.
Set JAVA_HOME to /usr/lib/jvm/java-7-openjdk-amd64 instead of usr/jvm/java-7-openjdk-amd64. as it is set currently (pointed out by the error).

Use

export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"

in your hadoop-env.sh file.


Laptop stuck on startup after OS update interrupted

The middle of a release-update is the worst possible time to lose power. This is precisely why the release-upgrade tools advise you to plug in your system before proceeding.
Sometimes it's recoverable. However, your description seems to indicate an incompatible, unbootable mix of old and new packages and incomplete configs.
Advice: Wipe your system and reinstall.

Create a new 20.04 LiveUSB Installer on a different, working system.
Use the "Try Ubuntu" environment to backup your data to some other media.
Clean-install 20.04
Restore your data from the backup

Doing this correctly can take a full afternoon (instead of the 40 minutes-or-so for a normal release-upgrade). That's the price you must pay for neglecting to plug in.


fan constantly running on hp elitebook 8460p ubuntu 18.04.3 LTS

Are you sure that the fan is OK? Noisy worn out fans usually have a much slower fan speed than usual due to friction, for example 600 RPM instead of 2000 RPM. Some computer fans run at up to 4000 RPM. Install Psensor. Psensor is an application for monitoring hardware sensors, including temperatures and fan speeds. Psensor displays itself on the desktop as a little thermometer icon in the notification area in the upper right corner of the desktop. You can right-click the thermometer icon at any time to display the hardware temperatures and fan speeds.
To install Psensor open the terminal and type:
sudo apt install psensor lm-sensors

Psensor uses lm-sensors to monitor the rotation speed of the fans.
The temperatures are within the normal range, but the temperature range is a little bit broader than normal (38°-60° C). This indicates that the fan is dragging (probably due to friction) and starting up more slowly than usual when the computer heats up. If this problem keeps on getting worse you should replace the fan.


Separate icons for Chrome and Hangouts in Unity

Open a terminal and edit the following files:

gedit $HOME/.local/share/applications/chrome-*&

Find the file corresponding to Hangouts and inside the file remove the following entry:

NoDisplay=true

Typically, the Hangouts file will have the following entry that you can use to identify it.

Name=Hangouts

You can also enable the rest of google applications like google drive, docs etc that are disabled by default. I hope it helps.

The contents of my Hangout file are listed below:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Hangouts
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=knipolnnllmklapflnccelgolnpehhpl
Icon=chrome-knipolnnllmklapflnccelgolnpehhpl-Default
StartupWMClass=crx_knipolnnllmklapflnccelgolnpehhpl

The file name and location is

$HOME/.local/share/applications/chrome-knipolnnllmklapflnccelgolnpehhpl-Default.desktop


Virtualisation of ubuntu on windows 7 64 bits

The easiest and cleanest way to setup Ubuntu in a virtual machine is to download the Ubuntu ISO files, and use VirtualBox to create a new machine.  This ensures a clean installation, and is much, much smaller than an VMX download.


Is it possible to deploy multiple charms in one click?

Yes, this is possible via Juju bundles, here are the instructions:

https://jujucharms.com/docs/stable/charms-bundles

Basically you can go into the GUI, either on http://jujucharms.com or one you've deployed yourself, and then model the deployment how you want and then export that as a .yaml file which you can either share with the community or pass along your coworkers, etc.

You can also manually edit the yaml file afterwards. One of the nicer things about bundles is that it can declare just about anything so not just services but specific things like amount of RAM and CPU, this ensures that the deployment is consistent no matter who deploys it.

In your case I would just provide the bundle to the user, and they can just drag it from their desktop right into the Juju GUI and it will deploy.

Here's a bunch of bundles if you want to see existing ones:

https://jujucharms.com/solutions?type=bundle

And here's the documentation for juju deployer, which is a handy tool for deploying bundles:

http://pythonhosted.org/juju-deployer/


What is the Emergency Shell (emergency.target) of the Systemd, and in what case is it used?

Bonjour. The best write up comes from Red Hat.

The first step in severe problem resolution is rescue mode initiated with:

~]# systemctl rescue

Broadcast message from root@localhost on pts/0 (Fri 2013-10-25 18:23:15 CEST):

The system is going down to rescue mode NOW!

However there are times where rescue mode doesn't work and you have to enter emergency mode. This mounts foot file system as read-only, doesn't mount any other local file systems and doesn't enable network connections. To enter emergency mode use:

systemctl emergency

This is an abbreviated summary so please read the Red Hat link for more detailed systemd usage.

All-in-all I think we all hope we never have to use rescue target in the first place or emergency target second place.


This answer should help you Slow USB 3.0 speeds.
Ubuntu is faster when copying files with the same file system format. Copying large folders from ext2(ubuntu 13 default default formatting) to NTFS(windows default) can give the effect you are experiencing.
You could:

format the external hard disk to ext4
divide the file you want to copy in 4 or more folders and copy each separately.
A relatively small folder of 8Gb and 140000files can take up to 10minutes instead of 160seconds to copy, but if you copy the four sections separately it can take less than 200 seconds to complete.Optimal size for folder copy is aroud 500Mb, it drops to 30Mb/s after 1Gb and drops to 10Mb/s after 2Gb.


How to change menu font contrast in Gnome Classic?

The menu could be selected with Alt+Super+Rt. click. You go to Panel properties and could change the background colour and its opacity feature. By default the menu takes up the colour which you use in the theme.

Just go through the simple steps shown here and finish the rest.