How do you know it's not executing?    Can you show us the script?

The most common problem is that your script outputs to the console.  In cron, the console doesn't exist.  Make sure your script writes to a file or directly to a console device.

On the console where you want to see the message - run: tty That will show you the device you are using in that terminal session. Then use that device name like this: /usr/bin/myscript.sh > /dev/tty 2>&1 That will push all tty output into that device and also push all error output to the same device. WARNING: If you are opening and closing tty sessions, you can't rely on this method. Most cron jobs are designed to write directly to text files and those text files are monitored somehow


How to make curl use proxy automatically

Perhaps the easiest way to get curl to use a proxy is to add the details into ~/.curlrc file. The syntax is as follows:

proxy = <proxy_host>:<proxy_port>

This can alternatively be set as an environmental variable but IMHO using ~/.curlrc is the most direct and least error prone method.


access specific folder on Ubuntu VirtualBox from Windows host

don't know if this could help you (I haven't understood how you want to access /etc if from windows host or from where).
Obviously, if you need access to /etc while guestOS is running, this won't be the right way.

Cheers,

Silvia


Editing a text file does not save changes

The /sys directory is a special directory that is maintained by the system to provide information that you can view to see the state of your system.  The file you are examining and trying to edit is being maintained by the system and is showing you the system's state.  If the state changes you'll see the difference.

There are various facilities to control the features of your Laptop.  Try xset to set the state.

Try (a variation such as):

$ xset led 3

Look at (https://askubuntu.com/a/18628/29012):

#!/bin/bash
if [ -f /tmp/keyboard_light ]; then
xset -led 3 && rm /tmp/keyboard_light
else
xset led 3 && touch /tmp/keyboard_light
fi

If that works and controls your back-light, you'll then see a difference in the file you're trying to edit.

By the way you can type this command to see the xset features that are recognized and their settings:

$ xset q


I think there is a simple app that you can try . Works for Grub , Grub2 and Burg =)

Grub Customizer is a new graphical GRUB2 settings manager.Grub Customizer 1.5 which has been released today comes with a cool new feature: Grub recovery & configuration using a live CD:

All the file systems you need will be mounted after choosing the root partition and some sub partitions.

To install Grub Customizer 1.5, use the following commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Once installed, you can find it under Applications > System Tools > Grub Customizer.

Adapted From Web Upd8


How can I network two computers together using Thunderbolt 3?

ThunderBolt 3 User Space tools
These are the ThunderBolt 3 User Space tools that work with Kernel Version 4.13 and higher. They were revised 6 days ago (December 4, 2017).
Summary from link
Overview
Thunderbolt™ technology is a transformational high-speed, dual protocol I/O that provides unmatched performance with up to 40Gbps bi-directional transfer speeds. It provides flexibility and simplicity by supporting both data (PCIe, USB3.1) and video (DisplayPort) on a single cable connection that can daisy-chain up to six devices.
Features
The user-space components implement device approval support:

Easier interaction with the kernel module for approving connected devices.
ACL for auto-approving devices white-listed by the user.

tbtacl
tbtacl is intended to be triggered by udev (see the udev rules in tbtacl.rules). It auto-approves devices that are found in ACL.
tbtadm
tbtadm is a user-facing CLI tool. It provides operations for device approval, handling the ACL and more.
Supported OSes

Ubuntu* 16.04 and 17.04
Fedora* 26
Clear Linux*

Kernel/Daemon Compatibility
The user-space components operate in coordination with the upstream Thunderbolt kernel driver (found in v4.13) to provide the Thunderbolt functionalities. These components are NOT compatible with the old out-of-tree Thunderbolt kernel module.


So you got the classic "Login Screen Loop" that happened to me once, you can find the Commands you gotta perform in this page: How can I uninstall a nvidia driver completely ? , since to solve that problem, you have to remove everything related to Nvidia with remove -- purge . I hope that Helps.


Windows hangs at grub's purple screen when dual booting in legacy boot mode

You can try booting the windows install image/recovery disk and manually recovering the boot EFIs (with the bootrec and bcdboot commands).

Here is a complete guide: https://superuser.com/a/504360/275127 Helped me a lot when this happened to me.

When doing the above mentioned procedure, you should find a folder, on your EFI partition, with an "ubuntu" folder that hosts the ubuntu boot files. Create by following that post's guidelines the windows EFI files in a separate "microsoft" folder next to the "ubuntu" one.

Reboot, boot ubuntu normally, fire up boot-repair. Boot-repair will detect your new windows EFI files and proceed to add them to GRUB (the recommended settings option should suffice). If Boot-Repair asks if you want to back-up the windows EFI files, say yes.

I hope this helps.


Can't mount replacement hdd to same spot?

I found an answer for anyone facing this in the future. Simply run this command in terminal: systemctl daemon-reload
The answer and explanation is here.
https://www.bentasker.co.uk/documentation/linux/480-disk-automatically-unmounts-immediately-after-mounting


How to install ATI drivers on Ubuntu 16.10?

System Settings -> Software & Updates -> Additional Drivers

wait a few seconds for the probe to finish ...
pick the AMD driver from the list ...
save and reboot

Above is the suggested method ... If desired drivers are not shown in above list here are instructions to install necessary AMD native drivers

https://help.ubuntu.com/community/BinaryDriverHowto/AMD

Summary

issue this

lspci -vvnn | grep VGA

to confirm you have an AMD graphics card then issue these steps

backup current setup

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK

sudo apt-get purge fglrx* # purge prior installs ... reboot if it found any
sudo apt-get install linux-headers-generic
sudo apt-get install fglrx-updates xvba-va-driver libva-glx1 libva-egl1 vainfo

Generate a fresh xorg.conf BEFORE REBOOTING!

sudo amdconfig --initial

now reboot then issue this to confirm you are using AMD drivers

fglrxinfo

Done ... for details see link above


What is this? JS ERROR from gnome-shell keeps happening, and not finding answers

Learning stuff
Almost all gnome-shell errors are due to faulty gnome-shell extensions.
Good thing is that you don't have many of these extensions.
If you redo my grep, slightly modified, to:
grep -i gnome-shell /var/log/syslog* | grep -i extensions

You'll come up with a lot of hits that contain similar to this snippet:
/usr/share/gnome-shell/extensions/desktop-icons@csoriano

Guess which gnome-shell extension is suspect?
Do the work
So we'll move this extension out of the way and replace it with a substitute. I'll abbreviate my instructions, as you're terminal savvy.
cd /usr/share/gnome-shell
sudo mkdir extensions.HOLD
sudo mv extensions/desktop-icons@csoriano extensions.HOLD/desktop-icons@csoriano.OLD
restart gnome-shell
go to https://extensions.gnome.org/extension/2087/desktop-icons-ng-ding/ and install this extension.
restart gnome-shell
right-click on the Desktop and select "Settings" to set prefs.
Monitor system for gnome-shell errors AFTER the current time:
grep -i gnome-shell /var/log/syslog*


How can I install Blender 2.76 on Ubuntu 14.04?

You need to add the unofficial PPA:

sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update
sudo apt-get install blender

The above commands will install Blender version 2.76b, which has several bug fixes.


Install Faenza icons on libreoffice 3.5 toolbar

Update manager, today updated LO to 3.5 also here (Ubuntu 11.04). As I was using same icon theme I noticed same issue.

Just copying faenza archive over /usr/share/libreoffice/share/config/images_crystal.zip was not enough. Comparing icon theme archives from LO 3.5 with faenza set, revealed two possible misplacements:

res/commanimagelist -> cmd
vlc/source/src      -> vlc/res

I expect that first one was responsible for this issues, although I changed both: download link (3.6 MB)

So after downloading this archive place it as /usr/share/libreoffice/share/config/images_crystal.zip and then setting view to crystal should show faenza icons again :)


Disable Finger Touch On A Touch Screen Laptop With A Pen

Ratler and Tudor were both mostly right.
xinput --list

gives me

Virtual core pointer                       id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ N-Trig Pen stylus                         id=9    [slave  pointer  (2)]
⎜   ↳ N-Trig Touchscreen                        id=10   [slave  pointer  (2)]
⎜   ↳ N-Trig Pen stylus                         id=11   [slave  pointer  (2)]
⎜   ↳ N-Trig Touchscreen                        id=12   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=15   [slave  pointer  (2)]
⎜   ↳ N-Trig Pen eraser                         id=17   [slave  pointer  (2)]
⎜   ↳ N-Trig Pen pad                            id=18   [slave  pointer  (2)]
⎜   ↳ N-Trig Pen eraser                         id=19   [slave  pointer  (2)]
⎜   ↳ N-Trig Pen pad                            id=20   [slave  pointer  (2)]

I opted to Disable "N-Trig Touchscreen" but since I have two devices with the designation I used:

xinput --disable 10

Now finger touch does nothing but the pen still functions.


Ubuntu on the Sony Vaio VPCY 21S1E
This is a subnotebook (“ultraportable”) sold by Sony with quite a nice hardware lineup. Installing Ubuntu on it wasn’t quite easy due to graphic drivers but fear not! There is a solution that makes it work 100%, including 3D acceleration. Also, the touchpad doesn’t work at first. Doesn’t matter either, we’ll fix that too.
Issues with this laptop

Graphics issues (wrong resolution, only VESA works)
Touchpad doesn’t work
Battery meter in GNOME panel doesn’t show the remaining battery power

All those issues have fixes.
Hardware list
Per default, the device comes with

