How to make a random m3u playlist from all files in subfolders?

First, set up the list (you only need to do this when you add/delete files) :

find Music -type f -print >files.list
wc -l files.list >files.list.nlines

Then, to pick a random one,

line_number=$(echo "$(cat files.list.nlines) * $RANDOM / 32767" | bc -q)
file_to_play="$(sed -n ${line_number}p files.list)"


Accessing a Novell share on Trusty Tahr?

Since the ncp-related packages are still part of the older releases, they're available after adding Saucy (universe!) as additional package source. Now, one can install them as usual (Version 2.2.6-9ubuntu1 seems to work fine with 14.04).

You can do this by opening Software & Updates in Ubuntu and enabling the universe repository, or you can edit /etc/apt/sources.list and add the following lines to the end of the file:

# ncpfs
deb http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy universe


What can I do to fix this error on grub-efi?

Try

sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub

to fix.


Change the name of my main account - how can I do that?

The simplest way for your case I think would be to just create a new user from the settings and start using the new one (optionally delete the old user later)

If you have a lot of data saved already and you must change the name you can follow these steps here


Why cant I install 3rd party programs from Ubuntu Software center?

Some 3rd party programs may need some other packages to be installed. The Software Center is not really good to install this type of software.

It is much better to install using the dpkg -i terminal command. If there are dependency errors, follow it by the

sudo apt install -f

command. It will install required dependencies.

You will also see any other problems if any.

Another option is to use gdebi graphical application.


Cannot resolve symbol 'androidx.constraintlayout.widget.ConstraintLayout'


Ubuntu 20.04 suddenly freezes in dock menu and does not respond

Your vm.swappiness=10 is a totally incorrect value for your system.
Set vm.swappiness=60 (based on 8G RAM and 4G SWAP), this way...
sudo -H gedit /etc/sysctl.conf # edit this file
Search for an existing vm.swappiness= entry...
CTRL+f vm.swappiness

If found, edit it to say vm.swappiness=60

If not found, add vm.swappiness=60 at the end of the file

Save your edits and quit gedit
sudo sysctl -p


Can't find Python2.7 when trying to install Django in Ubuntu 14.04

That tutorial doesn't make sense or is really old.

First you should be aware that this tutorial is intended to install the development Django version, not a stable one. While this can make sense to develop Django programs or to learn it, it's probably a very, very bad idea to do for production.

Second, it's not going to work, Django now uses git to manage its source code, not subversion. If you really want to install the development version, use the official guide. You should read it, but if you have git and pip installed (you should) just issue this two commands.

git clone git://github.com/django/django.git django-trunk sudo pip
install -e django-trunk/


Where can I find the fingerprint of 'bazaar.launchpad.net'?

Bug #238869 in Launchpad itself indicates that there is currently no secure method for verifying Launchpad's SSH host key fingerprint.


IBM i Access Client Solutions not working with Ubuntu 19.10 and 20.04

I contacted IBM support and got a good response with a solution, and that is to use the AdoptOpenJDK 11. I tried this and it does indeed work with ACS working as expected.
I then asked why this was so and was told that the default Ubuntu's Java has always been headless. I said that I specifically did not install the headless version but the straight JDK, as I had done with earlier versions of Ubuntu (see above) which worked. Also, I have my own little Spring GUI Java Application and that starts up and runs fine with the Ubuntu JDK 8.
So I still don't understand the difference and why the AdoptOpenJDK works and the standard OpenJDK (now) does not with ACS, but at least ACS is working.


How to make ubuntu service run as specific user

Upstart v1.4+ states ...

setuid $user

  Changes to the user  before running the job's process.

  Change $user to an actual username
  Note that all processes (pre-start, post-stop, et cetera) will be run as the user specified.
  Note that if you specify an invalid username in the setuid stanza, Upstart will log an error if it is in Debug Mode.


KDE: Chrome Ctrl+I keys binding does not open up DevTools

The correct combination is Shift+Ctrl+I and it is used by Kopete. You can remove the key combination by assigning Shift+Ctrl+I to any other action and then changing it back (See Custom Shortcuts, for example).

Or just use F12.


Sure, I've never had a problem using them both at the same time.
First, make sure the universe repository is enabled:
sudo add-apt-repository universe

Then, to install indicator-cpufreq, run the following commands:
sudo apt-get update
sudo apt-get install indicator-cpufreq

Now, edit grub. Execute the following command to open a text editor so you can edit the file:
sudo nano /etc/default/grub

Using your arrow keys, scroll down to line 11 where it should say this or something similar:

GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"

Change the line to say this instead:

GRUB_CMDLINE_LINUX_DEFAULT="splash quiet intel_pstate=disable"

Next, press Ctrl + o and then press Enter to accept the changes. Press Ctrl + x to exit the file and then run the following command to update Grub:
sudo update-grub

Reboot the system and if indicator-cpufreq does not show up in the panel automatically, press Alt + F2, type indicator-cpufreq and then press Enter. You should now be able to scale the CPU by clicking on the indicator-cpufreq icon. "Performance" is high and "Ondemand" only clocks up when it needs to.

Also, you need edit the TLP configuration file before you use it. Execute the following command to edit the file:
sudo nano /etc/default/tlp

if you'd rather use gedit instead of nano, you can use either one of these commands instead: gksu gedit /etc/default/tlp or sudo gedit /etc/default/tlp.
Scroll down to where you see these two lines:

#CPU_SCALING_GOVERNOR_ON_AC=ondemand

#CPU_SCALING_GOVERNOR_ON_BAT=ondemand

Edit those lines by removing the comment (pound symbol) from the beginning or each line and change "ondemand" to "performance" like you see here:

CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=performance

Another line you probably want to change is this one:

DISK_APM_LEVEL_ON_BAT="128 128"

That setting can sometimes cause excessive wear on your hard drive by causing it to spin down way too often. The best thing to do is to set it to the same setting used by AC power. So, change 128 128 to  254 254 like in this example:

DISK_APM_LEVEL_ON_BAT="254 254"

And, you probably don't want wifi power management either. Scroll down to:

WIFI_PWR_ON_BAT=0

and change that to:

WIFI_PWR_ON_BAT=1

You may want to change a couple of others depending on user preference.
Save the file before you exit and restart TLP for the changes to take effect.
By setting TLP to "performance" you basically turn the scaling function off. This allows indicator-cpufreq to handle frequency scaling without conflict.
If you ever want to scale the frequency down, click on the indicator-cpufreq icon on the top panel and choose "ondemand", "powersave", or whatever to allow the CPU to wind down for better efficiency.
Finally, don't forget you need to remove "laptop-mode-tools" if you have not done so already or you may encounter issues. To do this, you can run the following command from an open terminal:
sudo apt-get remove laptop-mode-tools


Not getting internet on my 12.10 Even if Wifi connection is established

Have u checked for additional drivers for your Wireless device. Try so it should work out.
So also can u avail of simple file sharing. Try to do so with another wireless based system.

Post the output of lspci -vnn

User


GL version 2.1 with the gpu_shared4 extensions is not supported on Ubuntu 18.04.5 LTS as guest VM

The real solution it to disable 3D acceleration in the VirtualBox machine settings.


SSH failing on different tries getting a public key error

You have to specify the key

ssh-copy-id -i .ssh/id_rsa.pub root@67.205.154.128

See http://bodhizazen.com/Tutorials/SSH_keys/#ssh-copy-id for details / additional information.

You can not use ssh-copy-id to transfer your key unless you can log in via another method (ie password).

If you can not read the key, then in addition you have a permissions problem. The key should be owned by your user (not root) and permissions of 400 or 440.


Create directories with names similar to files

You are trying to create folders with the EXACT same names as the files (including extension—for example .mp4) which is not allowed. You can use this script to make a directory with the same name as each file but without the extension:

#!/bin/bash
for file in *
do
mkdir "${file%.*}"
done

for example if you have files

nice.mp4  fun.mp4

after running the script you would have directories without extension & original files

nice  nice.mp4  fun  fun.mp4


