if-up.d launches two instances of a single script

Looking more into 16.04 if-up.d/, I found a similar question for someone running Debian 7.3 and found the answer. It is not a bug, and the issue I experienced is explained here in @Søren Løvborg's answer:

  In general, ifup / ifdown does not guarantee that your script only runs once. Thus your script has to be idempotent; that is, contain its own logic not to establish a tunnel that already exists. The best way, of course, is to start the script by actually checking if the tunnel is already there:

# Exit if network device "tun0" exists.
ip link show dev tun0 >/dev/null 2>&1 && exit 0

  Additionally, the scripts in if-up.d etc. run for every interface that is brought up. As Jeff correctly observes, the if-*.d scripts receive no arguments specifying e.g. which interface is coming up.

  Instead, per the interfaces(5) man page:

   There  exists  for  each  of  the  above  mentioned options a directory
   /etc/network/if-<option>.d/ [...]

   All of these commands have access to the  following  environment  vari‐
   ables.

   IFACE  physical name of the interface being processed

   LOGICAL
          logical name of the interface being processed

  [... and more ...]

  The solution is to start the script with a check for the correct IFACE value, e.g.:

# Exit if we're not starting "eth0".
[ "$IFACE" = 'eth0' ] || exit 0

  Otherwise, the script will run for every network device, including lo, at which point it may be too early to establish a tunnel.

That said, my issue was it was executing the script for the lo interface in addition to my eth0 connection. I took one of the steps which was to program your script with the logic to not run more than once, but to only run it once without adjusting the code just specify the interface to be used
before execution.

If I wanted to go back and solve this on the sh level, I'd simply need to update my script with this line since the interface I want to use is my Ethernet connection

[ "$IFACE" = 'eth0' ] || exit 0
sleep 269
sh -c "python /dir/to/bot.py >> /dir/to/log" & disown


After 13.04, 13.10, 12.10 EOL, is it possible to upgrade to 14.04 from 12.10?

Step by step upgrades are not required as regards non-LTS versions. It's fully possible to upgrade from 12.10 directly to 14.04 LTS. But you should never skip an LTS version.

Downgrading is not a good idea, if at all possible.

Edit:

If I was in your situation, I would try:

sudo -i gedit /etc/apt/sources.list
Replace all occurrences of quantal with trusty and save
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop
sudo apt-get dist-upgrade
Reboot


Each hard drive come with spare sectors , and once you get a bad sector, one of those sectors moves, and replaces the bad sector.  But once these sectors are all used, then it time to be worried.  There is no way that I know off that yo can find the number of these backup sectors.  You can check with the manufacturer's website, and download their testing software, and test the drive with it.

In my personal opinion, I would get a backup of the drive as soon as possible, and keep using it until it dies.  However, I would definitely keep an eye on both the Reallocation Event Count and the Reallocated Sector Count.

The event count indicates the number of times the drive tried, and the sector count indicates the number of sectors actually moved to a spare area on the drive. If it stays stable, it's a one-time thing that's not the biggest of problems. If it gets worse, replace the drive.

  Reallocation Event Count S.M.A.R.T. parameter indicates a count of remap operations (transferring data from a bad sector to a special
  reserved disk area - spare area).

  The raw value of this attribute shows the total number of attempts to
  transfer data from reallocated sectors to a spare area. Unsuccessful
  attempts are counted as well as successful. Since this is a count
  value, it can only increase.

  Recommendations

  This is a critical parameter. Degradation of this parameter may
  indicate imminent drive failure. Urgent data backup and hardware
  replacement is recommended.

Source:Acronis


Secure Boot in your BIOS should be disabled for this install to work since it is not signed.    Go to the folder where you extracted the DroidCam and run sudo ./install  Then you should be able to just type in droidcam from a terminal and run it normally.

Example:

terrance@terrance-ubuntu:~$ cd Downloads/droidcam/droidcam-64bit/
terrance@terrance-ubuntu:~/Downloads/droidcam/droidcam-64bit$ ls
droidcam  droidcam-cli  install  README  uninstall  v4l2loopback
terrance@terrance-ubuntu:~/Downloads/droidcam/droidcam-64bit$ sudo ./install
[sudo] password for terrance:
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory '/home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-43-generic'
Makefile:975: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback/v4l2loopback-dc.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback/v4l2loopback-dc.mod.o
  LD [M]  /home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback/v4l2loopback-dc.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-43-generic'
make: Leaving directory '/home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback'
Moving driver and executable to system folders
Registering webcam device
Running depmod
make: Entering directory '/home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-43-generic'
  CLEAN   /home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback/.tmp_versions
  CLEAN   /home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-43-generic'
make: Leaving directory '/home/terrance/Downloads/droidcam/droidcam-64bit/v4l2loopback'
Adding uninstall script
Adding driver to /etc/modules
Done
terrance@terrance-ubuntu:~/Downloads/droidcam/droidcam-64bit$ droidcam


I received an answer from th great .

I hope this helps someone else

  As noted in the Ubuntu Forum guide, Network Manager resets changes
  made by macchnager. Did you know that as of Network Manager 1.4, you
  can generate a random MAC address upon each connection?

  Ubuntu 16.04 has Network Manager 1.2 unfortunately. You can replace it
  with wicd. To change MAC address at startup, you can create a systemd
  service file.

  sudo nano /etc/systemd/system/macspoof.service

  Put the following text into the file. Replace %i with your network
  interface name.

  [Unit] Description=macchanger on %i Wants=network-pre.target
  Before=network-pre.target BindsTo=sys-subsystem-net-devices-%i.device
  After=sys-subsystem-net-devices-%i.device

  [Service] ExecStart=/usr/bin/macchanger -e %i Type=oneshot

  [Install] WantedBy=multi-user.target

  Save and close the file. Then enable this service.

  sudo systemctl enable macspoof.service

  Restart your computer and you will have a spoofed MAC address.


I would suggest to install the corresponding packages with

sudo apt install nvidia-cuda-dev libnvrtc9.1

If above fails I'll suggest to remove CUDA from /usr/local/cuda-9.2 for more reproducible results.


A PHP page that gives you a blank page is often the result of a PHP error, but with display_errors turned off.

You should check the server's error log (usually located in /var/log/apache2/error.log) to see if the errors are being reported there.


How to change the directory .wine of Wine to a different directory

I looked in the "configure Wine" window, but to change the C directory is greyed out:

Simple solution: a link
What simply works however is:

Move the folder drive_c from ~/.wine/ to any accesible location of your choice (The c-drive is probably what you really want to move, since applications are stored in that directory)

Make a link from there into the folder ~/.wine/:
  ln -s /path/to/the_other_location/drive_c ~/.wine

That should simply work (and it does on my system)


The stock kernel is configured with CONFIG_USB_MON=y, which means that it's a built-in feature, so you don't need to load any module before using the usbmon functionality.


What program language is file '/usr/bin/apt-get' coded in? C or C++?

If you fetch the apt source code using:

apt-get source apt

and examine the package one can see that the apt tools are mainly written in C++ (look in the directory apt-pkg and the files are .cc suffixed source files, e.g. C++ source).


Password is not required when log in to ubuntu 14.04LTS

Your account probably is in the nopasswdlogin group. Enter this command:

sudo gpasswd -d $USER nopasswdlogin

Enter it just the way it is. No need to replace anything. However, don't log in as root to do this because then $USER will not be your user name (like when you use your normal user account and sudo) but root.


Error processing package libsofia-sip-ua-glib3

If you have resolved your disk space problem,this will handle the error:

sudo apt-get install --reinstall libsofia-sip-ua-glib3


How to change language only for terminal

You can add a line

export LANG=C

to the end of your ~/.bashrc file and restart the terminal.

All program output will be in English.


Intel Iris Xe, laggy performance in 20.04 LTS, and also in 21.04 (solved)

When you run with nomodeset you disable the intel graphics driver, which is why the lag is so bad. You should see a message indicating that in your dmesg output: sudo dmesg | grep nomodeset. But I'm experiencing the same thing, and also have bad screen update problems (eg. I click between tabs and the content of the last tab stays visible until I scroll), but I'm hoping this will go away once I can boot with the gpu enabled.
➜  graphics_debug sudo dmesg | grep nomodeset
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.12.0-051200rc7-generic root=UUID=785c4ea2-4122-4f4b-b6b2-28e123b6f5bc ro nomodeset
[    0.085047] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.12.0-051200rc7-generic root=UUID=785c4ea2-4122-4f4b-b6b2-28e123b6f5bc ro nomodeset
[    0.085104] You have booted with nomodeset. This means your GPU drivers are DISABLED
[    0.085107] Unless you actually understand what nomodeset does, you should reboot without enabling it

There's another thread on this here:
Ubuntu 20.04 not starting without nomodeset on Lenovo Titanium


How to get back language icon that disappeared from my system(14.04)?

For Ubuntu 14.04:

System Settings → Text Entry → Lower left corner: [v] Show current input source in the menu bar


You must use an amd64 system.

A bit obtusely, but it's documented here:

https://landscape.canonical.com/static/doc/user-guide/ch03.html

  You can install Landscape On Premises on any server with a dual-core
  processor running at 2.0GHz or higher, at least 4GB of RAM, and 5GB of
  disk space. The operating system must be Ubuntu Server 12.04 LTS
  x86_64 or higher. You must also have PostgreSQL installed and network
  ports 80/tcp (http) and 443/tcp (https) open. You can optionally open
  port 22/tcp (ssh) as well for general server maintenance.


Searching on manpages.ubuntu.com for glGenTextures takes one to the glGenTextures man page, which says that glGenTextures is part of OpenGL. apt search OpenGL will show you packages to install, prefer the ones with the -dev suffix.


I can see that Gnome was your only desktop environment. Now you need to install any desktop environment and a login display manager to get the GUI to work. I didn't face the exact problem. I'm showing 2 methods, hopefully at least one of them will work.

Method 1

Installing Unity:

After booting, when you are getting the black screen, press Ctrl+Alt+F1 to bring the tty1 session.
From there you'll be able to login using your username and password in the CLI session.
Make sure that you are connected to the internet. If you had an saved wifi that used to connect autometically then it should work this time as well. otherwise connect through a Ethernet cable (LAN). enter this command to make sure that internet is working:

ping -c 5 ubuntu.com
Now install Unity and lightdm with this command:

sudo apt-get install unity lightdm
When the installation is done, enter this command to set lightdm as the default greeter:

sudo dpkg-reconfigure lightdm

