This works in Ubuntu 13.10, in Unity, but with Gnome installed (so it might work).

You can enable it in dconf-editor - (search for desktop with  Ctrl+F) - but it is just as simple to run - note the set commands may restart file manager:

gsettings set org.gnome.desktop.background show-desktop-icons true

To turn off again:

gsettings set org.gnome.desktop.background show-desktop-icons false

To get the current value:

gsettings get org.gnome.desktop.background show-desktop-icons

You can use unity-tweak-tool as well, but to change what appears on the desktop:

Also, in ~/.config/user-dirs.dirs, make sure this line is present and is going the right path:

XDG_DESKTOP_DIR="$HOME/Desktop"

Also rememver that you can't view any files starting with ., or ending with ~ on the desktop.


Cannot install printer driver epson l210

This should be fixed by running in terminal

sudo apt-get install -f

If you installed drivers from Epson site, they require some other packages to be installed too. But the problem is that 13.10 is not supported any more, and you won't get these packages from repository.

There is a way to connect "old-releases" repository, but I suggest upgrading the system to 14.04.

This will be closed as off topic anyway, since the question is about unsupported release.


You have a 64bit installation of Ubuntu(verify with uname -m), and the CedarView driver in the repositories is 32bit only.


So I have found the solution for this at last. I had the same problem with Samsung printer ML-1670, which stopped working since I installed Ubuntu 14.04 and thought it was a problem specific to this Ubuntu release, but it is not.

As you can see here, this is a problem caused by the latest version of the Samsung Universal Linux Driver (ULD) V1.00.21, released on 12 March 2014.

What you have to do is simply download the previous version of the Samsung ULD (V1.00.06 of 6 August 2013) which can be found here, under the section "Driver". Don't worry that this is not your exact printer model, as ULD is a package which includes all Samsung printer drivers. I have tested it with my printer and it works flawlessly.


How to unmount nfs on shutdown of system via Network Manager

Based on adonis' comment I was able to fix this as follows:

create a new file /etc/NetworkManager/dispatcher.d/pre-down.d/99nfs.sh
make it executable
contents:

#!/bin/sh

logger "down: unmounting nfs shares PREDOWN"
umount /media/media

of course I could also have checked for the interface, but I did not this time.

edit
This solution broke. See Networkmanager: dispatcher.d/pre-down.d is not executed on shutdown anymore for followup.


You can write php script which will add one line with format of cronjob in /etc/crontab file by executing it with browser like http://www.example.com/script.php .Can you please elaborate your requirement ?

Edit
you can add something inside php file like below

<?
$output = shell_exec('crontab -l');
file_put_contents('/tmp/crontab.txt', $output.'* * * * * NEW_CRON'.PHP_EOL);
echo exec('crontab /tmp/crontab.txt');
?>


I thought I was the only one with this problem.

Anyway, the quickfix is resizing the window (Ctrl+Shift+C if opening a docked console works too!),

the little longer fix is writing a browser extension that automatically does

window.dispatchEvent(new Event('resize'))

everytime a youtube link loads.

and the best fix is begging google and firefox on bugzilla for a fix in emails for a fix

I'm not entirely sure if this is a stupid move on googles part for not testing it on ubuntu, or this is a ubuntu thing, either way lets hope this goes away !


Why can't I connect to the internet at all with Ubuntu 12.04 LTS or 12.10?

Are you sure that Ubuntu installed the drivers for your hardware? Are you connecting through ethernet or wifi? A little more information is needed here.

Open terminal and type: sudo lshw -c network and look for your network interface. Check and see if it's broadcasting or not.

If you need more help with it, run the command and post your results here.


Did you press Ctrl+S by any chance?  It's the terminal pause key that stops all output until you press Ctrl-Q to resume.


Fix the buttons (move them to the right or reverse them)
Install Gnome-do
Install Docky
Re-theme
Activate ufw firewall
Install Kubuntu desktop (nice to have both options)

...

Make a backup copy of all your installed applications using Synaptic and store it offline. It makes rebuilding a machine much easier next time (you end up having 3 steps instead of 10+)


What are advantages of "cp" over "rsync"?

cp is a part of coreutils, therefore it is present everywhere. furthermore, it primarily was designed to copy files inside one computer.

rsync isn't a part of coreutils, it isn't present even on the default environment. It was primarily designed to transfer files over network. Also rsync has more dependencies comparing to coreutils, however this difference doesn't make a big sense.

The main advantage of cp over rsync is time and less cpu usage .

Reference here,here,here,here,here and here


Boot error: "/dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY."

It's probably a hardware failure.
You can try starting in single user, check with debugfs -w /dev/sda1 and then lsdel to see the deleted inodes.
Also hdparm -T /dev/sda to see if everything runs smoothly.


Gdebi as default package installer in ubuntu 17.10

I found my solution and thought I would share that.

This can be used for any application, just correct the name appname.desktop

$ gksudo gedit /usr/share/applications/gdebi.desktop

(Note that the .desktop files should be in /usr/share/applications, but if not will be in ~/.local/share/applications, so change the path accordingly if you need to. Also, if you cannot correctly guess the .desktop file’s name, you can get the correct name by going to the folder and browsing for it).

[Desktop Entry]
Name=GDebi Package Installer
GenericName=Package Installer
Comment=Install and view software packages
Exec=gdebi-gtk
Icon=gnome-mime-application-x-deb
Terminal=false
Type=Application
Categories=System;
MimeType=application/vnd.debian.binary-package;
NotShowIn=KDE;
X-Ubuntu-Gettext-Domain=gdebi
StartupNotify=true
Keywords=package;apt;dpkg;install

Find the Exec= line and you will see the command listed after it. Simply go to the end of the line, hit the spacebar, and add %f, so the line looks like:

Exec=gdebi-gtk %f

Simply save the file when exiting, and you shouldn’t even need to restart Nautilus, let alone log out or totally reboot. You should immediately see the desired program in the list of apps presented in Other Application…, and once you open a file with it, the app should be easily accessible in the list of secondary programs found in Open With.


Backing up a directory on Ubuntu server.

When I was running minecraft servers I used rsync to copy from my ramdisk into a physical backup.  Before you do this make sure you pause your world.  I also used this method to sync my ftp server and my game servers.

you can add a script into your crontab that pauses the world saves, then rsyncs to your backup directory, then re-enables world saves.  you can use rsync like this:

rsync -rh --progress path/to/minecraft/world user@nas.ip.address:/path/to/backup

If you need to provide login information, I recommend SSH keys as I have implemented here


What are the third parties that receive my online search results?

The link has been moved a bit. For starters, check https://www.ubuntu.com/privacy-policy/:

  Searching in the dash

  When you enter a search term into the dash Ubuntu will search your
  Ubuntu computer and will record the search terms locally. Depending on
  whether you have opted in or out (see the “Online Search” section
  below), we may also send your keystrokes as a search term to
  productsearch.ubuntu.com and selected third parties so that we may
  complement your search results with online search results from such
  third parties including: Facebook, Twitter, BBC and Amazon. Canonical
  and these selected third parties will collect your search terms and
  use them to provide you with search results while using Ubuntu.

  By searching in the dash you consent to:

  the collection and use of your search terms and IP address in this
  way; and the storage of your search terms and IP address by Canonical
  and such selected third parties (if applicable).

  ...

  For a current list of our selected third parties, please see the
  third party privacy policies.

That last sentence is a link to the updated list. The software just hasn't been updated in accordance (which would probably require a complicated SRU).

For completeness, the link lists, at the moment:

3sat Mediathek          Foursquare              Sonsgterr
7Digital                GitHub                  SoundCloud
ABC iView               Google docs (Google)    Stack Exchange
Amazon                  Google News             TED Talks
Ask Ubuntu              Headweb                 TMDb
BBC iPlayer             IMDb                    Twitter
Bing Video              is.gd                   Vimeo
Clear Sky Chart         JSTOR                   VODO
COLOURlovers            Launchpad               Weather Underground
Dailymotion             Open Clip Art Library   Wikipedia
deviantArt              Picasa (Google)         Wordnik
Dribbble                PubMed                  Yahoo! Finance
eBay                    Recipe Puppy            Yelp
Encuentro               reddit                  YouTube Education
Etsy                    RTVE                    YouTube Movies
Europeana               SCI-FI-LONDON           YouTube Shows
Facebook                ScienceDirect
Flickr                  Songkick


How can I start Ubuntu after install was interrupted?

Open TTY (Ctrl+Alt+F1)
Install missing:

sudo apt-get install -f

Or if your PATH is broken, so:

/usr/bin/sudo /usr/bin/apt-get /usr/bin/install -f

Now reboot:

sudo reboot

Or if your PATH is broken, so:

/usr/bin/sudo /sbin/reboot


This is normal, formatting will always use up some space. For example, my 2TB HDD is recognised as 1.819 TB.

This is for a couple of reasons, the first being the manufacuturer lies about the volume (they will say 1 TB is 1000 MB, not 1024, and so on down).

This means my 2 TB HDD is actually 2,000,398,934,016 bytes. This translates to 2,000,398,934,016 / 10243 ~ 1863 GB, or 1.819 TB.

Note that I've just lost 9% of my disk space, which is close to 200 GB, just because they lie about the space.

And then formatting takes up space. I'm not sure how much, but GParted claims my Disk is 1822 GB (more than my calculations) but there is definitely some loss there.

Aparently,

  ext3 and ext4 file systems take 5% of partition size for security etc.


At this time, November 2020, there is no official WhatsApp client you could install on a Linux distribution, however, you can install an unofficial WhatsApp client at your risk.
Here are some of the unofficial WhatsApp clients available on snap store:

https://snapcraft.io/walc
https://snapcraft.io/whatsdesk
https://snapcraft.io/whatsapp-for-linux


View two text files at the same time side by side

Use Vim, with scrollbind set. For example:

vim -O +'windo set scrollbind' /etc/profile /etc/profile.pacnew

With scrollbind, if you scroll in one window, the other bound windows also scroll at the same time. To have line numbers, a ~/.vimrc containing a minimum of the following two lines is enough:

set nocompatible
set number

Not that you need a vimrc for this - it can be done entirely from the commandline:

vim -NO +'set nu' +'windo set scrollbind' file1 file2 ...


Install Ubuntu on fresh new SSD alongside with windows on another SSD

