df -h displays /cow as one of the devices what does this mean?

I think you are running a live (live-only or persistent live Ubuntu system). Such systems run with the root file system in RAM and the device is called cow (which refers to 'copy on write').
A live-only system allocates typically half of the available RAM for the root file system. A persistent live system uses an overlay system, where the partition (or file) for persistence is overlayed on the RAM for the root file system.
Example 1: A live-only system in a computer with 16 GiB RAM
lubuntu@lubuntu:~$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
tmpfs                        1.6G  9.8M  1.6G   1% /run
/dev/sdb1                    1.8G  1.8G     0 100% /cdrom
/cow                         7.8G   17M  7.8G   1% /
/dev/disk/by-label/writable   54G   55M   51G   1% /var/log
tmpfs                        7.8G     0  7.8G   0% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs                        7.8G     0  7.8G   0% /tmp
tmpfs                        1.6G   80K  1.6G   1% /run/user/999

Example 2: A persistent live system in an SSD with 60 GB connected via USB
lubuntu@lubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           1.6G  1.8M  1.6G   1% /run
/dev/sda1       1.8G  1.8G     0 100% /cdrom
/cow             54G   81M   51G   1% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           7.8G     0  7.8G   0% /tmp
tmpfs           1.6G   80K  1.6G   1% /run/user/999
/dev/sda4        54G   81M   51G   1% /media/lubuntu/writable

You can create both kinds of systems with mkusb


Both Ubuntu 13.04 and 13.10 are (or will be) short term releases, which are supported for only 9 months. You should use these releases if you want the newest versions of software and are prepared to upgrade regularly. 13.10 is still considered a pre-release alpha version and should only be used if you like getting your hands dirty.

If you do not want to upgrade regularly, use the Long Term Support release, currently 12.04. This is supported for 5 years after release. (The upcoming 14.04 will also presumably be an LTS release).

An out-of-support release receives no updates, so security problems found and patched in later versions are not fixed. That is not to say that it instantly becomes unsafe to use, since there are relatively few threats targetting desktop linux of any flavour, but it would be unwise to use an obsolete version for either running servers or browsing the web, since these are the most likely attack vectors.

(Note that short term releases before 13.04 received 18 months support instead of 9).


Ubuntu gives "incorrect password" warning

Possible problems:

You have your Caps Lock on.
You changed your keyboard layout. Check the keyboard icon in the upper right.
You are mistyping your password in some way.


Error: svn: Can't create directory .svn': Permission denied

Your command creates a directory named "trunk" in your current directory. You should have write permissions to that folder.

If you want to put the checkout in a different directory, pass it to the command:

svn --username myuser co http://host/trunk targetdirectory

trunk will be located at targetdirectory/trunk.


Huge amount of undefined references when compiling pjsip / pjsua samples

Your g++ command line does not actually link any of the libraries that you just installed: try

g++ pjsua2_demo.cpp -o pjsua2_demo `pkg-config --cflags --libs libpjproject`

See Building Application using PJSIP with GNU Tools


How can I enable the lighttpd on startup in Ubuntu

To enable you can use:

sudo systemctl enable lighttpd

To get the status (to chekc if it is running or enabled)

sudo systemctl status lighttpd


The general question to this is NO, however, there is a but:

Some applications are cross-platform so you can find their Windows versions. For example, there's KDE for Windows initiative which supposedly allows you to run KDE programs on Windows
Mostly for command-line programs, there's a compatibility layer called Cygwin
you can run Ubuntu programs in a virtual machine in Windows.

But generally you can not take an arbitrary .deb and install and run it in Windows.


WIreless and wired networking no longer working after update today (Jan 31) of Ubuntu 14.04

Since your wired is working, try sudo apt-get install bcmwl-kernel-source and reboot, your wifi should work if the ethernet cable is unplugged.

Since that didn't work, reboot and hold the shift key, when the grub menu appears, select advanced options or previous versions and select the 3.13.0-43 kernel to boot into as I don't know what Ubuntu did in the latest kernel
......


Getting correct OpenCL version installed on Intel

According to Intel article your graphics card supports OpenGL 1.4 on the hardware level.

You can try to force OpenGL version with something like:

MESA_GL_VERSION_OVERRIDE=3.3COMPAT game-name

but it may not work.

References:

https://steamcommunity.com/app/262410/discussions/0/458605613414324092/
https://wiki.archlinux.org/index.php/Intel_graphics#Overriding_reported_OpenGL_version


Ubuntu has a choice to install with manual partitioning (something else)... (You possibly used it to create the current system [or someone else did it for you]).

When you chose manual partitioning, you have the option to format, or to not format the partition (there you have to chose "Don't format" and "use as /home").

Everything else is a normal installation process.


Screem was in the repositories for Hardy (8.04 LTS), as this Launchpad page shows, but that was around five years ago. The Ubuntu packages page contains details about it, but the problem in either installing or compiling lies in that it requires very old dependencies that are not compatible with the current 12.10 packages.

The package you mention, 'libgtkhtml-2.0' was in the repositories for Hardy with the accompanying -dev files necessary for compilation, as were most of the other necessary dependencies, but they can't be installed to the system on 12.10 without causing a lot of problems.

Unfortunately, there hasn't been much active development of the project for a long while, going by the mailing-lists and the code commits, although someone did try compiling recently (2011) and the answer noted on the mailing-lists might give you some help, as it points to a more recent version of the project. However, I think the same problem with dependencies will be present.


Suggestions for Epson WF-1110 WiFi printer?

I solved this, and figure others may benefit. Turns out you can download (from here) the generic Epson Linux driver package, called: epson-inkjet-printer-escpr_1.4.4-1lsb3.2_i386.deb (for my case, a 32-bit Ubuntu distro).

You have to install lsb, then this Debian package.

sudo apt-get install lsb
cd Downloads                       # or wherever the file you downloaded is
sudo dpkg -i epson-inkjet*.deb

After that, the system-config-printer tool finds the driver and you're all set.


If you are on Linux system and you want connect to an SSH server on port 26 you can use the following command.

ssh user@192.168.1.1 -p 26

Note:

Replace server IP with the IP Address or DNS name of your server.
Change your port number as you have set.
if you are using custom port SSH then same port most be allowed for outbound, inbound connection on firewall otherwise the connection will not establish


apt-get install telnet

This is a valid question BTW. Do not install the telnet server, ever. Also the telnet client is not included by default in many distros. For instance it is very common in docker-land to face the need of installing several tools that are taken otherwise for granted. For example, Official OS docker images most likely will be shipped with a shell and its built-ins. Telnet will not be shipped in any of those.


Android Studio doesn't render Ubuntu Mono Font well

The problem is not anti-aliasing - all of your examples show the text is anti-aliased fine.

The difference is in an aspect of font rendering called "hinting" - the top Ubuntu Mono example shows a strong hinting, whereas the bottom Ubuntu Mono example shows a smoother hinting.  Hinting deforms the letter shapes to better align to the pixel grid and give a more crisp appearance.

Whether you like one or the other is a matter of personal preference.  The top one is certainly very clear to read but at the expense of deforming the letter shapes.

The Java environment will be using its own font renderer rather than your global settings, hence the difference.

There are various fixes for this described in this link at stackoverflow.com:

https://stackoverflow.com/questions/17510099/ugly-fonts-in-java-applications-on-ubuntu

This one looks pretty simple (I have not tested this):

Try adding

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp'

to your ~/.bashrc

But the chosen solution is more complex.


Using Python 2.6 while python 2.7 is installed

You are missing the shared Python2.6 library. It does not get build by default, that is why it's not there after you build and installed Python 2.6

Two options: Build new with shared library or install a pre-build package.

To compile with the shared lib, do pretty much what you did in the first place, but configure with --enable-shared

./configure --enable-shared
make -j6
sudo checkinstall
sudo ldconfig

The library should be installed to /usr/lib/x86_64-linux-gnu or something similar like /usr/local/lib and thus be found by the loader. The last command makes the dynamic loader aware of the new library.
Python2.6 is not in the Ubuntu repositories anymore, but you can install it from ppa:fkrull/deadsnakes.

Remove your previous build. Since you installed with checkinstall, this is painless.
Add the repo sudo add-apt-repository ppa:fkrull/deadsnakes
Install sudo apt-get update && sudo apt-get install libpython2.6
(Maybe) If libpython2.6 is not enough, install python2.6 and python2.6-dev


Try to log on into your windows, then shut it down. Maybe your windows was hibernated without your notice


Using the RandR-enabled nvidia 302.xx beta driver in 12.04 with a realtime kernel

Warning

The patch in this question is for kernel 3.4, and so is the one below; a realtime-patched kernel 3.4 is required.

The new nvidia 302 driver requires the video ABI that xorg-server 1.12 provides, and unfortunately Precise comes with xorg-server 1.11. The following instructions involve adding the xorg-edgers PPA as a software source to provide xorg-server 1.12, and this poses a certain risk of breakage. The uninstallation instructions are at the bottom, but read them through for possible hiccups there.

Instructions

Modifying the packaged nvidia driver

Create a temporary directory and change into it with:

mkdir -p ~/tmp/nvidia_302_fixrt && cd ~/tmp/nvidia_302_fixrt

Download the nvidia-current_302*.deb from the xorg-edgers PPA by browsing the packages for Precise under nvidia-graphics-driver_302* here. At the moment of this writing, a direct download can be performed with:

wget https://launchpad.net/~xorg-edgers/+archive/ppa/+files/nvidia-current_302.17-0ubuntu1~xedgers~precise1_amd64.deb

Extract the .deb with:

dpkg-deb -x nvidia-current_*.deb deb_contents && dpkg-deb --control nvidia-current_*.deb deb_contents/DEBIAN

Add the patch to the deb_contents/usr/src/nvidia-current*/patches directory by pasting the following in a terminal:

d=$(echo deb_contents/usr/src/nvidia-current*/patches) ; cat > $d/buildfix_kernel_rt_3.4.patch <<'EOF'
diff -u a/conftest.sh b/conftest.sh
--- a/conftest.sh       2012-05-03 09:49:19.582854050 +0100
+++ b/conftest.sh       2012-05-03 09:52:58.524101586 +0100
@@ -95,7 +95,7 @@
         fi
     fi

-    CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+    CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$OUTPUT/arch/x86/include/generated $AUTOCONF_CFLAGS"

     test_xen

@@ -965,11 +965,12 @@
             #
             echo "$CONFTEST_PREAMBLE
             #include <linux/acpi.h>
+            #include <acpi/acpixf.h>
             void conftest_acpi_walk_namespace(void) {
                 acpi_walk_namespace();
             }" > conftest$$.c

-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+            #CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
             rm -f conftest$$.c

             if [ -f conftest$$.o ]; then
@@ -980,6 +981,7 @@

             echo "$CONFTEST_PREAMBLE
             #include <linux/acpi.h>
