Perhaps not coincidentally I had this problem also twice after using Bleachbit. In both cases, it may have happened when I had to shutdown Bleachbit before it finished executing because it appeared to have frozen (several hours but my drive is not very big).

In my case, I had accidentally set it to clean the empty space and, having frozen / killed it during this process, it appears to have left a randomly named folder filled with many many files which, I believe (but don't know for sure), are created as part of the process of wiping the free space on the hard drive. (Nautilus could never actually display the files - it just showed the busy icon while trying to load them so I assume that they were the many files created as a result of the drive cleaning process.)

As Mitch said I finally worked out that I could only empty the trash of these files by deleting the hidden directory ~/.local/share/Trash/files.

Credit to Mitch for answering this question (if he re-posts it as an answer) but I thought my experience would elucidate one possible cause of this problem i.e. if you had to kill Bleachbit, or it crashed, it may have left damaged files behind that could not be normally deleted.


Webcam image has weird colors and lines over the picture

With the last update of Google Talk plugin (2.6.1.0-1) the issue was solved in my Ubuntu 11.10 64b.
I still waiting for an update for Skype...

Regards.

Daniel.


Nautilus sorting by filename column seems insane

Actually comment #4 on that bug report says that if you use /etc/environment, Nautilus might follow it. Worth a go... This should copy that over:

echo LC_COLLATE=\"$LC_COLLATE\" | sudo tee -a /etc/environment

You might have to restart. And it might not work at all. And you'll have to replace the setting in /etc/environment if you ever change locale.


Will Ubuntu 12.10 run with hardware acceleration on ZOTAC ZBOX HD-ID34 nVidia Ion?

I have a ZOTAC Ion box, and while I can't guarantee that you won't have problems with this specific model, generally speaking Nvidia ION machines are well supported by the Nvidia drivers.


It looks like your computer uses the i2c-i801 module and this module was blacklisted. However, there was a recent update which removed this module from the blacklist file at /etc/modprobe.d/blacklist.conf. Execute the following commands to fix this issue:

sudo apt update
sudo apt dist-upgrade

Assuming you have made no changes to the /etc/modprobe.d/blacklist.conf you should type Y and then press  ENTER when prompted to overwrite the old blacklist file with the new file.

After the upgrade is complete, run the following command to verify this change:

grep i2c-i801 /etc/modprobe.d/blacklist.conf

This command should return nothing.

Reboot or reload your modules and then check the sensors again.


Sublime Command not working in SSH server on Ubuntu 14.04?

If you download sublime text 2 from here, you will get Sublime Text 2.0.2.tar.bz2

After unpacking archive with command

tar xfvj Sublime\ Text\ 2.0.2.tar.bz2

you will get directory Sublime Text 2, go to dir

cd  /path_to_dir/Sublime Text 2

and start text editor with command

./sublime_text

If you want to start text editor only with command sublime create sim link in /usr/bin

cd /usr/bin
sudo ln -s /path_to_dir/Sublime\ Text\ 2/sublime_text sublime

This link will allow to run text editor with command sublime

First part of problem is solved.

Exporting X Display via ssh you can have with option -X

ssh -l username ssh_server -X

With this command probably you will get your text editor in you display.


AMDGPU driver won't play audio over DisplayPort

This is a known issue the open source driver amdgpu does not support audio over HDMI/DisplayPort, yet. This feature will be available as soon as DAL (Display abstraction layer) has been merged into the mainline kernel. DAL is a new driver abstraction layer by AMD. Originally, the merger was scheduled for kernel 4.7 by AMD but there were a lot of retentions at the side of the mainline kernel developers.

Hence, at the moment of this writing (kernel 4.9 is current) you only have three choices

Abstain from audio output through HDMI/DisplayPort and wait
Use the proprietary AMDGPU Pro driver
Use a self-compiled kernel that already includes DAL

See Bug 98809 on freedesktop.org.


Automatically spin down USB hard drives after period of inactivity

hd-idle utility should be helpful

Please look at the source given below, read carefully and see if it helps:

Download source code with CVS using these commands:

cvs -d:pserver:anonymous@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle login

Hit return when asked for password

cvs -z3 -d:pserver:anonymous@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle co -P hd-idle

Debians systems:

Run: dpkg-buildpackage -rfakeroot
And to install the package run: 'dpkg -i ../hd-idle_*.deb'

Usage:

hd-idle

# This will start hd-idle with the default options,
# causing all SCSI (read: USB, Firewire, SCSI, ...) hard disks
# to spin down after 10 minutes of inactivity

Note: Please note that hd-idle uses /proc/diskstats to read disk statistics. If this file is not present, hd-idle won't work.

Information:

Running hd-idle

In order to run hd-idle, type "hd-idle". This will start hd-idle with the default options, causing all SCSI (read: USB, Firewire, SCSI, ...) hard disks to spin down after 10 minutes of inactivity.

On a Debian system, after editing /etc/default/hd-idle and enabling it, use "/etc/init.d/hd-idle start" to run hd-idle.

Please note that hd-idle uses /proc/diskstats to read disk statistics. If this file is not present, hd-idle won't work.

Command line options

-a <name>   Set (partial) device name of disks for subsequent idle-time parameters (-i). This parameter is optional in the sense that there's a default entry for all [SCSI] disks which are not named otherwise by using this parameter.
-i <idle_time>  Idle time in seconds for the currently named disk(s) (-a <name>) or for all disks.
-l <logfile>    Name of logfile (written only after a disk has spun up). Please note that this option might cause the disk which holds the logfile to spin up just because another disk had some activity. This option should not be used on systems with more than one disk except for tuning purposes. On single-disk systems, this option should not cause any additional spinups.
-t <disk>   Spin-down the specified disk immediately and exit. Use only the disk name (e.g. sda) without /dev/ prefix
-d  Debug mode. This will prevent hd-idle from becoming a daemon and print debugging info to stdout/stderr
-h  Print brief usage information

Regarding the parameter "-a":

Users of hd-idle have asked for means to set idle-time parameters for individual disks. This makes a lot of sense, not only because some [SCSI] disks may not react well to being stopped. Originally, hd-idle had one idle time for all disks. The parameter "-a" can now be used to set a filter on the disk's device name (omit /dev/) for subsequent idle-time settings.

A "-i" option before the first "-a" option will set the default idle time; hence, compatibility with previous releases of hd-idle is maintained.
In order to disable spin-down of disks per default, and then re-enable spin-down on selected disks, set the default idle time to 0.

Example:

hd-idle -i 0 -a sda -i 300 -a sdb -i 1200

This example sets the default idle time to 0 (meaning hd-idle will never try to spin down a disk), then sets explicit idle times for disks which have the string "sda" or "sdb" in their device name.
Stopping hd-idle

Use killall hd-idle to stop hd-idle. On a Debian system, use /etc/init.d/hd-idle stop.

Source:

http://hd-idle.sourceforge.net/


I cannot boot Ubuntu 16.04 on MacBook Pro(Mid 2012, macOS Sierra)

From rEFInd menu not showing on a dual Mac/Ubuntu machine

sudo efibootmgr -o 80,1

Last time, I seemed to use the liveUSB I used to install Lubuntu, choose try Lubuntu before installing, then open a terminal and run the command.


ls -1 /dev/{ashmem,binder} yields anticipated result for /dev/ashmem, but an error for /dev/binder

Reviewing the installation page for Anbox more closely, I noticed the following:

In Ubuntu 19.10 the binder driver doesn't create /dev/binder when loaded. That is intentional. Instead it provides support for binderfs (see https://brauner.github.io/2019/01/09/android-binderfs.html) which is instead since PR anbox/anbox#1309

Although the above doesn't specifically refer the situation for Ubuntu 20.04, I'm guessing that the same applies to it. With that in mind, here are proposed answers to my own questions:

Nope, /dev/binder shouldn't be created upon loading the “binder” module. (And the error message shouldn't concern me.)
There's no need (and probably no way) to force /dev/binder to be created.
There's no need to report this error on Launchpad (or elsewhere).

If anyone wants to provide an alternative (better) answer, please feel free to do so.  I'll leave this question open for a few days, but will mark it as ANSWERED if I don't see any additional answers/comments within the next few days.  :)


Update Ubuntu 16.04.3 LTS to Ubuntu 16.04.5 LTS

Point release upgrades (16.04.x to 16.04.y) are generally applied automatically whenever you update and upgrade the system from either "Software Updater" app or terminal/command line. To update from terminal/command line, run:

sudo apt update && sudo apt upgrade

To check which version you are currently using, either go to Settings → Details or open terminal and run:

lsb_release -a


“Unexpected error” when trying to get back Chrome OS from Ubuntu

Format a USB on Ubuntu if you do not have a formatted one  any format is OK, capacity 4GB+).

1) Boot into Ubuntu and open Terminal.
Type: sudo cgpt add -i 6 -P 0 -S 1 /dev/sda
Then type reboot
This will boot you back into Chrome OS

2) ctrl+d to skip OS veritifcation, login to your google account.

3) Insert a Blank USB

4) Open the chrome browser and go to chrome://imageburner

5) Burn the image

6) Remove the USB once finished

7) Turn off the device then hold ESC+REFRESH+POWER

8) Recover your device.


Ubuntu installation problem with dynamic disks

Due to limitations of the MBR partitioning scheme you can have only 4 primary partitions. You obviously tried to create a 5th primary partition, so Windows automatically converted all your partitions from basic to dynamicto satisfy your intention.

Ubuntu will see only one big partition and is not able to see how this big partition is split into several dynamic partitions, as this is a totally Windows-internal thing. It is not possible to install Ubuntu in such a dynamic partition.

You will have to convert the dynamic partitions back to basic partitions and surely you will have to delete the newly created partition first, otherwise the conversion would probably fail. All this you have to do from within Windows. The guides I found in the Internet will mostly recommend to install a third-party partition-manager in Windows which has the capability to perform the conversion, I will not recommend any software here, just search for convert dynamic disk to basic and you will find something, probably you have a good partition-manager installed already.

If everything is done successfully you will have to change your partition layout. If you have four primary partitions already but you need more partitions you have to convert one of the primary partitions into a logical partition (do that from within Windows with your partition-manager). This will create an extended partition which contains the converted partition. In this extended partition you can create more logical partitions, off course, you will have to resize the extended partition or the logical partition in it first to make space for more logical partitions. This creates unallocated space within the extended partition, leave the newly created free space unallocated.

Now you can install Ubuntu in unallocated space using the option Install alongside Windows or, if you want more control, the Something else-option.

The whole thing might be a bit confusing, especially if you are not familiar with partitioning. Converting and editing partitions goes always with the risk of data-loss, so the most important thing is to create backups first, at least back up your personal data.

The simple way around all this confusing stuff:

Purchase a second HDD/SSD (they are really not such expensive), attach it to your machine, only convert the Windows-drive to basic disk and  install Ubuntu on the new drive (if you don't convert the Windows-drive to basic disk you would have to choose the OS to start from your BIOS boot menu, this wouldn't be convenient).


When adding my Google account, how can I grant GNOME just some permissions?

There is a way to add a Google Calendar to your Calendar GNOME app, without giving all these permissions. However, this method only lets you read your Google Calendar and not make modifications to it through the Calendar GNOME app.

Open https://calendar.google.com
Open the calendar settings for a particular calendar in Google Calendar's web interface
Scroll down until you find the setting labelled "Secret address in iCal format". Copy that address.
Open Calendar, the GNOME app
Click the calendar icon, and click "Manage calendars..."
Click "Add calendar..."
Paste the address of the calendar under "Import a calendar", and click "Add".


Installing Gnome 3, should I use gdm or lightdm?

Both will work fine. You don't need both installed as gdm is a recommends dependency of gnome-shell, not a hard dependency. You can uninstall one or the other depending upon how you like them. I have used both with gnome-shell and faced no issues because of them.


Download multiple packages in parallel from a single repository with apt?

Upon digging around some more, I found apt-fast. There is an Ubuntu PPA that can be used for installation. The apt-fast command is able not only to download packages in parallel but also to download using multiple connections per package and from multiple mirrors. Documentation is all available on the GitHub page linked above.


This is usually fixed with two commands:

sudo apt-get update

To update your database to the latest packages.

sudo apt-get -f upgrade

To upgrade and fix those packages.


There are many programs like

GIMP
Scribus
Inkscape ...

But I suggest  you krita.

Install it with

sudo apt install krita

Here I add a useful youtube-demo:

https://www.youtube.com/watch?v=A7olKdIEtNQ

If you have a character make us of Perspective. This makes it easy to reuse objects,...

If you want an even more professional tool use blender!

This program takes a long time to feel comfortable, but the results are amazing!

agent 327
Hero

There are a lot of good tutorials you can find in the web, e.g. comic style in blender.
You can make 3d models and export it to krita. With blender you are even able to create cool movies!

This video explains how to save time by using 3d models blender.

Install it with

sudo apt install blender


With gnome-power-statistics.

Run in the terminal : gnome-power-statistics

A GUI will appear.It allows you to visualize the power consumption of laptop hardware.

See here: MakeUseOf and here: Ubuntu manpage

Alternatively you may use powerstat.

sudo apt-get install powerstat

Then run in the terminal powerstat. It will you necessary info.
See here: Ubuntu manpage and here : hecticgeek


You won't be able to change the translation easily. You'll need to report a bug against the Ubuntu Translations project (source) (source). You can also hunt around the Ubuntu Translations wiki page to find out more about translating.


LinuxMint has a fork of GNOME Sushi. They call it nemo-preview.
It may be installed by obtaining the needed packages manually:
cd ~/Downloads
wget http://packages.linuxmint.com/pool/backport/n/nemo-preview/nemo-preview_4.6.0+ulyana_amd64.deb
wget http://packages.linuxmint.com/pool/backport/x/xreader/gir1.2-xreader_2.8.3+ulyssa_amd64.deb
wget http://packages.linuxmint.com/pool/backport/x/xreader/libxreaderview3_2.8.3+ulyssa_amd64.deb
wget http://packages.linuxmint.com/pool/backport/x/xreader/libxreaderdocument3_2.8.3+ulyssa_amd64.deb

sudo apt-get install ./gir1.2-xreader_2.8.3+ulyssa_amd64.deb ./libxreaderdocument3_2.8.3+ulyssa_amd64.deb ./libxreaderview3_2.8.3+ulyssa_amd64.deb ./nemo-preview_4.6.0+ulyana_amd64.deb

sudo apt-get install gir1.2-gtksource-3.0

Then you have to restart Nemo by nemo -q, launch it again, select file, hit Space and enjoy.


You say you are running MongoDB as a service, so I am going to assume that you followed the instructions here to install the service and that you are starting and stopping the service using Upstart: sudo service mongodb start and sudo service mongodb stop.

If this is the case, then the Upstart job that is controlling your service will be here:

/etc/init/mongodb.conf

Let's take a look at the contents (note: you will need root permissions to edit the file):

# Ubuntu upstart file at /etc/init/mongodb.conf

limit nofile 20000 20000

kill timeout 300 # wait 300s between SIGTERM and SIGKILL.

pre-start script
    mkdir -p /var/lib/mongodb/
    mkdir -p /var/log/mongodb/
end script

start on runlevel [2345]
stop on runlevel [06]

script
  ENABLE_MONGODB="yes"
  if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi
  if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb --exec  /usr/bin/mongod -- --config /etc/mongodb.conf; fi
end script

The piece that pertains to your question is the second line from the bottom.  That is the one that specifies the config file to use.  Here is just the relevant snippet:

/usr/bin/mongod -- --config /etc/mongodb.conf

As you can see, the config file is already being specified, so all you need to do to make config changes to your MongoDB service is edit that file at /etc/mongodb.conf.

After changing your config, you will need to restart the service: sudo service mongodb restart.


setting a generic alias results in doing nothing at all

If I understand right, you want to do something that takes a command name, say dmesg, and make it into something pipes its output to lolcat.

This is still best done using functions:

dmesg () { command "$0" "$@" | lolcat; }

That's as "generic" as it comes. The command command skips functions and calls builtins or executables: What is use of command: `command`?. $0, as you realised, is the name of the function, in this being the name of the command as well. So command "$0" runs the command with the same name as the function.


The first syntax error I noticed is  \\;. It should be \;, which is a literal semicolon ; to end the -exec statement.
The directory needs a trailing slash, so that find looks inside of it.
And, as @steeldriver mentioned, \"*.html\" should be just "*.html", unless you're looking for html files with quotes in their filenames.

So, in full:

find ./components/ -iname "*.html" -exec rsync -R '{}' ./build/ \;


Is there a GUI for remapping the keyboard in Ubuntu 20.04 LTS?

It sounds to me as if you want to explore Tweaks -> Keyboard & Mouse -> Additional Layout Options.
To get an overview of available XKB options, you may want to run
man xkeyboard-config

and scroll downwards to OPTIONS.


Open terminal and put this command

sudo aptitude reinstall gnome-power-manager

it's may help you to solve this problem


Does the Samba server responds if you ping it? Some old Samba servers requires on your Windows workstation that smb 1.0 has to be installed.


It's usually a result of a driver running within the kernel. These threads don't usually show up in top and even with kernel threads showing, sometimes they don't show. I've been in your situation. There wasn't a way to show the precise cause but upgrading my graphics driver fixed the issue.

I fear the precise problem in your case is probably a regression in the kernel's drivers. My money would be on graphics.

Dislaimer: What I'm about to suggest could break things. It's unlikely but possible. If you're not happy with the command line, or don't know how to get into a LiveCD environment to fix things, I would stop reading here, just in case.

You can fall back to an older kernel (and therefore drivers) by installing the mainline packages. There isn't a simple apt-get for this as older kernel versions aren't built for Maverick. But you can get the mainline .deb files from here:

http://kernel.ubuntu.com/~kernel-ppa/mainline/

You'll probably want 2.6.32.25-lucid but you could  also try 2.6.36 to see if it has been fixed in later versions.

To test you'll need the packages for your architecture (see uname -a) and the -all package. Stick them in a directory with nothing else, cd in and run dpkg -i *.deb. You can double-click them to install but you have to do them in the right order or it'll fail.

When installed you'll need to reboot and before Ubuntu starts to load, you'll need to hold the left shift key. This will force the GRUB bootloader to show and you can select which kernel you use.

However if the older (formerly working) version doesn't work, it's a problem elsewhere.


Can I boot memtest86+ if I'm using UEFI?

Memtest86+ does not work in UEFI mode
Memtest86+ does not work in UEFI mode because it is a 16-bit program. But if you can boot the computer in BIOS (CSM, legacy) mode, it works.
See this link
Where is the memtest option on the Ubuntu 64-bit live CD?
Memtest86 works in UEFI mode
There is another version, the 'original' but now not FOSS version memtest86, and it works in UEFI mode. There is a commercial version and a free version (no cost, but not open source code).
See this link
www.memtest86.com/download.htm
Adding newest freeware memtest86 to UEFI Grub2
Here is a great tutorial on how to add the freeware memtest86 to UEFI Grub2. It's especially useful if you are working on a remote machine, and inserting a physical usb is out of the question.
See this link for the Ubuntu oriented tutorial.
https://www.yosoygames.com.ar/wp/2020/03/installing-memtest86-on-uefi-grub2-ubuntu/
See this link of an example of doing this on a remote server, but based on the above tutorial.
https://unix.stackexchange.com/a/632700/253599


Blank screen after installing nvidia-current drivers

I had a similar problem some time ago.

You may want to rename /etc/X11/xorg.conf and reboot to let Ubuntu create a new xorg.conf file.


can't find 'udevd' binary in ubuntu docker image

udev become part of systemd

Try:

/lib/systemd/systemd-udevd --debug &

Source: Comment from OP referenced guide


Ubuntu 15.04: Unable to start X after changing display driver

Step 1 : Remove nomodeset from the grub file.

Step 2 : Update GRUB - run sudo update-grub

Step 3 : Remove all NVIDIA software installed.

Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

When the login screen appears press Ctrl+Alt+F1.
Enter user name and password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Step 4 : Install the NVIDIA drivers and Optimus.

Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

When the login screen appears press Ctrl+Alt+F1.
Enter user name and password, then execute :

sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot


Wired and Wireless both are unclaimed on Alienware 18x

Both devices require drivers that are not present in 12.04.3, which uses the 3.8.0-xx kernel. We could download the drivers and all the dependencies and the dependencies of the dependencies, etc., on a USB drive and, with great difficulty, get both installed.

On the other hand, at least your ethernet is covered in Ubuntu 13.10 and, having a working connection available, we could download and install the wireless in a very few moments. I recommend you install 13.10.


Apache2 installation failed on Ubuntu 12.04

Run this command:

sudo apt-get update

sudo apt-get install --reinstall apache2 apache2-bin


Have you tried installing 3rd party drivers:
1:     Open "System Settings" -> "Additional drivers"
2:    Select "NVIDIA accelerated graphics driver (version current)" and click "Activate"
3:    Reboot


How do I get Squid to run as an anonymous proxy?

Clearing Up Conceptual Misunderstandings In Your Question

Squid isn't "anonymous"; you have to tweak the settings a lot to get it to stop advertising your host IP. There's actually an Internet standard called RFC 2616 which requires that proxies provide an HTTP header called Via: (Page 145 of RFC 2616 document). I quote:

  The Via general-header field MUST be used by gateways and proxies to
     indicate the intermediate protocols and recipients between the user
     agent and the server on requests, and between the origin server and
     the client on responses.