From what I understand, you want to have an SSD with both Ubuntu and Windows 8 on it and have an HDD for data. UEFI partitions and boot loaders are not very different from the traditional BIOS; infact, for UEFI booting, you still use the same bootloader you've probably been using: GRUB 2. First, you need to boot into Windows. Open Disk Management and use that to shrink your Windows partition. Don't let the Ubuntu installer do it for you (it could mess some stuff up). Then change your UEFI settings (it's technincally not a BIOS) and look for an option called SecureBoot. You want to disable that to work around a bug in GRUB 2 (it won't affect your Windows stuff, but if you get a message about having SecureBoot disabled you need some Windows updates). Then boot from your DVD or flash drive or whatever you're installing Ubuntu from and open the installer. Choose Something Else for partitioning. Now, whatever you do, do not make swap! Swap is very bad for SSDs. Create an ext4 filesystem in the free space and continue. Ignore warnings about swap (if you want you can create some swap on that hard drive of yours) and let it install. After it finishes installation, shutdown, put back in all of your drives. Change your UEFI settings after putting the drives back in and make sure Ubuntu is set to boot before Windows. Sometimes Windows updates will put Windows back at the top so if you ever boot straight into Windows just put Ubuntu at the top again. Boot into Ubuntu. I realize that it did not give you a choice to boot into Windows but this is normal  (for now). Open a Terminal and run sudo update-grub. Hopefully it will say it found Windows Boot Manager. Also, if you're using Ubuntu 14.10 (bad idea for servers!) skip this next part. If your SSD is made by a company other than Intel, SAMSUNG, OCZ, Patriot, or SanDisk, you need to run sed -i 's/exec fstrim-all/exec fstrim-all --no-model-check/g' /etc/cron.weekly/fstrim to enable TRIM. If you want to make a swap partition on your data drive install and load GParted and it will do it easy. Reboot and check that everything works. If it does then good for you. Here is some more information on optimizing Ubuntu for SSDs (14.04 is not as SSD-friendly as 14.10 but maybe an update will come out soon that will take care of that): How do I optimize the OS for SSDs?


Will the new technologies in 12.10 be backported to 12.04

No, otherwise, what's the point of an LTS release? Stable Ubuntu releases are supposed to change at little as possible, hence they only get critical bug and security fixes. New and potentially unstable features are limited to tesing and non-LTS releases.


GNOME Screenshot can't copy to clipboard in Ubuntu 18.04

Not sure if this is related - in my case (fresh Ubuntu 19.10), gnome-screenshot -c would put the captured image to the clipboard, but somehow I can only paste it in certain applications (e.g. Gimp) while not in others (e.g. Chrome).

Found a workaround by (assigning to a shortcut) this:

gnome-screenshot -acf /tmp/test && cat /tmp/test | xclip -i -selection clipboard -target image/png


How to efficiently preserve a really big navigation history in Firefox?

Have you tried setting places.history.expiration.transient_current_max_pages to a higher number (or perhaps -1)? To access this, type about:config in the address bar and press Enter.

I am not sure this works; a cursory search of the entries exposed by about:config revealed this to me. Perhaps someone more knowledgeable can edit this post to improve it (or post their own answer).


Ubuntu-touch 15.10: Installing x11apps without breaking anything

From googling around it seems that libertine cannot be used on 15.10 without remounting the root partition.

This may change with OTA-11 which has an eta of sometime next week. (week beginning May 30th).


After changing PHP version the Joomla cms has "Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions)"

Did not install MySQLi 7.3, had to do additionaly

sudo apt-get install php7.3-mysqli

Current Joomla needs the MySQLi for database connectivity


Can't install DiffMerge. Error showing "dependency is not satisfiable :libcurl3(>=7.16.2-1)"

On modern 19.04 system you will not able to satisfy the dependencies of the software from 2013 year. But you may try with 16.04 LTS.

Instead I would suggest to install similar packages from the repository on any Ubuntu version - one of:

MeldMerge with sudo apt install meld
KDiff3 with sudo apt install kdiff3


Installing Canon ip2600 printer drivers on ubuntu 12.10

After updating to Ubuntu 13.04 (64-bit), I got my Canon ip2600 printer to work with the canon-trunk repository:

sudo add-apt-repository ppa:michael-gruz/canon-trunk
sudo apt-get update
sudo apt-get install cnijfilter-ip2600series

Before that, I also tried the Gutenprint driver, which installed fine, but still no reaction from the printer.


How to set packages to use my compiled version of dependencies

Not a direct solution, but here is what I did:
You can't by pass requirements of deb packages.
So I end up remove/purge the repo's version of network-manager, then compile network-manager from source code along with some other libraries it needs. Then use checkinstall to generate the deb package of network-manager locally, store that deb package somewhere for house keeping.
The trick is install the most the the library which my new network-manger needs using apt, then mark the libs to hold using apt-mark so the apt will not think I am keeping the unnecessary library and autoremove will not remove them.
Of course, in the end I need to mark all locally built packages to hold otherwise
apt upgrade in the future will break them.


this worked for me by now

sudo apt remove --purge pulseeffects

then remove from "Software" application (i don't know why i could still find it there after purging); then reboot and re-install from "Software"


How to remove (some) gmail folders in Thunderbird

You can also tell gmail itself to not present the relevant folders to the IMAP user (thunderbird) at all. To do this, go to Gmail > Settings > Labels, find the relevant labels, and untick "Show in IMAP".


Elantech touchpad not working in Ubuntu 16.04.3 on Lenovo Ideapad 320

I have exactly your problem and case
I have linux ubuntu 16.04.3  and lenovo ideapad 320

1) update your linux from software updater , i did all updates.
2) update security , and any other updates via command line
3) upgrade your kernel to latest, in my case i upgraded from 4.8 to 4.10.0

P.S
I have 64 bit system.
If i were you i can test with live cd ubuntu to proof its working. and it did work

References
About upgrading i used something like this

sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

and you can check your version by

uname --kernel-version


Ubuntu 13 fails to boot after Live-DVD install

Your almost there, it looks like the Nouveau kernel module might be the problem. Blacklist it in modprobe.d by editing "/etc/modprobe.d/blacklist.conf" and add these lines.

 blacklist nouveau

 blacklist lbm-nouveau

 blacklist nvidia-173

 blacklist nvidia-96

 alias nvidia nvidia-current

then rebuild initramfs with

sudo update-initramfs -u

reboot and do lsmod to see if any nouveau modules are loaded. If not, then do the NVidia installer.


What does the AMD unsupported software message in the right corner mean?

Unsupported Hardware Watermark
This can happen if your card's PCI ID wasn't officially certified to work with a particular version of Catalyst. It does not necessarily mean that your card is unsupported, but it does mean that you shouldn't file bugs with that particular card/driver combination. If you installed the driver by downloading it from AMD/ATI, installing a newer version of Catalyst will probably help.
If you installed the proprietary driver included with Ubuntu or you do not want to upgrade to a newer version, it may be possible to work around the issue by using a control file from a newer version of Catalyst than the one you're running.
cd ~/; mkdir catalyst11.10; cd catalyst11.10/
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-10-x86.x86_64.run
chmod +x ati-driver-installer-11-10-x86.x86_64.run
sh ati-driver-installer-11-10-x86.x86_64.run --extract driver
sudo mv /etc/ati/control ~/control.bak
sudo cp driver/common/etc/ati/control /etc/ati


The cleanest solution might be to write an upstart job. Create a file in /etc/init/myjob.conf. That could look for example like this:

description     "My custom upstart job"

start on login-session-start

task

exec /path/to/script.sh

The description defines a short explanation
The start on statement describes, at which event the job is executed. We don't need a stop on statement here, I think.
A task job is one which runs a short-running process, that is, a program which might still take a long time to run, but which has a definite lifetime and end state.
exec is the main part of the job. Take care what environment variables your script needs to be successful. I assume, since your script must run after an X server has started, you need proper environment variables such as $DISPLAY and $XAUTHORITY and maybe also $DBUS_SESSION_BUS_ADDRESS.
If you have trouble, take a look at /var/log/upstart/myjob.log where all output of your job goes.


Recover gedit file after save and restart

Well it depends how you edited / deleted and how many times the content. Some editors like gedit creates a backup copy of file before saving with the '~' (tilde) suffix. These files  with the '~' suffix are hidden files for most of file managers (like Nautilus). So, with a little bit of luck you can recovery your lost content from these files.

Note - In case if you are not using gedit than for backup on vi editor have a look at this article.

Hope it helps


Wifi disconnects and reconnects on its own frequently on Ubuntu 20.04 LTS

For this Intel 3160 adapter I would suggest running
sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi 11n_disable=8"

and reboot.
You can revert this setting by
sudo rm /etc/modprobe.d/iwlwifi-opt.conf


Mathematical Packages For Ubuntu

all the following can be found in the software centre

Octave: Is a near clone of MATLAB using the same syntax for .m files.  It does not include a Simulink Clone however.

Scilab: Is a similar matrix based mathematical to MATLAB but it does have its own syntax so is not directly compatible.  It does however include
scicos which though not identical is similar to Simulink: a block diagram modeller/simulator.

Spyder: is a powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features.  This can be used for mathematical modelling.

Maxima: Is a computer algebra system similar to Mathcad, Maple and Mathematica.

Other free package which are not in the repositories

sage: is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.

It can be installed as follows:

apt-add-repository -y ppa:aims/sagemath
apt-get update
apt-get install sagemath-upstream-binary

source here


Compiz crash means launcher and almost everything else has disappeared from desktop

Looks like the Compiz Unity plugin is accidentally deselected. Press Ctrl + Alt + T and type unity --replace and you would have your Unity back. Alternatively, if you have CompizConfig Settings Manager (CCSM) installed in your computer, you can type ccsm in Terminal and run the program. There, under the desktop heading, you can select 'Ubuntu Unity plugin' and your Unity would be back to normal.


As of currently tablet like devices are still coming to the market. As far as I know there are currently no tablet like devices running Ubuntu, though in the near future there will be a whole bunch running Android and/or Meego. If I were you I'd look into the Samsung Galaxy Tab which is due to be released very soon.


How to make GRUB boot straight to Ubuntu Server 14.04

I assume you're using Ubuntu Server.

Ubuntu Server is usually installed on a headless computer and therefore doesn't have a GUI in order to save resources.

Because of this you can't run graphical programs (like gedit) on Ubuntu Server, unless you install a desktop manager (GUI). gksudo is used to run graphical applications with superuser priveleges. To run a terminal command as superuser you would just use sudo.

So, as mentioned in the comments, you should use a CLI text editor.

vim (advanced)

vim /path/to/the/file/to/edit.txt

nano (easy)

nano /path/to/the/file/to/edit.txt


Paste image resulted from Ctrl + Shift + PrintScreen

I have had similar problems.  Make sure that Ctrl + V is still paste in that program.  You can try right click- paste, or the drop down menu (edit). I have experienced text editors in Linux where you have to use edit > paste, where hot keys were disabled.  Hope this helps.


Munin on Ubuntu 16.04 - Empty network graphs

