The main reason used to be so that you can format / and not format /home. Nowadays it does not matter any more: the installer lets you keep your /home.

There are still a few good reasons:

if / gets full over something like 95% the filesystem starts to store parts of files not together (ie. defragmentation) so performance will take a small hit.

When / is 100% full you will have a harder time logging it due to the system not being able to use the free space effectively.

So a separate /home where you store your personal data will keep your / as empty as possible unless you have a server (apache, mailserver and mysql store their userdata by default in /var).
A separate /home also allows for encryption of just that partition.
If /home is on an actual different hard disc you can pull it out and put into another system that holds a / and use that.

In that respect depending on your needs and what your system is used for it might be better to create a separate /data partition, have /var/www/html symlink to /data/var/www/html so your websites are on the data disk, change the default database location for mysql to point to /data/var/mysql/ and symlink your /home/$USER/ directories (aka. Desktop, etc). to /data/home/{dirs}.

If /data is an actual disk you could take it out of your system, place it into an upgraded Ubuntu and continue working on it. Besides maybe a little snag here and there (like settings that got removed from mysql or apache) you could have a new system with all your data up and running in a single reboot and the time it takes to insert the disk into that new machine.

I do that a lot with my notebooks.


How can I accurately see how long it takes to write a file to an external medium?

Linux extensively uses buffer memory to read/write files. Thus, a write to a drive may appear to be finished earlier, while in reality, linux continue to commit the data to the drive. To flush the buffer to disk, one can use the "sync" command. Thus, a command such as time sh -c "cp /media/user/disk/file .. && sync" would provide a better idea of the real time needed to write the copy fully to the drive.

The construct with "sh" is needed because the command time only supports a single command as its argument.


Are there settings in Ubuntu 20.04 similar to multiple figure gesture controls in Windows?

Have you tried using fusama? https://github.com/iberianpig/fusuma

It has very nice calibration options to change the sensitivity so it might be an improvement to vanilla libinput-gestures.


Why does "ps aux | grep x" give better results than "pgrep x"?

The ps aux | grep x command gives "better" results than pgrep x essentially because you are missing an option with the latter.

Simply use the -f option for pgrep to search the full command line and not only the process name which is its default behavior, eg:

pgrep -f php5

Unlike the ps | grep construction with which you need to filter out the grep line or use pattern tricks, pgrep just won't pick itself by design.

Moreover, should your pattern appear in ps USER column, you'll get unwanted processes in the output, pgrep doesn't suffer from this flaw.

If you want full details instead of just the pids, you can use:

ps wup $(pgrep -f python)

which is simpler and more reliable than

ps aux | grep python | grep -v grep

or

ps aux | grep p[y]thon


Solved it by first running:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove

then running:

sudo killall pulseaudio
rm -rf ~/.config/pulse
pulseaudio -k

This restarts pulse and re-builds the config files.


How to get public ssh key from headless Ubuntu Server (no gui) to github deploy key

In the normal circumstances you will be able to access your remote Ubuntu server via SSH. For this purposes, on your desktop machine, you will use a terminal emulator as gnome-terminal (on Ubuntu) or PuTTY (on Windows), etc. So you will be able to do cat id_rsa.pub, then copy the content of the key from the terminal window in use and paste it in the Key field in your browser's window. Actually in this way you will use the clipboard of your (local) desktop system.

What you need is installed openssh-server on the remote instance and openssh-client on the local (desktop) instance. Use the following commands to do that:

sudo apt install openssh-server
sudo apt install openssh-client

Then you must have an IP address (or a domain name) of the remote instance, which you can access from the local instance, no mater directly, through VPN, SSH tunnel, etc. In your case you can use ifconfig to find the IP address of the Ubuntu Server in your LAN.

The basic syntax of the ssh command is:

ssh user@host     # where host IP address or domain name