+            #include <acpi/acpixf.h>
             void conftest_acpi_walk_namespace(void) {
                 acpi_walk_namespace(0, NULL, 0, NULL, NULL, NULL, NULL);
             }" > conftest$$.c
@@ -1604,6 +1606,9 @@
             fi
         fi

+        RET=0
+        SELECTED_MAKEFILE=Makefile.kbuild
+
         if [ "$RET" = "0" ]; then
             ln -s $SELECTED_MAKEFILE Makefile
             exit 0
diff -u a/nv-linux.h b/nv-linux.h
--- a/nv-linux.h        2012-05-03 09:49:19.622853547 +0100
+++ b/nv-linux.h        2012-05-03 09:56:12.045668690 +0100
@@ -291,7 +291,18 @@
 #endif
 #endif

-#if defined(CONFIG_PREEMPT_RT)
+#if defined(CONFIG_PREEMPT_RT_FULL)
+typedef raw_spinlock_t            nv_spinlock_t;
+#define NV_SPIN_LOCK_INIT(lock)   raw_spin_lock_init(lock)
+#define NV_SPIN_LOCK_IRQ(lock)    raw_spin_lock_irq(lock)
+#define NV_SPIN_UNLOCK_IRQ(lock)  raw_spin_unlock_irq(lock)
+#define NV_SPIN_LOCK_IRQSAVE(lock,flags) raw_spin_lock_irqsave(lock,flags)
+#define NV_SPIN_UNLOCK_IRQRESTORE(lock,flags) \
+   raw_spin_unlock_irqrestore(lock,flags)
+#define NV_SPIN_LOCK(lock)        raw_spin_lock(lock)
+#define NV_SPIN_UNLOCK(lock)      raw_spin_unlock(lock)
+#define NV_SPIN_UNLOCK_WAIT(lock) raw_spin_unlock_wait(lock)
+#elif defined(CONFIG_PREEMPT_RT)
 typedef atomic_spinlock_t         nv_spinlock_t;
 #define NV_SPIN_LOCK_INIT(lock)   atomic_spin_lock_init(lock)
 #define NV_SPIN_LOCK_IRQ(lock)    atomic_spin_lock_irq(lock)
@@ -954,7 +965,9 @@
     return ret;
 }

-#if defined(CONFIG_PREEMPT_RT)
+#if defined(CONFIG_PREEMPT_RT_FULL)
+#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
+#elif defined(CONFIG_PREEMPT_RT)
 #define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
 #else
 #if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
EOF

Add the patch to dkms.conf by pasting this in a terminal:

d=$(echo deb_contents/usr/src/nvidia-current*) ; cat >> $d/dkms.conf <<'EOF'
PATCH_MATCH[1]="^3\.4.*(rt|realtime)"
PATCH[1]="buildfix_kernel_rt_3.4.patch"
EOF

Modify the version number in deb_contents/DEBIAN/control by issuing:

sed -i 's/^\(Version: .*\)$/\1+rtfix/' deb_contents/DEBIAN/control

Repackage the driver with:

dpkg -b deb_contents nvidia-current_$(sed -n 's/^\(Version: *\)//p' deb_contents/DEBIAN/control)_amd64.deb

Installing the PPA and the modified driver

Add the xorg-edgers PPA:

sudo add-apt-repository ppa:xorg-edgers/ppa && sudo apt-get update && sudo apt-get dist-upgrade

Install the locally-modified .deb with:

sudo dpkg -i nvidia-current_*+rtfix_*.deb

Keeping up to date

The xorg-edgers PPA will update with newer versions of the nvidia driver as they come out; you will need to repeat the re-packaging instructions above with each new release.

Uninstalling

You should be able to revert to the nouveau driver with the following:

    sudo apt-get remove nvidia-current
    sudo apt-get install ppa-purge
    sudo ppa-purge ppa:xorg-edgers/ppa

In my case, this process involved uninstalling wine along with some i386 packages (which should have been downgraded instead). Be wary of ppa-purge if you are on amd64 since it does not get along well with multiarch (as indicated in the PPA warnings); in my case the outcome was a non-issue (I simply reinstalled wine), but other people might end up with badly broken dependencies depending on what they have installed.


I'm not aware of any AND operator for PAM, but you can achieve the same effect with control statements. Per my comment, this is pretty hacky, but should get the job done.

In your check script, return a specific PAM error code (probably PAM_SYSTEM_ERR), then use control statements in your common-auth file like so:

auth    required                        pam_group.so use_first_pass
auth    [success=ok default=1]          pam_exec.so /etc/security/check_ecryptfs
auth    [success=2 default=ignore]      pam_krb5.so minimum_uid=1000 try_first_pass
auth    [success=1 default=ignore]      pam_unix.so nullok_secure try_first_pass

The control statements for the pam_exec module should cause PAM to go to the next module (pam_krb5) on success, and skip to pam_unix if pam_exe returns any other return code. You'll need to make sure your module actually returns the success code, though. See the source.

Further reference:

pam.d man page (particularly the section on control statements)
PAM Module Writer's Guide


my guess: copy and see your plugins using chrome://plugins (not sure if it's chromium instead of chrome) if you find two adobe flash plugins disable one of them. If you didn't find any download the package from adobe (.deb for ubuntu) and then install it.


Is it possible to install Oracle Database Express on 32bit Ubuntu 12.10?

http://www.iasptk.com/ubuntu-functioning-of-oracle-xe-in-the-system-oraclehome-environment-variable

Install Oracle 10g XE on Ubuntu Server

Download

oracle-xe-universal_10.2.0.1-1.0_i386.deb (262,440,214 bytes) (cksum 3404538446) *Debian package

from

http://www.oracle.com/technetwork/products/express-edition/downloads/102xelinsoft-102048.html

After downloading install the deb package with the gdebi installer or with

sudo dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb

After-install configuration

You must configure Oracle TCP/IP port and other parameters. Simply type the following command:

$ sudo /etc/init.d/oracle-xe configure

Output:

Oracle Database 10g Express Edition Configuration

This will configure on-boot properties of Oracle Database 10g Express
Edition.  The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts.  Press  to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]: [Enter key] or
 [write your port if 8080 is in use]

Specify a port that will be used for the database listener [1521]:[Enter key]

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:secret

Confirm the password:secret

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y

Starting Oracle Net Listener...Done

Configuring Database...Done

Starting Oracle Database 10g Express Edition Instance...Done

Installation Completed Successfully.

To access the Database Home Page go to "http://127.0.0.1:8080/apex"

To access the Database Home Page go to "http://127.0.0.1:8080/apex". Open a web browser and type url (you need to use username "system" and password setup earlier)


The 5 key is being held down by a ghost?

Seems to be the same.

  You seem to have wireless Logitech keyboard, right? There was a Linux
  kernel bug (not just Ubuntu distribution). It is already fixed with
  kernel version 4.4.0-30.49.

  So you can just update your system with Software Updater for example.

  You can find more information here
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1579190


Where is a good guide to remote participation in the Ubuntu Developer Summit, and is it upgraded with each summit?

The UDS website contains all the information you require.

This section covers remote participation.

The key thing to remember - all schedule times are in US day-light savings time - set your clock carefully!

Have fun.


It appears that this issue stems from a lack of support for HFP/HSP and A2DP profiles on the Broadcom BCM20702 chipset, unless a proprietary firmware file is loaded into it to enable this functionality. Some users have reported success using this firmware and placing it in /lib/firmware/brcm

With some versions of the kernel It's required to rename the file to match the complaint from dmesg which might be:

  Direct firmware load for brcm/BCM20702A1-0a5c-21e8.hcd failed with error -2

If this is your case simply mv /lib/firmware/brcm/fw-0a5c_21e8.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e8.hcd or whatever filename the kernel is complaining about in dmesg

Reboot as a final step.

Note: I do not have your hardware available for testing. This answer is based strictly on research.

Sources:

https://lists.debian.org/debian-kernel/2015/10/msg00083.html

https://plugable.com/2014/06/23/plugable-usb-bluetooth-adapter-solving-hfphsp-profile-issues-on-linux/


Bootstrap mdadm RAID6 server via USB flash

Moving the boot files to the USB disk wouldn't be too difficult - Moving / would be a large project; Instead, I suggest you consider reinstalling Ubuntu.

If you're willing to reinstall Ubuntu (you don't have to format your array during the reinstall), we can accomplish this without too much difficulty:

If you plan on not formatting the array, I suggest that you make a subdirectory on it, and move all the array's files into it. Since the array will be the new "/", any existing files will be found there, instead of the array's normal mountpoint.
Make sure the USB drive is attached before booting the installer
When configuring partitions:

format the USB drive using a Linux filesystem (like ext4), and set its mountpoint to "/boot"
Set the mountpoint of your array to "/" (If you want to keep the data on the array, make sure it's not makred to be formatted here.)

When configuring the bootloader, make sure that GRUB is set to be installed on the USB drive's device. (If the USB drive is already "sda", this should be the default.)


Driver problems with rtl8812au for Alfa AUS036ACH

Current working drivers with support for monitor mode are maintained directly by aircrack-ng team and available here:

https://github.com/aircrack-ng/rtl8812au


Cannot Run .py File In QTerminal (tkinter)

shakes head this is the second time I've answered my own question now :v

Instead of typing python Tut1.py into the QTerminal, I needed to type python3 Tut1.py. Now my little programs runs perfectly.

I am a dope.


NetworkManager quits randomly causing disruption to the internet connection

The command for nm-applet is nm-applet. You could try that from command line. On a very different note may be you could try some alternative for network manager like wicd.


How can I downgrade openssl via apt-get?

I do not believe that a downgrade will solve your problem. But you asked:

The package openssl=1.0.1-4ubuntu5.31 isn't longer in the Precise repositories, because the latest version is now 1.0.1-4ubuntu5.32. But the package is still available in the PPA of the “Ubuntu Security Team” team.

For version 1.0.1-4ubuntu5.31

wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/7531893/+files/openssl_1.0.1-4ubuntu5.31_amd64.deb
sudo dpkg -i openssl_1.0.1-4ubuntu5.31_amd64.deb

But I suspect that you have to downgrade other packages listed here.

The downgrade is temporary. After a

sudo apt-get upgrade

or for a better feeling a

sudo apt-get dist-upgrade

the latest version will we installed again.


For instance, if you want a password with the maximum character length, i.e. 63, you can enter either of the following 2 commands:

makepasswd --chars=63
openssl rand -base64 63

UPDATE:

Here is a better command I've found for this purpose since I first wrote this answer:

dd if=/dev/urandom bs=48 count=1 status=none | base64 | tr +/ -_

Actually I use this zenity-powered script to generate such a password from time to time:

#!/bin/bash
RNDPWD="$(dd if=/dev/urandom bs=48 count=1 status=none | base64 | tr +/ -_)"
echo $RNDPWD | tr -d '\n' | xclip -i -selection clipboard
zenity --question --title="Random Password" --text="Password Copied to Clipboard:\n\n$RNDPWD\n\nWould you like to generate another one?" --width=500 --height=150
if [ $? = 0 ]
then
    "~/.bin/Password-Generator-GUI"
fi


Problems with internet connection after installing and updating Ubuntu 12.10

ok, it is fixed, I followed this thread:wireless not working after installing Ubuntu .
It seems that you have to install some new drivers for wifi....


Sadly this is a known bug in (probably) consolekit LP #838792

The workaround for the time is

sudo reboot

sudo shutdown now -P


A layman's guide to understand stages of ubuntu startup/booting

GRUB loads the kernel, the kernel starts the init process (typically /sbin/init). It's what happens after that is typically of interest. In various stages of Ubuntu's history, there have been three init systems:

SysV init, the Dark Ages
Upstart, Ubuntu 9.10 - 14.10
Systemd, from Ubuntu 15.04

Init systems, in general, start the various services that are supposed to be run, in addition to other duties. What does an init system do?

/etc/init.d is where the shell scripts of interest of the old sysv init system reside. If you can, just avoid it. It exists only for backward compatibility reasons.

/etc/rc.local is a script from the sysv init era, which still works because of backwards compatibility. It's good for short-lived commands to be run at system startup as root. It's executed once during startup. For long-lived tasks, use Upstart (/etc/init) or systemd (/etc/systemd/system) services instead. Both Upstart and systemd allow starting programs conditionally, but the way they do it is different.

Once you login to a GUI, most desktop environments will start applications listed in ~/.config/autostart. It's a good place for commands that should be run after you login to a GUI, like starting your mail client. They're executed each time you login, so each time you logout and re-login, they will be executed (unlike /etc/rc.local).

~/.config/upstart is like ~/.config/autostart, but it is handled by a per-session Upstart process that is started when you login to a GUI. It's more flexible than ~/.config/autostart, which simply executes the commands at login. This is useful up till Ubuntu 16.10, where the per-session process is now systemd (from 15.04 to 16.04, the main init was systemd, but per-session inits were Upstart). See, for example, my answer here: How do I run a script on Unity login/logout?

Now you can probably make more sense of the options in How to run scripts on start up?

~/.bash_profile, ~/.profile, ~/.bashrc, etc. are not good for starting commands at startup. These are usually read by command-line shells, so when you start a terminal, or login to the TTYs. So, .bashrc is good for running a command each time you open a terminal, and .profile for when you login from the TTY. (See this answer.) These files are also mostly used in setting environment variables, but the canonical place for environment variables is /etc/environment for system-wide variables and ~/.pam_environment for user-specific variables. See this answer.

~/.local/share/applications is irrelevant to this discussion.


Running .jar File using JDK on Ubuntu 14.04

You should be able to run Java jar files in terminal by running java -jar path/to/jar. Note that some jar files only print things out; they don't display a window.


In the update manager, click the settings button in the bottom right.  In the Updates tab of the resulting window, there are a number of options that control the behaviour of the update manager.

What is annoying you is that the When there are security updates: setting is set to Display Immediately.  If you would like the protection of these security updates without being bothered, consider setting this to Download and install automatically instead.

With this change, the update manager will pop up at most once a week for the non-security updates.  You can switch this to fortnightly by changing When there are other updates: to Display every two weeks.

There is also an option to turn off checking for updates entirely in this tab, but I would recommend against picking it since it can leave your system vulnerable to preventable problems.


Ubuntu Desktop Not Loading Correctly After 16.04

Unfortunately, this isn't uncommon with Ubuntu and seems to plague LTS releases worse than regulars for some reason.  The failing upgrade will cause things to get stuck halfway between releases, and you need to kick it in the shin to get it going again.

Assuming you can get a command prompt on the system (CTRL-ALT-F1) and login as yourself, try the following things:

First set ownership on your home directory.  Doubt that's the cause, but I've had it happen before:

sudo chown -R yourlogin:yourlogin /home/yourlogin

Next, try to finish the apt upgrade process:

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

If that errors, try running:

sudo dpkg --configure -a

And a last resort, force remaining package installs:

sudo apt-get install -f

And finally, clean up leftovers with:

sudo apt-get autoremove


Would it be possible to minimize current window with hotkey Super+?

You cannot use the launcher to minimize applications by design. Neither with the mouse nor a keyboard shortcut. See Can I use the Unity launcher icon to minimize applications/windows?


Screen switches off after waking up from suspend

Here are a few options to avoid or recover from the issue.

Temporary fix

In the main bug ticket there's now a fix which involves adding a PPA:

Add the Xubuntu Developers PPA to get the new packages: sudo add-apt-repository ppa:xubuntu-dev/ppa
Update package information and update the two crucial packages:

sudo apt-get update && sudo apt-get install xfce4-power-manager light-locker-settings

xfce4-power-manager-data will get upgraded at the same time
Restart your machine.

To remove the upgrades and return your machine to it's state prior to testing

sudo ppa-purge ppa:xubuntu-dev/ppa

Temporary workaround

The easiest way to work around this bug is to disable lock on suspend in the light locker settings.  Of course, this means that your machine will resume from suspend without a password.

Quick fix

If you end up in this situation you can get back to a working state (note that you'll lose your current session and a new one will be started) by:

Switch to a virtual terminal: CtrlAltF1
Restart lightdm: sudo service lightdm restart


Does sudo update-grub detect fedora 21?

There is also a GUI program for grub repair called Boot-Repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
boot-repair

Run the recommended repair. If that doesn't work, boot-repair generates a log which might point out the issue.


When you're defining a function on a single line, you need a ; to signify the end of the commands:

displayInfo (){ echo "Hi";cal;date; }

Alternatively, you can do it on multiple lines:

displayInfo (){
    echo "Hi"
    cal
    date
}


remove top and bottom gnome panels in Ubuntu 12.04

Install dconf-tools:

sudo apt-get install dconf-tools

Backup your panel configuration:

dconf dump /org/gnome/gnome-panel/ > /some/location/backup.xml

Now remove the panels:

gsettings set org.gnome.gnome-panel.layout toplevel-id-list [""]

If you want to restore them later use:

cat /some/location/backup.xml | dconf load /org/gnome/gnome-panel/

NOTE: This doesn't seem to hold after a reboot. Further research shows this is because several dconf schemas are still in place. I have yet to figure out how to remove these.


Sorry, Ubuntu 16.04 has experienced an internal error. [ExecutablePath /lib/systemd/systemd-udevd

/var/crash didn't give me any clues as to the nature of your problem.

If you keep seeing the same crash report time after time, it's probably because you're clicking on the X (close) instead of clicking on the Continue button.

Sending an error report is optional, so you can uncheck the "Send error report" if you choose.


AmpliTube works perfectly in Xubuntu via Wine.

“WineASIO provides an ASIO to JACK driver for WINE. ASIO is the most common Windows low-latency driver, so is commonly used in audio workstation programs.”

Install Wine and Jack:

sudo apt-get install wine jackd qjackctl

Install WineAsio .deb

Download  and install this package

wget http://www.lucamazzilli.it/downloads/wineasio_0.9.0-1_i386.deb

sudo dpkg -i wineasio_0.9.0-1_i386.deb

Install dependencies

jack 1

sudo apt-get install libjack-dev

jack 2

sudo apt-get install libjack-jackd2-dev

Download and extract

wget http://leaseweb.dl.sourceforge.net/project/wineasio/wineasio-0.9.0.tar.gz

tar -zxvf wineasio-*

cd wineasio

Get the source asio.h (file:asio.h  http://sourceforge.net/projects/wineasio/files/wineasio-0.9.0.tar.gz/) than copy to your source folder and:

make

sudo make install

if you get an error like this:

exmple@pc:~/wineasio$ sudo make install
if [ -d /usr/lib32/wine ]; then cp wineasio.dll.so /usr/lib32/wine; else cp wineasio.dll.so /usr/lib/wine; fi

just copy wineasio.dll.so on the correct folder in old fashioned way:

64bit

sudo cp wineasio.dll.so /usr/lib32/wine

32bit

sudo cp wineasio.dll.so /usr/lib/wine

You must register wine library

regsvr32 wineasio.dll

Configure Wine to use alsa and jack

winecfg

select audio tab, than pick Jack Driver and Alsa Driv.


problem getting gunicorn.conf file to work in /etc/init

I figured out what the problem was myself. Things seem to have changed in ubuntu 16.04. I had to create a gunicorn.service file in /etc/systemd/system/.

  [Unit]
  Description=gunicorn daemon
  After=network.target

  [Service]
  User=nero
  Group=www-data
  WorkingDirectory=/path/to/webapp
  ExecStart=/path/to/webapp/virtual_env/bin/gunicorn --workers 3 --bind unix:/path/to/webapp/project.sock project.wsgi:application

  [Install]
  WantedBy=multi-user.target

The service can now be started using sudo systemctl start gunicorn.


Unable to connect to wifi, 12.04 macbook pro

2014-08-01

I strongly suggest that you re-install Ubuntu 12.04 and do so without trying to connect to the Internet at the same time. I've found installing and re-stalling Ubuntu this way very helpful since 2012. This method simplifies the process and helps avoiding unforeseen problems. You can take up the wireless matter afterwards.

By the way, all laptops' internal wireless adapters are compatible with Windows, Linux and OSX.

Please let me know whether my suggestion helps. Good luck.

Julianloui


sudo rm -R /var/www/wordpress/wp-content/themes/myFolder/*

-R to recursively remove anything inside it (and deeper).

This also removes files (not just directories).


How to rename archives in Ubuntu's terminal?

Using mmv you can do:
mmv /home/wiki/15000_20000 'xx*' '1520#1'

mmv is not installed by default, but you can install it by running:
sudo apt install mmv


Your hard drive is full.

As df does not show any other empty space, you will need to delete something.

First remove not needed data from your /home, e.g. you could move Pictures, Videos and Music to an external drive or remove them you don't need anymore. Remove files in ~/.thumbnails folder. You might use bleachbit to gain more space (it tries to delete cached files, etc.).

After that, try:

sudo apt autoremove
sudo apt autoclean

But all this is just a temporary solution, 25G is just very little space for OS and data.

I see two possibilities:

Install less programs and keep less data on your drive.

or

Install a second hard drive for /home.


Can chmod 777 be a security risk on a personal machine?

Yes ofcourse, for example, someone might gain access to a guest account, in that case having chmod 777 all over makes it easier to access private data or modify the system.


They do not work because the second server is only queried if the query of the first one returns with an error. An error is something like a timeout, an answer from the DNS server that the address/name is not know is not an error but a valid DNS answer.

Since you already have a DNS server in your network at 192.168.1.254 you should configure that one to use 8.8.8.8 as upstream server, so that your local DNS server can forward the DNS queries that are out of the local scope.
On your clients, just use 192.168.1.254 as DNS server and you are done.

To find the DNS server that is running at 192.168.1.254, you could run the command as follows.

lsof -n -i:53

Now identify the DNS server binary and lookup the manpage to configure the upstream server.


To answer in more detail and in backup in-case of page deletion of (this answer), this is what you should do.

sudo apt-get remove --purge bcmwl-kernel-source
sudo modprobe bcma

And then you do:

sudo iw reg set EG
sudo sed -i 's/^REG.*=$/&EG/' /etc/default/crda


showing this error for pil moule of python

There is no package on PyPI with the name PIL, so pip can't find and install it.

There is however a package called Pillow which is a fork of PIL.


How to get the list of all application installed which has GUI?

Try searching for all the .desktop files, Gnome's Developer website calls them the "registered set of applications that users can run" and they're almost always GUI programs.

This answer (How can I find *.desktop files?) says you could just search everywhere for .desktop files with

find / -name '*.desktop'

Or they're probably only in /usr/share/applications/ and ~/.local/share/applications so just looking in those should be sufficient:

find /usr/share/applications ~/.local/share/applications -name '*.desktop'

If you specifically want to exclude terminal programs (even if they have a terminal GUI like htop), you could append these commands to a search above:

...  -print0 |xargs -0 grep -i -l "Terminal=False"


Bootable USB doesn't show as boot option

Some BIOSes have difficulty with USB sticks over 4 GB. If the USB stick that you have tried previously is larger than that size, try one that is less than 4GB.


You can use Boot-Repair while you're live on usb .

installation :

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

and it will automatically repair your grub .

Source:

Ofiicial Ubuntu Boot-Repair


How do I play through bluetooth headphones?

It looks like the underlying problem was similar to the one for this question:

https://stackoverflow.com/questions/31380594/linux-bluez-dbus-communication

Except that I'm running a systemd linux setup so I had to do as the comment on that answer suggested:

  With newer Systemd-based systems, copy
  /lib/systemd/system/bluetooth.service to
  /etc/systemd/system/bluetooth.service and change the ExecStart line to
  ExecStart=/usr/lib/bluetooth/bluetoothd -E.

– Arto Bendiken

So I did that, restarted, and then started bluetoothctl, and connected manually:

[Bose QuietComfort 35]# connect 04:52:C7:32:68:16
Attempting to connect to 04:52:C7:32:68:16
[CHG] Device 04:52:C7:32:68:16 Paired: yes
Connection successful

This time when I paired, my headphones recognised the connection (they didn't previously, even though GNOME seemed to think the pairing had worked) and the output device appeared in my devices list.


Its Deja-dup backup software it pre-installed with Ubuntu. To can uninstall it from Terminal(ctrl+Alt+T) and enter the following command in terminal.

sudo apt-get purge --auto-remove deja-dup

source: http://vikrambuzz.blogspot.in/2012/09/how-to-remove-ubuntu-deja-dup-backup.html

Or

If you want to just change the settings so that i never asks for backup. Goto ->system settings(top right)-> select backups and change settings.


A bunch of relatively small images are reading at 1 MB/s via Samba

You can't make Samba faster for small files, because Samba is not the issue.

The best way to transfer a large amount of small files is to compress them into an archive first, and then transfer the entire archive.  You may even find the entire process of compress>transfer>extract to be faster than transferring all the files.

The reason is two parts, overhead, and hard drive operations.  There's more overhead on the network when transferring multiple files compared to a single file since each file has many attributes that go along with it.  And, your hard drive works harder to allocate space to write each packet from its buffer.  If you have a mechanical drive, then you also have to factor in seek time added to it, and the hard drive's operation of fitting the data into sectors.  SSD's aren't affected as much.

You'll find the same problem when transferring files from HDD to HDD, or from USB drive to HDD.  It's the overhead of many individual files.


did you try the answer to this thread:

How do I disable the blank console "screensaver" on Ubuntu Server?

In short it says  to add the parameter consoleblank=0 to your kernel command-line at boot-time.

Hope that helps.


Thinkpad W520 brightness modification requires suspend

I think you will have better luck with using Ubuntu 14.04?  I installed it on my W510 and the brightness works fine as long as you use the standard built-in video driver and not the NVIDIA driver.


The real problem is bug LP #539814. The solution is to upgrade your kernel or use a patched tar program.

Otherwise, use the next workaround:
Replace the contents of the /usr/local/sbin/tar file with:

#!/bin/sh
TAR_OPTIONS="--touch $TAR_OPTIONS" /bin/tar "$@"


WARNING **: Failed to get pixmap in /var/log/syslog

this syslog entries are because of transparent panels and they have nothing to do with this problem


You have several ways to do this, but the idea is always the same. How to use the output of cat ?
There are 2 possible syntax, with backquotes and with $(command). I'll use the second one which is preferred (see [BashFAQ 82])

You can do it in one line

cd "$(cat file.txt)"

Or in two steps

path=$(cat file.txt)
cd "$path"


Prohibiting changing of home page and launcher

For the launcher, it can be easily set like this:

gsettings set com.canonical.Unity.Launcher favorites "['application://nautilus.desktop', 'application://firefox.desktop', 'application://libreoffice-writer.desktop', 'application://unity-control-center.desktop', 'unity://running-apps', 'application://gnome-terminal.desktop', 'unity://expo-icon', 'unity://devices']"

I covered this more in my answer here.

As for the Firefox home page, that is set in the profile settings so is harder to set directly using a command. A simple way round this would be to remove the Firefox profiles using this command:

rm -r ~/.mozilla/firefox

Don't run this on a system where you want to keep your Firefox settings etc intact.

This can be added to 'Startup Applications' to remove the Firefox profiles on login. This has to be added wrapped in bash -c "... ..." so it executes correctly:

Also note a alternative to all this may be to create a Guest Account


Do I need to create partitions in advance for Kubuntu installation if I have unallocated space?

Kubuntu will recognise the unallocated space and will give you the possibility during the installation to partition it further, to allow space for your swap file.


How to run a python script with sudo without being prompted for a password

You can edit your sudoers file so that a given user can execute a specific script without a password request.

Example:

someusername    ALL=(ALL) NOPASSWD: /some/path/to/script/somescript

Similar Post / Reference: How do I sudo a command in a script without being asked for a password?


Booting to Ubuntu 20.10 is unreliable - screen flash

I solved this by switching to the X.org drivers and selecting "Ubuntu on Wayland" at the login screen.
No screen flash on boot or login, and the machine itself is running quieter as well!


open up a terminal and issue these commands

sudo apt-get update

sudo apt-get upgrade

this will give you an update ... same as the GUI version you speak of ... with added bonus of displaying details if things go awry ... after doing above if you still have an issue please update your question with a paste from the screen output


Is there a way to run ntfsfix if the partition fails

Yes, a method would be to create a UDEV rule (example with an external USB) and add a "ACTION" to run a script that. In that script you can check the health of the disk and, when needed,  run ntsfix.

  Is this even a safe thing to do?

I have my doubts. It will delete data from your Windows if that data is only stored in the Windows hiberfile. The correct way to fix this is by turning off hibernation/suspend/fast boot from Windows.

Command line powercfg -h off to turn it off.


The script below should do the job:

#!/usr/bin/env python3
import random
import os
import subprocess
import shutil

# set the desired number of folders to pick below
n_selection = 5
# set the name of the flash drive below
flashdr = "Lexar"
# set the source directory (with media folders) below
sourcedr = "/path/to/mediafiles"
# ---

try:
    targetdr = [l.split("part ")[-1] for l in subprocess.check_output("lsblk")\
                .decode("utf-8").splitlines()if l.endswith(flashdr)][0]
except IndexError:
    pass
else:
    # empty the flash drive
    for item in os.listdir(targetdr):
        obj = os.path.join(targetdr, item)
        try:
            shutil.rmtree(obj)
        except NotADirectoryError:
            os.remove(obj)
    # list the source dirs
    srclist = []
    for dr in  os.listdir(sourcedr):
        fullpath = os.path.join(sourcedr, dr)
        if os.path.isdir(fullpath):
            srclist.append([dr, fullpath])
    # copy the files
    for picked in random.sample(srclist, n_selection):
        shutil.copytree(picked[1], os.path.join(targetdr, picked[0]))
        srclist.remove(picked)

It copies directories from the first sub-level of the source-directory into the targeted flash drive.

This is what seems to make the most sense, since recursively copying folders, at random, causes a big difference in folder- size and number sub-levels. I added it nevertheless as a second option at the bottom of this answer.

How to use

Copy the script into an empty file, save it as create_mediausb.py
In the head section, set the number of files to be selected, the name of the flash drive (the script will find its path) and the source diectory with folders.
Run the script with the command:

python3 /path/to/create_mediausb.py

If all works fine, add it to a shortcut key: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/create_mediausb.py

Second option: recursive selection

#!/usr/bin/env python3
import random
import os
import subprocess
import shutil

n_selection = 5
flashdr = "Lexar"
sourcedr = "/home/jacob/Bureaublad/GW_site_nafestival_2015/pix/general"

try:
    targetdr = [l.split("part ")[-1] for l in subprocess.check_output("lsblk")\
                .decode("utf-8").splitlines()if l.endswith(flashdr)][0]
except IndexError:
    pass
else:
    # empty the flash drive
    for item in os.listdir(targetdr):
        obj = os.path.join(targetdr, item)
        try:
            shutil.rmtree(obj)
        except NotADirectoryError:
            os.remove(obj)
    # list the source dirs
    srclist = []
    for root, dirs, files in os.walk(sourcedr):
        for dr in dirs:
            srclist.append([dr, os.path.join(root, dr)])
    # copy the files
    for picked in random.sample(srclist, n_selection):
        shutil.copytree(picked[1], os.path.join(targetdr, picked[0]))
        srclist.remove(picked)

The script:

Looks up the path to the flash drive:

try:
    targetdr = [l.split("part ")[-1] for l in subprocess.check_output("lsblk")\
                .decode("utf-8").splitlines()if l.endswith(flashdr)][0]
except IndexError:
    pass

If the flash drive is not found, it ends here
If the drive was found, it is emptied

# empty the flash drive
for item in os.listdir(targetdr):
    obj = (targetdr+"/"+item)
    try:
        shutil.rmtree(obj)
    except NotADirectoryError:
        os.remove(obj)

Then, since we need the whole directory list to make an appropriate selection at random, we create a list before making the selection:

# list the source dirs
srclist = []
for dr in  os.listdir(sourcedr):
    fullpath = sourcedr+"/"+dr
    if os.path.isdir(fullpath):
        srclist.append([dr, fullpath])

The most interesting part is making the selection. We pick a random directory, remove it from the list to prevent double picks, then pick another one at random, remove it, and so on, until we reach the number of desired picks:

# copy the files
for picked in random.sample(srclist, n_selection):
    shutil.copytree(picked[1], os.path.join(targetdr, picked[0]))
    srclist.remove(picked)


There are a number of paths that a package can take to enter Ubuntu. The overview of Ubuntu development targeted at "upstream" developers like yourself might be a useful place to start, but I'll try to give you some pointers as well.

Through Debian

Generally, if you are publishing free and open source software going through Debian first is the best path. This way ensures that your package will have a dedicated maintainer. It also will reach the largest number of users as it will be available in not just Debian and Ubuntu but all of their derivatives as well. Some useful links for requesting/providing new packages in Debian:

Work-Needing and Prospective
Packages - Information on how to
file "Intent to Package" and "Request
for Package" bugs as well as list of
open ITPs and RFPs.
Debian Mentors
FAQ - debian-mentors is for the
mentoring of new and prospective
Debian Developers. It is where you can
find a sponsor to upload your package to the archive.
Debian Developer's Reference - Debian Developer's Reference's section on new packages. The entire document is invaluable for both Ubuntu and Debian packagers.

Directly into Ubuntu

In some cases, it might make sense to go directly into Ubuntu first. Some helpful links:

The Ubuntu App Developer site - for lightweight desktop applications, you can submit them directly on the My Apps section of developer.ubuntu.com, the App Review Board will review them and they will be published in the Software Center.
Packaging Guide - an introduction to how to package for Ubuntu.
REVU - a web-based tool to which Ubuntu contributors can upload new packages for review by Ubuntu Developers for inclusion into Ubuntu.
Sponsorship Process - After entering Ubuntu, you can maintain your package through the sponsorship process.

Personal Package Archives

Beyond the official Ubuntu and Debian channels, Launchpad offers you the ability to distribute Debian packages directly to your users through its Personal Package Archives or PPAs for short. One particularly useful aspect of a PPA is that you can provide daily builds of your software for testing purposes.


I take it you're referring to the Visual Effects tab in the Appearance applet in Ubuntu 10.10 and earlier versions, which had the options None, Normal, and Extra. I gather it isn't compatible with Unity, which is why it is missing.

An option that is still available is to install compizconfig-settings-manager, available in the Ubuntu repositories, which allows for a lot of optional special effects and tweaking, including some specific to Unity. There was a comment by Mark Shuttleworth that some of those special effects are buggy under Unity.


Get notified about new files on SFTP server

Given http://manpages.ubuntu.com/manpages/trusty/en/man1/sftp.1.html

use the -b option to pass in sftp commands to cd to the remote directory, and list the files (use ls -l or ls -1t)

you'll need to set up ssh keys for password-less authentication

parse that output to look for new files
use sftp again to get the new files.

Use cron to schedule this job every N minutes or hours


Trying to install apache web server Linux Ubuntu

Try apt install -f
Or
Try using apt instead of apt-get. Apt will likely give you a fix.
Also have you done apt update && apt upgrade before installing apache2.


A very simple script for achieving such a thing could be the following:

#!/bin/bash

PERIOD=10       # s.
WARNING_TEXT="Warning: the connection to SKYNET was lost."
LANGUAGE="en"
ICON="notification-network-wireless-disconnected"

# conn_monitor.sh:
# polls the connection state after PERIOD seconds, and reads aloud a warning message
# in case there is no connection
#
# dependencies:
# - sudo apt-get install espeak binutils libmad libnotify-bin
# NOTES:
# - nm-tool has been replaced by nmcli in newer versions of ubuntu (>= 15.04),
#   see the output of `nmcli dev` to adapt this script to your needs.

function conn_monitor() {
    while true :
    do
        sleep ${PERIOD}
        mem_data=$(nm-tool | grep "State: connected")

        if [[ -z "${mem_data}" ]]; then
            notify-send "${WARNING_TEXT}" -i ${ICON} -u critical
            paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga
            espeak -a 200 -v ${LANGUAGE} "${WARNING_TEXT}"
        fi
    done
};

if [[ "$BASH_SOURCE" == "$0" ]]; then
    conn_monitor $@
else
    export -f conn_monitor
fi

Then you can add a file named conn_monitor.desktop in ~/.config/autostart with the following content:

[Desktop Entry]
Type=Application
Exec=..path..to..your..script..
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Conn Monitor
Comment=

in which you correctly set the path to your script location.

I tested the script on ubuntu 14.04.


According to https://launchpad.net/~apt-fast/+archive/ubuntu/stable/+packages it is not available as a ppa for trusty. You could go to https://launchpad.net/~apt-fas and ask them for a update or download it your self from the source at https://github.com/ilikenwf/apt-fast


How can I install Ubuntu 'alongside' Lubuntu?

There is a dual-boot guide on the Ubuntu Documentation pages. You can replace the word Windows with Ubuntu, so that you end up dual-booting Ubuntu and Lubuntu.

When you reach the partitioner, select "Advanced Partitioning" or "Manual Partitioning".
You will get a list of the partitions on your system.
You need to have free space on your hard disk to install Ubuntu. So, there are two ways that you can free up some space. Either you delete some partitions (that you do not need any more) or you can shrink your existing partitions (so that some space gets freed up). I am assuming that you will shrink your partitions.
Select the partition you want to resize and click on 'Shrink'. If you are unsure as to which one to use, then I suggest that you resize your '/' or root partition, i.e., the partition that is mounted under '/' symbol. Select "Size:", press Enter. Type in a new size for your partition. It's recommended you free up at least 10 GB + your RAM size * 2 of free space for your Ubuntu install. Press Enter when happy with your changes. It may take some time to apply the changes.
Create a swap partition of at least twice the amount of your RAM (your RAM size * 2) (if you don't know, 2048 MB is a good value). To do this, select the free space, then click on 'Add'. Enter the size and then select type as 'Swap'. Press 'OK'.
Create a partition for your Ubuntu installation. To do this, select the free space, click on 'Add'. Select the type as 'Ext4' and the mount point as '/'.
Select "Finish partitioning and write changes to disk".
Continue with the installation.


file not found when installing brother printer

Not to deter you from anything that has been already discussed, because there is WAAAAY more benefit in learning what you did wrong there(for a new learner)... and not to mention it's a more up-to-date method than what I'm about to suggest
.... but if cups is installed and running on your machine. You should be able to open a browser and go to http://127.0.0.1:631 and it will take you to the CUPS configuration page.
Under Administration - you can install printers, and for me looking at a version of ubuntu MATE 20.04 that I've barely interacted with... There is a full compliment of "Brother" printer drivers pre-loaded. (And there may be more available from ubuntu's repository via the apt installer)

This is the very old method of doing it, but it is "very basic".... I still use it because it's not something I need to deal with more than once per install.... downside to that; I think I discovered this around 2006, I never bothered learning any other method... Don't be like this me


trying to set up ssl cert but after a2ensite apache refuse to start

This is most probably an issue with your SSL certificate files. Can you verify them with this: http://httpd.apache.org/docs/2.4/en/ssl/ssl_faq.html#verify


Missing icons in fresh texstudio installation

Having the same problem, I uninstalled Texstudio and installed the QT5 version instead, even though it is stated explicitly "For Ubuntu 14.04 use Qt4 Version."

This is not a fix but it is a workaround for being productive today.


How can I get the source code to gnome-system-monitor and use it in my application?

The source code for the System Monitor can be acquired by opening a terminal and entering:

apt-get source gnome-system-monitor

Unfortunately it is written in C. You cannot extend it with Python and Quickly.


Get window name of byobu session in bash

I found an answer in the meantime. I hope it will be helpful for anyone else seeking help on this topic:

It is possible to get the session number via environmental variable TMUX_PANE; just get it via windowName=$TMUX_PANE; this is it :). Integrated in the code example above:

#!/bin/bash
windowName=$TMUX_PANE

if [[ $windowName == "%1" ]]
then
    infile="infile1.txt"
fi

if [[ $windowName == "%2" ]]
then
    infile="infile2.txt"
fi

do.something($infile)

Btw, there is an environmental variable $BYOBU_WINDOW_NAME. But on my system it is not set properly (all the same in all windows, although windows have been named differently by myself). But the solution above works anyway ...


Explain the parameters before and after @ in the terminal prompt

The part before the "@"

alexey511

is your username; check with

$ whoami
alexey511

The part between "@" and ":"

rgb-3345

is the hostname:

$ hostname
rgb-3345

The part between ":" and "$"

~

is the current working directory, abbreviated to the tilde which is a synonym for your home directory:

$ pwd
/home/alexey511

And finally the "$" is the actual "prompt" sign, indicating you're a normal user (instead of root, in which case it would read "#"), and that command input is expected from you here.

Altogether this is a fairly vanilla shell prompt which is defined and assigned to the environment variable PS1 like this (without color codes for better readability), usually in the file ~/.bashrc:

PS1='\u@\h:\w\$ '

If you want to experiment with it, check out this page:

https://www.howtogeek.com/307701/how-to-customize-and-colorize-your-bash-prompt/


I am going to post some Important steps with screenshots , here you go.

Boot from Live Usb Drive or Live Cd of Ubuntu 12.04.

Select the Try Before Install option ( take back up before proceeding if required), then at the desktop select the Install Ubuntu 12.04 option.

Select the Language from Left Side menu, and Continue

Then make sure you have Internet Connection ,don't select anything & Continue

Then At this Below image Menu select the Last option ( Other options Might Vary to that of yours)  Something Else ,& continue.

You will be brought to Partition table , Most important step also,

Select the Partition Your current Ubuntu installation is On , most probably will be with ext4 ( or ext3 ) type and verify its size if you know it  , if you can't recognize then Open the Dash and search for Disk Utility & maximize it, select your hard drive , and search & select the ext4 or ext3 partition , you will find its appropriate /dev/sdaX number , now Back in Installation menu , Tick mark the Square Box to Format it , & select the Mount Point as /  only ,stating root partition.

Since you are re-installing, so i am  assuming that you already have swap partition present as from below image.

Don't click Install now yet , see the Device for boot loader installation option , preferably select /dev/sda without any number adjoining it.

Now you can Cross-check the partition and booting option , and Select Install now to go forward. Further options are pretty simple , they don't need instructions.

Hope your installation successfully finishes.


Docker-ce vs Docker.io for Ubuntu 19.04 / Disco

Packages for Disco (19.04) aren't yet available, which is why the documentation doesn't mention 19.04 as supported (https://docs.docker.com/install/linux/docker-ce/ubuntu/#os-requirements).
This can also be seen when you compare the packages for Cosmic (https://download.docker.com/linux/ubuntu/dists/cosmic/pool/edge/amd64/) to the packages for disco (https://download.docker.com/linux/ubuntu/dists/disco/pool/edge/amd64/).  You can see the Docker packages aren't there yet.

However, there is a snap provided by Canonical you can try (https://snapcraft.io/docker).  This can be installed with sudo snap install docker.

Update: There are now nightly packages (https://download.docker.com/linux/ubuntu/dists/disco/pool/nightly/amd64/) available. See https://github.com/docker/for-linux/issues/533. There they mention when Docker CE 19.03.0 is released, stable packages will be available for Disco.


The following packages have unmet dependencies after installing .deb file

sudo apt-get -f install

this command is solved the problem! Thank you @George


This bug has since been resolved.

When the charger is plugged:

When unplugged:


Disable automounting of hard disks on ubuntu live

I know this is a really old question, but maybe this can still help someone.

What works (tested on Ubuntu 18.04.1 live USB) is to manually add systemd.mask=udisks2 to the kernel commandline, either via directly editing the live image, or via GRUB commandline editor.

Sources:

https://unix.stackexchange.com/questions/170549/how-to-disable-automount-for-external-devices-in-opensuse-13-2
https://www.freedesktop.org/software/systemd/man/kernel-command-line.html


Squid LAN network Per user Bandwidth monitoring

The most effective solution for this is to use the Wireshark packet sniffer. This allows you to sort packets on port, protocol, IP, and view streams of packet / packet info. Unfortunately this does not give you an instant overview of web pages for example, but there are a lot of tutorials available to help you get started with Wireshark.

There is a guide on how to install Wireshark in Ubuntu here.

Download Wireshark

Wireshark Beginner's Tutorial


How to encrypt file or blocking access to file and only execute apache?

A caveat: I have never done this myself, but I was contemplating it... hence I looked it up. You create an encrypted folder with encfs, see this help page.

Basically, you back-up and move your /var/www directory to a temporary location. Than you recreate it as described in the help page, copy in your old contents (cp -R <from> <to>) and chown it properly.

If needed, the help page provides some hooks for how to start the decryption automatically, if you would like that.

Good luck with it!

Jeroen


Ubuntu 19.10 not playing nice with nVidia GPU

It's likely an X.org configuration problem. Can you update your question with an X.org log corresponding to the failed login ?

How to find the log file : from the home directory of the user which you tried to open an X session with, go to the .local/share/xorg directory. There you should find a few log files, take the most recent one corresponding to a failed login attempt. You can list the files in increasing modification time order with ls -lrt. Failed X logins can be detected in the file with lines starting with (EE) towards the end, and (probably) the words fatal error.

If you can't X login yet to get to get to the X.org logs, don't forget you can login on a VT such as VT3 by pressing Ctrl+Alt+F3. If your last X login attempt as that user is a fail, just take the most recent X.org log file by copying it somewhere from where you can then post it here later by any means of your choice.

EDIT :
Are you sure it's the correct log file, I mean the one that was generated during the failed X login attempt ? Because those errors don't look fatal at all. It looks like you just took the currently running X.org file...

open /dev/fb0: Permission denied is a classic in X log files, I think it's because it tried to load some framebuffer driver when guessing the configuration. I have it too. To avoid that error, you should set up an explicit X configuration instead of letting X.org guess, but that's likely unrelated to your problem.

Running the X server as root isn't usually necessary, and from my experience, the X wrapper seems to guess quite correctly by itself if root privileges are necessary, but you can keep it for now if you feel more comfortable like that. However, I would advise that you go back to the previous automatic setting (or even non-root), once everything is running well.

Of course the problem could be unrelated to the X server, but the fact that changing the driver solves the problem, and not changing the session manager (such as going to Xfce, for example) seriously points to an X.org configuration problem. Moreover, the display manager uses Wayland, not X, to show the login screen. You could try using that too btw, from the login screen, once you've selected the user, by clicking the gear icon and choosing Ubuntu on Wayland, but even if it works, it would be good to have that X configuration problem solved.

What's the Prime profile selection on your machine ? Type prime-select query to get the answer...

You can try restarting gdm to see if things improve : systemctl restart gdm.service

REEDIT :
Glad you found a workaround ! I would not really call that a solution, however...

Actually I had a problem similar to yours after upgrading. Even worse actually, since I wasn't able to log in (even a text login was impossible), and the Grub menu wasn't displaying any more (I didn't know I had to press Esc at the time), so no recovery option, but I managed to get out of this by setting the Nvidia Prime profile to intel in a chrooted root login environment. Once I was able to boot again, I noticed the nvidia drivers were in the initramfs, hence loaded early, and managed to remove them from there by purging the cryptsetup-initramfs package, which was forcing the FRAMEBUFFER initramfs option and putting the Nvidia drivers there, which should not be the case on Optimus systems anyway.

Once I had done all this, things seemed to be OK again, but I wasn't sure my initramfs-related operation was really necessary to solve my problem, and that was maybe more related to my Nvidia driver being v430 being incompatible with the new Prime on-demand profile, and I updated to v435.

However, looking at the solution you resorted to brings back my thoughts about an initramfs-related problem. Maybe if you purge that cryptsetup-initramfs package which you possibly don't need (unless you encrypt your root filesystem), that would have solved it for you too. Anyway that either is more of a workaround than a solution, since you would have to choose between using the Nvidia driver or encrypting the root fs.


gnome-session-manager mounts only one partition

After long discussion, @Fabby and I agreed that this behaviour is a bug. Hence I filed a bug-report: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1408129


I faced the same issue after upgrading to 16.10 from 16.04.

I used the following command to get ethernet working again.

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

Restart the PC after running the command.

Check the following thread for more info:

After upgrade to 16.10 ethernet stopped working


Comparing my version with the clean install

You could compare the list of installed package with the  ".manifest" file of your distribution,

For instance the manifest of 13.04/i386 can be found here :

http://mirrors.mit.edu/ubuntu-releases/13.04/ubuntu-13.04-desktop-i386.manifest

To get your installed packages :

#aptitude search ~i \!~M

Regarding the customization you could have made there is a tool that can helps you to compare the modified configuration files against the package checksum informations : debsums

#debsums -ce

(-e to check only the configuration files, -c only the changed files)

Edit :

the packages installed during the year are logged in /var/log/apt. Older history logs are deleted by logrotate. I made that script to get the installed package (take care not to modify the awk patterns when copying).

# cd /var/opt/log
#(zcat $(ls -rt history*gz); cat history.log ) | awk '
 /^Commandline: (apt-get install|synaptic|aptitude)/{
         cmdl=$0
         getline
         if(/^Install|^Remove/) {
            print cmdl
            print
         }
  }' | less


Unity isn't starting on 13.10 (with Cinnamon 2.0 installed)

After some research it seems to be that Unity in 13.10 has serious issues if Cinnamon 2.0 is installed. I don't have a full answer yet, but I at least have some more things to try now.

OK I found an answer! Unfortunately it means removing cinnamon entirely, but until it doesn't mess up unity I'll have to hold off.

sudo apt-get install ppa-purge
sudo apt-get purge --auto-remove cinnamon
sudo apt-get autoremove
sudo apt-get update -f
sudo apt-get dist-upgrade
sudo apt-get install ubuntu-desktop
sudo apt-get remove .*cinnamon.*
sudo apt-get remove .*nemo.*

Reboot and everything should be working! It's likely that not all of these steps are needed, but that's what I did to resolve the issue.


New instance every time while using ubuntu 20.04 in a bootable pendrive

I'm afraid that the Live USB version of Ubuntu doesn't let you save your data from previous sessions. As the option "Try Ubuntu" implies, that is only for testing Ubuntu. If you want to install Ubuntu on that pendrive properly, you can follow this tutorial (or any number of similar tutorials), but I'd personally recommend a lighter OS for a pendrive, especially if said drive is on the smaller side.


Ubuntu 16.04 Incredibly Slow in i5 8GB RAM Dell Inspiron n4050

SOLVED
A new clean install solved the issue. I think it was probably a disk failure. I had many disk errors when opening gparted. So i deleted all partitions on my HD, rebuild the partition table, and formated new partitions.
Ubuntu running nice and fast now. Didn't even install intel graphics.


You can get the full modification timestamp (mtime date and time) in human-readable form from stat using the %y format specifier i.e.

$ stat -c '%y' file
2014-08-21 12:30:03.449771375 -0400

I don't think stat itself has a format specifier for just the date portion of the mtime, but with GNU date you could re-format the epoch seconds from stat like

$ date '+%F' --date="$(stat -c '@%Y' file)"
2014-08-21

or simply use cut or awk to get the leading component e.g.

$ stat -c '%y' file | cut -d' ' -f1
2014-08-21


Default username/password for Ubuntu Cloud image?

From OpenStack import or create a key pair and when you launch the instance select the keypair to add. You will be able to "ssh -i your-priv-key ubuntu@your_machine_ip"

PS don't forget to set a security group for the instance to allow ssh connections

Reference: https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html


Thumbnail previews in Files/Nautilus only show when zoom is 150% or more (18.04)

Looks like a regression in new version of Nautilus.
I filed a bug on launchpad: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1769358


Take a look here.

You'll want to specify Path=~/Desktop/mexico/bin and change the Exec line to Exec=mono OpenSim.exe.  There is no need to have multiple shortcuts, one should work.  If you want these to act as normal application launchers, you should put them wherever the rest of your .desktop files are located.


the systemctl startup script for Mysql is failing to run this command
/usr/share/mysql/mysql-systemd-start pre

this doesn't do much other than sanity check your environment using the following shell code :

sanity () {
  if [ ! -r /etc/mysql/my.cnf ]; then
    echo "MySQL configuration not found at /etc/mysql/my.cnf. Please create one."
    exit 1
  fi

  if [ ! -d /var/lib/mysql ] && [ ! -L /var/lib/mysql ]; then
    echo "MySQL data dir not found at /var/lib/mysql. Please create one."
    exit 1
  fi

  if [ ! -d /var/lib/mysql/mysql ] && [ ! -L /var/lib/mysql/mysql ]; then
    echo "MySQL system database not found. Please run mysql_install_db tool."
    exit 1
  fi
}

if you run it directly via sudo you should get one of those error messages , please follow its suggestions and try again untill it works.

This isn't a random breakage this is missing files , check the bash_history of the root user and any user who can sudo.


Any chance you have came across to this?

There is mirrors for that package as I suppose.

http://www.filewatcher.com/m/deb2pet.rpm2pet-0.0.4.pet.968-0.html


I've figured out my issue, hopefully it will help you, Andrew.  In looking at the Partitioning options for the USB key, I see that there was an MBR and a GPT option.  You have to ensure you are partitioning with MBR.  GPT appears not to create a partition recognized by UEFI or legacy BIOS.  I repartitioned, ensuring MBR was selected, reformated FAT32, and now have two USB keys that work, the Corsair Voyager 16GB and the SanDisk Cruizer Glide 32GB.


when the grub rescue appears, type

ls

you will get partitions list like

  (hd0,msdos1) and so on

now type

  ls (hd0,msdos1)/

this will display the contents of that partition.
you need to repeat the above step until you find Linux partition. It contains directories like boot, home, etc, var, lib, etc...
once you find that partition just remember the name. I will use partition msdos1 as linux partition here.
type

  set root=(hd0,msdos1)
  now type
  set prefix=(hd0,msdos1)/boot/grub

  insmod normal

  normal

you should get the menu now to boot. if you boot into system, run update-grub and grub-install like i explained below. if you can't boot after entering normal, then, try below steps.

boot into grub rescue
type the following and press enter after each line. replace partition msdos1 with your linux partition

ls (hd0,msdos1)/boot/

you should find a file with name starting with vmlinuz. it is the kernel.
now type the following line replacing the kernel version and partition with yours.

linux (hd0,msdos1)/boot/vmlinuz-4.4.0-21-generic

now type the following replacing my version with yours.

  initrd initrd.img-4.4.0-21-generic

now enter

  boot

you will boot into the os. now open a terminal by pressing ctrl+alt+t or simply pressing super or meta or windows key and searching for terminal.
after opening terminal, type

  sudo update-grub2

then install grub by typing

  sudo grub-install /dev/sda

If you fail at both methods, then, boot live ubuntu disc and select try ubuntu and then install ubuntu from there. it seems to work better.

references:
https://askubuntu.com/a/397520/534857


Ubuntu 12.04 wallpaper problem when using two monitors

I think the easiest way to solve the problem is to install nitrogen.

Nitrogen will set a background on each monitor.

You would then run nitrogen --restore as a custom command at login.


What does SIGUSR1 mean in "killall -SIGUSR1 tint2"

The kill command really send a signal to the process... it's a bit misnamed.

The command

killall -SIGxxx name

will send the "signal" xxx to the process with name "name". Process in Unix can receive and handle a set of signals to respond to external events. By default kill send the signal SIGTERM that has the (predefined) effect of gracefully kill the process. (the SIGKILL signal will kill the process "brutally", this is the reason that sometime you need to use the killall -SIGKILL ... command).

Some process have hardcoded meaning (for example: HUP is desconnection, etc. ) and are sometime sent by the kernel. USR1 and USR2 are user-definable signals.

You can even do that in scripts easily: if you put in a script the line

trap "echo TRAPPED" USR1

the script will print "TRAPPED" when you send the signal USR1 to it with the kill command.

So the answer to the last question is:

Evidently, the "tint2" program has code that, upon receiving the signal USR1, will reload its configuration file.

See for example http://unixhelp.ed.ac.uk/CGI/man-cgi?signal+7


What is this error when trying to install ATI video driver?

Unfortunately the video card ATI Mobility Radeon 9600 in your T42 is no longer supported by AMD.

Reference

This information is also available on the ATI wiki page:

  ATI/AMD dropped Catalyst support for these cards in Catalyst 9-4.
  These cards are supported with the legacy ATI 9-3 Catalyst release,
  but you MUST use a kernel 2.6.28 (or earlier) and Xserver 1.5 (or
  earlier). For example, you can use Catalyst 9-3 if you're running
  Ubuntu 8.04 or Debian Lenny/5.0. Open source support is good and 3D is
  still improving.

Reference

Your only option with 11.10 is to use the open source driver by default.


The only, single most important files to backup are your personal documents, pictures etc. These can never be replaced if lost.
All the rest is less important. The operating system is the least important of all. It can be downloaded for free, and each time you download it anew, it will have improved. Apps can be installed and removed at will. Configuration can be redone if needed.
One caveat may be archived mail that you downloaded and deleted from the server. How and where that is stored depends on the mail application. When using Thunderbird, that mail will be stored under the hidden .thunderbird folder. However, if you care preserving archived mail, you probably know how to handle that.


2048MD ATI Radeon HD 5400 Series login loop - can't find in Additional Drivers

Same issue as mine, I am currently using "nomodeset" in Grub as work-around.

Edit /etc/default/grub

Add "nomodeset" in the kernel options

GRUB_CMDLINE_LINUX="nomodeset"

Save in your editor (CTRL-X in nano)

Then update Grub

sudo update-grub

Then just reboot..

This is a work-around, HW acceleration will be disabled.
Unfortunately (in my case at least), this is a bug in Linux Kernel, KMS is supposed to work but is does not, and new proprietary drivers no longer support these old cards.


Dependency error while installing cinnamon

By adding the repositories required for cinnamon in this case type this in terminal,

sudo add-apt-repository ppa:merlwiz79/cinnamon-ppa

Then issue the should be fixed if you use 'sudo apt-get -f install (program name)' to get the missing packages. Which should work, But know to add ppa repo's use the above command. Of course replace the repository to the one you want.


#!/bin/bash
java -jar Hypatia_7.4_Masterclass.jar

This "set of instructions" you have is just bash script. If you're unfamiliar with shell scripting, here is a quick intro on WikiBooks, but you don't need to worry about that to run your file.

All you have to do to run a .jar file is open a terminal and type java -jar WhateverYourFileNameIs.jar.


I am no expert, but I had the same problem when I first installed ubuntu. You should restart and go into boot options at startup and disable "Secure Boot". Then restart and see if it helps.


Xubuntu 12.04 network manager menu is displayed partially

See bug report: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/983583


How to give access to programs to the Guest account?

In general, it's much easier to use the standard software repositories and the system's package managing system instead of installing applications manually. If you do a manual install, you're responsible for setting file and directory permissions correctly and much more.

So, the easiest solution would be to install the chromium packages (chromium-browser ) using the software center, and to remove the manual install.

EDIT:
Alternatively, you could use Google's PPA for Chrome (thanks Andrejs Cainikovs - worth an answer on its own!).


Quick boot but 25s from login to desktop

I found the cause on another forum, it was the nouveau display driver. I changed to the proprietary Nvidia one, that fixed it.


sudo fdisk -l to see the list of attached device and note down your target device
sudo dd if=/dev/zero of=/dev/sdX to wipe it to null (change X with a/b/c etc. as per the device name from the 1st command)
sudo fdisk /dev/sdXand then type m for help
n to create a new partition
Then p for Primary partion
Then w to write changes
sudo fdisk -l again to see the new partition name, it should now have 1/2/3 etc. after sdX
sudo mkfs.ntfs /dev/sdXx where X=a//b/c etc. and x=1/2/3 etc. (better use sudo mkfs.fat -F 32 /dev/sdXx for full support always and on every OS)

Done


Add the following option in grub file

i915.semaphores=1

Then

 sudo update-grub

Mine is

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

Try adding this to /etc/environment

 CLUTTER_PAINT=disable-clipped-redraws:disable-culling

[RESOLVED] Poor performance on Ironlake compared to old Intel GPU
Intel Ironlake OpenGL Performance On Mesa 9.1


Rsnapshot: using different intervals for different directories

I'd try to create different config files and then call rsnapshot separately for each directory, passing the respective config file with the -c option.


What does Section-unaligned hotplug range mean?

It shows because some hotpluged memory is not aligned to page so it will not be used. It's added in this patch to the kernel. The solution is probably VM dependent.


You can use the sshfs protocol. This allows you to mount any remote file system that you have permissions to over the SSH protocol easily.

sudo apt-get install sshfs
mkdir ~/Remote
sshfs user@remotehost:/path/to/remote/folder ~/Remote

It will ask you for your SSH credentials if you aren't set-up with public-key authentication. Then you can open it up in your local Nautilus or any other file manager, as well as work with the files in the terminal. Also note that the mkdir line is only needed the first time you mount. After the first time mounting, all you need to do is:

sshfs user@remotehost:/path/to/remote/folder ~/Remote

When you are done:

sudo umount /home/<USER>/Remote

While it is mounted, you will have the same permissions as whichever user you connected through SSH as. So, if you mount a folder where your SSH user only has read access, you will only have read access.


How can I install, using apt, python3 with zlib? Or cani I not use apt for this?

Step 1: Use apt's search feature

$ apt search python3 zlib

Sorting... Done
Full Text Search... Done
python3-netcdf4/disco 1.4.2-1build1 amd64
  Python 3 interface to the netCDF4 (network Common Data Form) library

Step 2: Use apt's show feature to determine if it's the package you really want.

$ apt show python3-netcdf4

Package: python3-netcdf4
Version: 1.4.2-1build1
Priority: optional
Section: universe/python
Source: netcdf4-python
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,599 kB
Depends: python3 (<< 3.8), python3 (>= 3.7~), python3-cftime, python3-numpy (>= 1:1.14.3), python3-numpy-abi9, python3:any, libc6 (>= 2.14), libhdf5-103, libnetcdf13 (>= 1:4.4.0)
Homepage: http://unidata.github.io/netcdf4-python/
Download-Size: 476 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu disco/universe amd64 Packages
Description: Python 3 interface to the netCDF4 (network Common Data Form) library
 NetCDF version 4 has many features not found in earlier versions of the
 library and is implemented on top of HDF5. This module can read and write
 files in both the new netCDF 4 and the old netCDF 3 format, and can create
 files that are readable by HDF5 clients. The API is modelled after
 Scientific.IO.NetCDF, and should be familiar to users of that module.
 .
 Most new features of netCDF 4 are implemented, such as multiple unlimited
 dimensions, groups and zlib data compression. All the new numeric data types
 (such as 64 bit and unsigned integer types) are implemented. Compound and
 variable length (vlen) data types are supported, but the enum and opaque data
 types are not. Mixtures of compound and vlen data types (compound types
 containing vlens, and vlens containing compound types) are not supported.
 .
 This package contains the netCDF 4 module for Python 3.

If none of the apt packages provide what you want, then start looking at pip packages.


Installing kde-full after upgrading to 15.04 Kubuntu

It appears kde-full is now depreciated and my guess is the packagers just use kubuntu-desktop or an alternate metapackage.

I suggest you ask on the mailing list if you do not get an answer here.

I did not see a discussion on the various wiki pages.


kubuntu 16.04: change desktop wallpaper via System Settings application

KDE wallpaper settings

KDE bugs/wishes: Bug 155056 - Look & Feel -> Desktop does not contain a KCM for the wallpaper - https://bugs.kde.org/show_bug.cgi?id=155056

Status at the moment is: WONTFIX

One of the duplicates - https://bugs.kde.org/show_bug.cgi?id=371799#c1 :

  Since you can configure the Wallpaper on each screen in each activity
  separately, it needs to be part of the configuration for that
  containment.

  Systemsettings has no idea what desktop containments you are using,
  and can only configure global settings.

You could change the wallpaper by:

Right click the desktop > Configure Desktop > Wallpaper.
Left click the desktop toolbox > Configure Desktop > Wallpaper.
Drag&drop an image to the desktop (unlocked widgets).
Use the 'Set as Wallpaper' service menu (unlocked widgets): https://store.kde.org/p/1169583/ .


How can i change my maximum resolution on ubuntu 11.10?

Try going to the "display" menu. (See image for more info)

From here you should be able to select your various connected monitors and change their resolutions. It should look like this:

If u like the terminal, then xrandr should do it. Look into various commands either in man pages or on the internet.

Cheers!


Ubuntu won't install on new computer with USB

Okay this has been fixed.

The issue is a video card. I put the nomodeset option on before boot.

Now it boots to a black screen with a mouse. SIGH...


Is a system user what you are looking for? You can create a new one with the following command

adduser --system --no-create-home USERNAME

This is the kind of account mysql uses. However, you cannot login into these accounts, even with sudo su - USERNAME. If you want to be able to login with su -, just create a new user without a password.

useradd USERNAME

He will not be able to login, only with sudo su - USERNAME.


OS X Mavericks 10.9 and Ubuntu 14 Dual Boot

I found this tutorial useful when I did it last.

http://www.alexvictorchan.com/2013/05/01/installing-ubuntu-13-04-on-13-macbook-pro-retina-102/


Software updater says "An unhandlable error occured"

You possibly have a hard disk problem. It's errored, and it's placed itself in read only mode. I'd do the following to check the file system, fix possible dpkg errors, and check for errors in syslog:

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose root access
type fsck -f / # to check the file system
run fsck more than once if there were errors
type sudo mount -o rw,remount / # to remount root as read/write
type sudo dpkg --configure -a # to fix broken dpkg
type sudo apt-get install -f # to finish upgrades
optional commands to check syslog for sda errors

cd /var/log
grep sda syslog*

type reboot
once back in Ubuntu, run the Software Updater


Taking HDMI input on a laptop running Ubuntu 16.10

I'm sorry to tell you that HDMI ports on any laptop is output only.
No driver nor script may be able to capture video from here.

If the devices supports it, it can maybe output some data via the usb.

You may also try a device like avermedia ones to do such thing, but it is an expensive solution.


Allowing a group Read-Write Access to a directory

FolderA will first need to be part of groupA - the folder's owner or root can perform this operation
chgrp groupA ./folderA

Then groupA will need rwx permissions of the folder
chmod g+rwx  ./folderA

There are options in the chgrp and chmod commands to recurse into the directory if required.


Ubuntu 15.04: How can I make Capslock + æ,ø,å type these letters, with an English keyboard?

I fixed it guys!

Short answer: Switched to English(Macintosh)

As user Kos suggested I switched the keyboard layout to English( International with dead keys). This worked, but unfortunately it doesn't have å. However, I messed around with different English keyboards and found that English(Macintosh) gives me æ ø å using AltGr + ', a and o respectively. This is going to take some getting used to, but at least I won't need to switch between to keyboards all the time. Thanks a lot for your help!


How can I extract a page range from a PDF file AND retain the PDF tagging in the new file

To preserve original tags in the extracted pages range, please use an application that supports tag extraction. One open source and excellent application is PDFSAM.

Install it by running the following command in the terminal:

sudo apt install pdfsam

Open your file with PDFSAM and choose Extract. Then, specify pages range separated by commas, chose your output directory, and click Run like in the image bellow:

Done: Your extracted pages range with tags preserved will be located in the chosen output directory.


GNOME Terminal lost CSD after installing XFCE

I GOT IT!! Found an option in dconf-editor. Navigating to /org/gnome/terminal/legacy/headerbar and changed the value to "true"


apache2 is making my amazon ec2 unavailable, any ideas?

Tim, its probably time to add some instrumentation to your machine. I suggest at the very minimum something like sysstat to record snapshots of the system activity every 5 minutes. When you restart the machine, you can at least look at what was happening in the 5 minutes before the problem with the 'sar' command line utility.

Also have you tried looking at the instance's console? ec2-get-console-output i-xxxxxxxx may show some kernel problems if thats what is happening.

Also since you're on ec2 you should have cloudwatch available, does it show spikes in any stats when there are failures?


Ctrl-Super-Right doesn't work in 14.04.1

I have partial workaround. Go to CompizConfig Settings Manager (you might need to install it first), disable and reenable Commands extension. This fixes some hotkeys not working like this.

For me it it fixed it only partially though. I can restore window only when it's not maximized. If it is I first hit Ctrl+Super+Left then Ctrl+Super+Down.


Install kdevelop

sudo apt-get install kdevelop

or, depending on your version of Ubuntu

sudo apt install kdevelop

https://packages.ubuntu.com/search?keywords=kdevelop

If needed the kdevelop documentation is here:

https://docs.kde.org/trunk5/en/extragear-kdevelop/kdevelop/index.html

https://www.kdevelop.org/features


Problem with using wildcards when I do CP command in Terminal

cp does not support any wildcards by itself. Expansion of wildcards and patterns is done by the shell, which is bash by default.

In any case, character classes are to be specified within [] - that excludes the [] already surrounding them. Like so:

cp Downloads/[[:alnum:]] test/

However, [[:alnum:]] will only match a single alphanumeric character. To match all filenames containing only alphanumeric characters can't be done with just the wildcards already listed. For more powerful filtering, look into the find command:

find . -regextype posix-extended -maxdepth 1 -regex '.*/[[:alnum:]]*'

Within bash, you can use extended globs:

shopt -s extglob
cp Downloads/*([[:alnum:]]) test/


Bash Script for Running Command in Root in ADB Shell

#!/bin/bash
adb shell "su
dd if=/dev/block/mmcblk0 | /dev/examiner/nc -l -p 8888"

The problem is that this way the pipe is executed in the unprivileged adb shell, and not in the root shell spawned by su; this leads to the pipe being executed without root privileges and to the 0-lenght file (probably due to the if command failing to read a block device without root privileges).

Run the command directly into the root shell spawned by su by using su's -c option, which allows to run a command directly into the spawned shell:

#!/bin/bash
adb shell "su -c 'dd if=/dev/block/mmcblk0 | /dev/examiner/nc -l -p 8888'"


Error : remove the disk and press any key to restart

A way to work around the problem is to use a different program to create the bootable USB stick. It's recommended to use http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/


how to merge boot partition with other partition separated by a grub2 partition

Boot from a live USB disk. Using gparted you should then be able to simply move the grub partition. Just make sure the disk isn't mounted. And of course: Make sure you have a backup before doing that.


dpkg: error processing package dynare-matlab

I found out the solution here. It seems to be a bug of the package for Ubuntu. Basically, the dependencies are not correct, as the library libmatio is missing. The problem is solved by first installing that library via sudo apt-get install libmatio-dev, and then installing dynare-matlab.

Then, dynare works.

PD: I am using package 4.4.1 instead of 4.4.3. Yet, according to known bugs, this error is not yet acknowledged. I submitted the bug here.


Err:4 https://dl.bintray.com/etcher/debian stable Release 403 Forbidden

A package is the software bundle.

A source is one location on the internet that you packages from. Your system has several sources. You can see your lists of sources in /etc/apt. Sources often look like URLs (you can paste them into a web browser). You will usually see a bunch of packages or a directory tree if you do that.

Your error is with a SOURCE, so uninstalling a package won't affect anything. Instead, look at that source in a web browser, and try to find the package you are looking for.

Iv this case, if you follow the source links down the rabbit-hole (https://dl.bintray.com/etcher/debian/dists/stable/etcher/binary-amd64/), you will eventually see that links in that directory are indeed 403 Forbidden.

This means that the etcher admins have mis-configured their repository. Please contact them and let them know.


How to see the directory of a file or folder in the file browser

Press Ctrl+L to toggle the Location bar. There, you see and copy-paste the path.

--> Ctrl+L


The area your talking about has about 50 names these days but I think you mean the notification area, the spot where all the indicators are?

If so, then no. See http://ubuntuforums.org/showthread.php?t=1749696&page=2 for other people with the same request.


I found out that even when not connected to the vpn, may /etc/resolf.conf contained the server address of my work (the X.X.X.X in the question). Actually it contained it twice, and when the client is connected, then there are 3 of those. I guess vpnclient happened to left those lines when some bug occurred.

So I deleted those line, to keep only:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.

And it seems to work well again.

I'll correct this answer if I encounter the problem again.


What are the places where does Ubunty saves recent user activity and tools to clean them?

Privacy Indicator lets you clear the recent files list and the Zeitgeist activity journal and optionally disable Zeitgeist (but not the recent file list).

Please file a bug report if you want additional functions to be added.


Ubuntu boot ISO image with PXE, using just tftp, dhcp and apache but NOT NFS

The answer to the question as asked is unfortunately no.
You can search down information on editing the LiveCD image to make it load in such a fashion but it is a large undertaking.

Dated but representative approach: https://wiki.ubuntu.com/LiveCDNetboot

The closest you can get to such an experience without editing the image is an install boot which you can do directly from Canonical's internet resources such as the following (note: I use ipxe, and this is the listing of a linux.php type file compatible with same).

#!ipxe

echo Starting Ubuntu x64 installer

# Figure out if client is 64-bit capable
cpuid --ext 29 && set archl amd64 || set archl i386

:setBase
set base-url http://ftp.ubuntu.com/ubuntu/dists/xenial/main/installer-${archl}/current/images/netboot/ubuntu-installer/${archl}

kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
imgargs linux

boot

Note: I vaguely remember reading that you can loop mount an iso LiveCD image for the dhcp / tftp handoff to accomplish this, however, if I recall this limited you to a single pxe boot image which is why I didn't explore it further. Perhaps that's a 2nd lead to search down.

Add'l reference using Clonezilla:
https://serverfault.com/questions/277470/clonezilla-pxe-boot-without-nfs


XAMPP: Starting MySQL...already running?

I think I had the same issue and I solved it this way.

There is a Your_username.pid file and Your_username.err file in /opt/lampp/var/mysql/. Delete them and restart Xampp.

It happens when you turn off your computer unsuccessfully or with an issue.


Questions related to ubuntu and data storage

Your current system partitions looks good enough. However I cannot comment on the space you have allotted for /home. As a quick suggestion, instead of having 450GB in single partition, have that segregated into multiple partitions. So you can have different volumes for your work. With this, your operations become local to that particular volume and the other is not affected.

For backing up, you can use simple dd and create images. Or you can also use rsync!

http://manpages.ubuntu.com/manpages/precise/man1/dd.1posix.html

In order to achieve encrypted filesystem, you should have a look on this!

HowTo


Manually remove the kernels with dpkg

sudo dpkg -P kernel_name


Unable to install nvidia drivers on ubuntu 14.04 on my lenovo z570

You have a optimus GPU please uninstall the Nvidia driver and install Bumblebee and follow the instructions

sudo apt-get remove --purge nvidia-current

To install bumblebee in Ubuntu 14.04, run these commands in terminal

sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-331

Now you have to install Bumblebee GUI to manage apps to be opened using nVidia. Here is the instructions:

Install Python App Indicator:

sudo apt-get install python-appindicator

Install Git:

sudo apt-get install git

Make a directory for git:

mkdir git && cd git

Check out the repository:

git clone https://github.com/Bumblebee-Project/bumblebee-ui.git
cd bumblebee-ui
sudo ./INSTALL

Go to Startup Applications and add bumblebee-indicator

Now reboot.

I did not write this the source is here