Have a look at hdparm.
From the manual (man hdparm on the command line):

-S Set the standby (spindown) timeout for the drive. This value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker.
The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values.

So sudo hdparm -I /dev/sdb | grep level will show the current spindown value, for example:
Advanced power management level: 254

From the manual: 254 is reserved so I expect it to be Ubuntu's default (can anyone confirm/expand on this please?)
Example:
sudo hdparm -S 25 /dev/sdb = spindown after 25*5 seconds.
sudo hdparm -S 245 /dev/sdb = spindown after (245-240)*30 minutes.


Ubuntu doesn't detect a second core of your Pentium 4 CPU because Pentium 4 processors are single core CPUs only, not dual core CPUs. According to the Wikipedia Pentium 4 article:

  Pentium 4 is a line of single-core desktop, laptop and entry level server central processing units (CPUs) introduced by Intel on November 20, 2000 and shipped through August 8, 2008.

The dual core variant of the Pentium 4 "Prescott" processor manufactured by Intel from 2005 to 2008 was called the Pentium D.


Critical battery action gracefully shutdowns instead of hibernating

Enabling the hibernate seems to solve the issue. The solution can be found here at ubuntuhandbook.


Open google.com using localhost:port combination

You can achieve this with SSH feature of remote port forwarding: ssh -R <site_address>:<site_port>:localhost:<local_port> <VPN_host_address> this will cause, than any invocation to localhost:<local_port> will lead you over <VPN_host_address> to <site_address>:<site_port>.


I don't know the answer to this exact question, but to know wich files did a package install you can use this command:

dpkg -L <package name>

The best thing is that you can use tab completion with it so:

dpkg -L subli<tab>

is likely to give you the answer.

You can also use Synaptic to find this list through a GUI.


Would Ubuntu be installed with the current language of Windows 7?

The language which Ubuntu is installed in is selected during the installation process and is not related to the language in which Windows is installed on that machine. It can also be changed after the installation process (which is not true of Windows generally).

Google does not have a Picasa app for Ubuntu, however there are many similar image management programs available in the "software centre" in Ubuntu. The pictures on your computer in Windows will be accessible from Ubuntu if you install Ubuntu alongside Windows. You will of course still be able to manage your Picasa photos online in Google+ if you do that currently.


I cannot ping freenode.net by any means from my desktop

This is probably a problem with DNS.

Run this command to temporarily fix it if that is the case

echo "nameserver 8.8.8.8" > /etc/resolv.conf


How can I show the date a file or folder was created?

There is no creation time for a file. It isn't stored anywhere. Files have a last-modified time and last-accessed time that can be presented in the files manager.
There is though an inode change time that is often referred to as the "creation time" but that's not accurate as some activities (like backup) will modify this date.


amd64-microcode installation during the latest 16.04 updates

It's a new dependency of linux-image-generic. See
https://bugs.launchpad.net/ubuntu/+source/linux-meta/+bug/1738259.


I am getting the same error everytime I try to boot Ubuntu on VirtualBox

For me the problem occurred when running the VM with VBoxManage, and the fix was that I had forgotten to specify --type headless on the command line.


First try and upgrade Ubuntu to the latest version by running the following command:

sudo do-release-upgrade

and then we update everything else:

sudo apt-get update

Now reinstall the Ubuntu Desktop:

sudo apt-get install ubuntu-desktop


Use apturl instead of Software Center for apt: links

I've found a solution: Just executed xdg-mime default apturl.desktop x-scheme-handler/apt and the problem was solved.


MBR accidentally deleted , how to restore partition

Boot from a live system, and use the gpart utility to scan for file systems.


Is there an easy way to watch Blu-ray in Ubuntu 16.04?

Commercial DVDs and Blu-ray discs are DRM protected.

DVD discs work well but Blu-rays are a bit difficult.

The free VLC media player can play DVDs on Linux, but it requires a special library known as libdvdcss. This library effectively breaks the CSS encryption on DVDs, allowing you to watch them.

Press

Ctrl + Alt + T

The terminal opens

Now in the terminal type:

sudo su
apt-get install libdvd-pkg

Follow on screen instructions to complete the installations

Then type

apt-get install vlc browser-plugin-vlc

Close terminal.

You can now open VLC and attempt to open a Blu-ray disc. Click the “Media” menu, select “Open Disc,” and select “Blu-ray.” Leave the “No disc menus” option checked.

If you see error follow the next steps:

Type in terminal

add-apt-repository ppa:heyarje/makemkv-beta
apt-get update
apt-get install makemkv-bin makemkv-oss

Open the MakeMKV application from your menu, select your Blu-ray disc drive, and click the “Stream” icon on the toolbar. You’ll be given a local address.

Open VLC, click the “Media” menu, click “Open Network Stream,” and provide that address. It will look similar to the following address:

http://localhost:51000/stream/title0.ts

The main movie is usually either “title0” or “title1”–choose the one that looks larger in MakeMKV.

MakeMKV will decode the Blu-ray video and stream it to VLC. VLC plays the video, but MakeMKV is doing the main workload in background.

Option 2:

Use MKV to rip blue ray disk to hard drive with encryption removed.

Select mkv from dash menu and start it

Insert your disk.

Disk analysis will take place automatically, wait for the process to be completed.

Click on the first icon of top menu saying open files and select your disk from Nautilus file manager

Select your movie title from here

Click on MakeMKV and select the rip location on your hard drive

It will take some time to finish. After that one or more MKV files will be produced.

Now play them with VLC media player.


Copy firefox/thunderbird config directories from Ubuntu 12.04 to Xubuntu 16.04

Yes! You should be able to copy files/folders from your Home folder from Ubuntu to Xubuntu without any issues. Firefox and Thunderbird profiles should work fine since both Ubuntu and Xubuntu use the same version (or at least very close to the same version).

For other folders, especially the hidden ones, it should be fine to copy them over as well. You might want to be careful about overwriting existing files/folders since Xubuntu may have some differences in configuration.

As always, it is recommended to back up your home folder before install/reinstalling OSes.


Ubuntu 16.04 won't boot: stuck on black screen with dev/sda1: clean, ../.. files, ../.. blocks

I am afraid that this is a problem with the 16.04 LTS Hardware support.
Ubuntu 16.04 LTS (Xenial Xerus) was released in 2016 and support is officially given until April 2021. However on this older LTS kernels there are only safety relevant upgrades and minimum maintainence done. Also HW support for newer HW is limited.
May I know why you not update to newer version of Ubuntu?
Currently you would be able to go to 18.04 (Bionic Beaver) or you stay on the previous kernel version .173 you used a bit longer and change to with
brand new 20.04 (Focal Fossa) after release:

https://upload.wikimedia.org/wikipedia/en/timeline/38cea234e4bed0ccfff76511d6f72782.png

My proposal:

a) stay on 4.4.xx.173 and leave it for now. (changes in .174 are minor)

b) consider a Distribution upgrade
download a newer Ubuntu version (f.e. 18.04 LTS) , create a USB Starter and try it.
If everything works and you like it, then upgrade your system.
MAKE SURE YOU BACKUP ALL BEFORE
Also 2 options:
- Direct install from Pendrive
  + you get a clean new system with all the newest X Environments and settings
  - You will loose many former settings but your Home directory Data should be preserved

Upgrade inside your running system with

apt-get dist-upgrade
or the Ubuntu way
sudo do-release-upgrade

That way many of your settings and Windowmanager aso is preserved...but sometimes it creates conflicts

Hope that helps you


Extract data from pdf form (or other Base format) to import to Libre Base database?

There's no easy solution for this. Generally, pdftk is able to extract the form data out of a PDF form to a fdf file. But AFAIK there's no tool to import that data into LO Base. You will have to manually convert the fdf to csv, for example, so LO Base can access the data.


Ubuntu 14.04 LTS screen freezing frequently

Perhaps X server may choose incorrect driver for your computer.

If the current version of Xorg that you use supports your computer, you need to try manually change the driver via a file, /etc/X11/xorg.conf.d/xorg.conf.
This file describes  Xorg server configurations.

Please create the xorg.conf file with following contents.

Section "Device"
    Identifier "Configured Video Device"
    Driver "vesa"
EndSection

And then you can reboot so check your screen again.

If it's failed, you can modify "vesa" to "fbdev" or "intel" at xorg.conf and then retry.

Why do I recommend vesa, fbdev, intel? Because they are compatible drivers for the Intel graphics card.

In other case, X driver may be updated.
So you may need to run

apt-get update
apt-get upgrade

And then reboot again.
Also, you can check that your PC is certificated by Ubuntu Desktop with following url.
http://www.ubuntu.com/certification/desktop/
At there, you can lookup for your PC.

Note:

If you use vesa and fbdev, direct dendering may be disabled.

If you still cannot solve your problem, please visit

https://launchpad.net/xorg

and report this problem as a bug. Xorg developers will offer more technical support.

As normally, the X run on tty7. If X crashed or could not reply with black screen, you can switch to the tty1~6 with Ctrl + Alt + 1~6.
And there are many text editors in Ubuntu like nano, vim and so on.

Also there are some solutions that may help you due to visit following urls.
http://ubuntuforums.org/showthread.php?t=935756
https://wiki.ubuntu.com/X/Troubleshooting/Freeze


In my case I upgraded python3.5 to python3.6.

For that workaround run xterm. Then run the following two commands:

sudo rm /usr/bin/python3

sudo ln -s python3.5 /usr/bin/python3


How can I display the rest of a file starting from a matching line?

If you don't particularly need grep, you could use sed or awk for this:
sed -n '/show/,$p' text.txt
awk '/show/ {display=1} display {print}' text.txt

sed usually outputs all lines, but -n prevents that.
/show/,$ is a line-range starting at the first line matching the regular expression show and ending at the last line ($).
The print (p) command prints that line-range.
awk uses sequences of condition { action } pairs (usually on separate lines for readability), so /show/ is the condition that matches the regular expression show anywhere in an input line, and display=1 defines a variable named display to 1.
Obviously condition display is a short form for display != 0, and print does what everyone expects, i.e.: print the input line.


Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.57.214.140|:443... failed

if you are using proxy, try to add -E before apt-get and it will force  environment to use proxy:

sudo -E apt-get install oracle-java7-installer


Wi-Fi problem with Ubuntu 16.04 on Lenovo G50—45

Please download this file on some other computer and transfer it on a USB key or similar: http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.158_all.deb

Drag and drop it to the desktop of your Lenovo. Open a terminal and do:

cd ~/Desktop
sudo dpkg -i linux-firmware*.deb

Reboot and let us know if it is now working.


Infinite login loop after upgrading from 15.10 to 16.04

The proprietary driver does not start with Secure Boot on.

You can fix it by running