In other words, the HTTP/1.1 Internet standard protocol says that proxies are required to tell the server the IP address of the proxied host. So if you're going to respect the HTTP protocol, your proxy cannot be anonymous.

However, Squid does allow you to violate the HTTP standard, for whatever purpose that may serve (in general it can only serve to hurt the Internet, because breaking standards is the first step towards incompatibility...). There are configuration settings within Squid that you can change in order to hide your local system's IP, so that Squid will not "tell on you" to the remote server. I can't recommend you do this any more than the Internet Engineering Task Force can recommend it, because it would violate the standard. So I suggest you google for "Squid disable via header".

Also, as a point of fact: even if you manage to get squid to hide your host IP, servers that you connect to are still going to see the immediate IP of the server that is running Squid on it. So if your home network connection has IP address 1.2.3.4 (for example), and you convince Squid not to show your 1.2.3.4 IP to the internet, then the internet will still see the IP address of your server, which may be 5.6.7.8. And from the IP address of your server, they can eventually tell the hosting company you're using, and from that, they can file abuse reports, and possibly get your name using a WHOIS record, etc.

If you are interested in true anonymity while surfing the Internet, I recommend you take a look at Tor instead. Tor actually changes your "perceived" IP address on the public internet very frequently, by using a large network of servers, so that your true identity is very difficult to track.

The only drawbacks of Tor are:

(1) It's slow;

(2) Many websites that require authentication (https://) will throw all kinds of errors if you try to use Tor, because your IP address keeps changing, which triggers security mechanisms... they think that someone is stealing your session cookies and hacking into your account. Which is basically true if you take the design of Tor literally, haha.

Helping You Start Squid

Squid is probably failing to start because it's missing some vital configuration information. Can you check out the .log files in the /var/log/squid/ directory? Posting them in their entirety here is discouraged if they're longer than a few lines, but you can post them to a PasteBin and provide the link to the paste.

Also, refer to this Ubuntu Wiki page for general information about Ubuntu's integration of Squid.


This appears to be a "feature" of your Gigabyte motherboard called "ON/OFF Charge". From the feature's description:

GIGABYTE's latest motherboards are equipped with ON/OFF Charge technology which allows you not only to charge your iPhone, iPad or iPod Touch, but it allows you to Quick Charge it. As an added bonus, it can even be charged when your PC is turned off, so even if you forget to plug it into your charger after you've synced up your music, it will be fully charged when you need it.
[...]
* Maximum 3 devices can be charged at the same time. Charging current may vary with PSU 5V stand-by spec.

As it's unlikely that the motherboard is looking specifically for Apple devices based on a USB device manufacturer ID, I would venture that the motherboard simply provides 5V of uninterrupted power to a maximum of three USB ports regardless of whether the machine is on or not. If this is the case, then the external drive would not know to shut itself off unless specifically given a command to do so.
Because you've said that the drive will properly wind down when Windows shuts down, this has me thinking that the drive is waiting for a command from the host OS that Ubuntu may not be sending for whatever reason (some drives wait for power-off and others wait for eject).
One possible solution would be to write a script that is run whenever the system enters into a shutdown cycle to first unmount USB partitions, then send the a "power-off" command for a given device.
If you'd like to give it a try, here's how:

Open Terminal (if it's not already open)
Get the UUID for the USB disk with blkid:
sudo blkid

This will give you a list of all your devices, and you'll be looking for the one that represents the USB disk(s) you want to shut down. You may see something similar to this:
/dev/sdc1: UUID="AzJSHp-stpU-1ArB-YOMD-G7OD-l1Uz-xJhQIh" TYPE="ext4" PARTUUID="04592289-01"

Create a shell script in your home directory (or anywhere, really):
vi ~/sleep-disks.sh

Note: Feel free to use any text editor. vi is not a requirement.
Paste the following:
#!/bin/sh

sudo hdparm -Y /dev/disk/by-uuid/{disk-uuid}
exit 0

Note: Be sure to replace {disk-uuid} with the proper value determined in step 1.
Save the file
Ensure the script is executable:
sudo chmod +x ~/sleep-disks.sh

Create a new systemd service record:
sudo vi /etc/systemd/system/sleep-disks.service

Paste the following:
[Unit]
Description=Shut down external disks
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target
# This works because it is installed in the target and will be
#   executed before the target state is entered
# Also consider kexec.target

[Service]
Type=oneshot
User=alexisok
Group= alexisok
ExecStart=/home/alexisok/sleep-disks.sh

[Install]
WantedBy=halt.target reboot.target shutdown.target

Note: Be sure to replace alexisok with your actual username, and ExecStart= should point to the actual location of the shell script.
Save the file
Reload the daemon:
sudo systemctl daemon-reload

This will ensure the sleep-disks.sh script is run every time the computer is told to shut down, reboot, or halt (suspend). The hdparm -Y command tells the external disk to drop to its lowest power state, which is "off". From the documentation:
-Y     Force  an  IDE  drive to immediately enter the lowest power consumption
       sleep mode, causing it to shut down completely.  A hard or soft reset is
       required  before  the drive can be accessed again (the Linux IDE driver
       will automatically handle issuing a reset if/when needed).  The current
       power mode status can be checked using the -C option.

Alternatively ... perhaps you can just disable the "ON/OFF Charge" feature in your BIOS if this is something you never use


There are a lot of problems it could be.
-Hard drive failing, check SMART data in gnome-disks
-CPU problem. As highlighted, could be overheating or worse
-Could actually be a RAM problem - try with 1 stick if you have more than 1 (and if you have other RAM, try use that to rule it out
-OS problem in itself (maybe some logs, dumps or just a corrupted sector)
Need more information though


Specific hide delay of the classic gnome panel

The hide-delay key in dconf-editor under the entries under /org/gnome/gnome-panel/layout/toplevels/ items in the tree, looks like what you're looking for.


You get such kind of errors when the package doesn't meet the Debian policy, then it is considered to be of a poor quality.

So a better way of going round this is to use the terminal to install it. So remove all traces of what you did and go through these steps:

cd ~/Downloads (or where the chrome remote .deb file is found)

sudo dpkg -i *.deb

where *.deb is for example "chrome-remote-desktop_current_amd64.deb"

sudo apt-get install -f

But make sure you have the dependencies installed for a clean installation.


Ubuntu doesn't see my phone (Sony Xperia Tipo)

select USB Connection Mode,then choose : Mass Storage Mode(MSC)

take a look for this step by step solution

it worked for me


It doesn't look like there's a native way to do this in Netplan. I ended up putting "ip link set dev eth2 up" in the rc.local file.


Same folder and file name in same location

In Linux, almost everything is a file descriptor. A directory is a special type of file that from the user's perspective can hold other files.

So you can not have both with the same name, in the same directory at the same time.

If you could, life would become miserable for coders. What would you have the command "isDir" return when someone wants to create a directory and check for it to exists. Should isDir("/home/shrodingers/cat") return true, false or both? And what would you expect if someone wants to open a dir of a file in some code?

And what should the system do when you tell it to open something? Assume you want the file? That spells trouble ;)

By the way: this is true for ALL operating systems, not just Linux. Though from a Desktop point of view an operating system could add a unique identifier to the file or directory and remove it from the listing. From a command line point of view it would problematic though.

There is one thing we have over Windows: we use case-sensitive names. So "MYFILE" and "myfile" are different things.


You can get the radiobutton state by using their get_active() method. If you cant to keep their state between application restarts, you'll have to store their values in a configuration file. Have a look at the ConfigParser module for ini-style config storing.


To get the VPN connection to show up in Network Manager, ensure that all these packages are installed:

network-manager-openvpn
network-manager-openvpn-gnome
network-manager-pptp
network-manager-vpnc

It may be overkill but it works.

Even with this, it worked a little flakey on 16.04.  One of my PCs threw an error when I tried to open the .ovpn file.  I had to configure it manually. On a different PC it worked OK.


Detecting the name of a network device in bash?

It depends what you mean by 'active' - if you just want to see the names of all the network devices on the system, you can look at the contents of the /sys/class/net directory e.g.

$ ls /sys/class/net
eth0  lo  wlan0

To see the status, you could use the ip command on any link objects - you can parse the output to get the particular fields you want e.g. to see just the device name and state

$ ip -o link show | awk '{print $2,$9}'
lo: UNKNOWN
eth0: DOWN
wlan0: UP

If you are running a modern desktop version of Ubuntu (with interfaces managed by the network-manager service), then you should be able to get a similar device status list using nmcli

$ nmcli dev status
DEVICE     TYPE              STATE
wlan0      802-11-wireless   connected
eth0       802-3-ethernet    unavailable

or, to limit the output to particular fields in a way that's more easily used in a script

$ nmcli --terse --fields DEVICE,STATE dev status
wlan0:connected
eth0:unavailable

If you are using network-manager, you could also access device and connection properties via DBUS - see for example Dbus Tutorial - Fun with Network Manager


If you have an @example.com in your username, then you should %-encode (or URL-encode) the @, just like you would encode special characters in your password. Like so:

Acquire::http::proxy "http://jim%40example.com:123456@proxy.example.:8080/";


Building debian package with compiled source

You can do that with dpkg-deb tool if you prepare control files correctly. Extract some other package with dpkg-deb to see what's needed.

Other option: if you know CMake and CPack then it's also possible to write a CMake script to pack anything into a deb.


Ubuntu 20.04 wouldn't connect to wifi after latest update. Reinstall 18.04 and still won't work

It seemed to be some sort of error on their part where I was unable to reach the Wi-Fi login page. The support for the hotel I was staying at was able to ping my computer, and get me manually connected.


How to setup and use the vim-rails plugin?

Use vim-addon-manager to enable the plugin. To do so, open your terminal Ctrl-Alt-t and execute the following command.

vim-addons install vim-rails


Dependency problems with wkhtmltopdf when trying to install latest version

on Ubuntu 14.04

(correct architecture 32 bit)

$ dpkg -i wkhtmltox-0.12.2.1_linux-trusty-i386.deb
dpkg: dependency problems prevent configuration of wkhtmltox:
wkhtmltox depends on xfonts-base; however:
  Package xfonts-base is not installed.
wkhtmltox depends on xfonts-75dpi; however:
 Package xfonts-75dpi is not installed.

using

apt-get -f install

worked for me


Software & updates not opening in ubuntu 13.10

I had the same problem.
Just change the lsr-release info using the following steps:

Go to the Terminal and type the following:

gksudo gedit /etc/lsb-release

Edit the file so that you get the following:

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=13.10

DISTRIB_CODENAME=saucy

DISTRIB_DESCRIPTION="Ubuntu Saucy Salamander"

Note: This solution is optimized from the following answer Apt "could not find a distribution template" error


Seems that your Bluetooth driver for your Ralink device (Ralink RT3290) has a bug similar to your problem.

This Ubuntu fourm post seems to have the solution.

Make an out-of-the-way directory

mkdir ~/bluetooth
cd ~/bluetooth

Download this driver that apparently works

wget http://downloads.zotac.com/mediadrivers/mb/download/NB087_Ubuntu.zip

Unzip it

unzip NB087_Ubuntu.zip

Untar the Bluetooth driver

tar jxzf NB087_BT_ubuntu_release.tar.bz2

I'm not sure on the following because I'm on a mobile device

Hunt around for a readme or similar document, it will give you instructions to install the driver, hopefully

One installed, make this script

gksu gedit ~/bluetooth/bluetooth.sh

Insert this code into that script file

#!/bin/bash
insmod rtbth.ko
mknod /dev/rtbth c 192 0
./path/to/the/file/rtbt.bin
exit 0

Save that code and add executable privileges

chmod +x bluetooth.sh

Now, with a bit of luck, you can run it, and have working Bluetooth

./bluetooth.sh

If it works, then just set that script to run at boot up

sudo gedit /etc/rc.local

And add (Your Name = username)

sh /home/YourName/bluetooth/bluetooth.sh

...before the return 0 in the file

The Bluetooth should start up each boot up now


Safely Unmount External Drive on Lubuntu

I think udisks --detach [device] can help you.


Customizing Ubuntu to run from RAM only, within GRUB options

At the risk of getting booted off for blasphemy...

Check out Puppy Linux. It works just like you are describing as it uses the unionfs filesystem or the newer aufs filesystem running entirely in memory. Though fully GUI, the O/S has been paired down to run in as little as 32MB (yes, MEGAbytes) of RAM or as much as you can give it. Anything over about 128MB will let it work entirely in RAM and thus be lightning fast.

Version 5.2.8 Lupu is compatible with Ubuntu 10.04 Lucid and Precise Puppy 5.4.3 is compatible with Ubuntu Precise Pangolin 12.04.1+.


Every time that I restart the laptop, I need to execute sudo tee /proc/acpi/nvhda <<

/proc is a VIRTUAL filesystem that gets recreated on every boot. Generally I would expect there to be a configuration file where you can set this. If you need to do it like this add a line to

/etc/rc.local

before the exit 0 and it will get executed on every boot. Not ideal but if it works you only need to wait for a fix to arrive.

  Is really strange that Ubuntu does not fix this problem. Am I missing something? There is another way?

That really depends on the cause of the problem and how difficult it is. This is a kernel related problem so the Ubuntu team is probably waiting for a fix to arrive. There is a discussion on bug.freedesktop.org and it reads as being pretty difficult. This topic on nvidia puts a relation to nvidia-drm and systemd. If it is a bug in the DRM part that would make it out of reach of the kernel maintainers and it would be nVidia that probably needs to fix it.

All in all. I trust the Ubuntu team enough to fix what they can and expect this problem to be out of their reach.


No "Touchpad Tab" under Mouse and Touchpad settings. Detected as PS/2 Generic Mouse

Try this:

sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps

If it works add both the lines to:

/etc/rc.local

But add them without the leading sudo. So the lines you'll add to /etc/rc.local will look like:

modprobe -r psmouse
modprobe psmouse proto=imps

If /etc/rc.local ends with something like exit 0, make sure to add those lines before that exit line.


How to activate pagination for ls command?

There's no straightforward equivalent in ls itself, but there's the less utility, which will format the output of any command as seperate pages, scrollable by line or page:
ls -C | less

Where -C triggers column display. Use lah as arguments (ls -lah) to get a line by line display with all files being displayed (include hidden ones), and human readable filesizes.

To get colours to show up properly, you need to add the --color=always argument to ls, and the -R argument on less*:

ls -C --color=always | less -R

this shows 'ls -ah --color=always | less -R'

In contrast to more, less will let you scroll through the output. It's also a bit faster for very large listings.

The pipe works like this:

Every program has input and output, a pipe redirects the output of one program (ls) to the input of another program (less). And less simply expects input which it then formats.

A more old-school dos equivalent would be pg:

ls | pg

You can also

Use ls | head or ls | tail to display only the first or last part of the output
Use watch "ls" to keep the display open, updating it every few seconds to watch changes
Use banner $(ls) if you're sitting really far away from the screen. (;

If you find all of that too long to remember, you can set up an alias for it:

Open ~/.bash_aliases with a text editor and add something like this to it:

alias lsp="ls -ah --color=always | less -R"

(this is a script that is run every time a new virtual terminal is started up, you should set up all your permanent aliases there)

Now you can just type lsp, or whatever name you choose.

If you want to be able to pass further arguments to your alias, we need to define a function instead:

lsp(){ ls -ah --color=always "$@" | less -R; }

A function, principally looking like this: name(){ commands; }; can accept arguments, $1, $2, $3 and so on. $@ means "every argument, if any".

You can now run something like lsp *.py, lsp -C, and so on. We insert the arguments at the point where they get passed to ls. We could also have inserted $* for less, if it were the important command. You can see all of ls' arguments at man ls (worth a read).

*: The reason for this is, that whenever you Pipe something, it detects a Terminal (actually the other program) not capable of displaying colour. "--color=always" forces ls to ignore this. The -R switch makes less repaint the screen, escaping the colours properly.


Ubuntu 15.04 crashes or freezes when I select text in LibreOffice

Well I know this may not be an answer you want to hear, but since your not using an Ubuntu LTS version, all you can do is send a bug report. Sadly there is no other way I or a lot of other people can help you. If you are in a work intensive environment, or want a stable OS. You should install the current LTS version of Ubuntu, or its flavors.

15.04 and any non-lts release will not only be lacking in support from Canonical and the Ubuntu devs, but non-lts versions are susceptible to bugs that may not be "fixed On a dime." Just because you have the latest version of the Ubuntu, does not mean it is the best. Mainly because most non-lts versions are used as a testing ground for features. These features are not yet 100% bug tested, but are planned to be in the next LTS release, or milestone release.

So if your looking for a stable OS use the latest LTS. Below I posted Links to the ISO's for the current LTS versions of the Ubuntu flavors for 14.04. At least the most popular. I don't think your using Kylin or Mate.

Ubuntu "Unity"
Ubuntu "Gnome"
Kubuntu "KDE"
Xubuntu "Xfce"
Lubuntu "LXDE"

Sorry I could not help in any other way :'(


Quick image uploading program? (Ubuntu 20.10)

I got Shutter as a snap (?) from this link, and it installed without any problems. I'm satisfied with it.


Why won't videos on a particular website play under Ubuntu 13.04?

This might have to do with a layer of abstraction on top of Flash. You can try to install the Hardware Abstraction Layer (HAL):

sudo apt-get install hal

Reboot your browser afterwards. This will not work on Chrome, though.

Sources:

http://doc.ubuntu-fr.org/m6replay
http://helpx.adobe.com/x-productkb/multi/flash-player-11-problems-playing.html


How to enable an application to run at Ubuntu start up which is installed using Wine?

Its 100% possible. You just need to open Startup Applications and add a new startup program. The command will be something like wine "/home/$user/.wine/drive_c/Program Files/you/program.exe"

Replace $user with your username.

For example if I wanted to run IE at startup it would be something like:
wine "/home/dakota/.wine/drive_c/Program Files/Internet Explorer/iexplore.exe"

Make sure to keep the quotation marks in the command or it will not work.


Recovery action for reserved kernel page: Failed

The processor is responding to a Machine Check Exception (MCE) on a page of memory. An MCE is hardware error and may be one of the following:

1) A system bus error (data error between the processor and the motherboard).

2) Memory error: a parity check detected a memory error.

