Monitor loses signal after Ubuntu 16.0.4 i386 installation

Have tried turning the monitor off and on? I have to do this with Ubuntu 18.04 and an Intel NUC.

And you sure the monitor is connected to the right port? If a fitpc has 2 HDMI ports make sure to try the other port as well.

Do both fitpc's have the same bios version and settings?

If you have SSH enabled, you could login and see what's in /var/log/syslog.


Is it possible to kickstart a 16.04.3 install?

Same happened to us, here are what I did:
1. go to old-releases.ubuntu.com, traverse down to the exact release, download the ubuntu-16.04.3-server-amd64.iso to kickstart server.
2. Move the iso to any place under apache's DocumentRoot (i.e. /var/www/html), then create a subdirectory, i.e. /var/www/html/u16.04.3 , then run 'mount -o loop,ro /var/www/html/ubuntu-16.04.3-server-amd64.iso /var/www/html/u16.04.3'
3. change the url line in the ks.cfg file to 'url --url=http://kickstart-server/u16.04.3/ubuntu'
These are what I did in my environment, just throw out the ideas, hope this help.


Run sudo ifdown eth0
Configure static ip address in /etc/network/interfaces or put auto dhcp.
Run sudo ifup eth0
Run /etc/init.d/networking restart


"Ok, this is mainly about spit view: If you start kate and splitted views are restored, you always get that. If you click in all views once, all works fine again."

There is more information in https://bugs.kde.org/show_bug.cgi?id=188764

The bug was fixed in 2011


How can i skip bad sector on my hard Drive?

Bad Sectors on hard drive can not be recovered or ignored. i have seen such questions So please have a look at these -

Question 1

Question 2

Question 3

The Only thing you can do is Get a new Hard Drive as in future fortunately you may loose your important data saved in that.

Precautions are better than Cure.


Backlight won't turn on after suspend on Macbook air (Early 2015)

Workaround: create /lib/systemd/system-sleep/mba_backlit file (chmod +x) with the following:

#!/bin/sh
brt=$(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness)
abrt=$(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/actual_brightness)
logger -t rc.local "no brightness change needed, brightness is $abrt and actual is $abrt"
if [ "$brt" != "$abrt" ] ; then
echo $abrt > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
afterbrt=$(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness)
logger -t rc.local "changed brightness to $afterbrt and actual brightness is $abrt"
else
afterbrt=$(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness)
logger -t rc.local "no brightness change needed, brightness is $afterbrt and actual is $abrt"
fi


There is definitely no need to use gcc-4.3. Of course you always get the warning message during mex-files creating:

Warning: You are using gcc version "4.6.x.x)".  The version currently supported with MEX is "4.3.4". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/

but this is a warning - the MEX function will still compile!!!

The only thing to change is new link on libc.so.6 library:
(see http://morganbye.net/blog/2011/10/matlab-ubuntu-1110)

So for 64 bit:
Remove old link

sudo rm /lib64/libc.so.6

(Be careful when removing the old link. It is essential for Linux to boot. So if you reboot before replacing the link with the new version then it'll be time to dig out a live disk. If you're paranoid then you can copy "cp" libc.so.6 to something like libc.so.6.backup first.)

Replace with new link

sudo ln -s /lib/x86_64-linux-gnu/libc-2.13.so /lib64/libc.so.6

For 32 bit:
(I have not tested this as I only run x64 systems, but from the comments I think it should work)

Remove old link (again be careful with this command)

sudo rm /lib32/libc.so.6

Replace with new link

sudo ln -s /lib/i386-linux-gnu/libc-2.13.so /lib/libc.so.6

Of course if this is a fresh Ubuntu install then you probably wont need the rm (remove) command.


Both Webmin & ISPConfig won't work on my Ubuntu Linode

I was able to get ISPConfig 3 deployed, by following these instructions: The Perfect Server - Ubuntu 12.04 LTS (nginx, BIND, Dovecot, ISPConfig 3)


Step 1 : To get started, press Ctrl + Alt + T on your keyboard to open Terminal. When it opens, run the commands below to enable Gnome session

sudo apt-get upgrade
sudo apt-get install gnome-session-flashback

Step 2 : Restart and on the logon screen, click the option to change your session.

Step 3 : Then choose GNOME Flashback (Metacity)

Enjoy your Desktop

Source : How to switch to GNOME Desktop Environment in Ubuntu 14.04 Trusty Tahr


How to configure JDBC, Tomcat for Eclipse IDE on my Ubuntu 12.04

This does not answer the question.

The main issue here is not that you have to install the mysql connector, that is straight forward, the problem is that ubuntu does not install tomcat-jdbc.jar..  from what I have seen, has no repository containing it.  So you cannot apt-get package to fix this issue.
tomcat-jdbc.jar is REQUIRED to do database pooling, what any SERIOUS web app should be using.
tomcat-jdbc.jar is INCLUDED with tomcat7 as downloaded directly...

So no official way to include it.  This is a worry to developers.

Made me uninstall tomcat7 and use a hand installed version as to make sure dependencies are good.

This is a bug in the Ubuntu repositories.


I had the same issue. I was able to fix it using the following steps:

Removed ~/.config/pulse directory.
Started Pulse Audio.

rm -rf ~/.config/pulse
pulseaudio --start

Incase if its still showing errors you will have to reinstall pulse audio and equalizer.

sudo apt-get purge pulseaudio pulseaudio-equalizer
sudo apt-get install pulseaudio
sudo apt-get install pulseaudio-equalizer
pulseaudio --start


The -mt suffix had been removed. The installed Boost libraries are multi-threading safe.

You can compile your program versus libboost-thread. Either by changing the source to use non -mt libs or by making symbolic links libboost_thread.a →libboost_thread-mt.a. Same thing if you need shared libs .so.


Steam Refuses to Launch on Ubuntu 15.04 64 bit

See the question: Steam won't start on Ubuntu 14.04.1

The steps described in the answers are:

Install libcurl3:i386 as @CharlesGreen suggests in this answer:

  sudo apt-get install libcurl3:i386

Follow @imolit's answer:

  uninstall your Nvidia or AMD driver

  I.e. sudo apt-get purge fglrx* or sudo apt-get purge nvidia-*

  reboot
  start Steam and let it update, while using the open drivers
  reinstall your proprietary driver
  and finally reboot again.

You can also try switching your driver to X.Org X server - see this answer by @Michael:

  Open Additional Drivers
  Select "Using X.Org X server(open source, tested)" driver.
  Then go to Ubuntu Software Center and install Steam (steam-launcher).
  Then change Graphic driver back.


Is there a Gmail notifier that integrates with the Messaging menu?

Try installing the gm-notify package, this will give you :

notifications on new mail,
integration with the messaging indicator.


Ubuntu 12.04 // Likewise Open // Unable to ever authenticate AD users

I see the post is old, but maybe it's worth to answer for others..

Likewise doesn't work with winbind (they refresh their krb5 ticket), you have to choose only one of them :/

after installing pbis you have to run

domainjoin-cli to join the AD
pam-auth-update to update PAM config


Iris Pro 5200 - performance when running on battery

The best I could come up with was to issue the following command:

sudo cpufreq-set -g performance


I thought I'd share that this thread worked for me in case anyone stumbles across this question.

Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics

Thanks!


Command to determine whether Ubuntu is running in a virtual machine?

virt-what
is a shell script which can be used to detect if the program
is running in a virtual machine.

The program prints out a list of "facts" about the virtual machine,
derived from heuristics. One fact is printed per line.

If nothing is printed and the script exits with code 0 (no error), then it can mean either that the program is running on bare-metal or the program is running inside a type of virtual machine which we don't know about or cannot detect.

SUMMARY

sudo virt-what [facts]

FACTS

aws Amazon Web Services cloud guest.

    Status: contributed by Qi Guo.

bhyve
    This is a bhyve (FreeBSD hypervisor) guest.

    Status: contributed by Leonardo Brondani Schenkel.

docker
    This is a Docker container.

    Status: confirmed by Charles Nguyen

hyperv
    This is Microsoft Hyper-V hypervisor.

    Status: confirmed by RWMJ

ibm_power-kvm
    This is an IBM POWER KVM guest.

    Status: contributed by Adrian Likins.

ibm_power-lpar_shared
ibm_power-lpar_dedicated
    This is an IBM POWER LPAR (hardware partition) in either shared or
    dedicated mode.

    Status: contributed by Adrian Likins.

ibm_systemz
    This is an IBM SystemZ (or other S/390) hardware partitioning
    system. Additional facts listed below may also be printed.

ibm_systemz-direct
    This is Linux running directly on a IBM SystemZ hardware
    partitioning system.

    This is expected to be a highly unusual configuration - if you see
    this result you should treat it with suspicion.

    Status: not confirmed

ibm_systemz-lpar
    This is Linux running directly on an LPAR on an IBM SystemZ hardware
    partitioning system.

    Status: confirmed by Thomas Huth

ibm_systemz-zvm
    This is a z/VM guest running in an LPAR on an IBM SystemZ hardware
    partitioning system.

    Status: confirmed by RWMJ using a Fedora guest running in z/VM

ibm_systemz-kvm
    This is a KVM guest running on an IBM System Z hardware system.

    Status: contributed by Thomas Huth

ldoms
    The guest appears to be running on an Linux SPARC system with Oracle
    VM Server for SPARC (Logical Domains) support.

    Status: contributed by Darren Kenny

ldoms-control
    The is the Oracle VM Server for SPARC (Logical Domains) control
    domain.

    Status: contributed by Darren Kenny

ldoms-guest
    The is the Oracle VM Server for SPARC (Logical Domains) guest
    domain.

    Status: contributed by Darren Kenny

ldoms-io
    The is the Oracle VM Server for SPARC (Logical Domains) I/O domain.

    Status: contributed by Darren Kenny

ldoms-root
    The is the Oracle VM Server for SPARC (Logical Domains) Root domain.

    Status: contributed by Darren Kenny

linux_vserver
    This is printed for backwards compatibility with older virt-what
    which could not distinguish between a Linux VServer container guest
    and host.

linux_vserver-guest
    This process is running in a Linux VServer container.

    Status: contributed by Barış Metin

linux_vserver-host
    This process is running as the Linux VServer host (VxID 0).

    Status: contributed by Barış Metin and Elan Ruusamäe

lxc This process is running in a Linux LXC container.

    Status: contributed by Marc Fournier

kvm This guest is running on the KVM hypervisor using hardware
    acceleration.

    Note that if the hypervisor is using software acceleration you
    should *not* see this, but should see the "qemu" fact instead.

    Status: confirmed by RWMJ.

lkvm
    This guest is running on the KVM hypervisor using hardware
    acceleration, and the userspace component of the hypervisor is lkvm
    (a.k.a kvmtool).

    Status: contributed by Andrew Jones

openvz
    The guest appears to be running inside an OpenVZ or Virtuozzo
    container.

    Status: contributed by Evgeniy Sokolov

ovirt
    The guest is running on an oVirt node. (See also "rhev" below).

    Status: contributed by RWMJ, not confirmed

parallels
    The guest is running inside Parallels Virtual Platform (Parallels
    Desktop, Parallels Server).

    Status: contributed by Justin Clift

powervm_lx86
    The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator.

    Status: data originally supplied by Jeffrey Scheel, confirmed by
    Yufang Zhang and RWMJ

qemu
    This is QEMU hypervisor using software emulation.

    Note that for KVM (hardware accelerated) guests you should *not* see
    this.

    Status: confirmed by RWMJ.

rhev
    The guest is running on a Red Hat Enterprise Virtualization (RHEV)
    node.

    Status: confirmed by RWMJ

uml This is a User-Mode Linux (UML) guest.

    Status: contributed by Laurent Léonard

virt
    Some sort of virtualization appears to be present, but we are not
    sure what it is. In some very rare corner cases where we know that
    virtualization is hard to detect, we will try a timing attack to see
    if certain machine instructions are running much more slowly than
    they should be, which would indicate virtualization. In this case,
    the generic fact "virt" is printed.

virtage
    This is Hitachi Virtualization Manager (HVM) Virtage hardware
    partitioning system.

    Status: data supplied by Bhavna Sarathy, not confirmed

virtualbox
    This is a VirtualBox guest.

    Status: contributed by Laurent Léonard

virtualpc
    The guest appears to be running on Microsoft VirtualPC.

    Status: not confirmed

vmm This is a vmm (OpenBSD hypervisor) guest.

    Status: contributed by Jasper Lievisse Adriaanse.

vmware
    The guest appears to be running on VMware hypervisor.

    Status: confirmed by RWMJ

xen The guest appears to be running on Xen hypervisor.

    Status: confirmed by RWMJ

xen-dom0
    This is the Xen dom0 (privileged domain).

    Status: confirmed by RWMJ

xen-domU
    This is a Xen domU (paravirtualized guest domain).

    Status: confirmed by RWMJ

xen-hvm
    This is a Xen guest fully virtualized (HVM).

    Status: confirmed by RWMJ

Sorry but this is your GUY.... ;)