Intel Pentium U4500 1,2 GHZ (with two cores)
4 GB RAM (shared with the graphics chip)
Intel HD graphics (doesn’t really seem to have a “model name” other than that. It’s integrated into the CPU
1366x768 display at 12”, also has HDMI and VGA ports
WiFi: Atheros AR9285 (b/g/n), Ethernet: Atheros AR8131 (Gigabit)
some 320 GiB SATA HDD
multitouch Touchpad
the usual other ports: Firewire, 3x USB, headphone and microphone, SD Card reader

Default Configuration
Per default, the laptop comes with 3 Partitions already:

/dev/sda1 9,61 GiB (rescue partition)
/dev/sda2 100 MiB (system reserved)
/dev/sda3 the rest (Windows 7)

Installation
Graphics issues
When booting from standard Ubuntu installation media, the screen goes blank right at the beginning, even before the boot splash. This is due to the graphics card not being supported correctly by the kernel. What doesn’t work is Kernel Mode Setting (i.e. switching resolution etc), hence the black screen.
Graphics solution
To install Ubuntu correctly, you will need the Alternate Installation CD. And since your laptop has 4 GiB of RAM, you will need the amd64 variant.

Get the alternate amd64 installation ISO from the Ubuntu homepage
Burn an installation cd or write it to usb and boot from your medium.
On the first splash screen, press any key to be shown the boot options.
Press F6 to see advanced settings and select nomodeset. This will disable Kernel Mode Setting and allow you to see at least text.
Installation should work self explanatory from there.
After the reboot, you should see the standard greeter and log in.

Don’t worry if the touchpad doesn’t work. We’ll fix that later. Also, we’ll improve the screen resolution. Until then, plug in an USB mouse.
Installing another kernel
Since we disabled kernel mode switching before installation and Intel has removed User Mode Switching in their drivers, we’re running on VESA drivers that support only 1024x768. To fix that, we will have to both re-enable kernel mode switching and install a newer kernel with the appropriate drivers.
Before we install a new kernel, re-enable KMS:
gksudo gedit /etc/default/grub
In the line that starts with GRUB_CMDLINE_LINUX= remove everything between the quotes. Leave the quotes where they are.
As of 2010-12-28, I had the best luck with the 2010-12-24 snapshot of 2.6.37rc3:

http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2010-12-24-natty/linux-headers-2.6.37-997-generic_2.6.37-997.201012240908_amd64.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2010-12-24-natty/linux-headers-2.6.37-997_2.6.37-997.201012240908_all.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2010-12-24-natty/linux-image-2.6.37-997-generic_2.6.37-997.201012240908_amd64.deb

Install the packages you just downloaded.
Installing the latest video drivers
Add the Ubuntu X-Swat-Updates PPA:
sudo add-apt-repositry ppa:ubuntu-x-swat/x-updates
sudo apt-get update && sudo apt-get dist-upgrade -u

Battery meter
To see your current battery capacity, you’ll need to install an updated GNOME power manager. Add a PPA that includes the bugfix
sudo add-apt-repository ppa:brian-rogers/power
sudo apt-get update && sudo apt-get dist-upgrade -u

Reboot
After reboot, the new kernel and system updates will have taking care both of the graphics issues and the nonworking touchpad. The new GNOME power manager and upower packages should show the correct battery capacity, too.


Compiling R - configure: error: cannot run C compiled programs while installing R-3.0.0

Usually, after compiling a C file it creates an executable file with .exe extension which is not supported in any of the Linux flavours. Try creating an output file. Something like a.out, ie with .out extension. It might help.


How can I get and change a value of a line inside of a file if the value of such line is unknown by me?

Assuming the part for user_value is always 3 characters long you can do it like this:

sed "s/name_of_the_value=.{0,3}/name_of_the_value=$new_value/"

Or if you be sure there is nothing behind in that line you aswell could use:

sed "s/name_of_the_value=.*/name_of_the_value=$new_value/"

I hope i got that REGEX right, I'm no pro in this. So the value should be all the time 3 characters long best in hex format because decimal doesn't be always 3 characters long in cases below 100. The second case should work even i the number is below 100 but it assumes the whole name_of_the_value=user_value part is in a line of its own. Now testing this in terminal the output looks like this for the second case:

video@NAUTH:~$ echo "name_of_the_value=xxx" | sed "s/name_of_the_value=.*/name_of_the_value=$USER/"
name_of_the_value=video

Of course you need to pipe the output back into the file, or use a temporary file to swap around. You could use:

sed "s/name_of_the_value=.*/name_of_the_value=$new_value/" /input_file | sponge /input_file

Sed only changes the output while reading the file, not writing it, sponge saves the output then until you are through and writes the changes back.

If you don't want to or can't use sponge write in a second file and then switch them like this chain of commands.

sed "s/name_of_the_value=.*/name_of_the_value=$new_value/" /input_file > /output_file
rm -v /input_file
mv -v /output_file /input_file

As @kos pointed out in the comment you can as well use the -i flag of the sed command to write back into the input file without the use of a temporary file or sponge:

sed -i "s/name_of_the_value=.*/name_of_the_value=$new_value/" /input_file


Big, big update.

To me it seems you are missing out on a couple of basic things:

A driver is a software module that needs to match both, your actual kernel version and your actual make and model of your device. So, if you have a Ralink RT5370, as your lsusb log indicates, you should use the Ralink driver indeed. The Realtek driver will not help you in any way with this.
To find out what driver you need you can:

look at the device itself. Most of the time you'll find a very good identification printed on it. Google is your friend.
use the tools in your computer like lsusb, lsmod or lspci. Google for the device ID's.

If you build your driver from source, and it does not build with your actual kernel version, try building with another kernel version. With linux it is really easy to switch kernel versions at boot. If you need help to install an older kernel version, follow this post to Install older kernel version.

if you positively identified that you have a Ralink RT5370

You probably should follow the instructions from here, here or here.

if (and only if) you have a RealTek 8188:

Try this from google code. It's patched driver from realtek.

But you have to blacklist the native drivers: put a file in to /etc/modprobe.d/ with the following in it:

# Blacklist native RealTek 8188CUs drivers
blacklist rtl8192cu
blacklist rtl8192c_common
blacklist rtlwifi


VPN connection button doesn't show Ubuntu 16.04

I solved this myself. Turns out I need this package too:

Network-manager-gnome

And then launch via

nm-connection-editor


Screen flickering and freezing after clean install 16.04

This may be a power management problem.

Try this;
At the grub menu, press E.  If you grub menu doesn't appear automatically, press SHIFT when you first power on the computer.

On the line that says GRUB_CMDLINE_LINUX_DEFAULT, go to the end, and right after quiet splash, add radeon.runpm=0 and then press F10 to boot.

If the problem is gone, you can make the change permanent by doing the following :

Open a terminal window, and type sudo nano /etc/default/grub to edit your grub file.
Find the line similar to what you edited before, and again, add radeon.runpm=0 after quiet splash.  Press CTRL+O, ENTER to save, and then CTRL+X to exit.
Finally, run sudo update-grub to update grub.  This option of disabling power management will now be permanent.

There are also other suggestions in a bug report suggesting radeon.dpm=0.


How can I reduce the file size of a scanned PDF file?

Use the following ghostscript command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Summary of -dPDFSETTINGS:

-dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi)
-dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi)
-dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
-dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
-dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file

Reference: https://www.ghostscript.com/doc/current/VectorDevices.htm#PSPDF_IN:

Controls and features specific to PostScript and PDF input
-dPDFSETTINGS=configuration
Presets the "distiller parameters" to one of four predefined settings:

/screen selects low-resolution output similar to the Acrobat Distiller (up to version X) "Screen Optimized" setting.
/ebook selects medium-resolution output similar to the Acrobat Distiller (up to version X) "eBook" setting.
/printer selects output similar to the Acrobat Distiller "Print Optimized" (up to version X) setting.
/prepress selects output similar to Acrobat Distiller "Prepress Optimized" (up to version X) setting.
/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.

The exact settings for each of these, including their DPI values, are shown in the dozens of options in this table: https://www.ghostscript.com/doc/current/VectorDevices.htm#distillerparams.


Try with this

What follows are the absolute minimum instructions that you need to get a basic PPTP VPN server running under Ubuntu. Clients will then be able to VPN into the server and route their internet traffic so that it goes through the server to the internet.

First, install the required software:

sudo apt-get install pptpd

Second, enable ip_forward in the kernel for IPv4 by uncommenting the associated line in /etc/sysctl.conf:

sudo sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf

Reload the config file to have the change take effect immediately.

sudo -i sysctl -p