3) Processor cache errors.

In your case, I suspect a memory parity check failure occurred and the kernel attempted to use the error correction code (ECC) to try to fix this, but there were too many bits corrupted so it could not.

The first kernel message is informing you that the corrupt page of memory is a page used by the kernel itself and is being shared/used by just 1 user.

The second kernel message is informing you that the page error could not be restored/fixed.

The final kernel message refers to the fact that hardware detected the memory error, the page was tagged as needing fixing "aka poisoned" and later on when the page has been read the MCE occurred and it repored the fact that the page had been tagged as poisoned.  This is a lazy operation because sometimes a page can become corrupt but it is then later written to so it is never read, so there is no need to fix it up.

Since this is a hardware error it may be due to physical issues, or maybe just a random bit flips caused by cosmic rays. If it occurs frequently, check that the memory is seated properly.


How to make Unity permanent and not temporary?

Who wants to reset unity on every computer start up???

I had similar problem. Not after upgrading Ubuntu but when I was messing up with Compiz. So I'd say Pranav has something like Cube enabled or something similar and that is messing up his Unity.

So first I would reset all Compiz to default values, and second make sure that Unity plugin is checked in Compiz.


The virgin mobile MC 760 mobile broadband usb air card,work just fine for me but you must install it on a windows or mac machine so that you can finish activation after you buy it. Make sure that the "usb-modeswitch"is installed,it will turn it on when you plug it in.


Need Help using a Japanese Keyboard(Not IME) in Ubuntu 12.10

Go to System Settings -> Keyboard -> Keyboard Layout and try adding and trying other layouts, see if any of them work.

Here, I just tried with one named Kana, and it types directly in Japanese.


Ubuntu 15.04 crashes frequently after some time

Most probably your laptop is shutting down unexpectedly because of heat issues. Try this answer in this sense or/and you can buy an external cooler fan and put under your laptop.


D-Link DWA-130 rev E1 RTL8191SU hard time connecting

You can install a good driver by running

sudo apt-get install git
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install

Then reboot.

You will need to install it after each kernel update. You can keep rtlwifi_new folder and just run last 3 commands.

In case you have no other way to get internet connection, you can download this driver in Windows or using another computer. Do it this way:

Download the driver AS A ZIP ARCHIVE.
Extract it to your home directory. You will get rtlwifi_new-master folder there.
Run in terminal:

cd rtlwifi_new-master
make
sudo make install
sudo update-initramfs -u


From a terminal window run:

sudo dpkg-reconfigure gdm

There you should be able to change from gdm to whatever else you have installed.

If you boot to recovery mode as root, you should be able to run the same command after you remount your drive as RW:

mount -o remount,rw /
dpkg-reconfigure gdm

Hope this helps!


How do I mount a disk to provide needed space on top level directory?

I think the best solution for you, would be to clone the 80GB hard drive to one of your other drives with with "several Terra-bytes free".