Recover Ubuntu OS after windows update/upgrade?

The Windows install/upgrade process overwrites GRUB, the program which is stored on the start of your disk and which allows you to dual boot.

You can recover without re-installing, just read:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows .


Activating Matlab from Command line and from Launcher

From https://help.ubuntu.com/community/MATLAB, the matlab-support package "add[s] an entry to the launcher and some other features", therefore installing it may be the most straightforward solution. You can install it by running:

sudo apt update && sudo apt install matlab-support


How to properly increase DPI for Desktop Apps installed inside Libertine?

DPI is a known issue in libertine apps on high-resolution screens, currently captured in this bug: https://bugs.launchpad.net/ubuntu/+source/libertine/+bug/1572888

The suggested workaround for the M10 FHD is mentioned in the pastebin linked in the question, but I'll post the important parts here for future readers.

Make the tablet temporarily writable:

phablet-config writable-image

Perform a restart on the tablet, and then log in with adb or phablet-shell. Edit the file /usr/bin/libertine-xmir and change the exec line:

exec Xmir -dpi 144 -title @ $@

where 144 is your preferred DPI number. Once finished editing, I recommend making the tablet read-only again:

sudo rm /userdata/.writable_image

The next time you restart, your tablet will be in readonly mode again. The change to /usr/bin/libertine-xmir could be reverted by any updates to libertine (OTA or otherwise). Hopefully this issue will be prioritized eventually and we won't need this hack.


Dual boot ubuntu on Dell windows 10 laptop