Third, enable NAT (if it isn't enabled already) so that users on the private VPN network can have their packets routed out to the internet:

OUTIF=`/sbin/ip route show to exact 0/0 | sed -r 's/.*dev\s+(\S+).*/\1/'`
sudo -i iptables --table nat --append POSTROUTING --out-interface $OUTIF --jump MASQUERADE

Enable NAT on boot from the rc.local script.

CMD="iptables --table nat --append POSTROUTING --out-interface $OUTIF --jump MASQUERADE"
sudo sed -i "\$i$CMD\n" /etc/rc.local

Note: This guide assumes you have no firewall configured on the server. If you have a firewall on the server, such as UFW

Fourth, for each VPN user, create an account in the file /etc/ppp/chap-secrets.

Replace $USER with the actual username you want to use for that VPN user.

KEY=`head -c 20 /dev/urandom | sha1sum | nawk '{print $1}'`
echo "$USER pptpd $KEY *" | sudo tee -a /etc/ppp/chap-secrets


How to use qt-speech in Kubuntu 18.04 (cli / Okular)

Okular

As for now (also in 19.04) Okular rely on libflite1 which supports only English via  only one available qtspeech5-flite-plugin.

CLI

There is jovie and in tray you can configure it and select language. You can use it from command line like qdbus org.kde.kttsd "/KSpeech" say "Hello World." 0.

Accessibility

Another possibility is orca which is configured from: System Settings → Accessibility → Screen reader → Launch Orca Configurator.

CLI with Google's TTS (online)

Install with sudo apt install python-pip sox libsox-fmt-mp3
and then pip install gTTS.

Usage: ~/.local/bin$ ./gtts-cli Hello\ World | play -t mp3 -


Grep contents after second instance, exclude last two words/columns

Here is my sed solution for your output:

$ ... | sed -r 's:.*/(.*)Virtual Machine$:\1:'
Active Directory
VM-Replicate

Notes:

.*/ looks from start to the last /:

/vcenter-prod.happycow.local/VirtualMachines/Backup With Space Normal     /vcenter-prod.happycow.local/VirtualMachines/

Then we look for anything before Virtual Machine using (.*)Virtual Machine$ and replace the whole line with that anything


Could not get lock ... Resource temporarily unavailable after running sudo apt update (Error 11)

That issue is happening because the system identifies the fact the lock file is being used by another process. You can identify the process and kill it by

$ps aux | grep -i apt
$sudo kill -9 <pid>

If something happened during an apt-get process, like a system shutdown, then there will be no process having the file locked, by the problem will still be there. In that case you can reconfigure the necessary files, as follows:

$sudo rm /var/lib/apt/lists/lock
$sudo rm /var/cache/apt/archives/lock
$sudo rm /var/lib/dpkg/lock
$sudo dpkg --configure -a


Partition External HDD For Multiple Bootables

Essentially you will create 4 EXT4 partitions, 3 for your 3 distributions and 1 for data, commonly accessed by all 3. Use that data partition as /home for all 3, and install grub on MBR
You are not saving any iso, you are actually installing them as on internal hdd
Kindly ensure that, the ext hdd case has sufficient ventilation, to avoid disk wear and tear real fast

All you need are the iso live disks and install normally as you install Linux, selecting the correct hdd.

In case you want just multi bootable installation images, then you may use Yumi from http://www.pendrivelinux.com/yumi-multiboot-usb-creator/

Hope it helps


Where is 'Users and User groups' in Lubuntu 20.04?

It seems that Users and User Groups has been moved to Preferences -> LxQt Settings under the new 20.04 LTS.


Wacom tablet detected, but not the stylus

So I don't know exactly what the problem is, but switching to a different USB port seems to fix it. The original USB port still doesn't work, or the one next to it, but I found a port that works.


Hide window title in gnome-shell using mutter, gdk, wnck or gtk

After a bit of discussion with the gnome-shell devs, this was resolved.

The conversion I attempted to do in 1. was never an option - that sort of thing doesn't work.

The version in 2. was the correct code, but would only work if run from outside a gnome-shell extension (i.e. run the javascript file using the gjs binary as opposed to from the looking glass or an extension). It turned out that mucking around with window decorations like that from within the gnome-shell/mutter process would cause the crash.

So the problem could be solved so long as the code was run from outside the extension. Launching an external process to run the script in option 2) worked (although it turned out to be easier to just spawn xprop and set the _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED atom to true on the window (identified by its X ID, being the child of the window with the window actor's XID).

(If anyone is interested the end result is the Maximus gnome shell extension)


How to create a cross-platform Ubuntu Touch app without qmlscene?

Apps that are on Ubuntu phone are open-source. Most of them don't use qmlscene. Terminal, for example: http://bazaar.launchpad.net/~ubuntu-terminal-dev/ubuntu-terminal-app/trunk/files

You can clone that repository, compile yourself and see how it's done.

As for undefined reference to symbol '__cxa_end_cleanup@@CXXABI_1.3' - it seems that the toolchain is doing something wrong. In CMake settings set CMAKE_VERBOSE_MAKEFILE to ON to see more logs. Or see if you can run CMake build from command line in that LXD container without QtCreator (then you can fiddle with individual compiler and linker commands).


Not all executables are meaningful when run from a GUI; running them from a CLI is the only way to observe what particular executables do and to interact with them.


Just wanted to check in and confirm that this is still works on Ubuntu 18.04.1 LTS.

Steps to get running:

Visit http://wifimouse.necta.us/#setup to download the app and server
On Ubuntu, run sudo dpkg -i mouseserver*.deb to install the deb
Run /usr/sbin/mouseserver to launch the server.
If the server is running, your terminal should print a message like mouse server[10656]: started on port 1978
Use ipconfig command to get your IP.
Launch the phone app and enter your IP. The app should show a mousepad and the terminal will print inputs once you have successfully connected.


It's a bit of a hack; but if you switch to recovery mode and go into the shell (NOT THE BOOT SHELL), you can run:

cat /etc/passwd | grep home

and get the users that have a home directory. You should be one of them; look for something familiar. This happened to me and that's how I solved it.


Go back to default video drivers for NVidia hybrid

First and foremost, you'll need to apply the following workarounds to correct any bootup issues you may experience with switching to the Intel Integrated Graphics via prime-select tool:

Make sure that you're running the latest BIOS and the EC ROM firmware. You have not provided the full model string of your machine, and thus cannot point you to the download page for that without that information. To extract that info, run:

sudo dmidecode -t chassis

Add the following options to the kernel options passed by grub on boot (by editing /etc/default/grub ):

acpi_osi=! acpi_osi="Windows 2009"

For the Intel Skylake integrated graphics controller, you may have to apply additional workarounds to get the HuC and the GuC firmware components to load, needed for VAAPI H/W acceleration, power savings,etc. This gist outlines the entire process.

Remember that after any changes made to the grub configuration file, the boot configuration must be updated by running:

sudo update-grub

Finally, on the issue of drivers: It's strongly recommended to use Ubuntu's Proprietary Driver Repository, as shown:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-381 --install-recommends -y

Note that we've selected the R381 release as its' the latest for now. This might change in the future.

The final addition to this is Oibaf's PPA , which is optional if you need the latest and greatest X and mesa driver stack:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt-get upgrade && sudo apt-get dist-upgrade

Then reboot to test changes.

The reason I recommend Oibaf's PPA is if you intend to use the Intel Integrated Graphics (Skylake) for other things such as VAAPI hardware accelerated encoding, albeit at the cost of some stability issues you may encounter since this puts your graphics stack in a bleeding edge state. If you don't require such functionality and are not willing to put your stack in a bleeding edge state, you may safely omit that step.


How to get the laptop fan cooler to work on an Acer Aspire 5315?

There is this bug, now closed because it was opened for Karmik, that is not supported anymore, and I think you should open a new one for Ubuntu 11.10:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/451337

I think you can find a temporary solution using acer_fancontrol, as suggested here:

http://giovanni.wordpress.com/2010/08/12/how-to-solve-fan-problem-on-acer-aspire-5315/


bootable USB / installation requirements

The specific requirements for a 2GB stick is so you can install a persistent file to the USB disk so that if you require a certain package on the LiveUSB, you will have more than enough space.

The persistent filesystem for the disk requires at least (from the experiences I've had) 500MB to efficiently operate (see the below section titled "EDIT" for details on this number).  That is the reason for the 2GB USB stick requirement.

EDIT
The source for this information was testing I've done in the past.  I have 1GB, 2GB, and 8GB sticks here, and making the bootable USB disc through the USB Startup Creator tool in 10.04, the persistent filesystem does not effectively operate at the 1GB level, works fairly well at the 2GB level, and works great at the 8GB level.


Autocompletion doesn't work while logged as root

Check your /root/.bashrc file for these lines

if [ -f /etc/bash_completion ]; then
  . /etc/bash_completion
fi

If they do not exist add them to the end of the file using your favorite text editor.


How do I permanently change window titles?

The initial name is usually set by the (code within) the application itself. You can however change it, e.g. by using xdotool, which you would have to install first:

sudo apt-get install xdotool

Then, once it is installed, you can set another window name by (e.g.) the command:

xdotool search --name "Unity LauncherSwitcher" set_window --name "Monkey"

This will change:

into:

Note

As you can see, the command exists of:

xdotool search --name "<current_name>" set_window --name "<new_name>"

The <current_name> has to match exactly.

Edit alternatively

From your comment, I understand the command above did not work. I tested it with different applications, and it worked...

But for a reason I do not understand, NOT with Rhytmbox(!! might be a bug)

An alternative is to use wmctrl, which you also would have to install:

sudo apt-get install wmctrl

Then use the command:

xprop -id "$(wmctrl -l | grep 'Rhythmbox' | awk '{ print $1 }')" -set WM_NAME "Music"

I succesfully tested it on Rhythmbox:

Make the changes permanent?

As mentioned, the default window name is defined in the code of the application.

Changing the default window title would need to change the code. That can be done if the code is available, would need recompiling in many cases and depends on the used language, among other things. A general instruction would be quite impossible and beyond (outside) the scope of AU in my opinion.

EDIT 2

Flexibly manage/set custom window names per application from a single file

In your original question, you were wondering if there was some kind of a file to set the title of new windows of a specific application. As explained, that is not the case, however, it can be created.

In the setup below, you can very easily define on a per application base how new windows are named. Simply create a file in ~ (your home directory), named window_names.txt. For each of the applications you want to set a specific windowname for, add a line of, subsequenty, the application and the desired window name:

A textfile, defining window names per application

gnome-terminal Monkey eats
gedit Banana
rhythmbox if he runs out of peanuts

Explanation

The setup exists of a simple background script. The script is very light, so it won't have any noticable effect on the performance whatsoever.

Once the script starts, it reads the file ~/window_names.txt and loads the settings per application. Then it keeps an eye on newly created windows. If a window appears that belongs to one of the applications, definied in the file, it sets the window name accordingly.

How to set up

The script uses both wmctrl and xdotool:

sudo apt-get install wmctrl
sudo apt-get install xdotool

Copy the script into an empty file save it as setwindowname.py
Create the file ~/window_names.txt (exactly named window_names.txt), add your applications in the format:

<application> <window_name>

e.g.

gedit Text editor

The window name may include spaces.
Test-run the script from the terminal by the command:

python3 /path/to/setwindowname.py

If all works as expected, add it to startup applications: Dash > Startup Applications > Add

Note that in some cases, a script might break if it starts when the desktop is not fully loaded yet. If that migh be the case, the command to add to startup applications would be:

/bin/bash -c "sleep 15&&python3 /path/to/setwindowname.py"

The script

#!/usr/bin/env python3
import subprocess
import time
import os

f = os.environ["HOME"]+"/"+"window_names.txt"

change = []
lines = open(f).read().splitlines()
for l in lines:
    try:
        change.append([l.split()[0], (" ").join(l.split()[1:])])
    except IndexError:
        pass

get = lambda cmd: subprocess.check_output(cmd).decode("utf-8").strip()
curr_1 = []

while True:
    try:
        curr_2 = get(["wmctrl", "-lp"]).splitlines()
        new = [w for w in curr_2 if not w in curr_1]
        for item in new:
            line = item.split(); pid = line[2]
            procs = get(["ps", "-e"]).splitlines()
            match = [l for l in procs if pid in l][0]
            for app in [app for app in change if app[0] in match]:
                subprocess.Popen(["xdotool", "set_window", "--name", app[1], line[0]])
        curr_1 = curr_2
        time.sleep(0.3)
    except:
        pass

Notes

If the file ~/window_names.txt is edited, the script needs to be restarted.
It works no matter how an application is started; it also works when applications are run from the terminal / and or with sudo.
It does not interefere with the the right-click option of any application.
The script also "maintains" the window name; if another process changes the window name afterwards (opening tabs, change directories e.g.) the script sees the window as a "new window" and maintains the window name of your choice.


Assuming that you have Windows and Ubuntu 12.04.1 installed and running smoothly on your computer, the best method might be starting Ubuntu 12.04.1 normally and upgrading to Ubuntu from within Ubuntu 12.04.1.

If your system has not already asked if you would like to upgrade, you can run "Software Sources", switch to "Updates" tab, and make sure that "Notify me of a new Ubuntu version:" is followed by "For any version".

Then your system will prompt you to upgrade to Ubuntu 12.10, or you can as well start "Software Updater" manually to make this happen instantly.

Using a live CD/USB for this purpose for such an upgrade might be the second option, while a fresh install can also be considered as a third option (to replace the current Ubuntu version, for example).


Gnome-Shell and Unity run at the same time

Yes, you're not supposed to switch between them like that. You log into a session running Unity or Gnome Shell from the display manager. In your example, it's not Unity that is interfering with Gnome Shell, but Gnome Shell that interferes with Unity. In other words; gnome-shell --replace doesn't properly shutdown Unity.

It would be very nice if Unity and Gnome Shell could cooperate on this so that you could just switch between them without logging out and back in, but this is in the future.


VNC Viewer with No Monitor – Can't fix Resolution | Ubuntu 16.04.3

Wait for the Release of 18.04 (Bionic Beaver) , back up you're important data and perform a clean install of Bionic Beaver.


Did you happen to have the 'reg' directory in /home before you mounted a new partition over it?

If so, it's simply hidden underneath the new /dev/sda3 version of /home.

Boot off of the CD into a rescue shell, or single user mode, ensure /dev/sda3 is not mounted, copy your 'reg' homedirectory to somewhere else (with enough space, of course), then reboot again.

Alternatively, comment out (use # at the beginning of the line) the /home entry of fstab and reboot.  You'll come back up without the /dev/sda3 home.  Mount /dev/sda3 on /mnt or somewhere, copy 'reg' over, uncomment the line in fstab, and

mount -a

At this point it's probably best to just reboot again, as you'll likely be logged in as 'reg' and so therefore mounting /home over your current $HOME would not be doable.

Of course, if you didn't have reg in /home beforehand, feel free to ignore all of the above.


libmysqlclient error. No file (even though its there)

According to Ubuntu manual:

  ldconfig creates, updates, and removes the necessary links and cache
  (for use by the run-time linker, ld.so) to the most recent shared
  libraries found in the directories specified on the command line, in
  the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
  /lib).

In your case, verify if /usr/lib64 is present in /etc/ld.so.conf, and if it is, exec:

  sudo ldconfig

If /usr/lib64 is not present in ld.so.conf, you can follow this as example on how to add your custom directory and update link loader.


How do I install OBApps in Lubuntu 13.04?

The wiki at wxpython.org indicates that sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18nshould meet the requirement for "wxPython".

With those packages installed, the rest is simple: sudo python setup.py install.


Disabling SMART Disk Utility Warning Message

You have between 0% and 5% that what Disk Utility says about your hard drive is wrong. The other 95% is that your hard drive might be dying. Now to calm you, the alarm will pop up when it detects a problem with the SMART (ANY of the many problems a hard drive can have with it...even little ones like some cluster/sector/block has something bad).

My example is 2 Hard drives that in Ubuntu 10.04 one of them happen to have some horrible problems and the alarm came out EVERY SINGLE TIME Ubuntu booted. In Ubuntu 10.10 the problem went away since Disk Utility had a problem with some 1TB HDDs. It was solved, but since this is a software that checks for SMART data, this does not give 100% guarantee that your hard drive is bad, dying or damaged. You can click on the Hard Drive and then click the SMART Data button. That should mention the type of problem you have and how many bad sectors you have.

NOTE: If you have around 500 bad sectors, I suggest you start checking for a new hard drive. If you have like 2000 to 5000 sectors I REALLY suggest you get up from your chair, run to the nearest PC Vendor and buy a Hard Drive... quickly!.

Now for your answer.

Open the Disk utility. (On 11.10 or 11.04 using Unity press SUPER and type disk utility). For 12.04, 12.10 and up simply type disks
Click on the Hard Drive that has the problem
Click on the SMART Data Button (On 12.04+ look for an icon that shows advanced options. The SMART options should be there).
On the lower left corner of the SMART Data window click on Don't warn if the disk is failing

Some Images to help you:

Disk Utility Opened - Selecting the Failing Disk

Selecting SMART Data Button

Clicking on the Don't warn if the disk is failing

After this, everytime you boot you will not get a warning for THAT Hard Drive.

For my experience i would stay away from some Seagates (NOT ALL. The Barracuda ones rock on) and REALLY and Specially from all Western Digital Caviar Models. Am sorry to say but no matter how they paint them, they suck. They have the highest overall of failure for all drives in history. I have seen more Caviar fail to heat, time powered on and heavy copy than any other drives. I was a Quantum follower, then a Maxtor follower (For obvious "bought quantum" reasons and now a Seagate follower. Although i read a lot Toms Hardware and have found out that Samsung and Hitachi are getting REALLY good.

In 12.10+ the message does not appear by default, so the need to disable it is not needed.


How can I install libjpeg on ubuntu 15.10?

You can install libjpeg and it's headers with:

sudo apt-get install libjpeg-dev


Ubuntu's alternative command management will be helpful here I think.
It's basically organized this way

generic link(e.g. /usr/bin/java) -> buffer link(e.g. /etc/alternatives/java) -> actual command or executable (e.g. /opt/jdk/java)

So you can update the buffer link so that it points to your choice of actual command/executable and still use the generic link to get the job done everywhere as before
(of course assuming both commands provides proper functionality ;).
Here is a nice guide to update JVM of your choice through update-alternatives command. So do the following

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/local/jdk-xx.xx/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/local/jdk-xx.xx/bin/javac" 1

You can go on and update the java browser plugin and web-start plugin too as mentioned in the guide. Then choose the java of your choice by

sudo update-alternatives --config java
sudo update-alternatives --config javac


To investigate a little bit further, I would try to see if the problem is related to the xRDP installation or related to the remmina client.

We had some issues with the remmina client in the past.  I would suggest you to try to connect to your remote ubuntu machine using either mstsc.exe from a Windows machine or install on your linux machine next to remmina another remote desktop client.   You can install rdesktop or xfreerdp client (they are command line based client).  for the rdesktop, there is a basic gui interface called grdesktop.

If you can connect through these clients, the problem is remmina. if you cannot, xRDP might be the problem and you can start looking into the logs (in /var/logs/xrdp *  and in your ~/.xsession file to see  any connection issue

Hope this help


I actually forgot to update this saying that I'd figured it out, but the following link is basically how I did it:
Playing Sound with Ubuntu QML Toolkit preview
Thanks andrewsomething!


Just to make things clearer: the answer by @Emre Koç works, but it might not be obvious where your archive name goes.

gzip -cd ARCHIVENAME.cpgz | cpio -idmv

Replace ARCHIVENAME with the name of your archive. Remember to first cd into the directory where your archive is located.


How to automatically fetch missing dependencies when installing software from .deb?

You can install a package and get dependencies from repositories with

sudo gdebi package.deb

If you already installed the package with missed dependencies, you can dowload and install dependencies automatically with

sudo apt-get -f install

Also available is a graphical version gdebi-gtk, linked to .deb nautilus right click action "Open With GDebi Package Installer".


I would list the logs with a simple call to ls in your case:

ls -la /var/www/vhosts/*/logs/*


Can Ubuntu 12.04LTS fit on a normal CD, 700MB, or i do need a DVD?

I stopped burning a CD (or DVD) for ISO files about 2 years ago.

A cheap 2GB Flash USB drive is 3-4 times faster for installs, and can be repeatedly reused (for later releases).


How does the automatic installation work with free space?

Yes, the "Install Ubuntu alongside Windows 7" option will install Ubuntu in the free, unallocated space, provided that it can be created as a partition (for example, if you already have 4 primary partitions + unpartitioned space, Ubuntu will not be able to install).

The "Install Ubuntu alongside Windows 7" will usually reserve space for a swap partition. This space is usually the size of your RAM. So, for example, if your RAM is 4GB, then picking the "alongside" option will automatically partition your 20GB unpartitioned space to 16GB for the root partition (Ubuntu), and 4GB for swap.


In a command line window (within your GUI) (Ctrl Alt T) type (well, first type man clementine):

clementine --show-osd

Now, look in the list of icons to the left of the screen. It looks like an orange slice. Right Click on the icon, and you'll see a menu which includes "Lock to Launcher". Select that, and you'll have an icon in the bar on the left.


"Could not chdir to home directory /home/me: No such file or directory"

adduser is too basic and doesn't set the defaults properly. It's recommended to use useradd whenever is possible. You can remove the new user and create it again  with useradd -D me or repair it yourself:

sudo mkdir /home/me
sudo usermod --shell /bin/bash --home /home/me me
sudo chown -R me:me /home/me
cp /etc/skel/.* /home/me/

If you had used getent passwd me as Florian suggested you should have seen something like this:

sudo getent passwd me
boggus:x:1002:1002::/home/me:/bin/sh

And ls /home wouldn't shown the user directory as your error:

Could not chdir to home directory /home/me: No such file or directory


This is more of a comment, but I am including a picture

The default setup of my Brother printer (which seems to use a similar thing to a HP one) shows this in the printer settings window:

As it is off, it shows these levels. But it is fairly accurate when on...


This change was made to enable installing versions of the same library compiled for different architectures (e.g. on an AMD64 system, one version might go in /usr/lib/x86_64-linux-gnu while the other goes in i386-linux-gnu).

Both the standard linker and dynamic linker know about these directories, so the change should be invisible for most applications.  If the application is searching for actual library files manually, then it will need modification.

Details of the changes to Ubuntu can be found here:

https://wiki.ubuntu.com/MultiarchSpec


I don't have a "for sure" answer, but I can tell you this.

I'm 90% certain this was due to invalid data from multiple Ubuntu upgrades that never got quite settled. Some config that powered this gui probably was using information that was incorrect. How to update that is a mystery beyond me.

When I re-installed Ubuntu 18.04, everything (obviously) worked fine.


On a 64 bit system you need the 32 bit libraries for the Android SDK:

For Ubuntu 13.04 or below:

sudo apt-get install ia32-libs

For Ubuntu 13.10 or above:

sudo apt-get install libgl1-mesa-dev:i386

The ia32-libs are a 32 bit compatibility package for 64 bit systems, thus only available in such. If you already have a 32 bit installation, you have to install libGL separately:

sudo apt-get install libgl1-mesa-dev


How to reset login screen to default on Ubuntu 17.10

Open Terminal and run

sudo update-alternatives --config gdm3.css

You should get something like this:

There are 2 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).

  Selection    Path                                          Priority   Status
------------------------------------------------------------
  0            /usr/share/gnome-shell/theme/ubuntu.css        10        auto mode
* 1            /usr/share/gnome-shell/theme/gnome-shell.css   5         manual mode
  2            /usr/share/gnome-shell/theme/ubuntu.css        10        manual mode

Press <enter> to keep the current choice[*], or type selection number:

The asterisk (*) indicates the current choice, and it should be the gnome-shell.css one in your case.

Type the number (in the "Selection" column) associated to ubuntu.css and press enter.

(Source)


solid black screen while upgrading ubuntu from 15.10 to 16.04

Try to get your Windows/Ubuntu installation back by using the boot-repair tool with an Ubuntu Live DVD/USB.

First, boot into Ubuntu Live. Enable internet access, open terminal (CTRL+ALT+T) and enter these commands:

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

boot-repair GUI will popup, try to repair, see if Windows is listed in grub then reboot.


How to check if a printer is compatible with Ubuntu 18.04?

For Linux HP Drivers, see: https://developers.hp.com/hp-linux-imaging-and-printing

Please don't mix "Is my printer is compatible with Ubuntu?" with "will ubuntu recognize my printer out of the box without any effort?"

Most of the printers are compatible, but due to licensing issues, they require you to download the drivers from the hardware official site and ubuntu won't "automagically" recognize them.


Distorted and sped up audio in Wine 1.4 while using Spotify on Ubuntu 12.04

Please Note: In the comments above I suggested alternatives to using wine to run Spotify, so that audio problems could be avoided. The OP was pleased by these comments and so here's a quick answer in case it is of use to anyone else as well. When alternatives to using wine exist (as they do in another context with Steam on Linux), it seems reasonable to discuss them instead of spending hours debugging wine.

There are two main alternatives to using Spotify in wine:

The Spotify Preview for Linux client
The platform independent beta browser based solution (flash required)

How to install the client has been discussed elsewhere and on this site, so I thought I would briefly mention the in-browser solution for Spotify. It seems to support both free and paid accounts, and even though it is technically in beta, anyone with a Spotify account can use it. It obviously requires the flashplugin installed, so a browser such as firefox or google-chrome are ideal. The streaming quality seems to be fine and the audio issue free, unlike sometimes the situation in wine. It does, however, obviously depend on the quality of your network connection.

For more information I should read these OMGUbuntu spotify articles, which discuss in depth the alternatives available, and how to install the client if you want to compare both means of using Spotify. It is only surmise, but Spotify seem to be directing more resources to Spotify in browser than their clients (the Linux based one hasn't been updated for a while). This is probably because the browser version is platform independent and the obvious move for a cloud service (particularly in view of the rise of other Google alternatives,etc.).

Here's a screenshot from the browser version of Spotify.


Error while cloning source code of package (bzr: ERROR: Not a branch)

The message means that repository does not exist, so the command gets unexpected reply from LP server.

Either that repo was deleted, renamed or moved.
If you want to stick to the same project, use:

bzr branch lp:kdetoys

from https://code.launchpad.net/~vcs-imports/kdetoys/trunk

but I'm not sure it will work as expected (without issues for a getting started)


How to control gnome's auto mounting capabilities

GNOME automounting capabilities are managed by Nautilus, the default GNOME file manager.

Nautilus also manage the desktop icons and other aspects, as automounting, and runs at startup to do its job even if you don't know. To be convinved, run at startup:

enzotib@compaq:~$ pgrep -l nautilus
1678 nautilus
2362 nautilus
enzotib@compaq:~$

To control what it happens when a CDROM is inserted, or an external HD, or a flash memory, start Nautilus and go to System -> Preferences menu item and select the last tab, Media. Here you can control many aspect of automounting.


Waiting for network configuration (on boot-up)

I had the same problem after upgrading kernel.

When I executed

ifup eth0

I got

device not found

So the problem was not configuration.

My solution: Boot with different kernel.

You can check if you have other kernels in your pc executing:

ls /usr/src/

And you will have entries like this one:

linux-headers-3.13.0-64/

To boot with different kernel, when booting press SHIFT key and select "advanced ubuntu options" and try selecting different kernels until you find the one that works. After that, remove other kernels.


How to remove a half-installed package? (Sun JDK - Java)

Awww yeahh.. I've been able to finally remove after finding this post the following way: sudo find /var/lib/dpkg -exec grep -l "oracle-java7-installer" {} \; showed a bunch of files, I've added exit 0 to first line by typing sudo gedit /var/lib/dpkg/info/oracle-java7-installer.prerm, saved file and closed gedit.  Finally, after I was back on command line, typed sudo dpkg -P oracle-java7-installer and it worked.


Firstly, my guess is that Carla 0.7.0 will build with a modern Clang version and it's this check that is probably saying it needs Clang 3.9:

# Require clang 3.9
command -v clang++-3.9 >/dev/null 2>&1 || {
  echo >&2 "clang 3.9 is required, but it's not installed.";
  echo >&2 "make sure you build Unreal Engine with clang 3.9 too.";
  exit 1;
}

If that's the case, you should probably just try symlinking /usr/bin/clang++ to /usr/bin/clang++3.9 and seeing if it compiles.

Assuming that doesn't work and it really wants that specific version of Clang or some kind of backwards incompatible changes were made between 3.9 and 6.0 of Clang, you can prebuilt binaries from Clang. You probably want the 3.9 for Ubuntu 16.04 since it's the "newest" one for this old version.

Once you have that you can extract all of that stuff to /usr/local as root. I did notice that it does not come with a clang++3.9 binary, so I'm not sure where the Carla developers got that from. You'll need to symlink /usr/local/bin/clang++ to /usr/local/bin/clang++3.9 to fix that too.

There could be more dragons if they've done something weird with how they find includes directories as well. If you can use a newer version of Carla you should since they now use CMake and many other proper build techniques.


19.10: Thinkpad X1 Tablet gen 2 trackpoint not working

Please try my patch:
https://github.com/leakim/lenovo-x1-gen3-trackpoint-buttons
Would love some feedback on it if you try it.


How can I select specific words from a webpage by keyboard command on Ubuntu?

As far as I know, the selection of specific words is possible in Firefox but not possible in Chromium and Chrome.

In Firefox, you hold Ctrl and then use your mouse to select the words you want.


Lost LXD/LXC with most recent 20.04 upgrade

Change your /etc/fstab entry to mount your storage at /var/snap/lxd/common/lxd instead of /var/lib/lxd, and then reboot your system.


Why is that much memory used while I only have a terminal window open?

USE:

sudo top

and then hit Shift+m (i.e. write a capital M) to order it by MAX usage.

This will give you an idea what eats up your RAM....then we can try to examine this further

Also increased memory usage when running Chrome is completely normal, because Chrome is known to be memory glutton...
Maybe your OS isn't using SWAP just because it doesn't need to, or your swapiness is set to be low...
KDE e.g. Kubuntu isn't among the most lightweight Ubuntu flavours (it may eat up more RAM than other flavours)


How to copy a directory from one hard drive to another with every single file?

I would use rsync for this so that if there is an error (or you need to stop copying) partway through you can easily resume later, without having to recopy everything.

rsync -av /media/sdc1/Pictures/ /media/sdb1/Pictures/


You can remove unity music lens, it can't be disabled.

sudo apt-get remove unity-lens-music


How to get rid of KDE look and feel parts in other DEs?

Open Terminal window and copy/paste this command to remove KDE and it's parts:

sudo apt-get remove akonadi-backend-mysql akonadi-facebook akonadi-server akregator amarok amarok-common amarok-utils appmenu-gtk appmenu-gtk3 appmenu-qt apport-kde apturl-common apturl-kde ark audiocd-kio bluedevil calligra-data calligra-libs cdparanoia cdrdao colord-kde cryptsetup cryptsetup-bin docbook-xsl dolphin dragonplayer dvd+rw-tools freespacenotifier gnupg-agent gnupg2 gpgsm growisofs gstreamer0.10-qapt gtk2-engines-oxygen gtk3-engines-oxygen gwenview ibus-qt4 icoutils jockey-common jockey-kde k3b k3b-data kaccessible kaddressbook kamera kamoso kate kate-data katepart kcalc kde-base-artwork kde-baseapps-bin kde-baseapps-data kde-config-gtk-style kde-config-tablet kde-config-telepathy-accounts kde-config-touchpad kde-runtime kde-runtime-data kde-style-oxygen kde-telepathy kde-telepathy-approver kde-telepathy-auth-handler kde-telepathy-contact-list kde-telepathy-data kde-telepathy-filetransfer-handler kde-telepathy-integration-module kde-telepathy-minimal kde-telepathy-send-file kde-telepathy-text-ui kde-wallpapers-default kde-window-manager kde-window-manager-common kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins kde-zeroconf kdegames-card-data kdegames-data kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdesudo kdoctools kexi khelpcenter4 kinfocenter klipper kmag kmail kmenuedit kmix kmousetool knotes konsole kontact korganizer kpat kppp krdc krita krita-data ksnapshot ksysguard ksysguardd ksystemlog ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-netbook-default-settings kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager libaio1 libakonadi-calendar4 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadi-notes4 libakonadiprotocolinternals1 libassuan0 libattica0.4 libaudio2 libaudiocdplugins4 libavahi-gobject0 libbluedevil1 libboost-date-time1.49.0 libboost-program-options1.49.0 libboost-thread1.49.0 libcalendarsupport4 libcanberra-pulse libchm1 libcln6 libclucene0ldbl libcmis-0.2-2 libcrypt-passwdmd5-perl libcryptsetup4 libdbusmenu-qt2 libdebconf-kde0 libdlrestrictions1 libdmtx0a libdvdnav4 libdvdread4 libepub0 libeventviews4 libexttextcat-1.0-0 libexttextcat-data libfftw3-3 libflac++6 libgif4 libglew1.8 libgpgme++2 libgpgme11 libgpod-common libgpod4 libgps20 libgrantlee-core0 libgtlcore0.8 libgtlfragment0.8 libhyphen0 libibus-qt1 libilmbase6 libincidenceeditorsng4 libindicate-qt1 libiso9660-8 libk3b6 libkabc4 libkactivities-bin libkactivities6 libkalarmcal2 libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkcompactdisc4 libkdcraw-data libkdcraw21 libkde3support4 libkdeclarative5 libkdecorations4abi1 libkdecore5 libkdegames6 libkdepim4 libkdepimdbusinterfaces4 libkdesu5 libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 libkexiv2-11 libkexiv2-data libkfile4 libkgapi0 libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkipi-data libkipi9 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkolab0 libkolabxml0 libkonq-common libkonq5-templates libkonq5abi1 libkontactinterface4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkresources4 libkrosscore4 libkrossui4 libksane-data libksane0 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent4 libktpchat0 libktpcommoninternalsprivate3 libkunitconversion4 libkwineffects1abi4 libkwinglutils1abi1 libkwinnvidiahack4 libkworkspace4abi2 libkxmlrpcclient4 liblastfm1 liblightdm-qt-2-0 libllvm3.0 liblvm2app2.2 libmailcommon4 libmailimporter4 libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmission-control-plugins0 libmng1 libmpcdec6 libmtp-common libmtp-runtime libmtp9 libmuonprivate1 libmusicbrainz5-0 libmygpo-qt1 libmysqlclient18 libmythes-1.2-0 libneon27-gnutls libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomuksync4 libnepomukutils4 libntrack-qt4-1 libntrack0 libokularcore1abi1 libopenal-data libopenal1 libopenconnect2 libopenctl0.8 libopenexr6 libopenjpeg2 libopenshiva0.8 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4abi3 libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-4 libprison0 libprocesscore4abi1 libprocessui4a libpth20 libpython3.2 libqalculate5 libqalculate5-data libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqoauth1 libqrencode3 libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtassistantclient4 libqtcore4 libqtglib-2.0-0 libqtgstreamer-0.10-0 libqtgstreamerui-0.10-0 libqtgui4 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtshiva0.1 libqtwebkit4 libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-impress libreoffice-kde libreoffice-math libreoffice-pdfimport libreoffice-style-human libreoffice-style-oxygen libreoffice-writer libruby1.9.1 libsgutils2-2 libsolid4 libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libspnav0 libssh-4 libstlport4.6ldbl libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4abi3 libtelepathy-logger-qt4-1 libtelepathy-logger2 libtelepathy-qt4-2 libtemplateparser4 libthreadweaver4 libvcdinfo0 libvirtodbc0 libvncserver0 libweather-ion6 libxerces-c3.1 libxml2-utils libyaml-0-2 libzip2 lightdm-kde-greeter muon muon-installer muon-notifier muon-updater mysql-client-core-5.5 mysql-common mysql-server-core-5.5 nepomuk-core nepomuk-core-data ntrack-module-libnl-0 nvidia-common obexd-client odbcinst odbcinst1debian2 ofono okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme partitionmanager phonon phonon-backend-gstreamer pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widget-telepathy-chat plasma-widget-telepathy-presence plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text polkit-kde-1 print-manager pulseaudio-module-bluetooth python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip python-uno python-xkit python3-pykde4 python3-pyqt4 python3-sip qapt-batch qapt-deb-installer qdbus quassel quassel-data rdesktop rekonq ruby ruby1.9.1 shared-desktop-ontologies skanlite software-properties-kde soprano-daemon syslinux syslinux-common syslinux-legacy systemsettings tasks-icons telepathy-gabble telepathy-haze telepathy-logger telepathy-mission-control-5 telepathy-ring telepathy-salut ubuntu-release-upgrader-qt udisks uno-libs3 ure usb-creator-common usb-creator-kde userconfig vcdimager virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common wodim xfonts-mathml


E: Unable to locate package libprotobuf-c0-dev

Protocol Buffers C static library and headers (libprotobuf-c0-dev) has been updated to libprotobuf-c-dev in Ubuntu 16.04 and later. To install it open the terminal and type:

sudo apt install libprotobuf-c-dev


No. If they created it using the official installer, there should be almost no difference between an installation CD that someone charges you for and any other installation CD.


How can run sudo commands inside another user, or grant a user the same privileges as an admin?

you must add the postgres user to the sudo group by running the below command.

sudo usermod -a -G sudo postgres

Logout and login back to take effect.

If the above command won't work then you need to drop into root shell and then apply the above command..

How to drop into root shell?

Restart your PC.
On the group menu, select Ubuntu Recovery Option.
select root
From the root shell, run the above mentioned command.


Disabling alt+shift to switch keyboard layouts in ubuntu 18.04

The following command will let you reconfigure your keyboard setting:

sudo dpkg-reconfigure keyboard-configuration


If you are running windows and ubuntu as dual boot.

boot into windows - turn bluetooth ON - shut down - boot into ubuntu - you will find blutooth symbol appearing on left upper corner of the screen.

This is how my problem is solved in 13.10.

But this again raises a question whether my ubuntu side of system is dependent on windows side of system?


Open /var/log/dist-upgrade/apt.log

identify Broken packages , open terminal and execute following commands.

First Remove that broken packages completely (remove  if any other remain)

sudo apt-get remove --purge libopencv-highgui-dev

System Update and upgrade packages

sudo apt-get update && sudo apt-get upgrade

Fix Dependency using this command

sudo apt-get install -f

Remove unnecessary packages

sudo apt-get autoremove


USB Mouse on Laptop won't change window focus

I solved my own issue using the information found here.
http://ubuntuforums.org/showthread.php?t=1528982


There is an alternative solution for the problem. You can disable all languages system-wide, except English, but leave the languages for your current user. I'm using Ubuntu 17.10.

Go to Settings -> Region & Language -> Manage Installed Languages.

Remove all languages using "Install / Remove Languages..." button, except English (only "русский" in my case).
Apply settings system-wide.
Re-install languages that were removed on step 2.


How can I make Ubuntu only boot from SSD?

2 Options:

Option One:

I would remove the HDD, install Ubuntu on the SSD, and once the installation is done, connect the HDD again.  Open Disks from Dash, and partition and format the HDD if needed.

Image below is instructional only

Option Two:

Now if you want to have /home on the HDD, then leave the drive connected, and choose Something else, and assign /home to the HDD, or maybe /data


Cannot upgrade from disco 19.04 to focal 20.04 after end of life using do-release-upgrade method

This is the only instruction which helped me: Upgrading End of Life (EOL) Ubuntu Version Ubuntu 19.04
Quoting from the above link:

~# nano /etc/apt/sources.list

I got stuck trying to update php 7.2 to 7.4 because my Digital Ocean
server was on an older version of Ubuntu.
If I tried to update my release I'd get the following
# do-release-upgrade
Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

Please install all available updates for your release before upgrading.

When attempting to update my packages with apt-get update I would
get these types of errors.
Err:5 http://mirrors.digitalocean.com/ubuntu disco Release
  404  Not Found [IP: 172.67.168.253 80

E: The repository 'http://mirrors.digitalocean.com/ubuntu disco Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

These occur because my Ubuntu version is not only out of date but at
its end of life so updating Ubuntu to a newer version.will require me
to update my repositories.
Digital Ocean uses its own mirrors for repositories so there is a
little more work there in figuring out which ones to use.
What version of Ubuntu am I on?
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco

What repositories are being used?
~# nano /etc/apt/sources.list

Example repoistory on Digital Ocean Ubuntu 19.04
deb http://mirrors.digitalocean.com/ubuntu/ disco main restricted

Let's first get our current Ubuntu version up to date
To make the server update the files, we had to edit the
/etc/apt/sources.list with working repository locations.
To goal here, on this Digital Ocean server is to update the urls they
use for the repositories with ones you that will have the files you
need for your update
We want to replace this urls
mirrors.digitalocean.com

with
old-releases.ubuntu.com

This command will work
sudo sed -i -e 's/mirrors.digitalocean.com/old-releases.ubuntu.com/g'

/etc/apt/sources.list
Now
sudo apt-get update

will work!
Let's keep going
sudo apt-get upgrade -y
sudo apt-get dist-upgrade

Try to upgrade Ubuntu on the command line.
We are still unable to upgrade via do-release-upgrade
# do-release-upgrade

Checking package manager

Can not upgrade

An upgrade from 'disco' to 'focal' is not supported with this tool.

Frack!
So now I have my current outdated version of Ubuntu up to date, but I
can't upgrade to the next version using do-release-upgrade
You can try to upgrade manually.
First go to https://changelogs.ubuntu.com/meta-release and scroll down
to the release you want to upgrade to.
For example if you want to upgrade to Ubuntu 19.10 Eoan scroll to you
find the url to the UpgradeTool
UpgradeTool: http://old-releases.ubuntu.com/ubuntu/dists/eoan-updates/main/dist-upgrader-all/current/eoan.tar.gz

Now pull this over to a directory on your server
wget http://old-releases.ubuntu.com/ubuntu/dists/eoan-updates/main/dist-upgrader-all/current/eoan.tar.gz
mkdir eoan_upgrade
tar -xvzf  eoan.tar.gz -C eoan_upgrade

cd eoan_upgrade

Run the upgrade script
sudo ./eoan
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade


I use this script described in this post to create a hotspot in my Ubuntu server:

http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html

Basically, it helps you create a hotspot. You'll need to have two interfaces in the computer you want to use, one connected to the internet, and the serving the hotspot.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot

When it's installed, run:

sudo ap-hotspot configure

It will ask you a few questions (internet interface, wireless interface to create the access point, password) and then the hotspot can be run and stopped with:

sudo ap-hotspot start
sudo ap-hotspot stop

Note than this script automates the process of creating the hotspot, which can be done manually installing and configuring dns-masq and hostapd, but the result is the same.


I've got the same problem on Nexus 7 LTE
https://bugs.launchpad.net/ubuntu/+source/nuntium/+bug/1469496

but in my case reinstallation didn't help so far :'( and neither did this:
No mobile data on Nexus 4 Ubuntu Touch


Thank you all, I solved my problem with

How to disable Grub's menu from showing up after failed boot

I had the same problem and figured out the following solution:

Open /etc/default/grub with an editor

Add a line with this assignment:

GRUB_RECORDFAIL_TIMEOUT=N

Set N to the desired timeout in seconds in case of a previously failed boot, for example, 5.

Update GRUB:

sudo update-grub


What does this icon mean in the UbuntuOne sign up screen?

I'm sorry it isn't working for you. You should have an “on hover” text for those alert icons; in fact, I can see them right now. However, the only thing I can think of that would produce the alert in your case is that you already have an SSO account with that email address. Try logging in rather than creating a new account.


After Installing Ubuntu alongside Win 10, cant not boot into windows

Your configuration is rather confused:

Your /dev/sda has a Windows boot loader in the first sector of the disk, as would be expected for a computer booting in BIOS/CSM/legacy mode; however, that disk uses the GUID Partition Table (GPT), which is not supported by any Windows BIOS-mode boot loader. This fact suggests you may have accidentally converted the disk from Master Boot Record (MBR) to GPT form. If so, you've rendered Windows unbootable. OTOH, maybe a Windows MBR boot sector got onto the disk in some other way -- say, by being placed there by some recovery tool that didn't know it was useless on that disk.
Both /dev/sda and /dev/sdb are GPT disks with EFI System Partitions (ESPs), which hold EFI/UEFI-mode boot loaders. Neither of the ESPs seems to have the Windows EFI-mode boot loader, though (bootmgfw.efi). You might want to use Linux to manually look for a file by that name on either /dev/sda2 or /dev/sdb2, just to confirm this diagnosis. If that file is missing and the computer had been booting Windows in EFI mode, then the fact that the file is missing explains the problem.
Your /dev/sda2 does hold an EFI-mode Linux boot loader, so Ubuntu is booting in EFI mode.
Both /dev/sda1 and /dev/sdb1 are identified as Data partition (Windows/Linux) and hold FAT filesystems. This is a bit unusual. In a standard Windows installation, /dev/sda1 will be the ESP; however, manufacturers sometimes push the ESP up to /dev/sda2 and devote /dev/sda1 to a manufacturer-specific partition. This may use FAT, but it normally has a type code that would show up in the Boot Info Script output as something other than Data partition (Windows/Linux). Your comment in your question that you "reformatted all partitions in FAT" may explain this oddity -- and perhaps more. If the manufacturer put the Windows boot loader on its own partition and you then wrote a fresh FAT to that partition, then you've wiped out your boot loader.
Your /dev/sdc looks as if it holds FreeDOS, or perhaps Windows XP, depending on what bits of the Boot Info Script output you believe. Either way, /dev/sdc uses MBR. If it's bootable, it will be bootable only in BIOS mode, not in EFI mode. If you expect to switch between Ubuntu and whatever's on /dev/sdc, you'll need to use either my own rEFInd or the computer's built-in boot manager. The latter is adequate in many cases, but useless in others. (The quality of the built-in boot manager varies greatly from one computer to another.) OTOH, the boot loader information detected by Boot Repair might be leftover from an installation you're no longer using, in which case you can ignore this bullet point.

Overall, I'd say that you'll need to look to Windows tools and procedures to re-install a Windows boot loader. You may be able to adapt the procedure described in this blog post to get your system up and running; however, this is not a recipe-book solution! You'll mostly need to use steps from the second page of the blog -- "Copy Windows Boot Files" (on another computer with the same version of Windows that you're using) and "Setup the UEFI System Partition" and onward. Note that I've just skimmed this procedure, so I may be missing something important that might affect your installation. You'd probably do well to ask for help on a Windows forum -- or better yet, ask a local Windows guru friend to help you in person.


Is there an Android remote app compatible with LibreOffice Impress under Ubuntu?

You can try PPT ODP Remote Premium (2.50 €). Its description says that the server application works on Linux, too. It doesn't mention LibreOffice, only OpenOffice, but I hope they are compatible enough. But I didn't test it.

If you don't mind ads and a bit of ugliness, Ubuntu Remote Control works. It only needs an SSH server on the PC (and public key authentication is possible), and xdotool to send key strokes. You can edit the shortcut buttons by long pressing them.
Have a look at the predefined "Open Audio Player" command:

export DISPLAY=:0; xdotool key XF86AudioMedia

To send a Next (Page Down) key, use

export DISPLAY=:0; xdotool key Next

You can assign the keys in Impress so that they match - or send the correct keys with xdotool in the first place. To find the correct key names, you can use xev in a terminal.

There is also Remote Launcher Free, which needs a server program on the PC. You could use it to send keystrokes with xdotool, too.

And there are SSHmote and Coversal.


No audio on Lenovo Think Pad 11e with 20.04

You should try installing private drivers in
Software & Updates.

Check this: https://itsfoss.com/install-additional-drivers-ubuntu/


Unity is still nice for Notebooks with
  small displays, but there is no big
  advantage on the desktop compared with
  other desktop environments like Gnome
  2/3 or KDE.

Unity is still GNOME. Uses Gnome technologies under the hood. The user interface is different. Right now we have gnome-panel as user shell which is getting deprecated.

  So, thats my suggestion. But what is
  the real plan for Unity or Ubuntu in
  general? I'm curious ;)

From what I heard, they want to experiment and come up with a great user-shell for having a great user-experience. As of writing this, the experience with Unity is not top-class, but it is improving day by day.

Unity has a concept of Dash which is better explained by the screenshot below

If you are confused what various terms are used for defining various parts, then you can find it here on this AskUbuntu question

  My first suggenstion was a hybrid
  between tablet pc and a desktop, for
  example for a manager. He can plug the
  tablet in a docking station in his
  office and he can work at a normal
  desktop,

Why isn't that possible. The bigger thing is that - It lies with hardware manufacturers to have such a thing. Just like you have a Touchpad on laptop but you can connect external mouse when you put it on your desk.

Similarly, you can have Ubuntu/Unity tablet(touchscreen) which you can dock at your workplace, plug in a keyboard and start using it. If you plug in a mouse, a pointer should appear, when you unplug, the pointer should disappear.


Alright, got it working now. The USB dongle was at fault, it's somehow a tiny bit damaged, enough so it won't connect the pins to the USB of my laptop, but still reach those on my PC.


How to execute a .sh file in Ubuntu 14.04 LTS?

When you execute a .sh file using ./, assuming that the permissions allow it, you are saying to the operating system to execute the file with that name in the present working directory.

So to run the file using ./file.sh make sure you use cd to get to the directory containing the script file, before attempting to run the script.

If you're not in that directory, you can use the entire file path to run the script. If however the script is in a directory listed in your user's $PATH, then just typing the name of the script file would execute it, just like all the regular commands such as cd, ls etc.


Your browser probably un-gzipped it automatically, leaving an uncompressed file in plain tar format rather than tar.gz; when I do this for that archive manually using gunzip, I get a file of about 468 MB. Try untarring it without the 'z' decompression flag:

tar xf scilab-5.4.1.bin.linux-i686.tar.gz

or, depending on the file name:

tar xf scilab-5.4.1.bin.linux-i686.tar


How to restart process running on Ubuntu 14.x version

You can try the following commands in the terminal however it is highly recommended to just kill the service and restart it.

/etc/init.d/SERVICE_NAME restart

or

service SERVICE_NAME restart


Try repairing grup. Alongside you can add windows to the bootmenue if not already present after repairing and updating grup.

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


Delete empty "lost+found" folder automatically if it's empty

Whenever fsck goes through the system and tries to recover damaged files, it will put them into the lost+found folder. I guess this is basically a problem with fsck creating that folder even if there's nothing to put in. As Ubuntu periodically runs those checks on your partitions, those folders will always be re-created, so deleting it won't work.

If you just want to hide the folder from Nautilus, you can create a '.hidden' file containing 'lost+found' and put it into the lost+found parent's folder.

Eg. for the lost+found folder in '/':

echo "lost+found" | sudo tee /.hidden

For the one in you home directory (if any):

echo "lost+found" > ~/.hidden

I guess alternatively you can remove them after every boot by adding the following to the file '/etc/rc.local':

if [ -d /lost+found ]; then
    rmdir /lost+found 2>/dev/null
fi

if [ -d /home/USER/lost+found ]; then
    rmdir /home/USER/lost+found 2>/dev/null
fi

This will run rmdir on the folders if they exist, which only removes them if they are empty (2>/dev/null will discard the "not empty" message from rmdir). There probably aren't lots of directories, so I kept it simple. Just make sure 'exit 0' stays on the bottom line.

Downside: this only keeps track of directories created by fsck during boot. If it's run at a later time, you'll again see that directory. You then could put above into a periodically executed cron job.


This command should restart basic networking.

sudo service network-manager restart

As a side note, this won't restart any other daemons. Some fixes might require a full restart, and this command won't necessarily replace that, but it will restart networking.


Shall I install update for my self installed emacs?

In recent versions of Ubuntu there is no longer any difficulty in updating the latest stable version of emacs. If you install the emacs snap package it will be updated automatically in the background. In all currently supported versions of Ubuntu open the terminal and type:
sudo snap install emacs --classic

Snap packages have been installable in Ubuntu since Ubuntu 14.04 if snapd is installed using sudo apt install snapd. In Ubuntu 16.04 and later the snapd package is installed by default.
Similarly you can install the latest versions of many other common applications by searching for their snap packages in the Software app. An example is this question: New to Linux, trying to install FFmpeg but missing dependencies from LibaV where installing the ffmpeg snap package which has no dependencies resolved a The following packages have unmet dependencies: error message that occurred when trying to install ffmpeg with sudo apt install ffmpeg.


Citrix Receiver Shuts down after opening Ubuntu 16.04

I fixed this issue by re-hashing the certificates available to Citrix.

You may need to do this whenever they are updated.

sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/


Once you open nautilus, a daemon stays open and this controls the background.  So once you've started the nautilus daemon, just find the nautilus process and kill it, and then you can control your background again.

There are some permanent fixes here, but none worked for me: How to set nautilus to --no-desktop via gconf.  A solution would be to open nautilus with --no-desktop, but you'd have to figure out which .desktop file is pointed at by your panel.

The real fix was this: run gsettings set org.gnome.desktop.background show-desktop-icons false (found here: https://askubuntu.com/a/237984/155311).


Issue in installing Ubuntu with Windows 10

You can have only a maximum of 3 devices in your computer's Boot Menu. Disconnect the G-Drive mobile USB HDD if you are not using it to install Ubuntu, so that the Ubuntu GNOME live USB will be able to be shown in the Boot Menu.
Make sure that the Ubuntu live USB is inserted all the way into the USB port, so that it will be detected when the computer starts up.
The Ubuntu installation media should be set as the first device in the Boot Menu.
Use a cheap flash drive instead of an external hard drive with spinning disks as the Ubuntu installation media. A flash drive is faster than an HDD and works better as Ubuntu installation media.
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI is more specific to your situation than the Kali Linux tutorial that you have been following.


How to increase the size of a loop device?

I found that the best way was to format the NTFS partition and reinstall ubuntu SO in the complete partition.


A raw solution could be to create an if-up script in /etc/network/if-up.d/, something like this:

#!/bin/sh

if [ "$IFACE" = "wlan0" ]; then
  ifconfig eth0 down
fi

Remeber to give it execution permissions.


Fstab - mount a folder that has mounted folders in it

Have you tried to do this you can mount hdd drive to another, and then alter the fstab to mount the directory to the hdd whit this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/media/disk2/Video  /home/vftp/ftp/Movies/  nodev,noexec,nosuid       1
/media/disk4/Anime  /home/vftp/ftp/Anime/   nodev,noexec,nosuid       1
/media/Disk4/CartoonSeries/ /home/vftp/ftp/Cartoons/ nodev,noexec,nosuid 1
/media/Disk3/Programs /home/vftp/ftp/Applications/ nodev,noexec,nosuid 1
/media/Disk1/ /home/vftp/ftp/Games/ nodev,noexec,nosuid 1
/media/Disk3/Music/ /home/vftp/ftp/Music/ nodev,noexec,nosuid 1
/media/Disk3/Books/ /home/vftp/ftp/Books/ nodev,noexec,nosuid 1
/media/Disk3/StudyMaterial/ /home/vftp/ftp/StudyMaterial/ nodev,noexec,nosuid 1
# / was on /dev/sda3 during installation
UUID=90f5fb7f-225f-4c4c-8564-b3c2f16f683d /media/Disk1   ext4  error=remount-ro        1
UUID=34a6f835-8ec3-4feb-994d-be669a5ed6cf /media/Disk2   ext4  error=remount-ro        1
UUID=34a6f835-8ec3-4feb-994d-be669a5ed6cf /media/Disk3   ext4  error=remount-ro        1
UUID=f2d0ad61-3a36-4220-9f15-0e11fc4caedc /media/Disk4   ext4  error=remount-ro        1
/home/vftp/ftp/ /home/vftp/kevin/ /media/Disk1   1
/home/vftp/ftp/ /home/vftp/kevin/ /media/Disk2   1
/home/vftp/ftp/ /home/vftp/kevin/ /media/Disk3   1
/home/vftp/ftp/ /home/vftp/kevin/ /media/Disk4   1

and it might work fine this way.


Wifi randomly disconnects (RTL8188ee, Ubuntu 18.04)

I don't have an exact answer but I have the same wi-fi adapter (RTL8188ee) and I want to share my investigation.

In short, try to go to your Network Configuration and choose BSSID, press OK button and reconnect. This variant won't work if you use wi-fi roaming. If you use archlinux you can install networkmanager-noscan

The idea is to disable background wi-fi scanning that doesn't work properly and has errors. Maybe there are another ways to disable the scanning, try to find these variants if needed.

The source the solution is here

Firstly, there is a list of commands that can help you reveal a reason of the problem.

Look at firmware info in a log file and find realtek or rtl words. rtl is an abbreviation of realtek.

dmesg | grep -i firm

or

dmesg | grep -i firmware

or

dmesg | grep rtl

Look at a list of network cards.

sudo lshw -class network

Look at systemd journal and find an info about NetworkManager.

journalctl $(type -p NetworkManager)

Look at your wi-fi module (driver) available option list.

user@user-PC:~$ modinfo rtl8188ee
filename:       /lib/modules/4.18.0-17-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rtl8188ee.ko
firmware:       rtlwifi/rtl8188efw.bin
description:    Realtek 8188E 802.11n PCI wireless
license:        GPL
author:         Larry Finger    <Larry.Finger@lwfinger.net>
author:         Realtek WlanFAE <wlanfae@realtek.com>
author:         zhiyuan_yang    <zhiyuan_yang@realsil.com.cn>
srcversion:     69B74227D1AF7CF8C664053
alias:          pci:v000010ECd00008179sv*sd*bc*sc*i*
depends:        rtlwifi,rtl_pci,mac80211
retpoline:      Y
intree:         Y
name:           rtl8188ee
vermagic:       4.18.0-17-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4
parm:           swenc:Set to 1 for software crypto (default 0)
 (bool)
parm:           ips:Set to 0 to not use link power save (default 1)
 (bool)
parm:           swlps:Set to 1 to use SW control power save (default 0)
 (bool)
parm:           fwlps:Set to 1 to use FW control power save (default 1)
 (bool)
parm:           msi:Set to 1 to use MSI interrupts mode (default 1)
 (bool)
parm:           aspm:Set to 1 to enable ASPM (default 1)
 (int)
parm:           debug_level:Set debug level (0-5) (default 0) (int)
parm:           debug_mask:Set debug mask (default 0) (ullong)
parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0)
 (bool)

You can add these options to /etc/modprobe.d/rtl8188ee.conf file. If there is no such file then you should create the file sudo touch /etc/modprobe.d/rtl8188ee.conf
For example, we can disable power saving like that:

options rtl8188ee ips=0 swlps=0 fwlps=0 aspm=0

You can look at exact module (driver) name with these commands.

sudo apt install ethtool            # install an utility
sudo lshw -class network            # find a value of "logical name:" field (e.g. wlp19s0)
ethtool -i wlp19s0 | grep driver    # use the value of "logical name:" in the command (e.g. wlp19s0)

An example of that where rtl8188ee is a name of a module (driver).

user@user-PC:~$ sudo lshw -class network
  *-network
       description: Ethernet interface
       product: RTL810xE PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: enp7s0
       version: 07
       serial: dc:4a:3e:d3:2e:f5
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:18 ioport:5000(size=256) memory:d6000000-d6000fff memory:d6100000-d6103fff
  *-network
       description: Wireless interface
       product: RTL8188EE Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:13:00.0
       logical name: wlp19s0
       version: 01
       serial: 26:70:f9:cd:0e:3c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8188ee driverversion=4.18.0-17-generic firmware=N/A ip=192.168.1.3 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:48 ioport:3000(size=256) memory:d3000000-d3003fff
user@user-PC:~$ ethtool -i wlp19s0 | grep driver
driver: rtl8188ee

Set wi-fi region to use local area frequency.
Open /etc/default/crda file and set REGDOMAIN= to REGDOMAIN=RU for Russia (use a value of your country). List of REGDOMAIN values you can find here https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Reboot your system.
There is a case when your wi-fi module can have only one wi-fi antenna instead of two antennas. But wi-fi driver algorithms work as for two wi-fi antennas.
See:
https://askubuntu.com/a/1018851
https://askubuntu.com/a/883688
https://askubuntu.com/a/1079892
In short, you should add options ant_sel=1 or options ant_sel=2 to /etc/modprobe.d/rtl8188ee.conf and reboot your system.
You can to try install a newer driver from the driver developer repository, see https://github.com/lwfinger/rtlwifi_new
You can try to disable power saving https://unix.stackexchange.com/a/315400
In addition, you can disable module (driver) power saving by adding options rtl8188ee ips=0 swlps=0 fwlps=0 aspm=0 to /etc/modprobe.d/rtl8188ee.conf and rebooting your system.
The possible reason of the error is an background wi-fi scaning. As I understood there is an error in the driver but NetworkManager try to call this buggy background scanning anyway.
You can lock BSSID by setting it explicitly in your system Network Configurer to prevent this buggy background scanning or you can install networkmanager-noscan if you use Archlinux.

Secondly, my experience.
I have tried all of these options except installing newer version of the driver from https://github.com/lwfinger/rtlwifi_new
Now I locked BSSID and all works fine for a while. To lock BSSID just choose a value from a list in your GUI network configurer. See https://askubuntu.com/a/834013/813587


What are possible causes of appmenu-gtk failing to connect to D-Bus?

From reading the output of strace linked in the comments , here's what I found:

[pid  4245] sendto(35, "AUTH\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6
[pid  4245] recvfrom(35, "REJECTED EXTERNAL\r\n", 4096, 0, NULL, NULL) = 19
[pid  4245] sendto(35, "AUTH EXTERNAL 31303031\r\n", 24, MSG_NOSIGNAL, NULL, 0) = 24
[pid  4245] recvfrom(35, "OK f9c00ca7570590f878c4db8c5c686"..., 4096, 0, NULL, NULL) = 37

What this means is that firefox ( client ) is connected to D-Bus (server) socket which is referenced by file descriptor number 35, which you can see earlier in the strace output:

[pid  4245] connect(35, {sa_family=AF_UNIX, sun_path="/run/user/1001/bus"}, 110) = 0

and initiates negotiation via standard commands described in D-Bus documentation. According to the documentation:

  If an AUTH command has no arguments, it is a request to list available mechanisms. The server must respond with a REJECTED command listing the mechanisms it understands, or with an error.

REJECTED EXTERNAL response indicates response that the bus accepts EXTERNAL method of authentication. So the warning message likely came from the initial exchange.  However, it later succeeds with the AUTH EXTERNAL method.

Thus, the conclusion I draw from this is that

this is not a firefox bug, though might be a false positive
the fact that it is just a warning makes it somewhat insignificant issue, considering that you still can use firefox.

Additionally, /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libappmenu-gtk-module.so is a shared object which is meant to be used by multiple applications and it is not specific to firefox. Removing it may hide the warning, but it's probably not the best idea since this is a shared object and other applications may rely on it for proper working.

You can still submit a bug report with link to this answer to firefox developers as warning appears after initial negotiation method, whereas firefox probably could try other methods first before issuing the warning, however I wouldn't count on this being high-priority issue for the developers and likely it will be left with WONTFIX status.


What personalisation software is available?

A short list of software

Conky - '..light-weight system monitor for X, that displays any information on your desktop.'. You can create awesome desktops with Conky.

Compiz - 'Compiz is an OpenGL compositing manager.' You can customize your desktop with this nice piece of software.

Ubuntu Tweak - 'Ubuntu Tweak is an application to config Ubuntu easier for everyone.'

Add Unity Lenses - A list of 10 awesome lenses.


New upgraded Ubuntu 18.10 boots to blank screen (nvidia graphics card)

After some more digging, I found how to force gdm to use only Xorg:

Edit /etc/gdm3/custom.conf
Uncomment line with WaylandEnable=false

Now the system is usable again -- albeit without Xwayland.


I installed the 18.04 Ubuntu minimal CD (iso) in a virtual machine and chose Lubuntu Minimal as the desktop since an LXDE option was not specifically available.

In this system, the image for the logout banner that one sees (boxed in red) in the image below is /usr/share/lxde/images/logout-banner.png.

As for the list of options below the banner, my guess is that it is part of the LXDE source code and not something meant to be normally available to the end-user for modifying by way of an xml file.

One can look at /usr/share/applications/lxde-logout.desktop listed as "Logout" when you open /usr/share/applications in PCManFM to find the executable that generates the logout screen.

Exec=lxde-logout
TryExec=lxsession-logout

This answer also addresses the issue and concludes that

  ... after reading and researching more it does not look like it is possible to edit the logout session options without editing and recompiling the source code.


How do I clean up old packages and apps after upgrading?

The packages that were meant to be removed where removed. However, some applications were left because users may actually use them or need them. GIMP, for example, was replaced with Pitivi some time ago, but that doesn’t mean I should have to reinstall it every time I upgrade.

In other words, the fact that a package is no longer in the default selection of Ubuntu apps is no reason to automatically remove it on upgrade.

You can also remove apps by hand. This may be especially needed for Computer Janitor, because it may delete something that is actually necessary. Handle it with care if you keep it.


Ubuntu 19.10 wont boot after grub menu ubuntu selection

Let me recommend the rEFInd boot manager.  You can install it and it will find the various operating systems and let you boot them.  At least for me, on multiple machines, this "just works."

rEFInd page here: https://www.rodsbooks.com/refind/

Installation instructions here: https://www.rodsbooks.com/refind/installing.html


Custom wallpapers are not showing when selected

You have to change the file permissions by using the following code -

chmod -R 777 /usr/share/backgrounds


Remote System Monitor for Ubuntu and Android

There are a lot of ways you can use it as
1.TeamViewer for Android

VNC Viewer for Android

KDE Connect

DroidMote Client

Remote Mouse

6.Termux.... then you have to use  ssh
7.it's a bit complicate but you can use server to  check your data in your laptop but it won't gives you advantage for fire any commands ...


How to integrate Gnome Contacts with Thunderbird?

Gnome Contacts is the GUI frontend that works with Evolution Data Server. You can perform more advanced tasks on contacts in Evolution and it will show up in Google Contacts.

Export the addressbook from Evolution

To export a complete address book, click File ▸ Save Address Book As
vCard.

Then import the addressbook in Thunderbird

Click on Address Book click Tools ▸ Import and then choose the option address book and select the previously exported file.