Ubuntu by default will just install everything into one big / partition. If your system is set up this way, you can use something like clonezila or acronis to clone the drive and expand the / partition across the new drive. This way /var, /bin, /sbin, and /etc will all have more space.

Unfortunately there is no easy way to add more storage to the / directory without reinstalling the OS, unless your / partition is a logical volume.

Also remember, when you are going through the desktop Ubuntu installation, if you select the "something else" radio button on the partitioning page you can choose which drives are going to be mounted to which locations.

Mounting hard drives in fstab is a good idea for when you are permanently mounting drives to locations that are not critical to the OS system. If you think you will want to add more memory to the system later on, I strongly suggest that you set your system up with an LVM because this will make the process much easier for you in the future.


How to set Ubuntu to boot first instead of windows 10?

You can change the order of operating systems in GRUB using GRUB customizer. Install it using the following commands:

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

Open it up and you can easily reorder operating systems under "List Configuration".


What is the difference between mru-sources and sources in dconf /org/gnome/desktop/input-sources?

In your dconf lines..

Input Sources are your priority.. say you have 4 languages 1 2 3 4... if you add 5th language its position will be at 5th. That means your input sources will be 1 2 3 4 5. In future if you delete 3rd language.. your input sources will become 1 2 3 4 where 4 & 5 takes 3 & 4 positions.

MRU is Most Recently Used.. it varies based on your usage.. means input sources are always in that order 1 2 3 4 and MRU varies based on which language you chose most recently..

you may go through post for further understanding..
How to prevent gnome to change the language input order when switching languages?


try sudo apt-get install --reinstall indicator-datetime

or sudo apt-get install indicator-datetime

logout and log in


Gnome Shell high CPU usage after hibernation

Incomplete answer... edits forthcoming
Wayland
Try this...
You may have a problem with an older computer, with an older GPU. Try this...
sudo -H gedit /etc/gdm3/custom.conf # edit this file
change:
#WaylandEnable=false

to:
WaylandEnable=false

Save the file and quit gedit. Then reboot.
Swap/hibernation
Your swap partition, or /swapfile, is excessive.
Edit your question with the outputs of these commands, use copy/paste, not a screenshot.
cat /etc/fstab
sudo blkid
cat /etc/initramfs-tools/conf.d/resume
grep -i "GRUB_" /etc/default/grub


Flash 11.2 No Longer Supported by Google Play

For some odd reason Firefox and the older Flash player (11.2) can once again stream Google-Play movies. I have no idea what changed over the last 24 hours... Was it just a glitch or maybe a reversed decision in regards to version requirements.  Anyway, I'm a happy man again. Fingers crossed this issue will remain fixed.


Go to Ubuntu Software Center > type Ubuntu restricted extras > Install then restart your pc. Your sound drivers should surely work!

Type this in terminal make your softwares working.

sudo ln -s /opt/eclipse/eclipse /usr/local/bin
sudo chown -R root:root /usr/local/bin/eclipse
sudo chown -R username:username /opt/eclipse/eclipse
sudo chmod -R a+rwx /usr/local/bin/eclipse
sudo chmod -R u+rw,go+x /opt/eclipse/eclipse

Now this command should open your eclipse:

eclipse

or else make shortcut in dash Unity by typing this in terminal

cd ~/Desktop
touch eclipse.desktop
gedit eclipse.desktop

An empty file will open, copy this text & Paste in that file.

[Desktop Entry]
Version=1.0
Name=Eclipse
Exec=env UBUNTU_MENUPROXY= eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Type=Application
Categories=IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=env UBUNTU_MENUPROXY= eclipse
TargetEnvironment=Unity

Save it then type this in terminal:

 sudo cp ~/Desktop/eclipse.desktop /usr/share/applications

Same applies to your other software in /opt folder.


PHP doesn't work after upgrading Ubuntu 17.10 to 18.04

I reinstalled php and now it works.

  remove php completely

sudo apt-get --purge --autoremove php7.0 php7.0-common

  then reinstall php 7.0

 sudo apt-get install php7.0


I upgraded my 14.04 from kernel 3.13.0-36-generic to 3.13.0-37-generic and the system hangs

Simply boot to a previous kernel  and reinstall the kernel version and type the following

sudo apt-get install --reinstall linux-image-generic linux-image

sudo update-grub

sudo reboot now


OS X Mavericks Won't Connect To Ubuntu Server (Netatalk, Avahi)

This worked for me on Fedora 20.

Edit /etc/netatalk/afpd.conf. At the end of the file are the default parameters:

-tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so

Notice it is commented out. Uncomment the line and change it to:

-tcp -noddp -uamlist uams_dhx_passwd.so,uams_dhx2_passwd.so

I don't know if the leading space is important,so leave it in. Restart netatalk:

systemctl stop netatalk

Wait for about 20 seconds or so.

systemctl start netatalk

Adjust path names and restart commands for Ubuntu. It should work.


I think you can use EasyBCD to solve it.
First, if you don't have this software, let start Windows, search and download EasyBCD from Web and then install it.
Start EasyBCD, choose Add New Entry, then tab Linux/BSD
In Type, choose GRUB 2
In Name, change name (Optional)
In Device, choose your Ubuntu's partition
Click Add Entry.
Then restart your computer.

Hope it help.


Can I install ubuntu touch in konka KM7011BK tablet?

You can't expect it to work out of the box right now. There may be compatibility issues:

not being able to connect to the internet
simply not booting
crashing / unstability

I would advice against it, but you can always try and let us know the results.

It's not only the specifications that are important for Ubuntu Touch, it needs drivers for the hardware too. There is a big chance some of these will be missing. Every tablet is different.


Permission denied error when installing pyttsx in Ubuntu 14.04

You have to be root or use sudo to go past that screen.

sudo pip install pyttsx

On my system:

parto@parto:~$ sudo pip install pyttsx
[sudo] password for parto:
Downloading/unpacking pyttsx
  Downloading pyttsx-1.1.tar.gz
  Running setup.py (path:/tmp/pip_build_root/pyttsx/setup.py) egg_info for package pyttsx

Installing collected packages: pyttsx
  Running setup.py install for pyttsx

Successfully installed pyttsx
Cleaning up...
parto@parto:~$


Move the old configuration out of the way and log in again. Defaults should be restored.

mv ~/.config/openbox{,-backup}


difference between windows os refresh and ubuntu reload?


How can I defrag an NTFS hard drive from Ubuntu?

Personally I wouldn't bother to defrag the NTFS partition of the HDD since if you install Ubuntu on the spare part it will only use that amount as a hard drive and the rest will not be affected. Then just mount the NTFS on Ubuntu and access the files there.

An ext4 file system doesn't have the problems with empty slots as NTFS or FAT32. The problems with NTFS and FAT32 are that the storage is based on data being put in slots and if a files on fills up 15 slots but are assigned 16 slots then one slot will be empty.

Here is where defrag comes in and moves the data around so that the data is used in each slot and the empty slots are declared as empty instead of used by this and that file. This saves space and makes access times shorter since you don't have to search the whole HDD for a file.

In ext4 files are divided throughout the disk and the fields where the data is stored is linked to the original file, so a file can be stored in row 1 field 2, row 3 field 12, etc.

So moving files around to save space doesn't work in ext4, you will make no more room on the hard drive. it will be just as easy to access files as it was before. This is just an example of the principle, explaining it in detail seemed too complex right now.

Is it possible to defrag an NTFS from Ubuntu
What I've found out by searching on this topic is that there is no program to defrag an NTFS HDD from Ubuntu. The best solution is to:

Mount the HDD under Ubuntu
Copy the files to another HDD
Re-format the HDD (preferably with ext4)
Move back the files

If you don't have another drive I would

Create a ext4 partition on the empty space and move some files to
there
Remove those files from the NTFS partition
Resize the NTFS partition to make it smaller
Make the ext4 partition larger

Do this procedure until all files are moved and the NTFS partition is gone.


The following procedure is only for $XDG_SESSION_TYPE x11.

Notes:

It uses xdotool which is in the Universe repository.
It assumes you've categorized your terminal windows in such a way that each group has a common string in the title (not present in any other open windows).
In the example below, there are two groups each with three open gnome-terminal windows:

Earth 1
Earth 2
Earth 3 and
Wind 1
Wind 2
Wind 3

Important:
To ensure that the terminal window's title does not change, I had to first comment out the following lines from ~/.bashrc. If this is not done, the title will reflect the current working directory instead of retaining the title you set:

case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

I named each window using

echo -en "\033]0;New title\a"

Note that xdotool, as used here, won't handle windows named using

wmctrl -r :ACTIVE: -N "New title"

See the answer to Setting terminal window's title: wmctrl versus xdotool for a thorough explanation.

The following animated gif will illustrate using another "master" terminal, located at the top of the screen in the image, to issue code to minimize or maximize a particular group of windows.

To do so, I added the following functions to my ~/.bashrc:

mmm(){
    echo "enter KEYWORD" && read KEYWORD && xdotool search --name --onlyvisible "$KEYWORD" > /tmp/tmp.txt
}

xwn() {
    while read p; do xdotool windowminimize "$p"; done </tmp/tmp.txt
}

xwx() {
    while read p; do xdotool windowactivate "$p"; done </tmp/tmp.txt
}

mmm uses xdotool to search for the string "KEYWORD" provided by the user. "earth" in this example, is common to one group of terminal windows to be acted on. xdotool produces their window identifiers which is directed to a temporary file.
xwn uses xdotool's windowminimize action to minimize the windows specified in the temporary file.
xwx uses xdotool's windowactivate action to maximize the windows specified in the temporary file.
Note that, depending on what else has been done, it maybe necessary to run mmm immediately before xwn or xwx.

I had to use mogrify -type Grayscale -depth 7 *.png to scale down the size of the gif.


My problem was the router,and I decided to buy a new


Ubuntu Server 14.04.2 install error: can't umount /media

I found some brutal but effective method :-)
When I reach that error I simply pulled out the USB stick wait for about 10 seconds and push it in again. Waiting for another 10 seconds, enough to be mounted. After that, I choose to retry the CDROM search and... voila, the installation goes on.
Once again, it is brutal and can damage your USB stick, but it worked for me.


The issue was caused the KVM switch doesn't support EDID communication between connected systems and the share monitor.

You should find a KVM switch support " FULL-time EDID emulation".


Installing packages upon installation automatically

You can use any file for that. Just create a file packages in your home folder. List there all the needed packages and install them by

cat packages | xargs sudo apt-get install

or

xargs -a packages sudo apt-get install

The same way you can remove or purge a list of packages.

The list may look like

vlc
ubuntu-restricted-extras
mc


BCM4311 "wireless is disabled by a hardware switch"

try running the following from terminal window:

SUDO RFKILL UNBLOCK ALL