I think you can find all the answers here. Installing Ubuntu alongside Windows is not really complicated. Comment in that answer (or send me a private message if it's possible on that forum??) if you need further help.


How to get Logitech C510 webcam working in Cheese/Skype

Try experimenting with the hacks on this site:
https://wiki.ubuntu.com/SkypeWebCams

The following worked for me:

Open Text Editor and enter:

#!/bin/sh
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

save as skype.sh

And set in permissions : Allow file executing as a program.

Edit the menu item by opening "Main Menu" from launcher or running alacarte in the command prompt. Find Skype and change the command to point to the script file.


I don't know where you got your instructions from but I believe you are misunderstanding the process unless I am too. From that site, I downloaded the .gz file and uncompress it the instructions are:

Uncompress with gunzip -d spin649_linux64.gz
Rename the file to spin mv spin649_linux64 spin and make executable with sudo chmod +x spin
Place that file in the any of the following locations:

/usr/local/bin, /usr/bin, /bin,

or any other directory within your search path.
Run that file with just the command spin after closing and reopening your terminal

Update: Nowe looking around I see where you got the instructions from but you missed the part where you ought to put the built binary in your system paths.

Use these steps:

gunzip *.tar.gz
tar -xf *.tar
cd Src*
make

If step 4 gives the error make: yacc: Command not found, then install bison with sudo apt install bison and run the make command again. Now you will see a spin file in that folder move that into any of the following paths: /usr/local/bin, /usr/bin, /bin. Close and open your teminal now you should be able to run the spin command.

Update2:

If you ran that command like this

 ../Src6.4.9/spin hello.pml

as the spin binary is in another folder you won't get that error. But move that spin binary in the Src* folder into your file path to launch spin from anywhere.


Setting up ubuntu as a wireless accesspoint

I somehow got it working. Here is the tutorial that I did: Ubuntu netbook as a wireless access-point and router


Keyboard layouts in Ubuntu are stored in /usr/share/X11/xkb/symbols/. The easiest way to get your desired result is to create a new layout by copying an existing one. Choose the one you are using at moment (you can have a look inside the files to find see the user friendly name of a layout). So for English (US) type

sudo cp /usr/share/X11/xkb/symbols/us /usr/share/X11/xkb/symbols/us_math

into a terminal window. Now you have to edit the key specifications of the number keys. Open the file for editing, for example:

gksudo gedit /usr/share/X11/xkb/symbols/us_math

Search for the layout variant you are using, in the case of English (US) you will find it at the beginning of the file:

name[Group1]= "English (US)";

Change this text to:

name[Group1]= "English (math)";

Below you see the definition of the particular keys. Change (or insert, if you are using a variant that doesn't explicitly define these keys) the entires for keys AE01 to AE10. In our example we would replace

key <AE01> {    [     1,    exclam      ]   };
key <AE02> {    [     2,    at      ]   };
key <AE03> {    [     3,    numbersign  ]   };
key <AE04> {    [     4,    dollar      ]   };
key <AE05> {    [     5,    percent     ]   };
key <AE06> {    [     6,    asciicircum ]   };
key <AE07> {    [     7,    ampersand   ]   };
key <AE08> {    [     8,    asterisk    ]   };
key <AE09> {    [     9,    parenleft   ]   };
key <AE10> {    [     0,    parenright  ]   };

by

key <AE01> {    [     exclam,   1   ]   };
key <AE02> {    [     at,       2   ]   };
key <AE03> {    [     numbersign,   3   ]   };
key <AE04> {    [     dollar,   4   ]   };
key <AE05> {    [     percent,  5   ]   };
key <AE06> {    [     asciicircum,  6   ]   };
key <AE07> {    [     ampersand,    7   ]   };
key <AE08> {    [     asterisk, 8   ]   };
key <AE09> {    [     parenleft,    9   ]   };
key <AE10> {    [     parenright,   0   ]   };

This will give you access to the special keys without using Shift and by Shift-ing you will be able to write numbers if you like to. Now edit anything else you like and save and close the file.
In the last step we will register the new keyboard layout with Gnome so you will be able to select it from the System settings.

Therefore open /usr/share/X11/xkb/rules/endev.xml in the text editor of your choice, f.e.:

gksudo gedit /usr/share/X11/xkb/rules/evdev.xml

Find the text <layoutList> and insert the following description directly after it:

<layout>
  <configItem>
    <name>us_math</name>

    <shortDescription>en_math</shortDescription>
    <description>English (math)</description>
    <languageList>
      <iso639Id>eng</iso639Id>
    </languageList>
  </configItem>
</layout>

After saving the file you have to restart the X server. As Ctrl+Alt+Backspace didn't work on my system I restarted the system and was now able to select the new layout in System Settings... -> Keyboard Layout.


Run a shell script from another script concurrently in a new terminal window

Tried increasing the buffer on your terminal?

In terminal edit>profiles>edit>scrolling tab


I am the admin but not the owner. How do I become the owner

The best way to edit system files is to open them in a text editor with root permisions.

So:

sudo nano /etc/default/grub

or as Radu Rădeanu suggested:

gksu gedit /etc/default/grub

will work perfectly.

You might want to make a backup copy in case you mess up:

sudo cp /etc/default/grub /etc/default/grub.backup

To restore:

sudo rm /etc/default/grub
sudo mv /etc/default/grub.backup /etc/default/grub

It's not a good idea to change ownership of system files.


I have tried playing VCDs and DVDs but I always get this type of error: ubuntu 14.04

Try going to the Software Center and installing the proper codecs for playing CDs once you do that, you should be able to play them.


You must be logged as administrator, and click the green button "add user" and choose "standard" account type for guest user.


What does the -d option do in update-manager?

-d updates you to the latest development release, from the manpage:

   -d, --devel-release
          Check if upgrading to the latest devel release is possible


How to delete GRUB entirely from GRUB rescue and boot Windows only

Assuming you are using Windows 7 (this should also work on Vista and Windows 8):

Put the Windows 7 installation/Upgrade disc in the disc drive, and then start the computer (set to boot from CD in BIOS).
Press a key when you are prompted.
Select a language, a time, a currency, a keyboard or an input method, and then click Next.
Click Repair your computer.
Click the operating system that you want to repair (Windows 7 in this case), and then click Next.
In the System Recovery Options dialog box, click Command Prompt.
Once in the command prompt, type exactly Bootrec.exe /FixMbr and then press ENTER. You will see "operation completed successfully." (Doesn't even take a second. Don't be alarmed )
Reboot and set BIOS to boot from the HDD again.

GRUB will be overwritten in step 7 and Windows bootloader will once again take control of loading your OS(s).

Source


P.S. I'm using proprietary drivers from nvidia-current-updates.

This is the problem.

Do this:
into /etc/default/grub find the line

GRUB_GFXMODE=auto

and uncomment/change to

GRUB_GFXMODE=1920x1080
GRUB_GFXPAYLOAD_LINUX=keep

Then, into /etc/grub.d/00_header find the line starting with

if [ "x${GRUB_GFXMODE}" = "x" ] ...

and change it to

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1920x1080 ; fi

then, below, find the block below

set gfxmode=${GRUB_GFXMODE}

and change it to

set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
load_video
insmod gfxterm

after, execute

sudo update-grub

Reboot and all should be OK.

Tested starting from Ubuntu 13.04 and Mint 15 with a Nvidia GeForce 9600 GT.


Insert your "live" DVD-ROM or USB "thumb" drive and start the process to install Ubuntu, then select "Replace Windows 'x' with Ubuntu" during the setup (as per step four: http://www.ubuntu.com/download/desktop/install-ubuntu-desktop ) and Ubuntu will do the rest... Just make sure you have everything backed-up first - this will wipe your computer beforehand!

There are ways to achieve this without wiping the computer first, but with Ubuntu 14.04 LTS ("Trusty Tahr") becoming available yesterday/today/tomorrow (depending on where you live...), you're going to have a much cleaner and more efficient system after doing a complete, "clean" installation... A "clean" installation is also easier, and will ensure that your new Ubuntu 14.04 LTS ("Trusty Tahr") installation doesn't have any left-over "junk", which could slow things down or take-up valuable space.


Why doesn't Mozilla release .deb and .rpm packages for their software?

I think this question can only be definitely answered by some one from Mozilla. My guess is that they dont do it because they dont need to. When Ubuntu's Mozilla team is already doing a fantastic job why would Mozilla want to waste their resources re-doing the same? They are better off focusing on making Firefox better than packaging it for different platforms.


Whenever my GRUB breaks, I do the following to reinstall GRUB:

Prepare a bootable USB Stick (e.g. with unetbootin) with the current Ubuntu image or burn a DVD. Now boot from it into a live system and open a terminal. Then type

sudo grub-install /dev/sda
sudo grub-update

This assumes /dev/sda is your primary hard drive and you want to install GRUB there ;). Afterwards you should have a working GRUB again.

Note: Sometimes GRUB fails to detect other operating systems. Mount the relevant partitions with Nautilus by simply clicking on them, if they don't show up in terminal, while executing grub-update.


Kdenlive dark theme on Ubuntu 20.04 (How to Enable?)

run sudo apt install breeze in terminal
Restart Kdenlive


Backports are

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

Kubuntu Backports

https://launchpad.net/~kubuntu-ppa/+archive/backports:

  PPA description

  Backports of new versions of KDE and major KDE apps for Kubuntu which
  are either too large a change or not yet tested enough to go to Ubuntu
  Backports.

There is available for the Lucid: qt4-x11 (4:4.7.0-0ubuntu2~lucid1~ppa2).

Upgrading from a PPA

  I'm running xubuntu and I really don't understand backports anyway.

You could go to the Kubuntu Backports and click the "Read about installing": https://launchpad.net/+help-soyuz/ppa-sources-list.html. Upgrade will only upgrade the installed packages (Qt).

Downgrade from the PPA

A package:

:~$ apt-cache show ppa-purge

  Description: disables a PPA and reverts to official packages

  This program disables a PPA from your Software Sources and reverts your
  system back to the official Ubuntu packages. You can use this to
  return your  system to normal after testing a new version from a PPA.

  Homepage: https://launchpad.net/ppa-purge

It is available from the lucid-backports: http://packages.ubuntu.com/search?keywords=ppa-purge&searchon=names&suite=all&section=all

More:

What's the name of PPA? (for ppa-purge)
How do I remove all packages from a certain repository?
http://bigbrovar.aoizora.org/index.php/2010/01/10/how-to-safely-remove-ppa-repository-from-ubuntu/


If you want a specific app in your vnc session, you can use vnc4server and edit .vnc/xstartup to start your application. But the shared desktop won't be your physical X11 display, but another (virtual) display.

An alternative would be to use ssh / X11 forwarding (ssh -X server) : any graphical application you launch is redirected to your local desktop.


What are the default permissions for the /sbin/ directory?

755 is the magic number you are looking for :)


Yes, this problem happened because usermod -p expected the password hash (i.e., the encrypted password), not the cleartext password.

From man 8 usermod:

  -p, --password PASSWORD

  The encrypted password, as returned by crypt.

  Note: This option is not recommended because the password (or
  encrypted password) will be visible by users listing the processes.

  The password will be written in the local
  /etc/passwd or /etc/shadow
  file. This might differ from the password database configured in your
  PAM configuration.

  You should make sure the password respects the system's password
  policy.

You can get back in the same way you would if you lost the administrator password under any other conditions.

If you have an administrator account, and it's not the account you specified as <username>, you can get it back by changing the password in the usual way:

sudo passwd <username>


That is the Unity Mt Grab Handles ( a compiz plugin). It gives you a move point (center) & resize handles.

To use - open the plugin  in ccsm (compizconfig-settings-manager) & set a binding either for 'toogle handles' & or 'show handles'

It's value on a desktop/laptop install is questionable, there are easier ways to move & or resize windows & the plugin has been known to cause issues

If you have ccsm installed & wish to go directly to the plugin run

ccsm -p unitymtgrabhandles

Edit: if deciding to use, -  keep in mind that ccsm does not check for general keyboard binding conflicts so choose wisely


Windows network missing from Nautilus after reboot

Strangly- a .desktop file was fowling up my Nautilus. I had created a .desktop file with the command gksu nautilus and added it to the unity launcher. Although I wasn't running nautilus through the .desktop file, the window title (which I had imaginatively called Nautilus as Root in the .desktop) was suggesting it was being run. I deleted the .desktop file, which prevented me from opening nautilus at all (even from terminal nautilus). A reboot solved this, and my nautilus network discovery is back online (with some other problems - opening a new question).


18.04 is slow in VirtualBox—how to make is usable?

You can install different desktop environments on Ubuntu. Xfce or Mate are pretty fast. Or even better install fresh Ubuntu Mate or Xubuntu 18.04.


If you open a terminal and type ps axu | grep gvfsd you will see what instances of gvfsd are running.

It will show you where the process is running from and what arguments it was passed when started. It will also show you when it started and the user that started it.


What do prefetchable and non-prefetchable memory in results of lspci -vnn mean?

To show the manufacturer of the GPU and other verbose information about the GPU, open the terminal and type:
lspci -vnn | grep VGA -A 12

The first line of the output has the name of the vendor, the model name/series and the pci id. Note the numbers enclosed by a pair of brackets having the form 1234:5678. Such a number is present for almost all graphics cards. The first 4-digit number (1234) indicates the vendor id and the second number (5678) indicates the pci id, which indicates the model of the graphics processing unit.

Prefetchable memory is memory which the CPU can request in advance as an optimization, before actual code operates on it. This happens because the CPU guesses it may be needed in the future or because the code contains explicit prefetch instructions. Then it prefetches those memory locations while processing some other instructions or doing some other work.
It isn't a special kind of memory, it is simply a region of memory marked as prefetchable or not by the operating system. Not prefetching may be desirable as an optimization in some cases or even required if the said region is memory-mapped I/O.

   Source: What is prefetchable memory?

Does an integrated graphic card use some fixed memory in kernel RAM or user space?

Prefetchable memory is a region of memory marked as prefetchable by the operating system. In the results of lspci -vnn in the question the system has 256MB of prefetchable memory dedicated to the GPU.

Does it have its own memory?

Some models of integrated processors have their own memory and some don't. Intel Iris integrated GPUs have a small amount of onboard memory to help speed them up. Intel family of 8th generation Core Processors with Radeon RX Vega M GL graphics have 4GB of second-generation High Bandwidth Memory (HBM2).


Is there any utility to check whether my laptop battery is in healthy condition or not?

You can try Battery Status 0.1

  Battery Status is a project for GNOME, that shows information about laptop battery state. It has some additional features, so usual icon of GNOME Power Manager can be removed from Notification/Indicator Area. Battery Status doesn't rely on GNOME Power Manager directly, but counting on presence in system for some useful integration with it.

Features:

Using the Battery Status applet, the user can access:

Battery Status dialog
Power Statistics (provided by GNOME Power Manager)
"Show" setting
CPU frequency scaling (provided by gnome-applets/cpufreq-applet)
Power Management preferences (provided by GNOME Power Manager)

Add the ppa ppa:iaz/battery-status to your software sources (here's how to do that) and install battery-status from the software center .

You can run it as an indicator using the following command:

/usr/lib/battery-status/battery-status --indicator


The short answer is that you can't log it if you don't run a webserver listening on https. https goes to a different port (443). When a https-request comes to a webserver without https enabled, it will hit a closed port. The operating system will reply - and your php script will never be aware of the request.

Anyway, the solution today is to always use https. There's no good reason not to use TLS with a public-facing website. With Let's Encrypt, it's trivial to automate and it's free. So my suggestion would be to use https for everything, and set up a redirect from http to https for your site.

This howto fro DigitalOcean gives you information on configuring it. You may also ask a question on AskUbuntu on how to configure TLS on Ubuntu.


A list of reported issues with the Lenovo S10 can be found on the Ubuntu Wiki. According to that, you may install the restricted non-free drivers to make wireless function properly.

You can look at this answer for help installing Broadcom 43** drivers... Which is what I believe your netbook has (not sure, though).


apt-get install mysql-server doesn't ask root password and server doesn't start

I ended up reinstalling Ubuntu. I guess this solution might not be suitable in other cases but this is what I did.


Ubuntu studio/xubuntu 12.04 instead of Ubuntu 12.04/12.10 for CAD/ arhcitectural workflow. Worth it?

I would suggest installing Kubuntu instead, and then just install whatever free software you want. Ubuntu Studio doesn't come with anything you can't get in Ubuntu/Kubuntu anyway.

I went with Kubuntu because Unity, being based on Compiz, cannot support more than one graphics card. I think KDE is better than Unity anyway. The KDE project has been under active development since 1996 and it's got a much cleaner interface. I can design stuff on the center monitor and have auxiliary information on the side monitors. This is EXTREMELY nice when you are designing something and need to look at photos or read information, because there is almost zero context switch. You can look at supporting information without making the main app "go away." If you're already running your brain at full tilt, every bit helps, and this is a game changer.


How to bind Alt+Arrows to PageUp/PageDown?

Install xbindkeys and xte:

sudo apt-get install xbindkeys xautomation

Next we need to find the key mappings for Alt+Arrow.

Run xbindkeys -k and press Alt plus whatever arrow key you want.  For Alt+Up Arrow I get:

"NoCommand"
m:0x18 + c:111
Alt+Mod2 + Up

Now that we know what the bindings for our keys are we need to create the .xbindkeys configuration file.  Run:

touch .xbindkeysrc
gedit .xbindkeysrc

touch creates the file and gedit opens it.  Now add:

"xte 'key Page_Up'"
m:0x18 + c:111
Alt+Mod2 + Up

To the file and save it.  This will bind Alt+Up Arrow to PgUp.

The basic syntax for xbindkeys is:

"command to run (in quotes)"
keysym of key

Your complete file should look almost identical to this:

"xte 'key Page_Down'"
m:0x18 + c:116
Alt+Mod2 + Down

"xte 'key Page_Up'"
m:0x18 + c:111
Alt+Mod2 + Up

Now add xbindkeys to "Startup Applications" to make it run when you boot your computer.
Click 'Add' and put /usr/bin/xbindkeys in the 'Command' field.

Click 'Add' again and reboot.


Speakers Suddently Don't Work, Only Headphones Work

Since the headphone is working fine then this should NOT be driver issue.
Ensure that volume settings are fine. Try to boot from ubuntu live CD if possible and check sound works fine.


Asus X540S laptop microphone not working

In terminal:

sudo apt-get install alsa-tools-gui
hdajackretask

Then: Show unconnected pins, override pin 0x12 to internal mic. Install boot override.

It worked in Ubuntu 14.04


'utf-8' codec can't decode byte 0xed when running sudo update-command-not-found

Just for anyone with a similar problems, the easiest solution is:
LC_ALL=C.UTF-8 update-command-not-found

And this works for a lot of similar UTF-8 issues related to any kind of installs. Beleave me!


same problem here, it hit me last night (again). last time i removed new kernel then rebooted with an old kernel and the issue was gone, but this time i was helpless. searching through internet i was told to "remove r8168-dkms" but i never had r8168-dkms ever installed. so how about the opposite, to install the r8168-dkms?
since this network card is the only one on board, so there was no network access in the system. used yumi and ubuntu 20.04 desktop iso image to make an usb live cd to boot, fortunately the network was usable in it. then downloaded the r8168-dkms package in the live system, via the following commands:
sudo -i
# mount the real os, and get into it
mount /dev/sdX /mnt
chroot /mnt
# apt download package and dependencies into /var/cache, without installing them
apt install --download-only r8168-dkms
reboot

rebooted back into the real ubuntu system, run this:
sudo -i
# install the cached package
apt install r8168-dkms
reboot

done, hope this can help someone


I want to upgrade VirtualBox 4.3.10 to the latest version 4.3.28 so i can install the extention pack to enable USB 2 support

You do not need to remove it. It is same package virtualbox-4.3.
Just install it and it will upgrade.

You can also add Virtualbox repository and it will be upgrade automatically.

Directions are at Virtualbox site


I think it is a very easy task. I've googled around, and I found these software:

DeVeDe - recognizes FLV
SaveYouTube.com - you can download videos in MP4, etc... which is recognized by the default DVD writer.

I hope, it helps


Battery Issue with Ubuntu 18.04 on lenovo X1 carbon (6th gen)

Have you tried completely removing the battery while it's unplugged.....pressing the start button with the battery still out, then re installing the battery and powering up?

If it's an issue with ubuntu, you should still get something to flash on the screen such as BIOS messages.  Otherwise, check the user guide for how to disable quick boot then try again.

If none of that helps just try to power it up on just the battery.   If nothing at all...no clicks, no whirring sound at all, I would suspect there's a problem with the battery.


12.04 on Pentium Dual Core with 1GB or ram running slow

Lubuntu would be a better alternative.

Honestly, I would go for a very specific install with a tiny distro, or probably ubuntu minimal disc to avoid any unnecessary packaged that would make the life hard for you hardware; consider using a window & file manager double instead of a full desktop enviroment.


Installing Ubuntu from Windows 7 Problem

Do you mean that you are trying to boot to a live cd/dvd/pendrive, or that you are trying to install/installed Ubuntu and are trying to boot to it?


How can I update 12.04 without update manager?

It means there are other package management applications currently running e.g. Software Center, Synaptic, apt-get.

To make sure no other packaging management applications are running, open the terminal and run:

sudo killall -9 apt-get

then do another update by running:

sudo apt-get update
sudo apt-get upgrade

If the problem persist, it's because the lock file still exist. You need to delete it by running this in the terminal:

sudo rm /var/lib/dpkg/lock

Now try to update or upgrade again.


How do I solve "Incorrect permission on/usr/lib/policykit-1/polkit-agent-helper-1(need to setuid root)"?

This is the solution I came up with and tried, and it seemed to work, not sure why the permissions changed on this file though.
sudo chmod 5755 /usr/lib/policykit-1/polkit-agent-helper-1

I also saw a version that tried: sudo chmod +s ... but I didn't like the file permissions, so I opted to mirror the other permissions for the files in /usr/lib/policykit-1/

See: Chmod 5755

Read more about polkit on the manpage


How to make an Ubuntu live USB stick in Fedora?

Update: Sorry for providing a tutorial for Unetbootin, but it might be helpful if you're having problem with the dependencies.

Command Line - using dd

You can make a live USB using command line.

Download the ISO.
Insert USB stick with at least 4GB capacity (it will be wiped).
Run sudo fdisk -l and note down the device name of the flash drive. You would be able to find it somewhere near the bottom lines. For example, let the name is /dev/sdb1.
Use the following command to write the ISO on the flash drive:

sudo dd if=/path-to-the-iso/ubuntu-18.04.1-desktop-amd64.iso of=/dev/sdb bs=8M

You'll need to enter your password to run this and previous commands as root with sudo. To have the ability to run programs as root, you'll need to be a member of the group wheel.

Important Points:

The name of the device should be used i.e. of=/dev/sdb and NOT /dev/sdb1. It is because sdb1 is the name of the partition, not the device.
path-to-the-iso should be replaced with the path where the ISO is. For example, if it is located in /home/user/Downloads, it should be like if=/home/user/Downloads/ubuntu-18.04.1-desktop-amd64.iso.
The name of the ISO file should be changed according to the version downloaded.
dd would format the flash drive, so make sure to take a backup, if you've any files you don't want to lose.

Command Line - using live-iso-to-disk tool

You can find the tutorial here:

http://fedoraproject.org/wiki/How_to_create_and_use_Live_USB#Using_the_livecd-iso-to-disk_tool

Using Unetbootin

Edit: Although the screenshots are from Ubuntu, they won't differ much in Fedora (except for the look, ofcourse). They are given just for reference.

Install unetbootin.

sudo yum install unetbootin

OR you can get it from their website.
Install syslinux and p7zip

sudo yum install syslinux syslinux-extlinux
sudo yum install p7zip p7zip-plugins

Execute unetbootin

You should access it this way if you've downloaded it manually, from the website.

sudo /<path-to-the-executable>/unetbootin

If you've installed it from the repository.

sudo unetbootin

If you've already downloaded the ISO, select the iso and the flash drive and click OK.

You can also select the distribution and the version, if you don't have the ISO. Although the list may not be updated, so it is recommended that you download it directly from the distro website.


Switch from Windows 7 to Ubuntu 13.04 question

It depends on your computer's architecture. Check whether you have a 64 bit or 32 bit OS.
If it is 64 bit you can choose either amd64 or i386.  If it is 32 bit you must choose i386.


I actually solved this through a twostep process:

used xdotool to simulate keyboard events.
used irexec to listen to specific IR events, and then fire off the script

$irexec /etc/lirc/lirc.greeter.conf

Here is lirc.greeter.conf

begin
    remote = mceusb
    button = KEY_UP
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Up
end

begin
    remote = mceusb
    button = KEY_DOWN
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Down
end

begin
    remote = mceusb
    button = KEY_OK
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Return
end

and the script it sends the event to:

#!/bin/bash

LOGIN=`who | grep tty7 | /usr/bin/awk '{ print $1 }'`

if [ -z "$1" ];
  then
   echo "usage: greeter_sendkey CMD"
   exit 2
fi

if [ "$LOGIN" ];
   then
     echo "$LOGIN is logged into console"

   else
    export XAUTHORITY=/var/run/lightdm/root/:0
    export DISPLAY=:0
    /usr/bin/xdotool key $1
fi

The who command checks to see if anyone is logged into tty7 the local graphical session. If there is no one logged in, assume the greeter is running.
As the script needs to interact with the X server, it needs the xauth file. This is the xauth file for ubuntu 12.04


Color emoji fonts won't be available in Ubuntu 17.10. Missing requirements are:

cairo 1.15.8
fontconfig 2.12.5
a color emoji font

The top two requirements are low-level libraries and therefore are not good candidates even for a PPA for 17.10, but they will likely be available in Ubuntu 18.04 LTS.

Source: Ubuntu Desktop Trello Card


When I plug in a phone with pictures, it does not appear in the files application

Have not installed in 20.10, although I have it. I use 20.04 as main working install. I typically install these, but still manually mount & pair.
apt-get install ideviceinstaller python-imobiledevice libimobiledevice-utils python-plist usbmuxd

sudo mkdir /mnt/iPhone
sudo chown  $USER:$USER /mnt/iPhone
sudo chmod  a+rwX,o-w /mnt/iPhone

idevicepair pair
ifuse /mnt/iPhone/

to unmount:
fusermount -u /mnt/iPhone
idevicepair unpair

And then drill down from / into /mnt and then /mnt/iPhone folder. You could mount to /home, /media, or anyplace you prefer.


How do I apt-get -y dist-upgrade without a grub config prompt?

The /etc/default/grub file is generated at package install time, which is necessary because it integrates with debconf. This means that it can not treated as a dpkg conf file, and so dpkg's configuration file handling doesn't know about it.

Instead, it uses ucf, a more sophisticated Debian tool for handling configuration. This, unfortunately, doesn't understand dpkg options, so setting Dpkg::Options::="--force-confdef" won't help. It does have its own way of doing no-prompt upgrades, though, through the UCF_FORCE_CONFFNEW and UCF_FORCE_CONFFOLD environment variables.

ucf uses debconf for prompting, so setting the debconf interface to noninteractive will also silence the message. If you really want non-interactive updates you'll need to do this anyway - arbitrary packages may ask debconf questions (although they generally won't during upgrades).

You can set the debconf interface as a one-off by adding DEBIAN_FRONTEND=noninteractive to your environment, or can set it permanently by running dpkg-reconfigure debconf and selecting the noninteractive frontend. If you're using the noninteractive frontend you'll get the default answer for any questions a package might ask.

For ucf, the default answer is “keep the existing file”.

So, the full command to do a really, 100% guaranteed¹ no-prompting update would be.

sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

¹: It's technically possible for packages to use another method of prompting than debconf, but this is against Debian policy. If you run across such a package, file a bug.


How do I help uploading (printer) drivers to the Ubuntu repositories?

In this case, that question does apply.

The Brother printer drivers are, as far as I can see, under GPLv2 which means they're redistributable without permission from Brother under the terms of that license.

The hard part is collating them into something that is useful. You could generate a billion packages (one for each printer) or group them together to form single packages. This is largely a different topic (there are questions on packaging) but you'll want to talk to the people who maintain the drivers for printers in Ubuntu to see how things are currently done.

But license wise, you should be fine.


Ubuntu Studio 14.10: Need Driver for Epson Workforce 1100

Please open a terminal and do:

sudo apt-get install printer-driver-gutenprint

After it completes, open Printers from the dash and add the printer. The driver will be available here:


How to open webpage from wireframesketcher link?

Support for external links was added in WireframeSketcher v3.8.1.


How does display manager know which WM/DE to run?

The sessions available to log in to are set using .desktop config files stored in /usr/share/xsessions. The way the DM initializes the desktop can vary depending on the DE, but this directory is where the DM looks, and the files specify how to start it.

Different DMs handle desktop selection differently. In Ubuntu (using the default LightDM), you can click the Ubuntu icon in the upper right of the "login pane" to change DEs:

Most DMs will provide a configuration file, where a system default session can be selected. It may also store the last used session for each user, e.g. to allow one user to always login to Gnome instead of Unity.

When you log in, the DM simply looks at if you have a preference stored, then runs the .desktop file for the session in your preference or the system default.


How do I access a shared volume from terminal?

The partition, that is shown as "967GB Volume" on the left can also be seen with the command

df

or if you wish

df -h

You can use the cd command to change the current directory of a terminal window to the mountpoint, where the partition is mounted.

For example

cd /media/cbll/long-uuid-string
ls -l

Please ask if you want more details.


You can, under Windows, create a bootable USB Pendrive (I always use this software, and never gave me any issues: http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/)

Then, plug it in, on the BIOS, set it to boot from USB, and done, boot up a LiveUSB session, and install from there.


Found it on the DuckDuckGo search engine. Tracker is a search engine, search tool, and metadata storage system. It provides an indexer, tag database, extensible metadata database, and a database for first class objects.

For more info, read the Ubuntu Wiki page here: https://wiki.ubuntu.com/Tracker

Or you can check out the Gnome project page here: https://wiki.gnome.org/Projects/Tracker


Reducing Jitter on Ubuntu 15.04 low latency

It would appear that in this situation, the -generic kernel has less spurious interrupts than the -lowlatency kernel. The boot command line parameters and machine are the same.

In 85 seconds, the low latency kernel interrupted a test 85K times, whereas the generic kernel interrupted it 7K times.  Additionally the length of the interrupts were shorter.

The low latency kernel is above 2.5 us all the time whereas the generic kernel is above 2 us about 20% of the time.


the driver from the "additional drivers" menu is actually the AMD one. It could be that it is not the latest driver, but at least it's a driver known to work with your Ubuntu version.
And also, installing it from the "additional drivers" menu is very easy, while installing the driver from the ATI website can be tiresome and tricky.

So, I would install it from the "additional drivers" menu. That's the propietary ATI driver and will give you 3D accelleration.

Good luck!

ps: if the menu shows the choice between two drivers (one normal one and one saying 'post-install updates'), do NOT install the post-install updates. That has been known to break systems in some cases and give lots of error messages.


Full Credit goes to: https://www.ascinc.com/blog/linux/how-to-build-a-simple-router-with-ubuntu-server-18-04-1-lts-bionic-beaver/

I will assume for the following that you just installed Ubuntu 18.04 and have not done anything with it yet.

0. Turn on the firewall in order to make sure the routing rules are actually applied

sudo ufw enable

1. Setup The Network Interfaces

First, we need to configure the network interfaces we will be using.
WAN (enp0s7) – this interface will get an IP from the ISP, so we leave it using DHCP.

LAN (enp3s0f0) – we configure the interface with a static IP within the subnet we are going to use for local area network

Just a little note, Ubuntu 18.04 does not use the traditional network configuration file /etc/network/interfaces. It uses NETPLAN. In my case, there is a config file, called 50-cloud-init.yaml inside the /etc/netplan/ folder. In your case, the file may have a different name, just look for the file with .yaml extension inside netplan folder.

Let’s open it with nano:

sudo nano /etc/netplan/50-cloud-init.yaml

Edit it accordingly to your network needs, in my example I configured like this:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        enp0s7:
            dhcp4: true
        enp3s0f0:
            addresses:
            - 192.168.1.1/24
            dhcp4: false
            nameservers:
                addresses:
                - 8.8.8.8
                - 8.8.4.4
                search: []
    version: 2

To sum up: enp0s7 which is the WAN, gets IP from internet provider’s modem. enp3s0f0 is LAN part of the router. We need it to have a static IP and DNS servers (in my example I used Google’s). Also we didn’t configure any gateway on enp3s0f0.

Save the configuration with following commands:

sudo netplan generate
sudo netplan apply

2. SETTING UP A DHCP SERVER

Next, we want to set up a DHCP server. We really don’t want to configure each client with static IP within the LAN network. For this task, we need to install the following package.

sudo apt-get install isc-dhcp-server

Next we need to edit /etc/default/dhcpd.conf file. This tells the DHCP server which network interface it should be listening to. In my case it of course enp3s0f0, the LAN interface.

We enter the command:

sudo nano /etc/default/isc-dhcp-server

And edit accordingly, in my case it is:

INTERFACES="enp3s0f0"

Next step would be configuring the DHCP server. This is done by editing the file /etc/dhcp/dhcpd.conf

sudo nano /etc/dhcp/dhcpd.conf

Here is a bunch of different parameters, most of them are commented with # before every line. To keep it shorter, I will write it down only the parameters I used and/or edit them accordingly my needs. If you want, you can delete all the content of this file and just copy/paste the code below. Of course, you change the IPs, GATEWAYS, etc.. according to your own network configuration.

option domain-name "whatever.you.want";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
     range 192.168.1.101 192.168.1.200;
     option subnet-mask 255.255.255.0;
     option routers 192.168.1.1;
     option broadcast-address 192.168.1.255;
}