From there set lightdm as the default display manager.
Now enter this command to start lightdm session:

sudo service lightdm start
Now go to the lightdm session using Ctrl+Alt+F7. You should be able to work normally from there.

If the previous method doesn't work, try this one:

Method 2

After booting, when you are getting the black screen, press Ctrl+Alt+F1 to bring the tty1 session.
From there you'll be able to login using your username and password in the CLI session.
Make sure that you are connected to the internet. If you had an saved wifi that used to connect autometically then it should work this time as well. otherwise connect through a Ethernet cable (LAN). enter this command to make sure that internet is working:

ping -c 5 ubuntu.com
Now install LXDE and LXDM with this command:

sudo apt-get install lxde lxdm
When the installation is done, enter this command to set lxdm as the default greeter:

sudo dpkg-reconfigure lxdm

From there set lxdm as the default display manager.
Now enter this command to start lxdm session:

sudo service lxdm start
Now go to the lxdm session using Ctrl+Alt+F7. You should be able to work normally from there.


Unable to install Ubuntu Linux 12.04 / 13.04 after downloading file in Windows

I think that you must be downloading the LiveCD version of Ubuntu Desktop. This can not be run under windows, you have to burn it to CD, then reboot your computer.

If your BIOS is correctly set up with the CD/DVD drive as the first boot option, then Ubuntu will start and allow you to install it alongside your version of Windows.


amd64 (64bit) and i386(32bit) are the usual ones, and the ones readily available for download on Ubuntu.com


Can't move a file into my /opt folder because I don't have permissions

To move a file called filename into the /opt directory change directories using cd into the directory containing filename and run this command:

sudo mv filename /opt # preface mv with sudo to move a file into a directory that is owned only by root