This worked for me. Make sure the hardware switch is on when you run this command. good luck.


dns server assigned from dhcp is equal to the address of the client

Because Ubuntu uses dnsmasq as a local caching dns server to reduce redundant requests going to the real name server and speed up name resolution.  Normally /etc/resolv.conf just points to 127.0.0.1, but it looks like you removed the loopback interface ( lo ) from your /etc/network/interfaces auto line so I'm guessing your DHCP assigned IP address is the only valid address it could use.  You should probably put the loopback interface back on the auto line of your interfaces file.


“门” looks weird on my system default font

You can use fc-list :lang=zh-cn to list all fonts you install. I believe it is the bug in Ubuntu. Your system may use the wrong font to show simplified Chinese.

Take a look at your /etc/fonts/conf.d/64-language-selector-prefer.conf file, you may find the following:

<alias>
      <family>sans-serif</family>
      <prefer>
         <family>Noto Sans CJK JP</family>
         <family>Noto Sans CJK SC</family>
         <family>Noto Sans CJK TC</family>
      </prefer>
   </alias>
   <alias>
      <family>monospace</family>
      <prefer>
         <family>Noto Sans Mono CJK JP</family>
         <family>Noto Sans Mono CJK SC</family>
         <family>Noto Sans Mono CJK TC</family>
      </prefer>
   </alias>

What you need to do is move JP item to last. Highly recommand you to install Google Noto.

You can found more here.


Twitter is missing from the list of Online Accounts in Ubuntu 14.04 - GNOME

Try to reinstall account-plugin-twitter

sudo apt-get install account-plugin-twitter

Or you can try to install all account plugins:

sudo apt-get install account-plugin-*


I installed Ubuntu (was using a USB version) and the command sudo apt install libavcodec-extra worked.
After enabling DRM in Firefox and rebooting the app, I'm now able to watch streams.
thanks for your help


Where is the source repository of "Ubuntu on Windows 10"?

It is currently not an open source project as stated in the GitHub repo for Bash on Windows.

You can vote for making it open source by going to the Windows Developer Feedback site. Hopefully Microsoft will listen to what the community is asking for.


how do you setup email notifications with thunderbird, for when the main app isnt open?

This is not possible. How should Thunderbird check for emails without being started?

you could install an extension which allows you to start Thunderbird minimized

such as this one

all you have to do now is to start Thunderbird with your System, autostart can be found at the gnome session properties, just hit alt + F2 and type in gnome-session-properties.

Click the Add button and just add Thunderbird to it.

Last but not least, how to check periodically? Simply go to the email account settings by

rightclick the E-Mail Account -> Settings -> Server Settings and check the option

[ x ] Check for new messages every ___ minutes

(p.s.: since i can't take screenshots right now i just highlighted it, i will add screenshots later)


How to host a site using apache2 on Ubuntu 20.04 with ip_adress/phpmyadmin accessible

When installing phpMyAdmin it is usually shipped with a configuration file for Apache - /etc/apache2/conf.d/phpmyadmin.conf. If this file is not present, try to enable it with the following commands:

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo systemctl restart apaache2


How to open a terminal on remote desktop of Ubuntu 18.04

Sounds like your DISPLAY environment variable is set to the original session (e.g. set as DISPLAY=:0), instead of set for your current session. Each session will create its own (virtual) display, and only the one you used when seated at the computer will be displaying on the local monitor.


Can Evince doul view change page combinition?

In Evince just click View
and, checked enable odd Pages left,

Hope this helps.


I think the command is wrong. I successfully used:

printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

Found here.

Note that in some resources the backslashes are missing (leading to the same error message).


Running apache2 server on ubuntu docker container

Ok, I think you are more interested on creating a Dockerfile that runs with Apache so here we go. I provide instructions to install Apache with PHP and MySQL.
If you just want Apache remove the PHP and MYSQL packages from apt install.
Even if you use Ubuntu 14, you can run Dockers with more recent Ubuntu distributions. I recommend to work with Apache 2.4 and 2.2 is End of Life (EOL).
You have to create a file called: Dockerfile
FROM ubuntu:19.04

ARG DEBIAN_FRONTEND=noninteractive

# That is not needed
# RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf

RUN echo "Europe/Ireland" | tee /etc/timezone

# Note: You should install everything in a single line concatenated with
#       && and finalising with apt autoremove && apt clean
#       in order to save the maximum space on the layer.

#       In order to use the less space possible, as every command is a layer
RUN apt-get update && apt-get install -y apache2 ntpdate libapache2-mod-php7.2 \
mysql-server php7.2-mysql php-dev libmcrypt-dev php-pear git && \
apt autoremove && apt clean

# Enable mod rewrite. Optional, required for CMS like WordPress to rewrite urls
RUN a2enmod rewrite

EXPOSE 80

CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]

Then you will do in the same directory:
sudo docker build -t trinity .

And to run it:
sudo docker run -d -p 80:80 trinity

If you need to enter interactively:
sudo docker exec -i -t trinity /bin/bash


In a virtual environment the guest will always show as ethernet connection even if the host is using wifi that is because the guest does not see the hosts hardware it is contained within the virtual environment.

The only exception to this rule is if you use an usb adapter for wifi then it can been seen by the guest machine.


Difficulties in configure proxy setting on ubuntu 17.10

try this

# create file:
sudo vim /etc/apt/apt.conf.d/80proxy
# with this inside file
Acquire::http::Proxy "http://user:pass@proxy-host:port/";


How to deal with bugs in proprietary legacy driver?

According to this page, you can report bugs to ATI/AMD on their bug tracker:

http://ati.cchtml.com/

However they state:

  These sites are community resources, and are not supported by, or
  affiliated with AMD in any way

There appears to be no supported way for community members to report bugs other than through that or via your distribution.

  Do proprietary drivers get modified by community to provide latest fixes at the expense of decreased stability?

No, those drivers are closed source and community members don't have access to the source code.


19.10 - NVMe - blk_update_request errors

Problem solved. WD Black SN750 install to replaced SL Hynix PC 400. No more errors. Install on PC400 took 35ish minutes. Install on SN750 took 2. PC400 appears to be OEM limited and replaced by the PC401 shortly after release.


Just go to the Ubuntu One web interface and click on Login. Login with your email and password. Then, click con Files and navigate to the file you want to delete.

When you see the file, just click on More and then Delete File.

I hope it works to you!


According to this SU answer "How to clear DNS cache in Ubuntu?", Ubuntu by default does not provide DNS cache service. But if you have one that you installed manually, you could usually restart those services to clean the cache. Here are some examples (source):

Run this command to flush DNS:

sudo /etc/init.d/dns-clean restart

Followup the above command with this:

sudo /etc/init.d/networking force-reload

To flush nscd DNS cache:

sudo /etc/init.d/nscd restart

To flush dnsmasq DNS cache:

sudo /etc/init.d/dnsmasq restart

If you use BIND this should flush DNS:

sudo /etc/init.d/named restart

or

sudo rndc restart

or

sudo rndc exec

BIND (>= v9.3.0) supports flushing records from a particular domain and also the lan and wan views.source Examples:

   sudo rndc flush

   sudo rndc flushname askubuntu.com

   sudo rndc flush lan

   sudo rndc flush wan


Getting a new usb wifi dongle working, old one still works?

You need to install the driver from this git repo:
sudo apt install build-essential dkms
git clone "https://github.com/RinCat/RTL88x2BU-Linux-Driver.git" /usr/src/rtl88x2bu-git
sed -i 's/PACKAGE_VERSION="@PKGVER@"/PACKAGE_VERSION="git"/g' /usr/src/rtl88x2bu-git/dkms.conf
sudo dkms add -m rtl88x2bu -v git
sudo dkms autoinstall

(and probably reboot).


Installing desktop environment changed BG in GRUB2

step 1 Install grub customizer

step1.a open a terminal - hold down CTRL and ALT keys and tap T

step 1.b sudo add-apt-repository ppa:danielrichter2007/grub-customizer

step 1.c sudo apt-get update

step 1.d sudo apt-get install grub-customizer

step 2 run grub customizer

step 2.a select Appearance settings tab

step 2.b choose the color(s) you desire for font, background and highlighted font and background from the selections on the left of the window. Do NOT choose the same color for font and background as you will effectively blind yourself to the choices on the grub menu.

step 2.c Click save

step 3. Choose File then Install to MBR (you should get the option to choose the original drive you placed the MBR on when installing. In my case /dev/sda)

step 4. Close grub customizer

step 5. reboot.

For changing the splash screen look here.

How to Change the Splash Screen


Package 'openbsd-inetd' has no installation candidate

It seems that the package does exist (package search here). My only suggestion is that you have somehow incomplete package listings.

Try this command in a terminal:

sudo apt-get update

The retry

sudo apt-get install openbsd-inetd

You can find further information about this error here:

What does Package <package> has no installation candidate mean?


How do I make Dash only show installed applications by default?

You will need to install dconf-tools, then launch and use Dconf-editor for making the change permanent

Once dconf-editor is open, use the left panel to navigate to dekstop/unity/lenses/applications.

By removing the tick from display-available-apps the applications from Software Center will be no longer displayed in the dash.

If you want to show them again, you will have to these steps again and put the tick back. In other words ,you will not be able to enable the Suggestions again by just using the Filter of the dash.


What is the difference for installing Nginx with the official repository and Ubuntu repository?

There will be no significant difference, however:

Installing packages from Ubuntu repository in some cases is safer and solid, because you stick with something that was well tested for your distribution, before being distributed. It will be also properly handled during dist-upgrades.

On the other hand, if nginx itself has its own repository, suited for your distribution, it's worth going with it, as you'll get the most up-to-date version of the software.

  Which method is recommended

It's always recommended to use official Ubuntu repositories when it's possible. Any custom repository may cause problems or incompatibilities at some point. However in this case I think it's fairly safe to stick with PPA. I believie folks behind nginx know what they're doing :)


No, you need a router. You should define NAT rules in the admin page or in the configuration file of the router. On many routers, outbound NAT is automatically defined which will give devices on the LAN side automatic access to the Internet via 1 public address.
If your goal is to provide NAT'd Internet access to the the nodes and MAAS controller on the MAAS/DHCP/DNS LAN #2 network, you will need a router between LAN 2 and your network with public Internet IP addresses. The router's WAN interface would get a public Internet IP (NAT outside in Cisco land) and the router's LAN interface would get a private IP (NAT inside in Cisco land) and that private IP would be the Internet gateway address for your MAAS controller and it's nodes.
No, switches do not normally handle NAT.

From: http://www.iana.org/glossary

network address translation (NAT)
A system of using private IP addresses within an internal network (such as within a home, and office, or even within an ISP), and then having those numbers converted into a real IP address when Internet traffic leaves that network using a specialised router. This is commonly used within homes, for example, so that users do not have to apply for an extra IP address each time they connect a device to the network. It is very similar to using “extension numbers” within an office telephone system