Ok, I finally found what the problem was. Munin was unable to determine the ethernet connection speed, and in the details of the traffic graph it was reporting:

  Maximum speed is -1Mb/s.

I don't know if this issue is global to Ubuntu 16.04, but it was not here on the same cloud instance with prior versions of the OS.

To fix it, I just forced the link speed in the plugin's configuration (/etc/munin/plugin-conf.d/munin-node):

[if_*]
user root
env.speed 1000


When running Minecraft with OpenJDK, my keyboard becomes unresponsive?

This may be a problem with the Lightweight Java Game Library (lwjgl). Mojang does not keep up with their updates. Download the latest version from http://lwjgl.org/download.php, and extract the archive. Replace jinput.jar, lwjgl.jar, and lwjgl_util.jar in the .minecraft/bin directory with the corresponding files from the extracted directory lwjgl-2.8.x/jar. Also replace the the files in .minecraft/bin/natives with the files from lwjgl-2.8.x/jar/native/linux. Just to be safe, you should probably make backups of those files before you replace them.

Hope this works!


Create your own small network

Make up a nice small subnet in the private IP space, e.g. 10.1.2.0/24. This is for 254 hosts, and overkill, but it's easy in calculation and entering details.

I'm assuming you have either a switch connected between the two or using a network cable that is suitable for your two PCs to be connected to each other directly. Most modern network cards feature Auto MDI/MDIX, so no need for a crossover cable.

Below is a list of steps to have PC1: 10.1.2.1 and PC2: 10.1.2.2.

On PC1

Go to Edit connections.

Add a new connection.

Fill in a name, e.g. Cross-cable connection
Select the right interface from the "Device MAC address field":

Then on the IPv4 Settings tab, add the following details and take the steps as shown in the image.

Method: Manual
Address: 10.1.2.1
Netmask: 24
Gateway: 0.0.0.0 (this means 'none' in IPv4)

Establish the connection using the network menu:

On PC2

Follow the same steps, on one exception: enter 10.1.2.2 as IP address.

Now, you should be able to 'ping' PC1 from PC2:

ping -c3 10.1.2.1
PING 10.1.2.1 (10.1.2.1) 56(84) bytes of data.
64 bytes from 10.1.2.1: icmp_req=1 ttl=64 time=0.661 ms

And establish a connection with Nautlius using the IP addresses we just assigned.


PinguyBuilder not installing on Ubuntu 20.04 because of unmet dependencies

Tried to install it with gdebian, to be more exact with:
sudo gdebi pinguybuilder_5.2-1_all.deb

(in the Downloads folder)
But it didn't work, because it had unmet dependencies, as in Software Install. It seems that PinguyBuilder needs "python-glade2" to install correctly.
Edit: Seems like that PinguyBuilder, as it is built for 18.04, uses the glade library for python-2, which is deprecated since 18.04
It is better to use the menu-based-version of PB, as it still works in 20.04


How do I pipe a newline separated list as arguments to another command?

Use xargs:

mycommand | xargs -L1 id

Example:

$ (echo root; echo nobody) | xargs -L1 id
uid=0(root) gid=0(root) groups=0(root)
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

You can also loop over the input in bash:

mycommand | while read line
do
    id "$line"
done

xargs converts input to arguments of a command. The -L1 option tells xargs to use each line as a sole argument to an invocation of the command.


That is expected behavior.

In MaaS, the first time something PXE boots, it is "enlisted" into the DB.  That involves loading a very small OS that sets up power control if the system has it.  For a VM I get the name, unknown new, 0 cores, 0 RAM, 0 disks, 0 disk space.

The "unknown" supposes you have no capability to power the machine on or off, or check the power state, over the LAN.

Now select the checkbox and you will see a pull-down menu in the upper left change from "Add hardware" to "Take action".  Select this and choose "Commission", and you will see a green button appear "Commission 1 machine" (if you selected one).

Press the green button and then turn your machine on.

It will go through a longer boot cycle.  After the boot cycle, the display will be name, unknown, ready, 4 (cores) 4 (GB ram) 1 (disk) 480 (GB disk space).

Also, I know it can be frustrating, but don't get upset if you don't get same-day answers on askubuntu.  There are times I go in and answer questions that are months to years old because I only just stumbled on them.

Welcome to MaaS and Good luck


how to connect Ubuntu computers to CentOS server?

There are several ways to connect to a server from Ubuntu, perhaps the easiest is using the secure shell. Install openssh-server on the CentOS system and openssh-client (probably already installed) on the ubuntu systems then use ssh username@servername  to log onto the server, you can also have nautilus connect to the server  by using the connect to server item in the file menu. use SSH in the type dropdown, enter server name, enter username and password for account on your server.

A bit more information here:

https://help.ubuntu.com/12.04/ubuntu-help/nautilus-connect.html

See the CentOS documentation on how to install and configure openssh-server on that system. Maybe this can help:

http://www.cyberciti.biz/faq/centos-ssh/


How to format an external 64GB SD card (exfat) using command line?

Straight from apt-cache show exfat-utils is the description:

Description-en: utilities to create, check, label and dump exFAT filesystem
 Utilities to manage extended file allocation table filesystem.
 This package provides tools to create, check and label the
 filesystem. It contains
  - dumpexfat to dump properties of the filesystem
  - exfatfsck / fsck.exfat to report errors found on a exFAT filesystem
  - exfatlabel to label a exFAT filesystem
  - mkexfatfs / mkfs.exfat to create a exFAT filesystem.

You would use mkfs.exfat to format the partition, the same as you would use mkfs.fat to format a normal FAT partition.


There doesn't seem to be a way to do exactly what you want, but I use the following workaround for the problem.

Delete the standard clock from the taskbar.
Add the Orage clock to the taskbar in its place.
Click the Orage clock. By default it opens the single month calendar window in the center of the screen. But if you drag it down to the lower, right corner just above the Orage clock, it will hold that position the next time you open it.
Optional: Delete the the Orage system tray icon using Orage preferences for a clean setup that mimics the traditional arrangement.


The error "Permission Denied" often means that you do not have execute permission on the file. To fix that, run chmod +x <filename> as the root user. Now, the root user can run the file using ./<filename>.

Command Not Found can mean many different things. First off, you need to have the ./ or an absolute path for running files not in your $PATH variable. (i.e../test.sh or /home/user/bin/test.sh).

However, Command Not Found can also mean that a library is missing. Check that you have all the required dependancies to run that file.


How to compile C/C++ program with GStreamer

gst/gst.h is provided by libgstreamer1.0-dev. Install it:

sudo apt-get install libgstreamer1.0-dev

In Code::Blocks, you can set custom include locations and linker flags. In the Project menu, click on Build options:


Can't delete mysql-server on ubuntu 12.04.5 TLS

Edit the post-installation script

sudo nano /var/lib/dpkg/info/mysql-server-5.6.postinst

Search the function

invoke() {
    if [ -x /usr/sbin/invoke-rc.d ]; then
        invoke-rc.d mysql $1
    else
        /etc/init.d/mysql $1
    fi
}

and replace with

invoke() {
    echo
    #if [ -x /usr/sbin/invoke-rc.d ]; then
    #     invoke-rc.d mysql $1
    #else
    #     /etc/init.d/mysql $1
    #fi
}

Save the file
Edit the pre-removal script

sudo nano /var/lib/dpkg/info/mysql-server-5.6.prerm

Search the lines

if [ -x "/etc/init.d/mysql" ] || [ -e "/etc/init/mysql.conf" ]; then
        invoke-rc.d mysql stop || exit $?
fi

and replace

if [ -x "/etc/init.d/mysql" ] || [ -e "/etc/init/mysql.conf" ]; then
        echo
        #invoke-rc.d mysql stop || exit $?
fi

Edit the post-removal script

sudo nano /var/lib/dpkg/info/mysql-server-5.6.postrm

Search

# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql
# variants in Ubuntu.
case "$1" in
  remove|disappear)
    /usr/share/mysql-common/configure-symlinks remove mysql "$mysql_cfgdir/mysql.cnf"
  ;;
esac

and replace

# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql
# variants in Ubuntu.
case "$1" in
  remove|disappear)
    # /usr/share/mysql-common/configure-symlinks remove mysql "$mysql_cfgdir/mysql.cnf"
  ;;
esac

Save the file and run the command again

sudo apt-get remove --purge mysql-server-5.6


Is AMD's TurboCore dead on Ubuntu 16.04?

Just found a way to make TurboCore working. Edited /etc/default/grub with nano and modified the line with GRUB_CMD_LINUX_[...], ending up with something like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash **radeon.bapm=1**"

Then

sudo update grub; sudo modprobe msr

and

sudo cpufreq-aperf