sudo apt install mokutil
sudo mokutil --disable-validation


Is it reasonable to try and fix these kernel boot lags?

Note: You're using an unsupported kernel. 4.19 is known to corrupt file systems. Put the standard kernel back.

From what little log detail that you left for us to review, it looks like you might be getting NCQ errors on your disk. You might look at this more closely to see if there are a bunch more NCQ errors...

sudo grep -i ncq /var/log/syslog* # search for NCQ errors

If you find a bunch, then...

sudo -H gedit /etc/default/grub # edit the grub settings

Find the line near the top that says "quiet splash", and change it to read...

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

Save the file and then...

sudo update-grub # update grub files

reboot # reboot the computer


14.04 Lubuntu install randomly loses wired Internet connection

you said you hooked up a laptop to the same cable/port etc but you were not using the same ethernet hw that you have in what I assume is a desktop?

Rebooting your PC also reinitializes the hw in the PC including the ethernet port.

Before you assume its Lubuntu... why don't you boot up a "liveCD" of ubuntu or lubuntu etc on the PC and see if it then works.   If you still have network problems then you might have to assume its the ethernet card/hw in the PC causing your problems.

If it is a desktop PC, if the ethernet is an add-in card .. maybe it got knocked loose in the move and isn't seated correctly?


By default, Linux reserves 5% of the space for root. The reason is that root should be able to log in, and have space to fix issues even when the disk is full.

This can be changed with tune2fs.

Unmount your disk, and run

sudo tune2fs -m 0 /dev/sdc1

This will set the amount of reserved blocks to 0%, which is totally fine for a non-system disk.

From the manpage of tune2fs:

  -m reserved-blocks-percentage

          Set the percentage of the filesystem which may only be allocated
          by  privileged  processes.   Reserving some number of filesystem
          blocks for use by privileged processes is done to avoid filesys-
          tem  fragmentation,  and  to  allow system daemons, such as sys-
          logd(8), to continue to function correctly after  non-privileged
          processes  are  prevented  from writing to the filesystem.  Nor-
          mally, the default percentage of reserved blocks is 5%.

In addition, some space will be used for journal. This should not be changed.


This should work and you can find instructions on how to assign files and create a desktop launcher here

Download Packet Tracer 7 from NetAcad

Open a terminal (Ctrl + Alt + t) and extract the tar file :

$ cd ~/Downloads
$ tar xzvf PacketTracer70_64bit_linux.tar.gz

Start the installation :

$ sudo ~/Downloads/PacketTracer70/./install

You will be ask to accept the terms and select a location to install (press ‘Enter’ to select the default location /opt/pt )

You can launch PT7 by typing ‘packettracer’ in a terminal

Delete the installation files :

$ sudo rm -rf ~/Downloads/{PacketTracer70,PacketTracer70_64bit_linux.tar.gz}


If this is truly a burned CD/DVD disk from the year 2000 you most likely are experiencing data degradation from the media. I have disks that were kept in clear cases on the shelf for a couple years. Just the small amount of sunlight that got onto the disks was enough to alter the ink (the ink reacts to UV light after all, that's how the initial data was written to disk) and render the disks unreadable. And that was after just 7 years.

If you value the data on the disks, you will most likely want to to back these up right away.

My personal recommendation is to use ddrescue (Stackexchange Link) to try to make a disk image you could potentially re-burn onto another DVD (use a slow write speed if this is for long storage! But I don't recommend using DVDs for storing valuable data!).


I believe the problem is caused by your application name.  Right now, this should be of the form <appname>.<username>.  <appname> can be whatever you like ("additives" is perfectly fine), while <username> is your "developer namespace" on developer.ubuntu.com.  (This page should list it.)  Remember, this value must be the same in the manifest file and as the applicationName in the main QML file.

I find it rather odd that they let you submit an app with these values set incorrectly.  I'll investigate and report a bug if appropriate.


Disk Size Issue after raid 10 to raid 5 Migration using mdadm

There are multiple layers of (virtual) device. All of them need to resize:

physical (cannot change)
mdadm (mdadm --grow /dev/md0 --size=max)
file system (resize2fs /dev/md0)

(you don't use lvm, but that would be another layer)

if you only resize the file system, it still sees the old size of the raid volume, so you have to do the mdadm call first. or more general: go through all layers.

But there's another thing: I see that your setup has 3 devices, but your previous raid 10 (if properly used) likely had 4 devices. So, where is your 4th device?

3 devices of 10T with raid 5 make (3-1)x10T=20T
4 devices would be (4-1)x10T=30T


How does bumblebee optirun actually work?

optirun is an abstraction for VirtualGL. This runs a headless X screen with your Nvidia card and renders the application on that screen. The result is copied over to your visible screen. VGL also allows you to send the result over a network which is pretty cool.

Everything that isn't being optirun'd is directly rendered through your Intel device. That includes the desktop (by default - I'm certain you could hack everything to be optirun if you really wanted - but I wouldn't recommend it).


This sounds like corrupted USB image, maybe you can try to dd it again or to download it again.

Also, it may be bad hardware, try to run Live session Ubuntu from USB to try it out.


It turns out that as I was messing around with getting the machine to load (due to Virtualization technologies being disabled), I clicked one too many items on the image settings page.

To fix this, go to the "Settings" page for the virtual machine, and click "System". Under the "motherboard" options, be sure that "Enable EFI (special OSes only)" is unchecked. Then click "OK", and try to boot the machine again. The option that was checked is basically how you get into the EFI Interface.


I'd recommend the Google Contacts add-on for Thunderbird

  Access bi-directionaly to Google
  contacts via address books. This
  extension detects gmail accounts which
  have already set up and creates
  address books for each of them. Cards
  in the address books are synchronized
  with Google contacts; they represent
  the current Google contacts contents
  and Google contacts will be modified
  when you modify the cards. TB's
  mailing lists and Google's contacts
  groups are synchronized in the same
  manner.

For more information, click this link.


Skype-call-recorder keeps showing up legal information

This is easy.
Just edit ~/.skypecallrecorder.rc.
Change

suppress.legalinformation = no

to

suppress.legalinformation = yes


how to play games using bumblebee + wine 1.5

cd to the game dir, then try

optirun wine speed.exe

or

optirun bash
wine speed.exe


That depends on your raid controller supporting Linux.

Mine does. It's a "FakeRAID" solution; one that offloads most of the work to the CPU. It's supported by a project called dmraid. To allow installation on it, all I had to do was boot to the live CD, opt for the "Try Ubuntu" option, sudo apt-get install dmraid and then run the installer.

You're asking about the alternate CD. I've honestly no idea how to approach things that way with regards to FakeRAID and I don't even know if your controller is FakeRAID because you haven't included any information. If it's some sort of on-motherboard solution it probably is. Just get the Live CD and do things the standard way.


How to delete the word "Applications" in the task bar, in the top left corner

If you have "applications menu" extension installed. You can disable it from gnome-tweaks under extensions menu.
The default button is called "Activities" (should be there after disabling applications menu extension) you can hide it by installing Hide activities button extension.


I deleted Ubuntu and accidentally deleted Grub with it. Other OS's aren't booting now. How do I fix this?

Install Ubuntu again using bootable USB.

Check this link or link


EFI Dual-boot issue with Windows 7 and xubuntu 12.10

Your GRUB configuration is set up for booting Windows in BIOS mode, but this won't work because you've clearly got an EFI-mode installation of Windows. There are a number of possible solutions. Here are a couple....

First, you could edit the file called /etc/grub.d/40_custom and add an entry like this:

menuentry "Windows 7 (custom)" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt3)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi.grb
}

Then type sudo update-grub. With any luck that will create a new GRUB entry called "Windows 7 (custom)" that should work. This isn't guaranteed, though; GRUB is pretty finicky and flaky about launching Windows. What works on one system may not work on another. You'll also probably continue to have the non-functional entry in the GRUB menu.

A second option is to install rEFInd, which is an alternative to GRUB. If you install it via the Debian package, it should set itself up automatically and launch the next time you boot; however, the Windows icon in its menu will probably launch GRUB, thanks to the way the Boot Repair tool "fixed" things. To fix this problem, you can type the following commands in Ubuntu:

cd /boot/efi/EFI/Microsoft/Boot/
cp bootmgfw.efi.grb bootmgfw.efi

Thereafter, the Windows entry should boot Windows. You'll also have an entry with an Ubuntu icon that will boot GRUB and one or more Linux penguin icons that will launch Ubuntu directly. If the penguin icons work to your satisfaction and you don't want the GRUB icon any more, you can remove it by deleting the /boot/efi/EFI/ubuntu directory or by editing /boot/efi/EFI/refind/refind.conf, uncommenting the dont_scan_dirs or dont_scan_files line, and adding entries to them to keep GRUB out of the menu.


How to change login screen sddm on KDE Plasma 5

1 Alternative SDDM greeter themes

Ubuntu Packages: https://packages.ubuntu.com/search?keywords=sddm-theme&searchon=names&suite=all&section=all

1) Install package from your package manager.
An example with the apt-get and the theme sddm-theme-circles:

sudo apt-get install sddm-theme-circles

2) Change the theme from the KDE SDDM control module
KDE System Settings > Startup and Shutdown > Login Screen (SDDM)

KDE Store

With the plasma 5.8 or older: Browse to the https://store.kde.org/browse/cat/101/ read the installation notes and download the wanted package. Install as told in the installation notes. Test as told in the https://github.com/sddm/sddm/wiki/Theming . Enable from the KDE SDDM control module.

With the plasma 5.9 or newer: Use the KDE SDDM control module.

Other sources

i.e: https://www.reddit.com/r/sddm_themes/

Read the installation notes. Usually:

1) Download archive.

2) Read notes.

3) Extract archive to the /usr/share/sddm/themes/

4) Test the theme ( https://github.com/sddm/sddm/wiki/Theming ) with the command:

sddm-greeter --theme /path/to/you/theme

5) Enable the theme from the KDE settings.

Making and editing SDDM themes

Theming explained at: https://github.com/sddm/sddm/wiki/Theming

2 Alternative Plasma Splash screens

Plasma splash screen is a short qml script. The plasma splash is part of the plasma look and feel theme or with the plasma 5.13 it is possible to install the splash screens from the KDE System settings:

A bug report: Bug 358839 - Splash screen not easily customizable from the splash screen settings menu. - https://bugs.kde.org/show_bug.cgi?id=358839

and a fix: https://phabricator.kde.org/D11919

The plasma splash screens are downloaded from the KDE Store: https://store.kde.org/browse/cat/488/ord/latest/


Why does trash show some files even when there is nothing in it?

Try checking as root:

gksudo nautilus

What is in the Trash folder.


So I could solve it by doing 2 things:

Enable fingerprint authentication
Re-enroll very carefully

Here are the steps:

Enable fingerprint authentication

sudo pam-auth-update

and enabling Fingerprint authentication

Among other things (enabled fingerprint for sudo and al), what it did is makes it more verbose messages. It showed me in the login screen that my fingerprint wasn't properly recognized.

Re-Enroll fingerprints

So I let my hands under water 20-30 seconds to make the finger skin more soft and better fingerprint quality, then I re-enrolled very carefully and slowly.

Now everything works well (I occasionally need to humidify my finger with a wet towel or dip my finger in my glass of water :D ).


Finding directories inside a folder and deleting if smaller than a certain size?

If we're talking about directory size, I'm not sure find is going to help. du is going to have to be involved at some point.

Here's something I have written to find near directories under 30M:

du --max-depth 1 | awk -v q='"' '$1 < 30000000 && $2 != "." {sub(/^[0-9\t ]+/, "", $0); print q $0 q}'

You can then chain that into xargs rm -rf but I would test it very seriously before doing that. You might want to move the directories (with mv) instead of straight-up deleting them.


Problem installing mysql, error in post-installation script

The best way to diagnose this issue is to look in /var/log/mysql/error.log

That should show you the reason that MySQL failed to start. If you can fix the problem, try:

dpkg --configure -a

To finish installing your packages.

If you can't fix it you should be able to remove mysql completely with

apt-get purge mysql-server-5.1


How to change Date & Time format with Lubuntu

There is a very simple to understand "How To" that is posted in Lubuntu Community Help wiki.  The lubuntu date / time display is very adaptable. https://help.ubuntu.com/community/Lubuntu/Documentation/CustomizingTheClock


Move the menus to their window menu bars

I found a way to do that:

Right click on the panel where the 'indicator plugin' is displayed
Panel
Panel Preferences
Choose the items tab
Select 'indicator plugin'
click the settings wheel on the right side or double click the 'indicator plugin' line
Check the hidden checkbox in front of 'Application Menus (Global Menu)'
Close

You have to log out and log back to make it work.


installation of driver permission denied

There can be two problems here, you could need superuser rights to be able to execute the file and the file should have execute permissions. So try:

chmod u+x ati-driver-installer-11-x86.x86_64.run
sudo ./ati-driver-installer-11-x86.x86_64.run

Both command should be run after cding to Downloads.

You can also assign execute permissions using the GUI. Rigth click the file and select properties. In the new window go to the permission, you should be able to change it from there.


Launch an app as soon as Desktop environment is launched

Open "System Settings" and then click on "Startup and Shutdown" under "Workspace". There you should be able to add applications or scripts to be started on login.


What scientific plotting software is available?

I am a Physics student and found that the best scientific plotting software for Ubuntu is QtiPlot. It is very similar to Origin, and works really well.


How to jail a specific user to a specific directory?

Yes, it is possible, the chroot is done on the user home directory. It then depends on which ftpd server you use. For example, for proftpd: UserDirRoot directive and DefaultRoot directive


Is there any way to downgrade or revert an update to the kernel?

The old kernel should still be installed unless you manually removed it. On the Grub screen there should be an option to view old kernels and boot using them. If you're able to successfully boot using an old kernel you can then file a bug report and work on figuring out what went wrong. Or you can uninstall the new one and then run:

update-grub

To make Grub rescan the available kernels. That should return everything to before the kernel update, if not comment and I'll update with something more drastic.


You can find the particular release you need here

https://nodejs.org/dist/

a given release dir typically lists these :

node-v0.10.15-darwin-x64.tar.gz                    25-Jul-2013 23:59
node-v0.10.15-darwin-x86.tar.gz                    25-Jul-2013 23:59
node-v0.10.15-linux-arm-pi.tar.gz                  12-Aug-2013 20:52
node-v0.10.15-linux-x64.tar.gz                     25-Jul-2013 23:59
node-v0.10.15-sunos-x64.tar.gz                     25-Jul-2013 23:59
node-v0.10.15-sunos-x86.tar.gz                     25-Jul-2013 23:59
node-v0.10.15-x86.msi                              25-Jul-2013 23:59
node-v0.10.15.pkg                                  25-Jul-2013 23:59
node-v0.10.15.tar.gz                               25-Jul-2013 23:59

notice various OS specific pre-compiled versions and the source code :

node-v0.10.15.tar.gz

which mentions no OS ... pick either way (binary or source) ... either way you will need to setup environment variables

today let's compile the source code ... expand tarball :

tar xvf node-v0.10.15.tar.gz
cd node-v0.10.15

before compiling do you want to use sudo to install npm packages later ... or do you prefer to avoid being root and just issue commands as yourself ... if yourself then this works :

# export NODE_PARENT=/usr/local/bin/nodejs  # use this ONLY if you MUST install as root (sudo)
export NODE_PARENT=${HOME}/node-v5.0.0      # Recommended - owned by you NOT root

either way you need these two as well

export PATH=${NODE_PARENT}/bin:${PATH}
export NODE_PATH=${NODE_PARENT}/lib/node_modules

now once above env vars are defined and active in current shell issue

./configure --prefix=${NODE_PARENT}
make
make install

Done ... verify by issuing

node --version


The idea is to use KSnapshot to pick the code from the screen, then run some utility on the captured image to decode it and finally place it in clipboard. Here is how:

install these utilities: xclip, zbarimg, dmtxread They can be found in the following packages:

$ sudo apt-get install xclip zbar-tools libdmtx-utils

These commands are used do the following:

xclip - insert text into the x clipboard
zbarimg - decodes bar code and QR codes to text
dmtxread - decodes data matrix codes

Create an executable bash file with this content:

#!/bin/bash
(zbarimg -q --raw $@ || dmtxread $@) | xclip -i

Save it in your home bin folder: ~/bin/codetoxclip

To make the file executable, run:

$ chmod -a+x ~/bin/codetoxclip

Now you'll want to test this script with some pictures first:

$ ~/bin/codetoxclip MyQR.png
$ xclip -o

You should see the decoded text on the console

Now go open your KSnapshot (should be under the print screen key), take a rectangular snap of some code (higher resolution is better, use zoom when necessary) and then click [Send to...] / Other application...

Here in the dialog, locate the script you created (~/bin/codetoxclip). It is handy to tick the  "Remember application association..." checkbox so you don't have to do this step again. Next time you'll pick the script from the [Send to...] menu.

And that's it. Your code should be decoded to your clipboard, paste it wherever you feel like!


how do I uninstall old kernel options listed in Grub2?

The best way, IMO, is to remove old kernels you do not use. You should always keep at least one old, working kernel "just in case".

You can remove old kernels from the software center, synaptic, or the command line.

You can also remove them with ubuntu-tweak

sudo apt-get install ubuntu-tweak

Run ubuntu-tweak, and

Select "Package Cleaner" on the left and ""Clean Kernel" from the right panel.
Press the "Unlock" button at the lower right, enter your password.
Select from the displayed list the kernel images and headers you wish to remove. The kernel in use is not listed.
Press the "Cleanup" button at the lower right to remove the selected kernel images and headers.

source: http://ubuntuforums.org/showpost.php?p=9920974&postcount=1

Or if you want a geeky command

Dry run

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get --dry-run remove

If the package list looks "good to go" (no pun intended =) )

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge

Detailed explanation of those commands

If you do not remove them, and elect to edit grub, the old kernel will be added back with kernel (grub) updates.


You need to stop the systemd user socket.

systemctl --user stop pulseaudio.socket

systemctl --user stop pulseaudio.service

You can also use the disable, enable, reload, and restart commands as well.
That should stop pulseaudio from respawning until you start it back up.
Hope that helps


How can I configure an Epsom XP-300 printer on Ubuntu?

Try installing the drivers. I had to jump through hoops to get my XP-400 to work properly, but I did not have these drivers at the time.

Download Printer Driver  ESC/P Driver (full feature)

Download Printer Driver  ESC/P-R Driver (generic driver)

Download Scanner Driver  core package&data package

If these links fail, just go to Download drivers and Software and search for XP-300.

If there are still issues, there is a good FAQ here to help you start debugging.
database/cupsfaq


How to print via text-editor (like mousepad) from the command-line?

The abiword man pages say you can print from the cli

abiword --to=ps --to-name=fd://1 FILENAME | lp

I'm not sure if it works headless though. I don't have a printer setup to test

A further look into the cammand shows abiword is converting the file to ps format saving it to a temporary file and piping it to the lp command.

lp: lp submits files for printing or alters a pending job.  Use a filename of "-" to force printing from the standard input.


Found a solution: I just rename the .git folder to another name and remove it.


While ubuntu is suspended, my computer continues to run and use excessive battery power

Because your notebooks cooling fan won't run after you suspend your system and your it's continuously running(only the RAM consumes power of course) so it will not be able get the heat out of box


Yes ufw is a command-line tool and gufw is the GUI version.
Use the command:

sudo ufw enable

to enable the default firewall settings. This is set to deny incoming and allow out.

To make things easy, gufw allows you to make rules that allow or deny certain services etc. and is a frontend to ufw.

sudo apt-get update
sudo apt-get install gufw

Yes, you should update the apt-get list in case there has been a security update since the last update. This way, you do not install and use an unstable or otherwise unsafe application.


UAC1 DAC (ODAC): digital vs analog output

As discussed in What does USB DAC "Analog Output" mean?, I suspect that Analog Output means that the OS will first pass the digital stream to the inbuilt, computer DAC device (i.e. sound card), and then the analog stream will be passed on to the USB device for amplification and further to your headphones/speakers. The improvement in quality (versus the computer DAC) will be minimal, and will come only from the external DAC amplifier.

Digital Output means tha the OS fiddles not with the digital stream and passes it directly to the external DAC device for conversion to analog, amplification, and then to your headphones/speakers. The quality should be much better, and will depend on the quality of the external DAC (since the inbuilt DAC will be completely bypassed).

So for best quality you would choose the Digital Output port.

See also:

How can I enable digital output on a FiiO E7 without ending session?.


How do I fix some broken thumbnail preview settings in Nautilus?

Revert what the script did

sudo gconftool-2 --unset /desktop/gnome/thumbnailers/image@vnd.adobe.photoshop/enable
sudo gconftool-2 --unset /desktop/gnome/thumbnailers/image@vnd.adobe.photoshop/command
sudo rm -f /usr/lib/psdthumbnailer /usr/share/thumbnailers/photoshop.thumbnailer
## Optionnal, you may want to keep ImageMagick
## sudo apt-get remove --purge imagemagick

If needed, here is how to clean the Thumbnails cache
Thumbnails will be re-ceated while browsing directories