I've been having the same problem myself in Ubuntu 20.04, and while I'm writing this as an answer to try and help find a solution, I really have nothing more than a poor workaround.
In my case the "webcam" is a USB UVC capture device (I've tried two different types though and neither exhibits this behaviour on Windows).
I have found that the camera works for exactly one capture session then stops working until the device is reset. To reproduce:

Boot PC
Open cheese (video works)
Close cheese
Open cheese (video output is black)
Close cheese
Disconnect and reconnect webcam
Open cheese (video works)

This is somewhat problematic for apps like Skype, which apparently stop and start reading from the webcam before starting a call, so the result it's always black.
Things I've tried/checked so far that have not helped:

5.6 kernel
permissions on /dev/video (made user a member of the video group, have not tried root)

No relevant errors are logged that I can see.
What has helped is a script to hard-reset the USB device (I found usbreset.cc to be the best method), which achieves the same as unplugging the webcam physically. This at least makes the camera usable for Zoom, as unlike Skype it doesn't go completely mad when the device is reset. I am still looking for a proper solution though.


Chinese (intelligent pinyin) is not working well

I had the same problem as yours after installing some updates yesterday. You can shut down ibus intelligent pinyin and install fcitx-googlepinyin through apt-get.

In Regions and Languages > Manage Installed Languages -> Keyboard Input System change it to fcitx from ibus. Reboot.

Now you use Ctrl + Space to switch between input system instead of Super + Space. I don't know if googlepinyin has some other incompatibilities, but as far as I can see it doesn't have the problem ibus-libpinyin has that bothered us.


lenovo g480 blank screen while booting ubuntu

You can solve it (at least partially) by turning up the brightness on the screen.
I do not know why the computer automatically sets it to zero when starting ubuntu.
Anyway, just try it.


Cannot boot Windows 7 after installing ubuntu

Run this at the command line:

sudo grub-install /dev/sda

That should install GRUB with fresh config files, and it should make all well.


How to fix quadruple screen in teamviewer?

I had the same problem and found the solution here: https://help.ubuntu.com/community/KVM/FAQ

You need to create file /usr/share/X11/xorg.conf.d/60-teamviewer-fix.conf contents:

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync       20.0 - 50.0
        VertRefresh     40.0 - 80.0
        Option          "DPMS"

EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "vesa"
        VendorName  "KVM - std"
        BoardName   "GD 5446"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Modes "1600x1200"
        EndSubSection
EndSection

After that reboot your Ubuntu server and problem will be solved.


Viewing thousands of PDF files very rapidly

Assume the files are in the folder ~/myfiles. You can run this loop in a terminal (copy-paste):

for pdffile in ~/myfiles/*.pdf ;  do evince "$pdffile" ;  done

To jump to the next file just press Ctrl+W in the Evince window (to close it and open the next file).

FWIW, I am not sure how useful this would be considering that you need to view "thousands" of files...


Each integer requires 32 bits from the memory.

4 bytes = 4 * 8 bits = 4 bytes, so 2621440 integers would take (2621440 * 4 * 8) bits = (2621440 * 4) bytes = 80 megabits (Mb) = 10 megabytes (MB).

I think that you make a confusion between megabits (Mb) and megabytes (MB): 8 megabits (Mb) = 1 megabytes (MB).


Remove Mail Applet from Toolbar in Ubuntu 14.04

In Thunderbird,goto menu "Edit", "Preferences", then select the "Advanced" section and click on "Config. Editor

find:

extensions.messagingmenu.enabled

and set it to false.
Close your session and re-open it or reboot


Problem installing NVIDIA Driver on 16.04

First try the Nvidia drivers supplied by the normal repositories.

If those don't work, try one at a time, in oder a ppa graphics repository:
 graphics-drivers, x-swat, xorg-edgers
   e.g.:

sudo apt-add-repository ppa:graphics-drivers/ppa

See

   https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
   https://launchpad.net/~ubuntu-x-swat/+archive/ubuntu/updates
   https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa

Last resort would be the Nvidia site, possibly for the newest hardware.

Preparation

1)In your UEFI Settings (or BIOS):
  a) check for any video hardware selection.
     Choose "discrete" over "integrated" or "hybrid".
  b) Turn off secure boot, to avoid problems with unsigned
     kernel modules (post 14.04).

Nvidia drivers will need a recompile, but the default install will have all the necessary parts.

Ensure you are up-to-date with the default repositories:
In a terminal, type

sudo apt-get update

or

update-manager

From Dash, select "Software Updater" (start typing the name, and the selections will be available).

Now from Dash run

Software & Updates

or from a terminal type

update-manager

or from the "Software Updater", click on the Settings button at the lower left corner.

Under the "Ubuntu Software" tab:
ensure the "Proprietary drivers for devices (restricted)" is checked (It is by default).

Select the "Additional Drivers" tab
Select the latest Nvidia driver which is "(proprietary, tested)" (probably the first one listed) and click on the "apply changes" button.

The driver setup takes several minutes, but it does have a progress bar.

After the changes have been applied, the Nvidia button selected will be the active one.
Login again to restart X, and you should be running the Nvidia driver.  From Dash run

Nvidia Settings

to confirm.

No drivers at all in additional tabs...  Take a look at your UEFI settings (formerly known as BIOS) and see if you can select which video hardware is active.  Select "discrete" as opposed to "intergrated" or "hybrid".   Try running

ubuntu-drivers devices

to see the standard repository versions.  Take a look at other 1050ti postings here and in the forum like https://ubuntuforums.org/showthread.php?t=2353796  (Note OldFred's reply to the original post, cautioning against using the ...run method of installation.).


recover flash drive (no need to recover files)

If even

dd if=/dev/zero of=/dev/sdd

is giving you an I/O error, your USB stick is broken: throw it away and buy a new one.

Sorry to be the harbinger of bad news. :-(


Installing Tizen SDK on another partition in Ubuntu 12.04

You can download it from the webpage https://developer.tizen.org/downloads/tizen-sdk but you have to download sdk manager and sdk image for your system. Then after dawnloading, open the terminal and write commands as below. First go to your folder where you downloaded it, for example if u downloaded it in the downoads folder type in terminal: 'cd Downloads' and then type 'chmod +x tizen-sdk-Your version-ubuntu.bin' but now the version i used to download is 'tizen-sdk-ubuntu32-v2.2.71.bin'. After u did that type again './tizen-sdk--ubuntu.bin', for mine it was './tizen-sdk--ubuntu.bin'. Then its a window that u will see. click advanced and put your sdk image over there and then keep going until its finished....Hope it works


Do I need to run grub update after cloing my Ubuntu partition to my new ssd?

What I think it was happened, Cloning results two partitions with same UUID. So Grub while booting or OS while mounting can't distinguish between them.

Boot using live CD or USB key.
Unmount any auto-mounted partition.
Open terminal, run sudo fdisk -l to see your SSD partition device path.
Generate new UUID for SSD cloned partition (seem /dev/sda1 in your case)

tune2fs /dev/sdxy -U random

Copy that UUID from:

sudo blkid /dev/sdxy

Mount SSD partition (/dev/sda1), edit /etc/fstab to update old UUID with to new one:

sudo nano /media/ssd_part/etc/fstab

/media/ssd_part/ is where it is mounted.

Change old UUID with copied one in the line for root /. Example:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=4c0c4c6d-708b-45b0-b9e9-a5e6a7de491e /               ext4    errors=remount-ro 0       1
# /media/sneetsher/gnu_files/ was on /dev/sda5 during installation
UUID=bf958b50-c15a-45fd-b946-36ab1612045b /media/sneetsher/gnu_files/ ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=d15727d5-78c2-4a46-aa67-66895d7f6371 none            swap    sw              0       0

In this example, See this line which have mount point is /

 UUID=4c0c4c6d-708b-45b0-b9e9-a5e6a7de491e /               ext4    errors=remount-ro 0       1

Reinstall Grub on SSD

sudo grub-install --root-directory=/media/ssd_part /dev/sdx

At this point grub on SSD is aware of all OS's. Whereas grub in HDD is still don't list Ubuntu from SSD.

If each drive has a partition with boot flag. BIOS gonna boot 1st drive in boot order list. So if you booted from old HDD, update its grub.

sudo update-grub2

Then both drives have grub with all OS's listed.


Update: Problem solved for now. System is accessible.
Solution: Tried fsck -f /dev/sda for /dev/sda1 to /dev/sda8 for multiple iterations.
Looks like, the same problem is repeating. I'll have to shift system OS from Ubuntu to Windows


How do rootkits get installed on to a ubuntu server?

If it was me I would persue the following method:

Get a user to download and install a piece of software (#1). Have that software install the intended software. Hide a binairy blob inside that application lets you download software (ie. a tool you can use to ftp, wget etc).
Prompt for the admin account (#2) and use that to use an ftp, wget instance to download and install the rootkit.

Regarding #1: a user should never download random software when using Linux; use the appropriate channels (Ubuntu Software Center) to install software. If it is software that needs to be downloaded outside the appropriate channels make sure the source of the download can be trusted. Think latest versions of Apache software or MySQL. Do not go around downloading random software without checking out different social media about the integrity of that application. Microsoft never centralized software; it resulted in lots of people dabbling with software so their user base is hugh, but that also made it easy to get into computers and start gathering data they can sell.

Regarding #2: fatal user flaw. Never ever ever ever type in your admin password unless you know why it is asked.


Can I choose to not sort directories before files on file open dialogs?

I have a solution for GTK applications, and a solution for dolphin.  I've never figured out how to fix this for non-GTK applications (e.g., LibreOffice).

For GTK:

Fire up dconf-editor.
Navigate to org/gtk/settings/file-chooser.
De-select the box next to sort-directories-first.
Close the dialog.

For dolphin:

Navigate to Control / Sort by >.
De-select "Folders first" at the bottom of the menu.

Hope this helps.

EDIT:  I see someone else asked / addressed this problem here.  I mention it because that thread has an easy command-line answer for the GTK+ part:

gsettings set org.gtk.Settings.FileChooser sort-directories-first true


How to install new LXPanel in Lubuntu 12.04?

The "Keyboard Layout Handler" which is the major enhancement compared to the older "Keyboard Layout Switcher" of LXPanel 0.5.8 is present in this 0.5.10 build of LXPanel.

Trying to install LXPanel 0.5.11 daily build for Precise, it seems to ask for libmenu-cache2, which is available only for Raring 13.04. I have installed  libmenu-cache2 in Precise, then  this dev build of LXPanel 0.5.11. But then, staying with LXPanel 0.5.10 for the moment in Precise seems safer, at least until I find an answer to the question whether it is safe to install libmenu-cache2  .


How to detect a mobile device when it connects to a home wifi network?

I think this can be easily accomplished by arp-scan.

Install arp-scan: sudo apt-get install arp-scan
Detect all the hosts on the local network: sudo arp-scan -l

You can set up a crontab to periodically (every 2 mins maybe) run a script that scans the network with arp-scan and parses its output to discover the active hosts.

Sometimes I needed the -r 3 flag, which runs it three times; works much better as the default 2 times, which sometimes miss some devices. Thus:

 sudo arp-scan -l -r 3 | grep {Phone Static Assigned IP}

works better for me to LG V30+.


How to move only a specific amount of images from a folder

Run the script in your image directory. Make sure that destination doesn't have any sub directories.

IMG=100     # Number of images to move
DES="."     # Destination

I=$(find . -maxdepth 1 -mindepth 1 -type f | wc -l)
N=$(( (I / IMG) + (I % IMG) ))
eval mkdir "$DES"/Folder{01..$N}

for i in $(find "$DES" -maxdepth 1 -mindepth 1 -type d | sort); do
    mv $(find . -maxdepth 1 -mindepth 1 -type f | sort | grep -m $IMG '.*') $i
done


Thinkpad 11e Hard Lockup Using Multimedia Apps

I'm experiencing a kernel bug with the Intel Baytrail processors that this line of laptops use:

https://bugzilla.kernel.org/show_bug.cgi?id=109051

The workaround is to pass intel_idle.max_cstate=1 as a boot parameter as explained here


Optimal Ubuntu setup for taking advantage of Clonezilla?

Your partitions look ok.

If you want to enable full disk encryption after installation, most probably you will have to reinstall ubuntu. There is a good reference on different options you have for disk encryption here. There are also tools like Cryptkeeper, DM-Crypt, and LUKS which you could try. And yes, this method works well and is comparatively easier to do.
In addition if you want to clone your encrypted drives to smaller drivers have a look at ResizeEncryptedPartitions docs from ubuntu. there are some resources here in Ask Ubuntu as well. Do go through them before making a final call.

That depends on what all things you want to backup.

Depends on the extend of damage to the partition. Sometime it will be as easy as booting in live USB/CD and automatically fix the partition. But in more serious damages it might be even impossible to recover data.


Cannot change input-language (using Alt+Shift) over NX session

follow me...
go to system settings then click on keyboard layout
click on '+' and select your language
the click on options
go to "keys to change layout"
then mark 'Alt+Shift'


You have 5% reserved space on your drive, which can only be used by root. Either you free more space (as you cannot use the 50GB as a normal user), or you tunefs the filesystem to not reserve these GB's for root.


For Ubuntu you need to download the theme XML file and copy it to folder

~/.WebIdeXX/config/colors

In my case it is ~/.WebIde50/config/colors

Restart phpstorm
Select the new theme by navigating to

Settings->Editor->Colors & Fonts

Hope this helps


HP Prolient ML350 G5, should ubuntu server be installed?

The desktop version comes with a normal GUI including graphical standard applications.

The server version has no graphical interface but is only accessible through the command-line. It comes with a few server packages preinstalled.

Unless you are familiar with the Ubuntu command-line and have a reason not to use a graphical desktop, there is no reason for the average user to get the Ubuntu server version.


Can I set up Nautilus to use transparent background?

You can use Compiz settings manager (you need to install "compizconfig-settings-manager" package, and then run the "CompizConfig manager" from the "System->Preferences" menu).

Under the "Accessibility" item, you have "opacity, luminosity" option. There you can define the opacity (and then, transparency) of your windows, and you can set it based on the window title or type...
 If you create a new item here, you can type "class=Nautilus" and select the transparency you want. Then all Nautilus windows will be transparent.


Yes, you can do this. Here's how:

http://www.ubuntu.com/download/help/try-ubuntu-before-you-install


How do I add applets to the top panel in Ubuntu 14.04?

Each indicator/applet (should) have a user setting letting the user specify autorun on startup.  Installing the indicator does not run it as you discovered and a well-behaved indicator will not autorun unless set to do so by the user.

However, in the unity dash, search for "start" and you'll find Startup Applications which will allow you to specify specific programs, including indicators, to run on startup and that will "add the applet to the top panel".


Upgrade python 3.4.3 to 3.5.1, problems with Pip

Found a solution by myself. It seems that I didn't have the "python3.5-dev" installed.

Solved using the following:

sudo apt-get install python3.5-dev


dpkg snippet isn't working for me when fixing / installing dockbar

I think i fixed it already

check out here ...
dockbar installing error:

sudo apt-get -f install
sudo dpkg -i --force-all /var/cache/apt/archives/dockmanager_0.1.0~bzr80-0ubuntu1~10.10~dockers1_i386.deb
sudo apt-get -f install


scp creates files with the owner of the user and groups of the user running the command on the destination machine. To keep the owner rights, you should use rsync. For more info Here.


Restoring MySQL files to new disk 14.04 - permissions?

Permissions (ownership, specifically) may be an issue, in which case they can be corrected to the default by doing:

sudo chown -R mysql:mysql /var/lib/mysql

Obviously, change the username (the first mysql in that command) and the group (the second) if you've edited your user/group that MySQL runs as.

However, I'd like to note that backing up the raw files is generally discouraged when migrating. Using the mysqldump command is generally preferred, as it outputs to a text file using SQL which can be imported and executed cleanly by the new version.

Between 12.04 and 14.04, you probably won't see too many issues, but more dramatic changes can sometimes be a problem. For instance, in some past upgrades, the way that usernames were hashed changed dramatically, and using older raw files required a special config option that could not be resolved without using special tools or commands.


How to install one single package listed on packages.debian.org?

Download the dpkg package file ,
then run this command:
sudo dpkg -i  --force-depends  your-package.dpkg

The download link for the package file is at the bottom of the page.


Kaffeine not running anymore after trying Gnuradio

I have found the cause of the problem.

One of the Gnuradio/rtl-sdr related packages has installed a file named:

/etc/modprobe.d/rtl-sdr-blacklist.con

This prevents the dvb_usb_rtl28xxu, e4000 and rtl2832 modules being loaded. For watching DVB-T they have to be loaded manually now. Blacklisting these modules is necessary, as they conflict with rtl-sdr.


Laptop not going to sleep when closing the lid

OK, try manually suspending it first, to see what's up:

sudo pm-hibernate

Suspend and hybernate have issues in 16.04 LTS at default kernel. Type uname -r to see which kernel you're using, probably 4.4.0.21 or 22. Doesn't work at this kernel with some laptops. Upgrading to a newer kernel from 4.4.8 onwards fixes the problem.

See more here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1566302

To upgrade the kernel, check here:
http://lifepluslinux.blogspot.hr/2016/04/ubuntu-1604-wont-wake-up-from-suspend.html


After a recent update 18.04 now only emergency mode

I think also that the UUIDs are wrong.
You can try to do a boot repair and/or change the UUIDs manually.

I suggest you note the UUIDs on a paper first and then try to edit in GRUB menu the UUIDs to see, if the server starts normally.

Therefore press "e" key during GRUB menu and edit the UUIDs


How do I  add a Ubuntu countdown widget into a forum?

Try this.

- vB Code tag: iframe
- vB Code replacement: {param}
- vB Code example: [iframe]index.php?action=home[/iframe]
- Use option: no

source


Best Way To Start Learning Shell Commands in Terminal?

There is a nice manual in the community wiki, it can be found here. You have all you need to start there


Your paste shows that your router is on channel 10. I suspect that indicates that the router is set to autoselect the channel, as channel 10 is not usually set explcitly as it is an overlapped channel: https://www.metageek.com/training/resources/why-channels-1-6-11.html
I suggest that you change the router to use a fixed channel, either 1, 6 or 11 as the link recommends.
Next, WPA2-AES is preferred; not any WPA and WPA2 mixed or autoselect mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds.
Your paste also shows the router as:
Quality=48/70  Signal level=-62 dBm

This weak symptom may actually be the fault of the router. Please check to see if there is a setting in the router for TX power:

If so, please try increasing it.
Finally, I recommend that your regulatory domain be set explicitly. Check yours:
sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:
sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:
sudo nano /etc/default/crda

Change the last line to read:
REGDOMAIN=IS

Proofread carefully, save (Ctrl+o followed by Enter) and close (Ctrl+x) the text editor.


Terminal emulator with a “restore session” feature like Mac Terminal

One good way of having terminal sessions that persist is to run a 'screen' session on server. A 'screen' session gives you multiple windows on that server where you can be logged in to other machines or whatever. You can have multiple 'screen' sessions running on server. You can disconnect and reconnect to the sessions you need. 'screen' is old-school command-line keyboard but well worth learning and playing with to learn how it works. wikipedia describes screen well "GNU Screen is a terminal multiplexer, ... allowing a user to access multiple separate login sessions inside a single terminal window, ... a remote process continues running even when the user is disconnected." It has a few big advantages:

easy to install, runs on any unix(or cygwin), no graphics needed (besides terminal text graphics)
gives persistent windowed terminal sessions (as long as server is not rebooted)

* screen quickstart *

RTFM: gnu.org Screen User's Manual

screen - Run screen to create a new session simply
screen -ls - list screen sessions running
screen -r 20229.pts-2.bangor - re-attach to session

The * screen ESCAPE char by default is Ctrl-a * unless some craZy looper has changed it in .screenrc e.g. "escape ^Zz" for people who don't value process backgrounding control. To get a real Ctrl-a to terminal (goto beginning of line) if running in screen then just do Ctrl-a Ctrl-a.

ESCAPE c - create new screen window
ESCAPE 0 (or 1 2 3 4 5 6 7 8 9) - switch to window 0 (or 1 2 . . )
ESCAPE p or ESCAPE n - switch to previous or next window
ESCAPE " - window list
ESCAPE h - shows screen help:

                                           Screen key bindings, page 1 of 1.

                                           Command key:  ^A   Literal ^A:  a

 break      ^B b        help       ?           monitor    M           remove     X           version    v
 clear      C           history    { }         next       ^@ ^N sp n  removebuf  =           width      W
 colon      :           info       i           number     N           reset      Z           windows    ^W w
 copy       ^[ [        kill       K           only       Q           screen     ^C c        wrap       ^R r
 detach     ^D d        lastmsg    ^M m        other      ^Z          select     '           writebuf   >
 digraph    ^V          license    ,           pow_break  B           silence    _           xoff       ^S s
 displays   *           lockscreen ^X x        pow_detach D           split      S           xon        ^Q q
 fit        F           log        H           prev       ^H ^P p ^?  time       ^T t
 flow       ^F f        login      L           readbuf    <           title      A
 focus      ^I          meta       z           redisplay  ^L l        vbell      ^G

^]   paste [.]
"    windowlist -b
-    select -
0    select 0
1    select 1
2    select 2
3    select 3
4    select 4
5    select 5
6    select 6
7    select 7
8    select 8
9    select 9
I    login on
O    login off
]    paste .
|    split -v
:kB: focus prev

                                            [Press Space or Return to end.]

e.g. reattaching to a session:

  $ screen -ls There are screens on:
    24560.pts-6.mabrowka    (Detached)
    20229.pts-2.mabrowka    (Attached) 2 Sockets in /var/run/screen/S-garmon.

  $ screen -r 20229.pts-2.mabrowska

command-line help:

> $ screen --help Use: screen [-opts] [cmd [args]]  or: screen -r
> [host.tty]
>
> Options:
> -4            Resolve hostnames only to IPv4 addresses.
> -6            Resolve hostnames only to IPv6 addresses.
> -a            Force all capabilities into each window's termcap.
> -A -[r|R]     Adapt all windows to the new display width & height.
> -c file       Read configuration file instead of '.screenrc'.
> -d (-r)       Detach the elsewhere running screen (and reattach here).
> -dmS name     Start as daemon: Screen session in detached mode.
> -D (-r)       Detach and logout remote (and reattach here).
> -D -RR        Do whatever is needed to get a screen session.
> -e xy         Change command characters.
> -f            Flow control on, -fn = off, -fa = auto.
> -h lines      Set the size of the scrollback history buffer.
> -i            Interrupt output sooner when flow control is on.
> -l            Login mode on (update /var/run/utmp), -ln = off.
> -ls [match]   or
> -list         Do nothing, just list our SockDir [on possible matches].
> -L            Turn on output logging.
> -m            ignore $STY variable, do create a new screen session.
> -O            Choose optimal output rather than exact vt100 emulation.
> -p window     Preselect the named window if it exists.
> -q            Quiet startup. Exits with non-zero return code if unsuccessful.
> -Q            Commands will send the response to the stdout of the querying process.
> -r [session]  Reattach to a detached screen process.
> -R            Reattach if possible, otherwise start a new session.
> -s shell      Shell to execute rather than $SHELL.
> -S sockname   Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
> -t title      Set title. (window's name).
> -T term       Use term as $TERM for windows, rather than "screen".
> -U            Tell screen to use UTF-8 encoding.
> -v            Print "Screen version 4.01.00devel (GNU) 2-May-06".
> -wipe [match] Do nothing, just clean up SockDir [on possible matches].
> -x            Attach to a not detached screen. (Multi display mode).
> -X            Execute <cmd> as a screen command in the specified session.

And an example .screenrc file:

$ cat .screenrc
#
# Example of a user's .screenrc file
#

# This is how one can set a reattach password:
# password ODSJQf.4IJN7E    # "1234"

# no annoying audible bell, please
vbell on

# detach on hangup
autodetach on

# don't display the copyright page
startup_message off

# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."

# advertise hardstatus support to $TERMCAP
# termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'

# make the shell in every window a login shell
#shell -$SHELL

# autoaka testing
# shellaka '> |tcsh'
# shellaka '$ |sh'

# set every new windows hardstatus line to somenthing descriptive
# defhstatus "screen: ^En (^Et)"

defscrollback 1000

# don't kill window after the process died
# zombie "^["

################
#
# xterm tweaks
#

#xterm understands both im/ic and doesn't have a status line.
#Note: Do not specify im and ic in the real termcap/info file as
#some programs (e.g. vi) will not work anymore.
termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l

#80/132 column switching must be enabled for ^AW to work
#change init sequence to not switch width
termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

# Make the output buffer large for (fast) xterms.
termcapinfo xterm* OL=10000

# tell screen that xterm can switch to dark background and has function
# keys.
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H:kN=\E[6~'

# special xterm hardstatus: use the window title.
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]0;screen\007'

# our xterm has colors! (rxvt, too)
termcap  xterm 'AF=\E[3%dm:AB=\E[4%dm'
terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm'

#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'

# emulate part of the 'K' charset
termcapinfo   xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'

# xterm-52 tweaks:
# - uses background color for delete operations
# - maps F1-4 to PF1-4
# termcapinfo xterm ut
# termcapinfo xterm 'k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS'

################
#
# wyse terminals
#

#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
#essential to have it here, as this is a slow terminal.
termcapinfo wy75-42 xo:hs@

# New termcap sequences for cursor application mode.
termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J

################
#
# other terminals
#

#make hp700 termcap/info better
termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'

# Extend the vt100 desciption by some sequences.
termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC

################
#
# keybindings
#

#remove some stupid / dangerous key bindings
bind k
bind ^k
bind .
bind ^\
bind \\
#bind ^h
bind h
#make them better
bind '\\' quit
bind 'K' kill
bind 'I' login on
bind 'O' login off
bind '}' history

# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.
# This lets me have autoindent mode in vi.
register [ "\033:se noai\015a"
register ] "\033:se ai\015a"
bind ^] paste [.]

################
#
# default windows
#

# screen -t local 0
# screen -t mail 1 elm
# screen -t 40 2 rlogin faui40

# yeah, please don't re-map the screen ESCAPE char
#  there could be wailing and gNasHing of teeth
#  anyway this is how you would do it if you were a cRaZy loOpeR:
#escape ^Zz

This is not ~quite~ eXacTly the answer to the question asked.

But it IS actually the answer you were looking for! >;-)

screen is very useful.

Have fun!

James.


Why doesn't php (cli) have a default memory limit?

You can restrict your commandline scripts with max-execution-time
"This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. When running PHP from the command line the default setting is 0.
...
You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini."


"Disable touchpad button": touchpad won't re-enable

Just load or unload the psmouse module from kernel

for example:

To disable touchpad:

# rmmod psmouse

To enable touchpad again:

# modprobe psmouse

and voila!


The default gateway is the host designated as the default router; that is, when your computer wants to connect to another computer which is not on the local network, it will send the data packets to the default gateway to be routed to the destination. (Real configuration are often more complicated; this explanation is strictly correct only with simple network configurations.)

For more details, see default gateway on Wikipedia.

In your example, the default gateway has address 10.0.2.2. Your computer will send data packets to 10.0.2.2 for routing whenever the destination is not directly accessible.


How to prompt for sudo password using GUI?

try this inside your script 'file.py', running as normal user :

import subprocess
subprocess.call(['gksudo', 'your first sudo action here'])
subprocess.call(['gksudo', 'another bash command'])

or this inside a parent python script

import subprocess
subprocess.call(['gksudo','python file.py'])


See here the description of this problem :

Ubuntu gets stuck in a login loop

I think it is because of light-dm it is set prior to gdm? - I dont know
why it is prior to gdm.


In the same directory, enter the following command:

sudo make install

The sudo gives make the root permissions it needs to finish installing clang, which has already successfully compiled.


Netflix just stopped to work on LInux32+firefox

Netflix should work fine in Firefox if you're using one of their newer versions which supports CDM (a solution for playing DRM-media through HTML5). (Firefox introducing this made rather big fuzz actually - read here or here for more information and tips).

It hard to say why it's not working in your case. Widevine and Adobe Primetime should download automaticly by Firefox I think. You could start by verifying that both Google Widevine and Adobe Primetime is set to "Always Activate":

Then check that Firefox is set to play DRM content:

Also delete all your cookies and set Firefox to remember history:

If this doesn't work try to re-install firefox (sudo apt-get install --reinstall firefox I guess).

Best of luck!


How can I limit a directory accessibility to only itself?

I read somewhere, you can make a directory isolated on linux, like a different server. Any idea how can I do that?

If you want to have an isolated directory, you can use Chroot. That makes you able to isolating applications from the rest of your computer.

For this purpose, please read this article: BasicChroot.

  how can I make that wordpress project isolated?

Also you use chattr command for making a directory and its contents immutable, even with root access.

sudo chattr -R +i /path/of/your/directory

After run above command any users can [change/remove/append] that directory and its constents.

And for remove immutable flag from that files, you can uses below command:

sudo chattr -R -i /path/of/your/directory


I got it! You need to change line 19 in Makefile to

        @${LD} -o $@ ${OBJ} ${LDFLAGS}


Unable to set up a static ip ethernet connection in Ubuntu 20.04 Desktop, what is normally put for netmask and gateway?

Yes, a adrress+mask of 120.237.28.0/24 (the /24 is CIDR notation is the same as a mask of 255.255.255.0) means that the computers connected to the same LAN have addresses in the range 120.237.28.0 .. 120.237.28.255. Your computer can talk directly to these.
To communicate with computers outside this range, your computer talks to the gateway, which is another system with a connection in your local LAN and a connection to the outer world (it has an address in each). The gateway address that you need is the address in your LAN, usually at either end of the range: 120.237.28.0 or 120.237.28.254 (the final address of the range is reserved as a "broadcast" address).
The DNS can be any server that answers to DNS requests, you can use the OpenDNS ones: 208.67.222.222 or 208.67.220.220. A DNS server provided by your organization can also resolve names that are useful in everyday' life, such as printers, or local servers.
I assume that this is for a server; in general an individual's system doesn't get a public address like yours (which means that the computer can be accessed from the internet), one connects to a private network (192.168.*.* or 10.*.*.*) and the public address is borne by the router that connects that local network to the internet.


Switching to local update server has slowed down my update process

I highly recommend that you use the source server marked as "Main Server". The connection speed to the local server would vary from country to country.

Another possible solution is to choose the "Other" option, then select "Select Best Server". This will make Ubuntu test the connection speed of all the servers and choose the best one.

Lastly, you can select a "First World" server given that they usually have better Internet connection speeds.


Ubuntu using Linux Subsystem for Windows .sh problem

I changed line 1 of the script from

#!/bin/env bash

to

#!/bin/bash

And I am able to run the script normally.

Thank you Bernard!


Use this code to add the repo:

sudo apt-add-repository ppa:gnome3-team/gnome3

Evolution is by the same people as gnome3, so this should contain evolution 3.4.3 (unless my information is outdated.

EDIT: OK, I found a PPA with evolution 3.4.2. However, it is unofficial, so use at your own risk.

sudo apt-add-repository ppa:janvitus/gnomestracciatella

I can't find any with 3.4.3, but this one will probably be updated at some point in the near future.


No option to Shutdown when running from Live CD

Open a terminal and type sudo shutdown -s then press enter.

Next time please ask a question and not write a rant :).


I did a search and found cutmp3 might be what your looking for.  It is command line and looks like it can edit mp3's.


Network icon missing and network not connecting

depends on your network Connection, if your mainboard has one of those realtek network Adapters, open a terminal end enter
lspci
for USB network adapters type
lsusb
if your Network adapter is to be seen there you only need to reinstall the driver. if its not to be seen then ist eventually broken or in sleep mode.
check in your bios if the Network adapter is running or if you dont know how to do so, look at the backside of your PC, there is a diode on the network adapter, if it is flashing slow its not working proper or the network cable is not plugged in properly.


Lubuntu does not have the drivers for my Intel Wireless card

Whoops, sorry, I am a complete noob at linux and I just had to enable Network (AKA nm-applet) in Preferences > LXQt settings > Session settings > Autostart > enable Network, and then log out and log back in. Then it shows up as a second "no-ethernet" icon in the tray at the bottom right. It had nothing to do with the drivers at all.


It's important to understand that PPAs are not intended for trusted, widespread distribution of updates.

Trusted distribution of updates should generally run through the official Ubuntu repositories. PPAs, while hosted by Canonical as a public service, are not the official Ubuntu repositories.

PPAs are intended for testing and limited distribution, and they are an important element of the Ubuntu development ecosystem.

However, their nature as a self-signed free repository means that PPAs can be misused by both users and by developers. This venue is littered with the tears of folks who misused PPAs as a sole source or an upgrade path.

In other words, you take a risk when you use PPAs.

If you discover a developer who uses PPA as a method of distributing released (non-testing) software, please encourage them to contribute their software to Debian so it can have much wider distribution, community testing and support, and can be discovered by many more users.
If you use PPAs on top of an LTS release of Ubuntu in order to get the latest software, then consider using one of Ubuntu's "interim" (6-month) releases instead. They are just as stable, each release updates your entire software stack software, and it's tested and supported by this community.


Installing Landscape and launch the OpenStack Autopilot

From your 2nd attempt paste, looks like you hit https://bugs.launchpad.net/juju-core/+bug/1425435. Can you try upgrading your python-jujuclient package to the version in this PPA and see if it fixes your problem?

https://launchpad.net/~ahasenack/+archive/ubuntu/python-jujuclient


How can I find the location of files installed via Software Center are available?

For the programs installed system wide whereis command helps

whereis vim

But I like to use which command.

e.g. which vim shows the location of vim which'll be used, if you tried to run vim command on terminal. Also whereis command won't show the location of command if its in your home directory. For example. if your ~/bin directory has a command pqr whereis won't show the location of pqr. which pqr shows its location too.

If you have set the aliases for the commands, for example if your terminal understands the shortcut c for clear command for example, you can get the original command, by typing the command:

type c

It will output:

  c is aliased to clear


It looks like you have logged in to a Unity session instead of a GNOME session.

If you're using GDM3, there should be a cogwheel (⚙) next to the "sign in" button at the login screen. Click on it and select GNOME instead of Unity.


Of course since isoes are read only, you could do as you suggest, but Ubuntu isoes allow an actual installation to the virtual disk, which does take more space (3-4G), but then the iso is not used at all, and since the filesystem is no longer compressed, should boot/run faster.


Bypass "Do you want to..." dialog after clicking script

In Nautilus, choose Edit ▸ Preferences ▸ Behavior ▸ Executable Text Files ▸ Run executable text files when they are opened.


How do I install ATI drivers and keep them up-to-date?

You should try the most canonical method : open the Dash Menu, type "Software Sources", launch the "Software Sources" app, go to the Additional Drivers tab, follow the suggested instructions. This will install the driver that is tested and advised by the Ubuntu community (not necessarily the latest one).

As a very general rule, in Ubuntu you should prefer to install apps from a store rather than a developer-website or a download-website. Start with the Ubuntu Software Center. When you are familiar with it, come back to this page and you'll be able to try the following "stores", without any particular order : Launchpad PPAs, Steam, Desura, Humble Store, apt-get.


Why hasn't my Kubuntu 14.04 LTS upgraded to the 4.4 kernel series?

You need to install the Hardware Enablement Stack (HWE) to get to the 4.4 kernel.

Run the following command from a terminal window to update your 14.04 to a 4.4 kernel:

sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial

Even though this references Xenial, this is not upgrading the OS to 16.04.  It is only upgrading the Kernel to that of 16.04 (Xenial).  Since Xenial is LTS, this Kernel version will continue support until April 2019.  The 3.13 Kernel will also remain on the system and you can always go back to it by selecting Advanced during the bootup of the system.

Kernel support schedule: https://wiki.ubuntu.com/Kernel/Support

More information can be found at:  https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Hope this helps!


Does mv ignore the letter case by default?

This is probably related to the filesystem. I suspect that on a FAT32 FS the mv command will ignore case, as the FS itself ignores case. The same issue can afflict Mac-based filesystems.


Problem with sudo apt-get each time I log on

This is probably the auto-update functionality of Ubuntu. Try waiting a few minutes after logging in and it should now run correctly.

To prevent this from happening at all, uninstall the unattended-upgrades package (which is kicking off those updates) with the following command:
sudo apt purge unattended-upgrades

After a reboot the problem you are facing should be gone.


Can't format or delete partitions in pendrive because of GPT table error

I ran into this problem with writing onto an old drive that had been written as a live linux disk.

Solution if you just want to erase the disk /dev/sdX:

sudo gdisk /dev/sdX
o

(agree to delete partitions)

w

(agree to write partition table)

And then you have a perfectly blank drive.  All that remains is to create a partition if you want to use it.

Note: Gdisk is a disk partitioning tool, and it can erase your disk if not careful. It is designed to create, modify, and erase partitions.


Dolphin is not showing the image dimensions metadata when previewing images on Kubuntu 16.10

It seems that there is an old bug: https://bugs.kde.org/show_bug.cgi?id=332065. Although its status says "fixed", I am running into this problem on recent versions of KDE (it is back in Kubuntu 17.10). Following some instructions in https://bugs.kde.org/show_bug.cgi?id=332065#c30 and disabling file indexing "fixes" the problem. I have tried it and it indeed works.

The bug's comment mentioned above also says that if file indexing is enabled, deleting or renaming ~/.local/share/baloo/, thus forcing the index to be created again may also solve it, but for me it again stopped showing the metadata after restarting the system. Disabling file indexing altogether appears to be a more "permanent" solution. It can also be done in the GUI by opening System Settings, Search, then turning off the 'Enable File Search' option. Disabling file search/indexing will, of course, stop showing files in search results across Plasma desktop (Dolphin's own Find option will still keep working).


Can I get gimp manual instruction offline?

sudo apt-get install gimp-help-en will install the docs for offline usage.


June 3, 2019 Update

Nvidia needs a working Xorg installation to operate within. As your current Xorg Gnome desktop is broken you can try the Unity Desktop to get nVidia drivers working first.

sudo apt-get install unity-session
sudo apt-get install lightdm

And using TAB key select lightdm between "gdm3" and "lightdm" choices there, and press ENTER key to go.

I have a GTX 970M but I know this driver also works with the GTX 1060M which is one step above yours:

$ sudo ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
model    : GM204M [GeForce GTX 970M]
vendor   : NVIDIA Corporation
modalias : pci:v000010DEd000013D8sv00001028sd00000708bc03sc02i00
driver   : nvidia-384 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

$ dmesg | grep -i nvidia

[    1.760813] nvidia: loading out-of-tree module taints kernel.
[    1.760817] nvidia: module license 'NVIDIA' taints kernel.
[    1.763857] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.771538] nvidia-nvlink: Nvlink Core is being initialized, major device number 242
[    1.771720] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[    1.771858] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  384.130  Wed Mar 21 03:37:26 PDT 2018 (using threaded interrupts)
[    1.778086] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  384.130  Wed Mar 21 02:59:49 PDT 2018
[    1.779773] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    1.779774] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    4.866848] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 240
[    5.248695] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input9
[    8.877159] nvidia-modeset: Allocated GPU:0 (GPU-30fab9bc-fe6f-ec05-e8e6-c151a1a96121) @ PCI:0000:01:00.0

If you need sound turned on for your nVidia HDMI and most manufacturers these days have it powered off, then you need to use this:

Linux kernel module to toggle Nvidia HDMI audio device on/off on notebooks

Here is someone that has taken the prime-select code and patched it because it wouldn't switch from nvidia to intel. If his patch doesn't help you perhaps he can?

NVIDIA-PRIME: Cant switch to intel


Mount on filesystem of type eCryptfs explicitly disallowed due to known incompatibilities

You mentioned that your home folder is "encrypted by Ubuntu" -- it's actually encrypted using eCryptfs.  Check the output of:

grep $HOME /proc/mounts

Nesting encrypted directories inside of encrypted directories is not supported with eCryptfs.  Sorry.

Full disclosure: I'm one of the authors and current maintainers of eCryptfs.


How do I ignore a proxy if not available?

There is an undocumented setting, Acquire::http::ProxyAutoDetect. This setting should contains the full path to the binary and cannot have arguments. The command should output the proxy to be used (example: http://10.0.0.1:8000).

Given the above information, a script could be created that tries a proxy before setting it. If no proxy is available, a direct connection should be used.

Below is such a proxy detection script which tries the http://10.0.0.1:8000/ and http://10.0.0.2:8000 proxies.

Put the code in /etc/apt/detect-http-proxy:

#!/bin/bash
# detect-http-proxy - Returns a HTTP proxy which is available for use

# Author: Lekensteyn <lekensteyn@gmail.com>

# Supported since APT 0.7.25.3ubuntu1 (Lucid) and 0.7.26~exp1 (Debian Squeeze)
# Unsupported: Ubuntu Karmic and before, Debian Lenny and before

# Put this file in /etc/apt/detect-http-proxy and create and add the below
# configuration in /etc/apt/apt.conf.d/30detectproxy
#    Acquire::http::ProxyAutoDetect "/etc/apt/detect-http-proxy";

# APT calls this script for each host that should be connected to. Therefore
# you may see the proxy messages multiple times (LP 814130). If you find this
# annoying and wish to disable these messages, set show_proxy_messages to 0
show_proxy_messages=1

# on or more proxies can be specified. Note that each will introduce a routing
# delay and therefore its recommended to put the proxy which is most likely to
# be available on the top. If no proxy is available, a direct connection will
# be used
try_proxies=(
10.0.0.1:8000
10.0.0.2:8000
)

print_msg() {
    # \x0d clears the line so [Working] is hidden
    [ "$show_proxy_messages" = 1 ] && printf '\x0d%s\n' "$1" >&2
}

for proxy in "${try_proxies[@]}"; do
    # if the host machine / proxy is reachable...
    if nc -z ${proxy/:/ }; then
        proxy=http://$proxy
        print_msg "Proxy that will be used: $proxy"
        echo "$proxy"
        exit
    fi
done
print_msg "No proxy will be used"

# Workaround for Launchpad bug 654393 so it works with Debian Squeeze (<0.8.11)
echo DIRECT

Now, APT must be configured to use the above proxy detection script, so put the following code in /etc/apt/apt.conf.d/30detectproxy:

# Fail immediately if a file could not be retrieved. Comment if you have a bad
# Internet connection
Acquire::Retries 0;

# undocumented feature which was found in the source. It should be an absolute
# path to the program, no arguments are allowed. stdout contains the proxy
# server, stderr is shown (in stderr) but ignored by APT
Acquire::http::ProxyAutoDetect "/etc/apt/detect-http-proxy";

I've also put the next code to the file to prevent some host from being proxified.

# Override the default proxy, DIRECT causes a direct connection to be used
Acquire::http::Proxy {
    deb.opera.com DIRECT;
    dl.google.com DIRECT;
};

By default, the script outputs whether a proxy is used or not. To disable that, edit /etc/apt/detect-http-proxy and change show_proxy_messages=1 to show_proxy_messages=0.


Why does apt-get fail when automated with cron?

Although your main problem has already been answered,  it looks like you're getting debconf warnings because you're running apt-get without an interactive tty.  To get rid of these messages, you can set this environment variable:

DEBIAN_FRONTEND=noninteractive


How do I create a shared folder after virtualization Windows 10 with VirtualBox on Ubuntu 18.04 LTS?

Shared folders are a feature provided by VirtualBox Guest Additions.


sudo runs the following command as an administrator.

add-apt-repository adds the following repository to the list of places the system goes to look for software.

ppa:notepadqq-team/notepadqq is the name of the repository where the notepadqq team upload updates to their software.

One you run this command, you will be able to install notepadqq by typing

sudo apt-get install notepadqq

and if you install it this way, the system update program will also find and install updates to notepadqq.


/opt looks like the ideal place to put them in. I prefer to rename adt-bundle-linux-x86.... to simply android so the sdk will be in /opt/android/sdk

  This directory is reserved for all the software and add-on packages
  that are not part of the default installation. For example,
  StarOffice, Kylix, Netscape Communicator and WordPerfect packages are
  normally found here. To comply with the FSSTND, all third party
  applications should be installed in this directory.
  -- http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html

Other choice is /usr/local

  These days, '/usr/local' is widely regarded as a good place in which
  to keep self-compiled or third-party programs.
  -- http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html


Install GLX 1.3 on Ubuntu 16.04.1 (Google Chrome)

$ sudo ppa-purge xorg-edgers

...

$ sudo -E add-apt-repository ppa:xorg-edgers/ppa

...

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libvulkan-dev libvulkan1
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,558 kB of archives.
After this operation, 5,443 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 208248 files and directories currently installed.)
Preparing to unpack .../libvulkan-dev_1.1.73+dfsg-1~gpu18.04.1_amd64.deb ...
Unpacking libvulkan-dev:amd64 (1.1.73+dfsg-1~gpu18.04.1) over (1.1.70+dfsg1-1) ...
Preparing to unpack .../libvulkan1_1.1.73+dfsg-1~gpu18.04.1_amd64.deb ...
Unpacking libvulkan1:amd64 (1.1.73+dfsg-1~gpu18.04.1) over (1.1.70+dfsg1-1) ...
Setting up libvulkan1:amd64 (1.1.73+dfsg-1~gpu18.04.1) ...
Setting up libvulkan-dev:amd64 (1.1.73+dfsg-1~gpu18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

Upgrade works fine, but still in 1.2 (OpenGL version string: 3.1 Mesa 19.0.8)

$ sudo glxinfo | grep "GLX version"
GLX version: 1.2


How to disable the hiding of scrollbars in version 16.04 and up

With 15.10 Ubuntu switched to Gnome-scrollbars. Searching for this topic I found https://www.reddit.com/r/gnome/comments/37bp1r/how_do_i_disable_316s_overlay_scrollbars/ where it is suggested to use the following commands:

export GTK_OVERLAY_SCROLLING=0
gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment '{"GTK_OVERLAY_SCROLLING": "0"}'

I just tested these commands on UbuntuGnome 17.04, the scrollbars stopped hiding and were visible all the time without hovering over them.
If the commands work for you, you may add them to your ~/.profile-file.


Try adding these lines to your /etc/network/interfaces

auto eth0
iface eth0 inet dhcp

These two lines are to set up the eth0 interface as dhcp. According to OP's question, he mentioned "dhclient" so I think this is what he want's.

After you are done with that save the files and run the following :

if you are on 13.10 or before this should restart your networking:

$ sudo service networking restart

If on 14.04 the above may not work so try this

$ sudo ifdown eth0 && sudo ifup eth0

to pull the eth0 interface down and then restart it with the changes in the above networking file.


Can less than a 5 pack for Ubuntu Advantage Desktop be purchased?

Quoted from the Ubuntu Advantage Site:

Volume Purchasing.  Looking for business volume licensing? Request a call.
Interested in purchasing less than 5 Ubuntu Advantage subscriptions? Support is already free for you - visit Ask Ubuntu to get in touch!

Now I don't know if this can be answered at Ask Ubuntu.  Maybe a Moderator would have more info on the subject matter, but I would recommend clicking on Request a Call above, and see if you can get an answer that way.


Bash SH - Set a new var name including in that name another var

One possible way to solve this task is to use the command eval in a way as this:

#!/bin/bash

for i in {1..5}
do
        eval "var$i"="$i"
done

# Output the result
for i in {1..5}
do
        echo -n "\$var$i : "
        eval echo "\$var$i"
done

Sample output:

$ ./cycle.sh
$var1 : 1
$var2 : 2
$var3 : 3
$var4 : 4
$var5 : 5

However, I think it is better to adapt your scrip to works with arrays in order to avoid such magics:

#!/bin/bash

for i in {1..5}
do
        array["$i"]="$i"
done

# Output the result
for i in {1..5}
do
        echo "\$array[$i]" : "${array[$i]}"
done

Sample output:

$ ./cycle.sh
$array[1] : 1
$array[2] : 2
$array[3] : 3
$array[4] : 4
$array[5] : 5

Note: by default the first index within a Bash array is [0], not [1].


You need to give the increment as negative number i.e. in your case -1.

For example:

$ seq 1 5 && seq 5 -1 1
1
2
3
4
5
5
4
3
2
1

Here seq 5 -1 1 takes the format seq FIRST INCREMENT LAST.

Furthermore, if you want every alternate numbers from 10 to 0:

$ seq 10 -2 0
10
8
6
4
2
0

Check man seq to get more idea.


Upgrade from 11.04 to 12.04 failed - unable to login

This method should help you save your data: Use a bootable CD from any Linux distribution (Debian, Ubuntu, Arch, Knoppix, etc) and use it to boot from the CD/DVD drive. You should be able to find a "try" operating system option that does not disturb data on the hard disk. After booting attach a portable external drive and backup your data.


Virtualbox: host only networking - proxy internet connection

Ok well I finally got it working.

I have installed the Squid proxy server on my Ubuntu host, and added the virtualbox adapter.

This link was very useful for quickly getting squid running:
http://www.ubuntugeek.com/how-to-setup-transparent-squid-proxy-server-in-ubuntu.html

All I need to do now is fix a little issue I am having with the vboxnet0 adapter but all good.


Which font supports the most non-roman alphabets?

After spending a couple years trying to solve this problem. I think Noto is the way to go. It will still put a lot of fonts on your system, but since they all start with 'Noto', it's easier to browse the rest of your active fonts.

I recommend uninstalling all of ubuntu's foreign language fonts and replacing with Noto.


How to automatically update /etc/apt/sources.list with source URIs on Ubuntu 16.04?

I had this same issue on a server install of Ubuntu 16.04, so no GUI. All that I needed was a couple of sed commands.

sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list && sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list

Then sudo apt-get update and continue on.


Dual Boot Ubuntu with a MacBook Pro 2018 - partitions not showing on installation

Apple latest products (MBP 2018, iMac Pro) are equipped with the T2 chip which control some of the internal components, including the SSD.
No driver has been released for Linux, so until then, it is not possible to install Ubuntu on the internal SSD.

You can still install it on an external drive or in a VM.


How to share internet from one network card to another ethernet port

Basically, you want to turn your machine into a router, you probably don't really want to bridge your ethernet connections. Setting up a NATing router is simpler and more common, so there's more documentation on how to do it.

This link hits the high points of how to do that:
https://help.ubuntu.com/community/Internet/ConnectionSharing


sudo in the Terminal seems not to accept password input

When you use the Terminal and you need to enter your password, it will not show on the screen at all, this is normal practice.


I found some driver that should work. I forked the driver from https://github.com/diederikdehaas/rtl8814AU.git and added the dkms.conf there. I've sent a pull request to diederikdehaas too.

Run in a terminal

sudo apt install git build-essential dkms
git clone https://github.com/hanipouspilot/rtl8814AU.git
sudo dkms add ./rtl8814AU
sudo dkms install rtl8814AU/4.3.21

The driver has your IDs.

If you install the driver this way, it will stay after kernel upgrades.


This folder (/2018-09-11_zilla.disk_image) will not delete!

The most probable answer is that you don't have permissions to delete that file right from Ubuntu, the steps to follow would be:

Find the folder in the Files app, right click and choose Open In Terminal
on the command line, type (press Enter after each line):

cd ..
ls -l
This should show a list of all folders with a few columns, what interests you are the first, third and fourth that state, respectively, the permissions (should have drwxr-xr-- or something like that), the owner and the group (these two should be your username both, probably).
In case you are not the owner, you'll have to run:

sudo chown -R youruser:youruser 2018-09-11_zilla.disk_image

If you show us what the ls -l command prints you we can help you more, in case this is no the issue at hand.


Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file

You found a bug in the Bash Completion library used by Ubuntu.

What does this mean?

Ubuntu uses a bash completion library to make bash completion smart. This library lives in /usr/share/bash-completion/bash_completion.

Essentially, this library declares a few clever functions that know about typical commands and how to complete them. Whenever you press Tab, functions within this library get called and attempt to complete your current command line. So for example if you type apt-get iTab it will complete that to apt-get install. If you don't source that library, you only have the standard, primitive bash completion - so for example if you type apt-get iTab without having sourced it, bash will simply look for files in the current directory starting with i and attempt to complete your command according to these filenames.

Why isn't it happening as root?

Because when you use sudo su to make yourself root, the bash completion library isn't sourced. This would be different if you used sudo -i to make yourself root. I bet you see the bug then, don't you? See for example 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all? if you aren't familiar with the differences.

In my case, as a normal user, the library gets sourced when I start a Bash shell because ~/.bashrc sources /etc/bash_completion which sources /usr/share/bash-completion/bash_completion.

If I use sudo -i to login as root, the library gets sourced because /etc/profile sources /etc/profile.d/bash_completion.sh which sources /usr/share/bash-completion/bash_completion.

Why is that bug happening?

Try to execute this command:

$ eval 'quoted=$(cat' env.
bash: unexpected EOF while looking for matching `)'
bash: syntax error: unexpected end of file

Looks familiar? ;-) Indeed, that's exactly what happened behind the scenes when you hit Tab in the context you described. More precisely, the bug is in the function _quote_readline_by_ref declared by /usr/share/bash-completion/bash_completion. If you sourced that file you should have that function available. So next try this:

$ _quote_readline_by_ref '$(cat env.' quoted
bash: unexpected EOF while looking for matching `)'
bash: syntax error: unexpected end of file

Given these arguments, the function _quote_readline_by_ref performs, among other things, that eval mentioned above. You can have a look if you like. And when you typed env $(cat env.Tab, behind the scenes that function got called with exactly those arguments. So that's what happened.

This eval hack was supposed to fix another issue, but I guess it introduced this other bug in the process.

How do I fix it?

It turns out that this bug has already been reported. After reading that bug report, I see three ways to fix it:

Patch it: In one of the comments in that bug report, someone suggests replacing the line

[[ ${!2} == \$* ]] && eval $2=${!2}

within function _quote_readline_by_ref in the file /usr/share/bash-completion/bash_completion by the line

[[ ${!2} == \$\'* ]] && eval $2=${!2}

I recommend against doing this. The person who wrote that comment does not appear to be a developer of bash-completion. This hotfix will simply cause the left operand of the statement to evaluate to false and thus prevent that eval from happening. However without a good knowledge of what that function is supposed to do and in what contexts it is called, it is unclear whether this will not potentially break some other intended functionality.
Get the newest version: As also mentioned in that bug report, this bug is not present in git head (wherein among other changes the function _quote_readline_by_ref has been simplified). You can simply clone the current revision from Git:

git clone https://salsa.debian.org/debian/bash-completion.git

...and then copy the newest version of the bash_completion script to /usr/share/bash-completion (no urgent need to backup the old version unless it makes you feel safer - if you experience some problems, sudo apt-get install --reinstall bash-completion should revert any changes you made just fine.) This is the way I recommend if you're in a hurry to get this fixed. :-)

Note that none of those solutions will make bash completion inside command substitution work: as mentioned in that same bug report, this is broken in Bash 4.3.

Sit back and wait: Sooner or later a new version will get released (which may even fix bash completion inside command substitution) and you will get it with some future Ubuntu version. That's what I'm going for ;-)


SSH scp between Ubuntu Server 12.04 and Windows failing - (prob syntax)

It sounds like you're trying to scp from inside an existing PuTTY ssh session back to the Windows system - that's not going to work unless there is an SSH server running on Windows.

PuTTY itself isn't an scp client, however the 'full' Windows installation comes with a command-line client called pscp. The syntax for that is pretty much exactly how you'd expect, i.e. a *nix style host:/path/to/file/ for the target file on the remote host, and a Windows-style path for the local system - for example

C:\Users\steeldriver>"C:\Program Files (x86)\PuTTY\pscp.exe" steeldriver@192.168.1.12:/home/steeldriver/tests.tar C:\Users\steeldriver\Downloads\linuxtests.tar
steeldriver@192.168.1.12's password:
linuxtests.tar            | 10 kB |  10.0 kB/s | ETA: 00:00:00 | 100%
C:\Users\steeldriver>

The local path can be absolute i.e. C:\path\to\newfile or relative e.g. ..\newdir\newfile

However if you need to scp files regularly between *nix and Windows you may find it easier to use a dedicated client such as WinSCP


Why does "pkg-config" print only a blank space with the "--cflags" option?

--cflags is intended to give you any pre-processor or compile flags required for the packages/libraries on the command-line; you get a blank space because there are no such required flags for libcurl; that's perfectly normal.


What does the indicator icon with three dots over a power plug mean in Ubuntu 20.04?

The image is known as a cable snake:

From the author's blog:

GNOME Shell
The GNOME shell bits to enable Thunderbolt 3 support were merged some
time ago and made it into 3.28. This means that the GNOME shell will
act as authorization agent and will automatically authorize new
thunderbolt 3 devices — if the user has administrator rights, is
currently logged in and the session is unlocked. It will also show a
little indicator (called the cable_snake by some) in the status
indicator section while devices are being authorized because the whole
authorization dance can take quite a while.

Correspondence from developer
I emailed the developer today and this is our conversation:
There are users annoyed with Cable_Snake icon making icons shift left and right in the application indicator top bar. Is there a way to disable the icon but keep boltd running?

This was introduced via a change in the kernel/udev, but a work-around
laded in bolt 0.9:
https://gitlab.freedesktop.org/bolt/bolt/-/issues/156
There is an ubuntu bug open:
https://bugs.launchpad.net/ubuntu/+source/bolt/+bug/1892657

Is there a way to disable the icon but keep boltd running?

Currently not, GNOME Shell is hardwired to react to boltd's probing
setting. Best way is to update bolt.

Some ideas of my own
I use the Unity interface where application indicators are right justified on the top bar so new apps opening and closing on the left are preferred and not a disadvantage.
For Gnome Users to prevent icons jumping back and forth the only band-aid I can think of is moving all icons to the right side. This can probably be achieved here:

How can I order Gnome3 shell extensions at the top?

If this works, then when the boltctl icon appears and disappears on the left side nothing "jumps around".


Déjà Dup doesn't open a window when doing the backup

I had the same problem. After upgrading to 18.04 I couldn't find the window of the déjà-dup backup as it doesn't open automatically any more when the scheduled backup is launched. But I found that there is a notification that can be seen by clicking in the panel on the top in the middle, where the date is displayed, stating that the scheduled backup has been launched. Clicking on that notification will open the usual window which displays the progress of the backup.


Trouble running Matlab 2012a on Ubuntu 12.04 64 bits

If something can't find /lib64/libc.so.6 -- You might find libc.so.6:

locate libc.so.6 # You might also need to update locate's database first: sudo updatedb

This command will tell You where it is. After what You might link it where it is expected:

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

If locate can't find the file -- this probably means You don't have it. You can find out which package provides it with:

apt-file search libc.so.6 # You might need to run "sudo apt-file update" before that


Making Blackberry act as modem and connecting to internet

Using the Blackberry as a modem device through a computer with Ubuntu can be achieved with a few simple steps:

Open the terminal from your menu or using the keyboard shortcut: Ctrl + Alt + T, and then type:

Download and install dependencies

sudo apt-get install python libusb-dev ppp python-usb
sudo apt-get install python libusb-dev ppp python-usb python-wxgtk2.8

Go to your home directory

cd ~

Download the application

wget https://bitbucket.org/tcolar/berry4all/downloads/bbtether-0.3q.tgz

Extract the downloaded file

tar -xvf bbtether-0.3q.tgz

Access the newly created folder and run the application:

cd bbtether
sudo ./berry4all.sh

At this point you should have the GUI present:

Go to the menu "File" -> "Preferences": Select "General" and un-tick the "verbose logging".

Latter on, if no connection is established, you can tick it to see the logs.
At the same panel, select the "Modem" tab and from the "PPPD Config", select your internet provider.

After selecting press Save

Go to the menu "Modem" -> "Connect":

At this point you should have the device connected to your USB port.

The first time the berry4all connects, it takes a minute or two, to perform a scan at your device and collect all the settings.

Once the messages stop scrolling, your internet connection should be established.

The last lines on the messages window should present your IP and DNS addresses.

Notes:

To disconnect, access the menu "Modem" -> "Disconnect".

Should not take more then 5 minutes to go from step 01 to a successful connection! :)

About Berry4All

  Berry4All is a free, open-source software for using (tethering) your Blackberry on alternative OS'es (Linux, OSX...) Formerly known as BBTether. The main feature is tethering(use as a modem) your blackberry easily, it is a simple python script/GUI and requires no compilation and has very few dependencies.

Visit the website and the bitbucket project page


How to run a script only once per day with cron without specifying execution time

You may want to use the anacron.

From its man page

NAME
       anacron - runs commands periodically

SYNOPSIS
       anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...
       anacron [-S spooldir] -u [-t anacrontab] [job] ...
       anacron [-V|-h]
       anacron -T [-t anacrontab]

DESCRIPTION
       Anacron  can  be  used  to  execute  commands periodically, with a frequency specified in days.  Unlike
       cron(8), it does not assume that the machine is  running  continuously.   Hence,  it  can  be  used  on
       machines  that  aren't running 24 hours a day, to control daily, weekly, and monthly jobs that are usu‐
       ally controlled by cron.

The Ubuntu community HowTo: https://help.ubuntu.com/community/CronHowto

Using anacron:

Simply put the executable script file in the /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly.
Touch the script file:

sudo touch /etc/cron.daily/scriptfile

(cron.daily if it is a daily job).

Testing anacron:

sudo anacron -f -d

   -f     Force execution of the jobs, ignoring the timestamps.
   -d     Don’t fork to the background.  In this mode, Anacron will output
          informational  messages to standard error, as well as to syslog.
          The output of jobs is mailed as usual.

Anacron messages in the log:

grep anacron /var/log/syslog

Anacron keeps timestamps in the /var/spool/anacron/. If you remove cron.daily, cron.weekly or cron.monthly files from there, anacron will execute daily, weekly or monthly scripts at the next startup.


How do i dual boot windows 7 and ubuntu without having to go through 2 windows when i boot ubuntu?

Open your terminal and type:

sudo cp /etc/default/grub /etc/default/grub.bak
sudo nano /etc/default/grub

And change GRUB_DISABLE_RECOVERY to true(remember to remove # at the beginning).

Then:

sudo update-grub


Landscape with OIDC how to assign permissions to users?

Urgh, had to invite an email address that exists in OIDC. They have to ignore the invite. Change the config, restart the server. Then they can accept the invite.


Use one of the program and copy to the available space in /, and do it several
  times, each time i 'll scp the current recovered data to another server i owe.

This might work. Though it is going to take some time.

  Other solution would be to make an image of the partition and scp it progressively to the second server ( I really don't know if it's possible )

It will create a file on the server 1st so you would need the space there 1st...  so no... Example of this

dd if=/dev/{partition} ibs=4096 conv=notrunc,noerror |
(ssh {IP} dd of=/partition.img obs=4096)

  Third solution, would be to repartition the /home sda2 main partition, but i'm afraid this will corrupt / erase / overwriting the data

It will.

Alternative:

Can you use sshfs? That would save your life if you can: mount the disk on your desktop, and you can use ddrescue to make an image.


This is an odd behaviour that was unexpected and certainly not obvious.

After double checking the Display Settings, it turns out that there was a small gap between my two monitors. This gap essentially meant that moving the mouse slowly did not manage to 'jump' the gap, whereas moving fast enough did.

This issue is separate and distinct from sticky edges. In addition, moving my monitors in the settings to be pushed up against each other results in the desired behaviour of being able to move between monitors at any speed.


Windows application installation in WINE (in Ubuntu 20.04) is asking to reboot Windows

If you want to restart wine environment then wineboot is a helpful command.
Run man wineboot command to get the help manual.


Which packages are installed on Ubuntu desktop by default?

There is a full list in the manifest file of each distribution at http://releases.ubuntu.com

To get just the list use

wget http://releases.ubuntu.com/utopic/ubuntu-14.10-desktop-amd64.manifest \
-q -O - | cut -f 1

Note that not all these packages stay installed. On the CD images, you'll also find a file called /capsper/filesystem.manifest-remove which is a list of things to remove after installation. (here is this file from Ubuntu 17.10)

related: check if all default packages are installed from the Ubuntu manifest


White color and yellow color is almost the same on my monitor, what can I do being on Ubuntu 18.04?

I believe you are looking for https://help.ubuntu.com/stable/ubuntu-help/color-calibrate-screen.html.en
except you'll need to create the color profile for your monitor.

EDIT: to make the calibrate button enabled you need to have some calibration device called spectrometer (eyes cannot be trusted).
Such device can be bought on ebay, called "colorhug" and originates from:
https://hughski.com/index.html. of course there are some more expensive alternatives.

for manual profile creation you can use:
http://manpages.ubuntu.com/manpages/precise/en/man1/lprof.1.html

but I suggest downloading the official profile from the display vendor (if available)


ERROR : could not set the configuration for CRTC 64

Running Ubuntu 14.04 with a ATI Radeon card. I did this to get rid of this issue. Follow the steps bellow:

sudo apt-get install linux-headers-generic
sudo apt-get --reinstall install fglrx-updates fglrx-amdcccle-updates
sudo reboot


Install a different version from what's on my Live USB

No, it's not. If there's a i386 system on your stick, you can only install an i386 version of Ubuntu. To use the x86_64 version, you need to create the live system again from a x86_64.

What is your problem with creating a new bootstick. It doesn't take long.

PS: Use UNetBootin to create the bootstick. It's the best-working tool I know of.


Ubuntu booting error, stopped at loading ubuntu image

It looks like a problem with the hard drive. Check your ATA cables(hard drive cables). This question is somewhat related to yours'. Give it a try, it may solve your problem.


Read-only filesystem for a folder related to VLC Player

It seems you actually had VLC installed as a snap package instead of via traditional apt method.

Run the following command (with sudo if needed) to remove VLC

snap remove vlc


Can I check and change the settings in BIOS under Ubuntu?

No, you cannot. BIOS (Basic Input Output System) is only active while the computer boots up. After that the Operating System takes over. BIOS is on a seperate chip and you cannot change it from within the OS.


Firefox file dialog doesn't see cryptomator volumes (vault)

A workaround that seems to do the trick is to create a symbolic link to your mounted vault.

E.g., to put a link in a directory called ~/links: First make sure your vault is mounted, which will open a nautilus window with your vault. From the nautilus window, right-click on the background and select "Open in Terminal". Then type the following commands:

vaultpath=`pwd`
mkdir ~/links
cd ~/links
ln -s $vaultpath vault

You should now see a folder called "vault" located in "~/links", that you can open from within Firefox or anywhere else, as long as your vault is mounted.

This worked for me and survived a restart. I guess it is contingent on cryptomator not changing the name of the mount directory.


New to Linux - Installing and Using a Text Editor for Using Python and PyTorch

A very simple to use editor is gedit
If you want to use an IDE for python, you can use pycharm.

A link which describes How to install pycharm
Note: If you'd like to use it - I'd suggest using the umake install method
If you need to use .ipynb (ipython notebook) - you might focus on The Jupyter Notebook

jupyter install

Installing Jupyter using Anaconda

We strongly recommend installing Python and Jupyter using the Anaconda Distribution, which includes Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science.

See this Q&A regarding how to install Anaconda

After you installed Anaconda, run the following command from the command line:

jupyter notebook

Note: vi isn't editor for beginners (some references):

(Stack Overflow: Helping One Million Developers Exit Vim)
A (fake) book focus on Exiting Vim


Some applications can't read or write to mounted NTFS partition: Permission denied

If you used snaps to install youtube-dl, either:
remove youtube-dl and install it through some other method (other than snaps)
or
mount your device in your home directory something like this How to allow snap applications to access /tmp folder?


Problem with broadcom wireless driver on ubuntu 15.10

Run in terminal

sudo apt-get install firmware-b43-installer

and reboot.

The wifi should work.


How to connect my ubuntu to my workplace, GlobalProtect VPN, using win 7 VM

I have recently extended the fantastic open-source VPN client OpenConnect to support the PAN GlobalProtect VPN, both in its SSL-VPN and IPsec/ESP modes.

This is a work in progress, but I've been using it for real work already and it works very well for me. Having other people test it would be awesome and I welcome your feedback!

Build the globalprotect branch from this repository:
https://github.com/dlenski/openconnect

... and then run it like this to test it (you can omit the --certificate part if your VPN doesn't use a client certificate):

$ ./openconnect --protocol=gp [--certificate=my_cert_with_pk.pem] \
              server.company.com --dump -vvv
Please enter your username and password.
Username:
Password:

Currently it only supports username, password, and optionally client certificate authentication… since that's the only example I have. But I'd welcome feedback if there are other authentication methods in use out there.

PS- For my VPN, the VPN tunnel server is the same as the VPN "portal" server, but your VPN may differ. Try using both the "Portal address" and the "GlobalProtect Gateway IP" shown in the Windows client with OpenConnect:

[]


There is no Ubuntu Studio for architectures other than AMD64. ARM64 is not a supported architecture for Ubuntu Studio.


I have done a quick test with Ubuntu 11.10 32bit on my spare laptop (Toshiba Tecra A8).  This machine was updated about 8 hours ago with all updates (including oneiric-proposed).

Just as you indicate, when Tomboy is running if I then go to "Logout" it seems to initiate but then "hangs" with Unity closing but the windows of all open apps staying open but losing decoration.  Thanks for spotting this as my main machine isn't running Oneiric yet and I rely on tomboy!

UPDATE: as another user on launchpad indicates, logout is still possible, but it takes up to a minute after Unity disappears and all windows lose their decoration before the logout happens.  Subsequent login seems to have some random hangs.  I ended up rebooting before I had full functionality back (but again the machine "did" logout).


Acer ES1-311 no fan control, fan stops completely after resume

NBFC on Linux is experimental (as stated on GitHub NBFC homepage). Playing around with acerhdf looks even more difficult.

If your BIOS supports supports fan control enabling this and removing any fan control software you have installed is the safest way of getting effective fan control.

If the BIOS does not feature fan control (most modern laptops BIOS do), then you need to get lm-sensors and fancontrol working. There is an excellent set of instructions for doing this here


Can't SSH to VirtualBox Ubuntu server from public IP

This is probably due to the fact that residential ISPs generally block ports such as 22, etc. You'll need to either use a different port, or ask your ISP if they can unblock the port.


How to run application from terminal without knowing name?

You need the name of the package that was installed. I would then list all the files from the package:

dpkg -L <package name>

The files that are in bin directory are the ones that you can run. To be able to scroll through list type

dkpg -L <package name> | less