From:

http://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html

Q. How does NAT work?
A. Basically, NAT allows a single device, such as a router, to act as an agent between the Internet (or public network) and a local network (or private network), which means that only a single unique IP address is required to represent an entire group of computers to anything outside their network.

Q. How do I configure NAT?
A. In order to configure traditional NAT, you need to make at least one interface on a router (NAT outside) and another interface on the router (NAT inside) and a set of rules for translating the IP addresses in the packet headers (and payloads if desired) need to be configured. In order to configure Nat Virtual Interface (NVI), you need at least one interface configured with NAT enable along with the same set of rules as mentioned above.

(EDIT:)
Upon further review, it seems your network needs are similar to the scenario listed at: http wiki dot cloudbase dot it/maas (I need at least 10 reputation to post more than 2 links)

That means you would need to make your Ubuntu MAAS server act as your router/firewall between it's two interfaces to allow the machines attached to the private network interface (your LAN #2) to access the Internet via the public interface (your LAN  #1):

From: http://wiki.cloudbase.it/maas

Configure firewall and enable ip forwarding

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
sysctl -p


Mount ZFS dataset in unprivileged containers

If indeed mycontainer is unprivileged, then its owner might not have access to the path /pool/mydataset. Users in unprivileged containers have their uid offset on the host by the container-owner uid, so user1 inside the container isn't the same as user1 on the host.

You can check what user on the host owns the container with sudo ls -l /pool/lxc | grep mycontainer (sudo might not be required, depending on /pool/lxc's permissions, but ls should be safe enough to run as root either way. Going forward, omit sudo where desirable if permissions make that possible). For example, I get

drwxr-xr-x 4 100000 100000    5 Apr 22 11:37 mycontainer

showing that the uid and gid of the container's owner is 100000 (we see a uid instead of a name since the user doesn't exist on the host).
Test /pool/mydataset's permissions with sudo ls -l /pool | grep mydataset (or sudo ls -l /pool/mydataset for its contents).

If you want the files to be writable from within the container, you just have to make sure whichever user inside mycontainer you want to be able to write to /pool/mydataset has permissions to do so on the host. E.g., root on mycontainer has uid 100000 on host, and if user1 in mycontainer has uid 1001 (test with id user1 from within the container) then on the host its uid would be 101001.

You might do that by allowing everyone on the host to write to /pool/mydataset with

sudo chmod -R o+w /pool/mydataset

(note: this will add permissions recursively inside /pool/mydataset), or perhaps better to make sure users in group user1 have write permissions (set it recursively with sudo chmod -R g+w /pool/mydataset if not), then add the owner of the container to group user1 with

sudo usermod -a -G user1 <username>

(In my case above, we saw that no user on the host owns the container, so we should first create a user with uid and gid 100000 with

adduser --no-create-home --uid 100000 --disabled-password --disabled-login <username>

Of course, you might wish to give permissions only to user1 inside the container, so create a user with its host uid and add that to group user1 on host, e.g., 101001.)

You can also go nuclear and give ownership of /pool/mydataset to mycontainer's root with

sudo chown -R 100000:100000 /pool/mydataset

but that could mess with other users on host accessing the data.

Once you've done that, the mount you set should allow write permissions inside mycontaier, as desired.


Ubuntu 12.10 NVIDIA 304.43 (and others) - saving xorg.conf causes high CPU usage

I had a similar problem, which I able to solve by enabling ACPI in my BIOS. It had been disabled, which had apparently caused the problem.

I tested to see if there was still a performance problem after changing the BIOS settings, and it appears to be running very well. Blender runs at 60 fps! On a freshly installed system the nvidia-current-update driver package, the process listed as /usr/bin/X : 0 -core -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch only uses 1% of the CPU.

Detailed machine/software specs.

So, try making sure ACPI is enabled in your BIOS settings.


What package should I include as build-depend based on this error

Based on your Qt 5.2 builds, you are installing the libraries to /opt/qt52. This isn't the standard place for libraries, and therefore the libraries are not found by shlibdeps (and also probably wouldn't run on a user's computer because there is no RPATH specified). Instead, you should install libraries to /usr/lib, which is the standard place in Precise.

Also, typically, library packages are split into three packages: a package that only contains the runtime library (what the user would need just to use the library in an application), a development package (what a developer would need, which includes the headers and the development library symlink), and a debug package. Your current structure has the runtime package and the development package combined, which means that users will have to install more stuff than necessary. You might want to look into splitting that package (see a sample debian directory that Debian uses for Qt 5.2.1; note that the -dev package files are specified in the qtbase5-dev.install-common file).


A half-baked solution is to use a GNOME shell extension called MultiClock. Its limitations are:

Only one extra clock
Very limited number of time-zones to choose from (more can be added editing its source, see below)

This extension depends on the gir1.2-gnomedesktop-3.0 package, install it first (if not installed already) by running

sudo apt install gir1.2-gnomedesktop-3.0

How to install the extension

You can install the extension by clicking on the ON/OFF toggle in this webpage (you may have to install the chrome-gnome-shell package and a browser add-on/extension suggested by the webpage first).

How to add more time-zones for selection

Open the ~/.local/share/gnome-shell/extensions/MultiClock@mibus.org/extension.js file with a text-editor, for example run

gedit ~/.local/share/gnome-shell/extensions/MultiClock@mibus.org/extension.js

In the Timezones section (line number 22) add your preferred time-zone following the format of the default ones, e.g.

'UTC': { hr: 0, min: 0, tzname: 'UTC' },

(Google the correct tzname for your preferred time-zone)
Save the file.
Log out and log in again.


How do I install Accelrys DS Visualizer on 14.04?

See if the following link would not help you:

https://extras.csc.fi/biosciences/DS/share/htmldoc/Install/DSVisualizer/inst_linux_install.html

I will try and report back.
Gert Kruger


ASUS All-in-one model ET2410IUTS-B034C touch screen drivers Ubuntu 12.10

you can dowload a deb from the following link https://launchpad.net/~djpnewton/+archive/xf86-input-nextwindow


Upgraded 14.04 LTS to 16.04, cannot login as splash-screen just keeps looping and no login possible

While upgrading to 16.04.1, I had selected gdm3, instead of gdm, this was the root cause. Used root shell in recovery mode, and installed gnome, gnome-shell, ubuntu-gnome-desktop and gnome-session. rebooted and can now GUI is back and very pleasing in 16.04.1. I use metacity gnome option...Regards


Try checking the version of Gnome Shell set for the extension. In metadata.json file in the folder of the extension, find "shell-version". It's one of the most common reason extensions won't work. To get version of Gnome Shell, "gnome-shell --version" in terminal.
Try installing the looking glass extension to find the error message if the above didn't work.


No Network Devices Available after fresh install of 12.04

You may need to install some additional drivers. Go to System Settings -> Additional Drivers and if a network driver is listed there, install it.


Which are the advantages of `sudo` defaulting to keep $HOME?

You are correct in pointing out potential problems with sudo and applications that write files in $HOME.

The reason for this behaviour would not really be a conscious developer choice, but more that it wasn't really necessary for the intended purposes for which  sudo was first conceived: for use with simpler unix-style applications that just take some input and return some output in a predictable manner and then return.  It wouldn't originally have been designed to contend with larger applications that run interactively and manage their own files.

As rightly pointed out, sudo -i <command> is good for any application that's interactive (think of the i as standing for interactive, even though that's not what it stands for).  -i has further theoretical benefits over -H in that the target user's environment, eg .profile, is read too.

There's also gksudo <command> for graphical interactive applications, but sudo -i <command> works well enough for those too.

If you don't want to type sudo -i <command> all the time you could create a script/alias for it I guess.


12.04 LTS - Recent update: Fails to boot with version 3.8.0-37 generic

I too just rebooted and 3.8.0-37 paniced during init for me, repeatedly. I finally picked 3.8.0-36 during boot in grub and it booted fine.


How do I solve this error on Ubuntu Hirsute Hippo (21.04)? Updating Core 18 " Snap has no update available"

It seems 20.04 was hit with this as well. Maybe the bug filtered itself into 21.04 as well?
See here: https://askubuntu.com/a/1286711/1229506


At the login screen, select your username, then click on the cog wheel icon, and select Kodi, then enter your password.


Terminal is blank on second user account

This problem can occur when some of shell initialization files (like .bashrc, .profile, .bash_logout) which are hidden files are missing, empty or corrupted. To solve this problem, from the main user account run the following commands from terminal as superuser:

# copy .bashrc .profile, .bash_logout files from /etc/skel to the new home directory of user2
sudo cp /etc/skel/.bashrc /etc/skel/.profile /etc/skel/.bash_logout /home/user2
# be sure that user2 is the owner of the previous copied files
sudo chown user2:user2 /home/user2/.bashrc /home/user2/.profile /home/user2/.bash_logout


Firejail can be configured to use a "whitelist" of files allowed to be kept, which would allow you to use it without the files you want to keep being deleted. If you simply want to see what files would be written you can also read the logs.

https://firejail.wordpress.com/features-3/man-firejail/

   --read-write=dirname_or_filename
          Set  directory  or  file  read-write.  Only files or directories
          belonging to the current user are allowed  for  this  operation.
          Example:

          $ mkdir ~/test
          $ touch ~/test/a
          $ firejail --read-only=~/test --read-write=~/test/a