Now let’s apply the settings and enable the DHCP server on boot with following commands:

sudo systemctl restart isc-dhcp-server
sudo systemctl enable isc-dhcp-server

With the following command, we check the status.

sudo systemctl status isc-dhcp-server

If everything is correctly set up, there must be a line, saying “ACTIVE“. Otherwise, you messed something up within /etc/dhcp/dhcpd.conf file. It may be missing some semicolon or bracket.

3. CONFIGURING FIREWALL

In order to have a functional router, we need to configure the firewall properly. This is done by writing down some iptables rules. In order to preserve the rules if the server is restarted, I created a script to be executed at boot time.

In Ubuntu 18.04 the file /etc/rc.local doesn’t exist anymore. But we can still create it with:

sudo nano /etc/rc.local

Next, copy/paste the following script. There are comments explaining each iptables rule. You can delete them if you wish, but you must NOT delete #!/bin/bash. Also, change enp0s7 and enp3s0f0 if your network interfaces have some different names.

#!/bin/bash

# /etc/rc.local

# Default policy to drop all incoming packets.
iptables -P INPUT DROP
iptables -P FORWARD DROP

# Accept incoming packets from localhost and the LAN interface.
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i enp3s0f0 -j ACCEPT

# Accept incoming packets from the WAN if the router initiated the
#  connection.
iptables -A INPUT -i enp0s7 -m conntrack \
--ctstate ESTABLISHED,RELATED -j ACCEPT