rm -rf ~/.cache/thumbnails/*

Install the Ubuntu PSD thumbnailer

sudo apt install librsvg2-common

More information:
https://packages.ubuntu.com/bionic/librsvg2-common


How to open a file as you type out its directory?

You can do this:

xdg-open ~/Pictures/Wallpapers/test\ x/armored.jpg

cd means change directory so essentially terminal is expecting a path-to-directory where you want to change to.

xdg-open opens a file in default applications but as it opens a file it expects path-to-file, you can also use xdg-open to open directory in nautilus(if it is your default file manager) in GUI.


How do I fix the MBR of a dual boot between Ubuntu 12.10 and Windows 7?

Please add your windows entry from grub.cfg, using grub is always the recommended way.
I would recommend not exploring booting grub from windows loader.


Typically, booting an OS on another architecture/different hardware setup is not recommended. Once you install your OS on your SSD and plug in your HDD, grubupdate should add your other drive as a boot option.


Ubuntu 18.04 - debian installer (preseed) not respecting max size on partitions

You have to define another partition that does not get used.  partman will ignore the max value on the last partition to fill the disk.
Links

Trusty partman preseed is ignoring partition sizes
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820788
https://serverfault.com/questions/1049610/how-do-you-use-method-keep-in-partman-auto/1062217#1062217


Is there a screenshot utility for Ubuntu with similar functionality to Shotty?

I don't think that's possible with the way display servers and window compositors interact in Linux (as opposed to Windows where the two are coupled much more tightly). However you can post-process the image to add a drop shadow similar to that added by the window compositor.

Find a suitable drop shadow filter

I found and played around a bit with ImageMagick’s -shadow filter and came close with these parameters:

convert :input.png \( +clone -background black -shadow 50x5+2+2 \) +swap -background none -layers merge +repage :output.png

As a bonus the shadow uses transparency for image formats like PNG (at 32 bit colour depth) that support it. Result from the example in your question:

You can find a more in-depth explanation on the shadow filter in the Examples of ImageMagick Usage.

Combine the filter with a screenshot tool

We can write a small script to combine the above filter with a screenshot tool like gnome-screenshot:

#!/bin/bash
printf -v filename '%s/screenshot %(%F %T)T.png' "$HOME" -1
tmpfile="$(exec mktemp --tmpdir --suffix=.png screenshot.XXXXXXXXXX)"
trap 'rm -f -- "$tmpfile"' EXIT
gnome-screenshot "$@" -f "$tmpfile"
convert ":$tmpfile" \( +clone -background black -shadow 50x5+2+2 \) +swap -background none -layers merge +repage ":$filename"

…or use what’s already there

It appears the GNOME developers had a similar idea and integrated a shadow filter into their screenshot tool:

gnome-screenshot --window --border-effect=shadow

This creates almost the same visual effect as above:

You can unbind the default keyboard shortcut for screenshots and create an identical shortcut for a custom command like the one above.

For more info see gnome-screenshot(1).


Where do you find the source code of keyboard shortcut application?

This is not an exclusive package. The keyboard shortcuts-layout..etc is part of package gnome-settings-daemon.

See it for your self. Open a terminal (CTRL+ALT+T) and issue the following

apt-cache show gnome-settings-daemon

and read the description.

Description-en: daemon handling the GNOME session settings
 This package contains the daemon which is responsible for setting the
 various parameters of a GNOME session and the applications that run
 under it. It handles the following kinds of settings:
 .
  * Keyboard: layout, accessibility options, shortcuts, media keys
  * Clipboard management
  * Theming: background, icons, GTK+ applications
  * Cleanup of unused files
  * Mouse: cursors, speed, accessibility options
  * Startup of other daemons: screensaver, sound daemon
  * Typing break
 .
 It also sets various application settings through X resources and
 freedesktop.org XSETTINGS.

So if you want to do something with the settings, I guess you should download the source code of gnome-settings-daemon package.


Create a shell script to logon to a server and email disk usage

First, generate a public key for use to log-in to the remote system without a password:

ssh-keygen -t rsa -b 4096 -C "your_username"

This will generate a 4096-bit RSA key in your ~/.ssh/ directory with your user-name as the label. Then, add this new key to your ssh-agent so that it is used when you connect via SSH.

ssh-agent -s
ssh-add ~/.ssh/id_rsa

If you set a custom name during key generation, replace id_rsa with that name.

Now, copy your public key contents to your clipboard.

clip < ~/.ssh/id_rsa.pub

Next, log-in to the remote server with ssh -p YOURPORT user@remote.host and edit the remote user's authorized_keys file.

vim .ssh/autorized_keys

Paste in the contents you just copied to your clipboard.  This allows connections from your computer to the remote host without password, instead using certificates (usually much more secure, anyway).

Now, you need to make a script, example-script.sh, in your remote host's home directory(make sure to chmod a+x example-script.sh afterward to set it as executable).

#!/usr/bin/env bash
CURRENT=$(df / | awk '/\// { print $5}' | sed 's/%//g')
mail -s 'Disk Space Alert' username@example.com << EOF
Disk usage is at:  $CURRENT%
EOF

And now, create a script in your local home directory, local-script.sh to run the command later easily(again, make sure to make it executable after).

#!/usr/bin/env bash
ssh -P YOURPORT user@remote.host ./example-script.sh

This script allows you to run ./local-script.sh from your home directory to run your remote script in just one line. You can then add this as an alias to your .bashrc file so that you can just run local-script or whatever other alias you may want. You can also use the absolute path(/home/your_username/local-script.sh) in crontab to make it run at a specific time every day.


How to resolve SSL error during make ... modules_install command?

You are missing a signing key to sign the module: sign-file: certs/signing_key.pem: No such file or directory.
You have two options: Either disable the module signing or create a key that can be used to sign the module. I recommend to create a key as described here:
No OpenSSL sign-file signing_key.pem leads to error while loading kernel modules
The keys need to be created in /lib/modules/$(uname -r)/build/certs.


try sudo rfkill unblock bluetooth and you will be fine!


Forgotten Password, need assistance with no grub menu

Maybe this link can help you. Never happened to me so I can't say it will work but the guy who wrote the article seems to be ok.


Is there a way to "Screen pin" an app in Ubuntu?

Guest session

I would let other people select another user ID or even better, the guest user, and start a guest session. That way your whole user will be 'pinned'.

It looks like this in Ubuntu 16.04.x LTS (except that the colours were changed by the screenshot program, and the language might differ),


How to disable a touchscreen on Surface pro 3

Was in the same boat.

Run xinput to list out the input devices. Your touchscreen should show as one of the "pointers".
xinput disable "NTRG0001:01 1B96:1B05" (your device ID may differ than mine)
Add this to your ~/.bashrc or such to do automatically upon login

UPDATE: If you are able to attach an external monitor, using arandr to deactivate the tablet's monitor will also disable the pointer device.


How do I access my music and documents from Windows7 on Ubuntu?

You can mount the windows 7 partition in ubuntu, copy over the music, then unmount windows 7 partition.

Or you can keep windows 7 partition mounted on ubuntu (dangerous).  Then you can access your windows file from ubuntu all the time.  Just make sure you don't wakeup to the wrong OS after hibernate, or otherwise you face the danger of a corrupted partition.

Or if you don't mind redo the partition, you can create a shared data partition.  Put all your data, music, ... on the shared partition.  Both windows 7 and ubuntu can access it.  Just to make sure wake up to the correct OS when you hibernate.


Those items - in Nemo called actions - can reside in the follwing directories:

/usr/share/nemo/actions/
/usr/local/share/nemo/actions/
~/.local/share/nemo/actions/

Those files have a structure similar to desktop launchers; here is a well documented example.

From this example:

# Whether this action is active.  For troubleshooting.
# Optional - if this field is omitted, the action will be active
Active=false

So if you want to disable an action, open the corresponding file in a text editor (requires a rooted editor for the system-wide directories) and put

Active=false

at the end. Save the file and restart Nemo from a terminal:

killall nemo && nemo -n

EDIT: In newer versions of Nemo, there is a plugin manager, which can be opened with Alt+P. This may be easier. As the version in Ubuntu's repos (1.8.4 at the time of writing) doesn't yet have this feature, you can install a later version e.g. from the webupd8 repository:

sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install nemo nemo-fileroller
killall nemo && nemo -n

If you want to use more features, such as various Nemo extensions, best read this article on webupd8.org.


Put the commands inside quotes:

ssh user@host "find /var/log -type f -mtime 1 -exec grep -i -F error warn {} \;"

or

ssh user@host 'find /var/log -type f -mtime 1 -exec grep -i -F error warn {} \;'


apt-get update in postint of a deb package

Sounds familiar; I don't think it's possible to run apt-get in maintainer scripts. The deb file for Google Chrome includes code for adding their repository, but AFAICR it's somewhat complicated. You may want to take a look, though.


Customise the prompt and display the Battery Capacity?

These are the commands I know to check system status from command-line:

For time: date

For wi-fi: iwconfig or ifconfig

For battery: acpi or acpi -b- more info here, also you may need to install it first.

For more info on each command, run:

man acpi

man date

man ifconfig

man iwconfig


line-height problem when using ž character

I'm able to reproduce same  issue on Kubuntu 15.10 (VBox). It is a font problem. It happen with "Oxygen Mono", it doesn't with "Ubuntu Mono" & "Deja Vu Mono".

Find the corresponding font file

$ fc-match "Oxygen Mono"
OxygenMono-Regular.ttf: "Oxygen Mono" "Regular"

Find the source package and the full path

$ dpkg -S OxygenMono-Regular.ttf
fonts-oxygen: /usr/share/fonts/truetype/oxygen/OxygenMono-Regular.ttf

Collect info

ubuntu-bug /usr/share/fonts/truetype/oxygen/OxygenMono-Regular.ttf

Then send (It will open a link in the browser)
Complete Lauchpad bug report and submit

If things get slow, You may submit another report to upstream project KDE. Just update both reports to include the links to each others.

Here a command to show package info including the upstream link...

$ apt-cache show fonts-oxygen
Package: fonts-oxygen
...
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
...
Source: oxygen-fonts
Version: 4:5.4.3-0ubuntu1
...
Homepage: https://projects.kde.org/projects/kde/workspace/oxygen-fonts
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
...


Ubuntu 16.04 losing DNS after waking from sleep

I've encountered this issue plenty of times. If you can ping 8.8.8.8 but not google.com, this is your fix.

https://askubuntu.com/a/903671/676362


Shutdown button only logs out ubuntu 15.04

If you have docky installed this fixed the problem for both of my machines.

Ubuntu 15.04 Unity + Docky, Plank, or Cairo-Dock

(DOCKY)

cd ~/.config/autostart
nano docky.desktop
add X-GNOME-Autostart-Delay=20

(IF YOU USE CAIRODOCK)

cd ~/.config/autostart
nano cairo-dock.desktop
add X-GNOME-Autostart-Delay=20

Or you can just remove either one from autostart.

Example docky.desktop

[Desktop Entry]
Type=Application
Exec=docky
Hidden=false
NoDisplay=false
X-GNOME-Autostart-Delay=20
X-GNOME-Autostart-enabled=true
Name[en_US]=Docky
Name=Docky
Comment[en_US]=
Comment=

(IF YOU USE PLANK)

cd ~/.config/autostart
nano plank.desktop
add X-GNOME-Autostart-Delay=20

For example: cat ~/.config/autostart/plank.desktop

[Desktop Entry]
Type=Application
Exec=/usr/bin/plank
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=20
Name=Plank

Note: Still happens on Ubuntu 15.10


Add startup script to Ubuntu Install from a live CD

Mount the drive of your newly installed Ubuntu.  Let's say your mounted install is /media/ubuntu.
In the tutorial you linked, everywhere you see paths like /etc/init.d/start_my_app you would have to refer to the path relative to your mounted drive.  e.g.

/media/ubuntu/etc/init.d/start_my_app


How to have the HUD search all resources?

In 12.04, you can have Unity search all your files, rather than just ones that have been logged by zeitgeist, by adding the lense testing ppa and new unity lens files:

sudo add-apt-repository ppa:unity-team/lenses-testing
sudo apt-get update && sudo apt-get install unity-lens-files


Ubuntu comes with many different languages including all variants of German. This also includes manuals and helpfiles for most applications included. Different to this providing different locales to the main Ubuntu website would make it very hard to maintain.

Still there is an "official" German Ubuntu forum where you can get help on all topics:

Ubuntuusers

People there also maintain a tremendously helpful Wiki for many topics and
applications. Asking questions or participating in discussions requires registration which is free of charge.


Start application without icon in the launcher

Top prevent the application's icon to show up in Unity we may add the following line in the  application's .desktop file (found e.g. in /usr/share/applications):

OnlyShowIn=GNOME;XFCE;KDE

By this the application will only be shown in GNOME, XFCE, or KDE but not in Unity.

Save the modified .desktop file with another name (e.g. app-noshow.desktop) in ~/.local/share/applications to hide the launcher icon when run from there.


How could I create a docklet or Icon in the Unity

I have found an answer by my self.

1) right click in the folder of the program you want to drag in your dock and create a empty file.

2) rename the file, for example like the program with the ending ".desktop" for example name.desktop

3) now open "gedit" with the terminal or with your unity.

4) drag and drop the .desktop file into gedit and copie this to it. You have to edit the parameter (Name, GenericName, Exec, Icon) you can change the Categories param if you want.

[Desktop Entry]
Encoding=UTF-8
Name=programname
GenericName=thomething
Comment=
Type=Application
Exec=path/to/executable.file
Icon=path/to/image.file
Categories=programms;
Name[de_DE]=programname

5) now save the file and close gedit.

6) rightclick on the file then click on properties and make the file executeable.

7) now you can drag and drop it into the unity dock


who kill my iperf on remote Ubuntu 14.04?

I suggest the program crashes constantly. But to make sure you can check the logfiles. these are stored in /var/log/nameoftheprogram.log

Regards.


Is there an Ubuntu One server in South Africa?

I'm pretty sure there is no U1 server in South Africa.

You can look at the source code in the python-ubuntuone-client package to see that it connects to the host fs-1.one.ubuntu.com.  That may have geodns magic, but for me it resolves to 91.189.89.76 which mtr and other tools show is located in the UK.

(It's possible the client later connects elsewhere, but I'm pretty sure not.)


Slow server on web-based writes and SSH login

There's a problem with the account at the server that slows down logins - stale NFS mount, some prompt that waits and waits, etc. Try ssh -v ... and check your startup files (do man bash and look at the INVOCATION section).
There's an unexpected load on the remote system, use uptime, and ps to investigate.
Something else is wrong, do your ssh login, then immediately do /bin/ls -lrt /var/log, followed by tail -n 100 on the most recently modified log files - they'll tell what the system logged as you connected.
Something else is wrong, do your Mediawiki edits, then immediately do /bin/ls -lrt /var/log, followed by tail -n 100 on the most recently modified log files - they'll tell what's what.
If I, or anyone else, tell you "do somecommand", don't blindly do it! Use the man, man -k, and info commands to understand both the intent and the particular example of "somecommand".


Ubuntu 13.10 Share non-OS drive with Windows

I would recommend formatting the 3TB drive in NTFS. This way you will be able to see it in Ubuntu and Windows without the need for any other steps. If you can not do this, then the next best thing would be to re-partition your 3TB drive to something smaller. Like 2TB. Then format the 2TB with NTFS (Using an app like gparted). Since NTFS is compatible with both OS, you won't have any problems sharing between both systems.

For sharing options with Samba I invite you to read: Here's my smb.conf file. Whats wrong with it?


Evolution is not the easiest piece of software to deal with because of dependencies of other parts of GNOME. I would recommend that you join the evolution mailinglist and join their IRC channel. There are many helpful people both places and my experience is that these issues are very difficult to solve in the kind of one-shot answers that this site is designed for.

Mailinglist: http://mail.gnome.org/mailman/listinfo/evolution-list
IRC channel: #Evolution on irc.gimp.org


Determine if Zebra is installed in ubuntu server

sudo update-rc.d koha-zebra-daemon defaults


Mount external hard drive with LUKS Encryption + LVM

In case anyone has the same problem, vgimportclone is your savior.


How to install network drivers in Dell Inspiron 5420?

I have a Dell Inspiron 5420 Laptop. I was struggling to install Wired Network drivers. The article above helped me in installing them. But after installing the wired network successfully, I tried to install Wireless Network drivers. I found out that I have "Broadcom Corporation Device 4365 (rev 01)" after typing lspci on the terminal.

I also tried the wireless setup guide given above, but was unable to install it, because it was saying that I have the i386 package installed and I cannot use amd64. After trying many different things, I tried to update my Ubuntu 12.04 to studio i386.

After all the updates were successfully installed. The system automatically asked me to install Broadcom Wireless, by clicking "yes" all my troubles were gone and now it is working smoothly.


Poor GNOME performance with Intel integrated GPU on Ubuntu 16.04 (Intel HD530 / 4K)

This is the solution for me: How to update xserver to 1.19?

Install current X-Server version with:

sudo apt install xserver-xorg-hwe-16.04

You can see the version of your current X-Server with:

sudo X -version


Right click, properties. Then on the little picture that comes up in the window, click on it and pick the icon you want.


Gcc 5.3.1 vs ANSI C re: Variable names and $

Section 6.39 Dollar Signs in Identifier Names of the GCC manual states:

  In GNU C, you may normally use dollar signs in identifier names. This is because many traditional C implementations allow such identifiers. However, dollar signs in identifiers are not supported on a few target machines, typically because the target assembler does not allow them.


Can I use my swap memory to increase storage for Ubuntu 20.04?

Use disk management tool gparted. If not installed you can install it using $ sudo apt update && sudo apt install gparted. Launch the app as a super user $ sudo gparted and enter the password when prompted. You will see the logical representation of your storage device.
It is possible to make these changes if and only if your swap partition is adjacent to the right of the root partition otherwise you are limited! If this is true, proceed to swapoff and resize your partition from left to right creating an unallocated space adjacent to the right of the root partition. After that move the root partition to the right adding the an unallocated space. A green icon should appear to the top asking to apply all changes. Click and proceed as prompted and you are good to go.
For detailed information on how to use gparted find it here.
Hope this serves your purpose. Success!


You can lock a version by following these simple steps:

Open a terminal
sudo -s and hit enter
Enter your password for sudo
echo firefox hold | dpkg --set-selections

This will lock (aka pin) the 'firefox' package.

To remove the lock replace step 4 with echo firefox install | dpkg --set-selections.

If you prefer a GUI then you can open Synaptic Package Manager, choose the package and from menu select Package->Lock Version.


How can I prevent users accessing anything but their own home directory?

Reassess your requirement first. What is the problem you are trying to solve? Why do you want to prevent users from leaving their home directory? Isn't it rather that you don't want them to rummage through specific other directories -- such as the home directories of other users?

It is very difficult to prevent users from leaving their home directory. It is actually a bit silly, too (explanation follows). It is much simpler to prevent users from entering directories you don't want them to enter.

First off, yes you can give users a so-called restricted shell, see man rbash. This will prevent them from cd-ing elsewhere, but only inside that shell. If the user starts vi or nano (or any other program capable of opening a file) they can again open files anywhere on the system. As a matter of fact, a restricted shell does not prevent e.g. cat /etc/passwd.

The next step up is a root jail. More info on the community wiki and in this question. Though a root jail will lock users inside a walled garden, within which they have access to nothing but the files and commands that you intentionally put there, root jails really are intended for isolating untrusted software rather than users. In particular, they are for software that needs to run with elevated privileges -- hence a root jail.

Users, on the other hand, are trusted: they have had to authenticate and run without elevated privileges. Therefore file permissions suffice to keep them from changing files they do not own, and from seeing things they must not see. To prevent users from reading the content of a file, remove its world-readability with chmod o-r FILE . To keep users out of a directory, make it world-inaccessible with chmod o-rwx DIR.

World-readability is the default though, for good reason: users actually need most of the stuff that's on the file system. Don't lock users in their homes just because there exist secrets outside.

Why locking users in their home directory is a bit silly

To do anything useful, users need access to commands and applications. These are in directories like /bin and /usr/bin, so unless you copy all commands they need from there to their home directories, users will need access to /bin and /usr/bin. But that's only the start. Applications need libraries from /usr/lib and /lib, which in turn need access to system resources, which are in /dev, and to configuration files in /etc and /usr/share.

This was just the read-only part. Applications will also want /tmp and often /var to write into. So, if you want to constrain a user within his home directory, you are going to have to copy a lot into it. In fact, pretty much an entire base file system -- which you already have, located at /.


How to compare V8 Javascript Engine version between Chrome and NodeJS in terminal?

For check the current version installed of Google Chrome browser, NodeJS Server or V8 Javascript Engine from NodeJS, type into Terminal on Bash CLI:

$
$ google-chrome --product-version
  63.0.3239.84
$
$ node --version
  v8.9.3
$
$ node -p process.versions.v8
  6.1.534.48
$

No needs Grep or AWK or Sed to trimming the text resultant!

For check the version of V8 Javascript Engine from Chrome browser, type the URL chrome://version on Address bar.

For find out which Chrome version implemented each ECMAScript spec feature, access the site below and filter the category Javascript:

https://www.chromestatus.com/samples

For find out which V8 version came with past Chrome versions, access the site below:

https://en.wikipedia.org/wiki/Google_Chrome_version_history


No wireless connection in newly installed Ubuntu with BCM4312

Solved it! :)
I found this, and it solved my problem...


Redirect port 5000 OSRM a subdomain in Apache2

Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000  or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com  or myosrmwebsite.com

You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:

a2enmod proxy
a2enmod proxy_http

Edit your hosts file

# if you don't have access try with sudo
nano /etc/hosts

Add entry to your hosts file

# path /etc/hosts
127.0.0.1 subdomainname.mywebsite.com
87.164.25.1 subdomainname.mywebsite.com

The 87.164.25.1 is an example of ip public it isn't real

After this we need to go to /etc/apache2/sites-available

cd /etc/apache2/sites-available

Create a file *.conf for our subdomain or domain

nano subdomainname.mywebsite.com.conf

In this file we are going to create a config to proxy our port to servername

#filename 'subdomainname.mywebsite.com.conf'
#dir /etc/apache2/sites-available
<VirtualHost *:80>
    ServerName osrm.website.com  # my subdomain or website name server
    ProxyPass               /       http://localhost:5000/
    ProxyPassReverse        /       http://localhost:5000/
    ProxyRequests     Off

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.

Add the *.conf file to apache with this command, and check the list of commands.

To enable it

sudo a2ensite subdomainname.mywebsite.com.conf

To disable it

sudo a2dissite subdomainname.mywebsite.com.conf

To list all sites enables

# if you want to know what sites are enables.. or check if it is enable
apache2ctl -S

To reload apache or restart

# only reload the config files without restart
sudo service apache2 reload

# restart apache
sudo service apache2 restart

Websites of reference

How to setup subdomain on Ubuntu Server 14.04
Get a list of all virtual hosts which are defined in all apache configuration files
Proxy port to site - example No. 1 - https://serverfault.com/a/140161
Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/
Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072
Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072

* I put a title and url if for some reason it fail...


Problem launching parole after upgrading to vivd (clutter-critical error)

What worked for me was to delete the ~/.local directory (e.g. rm -fr .local) and restart the app.  Then it works, I was getting the same exact error and this fixed it.  Something gets messed up in the directory probably as a results of using root auth (sudo) for some commands, etc...


What does these logs means? (DHCPREQUEST)

This person asked pretty much the same question on Unix & Linux stack exchange.

Here is the start of the answer, probably more efficient for you to click over to the link.

First 3 lines are messages from dhclient which:

sent a DHCP request to the router
received DHCP lease
set up the interface


How to completely restart script from inside the script itself

Yes, do

exec "$ScriptLoc"

The exec bash builtin command replaces the current program with a new one.


How to get my Asus PCE-N15 wireless adapter to work on 13.10

First, the driver you built from github does not depend nor require rtl_pci nor rtl_8192c_common. The module mac80211 is required. Is it loaded?

lsmod | grep 80211

Please be certain that any ethernet cable is detached as you try to connect. Network Manager will prefer ethernet over wireless and is intended to disallow wireless if ethernet is available.

Second, be sure your router is set to WPA2-AES only, no TKIP nor mixed mode WPA/WPA2. Experiment with and without N speeds enabled.

Finally, let's try a driver parameter:

sudo modprobe -r rtl8192ce
sudo modprobe rtl8192ce swenc=1

If it helps, we'll write a quick file to make it persistent.

Look for any clues as to why it isn't working with:

cat /var/log/syslog | grep -e rtl -e etwork | tail -n 25

As the file is quite sizable, post it here and give us the link in your reply: http://paste.ubuntu.com


Installer crashed leaving only a blank screen

try this

when you start computer press F3 (if i'm not wrong) to get a list of bootable device. Choose your dvd divice from the menu. If you get this on this time choose try and see if it works out. If not F3, there must be a key that bring you to the list of bootable device try Esc, del, F8 also.

PS: F9 will update/reflash your bios.


steam-installer just installs steam. The Ubuntu Software store will only show you 64bit programs if you're on a 64bit OS. So steam-installer is just a workaround to show it in Ubuntu Software since steam is 32bit


Easy game, in linux everything is a file!
To check the board response use:

cat /dev/ttyACM0

to write data to serial use echo

sudo echo -e "YO" > /dev/ttyACM0


Ubuntu 18.04 takes lots of cpu for every copying procedure

(This small essay is a variation on my usual reference to the truism "Good, Fast, or Cheap; Choose any two")

Turn the question around. On an otherwise unloaded system, what would you expect to happen? Should the system starve processes or resources like memory or CPU if no other process needs those right now?

An OS has to balance speed and space and do so in a correct manner, and it has to do that for any process that may want access to the same resources. It has to honour notions like "locks" that a process may request so it can do things atomically, and it may be that copying files requires more than a few atomic operations. But it will do its best to coordinate those requests with priority over the lifetime of the OS uptime.

Inspecting processes with top etc. doesn't tell you much about the internals of a process. It gives you a general picture of the overall state a few moments ago, and can help identify some general problems. But it shouldn't be used as a benchmark for processes, especially those that rely a lot on kernel operations.

In general, the scheduler operates within some parameters to balance resource requests and reduce contention (if possible) while optimizing execution. Copying files, especially across filesystems, is special in that there is a lot of coordination to be done across devices and kernel space to make sure things are safe as well. Copying a file is intended to be relatively bomb-proof, so in most cases there are locks and checks and retries that handle all the little things that can go wrong. There are going to be waits while the copy is in a critical section, and the UI has to be updated as well. So the entire system from UI/console to kernel to devices is involved.

I see you have mentioned laptop battery life in a comment (which should have been in the the question). This is a case where the copying operation just doesn't care. Copying files doesn't care about your battery. It is up to the scheduler/OS/kernel to throttle the resources available if the intention is to never spin the CPU high enough to require stepping to a higher power level.

Maybe the Linux kernel isn't good at this, or the Ubuntu free or non-free, properietary battery control devices and widgets aren't working for you. But this is a different issue, and could be seen with any process that needed the same resources as file copies or moves.

What we need is some sort of power stat tool that allows us to dig into the most power-hungry processes, like mobile phones have.

In fact, the system may already be throttling things so the CPU is in a lower power state, and the copies are taking longer as a result. That "90%" is a percentage of the total estimated available "CPU". It isn't a hard or even well-defined value.

(I'm also reminded at the power cost of operations in data centres, and disk seeks of any kind, even when cached in memory, are a huge part of the power cost and source of the waste heat!)


Software Recommendation Low level, relatively verbose audio libraries

There are few audio applications which do not make use of more basic audio application inherent to all Linux distributions including Ubuntu. Per default Ubuntu audio is based on ALSA with most of it's libraries and low level tools already installed:

ALSA project

However we can also install another sound sond subsystem like e.g. the

Open Sound System (OSS).

On top of these we need a sound server to make further use of the basic sound system, e.g.:

PulseAudio (default) - For desktop sound applications
Jack - Audio Connection System (optional) - For professional sound systems
Music Player Demon MPD (optional) - for networking applications

Many sound applications make use of the gstreamer multimedia framework, wich can also be addressed directly, or in own applications.

After we had a look at the different solutions we can see that the Ubuntu sound system can nicely be controlled and accessed via command line utilities, even for finer acpects of sound control. The amount of graphical load depends on the music player you are using, but it can all be done without any player at all.

This is especially true for playlist, which are simple text files that can be made with any editor. Below is a basic example of an .m3u playlist file:

#EXTM3U
/path/to/music_library/file1.mp3
/path/to/music_library/file2.mp3
...


VirtualBox Lubuntu grub-pc boot loader failed to insall

Found this similar post on Super User with an answer by Marcello Mönkemeyer

  The problem actually was, that the /boot partition wasn't created, even though it was shown in the UI. It's still possible to get everything running with the guided partitioning, but when you're asked to Write the changes to the disk?, you need to go <Back> to see a detailed list of all partitions. When clicking <Next>, the installation will finally recognise and partition everything correctly and as expected.


since you're on Windows, you can try to recover the files by using a file recovery application such as Recuva from Piriform.

I very much doubt that the files are totally gone though if you were only trying to make a bootable USB and you would have been offered the choice of whether to wipe your hard drive by the Ubuntu installer.

Try booting a Live Linux CD such as Ubuntu which you already have. If you're not seeing files on your Sony hard drive don't panic, give Recuva a chance to recover all your files.

Last resort is running your Sony recovery discs but at the expense of losing your precious files. Google some more and never forget to make back-ups. It's the golden rule of computing - make a backup-up of a back-up of a back-up.

Cheers!


Big thanks to "Hobbyist" for answering my question! This helped quite a lot!


kubuntu 16.04 release unusable in virtualbox

There is a ticket #14102 for VirtualBox regarding this Problem. There seems to be a problem with 3D acceleration since Kubuntu 15.04.
Turning it off helped most times and worked for me. Hopefully VBox will fix it some time so we can use 3D acceleration again.

Update 28.06.16
There is now a wiki article about X11 Guest 3D that does not sound good for a quick fix.


It is possible to install grub in to it's own partition (ext2+) without the need for a full Ubuntu installation. Simply create a 100 MB partition, format it to ext2, then make an Ubuntu live USB to install grub from. Delete Ubuntu, extend Windows, then install Grub from the USB.

I can add more details if you need. Just comment.


Where is the configuration file so I can remove applications from startup?

Ubuntu doesn't maintain that in a single configuration file.

Even the cmdline tool, update-rc.d, will simply do the work needed to link/unlink a specific program from running at startup.


So I found the solution, it is by adding vers=3.0 in the fstab mount as follow

//servershare /ShareMount cifs vers=3.0,credentials=/home/user/.smbcredentials,iocharset=utf8,sec=ntlm,nosetuids, noperm 0 0

I have been testing this modification since 22hrs now and I am not experiencing any more disconnections.


Does deleting a file from my computer also delete it from Ubuntu One?

If you delete a file from your Ubuntu One folder,  or any other folder that you selected to sync with Ubuntu One, it will be deleted from your Ubuntu One cloud as well.

The Ubuntu One Cloud will not show those files in the browser anymore, however, they may still be available on the server.

From Ubuntu One help

  When you delete a file from a desktop or mobile device, it might end
  up in the Trash folder. It might also skip the Trash (depending on how
  you deleted it), but when Ubuntu One syncs, it will move that file to
  the other devices' Trash folder. So, for instance: if you want to
  recover a file you deleted from your phone, you should be able to see
  it in your computer's Trash folder.

  As of October 2013, you also have a way to recover them from the
  server: In your Ubuntu One profile in the web, you can chose the
  option "Recover deleted files". This will start a job that will
  recover the deleted files and will place them in a folder called
  "Recovered" followed by the date of the recovery.

  Each time you hit the "Recover deleted files" button, Ubuntu One will
  try to recover all the files deleted since the last time you made a
  recovery. The first time you try to recover, Ubuntu One will try to
  recover all the files you deleted since the beginning of times.This
  might take a while to sync in your devices, depending on how many
  files are being recovered.

  The directory structure of the deleted files will be preserved under
  the "Recovered" folder, so when you're looking for a specific file,
  please take this to account to look in the right place.

  Please take to account that files deleted more than 60 days ago might
  not be there. You can try to recover them anyway, but they might have
  been deleted from the server too.

While I can tell you from personal experience that the restore files works, it is time consuming as you have to let the files restore to the restore folder then copy them back to the correct folder then delete the restore folder, but it is better than losing them completely.

(I did something wrong when syncing my VM and it erased all my synced files, the restore function was able to restore all my lost files, as well as some that were well over 60 days old. (the time must be relative as to how full your cloud is, mine is only 20% filled))


Unable to install Ubuntu 18.04 alongside Windows 10 (legacy BIOS)

Try this trick https://askubuntu.com/a/1266315/1114033 it's solved my problem to installing Xubuntu on legacy Bios. When installer checking and got error (can't found 3 files on EFI folder), ignore it.


Your device or drivers can be old for Ubuntu 14.04. You should check this: https://help.ubuntu.com/14.04/installation-guide/amd64/ch02s01.html

And maybe you have to clean your GPU fan or CPU fan. And I recommend you dont use your laptop on top of your lap :-) Because fans need to circulate the air!


lsblk lists all mass storage devices and partitions on them, including mounted file systems, unmounted file systems and devices without any file system.
df 'reports file system disk space usage', which means that it lists mounted file systems and also file systems in RAM.

Please notice the difference between

df -H   # print sizes in powers of 1000 (e.g., 1.1G)

and

df -h   # print sizes in powers of 1024 (e.g., 1023M)

lsblk lists sizes in powers of 1024, so it matches df -h best.

It seems that there is no file system on /dev/sda as already described by @Sergiy Kolodyazhnyy.


How to mount additional Windows partitions in a WUBI installed Ubuntu?

You need to tell Ubuntu to mount your additional partition.

Press the Win-key and type "disk". You should see the icon called "disk utility". You will be able to browse all your disks and partition. Once you have located what is known to windows as D: (D: is a Windows-specific label), you will be able to mount it such that you can browse all your files stored there.

An explanation to "mounting": Windows automatically mounts the physical partitions such that you can find them at mount points labeled C:, D: etc. In Linux / Unix, you can choose the mount point freely (it can be any empty folder). For example, your partition that is mounted as C: in Windows has been mounted at the mount point /host.


What you need to do is when installing, you choose "Something else" when it comes to make partition, as you don't want to use the entire disk. Basically, you will make your partitions manually.

When you make your partition:
Mount your 16Gb as /

Mount around 4Gb of your 100 Gb partition as Swap

Mount the remaining 96 Gb of this 100 Gb partition as /home

Normally, 16Gb is more than enough for a normal use of Ubuntu. Now, if you are planing to install A LOT (and I mean really A LOT) of software, games, etc, you may add another partition on your 100 Gb, which you will mount as /usr. I would not suggest you to do this, because it may make your system slower, as all your apps will be on a mechanical HD. To give you an idea, my partition / is only 20Gb, and it is more than enough, as I use around 10Gb, and I have a lot of software and games installed.


How to open new terminal maximized without using 3rd party plugins?

Open gnome-terminal
Make the window maximized
run tput cols note down the value
run tput lines note down the value
Create a new profile with any preferred name of your choice
Change the terminal size values under "Text" Tab.
Open the desktop file from /usr/share/applications/org.gnome.Terminal.desktop Please note that this step 7 could be little tricky if you want to make the changes locally with out editing system files.
Edit the Exec line to match with the profile name
for example: Exec=gnome-terminal --window-with-profile=PRATAP
Save the file and close.

Tested in Ubuntu 20.04


Try
sudo apt-get purge --autoremove cuda*

then you should be able to download your package of choice without interfering.


Adobe Reader doesn't show .flv files. Ubuntu 14.04

Which plugin should I install and how?

Adobe Reader is not available in Ubuntu 14.04, the Linux native package must have been removed from the partner repositories in 13.10 since it's only available up to 13.04. From what I've heard and read there were several major security issues with this last version and Adobes solution was to just drop support for Linux, because they are busy enough to patch Flash and Adobe Reader on Windows.

If you provide enough context to your question you can probably answer your question yourself:

How did you install Adobe Reader on Linux/Ubuntu? (PlayOnLinux I assume?)

Since it's good practice to offer the slides after a presentation was held, do you think it's a good idea to make your audience suffer through the same path of hurdles and incompatibilities?

Reasons to avoid PDF & Flash

PDF & Flash is one of the most terrible combinations from the past. PDF itself is an overused format, embedding Java, Javascript or Flash makes it equally dangerous as using macros in other document formats and many users closely associate PDFs with printable documents.

I'm surprised to see that people still consider using such functionality which has been discouraged for many years and disabled in many existing implementations by default, yet it is one of the major ways users recently again got infected with crypto trojans.

Show some sense of responsibility! Realize, your whole attitude of Linux and Free Desktop users are safe because we are better than the big bad companies just went down the toilet.

Furthermore this is not how we use computers or computing devices to view documents today. Most browsers have a PDF renderer built in, all of them want to abandon Flash and have road maps for that. Flash isn't available on mobile platforms and embedded Flash players aren't very user friendly by todays standards.

Alternatives

Browsers are more suited for presentations with multimedia content on all major platforms these days. A completely Javascript free solution doesn't appear to be available or popular right now, but browser based presentations are state of the art today. One solution I found was reveal.js.


Compatibility for ASUS ZenBook Pro UX550VE

I just got this model today and I installed Ubuntu 18.04 (daily build, downloaded from here). Everything worked just fine during the installation (sound, touch pad etc). When Ubuntu installer needed to reboot, that failed. Stucked with message "soft lockup, CPU#1 stuck for 22s!"

Installed latest kernel and latest Nvidia drivers (apt update ; apt install nvidia-384), that fixed the shutdown/reboot issue.

Fingerprint reader is not supported. The drivers are closed source and from what I found this person is trying to make it supported.


"g++: Command not found" when building sevensquare with make

C++ compiler is not installed on your system.
Run:

sudo apt-get install build-essential


How can I have my VPN connect automatically when the wireless connects?

When setting up a VPN connection through Network Manager selecting the Connect automatically option should mean that the VPN does automatically connect, however this isn't working due to a bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/280571

It can still achieved though through workarounds, one way of doing this would be to use vpnautoconnect

Set up your VPN as normal through the network settings, making sure
that Connect automatically is selected:

Download the appropriate .deb file from the
download page: http://sourceforge.net/projects/vpnautoconnect/files/
(ending in amd64 for 64bit, ending in i386 for 32bit).
Double click the downloaded .deb file and install it.
Run the VPNautoconnect application

Select Preferences from the VPNautoconnect menu

Click the small arrow to create a new tab and select your wireless
connection in the Parent Connection drop down menu, and your VPN
in the VPN Connection drop down menu. Then click Save

Your VPN should now connect automatically whenever the selected wireless network is connected (if you use more than one wireless network you'll need to create a new tab in the preferences menu for each one you want to auto connect to a VPN whilst you are using).


Why doesn't apt detect the newer .deb version in the universe repository, even though it exists there?

TL;DR

You have to enable xenial-updates and xenial-security in your /etc/apt/sources.list or on Updates tab of Software & Updates (software-properties-gtk).

It seems that you incorrectly understand the pool folder structure. It contains all packages for all releases.

You should go to https://packages.ubuntu.com and run search for chromium-browser package amd64 to determine correct versions for your current release.

Then you will get the following for xenial and xenial-updates:

  xenial (16.04LTS) (web): Chromium web browser, open-source version of Chrome [universe]
  78.0.3904.108-0ubuntu0.16.04.1 [security]: amd64
  xenial-updates (web): Chromium web browser, open-source version of Chrome [universe]
  78.0.3904.108-0ubuntu0.16.04.1: amd64

So you can get the latest possible package version from universe pocket:

  78.0.3904.108-0ubuntu0.16.04.1: amd64

On my fully updated system the output is the following:

$ apt-cache policy chromium-browser
chromium-browser:
  Installed: 78.0.3904.108-0ubuntu0.16.04.1
  Candidate: 78.0.3904.108-0ubuntu0.16.04.1
  Version table:
 *** 78.0.3904.108-0ubuntu0.16.04.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     49.0.2623.108-0ubuntu1.1233 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

In your particular case it seems that xenial-updates is missed in your /etc/apt/sources.list file. You need to re-enable it from terminal or by visiting Updates tab of Software & Updates (software-properties-gtk) .

Also I need to note that current Ubuntu 16.04 LTS version is 16.04.6 LTS.
So really you need to enable xenial-updates, xenial-security, then update package lists with sudo apt-get update and install all newest dependencies with sudo apt-get dist-upgrade. This will solve many security- and update- related problems.


i'm trying to install odoo 12 on ubuntu 18.04 and i'm facing issue about npm so i want to remove node completley , but i'm facing errors

I have a better solution that can be helpful to others.
I have just modified the existing script and it works like a charm.
I modified Yenthe Van Ginneken script

Change requirements libraries installation process.

Add new python libraries and modified specific versions of python libraries.

Change the npm install process.
 #!/bin/bash
  ################################################################################
  # Script for installing Odoo on Ubuntu 14.04, 15.04, 16.04 and 18.04 (could be used for other version too)
  # Author: Yenthe Van Ginneken
  # Modified by: Shahid Raza
  #-------------------------------------------------------------------------------
  # This script will install Odoo on your Ubuntu 16.04 server. It can install multiple Odoo instances
  # in one Ubuntu because of the different xmlrpc_ports
  #-------------------------------------------------------------------------------
  # Make a new file:
  # sudo nano odoo-install.sh
  # Place this content in it and then make the file executable:
  # sudo chmod +x odoo-install.sh
  # Execute the script to install Odoo:
  # ./odoo-install
  ################################################################################

  #OE_USER is your system user change name according your system
  OE_USER="odoo"
  OE_HOME="/$OE_USER"
  OE_HOME_EXT="/$OE_USER/${OE_USER}-server"
  # The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
  # Set to true if you want to install it, false if you don't need it or have it already installed.
  INSTALL_WKHTMLTOPDF="True"
  # Set the default Odoo port (you still have to use -c /etc/odoo-server.conf for example to use this.)
  OE_PORT="8069"
  # Choose the Odoo version which you want to install. For example: 12.0, 11.0, 10.0 or saas-18. When using 'master' the master version will be installed.
  # IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 12.0
  OE_VERSION="12.0"
  # Set this to True if you want to install the Odoo enterprise version!
  IS_ENTERPRISE="False"
  # set the superadmin password
  OE_SUPERADMIN="admin"
  OE_CONFIG="${OE_USER}-server"

  ##
  ###  WKHTMLTOPDF download links
  ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
  ## in order to have correct version of wkhtmltopdf installed, for a danger note refer to
  ## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ):
  WKHTMLTOX_X64=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb
  WKHTMLTOX_X32=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_i386.deb

  #--------------------------------------------------
  # Update Server
  #--------------------------------------------------
  echo -e "\n---- Update Server ----"

  # add-apt-repository can install add-apt-repository Ubuntu 18.x
  sudo apt-get install software-properties-common
  # universe package is for Ubuntu 18.x
  sudo add-apt-repository universe
  # libpng12-0 dependency for wkhtmltopdf
  sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ xenial main"
  sudo apt-get update
  sudo apt-get upgrade -y

  #--------------------------------------------------
  # Install PostgreSQL Server
  #--------------------------------------------------
  echo -e "\n---- Install PostgreSQL Server ----"
  sudo apt-get install postgresql -y

  echo -e "\n---- Creating the ODOO PostgreSQL User  ----"
  sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true

  #--------------------------------------------------
  # Install Dependencies
  #--------------------------------------------------
  echo -e "\n--- Installing Python 3 + pip3 --"
  sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libpng12-0 gdebi -y

  echo -e "\n---- Install python packages/requirements ----"
  sudo pip3 install Babel
  sudo pip3 install chardet
  sudo pip3 install decorator
  sudo pip3 install docutils
  sudo pip3 install ebaysdk
  sudo pip3 install feedparser
  sudo pip3 install gevent
  sudo pip3 install greenlet
  sudo pip3 install html2text
  sudo pip3 install Jinja2
  sudo pip3 install lxml
  sudo pip3 install Mako
  sudo pip3 install MarkupSafe
  sudo pip3 install mock
  sudo pip3 install num2words
  sudo pip3 install ofxparse
  sudo pip3 install passlib
  sudo pip3 install Pillow
  sudo pip3 install psutil
  sudo pip3 install psycopg2-binary
  sudo pip3 install pydot
  sudo pip3 install pyldap
  sudo pip3 install pyparsing
  sudo pip3 install PyPDF2
  sudo pip3 install pyserial
  sudo pip3 install python-dateutil
  sudo pip3 install pytz
  sudo pip3 install pyusb
  sudo pip3 install qrcode
  sudo pip3 install reportlab
  sudo pip3 install requests
  sudo pip3 install suds-jurko
  sudo pip3 install vatnumber
  sudo pip3 install vobject
  sudo pip3 install Werkzeug==0.11.15
  sudo pip3 install XlsxWriter
  sudo pip3 install xlwt
  sudo pip3 install xlrd
  sudo pip3 install pypiwin32
  sudo pip3 install libsass==0.12.3

  echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
  sudo apt-get install -y npm
  sudo ln -s /usr/bin/nodejs /usr/bin/node
  sudo npm install -g less less-plugin-clean-css
  sudo apt-get install -y node-less

  #--------------------------------------------------
  # Install Wkhtmltopdf if needed
  #--------------------------------------------------
  if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
    echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 12 ----"
    #pick up correct one from x64 & x32 versions:
    if [ "`getconf LONG_BIT`" == "64" ];then
        _url=$WKHTMLTOX_X64
    else
        _url=$WKHTMLTOX_X32
    fi
    sudo wget $_url
    sudo gdebi --n `basename $_url`
    sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
    sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
  else
    echo "Wkhtmltopdf isn't installed due to the choice of the user!"
  fi

  echo -e "\n---- Create ODOO system user ----"
  sudo adduser --system --quiet --shell=/bin/bash --home=$OE_HOME --gecos 'ODOO' --group $OE_USER
  #The user should also be added to the sudo'ers group.
  sudo adduser $OE_USER sudo

  echo -e "\n---- Create Log directory ----"
  sudo mkdir /var/log/$OE_USER
  sudo chown $OE_USER:$OE_USER /var/log/$OE_USER

  #--------------------------------------------------
  # Install ODOO
  #--------------------------------------------------
  echo -e "\n==== Installing ODOO Server ===="
  sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/

  if [ $IS_ENTERPRISE = "True" ]; then
      # Odoo Enterprise install!
      echo -e "\n--- Create symlink for node"
      sudo ln -s /usr/bin/nodejs /usr/bin/node
      sudo su $OE_USER -c "mkdir $OE_HOME/enterprise"
      sudo su $OE_USER -c "mkdir $OE_HOME/enterprise/addons"

      GITHUB_RESPONSE=$(sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise "$OE_HOME/enterprise/addons" 2>&1)
      while [[ $GITHUB_RESPONSE == *"Authentication"* ]]; do
          echo "------------------------WARNING------------------------------"
          echo "Your authentication with Github has failed! Please try again."
          printf "In order to clone and install the Odoo enterprise version you \nneed to be an offical Odoo partner and you need access to\nhttp://github.com/odoo/enterprise.\n"
          echo "TIP: Press ctrl+c to stop this script."
          echo "-------------------------------------------------------------"
          echo " "
          GITHUB_RESPONSE=$(sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise "$OE_HOME/enterprise/addons" 2>&1)
      done

      echo -e "\n---- Added Enterprise code under $OE_HOME/enterprise/addons ----"
      echo -e "\n---- Installing Enterprise specific libraries ----"
      sudo pip3 install num2words ofxparse
      sudo npm install -g less
      sudo npm install -g less-plugin-clean-css
  fi

  echo -e "\n---- Create custom module directory ----"
  sudo su $OE_USER -c "mkdir $OE_HOME/custom"
  sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"

  echo -e "\n---- Setting permissions on home folder ----"
  sudo chown -R $OE_USER:$OE_USER $OE_HOME/*

  echo -e "* Create server config file"

  sudo touch /etc/${OE_CONFIG}.conf
  echo -e "* Creating server config file"
  sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/${OE_CONFIG}.conf"
  sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf"
  sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
  sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"
  if [ $IS_ENTERPRISE = "True" ]; then
      sudo su root -c "printf 'addons_path=${OE_HOME}/enterprise/addons,${OE_HOME_EXT}/addons\n' >> /etc/${OE_CONFIG}.conf"
  else
      sudo su root -c "printf 'addons_path=${OE_HOME_EXT}/addons,${OE_HOME}/custom/addons\n' >> /etc/${OE_CONFIG}.conf"
  fi
  sudo chown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf
  sudo chmod 640 /etc/${OE_CONFIG}.conf

  echo -e "* Create startup file"
  sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"
  sudo su root -c "echo 'sudo -u $OE_USER $OE_HOME_EXT/openerp-server --config=/etc/${OE_CONFIG}.conf' >> $OE_HOME_EXT/start.sh"
  sudo chmod 755 $OE_HOME_EXT/start.sh

  #--------------------------------------------------
  # Adding ODOO as a deamon (initscript)
  #--------------------------------------------------

  echo -e "* Create init file"
  cat <<EOF > ~/$OE_CONFIG
  #!/bin/sh
  ### BEGIN INIT INFO
  # Provides: $OE_CONFIG
  # Required-Start: \$remote_fs \$syslog
  # Required-Stop: \$remote_fs \$syslog
  # Should-Start: \$network
  # Should-Stop: \$network
  # Default-Start: 2 3 4 5
  # Default-Stop: 0 1 6
  # Short-Description: Enterprise Business Applications
  # Description: ODOO Business Applications
  ### END INIT INFO
  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
  DAEMON=$OE_HOME_EXT/odoo-bin
  NAME=$OE_CONFIG
  DESC=$OE_CONFIG
  # Specify the user name (Default: odoo).
  USER=$OE_USER
  # Specify an alternate config file (Default: /etc/openerp-server.conf).
  CONFIGFILE="/etc/${OE_CONFIG}.conf"
  # pidfile
  PIDFILE=/var/run/\${NAME}.pid
  # Additional options that are passed to the Daemon.
  DAEMON_OPTS="-c \$CONFIGFILE"
  [ -x \$DAEMON ] || exit 0
  [ -f \$CONFIGFILE ] || exit 0
  checkpid() {
  [ -f \$PIDFILE ] || return 1
  pid=\`cat \$PIDFILE\`
  [ -d /proc/\$pid ] && return 0
  return 1
  }
  case "\${1}" in
  start)
  echo -n "Starting \${DESC}: "
  start-stop-daemon --start --quiet --pidfile \$PIDFILE \
  --chuid \$USER --background --make-pidfile \
  --exec \$DAEMON -- \$DAEMON_OPTS
  echo "\${NAME}."
  ;;
  stop)
  echo -n "Stopping \${DESC}: "
  start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
  --oknodo
  echo "\${NAME}."
  ;;
  restart|force-reload)
  echo -n "Restarting \${DESC}: "
  start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
  --oknodo
  sleep 1
  start-stop-daemon --start --quiet --pidfile \$PIDFILE \
  --chuid \$USER --background --make-pidfile \
  --exec \$DAEMON -- \$DAEMON_OPTS
  echo "\${NAME}."
  ;;
  *)
  N=/etc/init.d/\$NAME
  echo "Usage: \$NAME {start|stop|restart|force-reload}" >&2
  exit 1
  ;;
  esac
  exit 0
  EOF

  echo -e "* Security Init File"
  sudo mv ~/$OE_CONFIG /etc/init.d/$OE_CONFIG
  sudo chmod 755 /etc/init.d/$OE_CONFIG
  sudo chown root: /etc/init.d/$OE_CONFIG

  echo -e "* Start ODOO on Startup"
  sudo update-rc.d $OE_CONFIG defaults

  echo -e "* Starting Odoo Service"
  sudo su root -c "/etc/init.d/$OE_CONFIG start"
  echo "-----------------------------------------------------------"
  echo "Done! The Odoo server is up and running. Specifications:"
  echo "Port: $OE_PORT"
  echo "User service: $OE_USER"
  echo "User PostgreSQL: $OE_USER"
  echo "Code location: $OE_USER"
  echo "Addons folder: $OE_USER/$OE_CONFIG/addons/"
  echo "Start Odoo service: sudo service $OE_CONFIG start"
  echo "Stop Odoo service: sudo service $OE_CONFIG stop"
  echo "Restart Odoo service: sudo service $OE_CONFIG restart"
  echo "-----------------------------------------------------------"