You should execute that command within a terminal window on the local (desktop) system. Then you will be able to operate freely (depending on your user's rights) on the remote server with the pleasure of the GUI environment :)

Further reading:

How to setup secure ssh authentication without password using key pair.
Filezilla or WinSCP alternative for Ubuntu
How do I setup SSH key based authentication for GitHub by using ~/.ssh/config file?


I keep forgetting but this should work

bundle update
bundle install


Depending on capabilities of your server's motherboard you may want to look for wake-on-lan. There is a solution here for 11.04 on how to make that permanent:

How can I enable wake-on-lan permanently?

This however obviously will not work in case your server is unable to boot. A proper running OS is a prerequisite to access it remotely.


What does "di" stand for in linux kernel image file

di means "debian installer".

See the packages site.


Bluetooth not detected with rfkill list on dell xps from fresh install

From: Turn Bluetooth on or off

You can turn Bluetooth on to connect to other Bluetooth devices, or turn it off to conserve power. To turn Bluetooth on:

Open the Activities overview and start typing Bluetooth.
Click on Bluetooth to open the panel.
Set the switch at the top to ON.

Many laptop computers have a hardware switch or key combination to turn Bluetooth on and off. Look for a switch on your computer or a key on your keyboard. The keyboard key is often accessed with the help of the Fn key.

From this answer:

Ubuntu 18.04 wireless connections visible but won't connect BCM43602

You can try:

sudo apt-get purge bcmwl-kernel-source
sudo apt update
sudo update-pciids
sudo apt install firmware-b43-installer
sudo reboot #note that this will restart your computer
sudo iwconfig wlp2s0 txpower 10dBm


Ubuntu 20.10 upgrade from 20.04 - Black Screen with only mouse pointer after auto-login

Ok, so in this case the fix was to replace the core.pb file in the ~/.cache/compizconfig-1 folder.
Diagnostic route was

rename ~/.cache folder & reboot.  Problem solved
rename ~/.cache/compizconfig-1 folder & reboot. Problem solved
work through the recently changed (i.e. not old) files, renaming and rebooting.

core.pb was the culprit. The Desktop displays correctly when this file is replaced with the auto-created one. However, desktop configuration is lost (taskbar icons etc.) although this might be because of the resetting I did initially.
Posted in case this is helpful for anybody else.


Cannot view, use, or open CDs or DVDs in Ubuntu 12.04

Open terminal.
Install the libdvdnav4, libdvdread4, gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly packages.

sudo apt-get install libdvdnav4 libdvdread4 gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly

If you would like to play encrypted DVDs:

sudo /usr/share/doc/libdvdread4/install-css.sh

Insert a DVD into your drive. It should open automatically in the Movie Player.

Source: https://help.ubuntu.com/10.04/musicvideophotos/C/video-dvd.html


you can use ubuntu SDK and quickly

Do you need more?


This might work for you:

sudo a2disconf gitweb

Otherwise you can try removing all the files associated with Apache:

sudo apt purge apache2*
sudo apt remove apache2*

Then install it again:

sudo tasksel


System Monitor : How to display net speed on panel

Xenial

Install indicator-netspeed from terminal
Run apt:indicator-netspeed from your browser's URL panel
Download 32-bit or 64-bit deb package from launchpad and install them via Software Center

Terminal install

sudo -i
add-apt-repository ppa:nilarimogard/webupd8
apt update && apt install indicator-netspeed

To start the indicator, run indicator-netspeed &

Bionic and up (with GNOME 3)

Gnome Extensions: Install

If you want to download the extension package manually, select your shell version and extension version.

GitHub: hedayaty/netspeed

Bionic with Unity panel

Terminal install

sudo -i
apt-add-repository ppa:fixnix/netspeed
apt update && apt install indicator-netspeed-unity

To start the indicator, run indicator-netspeed-unity &

Launchpad: Download
GitHub: ggleb/indicator-netspeed-unity


Long waiting for login prompt at screen lock. Ubuntu 20.04

The cause was the fingerprint authentication daemon. My desktop computer doesn't have fingerprint hardware. So the daemon failed to start.
PC systemd[1]: Failed to start Fingerprint Authentication Daemon.
PC dbus-daemon[1085]: [system] Failed to activate service 'net.reactivated.Fprint': timed out (service_start_timeout=25000ms)

Now it works well after I had removed it by
sudo apt purge fprintd


This is apparently a bug in gnome-keyring.  The workaround suggested in comment #6 does not work.


Restart the docker service -

sudo systemctl restart docker

Share output of below command -

sudo journalctl -xe

Check the logs & also see the last comment on the below link, you may find something similar to already reported issues with docker daemon failure.
https://github.com/moby/moby/issues/25913


You ran git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim with sudo.  This put it Vundle in /root/.  You need to follow the instructions for Vundle and issue the command correctly:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim


No, documents and data are deleted on reboot. See https://wiki.ubuntu.com/DesktopTeam/Specs/Intrepid/GuestAccount

  Documents and Data are deleted on reboot

furthermore , by design, the guest session uses a tmpfs as home directory, and AppArmor rules completely hide /home, and give read-only access to /boot, /etc, /lib*, /opt, /root, /sbin, /srv, /usr, /var.

tempfs is in RAM, so with reboot data is lost, no chance of recovery, no data is written to the hard drive.

Sorry you lost data, the only thing you can do is back up your data in the future as data loss happens from time to time for any number of reasons from power loss to bugs to hardware problems and thus you need to back up your valuable data.


Building very long rsync inclusions and exclusions with Python

I've discovered that my size limits aren't necessarily in a command's length, but rather in the argument's length.  Shell commands can be at 100,000-200,000 characters in length.  Arguments however are limited to a few hundred characters depending on the system, as discovered by using getconf ARG_MAX.

This leads me to the eventual problem of running out of room when I've added many folder exclusions to my rsync arguments.

To get around this problem, I need to programmatically split up the rsync process from one long execution, into many smaller ones.

Doing this requires "building as I go" until I hit a limit.  The program will attempt to build a string of all individual exclusions, each within a list (array).  If the args length limit is exceeded, it will reparse the current list to make broader exclusions, reducing the total, and store those excluded exclusions.

Here's an example of the exclusions list, as it's being built:

This list is called excludes

(long list items...)
--exclude $Home/.wine
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/google-chrome/Default/Cache/*
--exclude $Home/.cache/google-chrome/Default/Media\ Cache/*
**LIMIT EXCEEDED**

Now we've had our ARGS limit exceeded.  The program will reparse this list looking for common folders, and create a second list to be saved for the next execution of rsync.

After parsing, excludes is rebuilt into a list like this:

(long list items...)
--exclude $Home/.wine
--exclude $Home/.cache/*

As it was parsed, the lines that were removed, were placed into another list, let's call it excludesnext and looks like this:

--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/somefolders/*
--exclude $Home/.cache/google-chrome/Default/Cache/*
--exclude $Home/.cache/google-chrome/Default/Media\ Cache/*

So all the repeating folders are removed from excludes and placed into excludesnext.  As items are moved, and shortened broad folders are replaced into excludes, a new list called cutlist is created with these new shorter folders.

So the cutlist list includes:

--exclude $Home/.cache/*

rsync is run using the excludes list as the arguments.

After rsync is finished, the excludes list is emptied, and the excludesnext list is copied over to the excludes list.

Then rsync is run in a loop using the new shortened cutlist list as the source, and all matching subfolders from excludes are used as exclusions.

Of course there could be many items in the cutlist list, and the program will loop through each one.  This second run of rsync runs in a loop.  But in this loop, when maximum lengths are reached, the excludes list is parsed in the same way as before, except the new shortened folders are added to cutlist instead of going into excludes.  This way as the loop goes through the cutlist, it can expand on itself as it goes through the list.  As the excludesnext list items are used, they are removed.

Eventually this leads to all folders and subfolders being copied over with all exclusions included regardless of how many there are.  Completing the last item in cutlist means everything has been executed.

This method can cause rsync to run several, or even dozens of times depending how many exclusions you have, but it never repeats folders.

Apologies for not posting actual code, but it's a messy work in progress and I don't feel comfortable posting my code yet before I can release a working service.


Can't Start PulseAudio Ubuntu 12.04 | Can't use USB Headset

The issue, as mentioned in the comments, was the fact that the home directory was owned by root.  I was unable change the owner of the home directory using sudo chown -R user /home/user because the home directory was mounted on a different hard drive with an NTFS filesystem.

I backed up my home directory with Deja Dup to an external drive.  Then used gparted to format the internal NTFS drive and change the filesystem to EXT4.

Next I changed /etc/fstab to match the new UUID of the drive and changed "ntfs" to "ext4".

After restart, I had to press Ctrl+Alt+F1 to login in a terminal.  I was there able to use sudo chown -R user:user /home/user.

I was then able to login to the GUI, and restore my home directory using Deja Dup and the backup on my external drive.

PulseAudio is working perfectly now.


How to check battery status when acpi is off?

You can't. ACPI provides the Power Interface to your OS.

If you disable that you will lose a lot more power related functionality like suspend. There may be other interfaces to hardware controllers for batteries without relying on ACPI, but I don't know of them.

I recommend not to disable ACPI but try to solve your problem. On a laptop (I assume you are) you really can't work normally without ACPI support. Try to ask another question regarding the reason for why you acpi=off solves your problem.


You can customise the results by writing new scopes, but that is probably not the answer you're looking for (here's a tutorial for doing so using the Ubuntu 13.10 API).

The default videos scope does not provide any hooks to alter its results in the way you've described.  If the existing scope is ignoring some of your videos under ~/Videos though, that sounds like a bug (and should probably be reported as such).  Is there anything unusual about your system?


Installing Canon Color imageCLASS MF8380Cdw Drivers in Ubuntu 12.10

I just setup this exact printer on 2 Ubuntu 64-bit 12.04 desktops. Here's the documentation that I wrote, hope this also works on 12.10.

Go to the below link and download the Linux driver in ~/Downloads
http://www.usa.canon.com/cusa/consumer/products/printers_multifunction/color_laser_multifunction/color_imageclass_mf8380cdw#DriversAndSoftware
Untar the tar.gz file downloaded at ~/Downloads/Linux_UFRII_PrinterDriver_V250_us_EN.tar.gz
Assuming that a 64 bit machine is being used, cd to ~/Downloads/Linux_UFRII_PrinterDriver_V250_us_EN/64-bit_Driver/RPM.
Create a symbolic link for 64-bit drivers:

ln -s /usr/lib /usr/lib64

(NOTE: There may be an existing lib64 directory there already and this will prevent the symbolic link from working correctly. Backup/move the directory to an alternate location before creating the symbolic link)
Install alien (if needed):

sudo apt-get install alien dpkg-dev debhelper build-essential

Convert the RPM files to ".deb"

sudo alien -k -c cndrvcups-common-us-2.50-1.x86_64.rpm
sudo alien -k -c cndrvcupsuf2us-2.50-1.x86_64.rpm

Install drivers

sudo dpkg -i cndrvcups-common-us-2.50-1.x86_64.deb
sudo dpkg -i cndrvcupsuf2us-2.50-1.x86_64.deb

Go to System Settings -> Printing and remove the Canon printer (if it's there)
Click on Add and expand Network Printer. Select Canon MF8300C (IP_ADDRESS). Click on Forward and then Apply. Click Cancel on the test page screen.
Right-click the new Canon printer -> Properties.
Where is shows 'Make and Model' press 'Change'
Select 'Provide PPD file'
Navigate to /etc/cups/ppd/Canon-MF8300C-UFRII-LT.ppd and press Open
Select 'Use the new PPD as is' -> Apply
Restart the cups service /etc/init.d/cups restart
Test the printer.


Hardware not getting recognized on Ubuntu 13.04 after broken boot

It must be an issue with a broken Kernel image.
Just log into command-line/Terminal and run
sudo apt-get install --reinstall linux-image-generic linux-image

See if the issue is fixed after a reboot.


It might have something to do with your internet, you might also try making a new sources.list using the website http://repogen.simplylinux.ch/


Step 1:

You can just remove your USB installation device after finishing the installation process. And then restart, then it will select your default HDD/SDD by its own.

Step 2:
Change your first boot from the boot menu while restarting and select the HDD/SDD.

I prefer the step 1.


Ubuntu 13.04 display problem (Samsung ATIV Book 9 Lite)

You need to install Catalyst.

For your card and kernel, you want 13.6.

Follow these directions exactly, and you should be good to go.


Try running these commands:

sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Or the one-liner:

sudo sh -c "dpkg --configure -a && apt-get install -f && apt-get update && apt-get upgrade && apt-get dist-upgrade"


pulseaudio and alsa on ubuntu 12.04 server

To get aplay to work, check the permissions on the device nodes in /dev/snd/.

As for PA, it should then work just fine.


Run Unity on external monitor with Bumblebee

as I understand, Unity doesn't work with optirun (it seems to be a bug).

That's what I've found here:

HDMI doesn't work with Optimus hybrid graphics chipsets under Linux for most laptops, even if you use Bumblebee, but there is a way to get HDMI to work: by using a separate session.

Using the instructions below, you'll get an LXDE session (you can use XFCE or others, but the instructions below are for LXDE) to show up on the external monitor (which is connected via HDMI), and in this session, all the applications you launch use your laptop's Nvidia graphics card and you can play games, watch movies, etc. The LXDE session runs in the same time as your regular session, so on your laptop's screen you get your regular (main) session. Also, the mouse and keyboard are shared between the two sessions / monitors.

Here's how this looks like:

The first image above is from my laptop's screen (Dell XPS L702X which comes with Nvidia Optimus) while the second image is the separate LXDE session which is also running on my laptop, but is displayed on a TV connected via HDMI. As you can see, the first one is using the Intel graphics chip while the second one uses Nvidia.

However, there are some things to consider when using this:

the sound won't work (if you know a way to get it to work, please let
us know in the comments!) through HDMI so you'll only get sound
through your laptop's speakers
you can't move a window from your current desktop to the monitor
connected via HDMI. The only way to run applications on the device
connected via HDMI is to either run it from its session menu, or by
using "export DISPLAY=:8.0" (see the end of the post for more info on
this). The mouse is however, shared between the two desktops.
when loading the extra session, you may get double indicators / tray
icons on your current (main) session. There is a way around this
though (see the "tips" section at the end of the post)

Get HDMI to work with laptops using the Optimus technology under Ubuntu using Bumblebee and Synergy

Install Bumblebee if you haven't already.
Unity doesn't work with Bumblebee (and I'm not sure if you can run two sessions using the same window manager without them interfering anyway), so you'll need to use a different desktop environment / session, like LXDE, XFCE and so on - use whatever you want. I've used LXDE so using the instructions below, you'll get an LXDE session on the monitor connected via HDMI.

To get the mouse and keyboard working on the external monitor connected via HDMI we'll use Synergy, a tool that lets you share the mouse and keyboard between multiple computers.

Let's install the required packages (LXDE and Synergy):

sudo apt-get install synergy lxde lxde-common
To be able to use Synergy, you'll need to create a configuration file. You can download mine from HERE - copy the file to your home folder and rename it to ".synergy.conf" (notice the dot in front of the filename - that makes the file become hidden).

The file I've provided above should be enough, but if you want to change it, you can read about the Synergy configuration file here.
To start LXDE on the external monitor connected via HDMI, you can use a script which you can download from HERE. Extract the archive, copy the "hdmi" script to your home folder and make it executable using the following command:

chmod +x ~/hdmi

Now, to run the script, use the following command:

~/hdmi

LXDE should now start on the external monitor connected via HDMI. Give it some time (around 10 seconds) and moving your mouse to the left of your screen should make it show up on the HDMI device.

Here's what the script does (this is just an explaination, you don't need to run these commands, just use the above script):

exports the display to the one we're going to use for the HDMI monitor (8):

export DISPLAY=:8.0

runs LXDE with optirun (Bumblebee):

optirun startlxde &

runs the Synergy server in the foreground on the main display (on your laptop's main session) with 127.0.0.1 as the address:

synergys -f -a 127.0.0.1 --display :0 -n ubuntu &

runs the Synergy client in the foreground on the HDMI display and it connects it to the 127.0.0.1 server address:

synergyc -f -n hdmi --display :8 127.0.0.1 &

And finally, it exports the display back to your laptop's (main) display:

export DISPLAY=:0.0

The script also uses some "sleep" commands which add a delay to make sure the commands have enough time to get executed before running the next command.


ntp server is not working correct at startup

remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 192.168.1.202    LOCAL(0)        11 u   46   64    1    0.381  3201920   0.011
*LOCAL(0)        .LOCL.          10 l   17   64  377    0.000    0.000   0.000

This is the output of ntpq -p on the client, and it is essentially the answer to why the client does not sync. The client uses it's own clock as a stratum 10 reference - but the server claims it is stratum 11.

NTP treats lower stratum clocks as more likely to be correct. Here you have two time sources, one with stratum 11 and one with 10 - and a huge difference. It won't attempt to reconcile them - it will simply say that the stratum 11 one is wrong.

Set the server to a lower stratum, using the

fudge 127.127.1.0 stratum 9

for instance. Or - preferably sync the server to an external time source that is more reliable, for instance one of the NTP pools, which is generally stratum 1-3. Syncing to a stratum 3 NTP server would make your NTP server a stratum 4 NTP server, which would be preferred over the local clock.

Another alternative is to increase the stratum of your local clock on the clients, for instance to 13.


Brightness doesn't work on acer aspire 4741

Yes @ Karl is right Brightness option is directly associated with What type of Graphic Card  you have & after New Installation Process, by default keeps this "off" (that is low high can't be done.
If you have Intel Graphics then:
(To check the graphic card)

type this in Terminal:

ls /sys/class/backlight/

If its Intel, the answer would be:

computer_mfg_name intel_backlight

Then try this:

Open Terminal & type this to create a config file:

sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf

Now we need to edit this file. You can use any editor be it a terminal one or graphical.

sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf

Add the following lines to this file:

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

Save it. Restart the Computer. The brightness control should be working through function keys now.


You can make it so that notification bubbles appear on whichever display contains the active window using gconf-editor:

https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/331369/comments/13

  Considering that multihead support is generally a setup for advanced users, we've also added a gconf key to enable a smarter mode. To enable it, you need to set "/apps/notify-osd/multihead_mode" to "focus-follow".


How to hide a particular account in the login screen?

Add the desired user under hidden-users in file /etc/lightdm/users.conf. Open it with sudo -H gedit /etc/lightdm/users.conf

For manual login you will need line greeter-show-manual-login=false in /etc/lightdm/lightdm.conf file. You can open it with sudo -H gedit /etc/lightdm/lightdm.conf

Update

So, turns out the accepted method doesn't work in Ubuntu 14.04, however this answer right here seems to work. Edit a file for user you want to hide in /var/lib/AccountsService/users/, specifically line SystemAccount=true. Restart lightdm with sudo service lightdm restart


Why open-iscsi has 2x slower writes than Samba via 10G Ethernet?

It's reckless to mount a storage array as write back without a battery backup. You get what you deserve during a brownout (bouncing power is the worst), including incomplete writes.

Writethrough mode is the right thing to do without a battery backup.

  Speed it more important than safety of currently written data in case
  of power outage.

If your bank did that with your paycheck, trade how much of your deposit you can get back vs how fast would you get it. Is there any excuse in the world that would justify their position that some or all of your hard earned money is gone forever?

That's how you should look at data storage, like a fiduciary responsibly.

You can't have it both ways.

File systems cache  and then writeback or you call sync()). Hard storage cannot call a IO operation complete until the data is physically committed to the disk.
Setting a disk to writeback mode relaxes that constraint trading safety for speed.

You pay for write amp anyways on RAID 6, it's just whether you pay for it now or a few ms from now. RAID 6 is where SSD's go to die, that's just the way of it. Gaming it for a few extra hours of service isn't worth the trade off of data loss.

The only way to mitigate this is with a maintenance and monitoring program that looks at the smart data (check once a day or week during off hours because it blocks IO) on the disks and sends an alert for replacement when they've reached 80% of their write lifetime.

So if performance is what you really care about then, then a striped mirror i.e. RAID 10 is what you want. Which will also dramatically reduce the write amp associated with a RAID 5/6.

https://searchstorage.techtarget.com/definition/RAID-10-redundant-array-of-independent-disks

If you want to have a industrial strength storage array that's secure and fast, you should explore adding NVDIMM or Crosspoint to your storage array build via PMEM.

http://www.admin-magazine.com/HPC/Articles/NVDIMM-Persistent-Memory

  Listing 3: Benchmarking

  $ dd if=/dev/zero of=/mnt/test.dat oflag=direct bs=4k
  count=$((1024*1024)) 1048576+0 records in 1048576+0 records out
  4294967296 bytes (4.3 GB, 4.0 GiB) copied, 4.55899 s, 942 MB/s

it's slowly getting into the hard storage part of the kernel.

https://pmem.io/2018/05/15/using_persistent_memory_devices_with_the_linux_device_mapper.html

Hope this helps.

EDIT: No RAID array is a substitute for a backup program which is routinely verified.


When you have enough RAM, like 16Gb, and not doing memory intensive tasks, like professional design, you don't need any swap at all. It will be even detrimental to have it, because Linux can't resist the urge to swap something even if it is not needed.


The .gitignore file is a per project file and/or a per subdirectory file, located in the root directory of the project and/or various subdirectories of the project. For example, for my kernel git clone:

~/temp-k-git/linux$ ls -l -a .gitignore
-rw-rw-r-- 1 doug doug 1280 Jun 13 15:29 .gitignore

There are also 187 other .gitignore files in various subdirectories of the project.


How to create wifi hotspot from ethernet network?

1.Go to Network Icon on top panel -> Edit Connections

2.Click the Add button in the pop-up window.

3.Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type.

4.In next window, do:
Type in a connection name. The name will be used later.
Type in a SSID
Select mode: Infrastructure
Device MAC address: select your wireless card from drop-down menu.

5.Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password.

6.Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.

When done, click the save button.

After above steps, a configuration file created under /etc/NetworkManager/system-connections directory. File name is same to the connection name you typed in step 4.

Now press Ctrl + Alt + T on keyboard to open terminal. When it opens, paste the commands below and hit enter to edit the configuration file:

gksu gedit /etc/NetworkManager/system-connections/wifi-hotspot

Replace wifi-hotspt with the connection name you typed in step 4.

When the file opens, find out the line mode=infrastructure and change it to mode=ap. Finally save the file.

When everything’s done, enable WIFI from Network Manager icon on the panel. It should automatically connect to the hotspot you created. If not, select “Connect to Hidden Wi-Fi Network ...” and select it from the drop-down box.

Now you can search and connect the access point from your Android mobile...


Change your control file in debian/DEBIAN folder, edit "Depends" field.

Example of control file:

Package: root-your-phone-tool
Version: 1.0.0
Architecture: all
Section: base
Maintainer: Gustaf Haglund <john.doe@example.com>
Depends: android-tools-adb, python, python-gtk2
Description: Root your phone easily with this tool.


no wifi adapter found (after boot from windows)

After consulting with Intel, I installed the newest driver from Intel website.
I canceled the "Fast startup" option in windows, which by def doesn't free resources to be able to boot from shut down faster (restart is not affected)
from windows settings

answer from Intel attached


This is a known bug in the Ubuntu 16.04 LTS (GNOME) Software application, but you can install Google Chrome in an alternative way ... open a terminal and execute the following commands :

echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

sudo apt-get update

sudo apt-get install google-chrome-stable


Help me kill this red light coming from headphone jack?

I would like to share with you how I solved this with a permanent solution without scripts. This way we can also get rid of the ugly pop sound when pulseaudio starts.

I use Apple MacBook 7,1 Mid 2010, White Unibody.

The reason why the red light lights up on every pulseaudio start is that there is automatic detection of hardware defined in /etc/pulse/default.pa

The usual default.pa example here: https://gist.github.com/95406ea115dc3a0a561f8242e2ae00f4

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

When these modules are being loaded it automatically detects your hardware and also initializes it. While the hardware is being initialized then SPDI/F output is turned on so red light is glowing even if you previously toggled mute using alsamixser off. When SPDI/F are toggled again on then there is also the ugly pop sound effect.

To avoid this behavior I decided to define my hardware manually.
I don't wan't use automatic hardware detection modules. I disabled them by commenting whole block:

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

Now, I need to define my audio hardware - output sink and input source.
I have used module-alsa-sink and module-alsa-source. I also need to know which HW ID's my audio sources have. On my machine there is only one integrated audio card with both input/output which has id hw:0,0. It can be different on your machine.

This is how I load outpit sink and input source modules:

### Load audio drivers statically
load-module module-alsa-sink device=hw:0,0
load-module module-alsa-source device=hw:0,0
#load-module module-null-sink
#load-module module-pipe-sink

It's important to reload pulseaudio then.
You can use: pulseaudio --vv --kill and then again start it with
pulseaudio --vv --start

No we will have available both our audio input/output, the jack isn't glowing with the red and the pop sound on startup is gone. All changes made in alsamixer will always persist too.

But, with this simple configurations we can't now use SPDI/F as regular output.
What if decide to play sound through it?

I can even define the SPDI/F output too. The SPDI/F has hw0,1 ID on machine. If I would like to use it again. I will add this line to my configuration:

### Load audio drivers statically
load-module module-alsa-sink device=hw:0,0
load-module module-alsa-sink device=hw:0,1
load-module module-alsa-source device=hw:0,0
#load-module module-null-sink
#load-module module-pipe-sink

With this configuration we can easily disable and enable it in alsamixer. And the configuration will persist.

Here is sample of my configuration I use: https://gist.github.com/7a11adf0edc49d55a60be071ca307784

Actually, I don't own any other kind of sound system so I'm not able to test it with it. If you are using 2.1 or 4.1 sound system the output will be probably played only as stereo and you will need add more configurations in order to get it properly work. The same problem could be with HDMI outpout, I can't test it.


Xorg - Resolution does not fit into screen

Here is a line for your /etc/X11/org.conf that worked for me taken from this post.... askubuntu-link In my particular case I had to fiddle around with the viewport numbers to get everything just right. The most relevant part is the {ViewPoutOut...... part. If you add that to your modeline and change relevant numbers, then fiddle with the offsets, you should be ok.

Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: 1920x1080 { ViewPortOut=1820x1020+50+30, ViewPortIn=1920x1080 } +1600+0"

Something like this added to the end of your xorg.conf might be a good place to start:

Option "metamodes" "DVI-0: 1368x768 { ViewPortOut=1350x758+20+20, ViewPortIn=1368x768 }"


Method : 1

One easy way to reinstall the X server is to:

Restart the PC with the live ubuntu disk.
Choose safe graphics mode.
Open a terminal
cd to /etc/X11
cp xorg.conf to /media/usbdrive
open gftp
upload the xorg.conf file to a server
restart PC without the live disk
ctrl-alt-f1
login
cd /etc/X11
sudo rm xorg.conf
then wget www.yourserver/xorg.conf
startx

You will be able to start X without a hitch because the live cd in safe graphics mode automatically determined your X settings.

Method : 2

If you just need working configuration, not the whole Xserver?
then,
backup your /etc/X11/xorg.conf
and do

sudo dpkg-reconfigure xserver-xorg

Method : 3

If you really need to reinstall whole Xserver, try

  sudo apt-get install --reinstall xserver-xorg

Enjoy!


How to detect when a server startup is finished?

The easiest way would be to use @reboot in your cron.

Edit your crontab

crontab -e

and add the following:

@reboot /path/to/your/program

This will execute when the crontab daemon starts up


Gedit show text from terminal output colored

Answer for the second version of the question

To add a highlighting for your log files, you have to write your own syntax highlighter. But that's a lot of work. Or try an existing syntax highlighter.

Open your file in gedit and click on Plain Text as you can see in the next screen shot:

Predefined syntax highlighter can you find in

/usr/share/gtksourceview-3.0/

Answer for the first version of the question

A simple text (Plain Text) file hasn't a syntax highlighting in gedit

Add some code in the file and save. Now the syntax highlighting for bash (sh) is active. You can see this in the status bar in the screen shot below

The colours of a shell script in a terminal is possible with escape sequences, see the next screen shots

As you can see, those are completely different things. In gedit you have colours via syntax highlighting and in a terminal with escape sequences.


What's the application extension? (aka .exe, .app, etc.)

In general, in Linux, and so in Ubuntu, the applications do not have extensions. Some examples: nautilus, firefox, gnome-terminal, and so on.
Applications are usually located in these directories /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games and others.
You can determine whether a file can be an application if and only if that file is executable. Use ls -l filename, or stat filename, or file filename to determine this. If that filename have this permissions: -rwxr-xr-x, then that file is sure executable.

(source of the image: http://www.csit.parkland.edu/~smauney/csc128/fig_permissions.jpg)


Just do this:

sudo apt-get install linux-headers-`uname -r` dkms build-essential bcmwl-kernel-source


This is a caused by running an out of date wubi.exe from 12.04 or 12.04.1 (refer to bug Wubi 12.04 installs development release). Because the Wubi.exe is out of date it tries to download the development release wubi disk image. These are no longer created, but there is still a broken one from the 13.04 development release sitting out there, so it gets downloaded.

You need to get the latest Wubi for 12.04.2 from here: http://releases.ubuntu.com/12.04/wubi.exe

Or the 12.10 Wubi from here: http://releases.ubuntu.com/12.10/wubi.exe

There is also a 13.04 Wubi here: http://releases.ubuntu.com/13.04/wubi.exe

Any of these will work.


Windows 10 can't restart after Ubuntu installation

Had a similar problem yesterday with a laptop running W7 and used this supergrub burned CD to reboot in windows and create a repair CD with which I fixed the MBR and boot sector so it has only Windows 7 again.

http://www.supergrubdisk.org/

Might help you out.

Max


How can I resize an active LVM partition?

Most of the disk is in an LVM partition already, which lvm calls a physical volume.  LVM then divides up the space from physical volumes into logical volumes.  You can use the pvs or pvdisplay commands to show stats on the physical volumes and lvs or lvdisplay to see information on all of the logical volumes.  You should see that there is plenty of free space in the physical volume.  You then can use lvresize to expand a logical volume to use more of the space, as in:

sudo lvresize vg00/slash -L +10g

That will add 10 gb to the logical volume named slash in the volume group vg00, which is apparently your root volume.  After that, you need to expand the filesystem to use that space, which assuming you are using the default ext4 filesystem with:

sudo resize2fs /dev/mapper/vg0-slash


Converting rpm to deb error execution (ubuntu 18.04)

I solved completely the same error with

sudo apt install rpm --reinstall


Newly installed applications require restart in order to appear in launch menu

Press

Alt + Ctrl + T

Terminal opens

Type

dconf reset -f /org/compiz/
unity --reset-icons &disown
reboot

Hope it helps


How do I run a application on top/in a display manager like GDM?

You need to add the program you would like to run to the gdm user's startup applications. As explained in the GDM documentation, this is done by adding .desktop files to the /usr/share/gdm/autostart/LoginWindow directory.

Specifically, in your case, you need to create a file at /usr/share/gdm/autostart/LoginWindow/onboard.desktop with the following contents:

[Desktop Entry]
Type=Application
Name=Onboard
Comment=Onboard Keyboard
Exec=/usr/bin/onboard

If the onboard executable is not in /usr/bin, change the last line to point to the correct path.


I see two solutions.

If you shy from using a terminal, and you did not much but install Ubuntu, you could re-install Ubuntu from scratch and go through the guided setup again.

Obviously, there is a better way. You have to mount your second hard drive permanently. This was answered here:

How to mount partition permanently?


12.04/ Firefox and Chrome adobe pdf isnt working

The Document Viewer usually only asks for a password if the PDF file is encrypted (like an Digital Editons ebook).

Inside Google Chrome (not Chromium) you should be able to see the file using the internal PDF viewer.


suspend works but only for a second before exiting back to the desktop

Fixed this with a combination of this post https://www.dell.com/community/Inspiron/Suspend-resume-problems-on-Ubuntu-18-04/td-p/6072410 and this post https://ubuntuforums.org/showthread.php?t=2395562 - installing proprietary NVidia drivers and disabling nouveau:

# ubuntu-drivers autoinstall

and then adding nouveau.modeset=0 to the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub (running update-grub).


I figured out what was happening after I had the same issue. As I can see the answer can technically be found in the link the error gives you, but the error and fix don’t make a whole lot of correlation. I attempted to fix this problem by giving my non-root user permission to execute depmod with sudo without a password. After some trial and error I discovered the lines that called depmod were on lines 20 and 48 of the kernel/scripts/depmod.sh, I amended the two lines by adding sudo in the front and restarted my build. However, I got a different error, “sudo is not allowed to be used”. This really got my thinking.
So I checked that link they gave for the AOSP source code. In the “PATH Tools” section it states:

The build has started restricting the external host tools usable inside the build. …

This led me to two ways of working out the issue. First one which is likely the easiest is to add TEMPORARY_DISABLE_PATH_RESTRICTIONS=true after your command to build the kernel. As you may guess this would disable the restriction that is disallowing the depmod command. The alternative option is to open the file build/soong/ui/build/paths/config.go and add the line "depmod": Allowed, like so:
“date”:     Allowed,
“dd”:       Allowed,
“depmod”:   Allowed,
“diff”:     Allowed,
“egrep”:    Allowed,

Both methods allowed me to build the kernel as expected. However, it is only a workaround for something that I can’t identify as a Ubuntu issue or an oversight by the Android x86 developers. Likely a patch would need to be proposed, but since I don’t know more than about the Android kernel ecosystem, I’m unable to know if just adding the command to the allowed configuration will fix it.


For some reason the groups program was deleted on your system as indicated by the output of ls /usr/bin/groups. The best way to restore it is to reinstall the corresponding package.

To find the package:

$ dpkg-query -S /usr/bin/groups
coreutils: /usr/bin/groups

To restore the corrupted package:

sudo apt install --reinstall coreutils


Webmin can't start bind9: 'Unknown error'

This is kind of an old thread but I ran into the same issue today and I believe the solution. Edit the webmin module config for the Bind DNS settings
User to start BIND as from default to bind
Group to start BIND as from default to bind

If not you can always start or stop the service in the Boot Up and Shutdown Actions in webmin.


Why does the terminal respond with "2" when I use who | wc -l

This is because an open terminal (physical or virtual) is counted as a user logged in. So when you log-in to the account, you log-in once, when you open your terminal, either using Ctrl+Alt+t(hereon called as a virtual terminal) or using Ctrl+Alt+F{1-7}(hereon called as a physical terminal), you log-in once again, each time you log-in.

This is clearly shown in the output of who. The second column shows how the user has logged in. In case you have logged in using the virtual terminal, you will see pts/<no> which represents you have used /dev/pts to log in, which is used to log in using the virtual terminal. If you log-in using the physical terminal, you will see tty<no>, which represents you have used /dev/tty to log-in.

To clarify this, see the following situation:

I have logged in once using the graphical interface, once using the virtual terminal, once using the physical terminal, so the output is:

jobin    tty1         2014-03-31 18:05
jobin    :0           2014-03-31 16:58 (:0)
jobin    pts/1        2014-03-31 17:25 (:0)

The first line indicates the physical terminal login, the second one the graphical and the third one the virtual one.

So the reason you see "2" is because you have logged in to the graphical interface as well as a terminal(not pretty sure whether you have a physical or virtual one).


Use LiveCD, install and try Boot Repair. https://help.ubuntu.com/community/Boot-Repair


'systemctl suspend' seems to hang and doesn't execute script in system-sleep

Here is a different answer, with a solution for my ath10k_pci driver, because I did not get the systemd sleep/resume thing to work.

In my case (Ubuntu 18.04.3, qca6174 hw2.1 firmware), after tearing my hair for 2 days, I was able to solve the problem with an older firmware qca6174 version.

I was not able to unload the ath10k_pci module before suspend automatically, not via a systemd Unit nor with a script in /lib/systemd/system/system-sleep.

A suspend to ram would always make my system freeze before it would go to sleep.

Installing the newest qca6174 firmware also did not help.

What helped was an older firmware version from 2016! Now I have qca6174 hw2.1 version 141 installed, although my notebook runs on 18.04.3 with Kernel 5.

I got that tip from here: https://askubuntu.com/a/978385/1004167 so I got the firmware from there: https://launchpad.net/ubuntu/xenial/amd64/linux-firmware/1.157 and copied the ath10k_pci/QCA6174/hw2.1 files (which my card is using) into my /lib/firmware/ath10k/QCA6174/hw2.1 folder.

After a reboot, I did not have to unload the driver before suspend (removed my scripts).

Going to sleep and resume works for me now, as it did before upgrading from 16.04. The only thing I have to see now is, how to prevent the copied files from being overwritten by an upgrade.

Hope that helps someone :-)


There is a package of openjdk-7-jdk available for Ubuntu 14.04 (Trusty). 14.04 is based on Upstart, not trusty. Therefore, the package must run 14.04 without the systemd init system.

The systemd package you referring to is systemd from trusty-updates. From that page, you can download and review the packages that Debian added to make the package.

In compressed archive, you'll find this in the README file:

  systemd can be installed alongside sysvinit and will not change the
  behaviour of the system out of the box.  This is intentional.  To test
  systemd, add:

init=/bin/systemd

  to the kernel command line and then rebooting, or install the
  systemd-sysv package.

systemd provides a number of packages, of which OpenJDK must depend on one. You can confirm that the systemd-sysv package is not a dependency.

I'm aware of no circumstance in which installing standard packages on Ubuntu 14.04 would result in switching the system to use systemd as the init system without the user explicitly opting in.

Should your 14.04 system somehow end up with both Upstart and systemd installed, you can interrupt the boot process, enter the grub menu and modify the kernel command line to add init=/sbin/upstart to boot it back with Upstart, and then uninstall or change what you need to.

To solve the problem with elasticsearch not starting, use http://packages.ubuntu.com to find a version of elasticsearch from trusty or earlier, and copy the "init.d" script from there. This fix will persist through upgrades of elasticsearch that you may do.

I think you are caught an odd state because even though you are using 14.04, some package maintainers are moving to expect systemd. I don't think you're going to find a better fix than the workaround like that.


Black screen, can't even get to boot menu

Sounds to me like you are in a Console. See link:
http://manpages.ubuntu.com/manpages/raring/man4/console.4.html

try this command: startx

You might need to login first. In any case, something is wrong with the boot sequence.


More disk read/write after decreasing swapiness

The effects of optimization are often difficult to judge. They can however be measured by benchmarking tools.

I would like to recommend for speed up the use of the zram tool which creates a small swap area in the ram and makes the use of programs much faster, the use of preload that logs the use of programs and makes the reading from the disk for the programs faster and finally tune swappiness so the system makes a lesser usage of swap.Also if you are in for some adventure you can optimize the file-system(ext-4, btrfs etc) by reading VERY CAREFULLY the documentation on each distro.All these do not make much of a difference in new systems, it is mostly for old hardware (2 years and more)

i think this may help you


It is a BIOS feature

reboot the computer
Enter BIOS setup
config -> keyboard/mouse -> Fn and Ctrl Key swap


"Switch Applications" does not work in 12.10

As an alternative you can try installing CompizConfig Settings Manager by using a terminal (CTRL+ALT+T):

sudo apt-get install compizconfig-settings-manager

or by using the software center:

and select Application Switcher or Static Application Switcher from Window Management group.


You could go with either the first or third option, but your middle option is not really cleanly possible.

  Going with the ubuntu packages only

If you do this, you rely on Ubuntu for security updates rather than getting them from Wordpress.  The advantage to this is that you'll benefit from the work Ubuntu (well, Debian) has done getting Wordpress to integrate well with your OS and it'll be easy to set up.  But the disadvantage is you will stay on older versions.

As for security support, the wordpress package is in "universe" meaning that Ubuntu don't promise to give official security support.  It also means that it's imported with relatively few changes from Debian's repositories, so ultimately security support will depend both on Debian and on Ubuntu's ability to migrate across any major bug fixes.  If your PHP and MySQL installation is securely set up in general, this will probably be fine.

The nagging you get about updates would probably be considered a bug by Debian and/or Ubuntu, but they can't/won't fix it because only security related issues are important enough to fix in an existing release.  So in other words it may be fixed in a future version of Ubuntu, who knows.

  Going with the wordpress updates directly.

You won't be able to get this working cleanly if you're using Ubuntu's wordpress packages.  If you did, as you said, an update from Ubuntu would wipe away and potentially downgrade all the changes you did.  Modifying files installed by Ubuntu packages is not recommended in most cases.

  Going with a "native" wordpress installation.

This would be my recommendation in this case as you will be able to upgrade it on your own schedule and get updates directly from Wordpress.


Error when trashing oldest files in a directory. (gio trash error when used with xargs)

The escape character \n is interpreted by bash before xargs runs because you did not quote it. So you tell xargs to cut items by n, not \n.

You want to put it in single quotes: -d '\n'.

To visualize the issue:

# cut by n where you want newline:
$ printf 'a\nb' | xargs -d \n -I{} echo -{}-
-a
b-

# quote \n and it works:
$ printf 'a\nb' | xargs -d '\n' -I{} echo -{}-
-a-
-b-

# cut by "n" if you had n in your filename:
$ printf 'anb' | xargs -d \n -I{} echo -{}-
-a-
-b-

(I use -I{} echo -{}- to show the separated items, to reveal if/how the delimiter works)

While this will work, I would still advice against it

You should never use new line character to separate file names, because new line is a valid character for it.

Better use:

find . -maxdepth 1 -type f -print0 | sort -rz | sed -z 1,8d | xargs -0 gio trash


I found solution that runs quite well.

This solution uses VLC for all work. Video is captured from USB Webcam, compressed and served to web. Stream is HTML 5 compatible, so it can be used for streaming.

This solution is using VLC for whole process:

vlc -v v4l2:///dev/video0:width=320:height=240 --v4l2-chroma=UYVY --v4l2-fps=5 --sout "#transcode{vcodec=theo,vb=256,scale=1,acodec=none,fps=25}:standard{access=http,mux=ogg,dst=:8081/stream.ogg}"

I did tests with Intel Atom D525. Cpu usage is around 20% and network transfer is 60kB/s

To playback video you just need to open browser that supports html5 ogg (Firefox) on address:

http://localhost:8081/stream.ogg

or another VLC

vlc http://localhost:8081/stream.ogg ----network-caching=100

If you wish to get better image you can change

vb=1024 Just do some testings. (bit (not byte) per second)
width=640:height=480. Check webcam's available resolutions

There are many things that you need to check if your CPU is too high. Your camera needs natively support chosen resolution and color space. Any conversion on CPU is slow! Try choosing other --v4l2-chroma=UYVY (UYVY, YUY2, RV24, RV32, MJPEG, ...).

To check what are cameras capabilities, you can use program guvcview. It can be installed trough Software Center.


Just in time for Ubuntu 14.04 LTS the Unity team has landed more improvements to make Unity 8 a feasible preview. It's not installed by default of course as it doesn’t meet the quality criteria for an LTS release.

You can install it from the Ubuntu archives via:

sudo apt-get update
sudo apt-get install unity8-desktop-session-mir

Logging out of Unity 7 should then give both options in the login screen:

Note: This package is provided for evaluation and demonstration purposes only.

Sources:

http://www.olli-ries.com/unity-8-on-ubuntu-14-04/
http://www.omgubuntu.co.uk/2014/02/unity-8-desktop-preview-session-14-04


Is it possible to install Ubuntu 14.04 and Windows 7 on the same partition?

if you want to install Ubuntu & windows  in same drive partition than you have use wubi.

That will help you install Ubuntu in same partition with windows.

here is link for how you can install Ubuntu using wubi.
Help for Wubi

I hope this will help you to solve your problem.

This will 100% work for you. I done so many times.


Using uniq -f 1 gives unexpected results

The answer lies in the sorting order and what does uniq uses for a field value when less than the given field number (N) exists while using -f N.

As seen you have ASCII charsets, so the sorting order is much predictable:

% sort file.txt
A
aaa upc
aaa ztp
b
b
B
B
bbb xpz
c
c
C

Now, let's use uniq -f 1 to get unique lines with skipping the (whitespace separated) first field of each line while checking:

% sort file.txt | uniq -f 1
A
aaa upc
aaa ztp
b
bbb xpz
c

Now, the important thing to note that, uniq uses null string for lines that has has less than the fields mentioned, 1 in this case; so, all the lines that has only one field would be treated as having null strings for other fields while comparing with other lines having >=2 fields.

So, from the sort file2.txt output:

b
b
B
B

would all be treated as same and only the first line containing b would  be preserved, hence you have a b in the output.

Similarly, from:

c
c
C

only the first c would end up in the uniq's output.


Invalid filename issue when I transfer files on Ubuntu to the external drive

Modern file systems can cope with almost all Unicode characters except the so called /NULL character.

However in case we do need to store files on a drive formatted with an older file system such as FAT32 we may run into issues. File names containing reserved characters |\?*<":>+[]/ may then not be recognized.

Therefore even if today there is no need for this it still is good practice to avoid those characters in file names.

Whenever we run into file name issues we have the choice to

rename file containing reserved characters.
re-format this drive with a more modern file system.

If we need to occasionally share these file with Windows we should then format the external drive to NTFS. Only if the data are exclusively accessed from Ubuntu (or other Posix operating systems) we may prefer to choose ext4.

Read more on filenames on Wikpedia.


Dual boot in different hard disks. Is that a problem?

My dual boot setup has windows and Ubuntu on two different physical drives.

I have not encountered any problems because of this setup, which I did in 2015.

I asked about this setup here: Install Ubuntu alongside Win 8.1 on separate physical drives and dual-boot?


Reboot to get the original MTU size (1500) back ... or try to set it with  sudo ifconfig enp7s0 mtu 1500 ... to restore netaccess.

Unless you have some unsupported / misconfigured vlan setup, MTU should not be the issue. MTU is negotiated between each set of computers and routers in the net and packages broken in sizes fitting the MTUs under way.


Is it possible to view WebP images in nautilus / photo program?

There is a plugin for the GIMP, written by Nathan Osman.

You can add this plugin from his webptools PPA:

sudo apt-add-repository ppa:george-edison55/webp

Then install the required package: gimp-webp

sudo apt-get install gimp-webp

As for thumbnails in nautilus, this seems to be a bug with MIME, as apparently (so I was told) Nautilus already "supports" the webp format, but the thumbnails do not show up as they should.


It's nice to know what system you are trying to connect.Make sure that your script close session correctly. Some systems keep session  in case if terminated incorrect. As result you reached maximum amount of concurrent  sessions.


The PPA has been updated! - Now you can find packages for Oneiric, too.

If you don't know how to install that/a PPA (in Ubuntu 11.10), please read the answer(s) of this UA question:

"What are PPAs and how do I use them?"

to install
you can install install Glippy...

sudo add-apt-repository ppa:bikooo/glippy
sudo apt-get update
sudo apt-get install glippy glippy-ubuntu-mono

sudo gconf-schemas --unregister glippy.schemas
sudo gconf-schemas --register glippy-indicator.schemas

source


How can I add arial to the fonts used by software?

I faced similar issue, to this one when I declined its license while installation; And another case when I disabled network to avoid downloading them. (with wine installation)

ttf-mscorefonts-installer was marker as installed
Where its folder was empty (do you have any font files there):

/usr/share/fonts/truetype/msttcorefonts/

ttf-mscorefonts-installer is not a native package due to license, fonts are downloaded by a script (pre-/post-installation script)

Fixed by reinstalling it:

sudo apt-get install --reinstall ttf-mscorefonts-installer


After upgrading to 13.10, no applications are visible in the application lens

I think this is likely because the unity-scope-home package is not installed.

Try using Software Center to find and install that package, log out and back in to restart Unity, and see if that resolves the problem.


Automatically suspend 18.04.1 at idle login screen

This thread might contain your solution:

https://ubuntuforums.org/showthread.php?t=2425058&p=13881017#post13881017

  First, I needed to use su to switch to user "gdm":

  sudo su - gdm -s /bin/bash

  (If running in a non-GUI context, such as ssh, I also needed to run :
  export $(dbus-launch) )

  Then I was able to set some gnome settings as the the user "gdm"

  GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type suspend

  GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 120

  This sets the GDM3 screen to suspend after 2 minutes idle. Verify the
  settings with "get" commands:

  GSETTINGS_BACKEND=dconf gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type

  GSETTINGS_BACKEND=dconf gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout

  These values can also be modified with GUI dconf-editor. Before the su
  command, you need to run (as your regular user)

  xhost +

  and then after the change to gdm user via su, you can run:

  dconf-editor

  Be careful, though, with using this app.


vi /etc/pulse/daemon.conf

high-priority = yes

nice-level = -11

realtime-scheduling = yes

realtime-priority = 5

resample-method = src-sinc-best-quality

Or get rid of all that pulse crap and  install libflashsupport


How do I create a PGP Key Revocation Certificate in Seahorse

If you're fine with using the command line, this is easily done using gpg --gen-revoke.

The revocation certificate is stored in revoke.asc (in your home directory if you do not change anything else) and you should replace mykey by your key id.

gpg --output revoke.asc --gen-revoke mykey

Remember to store it in a save place, for example by printing it to a QR code or something similar.


Is it possible to have a unique theme for Vim in Ubuntu Server

I had the same issue being new to Ubuntu server and the default colorscheme wasn't working for my eyes.

The colorschemes for vim are at /usr/share/vim/vim74/colors.

Doing a basic search for VIM ColorSchemes will show you examples of the schemes and ones you can download and place in the above directory.

Then I edited the vimrc file

sudo vi /etc/vim/vimrc

if memory serves me correctly I had to manually enter

colorscheme NameOfColorScheme

example:

colorscheme blackboard

Do note this edits the default vim colorscheme for all users.


how to copy config-files of a modem, using ssh?

If your modem lets you log in over SSH, it probably runs Linux, but with a limited set of available commands. You can copy a single file with the command scp mymodem:/path/to/file . where mymodem is the host name of your modem. If you want to copy all the files, you need to be a bit more careful, because you need to exclude some special files from /dev and /proc and /sys.

If your modem has the command rsync, then the following will do (-x excludes filesystems other than the root filesystem):

rsync -ax mymodem:/ --exclude=/dev mymodem-files

If your modem has only the most basic set of tools, scp -r should still work. Make sure to exclude the problematic toplevel directories.

mkdir mymodem-files
cd mymodem-files
dirs=$(ssh mymodem ls / | grep -Evx 'dev|proc|sys')
for d in dirs; do scp -rp mymodem:/$d .; done

Where the “admin password” is stored is very dependent on the modem. It may be in /etc/passwd or /etc/shadow if it's a unix password, or in a completely different place if it's a password solely for the web interface. If the modem software is doing things right, you won't be able to find what the password was, but you'll be able to change it by modifying a file if you locate where the password is and figure out what kind of hash is used.


Keyboard stops working on Ubuntu 16.04 (Xenial Xerus)

I had the same problem with Ubuntu 16.04 (Xenial Xerus) and searched so much for any solution...

The solution is at the end of this answer if you don't care about the context story. Context could look like unuseful blabla (maybe it is), but I think that it could help readers to check if the problem I've solved on my PC is the same as their one.

CONTEXT

I desperately have unsuccessfully tested near every tips I've found on the web, rebooting after each try:

'/etc/default/grub' kernel boot usbcore.autosuspend=-1 parameter
laptop-mode's 'runtime-pm.conf' CONTROL_RUNTIME_AUTOSUSPEND=0
fully disabling Laptop Mode Tools from '/etc/laptop-mode/laptop-mode.conf' file, confirming that the problem isn't related to this kernel feature. I've checked different ways that laptop_mode wasn't running anymore to be sure. (Ref: man laptop-mode.conf & man laptop_mode)
I've read some tricks about '/etc/laptop-mode/conf.d/usb-autosuspend.conf', but this file doesn't exist in my version of Ubuntu 16.04 with laptop-mode-tools v1.68
powertop application uninstallation. It's often suspected in forums to cause autosuspend issues, and today I know that it was not true in my case as uninstalling it didn't fix anything.
options usbcore autosuspend=1 in '/etc/modprobe.d/usb.conf' has been inefficient too
'/etc/udev/rules.d/60-power.rules' script provided by Gentoo official Wiki
device-specific rules file for udev '/etc/udev/rules.d/usb-power.rules' recommended by Serge Y. Stroobandt

After having read all this technical stuff I only understood that the cause was related to my '/sys/module/usbcore/parameters/autosuspend' value stuck at two seconds, no matter what change I do to my configuration. You can check it with cat command:

$ cat /sys/module/usbcore/parameters/autosuspend
2

And yes, my mouse was disabled exactly after two seconds, so I knew I was on the right way. Of course I had tested the echo -1 command that I've seen here and there, -1 intended to disable autosuspend... but:

sudo echo -1 > sys/module/usbcore/parameters/autosuspend
bash: /sys/module/usbcore/parameters/autosuspend: Permission denied

I didn't understand why permission was denied even in sudo mode. I didn't try as root, because I just didn't think that it could be a problem. Here was the mistake :(

Thanks to Alex Dekker & Bryce comments, I've learnt how to disable autosuspend only for my mouse. But of course my first tries have failed with this bash: Permission denied error, so I had to wait for understanding of my root/sudo confusion before the echo -1 command suggested by Alex finally work.

I've also found a better way to execute a command as the root user without login as root. The difference between root shell and root commands usage is well explained in the official Ubuntu's RootSudo wiki page. I love to learn to these kind of things, but hey! Why does it have to be always learnt the painful way? LOL

OMG, it was a real headache, and it took lot of time for a noob like me to understand, as I usually say "no brain no gain". Mine visibly needs more training.

So let's stop talking about myself and go fix it! Please continue below...

I highly recommend the second solution for your idle external HDD to don't drain your laptop battery for nothing. But I give you both solutions, because who loves his/her own freedom should love each others freedom too :)

SOLUTION 1

To disable autosuspend on every USB devices/ports

Open Terminal and execute:

sudo sh -c "echo -1 > /sys/module/usbcore/parameters/autosuspend"

This is indeed a temporary solution that allows you to instantly test if this command fixes your mouse or keyboard autosuspend issue.
If your USB device(s) work fine now, just edit your '/etc/rc.local' script so it will run that command whenever the system is booted. This way you'll make the fix kind of permanent. Edit the file, for example with nano:

sudo nano /etc/rc.local

and put the echo -1 command in your '/etc/rc.local' file before the exit 0 line

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
(...)
# By default this script does nothing.
echo -1 > /sys/module/usbcore/parameters/autosuspend
exit 0

Restart your computer

(Please check the Important note at the end.)

.

SOLUTION 2

To disable autosuspend for a specific USB device/port

The power options for a USB device are in /sys/bus/usb/devices/n-n/power. What n-n is for a given device requires a few manipulation to find out, but it's not complicated. The example below shows how I've determined that the USB port number of my wireless mouse receiver is 3-1, so please adapt this to your own situation:

Unplug your USB device, open Terminal and execute the sudo dmesg command
Connect your USB device back, and then execute sudo dmesg again in Terminal to check for changes
Here's what the end of my dmesg command output looks like after having plugged my mouse back in a slot:

[40208.575249] usb 3-1: new full-speed USB device number 8 using xhci_hcd
[40208.705233] usb 3-1: New USB device found, idVendor=062a, idProduct=4102
[40208.705240] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[40208.705245] usb 3-1: Product: 2.4G Wireless Mouse
[40208.705248] usb 3-1: Manufacturer: MOSART Semi.
[40208.707679] input: MOSART Semi. 2.4G Wireless Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:062A:4102.0007/input/input24
[40208.763946] hid-generic 0003:062A:4102.0007: input,hiddev0,hidraw0: USB HID v1.10 Mouse [MOSART Semi. 2.4G Wireless Mouse] on usb-0000:00:14.0-1/input0

Now we can see that the port where my USB device has been plugged-in is identified as usb 3-1.

**Note:** this trick concerns the USB port ID, not a device ID. For example, if I plug my mouse to the next USB port, it becomes identified as `usb 3-2` in the `dmesg` result. But this solution #2 remains very useful if you take the habit to always plug your mice or keyboard to the same port, and it's generally what people use to do unconsciously ;)

Execute the following command in your Terminal, changing my port number 3-1 with the one you've found in your own dmesg result:

sudo sh -c "echo -1 > /sys/bus/usb/devices/3-1/power/autosuspend_delay_ms"

Note that autosuspend_delay_ms has replaced the deprecated autosuspend since kernel version 2.6.38, according to the Linux official documentation.
This is indeed a temporary solution, but you can now easily test if this command fixed your mouse or keyboard autosuspend issue.
If your USB device work fine now, just edit your '/etc/rc.local' script so it will run that command whenever the system is booted. This way you'll make the fix kind of permanent. Edit the file, for example with nano:

sudo nano /etc/rc.local

and put the echo -1 command in your '/etc/rc.local' file before the exit 0 line, once again don't forget to change port number n-n in the command:

    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    (...)
    # By default this script does nothing.
    echo -1 > /sys/bus/usb/devices/3-1/power/autosuspend_delay_ms
    exit 0

Restart your computer

.

Important: don't forget that you'll have to execute the sudo sh -c "temporary" command again manually if you disconnect/reconnect your USB device while your desktop environment is already started, even if you plug it back on the same USB plug. Normal, just because the '/etc/rc.local' file is called only once at system startup.

Anyway, workarounds are possible. Better skilled peoples may have more clever methods, but I've configured port-specific aliases in Ubuntu. It allows me to use the simple usb1 or usb2 commands selectively if I have to unplug/replug my USB device here or there. You too! You could also create commands aliases to play with short words instead of typing the full command. It's easy to set in less than two minutes and also works with Alt + F2 :)

More ideas to make it easier would be also very welcome.


Headphone volume button to control ubuntu volume?

This Feature is called "absolute volume". Windows brought it in it's April 2018 Update [1]
For PulseAudio¹, this seems to be a work in progress. [2] [3]
¹ PulseAudio is the default sound-server on almost every major linux-distribution including ubuntu. It manages volume-control and audio-transmission to bluetooth-devices.
[1] https://mspoweruser.com/the-windows-10-april-2018-update-is-a-massive-upgrade-for-bluetooth-in-windows-10/
[2] https://patchwork.freedesktop.org/patch/76558/
[3] https://patchwork.freedesktop.org/patch/257674/
Update 2021-01-25: There is a MR[4] in the meanwhile. It seems that there is still a lot of work but it's in active development.
[4] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239


Double entries showed in gnome applications 12.04

Gerd solved the problem in a comment:

  I solved it by myself. There must not be redundant entries in other nodes of the main menu. In my case this as been the case for the "Debian" node of the menu. If these entries are deleted, the symbols disappear also in the Application view. Cheers


How can I get my system to email me when a critical issue is encountered, based on command output?

UNIX already supports (the pretty standard) syslog logging, which enables logging of kernel and application messages and even forwarding messages to other network hosts.

You could use a cronjob to periodicaly execute something like:

netstat -nntulpa | grep SYN_SENT | logger

This will write netstat output to the local logfiles.

To receive the logs on a central "loghost", all you need is one line in the syslog config. Depending on your syslog daemon of choice, this looks like:

*.* @192.168.5.1

On the receiving end, you can do all sorts of fancy stuff (even sending emails), provided you chose a fully-featured syslog implementation, such as syslog-ng or rsyslog.

Your question is too broad, you could also use a monitoring solution like Icinga and a custom plugin that executes the very same command (minus the logger part). Syslog is easier to setup and supported out of the box by most applications. I hope my answered helps you on the syslog side of your question.


Laptop battery charging capacity reduced to 52%

Kindly go through the ACPI Problem and regression problem occured during the period from the ubuntu 10.10, 11.04 and 11.10..
Try to install the ubuntu 12.04 or the newer version . Or else check with the installing the Jupiter app. which is mainly developed eee asus .


I believe this is duplicate of WebGL doesn't work in Chromium on Ubuntu question as @Tim noted, here is my answer on it:

The ubuntu maintainer of Chromium has deliberately disabled GPU acceleration in the ubuntu build in Chromium 43.
Here is corresponding bugreport: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1463598

To workaround this issue you can downgrade to a previous version of Chromium (I have installed 41.0.2272.76-0 from Vivid).


This is a common mistake that I myself encountered when first starting out with juju.

You are missing the series identifier for the charm. Place the charm in $HOME/charms/precise/node-app

Deploy with

juju deploy --repository=$HOME/charms local:node-app and juju will deploy your charm from the local repository in $HOME as expected and stop fussing at you for not being able to find the charm.


How does one enable Compiz on Alienware M11x R2?

You won't be able to change the option in the UI because it doesn't realize you may have more than one GPU. However, you can use gconf-editor to change /desktop/gnome/session/required_components/windowmanager to compiz and then on your next login effects should be enabled. If you can't wait you can just run compiz --replace & in a terminal to get effects running for your current session.


Clone system and auto replicate the changes

I would use rsync with SSH keys over the network and set it to run frequently with cron.  This way, only the changes need to be transmitted.

Format taken from how do I do mass installs?

#!/bin/bash
rsync -avx --exclude=/proc --exclude=/dev --exclude=/tmp --exclude=/sys --delete-after root@${host}:/ /

On the machine that will serve as a backup, make a file named /etc/cron.daily/backup-pull then make it executable sudo chmod +x /etc/cron.daily/backup-pull.  Replace ${host} with the IP of the original system.

You'll have daily syncs of the original server to this one. You could also do cron.hourly instead of cron.daily if you're really paranoid.


How many Nginx processes should there be?

This is the number of your worker processes of nginx. The default configuration has 4 worker processes. They are here that the web server can handle multiple connections very fast. One of them is the master process see the output of ps fax | grep nginx:

 user@host:~# ps fax | grep nginx
 6885 ?        Ss     0:00 nginx: master process /usr/sbin/nginx
 6886 ?        S      0:00  \_ nginx: worker process
 6887 ?        S      0:00  \_ nginx: worker process
 6888 ?        S      0:00  \_ nginx: worker process
 6889 ?        S      0:00  \_ nginx: worker process

You see there is a master process and 4 child processes (workers).

Ot determine how many worker processes are configured type:

user@host:~# grep worker_processes /etc/nginx/nginx.conf
worker_processes 4;


Wireless Internet Extremely slow on a TP-Link TL-WN821N

I had similar problems on my Thinkpad X1. Disabling wireless N solved that. What wireless driver/kernel module are you using?

#/etc/modprobe.d/_wlan.conf
options iwlagn 11n_disable=1


Well I have several comments:

You MUST "ACCEPT" as per "set DEFAULT_FORWARD_POLICY="ACCEPT" in order to forward traffic between your 2 network cards. If you used iptables, rather than UFW you could write more specific rules if you so desired.
What do you mean by default to "ACCEPT" ? If by default you accept all traffic this is the same as not running a firewall. You could simply disable your firewall.

Setting the default policy to REJECT will lock yourself out if you flush your rules.

IMO best to keep default as ACCEPT, write all your rules for what to accept, and then have REJECT as the final rule in iptables. This way you will not be locked out if you flush the rules.

Don't use DROP, use REJECT - See  http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject
We really can not tell you what rules to use or how to write them without more information.

What servers are you running ? What traffic do you want to forward ? What are your current rules ?

IMO if you are writing extensive and complex rules sometimes it is easier to use iptables rater than UFW.


Usually to make games work on wine you search for each game on winehq (and other websites); just type in the name of the game and "wine". for example: "command and conquer red alert 2 wine"

You do that because usually you should see instructions for some extra things that you have to do to wine to make the game work. mostly through "winetricks"

anyways I've done some searching for you for red alert.
I love this game ;)

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

http://appdb.winehq.org/objectManager.php?sClass=version&iId=252

...search on and good luck


I turned all windows invisible in KDE neon

You can delete everything at ~/.config/KDE (ether in uppercase or lowercase) and also remove configuration at ~/.config/kwinrc. If still your problem presist then again create ~/.config/kwinrc and add NoPlugin=true


Simple file launcher and directory navigator sought for 14.04

You can just install the Cinnamon Desktop Environment in Ubuntu. That'll give you your old experience on your new OS.

Run these commands to install Cinnamon:

sudo add-apt-repository ppa:moorkai/cinnamon
sudo apt-get update
sudo apt-get install cinnamon

Log out, click the gear icon next to your username, and choose Cinnamon before logging back in.


unmet dependencies problem installing adobe flashplugin

You added a wrong repository for your Ubuntu release.

Run in a terminal

sudo -H gedit /etc/apt/sources.list

Then remove these lines

deb archive.canonical.com/ubuntu yakkety partner
# deb-src archive.canonical.com/ubuntu yakkety partner

Save the file and run

sudo apt-get update

The plugin should install by

sudo apt-get install adobe-flashplugin

The lines

deb archive.canonical.com trusty partner
deb-src archive.canonical.com trusty partner

are also wrong and should be removed too.


I had several exports in my .bashrc. The server is running suse and I'm running Ubuntu. Clearing the .bashrc solved the issue.


Pulseaudio drops HDMI output at screen power save

There's a bug report about this. In the comments #5 and #36 a workaround is suggested involving prevention of loading a particular PulseAudio module “module-switch-on-port-available” which handles output devices switching on/off or connected/disconnected. Anyway edit /etc/pulse/default.pa and comment out (i. e. insert a #) the line starting thus:

#load-module module-switch-on-port-available

You then need to restart PulseAudio:

pulseaudio --kill; pulseaudio --start


Making a password avaible during fixed time intervals

What you describe involves a chicken & egg problem. Using encryption, how would you encrypt your password such that it can only be decrypted with information that is not available in the present? If you don't know that information until a time in the future, you can't encrypt your password now.

The simplest option it probably just to give that password to someone you trust and make them promise they will not give it back to you until the time that you specify. Better yet, have them create the password so that you don't have access to it to begin with. If you don't completely trust the other person, you could type the first half of the passphrase and have them type the second half. If neither of you reveals his/her portion of the password to the other, neither of you would be able to access the service without the other's help.

Other solutions I can think of would involve setting up a service like this of your own and then locking yourself out of it. You could set up a server that will tell you the password only when queried at pre-defined times. Then turn administrative access over to another person or lock yourself out so that you are unable to break in and obtain your password anytime you want it.

If you just want a simple script that would accomplish this on the fly, try something like the following script. Just realize that if the script is somehow terminated, your password is lost forever if you don't have a copy somewhere else that is inconvenient to access like a safe deposit box or entrusted with a friend.

#!/bin/bash

echo "Nothing will be displayed as you type"
read -sp "Password to store: " pwd && echo
while :
do
    read -p "What time should I reveal the password: " time
    date -d "$time" && break
    echo "Invalid time format. Try again"
done
echo "Please destroy all records of your password now. Except for one copy that you will not have convenient access to."

unlockTime=$(date -d "$time" +%s)
now=$(date +%s)

timeout=$((unlockTime - now))
sleep $timeout && echo "Your password: $pwd" || echo "Shame on you for killing sleep. No password for you!"

This script will prompt you for the password and a time at which to reveal it. Then it will keep the password concealed "safely" in RAM (don't let the script die) until the time you specified. If you are brazen enough to kill the sleep command, this script will terminate without revealing the password! Simply copy the script text above into a plaintext file saved with a .sh extension, make it executable, and run it from a terminal window.


In Software & Updates, Update tab, 'When there are other updates' option is grayed out

Usually the 'When there are other updates' option is greyed out if the 'Automatically check for updates' option is set to 'never'.
If you change the value 'never' to e.g. 'Daily', the 'When there are other updates' option stays greyed out until you close and reopen the 'Software & Updates' Window, so that the previously chosen value is properly saved.
This time the 'When there are other updates' options should  be selectable and you can set it for instance to 'Display immediately'.
Tested on Ubuntu 20.04 64-Bit Desktop.


Is there any way to autoinstall Ubuntu without root-password and without sudoer?

Sounds like you're re-inventing a few different wheels. Thin provisioning has come a long way in the last 10 years but even way back then, I don't think anybody was looking to automate an installer.

So first-up, imaging is what you're looking to do, at some level. That is taking a snapshot of a partition, or just some files, or whatever you need and then extracting that wherever you need it.

In the case of a VM, you'd have an entire system image stored. To provision a new VM, you set up your disk, dd your image onto the disk and then —if you need it— alter that partition to fit the disk (eg expand it).

But these days —if you can get away with it— you really want to be looking at tools like LXD and Docker. Both use a bit of container tech called LXC. Much of the separation of a VM, twice the speed and a lot less fuff. Both LXD and Docker are strongly into imaging. Docker does a lot of layering stuff too (LXD may too, I've not used it directly).

Either way. Don't try to script the installer. Do a good install, set it up how you need and clone it.


How do I clear all gnome shell notifications?

Shamelessly using this workaround from the Fedora forums here.

You can reset the gnome-shell by typing Alt+F2, entering r and hitting enter. This resets/restarts the GNOME Shell and so clears all notifications.


Google Chrome in Kubuntu 18.04 does not scale to 1.5x

Go to KDE settings and change display sizing to 150%.  This will force Chrome and other electron based apps to resize to hidpi displays.


how to change gnome 3.2.6 panel background color

gnome-shell styles for the top panel are determined by the CSS file /usr/share/gnome-shell/theme/gnome-shell.css.

The top panel is styled by the #panel ID:

#panel {
    background-color: black;  /* <--- */
    font-weight: bold;
    height: 1.86em;
}