# Forward LAN packets to the WAN.
iptables -A FORWARD -i enp3s0f0 -o enp0s7 -j ACCEPT

# Forward WAN packets to the LAN if the LAN initiated the connection.
iptables -A FORWARD -i enp0s7 -o enp3s0f0 -m conntrack \
--ctstate ESTABLISHED,RELATED -j ACCEPT

# NAT traffic going out the WAN interface.
iptables -t nat -A POSTROUTING -o enp0s7 -j MASQUERADE

# rc.local needs to exit with 0
exit 0

This script must be executed at boot time, so we need to make the file executable with the following command:

sudo chmod 755 /etc/rc.local

The default settings on UFW firewall mess with our configuration, and in order for our router to work properly (to forward packages from WAN to LAN), you need to enable the following parameter inside /etc/ufw/sysctl.conf file.
We run the command:

sudo nano /etc/ufw/sysctl.conf

Now we just remove # in front of the following line:

net/ipv4/ip_forward=1

There we go! We have a working router, just do a sudo reboot command to reboot the server.


What is the difference between Gnome Compiz Flashback and Gnome Metacity Flashback?

The backend is different: Compiz uses a 3D compositor to display the windows. Whereas Metacity displays the windows in 2D. So if you have a low end graphics card and/or want to save energy on a mobile device I would suggest that you use metacity.

There also used to be problems with 3D applications in combination with compiz.


/media/administrator directory showing 2 folders of the same external usb drive

The solution is simple. To be sure, unmount your external HDD and check the folders in /media/administrator again. Now, there should be only one (empty) folder. Remove the folder with sudo rights:

sudo rmdir /media/administrator/HDD1

Explanation

Your system usually creates and removes the folders automatically, if you plugging an external device. The problem was, your Ubuntu crashed. Therefore the system can't remove the folder and the next created folder becomes a suffix, the number 1.


Restore qt integration after removing KDE

Here is to uninstall the pesky kde icons still used on some qt applications.

sudo apt-get purge oxygen-cursor-theme oxygen-cursor-theme-extra oxygen-icon-theme oxygen-icon-theme-complete gtk2-engines-oxygen gtk3-engines-oxygen kde-style-oxyge

Be careful not to uninstall an application you want or need to keep before you accept the changes

Reboot for the changes to take effect.


Ubuntu terminal scroll through suggestions

The double tab will try to autocomplete or list the available files/commands/etc...

This double tab opened using more .

man more

 more is a filter for paging through text one screenfull at a time.

to move between screens you have to use the Space key and to move down one line, use Enter.

A nice answer provided here

  By default TAB is bound to the complete readline command. Your desired
  behavior would be menu-complete instead. You can change your readlines
  settings by editing ~/.inputrc. To rebind TAB, add this line:

  TAB: menu-complete

Now you can move between list of outputs using Tab


How to change permissions on vfat partition?

You have to set the permissions when you mount the partition, and you can do that with umask.

Mount a FAT32 partition in a pendrive with read/write/execute permissions for everybody:

Assumption: the pendrive is seen as /dev/sdx, replace x with the actual drive
letter, for example b: /dev/sdx1 ---> /dev/sdb1

Comment: text after the # character is a comment, not used as a command)

sudo mkdir -p /mnt/sd1  # only if you want a new mountpoint
sudo umount /dev/sdx1   # only if already mounted (but with bad permissions)

sudo mount -o rw,users,umask=000 /dev/sdx1 /mnt/sd1  # mount

echo 'Hello World' > /mnt/sd1/hello.txt  # test writing
cat /mnt/sd1/hello.txt                   # test reading

Edit: I think you used the correct spelling in the command line, but if you used unmask, please try umask, because linux is fuzzy about correct spelling.

The command line that I suggest works for me in Lubuntu 16.04.1 LTS (and should work in all current Ubuntu flavours including standard Ubuntu). So I don't know why it does not work for you.

Maybe you can reboot your computer and try again. Copy and paste the command lines from my answer to get them correct. Only modify the drive letter x to point to the pendrive (for example b or c). Maybe it works this second time.

If not, maybe the file system is not FAT32, but some other version of FAT, for example exfat. Please check with

