Can't install Ubuntu on Dell G3 15 and Inspiron 15 7000 Gaming

iyadh is right

But be cautious with the "nouveau" kernel module since it causes various problems during the system boot.
In tested Ubuntu releases since 16.04 - 16.04.6 up to 19.04.2 and only 16.04 didn't have any problems during the boot.

But it has kinda old kernel version 4.05 which does not have required wifi driver and firmware.

So you need to choose any distribution with the kernel version higher than 4.14 to support the wifi card.

The installing process of the new OS must be preceding by switching off the 'nouveau' kernel module in grub boot menu by adding nouveau.modeset=0 parameter into the grub params like

GRUB_CMDLINE_LINUX_DEFAULT="quite spash nouveau.modeset=0"

It will prevent opensource nvidia 'nouveau' driver from loading and the system will boot without freezing.

Than during the first boot enter the recovery mode as root and disable nouveau module from loading

echo blacklist nouveau /etc/modprobe.d/blacklist-nouveau.conf

update-initramfs -u

reboot

That's it. Now the system must be able to boot safely without freezing.

And one more thing about proprietary nvidia-driver I'd not recommend install it prior the nvidia-detect application gives the sensible output. When I tried to run it it didn't suggest any drivers and just hang.


TeamViewer 11 won't run on Ubuntu 16.04 64-bit

As first, remove the actually broken Teamviewer installation in a terminal () by:

apt-get purge teamviewer

If this does not want to work you can as well do this with dpkg:

dpkg -r --force teamviewer

After that make sure you delete any leftovers from your user directory, i.e. ~/.local/share/teamviewer11, ~/.config/temaviewer and /etc/teamviewer:

rm -r ~/.local/share/teamviewer11
rm -r ~/.config/teamviewer
sudo rm -r /etc/teamviewer

Now that this is out of the way, you do an update and an upgrade:

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

Then install the following packages:

sudo apt-get install libjpeg62:i386 libxinerama1:i386 libxrandr2:i386 libxtst6:i386 ca-certificates

Now download the Teamviewer package from their website (download-link) and install it:

cd ~/Downloads
sudo dpkg -i teamviewer_11.0.57095_i386.deb

After that it should run start normaly. If you not see teamviewer yet in the dash search check /usr/share/applications directory if the shortcut teamviewer-teamviewer11.desktop exists. If not create one by

sudoedit teamviewer-teamviewer11.desktop

And pasting (ctrl+shift+v) the following in:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=TeamViewer 11
Comment=TeamViewer Remote Control Application
Exec=/opt/teamviewer/tv_bin/script/teamviewer
Icon=/opt/teamviewer/tv_bin/desktop/teamviewer.png
Type=Application
Categories=Network;
#Categories=Network;RemoteAccess;

It should show up in dash at least after a reboot. Meanwhile you can firstly start your new installed Teamviewer vie the terminal by:

teamviewer &
disown

Now you can lock it at least already onto your launcher if you wish to do so.


Since upgrade to wily, x11vnc will no longer start

Apparently, the default display changed from :0 to :1.

Also, it no longer seems to work when run as super user.

Use -display :1 and get rid of the sudo to make it work.


Is there a way to make Launcher read icon from usb?

In Unity, it is not (yet) possible to do this, because Unity is coded to use the default system icon for removable drives, so you would need to file a bug against Unity asking for this functionality.


Go to the top left (in unity) and search for 'additional drivers'. Install the recommended or proprietary drivers. You might have to reboot. If this doesn't work, add a comment on this answer and I'll try again.


Is there a cheat sheet for systemd, for those of us coming from sysvinit systems?

Yes there are several.

Personally I use the Fedora documentation

https://fedoraproject.org/wiki/Systemd

There are links on that page for additional resources.

Arch Linux has a nice page also

https://wiki.archlinux.org/index.php/systemd


Ubuntu 10.04 LTS hangs at 43% of starting up partitioning disks

I suspect you have either a flaky controller or (slightly more likely) a flaky drive.  Test both thoroughly.


Test this:

You boot into recovery mode.

Select in this order the submenu

fsck
dpkg
network
root

In a terminal, run it:

sudo -i
dpkg --configure -a
apt-get install -f
apt-get update
apt-get dist-upgrade
apt-get install --reinstall lubuntu-desktop
apt-get autoremove
reboot


You could give bogus info for the initial setup, then once your system is installed,
edit /etc/network/interfaces with something like:

auto eth0
iface eth0 inet dhcp

(You'd replace eth0 if it's different from your interface, of course.)


Tried to re-install Ubuntu, Ubuntu and Windows 10 failing to load. Grub Rescue screen

Boot repair, as suggested by @dessert was absolutely the way to go.  I ran it from "try ubuntu" on my bootable USB.  Thank you so much for the help!


Install alsa-tools-gui and then run hdajackretask. You can override there any pin you need. Normally the change will be valid until next reboot. If you want to make it permanent press Install boot override.


I appear to have the same problem. I was able to get some useful debug output by running:

sudo /usr/lib/NetworkManager/nm-vpnc-service --debug

from: https://wiki.gnome.org/NetworkManager/Debugging and then connecting to the vpn in network manager. Unfortunately that just let me fix my problem with vpnc-connect working slightly better than network-manager-vpnc using the instructions on Cisco VPN not working about 1des but not make it actually work as I don't know what to do with the debug output talking about ESP packets. Perhaps this will help you.


Can I create a Bootable Pen Drive which will directly boot to Ubuntu which is installed on my laptop?

I have tried to nearly make it with below steps.

i don't find any benefit from this method but this method is targeted to achieve nearly the goal in your question.

i have tried it on my dummy system for doing practicals.
Backup is highly recommended.

I used
1. windows10 bootable USB stick.
2. Ubuntu 18.04.1 bootable USB stick.
3. Empty USB stick of 32gb to install Ubuntu on it.

sda-120gb SSD
sdb-bootable Ubuntu installation USB stick
sdc-usb stick where i installed Ubuntu.

I have installed windows10 on my single ssd. (sda)
installed Ubuntu 18.04.1 on the same ssd. (device for boot loader sda)
installed Ubuntu 18.04.1 on the 32gb USB Stick. (device for boot loader sdc)

while installing Ubuntu on this stick, i have created 100mb efi partition on this stick and remaining space for ext4 /.

Important is, when installing Ubuntu on USB stick (sdc) i choose boot-loader for installation as sdc. which was this USB stick.

now grub is controlled by this stick. if i remove this stick, system will come up with grub prompt.

i have to type "exit" to boot to windows10.

if the stick is present it will give the options where i can select Ubuntu which is on my ssd.
if i remove the stick and start the system, it will come up with grub prompt again where i have to type "exit" to boot to windows10.

Once i am Ok with the setup, i have edited the /etc/default/grub file on sdc so that when i insert this usb and start, system directly boots to Ubuntu on SSD without even showing grub.

what to do if i need the default dual boot system back?

remove the usb (sdc)
log on with live USB.
reinstall grub on the ssd where windows10 & Ubuntu are installed.

procedure:

open GParted from live session and see what are the partition numbers of efi & ext4 /. mine are sda2 and sda5 respectively.

sudo mount /dev/sda5 /mnt # mounting root partition.
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done # binding the required folders
sudo mount /dev/sda2 /mnt/boot/efi
sudo chroot /mnt
update-grub
grub-install /dev/sda
update-grub
exit and reboot.


How do I overcome a dpkg error caused by deleting a file in /usr/share/doc-base?

Try running sudo apt-get install --reinstall python-openbabel. That file came from this package, and hopefully no errors will occur in reinstalling it.


Update Manager Error - Authentication Error

You need to add the public key for the Dropbox repository, instructions from https://www.dropbox.com/downloading?os=lnx:

  We have also authenticated our Ubuntu repositories. Please run
   sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E to install Dropbox's public key.


I would suggest Cairo Dock, it is easily configurable and works on single and multiple screens.

To download it, open the Software Centre and Search for Cairo

or search for Main Menu:


How to write a script that backs up printed documents every 6 hours?

Have a look at lpq and lpstat:

lpq shows queued jobs on the default printer and lpq -l does it more verbosely, see man lpq
lpstat -o prints the queued jobs, use lpstat -Wcompleted -o for completed jobs, see man lpstat


Tried to install Ubuntu 16.04 dual with a Wndows 8.1 Neither system boots

If you have a backup of Windows, I generally recommend wiping the drive and reinstalling. Format it as GPT for UEFI, and reinstall Windows.

