Dark xfce themes makes elements black in firefox - userContent.css is not enough

You need to add -moz-appearance: none; to all your CSS rules.

If that alone doesn't make it, you'll have to add a fix to your gtk-2.0 theme. Check the answer for: How to fix firefox's look with a dark theme?


run all command inside script with typing the password one time

The obvious solution: run the script as root

sudo /your/script

Then all commands in the script will be run as root.

If some commands don't need root, just use sudo to change back to a normal user


You can use a tool named raidextract.

Example usage:

./raidextract --window 1024 --stripe 16 --rotate 6 \
    --start $((0x41C6E79A00)) --length $((4096*1024*64000)) \
    --failed 5 /dev/sd[a-g] | ssh othermachine dd of=RecoveredFilesystem

If you use raidextract to read a filesystem image, you can write the output to a file and run all the standard filesystem tools (tune2fs, e2fsck) on the file. Once you've finished, you can the mount the filesystem with mount -o loop.

For more information, you can read this: http://www.chiark.greenend.org.uk/~peterb/linux/raidextract/

Hope this helps.


Change the color of Grub back to the default Ubuntu colors

Take a look at Grub2 - Ubuntu Community Documentation. The /etc/grub.d/05_debian_theme is responsible for the themeing of the Grub. The color and background image if any can be set there.

Here is my copy of the /etc/grub.d/05_debian_theme if you do need it, just in case -

#!/bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2010  Alexander Kurtz <kurtz.alex@googlemail.com>
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

# Include the GRUB helper library for grub-mkconfig.
. /usr/lib/grub/grub-mkconfig_lib

# We want to work in /boot/grub/ only.
test -d "${GRUB_PREFIX}"; cd "${GRUB_PREFIX}"

# Set the location of a possibly necessary cache file for the background image.
# NOTE: This MUST BE A DOTFILE to avoid confusing it with user-defined images.
BACKGROUND_CACHE=".background_cache"

set_default_theme(){
    # Set a monochromatic theme for Ubuntu.
    echo "${1}set menu_color_normal=white/black"
    echo "${1}set menu_color_highlight=black/light-gray"

    if [ -e /lib/plymouth/themes/default.grub ]; then
        sed "s/^/${1}/" /lib/plymouth/themes/default.grub
    fi
}

set_background_image(){
    # Step #1: Search all available output modes ...
    local output
    for output in ${GRUB_TERMINAL_OUTPUT}; do
        if [ "x$output" = "xgfxterm" ]; then
            break
        fi
    done

    # ... and check if we are able to display a background image at all.
    if ! [ "x${output}" = "xgfxterm" ]; then
        return 1
    fi

    # Step #2: Check if the specified background image exists.
    if ! [ -f "${1}" ]; then
        return 2
    fi

    # Step #3: Search the correct GRUB module for our background image.
    local reader
    case "${1}" in
        *.jpg|*.JPG|*.jpeg|*.JPEG) reader="jpeg";;
        *.png|*.PNG) reader="png";;
        *.tga|*.TGA) reader="tga";;
        *) return 3;; # Unknown image type.
    esac

    # Step #4: Check if the necessary GRUB module is available.
    if ! [ -f "${reader}.mod" ]; then
        return 4
    fi

    # Step #5: Check if GRUB can read the background image directly.
    # If so, we can remove the cache file (if any). Otherwise the backgound
    # image needs to be cached under /boot/grub/.
    if is_path_readable_by_grub "${1}"; then
        rm --force "${BACKGROUND_CACHE}.jpeg" \
            "${BACKGROUND_CACHE}.png" "${BACKGROUND_CACHE}.tga"
    elif cp "${1}" "${BACKGROUND_CACHE}.${reader}"; then
        set -- "${BACKGROUND_CACHE}.${reader}" "${2}" "${3}"
    else
        return 5
    fi

    # Step #6: Prepare GRUB to read the background image.
    if ! prepare_grub_to_access_device "`${grub_probe} --target=device "${1}"`"; then
        return 6
    fi

    # Step #7: Everything went fine, print out a message to stderr ...
    echo "Found background image: ${1}" >&2

    # ... and write our configuration snippet to stdout. Use the colors
    # desktop-base specified. If we're using a user-defined background, use
    # the default colors since we've got no idea how the image looks like.
    # If loading the background image fails, use the default theme.
    echo "insmod ${reader}"
    echo "if background_image `make_system_path_relative_to_its_root "${1}"`; then"
    if [ -n "${2}" ]; then
        echo "  set color_normal=${2}"
    fi
    if [ -n "${3}" ]; then
        echo "  set color_highlight=${3}"
    fi
    if [ -z "${2}" ] && [ -z "${3}" ]; then
        echo "  true"
    fi
    echo "else"
    set_default_theme "  "
    echo "fi"
}

# Earlier versions of grub-pc copied the default background image to /boot/grub
# during postinst. Remove those obsolete images if they haven't been touched by
# the user. They are still available under /usr/share/images/desktop-base/ if
# desktop-base is installed.
while read checksum background; do
    if [ -f "${background}" ] && [ "x`sha1sum "${background}"`" = "x${checksum}  ${background}" ]; then
        echo "Removing old background image: ${background}" >&2
        rm "${background}"
    fi
done <<EOF
648ee65dd0c157a69b019a5372cbcfea4fc754a5  debian-blueish-wallpaper-640x480.png
0431e97a6c661084c59676c4baeeb8c2f602edb8  debian-blueish-wallpaper-640x480.png
968ecf6696c5638cfe80e8e70aba239526270864  debian-blueish-wallpaper-640x480.tga
11143e8c92a073401de0b0fd42d0c052af4ccd9b  moreblue-orbit-grub.png
d00d5e505ab63f2d53fa880bfac447e2d3bb197c  moreblue-orbit-grub.png
f5b12c1009ec0a3b029185f6b66cd0d7e5611019  moreblue-orbit-grub.png
EOF

# Include the configuration of desktop-base if available.
if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then
    . "/usr/share/desktop-base/grub_background.sh"
fi

# First check whether the user has specified a background image explicitly.
# If so, try to use it. Don't try the other possibilities in that case
# (#608263).
if [ -n "${GRUB_BACKGROUND+x}" ]; then
    set_background_image "${GRUB_BACKGROUND}" || set_default_theme
    exit 0
fi

# Next search for pictures the user put into /boot/grub/ and use the first one.
for background in *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA; do
    if set_background_image "${background}"; then
        exit 0
    fi
done

# Next try to use the background image and colors specified by desktop-base.
if set_background_image "${WALLPAPER}" "${COLOR_NORMAL}" "${COLOR_HIGHLIGHT}"; then
    exit 0
fi

# If we haven't found a background image yet, use the default from desktop-base.
if set_background_image "/usr/share/images/desktop-base/desktop-grub.png"; then
    exit 0
fi

# Finally, if all of the above fails, use the default theme.
set_default_theme


What's wrong with PHP 5.4.6 and what can I do about it?

I'm not sure why you're focussing on the database. The error is really very clear: PHP has run out of allotted RAM. We can create hypothesises as to why this has happened but digging through other people's code (especially when it's PHP) is a loveless task. Let's just get this up and running.

Allow PHP to use more memory

You never know - the script might just be really flabby. There may be a memory leak. It might be a burst issue. Who knows. You'll never find out until you turn things up to eleven.

1.Edit php.ini:

sudoedit /etc/php5/apache2/php.ini

Change memory_limit = 128M to memory_limit = 256M
Restart PHP, or Apache (again, unfamilar with how mod_php actually works)

If it still continues to use all the memory in the world, I'd consider that a serious bug. If it only hits you on this one install


Ubuntu 16.04 - Firefox 61.0.1 not resolving zeroconf hosts

I removed the Firefox installed via "Ubuntu Software" (seems to be installed via snap) and installed it again with apt.

It works.


How To Secure (Ubuntu Server ) Linked Through DDNS

You can do 3 things.

1) Each server can be hardened. For example, ssh - use keys , disable password authentication. Your question was not exactly on how to harden each server, so I will not go into further detail , but check on this.

Included in this would be mod evasive , apparmor, and possibly mod_security.

2) Personally I use iptables. You can not completely prevent a DDOS mind you.

http://blog.bodhizazen.com/linux/prevent-dos-with-iptables/

The trick with iptables is to tune it to your server, my rules may not work for you, you may need to be more liberal or strict, but it should get you started.

For ssh I use these iptables rules for rate limiting.

sudo iptables -A INPUT -p tcp -m tcp --dport 22 -m tcp -m state --state NEW -m recent --set --name SSH --rsource

sudo iptables -A INPUT -p tcp -m tcp --dport 22 -m recent --update --seconds 600 --hitcount 8 --rttl --name SSH --rsource -j DROP

sudo iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

3) For monitoring network traffic I highly advise snort, especially on a busy server. Snort will alert you to traffic you need to analyze.

Short of snort you can look at psad and fwsnort. I have a tutorial on those on my site as well.


Does Ubuntu run on current Asus Transformer Prime?

Ubuntu on the Transformer Prime is not stable at this time. Since Asus released an unlocking tool it is possible to install Ubuntu. But not all drivers work and no easy way to install it.

You can run Ubuntu on just about any Android device using VNC to a chroot'ed session but performance is very poor.

You could follow the latest at
http://forum.xda-developers.com/forumdisplay.php?f=1411

I for one can't wait, I'm very happy with Ubuntu on my Asus Transformer (tf101)


How to open a nautilus directory and select a file in it from the command line?

I don't think there's an option to do this.
See:

man nautilus
nautilus --help
http://live.gnome.org/Nautilus

You can open a file as if you had double clicked it in nautilus using the xdg-open command:

xdg-open file

If you really wanted to have this specific feature, it would require hacking on the Nautilus code.


Following steps worked for me.

1.Kill all currently running process

killall firefox
killall thunderbird

2.Remove the cache Files

Note: Backup before removing.

$ rm -rf ~/.mozilla/
$ rm -rf ~/.cache/mozilla/

3.Change the ownership of following folders

$ sudo chown -R $USER ~/.cache/.mozilla/
$ sudo chown -R $USER ~/.mozilla/

** if the above step NOT successful, Then try following **

$ sudo chown -R $USER:$USER ~/.cache/.mozilla/
$ sudo chown -R $USER:$USER ~/.mozilla/

** if the above step NOT successful, Then try following **

$ sudo chmod -R 777 ~/.cache/.mozilla/
$ sudo chmod -R 777 ~/.mozilla/

4.If all above steps NOT successful, Then change entire cache folder permission

$ sudo chown -R $USER ~/.cache

or

$ sudo chown -R $USER:$USER ~/.cache

or

$ sudo chmod -R 777 ~/.cache/


Is their an application to extract data from files?

grep should be what you want. It is very powerful. You can search multiple files for a pattern and you can even select the matcher.

There are many many options so you should really look up its man page I've linked you to.