sudo parted -ls  # ... space minus ell ess

If exfat it might help to install some extra program packages, see for example

unixnme.blogspot.se/2016/04/how-to-mount-exfat-partition-in-ubuntu.html

sudo apt-get install exfat-fuse exfat-utils


Is there a security risk if a password can be reset easily?

A more abstract definition of "resetting a password" is "modifying data on a physical disk". Everyone with physical access can change any bit on a disk, independent of the OS.

The password can only be resetted in a terminal if you know the previous password, unless you're logged in as root (in Recovery mode for example). To protect against this (modification of the password file /etc/shadow), you should use full disk encryption (LUKS). Encrypting your home directory only still allows for modifications to the root filesystem (password file) and insertion of random files.

By the way, anyone with physical access can ruin your machine. Boot passwords do not prevent people from taking the disk out of the machine and plugging it in their machine (via a SATA - USB/eSATA cable for instance) and modifying the contents of it (or copying data from it). Even fully encrypted disks are not as fully encrypted as you may expect. How does the system boot? With the unencrypted bootloader. There is a vulnerability also known as "evil maid attack" which is performed by modiying the bootloader files. After such an "attack", the owner of the machine would not notice anything since there may be small code inserted that copies the entered password.

A way to migitate this is by using a dedicated boot medium (memory card, USB memory stick), but this is usually not preferable by the normal people which have a very small chance of encountering this.


"Additional Drivers" program crash help on 12.04?

Try starting it from a terminal: jockey-gtk. See if it displays any error regarding the crash.

Alternatively there is jockey-text if the graphical version would fail.

In case of problems you'd probably want to read the backend debug log (/var/log/jockey.log). Try this:

In a terminal window type tail -f /var/log/jockey.log
Press a few Enters in the same window to separate the new output from the old lines.
Now start the "Additional Drivers" utility. The terminal window should start to log debug messages as the driver check is carried out.
The last few lines might contain information about what is going wrong.

(Be warned there will be quite a couple of lines.)

There is a related Launchpad bug #912236 (#864572) confirming your error message:

  Possible causes include: the remote application did not send a reply,
  the message bus security policy blocked the reply, the reply timeout
  expired, or the network connection was broken.

But no solution so far.


From the comments on the first link you gave, it looks like you'll need to build it yourself, unless you're running KDE4.6:

  Marco Mentasti since this plugin was released after KDE 4.5
  feature freeze, it will be included in
  KDE 4.6

  Volker Lanz
   This is really awsome stuff.
  Thanks for creating this! Looking
  forward to getting my hands on it.

  Christoph
  Cullmann You can get it today:
  http://kate-editor.org/get-it/

The link, kate-editor.org/get-it, goes to a page with detailed build instructions.  This should include code that contains the SQL plugin.


I found the rule file in the following location:

~/.arduino15/packages/Intel/hardware/arc32/2.0.2/scripts/create_dfu_udev_rule

and ran following commands to resolve the issue:

chmod u+x ~/.arduino15/packages/Intel/hardware/arc32/2.0.2/scripts/create_dfu_udev_rule &&
sudo ~/.arduino15/packages/Intel/hardware/arc32/2.0.2/scripts/create_dfu_udev_rule


What point meaning in the permission string lrwxrwxrwx.?

it indicates there is SElinux security-enhanced-linux is present. Read this file system permissions and notations to better yourself on


Evince preferences (double page view, first page on right side), how do I force it manually

I think this is a bug in Evince, specifically: Odd Pages Left option disabled/enabled at wrong time (#602) · Issues · GNOME / evince · GitLab
It should be fixed in recent versions of Evince, which version of Evince and Ubuntu are you using?


Getting URL of YouTube video with `youtube-dl` is slow, without downloading video

The time is spend doing work

The command does not hang or wait for something wasting time,
it actually does work that takes time; It most probably takes time by adding up multiple small network delays. But it could also be that there are delays on the youtube side, that add up.

That it just the time it takes to download the HTML that is needed;
The command needs to make at least two HTTP requests, one after another, and probably more.

So if anything is slow, it's multiplied by the number of requests already.

For me it takes 1.5 seconds on a very fast line - that is not that far from 8 seconds.

How to find out

I'll show the commands I used to find out:

To make the examples more tidy, we use a variable for the URL:

$ u="https://www.youtube.com/watch?v=k4JGSAmu4lg"

We want to measure the duration of commands; Using the command time needs to take care not to mix up the command and the shell builtin. We use a small function to make the lines shorter:

$ t(){/usr/bin/time -f 'Time: %es' "$@";}

Your command writes out the URL of the video file (truncated to 80 columns):

$ youtube-dl -g "$u"
https://r20---sn-cxg7en7d.googlevideo.com/videoplayback?signature=091F68E823

Let's measure the time it takes to run on my computer:

$ t youtube-dl -g "$u"
https://r20---sn-cxg7en7d.googlevideo.com/videoplayback?signature=091F68E823
Time: 1.44s

Ok, one and a half seconds. Faster than in the question, but not that much faster.
But how is it spending the time? Maybe it does download the video in some hidden way and discards it? The video is 11min in 360p. Just downloading it with no options takes about 13s - ten times longer.
Need to take a closer look, with the verbose option -v:

$ t youtube-dl -v -g "$u"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-g', 'https://www.youtube.com/watch?v=k4J
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.02.06
[debug] Python version 2.7.6 - Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14
[debug] Proxy map: {}
https://r20---sn-cxg7en7d.googlevideo.com/videoplayback?sparams=id%2Cinitcwn
Time: 1.40s

Oh, there is some delay before the '[debug]' lines are printed. Looks like youtube-dl spends some time for it's own configuration setup. It's a quarter of a second or so, not the delay we are looking for. But what we can learn from it is that the youtube-dl implementation itself may be slow.
After the messages, nothing happens until the result URL is printed. So we still do not see the interesting part.
The option -g is to "simulate" the video download in the sense that it does the complicated part of finding out that semi-secret URL, prints it, but then skips the actual download in the end. There is a similar option -s that does not output the URL, and seems similar otherwise. Let's assume it's similar enough if it takes about the same time; We need to check that.

$ t youtube-dl -v -s "$u"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-s', 'https://www.youtube.com/watch?v=k4J
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.02.06
[debug] Python version 2.7.6 - Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14
[debug] Proxy map: {}
[youtube] Setting language
[youtube] k4JGSAmu4lg: Downloading webpage
[youtube] k4JGSAmu4lg: Downloading video info webpage
[youtube] k4JGSAmu4lg: Extracting video information
Time: 1.45s

Ok, -s takes the same time as -g, so it's ok to replace them for testing.
More interesting is that we got more output now. And it's printed with an interesting timing: The lines get printed with a similar delay to each other, so it seems they are about the actions that are actually taking the time we look for.
From the messages, at least two web pages are downloaded. But we can assume that the word "page" will not mean a single HTTP request and a single HTML document.

What did we learn?

The main point is, the work of the program does actually take time, it's not waiting for something, or hanging.
Also, we see multiple steps taking similar amounts of time. There is not much to calculate, so that's network roundtrips in some way, adding up.
That means, the latency of our connection is important only here. The throughput of the connection is just irrelevant.

If you would make your internet connection faster so it can transfer data at double speed - that would not help at all.
But if you can get better ping times, that will make it much faster.
It's not about 'ping' times to your internet service provider, though; The ping time all the way to YouTube it what matters - and may be not possible to change.

Interestingly, for the next step, downloading a video, the requirements for a fast line are exactly the opposite: latency is not relevant at all, and throughput really matters.

Not tired yet?

Want still more details to understand what the time is really spend on?
The next step would be to trace the HTTP connection; I would suspect that it may show many more roundtrips than two, for redirects for example. You could use wireshark, or a logging HTTP proxy, or strace to just count the system calls for connecting or writing.

For today, we have both looked deep enough into the rabbit hole of networking.


How can I automatically change my mac address whenever my network device is up or down?

Working from the Gnome blog post. These settings for for Ubuntu 17.10

Via CLI

First, obtain the name of the wired internet connection

nmcli connection show

Secondly, set the enternet connection to generate either a "stable" or "random" address

nmcli connection modify "wired_connection_name" ethernet.cloned-mac-address random

For WiFi use wifi.cloned-mac-address. On network-manager 1.2.6 you'll need to set a MAC address instead of random.

Finally, check your mac address, bring the connection down and up, and check your mac address again

ifconfig | grep Ether
nmcli connection down "wired_connection_name"
nmcli connection up "wired_connection_name"
ifconfig | grep Ether

Via GUI

the program nm-connection-manager can also be used to access this setting, bringing up a screen like the one shown below, where the drop-down box for 'Cloned MAC Address' can be changed to one of several settings.


No Ubuntu partitions on installed dual boot system

is there a way to transfer my installed Ubuntu onto the new partition?

Yes: (MigrateWubi) but I would not rely too much on it.

I'd recommend to first backup your documents, then partition your disk (this page can help), then try the above script.
If the script fails, or if you want to install Ubuntu in a clean way, then use an Ubuntu install disk for a standard install.


Cannot (Unable to) shutdown, reboot or logout in KDE Plasma (version 5.8.8)

File ~/.config/ksmserverrc might be causing an issue.

Remove it:

rm ~/.config/ksmserverrc

Logout, since you can't do it (because it's your problem) do this:

killall Xorg

Login to Plasma desktop again and reboot should work for you.

Not yet clear what the problem could be with ksmserverrc file (TODO).

Solution inspired by this forum thread.


Pre-Author's Note:

Read through all of this post until you find a satisfactory solution. If not, add a comment telling me I am the worst wannabe in the world. ;)
Also, the Trash is not what is taking up all of your space. You do not have a Trash Can created, below are instructions of how to make one. In the terminal, when you delete something it is gone forever, except if you use a recovery program like foremost (see below.)

The Location of the Trash Folder