You can change that background colour to one you like.

You might also wish to change the .panel-corner class' -panel-corner-background-color colour to get those two rounded corners on the bottom-left and -right of the top panel to change colour:

.panel-corner {
    -panel-corner-radius: 6px;
    -panel-corner-background-color: black; /* <--- */
    -panel-corner-border-width: 2px;
    -panel-corner-border-color: transparent;
}

If you wish to avoid modifying the global file /usr/share/gnome-shell/theme/gnome-shell.css, you could make your own theme for gnome-shell (these can be set with the gnome-tweak-tool program). I am fuzzier on the details here, but I suspect you can  copy the entire /usr/share/gnome-shell/theme folder (so that you have all the pictures the theme requires) and modify the CSS file, which will provide you with a complete theme.


Go to the menu System > Administration > Software Sources. There is a drop-down box labled "Download from:" where you can choose a mirror near you.

If this doesn't work as planned (might not since you have a "custom mirror") then you can edit the file /etc/apt/sources.list by typing sudo gedit /etc/apt/sources.list in a terminal and pressing enter, if you need help you can type man sources.list in the terminal.

A source of the unwanted traffic might be from security.ubuntu.com this is where the security updates comes from, they can be turned off, but it's not recommended!


How to keep processes running after ending ssh session?

You should look for modern alternatives like tmux.