I want to using multiple VMs and multiple NICs

You can achieve your goal by bridging the virtual NIC of VM1 to eth1 and that of VM2 to eth2.

Both settings are to be applied in the properties of the VMs on the host.

Both VMs need IP addresses from your home network (easiest through DHCP)


Do I need iptables if only two ports are open to the public?

Iptables is a firewall which allows you to keep open the nonstandard port n for SSH access and block any connection attempt on any other port.  If you disable iptables, you make possible for attackers to try an exploit to any other port and possibly do something malicious to your server (due to a service that you forgot stopping, a bug, or similar).  So yes, you must keep it on and configured to open only the ports you need.

There is no correlation between the attacks stopping and you disabling iptables -- it was purely by chance.  Either that, or perhaps iptables was misconfigured.


How do I turn off click-button sounds in KDE in Ubuntu 12.04 LTS?

Try running gnome-control-center inside KDE then go to Sounds and in the next screen, click on the fourth tab "Sound effects" and turn the volume all way down (or simply click on the on/off button next to it). It worked for me in Totem (video player) and Nautilus (file navigator) (try the close button in the Help-About window). Not tested in Chrome.

Using Ubuntu 12.04 LTS with KDE packages installed afterwards.


Connection dropouts with RealTek RTL8188CE

Save any unsaved work before you start as the last command will reboot.

Open a terminal to copy and paste the following commands one line at a time to install the driver. Press enter after each command line. Do not close the terminal untill you are completely finished with the installation.

first command:

sudo apt-get update && sudo apt-get install git gcc build-essential linux-headers-generic linux-headers-$(uname -r)

second command:

cd && git clone https://github.com/FreedomBen/rtl8188ce-linux-driver.git

third command:

cd rtl8188ce-linux-driver && sudo make

fourth command:

sudo make install && sudo reboot

notes

When it asks to change branches type for you after the third command, select "y" and at the end of the fourth command it will say something about turing power-save mode off, just select "n" or no because that is not an option for this driver in this version of ubuntu anyway but if you select yes it won't matter you'll just recieve an error that is of no consequence.

For 16.04

sudo apt-get update
sudo apt-get install git gcc build-essential linux-headers-generic linux-headers-$(uname -r)
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe -r rtl8192ce
sudo modprobe -r rtlwifi
sudo modprobe rtl8192ce


what is the difference between a GTK theme, Metacity theme, and Emerald theme?

Metacity is the Gnome 2 window manager - the thing at the top of your windows that has the minimize, maximize, and close buttons. On Ubuntu 11.04 and earlier, you can customize your themes to change just that part of the the theme.
The GTK theme is the overall theme that handles stuff like the panel color, the backgrounds for windows and tabs, how an application will look when it is active vs. inactive,  buttons, check-boxes, etc. Most theme packages also include a 'Metacity theme' so that everything looks integrated.
An Emerald theme is like a metacity theme, but it is used when you are using Compiz to handle your window management. Compiz can do more visually interesting things than regular theming.
Note that Gnome 3 uses "mutter" as its window manager which is Metacity implemented using the Clutter toolkit.  Metacity + clutter = Mutter.  :)


I deleted package 'python3' on Ubuntu and I have lost dashboard, terminal and Unity. Help me to restore my data please

You can press Ctrl+Alt+F1 to get a shell. Once there, try reinstalling Python and anything else you may be missing:

sudo apt-get install python3-all
sudo apt-get install gnome-terminal

If nothing seems to work properly, or your dependencies have been messed up, try installing all of the desktop components again. This should give you all of the dependencies you need.

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop


I have an old Asus 1000HE Eee PC (32-bit, 2GB RAM, 128GB SSD). Fedora 21 with Gnome Shell runs ok, but as I only use this netbook to browse the web, I figured I’d try to figure out how to launch Chrome as the desktop environment, cutting Gnome Shell out completely.  In the process of trying to determine which lightweight window manager I would use, I discovered that Google Chrome (my browser of choice) includes it’s own called Ash. So, setting this up was as easy as creating a single file, and simply selecting “Chrome” as my login session from GDM.

/etc/X11/sessions/chrome.desktop

[Desktop Entry]
Name=Chrome
Comment=Chrome Browser
Exec=/usr/bin/google-chrome --open-ash --ash-force-desktop --ash-host-window-bounds="1024x600"
TryExec=/usr/bin/google-chrome
Icon=
Type=Application
DesktopNames=Chrome

This isn’t a perfect solution, but it’s pretty neat. A few problems:

Triggering a download crashes the browser, as Chrome can’t launch the Gnome (GTK?) download widget.
No battery, audio, or wifi system icons.

Initially, the desktop was off-center.  Apparently, the netbook screen size (1024×600) was odd, so it needed to be explicitly specified with the “-bounds” parameter.

Copied verbatim from the web ...


Ubuntu upgrade from 14.04 to 15.04 [which is not the latest release]

You have to  update your reprosties to update to  a newer ubuntu version.

but do not update to 15.04 as it is no longer mantained. you have to upgrade to at least 15.10 to still get security fixes.

Fully fleshed out answer comes later, when I or some editor has the commands for CLI and GUI at hand.


No; if you don't plan to install snaps (which is indeed very unlikely on a server), you can safely uninstall snapd.


Can't remove a directory or `cd` into a directory that exist

The modx_camwright directories' names appear to start with a space. If you look closely, you'll see that the letter m appears farther to the right on the line, than the names of the other entries. Furthermore, they are listed before entries that start with ., which is a clue that they do not start with any letter. (After all, readme.txt is "alphabetized" after the . and .. directories.)

Or it could be some other weird character that ls shows as a space.

So, instead of calling the directory modx_camwright_2013_08_30__1377875941, call it:

' modx_camwright_2013_08_30__1377875941'

To cd to it, run:

cd ' modx_camwright_2013_08_30__1377875941'

To remove it and all its contents, run:

rm -r ' modx_camwright_2013_08_30__1377875941'

If those commands don't work, maybe the character at the beginning isn't a space. (It probably is--most other whitespace characters are shown as ?s by ls.)

You can use ? to match a single character. So, you can try calling this directory by the name:

?modx_camwright_2013_08_30__1377875941

