I had come across a similar issue when an old imac ppc g5 logic board went on me. I had alot of data on that hard drive that I had lost access to so I pulled the hard drive out and hooked it up to a hdd external case. When I tried to copy files from it to my Ubuntu box I got a permissions error. I tried alot of different things to rectify but to no avail. Alas..   The following should get you out of the woods.

open up terminal and type:

sudo nautilus

Using the GUI window that opens. Navigate to the directory where your files are located and copy the files you want then using the same nautilus GUI window navigate to the directory they are to be copied to and paste to that directory. Rinse & repeat.


How to link WSL to my already installed python on windows?

As explained in Windows Subsystem for Linux interoperability with Windows, there are some conditions that need to be satisfied in order to execute Windows programs from the WSL command line:

Run Windows tools from WSL
WSL can invoke Windows binaries directly from the WSL command line
using [binary name].exe. For example, notepad.exe. To make Windows
executables easier to run, Windows path is included in the Linux $PATH
in Fall Creators Update.

Some irrelevant stuff omitted

Windows binaries must include the file extension, match the file case,
and be executable. Non-executables including batch scripts. CMD native
commands like dir can be run with cmd.exe /C command.

So, if your Windows version of python3 is a regular executable, you should be able to run it as
python3.exe

Otherwise (apparently this includes the version of python3 installed to WindowsApps from the Microsoft store) you will need to use
cmd.exe /C python3.exe


How do I start Telegram from the command line?

Since you installed telegram from the PPA, it is likely installed in /opt. Probably under /opt/telegram.  You should be able to launch it from the command-line by running:

/opt/telegram/Telegram

but if you wanted to make this easier you can create a symbolic link to /usr/local/bin like so:

sudo ln -s /opt/telegram/Telegram /usr/local/bin/telegram

you can then launch telegram with the command:

telegram


Change eCryptFS mount options (remove nosuid)?

I ran in to this problem building LinuxCNC to run on Ubuntu 18.04; the LinuxCNC code uses setuid root binaries to talk to the PREEMPT RT kernel extensions and specifically disallows execution as root. I built the code in my ecryptfs home directory and the LinuxCNC code did not have a useful error message but I eventually tracked it down to the 'nosuid' mount option ecryptfs adds.

My (temporary) workaround is to perform a run-time modification of the mount. This will not persist across reboots but has allowed me to test the application and it may be useful to others.

sudo mount -i -o remount,suid $HOME

Other than the security implications I do not expect the operation of the ecryptfs filesystem will be impacted.


Pick the correct keyboard in "keyboards"

From these 2 characters you probably picked a US keyboard but have an English keyboard.

Open dash and search for keyboard. ALl of them have a layout in that program so you can quickly spot the one yours is.


Quant, just click twice on the toolbar any where in the middle like you click for opening a file or folder. Thereafter do what you had been trying to do, I mean go to the left side of the toolbar and there you found the three buttons will be working.


Create a config file for the font in the following path:

$HOME/.config/fontconfig/fonts.conf

and add these lines to it:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>

 <match>
  <edit mode="prepend" name="family">
   <string>Vazir</string>
  </edit>
 </match>

 <dir>~/.local/share/fonts</dir>
 <dir>/usr/share/fonts/</dir>

</fontconfig>

I used Vazir font, if you want to use another font(e.g. Tahoma) you must change the <string>Vazir</string> to <string>Tahoma</string>.
Place your font in ~/.local/share/fonts.


How to install virtualbox on ubuntu 14.04?

Virtualbox is available from the Ubuntu repository. You can install it from the Ubuntu Software Center or using the terminal by running sudo apt-get install virtualbox

If you need the Oracle maintained VirtualBox run this in the Terminal:

sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian
'$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" &&
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-
key add - && sudo apt-get update && sudo apt-get install virtualbox-4.3 dkms


Bleach Bit - How to Wipe Free Space via Command Line?

Bleachbit console application has several options:

$ bleachbit --help
Options
...
-l, --list-cleaners   list cleaners
-c, --clean           run cleaners to delete files and make other permanent
                      changes
...
-p, --preview         preview files to be deleted and other changes

so if I call it with

$ bleachbit -l | grep free

I can get

system.free_disk_space

It seems that you should call it with

bleachbit -c -p system.free_disk_space # remove -p if you want real action

Note: if we look into BleachBit's source code - we can see how it calls the above action in cb_wipe_free_space for Wipe Free Space label.


Network manager ignoring manually created system-connections file

Upon further examination, I had forgotten to set the file permissions properly.

chmod 600 /etc/NetworkManager/system-connections/modem

Fixed the issue I was having. I just made the perms match what nmcli con add creates by default.


-H is to specify a host file in a format similar to your system's /etc/hosts file.

If that isn't what you're attempting to use, look into -f flag.  This allows you to use a tcpdump style pre or post filter - depending on where it is placed.

Here are a few examples:

tshark -f "host 192.168.1.1" -i eth0 -w outputfile.pcap
tshark -i eth0 -f "host 192.168.1.1" -w outputfile.pcap

dumpcap -f "host 192.168.1.1" -i eth0 -w outputfile.pcap
dumpcap -i eth0 -f "host 192.168.1.1" -w outputfile.pcap

tcpdump -i eth0 "host 192.168.1.1 and port 80" -w outputfile.pcap

Also, depending on how much traffic your box is seeing, you might look into dumpcap or tcpdump.


Sub-process returned an error code (Solved)

Add exit 0 to /var/lib/dpkg/info/snapd.prerm after #!/bin/sh. Then do:

dpkg --purge --force-all snapd
sudo apt-get update

It seems like, you used older repository to install snapd or you upgraded your Ubuntu in not clean way.
So, don't forget to check your sources.list for invalid repositories.


Sound coming out of speakers and headphones on an Asus K50AB

I also own the ASUS K50AB, updated to 12.04 and this problem goes away. There is also auto jack sensing, so plugging in the headphones turn off the internal speakers. Try it out.


you can redirect STDOUT to  /dev/null this will prevent printing output and only prints STDERR to your terminal.

You can use it like

yourfavouriteprogram > /dev/null

And yes, it is faster:

time head -100000 large_file.txt
real    0m16.570s
user    0m0.009s
sys     0m0.189s

time head -100000 large_file.txt > /dev/null
real    0m0.018s
user    0m0.014s
sys     0m0.004s


Tested in Ubuntu 14.04 trusty tahr

1) Using the whole disk, fstrim works!

2) No clue as to the correct answer here. Went with 512K.

3) No alignment problems by using the whole disk, confirmed by parted align-check opt.


CUPS save documents sent to printer in hard drive

Read man inotify, which begins with:

NAME

   inotify - monitoring filesystem events

DESCRIPTION

   The  inotify API provides a mechanism for monitoring filesystem events.
   Inotify can  be  used  to  monitor  individual  files,  or  to  monitor
   directories.  When a directory is monitored, inotify will return events
   for the directory itself, and for files inside the directory.

Use it to monitor /var/spool/cups. The /var/spool/cups/c##### are "control" files, and /var/spool/cups/d#####-001 files are the actual data to be sent to the printer.

Note: At one time inotify did not work on all filesystem types, see Why won't `tail -f` follow my syslog when running live?


All you need is a simple installation procedure for Ubuntu. I don't know what problems are you facing while trying to install ubuntu on this HP pavilion g6. But the worst case would be to install ubuntu via the Alternate CD.

Anyway check this post for all Ubuntu Installation Scenarios


Ubiquity does not yet have support for raid so you have to manually install mdadm and use  it to configure the raid, then choose "something else" in ubiquity and set the raid array to be used as your root filesystem.  Then after the install finishes you need to manually mount the array, chroot into it, and install mdadm there:

sudo -s
#partition the two disks ( assumed to be sda and sdb ) first
mdadm --create /dev/md0 -l 1 -n 2 /dev/sda1 /dev/sdb1
mount -t ext4 /dev/md0 /mnt
mdadm --detail --scan > /etc/mdadm.conf
for f in proc sys dev dev/pts run ; do mount --bind /$f /mnt/$f ; done
chroot /mnt
apt-get install mdadm
exit
cp -a /etc/mdadm.conf /mnt/etc/
update-initramfs
for f in proc sys dev dev/pts run ; do umount /mnt/$f ; done
umount /mnt
exit


Is there an install DVD with multiple interface choices?

No, while many distributions come with this feature, Ubuntu lacks it. There are plenty of derivatives such as Kubuntu and Lubuntu each with its own desktop so you should be able to find your preferred desktop environment with one of them. If you want Gnome or multiple desktops the only way way to get them is to find their meta packages in Synaptic and install them from there. Bear in mind though, this means you will end up with all applications from both environments.
Information on installing new desktop environments can be found at Psychocats in the "Playing Around" section.


I have had this red circle with the white icon

I have had this error before so i ran software updater and then it said cannot find repository information, after a few min an update came up and i ran the update, after that everything went back to normal.


How to install LibreOffice 3.4 Final In Ubuntu 11.04 or 10.10

Note Remove the previous version of OpenOffice or LibreOffice with this command

For OpenOffice

sudo apt-get remove openoffice*.*

For LibreOffice

sudo apt-get remove libreoffice*.*

1 - Go to; LibreOffice 3.4 Download

2 - Select Linux x86 deb or x64 deb depending on your computer

3 - Save & extract the file to ~/Desktop

4 - Rename the file as libreoffice

5 - Enter the following command into terminal and wait for the process to finish.