The trash folder is located at /home/username/.local/share/Trash/. This folder may not be there because of you running from terminal, but keep reading! It is only created once a file has been moved there with a GUI (I'm not 100% about this part, but my LXDE setup only created it when I moved a file to there with the file manager).

Explanation:

Due to @Zacharee1, I have realized the true nature of your question. Thank you for that @Zacharee1. So, a Trash Folder doesn't exist in terminal-land, so you have to either create your own or be OK with having the danger of losing important files forever. Of course, that means that the space usage is not caused by that.

If you have a Trash Folder Already Created:

The items inside the Trash folder will be inside another folder, the items folder. Now, if you want to clear this use two separate commands.

rm /home/username/.local/share/Trash/items/*
rm /home/username/.local/share/Trash/info/*

If You Just Want To Restore Some Files:

Take a look into the forensics program foremost. You can download with

sudo apt-get install foremost

Look at online instructions for using it, use the man page or look below at my extremely limited understanding of how this works. Let me stress that, I just found this and am not knowledgeable in this area, so do not think everything I say is true. On HowToForge (https://www.howtoforge.com/recover-deleted-files-with-foremost) it tells you to run

foremost -t filetype -i /dev/sda1

(Obviously) Replace filetype with the type of file you need to recover. For example, if I wanted to recover pdfs I would do

foremost -t pdf -i /dev/sda1

You will find what is recovered in a folder in the directory you are in called output. If you want to do it multiple times in the same directory, do

foremost -t filetype -T -i /dev/sda1

The extra -T stands for timestamp so the separate outputs won't mess eachother up. For a better understanding of foremost, check out the link provided or do your own research.enter code here

If You Don't Have a Trash Folder Created (And You Want One):

This one is probably you! So, you might have to try two separate things.

The first, and probably most unappealing, is to figuratively make your own Trash folder, set up a timer for it and a system for the files inside to be deleted. You can do this by adding a script to your crontab, which has a timer of 1 month. When the timer gets high enough, BAM,

rm /path/to/trash/*

If you Don't Want to Do It Yourself:

Alright soldier! There are a couple of things you need to know. The crontab. A useful tool which lets you run scripts and commands at startup. We probably will be using this. There is a big flaw to the idea that I just proposed. The timer will it only run if your computer is on. AHA, I've got a (slightly) better idea!

The Slightly Better Idea!

Alright, this will involve a python script and a .txt! Hurray! You will need an empty txt file in the same folder as this one called garbage.txt. So,
basically, these are the contents:

#!/usr/bin/env python3
#Comment: This Will Be Called Trash.py

import datetime
import subprocess

with open("garbage.txt", "r+") as garbage:
     x = int(garbage.read(1))
     now = datetime.datetime.now()
     month = now.month
     if month != x:
         subprocess.Popen(['rm', '-rf', '/where/ever/trash/folder/is/)
         subprocess.Popen(['mkdir', '/where/ever/trash/folder/is/'])
         with open("garbage.txt", 'w+') as sadness:
         sadness.write(str(month))

Now then, add this script to the crontab. I'll assume for benefits of the reader that you don't know how to do this. So, create a bash script in the same directory as trash.py. Call it trashshell.sh. In it write:

#!/bin/bash
python3 trash.py

Save that, then type in the command crontab -e to the terminal.
Select the terminal editor nano and then write

@reboot sh /path/to/trashshell.sh

Hope this helped!

Optional: An Easy Delete!

Put this:

function trasher(){
     mv "$1" /path/to/trash
}

into your .profile or your .bashrc (Do bashrc if it exists).
This will all you to move items to trash with trasher itemname.
For example, trasher new.txt

A probably False Idea!

Try recreating a Trash folder in the spots it would be, like the Trash folder, the expunged folder, the files folder, and the info folder.
Wait 30 days. This probably won't work!!!

Author's Note:

Do not copy and paste the code I wrote. The indentation is almost 100% messed up, because cannot do formatting on Stack Overflow! Some one teach me please!!! If you made your own trash folder and you're feeling adventurous you can change some stuff up a bit, like the length of the timer.


smplayer doesn't show the formatting from the ass files

the problem solved when I installed the libass package and updated it, then I make sure that the option of use SSA/ASS library is checked and choosed the default subtitle encoding to be UTF-8 instead of arabic, and now it works perfectly.


x11vnc on Ubuntu 17.10 not running on startup

It is currently not possible to use x11vnc on Ubuntu 17.10 if you use the Wayland DM. Various issues about security and exposing interfaces for frame grabbing.

References:
[https://lists.freedesktop.org/archives/wayland-devel/2017-July/034551.html][1]

You can disable Wayland and implicitly enable x11 and it will work fine. I have tested this on a fresh installation of Ubuntu Desktop 17.10

#Bash
#UD17.10ARTFUL
MYFILE=/etc/gdm3/custom.conf
sed --in-place --expression "s/^#WaylandEnable=false/WaylandEnable=false/g" ${MYFILE}
grep 'WaylandEnable' ${MYFILE}

#Logout/Login the Ubuntu Desktop session

# A quick test (you must add the security yourself)
x11vnc -display :0 -auth /var/run/lightdm/root/:0 -shared

@note It is also possible to login with X11, instead of Wayland, on the login screen (click the cog button) but that button is not always visible on various hardware.

I would also recommend to install & make the latest DEVelopment version x11vnc-0.9.14-dev instead of the package from the standard Ubuntu repository.

My general advice is actually to stay with Ubuntu 16 LTS or Ubuntu 17.04 because Wayland has lots of compat issues.

Let me know how it goes.


GPG signing is complicated. For APT repositories there are two layers of GPG signatures:

Signatures on the packages themselves, with dpkg-sig or or debsign.
Signatures on the repository metadata.

You are seeing that message because APT does not see any signature on your repository metadata. You can make this happen by adding SignWith to your reprepro config. You can read more in a comprehensive blog post I wrote, here.

You can verify that SignWith has worked by looking for a file named Release.gpg or InRelease. If you find a file named InRelease, view the contents of the file and ensure that a GPG signature is found at the bottom. If so, reprepro has generated the signature properly. Keep in mind that repositories that are GPG signed are still vulnerable to a large number of man-in-the-middle attacks unless they are served over HTTPS.

I would also recommend checking that the public GPG key has been correctly imported on the client system by running apt-key list. If you don't see the key on the list, you should add it with apt-key add filename.

It is important to note that Ubuntu and Debian do not verify GPG signatures of packages -- it is disabled by default and terribly, terribly difficult to get working. I would advise avoiding GPG signing your packages.

Also note that you should distribute your repository over HTTPS, to avoid a plethora of security bugs (even with GPG signatures).


get hidden details (eg. author) of a file as in windows

On Ubuntu GNOME details can be view in the properties of files or in the "Files" software, with the list view. You can personalize the list view for adding more details in preferences.


Basic raw fast read-only file-system (offering no compression) for linux?

You could also try romfs, but I doubt you will find it any faster than ext4.  I'd suggest you just stick with ext4 and not worry about it.  Mounting it read only also won't gain you any performance; just make sure you don't accidentally modify the files.


Ubuntu 12.04.3 Server i386 fail to install kernel

SOLVED!

It was my mistake :( After having tried everything else, I decided to start all over, repartitionning the disk and so on. When repartionning the disk I found that the partition "/boot" had been asigned only 1 MB, instead of 1 GB, as planned. Obviously there wasn't enough space to put the system there. Just brought it up to 1 GB and, voilà! Problem solved.
Anyway, the installer could very well have detected this and signaled the lack of space! It would have been much simpler.


Easiest way to setup Ubuntu as a VPN server

WARNING: PPTP IS AN INSECURE PROTOCOL!  Not only has the encryption been breached, but it sends your authentication in clear text and is easily intercepted. It has been estimated that the amount of time required to brute-force the password is roughly equivalent to the time required to brute-force a single DES key. Consider using OpenVPN or another VPN architecture instead of PPTP!

I used this guide to set up a PPTP VPN server on my Ubuntu 12.04 server.

To summarize the main points in the link, though:

1: Install pptpd and ufw.  iptables can be used in place of ufw, but for the sake of easiness, ufw is better if you don't know iptables.sudo apt-get install pptpd ufw

2: Open the ports needed.  The guide suggests 22 (SSH) and 1723 for the pptp vpn.

sudo ufw allow 22
sudo ufw allow 1723
sudo ufw enable

3: Edit /etc/ppp/pptpd-options.  Open the file with your favorite editor (mine's nano, so the command for me is sudo nano /etc/ppp/pptpd-options), and comment out these lines by putting a # before them, if you want this to work universally on all OSes:

refuse-pap
refuse-chap
refuse-mschap

You can comment this line if you want to disable encryption: require-mppe-128

4: While editing /etc/ppp/pptpd-options, add DNS servers for the VPN.  This example uses OpenDNS servers:

ms-dns 208.67.222.222
ms-dns 208.67.220.220

5: Edit /etc/pptpd.conf.  Open the file with your favorite editor (mine's nano, so the command for me is sudo nano /etc/pptpd.conf).  You need to add the local VPN IPs for the system, so add:

localip 10.99.99.99
remoteip 10.99.99.100-199

If your system is a VPS, use the public IP for "localip".  If it is not and is on a local network, use your computer's network IP.  Use different IPs and ranges if these IPs exist on your subnet!
If you don't know your public IP of your VPS, find it by running dig +short myip.opendns.com @resolver1.opendns.com

6: Edit /etc/ppp/chap-secrets.  Open the file with your favorite editor (mine's nano, so the command for me is sudo nano /etc/ppp/chap-secrets), and add the auth data.
The format for /etc/ppp/chap-secrets is:

[Username] [Service] [Password] [Allowed IP Address]

An example would be:  sampleuser pptpd samplepassword *

7: Restart pptpd.  Run this command in terminal: sudo /etc/init.d/pptpd restart

8: Edit /etc/sysctl.conf.  Open the file with your favorite editor (mine's nano, so the command for me is sudo nano /etc/sysctl.conf).  Un-comment the following line (by removing the # at the beginning of it) in /etc/sysctl.conf: net.ipv4.ip_forward=1
Reload the configuration:  sudo sysctl -p

9: This step assumes you have ufw.
Edit /etc/default/ufw and change the option DEFAULT_FORWARD_POLICY from DROP to ACCEPT

10: This step assumes you have ufw.
Edit /etc/ufw/before.rules, and add the following either at the beginning of /etc/ufw/before.rules or just before the *filter rules (recommended):

# NAT table rules
*nat

:POSTROUTING ACCEPT [0:0]
# Allow forward traffic to eth0
-A POSTROUTING -s 10.99.99.0/24 -o eth0 -j MASQUERADE

# Process the NAT table rules
COMMIT

If you have kernel version 3.18 and newer (you can check this by running uname -r), also add the following lines before the # drop INVALID packets ... line:

-A ufw-before-input -p 47 -j ACCEPT

11:  Restart the firewall, to refresh the rule sets and to apply the rules we added to the /etc/ufw/*.rules files:  sudo ufw disable && sudo ufw enable

Warning: If you have other ports you need open, such as for HTTPS if your server hosts a website, you need to individually add those ports to the allowed list with sudo ufw allow <PORT>


Thanks for the insightful comments.  The issue is gone now. All my servers can talk to each other again.
It appears that the ISP was blocking my connection at some level thinking I was a bot. AND there was some strange mismatched key on machine D that maybe would not accept the ssh handshake.
Followup: No VPNs were running. Fails "no route to host"  Route was done directly to static IP, through Zerotier and through DNS.  All failed at the time.
Thanks again to the community,
Walt


cut command - How to find the end of line with N bytes

From man cut (I have bolded the relevant option):

Use one, and only one of -b, -c or -f.  Each LIST is made up of one range, or many ranges  sepa‐
rated  by  commas.   Selected input is written in the same order that it is read, and is written
exactly once.  Each range is one of:

N      N'th byte, character or field, counted from 1

N-     from N'th byte, character or field, to end of line

N-M    from N'th to M'th (included) byte, character or field

-M     from first to M'th (included) byte, character or field

So you just have to use:
cut -b 13- $textfile


Why is my mounted Private directory empty?

This was all a collection of oddities, anyway, i have got my files back, and here is how i did.

Getting hold of mounting/unmounting

For a bug that i think was fixed in newer versions, ecryptfs-umount-private did not work while i was sitting in my home folder. It was spitting the following:

Sessions still open, not unmounting

And doing nothing. Changing directory away from home, to / for instance, allowed me to unmount successfully.

Playing a bit

I created a test file in the now empty private folder, and i restarted the system. I could see the file after restart. Then i unmounted the partition, and at this point i was able to see the original README file from Ubuntu along with my files which seemed initially disappeared

Explanation

So, what happened? I put the files in the Private folder too early! Maybe i had to restart the system before. I was thinking to be putting my files in the encrypted folder, while on the other hand i was putting them in the placeholder folder which was going to be masked by the encrypted one, once mounted. The fact that the command for unmounting was failing brought more confusion, but all is well what ends well!


Ubuntu 19.10: clone my current system to a live USB stick (bootable) and also make it persistent

Clone Full install Drive to Multiple USB Drives

Create Full install USB drive that will boot in both BIOS and UEFI modes.

See: How to Create a Full Install of Ubuntu 19.10 to USB Device Step by Step

Make your Target drive on the smallest USB drive that will hold everything you need, the larger the drive the more time it takes to backup and restore.
Upload and install the tools, software and scripts that you need to distribute to your team of engineers.
Create an image file, (.img), of the Target drive using Disks in Linux. (dd may be used by experianced users).
Extract the image file to the engineers USB drives using Disks. or mkusb in Linux or Win32 Disk Imager or balenaEtcher in Windows.
After installing the image files use GParted to Resize the ext4 and or NTFS partitions to fill the drive.
If two or more USB drive clones are used in the same computer at the same time create new UUID's using GParted.


GRUB doesn't show up on Windows 10 / Ubuntu 16.04 dual boot, although `update-grub` and `efibootmgr` seem to show both options

I have 3 answers(solutions):

1) Try to "brute force" it with boot-repair. Go in ubuntu and run commands, and choose recommend repair. And hope it helps.

2) If it does not work, you could manually replace EFI/Microsoft/Boot/bootmgfw.efi file with grubx64.efi file (take a little tour into esp partition and look for .efi files in grub folder or something. If grubx64.efi doesn't work, try other .efi files). WARNING: backup bootmgfw.efi first, because without it you cannot boot in windows (without windows recovery usb).

Why will this work? UEFI firmware is (in your case) set to boot bootmgfw.efi file, so if you replace if with grub.efi, it will boot Grub (its a mind trick). Note: I didn't try this with Grub, but I did with rEFind. It is also possible that Grub doesn't work, so it currently over jumps grub into Windows.

3.) Try rEFind:

sudo apt-add-repository ppa:rodsmith/refind
sudo apt-get update
sudo apt-get install refind

This may solve the problem. If not see manual install of rEFind section at link:

www.rodsbooks.com/refind/installing.html#linux


Always reference you key with an absolute file name, not a relative one!
If it still doesn't work, check the file permissions.


Virtualbox crashing when run through optirun (virtualgl)


How do you mount an hd image made from ddrescue?

sudo mount Filesystem.img /home/user/MyFilesystem -o loop

is what I used to solve this problem. Below is info from on the loop device from this answer on Linux Questions for those like me who don't/didn't know.
One  further possible type is a mount via the loop device. For example,
the command

mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop

will set up the loop device /dev/loop3 to correspond to the file
/tmp/disk.img, and then mount this device on /mnt.
If no explicit loop device is mentioned (but just an option -o loop'  is given), then mount` will try to find some unused loop device and use
that, for example
mount /tmp/disk.img /mnt -o loop

The mount command automatically creates a loop device from a regular
file if a filesystem type is not specified or the filesystem is known
for libblkid, for example:
mount /tmp/disk.img /mnt

mount -t ext3 /tmp/disk.img /mnt

This type of mount knows about four options, namely loop, offset, size‐
limit and encryption, that are really options to  losetup(8). If the
mount  requires  a  passphrase, you will be prompted for one unless you
specify a file descriptor to  read  from  instead  with  the  --pass-fd
option. (These options  can be used in addition to those specific to
the filesystem type.)

Since Linux 2.6.25 auto-destruction of  loop  devices is supported  and
then  any  loop device allocated by mount will be freed by umount inde‐
pendently on /etc/mtab.
You can also free a loop device by hand, using losetup -d' or  umount
-d`.


Amazon assistant is an extension or addon for the browser (chrome or firefox). Open up the extensions or addon page for the browser you use and remove if from there.


How to remove folding application when pressing alt-tab in 13.04?

You need to install the extra plugins.

To do so, first, close CCSM. Then, open a terminal by Ctrl+Alt+T and type in the following:

sudo apt-get install compiz-plugins-extra

When it's done, open CCSM and you'll find the Application Switcher under Windows Management.


Why do I get "exceeds msdos-partition-table-imposed maximum"?

You need to back up and obtain more information. Other answers have been assuming that you're using MBR, but your comment that you're using UEFI firmware raises the possibility that you're already using GPT. If this is the case, then the error message you received is a bug. You can check your partition table type in various ways, depending on the partitioning tool you're using. In Linux, one easy way is to type sudo parted -l and look for output like the following:

Partition Table: gpt

This output indicates a GPT disk. An MBR disk will specify msdos rather than gpt. Once you've determined your disk type, you can proceed without guesswork. Chances are you are using MBR and BIOS-mode booting of Windows, but it's best to be sure before doing anything radical.

Windows (including Windows 8, AFAIK) ties its boot mode (BIOS vs. EFI) to its partition table type (MBR to GPT). Thus, switching from MBR to GPT will necessitate converting Windows to boot in EFI mode rather than in BIOS mode. This adds complexity to the task -- too much to describe here, in fact. For more information, see this article. I don't recommend trying this unless you're desperate, although it really is the better solution in many ways.

It is sometimes possible to "fudge" things using MBR to get just under 4TiB out of it. To do this, you must assign everything above the 2TiB mark to one partition. In your case, if you're using MBR and the existing partition(s) consume up to the maximum point, you can shrink the final partition on the disk by a small amount (1MiB is the smallest that's practical in many new tools). You can then create the final partition such that it begins before the 2TiB mark and extends to the end of the disk (or for a size of 2TiB, if that's smaller). Note that if you want to use multiple partitions in Linux, you'll need to put all but the last of them entirely under the 2TiB mark, so you may need to shrink your final existing partition by significantly more than 1MiB. Also, be aware that this method is playing a bit "fast and loose." It's technically legal, given the way the MBR data structures are designed, but some OSes flake out with it. AFAIK, both Linux and recent versions of Windows work with it, but if you need to use the disk with something more exotic, it might behave strangely.

If it turns out you're already using EFI-mode booting and GPT, then the error message you received represents a bug. I'm not sure how you'd get around it, but shrinking the final existing partition, as in the MBR solution, might conceivably work. Beyond that, filing a bug report is in order.


How do I count the number of quotes in a file using python?

This short program will do:

import sys
print(sum(line.count(sys.argv[1]) for line in sys.stdin))

One-liner and usage:

python3 -c 'import sys; print(sum(line.count(sys.argv[1]) for line in sys.stdin))' '"' < data.txt

An arguably simpler, non-Python solution based on tr and wc would be:

tr -c -d '"' < data.txt | wc -c

If there's at most one match per line you can also use grep in “count” mode:

grep -cFe '"' data.txt


You are trying to access that folder wrongly from /home which I see from your console address victorhooper@turdsandwich:~$.

The command should be: chmod -R 0755 /media/plex/ and not chmod -R 0755 plex/. To Run the code as you have it, then:

Change into the media directory: cd /media
Then change permissions: chmod -R 0755 plex/

And normally you should be adding sudo to any operations in the /(root) directory where we have /media. So in case these don't work add sudo before each of these commands, but of course you might have disabled sudo password requests in the /etc/sudoers file. Assuming you have.


Changing the permissions in root files without sudo from recovery

You have to remount the root file system with read/write permissions if you want to do changes in recovery mode mount -o remount,rw / I think is the command. Then you can modify the filesystem.


Hide "show wifi password" (don let show wifi password)

"(all users are admin)" there is your problem.

Even if you could hide it they, being admin, could always restore the settings, see the password and hide the setting again without you even knowing. What you want (hiding something from an admin) is never going to work.

The correct solution to your problem is to make those students users and elevate privileges to what you want them to do that requires then to even need admin privileges. Like installing software, updating etc. Here is an example using policyKit: How can I set the Software Center to install software for non-root users?


Can ubuntu run on one machine while being installed on another?

That's a good question. I can only guide you in the right direction here, as even I don't know the correct way to go about it. It sounds like you might want to do something like PXE booting (booting over a network). One caveat that I am aware of: it has to be a wired connection. Beyond that, I haven't really done much research on it as I've never had the need to do such a thing.

You have to set up the host computer really specifically as well. I believe it has to have a TFTP server installed to work at a bare minimum.

I do know that you can use PXE boot to boot the Ubuntu installer, so I don't see why you couldn't use it to boot the whole OS. However, the installer runs totally in RAM, so you'd probably have to make some heavy modifications to Ubuntu to get it to run the full-fledged OS from a remote disk. Frankly, I don't even know that it's possible, but one thing I've learned in all my Linux years is that if you give it enough effort, anything's possible ;)

I was going to suggest a VNC server, but more than likely you're going to be running Windows on the main machine and not Ubuntu, so that wouldn't work out very well. However, you could install it in a virtual machine and set it as if it's just another computer on the physical network. Then you can, say, boot an Ubuntu LiveCD/USB from the dead computer and connect to the virtual machine hosting a VNC server, effectively making your HDD-less computer a thin client.


Can't automate user creation with preseeding

Try using a hashed password like this:

$ mkpasswd -m sha-512
Password:
$6$ONf5M3F1u$bpljc9f1SPy1w4J2br5BWbE38lPlbBGgjbkJ6MnrvQK2kUfFyT/r0p.R22FFPMAc61B9BD/UWcXoui4qXInx01

And then in your preseed file:

# User account
d-i passwd/root-login boolean false
d-i passwd/user-fullname string My Full Name Here
d-i passwd/username string myusername
d-i passwd/user-password-crypted password $6$ONf5M3F1u$bpljc9f1SPy1w4J2br5BWbE38lPlbBGgjbkJ6MnrvQK2kUfFyT/r0p.R22FFPMAc61B9BD/UWcXoui4qXInx01

This works for me.

As a bonus, you don't have plain passwords in your preseed file anymore.