MacBook keyboard layout – swapped keys § and `

Thats a British keyboard with the £ above the 3, but annoyingly, unlike a British PC keyboard, Apple put the @ above the 2 where the " should be!


ssh_exchange_identification: Connection closed by remote host

In my case assigning elastic IP solved the problem. I have no idea why it is so for Ubuntu, because ssh worked without elastic IP for Amazon Linux.

UPDATE: The reason was simple and stupid. As you know some random IPs in Russia are not available. So, elastic IP had nothing to do with that. Starting VPN allowed to access all my instances.


Is it possible to customize shortcuts in Unity dash?

Setup your default applications using gnome-default-applications-properties


Dedicated Server - Dual Hard Drives Problem

Your machine has been configured with a software RAID1, which means both disks are mirrors of each other. If one fails, you'll still have your data intact.

Most likely both disks have the same partitioning layout on them:

boot partition /dev/sdX1
root partition /dev/sdX2
home partition /dev/sdX3

Where X is either a (first) or b (second) SATA disk.

Then the raid1 arrays were created:

/dev/md1 out of /dev/sda1 and /dev/sdb1
/dev/md2 out of /dev/sda2 and /dev/sdb2
/dev/md3 out of /dev/sda3 and /dev/sdb3

And finally you see that

/dev/md1 is mounted at /boot
/dev/md2 is mounted at /
/dev/md3 is mounted at /home

You can check the status of your RAID1 mirrors:

cat /proc/mdstat

You can see that you have about 3TB of available space in total, which further confirms that they've used RAID1 which gives you redundancy at the cost of only being able to use half the physical disks' capacity.

Also, to further verify that you do have 2 hard drives in your machine, run:

sudo fdisk -l | grep 'Disk /dev'


How to configure proxy for online account authentication

The solution to this problem is to use dconf-editor, as reported here: How can gnome based applications such as rhythmbox use a proxy

Thanks to Jobin for his link to the above solution, see his post here


What could be causing throughput issues?

So this answer help me.

https://askubuntu.com/a/638554/491662

  Turn off bluetooth (use rfkill or turn off in Bios)
  Turn OFF 802.11n mode (in /etc/modprobe.d/iwlwifi.conf add options iwlwifi 11n_disable=1)
  Turn ON link aggregation (in /etc/modprobe.d/iwlwifi.conf add options iwlwifi 11n_disable=8)
  Turn OFF watchdog (in /etc/modprobe.d/iwlwifi.conf add options iwlwifi wd_disable=1)
  Turn off power saving features ($ sudo iw wlan0 set power_save off)
  Set regulatory domain ($ sudo iw reg set )

All my research has me to believe that bluetooth is a major culprit. For instance I realize this problems didn't start until I started using a pair of bluetooth headphones with my laptop. Also If I follow those instructions but skipped turning of bluetooth, the performance will increase until a bluetooth device is connected.

I still don't know why bluetooth would only interfere with the download speed and not the upload speed.

As suggested , bluetooth isn't the main culprit

I have made another change which as dramatically improved performance. The router supplied by Fios has two internal wireless access points. One operates at 2.4 GHz and is (b,g,n capable) while the other operates at 5 GHz (n,ac capable). They were set to the same SSID. Once I changed the ID my connection to the routers says at around 130-200 Mbps.

There still might be another problem, on other ac capable routers I get around 500 Mbps. But my actual bandwidth from FIOS is no where near that, and I'm not doing any local networking stuff some I'm fine with this improvement.


Hiding certain mount points from Caja file manager (MATE desktop)

That is a known bug, caused by libmount, and you can read more about it in GNOME Glib issue #1271.
Caja uses GIO which uses libmount directly and has no feature to be able to hide drives / volumes (x-gvfs-hide does not work).
You can patch Caja yourself, but you will have to rebuild the package which is just a matter of something like: saving the below patches as .patch files, apt source caja, apt build-dep caja, go inside the Caja source directory, patch -p1 < PATCHFILE.patch, dpkg-buildpackage -rfakeroot -uc -b, install the new .deb package.
This one will hide volumes not associated with a drive (save this as: hide_no_drive.patch):
diff -Naur a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
--- a/src/caja-places-sidebar.c 2020-02-10 11:52:32.000000000 +0100
+++ b/src/caja-places-sidebar.c 2020-06-12 15:30:50.979210881 +0200
@@ -715,6 +715,7 @@
     g_list_free (drives);

     /* add all volumes that is not associated with a drive */
+    /*
     volumes = g_volume_monitor_get_volumes (volume_monitor);
     for (l = volumes; l != NULL; l = l->next)
     {
@@ -750,7 +751,7 @@
         }
         else
         {
-            /* see comment above in why we add an icon for an unmounted mountable volume */
+            // see comment above in why we add an icon for an unmounted mountable volume
             icon = g_volume_get_icon (volume);
             name = g_volume_get_name (volume);
             last_iter = add_place (sidebar, PLACES_MOUNTED_VOLUME,
@@ -763,6 +764,7 @@
         g_object_unref (volume);
     }
     g_list_free (volumes);
+    */

     /* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
     network_mounts = NULL;

This one will hide mounts that have no volume (save this as: hide_no_volume.patch):
diff -Naur a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
--- a/src/caja-places-sidebar.c 2020-02-10 11:52:32.000000000 +0100
+++ b/src/caja-places-sidebar.c 2020-06-12 15:38:56.846812120 +0200
@@ -766,6 +766,7 @@

     /* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
     network_mounts = NULL;
+    /*
     mounts = g_volume_monitor_get_mounts (volume_monitor);

     for (l = mounts; l != NULL; l = l->next)
@@ -809,7 +810,7 @@
         g_free (tooltip);
     }
     g_list_free (mounts);
-
+    */

     /* add bookmarks */
     bookmark_count = caja_bookmark_list_length (sidebar->bookmarks);

Another thing you can try is rebuilding glib (which contains GIO) and modify the Meson build to use -Dlibmount=false or -Dlibmount=disabled. This will disable the use of libmount system-wide for everything that uses GIO also inside GTK file dialogs.


Newer Android devices (as of 3.0 Honeycomb) no longer support USB Mass Storage for the internal storage, because that allows Android to not have to support the FAT32 file system.  In order to connect to a 3.0 or later device over USB you'll need to use something that speaks MTP; there are a few applications for Linux which do so such as aafm or gmtp.  I have had the most success using mtpfs, although it's not really that user-friendly to work with.

You can also try one of the many ftp/scp/bluetooth file transfer tools for Android and see if that does what you need.  Astro has a few file transfer plugins available, and there's also several FTP clients and servers as well.  I find that to usually be less of a hassle than MTP, although it also tends to be slower since it has to go over the network (or Bluetooth) instead of USB.


20.04, HP Pavilion gaming 15 laptop, touchpad not working

I had the same error, and researching a long time, in a very old forum I found this
You have to edit the following file:
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp=1 quiet splash"

And then place in the terminal. Regards
sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps

This worked for me, I hope it helps you.


Answered on comments

Since it's marked as Hard-Blocked, you may have pressed a button that toggles the specific device on/off. My Laptop has a Flight-Mode button that disables bluetooth and networking. Do you have a Flight-Mode button?


Creating a new linux partition to the left of linux partition

You should move your Linux partition with the help of LiveUSB boot up or one of Windows partitioning tools. While you are actively using Linux, I don't think you can move the partition safely.

That is if you want to add the unallocated space to Linux partition of course.


It sounds like you're running apache as root, which is generally a bad idea. ESPECIALLY when you're allowing files to be uploaded.


Here is an Intel i7 2600 to compare with:

cyrex@cyrex:~$ cat /proc/cpuinfo | grep -e ^core -e ^phys
physical id : 0
core id     : 0
physical id : 0
core id     : 1
physical id : 0
core id     : 2
physical id : 0
core id     : 3
physical id : 0
core id     : 0
physical id : 0
core id     : 1
physical id : 0
core id     : 2
physical id : 0
core id     : 3

Since I have an Intel motherboard that only has one socket, this means I only have one physical id. Think of it as for each socket in the motherboard there is one physical id.

Next we have the core ids that reference that physical id. If you look at it, It repeats itself. This is because of the Hyper Threading. There are actually 4 cores and 4 HT ones. So in the end it shows for that one physical id, 4 core ids and 4 HT.

If you have more sockets in your motherboard, the amount of physical IDs will go up along with the amount of cores. In your case it is suppose to show 8 cores (In my case it is 4 cores) so it will show a long list but since it is repeating itself after the 4th core, it looks like is either not reading the other cores (BIOS issue, Kernel issue) or the cpuinfo is not detecting it correctly.

It would also help to find out why if you could execute the following:

sudo dmidecode -t processor | grep -e Core -e Thread and add the information to your question. In my case dmidecode says:

cyrex@cyrex:~$ sudo dmidecode -t processor | grep -e Core -e Thread
    Family: Core i7
    Version: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
    Core Count: 4
    Core Enabled: 4
    Thread Count: 8

Also in a benchmark in OpenBenchmark I found your model and there is one line that shows the following when doing cat on /proc/cpuinfo:

cpu cores   : 8

Since in your case it is showing all 8 cores, it means the CPU is detected correctly although the amount of siblings are not all shown. This might be do to how cpuinfo shows this for AMD or that specific family model. If commands like lscpu, dmidecode can show you the amount of CPUs, Cores and threads/siblings for each, then the issue is with how cpuinfo handles the information.


Installing 32-bit libbz2.so.1 in 64-bit Ubuntu

The package for libbz2.so.1 is libbz2-1.0. You can check this with the command:

apt-file search libbz2.so.1

Sample output:

% apt-file search libbz2.so.1
libbz2-1.0: /lib/x86_64-linux-gnu/libbz2.so.1
libbz2-1.0: /lib/x86_64-linux-gnu/libbz2.so.1.0
libbz2-1.0: /lib/x86_64-linux-gnu/libbz2.so.1.0.4

Therefore install the package for 32-bit with the command:

sudo apt-get install libbz2-1.0:i386

The library ia32-libs is no longer in the repositories. Check here.


KeePass Ubuntu Touch/ Encrypted Password Storage

I don't know of any ongoing development of KeePass (but I don't see why anyone couldn't do it), however I found a couple entries for lastpass in the store you might want to check and see if they suit your needs.


About your question:

If the the Bitbucket Server base URL is https://bitbucket.librariesdsw.net and the SSH port is 8080, the SSH URL for the repository myRepo in the project myProject will be:

git clone git@bitbucket.librariesdsw.net:8080/myProject/myRepo.git

If using HTTP, then the command will be:

git clone http://Bharath@bitbucket.librariesdsw.net:8080/scm/dsw/dsw.git

With that address you can clone the repository, this works in putty, I tried it right now, so it should work for you.

Also, you can find more details in the documentation, here is the guide on How to Clone a Repository on BitBucket

Also you can get the SSH URL or the HTTPS URL by browsing into the project and choosing SSH/HTTPS in the Overview of the Project, please see the image for a better reference:

If you still have problems getting the SSH URL, you can also clone the project using HTTPS.

Hope this helps, good luck!


Root access issues - how do others manage this?

As mentioned by @mount.cifs the ubuntu file permission page, includes tips on settting sticky & SGID bits etc.

I would suggest routinly change group ownerships and access rights to your folder.

sudo chgrp -R foobar /home/foo/bar

sudo chmod -R g+w /home/foo/bar

Other than that investigating if setting the umask for your session to group writable will solve you problem?

http://bashscript.blogspot.com/2010/03/unixlinux-advanced-file-permissions.html

http://bashscript.blogspot.com/2010/03/creating-user-group-and-shared.html

Ps. I would strongly suggest not setting this directly on your home directory but a sub directory

But the files are owned by root for a reason. Are you trying to fix the wrong problem? Maybe your workflow does not really need rail sudo commands? Then again I presume gems have to be installed system wide, so perhaps...

Anyway what about running a nautilus window as root:

sudo nautilus /home/foo

Or use the files sidebar in GEdit for file navigation?


Boot into Ubuntu and run this command:

sudo update-grub

That will detect the available operating systems and generate the /boot/grub/grub.cfg file.

Have you really installed Ubuntu on a FAT32 drive? I'm very surpized that works and you can expect to have all sorts of issues with permissions down the line. If this is a new install I recommend you reinstall and chose a Linux filesystem like ext4.


Are there any 802.11ac adapters working in Ubuntu?

I saw your post two weeks ago. I did some research and found one online.

I can confirm that edimax EW-7822UAC provide Linux driver. I successfully compiled its driver and connected it in Fedora 19. The download speed can reach average 15MB/s and peak 20MB/s by using perf.

This is the output of iwconfig and lsusb:

$ iwconfig
enp6s0u2  IEEE 802.11AC  ESSID:"Orz-5Ghz"  Nickname:"<WIFI@REALTEK>"
      Mode:Managed  Frequency:5.2 GHz  Access Point: 74:D0:2B:41:EC:FC
      Bit Rate:867 Mb/s   Sensitivity:0/0
      Retry:off   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality=100/100  Signal level=94/100  Noise level=0/100
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

$ lsusb
Bus 003 Device 002: ID 7392:a822 Edimax Technology Co., Ltd


How do I resolve apt GPG error NO_PUBKEY?

I had overlooked this entry in sources.list:

deb http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/ /

Removing that line is the answer I was looking for.

However, upon finding that entry, I was able to find the reason it was there and a better fix:

How To Install GRUB2 Editor 0.6.4 On Ubuntu 13.04, 12.04, Linux Mint 15, 13, Elementary OS 0.2, Pear OS 8, Debian 7, 6 | LinuxG.net
http://linuxg.net/how-to-install-grub2-editor-0-6-4-on-ubuntu-13-04-12-04-linux-mint-15-13-elementary-os-0-2-pear-os-8-debian-7-6/

$ sudo sed -i '$ a\deb http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/ /' /etc/apt/sources.list
$ wget -q http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/Release.key -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install kcm-grub2


Changing the Partition Names of a Ubuntu Live USB Made with Mkusb

The persistent partition is casper-rw

According to Ubuntu help, "the only special consideration (for the persistent partition) is that we must give the formatted partition the label casper-rw”. So, you should not rename this partition to something else. If you do, the persistent part of the Live USB installation won't be able to find it, and it will not be able to persistently save any changes you make to the system.

The shared data partition usbdata

There are no requirements for the name of this partition. You can rename it using Gparted while booted from either an internal drive installation of Ubuntu or a different Live USB installation of Ubuntu. This "other" Live USB need not be persistent. It is better to boot from a different installation of Ubuntu so that the usbdata partition is not mounted or in use while you try to change its name.

Hope this helps


Yes, you can do this if this mode is supported. You can also check Enabling Nvidia driver messes up splash screen for nice Ubuntu logo during startup.


boot from usb thumb drive: the installed (octave) pkg not there and forever after, on subsequent boot!

Is it a Live USB disk or did you install Ubuntu to the USB disk? If it's a live disk, be sure to reserve extra space or the drive will "reset" on each boot.


This is totally unrelated to Ubuntu, but here you are:

#!/usr/bin/env python

import subprocess

mounts = {}

for line in subprocess.check_output(['mount', '-l']).split('\n'):
    parts = line.split(' ')
    if len(parts) > 2:
        mounts[parts[2]] = parts[0]

print mounts


Windows 8 doesn't start after installing ubuntu 13.10

I'm not allowed to comment due to my reputation, so as an answer:
Did you happen to change anything to your hardwareconfiguration?
Added a harddisk/drive? Or maybe altered the order? Or maybe altered any order in your BIOS?

Those edits could change the order Grub (the bootloader, which handles your choice to boot to Win/Ubuntu) reads the drives and tells windows how to access them.

For instance: (HD0,0) could be labeled /dev/sda1 during instalation, while since altering something, (HD1,0) points to /dev/sda1 and (HD0,0) points to label /dev/sdb1)


How install XFCE and remove gnome on Ubuntu 20.0.4 LTS

Install xfce4 desktop
sudo apt install xfce4

Log out.

In the login screen, click your name, a gear icon will appear in the right bottom corner, click it and you can choose the desktop to use.


Actually shutdown and its equivalents are graceful. They first send a SIGTERM (15) to the processes and only if they don't respond whithin a certain amount of time they send a SIGKILL (9) afterwards.

SIGTERM is the signal that is sent when you hit CTRL+C. The applications can intercept that signal and shutdown themselves gracefully (e.g. flush files, commit/rollback transactions, etc.). All reasonable applications behave this way.

When the processes don't stop after a while, then a SIGKILL is sent to them afterwards. SIGKILL is kinda sledgehammer. The applications cannot intercept that signal — it's rather like cutting off the power.

So, yes, shutdown or reboot is usually safe and graceful.

Reference:

http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/shutdown.html


You'll want to take a look at the JDBC

Setup MySQL

First things first you'll need to setup your MySQL. Install the mysql server and client:

sudo apt-get install mysql-server mysql-client

(This will install both in the most up to date version within your repositories.)

You will be prompted for a root password. Set this to something secure; the root account can access and change all databases.

You then need to login and setup the server:

mysql -u root -p

You will be prompted for your password and then connected to the server. You need to setup a database (a database contains tables):

CREATE DATABASE [name];

Some syntax to note in MySQL is that it is case insensitive (you can just write out quickly in lower case as I do, though for clarity in code it's wise to write in capitals with statements) and also you must end every statement with a semi colon.

Switch to this database:

USE [name];

Now you want to add a user and set permissions to allow the user to edit everything on this database (docs):

CREATE USER "[username]"@"[host]" IDENTIFIED BY "[password]";
GRANT ALL PRIVILEGES ON * TO "[username]"@"[host]";

The username is obviously the desired username for the user which will access this database from your java program. The host in both cases is the host which you access from, use % to be unspecified. The password will be converted to a hash and stored to identify the user. As far as I know there isn't much risk in an insecure password here since this user can only access and modify tables on this localhost.

Now that this user is created exit with exit or quit commands, and login as this user.

quit
mysql -u [username] -p
<enter password>
USE [databasename];

Now you'll want to setup your table, for this you'll want to have a good read on SQL, w3schools do a great tutorial

Code with JDBC

Now for the fun part - the Java code.

Setting up the project is fairly simple, open up a new project as you'd normally do. Add the mysql connector jar to the project files and add it to the build jars (in eclipse put the jar in your folder within the workspace, right click on the project, properties, then select "Java Build path", add jars or add externel jars and navigate to the MySQL connector jar.

I wont describe using the JDBC in depth since the tutorial on the MySQL development site is fairly comprehensive.

These are the basics though:

private Connection openConnection(String url, String user, String password) {
    Properties properties = new Properties();
    properties.put("user", user);
    properties.put("password", password);
    properties.put("characterEncoding", "UTF-8");
    properties.put("useUnicode", "true");

    Connection c;
    try {
        //Class.forName("com.mysql.jdbc.Driver").newInstance();
        c = DriverManager.getConnection(url, properties);
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }

    return c;
}

...

Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection sqlCon = openSQLCon("jdbc:mysql://[mysqlhost]:3306/[databasename]", "[username]", "[password]");

Statement st = sqlCon.createStatement();
st.execute("SQL STATEMENT");

sqlCon.close();

This will connect to the MySQL database given previously mentioned values (username, database, password, and the host will be the host machine of the MySQL server. Also to note that 3306 is just the default port for MySQL and so might be different if you set it so.) It will then execute the "SQL STATEMENT" and close the database. You will need to catch exceptions, and of course handle results sets. You will need to import several thing from "java.sql", and also "java.util.Properties". Information on all of this is in the JDBC docs.

You should spend some time reading the tutorials with JDBC and MySQL, and play around with them. Most importantly have fun!


sudo nano /etc/network/interfaces

 auto lo
 iface lo inet loopback

auto eth0
   iface eth0 inet static
    address 192.168.1.5
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

your server must have a static IP. that ip must not be in your dhcp IP range
Restart networking deamons and restart dhcp as well

 sudo /etc/init.d/networking restart

 sudo /etc/init.d/isc-dhcp-server restart


How detect and run a shell script when any file or folder is being copied/moved to a directory?

You should probably use inotify, command line tools provided in inotify-tools package.

Also better should be the package inoticoming. Description:

Description: trigger actions when files hit an incoming directory
 inoticoming is a daemon to watch a directory with Linux's inotify
 framework and trigger actions once files with specific names are placed
 in there.
 .
 For example it can be used to wait for .changes files uploaded
 into a directory and call reprepro to put them into your repository.


Unable to install VirtualBox in Windows Bash - Ubuntu (Windows 10)

VirtualBox relies a lot on the hardware it is running on and it does not understand Bash on Windows. Running Vbox on BoW is never have been the intention of either Canonical, Microsoft or Oracle.

As explained by Microsoft:

  This is a developer toolset to help you write and build all your code for all your scenarios and platforms.” It’s not a full Ubuntu virtual machine. You can’t use it to host servers, as you could on Linux.

It is a developer toolset; nothing more.

You will need changes on the hardware level to get this working. Probably from both Oracle and Microsoft.

With the current technology I say impossible.

By the way if you think you are capable enough to get hacking this together: the notice you posted are about 2 things

The character device  /dev/vboxdrv does not exist. Please install the virtualbox-dkms package
and the appropriate headers, most likely linux-headers-3.4.0+.

You probably can install virtualbox-dkms with apt. Plus you need to check what headers you have. In general you install these with:

apt-get install linux-headers-`uname -r`
dpkg-reconfigure virtualbox-{numbers}

if uname -r shows 3.4. Otherwise you need to insert the numbers yourself.

If you can get those 2 working you might be a long way into the direction you need to go. Though I doubt you can get the 2nd working (vBox does not install on system it was not meant for).


I've made an email server using postfix and dovecot and I cannot send emails to Gmail! It works perfectly with Yahoo

Your e-mail server is trying to connect to gmail over IPv6. According to the error message, you have no PTR record for IPv6 pointing to your server.

If you can create PTR records yourself, you should do that. If you can't, you'll have to ask your server provider.

An example PTR record is this:

1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. 1h IN PTR host1.example.com.


Properly installing Cisco Secure Mobility Client on xUbuntu 14.04.1

I've found references that claim it will be in /opt/cisco/vpn/bin/vpnui. If you cannot find it there, try just vpnui to start it, or sudo updatedb && locate vpnui to find it.


Not able to access internet from optimized Ubuntu 18.04.1 on Hyper-V

It seems likely that the IP addresses are being used by multiple systems. For example, if you're using a static IP address on multiple machines.


Given the nature of the hardware, it's a pretty safe bet that Ubuntu Server would work just fine on them. The Huawei model didn't have any detailed specs that I could find; the SuperMicro model did have a "supported OS's" list that included Red Hat Enterprise Linux. Typically, Enterprise-class hardware is well-supported with most Linux-based distros.


Black screen with pointer visible in gnome with fglrx

(What version of ubuntu are you running?)

What worked for me was ssh'ing into my box and remove the fglrx drivers. But that only works if you have enabled sshd to run. (You could also try boot to shell and do the same thing.)

I could login with mesa drivers, but then I had a non optimal resolution and everything was slow. I installed the AMD opensource drivers and everything was ok back then.


How do I import an mdf database file into MySQL?

You have some options:

You can use MSSQL Express and interface utility to make a raw sql dump of the database. As this
Use http://opendbcopy.sourceforge.net/


Using unetbootin to create a boot disk for a UEFI (I tend to use the term EFI, though it's technically incorrect) system is a common mistake. unetbootin, last I checked is not EFI-aware and only makes BIOS-type boot disks. This is where the problem originates. Since unetbootin creates BIOS-type boots disks, you had to enabled BIOS mode in your EFI in order to boot it, forcing Ubuntu to install in BIOS mode, rather than EFI mode.

So, how do you fix this?

Given your information from the comments, we're going to use your second flash drive as it should be easiest.

Back up your second USB to your other computer. This process will destroy everything on the second drive.
Boot up the Ubuntu drive you've already created, and tell it "Try Ubuntu", we'll be working from the LiveUSB.
Re-download the Ubuntu ISO from releases.ubuntu.com (it will be saved in RAM). Alternatively, if you've got Linux and the ISO on your other PC, you can do this process form there as well.
Once the download is completed, open a terminal.
cd ~/Downloads
Type mount
Now, plug in the second drive and once it shows up as plugged in, run mount again. We're trying to find the device name of the newly-plugged device. You will see a new entry in the second output that didn't exist in the first. It will start with something like this:

/dev/sdX# on /media/ubuntu/[...]

where X is a letter, # is a number and [...] may be the label of the drive or a random set of characters and dashes. It'll look something like /dev/sdc1, /dev/sdd1, /dev/sde1, etc. This is your second flash drive, hopefully. Take note of the /dev/sdX# part, we'll need it later in step 11.
To verify that it is, in fact your second drive, enter the command ls /media/ubuntu/[...] (The /media/ubuntu/[...] part is what shows up from the second mount command in step 6-7). If it's not the right drive, unplug the second USB again and repeat steps 6-7 again until you're sure you have the right drive and device name (i.e., /dev/sda1).
If the output of the ls command shows the file structure of your second USB drive (the one you're not booting off and the one that you don't mind wiping) then we're ready to go!
At this point, we're going to write this ISO directly to the second USB drive. This next command WILL destroy all data on your drive, so make sure you have backed up the drive and that you have selected the correct device (the /dev/sdX# part).
sudo dd if=ubuntu-14.04-desktop-amd64.iso of=/dev/sdX bs=1M (Note: drop the # off the /dev/sdX# above and just use the /dev/sdX part -- replacing the 'X' with the actual letter of course. /dev/sdc1 becomes /dev/sdc, /dev/sdd1 becomes /dev/sdd, etc.). After this you will have a fully bootable Ubuntu USB drive (both EFI and BIOS).
Now, reboot the computer and change the EFI settings back to EFI mode (i.e., not BIOS/Legacy/CSM mode).
Plug in the newly formatted USB drive and boot off it. That should be all there is to it, Ubuntu should boot and install in UEFI/EFI mode.


No multichannel audio over digital coax (S/PDIF)

Perseverance pays. I found this lovely patch posted at:

https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

I now can set the device in System Settings>Sound to 5.1 Digital Audio, get discrete channels sent to my receiver via PCM and the resulting audio is at the correct speed/pitch. Tested playback with 5.1 wav files and a couple DVDs...so far so good.


Placing newly opened windows while having a window maximized?

I don't know how to fix it, but moving windows is also possible by holding down Alt and pressing the left mouse button and then dragging the window with the pointer anywhere on it.

Possibly you have to enable the plugin "Move Window" in CompizConfig Settings Manager before:

This should be a little bit easier then tinkering around with that hidden window bar.


Does changing the login password also change the keyring password?

Known facts about the process:

The procedure to change the account password includes a hook to update the keyring password in the process.
The keyring password can only be changed (successfully), when the previous password is supplied to the process that changes it, since the key securing the keyring needs to be decrypted with the old and re-encrypted with the new password.

Assumption about the "attacker":

A system administrator running sudo passwd degru (or doing something equivalent) doesn't (typically) know the previous account password for user degru.

Conclusion: The keyring password is only updated during an account password change, when the account owner changes the password. The system administrator cannot decrypt the keyring simply by changing the account password.


How do I connect to Ubuntu One after changing the password?

Open seahorse (“Passwords and Encryption Keys” in the applications menu), look for the Ubuntu One key, and delete it. That should kick off the re-authentication from the client.


How to disable unity side panel after cairo-dock install?

It is sufficient to go into System Settings -> Appearance -> Behavior and set launcher to autohide with lowest reveal sensitivity

If you find that reveal sensitivity is not low enough , you can go into command line and set sensitivity to something absurdly low:

dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 0.00001


I don't know why, but when I issued:

sudo apt-get remove unity-lens-shopping

and then as APT suggested, ran:

sudo apt-get autoremove

after a system restart, the issue was resolved.

Maybe somebody can explain to me why.


gnome : where does my keyboard input go?

This sounds as if you accidentally hit Ctrl-S. This freezes/stops the terminal. Press Ctrl-Q to get it going again.

WARNING: As you hit Ctrl-Q all the stuff you typed while the terminal was frozen will be processed. E.g. Start vi and start inserting Hello then press Ctrl-S and continue typing World. Nothing happens after hitting Ctrl-S. Now hit Ctrl-Q and the text World will be printed.

Btw: This is not a feature of Vi/Vim, but of the terminal or underlying terminal driver.

Update:

This seems to be called "XON/XOFF flow control" and it can be disables in the current terminal by executing stty -ixon. If you start vi now and start inserting text and then accidentally hit Ctrl-S it will just insert ^S and continue.

To make this permanent, the command stty -ixon must be executed in every terminal (like from your .bashrc).
Note, that there may be side effects!


I have an ASUS G74sx.. Want to dual boot ubuntu with windows 7. 32 bit or 64 bit ubuntu?

I prefer x86_64. No workarounds to support +4gb of RAM. With 64-bit it is possible to give more than 2GB of RAM to a single process(might be useful in virtualization). And now most of software support 64-bit architecture, unlike it was a couple of years ago.
And the performance is better. If you use native 64-bit software, it is sometimes significantly better.
http://www.phoronix.com/scan.php?page=article&item=ubuntu_1210_3264


When starting your computer, You'll probably need to push some button before Windows boots. I can't day for sure which button, as this varies from one computer to another.

If you have a manual for your computer, perhaps you could try looking to see if there's anything helpful. If you don't have one, try searching the web for your specific make/model, to see if a digital version exists. You should be able find your model # by pressing winlogo+R, entering dxdiag, and pressing enter.


I cannot change between Windows VM and Linux Host

To exit Full Screen mode try:

Right Ctrl (Host Key) + F

If you are in scale mode you can exit scale mode by using

Right Ctrl (Host Key) + C

If Right Ctrl (Host Key) + C does not work (there have been some issues on Ubuntu), do the following:

1) File > Preferences > Input on the Virtual Machine which is stuck in Scale Mode

2) Change or Reset the Host Key. There's no need to even save after changing the settings

3) Re-open the Virtual Machine and it should be reset!


Terminator Terminal - Able to vary the background color for each tab, similar to Xfce?

The only terminal emulators I'm aware of that conveniently support it out of the box are xfce4-terminal and konsole.

Terminator version 1.90 and above (actually its underlying VTE widget), however, understands the OSC 11 escape sequence to change the background color, e.g.:

echo -ne '\e]11;#abcdef\a'

(and similarly with 10 for foreground).

You might write a chunk of shell script that randomizes the color and emits this sequence from the shell startup script (e.g. .bashrc). Take care to emit it only if the shell is interactive and/or its output is connected to a terminal (see e.g. here).

A quick example, I leave it up to you to improve as you wish:

if [ -t 1 ]; then
  colors=(abcdef cdefab efabcd)
  n=${#colors[@]}
  i=$((RANDOM%n))
  echo -ne "\e]11;#${colors[i]}\a"
fi

Instead of a random number, it might be a good idea to base the color on the tty line (the number from the output of tty), that way you'll have fewer conflicts.


Samba problem -- is it a firewall issue?

You can print out firewall settings by opening terminal and executing

sudo iptables -L

This will print all active firewall rules. Specifically, you want to look for rules under Chain INPUT header.


How can I save my installed packages on an external device so that i don't have to connect to internet on every new install

Copy the packages from /var/cache/apt/archives onto something like a usb.

Open file manager in new installation as root, as soon as you have finished - close the file manager.

gksudo /var/cache/apt/archives

Copy them there.

Update from a terminal

sudo apt-get update

Package should be there for you to use.


Problem with Update Manager: E:Type '/tualatrix/ppa/ubuntu' is not known on line 3 in source list /etc/apt/sources.list.d/tualatrix-ppa-natty.list

try these commands...

sudo rm  /etc/apt/sources.list.d/tualatrix-ppa-natty.list
sudo apt-add-repository  ppa:tualatrix/ppa

i have tested this repository now, it works here, maybe you have some error in /etc/apt/sources.list.d/tualatrix-ppa-natty.list


Why does my cat /etc/fstab look so odd? Is there a way to format the output?

Basically there's no "format" for this file. Have a look at the "headers" :

<file system> <mount point>   <type>  <options>       <dump>  <pass>

There's literally not enough space to write the file system if you want to stay in the "column". Given the fact that your /etc/fstab contains file systems UUID, it's even more impossible.

Of course, you're free to "reformat" the file, using nano for instance. If you just add tabs and spaces, there's very little risk that you'll corrupt the file.


I found that running sudo apt uninstall kubuntu-desktop and sudo apt autoremove and then rebooting seemed to fix the problem. I still don't have KDE, but I don't want to risk my PC trying. I also added gnome tweaks, I don't know if this made any difference.


How to set .so to be available for LD_PRELOAD

Try adding following line in ~/.bashrc file

export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/


Forbidden - You don't have permission to access / on this server

If there isn't an index file (index.html) in /home/diego/web_server and want to get a directory listing, autoindex module must be enabled:

sudo a2enmod autoindex
sudo service apache2 restart

If there is an index file, check its permision, should be 644 (-rw-r--r--).

Check also your home (/home/diego) permissions, it should be 755 (drwxr-xr-x) just like www and web_server.


I can not get my wireless connection to work (and the usual solutions are not working)

I was finally able to fix my problem, thanks to chili555 I was able to find the name of my wifi card. Then I went to this site "https://community.linuxmint.com/tutorial/view/1796" and followed the instructions. ATTENTION, you have to disable secure boot control before you do it or else it wont work.

Thank you so much for your help chili555.


Disk Utility Crashes during HDD Partition (16.04 LTS)

Two possibilities (which might interact) spring to mind:

A Disk Utility bug -- It could be that Disk Utility is simply buggy, particular with a disk that's over 2 TiB in size. That's an important boundary point because it's 2^32 sectors, which means you need an over-32-bit integer to store the size of the disk, the end point for a partition that fills the disk, and so on. If the code in Disk Utility uses 32-bit integers to hold sector values, it would misbehave, and possibly cause a program crash, on disks over 2 TiB in size.
Wrong partition table type -- The 32-bit limit also means that the old Master Boot Record (MBR) partition table type is inadequate for disks over 2 TiB in size. MBR is the default for some tools, though, and some cannot handle the newer GUID Partition Table (GPT), which is the partitioning method that's most commonly used on disks that are over 2 TiB in size. If Disk Utility set up an MBR partition table and then tried to create an over-2TiB partition, this would certainly fail, and might conceivably fail in a way that would cause a program crash.

Although Disk Utility (aka Palimpsest) may seem like the obvious partitioning tool to use, most Ubuntu users prefer to use something else, such as:

GParted -- This is a GUI tool that's generally the go-to tool for GUI partitioning or when people want to resize existing partitions. It supports both MBR and GPT partitions, but if you start with an empty disk, you may need to explicitly tell it to create GPT data structures to use GPT.
parted -- GParted is based around a library called libparted, and parted is a simpler text-mode tool that uses the same library. Although parted can't resize filesystems and is less user-friendly than GParted, it's still commonly used, particularly when a text-mode tool is preferred. Unlike GParted, parted does not enable creating filesystems in partitions; for that, you use other text-mode tools, like mkfs.
GPT fdisk -- This is a family of text-mode partitioning tools (gdisk, sgdisk, and cgdisk) that I wrote. They're designed exclusively for use on GPT disks, and gdisk, in particular, provides better control of GPT data structures than any other tool of which I'm aware. Unusually, GPT fdisk will automatically convert a disk from MBR to GPT form, which can be handy (but can also lead to trouble if you use it without knowing what you're doing). Like parted, GPT fdisk works on partition table data structures exclusively; you must use mkfs or other tools to create or manipulate filesystems.
fdisk -- This tool and its cousins (sfdisk and cfdisk) originally supported MBR and some other obscure partition table types. It's recently been updated to support GPT; the version delivered with Ubuntu 16.04 supports GPT. Like parted and GPT fdisk, fdisk requires use of other tools to create or manipulate filesystems. Note that the gdisk and cgdisk user interfaces are modeled after those of fdisk and cfdisk, respectively. (I wrote GPT fdisk long before fdisk acquired GPT functionality.)

At this point, I recommend you review your configuration with GParted or GPT fdisk. In particular, you can check the validity of the partition table with sgdisk's -v option, as in:

$ sudo sgdisk -v /dev/sda

No problems found. 6 free sectors (3.0 KiB) available in 1
segments, the largest of which is 6 (3.0 KiB) in size.

This will tell you whether there are any problems with the partition table on /dev/sda (change that detail as necessary) and how much space is unallocated. (This example shows just 3 KiB unallocated, but that's unusually small. Most disks will have at least 1-2 MiB unallocated.) If sgdisk shows that the disk has many GiB or even TiB unallocated, then something is wrong -- perhaps the disk was prepared as an MBR disk. The gdisk -l /dev/sda and parted /dev/sda print outputs will each show what partition table type the disk uses, each in its own way. For instance, the parted output will include something like this:

Partition Table: gpt

If that line reads msdos rather than gpt, the disk uses MBR. In this case, you might want to use gdisk on it, and write the changes back out, to convert from MBR to GPT. You can then use GParted to expand the existing partition. I don't recommend doing this without reading up on the procedure or providing more details of your configuration and asking for advice, though, since you can easily dig yourself into some very bad trouble trying to do this. For starters, see the GPT fdisk page on MBR-to-GPT conversions.


How to manage partitions (not live/system) on a remote Linux server?

You're an experienced Windows Admin that also needs to manage this one Ubuntu machine remotely.  :-)
parted is indeed the way to go as gparted is the GUI wrapper for parted and parted is totally error-free if you:

clone the remote machine in your lab as a VM
parted --list first
create a bash script from the commands you test in your VM
execute the script remotely over ssh

And most important of all:
Ensure you have a reliable UPS and reliable on-site backups at the remote site!


According to the website, VirtualBox is open-source, but its Extension Pack is not - that's probably what the Software Center is referring to.

  How is VirtualBox licensed?

  The VirtualBox base package contains the full VirtualBox source code and platform binaries and is licensed under the GNU General Public License, version 2. You can distribute and modify the base package, provided that you distribute all modifications under the GPLv2 as well.

  The VirtualBox Extension Pack is available under the VirtualBox Extension Pack Personal Use and Evaluation License, which is a free license for personal, educational or evaluation use, or an Enterprise License, which is a for-fee license that allows most commercial, non-distribution uses restricted by the PUEL.


How to execute a script just by double clicking like .EXE files in Windows?

I tested this and it worked fine. Ensure your script begins with the correct shebang, e.g. #!/usr/bin/env bash .

Then follow these steps:

Hit Alt+F2 to run a command.
Type dconf-editor and hit Enter.
In dconfg-editor go to: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation and from drop down menu select:

launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.

Close dconf-editor. Thats it!

Alternative way, using terminal: Run:

gsettings set org.gnome.nautilus.preferences executable-text-activation 'launch'

Note: The file should be executable. You may also need to change permission of file. Right click and set "Allow executing file as program"

Source.


Some possibilities:

You don't need to loop if the variable only has a single value.
Use verbose mode instead of echoing debug information. echos like this are like comments: They aren't code and they may get obsolete. Printing what's actually going on is much more useful for debugging.
You can use wget --output-document=/path/to/file to avoid cding before wgetting.
You can use tar -C .. to go to the parent directory before doing the tar operation without cd.
Why create a directory and a file name with the date? You only need a date indicator in the tarball name. The canonical solution for this sort of thing is to

tmp="$(mktemp -d)"
trap -- 'rm -frv -- "$tmp"' EXIT
cd -- "$tmp"

and store the temporary files there. This also removes the need for the previous two tips.
If you only need the date once, you can inline $date.


Windows cannot write to subdirectories of home directory shared with Samba

Try to change the following in the configuration:

From:

create mask = 0777
directory mask = 0777

To:

create mask = 1777
directory mask = 1777

Finally restart the sharing service.


SMBus/ BIOS error while booting Ubuntu in VirtualBox

Turn off the option "Enable Nested Paging" in the VirtualBox configuration under Settings->System->Acceleration.

This allowed me to get Ubuntu running with the desktop.


nVidia GeForce Go 7600? can it ever run unity?

You can try this out

copy this in the terminal

sudo gedit /etc/environment

and then add this

UNITY_FORCE_START=1

in the teksteditor to /etc/environment

then save the file and reboot

Source:

Enable unity 3D with nvidia 7xxx vga - EuroBytes
Geforce Go 7300/7400 Blacklisted, Can I Still Run Unity?


There are 2 different ways to edit the menu items. Note that these steps also work for a toolbar and partially for a treeview too.

Option 1

Select the menu by clicking on it in the editor (A) or search for it in the widget tree (B).
A new Glade toolbar button will appear at the end with an "Edit" icon. Click that to bring up a new dialog where you can change the entries.
In the "Hierarchy" tab you'll see all entries which can be added/removed/edited.

Option 2

Search and select the menubar in the widget tree
Unfold the child widgets
These are your menu entries. Select them to bring up their properties in the property editor and edit them as you would with all other wisgets. Right click to bring up options including removal.


The OP solved it himself and says:

  I pressed CtrlAltF1 to enter the
  terminal. Then I used the last tip in this video and it worked
  i.e. I typed sudo setsid service lightdm restart.


I can ping IP address but can not ping hostname

In the zone file you have a different IP address for pc2.dtvg.nix: 192.128.2.11 than you were successfully pinging: 192.168.2.11.

You confirmed that the IP addresses in the zone file /var/cache/bind/db.dtvg.nix are wrong so please correct them:

$ORIGIN .
$TTL 604800 ; 1 week
dtvg.nix        IN SOA  dtvg.nix. root.dtvg.nix. (
    140        ; serial
    604800     ; refresh (1 week)
    86400      ; retry (1 day)
    2419200    ; expire (4 weeks)
    604801     ; minimum (1 week 1 second)
)
    NS  gw.dtvg.nix
$ORIGIN dtvg.nix.
$TTL 604800 ; 1 week
gw      A   192.168.2.1
pc1     A   192.168.2.10
pc2     A   192.168.2.11


What automated intrusion notification/detection setup is good for home desktop use?

A simple and effective general solution is to use logcheck.

sudo apt-get install logcheck
[edit /etc/logcheck/logcheck.conf to your liking]

logcheck periodically scans all the logs efficiently (starting where it left off last time), filters what it sees to eliminate anything considered normal, and optionally emails alerts with anything that doesn't match the normal/routine patterns.

The main idea is to watch-out for appearance of any serious entries in your log files, all of them, all the time, so you don't have to.

logcheck is highly configurable (man logcheck).  You may configure everything, including:

frequency of checks
which log files are checked
what is considered normal vs not
where to email the alerts (abnormal events) to

and more. Your ignore (normal/routine) patterns reside in multiple files under /etc/logcheck/ignore.d.* and you may customize them to your needs; mainly you may want to add your own patterns to ignore.  The default Ubuntu package comes with an extensive set of files with ignore patterns for many services already, so there's not much to add unless your system is unusual in what it runs. There are 3 sets of pre-configured ignore file profiles:  ignore.d.workstation, ignore.d.server, and ignore.d.paranoid which you can pick from.

The main idea behind logcheck is that the various services running on a system, already log abnormal events. E.g. sshd or pam already log authentication failures.  So the main missing components are:

filtering what's normal
The alerting service

Both of which are provided by logcheck in a convenient package.  You may combine logcheck with any other logging. For example iptables can be configured to syslog any network connection attempts that are not explicitly allowed by adding the rules:

 iptables -A input -j LOG
 iptables -A input -j DROP

immediately after all the allow rules.

I find logcheck to be much more helpful than logwatch (suggested in other answers) because it comes pre-packaged with a very large number of rules to ignore what's considered normal activity. The result is a much higher signal/noise ratio in the alerts it emails. YMMV.

Another advantage of logcheck is that it is orthogonal to any service that logs, so there's no duplication of function. Whenever you add a new service which uses syslog to log events, abnormal or not, into any file under /var/log you start getting alerts for it automatically.

HOWTO:

  Since logcheck already comes preconfigured, two lines at the top of
  this answer essentially cover all you need to get started.  Just
  install it, and go over the top configuration file:
  /etc/logcheck/logcheck.conf to change your email address
  so logcheck emails alerts to you.

  Here's a friendly reference going over the second step in more
  detail.
  Since Ubuntu is based on Debian, these instructions should work on Ubuntu too.
  Here is another good reference.

  Once you install, the continuous improvement process starts.
  Over time, you refine your rules to ignore anything that you already know about
  and feel shouldn't be of concern.
  This refinement process is as simple as adding text lines to a file
  in your favorite text editor.

  Each line in an ignore file is an extended regular expression (see man 7 regex), but you may use simple strings as long as they match the log line you want to ignore. Just remember that characters like *, ?, '+', [], () are special in a regular expression, so if they actually appear in the log lines, you would have to escape them with a backslash \ in the ignore files.

  In other words: if you get an alert you don't want to get,
  look at the log line that was emailed to you, and add a pattern
  that matches it, as one line to any ignore file of your choice.  I suggest using
  /etc/logcheck/ignore.d.<yourloglevel>/my-ignores as your personal ignore
  file. Where <yourloglevel> is one of paranoid, server, or
  workstation (as you've already selected in
  the main config file: /etc/logcheck/logcheck.conf).  Look at the examples in other
  ignore files to see how to account for text that changes all the time like process-IDs, or time-stamps. There are lots of existing examples to learn from.

One last tip: logcheck comes with a little useful utility called logcheck-test which is very handy for testing new rules. man logcheck-test for details.


Firefox 88+: use FileZilla when encountering ftp:// URI

You have to remove FileZilla Flatpak and use deb-package instead by:
flatpak remove org.filezillaproject.Filezill

sudo apt-get install filezilla

and then associate it with ftp://.


open a terminal, and end enter the following command to get all permissions for nautilus:

gksu nautilus --no-desktop

This will open a new nautilus with the root user, which can read everything. The "--no-desktop" is needed because by default it would take over.


apt-get update errors - 50unattended-upgrades.ucf-dist

Just remove it is unnecessary:

sudo rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist


Photoshop not opening (hardware or system error)

I made work photoshop work by updating ttf-mscorefonts-installer.
Actually the solution was found from Rinzwind's comment.


command to print out list of folders from multiple drives

Try using find with sort:

find /sda /sdb /sdc -type f -printf '%f\n' | sort

For example:

$ tree sd[a-c]
sda
└── Alfa
    └── File 1
sdb
└── Bravo
    ├── File 20
    └── File 5
sdc
└── Delta
    ├── File 11
    └── File 14
$ find sd[a-c] -type f -printf '%f\n' | sort
File 1
File 11
File 14
File 20
File 5

Note that this is what is typically meant by alphabetical order, more precisely stated as lexicographic order. (5 the character does not come before 1 the character, so 5 the string cannot come before 14 the string - 05, however, will.)

Explanation:

find is a program for finding things.

-type f indicates we want regular files, and not directories (or other special files).
The usual output of find is the path of the file, so we would get sda/Alfa/File 1, but using -printf '%f\n', we tell find to print only the filename.


Open PCManFM, type in:

menu://applications/Internet

and press Enter. Press Ctrl+H to show the hidden icons, then drag the Web Browser icon to the launch bar.


How to limit a user to his / her folder?

...: /etc/ssh/sshd_config line 93: Directive 'UsePAM' is not allowed within

... match block.

You wrote the snippet of the configuration some place before the line 93 and therefore the UsePam option felt into this block too. Move your created snippet (Match Group ...) to the end of file and you shuold be good.


Closing windows with middle mouse button under Ubuntu Mate

No, It's not possible in Ubuntu's distribution of MATE. I think, it was a customization of mint systems.

Because the settings key that allowed this was org.mate.Marco.general action-middle-click-titlebar and it's possible valid values in Ubuntu MATE are

$ gsettings range org.mate.Marco.general action-middle-click-titlebar
enum
'toggle_shade'
'toggle_maximize'
'toggle_maximize_horizontally'
'toggle_maximize_vertically'
'minimize'
'none'
'lower'
'menu'
'last'

There is no close option. You can shade, minimize, maximize and several other window manipulations, but it seems close is not one of them.


"Error: Invalid signature" when configuring dual boot Ubuntu 14.04 and Windows 10

There are some peculiarities about your installation:

Your computer has two Windows Recovery Environment partitions, /dev/sda1 and /dev/sda5. My guess is one is from your previous Windows installation and the other is for the new installation, but I can't be positive of that. I doubt if this duplication is causing you any problems per se; I mention it simply because it's a sign of a history of changes to the machine, and such changes may be both the cause of problems and make it difficult to figure out what's wrong.
Your EFI System Partition (ESP) is /dev/sda4. This is perfectly legal, but is unusual; the ESP is normally /dev/sda1 or /dev/sda2. The ESP holds EFI-mode boot loaders and related files. My hunch is that the ESP was created late in the machine's history -- perhaps it was Ubuntu-only at one point and then you installed Windows, which created the ESP in this unusual location.
The Boot Info Script output doesn't identify any EFI boot loaders on the ESP. My suspicion is that they do exist, but the script has omitted these entries. (I've seen this happen from time to time.) OTOH, if those files are missing, then it means that Windows has failed to install its boot loader. The same may be true of Ubuntu, too; but see below....
Your disk uses the GUID Partition Table (GPT), which means that Windows will install to and boot from this disk only in EFI mode; but there's evidence of a BIOS-mode installation of GRUB, the standard Ubuntu boot loader. Such a mish-mash means that you'd not be able to boot Windows from a BIOS-mode GRUB on this computer. It could be you've also got an EFI-mode GRUB and had been booting that way; or maybe you had been switching between OSes by using the computer's built-in boot manager (typically accessed by hitting Esc, Enter, or a function key at start time).

At this point, your best bet is to install an EFI-mode boot loader for Linux. There are two ways to do this that are relatively safe and easy. Both work best if you first enter your firmware and completely disable any option to boot using BIOS, CSM, or legacy mode. (Those are three terms for the same thing.) Sometimes these options are phrased the other way -- you must enable EFI or UEFI support. With that done, do one of two things:

Method 1: Boot your Ubuntu install disk, ensure you've booted in EFI mode by looking for the /sys/firmware/efi directory (if it's present, you've booted in EFI mode), install the boot-repair package, and run it. This should repair your installation by installing an EFI version of GRUB. This usually works, but occasionally it doesn't. I realize you've already run Boot Repair, but my suspicion is that you ran it in BIOS mode, which of course means it would install the BIOS-mode GRUB, which will be useless for booting Windows.
Method 2: If you haven't done so already, disable Secure Boot in your firmware. You can then download and prepare a boot medium from the CD-R or USB flash drive version of my rEFInd boot manager. Boot to it; it should show you a menu with at least one option for each of Windows and Ubuntu. Test these to be sure you can boot both OSes, then boot Ubuntu. At this point, you can install the rEFInd Debian package or PPA. (Alternatively, you could install the EFI version of GRUB.) You may be able to re-enable Secure Boot at this point, but you may need to jump through some extra hoops to get it to work.

There should be no need to re-install Ubuntu, and probably not to re-install Windows. BIOS-mode and EFI-mode installations of Ubuntu are identical except for the boot loader (and related partitions -- but you've got the partitions to handle both modes).


Mounting Encrypted VeraCrypt Drive during Boot

The simple thing I've been doing for 5 years now is to simple load it in my ~/.profile.  However, since I don't want remount when already mounted, I check if a directory in the mount is present.

if [ ! -d "/media/Data/some_folder" ]; then
  veracrypt /dev/sda7 /media/Data
fi

You're probably better off finding something better, but this could work for now. I'd also encourage you to add truecrypt/veracrypt into your sudoers list so you don't have to enter your root password as well. See here: https://askubuntu.com/a/940972/400549


Windows7 won't boot after upgrading Ubuntu to 16.04

Grub, or this forum, may not be the best resource for fixing Windows.  https://superuser.com/ can give better support for repairing Windows.  From the content of your message it appears Grub is working fine and giving you the option to boot to an OS that appears to be broken.

You could boot to the Window's install media and use their repair option which would most likely destroy grub, but bring back your Windows.  After you have Windows working again, reinstall grub.

Reinstalling Grub is a simple five step process:

1) boot to the Ubuntu installation disk
2) Run the "Try Ubuntu" option
3) Bring up a terminal (Launch search "terminal")
4) Run these commands (exactly):
    a) sudo mount /dev/sdaX /mnt  # Make "X" the partition that has Ubuntu installed (i.e. /dev/sda2).
    b) for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
    c) sudo chroot /mnt
    d) update-grub
    e) grub-install /dev/sdX (X is the hard drive that has linux installed (i.e. /dev/sda)
5) Reboot the system


I would not recommend manually deleting from the root directory as it could cause programs to break, and they will just be replaced next time you update.

I would try to find entire packages you no longer need before resorting to this. there are many ways to do this, on Ubuntu I would first run sudo apt-get autoremove. This will find packages which were installed as dependencies for programs, but are no longer needed by anything.

It might be a good idea to look in the Ubuntu Software Centre to get a list of all the programs you have installed. If you're like me, you'll have installed loads of programs you no longer use, or maybe intended to use and never did.


Could'nt punch through NAT(or NAT not in place)

Ethereum (++) 0.9.41

This is a very old version. Where did you get this from? It was released 14 months ago in Summer 2015 and it seems the seednodes are dead by now.

I recommend to upgrade to version 1.2.9 or check out the latest develop.

And regarding to the NAT issue: Try enabling UPnP on your router.


Upgrade to 14.04 and see if your battery is still supported by default. If it doesn't work, why not stick with 12.04 (which you know works) and still has a few years of support left?


Open up the XFCE Configuration Settings, then go to Appearance, then go to the Configuration tab, after that select Icons from the Toolbar Style drop down menu.


Can a single Ubuntu SDK target touch and desktop with separate layouts?

Changing aspects of the layout depending on the size of the window can be accomplished in a number of ways. At the most basic level, you can just set properties to different values based on the dimensions. Here is a minimal example that draws a grey square that turns orange if you make the window bigger:

Run with qmlscene path/to/file.qml

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    id: root
    width: units.gu(50)
    height: units.gu(50)

    Rectangle {
        id: hello
        color: parent.width > units.gu(60) ? UbuntuColors.orange : UbuntuColors.warmGrey
        anchors.fill: parent
    }
}

Of course, if you have more complex elements to your application this can get a bit tedious. To help with this, the Ubuntu Toolkit provides a ConditionalLayout component where you can define different layouts that will be activated when a condition is met. This happens dynamically, and you can see the changes as you resize the window.

Here is a more complex example using ConditionalLayout:

import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
import Ubuntu.Layouts 0.1

MainView {
    id: root
    width: units.gu(50)
    height: units.gu(75)

    Page {
        anchors.fill: parent

        Layouts {
            id: layouts
            anchors.fill: parent
            layouts: [

                ConditionalLayout {
                    name: "flow"
                    when: layouts.width > units.gu(60)

                    Flow {
                        anchors.fill: parent
                        flow: Flow.LeftToRight

                        ItemLayout {
                            item: "sidebar"
                            id: sidebar
                            anchors {
                                top: parent.top
                                bottom: parent.bottom
                            }
                            width: parent.width / 3
                        }

                        ItemLayout {
                            item: "colors"
                            anchors {
                                top: parent.top
                                bottom: parent.bottom
                                right: parent.right
                                left: sidebar.right
                            }
                        }
                    }
                }
            ]

            Column {
                id: sidebar
                anchors {
                    left: parent.left
                    top: parent.top
                    right: parent.right
                }
                Layouts.item: "sidebar"

                ListItem.Header {
                    text: "Ubuntu Color Palette"
                }

                ListItem.Standard {
                    id: orangeBtn
                    text: "Ubuntu Orange"
                    control: Button {
                        text: "Click me"
                        onClicked: {
                            hello.color = UbuntuColors.orange
                        }
                    }
                }

                ListItem.Standard {
                    id: auberBtn
                    text: "Canonical Aubergine"
                    control: Button {
                        text: "Click me"
                        onClicked: {
                            hello.color = UbuntuColors.lightAubergine
                        }
                    }
                }

                ListItem.Standard {
                    id: grayBtn
                    text: "Warm Grey"
                    control: Button {
                        text: "Click me"
                        onClicked: {
                            hello.color = UbuntuColors.warmGrey
                        }
                    }
                }
            } // Column

            Rectangle {
                id: hello
                Layouts.item: "colors"
                color: UbuntuColors.warmGrey
                anchors {
                    top: sidebar.bottom
                    bottom: parent.bottom
                    left: parent.left
                    right: parent.right
                }

                Label {
                    anchors.centerIn: parent
                    text: "Hello (ConditionalLayout) World!"
                    color: "black"
                    fontSize: "large"
                }
            }
        } // Layouts
    } // Page
} // Main View

When in the default phone-like size, it looks like:

When it is expanded to a tablet or desktop-like size, it looks like:


Bluetooth: how to solve "not enough free handles to register service" error?

Check rfkill service. It could block connections sometime for LAN, Wifi and Bluetooth.

You can check what is blocked with this command:

rfkill list

My bluetooth was blocked. I used this command:

rfkill unblock bluetooth

So now "not enough handlers" error is gone and BT works as it should


Update This solution is for LightDM (default display manager up to Ubuntu 16.04 LTS), not for GDM (default display manager in newer Ubuntu versions).

It's a bug

The bug is described and discussed here, in Ubuntu Launchpad.

Explanation

Shortly, there are four kind of users in Linux: root (UID 0), system users (low UIDs), regular users (high UIDs) and the nobody user (UID 65535, the last UID).

The Ubuntu login screen uses a service called Accountsservice (a lightdm component) that, by default, presents all the regular users in the login screen.

However, the current Libvirt/QEMU package for Ubuntu 16.04 uses a high UID for the user libvirt-qemu. It seems to be a bug (system packages usually creates system users, with low UIDs).

Workaround

Each regular user can also set custom options to it's login process (background image for the login screen, desktop environment - Gnome or KDE, etc). These options are saved in /var/lib/AccountsService/users.

Using these custom options, it's possible to mark a regular user as a system user to Accountsservice. So, Accountsservice will consider it a system user despite it's UID.

To do this to the libvirt-qemu user:

echo -e "[User]\nSystemAccount=true" > /var/lib/AccountsService/users/libvirt-qemu

After this, you should reset the Accountsservice cache:

service accounts-daemon restart

The previous commands should be run as root.


It looks like you are using an Oracle "Java Early Access" version of JDK 9. I just tried launching Eclipse with this and received the same error as you.

Using the latest Oracle JDK 8 Update 112, it appears to work fine. You can download this here.


Bridge networking for 18.04 NetworkManager host and KVM netplan guest

Ok, needed to allow forwarding in iptables. A script /etc/NetworkManager/dispatcher.d/br0.sh:
#!/bin/bash

if [ "$1" == br0 ]; then
    case "$2" in
        up)
            /sbin/iptables -A FORWARD -i br0 -j ACCEPT
            ;;
        down)
            /sbin/iptables -D FORWARD -i br0 -j ACCEPT
            ;;
    esac
fi

Can also add virsh net-destroy br0 and virsh net-start br0 to it to reinit the KVM part.


separate meta and hyper keys in unity with XKB

You can't currently do it with an option, however it is possible to change it without modifying any system files. See my answer here: https://askubuntu.com/a/794087/514921.  I believe this will persist across layout changes, but I have not tried it.


I have tried this and worked for me:
I just commented the previous repository in  source list as follows:

$sudo nano /etc/apt/sources.list

Comment previous version of R

# deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial main restricted

and add the new version repository:

deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/

Then add public key :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

and finally update and instal r-base
sudo apt-get update
sudo apt-get install r-base


gu is short for grid unit.
From the user interface manual:

Measurement Units
A new measurement unit is defined called the grid unit, abbreviated gu. 1 grid unit translates to a given number of pixels depending on the type of screen that the user interface is displayed on. For example, on a laptop computer 1 grid unit will typically translate to 8 pixels. The number of pixels per grid unit is chosen in order to preserve the perceived visual size of UI elements and therefore depends on the density of the display and the distance the user is to the screen. We also ensure that 1 grid unit is always an integer number of pixel.
Examples

Most laptops  1 gu = 8 px
Retina laptops    1 gu = 16 px
Phone with 4 inch screen at HD resolution (around 720x1,280 pixels)   1 gu = 18 px
Tablet with 10 inch screen at HD resolution (around 720x1,280 pixels) 1 gu = 10 px

So if you base all your measurements on GUs every device will look as intended.

Example
If the destination size of the bitmap is 10 gu * 10 gu and the developer targets a device that has 18 pixels per grid unit (1 gu = 18 px), the bitmap should still be created as if 1 gu = 30 px which results in a 300 px * 300 px bitmap. When testing on the device the bitmap will be downscaled by a factor of 30 / 18 = 1.66667.

Extra: for measurements smaller than 1 pixel you use "units.dp" in the same fashion.


Brightness shortcuts don't work on on an Acer 4741

Please make sure that this is not a distribution-specific bug by trying other distros like Fedora, and by trying older versions of Ubuntu, like Maverick (10.10) I'm having similar problems with Oneiric, Natty and Fedora 15 on a computer where Maverick runs well.


Use real browser instead of w3m on SSH connections

Use ssh port forwarding.

Connect to the remote server with something like this:

ssh -L 8080:localhost:80 user@remoteserver

Now, point your local browser to localhost:8080. It should be forwarded to localhost:80 in the remote server.


The default video driver for KVM/qemu libvirt type VMs is the cirrus driver and that is the root issue. Years ago, there were problems with the vmvga driver, and cirrus was made the default. Issues with the vmvga driver have long since been fixed.

For a new VM defintion, specify the vmvga driver.

To fix an existing VM then use virsh edit and change this line:

<model type='cirrus' vram='9216' heads='1'/>

to this:

<model type='vmvga' vram='9216' heads='1'/>

If the VM name is, for example, desk_tt then the defintion file will be /etc/libvirt/qemu/desk_tt.xml. Myself, I make a copy before changing things.

sudo cp desk_tt.xml desk_tt.xml.original

then, and you MUST use virsh edit do NOT edit the file directly, as virsh edit will do a bunch of checks upon save and exit. From any directory do:

virsh edit desk_tt

There is probably a way to make the change using virt-manager, but I do not use it, and so do not know how.

Note: the default editor used by virsh edit is as defined by the $EDITOR environment variable, or VI if it does not exist. add export EDITOR="/bin/nano" to your ~/.bashrc file to set, for example, nano as your default editor.

Note: Readers might be tempted to increase the video ram, vram, in the above line, as depending on your screen size it probably isn't enough. At the time of posting this answer, the vram parmeter is ignored.


A start job for dev-mapper-cryptswap.device is never ending

The comment from @jarno helped a lot.
Instead of killing the machine with a hard power down, simply press Ctrl Alt Del.


https://en.wikipedia.org/wiki/List_of_VIA_Eden_microprocessors#%22Eden_X2%22_(40_nm) shows it supports x64-86, SSE/2/3. MX, and x86 virtualization, so Ubuntu might run. I'd start with the lightest 'flavour' of Ubuntu, Lubuntu 19.10, and if you have a different desktop preference, try that next.


This issue might be related to the new Z97 motherboard that you're using. The issue is specified in launchpad here:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1321421

If the solution in launchpad doesn't work for you, you might be able to resolve the issue by installing the latest linux kernel which I wrote instructions on here:

https://github.com/Nerdylicious/How_To_Fix_Ubuntu_Compatibility_On_Intel_Z97_Build


List of Ubuntu Versions with Corresponding Linux Kernel Version

20.10   Groovy Gorilla    5.8
20.04   Focal Fossa       5.4
19.10   Eoan Ermine       5.3
19.04   Disco Dingo       5.0
18.10   Cosmic Cuttlefish 4.18
18.04   Bionic Beaver     4.15
17.10   Artful Aardvark   4.13
17.04   Zesty Zapus       4.10
16.10   Yakkety Yak       4.8
16.04   Xenial Xerus      4.4
15.10   Wily Werewolf     4.2
15.04   Vivid Vervet      3.19
14.10   Utopic Unicorn    3.16
14.04   Trusty Tahr       3.13
13.10   Saucy Salamander  3.11
13.04   Raring Ringtail   3.8
12.10   Quantal Quetzal   3.5
12.04   Precise Pangolin  3.2+
11.10   Oneiric Ocelot    3.0
11.04   Natty Narwhal     2.6.38
10.10   Maverick Meerkat  2.6.35
10.04   Lucid Lynx        2.6.32
09.10   Karmic Koala      2.6.31
09.04   Jaunty Jackalope  2.6.28
08.10   Intrepid Ibex     2.6.27
08.04   Hardy Heron       2.6.24
07.10   Gutsy Gibbon      2.6.22
07.04   Feisty Fawn       2.6.20
06.10   Edgy Eft          2.6.17
06.06   Dapper Drake      2.6.15
05.10   Breezy Badger     2.6.12
05.04   Hoary Hedgehog    2.6.10
04.10   Warty Warthog     2.6.8

16.04, 18.04, and 20.04 are the only currently supported releases (as of Aug 18, 2020).
This lists the kernel version that ships with Ubuntu, but new minor versions may be installed during the Ubuntu installation if updates have been released since.


Custom right-click action in Unity Launcher keeps cursor busy for 20 seconds

Excellent question.

The cause

Normally, when starting GUI applications from the Unity Launcher, the launcher waits for a window to appear. While waiting, it shows the "spinning wheel". It won't wait forever however; after about 20 seconds, the launcher assumes the window won't appear and gives up waiting.

1. The main command of an application's launcher

In a .desktop file, concerning the first Exec= line (the main command), you can tell the launcher to wait or not, in a line:

StartupNotify=true

to make it wait, or

StartupNotify=false

to make it not wait.

2. Quicklist items of a launcher

For possible quicklist (right-click) items of a launcher however, the default value is StartupNotify=true. Unfortunately, this value is fixed and cannot be changed by anything.

That means that if you start any command from right-clicking a launcher icon in the Unity Launcher, the launcher is expecting a window and waits for it, showing the spinning wheel.

The bottom line is that, although it can be explained, there seems to be no solution to the issue at the moment, other then creating a dedicated launcher for your script and add the line StartupNotify=false to the file.

The proof

You can test the behaviour yourself. Create two launchers:

[Desktop Entry]
Name=Test
Exec=sh /home/myusername/Documents/xdotool_sh/minimize.sh firefox
Type=Application
StartupNotify=true

and:

[Desktop Entry]
Name=Test
Exec=sh /home/myusername/Documents/xdotool_sh/minimize.sh firefox
Type=Application
StartupNotify=false

Save them as test1.desktop and test2.desktop, drag both launchers on to the Unity launcher. Click them and see the difference in behaviour.

Edit; if it really bothers you, feed Unity a fake window

If you have many scripts in quicklists, and/or it really bothers you, there is another cosmetic solution; we can fake, invisible (fully transparent) to show a window, to be included in your script. your script would then be (e.g.)

#/bin/bash
name=$1
for i in $(xdotool search --class "$name"); do
    xdotool windowminimize $i
done
fake_window

where the command fake_window will call our (fake-) window, making Unity end the spinning wheel.

How to set up

Create, if it does not exist yet, the directory ~/bin
Copy the script below into an empty file, save it as fake_window (no extension) in ~/bin and make it executable

#!/usr/bin/env python3
from gi.repository import Gtk
from threading import Thread
import time
import subprocess

"""
This is a self-destroying window, to "feed" Unity a fake-window, preventing
the launcher to show a spinning wheel, waiting for a window to appear.
Include the command to run this script at the end of the (your) script.
"""

class FakeWin(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="1526closeme")
        Thread(target = self.close).start()

    def close(self):
        t = 0
        while t < 150:
            time.sleep(0.2)
            try:
                pid = subprocess.check_output(["pgrep", "-f", "fake_window"])\
                      .decode("utf-8").strip()
                subprocess.Popen(["kill", pid])
                break
            except subprocess.CalledProcessError:
                pass
            t += 1

def fakewindow():
    window = FakeWin()
    # make our window transparent
    window.set_opacity(0)
    window.set_default_size(0,0)
    window.show_all()
    Gtk.main()

fakewindow()

Add to the very end of your script the command:

fake_window

Log out and back in (or run source ~/.profile)

That's it, the wheel will now only spin for as long as the script runs.

Explanation

The script does create a minimalistic window. The window however is fully transparent and has a size of 0x0 pixels and is thus invisible. It will destroy itself instantly once it exists.

Calling the window at the end of your script, you will satisfy Unity's wish for a window, stopping the wheel to spin.


On Android, can I point a file to a folder on the file system so that it syncs to Ubuntu One?

Ubuntu One Files currently does not provide sync features, besides auto-upload of photos. We do have sync on the roadmap. The ETA is not close, though, as we only have one Android dev on the team.


Install Ubuntu to Boot from Partition on external Hard Drive

Appropriately partition your external drive. Create a Ubuntu live CD/USB and boot from it. When it prompts you to choose your install method, click "Something else."

It will take you to a menu to choose the disk you want to install on. Choose your external drive, and create one partition that is >= the amount of physical RAM you have installed in your Mac, and format it as Swap. Then, format the remaining as ext4. Set the ext4 mount point to /.

Select the ext4 partition, and click install. Ubuntu will install on the selected partition. Follow prompts to set up your user account, password, and basically general things.

After Ubuntu is installed, it will prompt for reboot. Reboot, and as your Mac starts back up, hold the option/alt key and it will open up the boot menu. Select your hard drive partition, and boot into Ubuntu.

Enjoy :)


To make Scilab present in the path, you must modify your symbolic link creation to:

sudo ln -s /opt/Scilab-5.4.1/bin/scilab /usr/bin/scilab

That way you can type scilab in the shell and open it. For creating the icon:

gedit ~/.local/share/applications/scilab.desktop

Now add the following content:

[Desktop Entry]
Name=Scilab
Comment=Scilab-5.4.1
Exec=/usr/bin/scilab
Terminal=false
Type=Application
StartupNotify=true

Now you can pin it to the dash or just searching for "Scilab".


"Permission denied" while running a bash script

The hint is in the filename shown: /forward.align

This implies that you try to write to /forward.align, which is in the root (/) of the file system. Users do not have write permissions there.

Replace /forward.align with either ./forward.align or forward.align., and same for /reverse.align, and it should work.


I think Xnest is what you're looking for:

http://en.wikipedia.org/wiki/Xnest

Although how you set it up as a session within the login screen is a mystery to me I'm afriad.


Virtualbox Ubuntu 17.04 cannot connect to the internet

I had a similar issue.  I tried switching to bridged, etc, and nothing seemed to work.  Eventually I switched back to NAT, and found out which interfaces were available:

lshw -C network

I noticed that the networking was DISABLED.  Then I manually brought up the interface:

ifconfig enp0s17 up

But after that it still wouldn't work.  I had to manually get it to get an IP address using

dhclient enp0s17 -v

That did the trick and it's working now.  Not sure if this will help your issue, but it fixed mine.


I have a Password problem can some one help

Boot from live CD/USB
Mount partition that has the issue at /tmp
Chroot into /tmp
Do sudo visudo -f /etc/sudoers.d/USERNAME
Add USERNAME ALL=(ALL) NOPASSWD: ALL to file
Remove live usb, boot normally
Do sudo passwd root, this will set root pass

Might work, haven't tried it in a while, but sounds right.


What have i missed that i need to run Redshift Plasmoid?

I needed to install the plasma desktop itself. I'm still having problems with using the task-bar icon to toggle it on and off, but theankfully the desktop plasmoid does work as a toggle.


Accidentally Set All Files in /home/(userName) to 755

The important files/directories to change are ~/.ssh and ~/.gnupg.  If those aren't set right, the programs have a tendency not to work as they're super picky about permissions.  Otherwise, as the only user, you're pretty safe.
In case this happens in the future, here are two commands that can speed things up:

Change permissions on all directories in your home: find /home/(UserName) -type d -exec chmod 750 {} \;
Change permissions on all files in your home: find /home/(UserName) -type f -exec chmod 640 {} \;

You can obviously tweak the permissions and the search directory as needed.


In order to display the names of the services by using netstat you need to run the command with root privileges. So you can use:

sudo netstat -ltnp | grep ':80'

Example output:

$ sudo netstat -ltnp | grep -e 'PID/Program\|:80'
Proto Recv-Q Send-Q Local Address     Foreign Address    State       PID/Program name
tcp6       0      0 :::80             :::*               LISTEN      3309/apache2
tcp6       0      0 :::8080           :::*               LISTEN      1273/java


Differences between GRUB, GRUB2 and BURG

GRUB
Tthe GRand Unified Bootloader is the software that is loaded by your computer after it turns on (after your computer's BIOS loading screens). GRUB then either automatically boots Ubuntu or gives you a list of installed Operating Systems and lets you choose one to boot (people not dual booting will probably not see the GRUB interface below).

GRUB 2
A complete rewrite of the original GRUB (legacy GRUB). On the surface the majority of users won't notice any difference but the new version has fairly major structural changes and should be more reliable. The new version stores its configuration files differently, which means most online tutorials involving GRUB had to be rewritten. Other new features include the ability to boot LiveCD ISOs from the hard drive; support for other architectures such as PowerPC; theming and other graphical capabilities and scripting support.
Since 9.10 Ubuntu has used GRUB 2 as the default boot loader for clean installs (prior to this it was GRUB).
BURG
As for BURG  - the capitalisation seems to depend who you ask - it is a fork of GRUB.The main reason most users consider BURG is for the theming possibilities, replacing the two colour boot screen above, with (for example) the interface below.

We are unlikely to see BURG in default Ubuntu installs (at least not any time soon). The bootloader could be called the most important component of the Ubuntu stack - if it goes wrong you can't get into Ubuntu (or your other operating systems)! So such a major component needs to be fairly mature and well tested to ensure no breakage across the huge variety of devices Ubuntu is used on.
And here's a quote from the BURG website:

burg is a brand-new boot loader based on GRUB. It uses a new object format which allows it to be built in a wider range of OS, including Linux/Windows/OSX/FreeBSD, etc. It also has a highly configurable menu system which works in both text and graphic mode. Additional features like stream support and multiple input/output device are also planned.


java-8-oracle (1.8.0_66) problem with PrintAssembly "Could not load hsdis-amd64.so"

First install libhsdis0-fcml as described in the other answer1:

sudo apt-get install libhsdis0-fcml

This only installs it for OpenJDK. You are, however, using java-8-oracle, so you'll need to copy it over there. Here's the exact copy command that worked for me:

sudo cp /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/hsdis-amd64.so /usr/lib/jvm/java-8-oracle/jre/lib/amd64/hsdis-amd64.so

If that's still not working, you might try an strace to see where your java is looking. I used:

strace -f java -XX:CompileCommand='print, *.*' ... |& grep hsdis

to get output like this:

[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libhsdis-amd64.so", O_RDONLY <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libhsdis-amd64.so", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libhsdis-amd64.so", O_RDONLY|O_NONBLOCK <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/hsdis-amd64.so", O_RDONLY <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/hsdis-amd64.so", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/hsdis-amd64.so", O_RDONLY|O_NONBLOCK <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/hsdis-amd64.so", O_RDONLY <unfinished ...>
[pid 10783] open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/hsdis-amd64.so", O_RDONLY|O_CLOEXEC) = 14

You can see that the places and names you were trying are definitely among those the JDK searches (in my case, it probably would have searched more places, but stopped since the last location above is where it found the shared object).

Note that you definitely need the -f flag to strace since the actual JVM is launched as a child process of the original java command.

Among the issues strace might reveal is a permissions issue. I only needed read perms on the library for the user launching java.

My java -version output:

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

1 Really, this is just a way to get a (presumably working) hsdis.so file in a package-manager friendly way. You could always just download it directly from one of the various sources as well.


Ubuntu emulator takes +100% CPU but doesn't start

Supply password also while creating emulator

sudo ubuntu-emulator create ubuntuTouch --arch=i386 --password=0000


Is id_rsa in ~/.ssh? This is where ssh and scp looks for the private keys.

Also if your using a private key you shouldn't be prompted for a password, this would suggests that it is not being used, and also that it is not required.

I'm also confused as to why your using putty if both systems are Linux.


Dell Inspiron-3543 screen lacking vibrance and saturation - how can I calibrate it?

Solved using xgamma -gamma 0.7 in terminal.