(Don't use quotes.)

Or if it's multiple characters, you can use *, which matches zero or more characters:

*modx_camwright_2013_08_30__1377875941

(Don't use quotes for that either.)

Most likely, just quoting the name and adding a space to the beginning (as described above) will work.


Libre office dots between words / not displaying documents properly

For the former issue:

Launch LibreOffice with the method of your choice. Use the Keyboard combination ShiftCtrlJ to turn off full screen mode so that the menu bar appears.

For the latter issue:

CtrlF10 Turns off non-printing characters. You can also do this from the menu by unchecking View-> Non printing characters. This should resolve the dots in your document.

Tested on Libre Office version 4.2.8.2.

Sources:

https://help.libreoffice.org/Common/Full_Screen
LibreOffice menus
Testing.


Eclipse Neon/Mars is very slow/hangs on a fresh 16.04 install and Upgrade

That works fine, you can also set:

--launcher.GTK_version 2

in the beginning of your eclipse.ini file.

This way if you have a .desktop shortuct it will also work automatically


The readlines() method of a file object returns a Python list. It does not automatically write on stdout the contents of the file: Python is a scripting language, but not a shell scriping language!

You should replace:

f.readlines()

with:

sys.stdout.write(f.read())

Note that I'm using read() instead of readlines(). As I said, readlines() returns a list, but here we want to print a string -- and read() does what we want: it reads the whole file and returns a string. It's not optimal when the file is huge (because it will use a huge amount of memory), but it works.

It's worth noting that you code is flawed. You said: following code is to read all files in download directory. Your code actually will attempt to read both files and directories ending with .html. If your code finds a directory ending with .html, it will loudly crash.

Lastly, you should prefer using the with statement when opening files, especially when you are opening many files. The with statement will ensure that the file is closed as soon as you have finished working with it, even if an error occurs.

Therefore your code should look like this:

import sys
import glob
import errno

path = '/home/mypc/download/*.html'
files = glob.glob(path)
for name in files: # 'file' is a builtin type, 'name' is a less-ambiguous variable name.
    try:
        with open(name) as f: # No need to specify 'r': this is the default.
            sys.stdout.write(f.read())
    except IOError as exc:
        if exc.errno != errno.EISDIR: # Do not fail if a directory is found, just ignore it.
            raise # Propagate other kinds of IOError.


How to prevent a program from being uninstalled by a user with root permissions?

No. Root can not be restricted on a running system. You have to show at least that bit of self-control yourself.

Otherwise you have to create a new admin user, give its password to a friend and remove admin rights (sudo group membership) from your own user.

Wait, could you still bypass this and boot into a root shell in rescue mode? Yes. But if even that is not enough to stop your temptation for whatever, you should probably physically remove all computing devices from your reach.


cups-pdf has been broken for a long time.  It produces very large PDF files that encapsulate images and do not support text selection (for copy-paste).

A decent alternative is the Tea4CUPS virtual printer.

It works well most of the time for me, but sometimes printing with Tea4CUPS will abort -- in those cases, I resort to the Ubuntu built-in Print to File option.


@Harvey, that's why I asked you the question above.  Restoring MBR would restore the Windows boot record if you had created a dual boot system, which doesn't seem to be the case.

If you want to revert to Windows now, you must boot from the Windows installation DVD and do a brand new Windows installation.  Windows will fix your MBR error automatically.


The way I finally did was

Startup Applications -> Add -> Command

bash -c "sleep 10 && path/to/program_or_script"

Complete the name and comments and hit save.

example: start dropbox one minute after login (Disable autostart in dropbox preferences)

bash -c "sleep 60 && dropbox start -i"


Why doesn't rTorrent support all types of torrent file?

the torrent has most likely a ( in the title that you need to escape.

Eg:

Wrong:

'Torrent File Name (2009)'

Correct:

'Torrent File Name \(2009\)'


Ubuntu 20.04 - Freeze your desktop and draw on it

Try gromit
http://manpages.ubuntu.com/manpages/focal/man1/gromit.1.html

Gromit - Presentation helper to make annotations on screen
Gromit enables you to make annotations on your screen. It can run in
the background and be
activated on demand to let you draw over all  your  currently  running  applications.  The
drawing will stay on screen as long as you want, you can continue to use your applications
while the drawing is visible.


13.04 and later (GUI)

Follow-on-focus settings can be set using the unity-tweak-tool

12.10 and later (command line)

The following controls follow-on focus

gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'

or

gsettings set org.gnome.desktop.wm.preferences focus-mode 'mouse'

Use the value 'click' to reset to the standard focus-control.

Note: the difference between 'sloppy' and 'mouse' is described at the bottom of this answer.

In addition you have the following option which when set, automatically raises the window to have focus:

gsettings set org.gnome.desktop.wm.preferences auto-raise true

You can control the delay for this auto-raise capability (in milliseconds):

gsettings set org.gnome.desktop.wm.preferences auto-raise-delay 500

You can change raise-on-click to control what window is on top:

gsettings set org.gnome.desktop.wm.preferences raise-on-click false

12.04

Two methods for 12.04 are presented below:

method 1

Use gconf-editor and change the focus-mode value shown to mouse or sloppy

(see note below)

If do not have gconf-editor already installed then you can install via the terminal command:

sudo apt-get install gconf-editor

In addition you have the following key which when set, automatically raises the window to have focus - auto-raise.

You can control the delay for this auto-raise capability (in milliseconds) by changing the key value auto-raise-delay

method 2

use gnome-tweak-tool

change windows focus mode to mouse or sloppy

(see note below)

"mouse" vs "sloppy"

A focus mode "sloppy" seems to work better at allowing Alt+TAB to override focus.

"mouse" means that if the mouse isn't in the window, the window isn't selected, no matter what you've selected in any other way.

  The window focus mode indicates how windows are activated. It has
  three possible values; "click" means windows must be clicked in order
  to focus them, "sloppy" means windows are focused when the mouse
  enters the window, and "mouse" means windows are focused when the
  mouse enters the window and unfocused when the mouse leaves the
  window.

Controlling What Window is on Top

The following window options control what window is in the front of others (or "on top").  It's slightly different than what window has the input focus.  The following descriptions help explain slightly.

raise-on-click

Some users who use focus-follows-mouse do not like the windows the interact with to come to the top unless they explicity click on the tilebar of the window.  This gives a finer grain of control when working with multiple windows, but can be frustrating for most users.

auto-raise

Some users who use focus-follows-mouse, like to have the window their cursor is over automatically raise to the top.  This makes the window in full view, with no other windows eclipsing it.

auto-raise-delay

The length of time to wait before triggering the auto-raise behavior.


I found the issue:
In conjure-up, go to advanced settings before deploying. I had to change "eth1" to "eth0" for the node that failed in first attempt, and then deploy again. After this, all containers got IP adresses.


Mouse cursor is flickering and disappearing

I solved this problem by installing the Nvidia GeForce GPU drivers using this command:

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic


Always be 100% bright when I'm using battery

11.10

Open System settings. Then, click the Screen option, and uncheck the Dim screen to save power box:

And you're done!

11.04

Open gnome-power-preferences - to do that, hit Alt+F2, then type in gnome-power-preferences. You'll see something like this:

Go to the "On Battery Power" tab, then you'll want to make sure that the "Reduce Background Brightness" box isn't checked:

That should do the trick.


Ubuntu mate 20.04 I am unable to delete the Trash files. I have tried sudo rm -rf ~/.local/share/Trash etc but the files remain

On MATE 21.04 the files in the trash bin are stored in ~/.local/share/Trash/files I guess it would be the same for MATE 20.04 it certainly is for ubuntu 20.04.2 LTS
The -r arg is for removing a directory recursively. I doubt you want to remove the files directory and there is no need to use sudo.
Your command should simply be:
rm ~/.local/share/Trash/files/[file_name]
I just tried this command in terminal on MATE 21.04 with a file in the Trash Bin and it worked perfectly well.
Reference man page rm


Crashplan on headless Ubuntu 14.04 - remote GUI not working

It seems Crashplan 4.3.0 changed headless authentication without updating the headless setup documentation, at least as of early July 2015.  The client running the GUI interface now requires a matching GUID in C:\ProgramData\CrashPlan.ui_info for Windows.

The GUID can be obtained from the server using this command, run as root:

cat /var/lib/crashplan/.ui_info  ; echo

I found the information in this blog post helpful, particularly the last two steps: "Get the headless key from the .ui_info file" and "Update .ui_info on the computer connecting to Synology"

http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/


Copying file from folder 1 to folder 2 in terminal

Spot the difference:

cp /home/rits/Desktop/folder1/name_of_textfile /home/rits/Desktop/folder2/

a space after cp
desktop will be with a D, not a d
after that are 2 arguments: filename and destination
if you want to copy directories you need -R as an option after cp.


zip multiple files with the same name but different extensions

Assuming Bash, this may work for you:

for i in *.eps; do  zip "${i%.*}.zip" "${i%.*}".*; done


Upgraded to Ubuntu 18.04, but I still have old UI

When you were running Ubuntu 16.04 you were on the Unity interface. After upgrading to 18.04 the Unity interface is still there but new interfaces are offered as well. It sounds like you are searching for the Gnome Desktop which you can select from the "gear" next to the Sign In button during login:

You can try all the desktops to see which you like best but keep in mind:

Many have reported problems using the Wayland window manager which was designed to replace X11 but has not lived up to expectations.
When I tested 18.04 upgrade of 16.04 clone some of the options resulted in a purple screen with only a movable mouse cursor.


Startup disk creator will not recognize my iso files, how to I fix this?

For some reason, my drive will NOT recognize blank DVDs (don't as me why), I tested it in Windows and same problem. I will mark this as answer to close the question.


13.04 Python gi._glib no attribute GError

Functions, methods, attributes, etc with an underscore are used as internal methods in Python. These can change or deleted without warning, so it's better to never use these outside that package.

Try the following:

>>> from gi.repository import GObject, GLib
>>> GObject.GError
<class 'gi._glib.GError'>
>>> GLib.GError
<class 'gi._glib.GError'>

This also works on Ubuntu 12.10 and possibly earlier.


lost access to executable file (file not found)

Maybe you had the command in your PATH after the setup, but a setup can not make the change to your PATH permanent.

Edit .bashrc in your home directory and add the following line:

export PATH=~/poky/bitbake/bin:$PATH

This will add that directory to the PATH environment variable permanently.


How do I get the bash debugger to work with ddd?

I was able to get ddd and bashdb to play nice on Ubuntu 12.04 today:

Remove the repo-supplied ddd:

sudo apt-get remove ddd

Fetch ddd v3.3.9 and install from source, e. g.:

sudo apt-get build-dep ddd
sudo apt-get install libmotif-dev
wget http://ftp.gnu.org/gnu/ddd/ddd-3.3.9.tar.gz
tar xvf ddd-3.3.9.tar.gz
cd ddd-3.3.9
./configure
make
sudo make install

Note: I had to make a single patch to the source code to get the build to work -- in ddd/strclass.C, we needed a #include <stdio.h>; at the top to define EOF.
Make sure bashdb is installed:

sudo apt-get install bashdb

Launch with:

ddd --debugger /usr/bin/bashdb -- {script name} {parameters}

Could not live without ddd + Bash.

Optional: gpg verification:

Search for sign on https://www.gnu.org/software/ddd/ will redirect to https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=ddd

Download ddd-keyring.gpg.
Import it into your key chain:

gpg --import ddd-keyring.gpg

Verify the signature:

wget http://ftp.gnu.org/gnu/ddd/ddd-3.3.9.tar.gz.sig
gpg --verify


Set permanent command-line options to upstart

Edit /etc/default/grub and add --default-console=none to the GRUB_CMDLINE_LINUX_DEFAULT line.

So the GRUB_CMDLINE_LINUX_DEFAULT line should look something like this:

GRUB_CMDLINE_LINUX_DEFAULT="... --default-console=none"

Then run the following to regenerate your grub.cfg:

sudo grub-mkconfig -o /boot/grub/grub.cfg

If you need to rollback, for any reason, removing the --default-console=none from /etc/default/grub and then running grub-mkconfig -o /boot/grub/grub.cfg as root should be enough to take you back to how your Grub was before you made the changes.


The SSH connection itself uses resources on Windows (e.g. PUTTY) and Ubuntu. The network connection is both ways, so 15kbps of data transfer uses 15kbps on both client and server.

But if you execute action/commands, it will be run on the Ubuntu server and uses the resources there. If you run a resource intensive program, calculations are run on the server, but anything that displays in the terminal is transmitted to the SSH client.


Why does systemd stop my service but not restart it?

mariadb is set as dependency of My Service so starting it will also launch mariadb if not running.
Consequently stopping mariadb also stop My Service.

But if you only restart mariadb My Service will not be started automatically.
You may like to enable My Service: systemctl enable My\ Service.service
That will configure it to be started after booting up. But if I'm right stopping it shall keep it stopped until reboot or manual restart.


The bad thing about installing other Desktop environments is they install a lot of extra packages and it is sometimes hard to find and remove all of them.

Start by running this command:

sudo apt-get purge abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview alacarte argyll cups-pk-helper epiphany-browser epiphany-browser-data evolution evolution-common evolution-plugins fonts-cantarell fonts-lyx gdm gir1.2-accountsservice-1.0 gir1.2-caribou-1.0 gir1.2-clutter-gst-2.0 gir1.2-evince-3.0 gir1.2-gck-1 gir1.2-gconf-2.0 gir1.2-gcr-3 gir1.2-gdesktopenums-3.0 gir1.2-gkbd-3.0 gir1.2-gnomedesktop-3.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-ibus-1.0 gir1.2-mutter-3.0 gir1.2-networkmanager-1.0 gir1.2-panelapplet-4.0 gir1.2-polkit-1.0 gir1.2-telepathyglib-0.12 gir1.2-telepathylogger-0.2 gir1.2-upowerglib-1.0 gir1.2-xkl-1.0 gjs glchess glines gnect gnibbles gnobots2 gnome-applets gnome-applets-data gnome-color-manager gnome-desktop-data gnome-dictionary gnome-games gnome-games-extra-data gnome-icon-theme-extras gnome-mahjongg gnome-packagekit gnome-packagekit-data gnome-panel gnome-panel-data gnome-search-tool gnome-session-fallback gnome-shell gnome-shell-common gnome-software-manager gnome-sushi gnome-tweak-tool gnome-update-viewer gnotravex gnotski gnumeric gnumeric-common gnumeric-doc gstreamer1.0-alsa gstreamer1.0-plugins-base-apps gstreamer1.0-pulseaudio gstreamer1.0-tools gtali iagno itstool libabiword-2.9 libaudit0 libcaribou-common libcaribou0 libcolamd2.7.1 libcolord-gtk1 libedataserverui-3.0-4 libevolution libgdict-1.0-6 libgdict-common libgdome2-0 libgdome2-cpp-smart0c2a libgjs0c libgoffice-0.8-8 libgoffice-0.8-8-common libgtkmathview0c2a libicc2 libimdi0 libiptcdata0 liblink-grammar4 libloudmouth1-0 libmail-spf-perl libmozjs185-1.0 libmutter0 libnetaddr-ip-perl libots0 libpst4 libtidy-0.99-0 libtracker-extract-0.14-0 libtracker-miner-0.14-0 libtracker-sparql-0.14-0 libwv-1.2-4 libytnef0 lightsoff link-grammar-dictionaries-en mutter mutter-common packagekit packagekit-backend-aptcc packagekit-tools plymouth-theme-ubuntu-gnome-logo plymouth-theme-ubuntu-gnome-text python-cloudfiles python-packagekit quadrapassel re2c simple-scan spamassassin spamc swell-foop tracker tracker-extract tracker-gui tracker-miner-fs tracker-utils ubuntu-gnome-default-settings ubuntu-gnome-desktop xsltproc yelp-tools

It will purge most of the extra packages you installed.

Then run sudo apt-get autoremove to remove extra packages and dependencies no longer needed on your system.

You might (or might not, depending on if gdm was removed already) need to use these commands to change your login screen back to Unity's default (which is lightDM)  run

sudo dpkg-reconfigure gdm

Hit enter at the prompt and then select lightdm from the options.
After that you can purge gdm with

sudo apt-get purge gdm

Finally run:

sudo apt-get install --reinstall ubuntu-desktop

In case the removal of gnome grabbed any bits of the main desktop.


Fix grub with dual boot on different drives

So then I would like to direct your attention to this post: repair-grub

It is a very popular question (not the same problem as you, but...) where somebody answers in detail how to repair a destroyed GRUB installation. He therefore updates the config files and rewrites GRUB into the disc's bootsector. Maybe this is something you should try too, though it looks like you have to spend a nice amount of time for it and net a live-cd.

Let me know if this finally helped you, it is my last idea for the moment. Greetings and good luck!


How can I change the OS name from Ubuntu to something else?

You really should not change the content of the /etc/lsb-release file.

As you have seen yourself, you will experience problems in applications like Software Center, as these programs need the correct release description. If you simply change this bit of information, the programs are unable to find the proper software repositories, because they are looking for something, which does not exist.

Reedit the file to the old values and Software Center will work again.


Don't worry about sda5, it is an extended partition. The FAT table has only space for 4 entries, if you want more than 4 partitions, you create an extended partition (sda4) in your case. Such an extended partition has its own partition table in turn. Partition sda5 and sda6 are located inside sda4. Think of it as a container keeping partions.

Partition sda1, 2 and 3 are called primary partitions, they directly use a 'FAT-slot'.

Remounting sda5 shouldn´t take very long; the timestamp to the next line is probably subsecond, but you cut those from your sniplet. The timestamps only reliably show the start of a certain action.

Check this thread to further analyse what takes the most time during boot.


run the following code:

sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude full-upgrade


extend /home partion with available unallocated

Before doing anything, BACKUP FIRST!

Boot to a Ubuntu Live DVD/USB flash, and start gparted.

In gparted, you can create/delete/move/resize partitions. (There is no such thing as merge). In your case, move is done by dragging whole partitions (or changing numerical values), and resize is done by dragging the partitions right-edge handle (or changing numerical values). Never resize NTFS partitions using gparted... always use Windows own Disk Management application.

To proceed, do the following (do these commands one at a time by clicking the apply checkmark after each command, don't stack commands):

1. move sda6 all the way left
2. move sda7 all the way left
3. move sda9 all the way left
4. move sda10 all the way left
5. resize sda10 maximum to the right

Once done, in terminal, type sudo fdisk -l (lower case L), or sudo gdisk -l /dev/sda (lower case L), and make sure that you don't have any partition alignment problems.

Questions? Problems? Let us know how you do. Cheers, Al


Ubuntu 18.04 showing laptop-NOTEBOOK in network

Try to remove nautilus-share:

sudo apt purge nautilus-share

and disable Sharing in Ubuntu System Settings.

Additionally read Nautilus-share, fixing or removing? and The default File Sharing and Media Sharing experience in 18.04.


2.1 Bass Configurations for Ubuntu 12.04?

Use 2 (or 2.0)

Your S-220 system (see datasheet, page 2) has a standard stereo two-channel/2.0 3.5 mm input, and bass adjustments are done via a knob at the back of the subwoofer, NOT from software.

This is unlike higher-end 5.1 systems which have a separate audio input for the subwoofer.


Cannot upgrade pip in Ubuntu VM on OS X Sierra

You should run the pip command using sudo:

sudo pip install --upgrade pip

However I suggest you to install python packages using --user switch it's more safe in my opinion.

pip install --upgrade pip --user

After updating you can remove old version installed by apt:

sudo apt remove python-pip

or if it's for python3:

sudo apt remove python3-pip

At the end use --version to check pip version:

pip --version


Getting an error wrong fs type, bad option, bad superblock on UbuntuShared

Apparently there is a bad symlink. I had the exact same problem and this fixed it. Good luck.

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

Found solution here: https://forums.virtualbox.org/viewtopic.php?f=3&t=60921


Where are the Ubuntu and Ubuntu One servers located?

Ubuntu One uses Amazon, so the data could be in any one of six locations around the world https://wiki.ubuntu.com/UbuntuOne/TechnicalDetails


"Errors were found while checking the disk drive for /." while booting

Hmm.. That's not good..

Generally, the error that you have stated here indicates that there is some sort of problem with the hard drive or partition that is indicated in the message - in your case, this is stating that "/" is the problem, which is the root of your filesystem (where 'Linux is installed').

What happens when you press 'F' to attempt to fix?  Are you able to push past and get Ubuntu to boot up?

You may also want to try manually scanning the hard drive for errors... One way to do this would be to put the Ubuntu Live CD (installation CD) in and boot from it.  You could then use Disk Utility to browse for the drive/partition in question and scan it for errors via 'Check Filesystem' (this article shows a screenshot of what I am describing: http://www.howtogeek.com/howto/37659/the-beginners-guide-to-linux-disk-utilities/)


There are many shortcuts to choose to switch between keyboard layouts, but none fits with what you want.

Anyway, it can be done using a bash scripts and two custom shortcuts.

First, create the script, let's call it change_layouts:

#!/bin/bash
#script to switch between two keyboard layouts

if [ $# -ne 2 ];then
    echo "Usage: `basename $0` first_layout second_layout"
    echo "   ex: change_layouts us ru"
    exit
fi

first_layout=$1
second_layout=$2

if [ -z "$(ls -l /usr/share/X11/xkb/symbols | grep ^- | awk '{print $9}' | grep $first_layout)" ]; then
    echo "Error: Doesn't exists ant keyboard layout called '$first_layout'."
    exit
fi

if [ -z "$(ls -l /usr/share/X11/xkb/symbols | grep ^- | awk '{print $9}' | grep $second_layout)" ]; then
    echo "Error: Doesn't exists ant keyboard layout called '$second_layout'."
    exit
fi

if [ "$first_layout" = "$second_layout" ]; then
    echo "Error: The arguments (keyboard layouts) must to be different."
    exit
fi

current_layout=$(gsettings get org.gnome.libgnomekbd.keyboard layouts)

if [ "$current_layout" = "['$first_layout', '$second_layout']" ]; then
    gsettings set org.gnome.libgnomekbd.keyboard layouts "['$second_layout', '$first_layout']"
else
    gsettings set org.gnome.libgnomekbd.keyboard layouts "['$first_layout', '$second_layout']"
fi

Save the script in your ~/bin directory and don't forget to make it executable:

chmod +x ~/bin/change_layouts

Now you can test the script in terminal. Run it more times to see how it works.

Second, add your custom shortcuts. Go to System Setting → Keyboard → Shortcuts → Custom Shortcuts and follow the instructions from the below image:


There is no package named videos, I think you're talking about the default video player with 18.04. It's not a good player compared to other players on the market.

I'd suggest you try VLC which is far superior and would run almost any video format you throw at it, without any configuration needed.

Try

sudo apt install vlc --install-recommends


How can I automate a root command after (not during) startup?

One workaround would be to use rc.local with a sleep command. Put the following into /etc/rc.local:

(sleep 60; dhclient) &

This will make the command wait for 60 seconds before being executed, which should allow enough time for your machine to finish booting.


Wifi networks is greyed out along with active connections and known connections

Determine if the device is being recognised

First you need to determine whether the OS can even see the wifi adapter. If you can't find it using either the PCI(e) method or the USB method (depending which it is) then I think your problem is more likely hardware related. Devices will show up in lsusb and lspci even if there are no drivers installed for them.

A helpful read, which probably explains this better than me in the Ubuntu Help here: https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported

PCI(e)

If your wireless adapter is built into the motherboard or it's a PCI(e) card, use lspci in a terminal to list all the PCI devices detected by the system. Does it show up? (look for key words like 'Wireless Controller'

For example, for me, I have this appear in my list.

3b:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

USB

If it's a USB wireless adapter, instead use lsusb -v | grep -E '\<(Bus|iProduct|bDeviceClass|bDeviceProtocol)' 2>/dev/null and search the list again looking for similar clues. I don't have a USB wireless adapter on hand but this is an example of my bluetooth adapter from the list.

Bus 001 Device 002: ID 0cf3:e300 Atheros Communications, Inc.
  bDeviceClass          224 Wireless
  bDeviceProtocol         1 Bluetooth
  iProduct                0

Install drivers

If the device is recognised, then we really need to know the vendor/manufacturer and model to assist further. However you can also try checking its compatibility with Ubuntu if it is in the table in the above link, or see if it's one of the adapters listed here on the Arch wiki under the Troubleshooting section. That has info on how to get various troublesome adapters working.

Hopefully that gets you pointed in the right direction!

Missing/Broken Hardware

From the output of the wireless script you posted, I can't see a wireless card anywhere in there so it's most likely either the card has died or malfunctioned or it's not plugged in correctly. Try unplugging/replugging it back in again and see if that makes a difference. If not I think you're going to need a new wireless card.


keystoneclient.middleware.auth_token [-] Configuring auth_uri to point to the public identity endpoint is required

That is just a warning. I think I saw that one on my setup and Savanna worked just fine. Try to run some queries agains the Savanna, see if they work.


Ubuntu and ASUS G750JM, GTX860M / Nvidia problems

This answer works but it causes my trackpad to lock up the computer every once in a while.  It's a bug I believe ubuntu is working on.

From the terminal run to install the driver:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-340 nvidia-settings

Then create a new configuration file by running (a new configuration file before reboot is CRUCIAL (you may get a warning but as long as a new configuration file is created you are okay to proceed to step 5):

sudo nvidia-xconfig

Reboot
Download Bumblebee by running:

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

Reboot
I suggest removing the ppa by typing (this is optional):

sudo add-apt-repository --remove ppa:xorg-edgers/ppa


How to log out from a session using the command line?

You can logout by typing gnome-session-quit.

There are other options as explained at this link: How can you logout from the terminal.


How to run Android Applications in Eclipse?

This looks like a permissions problem!
just cd into your sdk folder

cd /home/rahul/android-sdks/android-sdk-linux

now  change the permissions of the required folders

sudo chown -R YOUR_USERNAME:YOUR_USERNAME platform-tools/  tools/ platforms/  platform-tools/adb

now try running your android virtual machine!


Install applications on a mechanical disk other than the SSD?

You use the file /etc/fstab to decide which elements of your filesystem get stored on which storage hardware. In other words, you only get to choose which directories get stored on which disk.

Since many applications install files in multiple locations across your filesystem, you generally don't get to decide on an application-by-application basis. There are a few exceptions to this, like AppImages and Flatpacks.

For most folks it's simplest to migrate your /home directory to the HDD. It's often the biggest space-consumer anyway. For example, of the 26G used on my 30G SSD, 23% is my /home.


Ubuntu randomly shows shutdown dialogue and then dies

This could likely be a battery problem. If your battery is faulty, the laptop may crash even if plugged into the mains. You can check the battery by booting into Windows - there is a tool for that.

Alternatively, try the following: Remove the battery from the laptop and run Ubuntu just plugged into the mains. If the computer no longer crashes then voila.

I had this issue a while ago and this fixed it for me. Not sure exactly how this works, but I believe the shutdown dialogue would be triggered by the battery being seemingly empty / lack of power coming through and subsequently the machine will just turn itself off.


How to run a shell script when a new USB storage device is detected?

Use Udev. Udev is a device manager daemon. Amongst other things it is responsible for naming your devices. You can define udev-rules by putting files with a certain syntax in the rules directory. The rules can do many things - in particular they can run scripts, when a certain device is connected.
How to solve your problem:
First you need to gather information on your device. Let's say you connected it, and know it goes under the name /dev/sdb1. If so run:
udevadm info -a -p $(udevadm info -q path -n /dev/sdb1)

The command will output information about your device. It's a rather lengthy. You need to find something that identifies the device uniquely. That could be a serial like ATTRS{serial}=="UA04FLGC" or a combination of other attributes such as ATTRS{idVendor} and ATTRS{idProduct}. Most of the names are more or less self explanatory. Pick one or a combination of a few that seem reasonable - if they don't work, try something else.
Once you have found a unique identifier create a file in /etc/udev/rules.d that starts with two digits and ends with .rules. The two digits specify the order of processing these .rules-files - 70-usb-log-custom.rules should be a fine choice for you. The syntax of this rule file can be very complex. If you're interested, google udev. If not just open the newly created file and edit it to look something like this:
# /etc/udev/rules.d/70-usb-log-custom.rules

KERNEL=="sd?1", ATTRS{serial}=="UA04FLGC", ACTION=="add", SYMLINK+="cusb1", RUN+="/home/confus/bin/usb-encrypt.sh add %k"
ENV{ID_FS_USAGE}=="crypto", ACTION=="remove", RUN+="/home/confus/bin/usb-encrypt.sh remove %k"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c9f", GROUP="users", MODE="0666"

This is an actual udev file I am using. It has three rules in it. Every line is a rule of it's own. The first line runs a script to create a decrypted device whenever an encrypted disk is connected. The second line invokes the same script with different options in the event the decrypted device is removed. The third line sets permissions for another related device.
Most likely you will only need the first line. Delete the rest and insert the right serial (or compination of parameters you picked to identify your device).
Explanation of my file:
KERNEL=="sd?1" says the device we're looking for in this rule is named along the lines of /dev/sda1, /dev/sdc1 or something like that. The questionmark is a wildcard for any letter. ATTRS{serial}=="UA04FLGC" is the unique identifier here. For the other device I was talking about (third line) I'm not using the serial number but a combination of SYSFS{idVendor}=="1781" and SYSFS{idProduct}=="0c9f" to identify it.
ACTION=="add" tells the rule it should only act when the device is added; not when it's removed.
SYMLINK+="cusb1" creates a symlink to the disk so one will find it under /dev/cusb1.
RUN+="/home/confus/bin/usb-encrypt.sh add %k" runs the script and passes 'add' and '%k' (the device name) to it.
I will not give more detail, as there are excellent tutorials on udev rules. What you read here should be enough to get stared though.


Why are you using /usr/lib/systemd/hello.conf.d/hello.conf instead of /etc/systemd/journald.conf ??

You can alternatively use /lib/systemd/journald.conf.d/*.conf but not what you used.

Look at journald.conf man page

Note: Ubuntu 15.04 use /lib and not /usr/lib for systemd


converting lots of TIFF images into a lossless video

According to the ffmpeg documentation, the H.264 codec has a lossless mode using -crf 0.
You aren't certain about the framerate so I can't offer any advice there, but you should try ffmpeg -i *.tiff -crf 0 OUT.mp4 first, then compare the size of all the images to the size of the final video. If roughly the same, that's probably good enough.
If you truly need absolute lossless output, you might be better off running a CLI script to display a (very rapid) slideshow of the images, though your hardware may not support it for large images and it is more of a wild guess than a practical solution.


What you want is basically a reverse proxy, receiving conncetions from the world, and forwarding them to internal servers based on name. This can be achieved using Apache, nginx, varnish and a multitude of other servers.

I'd suggest sticking with nginx or Apache. They're easy to set up and efficient.

This article discusses proxying with nginx. As you can see, it has a fairly simple syntax. What you'd have to do is basically set up a vhost in nginx for every subdomain, and proxy all of it to the new location.

The browser visiting your page will only communicate with the proxy. The proxy will forward all requests to the internal server handling that subdomain.


I lost windows 7 after installing grub-customizer

You could try this way Dual boot: how to target the new grub but you may need to Reinstall GRUB instead of Restore MBR.


If you want to have a git in chroot (there is no good reason to do that once you will not allow shell access), you need to include the executable in the chroot. Just copy the one from the system (including all the dynamically linked libraries).


Blacklist the usb_storage module by adding blacklist usb_storage to /etc/modprobe.d/blacklist.conf.

To load the module manually, run sudo modprobe usb_storage.


First you have to check, if the package e2fsprogs is installed, because fsck.ext2 is part of this package.

Check the installation with:

apt-cache policy e2fsprogs

and, if necessary, install with:

sudo apt-get install e2fsprogs


auto mount cryptmount/encrypted loop device

It should be possible to use dm-crypt/LUKS/cryptsetup for this using the following steps:

Create a sparse disk image file: dd if=/dev/zero of=IMAGEFILE bs=1 count=1 seek=SIZE
Generate a random key in a file: dd if=/dev/random of=KEYFILE bs=1024 count=1
Use cryptsetup luksFormat --key-file KEYFILE --cipher aes-xts-plain --size 512 IMAGEFILE (Or use another cipher and key length. Note that 512 here will give you AES with 256 bits because of XTS.)
Open crypt container: cryptsetup luksOpen --key-file KEYFILE IMAGEFILE NAME
Create file system on /dev/mapper/NAME.
Mount file system as usual.

Your script would just have to do steps 4 and 6. For unmounting/closing, umount the file system and call cryptsetup luksClose NAME.

Note that using sparse files will leak the information which sectors of the disk have been used already (the same way as not overwriting a partition with random data before encrypting it). It is up to you to decide whether this is ok for you.

Also note that deleting files will not make the disk image smaller. The sparse file will grow monotonically.


Upgrade Kernel to 3.8.0-35-generic fails to boot. Missing initrd.img-3.8.0-29-generic

Boot an older kernel, then executed the following commands:

sudo apt-get purge linux-headers-3.8.0-35 linux-headers-3.8.0-35-generic linux-image-3.8.0-35-generic
sudo apt-get install linux-headers-3.8.0-35 linux-headers-3.8.0-35-generic linux-image-3.8.0-35-generic


Since watch [options] command executes command using sh -c by default, you can use it run snippets of shell code directly provided that:

you get the quoting right

and

your code is sh-compatible i.e. doesn't use any bash/zsh/csh-"isms"

So for example

$ watch -n 36 'if whois abcxyz.com | grep -q "string"; then
  echo "Message line 1" | ts
  echo "Message line 2" | ts
fi'


How to boot to efi USB stick from Grub command line

Boot ISO File on USB from grub

You can boot an ISO on USB by using your desktop grub to loop mount it.
Add the following menuentry, (or similar), to /etc/grub.d/40_custom:

menuentry "Ubuntu-18.04.1-desktop-amd64.iso" {
    set root=(hdx,1)
        loopback loop /Ubuntu-18.04.1-desktop-amd64.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/Ubuntu-18.04.1-desktop-amd64.iso splash --
        initrd (loop)/casper/initrd.lz
    }

Were x is the USB drive number.

Then in Terminal run:

sudo update-grub

You can add a ext4 persistent partition labeled casper-rw if you want persistence, then add a space and the word "persistent" to grub.cfg after "splash --"

Boot Full Install USB from Desktop grub

You can also boot a Full install USB using your desktop's grub.

Copy your preferred menuentry from your USB's grub.cfg to /etc/grub.d/40_custom on your internal drive.

Then in Terminal run:

sudo update-grub


Well - your issue isn't really that much descriptive, but anyway for proper time handling I'd recommend, first of all, two things:

proper time zone settings
using ntp to make sure local time doesn't go off - hardware clock (also the time presented by supervisor to guest systems with it) can drift over time.

Anyway - if that doesn't help yet with your issue, can you, please, present us examples of what was the time before and after - what and how much actually changed?

thanks


Switching language with keyboard shortcut in GNOME is ineffective

One possible cause could be an existing bug in Ubuntu, that's been around for a couple of years already: If you press the keyboard shortcut to change a keyboard layout, it will actually change the layout, but not the indication in the panel. For example, you were using Russian in one window, and are now using English in another window. Then you change focus back to the first window. In that case, the keyboard input will automatically switch back to Russian, but the panel indicator will keep showing EN. Further more, if you use the keyboard shortcut to change the input, it will switch back to English, but the indicator will switch to RU.


16.04: editing /etc/sudoers to allow NetMan restart w/o password

This rule should be sufficient to achieve passwordless restart of network manager. However:

Do you run command exactly as you wrote it in sudoers file? For
example you can not omit .service part unless your sudo rule looks
like this:

%sudo   ALL=(ALL) NOPASSWD: /bin/systemctl restart network-manager*

Does sudo --list command output includes your command?
Try to put your rule on a last line of sudoers file.
Is target user in sudo group?

groups $(whoami)


Is it a good idea to selectively upgrade software from newer releases?

Mixing packages from different releases is usually not possible (only in some special cases).

Usually there are a lot of bug fixes during the first few weeks after release so if stability is important for you just wait a few weeks before upgrading. As shintoist already wrote, you don't have to use Unity with Natty.

It's always a good idea to try it on a live system before you upgrade to ensure that your hardware supports the new system - for me a live system on an USB key worked without any problem, in contrast to the author of the article you linked.


Too much space occupied by several filesystems

These special filesystems are RAM mounted, so the 3.9 GB space shown is  the available RAM space.


Windows XP uses a different boot loader than grub. This is why grub must 'chainload' the Windows XP bootloader when you select it. Because of this the options for that bootloader are inaccessable to grub. If you want to get creative however, you could try to find a way to modify/replace the boot.ini from the grub environment so that when you do select Windows, it will look at the modified options in boot.ini and go into safemode instead.


Where are Ubuntu 18 network shares configured?

** "Local Network Share" is the gnome implementation ( nautilus-share ) of a Samba Usershare. Its intent was to allow an ordinary user the ability to share a directory he owned.

** A Samba Usershare and for want of a better name a Samba Classic Share both create Samba share definitions but as indicated above those definitions reside in different files. Usershare: /var/lib/samba/usershares vs ClassicShare: /etc/samba/smb.conf.

** Samba will read both and that can be a problem if both are used to define the share of the same directory because they might be defined differently as is the case here. Your guess is as good as mine which one Samba will obey.

** You cannot in this case reproduce through Nautilus the share definition you have in smb.conf because nautilus-share does not have that option: There is no "valid users" option in nautilus-share - it's either guest access or anyone with samba credentials. You cannot specify a list of users or groups.

** A Samba Classic Share offers many other options not available to Usershares so it depends on how complex your requirements are for these shares.


In the Ubuntu 16.04 and later default repositories JavaFX is packaged as a separate package named openjfx. To install it in Ubuntu 18.04, open the terminal and type:

sudo apt install openjdk-8-jdk openjfx

Check that JDK 8 is selected as the default Java version in Netbeans -> Tools -> Options -> Java -> Nashorn tab -> click the Manage Platforms button -> click the Add Platform button -> click the radio button marked Java Standard Edition -> click the Next button -> browse to /usr/lib/jvm/java-8-openjdk-amd64 and select it as the default Java version.

Optionally you can install openjdk-11-jdk instead of or alongside openjdk-8-jdk. openjfx works with both openjdk-8-jdk and openjdk-11-jdk in Netbeans in Ubuntu 18.04. I am using Netbeans 8.2 10.0 in Ubuntu 18.04.


Is there a better way to run ubuntu from usb disk

I had to do this a while back when my netbook's hard drive crashed. I used to USB drives. One USB drive I used to boot into Ubuntu's live 'CD' trial environment. In that session, I formatted the other flash drive (EXT4) and installed Ubuntu to it using the standard installer. There are other ways, but that's what I did. GRUB was installed to flash drive and kernel updates were fine.


Is there a way to keep current window active when opening a new program?

It may not be exactly what you are looking for, but if you keep the window in front of all other windows, it will keep focus.

So, right click the title bar and check Always on Top.


How do I browse pictures and files on an android phone via USB?

You don't need to install any drivers for USB drives on newer versions of ubuntu, it's like inserting a USB storage drive.

I didn't use a L.G android phone, but this should work on all android phones. Don't know if L.G has tweaked these settings.

This is how I do it on my moto droid.
After you connect your droid via USB go to Settings->USB connection and choose mass storage (MSC).

Run "lsusb" in a terminal and check if your phone is already identified, but drive is not mounted.


Can Ubuntu 16.04 dual boot access the GPU on a Windows machine?

Yes. When Ubuntu is installed to the hardware (as in a Dual boot situation) it has access to all the attached devices as any other OS would. So long as the devices are compatible (eg. functional drivers exist) Ubuntu should be able to access all resources (as indicated by Charles Green's comment).

When you install an OS in a Virtual Machine, it is provided virtual hardware by the virtualization software*. Depending on the virtualization software you are using, certain hardware may or may not be supported.

*Note: This is the general idea behind virtualization, however there are various optimizations (eg. PCI and VGA passthrough modules) that allow more direct access to the physical hardware. Thus this general statement is not accurate in all situations.


After restore ubuntu image hangs on black pointer

ZENworks is not made for imaging of Ubuntu systems.
Novell only supports imaging of Enterprise OS's like SLES and RHEL.


Packaging: /usr/lib vs. /usr/lib/*-linux-gnu

In Debian and Ubuntu, and indeed the FHS, /usr/lib and variants are "owned" by the vendor. In this case, that means your distribution. You should not be placing files there yourself at all. Of course you can do as you like, but tooling (such as dpkg) will just overwrite files you place there without prompting, because the system by design considers these spaces for distribution packages only. Your system is yours to break as you wish, but you also get to keep the pieces :-)

The space reserved for the system owner/administrator to place extra system-wide libraries is /usr/local/lib. This is in the FHS, so should be available and configured across all standards-respecting distributions. Upstream software should have make install place libraries there by default.

  ...is there a functional or philosophical difference between placing a library in /usr/lib versus placing a library in /usr/lib/{x86_64,i386}-linux-gnu?

Distribution packages that use /usr/lib can't have different architectures installed at once (such as i386 vs. amd64), which as others have pointed out is useful for desktops running both 32-bit and 64-bit software, and for developers running code built for other architectures by emulation. This is the sole reason for the multiarch subdirectories.

The same applies to libraries you install yourself. Whether you do that in /usr/lib or /usr/local/lib, you won't be able to have multiple architectures supported concurrently. You can always add multiarch paths like /usr/local/lib/{x86_64,i386}-linux-gnu to /etc/ld.so.conf.d/ to enable that of course.


After removing a file with special characters in filename it is still listed

What you can do it remove it based on it's inode number. An inode is an index number that's used by the file system instead of the filename to lookup file information (permissions etc). In a terminal, in the directory of the problematic file, run ls -i that'll give you something similar to the following:

$ ls -i
7995865 a  7995866 b  7995867 c

Then to remove it you can use find, and rm

$ find . -inum 7995866 -exec rm -f {} \;
$ ls -i
7995865 a  7995867 c


How to pass confirmation to a command line?

You can, but be warned that the prompt is there to protect you - do not bypass it lightly.

From man apt-get:

   -y, --yes, --assume-yes
       Automatic yes to prompts; assume "yes" as answer to all prompts and
       run non-interactively. If an undesirable situation, such as
       changing a held package, trying to install a unauthenticated
       package or removing an essential package occurs then apt-get will
       abort. Configuration Item: APT::Get::Assume-Yes.


How can I set LibreOffice to use ISO 8601 date format?

Right click the date field, select Edit Fields and then choose the format you require from the drop down list.

It works the same way across the LO range so clicking on a cell in LO Calc and following the same routine (format cell) will produce the same result.


I'm having trouble running a python script and then continuing with my bash script

You need to let the first command run in the background and start the second one after the first has been initiated. I'm sure there is a more elegant way (of sorts) but this should do the trick.

python ~/Downloads/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 &
ssh -l root -p 2222 127.0.0.1

The ampersand at the end tells bash to run the python command in the background.

In the event you need to run the script a second time you might need to find the running python command and kill it, before you can run it a second time. Else it will complain that the port is already blocked.


Having attempted to package jboss myself, I'm pretty sure I know why there isn't a good package for it.

Business requirements.  It's an "enterprise-ish" RedHat product.  Ubuntu is a Debian-esque distribution.  So, not many people use it on Ubuntu or Debian, because most people who want the "enterprise" bit of it also want the enterprise support, and figure it's better to just go RedHat all the way.
Stricter requirements.  Have you taken a look at the tomcat package?  It's a mess.  All over the place.  The Tomcat tarball distribution (and the RedHat package, for that matter) place everything in /usr/share, last I checked, which was a couple years ago.  The Debian/Ubuntu packages, in contrast, have the variable data in /var/lib/tomcat* (CATALINA_HOME), the static java libraries in /usr/share/tomcat* (TOMCAT_HOME), the JNI's in /usr/lib/tomcat*, and use symlinks to tie it all together.  This is because the Debian package is designed to have a single tomcat installation be able to serve multiple running tomcat instances, and because the packaging requirements are much more strict for Debian/Ubuntu and actually insist that configuration is in /etc, variable data is in /var, and so on.  RedHat has no such requirements, and the JBoss distribution rather lumps it all together in a way that is difficult to parcel out.
Perfectionism in the face of poor/nonexistent documentation.  If you look at the Debian/Ubuntu packages for libjboss-*, you'll see that all the libraries are separate packages.  This is because they're not actually a single product, but a collection of them, that just happen to work together.  In the standard JBoss tarball, you have "default" and "all" (and "minimal", I think...) that are a few "example" combinations...but many combinations are actually possible.  I'm certain the packager knows this, and is trying to make a way to only install those libraries you need in the system JBoss installation, as is good practice (but hardly ever followed, in the case of JBoss, where nearly everyone just uses the "all" example).
Difficulty of integration.  There are no service start scripts that are anywhere near the level of sophistication that is normal in Ubuntu.  The server process itself just spits to stdout, even.  You'd need to find ways of redirecting to log files, in a rotate-able manner, set up the cron/logwatch to deal with it, write the init script, etc.  This is not trivial, especially considering that JBoss is a collection of "whatever" libraries the user decides to use, and is not designed with system installations in mind -- it's clearly a "run this out of your home directory" type of setup, out of the box.
Lack of need.  The tarball, placed in /opt, perhaps with checkinstall, does the job for anyone who actually does large-scale deployments.  If you're doing large-scale deployments, you typically have your own package repository anyway, so one more isn't much of an issue.  There just isn't enough need to make a good package for it.

That said, I've been working on making on such a package.  I've been "working on it" for two years, though I actually need it now.  Hopefully, there will be a PPA for it soon.  :-)  If you have done .deb packaging before, and know JBoss internals, perhaps we can collaborate.


Ubuntu 18.04 goes into Grub Rescue after update

My problem has been resolved.  I loaded a live USB session of Ubuntu 18.04 and installed the Boot Repair.

https://help.ubuntu.com/community/Boot-Repair

Using the Recommended repair option reinstalled grub with the shim.


LibreOffice (or OpenOffice).

There is an option "export to PDF" in the panel of Libreoffice:


No sound in Ubuntu 18.04 LTS after upgrade from 16.04 LTS

I had a similiar issue that turned out to be a permissions problem with the pulse audio conf file, when I upgraded my Lenovo T440pclaptop to 17.10 last year.
The fix that finally worked for me (sorry, I cant find the original source for reference) was

killall pulseaudio; rm -r ~/.config/pulse/*

hth


How to create Photoshop.exe desktop shortcut using Wine?

Aliases don't work in desktop files (or in scripts in general, unless enabled in the script). You should expand it out:

env WINEPREFIX='/home/username/.wine32' wine "C:\\Program Files\\Adobe\\Adobe Photoshop CC 2014 (32 Bit)\\Photoshop.exe"

(And perhaps add WINEARCH=win32 to the environment.)

In the long run, it's simpler not to use shell-specific features in desktop files. If you feel the need for one, create a script and give the path to the script in the Exec line.


find .sql and .sql.gz files using find command

find offers an "or" (-o) operator:

find $Path_Backup_Dir -type f -mtime $Time \( -name \*sql.gz -o -name \*.sql \)

The default operator between expressions is "and" (-a).  Since "and" has higher priority than "or", we need to use parens to group the two "-name" expressions together to get the right logic.  Because shells typically treat parens specially, I have escaped them with a backslash to protect them.

Alternatively, you can use a regular expression:

find $Path_Backup_Dir -type f -mtime $Time -regex '.*\.(sql|sql.gz)'

You should also note that your find/read command pipeline won't respond well to files with special names (leading space trailing spaces, newlines, etc.).  See, for example, this wiki for ways to hand that issue.


cmake generators build for windows platform

Unfortunately, the Windows (Visual Studio) generators are only available on Windows CMake builds.

There's some evidence to this limitation in CMake's source code, see  CreateDefaultGlobalGenerator for example.

If you really have to generate Windows projects on Ubuntu, you could use Windows CMake build on a Windows emulator like wine.


Apparently I was missing some important packages. I found the solution in this website:

http://sixarm.com/about/error-unable-to-locate-tools-jar.html


How do I reset network devices in Ubuntu 14.04

You could try this enter settings, and then network, and then delete and turn of network, and then turn it on again and reboot, and if it dos not self set up a new network create one, and it might work, and remember to write down the ip, based and the mac adr, and the code for the security. (Wpa).


When you open a new terminal window the system starts a new instance of your shell. In your case that is bash (Bourne Again SHell)

When bash starts it reads a bunch of startup scripts which configure various things like your prompt, colors, etc. One of these scripts is file .bashrc in you home directory. For more info on that check What is a .bashrc file and what does it do?

More info on bash scripting: https://help.ubuntu.com/community/Beginners/BashScripting

In your case that file has been edited and now is not a valid bash script. Therefore the error message line 119: syntax error near unexpected token...

That is why steeldriver asked you to post the content of that file so we could see what is wrong with it.

That file is optional. If you want you could rename it to something else - .bashrc.old for example and open a new window. The error messages will be gone but prompts, colous and other shell customisations will be gone too.


Firefox not displaying LaTex (via MathJax)

For Firefox: install the Greasemonkey extension, then install the userscript: display-latex2.user.js, which is an adaptation of the original userscript display-latex.user.js.

Also take a look at A Greasemonkey user script to display LaTeX on Web pages


nvidia 840m driver problem with kubuntu 14.10

Xorg-edgers not always guarantee what you expect. You might have to remove it. Do the following:

sudo add-apt-repository remove ppa:xorg-edgers/ppa

or with ppa-purge (it has to be installed)

sudo ppa-purge ppa:xorg-edgers/ppa

if you can't get to desktop or tty terminal see the link below how to drop to root shell.

And after that other solution is Bumblebee:

sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

more detailed on Bumblebee here

or use manual installation guide with detailed explanation:

How to install nvidia driver manually

How to drop to root shell


How can I apply the Darcula terminal theme?

The theme you got is for the iOS terminal.

You could try to mimic it, though, going to Terminal > Preferences > Profiles > Edit and choose the colors manually to look like the Dracula one.

Or you can use this website Terminal.sexy:

To help you select the colors, and either download an import or manually set your colour palette.

More about it and how: Load theme files in Gnome Terminal on Ubuntu 15.04


Intel Joule Ubuntu Desktop install fails at GRUB

My bad, I hadn't updated my BIOS in a while...Tuchuck image installed fine now and just going through secondary setup after booting immediately.


Slow performance on good hardware? 12.04

This recipe often helps for me:

press Shift+Escape (opens the task manager)
see if the "GPU process" pops up high on the list
if so get the gpu process id
open a terminal window
execute kill -9 gpu_process_id

This seems to always remove the sluggishness and jank I get after keeping my desktop chrome open for weeks with hundreds of tabs, without having to restart.

Apparently the opengcl library has resource handle leaks which cause this problem, according to a friend. When you kill the GPU process you recover those resources, but without having to restart chrome.


Can I change the text that's added to the file name when I make a link to it?

If you hold the shift and control button while dragging your file to a new location you will get a link. (You'll see a little chain symbol) Basically if you drag to a different folder then it creates a link with the exact same name as the original file, but if you create a link in the same directory then it appends 'Link to' in front of the file name. I don't think you can change that behaviour, but dragging into a different location solves your issue.


lenovo IdeaPad-3-14ARE05 Touchpad not working. Ubuntu 20.04

If you use kernel 5.8 or newer your can try:

Open terminal
Login with root (on debian  su -l, on Ubuntu sudo su)
Edit file /etc/default/grub
Replace line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with GRUB_CMDLINE_LINUX_DEFAULT="pci=nocrs quiet splash"
Save file /etc/default/grub
Execute update-grub
Reboot

This has been tested on Debian bullseye and Ubuntu Focal on Ideapad 3 15iil30.
With bullseye on an ideapad 3, everything is functional, mouse, touchpad, video, sound, webcam, bluetouth, etc.


Check if you have enough free space in /boot. In my case I got rid of exactly the same error message by purging old kernel images via Synaptic Package Manager.


Touchscreen on Lenovo Yoga 520 and Gnome

Similar issue here. Active stylus, single touch is working, but multitouch gestures aren't.

Specs:

Software:

Ubuntu 18.10, Gnome 3.30.1

Hardware:

Slate: Lenovo Miix 520 12IKB

Touchscreen: Wacom HID 513B (pen & touch)

Update:

I've solved the issue by disabling Wacom built-in gestures:

$ xsetwacom set "Wacom HID 513B Finger touch" Gesture off

Replace device name in "" with your own.

You can find it in:

$ xsetwacom --list devices

Pick the one with type: TOUCH.

Let me know if it helps!


How to uninstall Chrome OS and install Ubuntu?

Well i researched for a few hours and i decided to sell it, gonna lose some money but i don't want this headache of a pc, if you can even call it a pc with google running on it. My mistake... gonna buy a normal pc with BIOS...


Is there any way to install the WUSB6300 Drivers to a USB?

If you have DKMS then you can build and install the driver, otherwise there is no driver for this dongle for Ubuntu. dkms is needed or you cant install the driver:
See answer on this article: How do I get the linksys WUSB6300 wireless adapter to work on linux
Here is a newer driver if the one listed does not work: https://github.com/gordboy/rtl8812au-5.6.4.2


After installation, Netbeans 10.0 won't run from Ubuntu 18.04 desktop

It seems that the value of Exec in the desktop entry a.k.a. the "shortcut" contains an error. According to Desktop Entry Specification:

  The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. The name or path of the executable program may not contain the equal sign ("=").

Also, UBUNTU_MENUPROXY looks like a user-defined variable which doesn't work in Desktop Entries. So, better remove that and provide the absolute path of NetBeans, i.e.,

Exec=env /opt/netbeans/bin/netbeans #You can also omit "env"


Ubuntu server 12.0.4 x86 not detecting network adapter on virtualbox 4.3

Ok, after some googling I found this is as a bug in Ubuntu 12.0.4 (bug: #145382 broken 70-persistent-net.rules)

The fix is:

look into your settings what is your NIC MAC address and remember it > $MAC
nano /etc/udev/rules.d/70-persistent-net.rules
Look up for:

  SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="$MAC",
  NAME="eth5"
  Rename it as NAME='eth0'
  Make sure your /etc/network/interfaces is correct
  Reboot


You should just install the repository version:

sudo apt-get install apache2

Start it running like this:

sudo service apache2 restart

Assuming it's working, you should see a basic greeting at http://localhost/. If you're looking for CGI scripting, I found this question helpful; otherwise you can start putting static content to serve in /var/www/ or configuring the operation of Apache with /etc/apache2/apache2.conf.


This should be a bug report. Please file a bug report here with the Hotot project.


kdump-config show gives "Not ready to kdump" but memory was reserved

you should see the logs of the service kdump-tools.
sudo service kdump-tools status
Then you can identify the problem according to the logs.

I encounter this problem too. First i check the log, and i see the log like this:

Jul 15 16:38:15 generic-2-clone systemd[1]: Starting Kernel crash dump
capture service...
Jul 15 16:38:16 generic-2-clone kdump-tools[1625]: Starting kdump-tools:
Could not find a free area of memory of 0x6baf000 bytes...
Jul 15 16:38:16 generic-2-clone kdump-tools[1625]: locate_hole failed
Jul 15 16:38:16 generic-2-clone kdump-tools[1625]:  * failed to load kdump
kernel.

from the logs, i can guess the reserved memory is not enough for kdump. then i modify the /etc/default/grub.d/kexec-tools.config, change the reserved memory from 128M to 256M. and then coldreboot.

now, it's ok.


how do I get maximal compressed screenshots?

optipng is certainly worth a look at . It's command-line but you could write a .desktop handler for it. It's fairly simple to use for batching:

optipng -o7 *.png

But note it's destructive. It will overwrite your files. This is usually fine but if you're using a fat format (Adobe Fireworks PNG for example), you might lose useful. Here is the full list of options:

$ optipng -h
OptiPNG 0.6.4: Advanced PNG optimizer.
Copyright (C) 2001-2010 Cosmin Truta.

Synopsis:
    optipng [options] files ...
Files:
    Image files of type: PNG, BMP, GIF, PNM or TIFF
Basic options:
    -?, -h, -help   show this help
    -o <level>      optimization level (0-7)        default 2
    -v          verbose mode / show copyright and version info
General options:
    -fix        enable error recovery
    -force      enforce writing of a new output file
    -keep       keep a backup of the modified files
    -preserve       preserve file attributes if possible
    -quiet      quiet mode
    -simulate       simulation mode
    -snip       cut one image out of multi-image or animation files
    -out <file>     write output file to <file>
    -dir <directory>    write output file(s) to <directory>
    -log <file>     log messages to <file>
    --          stop option switch parsing
Optimization options:
    -f  <filters>   PNG delta filters (0-5)         default 0,5
    -i  <type>      PNG interlace type (0-1)        default <input>
    -zc <levels>    zlib compression levels (1-9)       default 9
    -zm <levels>    zlib memory levels (1-9)        default 8
    -zs <strategies>    zlib compression strategies (0-3)   default 0-3
    -zw <window size>   zlib window size (32k,16k,8k,4k,2k,1k,512,256)
    -full       produce a full report on IDAT (might reduce speed)
    -nb         no bit depth reduction
    -nc         no color type reduction
    -np         no palette reduction
    -nx         no reductions
    -nz         no IDAT recoding
Optimization details:
    The optimization level presets
        -o0  <=>  -o1 -nx -nz
        -o1  <=>  [use the libpng heuristics]   (1 trial)
        -o2  <=>  -zc9 -zm8 -zs0-3 -f0,5    (8 trials)
        -o3  <=>  -zc9 -zm8-9 -zs0-3 -f0,5  (16 trials)
        -o4  <=>  -zc9 -zm8 -zs0-3 -f0-5    (24 trials)
        -o5  <=>  -zc9 -zm8-9 -zs0-3 -f0-5  (48 trials)
        -o6  <=>  -zc1-9 -zm8 -zs0-3 -f0-5  (120 trials)
        -o7  <=>  -zc1-9 -zm8-9 -zs0-3 -f0-5    (240 trials)
    The libpng heuristics
        -o1  <=>  -zc9 -zm8 -zs0 -f0        (if PLTE is present)
        -o1  <=>  -zc9 -zm8 -zs1 -f5        (if PLTE is not present)
    The most exhaustive search (not generally recommended)
      [no preset] -zc1-9 -zm1-9 -zs0-3 -f0-5    (1080 trials)
Examples:
    optipng file.png                (default speed)
    optipng -o5 file.png            (moderately slow)
    optipng -o7 file.png            (very slow)
    optipng -i1 -o7 -v -full -sim experiment.png

There are other tools (pngcrush for example) and you might find they're more useful but I've never strayed from optipng, just for its no-nonsense simlpicity.

There's a fairly comprehensive PNG compression shoot-out here that's quite fun:

http://css-ig.net/png-tools-overview


how to add gnome bar network manager to awn?

You can add both notification area and indicator applet to awn. Just go to applets section of AWN preference and add notification area and indicator applet. I think the network manager falls under notification tray rather  than indicator applet.

First remove notification area from panel and do the above steps.


Volume keys are working in unity but not in xfce4

This is still broken in 12.10. You can fix it by installing xfce4-mixer and then manually selecting the mixers to control with it - and then going into the xfce4 settings editor and typing in the name of the "active card". The mute button still won't work properly, you can mute but not unmute the sound with it. Everything else works though, including on screen notifications. It's really tricky to get it all working, so I opened a bug: https://bugs.launchpad.net/ubuntu/+source/xfce4-mixer/+bug/1085752

In detail, in xfce4-mixer you want it to look something like this:

This should show only the primary volume control of your sound card. You have to choose a sound card at the top and then click "Select Controls..." to add controls.
Then in the xfce4-settings-editor you need to set the "active-card" like this:

Under "sound-cards" you'll see a list of every sound card for which you added mixers. You will probably have multiple cards so it might take some trial and error here to find the right one. You need to copy the name of the correct card from "sound-cards" to "active-card" - this will be the mixer which the volume buttons control.


Try Deja Dup.You can view screenshots here: http://www.howtogeek.com/108869/how-to-back-up-ubuntu-the-easy-way-with-dj-dup/


Mozilla Firefox Quantum 63.0: "Restore previous session" greyed out

Meantime, I undid all the changes I might have done... ... but nothing worked. Later, I figured that Firefox was set for 'do not remember history'. I changed it and everything was OK!!


Opera directory at "/usr/lib" is missing

Open up a terminal (Ctrl+Alt+T)

Enter this command:

sudo apt-get install pepperflashplugin-nonfree

Restart Opera.


any app or script to download wallpapers from different websites

Variety is exactly what you're asking for.

To install it,

sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety


uninstalling system apps from Ubuntu 20.10

I don't recommend removing the .desktop entry for these apps or removing the apps completly, it could cause problems which I am not responsable for.
Open your terminal with CTRL + ALT + T
Livepatch
You can remove Livepatch from the Apps menu by removing the .desktop entry on /usr/share/applications
sudo rm /usr/share/applications/software-properties-livepatch.desktop

Characters
This is a separate gnome app which you can apt remove
sudo apt remove gnome-characters

You can remove Characters from the Apps menu by removing the .desktop entry on /usr/share/applications
sudo rm /usr/share/applications/org.gnome.Characters.desktop

Ubuntu Software
This is a snap app "Snap store" which you can snap remove
sudo snap remove snap-store

You can remove Ubuntu Software from the Apps menu by removing the .desktop entry on /var/lib/snapd/desktop/applications/
sudo rm /var/lib/snapd/desktop/applications/snap-store_ubuntu-software.desktop

Language support
This is a separate gnome app which you can apt remove
sudo apt remove gnome-language-selector

You can remove Language support from the Apps menu by removing the .desktop entry on /usr/share/applications
/usr/share/applications/gnome-language-selector.desktop


Is it safe to install Ubuntu with a virtual drive? (With Daemon or Alcohol)

You cannot install Ubuntu using these softwares or vitual drives, because those will only run after Windows is loaded (more correctly, run on Windows). But, you need to run Ubuntu without loading any OS.

When you try to boot from those drives, You can't becausu  BIOS can't see those devices, simply because BIOS has no idea what softwares you installed in Windows.


Firefox-library time display not syncing right

After reading up on this a bit, it would seem that Mozilla applications use your system time zone. You can check which one Firefox thinks you're using by opening the developer console (F12) and typing

Date()

which would give you something that looks like this:

"Sun May 21 2017 18:51:58 GMT-0400 (EDT)".

If nothing else it would perhaps clear up a few things.

I would also double check your Date and Time preferences in MATE.


Hidden files found only by command line?

Hidden files can be shown using the GUI or the cli.

Using the GUI way, in Nautilus (file manager) hit ctrl+h to see all files, including the hidden files (filenames that begin with a period).

Hidden files can be metadata files, or image catalog files, or even application preferences... and they're hidden because they don't contribute to the general listing of image files that you have.

In the command line way, it's the difference between the ls command, and the ls -a command. The latter one shows the hidden files too.


How do I force a resolution of 1024x768?

Enter the command below in your terminal:

gksu gedit /etc/X11/xorg.conf

Copy and paste the following options into that file:

Section "Device"
    Identifier    "Configured Video Device"
EndSection

Section "Monitor"
    Identifier    "Configured Monitor"
    HorizSync       30.0-62.0
    VertRefresh     50.0-70.0
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Configured Monitor"
    Device        "Configured Video Device"
    DefaultDepth    24
    SubSection "Display"
        Depth    24
        Modes     "1024x768" "800x600"
    EndSubSection
EndSection

Save your edits, and restart (log out and back in or reboot).

Enjoy.


Can't grow extended partition (unmounted)

Growing the extended partition worked using KDE Partition Manager (partitionmanager) file, disk and partition management utility for KDE.


Error: schema com.canonical.notify-osd not installed

I had a different package missing but I fixed it with this bug report:

https://bugs.launchpad.net/ubuntu/+source/unity-tweak-tool/+bug/1845737

Try to see if that notify-osd goes by a different name.


To answer your original question:

You go to terminal mode because your graphics chipset isn't supported by the version of the proprietary driver you've installed. This nvidia driver should be removed first, use purge and make sure you delete the file it creates in /etc/X11/xorg.conf as this can mess up recovery:

sudo apt-get purge nvidia*
sudo rm /etc/X11/xorg.conf

You should only use the nvidia proprietary driver that works with your card, or otherwise fall back to the nouvou driver for your card. This might not allow you to use all of the features of your vidio card, but it will be better than a terminal screen.

Please note that you should not ask further questions once you're initial question has been answered (admitted in the comments instead of a real answer) instead you should make a new question and include all of the information you know so far. This is a Q&A website, not a support ticket website after all.


A workaround would be to add those two commands to the end of your .profile file in your home directory...
Edit:
To do so, go to the home directory in your terminal and type:
nano .xprofile

At the end of the file, type in:
modprobe -r psmouse
modprobe psmouse

Then press Ctrl+o and then Enter to write out and Ctrl+x to exit.


dd command for creating bootable .iso does not boot

Cloning the iso file to a USB pendrive

Using dd like you describe is cloning, which is a simple an reliable method that works with all current Ubuntu family iso files in order to create USB boot drives, and 64-bit systems work in both BIOS and UEFI mode.

You need elevated permissions, which you do by running with sudo. I think the following command would do what you want

sudo dd if=~/Desktop/xubuntu16.04 of=/dev/sdx bs=4096

where x is the device letter of the target drive. It is extremely important the get the correct letter for the target drive, otherwise you might overwrite a drive, where you store the family pictures and some other very important files. dd is a very powerful but also very dangerous tool, because it does what you tell it to do without questions, and a minor typing error is enough to destroy your family pictures.

There should be no partition number, so /dev/sdx (not /dev/sdx1) because you want to clone from the iso file to the whole drive and point to the drive's head end, (not to a partition). In my experience it is fast in many computers to write with the block size 4096 bytes.

Safer cloning tools

I would recommend that you use a tool that helps you identify and select the target drive and with a final checkpoint where you can make sure, that you will write to the correct drive.

'mkusb' is such a tool that works in all current Ubuntu versions. It wraps a safety belt around dd. See this link

help.ubuntu.com/community/mkusb
The Ubuntu 'Startup Disk Creator' in Ubuntu 16.04 LTS and newer versions is also a reliable cloning tool to create USB boot drives with Ubuntu. (Earlier versions of the Ubuntu 'Startup Disk Creator' are buggy.)
Another alternative is 'Disks' alias gnome-disks.


Deleting a directory fails after using sudo to copy

Just use sudo again:

sudo rm -r [path to folder]

you can use additional options:

-f (force)
-I (prompt)
-v (verbose, explain)

if you need.


How can I get the vice C64 (commodore 64) emulator to work

update --- there is a new release now, 3.3, and as 3.2, works great.

I managed to compile it with trial-and-errors adding the following libraries:

sudo apt install xa65 libreadline-dev libxaw7-dev libgtkmm-3.0-dev libpulse-dev

and compiled with

./configure
make
sudo make install

...and it seems to work (the lib hack is not needed anymore). Seems a quite live project!

Original content:

You can compile the native version pretty easily (well...). Tested with version 2.4.
(compact instructions --- tell me if you need more details).

1) download the last version from http://vice-emu.sourceforge.net/

2) unpack it where you want

tar xvzf vice-3.1.tar.gz
cd vice-3.1

3) install required dev libraries:

sudo apt install build-essential  libvte-dev libasound2-dev libgtk2.0-dev libgnome2-dev byacc flex

4) configure, compile and install (it will go in /usr/local/). On my netbook, I have a coffee after the "make"...

./configure --enable-gnomeui
make
sudo make install

5) if you machine is 64 bit, do the following (as root)

cd /usr/local/lib
sudo ln -s ../lib64/vice .

(this is probably a bug; the emulator will search the ROMS in /usr/local/lib even if the installation is a 64 bit one and the install program will put the libraries under /usr/local/lib64/)

6) type x64 and Enjoy! (this thing evokes a tear... my first computer ever was a C64. If only I did not lose my discs...)


Using the link provided by Elder Geek, non validated answer worked for me:

I added the below to /etc/pulse/default.pa (well uncommented the line with load-module module-alsa-sink and added the device bit)
load-module module-alsa-sink device=hw:0,0

Then restarted the system, after which the Built-in audio was present in Settings > Sound!
Selecting it made it work...


Getting weird characters (Chinese) when reading csv files with LibrOffice

Your character-set is UTF-16. I think you use a wrong charset. Probably UTF-8 is the right one. Or the csv file uses Big Endian (UTF-16 BE) and you Little Endian (UTF-16 LE) or the other way round. Try some different charsets and it should work.