And see if your processor is indeed using TurboCore speeds. Plus you can see if your processor is using its UV frequencies with powersave as governor (for instance, my proc's lowest frequency is 1.4GHz, but it sometimes goes 1.2-1.0 GHz).

It's worth to mention too that to get the most out of your proc you'll need to set the default governor to Perfomance. Oh, and I forgot, once the processor heats up (>70°C), even if you force your processor to its max frequency (let's say, mine is 2.7GHz) it will start throttling down and it won't use TurboCore until the processor gets cooled down. This doesn't happen in windows, so the radeon driver is still buggy.


Cannot run systemback: Unsafe X Window authorization

Yes, because sudo isn't safe for graphical applications. Please use gksu, or use Systemback internal solution. So Systemback icon, or in terminal:

 /usr/lib/systemback/sbsustart systemback

or

/usr/lib/systemback/sbsustart systemback gtk+

you can find systemback maintainer by clicking here


The PPA ppa:hzwhuang/ss-qt5 isn't update since 06-08-2017 and has no release file for Bionic. That's the reason why you are getting such errors. It is recommended to remove this PPA using:

sudo apt-add-repository --remove ppa:hzwhuang/ss-qt5

or purge it using:

sudo ppa-purge ppa:hzwhuang/ss-qt5

And try updating again.


How Can I Set Up A Desktop Shared folder that's only accessible to me on Ubuntu 20.04?

There are two passwords for a given user on your samba server: The one you use to log into the server machine locally and the one you use to connect to the samba server and its share across the network.
If your login username is keith you would need to add that user to the samba password database to enable its samba password. You do that with this command:
sudo smbpasswd -a keith


Experimental 3D Support for NVIDIA Cards

The driver it is talking about is the nouveau driver, which is FOSS.  Typically that driver only does 2D.  3D support is not finished and is still experimental.

http://en.wikipedia.org/wiki/Nouveau_(graphics)

The idea is that this driver will eventually replace the other one, which is by NVidia and not FOSS, ie proprietary.


How to quickly open an application for the 2nd time via Dash?

Removed previous answer as I was on 13.04

As far as 12.10 - As long as the mouse cursor isn't in the Dash when you re-open the Dash then the previous search should still be active, (blinking curosr bar) & enter should again open your 1st listed app


If your dual boot screen mean something like this which is called GRUB (GRand Unified Bootloader), then this answer might help you. I assume that your are not able to get into Ubuntu and you need to solve this from Windows. This helped me when I  was new to Ubuntu.

In Windows, go to the menu.

Search for Command Prompt, right click on it to run it as administrator

In here, copy paste the command below:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Restart and you’ll be welcomed by the familiar Grub screen or dual boot screen.

Let me know if it helps.

Source: It's FOSS


The package apache2 in your enabled third-party repository needs the package dpkg in version 1.17.14 or higher. This version is not available for Trusty. For this reason, install the official apache2 package for Trusty, currently version 2.4.7-1ubuntu4.9.

And as you can see in the output of apt-cache policy

2.4.12-2 0 500 ppa.launchpad.net/cybersec/chaos-ppa-v2/ubuntu trusty/main amd64 Packages

your third-party PPA is https://launchpad.net/~cybersec/+archive/ubuntu/chaos-ppa-v2

Purge it with

sudo ppa-purge ppa:cybersec/chaos-ppa-v2

and install apache2

sudo apt-get install apache2


Where to change 30 seconds for grub on forced reset

I found it on my own
in file /etc/grub.d/00_header
on line 333 there is a costant
set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}

and you can override it in /etc/default/grub file like this
GRUB_RECORDFAIL_TIMEOUT=0

and now even if i force reboot/power off it will skip the grub


Laptop monitor turns off when external monitors plugged in

There should be an F key that has an icon of two monitors, in my case F4. Try with the combination of Fn (function) key and the F key, according to your keyboard.


use the live disc and select 'Try Ubuntu'. If it works fine then you can permanently install it and replace windows 8.


How to install a language which is not shown under "installed languages"?

Looks like you need to have fonts-sil-galatia installed then use the above suggestion if the keyboard does not work with it. The package name should be similar in Ubuntu.
root@buster-raspi:~# apt-cache search Greek Polytonic
fonts-pecita - OpenType hand-written font whose letters are connected
fonts-sil-galatia - font family for Latin-1 and Greek (polytonic support)


Unable to set default value for swappiness

It turned out that there was a .conf in /etc/sysctl.d/ that had the line setting vm.swappiness = 1

Deleting that allows swappiness to be set from /etc/sysctl.conf file.

I guess the takeaway from this issue is that a .conf file in /etc/sysctl.d/ can override an entry in /etc/sysctl.conf


I ended up creating a new partition on the (virtual) disk after the existing one, rather then trying to extending it (fdisk didn't work and parted threw various errors messages).

So, final recipe was

Create new partition
Add new partition as new physical volume in LVM
Add the new PV to the VG
Extend the encrypted VG
Ran cryptsetup resize
Rebooted and re-decrypted
Resized file system


Ubuntu '/home' mount point in subfolder of shared partition?

Depends. Not for the whole of /home, if you need Unix-permissions for group. Given the current state of ext driver support in Windows, we would have to use FAT/NTFS for such a common partition, and they don't support Unix permissions. So applications like SSH and GnuPG will have trouble.

I do it in a bit more complex way: symlink ~/Documents and other such folders to their Windows equivalent on an NTFS partition. Permissions on these folders don't really matter much. Helps if you want to have Dropbox sync them. Of course, none of these are located on the partition containing Windows, but on a separate NTFS partition.

A better approach will be to change the locations of these folders. From the Arch Wiki, add these to ~/.config/user-dirs.dirs:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Replace $HOME/<blah> with your desired location.

On my laptop, all such folders are common to both Windows and Debian (and Arch), and I don't face problems, except with Dropbox. Dropbox occasionally replaces perfectly good files with their older versions and says it's a conflicted copy.

Both ways require that the partition be automounted. Especially in the case of the XDG variables, the partition needs to be mounted before they're read, or they will reset to $HOME. See How to automount NTFS partitions? for guides on automounting NTFS partitions. The most preferable way to do so is editing /etc/fstab - any other option will mount after the partitions listed in that file are mounted.


-rwsr-xr-x 1 root root 44168 May  7  2014 /bin/ping

The s in rws means ping is setuid. When you run it, it runs as its owner, root.

That's how it has the permission to ping. You can sudo setcap cap_net_raw=ep ./ping but ultimately ICMP is under "raw sockets" so this isn't a small number of operations. It would allow another application to spoof network traffic.

For this to be "secure" and ping, the file would have to be owned by root to stop the application being edited by other users.

Perhaps setcap will one day let you specify a hash signature for executable too.


Create yaffs2 file system on Ubuntu Server 11.10

yaffs/yaffs2 is not yet supported in the mainline linux kernel, so you will need to compile it yourself.

There are detailed directions here : http://tjworld.net/wiki/Linux/Kernel/SimulateNandMtdDevice

You will likely be able to mount a yaffs/yaffs2 file system, but I am not sure you will be able to install into it or boot it with grub.


If the DVD is readable, you can copy the packages manually to

/var/cache/apt/archives/

That will make all the packages available for synaptic/software-center to use.

And to do so, run this command in a terminal:

sudo rsync -avp /media/cdrom/packages/*.deb /var/cache/apt/archives/


To repartition, gparted on a USB stick is the way to go.  Not only does it repartition, but it also grows/shrinks the filesystem within the partition (i.e. it understands the FS internal structure just like fsck would).  And, doing it the other way [live] won't work.

A given kernel version takes up about 33MB per rev [with vmlinuz* and initramfs*], so your /boot should be okay.

40 MB for the root partition is also good.  I've got a 60 GB partition for that, and I have a fair number of programs installed, but I'm only using 33 GB.

There's some controversy about what is adequate swap.  Some say just a few GB, regardless of RAM size, but the "old school" [and mine] metric was 2X the RAM size because of the way older Unix kernels had to handle swapin/swapout.  I'd say minimally at least the RAM size.  Depends on how much RAM you have.  With 4 GB of RAM, I'd definitely add swap.  With 24 GB of RAM, you may be able to skip the swap altogether.

I have large raid HDs, and I occasionally run the odd batch number cruncher program that will use way more memory than I have RAM, so I have about 120 GB.  That may be the deciding factor on how large to go (e.g. accomodating whatever "memory hog" programs you intend to run)

However, one thing [for you] to consider is the fact that you've got an SSD.  If it's flash, putting a swap partition on it may strain the flash's wear leveling, etc.  Flash has gotten better about this, so the answer may depend on the specs of your particular SSD.  Normal FS access is usually "write once", "read many", so it doesn't "pound on" the device nearly as much.

With SSDs made from alternatives to flash, such as Intel's "3D XPoint" technology [probably not yet available--but soon], they don't have the wear leveling problem.

Also, when you've got the system fully configured, consider editing /etc/fstab and changing the mount options from [probably] relatime to noatime.  See the mount man page for details.  This change reduces writing to the disk when reading.  Every time you read a file, the OS updates the "last accessed time" [or "atime"] in the file's inode, causing a metadata write of this.  The noatime prevents this.


12.10 screen resolution on Acer Aspire S3

OK, so, I figured it out myself. In case someone encounters this problem, I'll outline the solution which helped me.

I removed nvidia-current since the videocard on this notebook is Intel:
sudo apt-get --purge remove nvidia-current

Changed the /etc/X11/xorg.conf file:
sudo gedit /etc/X11/xorg.conf

Like this:
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Modeline       "1366x768_59.90"  106.29  1366 1520 1672 1904  768 901 904 932  -HSync +Vsync
    Option         "PreferredMode" "1366x768_59.90"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "intel"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Modes "1366x768_59.90"
        Depth       24
    EndSubSection
EndSection

The key was placing "intel" driver over there, this might actually be enough, but I also added the resolution myself which finally did it for me.


How do you update GTK+ and/or Gnome on Ubuntu 14.04 LTS?

The Gnome Team have a ppa which has Gnome 3.12 in it.
Please note last time I looked, a few months ago it was not ready for general use.

To install Gnome alongside Unity you need to run the following commands:

sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install ubuntu-gnome-deskop

You will need to select and use the GDM desktop manager when asked to choose.

EDIT: At least as of 2014-08-26, there is a version conflict in dependencies for gnome-control-center and ubuntu-control-center (for versions of gnome-settings-daemon).  They will not live side by side happily unless you install an older version of gnome.


How can I allow anyone to read/write files on a USB stick?

I would create a fstab entry for the USB drive on each of the machines and set the uid and gid to 1000 with the desired umask. To get the UUID of the device

sudo blkid -c /dev/null

Hopefully you will be able to identify your USB device ID from here. Now create a directory where the USB should be mounted.

sudo mkdir /meda/USBDrive

Now, you can create an fstab entry regarding the drive.

sudo vim /etc/fstab

Use the editor of your choice and append an entry that looks something like the following:

UUID=ABCDEFGHIJKLKLMNOP /media/USBDrive ext4 defaults,auto,uid=1000,gid=1000,umask=002 0 0

You can set the umask as desired. Umask is what determines the read write permissions and  is a 3 digit number with each of the digits between 0 and 7, and is subtracted from 777 to get the permissions. Setting umask=000 will give everyone the permission to read, write and execute all files. More information here:

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


You go to the devices tab of the ubuntu one control panel, there you will find a "limit sync bandwidth usage"


Why would cron not be running as a daemon?

Because it is being run by systemd, there is no need for it to fork itself into the background as it is not being called by a shell script that waits for it to exit ( after forking itself into the background ).


you are never forced to upgrade.
you do not need to pay for Ubuntu.

Besides that 12.04.5 is supported until April 2017. Nobody is stopping you from using 12.04 after that date. What does happen is that you will never receive any more updates (normal or security) so you put your system at risk if it is connected to the internet.

If the operating system is hard coded into the appliance you buy I would not worry about the support. The system will not get updated anyways and it is likely someone can hack his way into it.


How To Restart Sudo Service in Ubuntu 18+

masked services are when the systemd unit files are linked to /dev/null/ You can see the sudo.service

$ systemctl status sudo.service
● sudo.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

$ ls -l /lib/systemd/system/sudo.service
lrwxrwxrwx 1 root root 9 Jan 18  2018 /lib/systemd/system/sudo.service -> /dev/null

Some services are used within systemd, and not actual daemons with processes that run in the background. For example, you cannot start/stop halt.service. But if you place your scripts in /usr/lib/systemd/system-shutdown/, they will be run before the system is halted or rebooted.

Sudo Usage

You don't need to reboot to use sudo. Simply add users and your settings to the Sudoers file.


I had the exact same issue. I fixed it by installing the package libglib2.0-dev. I'm not sure if it was actually that package itself, or one of its dependencies, but either way that got it.


What does -1 mean for modeset? What are other options for modeset?

The documentations for most module parameters is accessible from modinfo (lines wrapped for readability):

$ modinfo i915 | grep modeset
parm:           modeset:Use kernel modesetting [KMS] (0=DRM_I915_KMS from
                .config, 1=on, -1=force vga console preference [default]) (int)

Reading through the Linux source code, it seems that the -1 setting ("force vga console preference") depends on the nomodeset option. That is, if the nomodeset option is present, it acts like i915.modeset=0. Otherwise, if nomodeset is omitted, it is treated as if i915.modeset=1 is set.

Code path:

drivers/gpu/drm/i915/i915_drv.c (disables modeset if text console mode is forced):

if (vgacon_text_force() && i915_modeset == -1)
    driver.driver_features &= ~DRIVER_MODESET;

video/console/vgacon.c:

static int vgacon_text_mode_force;

bool vgacon_text_force(void)
{
    return vgacon_text_mode_force ? true : false;
}

(same file):

static int __init text_mode(char *str)
{
    vgacon_text_mode_force = 1;
    return 1;
}

(same file, set through the kernel cmdline):

/* force text mode - used by kernel modesetting */
__setup("nomodeset", text_mode);


I had the same issue, which in my case boiled down to Netgear wifi adapters not supported by Ubuntu. First, I would verify your adapter is supported here:
https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
Then I would suggest reviewing other solutions here:
How To Resolve Wifi Driver Problem on Ubuntu 20.04


Set Duplicity to do not follow symbolic links

Duplicity now supports this (in version v0.7.11 and up) via the --copy-links option. See the duplicity man page.

Note that this a later version of duplicity than standard Ubuntu trusty or xenial packages. You need to install duplicity from upstream e.g. ppa:duplicity-team/ppa


Ubuntu 16.04 LTS reboots/crashes while running GPUs

I was able to fix the issue by unplugging and reinstalling all the PSU cables in the system. Presumably one of them was loose and causing an anti-surge protection reboot. Apparently the motherboard displays this info to the screen when it happens, but I was always remotely connected to the server whenever it happened, so I couldn't see the message.


How do I allow /dev/net/Tun in a LXD managed LXC container?

You want:

lxc config device add CONTAINER tun unix-char path=/dev/net/tun


Torrent client that saves files to torrent location

you can use deluge for that purpose

sudo apt-get install deluge

it should work like charm (i call it as utorrent of linux, they are very similar)


How to keep ndiswrapper configuration after reboot?

As heartsmagic says, the solution was to add ndiswrapper in a new line of the file /etc/module:

gksu gedit /etc/modules

Save, close the file and reboot.

After reboot, check that the module was loaded with:

lsmod | grep ndiswrapper

(this was my own question but I lost that unregistered account).


Ubuntu Software Center Missing and cannot install?

You can install synaptic:

or via: sudo apt-get install synaptic

and than install software-center from syanptic.


Install Audacity using
sudo apt-add-repository universe
sudo apt-get install audacity

launch it, record some fragment using microphone, play the recorded sound.


What is AFS Kerberos used for? Can I safely remove it?

AFS is the "Andrew File System" from CMU, which uses Kerberos as its identification/authentication scheme.

If none of the above makes sense to you, you can probably live without it.

Find out which package is responsible for installing it via sudo dpkg -S afs3-kaserver and sudo apt-get uninstall that package.

If dpkg -S afs3-kaserver returns dpkg-query: no path found matching pattern *afs3-kaserver*, it was not installed via the package manager (apt. dpkg, synaptic, etc), and you will have to track down how it gets started (/etc/init/, /etc/init.d/).

To be really paranoid, wrap the commands to disable and re-enable the service in bash scripts, and use at to schedule the disable for now+2min and the re-enable for now+12min to give you a 10 minute test window before things are put back to normal. Who knows, you might have something important using afs3-kerberos


Does changing my Launchpad GPG key require any changes to my PPAs?

Your GPG key with Launchpad is only used to sign the PPA uploads, NOT the generated PPA packages:

  Launchpad generates a unique key for each PPA and uses it to sign any packages built in that PPA.

Any loss/compromise of your GPG key doesn't affect the PPA signing key, and AFAIK it's not possible to change that key even if you wanted to, without creating a new LP account.

I was just able to successfully add your PPA:

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.Dwh5o34jwl --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv AF89B3310ED9C8EAE449CA2694932D568ED3C834
gpg: requesting key 8ED3C834 from hkp server keyserver.ubuntu.com
gpg: key 8ED3C834: public key "Launchpad PPA for Soroush Rabiei" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

To resolve any local problems you're having, simply re-add the PPA signing key with:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 8ED3C834


Login loop in Xubuntu 17.10 after upgrade from Xubuntu 16.04 LTS

I had the same problem what I did was get the XDM so I went Ctrl+ALt+F2 and did:

sudo apt install XDM
sudo service LightDM stop
sudo service XDM start


I switched from the X.org Nouveau opensource driver to the Nvidia proprietary driver and that solved this issue for me.  I was using Ubuntu Budgie 20.04 (Kernel 5.4) on a similar model Lenovo wielding a Nvidia GT218M [NVS 3100M] video card.
My experience was similar to yours after you installed 20.04.  However, instead of a black screen upon attempting to wake from Suspend or Hibernate, my screen would "wake" to various bizarre and nearly indescribable patterns such as alternating black and white 2s along with portions containing randomly colored pixels producing a certain visual "static".  One detail that was curious to me was that the mouse always remained perfectly visible and active. But the bottom line was always the same: the only option was a forced shutdown.
To switch the driver I opened the "Additional Drivers" application, which comes up as the Additional Drivers tab of the "Software and Updates" application.  There I saw this option.  It took several minutes for the application to load and install the driver.  I put it to the test immediately and, ugh, same old thing.  So, of course, I had to force shut down and I thought it was just another dead end.  However, during my next session I accidentally allowed the device to fall into Suspend (not again!), when, miracle of miracles, it woke back just as I had left it. : )  I would suggest to reboot before testing.


How to declare a script to run on specific user during ssh login

You can put .bashrc file in user's home directory and it will be executed only for that user. In that way, you can achieve that it is executed for specific user. However, the user might delete .bashrc file. You can probably make it to be owned by root. Another solution is to put additional condition in global bashrc like that:

if [[ -n $SSH_CONNECTION ] && [ $USER == "ubuntu" ]]; then
    /home/ubuntu/xxx.sh
fi

In that way, user does not have permission to change global bashrc file unless she has enough privileges.


How to configure dynamic WEP in command line

In Ubuntu install wpa_supplicant:

sudo apt-get install wpasupplicant
Edit the wpa_supplicant configuration file (e.g. /etc/wpa_supplicant.conf), ant put the following:

network={
   ssid="YOUR-SSID"
   scan_ssid=1
   key_mgmt=WPA-EAP
   pairwise=CCMP TKIP
   group=CCMP TKIP
   eap=TLS
   identity="XXXXX@yourdomain.com"
   ca_cert="/etc/certs/cacert.pem"
   client_cert="/etc/certs/cert.pem"
   private_key="/etc/certs/key.pem"
   private_key_passwd="YOUR-PASSWORD"
}

"YOUR-PASSWORD" is the password provided by your administrator when your received your .p12 certificate. "YOUR-SSID" is the (B/E)SSID of the wireless access network
Start wpa_supplicant

wpa_supplicant -B -i IFACE -Dwext -c /etc/wpa_supplicant.conf

Where IFACE is the name of your wireless interface.
Check that you are associated

iwconfig IFACE

To get an IP address use

dhclient IFACE


How to create a notification in gnome from command with 'onClick' functionality?

Interesting question!

...Which was the trigger for the exploration below on the subject on the UB experimental repo. The result is a notification/message popup which has the following options:

Example of a notification with (optional) click-functionality

set the corner to appear
set a command to run when clicked
set a title (bold)
set a message text
set an icon
set a life length (seconds) <- set in the snippet

The first four options only apply if you set the argument, the corner defaults to bottom-right (on primary), unless set differently.

The life length is -as it is- hardcoded, defaults to 10 seconds, unless set differently.

Notes

Note that these notifications -as it is- are not passed through dbus, so they cannot be "listened" to. Further development could be to make it a daemon-like background process -keeping the Gtk loop alive-, only calling the window on dbus hint.
Many of the values/preferences could be moved to gsettings

How to setup

Copy the snippet into an empty file, save it as alternotify.py, make it executable
Run it with any combination of the following options, just pick what you need:

click command: command="command_to_run"
title: title="Title to show"
message text (body): body="Text body of the notification message, text, text, text"
icon (from icon name): icon="icon-name"
the corner to appear, 1 = NE, 2 = NW, 3 = SE, 4 = SW: position=1

A complete command could look like:

/path/to/alternotify.py title="Missing applet" body="To use this functionality, you need to run previews. Click this notification to switch it on." icon="budgie-hotcorners-symbolic" command="gedit /home/jacob/Bureaublad/Kap" position=4

The code

#!/usr/bin/env python3
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib
import sys
import subprocess

class NotifyWindow(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self)
        self.set_decorated(False)
        distance = 80 # gsettings
        winwidth = 300 # gsettings
        winheight = 80 # gsettings
        self.set_default_size(winwidth, winheight)
        self.maingrid = Gtk.Grid()
        self.add(self.maingrid)
        self.set_space()
        self.winpos = 4 # gsettings? default = SE
        self.get_args()
        self.currage = 0
        self.targetage = 10 # gsettings,life seconds
        GLib.timeout_add_seconds(1, self.limit_windowlife)
        self.maingrid.show_all()
        self.position_popup(self.winpos, winwidth, winheight, distance)
        self.show_all()
        Gtk.main()

    def get_winpos(self, arg):
        self.winpos = int(arg)

    def limit_windowlife(self):
        if self.currage >= self.targetage:
            Gtk.main_quit()
        self.currage = self.currage + 1;
        return True

    def position_popup(self, winpos, winwidth, winheight, distance):
        monitordata = self.get_primarymonitor()
        winsize = self.get_size()
        winwidth, winheight = winsize.width, winsize.height
        monitor_xpos = monitordata[2]
        monitor_ypos = monitordata[3]
        monitor_width = monitordata[0]
        monitor_height = monitordata[1]

        if winpos == 1:
            wintargetx = monitor_xpos + distance
            wintargety = monitor_ypos + distance
        elif winpos == 2:
            wintargetx = monitor_width + monitor_xpos - winwidth - distance
            wintargety = monitor_ypos + distance
        elif winpos == 3:
            wintargetx = monitor_xpos + distance
            wintargety = monitor_ypos + monitor_height - (
                distance + winheight
            )
        elif winpos == 4:
            wintargetx = monitor_width + monitor_xpos - winwidth - distance
            wintargety = monitor_ypos + monitor_height - (
                distance + winheight
            )
        self.move(wintargetx, wintargety)

    def get_primarymonitor(self):
        # see what is the resolution on the primary monitor
        prim = Gdk.Display.get_default().get_primary_monitor()
        geo = prim.get_geometry()
        [width, height, screen_xpos, screen_ypos] = [
            geo.width, geo.height, geo.x, geo.y
        ]
        height = geo.height
        return width, height, screen_xpos, screen_ypos

    def show_title(self, title):
        title_label = Gtk.Label(label=title)
        self.maingrid.attach(title_label, 3, 1, 1, 1)
        title_label.set_xalign(0)
        # set title bold
        self.noti_css = ".title {font-weight: bold; padding-bottom: 5px;}"
        self.provider = Gtk.CssProvider.new()
        self.provider.load_from_data(self.noti_css.encode())
        self.set_textstyle(title_label, "title")

    def set_body(self, body):
        body_label = Gtk.Label(
            label=body
        )
        self.maingrid.attach(body_label, 3, 2, 1, 1)
        body_label.set_xalign(0)
        body_label.set_size_request(250, -1)
        body_label.set_line_wrap(True)

    def set_icon(self, icon):
        self.maingrid.attach(Gtk.Label(label="\t"), 2, 0, 1, 1)
        if not "/" in icon:
            newicon = Gtk.Image.new_from_icon_name(
                icon, Gtk.IconSize.DIALOG
            )
            self.maingrid.attach(newicon, 1, 1, 1, 2)
            self.maingrid.show_all()

    def get_args(self):
        args = sys.argv[1:]
        funcs = [
            self.show_title, self.set_body, self.set_icon,
            self.connect_action, self.get_winpos,
        ]
        argnames = ["title", "body", "icon", "command", "position"]
        for arg in args:
            argdata = arg.split("=")
            argname = argdata[0]
            arg = argdata[1]
            try:
                i = argnames.index(argname)
                funcs[i](arg)
            except ValueError:
                print("invalid argument:", arg)

    def connect_action(self, arg):
        self.connect("button_press_event", self.run_command, arg)
        pass

    def set_textstyle(self, widget, style):
        widget_cont = widget.get_style_context()
        widget_cont.add_class(style)
        Gtk.StyleContext.add_provider(
            widget_cont,
            self.provider,
            Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION,
        )

    def run_command(self, event, key, command):
        if key.get_button()[1] == 1:
            subprocess.Popen(["/bin/bash", "-c", command])

    def set_space(self):
        for cell in [[0, 0], [100, 0], [0, 100], [100, 100]]:
            self.maingrid.attach(
                Gtk.Label(label="\t"), cell[0], cell[1], 1, 1
            )

NotifyWindow()


How do I remove the dots from the lockscreen in Ubuntu 14.04?

Manually went into dconf-editor and went to com.canonical.unity.unity-greeter and unchecked the option draw-grid. For some reason, this worked and not the command line answer from before, which I also tried. Hope this helps.


It is doubtful that your laptop is BOTH an HP and an Acer. Let's blacklist the offending module and see if the hard block is resolved. From the terminal:

sudo -i
echo "blacklist acer-wmi"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r acer-wmi
rfkill unblock all
exit

Now can you activate the wireless? It may take a reboot.

The driver for your rtl8723be device doesn't correctly select which of the two antenna connections to use. You may need to explicitly direct it. Please see:  HP Stream 11 late 2015 edition (r050sa) Wifi not working properly


Upstart: pipe the output of multiple commands

The correct way to do this is to use

if /sbin/ethtool eth0 | /bin/grep -q "Link detected: yes" ; then
    exec prog1
else
    exec prog2
fi

The -q argument to grep will discard stdout, and the if statement checks the status of the command it runs. [ /sbin/ethtool eth0 | /bin/grep -q "Link detected: yes" ] is not a valid command, because [ is actually a program that accepts arguments like grep. So [ cannot understand /sbin/ethtool eth0 | /bin/grep -q "Link detected: yes" and it fails.


My Gnome 3 in Ubuntu 11.10 is not showing any applications in applications menu?

Manik Rastogi solved the problem in a comment:

  I have found the solution. I opened 'Applications Menu' program which is used to custumize applications menu and selected all applications that were displayed by default. Now my Gnome applications menu is as good as it was.


Zenity does not show messages in deb preinst when it is ran through Ubuntu Software Center

I found this option:
'export DISPLAY=:0' needs to be added to the zenity script line.

export DISPLAY=:0 && zenity --error --text="Please install java oracle 7 or newer. \"Ok\", exiting installation"

But it did not work for me. Strangely it worked every 20th or so test.

The best way for me was to abandon zenity and use debconf. Debconf tutorial link.
Note: the priority of the input window needs to be high or critical or it will not be displayed.


If a target web server has directory indexing enabled, and all the files to download are located in the same directory, you can download all of them, by using wget's recursive retrieval option.

use

wget -r -l1 -A.jpg http://www.example.com/test/

it will download all .jpg file from directory test.

if you don't want to download all file then the infos below will be helpful.

   -A acclist --accept acclist
   -R rejlist --reject rejlist
       Specify comma-separated lists of file name suffixes or patterns to
       accept or reject. Note that if any of the wildcard characters, *, ?,
       [ or ], appear in an element of acclist or rejlist, it will be
       treated as a pattern, rather than a suffix.

   --accept-regex urlregex
   --reject-regex urlregex
       Specify a regular expression to accept or reject the complete URL.

like :

wget -r --no-parent -A '*.jpg' http://example.com/test/


Behringer UMC204HD not working on Ubuntu 15.10

I'm afraid your sound card is not compatible with Ubuntu.  You may be better off finding a different model, or using it only with Windows.

You can try to adapt other drivers for it, but ultimately this is beyond most users.  Perhaps you can contact the company and ask if they have Ubuntu drivers, or plan on coming out with any.

If you end up buying a different model, feel free to ship me your old one


If you tried to use Ubuntu then went back to your old OS, why did you do so?

I stumbled a couple of times but mainly because I think I started on Ubuntu for the wrong reason. I've always been a geek and that has drawn me to Linux in general over the past 10 years with some quick stints on Mandriva and then Fedora, none of them lasting longer than a week on my computer.

Each time I'd load up the latest and greatest, see that everything was cool, have a fight with Amarok, play a game of Klondike and finally when I needed to get something done, I'd drop back to Windows.

I think it's very important you recognise that you perform tasks with your computer and if you don't plan ahead and see what you're going to be using (or find the workaround to see if/how you can keep using what you are now) you quickly find out that though it may look nice or have a nice feature, you haven't got a clue how to get your work done.

And then I became a professional ASP.NET developer. This halted my switchover for a couple of years. Mono was a wink in the milkman's eye and I really loved Visual Studio .NET 2002 (and 2003 and still love them today - they were great applications)... After I left that company, I found myself slowly spreading out over other technologies.

As a web developer (now freelance) I still had to deploy websites but I had the choice over what systems to use. I started a Dreamhost account for hosting various things (mostly media for my main ASP.NET written blog) but this gave me some exposure to the console. It wasn't long before I was writing fairly complicated bash scripts to automate things for me.

But just over three years ago, in the middle of all this and despite the Linux exposure, I declared myself "a Windows enthusiast". I had a workflow that worked and I just didn't care to switch to something that delivered pretty poor driver support (as it still was back then, especially with the dodgy support for ATI graphics cards) and none of the applications I needed on a daily basis.

I was still developing in ASP.NET but I did keep wanting to switch. I'd boot a LiveCD and test it out for a few hours but while I was still using ASP.NET and a FakeRAID chip that didn't work under Linux, I still couldn't justify moving over completely. Eventually my PHP had improved enough to use it for developing sites so most of my new work was through that. This was also about the time that VirtualBox started up and VMWare's desktop virtualisation was also getting quite usable...

And some bits of Vista were wearing me down and by autumn 2007, I changed my graphics to Nvidia and I was back at square one on my migration to Linux: Compiz blew my socks off. It was another silly "oh noes thaz too pretteh" migration that would have been doomed if it weren't for the pieces that had been put in place over the year:

My workflow was now nearing platform independence
I could run 3D things on my computer because I'd ripped out my ATI x800XT
My mass-storage was still an issue. If I wanted anything from it, I had to boot to windows, copy it onto a non-RAID drive and boot back into Linux...
I found one application that I realised I kept coming back for: Amarok. It was miles ahead of anything available for Windows

I still missed Windows. Not just the applications but how some things like how the Vista start menu worked, the simplicity of Explorer and the robustness of XP's Solitaire...

But for the things I missed I learned either to fix it (I moved my RAID to mdadm, moved Windows applications to VirtualBox and Wine), put up with it (the gnome menu is still as poor but I only use it now when gnome-do doesn't find something) or go without (there are dozens of games I own but can't play and more that I can play but don't work as well as a native install).

There is still an element of sacrifice if you really use your computer to get things done. Having documented half the pain of migrating over the years, if I could send it all back to myself in mid-2007, I couldn't guarantee I wouldn't just run away.


Run this in terminal (CTRL+SHIFT+T)

lspci -vnn | grep 14e4

Once you've found the model of your wifi-driver go to this link: https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
to see if it is supported with Ubuntu.


Removing GRUB from windows system after uninstalling Ubuntu from Windows 7

You need Windows 7 installation disk, boot it, choose repair option when you are asked to menu.

It will check automatically for start up problems. Let it check it.

It will not find any problem with start up.
It will allow to choose options. Choose command prompt.
In cmd you have to type just two following commands and grub will be removed.

bootrec /fixmbr
bootrec /fixboot

Close cmd and restart your machine.


Why does mkdir -p not work as expected if passed a single quoted path?

Inside single or double quotes, ~ is managed literally as a tilde character, it is not translated to "current-user-home-folder".
You have two alternative ways to achieve your target:

using double quotes and replacing the tilde symbol with the variable $HOME. Summarizing: mkdir -p "$HOME/something". The $, opposite to ~, is not treated as a literal inside double quotes.
just not quoting the tilde. Summarizing: mkdir -p ~/'something'


Failed to create shortcut for sublime in ubuntu terminal

You need to specify a destination directory for your file. Since you didn't specify what directory you are in when issuing the ln command I'm assuming you are in /usr/bin/.  If that is the case then you are trying to create a link with the same name as an existing file. Try

ln -s /usr/bin/sublime ~/sublime


It is possible create a live USB that allows you to install apps and save that configuration, but it is not recommended.

The biggest difference between live and a full install is that on a live session, pretty much everything you run or install gets loaded into memory, and is lost when you reboot, unless you create a special live USB.

My recommendation: Install a lightweight, 32-bit version of Ubuntu, like MATE or LXDE onto your USB. Keep in mind that you'll need a speedy and fairly sized USB drive in order to get a pleasant experience.

Cheers


Can't use bluetooth audio device despite Pulseaudio modules loaded and device connected

For me, the reason I was getting no sink in pulseaudio was using hcitool instead of bluetoothctl to connect the headset. With bluez5, the latter is preferred, and the former isn't guaranteed to work.

But even having a pavucontrol-selectable sink did not give me sound. I've certainly heard noise level change between sink sleep and unsuspend transitions, but still no sound ended up actually playing (with unmuted sink at max volume). Also, pulseaudio refused to use the A2DP profile saying module-bluez5-device.c: Profile 'a2dp' not valid or not supported by device eventhough bluetoothctl <<< "info 00:11:22:33:44:55" was clearly listing Audio Sink UUID 0000110b-0000-1000-8000-00805f9b34fb. So PA was using HSP/HFP or whatever, and that means hardcoded  8kHz mono.

In the end, how I got actually working A2DP on Ubuntu 16.04.1 was to compile pulseaudio 9.0 from source. Very predictable build; a short transcript for those who know some compiling:

git clone --branch master git://anongit.freedesktop.org/pulseaudio/pulseaudio \
    && cd pulseaudio
./autogen.sh
./configure \
  --enable-bluez5 \
  --enable-bluez5-native-headset \
  --with-speex \
  && make -sj3

Just find and apt install those -dev packages configure asks for. make took ~100 seconds to complete.

Then quick in-place test:

echo 'autospawn=no' > ~/.config/pulse/client.conf; killall pulseaudio

src/pulseaudio --daemonize=no --log-level=info -F /etc/pulse/default.pa

At this point I got it working.

$ src/pulseaudio --version
pulseaudio 9.0-129-gf7b8

For final touch, I'd package that up into a .deb, install systemwide via dpkg -i and undo the autospawn=no change.


Try to install unity-greeter.

I broke LightDM and this solved it, but I don't have the option to run Unity or Gnome Shell (they're installed).

Edit: I solved my problem installing 'gnome-session'.


Prepare Ubuntu 16.04 server for template

Generally speaking after installation from iso file and installation of OpenSSH server, you can install cloud-init.

The cloud-init script starts on instance boot and will search for a metadata provider to fetch a public key from. The public key will be placed in the default user account for the image.

Install the cloud-init package:

 sudo apt-get install cloud-init

When building Ubuntu images cloud-init must be explicitly configured for the metadata source in use. To set the metadata source to be used by the image run the dpkg-reconfigure command against the cloud-init package.

dpkg-reconfigure cloud-init

You can change the name of the account used by cloud-init by editing the /etc/cloud/cloud.cfg ...

This will you enbable to ssh to your instance created from template.

Only that you must delete is MAC address details

The operating system records the MAC address of the virtual Ethernet card in locations such as /etc/udev/rules.d/70-persistent-net.rules during the installation process. However, each time the image boots up, the virtual Ethernet card will have a different MAC address, so this information must be deleted from the configuration file. Or you can simple delete /etc/udev/rules.d/70-persistent-net.rules

sudo rm -rf /etc/udev/rules.d/70-persistent-net.rules

Your image is ready to be template.

EDIT 1

Also you can consider to download image from here


purple screen boot 12.04 (black with recovery mode)

Did you change something in the BIOS like EFI(UEFI) or LEGACY ?
For more info click here

Maybe you could try installing GRUB on your sda6 partition using Boot Repair (Look into the advanced options).

Or sometimes I use Grub Customizer to correct some GRUB errors. Click here to install.


How do I use command-line arguments to `sh` in the `-c` command string?

From man sh:

-c string If  the  -c  option  is  present, then commands are read from
          string.  If there are arguments after the string,  they  are
          assigned to the positional parameters, starting with $0.

In your command the second sh is just a parameter with position 0 while 4 has position 1 and so on.

You can run this to check:

$ sh -c 'echo $0' sh 4 5
sh


Rolling back to non-HWE stack on Ubuntu 16.04.2

You need to recover the original xserver-xorg.

sudo apt install xserver-xorg-core

sudo apt install ubuntu-desktop xserver-xorg libgl1-mesa-dri:i386 libgl1-mesa-glx:i386


Using gnome-boxes with Remote Desktop Connection

According to the todo list on github rdp-support is not yet implemented.


How To disable xubuntu icons from terminal?

To change the wallpaper

First put the image you want in the correct folder

sudo mv path/to/your/image /usr/share/backgrounds/xfce

If you just want a default one, you can find there names like this

ls /usr/share/backgrounds/xfce

Then to change the image

xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitor0/image-path --set /usr/share/backgrounds/xfce/your-image-here

To remove the desktop icons, you can use this code provided by @AJefferiss in the comments

xfconfig-query -c xfce4-desktop -np '/desktop-icons/style' -t 'int' -s '0'

You can change the parameter '0' to manipulate the icons

'0' Is no icons '1' Sets currently running apps as icons '2'    Will restore Home/File System/etc icons.


Ubuntu Upgrade to 15.04 Boot Problems, with linux-headers- 3.19.0-17(3.19.0-17.17) update

I had a similar problem.I just removed my official nvidia driver and switched back to my nouveau driver using the recovery mode.But this isn't a driver which gives you the acceleration you need.If you are not using an nvidia graphics card don't do what I am saying in this post.This was what I have done to switch back to nouveau.

apt-get remove --purge nvidia*

Then reboot.

Stop sddm using service.

I had blacklisted my nouveau.
So, removed the file which I created to blacklist.

After a reboot again I started my display manager.

But from the next time it took a lot of time to load.
It was the nvidia driver which bugged me.
If you also have the same problem look into this.
Hope this is helpful.


How to fix repeated "Authentication required by Wi-Fi network" [Broadcom BCM4323]?

There is no compatible linux driver for this adapter. A Windows driver can be installed this way.

Do this in terminal

sudo apt-get purge bcmwl-kernel-source
sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 ndiswrapper-dkms
wget http://wikidevi.com/files/Drivers/Broadcom/bcm4323x_5.10.79.30_XP.zip
unzip bcm4323x_5.10.79.30_XP.zip -d bcm4323
cd bcm4323
sudo ndiswrapper -i bcmwlhigh5.inf
sudo ndiswrapper -m
sudo modprobe ndiswrapper

But it seems that there is no way to connect to WPA secure networks.

The only solution is to replace this dongle with something else, if security is vital. WEP may work, but it is not very much secure.


Generic bluetooth joystick driver/udev rules

To get emulatorstation and Kodi to recognise the Magicsee R1 (on retropie 4.14.30-v7+) I had to put the following in /etc/udev/rules.d/99-gamepad.rules:

SUBSYSTEM=="input", ATTRS{name}=="Magicsee R1       ", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

I assume this should allow ETS2 to see the Magicsee R1 as well. I think the space in the ATTRS{name} isn't necessary but that's how it is given by udevadm. I find mode C (M+C) works better than B because B generates multiple button events for two of the buttons whereas C only generates one event for all of the buttons.

Hope this helps.


I would suggest the problem is the click package is only included in the repos for Saucy and Trusty and that you're using something older. You have a few options:

The easiest solution is to upgrade to Saucy.
You could download the debs from Launchpad and install them manually to fulfil the dependency. I've honestly no idea how well this would work because I don't know how Click interacts with the rest of the system.
You could build it for yourself from the source.


Ubuntu 14.10 lower screen resolution and unable to use desktop

TL;DR:

sudo apt-get remove --purge nvidia*
sudo reboot

Then enable Unity Plugin in CompizConfig Settings Manager (must be installed of course).

========

Managed to bring back desktop.

Followed tips from here (for nvidia users) with little modification:

http://itsfoss.com/fix-unity-freezes-after-login-ubuntu-14-04/

sudo apt-get update
sudo apt-get remove --purge nvidia*
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity
sudo reboot

That gave me desktop with normal resolution, desktop icons but without top menu bar, no Launcher, no Dash. Programs could be started with command line.

Next I followed tips from here:
Unity doesn't load, no Launcher, no Dash appears

compizconfig-settings-manager was installed so in terminal I typed ccsm.

After enabling Unity plugin things get back to normal but now I'm using nouveau graphics driver.

I don't know for sure but it looks like nvidia drivers issue. I followed first tips from first link (meaning without purging nvidia packages) and it didn't work.

Edit 1: Situation repeated on another Ubuntu PC with Nvidia GPU. During regular update problem with nvidia-331-updates was detected and reported. Then worked fine but symptoms described in first message appeared after reboot.

Fix: sudo apt-get remove --purge nvidia* then reboot and enable Unity plugin in CompizConfig Settings Manager.

Installing nvidia-331 (without "-updates") from Additional Drivers after that works fine.


In Docker, should I reuse base images if possible?

Yes, if you use the same base image for all three containers, you save on disk space, since that base layer is common to the three images. This said, Alpine isn't that big, so if your DB & Apache images are Alpine-based, this isn't as bad as it looks. But if you use a volume container (for instance to provide static content to the Apache server) you can base it on any of your existing images, and the only disk space it will use will be for the content you add.


how can I connect Ubuntu through Windows via localhost?

You can use putty to instal XRDP (sudo apt-get install xrdp) and connect to it via Remote Desktop from your windows machine.

obs: you can also try to use X11 forwarding in putty but you will need to have X11 on your windows machine (cygwin or others).


Custom keyboard layout behaves like last selected

You need to add the actual rule in /usr/share/X11/xkb/rules/evdev; the evdev.{lst,xml} files are only descriptions.

My best guess is that you need something like the following:

# existing lines
! model         layout          variant         =       symbols
  *             ben             basic           =       pc+in(ben)
# your additions
  *             my              basic           =       pc+my(basic)

I'm assuming your my file is /usr/share/X11/xkb/symbols/my.  The first 3 columns are matching XKB input parameters (here, any -model, -layout my, -variant basic).  The last column defines the symbols rule in terms of symbol files to load, in the format file(clause) (multiple files separated by +).  Symbol files are all in /usr/share/X11/xkb/symbols.

Try that -- you can test with something like this to make sure it's working (note the +my(basic) in the xkb_symbols line):

$ setxkbmap -layout my -variant basic -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+my(basic)+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

One problem is that I'm not sure your my definitions won't conflict with an existing layout.  If this is a completely new layout, you should probably call it something else to avoid conflicts.


Well, Python to the rescue!

Check out this one-liner, which reads from STDIN and prints to STDOUT, handling all possible "caret escapes"/"C0 codes" (like ^I) and line-end indicators ($):

python3 -c 'import sys,re;print(re.sub(r"\^([A-Z?@[\\\]^_])",lambda m:chr((ord(m.group(1))-64)&127),sys.stdin.read().replace("$\n","\n")))'

Actually it's both compatible with python (2) and python3. Here's a longer, more readable version doing basically the same:

#!/usr/bin/env python3
import sys, re

# read everything from stdin and remove line-end indicators
s = sys.stdin.read().replace("$\n", "\n"))

# replace caret escapes like ^I or ^M and output to stdout
print(re.sub(r"\^([A-Z?@[\\\]^_])", lambda m: chr((ord(m.group(1)) - 64) & 127), s)

So, first we remove the line-end indicators $.

Second we use the regular expression pattern \^([A-Z?@[\\\]^_]) to find all valid characters following carets and replace both with the correct unescaped character, according to Wikipedia on Caret notation and C0 control codes. Note how only capital letters A-Z or one of ?@[\]^_ have a special meaning.

Now to unescape such a C0 code, we take the position in the alphabet of the character succeeding the caret (found in m.group(1)), e.g. "A" is 1, "B" is 2 and so on. This is equal to its ASCII value minus the ASCII code of "A" plus one, which makes up the -64, which also explains e.g. "@" (ASCII 64) being 0 or "[" (ASCII 91) being ESC (ASCII 27). We do a binary AND operation on this number with 127 to only consider the first 7 bits of information, so that e.g. "?" (ASCII 63 == 64-1) wraps around to 127, representing the DEL character.

Finally after all these highly complex computations are done, we simply print the resulting string to STDOUT again.


Error prompt on startup, and "Disk has a few bad sectors"

There are several duplicates of this question, such as:

What to do if Disk Utility shows bad sectors pending in SMART?
I dropped my laptop. SMART says there are bad sectors. Can I fix this?
I have 4029 bad sectors. Should I worry?
SMART Disk Failure 05 - Reallocated Sector Count: Creating a Partition Ubuntu 12.04

Unfortunately, the answers vary. My own opinion is that, once bad sectors start showing up in a SMART test, the disk has become unreliable. I therefore recommend replacing it ASAP.


ubuntu 16.04 does not see my printer after download

so Brother provide an installer tool to install the software you need; if you go here:

Brother - Driver Install Tool

and click to download and SAVE what will be linux-brprinter-installer-2.2.0-1.gz

you need to open a terminal; so press three keys: control and alt and t and a black screen opens ......

next you need to copy the commands I list below; copy each command line by line; paste each line into the terminal; hit the ENTER key after each paste; ... then move on to the next command ..

....... so three separate pastes; ENTER key after each paste ..

and how to paste into a terminal; if you right-click at the text prompt in the terminal; .. that is the flashing light in the terminal ..then when you right-click; a menu appears; and PASTE should be there?

so when you click to download linux-brprinter-installer-2.2.0-1.gz, it should end up in your Downloads folder .. so ...

cd Downloads

gunzip linux-brprinter-installer-2.2.0-1.gz

sudo bash linux-brprinter-installer-2.2.0-1 HL-3180CDW

and that last command runs the installer script; so watch the screen as it may stop at some point and ask you some questions;

it will ask you for your sudo password; so have that ready;

and later on in the install it will ask you if you want to specify Device URI; say Yes; you are networked so look for the ip address line

let's see how the above all goes

so you have HL-3180CDW and Brother say you need hl3180cdwlpr-1.1.3-0.i386.deb and hl3180cdwcupswrapper-1.1.4-0.i386.deb and your screenshot shows you have both installed; so all should be good ... I would suggest you go to your PRINTERS folder; delete any existing entries for the 3180; then click on the ADD button at top-left; let it look and see what it finds; it should find the 3180; and see if Ubuntu can help you move forward;

if you could tell us what lpinfo -v gives from a terminal please

and check all the cups stuff is installed with dpkg -l cups*


Screen tuns off during skype video conversation

This is not a Skype issue, it is a Ubuntu setting. This will happen in any application you start when you're inactive (no user input) for x minutes.

As said you can set this setting to Never to disable it. You can also install an applet so you can easily disable it with just one click. To do this, please take a look at my answer here.


Is an Ubuntu packages update via GUI superior to one via CLI?

On a command line interface (CLI) I guess you do

sudo apt-get update
sudo apt-get upgrade

AFAIK a GUI does

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

dist-upgrade will/can remove/update packages that change dependencies. thus a restart can be  needed.

When you do sudo apt-get dist-upgrade on CLI, you will see that a restart is recommended sometimes too.

A GUI is not technically or security wise superior. It's often slower but can be more user-friendly.


Getting error while opening /etc/profile: Error reading lock file /etc/.profile.swp: Not enough data read

Try to remove the hidden file .[yourfilename].swp, which is stored in the same folder as the file that you are trying to open.
In your case try the shell command rm /etc/.profile.swp.

This issue also occurs with nano 2.7.4, and must be something to do with how nano handles a corrupted swapfile.

Hope this helped


Use the linux-install_dependencies.sh script in the scripts folder of the repository to install all the required dependencies automatically


Can't figure out why my computer won't boot

From the comments...

We couldn't access the BIOS menu, or the BOOT menu, or the GRUB screen. We reset the PMU (power management unit) by removing the motherboard battery, and now we can get to the BIOS and BOOT menus, and we're going to now boot to a Ubuntu Live DVD/USB and do the following...

Lets check your Ubuntu file system...

In terminal...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Update #1:

The computer is booting fine now.


Only 2GB of 32GB RAM recognised on ubuntu 20.04

After a month of trial and error I have finally solved the problem. I went and install Lion OS X again and then I have done 2 Firmware updates. One was SMC Mac Pro 1,1 and another one was EFI Mac Pro 1,1. Not sure how that affects RAM but it worked. Anyone interested can find downloads here https://support.apple.com/downloads/macdesktops
After I have done that I've run my ubuntu again and it was now showing all 32GB.
I have run few mem tests and it seems RAM works properly.
Cheers!


I see it too. The problem started after allowing nvidia updates. While I backtrack on that, I will tell you the only solution I've found

Run

ps aux | grep suspend

you should see a root-owned suspend process. Then kill that process:

sudo kill -9 xxxx

where xxxx is the number of the job.

Warning: the PC will suspend immediately when you do this, and then when you try to wake up, you are likely to be in an incoherent situation and it is best to reboot.


I can't get the wireless to work in Ubuntu 12.04 using Sony Vaio VPCEB1E0E

You can use this command to unblock all wireless devices:

sudo rfkill unblock all


This normally happens when you start to copy several files but it never completes. The only solution is copying it again from the original source, or preventing it by doing backups. To be on the safe side, you must check the size of the total of the files you are copying in the original folder and in the final one; if they match, everything is [probably] okay.


Trying to find a video Card that is dual display that wil work on an older computer with ubuntu 14.04Lts

I suspect it is easier than you think.  Although I've never actually done this myself, about a year ago I had an in-depth conversation with a mega-geek who swears that ANY graphics card with a single DVI port is in fact already capable of displaying two different images on two separate monitors, and that all you need is a DVI cable splitter, similar to this one priced under $10 at amazon:

http://www.amazon.com/StarTech-com-DVISPL1DD-1-Feet-Digital-Splitter/dp/B00111EMMO/ref=sr_1_1?ie=UTF8&qid=1418986339&sr=8-1&keywords=dvi+splitter&pebp=1418986343890

Some still fancier graphics cards have two DVI ports, which my friend explains support up to four such displays, provided you purchase two splitters.

So it seems the only part of your question I have left to answer is which cards are easiest to support.  The best I can do is to list the last two marginally high end graphics cards I purchased which gave me no grief, and both were purchased from Amazon, but you don't have to use that source unless you want to.

The following card seemed an exceptional value and ranked fairly high in a list of benchmarks I found online.  It's very large fan is extremely quiet.

XFX AMD Radeon HD 7750 1GB GDDR5 DVI/HDMI/DisplayPort PCI-Express Video Card FX775AZNP4;FX-775A-ZNP4

I ordered another value priced display card which claims to depend entirely on ambient airflow to cool it.  The problem is that most computers don't permit airflow around their cards so it would have overheated in the case in which I used it had I not cut a large opening in the side of the case to let air in directly opposite this card.  The case I used was made of cardboard, so cutting the case was relatively easy.

Asus ATI Radeon HD6450 Silence 1 GB DDR3 VGA/DVI/HDMI Low Profile PCI-Express Video Card - EAH6450 SILENT/DI/1GD3(LP)

Both graphics cards automatically configured with Ubuntu 12.04 without the need for locating any sort of additional drivers.


How can I write user data to the root partition?

If by "root" you mean the root partition (the partition mounted on /), then a simple way would be to make a folder somewhere in it that's owned by your user, and then put your files in it.

sudo mkdir -p /opt/mystuff
sudo chown $USER /opt/mystuff

Now /opt/mystuff should be writable by you, so use it for your files.

Long term, you should look into resizing the home partition, or moving it to a larger disk.

For convenience, you can make a link to this directory in your home directory:

ln -s /opt/mystuff ~

Now there will be a mystuff directory in your home directory.


why my Ubuntu 10.10 CD player can not read CD files copies from WinXP

I had this problem in the past. It turned out that the CDs were not properly closed by Windows, Those were sessions.

But if you can, transfer the files from the CD to a USB device and read it from Linux. I know that this may not be the solution you want, but it could do the trick for you. Alternatively, you may try to actually close the CD under Windows. There should be ab option under a menu for this, once you explore the actual CD content itself. Also, you may want to try something like Nero to close the actual CD.


Compiling a .TGZ - tutorial clarification using Compiling Things On Ubuntu The Easy Way

I assume you used this tutorial

Your question (1): look at extracted files - is there an executable or script? Some file with suffix .sh, .py or similar? Is there a file called README, INSTALL or similar which you can open with text editor to get instructions? Is there a file called Makefile? If you answer all questions with NO you might have to compile source the hard way using for example gcc somefile.c -o somefile and execute it using ./somefile

build-essential installs basic packages (libc6-dev | libc-dev, gcc, g++, make, dpkg-dev) to compile c-programs and build .deb packages

Step 1 in tutorial asks you to install packages using

sudo apt-get install build-essential checkinstall

BUT I also assume you just want to load aic7xxx kernel module which comes with linux-image-generic (standard kernel) in ubuntu.

To check if module is already loaded:

sudo lsmod | grep aic7xxx

If not already loaded load with

sudo modprobe aic7xxx


Is Sapphire Radeon R7 240 With Boost 1GB DDR5 compatible with Ubuntu 17.04?

The Ubuntu RadeonDriver page shows the AMD R7 240 card has been supported since version 14.04 so you should be alright. If in doubt boot using a Ubuntu live USB to check that everything works ok.