Running apps within Docker will be a much complicated situation and won't work unless they are command-line applications since there is no graphic server sharing without additional configurations. Also docker is more designed to help these individual containers talk to each other, something you haven't said you needed (and likely don't need in this sandboxing model)


Editing watermarks from docx documents in libreoffice

Open the Navigator (from the View menu, or by pressing F5).

The last item in the list should be Draw Objects. Expand this by clicking the little arrow on its left.

Select and delete one by one all watermarks (in case there are multiple ones).

Source: AskLibreoffice - Turning off Draft watermark?


Useless newlines on incoming messages in pidgin when using pidgin-sipe

I fixed this by hacking pidgin-sipe myself. It's probably bad code, but hey, I'm bad at C. All it does is remove occurrences of
 in messages. Here's the patch, in case anyone else encounters the same problem:

*** purple-im.c     2016-12-18 18:19:07.000000000 +0100
--- /tmp/purple-im.c        2018-04-18 15:49:48.915516011 +0200
***************
*** 43,60 ****
  #include "sipe-core.h"
  #include "sipe-nls.h"

  void sipe_backend_im_message(struct sipe_core_public *sipe_public,
                         const gchar *from,
                         const gchar *html)
  {
    struct sipe_backend_private *purple_private = sipe_public->backend_private;
    purple_serv_got_im(purple_private->gc,
                from,
!               html,
                0,
                time(NULL));
  }

  void sipe_backend_im_topic(struct sipe_core_public *sipe_public,
                       const gchar *with,
                       const gchar *topic)
--- 43,102 ----
  #include "sipe-core.h"
  #include "sipe-nls.h"

+ static void str_replace(gchar *target, const gchar *needle, const gchar *replacement)
+ {
+
+     gchar buffer[1024] = { 0 };
+     gchar *insert_point = &buffer[0];
+     const gchar *tmp = target;
+     size_t needle_len = strlen(needle);
+     size_t repl_len = strlen(replacement);
+
+     while (1) {
+         const gchar *p = strstr(tmp, needle);
+
+         // walked past last occurrence of needle; copy remaining part
+         if (p == NULL) {
+             strcpy(insert_point, tmp);
+             break;
+         }
+
+         // copy part before needle
+         memcpy(insert_point, tmp, p - tmp);
+         insert_point += p - tmp;
+
+         // copy replacement string
+         memcpy(insert_point, replacement, repl_len);
+         insert_point += repl_len;
+
+         // adjust pointers, move on
+         tmp = p + needle_len;
+     }
+
+     // write altered string back to target
+     strcpy(target, buffer);
+ }
+
  void sipe_backend_im_message(struct sipe_core_public *sipe_public,
                         const gchar *from,
                         const gchar *html)
  {
    struct sipe_backend_private *purple_private = sipe_public->backend_private;
+
+     const size_t target_size = strlen(html) + 1;
+     gchar copy_of_html[target_size];
+     strncpy(copy_of_html, html, target_size);
+
+     str_replace(copy_of_html, "
", "");
+
    purple_serv_got_im(purple_private->gc,
                from,
!               copy_of_html,
                0,
                time(NULL));
  }

+
  void sipe_backend_im_topic(struct sipe_core_public *sipe_public,
                       const gchar *with,
                       const gchar *topic)


I had a similar issue and re-installed paluseaudio and that helped. But try a different headset or earbuds first to see if the hissing is still there, then you know its the headset.


Installing python 2.7, numpy, and pandas

Download the latest numexpr from Github and follow the installation procedures listed in the INSTALL.rst file. This should hopefully solve the problems with numexpr and pandas


It is my understanding that Gnome desktop doesn't use any icons.  If you need to use Ubuntu One you type in the search box "Ubuntu One" and it should be displayed to you.

Here is a nice tutorial on how to enable the desktop icons/right click though.  http://joesteiger.com/2011/07/02/enable-desktop-icons-and-right-click-gnome-3-gnome-shell-ubuntu-11-04/

I don't run Gnome personally so sorry I can't be of more help otherwise I would try it out, but maybe this will get you were you need to go.

This tutorial might also prove useful for you http://www.liberiangeek.net/2012/04/add-application-shortcuts-to-your-desktop-in-ubuntu-12-04-precise-pangolin/


System Settings started working after I restarted the system.


Cannot mount one usb disc, although other mounts automatically after 12.10 upgrade

It seems I found the answer for the topic starter, also I had to experience it myself.
According to kernel blogs there is a strange behavior then using vfat with "x-gvfs-show" option. Now it can be solved by removing this option for vfat partition.
The option is used only to show device shortcut in Gnome and Unity then this one is mounted in a location different than "/media". So there is a way to configure vfat to be mounted under "/media" and to remove "x-gvfs-show" option from mount options (Can be easily done via Disks utility). Works very well for me.


Disable low battery notifications/warning on 15.04

What worked for me (on Ubuntu 16.04) was uninstalling the battery indicator:
sudo apt-get remove indicator-power

Followed by a reboot.


I am assuming you have both Ubuntu and WindowsXP installed in a "permanent", dual-boot install, not a Wubi install.  Also I'm assuming that your computer loads into Ubuntu by default.  If not, please don't do this just yet.  Change Ubuntu to your default first, then delete Windows.

Search for the "Disk Utility" program and open it.  Have a look around at the disks on your left, and you should find the disk (or 'partition' if you have windows installed on the same disk as linux) that Windows XP is on.

Under "Volumes" select the Windows partition

And then click "Format Volume".  This will wipe out the XP installation, and you can choose to give the drive another name for use in Linux.  (By the way, leave "Type" set to "Ext4").

If the Windows partition was on the same drive as your Linux, depending on how it's setup you might also be able to choose "Delete Partition" and then resize your Linux to fill up the space, but this doesn't always work.  Easier to format it and give it a new name.


`http_proxy` not showing up with `printenv` on WSL

WSL doesn't use the PAM stack when starting a shell (login or not), so  PAM-based things fail:

/etc/environment and ~/.pam_environment, read by pam_env, don't apply (WSL #1405)
default umask from pam_umask isn't set (WSL #352)
limits from pam_limits (WSL #1576)

Specifically for environment settings, it might be simplest to just add those to .profile (if running login shells) or .bashrc, with export.

Generally, there doesn't seem to be a simple solution.

You could log in again as your user:

sudo -iu "$USER"
su - "$USER"

These should load the PAM configuration in /etc/pam.d/sudo or /etc/pam.d/su respectively. But these are slightly different from each other, and also different from /etc/pam.d/sshd or /etc/pam.d/lightdm, so not everything would be the same as if you logged into an actual Ubuntu system via the GUI or SSH.

(Both sudo and su would ask for passwords, but both can be configured to not ask for passwords.)


I had installed it via tha following command :

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Hence my uninstall command was :

sudo apt-get remove --purge qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Which worked fine for me.


First full backup on USB: Permission denied

You need to set ownership & permissions.

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

If mounted at /media/stacyjane

sudo chmod -R a+rwX,o-w /media/stacyjane
sudo chown -R $USER:$USER /media/stacyjane

Note that the -R is recursion and everything is changed, do NOT run on any system partitions.
All directories will be 775.
All files will be 664 except those that were set as executable to begin with.

The -R parameter is recursive, so it will apply to all lower directories & files, but do not use on any system partition, just data.

see also

man chmod
man chown


open a executable file with crontab and show it on monitor

If you wish to see the contents of a compiled file, have cron kick off a hex editor with the compiled file name as a parameter. A few are listed here in no particular order, such as the GNOME Hex Editor.


digital tablet which is capable of giving input to my applet?

Many digital tablets are supported in Ubuntu, including many models from Wacom, as well as some less well known manufacturers such as Huion, KYE, UC-Logic, Waltop through the DIGImend project. All of these tablets will be able to interact with your applet. However, if you need to measure how hard the pen is being pressed (pressure), that is a Java question, which is best suited for StackOverflow.


Setting gmail as default for sending files via email

After you install gnome-gmail or desktop-webmail for Ubuntu 16.04 you need to set it as the default mail application. Some instructions online say to go to Applications - Internet but that is for older versions. For Ubuntu 16.04 you need to go to System Settings -> Details -> Default Applications where you will be greeted with this screen:

The second option Mail will contain these options (after installation steps in the question):

Thunderbird
Gnome Gmail
Desktop Webmail

In the example above Gnome Gmail has been selected as the default mail application. Now when you click to send files in LibreOffice gmail will be used instead of Thunderbird configuration popping up.


does pip3 install only in my environment?

With the source command you are activating the virtual environment, which can be noticed by (venv) in your terminal (that's the name of your virtual environment).
Every package you are installing now will only be available in your virtual environment.
You can view them in your created virtual environment directory.


Wow, nobody found that?

locate shared.h

Gives among others:

/usr/lib/x86_64-linux-gnu/qt5/examples/quick/shared/shared.h


Lenovo volume and brightness keys not working on Ubuntu 18.04

I'm having the same problem on 18.04 (went straight there from 16.04), and I think it's due to Cairo Dock not playing well with Gnome settings daemon. See gnome-settings-daemon grabs multimedia keys and drops mute since upgrade 16.04.

Possibly more, relevant, details in this bug report.

Using the (g)settings keyboard to bind an appropriate command doesn't appear to work either, so I've only managed a workaround solution by enabling the compiz 'Commands' plugin (using the CompizConfig Settings Manager), grabbing the same keys (XF86AudioRaiseVolume, LowerVolume, etc.), and assigning appropriate commands, e.g. to increase audio volume

/usr/bin/pactl -- set-sink-volume 0 +5%

(there's no visual feedback like with Gnome-shell, but the volume is changed)


Unable to install Ubuntu 18.04 on AMD Ryzen 2500U with Radeon Vega 8 Gfx

My solutions:
  In my case, i edited quiet splash to nosplash (delete the quiet) and viola! it works.

Story:
Just recently installing Ubuntu 18.04 in along Win 10 (dual boot) in my HP Envy x360 13 AMD Ryzen 5, probably just the same with your Laptop. After struggling several hours trying all the solutions i found in many forums, but no luck.
It seems that the solutions, depends on what error is occured when you install Ubuntu.
in my cases, it said:
screenshot error

Several things i've tried , but failed:

  add `nomodeset`
  add `noacpi=off`
  add `amdgpu.dpm=0`

btw, do not forget that, if you install your Windows in UEFI, then u must install Ubuntu in UEFI mode too (cmiiw). UEFI - UEFI, Legacy - Legacy.


Will lighttpd >1.4.45 run on Ubuntu 18.04 LTS?

Note: by following the below method you will get lighttpd-1.4.46 which may have some security breaches, be careful.

To compile LigHTTPd from source we need

Enable source code repositories from Software & Updates (software-properties-gtk)
Get build dependencies of existing version

sudo apt-get build-dep lighttpd
sudo apt-get install checkinstall

Get source of 1.4.46 version:

cd ~/Downloads
wget https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.46.tar.gz
tar -xf lighttpd-1.4.46.tar.gz
cd lighttpd-1.4.46/
./configure
make
sudo checkinstall make install # to create deb

Check the version

$ lighttpd -v
lighttpd/1.4.46 - a light and fast webserver


try out reboot -p and if you lazy to write reboot -p to the terminal every time, you can create a .desktop file:

[Desktop Entry]
Name=ShutDown
Icon=Directory/to/the/icon
Exec=reboot -p
Type=Application


Try mount to set root='(hd1,msdos2)' --> sdb2 or Microsoft Reserved, on my hackintosh i can run my windows only from Microsoft Reserved (Clover Bootloader).


Suggestions for E-SATA cards and/or brackets for UBUNTU 16.04.1

I am not sure what you mean by 'E-SATA bracket'. I am using esata to sata plates. They are simple and cheap and they work well. The drive is seen as a SATA drive, for example it is easy to boot Ubuntu from it.

I have not used a PCIe dual E-SATA card, so I don't know how such a card would work with Ubuntu. (I guess it would work well for data drives, but maybe it would not work for booting.)