After that you can install Ubuntu. You have a UEFI system (don't use CSM(!), and disable secure boot), so follow the instructions in this thread:

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

Sorry you had to experience so many issues with your first taste of linux.

If you really want to be lazy, you can use these UEFI WUBI installers (installs Ubuntu as a disk image on Windows, and creates a UEFI entry):

  https://github.com/hakuna-m/wubiuefi/wiki

Download the 16.04 ISO, put it in the same folder as the installer, and install. You can expand the disk size >30GB later. Reboot and select the -UEFI UBUNTU- entry in your BIOS Boot Options, and boot.

Wubi isn't recommended as a full-use installation, but is a safer and faster (than a Virtual Machine) alternative for users who wish to get their feet wet with Ubuntu.


You can put grub on btrfs with no problems.

It is not a good idea to have /boot as a separate partition on a desktop computer unless you have a specific reason for that.

The easiest way is to re-install the system without creating a separate /boot.

It is possible to move boot from a separate partition to your / btrfs partition, but I am afraid it will take much more effort for me to explain and for you to do it.


How can I restore default keyboard shortcuts in 16.04?

Install and run dconf-editor:

sudo apt install dconf-editor

Look for these settings to restore defaults:

/org/compiz/integrated/show-hud
/org/gnome/settings-daemon/plugins/media-keys/window-screenshot


Download youtube playlist from youtube-dl. but no sounds

Video format 136 is a video only. Video format 22 is 720p video with audio.


where else are .desktop files for autostart are stored?

A catfish search yielded the following results in my Xubuntu 16.04:


NOTE :
Older versions of Kali Linux distros did not have EFI support. In this special case you have to enable legacy support in BIOS. The procedure to do this varies depending on the vendor setup.

If you have an EFI supported version of Kali Linux such as the rolling-edition, follow these steps to create a bootable USB. In this example I consider the USB drive as /dev/sdb1 - it may vary, so execute sudo fdisk -l to determine your USB drive.

First un-mount the USB disk : umount /dev/sdb1

Create the bootable USB disk :

sudo dd if=/path/to/Your-kali-iso/kali-linux-2016.1-amd64.iso of=/dev/sdb bs=512k && sync

The dd command provides no feedback until the process is completed, but if your drive has an access indicator, you will see it flickering from time to time. The output will be something like:

5618+1 records in
5618+1 records out
2945482752 bytes (2.9 GB, 2.7 GiB) copied, 287.421 s, 10.2 MB/s

Now you should see your USB pendrive in BIOS.


Checking version of nodejs returns nothing

Try

nodejs --version

(at least on my system the binary is called nodejs)


Could also be a temporary problem of slovenian mirror.

If persist (or if you hurry), try to replace with other repository.

First, backup your sources.list:

cd /etc/apt

sudo cp sources.list sources.list_bk
Second, edit your sourceslist:

sudo nano sources.list

Replace "http://si.archive.ubuntu.com" occurrences with http://archive.ubuntu.com/

Let me know


Ubuntu 11.10 can't play music with Logitech Bluetooth receiver

This happened to me
I Think you have to install "Bluez" tools first (theres a metapackage) out of synaptic/software center.


how do I send some headers with requests using uget?

After going through Uget manual page and it's website, I found that you can use http referrer flag. But, I see no other option for using a custom flag for specifying custom HTTP headers.

The Tutorial - http://ugetdm.com/documentation/tutorials
Feature Listing - http://ugetdm.com/features which doesn't specify anything like custom header
ManPage - http://ugetdm.com/manpage


Ubuntu 17.10 Keyboard not working after login following upgrade from 17.04 (Gnome version)

That is creepy that someone edited my comment for me. I don't like that at all. Feel free to add your own, don't edit my comment.
Original comment: Removing the package fwupd fixed the issue for me. You can remove it with sudo apt remove fwupd
Bug report: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1717340


You have to try some Data Recovery tools which may help you to restore some of your old data.

From R-tools Technology:

  R-Linux is a free data recovery and undelete utility for Ext2FS/3FS
  (Linux) file systems. File recovery after power failure, system crash,
  virus infection, or partition reformation, even for the different file
  system. Unformat and unerase tool. The utility creates image files an
  entire disk, partition or its part. Such drive image can be processed
  like regular drive

You can download 64 bit verion from here.

To install

sudo dpkg -i rli_en*.deb


The program you are starting with ExecStart must have full path. Find out where your java binary is and add that to the ExecStart.

Ex: ExecStart=/bin/java .....


What is the recommended way to upgrade: full reinstall or over current system?

considering programs/config files get changed/upgraded with distribution id do:

backup homefolder, various databases from /var
clean install then cli script for installing programs
restore relevant folders from homefolder(no config files/folders)
reapply settings for interface.. desktop and programs.. by hand

you can only safe apply straight backup if you dont switch/upgrade distribution or if you have 0day backup scripts tailored to your needs


No Sound in ASUS ZenBook 14 UX433FN after installing ubuntu 18.04

I have an asus zenbook 14 ux433FN. Faced the same issue with Ubuntu 18.04 (it comes with the kernel 4.15). I upgraded to kernel to 4.20 through the "ukuu" utility and the sound/headphones seem to work fine.

Here are the commands that in case you need to update the kernel

Check your kernel version

uname -r
install ukuu by following this link: https://ubuntoid.com/install-latest-ubuntu-kernel-ukuu/
update the kernel with ukuu

sudo ukuu --install v4.20
reboot and check your kernel version

Note: I would also like to point out that the suspend function would not work in ubuntu 18.04 for ASUS ZenBook 14 UX433FN. It would eat up all your battery even if you are in suspend mode. The solution to that can be found in the following link:
Ubuntu 18.04 - Dell XPS13 9370 no longer suspends on lid close


What does mean the second field of sadf`s output?

The 2nd column (3) shows the measurement interval in seconds.

% sar -u -o datafile 3 2
Linux 3.19.0-16-generic (mysecret)  11.05.2015  _x86_64_    (2 CPU)

12:01:20        CPU     %user     %nice   %system   %iowait    %steal     %idle
12:01:23        all      0,68      0,00      0,34      1,01      0,00     97,97
12:01:26        all      4,57      0,00      2,20      0,00      0,00     93,23
Average:        all      2,62      0,00      1,27      0,51      0,00     95,60

and this is the sadf output:

% sadf datafile
mysecret    3   2015-05-11 10:01:23 UTC all %%user  0,68
mysecret    3   2015-05-11 10:01:23 UTC all %%nice  0,00
mysecret    3   2015-05-11 10:01:23 UTC all %%system    0,34
mysecret    3   2015-05-11 10:01:23 UTC all %%iowait    1,01
mysecret    3   2015-05-11 10:01:23 UTC all %%steal 0,00
mysecret    3   2015-05-11 10:01:23 UTC all %%idle  97,97
mysecret    3   2015-05-11 10:01:26 UTC all %%user  4,57
mysecret    3   2015-05-11 10:01:26 UTC all %%nice  0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%system    2,20
mysecret    3   2015-05-11 10:01:26 UTC all %%iowait    0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%steal 0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%idle  93,23

from man sar:

sar -o datafile interval count

    All data are captured in binary form and saved to a file (datafile).
    The data can then be selectively displayed with the sar command using the -f option. Set the interval and count parameters to select count records at interval  second  intervals.
    If  the  count  parameter is not set, all the records saved in the file will be selected.
    Collection of data in this manner is useful to characterize system usage over a period of time and determine peak usage hours.


No sound from headphones ubuntu 13.10 on iMac

The solution was found by adding a row of options snd-hda-intel model=imac27_122 to /etc/modprobe.d/alsa-base.conf as explained here.


I am not able to set resolution at 1280 x 1024

You could add a new mode using xrandr and use that.

Type xrandr. This shows you the names of different outputs available on your system (LVDS, VGA-0, etc) and resolutions available on each.

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode LVDS1 1280x1024_60.00
xrandr --output LVDS1 --mode 1280x1024_60.00

Note: Replace LVDS1 by whatever you get in xrandr output.

You would have to edit the /etc/gdm/Init/Default file to make this permanent.

Add the above commands after

PATH=/usr/bin:$PATH
OLD_IFS=$IFS

Source: Ubuntu Geek

In 12.04 instead of editing GDM config files you edit the lightdm configuration:

sudo nano /etc/lightdm/lightdm.conf

and add the following line to the end of the file:

display-setup-script=/etc/lightdm/lightdmxrandr.sh

Now you create the new referenced file:

sudo nano /etc/lightdm/lightdmxrandr.sh

Paste the bash header in the first line:

#!/bin/bash

And your custom xrandr configuration from above below that.

At last make the script executable

sudo chmod a+x /etc/lightdm/lightdmxrandr.sh


Start-up problems - some daemons not starting

As I understand it, both mechanisms are still in place, with upstart starting the rc mechanism (see /etc/init/rc.conf), and start up items should use either mechanism but not both.

On my system, anacron is defined as a native upstart job in /etc/init/anacron.conf, therefore there should be no S20anacron or K20anacron, since the xnnName mechanism is for sysvinit only. There's no S20anacron on my system, eg. The run levels associated with particular upstart jobs are defined in the upstart job conf file where runlevels apply.

While the service command may look first for upstart jobs and run those in preference to /etc/init.d/ jobs, I understand upstart works directly rather than using the service command.

It's unclear to me why any of the above jobs, except dbus-daemon, should remain running. It appears that anacron is run by upstart at boot time, and then run regularly by cron (see /etc/crontab). It's man page says it is a cron supplement, rather than a replacement for cron.

Since I don't know the details of your changes to your system, here's the contents of my /etc/init/anacron.conf:

 # anacron - anac(h)ronistic cron
 #
 # anacron executes commands at specific periods, but does not assume that
 # the machine is running continuously

 description    "anac(h)ronistic cron"

 start on runlevel [2345]
 stop on runlevel [!2345]

 expect fork
 normal exit 0

 exec anacron -s


Segmentation fault while running some ubuntu specific apps like nautilus, unity-control-center, etc

Yes I did it. I only had to move all my pictures, videos, music, etc. to another newly made account's home directory and then everything was reset. The main thing was that the system messed with my themes configuration files so I removed all my files from my previous account.


How can I improve the quality of sound in Ubuntu?

The link from one of the comments helped a lot.

Go to this site:
http://www.webupd8.org/2011/04/system-wide-pulseaudio-equalizer.html

-Or-

Put the following commands in the terminal:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pulseaudio-equalizer

Afterwards, search for "PulseAdudio", you'll see a window with a drop-down option for "Presets", click that, and select "Laptop".
Helped me significantly!


From graphical login, press

ctrl-alt-f1

Login with your username / password, and run your commands. To log out, press

ctrl-d

And then

ctrl-alt-f7

to get back to graphical login.


Cant get nvidia 840m to work on asus ux303ln with ubuntu 14.04

First of all never go for xorg-edgers ppa !

Remove all previous installations :

sudo apt-get purge nvidia* bumblebee
sudo apt-get install ppa-purge
sudo ppa-purge ppa:xorg-edgers/ppa
sudo reboot

For version 352

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

For version 361 (ppa)

sudo apt-add-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot


Why not just do sudo apt-get install lamp-server^ libapache2-mod-perl2 ? The lamp-server^ package should install Apache2, MySQL, PHP, (which should already be set up to work together). The libapache2-mod-perl2 should add Perl support to Apache.*

For permissions, I usually do this:

sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www

Then you can make a link in your home folder that points to the webserver directory:

sudo ln -s /var/www /home/<yourusername>/www

By default, when you install Apache this way, it is started on boot.

I think it would be much easier to use the Ubuntu's way to install software on Ubuntu. That way, you will automatically get updates to your software through the package manager.

*I haven't done this before. You may need to follow the end of this page from the heading "Configure a cgi-bin directory" on.


Make Ubuntu open a window in files when plugging in an external drive

The simplest way to accomplish this would be via dconf-editor.

Open dconf-editor
Search for automount-open
Ensure the toggle is set to "true"

Alternatively, if you prefer using the terminal, you can do this:
gsettings set org.gnome.desktop.media-handling automount-open true


Ubuntu Server 16.04 unusual crontab entry

As stated in comments you have a virus installed by crypto miner. This tells you how to remove it: Watchbog Vulnerability

To summarize the steps:

crontab –r
ls /var/spool/cron/crontabs
pip uninstall urllib2
apt-get remove --auto-remove curl
apt-get remove --auto-remove wget
crontab -r
while true ; do killall watchbog ; done
sudo passwd root

Read the entire link for step by step details and to verify you have this virus in the first place.


Install - partitioning problem ('unusable space')

You have too many partitions created. the count is: sda1 (primary), sda2 (primary), sda5-sda7 (logical partitions inside a extended partition), thats why sda4 comes after all the higher counts. A Master-Boot-Record-formatted disk only allows 4 partitions (primary or logical).
You can use the space by resizing/moving partitions accordingly or eliminate sda4, resize the extended partition (which already contains sda5-sda7 (logical partitions)) to the complete remaining space and create your wanted (logical) partitions inside the extended one.


This happened to me a while back.  It would get to the login screen, and I could type in a username/password, but at some point it would go blank, and restart X.

It eventually went away when I upgraded to a different video driver, and inspite looking for it, I couldn't find anyone else talking about the same symptoms.

I suggest you try a few things, which you may already have done.  Firstly try pressing Ctrl+Alt+F9 to see if you can terminate X and get back to the text screen.  Secondly try ssh-ing into the machine when it's gone black, see if it's still running, or if it has kernel dumped.

In my case it would come back, after a restart, but it was pretty much guaranteed to die when it was first started, then as I said, it started working perfectly, before ultimately, my GPU died.  My laptop is an XPS, and apparently its a common problem that they run hot, over time, and the GPU comes unsoldered.  The blank screens could a sign of something crashing intermittently.


How to prevent ecryptfs from umounting home if tmux is still running?

One possibility is to deactivate automatic umounting:

Go to the directory ~/.ecryptfs.
You should find a file auto-umount there.
Remove this file and your ECryptFS-folder will not be umonted at logout.

If you want to do it only at an existing tmux session, I'd suggest writing a small script:

#!/bin/sh

if tmux has 2> /dev/null; then
  touch ~/.ecryptfs/auto-umount
else
  rm ~/.ecryptfs/auto-umount
fi

If there is an tmux session the script deletes the auto-umount and if not it touches it. Place that script in your shell .logout file.


Alright, this is a classic case of dependency mess-up.

First off, go to your Software Sources app and make sure that main, universe, and multiverse (optional) are all enabled.

Then, go back to your terminal and run the below command to refresh your package cache:

sudo apt update

Follow this up with these commands exactly as they appear below to upgrade your system and to clean up your dependency mess:

sudo apt -f install
sudo apt full-upgrade
sudo apt -f install

If this still doesn't work, we're going to have to resort to other tools, namely aptitude. As your apt is broken, we're going to have to manually install this. Visit this page and choose the most appropriate version of aptitude and download it. This is likely going to be xenial amd64, but check your system.

Then, run the following command to install aptitude on your system:

sudo dpkg -i <whatever you downloaded>.deb

Then, run:

sudo aptitude -f

Aptitude's dependency resolution/fixing system is slightly more complicated than Apt's, and as such is a lot more likely to fix any problems you may be encountering.


How do I replace a directory with a symlink and retain the folder emblem?

For Ubuntu 18.04:

In 18.04 you can no longer paste/merge symlinks over directories (with good reason).  Luckily, if you delete the home folder sub-directories (documents, downloads, etc.) and replace them with symlinks, the icons will automatically reappear if the names are the same.

Prior to Ubuntu 18.04:

This can be done using the "merge folder" functionality of Nautilus (the default file browser in Ubuntu).

Simply create the symlink in another location with the same name as the folder you want to replace, then copy and paste it into your home folder.

A dialog will appear asking if you want to merge the folders and you should click the Merge button and you will now have a new symlink with name and folder emblems of the old folder.

WARNING: From my testing, this doesn't appear to be a true 'merge' (it's more like a useful--albeit potentially dangerous--bug), any files or subdirectories in the folder you are replacing with the symlink appear to be deleted (aka, only replace empty folders if you don't want to lose files). Proceed with caution!

WARNING: Also, absolutely do not replace a folder that itself contains symlinks or it will follow the symlinks and recursively delete everything in the target directories.

This gets the job done, but if someone knew a command line alternative with the same results I would be very happy.


If you erroneously uninstall core packages on an Ubuntu system it's possible to put the deb packages back simply with one command:-

Note: This presumes you previously installed the stock Ubuntu product, and not one of the other flavours.

sudo apt install ubuntu-desktop^

Once snapd is re-installed (which it should be with the above command), you can re-install the snaps which come pre-installed with:-

sudo snap install gnome-calculator
sudo snap install gnome-characters
sudo snap install gnome-logs
sudo snap install gnome-system-monitor

Simply repeat this process, or use the graphical Ubuntu Software for the additional snaps such as communititheme, vlc and others.


Essentially this fix should solve the Dual screen not recognized problem. It did for me.

Symptoms I was encountering were:

sudo /usr/lib/nux/unity_support_test -p
Error: no composite extension.

Additionally when I attempted to open the Displays setting dialog, it would error saying something about RANDR and then never open even crashing Ubuntu a few times presenting the reporting dialog.

Some back story: I have an nVidia GeForce 8800GTS. When I booted the LiveCD of 12.04LTS 32bit, it booted with a fancy high-resolution grub, high resolution text mode, and right into unity with full 3D. After a while, ubuntu told me about proprietary drivers I should install, so I did. I installed the [recommended] one but upon rebooting, unity was stuck in 2D mode. So began my search for the fix.

I had been fighting with this issue for the past few days and successfully got unity running in 3D again by doing the following steps:

What I did to fix it:

Get the latest nVidia drivers:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get dist-upgrade

Modify grub to pass in nomodeset (this in combination with #3 did it I think)

sudo nano /etc/default/grub (and uncomment the GRUB_GFXMODE)
GRUB_GFXMODE=1680x1050

sudo nano /boot/grub/grub.cfg
linux /boot/vmlinuz-3.2.0-32-generic-pae root=UUID=a9aa4a63-ac9c-4fc4-96d8-7861d155d376 ro   quiet splash $vt_handoff nomodeset
sudo update-grub

Force nvidia-xconfig to run for composite.

sudo service stop lightdm
sudo nvidia-xconfig --composite
sudo service start lightdm

So, in all I think it was step 1, and 3 that fixed this for me. Step 2 just made the boot graphics high-res and gave me the super fine text mode I had on my install.

edit

To solve the dual displays issue, I was encountering and giving me access to the Displays settings, I had to stop using xinerama and switch to using Twinview in the nvidia-settings program.

I erroneously thought this would clone/mirror the displays and was using xinerama instead thinking that was the only way I could get both displays to work, but TwinView does exactly what I want; and because I'm no longer using xinerama, Ubuntu Display settings dialog does open (before it was showing RANDR error) and shows two displays.


Is TRIM enabled on my Ubuntu 18.04 installation?

From 18.04 fstrim (discard unused blocks) is enabled to run weekly by default for all mounted filesystems on devices that support the discard operation.
fstrim is managed by systemctl, not cron, and is defined by a systemd service unit (fstrim.service) and timer unit (fstrim.timer)
View configuration of fstrim.service:
$ systemctl cat fstrim.service
# /lib/systemd/system/fstrim.service
[Unit]
Description=Discard unused blocks

[Service]
Type=oneshot
ExecStart=/sbin/fstrim -av

Note: ExecStart=/sbin/fstrim -av
Where:
-a, Trim all mounted filesystems on devices that support the discard operation.
-v, Verbose execution.  Output the number of bytes passed from the filesystem down the block stack to the device for potential discard.
View configuration of fstrim.timer:
$ systemctl cat fstrim.timer
# /lib/systemd/system/fstrim.timer
[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim

[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true

[Install]
WantedBy=timers.target

View status of fstrim.timer:
$ systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
   Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
   Active: active (waiting) since Thu 2018-07-05 05:45:11 BST; 4h 42min ago
  Trigger: Mon 2018-07-09 00:00:00 BST; 3 days left
     Docs: man:fstrim

Start/Stop/Restart fstrim.timer:
(does not change startup status)
$ sudo systemctl [start/stop/restart] fstrim.timer

Enable/Disable fstrim.timer:
(add to/remove from startup, does not change current active status)
$ sudo systemctl [enable/disable] fstrim.timer

View journal entries for fstrim.service:
$ journalctl -u fstrim.service
...
May 01 07:57:48 user-laptop systemd[1]: Starting Discard unused blocks...
May 01 07:57:51 user-laptop fstrim[810]: /: 94.5 GiB (101432025088 bytes) trimmed
May 01 07:57:51 user-laptop systemd[1]: Started Discard unused blocks.
-- Reboot --
May 07 05:29:03 user-laptop systemd[1]: Starting Discard unused blocks...
May 07 05:29:05 user-laptop fstrim[776]: /: 94.3 GiB (101260668928 bytes) trimmed
May 07 05:29:05 user-laptop systemd[1]: Started Discard unused blocks.
-- Reboot --
etc...

View journal entries for fstrim.timer:
$ journalctl -u fstrim.timer
...
May 01 07:57:48 user-laptop systemd[1]: Started Discard unused blocks once a week.
May 01 20:21:43 user-laptop systemd[1]: Stopped Discard unused blocks once a week.
-- Reboot --
May 02 06:21:59 user-laptop systemd[1]: Started Discard unused blocks once a week.
May 02 20:37:11 user-laptop systemd[1]: Stopped Discard unused blocks once a week.
-- Reboot --
etc...


install ubuntu on google nexus10 without android

To allow communication between your Nexus 10 and your host system you need to enable the developer mode on your device.

Go to System Settings -> About this phone -> Developer mode:

To set the Writable Image, please follow this guide.


docx format opened simultaneously with LO writer and Kingsoft writer

To open .docx with Kingsoft Writer as default, just right click on the .docx file, and click on properties.  Once the properties window open, click on the open with tab, choose Kingsoft witer, and click on Set as Default.  See images below.


How to change screen resolution on my 10 year old Compaq Presario 2500

According to the Ubuntu Documentation Radeon Driver wiki, you are already using the correct graphics driver for your system, that is the free, open source driver for many ATI graphics cards that comes preinstalled with the Ubuntu default installation. Your graphics card is on the Ubuntu Documentation Radeon Driver wiki's list of Radeon graphics cards that have good 3D acceleration support.

So before you consider trying to install a graphics driver that is not recommended for your system, you should check to see if it is possible for you to change your screen resolution using an application called Resolution Switcher from the Ubuntu Software Center. Resolution Switcher allows you to change your screen resolution in a graphic user interface. However what usually happens is that you already have the best screen resolution, and Resolution Switcher doesn't give you any options to improve it.


You need to mount your disk to some directory first.
For example run:
sudo mkdir /media/HDD
sudo chown $USER:$USER /media/HDD
sudo mount /dev/sda1 /media/HDD

Now you can use /media/HDD as the root directory of your disk.
To make the disk permanently mounted, you need to edit /etc/fstab.


If you want a minimal system in BIOS mode, start from an Ubuntu mini.iso file and install only what you want.
If you want a minimal system in UEFI mode, start from a 64-bit Ubuntu Server iso file and and install only what you want (avoid server specific packages, that you don't need).
There are many window managers. I have used Fluxbox. See also this link that shows that it might be enough to install fluxbox xinit xterm. I think you will replace xterm with terminator and maybe fluxbox with some other window manager.


See the output of a scheduled task in the terminal

From my post on Super User, obtain the PID of the at job and then you could see where at is saving the output:

$ at now
warning: commands will be executed using /bin/sh
at> sleep 10m
at> <EOT>
job 7 at Sat Jan  7 20:18:00 2017
$ pgrep sleep
7582
$ ls -l /proc/7582/fd
total 0
lr-x------ 1 muru muru 64 Jan  7 20:19 0 -> /var/spool/cron/atjobs/a0000701795998 (deleted)
lrwx------ 1 muru muru 64 Jan  7 20:19 1 -> /var/spool/cron/atspool/a0000701795998
lrwx------ 1 muru muru 64 Jan  7 20:19 2 -> /var/spool/cron/atspool/a0000701795998

As you can see, the output is saved to a temp file, which you can now check:

$ sudo tail -f /var/spool/cron/atspool/a0000701795998
Subject: Output from your job        7
To: muru

You need sudo because the containing directory is not world-accessible (at least on Ubuntu 14.04):

$ sudo namei -lx /var/spool/cron/atspool/a0000701795998
f: /var/spool/cron/atspool/a0000701795998
Drwxr-xr-x root     root   /
drwxr-xr-x root     root   var
drwxr-xr-x root     root   spool
drwxr-xr-x root     root   cron
drwxrwx--T daemon   daemon atspool
-rw------- muru     muru   a0000701795998


How to disable right click on the touchpad

Run synclient -l to show your Synaptics trackpad configuration. At the end of the output, you will find something like

RightButtonAreaLeft     = 3068
RightButtonAreaRight    = 0
RightButtonAreaTop      = 4326
RightButtonAreaBottom   = 0

These values have to be changed to zero by typing these two commands:

synclient RightButtonAreaLeft=0 and synclient RightButtonAreaTop=0

Clicking anywhere on your trackpad with a single finger will now always trigger a left-click. To right-click, do a two-finger click anywhere on your trackpad. Be aware that the new settings will be lost everytime you reboot or relog.

Making the custom trackpad settings permanent in Unity

To make the new settings permanent, write the two commands to a shell script and add the script to your startup applications:

nano ~/.synaptics-custom-settings.sh

Paste the code below into the shell script, exit the editor with Ctrl + X, and confirm the saving dialogue with Y.

#!/bin/bash
synclient RightButtonAreaLeft=0
synclient RightButtonAreaTop=0

Make the shell script executable:

chmod a+rx ~/.synaptics-custom-settings.sh

Open the Startup Applications program in Unity and add ~/.synaptics-custom-settings.sh to the list of startup applications. This way, the custom trackpad settings will be applied automatically every time you log in.

Source: http://kernpanik.com/geekstuff/2015/01/12/disable-rightclick-synaptics.html


how to delete bookmark from LibreOffice?

On the upper menu-bar go to Insert -  Bookmarks... .

Bookmarks list will appear:

Select the bookmark you want to delete and press Delete button.


How to fix 'error trying to exec 'cc1obj': execvp: No such file or directory

You need to install the corresponding Objective-C++ cross compiler package, either from your favorite GUI package manager or via the command line using

sudo apt install gobjc++-mingw-w64

This should install both gobjc++-mingw-w64-i686 and gobjc++-mingw-w64-x86-64 allowing you to build Objective-C++ code targeting both 32-bit and 64-bit Windows platforms.


How to disable windows' contents being moved on dragging, so that only the frame is dragged and the whole window is only redrawn on drop?

First, disable desktop effects to get metacity instead of compiz.  Then open gconf-editor, find /apps/metacity/general, and enable reduced_resources.  Here's a description of that option:

  If true, metacity will give the user less feedback by using wireframes, avoiding animations, or other means. This is a significant reduction in usability for many users, but may allow legacy applications to continue working, and may also be a useful tradeoff for terminal servers. However, the wireframe feature is disabled when accessibility is on.

As far as I know there's no option to enable it through the GUI, gconf is the only way.


Fix animated GIF images which eog can't open, but Firefox and ImageMagick can

Usually when some program can't open certain GIFs it's because of optimization used for this image.

You can try running ImageMagick with the -coalesce option. This will redraw each frame with all the details from previous frames. This will increase file size, but undo complex frame optimizations.

convert original.gif -coalesce unoptimized.gif

If this doesn't help, please provide a sample GIF with this problem.


Edit "Places" in main menu, Ubuntu 18.04 with Gnome Classic

There are limited possibilities to edit that menu indeed. You can add regular folders which will appear in the third section of the menu by bookmarking them. Bookmarks will appear in the left pane of files, and also will appear in the places menu.
With a hack, you can also add special locations such as "Trash" to your bookmarks. Open the file ~/.config/gtk-3.0/bookmarks and add trash:/// on a new line. The Trash will now appear in the bookmark section of the Places menu. A drawback of the approach is that it now appears twice in different sections in the left pane of Files.


Add New Printer disabled - grayed out using Gnome Shell

I have the exact same issue here. One workaround is use cups to add printer, that works for me. http://localhost:631.

Just found another way, execute "system-config-printer" in terminal, it will open the printer config in Unity, and you can add/remove printers in gnome. By default in gnome it opens a different printer application which you can't add printer.


You have to rewrite the MBR (Master Boot Record) of the hard drive using a Windows Recovery Disk. If you don't have one, you can legally download and burn one for yourself. You could e.g. follow the guide here. Then boot from it and select Repair your Computer, then Troubleshoot, launch a command prompt and enter

  bootrec.exe /ScanOS

Your Windows installation should be detected. To fix the boot problems run

  bootrec.exe /FixMBR

and

  bootrec.exe /FixBoot

and

  bootrec.exe /RebuildBcd

Then just reboot your PC and you should see your Windows again :)


The first command replaces (s) all occurences (g) of first with second in the current (.) and the next 15 (+15) lines. It is supposed to be entered in vim's command line, which can be opened using :. For more information about replacing, see the vim wiki.

The second command copies (yy) 10 lines, starting from the current one, then pastes (p) them below the current line.


Can I check if the terminal was started by Visual Studio Code?

VS Code sets the standard environment variable TERM_PROGRAM in the terminal's environment to indicate what launched it, so you can solve your problem using this without needing to parse the process tree:

if [[ "$TERM_PROGRAM" == "vscode" ]]; then
  exit 0
fi

# Rest of script...


No need to install any other app or repo, just go with the defaults. Thank God for Ubuntu 16.04, it tries to get everything to work for users. Hold down the Shift + PrtScn keys together.

Your mouse will change to a cross-like pointer. Hold down your left-click key on the mouse and drag. It saves screenshot image to Pictures directory. To copy to Clipboard, use Ctrl> + Shift +  PrtScn. Have fun.

This uses gnome-screenshot under the hood. You can change the keyboard shortcut via the regular keyboard settings.


I'm trying to print on my HP Deskjet 841C printer in Ubuntu 10.04, but it's not working

I changed the driver from the default (hpijs) to the next one in the list of drivers that came with Ubuntu, which was CUPS + Gutenprint simplified, and it started working just fine.

Thanks for all your help!


How can I see if a contact has video/voice capability in Empathy?

empathy uses the farstream library to enable audio and video and as far as I can tell it's not available in the 12.10 repositories. I'm also trying to find a way to enable it.


How to add quicklist to favourite applications in GNOME Shell

There is currently no way of doing so. Gnome 3 doesn't yet support the X-Ayatana-Desktop-Shortcuts tag in .desktop files (though I'm planning to write a gnome-shell-extension over the weekend to rectify this). I'll update this answer with the relevant link on Monday. You'll have your quicklist functionality then.

Although I must say it's a feature which should already have been released to the community by canonical, since it's such a simple extension. I don't like unity and I feel they're going down a bad road. It won't be long before I'm switching to arch/mint if they continue this embrace-extend-extinguish approach to linux development.


Save the terminal history to a file for print

There is already a hidden file in your home directory called .bash_history which you can print it. One observation here: this file, in a default configuration, doesn't contain the commands used in your current opened terminal session. So, close the terminal before to print it.

But if you want to save the terminal history in another file, then you can use the following command (this new file will contain also and the commands used in your currently opened terminal session):

history > history_for_print.txt

A new file called history_for_print.txt will be created in your currently working directory containing your last used commands (by default HISTSIZE=1000 and HISTFILESIZE=2000, but you can change these values in your ~/.bashrc file).


Internet Connectivity for Ubuntu 14 in Hyper-V(Updated)

I've never used MS Hyper-V, but I do use Virtualbox, GnomeBox, and currently VMware Workstation 12. It appears that you do not have a network adapter selected. Here's a picture of a VMware Machine I have. http://imgur.com/a/Gw08u

This machine is set to use NAT, and will have the same IP address as my Linux Host. I usually choose a Bridged connection, that way my guest OS will have it's own IP.

Here's another answer I found that may help you. https://superuser.com/questions/469806/windows-8-hyper-v-how-to-give-vm-internet-access


How can I make the battery icon appear in my gnome-3 panel only when charging or discharging?

Manually creating icon-policy key & setting it to "charge" might help, however I did it from terminal & it worked fine for me(both in gnome-shell & fallback mode).

Run update manager & make sure you have latest updates.Disable any extension(if you have any) related to power or battery.Then open terminal & run following command:

gsettings get org.gnome.power-manager icon-policy

it should return something like these:

:~$ gsettings range org.gnome.power-manager icon-policy
enum
'present'
'charge'
'low'
'critical'
'never'

Now set the icon policy to charge:

gsettings set org.gnome.power-manager icon-policy charge

Restart gnome-shell.

Done!

Does this help?

Update: This above method only works with gnome 3.1.3 or less.

Unfortunately in latest gnome  this isn't possible any more. "org.gnome.power-manager icon-policy" has been removed in GNOME 3.2, as gnome-power-manager code has been moved to gnome-settings-daemon, where there is no key to configure this. See this bug report(bug 655298).

If you want to hide battery icon in gnome shell, see this post:
how to remove battery indicator in gnome-shell?

On Unity, support for hiding of icon and settings has been added with indicator-power - 1.90-0ubuntu1 (bug 811769).


It's probably your router, based on it's IP. Many residential routers support ftp and telnet. The reverse name _gateway supports this

Thus, you will have to check the manual of the router for how to disable said services on the router. It has nothing to do with Ubuntu.

You can verify this by running the command ip route and verify that it has a line saying

default via 192.168.1.1 dev ...


Update has caused my system to start in text mode

Your getting to the text console because X won't start. The easiest way to get it working again so you have a UI to work from is to run

sudo mv /etc/X11/xorg.conf /home/username/xorg.conf.backup
sudo apt-get remove nvidia-*
sudo restart

When you come back up, everything should auto detect fine and you will get a basic GUI.

From that point your going to have to set back up your video card drivers. To do that:

sudo apt-get install nvidia-current
sudo restart

When you restart this time you should have a fully working GUI.


Dual boot on a Samsung SSD EVO 860 whose factory files are removed

Wiping your SSD and installing a new partition table is completely safe and does not erase anything that can't allow Ubuntu and Windows to boot.
However you must install Windows 10 first, then make your Windows partition smaller and then install Ubuntu alongside it else Ubuntu will only allow you to erase the Windows partition or you will try to resize it in Ubuntu and the bootloader gets corrupted.


"ubuntu-support-status" script no longer available in Ubuntu 20.04

Correct, it is not provided - see search results on packages.ubuntu.com.

Why it was removed?
The changelog contains the answer:

  update-manager (1:20.04.9) focal; urgency=medium

  Remove ubuntu-support-status as the term support can be confusing and the
  Supported field has been removed from Launchpad packages. (LP: #1873362)
  Add ubuntu-security-status - a tool for displaying information about
  packages installed and the kind of updates which they may or may not
  receive. (LP: #1873362)

  -- Brian Murray   Fri, 17 Apr 2020 15:06:52 -0700

So this command was replaced by ubuntu-security-status.

On my 20.04 LTS system its output is as follows:

$ ubuntu-security-status
2134 packages installed, of which:
1685 receive package updates with LTS until 4/2025
 449 could receive security updates with ESM Apps until 4/2030

Enable Extended Security Maintenance (ESM Apps) to get 0 security
updates (so far) and enable coverage of 449 packages.

This machine is not attached to an Ubuntu Advantage subscription.
See https://ubuntu.com/advantage


I get a blank screen rather than a Screen Saver

(OP states issue resolved)

Problem seems to have gone away. Screensavers now start with the settings to 5mins (not less). I still get a blank screen if I set settings to 1 or 2 mins. – motoringeek Aug 23 '11 at 22:15


You can use brace expansion and printf:

printf "%s\t" ROW1 n{1..300}

The first string specifies the format of output to printf, and %s is replaced with a corresponding argument. Since there is only %s, printf will re-use the format specifier until all arguments are exhausted. This will leave a trailing tab.

{1..300} is bash syntax which expands into numbers from 1 to 300, separated by spaces. If a string is added before or after the braces, the expanded form will also have that string attached.

To avoid a trailing tab, you'll have to print something separately, either the first word, or the last:

printf "ROW1"; printf "\tn%d" {1..300}
printf "%s\t" ROW1 n{1..299}; echo n300


Problem with dual resolution screen on laptop - external screen on Ubuntu 16.04

NVIDIA binary driver version 384.59 was recently released and that fixed my issue (no further action was required).


In order to start apache, you need to run one of the following commands:

sudo apache2ctl start
sudo service apache2 start
sudo systemctl start apache2

Those commands will load environment variables. Running apache2 by itself will not work as you will be missing needed steps to run apache.


Unity Greeter login screen cuts off login options

I solved this through (re-)installing the NVidia current-updates driver version.

Go to System Settings > Available Drivers

I selected NVidia accelerated graphics driver (post-release updates) (version current-updates) and clicked Activate.

After downloading and installing I had to restart everything worked fine.


How can I buy Canonical Ubuntu Advantage licence for Ubuntu OS installed on one of cloud VM and how can I apply that licence

Canonical Ubuntu Advantage License is for businesses not for personal usage.

  Will this license provide me any Ubuntu Bug Support and upgrades.

Yes. It may provide you a custom patch if you encounter a bug, but in general Ubuntu updates are available free of charge - unlike SUSE or RHEL's.

Website for Ubuntu Advantage .

It includes access to Landscape, the systems management tool.
Exclusive to Ubuntu Advantage subscribers, the Canonical Knowledge Base is an online library of articles on technical issues including security, migration and networking.
Canonical’s Global Support & Services team provides around-the-clock coverage for Ubuntu deployments all over the world. Telephone support gives you access to engineers with first-hand experience of your issues, while the online portal lets you track the progress of cases in real time.

There are 3 levels: desktop, server and cloud management.

Form to Contact Canonical

  Considering Ubuntu for your business? Just fill in the form below and a member of our team will be in touch within two working days.


How to define disk usage during Ubuntu Installation

The answer may be Yes, but not in the way you expect. A Wubi install will not automatically make use of the remaining space on the drive or partition. It will confine you to the original size you chose at installation time: 15GB (up to 30GB if you select it). While you certainly can save files to the rest of the drive, mounted under /host this is a manual effort akin to mounting a separate partition.

It also won't stop you running out of space on the Wubi virtual disk, if you're not careful. There is a way to resize the virtual disk, but you should ask yourself why you are using Wubi upfront. It's mainly to try out Ubuntu first. If you are planning to use it long-term, then partitioning and installing directly is recommended. In this way you can select as much space as you need.


How do I uninstall MariaDB on Ubuntu 14.04 (Trusty Tahr)?

There are a few other options which might be of use:

  sudo apt-get remove mariadb-server

This will remove just the mariadb-server package itself.

  sudo apt-get remove --auto-remove mariadb-server

This will remove the mariadb-server package and any other dependant packages which are no longer needed.

If you also want to delete your local/config files for mariadb-server then this will work.

  sudo apt-get purge --auto-remove mariadb-server

but be careful with that last one. See the disclaimer at the installion site


Symantec Class 3 G4 intermediate certificate missing from ca-certificates/ca-certificates-java

Ubuntu does not have the Symantec CA certificates in /usr/share/ca-certificates/mozilla/ direcotry. So, one thing what we can do is we can export the Symantec CA certificate from mozilla, since Mozilla and Chrome has Symantec CA certificates by default and you can put it under the directory /usr/share/ca-certificates/mozilla/ with crt extension and update the path in /etc/ca-certificates.conf the run the command

sudo update-ca-certificates

Then you should be able to access the website which is using the certificate signed by Symantec. Let me know if you need more on export CA from mozilla and import to ubunut ssl directory.


Is there any possible way to recover JPG images from a specific period of time?

In case your JPG files have EXIF data stored this can easily be accomplished with

jhead

Command line tool to manipulate EXIF data, and to touch the timestamp or rename a jpg file according to the EXIF data stored within the file.

jhead -ft unnamed.jpg  # to touch the time
jhead -n%Y%m%d-%H%M%S unnamed.jpg # to rename in this format YYYYMMDD-hhmmss

exiv2

Another, similar tool will also manipulate and use EXIf data from other file fomats including:

  Supported formats are JPEG, TIFF, PNG,  JP2,  Adobe  DNG, Canon CRW, Canon THM, Nikon NEF, Pentax PEF and XMP sidecar files. Read-only support is currently available for PSD and several TIFF-based RAW  formats:  Canon  CR2, Fujifilm RAF, Minolta MRW, Olympus ORF, Sony ARW and Sony SR2. Manpage exiv2

exiv2 rename unnamed.jpg # will rename to YYYYMMDD_hhmmss.jpg

Shotwell

Shotwell Photo Manager is installed by default and can sort images according to their EXIF data:


How to automatically set terminal title to directory name without path

Why do you want to do it without modifying your PS1 variable? That is the correct way to do it.

If you run the following, you'll get what you want:

export PS1="\[\e]0;\W\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

This is just taking the default prompt:

export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

... and replacing \u@\h: \w with \W.

You can do the same thing with any command that echoes the right escape code:

echo -en "\e]0;${PWD##*/}\a"

... but then you'd be constantly fighting bash to stop it from doing it using PS1 (the best way).


Steam error: “You are missing the following 32-bit libraries, and steam may not run: libXtst.so.6 libgtk-x11-2.0.so.0”

You can get the 32 bit version of those two .so's by installing these packages:
sudo apt install libgtk2.0-0:i386
sudo apt install libxtst6:i386

The ":i386" suffix specifies the 32 bit version of the package. Note that this step may be a prerequisite (it doesn't seem to be for me, but people often report that it is).
sudo dpkg --add-architecture i386


Preinstalled Ubuntu on Asus EeePC 1011PX BLK030U

I'll try to answer each point, but there's a few details I need filled in.

The benefit of having the entire OS and your personal data on one partition is that there is only one partition to manage. If you want to shrink/expand/move the partition then there are fewer other partitions getting in the way. I, personally, prefer to have many partitions. It is not as likely on personal machines as on servers, but errant programs can cause a partition to overfill.
Ext4 has some performance issues that are holding it back from being the default root filesystem. See the last heading of this article. It is very possible to use it as a root fs however and the article has details on how to do an inplace upgrade (do not do if you're still using [legacy] GRUB)
I don't know what the size of the partition is, but I can guess by the filesystem, the placement, and the fact that it isn't mounted that it either has to do with booting or with factory backups. Did you install Ubuntu yourself? If not, I'd say that is the factory backup. If yes, then it is likely the boot partition (which could also be mounted as /boot)
Again, depends on if you installed Ubuntu or if a factory did. If a factory did, then they likely included a recovery partition. Else, you're stuck using Ubuntu live disks/USBs to reinstall.


When upgrading non official repository (ppa) will be lost?

The non-official repos are disabled during upgrade.

I am not sure about your second point. Which sources are you referring to? Is it the ppa sources? Yes they are backed up but disabled.

After the upgrade is complete, you can check the status of those ppas from "Software Sources", and re-enable them. I guess you will need to purge gnome3 ppas if you are using them before you upgrade.

You can use a tool called y ppa manager, which you might find helpful to enable/disable individual ppas (ppa:webupd8team/y-ppa-manager).


The white screen might be due to folder permissions...try:

chown -R www-data:www-data /var/www/whateverfolderyourdevelopingin

Are you using a framework? I'm using laravel5 myself and i get the same character encoding message in console. However my site works as intended.
I'm suspecting is has something to do with the index.php file or it might be an outdated browser issue.


Installation of 3rd party soundcard driver

C-Media CM8738 chips are supported by ALSA, the card should be working without 3rd party drivers. Does it show up in the sound settings and play sound? Have a look at the following page if not: https://wiki.ubuntu.com/DebuggingSoundProblems

I think I found the product page for the card including updated Windows drivers, no Linux drivers later than 2001 though.


Places in Ubuntu opening with wrong application


Your question

What gcc -o sample sample.c actually does

The command you have pasted triggers gcc to compile sample.c.
As a result you'll get an output/executable with the same sample.

The parameters (as -o in your example which defined the name of the output file ) are explained in the man page of gcc.
You can open it by running man gcc

I am quoting the -o section of the man page here

  -o file

       Place output in file file.  This applies to whatever sort of output
       is being produced, whether it be an executable file, an object
       file, an assembler file or preprocessed C code.

       If -o is not specified, the default is to put an executable file in
       a.out, the object file for source.suffix in source.o, its assembler
       file in source.s, a precompiled header file in source.suffix.gch,
       and all preprocessed C source on standard output.

In General

Wikipedia explains a good amount of gcc here.

I am quoting only the start - but the complete article is worth a read and offers a lot of additional links and references

  The GNU Compiler Collection (GCC) is a compiler system produced by the
  GNU Project supporting various programming languages. GCC is a key
  component of the GNU toolchain. The Free Software Foundation (FSF)
  distributes GCC under the GNU General Public License (GNU GPL). GCC
  has played an important role in the growth of free software, as both a
  tool and an example.

  Originally named the GNU C Compiler, when it only handled the C
  programming language, GCC 1.0 was released in 1987. It was extended
  to compile C++ in December of that year. Front ends were later
  developed for Objective-C, Objective-C++, Fortran, Java, Ada, and Go
  among others.

  GCC has been ported to a wide variety of processor architectures, and
  is widely deployed as a tool in the development of both free and
  proprietary software. GCC is also available for most embedded
  platforms,[citation needed] including Symbian (called gcce), AMCC,
  and Freescale Power Architecture-based chips. The compiler can
  target a wide variety of platforms, including video game consoles such
  as the PlayStation 2 and Dreamcast.

  As well as being the official compiler of the GNU operating system,
  GCC has been adopted as the standard compiler by many other modern
  Unix-like computer operating systems, including Linux and the BSD
  family, although FreeBSD and OS X have moved to the LLVM system.
  Versions are also available for Microsoft Windows and other operating
  systems; GCC can compile code for Android and iOS.


This problem was caused by docky. One more instance of docky was created, I was not aware of this. After some time I tried to create one more instance which reveals this problem and I deleted entry corresponds to new docky and it disappears.


Im having the same problem but I found the ubuntu sound trouble shooting guide:

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

Step 1A worked for me:

  In Terminal run the following commands:

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

  wait ten seconds, then run this:

pulseaudio -k


I solved it by logging into a terminal session and resinstalling the xserver:

 `sudo apt-get install --reinstall xserver-xorg`


sudo nano /etc/default/grub

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT=""quiet splash i915.lvds_downclock=1 drm.vblankoffdelay=1  i915.semaphores=1"

and run:

sudo update-grub

Is there a power saving application similar to Jupiter?


Network indicator missing in ubuntu 14.04 64 bit

sudo apt-get install indicator-applet-complete did the trick for me.


Edit /etc/grub.d/10_linux instead and run sudo update-grub when you are done. This is a more reliable method, otherwise every time you upgrade to a new kernel your /boot/grub/grub.cfg will be overwritten and you will lose your changes.

Or you can use Grub Customizer. To install it:

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


Is legal/ethical to obtain upload rigths to the Ubuntu archives to fund a support company?

I believe ethically there is nothing wrong in your approach; you are simply attempting to be seen as a support partner. As to legality, if you were accepted as a support partner, you would be bound by their terms and conditions and that would therefore also state what permissions you would have (and thus how "legal" your work was.

The ethical and legal implications are essentially moot, what matters is whether Canonical accepts your application. You can find out more here at http://www.ubuntu.com/partners


Is the Lightning 1.7 calendar for Thunderbird not supported on 10.04?

As per micahg's comment, it was just a simple oversight :)

As micahhg said:

  Whoops, looks like I forgot to upload this to the thunderbird stable PPA, doing so now.


You can use bind to create a new keybinding, for example:
bind '"\C-g":"ls\n"'

Now press Control-g to invoke ls. However, ls
will still be saved in history. You can add it to
HISTIGNORE
though.


How can I report a bug for two packages?

First, it is recommended you use ubuntu-bug for reporting bugs. Instructions for using it are here.

ubuntu-bug, the command-line tool, currently only accepts one package at a time. You should try your best to guess what the most relevant one is. In order to add more packages to a bug report after sending, go to its Launchpad page and click "Also affects project".


EFI Boot loader - grubx64.efi - PXE provisioning - Foreman

Thanks, I found my answer @Fedora ...
https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Server/x86_64/os/EFI/BOOT/
Hoping that a new grubx64.efi version will reach us soon enough ...
https://www.zdnet.com/article/intel-were-ending-all-legacy-bios-support-by-2020/
Regards,
Gueug


Command to see media file info in terminal?

avprobe from the package libav-tools is pretty good.

Sample output avprobe somefile.mp4

avprobe version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2007-2012 the Libav developers
  built on Nov  6 2012 16:51:33 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'somefile.mp4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: isomavc1
    creation_time   : 2012-08-10 15:01:14
  Duration: 00:01:02.55, start: 0.000000, bitrate: 682 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 1904x1040 [PAR 1:1 DAR 119:65], 680 kb/s, 19.18 fps, 20 tbr, 20 tbn, 40 tbc
    Metadata:
      creation_time   : 2012-08-10 15:01:14

To add to Thunar custom action, in relation to what was suggested here, the analog formula to add would be:

gnome-terminal --window-with-profile=new1 -e "avprobe %f"


I suggest you use the Windows Ubuntu Installer (full instructions and download here: http://www.ubuntu.com/download/help/install-ubuntu-with-windows).

This will keep your Windows 7 installation and files safe and will allow you to test Ubuntu by dual-booting.


You cannot have a blank between ppa: and upubuntu-com/icons2. The line must read

sudo add-apt-repository ppa:upubuntu-com/icons2


How do I use Kate's text filter plugin for macros?

Its just a tiny little thing:

Don't use the -i option.

Your command should look like this:

sed 's/"//g'


Ubuntu 18.04 fails to boot even in recovery mode (stuck on loading initial ram disk) on ASUS UX433FA

Solved by following this: Ubuntu 18.04.2 boot stuck on purple screen after updates

The issue was due to an intel microcode update, which behaved badly with ASUS laptops. In short, the fix (for now) is to first add dis_ucode_ldr to the kernel command line. Do this by pressing E while on the grub boot menu and find the line which has something like “ro quiet splash”. Add dis_ucode_ldr at the end of the line. This will let you boot.

Once you boot, run

sudo apt install intel-microcode=3.20180312.0~ubuntu18.04.1

This undoes the problematic update in question and will allow you to boot from now on out (without having to modify grub).


First, there is no need to "downgrade"; multiple simultaneous versions are supported. You can install Java 6, something like

sudo apt-get install openjdk-6-jdk

Then you can do something like (depending on platform)

export INSTALL4J_JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"


You could also use a repository, as described here.

It includes Komodo Edit in Ubuntu in a much better way (accessible from the dash, some other Ubuntu conventions).

sudo add-apt-repository ppa:mystic-mirage/komodo-edit
sudo apt-get update
sudo apt-get install komodo-edit

To complement the Ubuntu experience, activate the Global Menu plugin.


Disable joining multiple windows to one icon in unity panel

The Unity laucher doesn't support such a one icon per window mode.


Battery capacity dropped from 97% to 30%. Is it ubuntu's problem?

There was no problem with Ubuntu, Because it displays only the information what it gets from the battery.

It means that your battery was dying out soon.(99%)

Battery sensors may-be sending wrong Information.


Battery drops from around 40% to 6% on Linux but not Windows

If this is a replacement battery, then it'll be important to cycle the battery in Linux at least once so that the system can identify the new minimum and maximum numbers. To do so, do this in Ubuntu:

Charge the battery to 100%
Let the battery drain all the way to zero. Ignore all the warnings about low battery and make sure the thing is all the way to zero and does an ugly, hard shut-down
Charge the battery to 100% again

This is generally sufficient to give the OS the new min/max numbers for the battery


How to select multiple directories in apache2.conf

To assign global options like Options -Indexes you can insert them in /etc/apache2/mods-enabled/autoindex.conf, or perhaps more elegant: create a file /etc/apache2/conf.d/autoindex with your modifications. Don't forget the IfModule directives before and after your options.


Changing screen resolution on Dell Inspiron

I had a problem with setting the resolution higher on my Dell Inspiron 1000 when I was running Lubuntu. My assumption is that by VGA you mean resolution higher than 640x480.

The fix I found was to set xforcevesa. Now I have 1024x768, 800x600, and 640x480 on Lubuntu 16.04.

If you need help setting xforcevesa see the following.

How to set xforcevesa?

This is what I found in my research that caused me to try xforcevesa.

http://ubuntuforums.org/showthread.php?t=2162336


It doesn't have anything to do with Ubuntu itself - I have a laptop and it runs just fine without any problems.
To solve the problem please share your specifications and share your logs - if you're new with Ubuntu and/or Linux please use Gnome Logs and try to catch if there's any particular log related to overheating - CPU/GPU etc.

What easily could happen is that the hardware you use isn't fully supported and  for example it cannot start system fans if any (MB drivers).

Also instead of TLP you can use other existing tools -you can check this good new Linux user article here.
In this case TLP has to be removed first:

sudo apt-get purge tlp
sudo apt-get purge tlp-rdw

Regardless that try to install Psensor if the laptop gives you enough time.
It will show you what exactly is being overheated.
It will need some dependencies to be installed and configure first as per this article here.

After that please post the results you have.

P.S. I'm a new Linux user too as it's (as Linux in general) way more powerful the W, but with great power comes great responsibility:) As it works differently from W it takes some time to understand it. I had to reinstall it a couple of times when I had simple problems in the past, since that, reading and getting more experience I've solved every single problem without much troubles and spending a lot of time.
Just do not give up so easy it worth the efforts at the end.


How to get script to 'always launch' on device connect?

Answer by OP, removed from the question:

Fixed: I added ENV{SYSTEMD_USER_WANTS}+="myfile.service" into my udev file, and it appears to have fixed the issue. Thanks bac0n for the suggestion.
Also, thanks to everyone else who volunteered their time.
My udev entry:
ACTION=="add", ATTRS{product}=="DTK-2100", ATTRS{idProduct}=="00cc", ATTRS{idVendor}=="056a", TAG+="systemd"

my systemd entry:
[Service]
Type=forking
Restart=no
ExecStart=/home/anon/xsetwacom.sh

[Install]
WantedBy=default.target
WantedBy=sys-devices-pci0000:00-0000:00:1a.2-usb5-5\x2d1-5\x2d1:1.0.device


Ubuntu Desktop certified hardware for Lenovo Laptop "G50-70 Intel Core i3 4010U"

Chances are that if you download Ubuntu and install it on the laptop that it will run just fine.  If you're unsure about dual booting it along with Windows, I would highly recommend installing it as a virtual machine.  Oracle VirtualBox is free and easy to install.  You can then create an Ubuntu virtual machine without worry about "breaking" your laptop or Windows.


The problem is that Google Chrome can't install some of it's proprietary dependencies. You need to go to System Settings, Software & Updates, and check the check boxes to enable the Multiverse and Universe repositories. Then close the window, and you should be asked to update information about the packages. Click Update (or whatever it says) and it will close. Then try to install the .deb file again.


Second display won't work with nvidia drivers

The standard Ubuntu NVidia drivers generate some problems on slightly older and slightly newer NVidia hardware.

If you want more then the standard Ubuntu repository drivers, install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do for now...

If you don't know what a PPA is or need some guidance about rolling forward and backward of driver versions after reading their page, leave a comment below.


Is there an application like the GNOME system settings which is more modular (remove some devices, leave others)?

unity-control-center relys on .desktop files and their commands existence to show UI modules.

That's what I got from tracing it.

strace -o Desktop/trace_control_center.txt unity-control-center

Click on printer then close it
Check for operations: stat,if successful followed by open, itself if successful followed by read

grep -i printer Desktop/trace_control_center.txt

So, Just remove their .desktop file or change its permission:

sudo chmod -r /usr/share/applications/unity-bluetooth-panel.desktop
sudo chmod -r /usr/share/applications/system-config-printer.desktop

BTW, unity-control-center is forked from gnome-control-center, same as unity-settings-daemon from gnome-settings-daemon. You may have both on same system:

sudo chmod -r /usr/share/applications/gnome-bluetooth-panel.desktop

Printer configuration wizard is common.
Or you may instead change commands permission, if you want to disable both GUI/CLI:

sudo chmod -x /usr/bin/system-config-printer


How to separate fields with space or tab in awk

Just change the line to

ls -la >> a.txt ; awk {'print $5 "        " $1'} a.txt ;

this should print the output with spaces.

Hope this helps.

Edit:

As suggested by McNisse you can use printf, which would provide you good output format

ls -la >> a.txt ; awk {'printf ("%5s\t%s\n", $5, $1)'} a.txt ;


Eclipse Java perspective not showing after upgrade to 13.10

It works now. Here's how I fixed it.

Uninstall all eclipse related packages.

sudo apt-get remove eclipse-*

Install again using this answer:

How to completely uninstall eclipse?


Ubuntu 16.04 logout 15 seconds after logging in

Welcome to Ubuntu.
Now, this response from a related question could help.

Similar problem happened to my friend because somehow he corrupted the .Xautority file.

Log into a tty (Control+Alt+F6) and after typing your username and password:

sudo rm -v .Xauthority

.Xauthority file can be found in /home/, which is where the terminal's default working path also usually is. If you use a tty to sign in as one user to delete another's .Xauthority file, make sure you'vecd'd to the right directory first.

Then restart lightdm with:

sudo service lightdm restart

The system will recreate the .Xautority file. Hope it helps.


Is it alright that the nvidia drivers from PPA depend on xserver-xorg-core?

It is alright.

xserver-xorg-core is the service to render your desktop.
xserver-xorg-video-nvidia-410 will provide optimized hardware acceleration for your X Server.

X Server is pre-installed under Ubuntu, if you look at the default packages of Ubuntu 18.04.2.


How do I compile/run C++ code in the console?

conio.h is a library that is windows specific. To my knowledge it comes with mingw32, a compiler that is a windows port of gcc. Try to set up your code so that it doesn't use it.

Also, note that linux uses (99% of the time) the gnu standard library (gnulibc). You can find its content here

For input/output you'd need the iostream (not iostream.h) header file. You can look at a more elaborate and complete list here.


Canon Mx772 printer recognized, drivers loaded...but all print jobs "Held"

I'm using the system-config-printer utility in Linux Mint 17. Click the "+ Add" button. Next, choose "Network Printer". It should display your Canon printer twice, once by cnijet format (e.g. cnijnet:/88-87-17-89-c1-62), and once as "LPD network printer via DNS-SD". Choosing the LPD daemon cleared up this error for me.


Created LDAP User - not found in terminal

If it's saying: "No passwd entry for user 'test'", then you might have to follow the steps in: https://help.ubuntu.com/lts/serverguide/openldap-server.html, under "LDAP Authentication". This is what helped me. You also need to edit /etc/lightdm/lightdm.conf to include the following:

[Seat:*]
allow-guest=false
greeter-hide-users=true
greeter-show-manual-login=true

This should allow part of the option to log in via the Ubuntu login screen.

I'm currently trying to figure out the rest of the process for authenticating through that Ubuntu/LightDM login screen. There's a guide at: https://www.danbishop.org/2015/01/30/ubuntu-14-04-ultimate-server-guide/ That I am trying to follow. But, this is for 14.04, so there may be some changes between that and 16.04.


Empathy crashes when I open the acount manager

I have exactly the same bug. I have also an google account and a facebook one. Empathy working fine but the account manager is automaticaly close when I open it.
I tried to reinstall it with "sudo apt-get install --reinstall empathy" but it doesn't solve the problem.

My conf is Ubuntu 12.04, kernel 3.2.0-55-generic-pae, the system is up to date.

==

I solved the problem :

close Empathy
delete your config
rm -rf .config/Empathy/
delete your keys (stored in gnome keyring)
restart Empathy


Hard disk doesnt show up after a failed ubuntu minimal installation!

i think its because you did'nt complete the installation. when the backlight was off, installation was running backward, you ejected the installtion media and aborted installation. do it again and completely. restart your computer when it commands you, not before.


SSH: Connection refused from windows but NOT from linux

The Original poster found an answer:

I've found the issue: My "Virtualbox host interface" was set with the same IP of the server (don't know why, don't know how, trust me). Switching it to DHCP gave me back all connectivity!!!


audio output to HDMI is not working - Ubuntu 18.04

A solution could be:
    Ubuntu refuses to output audio via HDMI

The steps you described work in other Ubuntu versions and stuff but not in 18.04
So if you don't need the old 18.04 why not updating? I mean that would be the laziest way.


Google Chrome suddenly increased size (see picture)

First , close all instances of Google Chrome.

killall chrome

Open a terminal and run this command

google-chrome --high-dpi-support=1 --force-device-scale-factor=1

Now open again, it would solve the issue.


Cannot install xampp in ubuntu 14.04 LTS

The description and details about .run files are disscused in here What are .run files? the problem in your case is that you should run following commands

chmod 755  xampp.run[or any of your package name]

sudo ./xampp.run
not

chmod 777 -R xampp.run

./xampp.run

see this for more info

you can download your package from one more method

add ppa

sudo add-apt-repository ppa:upubuntu-com/xampp

update

sudo apt-get update

install xampp

sudo apt-get install xampp

check this link for more help

also you should check if you have downloaded a correct file or not according to your hardware configuration like for 64-bit os you have downloaded x64 or i386 file


14.04 upgrade not appearing on update manager

"Upgrade Ubuntu 12.04 LTS to Ubuntu 14.04 LTS
First things first: make sure that you are fully up-to-date. Double check by opening the Update Manager application from the dash and installing all updates listed.

When that’s done, open the Dash again and launch the Terminal application. When it opens click inside the window and type the following command carefully:

sudo update-manager -d

Hit the return/enter key and, if prompted, enter your user password.

The Update Manager application will open after a few seconds with a prompt to upgrade. Click this button to begin the process."

Source http://www.omgubuntu.co.uk/2014/04/upgrade-ubuntu-14-04-12-04


Open a terminal(Ctrl+Alt+t) and do the following:

sudo service mysql stop
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1

and comment out the line record_buffer=64M in /etc/mysql/my.cnf [1]

and then restart msyql using:

sudo service mysql restart

(Source)


Sometimes the + provided on Numpad does not work with certain applocations and if you are using the + provided above the alphabets use ctrl+shift++
The reason for this is + is also used for = :
+ gives =
shift++ gives +


how to keep process from swamping server

If a simple answer that will increase the time it takes to convert your images will suffice, the easy answer to to launch convert using nice for example:

nice -n 19 convert ... (Where ... is the rest of your current convert command) will reduce the priority of the convert program from 20 (the default) to 39

The exact effect of setting a particular niceness value for a process depends on the details of how the scheduler is designed on that implementation of Unix/Linux. A particular operating system's scheduler will also have various heuristics built into it (e.g. to favor processes that are mostly I/O-bound over processes that are CPU-bound).

As a simple example, when two otherwise identical CPU-bound processes are running simultaneously on a single-CPU Linux system, each one's share of the CPU time will be proportional to 20 − p, where p is the process' priority. Thus a process run with nice +15 will receive 25% of the CPU time allocated to a normal-priority process: (20 − 15)/(20 − 0) = 0.25.[2] On the BSD 4.x scheduler, on the other hand, the ratio in the same example is about ten to one.

Sources:

man nice

https://en.wikipedia.org/wiki/Nice_(Unix)


Has Canonical decided to use a rolling release style in Ubuntu 14.04?

No.

  Will the normal 6 months release and 2 year updates continue?

The support period for LTS releases has changed. LTS releases 12.04 and later are now supported for five years on both the desktop and the server, although new releases are still scheduled biannually, and intermediate releases are still scheduled for six months between releases.

Sources:

When will the next LTS version of Ubuntu be released?

http://www.zdnet.com/ubuntu-shuttleworth-and-rolling-releases-7000012503/

Will Ubuntu become rolling distro?


Cant install program using apt-get like virtualbox or cmake

in order to get an effective answer it would be very helpful to know the following about the computer you're talking about:

is it connected to the Internet? Try curl www.google.com in a terminal emulator and see if you get some HTML in your terminal.
Start a terminal emulator (do it by pressing Ctrl + Alt + t). Type
awk '!/^#/ {print;}' /etc/apt/sources.list and hit the enter key. Edit your question above and add the output of the command you've just run.


SeaGate FreeAgent External Hard Drive Keeps Auto-mounting Repeatedly

First of all there's two issues here.  I usually prefer to leave my external hard drives plugged into my computer, then have them mount automatically when I start everything up.  However, there's a function called udev that runs on boot that defines your attached hardware to the hardware abstraction layer.  And it more or less assigns a device identifier based on the order it sees your external hard drives which can change from boot to boot.  Usually the first one it sees it assigns to /dev/sdb1, the second to /dev/sdc1, the third to /dev/sdd1, etc.  If you only had one external hard drive it would always pick up the /dev/sdb1 identifier, and you'd make an /etc/fstab entry to automount it and be done with it.

The key to making sure udev always assigns the same device identifier to the same device is to define a udev rule to do that based on the serial number of the device.  And the way to do that is as root, create a new rule file in /etc/udev/rules.d.  Within that directory create a file called 10-local.rules, (the 10 ensures that it gets executed early on).  Here's what mine looks like:

SUBSYSTEM=="block",SUBSYSTEMS=="usb",ATTRS{serial}=="2GEV4BXH",NAME="usb2"
SUBSYSTEM=="block",SUBSYSTEMS=="usb",ATTRS{serial}=="2GEV4EE6",NAME="usb3"
SUBSYSTEM=="block",SUBSYSTEMS=="usb",ATTRS{serial}=="2GEWMKA0",NAME="usb4"
SUBSYSTEM=="block",SUBSYSTEMS=="usb",ATTRS{serial}=="2GEX10PK",NAME="usb5"

To get the serial numbers, I just read them off the actual hard drive itself.  Each line of the rule basically says, if the device is a block, and a usb, and has a serial number of XXXX, then asign it this name.

Then I know every time I boot, my 4 attached hard drives will always be assigned the same device identifier, /dev/usb2, /dev/usb3, /dev/usb4, /dev/usb5.

Once that's done, it's easy to edit the /etc/fstab file and add the mount commands for the drives, here's relevant lines from mine:

/dev/usb2   /media/usb2 ntfs    rw,auto 0   0
/dev/usb3   /media/usb3 ntfs    rw,auto 0   0
/dev/usb4   /media/usb4 ntfs    rw,auto 0   0
/dev/usb5   /media/usb5 ntfs    rw,auto 0   0

And when my system boots, everything is in the right place, mounted and ready to use...

woodwose@woodwose-server:~$ df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda1              72G   28G   40G  41% /
none                  493M  436K  493M   1% /dev
none                  497M  1.1M  496M   1% /dev/shm
none                  497M  340K  497M   1% /var/run
none                  497M     0  497M   0% /var/lock
none                  497M     0  497M   0% /lib/init/rw
/dev/usb4             1.4T 1023G  375G  74% /media/usb4
/dev/usb2             1.4T  1.1T  300G  79% /media/usb2
/dev/usb5             1.4T  1.3T   73G  95% /media/usb5
/dev/usb3             1.4T  1.3T   93G  94% /media/usb3

The order in which these usb devices are listed changes, because there's no guarantee that OS is going to find them in the same order every time, but since you control what device identifier is assigned to each device based on something that doesn't change, ie the serial number of the device, you can always automount the same device to the same mount point on startup.

And since your smb shares are based on the mount point, you also manage to share out the same files on the same share names consistently as well.

I hope that helps you.


Understanding setup.py arguments and how to launch when installed

Not all applications create a desktop launcher.

Setup routines usually install the application (command to start the application) into a directory that is in the user's search path by default.  The most common areas are the one you mentioned, /usr/bin as well as, /usr/local/bin.

Programs installed in those paths are command line launchers to tart the program.  It can usually be identified by the actual name itself.

You mentioned that you are not fluent with building and installing Linux programs.  So with that as a consideration, you'd best not try to customize the installation, but install it with its defaults.

In this case, looking at the description of your question the install package does have some safeguard flags and is warning you not to change the configuration files to put the launch command in an area not in your search path.

Install the application without changes by its defaults.  Look at the Readme file, which will include install procedures as well as (normally) steps on how to start the application.

Look in the two most command directories for commands /usr/bin and /usr/local/bin`.  You can view the most recent additions to those areas with this command (the most recent will be on top).  Look for commands closer to the time of the installation.

$ ls -lt /usr/bin | less
$ ls -lt /usr/local/bin | less

Less is a pager that will allow you to use the arrow keys to scroll up and down to view the contents of those two directories.  The ls -lt will give a detailed list including the time of the creation sorted by time with the most recent on top.

If you install the program and don't get any errors, you'll find the commands there.

Search those areas the same way you have already familiarized yourself with checking the /usr/share/applications space for program launchers.

The commands you see in that listing can be executed just by typing the command in the terminal.

Creating a desktop launcher

You can create your own desktop launcher for the program by running this command:

$ gnome-desktop-item-edit --create-new ~/Desktop

After you have created the launcher, place the new launcher in either /usr/share/applications or ~/.local/share/applications.  It will then appear in your Ubuntu search button.


Are there consequences to running 'sudo chmod u+s /sbin/shutdown'

Adding the setuid bit to the shutdown process will allow any process owned by any user ID to shutdown or restart the system with arbitrary delays.

While unlikely, it may also expose buffer overflows that allow unprivileged users to do more than this.  With the setuid bit set, there is a possibility that the command can be invoked with input that causes the command to malfunction in a way useful to an attacker.

Even if you have a single user system, this can be a concern: if an attacker uses an exploit that allows them to run unprivileged code on your system, then setuid programs can provide a way to gain superuser privileges.

In contrast, the API used by the desktop provides much more limited actions (restart now, shutdown now, etc), and only allows unprivileged users to activate them in limited circumstances (user is an active local user, and there are no others logged into the system).  If the application you're using has an option to use these APIs instead of directly invoking the shutdown command, that would be preferable.


On awake the unlocked desktop shows for a blink moment

OS: Ubuntu 19.10

I could reproduce the issue in the below case.

if the file /etc/systemd/logind.conf is untouched and the gsettings values are also untouched

gsettings list-recursively | grep "ac-action \|e-battery-action '"

org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend'
org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'

Workaround:

edit the file /etc/systemd/logind.conf and change the line
#HandleLidSwitch=..... to HandleLidSwitch=lock

not sure reboot is required or this command systemctl restart systemd-logind.service. I did reboot and works as intended.

Reference:

http://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/

http://manpages.ubuntu.com/manpages/eoan/man5/logind.conf.5.html

some of the content from above link

   HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=,
   HandleLidSwitchExternalPower=, HandleLidSwitchDocked=
       Controls how logind shall handle the system power and sleep keys and the lid switch to
       trigger actions such as system power-off or suspend. Can be one of "ignore",
       "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep",
       "suspend-then-hibernate", and "lock".