tmux is superior to screen for many reasons, here are just some examples:

Windows can be moved between session and even linked to multiple sessions
Windows can be split horizontally and vertically into panes
Support for UTF-8 and 256 colour terminals
Sessions can be controlled from the shell without the need to enter a session

Basic Functionality

To get the same functionality as explained in the answer recommending screen, you would need to do the following:

ssh into the remote machine
start tmux by typing tmux into the shell
start the process you want inside the started tmux session
leave/detach the tmux session by typing Ctrl+b and then d

You can now safely log off from the remote machine, your process will keep running inside tmux. When you come back again and want to check the status of your process you can use tmux attach to attach to your tmux session.

If you want to have multiple sessions running side-by-side, you should name each session using Ctrl+b and $. You can get a list of the currently running sessions using tmux list-sessions, now attach to a running session with command tmux attach-session -t <session-name>.

tmux can do much more advanced things than handle a single window in a single session. For more information have a look in man tmux or the tmux GitHub page. In particular, here's an FAQ about the main differences between screen and tmux.


Cannot create a new partition for unallocated space using gparted

The answer to the question asked is that if you want to enlarge your Extended partition, you must first move everything to the left so that the unallocated space is after the Extended partition, at the end of the disk. then you can enlarge your Extended partition and create a new logical partition inside it. However, this will be both lengthy and risky, because data will need to be physically moved from one location on the disk to another. Also, since you will need to move your Windows partition, there is a possibility that Windows will get confused and refuse to boot.