sudo dpkg -i ~/Desktop/libreoffice/DEBS/*.deb

6 - Run the following command to finish the installation:

sudo dpkg -i ~/Desktop/libreoffice/DEBS/desktop-integration/libreoffice3.4-debian-menus_3.4-12_all.deb

You now have Libreoffice 3.4 installed.


How to create a permanent link to your Windows desktop on Ubuntu?

You have to mount Windows partition at startup. How to do that, you can read here:

How to mount ntfs partitions on startup?

and here:

How to automount NTFS partitions?


I have also encountered such a problem. The root cause is that Ubuntu switch to GNOME since 17.10 and GNOME may not support fcitx well at present. The following scripts may be helpful to you:

Step 1 check fcitx be installed

sudo apt install fcitx fcitx-mozc

Step 2 open ~/.pam_environment with your text editor and set the following environment variables to start fcitx

XMODIFIERS DEFAULT=@im=fcitx
GTK_IM_MODULE DEFAULT=fcitx
QT_IM_MODULE DEFAULT=fcitx

Step 3 add an autostart entry to start fcitx. Search "Startup applications Preferences" in Ubuntu Activities and add an entry for fcitx

Name: Fcitx
Command: /usr/bin/fcitx-autostart
Comment: type your favorite description for fcitx

Step 4 reboot and check if fcitx wake up

See more details in this document: https://www.csslayer.info/wordpress/fcitx-dev/how-to-use-fcitx-on-ubuntu-17-10/


In Bash:

colors="blue blue red green"
i=1
for c in $colors; do
    echo -n "color.$((i++))=$c "
done

Command-line version (easy to copy&paste to terminal) with 2 lines - setting variables first and then main script:

colors="blue blue red green"; i=1
for c in $colors; do echo -n "color.$((i++))=$c "; done


How well does Intel Graphics on Linux work vs Windows, for gaming and day-to-day use?

I can't speak to games and response time using Intel Hybrid Graphics. That's a personal call after reducing frame rates and resolution as required.

As far as Intel Hybrid graphics in general I have a five year old Intel Core I7 3630QM with integrated HD-4000 graphics and when only using Chrome (8 tabs) and Conky CPU utilization is about 5%.

When watching videos on external HDMI TV under same scenario on laptop CPU utlization jumps to about 10-13%. HTML5 live streaming on Youtube is a percent or two more demanding than Flashplayer or watching a movie downloaded.

I have tried every few months to setup nVidia to utilize the built in GeForce GT650M card without much luck, nor much passion to do so as Intel on board GPU has been great so far.

As far as gaming goes, every few months I'll boot Windows 8.1 and waste a few hours / days there.


Trying to copy an ext4 partition that has errors on it, to a new disk

Why you don't use ddrescue? It was designed for that purpose in question.


Is there a way to empty $HOME's Trash from the Live CD or Root?

The trash is usually located in ~/.local/share/Trash. If you can login using a TTY, or mount the partition containing your home directory, that's the folder you want to delete:

rm -r .local/share/Trash

If you mounted your partition on a live CD, you would need to do:

rm -r /media/ubuntu/<Partition Name>/home<your user name>/.local/share/Trash

or some path like that, depending on where the mount point is, exactly. You can use the df, mount or lsblk commands to find out where it is mounted.

To log in to a TTY, boot into your Ubuntu, then press CtrlAltF2 (any function key from F1 through F6 would do). You can log in to a terminal and execute the first command, since you should be in your home directory.

Instead of doing an rm, you can always use mv to move the folder elsewhere. In case you're not feeling too selective, just do:

mv .local/share/Trash /some/where/else

and press CtrlC when you feel a reasonable number of files have been moved.


How to get run-path by app icon from GNOME Show Applications menu?

Short answer

The information you are looking for is available in the .desktop file of the application.

Locate the .desktop file on your system that contains the displayed name of the application in the Name= line
Open that desktop file and find the name of the executable on the Exec= line.

Long answer and background

Each icon in the Applications menu of Gnome Shell corresponds with a .desktop file on disk. The .desktop file is an ordinary text file with the .desktop extension. This file provides information to the desktop environment on how to run the program, what icon to use, etc.

On the line that starts with Exec=, the executable is stated. The executable is the file that is run to start the program. Usually, the full pathname of the executable will be specified, providing you directly with the information you are looking for. If the full pathname is not specified, then the executable must be an application that is in your search path. Otherwise, the .desktop file will not work, i.e., clicking its icon in the Applications menu will not launch the program.

To know the full path of an executable, of which you only know the file name, use the which command. For example,

which firefox

will inform you where the executable resides on your file system.

Last but not least, you need to locate the .desktop files in order to be able to find the path information that you are looking for. .desktop files commonly live in one of two places. System wide .desktop files live under /usr/share/applications. .desktop files to which only the current user has access, live under ~/.local/share/applications. For desktop files with the same name, the one in the local user's directory will have priority and appear in the Application menu.

.desktop files of programs installed through the snap package system will live in a different place. You can list all .desktop files on your system with the command

locate .desktop

To see them page by page, you can use the less command.

locate .desktop | less

It may sometimes not immediately be obvious which icon in the Application menu belongs to which desktop menu. The Application menu displays the name of the application provided on the Name= line in the desktop file. With some bash wizardry, you could search that name within all the .desktop files to locate the ones containing the name. For example, this is a simple way on how to identify the .desktop file for the card game "AisleRiot Solitaire", knowing Gnome Shell displaye AisleRiot Soli..

$ grep  "AisleRiot" $(locate .desktop) 2> /dev/null
/usr/share/applications/sol.desktop:Name=AisleRiot Solitaire


OBS won't detect hardware render and DaVinchi Resolve won't recognize OpenGL GPU

Support of AMD graphics cards in Linux is rather meager. OBS runs with nvenc and Nvidia cards on Linux, due to the proprietary NVIDIA driver you can install - if you have a NVIDIA card.
This thread describes a similar problem. I do not believe you'll have success with your GPU on Linux.
Reason is, that AMD doesn't care about Linux and therefore does not provide any drivers for their GPUs. The reverse engineered open drivers for AMD GPUs just cover the basics.


After fast research I think that it happens about like that: kernel notices a new device, this goes to udev (deals with devices), then to udisksd (disk manager), then via D-Bus the file manager nautilus is informed about a disk, then the filesystem is mounted with FUSE which pulls ntfs-3g userspace filesystem driver (it is in ntfs-3g package) that prints into syslog.

ntfs-3g-2013.1.13AR.1/src/ntfs-3g.c:3660:

    ntfs_log_info("Version %s %s %d\n", VERSION, FUSE_TYPE, fuse_version());
    if (strcmp(opts.arg_device,opts.device))
            ntfs_log_info("Requested device %s canonicalized as %s\n",
                            opts.arg_device,opts.device);
    ntfs_log_info("Mounted %s (%s, label \"%s\", NTFS %d.%d)\n",
                    opts.device, (ctx->ro) ? "Read-Only" : "Read-Write",
                    ctx->vol->vol_name, ctx->vol->major_ver,
                    ctx->vol->minor_ver);
    ntfs_log_info("Cmdline options: %s\n", opts.options ? opts.options : "");
    ntfs_log_info("Mount options: %s\n", parsed_options);


Nvidia amd64 driver update (290.10 certified) impact on Optimus Systems and bumblebee?

I doubt it. nVidia Optimus simply does not work on Linux distributions because of the design of the X server which cannot handle it (yet). The issue that nvidia has fixed possibly applies to certain hybrid graphics setups with a hardware mux or detection of the nvidia card on certain muxless machines (https://github.com/Bumblebee-Project/Bumblebee/issues/149). (note: that's just speculation, I haven't tested the driver nor any reliable source for these changes)

See also the Additional Information tab:

  Some designs incorporating supported GPUs may not be compatible with the NVIDIA Linux driver: in particular, notebook and all-in-one desktop designs with switchable (hybrid) or Optimus graphics will not work if means to disable the integrated graphics in hardware are not available. Hardware designs will vary from manufacturer to manufacturer, so please consult with a system's manufacturer to determine whether that particular system is compatible.

Related question to Optimus in general: Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


Bluetooth not working properly on ubuntu

Run the Following command in the terminal..

sudo hciconfig hci0 reset

It should than turn ON the bluetooth.

If you are using laptop than try to turn it OFF and ON,using hardware switch. Usually done with Fn + Some function key depending on your laptop.

Also If this doesn't work than install Blueman Bluetooth Manager from Ubuntu Software Center.

Enjoy!!


Show a hidden latte-dock by hovering cursor over it

I had the same problem, and finally found the answer.
Wrong way : I was adding latte dock as a widget by right clicking on the desktop and clicking on "Add widgets".
Good way : The proper way to do this is to start latte dock as an application, from the terminal :

latte-dock

Then in the system settings, make sure to add latte-dock in the autostart applications.


You're deploying from a "personal" charm branch. This branch hasn't been vetted by the Juju Charmers community and isn't recognized as an "official" Juju charm. As such, when errors occur your best bet is to contact the charm author directly if possible. It looks like it's been about a year since any work was done on this charm. A few things to review, based on the README, is that you have to manually set the password. Make sure you execute juju set zentyal-single password="foo" to set a password for Zentyal. If you do modify it and get it working, considering pushing changes to your own personal charm branch or even seeking to have it included in the store as the maintainer.


Insane battery drain compared to Windows

In general, the battery backup in Windows is better than Linux. I have seen that Linux maintains my CPU around its base clock of 2.2GHz even when idle, whereas Windows down clocks to less than 1GHz. This maybe a reason.

Also your laptop seems to come with a Nvidia GTX 10 series graphic card. This card might be enabled all the time and using the proprietory driver. Try changing it to the open-source driver using 'Additional drivers' tab of 'Software & Updates' settings.

You can check out Bumblebee project, which aims to enable GPU switching in  systems with Hybrid graphics for better battery life. This will switch the GPU under use according to the work load. This is enabled by default in Windows.
https://bumblebee-project.org/
https://wiki.ubuntu.com/Bumblebee


To obtain a list of audio streams presently playing to any of available pulseaudio sinks we may issue the following command:

pacmd list-sink-inputs

This will give us a rather long list of all details for a given stream. Amongst others it will also give us informantion on the application which called pulseaudio in the field application.name.


How to restore system after removing initscripts

From your outputs, it seems to me that your sources are not complete and that is why apt complains about some packages that are not going to be installed.

Add these two lines:

deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main universe multiverse

to /etc/apt/sources.list and then run:

sudo apt update

Now try again to install recently removed packages. It should work now.

You can also take a look at /var/log/apt/history.log to see which packages has been removed with your remove command.


Able to connect Adhoc WiFi network, but terminal says no wlan0

Run sudo iwlist scan in the terminal. It will list the names of the wireless device names on your system.

I don't know if it was an update to the ubuntu naming conventions, but when I tested my machine it was using eth1 as the wireless lan device.

The above command will get you the proper name (which by your output is either eth0 or eth1), then just use that name when performing commands (ifconfig eth1 up).


How to install LibreOffice? (replacing OpenOffice.org)

There is an official LibreOffice PPA for Ubuntu 10.10 and 10.04 (the upcoming 11.04 will have LibreOffice by default).
You need to add ppa:libreoffice/ppa in your software sources to add it to the software center, just follow the instructions for the GUI way.
Quick and dirty CLI instructions (these will remove OpenOffice.org):
Add the PPA and install LibreOffice:
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice

For GNOME integration (for people running default Ubuntu):
sudo apt-get install libreoffice-gnome

or for KDE Integration (for people running Kubuntu):
sudo apt-get install libreoffice-kde

Fabian Rodriguez adds:

If you are using Ubuntu do not download the .deb files for manual installation, there is a PPA repository that has been available for a few weeks now. Follow these instructions to install LibreOffice from the PPA so you get automatic updates.
Keep in mind a PPA is always considered a third-party application and unfit for production purposes, however LibreOffice is becoming part of Ubuntu officially in the next release, due in April 2011, so the PPA will get a lot of attention and care. Make sure you test this and perhaps wait a few weeks if you intend to use this in 10.04 LTS or 10.10 in any significant way.
Additional language modules, help files and extensions are also available if you search for libreoffice in your package manager.

[If you get an "unmet dependencies" error, you probably need to uninstall openoffice (the installation of LibreOffice will continue automatically immediately after openoffice is purged from the system)]
sudo apt-get purge "openoffice*.*"
[Also note: I got an error about Java : you may want to check that is installed before installing LibreOffice]


Unable to load Ubuntu 16.10 after installing it alongside Windows 10

Most probably everything went fine ... Ubuntu uses the ext4 file system and that's the reason why you can't see any content in Windows Disk Manager (Windows uses the ntfs file system). The reason why Windows booted directly might be that the system is in hibernation mode. To change this, disable hibernation mode, open command prompt as administrator and execute:

powercfg /h off

Also make sure that Fast startup is disabled - go to Power Settings and uncheck Fast startup - if this option is not visible, enable Show hidden settings. Then shutdown the machine completely, do NOT reboot. Now start the computer, boot into BIOS and select Ubuntu as default operating system to boot. Exit BIOS, now you can select which system to boot from the GRUB boot menu.


Is there a way to make text in the interface sharper like Windows?

In System->Preferences->Appearance you can go to the Font tab and change the Hinting to get a different look. Don't remember which one is closest to Windows style but I believe it's full hinting.


mv: cannot open shared object file "libstdc++.so.6": too big nesting of symbolic links

[I must admit I'm a bit puzzled why basic utilities like mv or cp would break because of libstdc++.so.6, however asssuming that's the reason, here's what I would try]

Your busybox ls output indicates that you have managed to recursively link /usr/lib/x86_64-linux-gnu/libstdc++.so.6 to itself. Thankfully, it appears that you have not deleted or overwritten the actual /usr/lib/x86_64-linux-gnu/libstdc++.so.6.19 library. So you should be able to recover by re-creating the symbolic link.

The gotcha will be if either sudo or ln or both rely on the libstdc++ library. (Presumably bash doesn't, since you are able to login with a shell at the Ctrl+Alt+F3 virtual terminal.)

If sudo is broken, then you should still be able to boot into a root shell from recovery mode, as described in How do I boot into a root shell?. You will then need to remount the root filesystem in read-write mode

mount -o remount,rw /

After that, you can attempt to fix the broken link

ln -sf libstdc++.so.6.19 /usr/lib/x86_64-linux-gnu/libstdc++.so.6

(this should create a relative symlink that is resolved relative to the target path /usr/lib/x86_64-linux-gnu/, similar to your .old link).

Assuming that fails because ln depends on libstdc++.so, you can try again using the statically-linked busybox executable, which has a built-in ln:

/bin/busybox ln -sf libstdc++.so.6.19 /usr/lib/x86_64-linux-gnu/libstdc++.so.6

If that works, you can exit the root shell to proceed with the normal boot.


This solution applies only to Ubuntu 16.04 LTS, where DNS leaks have appeared.    Editing each and every .ovpn file with a script as advised by others, may work, it may not.  For me it did not.  If you have been doing this, replace the ovpn files with fresh ones and proceed.

If you have been mucking around for quite some time with this problem, a fresh install could be indicated, to which you can immediately implement this simple solution successfully.

This solution, may work for other Distro derivations to 16.04 LTS, that‘s possible, I have not tested this.  This solution presumes you‘ve been successful in importing VPN config files and applied them only to discover a DNS leak of your IP's DNS server has shown up in a DNS Leak test.

What this solution does is force your computer to use only the DNS server as provided by your VPN provider's ovpn file.

In the terminal:

sudo su

<enter your password>

apt-get install openresolv nscd unbound

Allow the install to proceed past the reboot recommendation. When finished, close the terminal.

For good measure, reboot your computer, start up your VPN and check with a DNS leak test.  You should see only your VPN‘s DNS server listed.  If you see your IP‘s DNS server, check your other VPN config files to see if this isn‘t just an aberation with your VPN provider‘s server.


Chromium not loading google related sites, youtube ubuntu ask etc

Chromium browser is not updated for Ubuntu 12.04.

It is still version 37.0.2062.120 while the current version is 48.0.2564.82.

Some web sites may require newer version of a browser due to security issues, etc.

You can use Firefox in 12.04, or you need to upgrade to 14.04.


Can't save the config file turtlebot_node.py because I don't own the file

Have you tried  sudo -s at terminal before proceeding with chmod? If not, type at terminal sudo -s press ENTER input your system password and change to the file directory, at terminal type cd /type folder location here/ type filename here, next  sudo chgrp type filename here press ENTER and sudo chmod g+rwx type filename press ENTER. I hope that would help out with the situation a bit. Thank you.


How to disable .txt content icon preview?

I did it using dconf-tools package. See:

How to stop Nautilus from creating thumbnails of specific file types?

Just mark the option disable-all under thumbnailers


Can gufw profiles be switched automatically?

It's not possible with gufw. gufw is a GUI for ufw (and ufw configures iptables). ufw doesn't know anything about the gufw profiles. You have to use ufw to enable/disable rules which are defined in your gufw profiles, E.g.

ufw allow in http
ufw reject out smtp

For more examples and the usage of ufw use man ufw in your terminal.

Your next question on Ask Ubuntu should be: "How can I change my firewall settings in dependency of my network environment?"


I want to uninstall ubuntu but my mac reads my Live USB as if it was the linux partition not the installer?

Ok I dont have Linux installed on a mac, so I am not sure but there are two thing I would try:

maybe you can just format the ubuntu partition from the mac operating system? I can not help you further with that.
Maybe your usb is not installed correctly. Check your download (or re download) and reinstall the USB and try again.


I've experienced the same issue, there is an open bug filed against this problem.

https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/948972


Can I change the grub default choice from Windows?

The default menu choice is (or can be) stored in the GRUB "environment block", a little 1024 byte file that lives in /boot/grub/grubenv by default. You could easily put that on a drive accessible from both Windows and Linux (e.g. a FAT or NTFS partition) and modify it accordingly. I've done this already one-way (Linux -> Windows) for my mother's laptop using a little script:

#! /bin/bash
sudo /usr/sbin/grub-set-default 0
nohup bash -c "sleep 15s && sudo /sbin/reboot" &
gnome-session-quit --no-prompt --logout

Also added the following to /etc/sudoers to make the necessary commands execute without prompting:

%adm ALL=(root) NOPASSWD: /usr/sbin/grub-set-default, /sbin/reboot

Alternatively, it looks like someone may already have done the heavy lifting:

http://de.mcbf.net/david/grubchoosedefault/

Haven't tried this yet though ..


This is answering the question independent of Blender 3D, assuming  rendering in general.
(The answer was started before an edit of the question adding the reference to Blender 3D)

MAAS is a system to manage a cluster in a dynamic way.

It is helpful if you often change
your cluster hardware,  or the services deployed on it, or the instances running on it.

For the problem you are solving, that feature set seems to be not very relevant:

I assume you want to build one cluster. That will consist of a fixed set of rougly uniform hardware nodes, that may change infrequently. You want to run one parallel application software on it, so you require one instance of a render service on each node.

The tasks where MAAS could help are the initial setup of the nodes, the deployment of the render service, and changing the cluster, like when adding another node.
But in these tasks, there is neither much repetition, nor much dynamism - the areas where MAAS is powerful.

Because of that, I think the overhead of using MAAS is probably larger than the advantages for your task.

It seems to make more sense to directly set up just the cluster; This gives you the freedom to choose the kind of cluster software based on the needs of your application.


How to configure VNC on a remote Ubuntu server?

The first part is to install Gnome on the Ubuntu server by executing the following on the command line:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

You've already done this but I put this here in case anybody is starting with a Rackspace server in its default state.

Thanks to http://www.ubuntugeek.com/how-to-install-gui-on-ubuntu-12-04-precise-server.html for the above.

I wasn't able to get Vino and Gnome working via the command line but FreeNX is a VNC equivalent for Ubuntu.  Command line installation instructions are here:

https://help.ubuntu.com/community/FreeNX#Installing_the_FreeNX_server_on_Ubuntu_Karmic_.289.10.29_and_higher

In addition my FreeNX client wasn't compatible with the default 3d features of modern Gnome.   It returned “Failed to load session “gnome-fallback” on logging in so I had to run the following line to get Gnome to run in 2d mode:

sudo echo -e "\n#Use unity 2d for client sessions\nCOMMAND_START_GNOME='gnome-session --session=ubuntu-2d'"|sudo tee -a /etc/nxserver/node.conf

Thanks to http://www.dickson.me.uk/2012/06/18/installing-freenx-server-on-12-04-precise-pangolin/ for resolving the above.

The Mac client for FreeNX can be downloaded from here: http://www.nomachine.com/download-package.php?Prod_Id=3834


I have that same card and use that same ppa, but am running the 384 drivers, and they work well. (They just got an update yesterday outside of the ppa, from the main Ubuntu repos).

Try these steps

sudo apt-get purge nvidia*
sudo apt-get update
sudo apt-get install nvidia-375 nvidia-settings

(note 375 is a transitional package for 384, so nvidia-384 is also installed)

I suppose you could just install nvidia-384, but I haven't actually tried that myself.


fail2ban actions to broaden the banned IP range

As fail2ban adds rules to iptables, You may prefer to use iptables directly

iptables -A INPUT -s 197.198.199.0/24 -j DROP

fail2ban can block an ip range, see how with the client:

# fail2ban-client -v set [JailName] banip 197.198.199.0/24
# example:

fail2ban-client -v set recidive banip 197.198.199.0/24

Since jails are time limited, iptables could be a better idea, depending of what you want/need.

But, to answer your question :
Someone have done a configuration customization to ban the whole network of an ip sent in jail
See: https://www.righter.ch/index.php/2014/12/10/block-a-whole-ip-range-with-fail2ban/


What is the right way to exit the interactive CLI of the command "rev"?

The key combination, Ctrl+D, closes stdin and then rev (or cat or any other program that reads stdin) will close.


Installation of Ubuntu 14.04 shows error about /boot/efi and takes forever

I managed to install Ubuntu, even if not to get the process bar. However it was so quick that I didn't need it!

The error

The attempt to mount a file system with type vfat in SCSI2 (0,0,0), partition #1 (sda) at /boot/efi failed
You may resume partitioning from the partitioning menu.

led me to this post on Ubuntu Forums, where I discovered that what I needed to do was reduce the size of the EFI partition, which cannot be more than 256MB, apparently. I set mine to 200 MB, and the installation went fine afterwards.


fsck problem: can't write commands in the built-in shell in boot

At the initramfs prompt, type:

fsck -f /dev/sda4

Repeat this command if there are errors.

Or...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fsck -f /dev/sda4
repeat the fsck command if there were errors
type reboot

This may not fix the problem. We can't see the complete error messages in the image that you posted. It looks like you have some badblock(s) on your HDD.

You may need to boot to a Ubuntu Live DVD/USB, run the Disks application, go to the hamburger icon, choose SMART Data & Tests. Review the data, looking for any items with the word (relocated or pending) sector. Report back. Also run the tests.

If you wish to test for bad block(s)...

sudo e2fsck -fck /dev/sda4 # read-only test

or

sudo e2fsck -fcck /dev/sda4 # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fcck parameter...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.


Google Talk libcairo2 dependency is not satisfiable

The reason libcairo2 is unavailable is because 7.10 doesn't include it in its package list. You could manually install this package from Ubuntu's package search tool, but there is probably a really good reason why libcairo2 isn't in your version's package list. And that really good reason is probably that you'd have to upgrade half of your system manually in order to install it. For example, (in the worst case) it might depend on a later version of glibc or libx11 than you have. You will almost certainly have to upgrade several non-critical packages that it relies on, as well.

Upgrading your whole system via the update-manager (in a controlled, automated way) is much better than upgrading a large portion in an ad-hoc, manual fashion.


Why aren't variables like $PS1 in printenv?

That's because PS1 is not normally exported.

Environment variables are used to set the execution environment of child processes; since PS1 only really has significance within an interactive shell, there's not normally any point exporting it - it is just a plain shell variable.

If you start an interactive child shell, then it will read and set its PS1 from the shell's resource file such as ~/.bashrc

If you export PS1 then you will see it in the printenv output. Alternatively you can see plain shell variables using the bash builtin set as described here How to list all variables names and their current values?


Impossible to install ubuntu 12.10 both with wubi or regularly

Try setting graphics mode to Integrated in BIOS. I also had the same problem and was able to install Ubuntu by changing this setting. However, Ubuntu does not boot when I change the setting back to original value (I think it was Switchable)


Enable dongleless bluetooth on windows7 virtualbox guest

Your bluetooth adapter is connected by USB. It is

8087:0a2b Intel Corp.

You can pass it to the guest system using VirtualBox Device menu.

You need to have the Extension Pack installed.

If you pass the BT device to the guest system it won't be available for the host system.


Alternate ISO image for current unstable (alpha/beta) releases

Milestone builds (Alphas and such) are always linked from:

http://www.ubuntu.com/testing

Daily builds of ISOs are available here:

http://cdimage.ubuntu.com/daily/current/

How usable they are isn't really answerable, it really depends on what's going in the archive that day, see this question for more info:

When are questions about "ubuntu+1" appropriate?


Find details of click and keyboard events

You could use the xinput --test-xi2 --root command (man xinput), where test-xi2 means logging input devices, and --root is to log from so called root window (a x11 specific concept). It would show you when and which key pressed in the system, mouse clicks, and even mouse motion coordinates. It solves your 1 and 3 points, you just need to parse these events.

The 2 point is trickier. You can use xev -root command which would monitor all X events in the system, including things like (dis) appearing windows, entering/exiting focus of a particular window, etc. You have to parse its output, and show a human-readable description of what is happening. Btw, the command logs pressed keys also.

A caveat: it is, obviously, a great security hole, which dates back to times when Xorg was created, and nobody needed to care. For this reason nowadays X11 is being replaced with the Wayland protocol (it is in the essence a X12, but as not backward compatible, the protocol land called another way), which WMs are implementing ATM. It isn't quick process as the protocol demands much more from WM, but Fedora 25 seem to finally have Wayland session enabled by default. KWin is also catching up. And your script not going to work on Wayland. This doesn't mean you can't do it — I think, you can. But you'd need to work closely with a particular WM of a particular DE, and the script would be not a stand alone bash script, but rather an addon to a WM.


Independent window and icon for a custom chromium-URL .dekstop

Yes it is possible.

Open the link of the website you want to add to your Dock in your Chrome/Chromium browser.
Open top-right menu (⋮) > More tools > Add to desktop...
Type a suitable title and make sure to tick Open as window.
You'll notice a new icon on your desktop (or ~/Desktop folder), launch it, right-click the icon on your Dock and Add to Favorites.
Done.

You can remove the created icon from your Desktop if you want.

Note: This will add an entry for the added website in your GNOME Applications launcher. If you don't want that, you can hide it by adding NoDisplay=true to the end of the corresponding .desktop file in ~/.local/share/applications/


The Dell Latitude 6430u is certified to work with Ubuntu 12.04.2 LTS, but it has a few notes you should read about things that might not work. The Dell XPS 13 256 SSD is also certified for Ubuntu 12.04.2 LTS. If you want to install Windows 7 along side an Ubuntu installation you will want to follow these directions.


usb mouse stops working after run the os in ubuntu

There is a big story behind mouse freezes in ubuntu. First, here is a workaround that might help:

sudo rmmod psmouse
sudo modprobe psmouse

or

sudo modprobe -r psmouse
sudo modprobe psmouse

Second, you can file a bug on launchpad, and it might get fixed in the future. Like this one: https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/804109


First, as you can imagine, Ubuntu is going to run slowly on that hardware, and I normally think of a 5 Gb partition as the minimal space for an Ubuntu install.

You may have better success with Lubuntu, it will use less resources.

You can probably boot an iso from your hard drive with grub4dos

I can not give you a detailed walk through on this as I do not have windows 98 to confirm this on, but the following should work.

Download ubuntu or lubuntu iso, put it in C:\

Download grub4dos from http://sourceforge.net/projects/grub4dos/

It is a zip file, unzip it.

copy grldr from the extracted archive to C:\grldr

Save a backup copy of c:\boot.ini , open c:\boot.ini with notepad and add the following line to the end of the file

c:\grldr="Boot Ubuntu ISO"

Save the file and close it.

Again using notepad, create a file C:\menu.lst save it as a txet file to C:\menu.lst (that is a small "l" and not the number "1").

title Ubuntu 10.04 Desktop
find --set-root /ubuntu-10.04-desktop-i386.iso
map /ubuntu-10.04-desktop-i386.iso (hd32)
map --hook
root (hd32)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/ubuntu-10.04-desktop-i386.iso quiet splash --
initrd /casper/initrd.lz

That menu entry is for the ubuntu-10.04-desktop-i386.iso , adjust your menu accordingly.

Reboot and give it a try. If it goes well you should boot the ubuntu iso, it will be slow.

To un-do those changes, delete C:\grldr , undo your edit to c:\boot.ini, delete C:\menu.lst, delete the ubuntu desktop iso.


After updating to 15.10, my scopes projects fail to build for the unity-scope-tool. "error: g++ version must be 4.9!"

To solve this you need change the code in CMakeLists.txt line 8-14 to:

# We require at least g++ 4.9, to avoid ABI breakage with earlier versions.
set(cxx_version_required 4.9)
if (CMAKE_COMPILER_IS_GNUCXX)
    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${cxx_version_required})
        message(FATAL_ERROR "g++ version must be at least ${cxx_version_required}!")
    endif()
endif()

This is what is in the CMakeLists.txt of a new project, and will allow g++ versions higher than 4.9, save and rebuild the project and it should now get past that error.


What is the difference in using mozilla to acess a web service or using the installed service's app?

First off, the install will not install a regular app. What it installs is known as a web app.

This will cause it to still open up in your browser, but it will be able to do some 'smart' interactions with Ubuntu (like using Ubuntu's notification for notification, dash integration, volume panel integration etc.) and a shortcut will be added to the dash in most cases.

So the difference is just that the website/app is smart in being able to appear as a local app while still running in the browser.


How to convert typing in English to Malayalam?

You can use Malayalam phonetics applications or websites. There are so many Manglish websites and applications are available in online

for example vanmaram online English Malayalam dictionary


How do you start FreeCAD in Ubuntu 18.04 after installation?

You can start it via /usr/bin/freecad.  However, that's just a symlink to the actual binary: /usr/lib/freecad/bin/FreeCAD

Edit: the above assumed that you installed it as a .deb package.  You've installed a .snap package version which will have a different directory structure.  http://www.linuxandubuntu.com/home/snap-vs-deb-package has more information about snap package directory structure.


Installing firmware-b43-installer in terminal, get E: Could not get lock /var/lib/dpkg/lock

In terminal run the following:

sudo rm /var/lib/dpkg/lock

This will remove the lock in dpkg. Now run:

sudo apt-get install firmware-b43-installer

Might be you have opened ubuntu-software-center or synaptic or some other installation program, and thats why you are getting this error message.


Install full Ubuntu 14.04.4 LTS in a 64Gb USB 3.0 drive with NTFS side partition for windows compatibility

I found the problem!!

I was partitioning (logically in my opinion) with the first partition in the USB drive as ext2 and the second one as NTFS. Turns out... windows doesn't deal well with this.

WINDOWS ONLY DETECTS THE FIRST PARTITION!!! (I don't know why).

Source (CTRL+F for bodhi.zazen):
http://ubuntuforums.org/showthread.php?t=1719346


The first steep to recover from boot failure condition is to repair Grub and be sure it's working.

Boot from Live CD, when GUI start open a terminal an type this commands:

sudo -s -H
fdisk -l

loof for the boot partition (whit * simbol)

sudo mount /dev/sda1 /mnt
sudo mount –bind /dev /mnt/dev

replace sda1 for yout partition

chroot /mnt

grub-install –recheck /dev/sda
update-grub

(sda its the disk, don't use sda1 this is a partition)
my reference for this, I hope this to be useful.
http://www.luisarmandomedina.com/318/como-reparar-el-grub-en-ubuntu-10-04-lts/


Solved - was apparently using 21.04 but didn't realize when I was meant to use 20.04, don't know how the other stuff started.


Cannot connect to Wi-Fi after upgrading from ubuntu 16.10 to Ubuntu 17.04

The issue was resolved after following the instructions here. Sorry for the duplicate.


In Ubuntu 18.04 and later, since Ubuntu has now adopted the GNOME Desktop, things are more complicated: there is no longer any way to set the compose key within the regular system settings.
You must first download an entirely separate program, GNOME Tweaks. This can be found in Ubuntu Software or can be downloaded with this command via a terminal:
sudo apt install gnome-tweak-tool

Once Tweaks is installed, run it. Then hit Keyboard & Mouse on the left. In the Keyboard section on the right, an option to enable the compose key can be found. By default it is not enabled, so you will need to click on the word Disabled (confusingly, the word does not look clickable, but it is), which will open another window. Toggle the switch in the top left of that new window's title bar to enable setting the key.

Note that there are still limited options for what key can be set: Scroll Lock, Right Alt, Caps Lock, PrtScn, Right Ctrl, Left Alt, Menu, and Right Super.
If you wish to set it to a key not listed, the solution in this answer still works.

In Ubuntu 14.04 and 16.04 go to Keyboard within System Settings. Select the Shortcuts tab, then Typing from the list on the left. Clicking to the right of the Compose Key setting will bring up a menu of different options.
Note that the only options are Right Alt, Right Ctrl, Right Win, Left Alt, Menu, and Caps Lock. If you wish to set it to a key not listed, see this answer.

In Ubuntu 12.04 and earlier, go to Keyboard Layout in System Settings, then hit the Options button on the lower right. You will see one option called Compose key position, where you can set it to Right Win (i.e. right Super).


How to show the new style notifications?

Solved.

I removed the notification-daemon package and the notify-osd started to show up.

version was 10.10


Yes, you can do it this way. For example (when you have sda with parition sda2 which is PV in VG space:

create new raid with missing device and add it to vg

mdadm --create /dev/md1 --level raid1 --raid-devices=2 /dev/sdb2 missing
pcreate /dev/md1
vgextend space /dev/md1
move existing volume to md1:

pvmove -v /dev/sda2 /dev/md1
when it finish, reduce VG and add sda2 to array:

vgreduce space /dev/sda2
mdadm -a /dev/md1 /dev/sda2

remember to add array to mdadm.conf (mdadm -E --scan >>/etc/mdadm/mdadm.conf) and add it to initrd when it's needed (for example when root is on lvm)


Just had a similar issue myself, try:

Hold down Left-Shift on boot to bring up the GRUB menu
Press e to edit the default boot parameters
At the end of the kernel line (near the bottom), add acpi=off - if you have other acpi options place this one before them
F10 to boot

That should at least get you past the ACPI errors and booting, getting it working is another story entirely.

These steps work for disabling ACPI in Ubuntu 16.10 but still have no idea what is actually causing issues. For me this happened just after doing an update.

Edit:

Okay, so for me I found I could get away with just using pci=noacpi and everything I can remember working before is working again (with exception to my GPU). I then set these changes permanently in GRUB: How do I add a kernel boot parameter?

My guess is that either my BIOS is genuinely corrupted (after doing nothing to it), or that ACPI was changed in the update and the reboot caused these non-working updates to be used in my system.

Edit of Edit:

I found that acpi=strict allows booting and for my GTX 960M graphics card to be picked up. I think it had something to do with it sending an interrupt that would allow the kernel to know it's there or something.


How to Create a sub project folder to main project using Cmake

The command add_subdirectory does exactly that.

add_subdirectory(<subfolder>)


What are the different types of directories do we have?

All directories are the same. There are no "types" of directories.

In general:

Linux does use permissions for owner, groups and others to decide if someone can see, edit/delete/write and, or execute. "root" is such a user. So is your account (admin through sudo) and any normal account on your system;if any.

"/home/user/" ("user" will be a name on your system) directories are owned by "user" and a user can do almost anything inside that location. Outside "/home/user/" what that user can do depends on the permissions of that location. Most of the system will be owned by "root" and thus inaccessible for none admin users, and only accessible to an admin user using "sudo". If for instance a user wants to use an external disk the admin needs to grant the permissions for that user use be able to use it.

  How do I reallocate some more space to for faster functioning of the Virtualbox,

"space" and "faster" are 2 different things.

you add more "space" to a virtual machine by editing the virtual machine and to increase the space it can use. This is "space" you can use for storing files. That does NOT make your VM quicker.
"faster" is related to RAM. If you need your VM to be quicker responding increase the amount of RAM, vRAM and/or CPUs. Here is a video explaining how to add RAM: https://www.youtube.com/watch?v=lLuIVGNfM4w


How to install gcc 6.3 on 17.10 64bit Desktop

sudo apt-get install gcc-6 g++-6
export HOST_COMPILER=gcc-6

This allows you to keep gcc-7 but you can still build cuda and tensorflow with gcc-6.


why is rtkit-daemon eating 100% of my CPU?

RealtimeKit is a D-Bus system service that changes the scheduling policy of user processes/threads to SCHED_RR (i.e. realtime scheduling mode) on request. It is intended to be used as a secure mechanism to allow real-time scheduling to be used by normal user processes.  Overall, I would not expect it to peg out CPU usage.  What happens if you let it run its course and do not reboot?  I would be curious to know how long rtkit-daemon is active at any given instance.


Failure during boot with service failures (slowing down PC)

Some resources might be missing. Try updating you ubuntu. Run below mentioned command in terminal.

  sudo apt-get update


System Font System and Desktop enviroment are extremely small after a reboot

This should be re-configurable in System Settings ⇢ Appearance ⇢ Fonts. Hopefully this gets the text back to a readable size for you


How to remotely control which OS Grub boots?

We can reboot to a given Grub menu boot entry using grub-reboot. This can also be done from a remote session e.g. via SSH.

To boot into another OS choose the position it is represented in the Grub menu starting from 0:

sudo grub-reboot <num>

In this case my Windows is on position 4. So when issueing

sudo grub-reboot 4 && sudo reboot

The machine will reboot to Windows after the timeout we defined in the Grub settings.

After rebooting from Windows the machine will boot into the default OS. This can be defined with

sudo grub-set-default <num>

To make this work we may have to define GRUB_DEFAULT=saved in our /etc/default/grub but on my system it also worked with the default settings.

Sadly rebooting Windows from Windows can not be done by this.


Why root http requests in netstat - running Ubuntu 12.04 LiveCD?

Once the app closes the socket, it is no longer associated with that process, but the kernel keeps it around in the TIME_WAIT state for a while to handle any stray packets that may still be bouncing around the Internet and come in later.  Thus, the owner shows up as pid 0, uid 0, which is root.


I just installed Ubuntu 14.04 on VirtualBox 4.3.12 (Windows 7), where do I begin? LAMP?

Follow this tutorial, only the apps you need:

http://blog.desdelinux.net/que-hacer-despues-de-instalar-ubuntu-14-04-trusty-tahr/

To install LAMP you need install synaptic and tasksel

sudo apt-get install synaptic tasksel

Then when this finish open the synaptic program in menu apps

Menu -> Edit -> Packages by work -> LAMP server select -> Accept -> Apply

:)


Using apt-get to remove packages and dependencies

Warning:  This can remove packages that you might still want.  If this happens just reinstall them.  But honestly when you're installing/uninstalling something that's gonna make big changes to your system...why not go ahead and backup first.

The most thorough, method I've ever come up with to completely remove a package PLUS its dependencies PLUS all configs including those configs of dependencies and do a little housecleaning is this where PACKAGENAME is the main package to be removed:

Log out from the desktop and press Ctrl+Alt+F1 then login to TTY1 and run the following commands:

sudo apt-get purge <PACKAGENAME>
sudo apt-get purge $(apt-cache depends <PACKAGENAME> | awk '{ print $2 }' | tr '\n' ' ')
sudo apt-get autoremove
sudo apt-get update
sudo apt-get check
sudo apt-get -f install
sudo apt-get autoclean

Restart if needed

sudo shutdown -r now

So what's going on in the second line? The pipes take the output from apt-cache depends  and reformat it.   The first pipe awk '{ print $2 }'  takes the output of apt-cache depends  and prints, or "echoes", only the second column.  Without it you'd also have in the list another column which is the dependency type, i.e. "depends", "recommends", etc.  Then the second pipe tr '\n' ' ' takes that result and removes, or truncates (hence tr), the newline(s) and replaces them with a space that separates the names.  All of this returns a "space-delimited" list of the names of all dependency packages of PACKAGENAME that's format-friendly for use with multiple package input to purge command-option.

This works especially well for meta packages. I run the last command "sudo apt-get -f install" at the end to check for possible broken packages and fix them after making so many changes all at once.  I especially do this anytime I add a "DE" and want to go back. Just recently I used this after installing GNOME and it even fixed the fact that only purging Gnome with autoremove after still left my GRUB changed and left the login option in the DM.  When I had tried out lubuntu-desktop it fixed some conflicts and removed the entries from the DM login that were left by purge and autoremove.

A similar method which works well, is probably safer, but still doesn't always get everything is:

sudo apt-get --purge autoremove PACKAGENAME

Which may or may not need to be followed up with:

sudo apt-get update
sudo apt-get check
sudo apt-get -f install
sudo apt-get autoclean


To do it without PlayOnLinux (or POL for short) using normal Wine you should first, after doing a backup of anything you have installed inside the Wine folder (.wine):

rm -fr ~/.wine
export WINEARCH=win32
export WINEPREFIX="/home/$USER/.wine"
winecfg

This will start from scratch and set your Wine environment to 32 Bit. After opening winecfg, it will create the needed files and variables for the environment so you can install or copy anything you need to it again and it will work as 32 bit.


Ubuntu 12.04 stopped recognizing my BenQ monitor and reduced resolution to 1024x768

You can try to get the edid data from your monitor. This can be done with the get-edid command

$ sudo apt-get install read-edid
$ get-edid | parse-edid

Did you change your video cable? Some old vga cables do not have the data wire (a wire not used to transmit video signals, but only to interchange data between the computer and the monitor). Maybe that wire got broken if somebody pulled strong from the cable.

You can try to change your video cable, too.


Spell Check Error in LibreOffice - Ubuntu 12.04

Just type in terminal

sudo apt-get install myspell-en-us

Restart libre office, see it is working ?

or you can try, Options > Language Settings > Languages > under default languages for documents, set Western language as English (USA)

if nothing is working you have another options like :

openoffice

Word processor

Calligra Suite

SoftMaker Office

king soft off.


After some more testing I figured out the problem happens due to my mouse, I only checked to connect a second one and use it.

My mouse which cause the problem is a Cyborg R.A.T 9.
After I searched a google I found this solution:

Section "InputClass"
    Identifier "R.A.T."
    MatchProduct "R.A.T.7|R.A.T.9"
    MatchDevicePath "/dev/input/event*"
    Option "Buttons” “17"
    Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
    Option "AutoReleaseButtons" "13 14 15"
    Option "ZAxisMapping" "4 5 6 7"
EndSection

After creating the file /usr/share/X11/xorg.conf.d/20-cyborgrat9.conf with this content it works fine.


Can't set a static IP on virtual vmware server

I've solved it by editing the network settings using the desktop.


nouveau init failed

The nouveau (open source nVidia driver) is failing to initialize. You can try adding "nomodeset" as parameter to the kernel and see if that works, it should.

See screenshot below and when starting Ubuntu Live, make sure you select the "Try Ubuntu without installing option".

WARNING: If you choose to install the OS, chances are you will have the same issue and your freshly installed Ubuntu may not start and you will need to do a similar mod.


PC with two hard disks boots only Windows, Ubuntu booted when F12 pressed

A few known problems with UEFI installs to a second disk:
1) The installer always puts grub onto sda, regardless of what you specify as the location for the bootloader.  Fix: Just copy the entire sda EFI partition to SDB.  Possible to use a grub-install to get a non-secure boot (grubx64.efi) loaded onto the disk you specify (but the secure switch does nothing last time I checked).
2) Grub still won't boot Windows with secure boot enabled. You will still need to use the EFI boot menu to boot Windows with secure boot enabled.  Disabling secure boot is the easy fix for this problem.


How to change boot splash screen in 18.04

The same methods described here, do still work in 18.04.

NB: between 14.04 and 16.04 the location of Plymouth themes changed to /usr/share/plymouth/themes. If you have an old theme its .plymouth file might point to /lib/plymouth/themes/.

Installing a new theme

Easy if it's packaged - sudo apt install

Otherwise you need to copy its folder or extract its archive to /usr/share/plymouth/themes. Then you need to install it...

sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/THEME/THEME.plymouth 100

...replacing THEME with the theme name.

Choosing the theme

sudo update-alternatives --config default.plymouth
sudo update-initramfs -u

Testing

You can also test Plymouth without rebooting...

sudo apt install plymouth-x11

sudo plymouthd ; sudo plymouth --show-splash ; for ((I=0; I<10; I++)); do sleep 1 ; sudo plymouth --update=test$I ; done ; sudo plymouth --quit


Is exclamation mark(!) included in regex or glob?

! is used in both shell globs and regular expressions. It doesn't "belong" to either.

In the example that you gave:

ls lis[!ta]*

it is the POSIX way of negating (or complementing) a character class. From man 7 glob

   Complementation

   An expression "[!...]" matches a single character, namely any character
   that is not matched by the expression obtained by  removing  the  first
   '!'  from it.  (Thus, "[!]a-]" matches any single character except ']',
   'a' and '-'.)

(some shells also support ^ for complementation, for consistency with regular expression syntax). It is also used in ksh/bash extended globs for a similar purpose, ex.

!(foo|bar)

matches anything except foo or bar. For this usage, please refer to the shell's manual page - in man bash for example:

          ?(pattern-list)
                 Matches zero or one occurrence of the given patterns
          *(pattern-list)
                 Matches zero or more occurrences of the given patterns
          +(pattern-list)
                 Matches one or more occurrences of the given patterns
          @(pattern-list)
                 Matches one of the given patterns
          !(pattern-list)
                 Matches anything except one of the given patterns

In perl compatible regular expressions (PCRE),  ! is also used to negate lookarounds, like

foo(?!bar)

to match foo except where it is followed by bar. See for example

Lookahead and Lookbehind Zero-Length Assertions.


Can you connect two monitors with Ubuntu?

Yes, you can connect 2 monitors with Ubuntu, In display settings, (to be obtained from Displays from System Settings) when you will connect the other monitor, you can enable or disable the option of mirror display depending on the requirement.

Note: The configuration option for additional display will only get enable when the external display is connected, or the PC detects external display


Installing Ubuntu with Dual Boot on a 64 Bit Laptop with 4 GB RAM

Is it recognized by other system when booting or in fileexplorer?

You have to setup your boot device to USB or DVD.


At first, I am recommending to use the manual command: man encfs. The encfs command makes an encrypted filesystem.
In case of Single password mode configuration it doesn't matter how strong is your filesystem encryption, if the hacker crack your easy login password. He will be also able to access your filesystem.
There are different cases when you have separate passwords for the login and the encrypted files/partitions, etc.

The whole SSD/HDD encrypted. In that case the attacker cannot access your file until he cracks your encFS password. In that case your user password is also encrypted.

Another case when the system partitions are not encrypted, but there are files/partitions which are. So in this scenario, an attacker can mount your sys partitions and may have access to your hashed, or encrypted password (by a password hash algorithm). But the attacker will not able to read your encrypted files/partitions until he brute forces the password of the encFS.

To answer your question:
If you used the laptop in Single Password mode with weak password, the likelihood is high, because you reused the weak password.
If you used 2 passwords and the encFS password is strong, it would be very hard to get those file.
Further information:
https://wiki.archlinux.org/index.php/EncFS


Where to store unzipped application files

Unity Dash uses locate, so to reindex a program in /opt/ try

sudo updatedb -U /opt/

To get only the program to show up, with a nice icon and everything, you'll have to create a .desktop file. Also see adding program to launcher.


KDE probably created an ~/.icons/default/index.theme file. If you delete that, your GNOME cursor will show up again after you log out and in again.


Why swap is used when loads of memory is free?

That is a design feature built into the kernel itself. In Linus (Torvalds) we trust!

You can try to adjust some of the behavioral characteristics, but on a low-level, the kernel only considers them suggestions. (google 'swapiness')

Often times, swap can be assumed to reside on hard memory. If a program wants a little extra protection from crashes it might request a temp file be synced to disk (which could end up on swap). Then after a crash, a dirty swap can be detected and some data recovery attempted.

You might be surprised how frequently small amounts of data are written to swap (attempt to mount your swap on an old USB drive and you will feel the pain when it starts blocking!)


How can I permantly increase the entropy_avail level?

I have the same issue. I found haveged works the best. Simply run

sudo apt-get install haveged -y

and you are done. It will start itself and add entries to start on boot.


Does it happen when you open the same pdf locally from terminal? There can be bug in evince or it can be just bad PDF ...

Not all the critical gtk errors are actually critical.


Vlans in Ubuntu 12.04.3 bonding are down after boot

I had the same problems with roughly the same configuration.  At first, I had some problems with the interface configs- inet static instead of inet manual on the bond0 interface and inet manual instead of inet static on the bond0.x interface.

Not sure if sorting that out was the only thing to resolve the issue.  While troubleshooting, I had several instances where the bond0.x interfaces would not come up.  Adding up statements at the end of each interface config section as shown below seemed to help bring the interfaces up, when they did not appear to come up in previous tries.

up ifconfig bond0 up ## or bondo.x for each vlan interface


Authentication to Upgrade from 14.04 to 16.04

Its asking your system password what you have provided at the time of installing ubuntu or getting started with ubuntu. If you are owner then you should know what is your password. It will just verify that whether the owner wants to upgrade or any other is trying do so. Its just a step to another step to secure your system.vote up if you got it.


Windows XP will not boot after installing Ubuntu

Or you can simply open a terminal and give this command:

sudo update-grub

With this command, grub will find your Windows XP Partition.


ubuntu 13.10 ASUS R552JV - CN195H external subwoofer not working

I got mine going - I explain what I did in This AskUbuntu posting .

There are 2 parts to the problem: 1) Getting the low-level drivers working. The AMD drivers are broken in the 3.8 kernel but seem to work in the 3.11 kernel.

Once you get the low level drivers working the steps are the same for Intel and AMD machines.


I want to format the hard drive and create partitions myself

Boot from Ubuntu LiveCD, and once booted, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

umount /dev/mylvm/vol
lvremove /dev/mylvm/vol

Make sure to replace /mylvm/vol with your drive info


You can add a shortcut that runs gksudo gnome-terminal, or simply run sudo -i inside an already running one to become root.


Broadcom, that makes the wifi chipset for the airport, only releases x86 non-free drivers for linux. So getting the wifi to work is unlikely. Broadcom supposedly is now producing an open source driver but I think the hardware it supports is limited to new hardware. (it is also only in kernels newer than Precise)


Wireless is too slow after upgrading to Ubuntu 18.04

I just fixed this after installing ubuntu 18.04 on my laptop (Lenovo) - turns out there is some kind of issue with 11n and iwlwifi Intel chips. The solution is to turn it off.
Check if it works first with:

sudo modprobe -r iwlwifi

sudo modprobe iwlwifi 11n_disable=1

Make it permanent with this command:

echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf

I did this and my wifi speeds instantly went back to normal.


How do I fix Fcitx from freezing my keyboard and mouse click?

It's something related to the skin. Please install fcitx-ui-classic. At first use shortcut to active input method to Chinese (or other instead of the en_US input method), then click the indicator, popup the skin menu, select classic, then the problem will be gone.


Save a list of Web pages as PDF file

First install wkhtmltopdf conversion tool (this tool requires desktop environment; source):

sudo apt install wkhtmltopdf

Then create a file that contains a list of URLs of multiple target web pages (each on new line). Let's call this file url-list.txt and let's place it in ~/Downloads/PDF/. For example its content could be:

https://askubuntu.com/users/721082/tarek
https://askubuntu.com/users/566421/pa4080

And then run the next command, that will generate a PDF file for each site URL, located into the directory where the command is executed:

while read i; do wkhtmltopdf "$i" "$(echo "$i" | sed -e 's/https\?:\/\///' -e 's/\//-/g' ).pdf"; done < ~/Downloads/PDF/url-list.txt

The result of this command - executed within the directory ~/Downloads/PDF/ - is:

~/Downloads/PDF/$ ls -1 *.pdf
askubuntu.com-users-566421-pa4080.pdf
askubuntu.com-users-721082-tarek.pdf

Merge the output files by the next command, executed in the above directory (source):

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=merged-output.pdf $(ls -1 *.pdf)

The result is:

~/Downloads/PDF/$ ls -1 *.pdf
askubuntu.com-users-566421-pa4080.pdf
askubuntu.com-users-721082-tarek.pdf
merged-output.pdf

Save an entire Website as PDF file

First we must create a file (url-list.txt) that contains URL map of the site. Run these commands (source):

TARGET_SITE="https://www.yahoo.com/"
wget --spider --force-html -r -l2 "$TARGET_SITE" 2>&1 | grep '^--' | awk '{ print $3 }' | grep -v '\.\(css\|js\|png\|gif\|jpg\)$' > url-list.txt

Then we need go through the steps from the above section.

Create a script that will Save an entire Website as PDF file (recursively)

To automate the process we can bring all together in a script file.
Create an executable file, called site-to-pdf.sh:

mkdir -p ~/Downloads/PDF/
touch ~/Downloads/PDF/site-to-pdf.sh
chmod +x ~/Downloads/PDF/site-to-pdf.sh
nano ~/Downloads/PDF/site-to-pdf.sh

The script content is:

#!/bin/sh
TARGET_SITE="$1"
wget --spider --force-html -r -l2 "$TARGET_SITE" 2>&1 | grep '^--' | awk '{ print $3 }' | grep -v '\.\(css\|js\|png\|gif\|jpg\|txt\)$' > url-list.txt
while read i; do wkhtmltopdf "$i" "$(echo "$i" | sed -e 's/https\?:\/\///' -e 's/\//-/g' ).pdf"; done < url-list.txt
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=merged-output.pdf $(ls -1 *.pdf)

Copy the above content and in nano use: Shift+Insert for paste; Ctrl+O and Enter for save; Ctrl+X for exit.
Usage:

The answer to the original question:

Convert multiple PHP files to one PDF (recursively)

First install the package enscript, which is a 'regular file to pdf' conversion tool:

sudo apt update && sudo apt install enscript

Then run the next command, that will generate file called output.pdf, located into directory where the command is executed, which will contains the content of all php files within /path/to/folder/ and its sub-directories:

find /path/to/folder/ -type f -name '*.php' -exec printf "\n\n{}\n\n" \; -exec cat "{}" \; | enscript -o - | ps2pdf - output.pdf

Example, from my system, that generated this file:

find /var/www/wordpress/ -type f -name '*.php' -exec printf "\n\n{}\n\n" \; -exec cat "{}" \; | enscript -o - | ps2pdf - output.pdf


For a detailed VPN comparison sheet check out this  vpn comparison chart (the downloadable spreadsheet might be nicer then the web version)

Anything that supports OpenVPN should work well on ubuntu.

I have personally used Private Internet Access on ubuntu which worked quite well however the automatic setup scripts were a little outdated.


Open Update-Manager and click at settings. Then A window opens. In that window at 1st TAB you will find CD-ROM option. unclick it .

I am using 12.04 , that’s why I have 12.04 there but for you it will be 12.10 . uncheck it and try again.

Method2:
Open your terminal with CTRL+ALT+T and then type as

sudo nano /etc/apt/sources.list

In that file place # where ever you see the CD-ROM line .

for example:


How can I fix the login error (P2P connect failed) on Skype?

This actually isn't Ubuntu related, they've had outages all day.


How can I create a shortcut between Ubuntu 16 and Windows 10 on a dualboot?

NOTE: This answer has been a work in progress.

This can be done.  I am not sure what Desktop Environment you are running, but the steps should be relatively close to the same.  These steps will create a script that you can run from the command line and also a desktop launcher that can be launched by clicking on it.  Either way, it is best to have it asking for a password before the reboot happens.

First thing is to create a script that will contain the commands based from my other answer here using grub-reboot as it sets the default boot entry for GRUB, for the next boot only.  The reason for this is so there is no editing of the /etc/default/grub file or the /boot/grub/grub.cfg file.

I called my script win_reboot.bsh, but before adding the contents to the script, run sudo os-prober to get a more precise name of the Windows 10 just in case there are multiple entries like could be found in OEM systems with recovery, etc.

I don't use GPT or run on an OEM system so I only have one entry.

$ sudo os-prober
/dev/sdh1:Windows 10 (loader):Windows:chain

Take note of the Windows name between the colons :.  We are going to use the Windows 10 (loader).  awk will actually have a problem with special characters like ()/ so we will have to escape those with a \ like Windows 10 \(loader\).  We are going to use this line because it will be more precise if there are multiple entries in the os-prober that is run before grub-update writes a new /boot/grub/grub.cfg file.

For this, we are also going to use the pkexec command which should already be installed.  gksu is deprecated.

Script contents:

#!/bin/bash

if [ ${UID} != 0 ]; then
    echo "Please run as 'sudo $0'"
    exit 1
fi

grub-reboot "$(awk -F"'" '/Windows 10 \(loader\)/ {print $2}' /boot/grub/grub.cfg)"
reboot

That script will search through the grub.cfg file and get the full name of the Windows 10 (loader) boot.  I did the line to handle changes if a grub-update is performed in the future and changes the name of that line.  The reason for this is that if you add a hard drive or leave a USB drive in the system that is not bootable during a boot up, the drive designation can change.  You could see a line that reads like Windows 10 (loader) (on /dev/sdh1) then on another grub-update it changes to Windows 10 (loader) (on /dev/sdg1).  Good thing that these entries actually rely on the UUID of the partition and not the name in the grub entry.

Next, make the script executable:

sudo chmod +x win_reboot.bsh

Now if you run it from the command line without sudo it should look like this:

$ ./win_reboot.bsh
Please run as 'sudo ./win_reboot.bsh'

Create a shortcut to the new script.  I hope that when you right-click on your desktop that Create Launcher is one of the options.  I am running Xfce4 as my desktop.  I guess you could create a launcher based on the comment posted by Andrew Shum as it should still work as long as it points to the win_reboot.bsh script.

Edit: I changed the launcher here based on the comments I received below.  sudo -H does not work in the command of a launcher, unless you have set the option to Run in Terminal.  One other thing to note here that this launcher is calling a CLI script and not a GUI application.

You can create a file in your ~/Desktop folder named Boot to Windows 10.desktop and add the following to it:

[Desktop Entry]
Version=1.0
Type=Application
Name=Boot to Windows 10
Comment=Reboot System to Windows 10
Exec=pkexec /home/terrance/scripts/win_reboot.bsh
Icon=web-microsoft
Path=
Terminal=false
StartupNotify=false

Remember to change the Exec= line to match your file location.

Then when you launch the shortcut you will see something similar to enter your password as the Super User:

Hope this helps!


The problem you're experiencing is you've add a PPA which doesn't have any software published for Ubuntu 17.04 (Zesty Zapus). Remove the entry for Alex WV PPA in /etc/apt/sources.list.d and andbox-installer will work again.

you can also run

sudo add-apt-repository --remove ppa:alex-wv/pulseaudio-equalizer-ppa

and press Enter when asked to confirm


Scrape/extract Youtube video information using youtube-dl

This command will dumb json data of the given link to terminal

youtube-dl -j 'link'

capture this into a file using

youtube-dl -j 'link' >> example_text.txt


How are flags used in linux for file protection?

The only time i've come across the word 'flag' in a context even remotely related to file protection was was 'read flag' and 'write flag'. That was just a fancy way of saying 'permissions'. As in 'clipboard.sh has no 'read flag' and 'PERswitch.pl' has an 'excute flag':

confus@confus:~/bin$ ll
-rw-------  1 root   root    1863 2011-05-13 00:23 clipboard.pl
-rwxr--r--  1 confus confus  3331 2011-05-06 01:46 PERswitch.pl*

So could be, that you missing something that obvious. But I don't think thats it. That would be just babytown frolics.


What is the best place for xset commands to survive reboot?

From man xset:

xset - user preference utility for X

Which might give you a hint...

Prevent overruling by local procedures

This kind of settings is best applied after possible other (local) procedures ran. If it is run to soon, it will simply be overruled afterwards by local procedures.

My suggestion would be to run it appr. 10-15 seconds after log in, Add it to Startup Applications:

/bin/bash -c "sleep 15 && xset dpms 900 0 0"

Choose Dash > Startup Applications > Add the command above

Apply for all users

To run it equally for all users, copy the code below into an empty file, save it as xset_command.desktopin /etc/xdg/autostart:

[Desktop Entry]
Type=Application
Exec=/bin/bash -c "sleep 15 && xset dpms 900 0 0"
X-GNOME-Autostart-enabled=true
Name=Xset command

Note

Commands to apply settings for keyboard, touch pad, screens (including xrandr commands), and other user specific commands are likely to "catch a cold" (be overruled) when applied too early.

The trick is then to run the command 10-15 seconds after log in to make sure the commands will not be overruled by other commands, or break, if they need the desktop to be fully loaded, or simply miss target.


/etc/rc.local runs as the last step of startup. Nobody is logged in yet at this time, so when it checks to see if pts/0 belongs to gilbert, it doesn't, and the write fails.


Kernel module compilation fails (gcc: error: elf_x86_64: No such file or directory)

You need to edit your own module makefile.

Kernel build makefiles are a little different from regular makefiles: the target needs to be modules, not the name of your module (test), which only needs to be specified via the obj-m variable:

obj-m += test.o

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules


Accessing virtual machine from local host

First, we have to define what you mean by "access" to a machine (either virtual or physical).

When using putty, I assume you used SSH or simple telnet protocols, and the virtual machine was configured to listen for such requests.

When using a web browser, if not defined, it will automatically try to connect using the HTTP or HTTPS protocols, and that means it is looking for a web server with a web application on that address and port. Web protocols also serve different purposes, and act very differently than SSH for example.
Apache or IIS are examples of such web server infrastructure.

Access to a machine can also be a remote connection with graphical interface (such as windows remote desktop), or any 3rd party app for linux (such as Remmina).

After you define what you actually need and on what protocol you are going to use, you should install and configure a package on that ubuntu machine that will can listen to the port and handle your requests.


Can't upgrade juju from 1.25.3 to 1.25.4 due to missing tools

1.25.4 hasn't been released yet. Instead it's a proposed release. Proposed releases are made available for early testing and validation by users and shouldn't be used to upgrade production environments without the understanding that this may break your deployment.

As for your question, there are two different versions of Juju. There is the Juju client installed on your machine and the Juju version deployed in an environment. juju version will print your client version, but each environment created will have it's own version. For example you may have a staging environment and production environment. Upgrading juju for those environments is two independent actions and is what juju upgrade-juju command is designed to do.

So, if you want to test Juju 1.25.4 before it's release you'll need to do a few things. First, you'll need to update your environment to use the proposed stream. Juju uses streams (stable, proposed, devel) to advertise versions of Juju agents available. You created the environment with the stable stream and since 1.25.4 isn't released yet it's not in stable. If you stop now and wait for it to be released, when 1.25.4 goes to stable, juju upgrade-juju will work as expected. You do not have to upgrade the Juju client to upgrade an environment.

Upgrading Juju Environment

To continue, run juju set-environment agent-stream=proposed. You may get a warning about the key not existing, this is OK. Once that's run, you should be able to issue juju upgrade-juju to get 1.25.4 - after the upgrade I recommend moving agent-stream back to released or simply running juju unset-environment agent-stream to revert back to default.

Upgrading Juju Client

To upgrade the Juju client, simply add ppa:juju/proposed and do an apt update/upgrade

sudo add-apt-repository ppa:juju/proposed
sudo apt-get update
sudo apt-get install juju juju-core


Can't see what I type after run "debugfs"

Probably debugfs messed with terminal configuration. The command reset should fix it. Just type reset, then press Enter.


If your install has failed you probably have 2 main options to get everything up and running again.

1 . Install ubuntu again

To reinstall ubuntu put your live disc in and go through the setup again, when you get the the screen asking if you want to install alongside windows, replace windows or configure manually select configure manually. Then identify the new partition that has been created with your partial linux files on, format it and select that as your install location. Then continue with your installation normally. Ubuntu will then start the installation over again and when completed will set up your GRUB with both operating systems listed when you boot.

2 . Restore the Windows 7 boot and worry about ubuntu later

Insert your Windows 7 Disc
Press a key when you are prompted.
Select a language, a time, a currency, a keyboard or an input method, and then click Next.
Click Repair your computer.
Click the operating system that you want to repair, and then click Next.
In the System Recovery Options dialog box, click Command Prompt.
Type Bootrec.exe, and then press ENTER. This will give you a guide on how to use the tool which you can also find here http://support.microsoft.com/kb/927392. But what you need to do is to fix the boot by typing bootrec /FixBoot

Personally I would recommend the 1st method as if you want ubuntu in the future you will have to do it at some point anyway so there is no point in fixing Windows 7 just to replace it with ubuntu again.


If you manage to restore your Windows registry (stored in C:\Windows\System32\config), it should be possible to restore your Windows product key as explained here: https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/how-to-recover-your-windows-product-key/f032f08f-f114-46f6-ab81-b28004dd43a0

Then, you can use your Windows product key in the Windows installer that you can download from here: https://www.microsoft.com/en-us/software-download/windows7


how to kill a lightdm window without losing the session?

I killed a process owned by my user /usr/lib/unity/unity-panel-service --lockscreen-mode I was then able to click the password field behind that screen, type unlock and then close that window.


Make the command:

eval mv MonoEngineSource/src/* MonoEngine

to strip off the implied quoting.


The answer is obvious: there is no source for bash in Ubuntu.
You can download source for bash by
apt source bash

You will need to enable sources in "Software & Updates" to get it working.


How to fix "No boot media found" on dual disk setup after UEFI Ubuntu installation?

Boot from your install media and take a look at your installation's /boot/grub.grub.cfg file.  The disks may be "misnumbered/misnamed" because when the file was generated, the USB stick was present and might have bumped up the disk numbers (and letters) by one.  If you have just the two SSDs, you expect one to be hd0 and the other to be hd1 in the grub.cfg file.

If you see hd2 references, that's the problem, there is no hd2. Just edit everything back one number in the case of hd? and if you see any /dev/sdb etc. Edit those back one letter to /dev/sda.
After your first successful boot, immediately run

sudo update-grub

to fix the problem.

In a more complicated case, the UEFI Settings (BIOS) enumeration of the disks is different than what the running system sees.  There you will need to figure out which disk number is really the one you want.  Edit as above, but the update-grub will no longer be a permanent fix, you will need to edit after each kernel update.

It might be better to run boot-repair for information only, and post the output over in the forums.  these UEFI problems frequently take more back and forth interaction than this question and answer site is set up for.

For UEFI machines (with a black screen grub (grub-efi)  without any
function key options, like the older grub-pc, edit the grub menu and add
the below options on the "linux" line, then boot with F10 or ctrl-X.

Options for Video problems:

nomodeset
acpi=0
acpi_osi=linux
acpi_backlight=vendor
noalpic
i915.i915_enable_rc6=1
video=1280x1024-24@60
video=VGA-1:1280x1024-24@60

To allow Nvidia hybrid machines to boot:

nouveau.blacklist=1


Is there a way to get a separate desktop/Gnome terminal for each user logged in through VNC?

You need xinetd and vnc4server, which allows a very elegant solution. I have installed this on a large server at my college and use it as a virtual hardware lab.

The server has a number of vnc ports open, each with a resolution configured. If a user connects to the port, a new vnc sesssion is created and the graphical login screeen is shown. I have added the configuration for xinetd as well in the post below.

Find all details here: http://blog.epr.ch/2012/10/elegant-solution-for-remotely-accessible-vnc-desktops/


Bluetooth paired but not connected ubuntu 16.04

I did what Bradyn Claycomb suggested but it was not enough so I improved it as follows:

sudo apt install pulseaudio-module-bluetooth
pulseaudio -k
pulseaudio --start

Then I can connect to my Bluetooth headphone from Ubuntu 16.04


Postfix + MySQL + dovecot + postfixadmin - mail arrive to local users

Hi I am not sure if this works for you, but try to set the driver of your userdb to static and use set the arguments as follows in your dovecot configuration:

    userdb {
      args = uid=vmail gid=mail home=/var/vmail/%d/%n
      driver = static
    }

Just a suggestion.
Ulli


why does this system freeze if I run any user other than root? (gdm, xdm, lxdm, etc)

I honestly have no idea why this is happening, but you can easily recover critical data by using a Live CD to mount your hard drive, and then you can copy any important files to a flash drive.


Steps to Improve Fonts

First, you should delete all of your .font.config file(s).

(You can create a backup, if you like).

rm ~/.fonts.conf

Make sure there are no other font config files lurking in your home directory. You can search for them using:

find ~/ -name *fonts.conf

If you find any, delete them (or make a backup, if you like).
Then, set font anti-aliasing and hinting using one of the following techniques.

You can do this using the command line.

Available hinting options are 'full', 'medium', or 'slight', but I suggest 'full'.

gsettings set org.gnome.settings-daemon.plugins.xsettings] antialiasing 'rgba'
gsettings set org.gnome.settings-daemon.plugins.xsettings] hinting 'full'

Alternatively, you can use a GUI.

Install Gnome Tweak Tool.

sudo apt install gnome-tweak-tool

Launch Gnome Tweak Tool, and set the font hinting and anti-aliasing; I suggest "Full" and "Subpixel" as shown here:

Finally, set the system font hinting for applications like Firefox that do not honor the selections above.

You can set hinting to '10-hinting-full.conf', '10-hinting-medium.conf', or '10-hinting-slight.conf', but I suggest '10-hinting-full.conf' as shown.   For consistency, use the same hinting here, as you used in step 2.

sudo rm /etc/fonts/conf.d/10-hinting-*.conf
sudo ln -sv /etc/fonts/conf.avail/10-hinting-full.conf /etc/fonts/conf.d/

Xorg vs. Wayland

After completing the above steps, the fonts in the dock and top bar may still appear blurry, if you are using Wayland. This is due to to Launchpad bug #1714459, Shell font is blurry under Wayland.  This bug is targeted to be fixed in package mutter 3.26.3. You can check which version of mutter you have using:

dpkg -l mutter

Therefore, I suggest you use Xorg to avoid this bug, and all your fonts, including the dock and top bar, will look sharp (after completing the above steps, of course).


PHP 7 - Unable to load dynamic library - curl.so

I was having the same issue.

Uninstall all versions of curl that you have currently installed. Purge them.

Then re install php7.0-curl, then try apt-get dist-upgrade


Make Levnovo Yoga 710 touch screen functional Ubuntu 16.04

I have the same configuration: Ubuntu 16.04 on Yoga 710. Unfortunately, Ubuntu 16.04 by default ships with Linux kernel 4.4 which does not have the required drivers to support Yoga 710 touchscreen.

All you need to do is update your kernel to 4.7 or higher and that should fix your problem. The procedure to upgrade your linux kernel is provided in a number of useful guides online. I followed the steps here:
http://ubuntuhandbook.org/index.php/2016/07/install-linux-kernel-4-7-ubuntu-16-04/

I can confirm that if done properly it should work normally for above configuration, but as advised in the website kernel upgrades can also have other effects! So be careful (Of course you can revert back to the old kernel from the boot menu in GRUB if things go wrong)

About the touchscreen support itself, It isn't as smooth as in Windows 10, yet! And you may have to customize the icons/ screen resolution etc. to make your UI touchscreen friendly. Unity Tweak Tool is a good place to start with!

Hope that helps!


when I close my laptop lid and reopen my machine suspends

Try installing (or re-installing) Xorg multitouch and synaptics.  I am using an Asus q500a and that solved 99% of my lid open/close issues.

These are the steps I used, and I have no idea why it helps with lid actions but it solved it for me.

Open terminal and execute following command:

sudo apt-get --purge remove xserver-xorg-input-multitouch

be sure you don't remove any other package than xserver-xorg-input-multitouch

sudo apt-get --purge remove xserver-xorg-input-synaptics

again follow the same precaution.
Once removed execute these commands to install it again:

sudo apt-get install xserver-xorg-input-multitouch
sudo apt-get install xserver-xorg-input-synaptics

again be sure you don't remove any other packages while installing it.
Once installed execute following commands to reconfigure it:

sudo dpkg-reconfigure $(dpkg -l | awk '{print $2}' | grep "^xserver" | tr '\n' ' ')
sudo update-initramfs -u


Moving the OP answer to an actual answer:

Ok so the trick seems to be to type a command in minicom (here the man page), then type Enter, then press CTRL + J.

I found the following tip (related to the same issue in utility screen) in this ESP8266 quick start guide (here the datasheet):

  Unfortunately the updated firmware versions require
  Carriage-Return-and-New-Line line endings and there appears to be no
  way to configure screen to send both with one key press. Instead, you
  need to press   or  Ctrl-M then follow that with Ctrl-J.

In other words, the ESP8266 expects to see CR-NL after each command. When typing "Enter" in the minicom window, it sends character Carriage-Return (CR). This is why my cursor goes back to the beginning of the line. Then by typing Ctrl-J, it sends the New-Line (NL, AKA LF) character. The cursor moves to the next line and the ESP8622 understands the instruction, thus sending back "OK" to minicom.

I still do not see the cmd> prompt in minicom, but this is not an issue... Maybe this prompt does not appear in all versions of minicom (I am using 2.7).


I'd guess that at some point, files in your home directory became owned by root (because of misuse of sudo). Try chowning them back:

sudo chown $USER:$USER ~ -R


Overriding a executable to add a default flag

You can set this option in one f the mplayer option files, this will then be the default behaviour. For system wide change /etc/mplayer/mpplayer.conf of just for that user create ~/.mplayer/mplayer.conf and put it in there.

Adding this to ~/.mplayer/mplayer.conf works:

msglevel=all=0


How to change drive/partition icons in ubuntu?

To find all the *.desktop files in your system do:

sudo find / -type f -iname *.desktop

Common locations:

/usr/share/applications
~/.local/share/applications
~/.gnome/apps

But in your case you are not looking for *.desktop files as because these files exist only for installed applications not for system drives and system partitions.

What you are looking for are the icons present in:

/usr/share/icons/*


Is there a way on ubuntu to keep offline files like in windows?

I think you should work with a control version application. Maybe Git. You can create your own server and client in the same computer, but normally is usefull to have it separated to guarantee that you don't lose nothing if the computer breaks.

To use and create a git server you can see this instructions.

But I sugest you to use Bitbucket ou github to do that job of creating the server. With them you won't have any headache by configuring the server. The first one has the advantage of having private data for free, the second only permits that by paying the service. By the way, I use bitbucket to all sort of things: for my rails projects, for my python applications, for my thesis (MS word, latex and images), and even for my design works that are images and blender videos.