There are two less drastic alternatives to consider.

If your new partition is to be used in Linux, there is no need to create one, just enlarge your existing Linux partition. This would be quick and painless, because the free space is alteady to the right of it.
Since your existing Extended partition only contains your swap partition, which does not store any data, you can just delete it and create a new one in the free space. Then inside it you would recreate a swap partition and then create your new logical partition (you would also need to modify your Linux system's /etc/fstab to use the new swap partition). The drawback is that you would then not be able to create anything in the free space where the old Extended partition was (but you could possibly enlarge your Windows partition over it).


LibreOffice Writer is erasing my document's line spacing after I save and close

Under [format] [paragraph] check [Don't add space between paragraphs of the same style]


How to install latest nvidia drivers (xorg edgers doesn't work)

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352

And it also makes sense to remove xorg-edgers

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


ubuntu one not syncing... in windows XP Sp3

I experienced the same problem with Ubuntu 2.0 on Windows 7 (64-bit, German). It took very long to start the program (more than 20 minutes estimated), then the "ubuntuone-control-panel-qt" reported "AttributeError: "'NoneType' object has no attribute 'get_rootdir'" or "...no attribute 'autoconnect_enabled'".

This was solved when I restarted the computer and then started UbuntuOne with Admin-privileges (right-mouse click on the icon and choose "run as Admin"). The Win-7-firewall displayed a pop-up about letting this program pass the firewall, which I allowed (for home and business-networks only). Now everything works nicely.

In the settings I unchecked the option "Connect automatically when computer starts", because I am unsure whether this automatic start would have the necessary admin rights.


Trouble installing ubuntu 14.04: initramfs

I found a solution to my problem. It turns out that when I was trying to install via USB, I had put it into a USB 3.0 slot, which I've now found doesn't work. I wasn't able to get version 14.04 to work, but I did get 12.04 to work.

I still don't know why it wouldn't boot from DVDs. I had tried three versions of ubuntu (12.04, 12.10, 14.04) and Zorin 8.


Is there any known problems with PCI-E based SSD disks?

There are indeed some PCI Express SSDs that don't work well, but most of them do. They are basically a RAID controller with discs on one card you see, so same as with raid controllers: The more expensive ones generally work, the cheaper one's may not work perfectly.

You should therefore make sure you can give it back should it not work.

The one you linked, the OCZ RevoDrive, is known to work.


Problem installing Ubuntu 14.04 server on a powerPC (IBM power5 eserver)

Solved:
The correct yaboot command is:

install-powerpc64 console=hvsi0

because power5 uses /dev/hvsi0 for console, not /dev/tty0.
Using this, Ubuntu was installed flawlessly. I don't think that Ubuntu yaboot supports vnc installation though.


is there a fix for mouse going off the edge of the screen?

I was checking out the post as I had the same issue with the mouse going off the right hand side of the screen and when trying to use the scroll on the right and side was awkward!

When I went to Preferences > Display settings I found the screen had two parts! i.e. two rectangle squares showing two screens. I re-checked the additional drivers, this time for some reason 4 different nVidea drivers appeared. They never showed until today in the additional driver section. Anyway to cut a long story short I selected nVidea Binary Proprietary tested driver (not the legacy one) and restarted the computer. Bingo the mouse cursor never leaves the edge of the screen and now only one screen appears Preferences > Display settings.

I hope this helps :D


12.10 won't allow Windows partition to boot

Copy and paste the following command into a terminal window :

sudo update-grub2

Enter your password when asked.

These things happen all the time


For some reason the settings would not keep until I disabled this GTK file. However, I would still keep a copy as done below.

cd /usr/share/xfce4-notes-plugin/gtk-2.0/
sudo mv notes.gtkrc notes.gtkrc.backup

Now choose your favorite text editor. I use gedit.

gedit ~/.config/xfce4/xfce4-notes.rc

Change line #10 to

Transparency=0

Launch Notes. Enjoy the white background. This would be my preference too!

(Extra note) If for some strange reason this does not work, in ~/.config/xfce4/xfce4-notes.gtkrc change notes_bg_color and notes_selected_bg_color to #ffffffffffff


There are three different commands,

sudo chown -R "$USER":www-data /var/www changes the ownership of the /var/www folder to user=$USER and group=www-data.
find /var/www -type f -exec chmod 0660 {} \; searches for files under /var/www and changes their permissions to 0660, which is equivalent to rw-rw----.
sudo find /var/www -type d -exec chmod 2770 {} \; sets SetGID on the /var/www folder. This is to make sure scripts are always run with group permissions.

There you have it, hope it helps.


What is the name of the security concept that explains why Linux asks for root password?

Your question is a bit vague, but you seem to be asking about the principle of least privilege, which basically says that a system is most secure when each piece only has the permissions necessary to do its own tasks. This limits the possibility of damage from mistakes or malicious actions.

An ordinary user typically does not need to be modifying system-level software or configuration, and so a regular user account doesn't have the permissions to do so. For the relatively infrequent times when you do want to make system-level changes, the sudo system (or equivalent such as Polkit) provides a way for you to gain those permissions temporarily, make the changes you want, and discard them.


Can two PCs with Ubuntu share the clipboard buffer?

If the PCs are on the same network, it is possible.
Software like Synergy can do it.

  Synergy brings your devices together in one cohesive experience.

  Seamlessly move your mouse to any computer and start typing.
  Works on all major operating systems (Windows, Mac OS X, and Linux).
  Share your clipboard (copy and paste) between your computers.


USB mouse/keyboard stopped working ubuntu 12.04 lts 32 bit

When enabling additional drivers for my new ati graphic card the usb mouse and keyboard stops working.. The system gets very unstable. So i just disabled them and it's ok now.