How can I access files in my USB pendrive (with YUMI & Ubuntu 12.04 installed in it)

The USB that you are booting Ubuntu from will not show up as an external disc.

I notice from your screen shot that it only has 1 partition.

It should be as simple as opening Nautilus then clicking Filesystem and navigating to the folder & files you want.


Wifi connects but after a bit of use internet does not work

Adding the following blacklists to the top of /etc/modprobe.d/blacklist.conf fixed it for me

blacklist rt2x00pci
blacklist rt2x00lib


Can I install Ubuntu alongside VeraCrypt encrypted Windows 10 partition

A safe way to do this is as follows:

Temporarily un-encrypt the Windows partition.
Resize the Windows partition to leave the space you want the Ubuntu partition to have. (You need to have a partitioning software to boot from to do this.)
Re-encrypt the Windows partition, using Veracrypt.
Make sure you have a bootable rescue disk from Veracrypt. (They make you have one when you try to encrypt the windows partition.) Test the disk to see that you can boot from it to windows.
You can now install Ubuntu into the free re-sized partition, but be aware
that Ubuntu will over-write the encrypted Windows boot-loader with Grub, and that the only way that you can boot to windows is by using the Veracrypt rescue disk.
When using the Veracrypt Rescue disk, do NOT choose to let it 'fix' the Windows bootloader, as then you will not be able to boot Ubuntu. Just let the rescue disk boot to windows.
You now have a system that will boot by default into Ubuntu but will allow booting into Windows with the Veracrypt rescue disk.

n.b.
Files on an unencrypted Windows, (Win 7, have not tried Win10), are accessible for anyone using an Ubuntu Install disk, booting to 'try' the Ubuntu system, and then mounting the NTFS partition. All files (unencrypted by third-party encryption software) including Administrator files are accessible, copyable onto USB media, and deletable without a trace that Windows has been accessed.

So, it's probably worth the annoyance of using a Veracrypt bootable disk to keep the Windows partition encrypted.


systemctl .service can't read the environment variable

that shown my django can't access(read) the environment variable

Because systemd is not running in a shell with your user and that user environment and those variables.

  when i running uwsgi in command line

then you are using your own user with that environment and those variables.

You need a

EnvironmentFile=/dir/to/file

before your ExecStart. Or if it is not that many you can also do

Environment={VAR}={VALUE}

(one line per variable) where

{VAR} is the name of your environment variable
{VALUE} is the value of that {VAR}


How to make a multistep command ask for inputs?

You could use something like this:

#!/bin/bash

echo "enter URL"
read URL
echo "enter filename"
read NAME

w3m -dump "$URL" > "$NAME"

You can save this as run_w3m.sh, make it executable with chmod 755 run_w3m.sh and run it with ./run_w3m.sh.
The script will ask for the URL and the path to the file.


You don't have mfc42.dll installed. You can obtain it by opening a terminal and typing:

winetricks mfc42

It will download the required file and then you probably will be able to install it.


I have the same problem, because some missing files at the installation CD. Purple blank screen. May be helpful: ctrl-alt-del, then enter, after you can get modprob, type help, get list of command, type lsfmd (soft mod), type exit. If you get purple screen with options try 'recovery mod'. But, this is temporary solution.


Ubuntu Server 20.04.1 LTS, not all disk space was allocated during installation?

I had this problem also. The link below has instructions on how to extend the LVM partition to use all available space.
https://www.linuxtechi.com/extend-lvm-partitions/
Not mentioned in the above link is this command to use all remaining space rather than specifying a specific amount to add:
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

The installation is misleading because I specifically selected the option to use all available space, but not all available space was utilized.


Why do some packages disappear from the repositories?

Packages are removed from the repository in newer releases for different reasons.

Often package names have a reference to its version. In this case, a newer version might exist. In this case the dependency for your package might need to be updated. However, this is rather a replacement than a pure dropping of packages.

Packages are often dropped when there is no active development anymore, and they are not in a state than is valuable. It makes no sense to keep packages with critical bugs which are not fixed.

Another reason might be that no maintainer works on the package anymore. This might even be the case in Debian, since a lot of Ubuntu's packages are synced from Debian. This is a matter of interest. If the current maintainer has no time or passion anymore, the package is put on a list of orphaned packages. This allows the community to look if someone else will step up. If not, it will be dropped after some time since it is assumed that nobody has interest in the package anymore.

In your particular case, the GNU Fortran 77 was replaced by the GNU Fortran 95 compiler. Hence the runtime libraries have been dropped too. I am not sure if that helps you, but your package should be made to run on the new Fortran compiler (which should be possible if it is open source). Then it will use the new library which is available.


Gnome Themes: Why the color of the calendar window is not according to the theme?

I have gone through "MacOS 5.2" shell theme..

It is missing the "background-color:" entry and thus taking the color from resources.. which is that dark/light gray color.
so search for the below content from the shell theme css file
.calendar {
   margin-bottom: 1em }

add your preferred color, for example:
.calendar {
    background-color: rgba(3, 117, 248, 0.6);
    margin-bottom: 1em; }

the weather section is also missing causing the dark/light gray..
for this, a better way is to grab the "weather" part from resources gnome-shell.css file. for example, I have copy pasted the below content and edit the colors as I wish.
/* Weather */
.weather-button {
  border-width: 1px;
  border-style: solid;
  border-radius: 7px;
  margin: 4px;
  color: #eeeeec;
  background-color: rgba(3, 117, 248, 0.6);
  border-color: #2b2b2b;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px rgba(0, 0, 0, 0.2);
  icon-shadow: 0 1px rgba(0, 0, 0, 0.2);
  padding: 12px; }
  .weather-button:focus {
    color: #eeeeec;
    text-shadow: 0 1px rgba(0, 0, 0, 0.2);
    icon-shadow: 0 1px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 0 2px rgba(27, 106, 203, 0.6); }
  .weather-button:hover {
    color: #eeeeec;
    background-color: rgba(3, 117, 248, 0.6);
    border-color: #2b2b2b;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px rgba(0, 0, 0, 0.2);
    icon-shadow: 0 1px rgba(0, 0, 0, 0.2); }
  .weather-button:active {
    color: #eeeeec;
    background-color: rgba(3, 117, 248, 0.8);
    border-color: #191919;
    text-shadow: none;
    icon-shadow: none;
    box-shadow: none; }
  .weather-button .weather-box {
    spacing: 10px; }
  .weather-button .weather-header-box {
    spacing: 6px; }
  .weather-button .weather-header {
    color: #878787;
    font-weight: bold; }
    .weather-button .weather-header.location {
      font-weight: normal;
      font-size: 10pt; }
  .weather-button .weather-grid {
    spacing-rows: 6px;
    spacing-columns: 12px; }
  .weather-button .weather-forecast-time {
    color: #a6a69b;
    font-feature-settings: "tnum";
    font-size: 9pt;
    font-weight: normal;
    padding-top: 0.2em;
    padding-bottom: 0.4em; }
  .weather-button .weather-forecast-icon {
    icon-size: 2.18em; }
  .weather-button .weather-forecast-temp {
    font-weight: bold; }

The result is

So nothing is limited here for the customization, you may adapt different contents as you wish taking the source from default gnome-shell's resource or any one as you wish.
You may raise the missing part issue to the authors of the themes if you wish to to correct them in their next update.


Xubuntu loading slow after the session/password select

Yes, changing swappiness can slow down your computer. It is the threshold at which the system will swap data from the ram to the hard drive in order to preserve space. Data can be found, read and written much faster in memory than on the hard drive. Therefore it is best to keep data in memory and only swap to the hard drive when memory is very low. By default, swappiness is set to 60 and changing this value will determine how the system behaves in these situations.

Increasing this value will cause the system to swap more often. Even when it may be unnecessary. It will be more likely that the data you are seeking has been swapped out of memory. As I said earlier file manipulation is much slower on a hard disk so even simple tasks may take much longer than normal to complete.

Decreasing this value will cause the system to avoid swapping data to the hard disk. Sometimes this is recommended to increase performance but this could backfire if you have little ram to begin with. So, low ram combined with a low swappiness value can result in a system that will run out of memory quickly, while being reluctant to free memory through swapping.

I would recommend that you return the swappiness value to the default of 60. Monitor how the computer behaves. Hopefully you will see improvement.


Why does /cdrom folder exist? Shouldn't it be /media/cdrom or /mnt/cdrom?

If you do a detailed listing of the root directory, you will see that /cdrom is just a link to /media/cdrom - a shortcut for convenience.

$ ls -l /
total 120
drwxr-xr-x   2 root root  4096 2010-11-11 01:23 bin
drwxr-xr-x   3 root root  4096 2010-10-21 18:51 boot
lrwxrwxrwx   1 root root    11 2009-11-19 09:25 cdrom -> media/cdrom
...


how to use wifi on ubuntu 16.04 instaled over vm ware workstation pro 12 in windows 10

In Virtual Machine you can not use WiFi. I think this is for safty reason but I an not sure. If you realy want to have WiFi in VM there is possibility to connect external wifi card to VM.

Now..if you installed Ubuntu 16.04 as dual boot next to Win 8.1 and there is still no wifi than thare is also a problem with ubuntu not detecting your wifi card on that laptop.


Most proxies restrict available ports.. talk to your network admin


Why do I have to reinstall video drivers on kernel updates?

Any drivers not part of the main kernel tree (which of course includes proprietary drivers) must be rebuilt for new kernel versions as internal kernel interfaces may have changed.  Drivers are tightly coupled to the kernel because they run in kernel space and use internal kernel interfaces.  Applications are a different ballgame and use the syscall interface, which is the userland to kernel interface, and that interface is extremely stable.

Greg Kroah-Hartman has posted a great article about this subject here.


In Ubuntu the /snap directory is under where snaps are mounted, and some symlinks to binaries. You don't want to move this around, as things will not behave as you expect (note in other distros that's /var/lib/snapd/snap). If you're using du to determine the amount of space used, you should pass -x (--one-file-system) so it does not go into the snaps themselves. Compare,

$ sudo du -sh /snap
8.6G    /snap
$ sudo du -shx /snap
108K    /snap

that second number is the actual space used. Those 8.6G aren't "used" anywhere, because snaps are stored compressed:

$ du -sh /var/lib/snapd/snaps
2.5G    /var/lib/snapd/snaps

If you're running short of storage on the partition that holds /var/lib/snapd/snaps you could look into moving it (or even the whole of /var/lib/snapd) to a different partition. It's a little tricky because those files are mounted, but you can stop snapd (so it doesn't start a refresh in the middle of this), stop the mount units by hand, and then move them around safely. If you mount the new partition using a systemd mount unit it should figure out the ordering on its own (if you already have a partition and are moving them to a subdirectory, a bind mount unit will also work).


Shell script to remove unity launcher(if present in Ubuntu 14.04 ) and/or the xfce panel (in the case of xubuntu)

Update:

To completely remove the launcher for the time your script execution, I'd disable the unity compiz plugin.

We have such a script in Checkbox, that I'm pasting here for convenience:

#!/usr/bin/env python3
# This file is part of Checkbox.
#
# Copyright 2014-2015 Canonical Ltd.
# Written by:
#   Daniel Manrique <roadmr@ubuntu.com>
#   Sylvain Pineau <sylvain.pineau@canonical.com>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
"""
manage_compiz_plugin
====================

This script allows enabling or disabling compiz plugins using
gsettings. Changes take effect on the fly.
"""

from gettext import gettext as _
import argparse
import gettext
import os
import sys
import subprocess
import time

PATH="org.compiz.core:/org/compiz/profiles/unity/plugins/core/"
KEY="active-plugins"

gettext.textdomain("2013.com.canonical.certification.checkbox")
gettext.bindtextdomain("2013.com.canonical.certification.checkbox",
                       os.getenv("CHECKBOX_PROVIDER_LOCALE_DIR", None))

plugins = eval(subprocess.check_output(["gsettings", "get", PATH, KEY]))

parser = argparse.ArgumentParser(description=_("enable/disable compiz plugins"),
                                 epilog=_("Available plugins: {}").format(plugins))
parser.add_argument("plugin", type=str, help=_('Name of plugin to control'))
parser.add_argument("action", type=str, choices=['enable', 'disable'],
                    help=_("What to do with the plugin"))

args = parser.parse_args()

if args.action == 'enable':
    if args.plugin in plugins:
        raise SystemExit(_("Plugin {} already enabled").format(args.plugin))
    plugins.append(args.plugin)
else:
    if args.plugin not in plugins:
        raise SystemExit(_("Plugin {} doesn't exist").format(args.plugin))
    plugins.remove(args.plugin)
subprocess.call(["gsettings", "set", PATH, KEY, str(plugins)])

time.sleep(3)

To disable the unity plugin:

./manage_compiz_plugin unityshell disable

To restore it:

./manage_compiz_plugin unityshell enable

First version (using auto-hide):

To hide the unity launcher, use the following commands:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 0

To restore it, simply use:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 2


Rufus Bells and Whistles or Rufus vs Etcher

Rufus Options
When I use Rufus, I just use default settings 90% of the time.
If I have more than one USB device plugged in, I use Device to select the correct drive. In Etcher it is also important to confirm that the correct drive is checked under Select target, Etcher can flash multiple USB's and HDD's at one time.
If I want a Persistent USB, that saves my changes, I adjust the Persistent partition size slider. (Persistent partitions do not work using Rufus with pre-19.10 Ubuntu).  Etcher has no persistence option. Space not used by the OS and boot partition is wasted.
If I want to ensure the USB will only install in UEFI mode, (mainly for Dual booting), I click Partition scheme and select GPT. The Target system changes to UEFI (non CSM). All Etcher Ubuntu installs work in either BIOS or UEFI mode.
If I want to install to a USB hard drive, I check List USB Hard Drives. This can be very dangerous and lead to many destroyed vacation photos. Etcher has an option in settings, (upper right of the window), for Unsafe mode. Placing a check in this box will allow an install, not only to USB hard drives, but also to internal drives.
If I want to label the USB I select Volume label and add my choice or leave default to use the ISO name. Etcher just uses the full ISO name
I usually keep File system as FAT32 (Default). NTFS allows files over 4GB. Using FAT32 or NTFS allows data to be written to the OS partition and read from the cdrom folder while running, Etcher clones the ISO or IMG file and uses the file systems from them, ISO9660 in the case of Ubuntu. All space on the drive that is not used for OS or boot is wasted.
I have never found a reason to touch Cluster size.
If I want to zero the USB to ensure there are no artifacts from old installs, I remove the check from Quick format. This may greatly increase creation time.
I leave Create extended label... checked. Not checking Create extended label..., uses an abbreviated Volume label.
I do not Check device for bad blocks unless the drive has been giving me problems.
I leave everything not mentioned above per default.
After pressing Start, if persistence is not chosen, there is an option to Write in ISO image mode or Write in dd image mode. The latter will clone a Ubuntu ISO as ISO9660, the same as Etcher uses.


Ubuntu 12.10 Very Slow On ASUS EEEPC 1225B

Ok I have a laptop with the same specs so I'l give you a run down on what to do. but please note it will still be a tad slow and I recommend you use a different DE just as LXDE or XFCE instead of unity.

Ok first install CCM (Compiz settings) and go to open GL and uncheck sync to vblank,

now install the kernel headers (this is for the official drivers from AMD) it should be

"sudo apt-get install linux-headers-$(uname -r)"

Ok last step, go to software sources > additional drivers and activate AMD updates or one of them, hit apply. Now reboot your system for changes to take affect, if when you login its stuck at 1024x768 and compiz wont start, hit ctrl + T and reinstall the kernel headers.

Once you do all this you can still edit some settings in the AMD control pannel which may help it even more.

I hope this is helpfull.


Can't upgrade to package version listed on Launchpad

The latest build released for groovy in that PPA was built on 2020-09-07.  The later version is for hirsute and not groovy.
https://launchpad.net/%7Echrdevs/+archive/ubuntu/figma/+packages?field.name_filter=&field.status_filter=published&field.series_filter=groovy
The build of 0.6.4 is
figma-linux - 0.6.4-1ubuntu0    (changes file)  48 minutes ago  Published   Hirsute     Graphics    All builds were built successfully.
figma-linux - 0.6.3-1ubuntu0    (changes file)  2020-09-07  Published   Xenial  Graphics    All builds were built successfully.
figma-linux - 0.6.3-1ubuntu0    (changes file)  2020-09-07  Published   Bionic  Graphics    All builds were built successfully.
figma-linux - 0.6.3-1ubuntu0    (changes file)  2020-09-07  Published   Focal   Graphics    All builds were built successfully.
figma-linux - 0.6.3-1ubuntu0    (changes file)  2020-09-07  Published   Groovy  Graphics

Note the "Hirsute"


libgtk-x11-2.0.so.0:i386 not available on Ubuntu 13.10 64 bit; troubles with Adobe Air

Since you said libgtk-x11-2:i386 is installed (via apt, which doesn't lie, usually), you should symlink to /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0:

cd /usr/lib
rm ./libgtk-x11-2.0.so.0
ln -s /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0


Short answer is: No, it's a bad idea.
Let's look at the code:
#!/bin/bash

OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"

if [ $USER != root ]; then
  echo -e $RED"Error: must be root"
  echo -e $YELLOW"Exiting..."$ENDCOLOR
  exit 0
fi

echo -e $YELLOW"Cleaning apt cache..."$ENDCOLOR
aptitude clean

echo -e $YELLOW"Removing old config files..."$ENDCOLOR
sudo aptitude purge $OLDCONF

echo -e $YELLOW"Removing old kernels..."$ENDCOLOR
sudo aptitude purge $OLDKERNELS

echo -e $YELLOW"Emptying every trashes..."$ENDCOLOR
rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
rm -rf /root/.local/share/Trash/*/** &> /dev/null

echo -e $YELLOW"Script Finished!"$ENDCOLOR

This script basically consists of 3 calls of a package management tool and it empties the trash folders of each user. Honestly what's the gain here? Freeing up some megabytes or gigabytes, that's all. If you're aiming for a performance gain you're mistaken. If your hard drive is the bottleneck of your current Ubuntu setup, I recommend buying a SSD. It's better to spend that money than spending valuable time trying to clean after something that always will get messy shortly after cleaning up.
I know CCleaner is very popular on Windows due to the habit of Windows users trying to clean up the system because they keep believing that this will increase/restore the system performance. This is partially true because some application developers do a pretty poor job at integrating their applications into Windows, best examples are vendor customized pre-installed versions of Windows and installer packages extracting themselves several times before installation and not cleaning up afterwards (I look at you LENOVO!).
Regarding privacy concerns Ubuntu started shipping an application in the default installation and I hope it will continue to improve that functionality, it looks promising.
However package management as in Ubuntu and most major Linux distributions solves most of the afore mentioned problems. Using the script for system administration is a bad idea. Instead you should be knowing what the script does and remember the commands to execute them individually when needed.
Cleaning APT cache
If I recall correctly, the graphical update manager already takes care of this, so use the update manager instead of aptitude clean if you can.
Removing old config files
Those files don't take up a lot of space and in some cases you would be happy to find an application already configured upon reinstall. If the opposite is the case you can always reconfigure the package via dpkg.
Removing old kernels
Old kernels can take up 200 megabytes and more each. It has been discussed several times how to safely integrate this feature into the update manager. There are blueprints out there, but they don't seem to be implemented until know, mostly because it's difficult to decide which kernel to keep and which not. Deleting all but the newest is considered not to be a good idea.
Emptying trash
In a proper setup this shouldn't be an issue, because home folders should be placed on another file system than the root file system. Then again you as a system administrator can't just go there and empty users trash folders. This is bad management style and may break the work flow of the users. This issue is usually solved via quotas. In turn when you empty users trash folders you should be cleaning up their .thumbnails folders and other folders, too. Nope, set a quota if you have to manage users and you're done.
Remember the sudo reminder:

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

Respect the privacy of others.
Think before you type.
With great power comes great responsibility.

root's password:


The shell/terminal does not allow/show my password

When you enter your password at a sudo prompt, no letters or other symbols appear. Type your password correctly, hit enter, and everything should work fine.


Desktop not working after removing unity 11.10

Try these commands in terminal:

gsettings set org.gnome.desktop.background draw-background true
gsettings set org.gnome.desktop.background show-desktop-icons true


How to set Tilda as the default terminal?

1.Add tilda to the list of terminals:

update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/tilda 0

2.set x-terminal-emulator to tilda

update-alternatives --set x-terminal-emulator /usr/bin/tilda

PS: valid on Ubuntu 16.04


If you use PHP5, I think you have to install "php5-mysql" :

sudo apt-get install php5-mysql


No file or picture opening in Ubuntu 12.04

Provided that you did not use the -R recursive command, you can recover from this using

cd ~/
chmod 755 *
chmod 644 examples.desktop
chmod 777 Public
chmod 700 vpnserver
chmod 775 softether-vpnserver-v4.04-9412-rtm-2014.01.15-linux-x64-64bit.tar.gz

I can't give instructions for the dwhelper directory or the SoftEther-VPN-Server file as I don't know what the default permissions of those should be. I suspect that 755 will be fine for for both of them.

In the future when using chmod be very specific about what file or directory you are changing permissions on. The wildcard * will apply it to everything in the specified or current directory. Read man chmod for the full list of chmod commands and implications of usage.


Is there any video-chat-via-lan software?

Ekiga (formely known as GnomeMeeting) is an open source SoftPhone,
  Video Conferencing and Instant Messenger application over the
  Internet.

  It supports HD sound quality and video up to DVD size and quality.

  It is interoperable with many other standard compliant softwares,
  hardwares and service providers as it uses both the major telephony
  standards (SIP and H.323).1

To install, press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install ekiga

1Source:Ekiga


last time I tried in Ubuntu (maybe 10.04 or 10.10) ... it mounted in /media/UUID.

this might not help, but in latest linux mint, it is /media/username/UUID.

anyway, you can always run 'mount' command in terminal with normal user and without any arguments, it will tell you where your partition are mounted.

sample output (in this case, my UUID is 0000-AAAA) :

/dev/sda5 on / type ext4 (rw,errors=remount-ro)
................ more partition here .................
/dev/sda6 on /media/rinaldo/0000-AAAA type fat32 (rw)


List Linux kernel markers in alphabetical order

Kernel markers were removed entirely from the Linux kernel in version 2.6.32.

As of December 2009, there aren't any.


xUbuntu: screensaver settings are missed with two monitor

Just type:

sudo apt-get install xscreensaver


No Sound in 12.04 on Acer TimelineX 3830TG

I had the same problem on my Acer 5830TG.

I should remove any sound drivers and install the default alsa drivers.

Check your alsa drivers version number with

cat /proc/asound/version

The current version is 1.0.25 at the time of writing.

I updated my drivers to this version and my speakers started working.
You can download the source code and compile the driver and install,
 or use the alsa install script from the official website.


gnome-terminal creates a space after each accentuated letter

Ok I get it.

Since it was related to gnome-terminal only, I tried to reset all gnome-terminal settings.

I passed this command and my gnome terminal was cured :

dconf reset -f /org/gnome/terminal/legacy/profiles:/

source : How to reset the terminal properties and preferences?

Note : the following command did no error but did not work for my problem :

gconftool --recursive-unset /apps/gnome-terminal


The only dependency issue is gnome-shell, which is the primary interface for gnome3.  Just install gnome-shell.


How to downgrade Broadcom wireless drivers bcmwl-kernel-source?

I managed to downgrade the wireless driver but I still have the same problems. I also tried other drivers such as bcma and even ndiswrapper (Windows drivers) and the problem persists. I believe the problem is in the new kernel, so it seems I'll have to go back to 12.10.

Having installed Ubuntu since 11.04, from my experience, it gets harder in every Ubuntu release to get the same wifi card working...

Anyway, if it's useful for someone, this is how I downgraded the driver:

First, uninstall the current driver and install the new  one from the .deb file.

sudo apt-get remove --purge bcmwl-kernel-source
sudo dpkg -i /deb_file_location/bcmwl-kernel-source_5.100.82.112+bdcom-0ubuntu3_amd64.deb

Lock the package version to prevent updates.

pkexec gedit /etc/apt/preferences.d/bcmwl-kernel-source

and paste in the pollowing:

Package: bcmwl-kernel-source
Pin: version 5.100.82.112+bdcom*
Pin-Priority: 1001

I also blacklisted the other modules to be sure that they don't get loaded on boot, but this may not be necessary in all cases.

pkexec gedit /etc/modprobe.d/blacklist-bcm43.conf

and add the following:

blacklist brcmsmac
blacklist bcma

Reboot and done. You can check that the driver is in use by typing:

lspci -k | grep wl

Which should return:

Kernel driver in use: wl


The standard way to make changes to /sys at boot is to use sysfsutils. The package may not be installed by default, so first do:

sudo apt install sysfsutils

now edit the file /etc/sysfs.conf, for example:

sudo nano /etc/sysfs.conf

and add this line to the end of it, then save, exit, and reboot:

module/hid_apple/parameters/iso_layout = 0

This will do the same as your echo command.


Netplan try erroring out while making Static IP Change

This netplan and DNS setup works on Ubuntu 19.10 and 20.04.  I'm adding a static IP as well as using dynamic IP assigned by router / DHCP.  My ISP intercepts DNS hence I use DNS over TLS (127.0.0.53) plus stubby so I can set docker to use this static IP for DNS.
network:
  ethernets:
    enp0s3:
      addresses:
      - 192.168.1.202/24
      dhcp4: true
      dhcp4-overrides:
        use-dns: false
      dhcp6: true
      dhcp6-overrides:
        use-dns: false
      gateway4: 192.168.1.1
      nameservers:
        addresses:
        - 8.8.8.8
  renderer: networkd
  version: 2

Putting it all together - place netplan cfg, apply it and DNS setup.  Are you copying / naming your netplan cfg correctly and applying it?
#!/bin/bash
# static IP - DNS servers and don't use gateway for DNS
# https://netplan.io/examples
# https://netplan.io/reference
sudo cp $HOME/mediacentre/bin/01-netcfg.yaml /etc/netplan/.
sudo netplan apply
# DNS over TLS
# https://www.internetsociety.org/blog/2018/12/dns-privacy-in-linux-systemd/
sudo cp $HOME/mediacentre/bin/resolved.conf /etc/systemd/.
sudo systemctl restart systemd-resolved
# test it...
resolvectl query bbc.co.uk

# install stubby to do DNS over TLS
sudo apt-get install -y stubby
# use patched stubby config
sudo cp $HOME/mediacentre/bin/stubby.yml /etc/stubby/.
sudo systemctl restart stubby


How do the environments of a standard Terminal command-line and a bash script differ?

Assuming that you're using the same shell in your script and in your terminal, the main difference is that ~/.bashrc is read by interactive shells but not by script-interpreting shells. The reason is that scripts are usually meant to be somewhat portable, and for that you don't want to depend on the user's shell customizations.

Many things in typical .bashrc files only apply to the command line anyway (prompt settings, key bindings). Some, like function definitions, make sense in scripts as well; typically you'd put them into a separate file and source it both from ~/.bashrc and scripts. Sometimes you want some shell options for interactive use but not in scripts, because they lead to shorter (good on the command line) but more cryptic or less portable (bad in scripts) code. There are a few things that bash does differently, e.g. history expansion (!!, etc.) is on by default only in interactive shells.

Here you're using the +(…) construct, which is a ksh extended globbing pattern. Bash doesn't enable them by default (for backward compatibility) but you can turn them on with shopt -s extglob. Apparently you have this in your ~/.bashrc.

You can put shopt -s extglob in your script, or use a portable way of truncating leading 0s from a variable such as

var=${var#${var%%[!0]*}}


You can make a script:
Run gedit ~/.screenmod and paste

#!/bin/bash
gnome-terminal -e "bash -c \"xrandr -s 1366x768; exit; exec bash\""
exit 0

Save.

Make it executable: chmod +x ~/.screenmod

And then put it at startup applications:

Explanation:
We first create a file then change it to allow it to run as a script.

The script says:
1) Open the gnome-terminal and then
2) Invoke bash to
3) Run xrandr -s 1366x768 which will change the screen resolution, and
4) Close after that (exit),
5) Execute the commands (exec bash see here),
6) Close the script without error messages (exit 0).

In the first answer I think the problem was that we invoke the start up script with a shortcut ~/ instead of the the absolute path /home/[username]. Besides that, to be sure everything works, I decide to also change the script to first open a terminal and then execute what we want instead of just executing xrandr -s 1366x768.


Partially overwrite in a file through script

That's not built in to the shell in the same way simple overwrite and append are. You have to do it in two steps, first remove the last line, then append:

X=$(head -n -1 filepath)
echo "$X" > filepath
command >> filepath

Or you can overwrite with the new contents all at once:

X=$(head -n -1 test)
(echo "$X"; command) > test

Note that in both cases, we capture the old lines that we want to keep in a variable first as a separate command. This is because as soon as a command with a ">" directive begins executing, the shell will clear the file, and any attempt to read those lines will be too late.


Virtual box 4.3 error not support 64 bit?

I've had this issue before, and It turned out to be from the BIOS.

You should enable VirtualMachine support from the bios setup.

I hope that this what is preventing your 64 from showing up.


Make sure that you can connect to remote , ping remote should succeed

ping 192.168.100.76
Make sure that you have configure ssh credentials/certs properly
Make sure that the user have push permissions to remote

read some help on how to add a certificate for ssh auth to remote git

and add the remotes uri to your local repo configuration

check the output of this command whether you have configured the remote or not.

  $git remote -v


Ubuntu Server won't work in QEMU: KERNEL PANIC

Try

qemu-system-x86_64 -hda confImage -m 1024


You can do what you want with one single command, with caveats.
Read on.

NOTICE: What follows is almost integrally quoted from this archlinux.org wiki. I introduced just a few changes in wording and format here and there, but nothing substantial. All the merit definitely goes to maintainers of and contributors to the excellent wiki.archlinux.org.

This command depends on brace expansion available in both the bash and zsh shells. When using a different shell, --exclude patterns should be repeated manually.

$ rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder

Using the -aAX set of options, the files are transferred in archive mode, ensuring that symbolic links, devices, permissions and ownerships, modification times, ACLs and extended attributes are preserved.

The --exclude option will cause files that match the given patterns to be excluded.
The contents of /dev, /proc, /sys, /tmp and /run were excluded because they are populated at boot (while the folders themselves are not created), /lost+found is filesystem-specific.
Quoting the exclude patterns will avoid expansion by shell, which is necessary e.g. when backing up over SSH.
Ending the excluded paths with * will still ensure that the directories themselves are created if not already existing.

Note:
- If you plan on backing up your system somewhere other than /mnt or /media, do not forget to add it to the list of exclude patterns to avoid an infinite loop.
- If there are any bind mounts in the system, they should be excluded as well, so that the bind mounted contents is copied only once.
- If you use a swap file, make sure to exclude it as well.
- Consider also whether you really want to backup the /home/ folder. If it contains user data (e.g. on a desktop OS), it might be considerably larger than the system itself and NOT relevant to the backed up system itself.
- Otherwise [e.g. on a server machine] consider excluding unimportant subdirectories such as /home/*, /.thumbnails/*, /home/*/.cache/mozilla/*, /home/*/.cache/chromium/*, /home/*/.local/share/Trash/*, depending on software installed on the system. If GVFS is installed, /home/*/.gvfs must be excluded to prevent rsync errors.

If you want to do this in a cron job, e.g. at reboot, use the @reboot directive in the cron job instead of a particular day or time. For example, the following cron job runs the script.sh script file one time only after the system restarts:

In terminal (CTRL+ALT+T), from a non-root user account:

$ crontab -e
@reboot /absolute/path/to/script.sh

To program the job as a root cron job:

$ sudo -e crontab -e
@reboot /absolute/path/to/script.sh

Remember to specify the full path to the file you want to run in the cron job.
For more information about the @reboot directive and other directives you can use in cron jobs, type the following command at the command prompt:

$ man 5 crontab

Your script should be made executable.

$ sudo chmod +x /absolute/path/to/script.sh

If you plan to trigger it from a udev rule instead of a cron job, you should run the rsync cmd in the background, like so:

$ cat script.sh
#!/bin/bash
{
/usr/bin/rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder
} &
exit 0

Remember Startpage is yr friend !


"E: Unable to locate package touchpad-indicator" even after adding repository and enabling sources

You can install touchpad-indicator by downloading the .deb file.  Once downloaded, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to the folder where the file was downloaded, and run the command below:

sudo dpkg -i <package_name>

Now keep in mind if you get the error below:

touchpad-indicator depends on gir1.2-gconf-2.0; however:
  Package gir1.2-gconf-2.0 is not installed.
touchpad-indicator depends on python-pyudev; however:
  Package python-pyudev is not installed.

You can download Package gir1.2-gconf-2.0 here, and Package python-pyudev here


Ubuntu can be used as Hard Real time OS?

No.

Ubuntu uses Linux, which is not a real time kernel. Although you might be able to start from an Ubuntu system and modify the kernel so that it does meet real time guarantees, I don't think it would be correct to say that Ubuntu is a real time OS.

See How can I install a realtime kernel? which is a related question on modifying Ubuntu to run a Linux kernel that has been modified to add real time features.


Snap Store does not show categories [Ubuntu 20.04]

Lol:)

https://status.snapcraft.io/

4 days ago offline (not work)

Snap downloads (default)
api.snapcraft.io - search
api.snapcraft.io - refresh

Not the best solutions!


Is it recommended to format an external drive to ext4?

I think the core part of your question that is important is

  I will only use it on two Ubuntu machines.

I faced the same dilemma as you and chose EXT4. The primary reasons I chose EXT4 are because 1) EXT4 will preserve my file permissions and 2) EXT4 better manages the storage of the data on it (e.g., it doesn't need to be constantly defragged and "coddled" like NTFS does). EXT4 is a more self-reliant file system than NTFS.

The only negative to using EXT4 is that you won't be able to access the data on it via a Windows machine. But as you said in your question, this won't be a problem because you are only using Ubuntu machines.

IMHO, the only reason to use NTFS is if you need to access the filesystem with Windows. If you don't, NTFS is really an inferior file system.


What is the maximum recommended number of open file descriptors on my vmware which is currently 1024?

This has nothing to do with your CPU. It's a setting for how many open file descriptors you can have. It can be shown with ulimit -n. The default is 1024 per process.

The max limit a user can have can be set in /etc/security/limits.conf.

The currently configured system max can be seen with the command

$ cat /proc/sys/fs/file-max
601126

This value is the total for the system, not per process.

This can be changed by writing a new value to the same location, for instance echo 1000000 | sudo tee /proc/sys/fs/file-max. This is the upper limit.

The value in use is shown in /proc/sys/fs/file-nr, which has three numbers. The first is currently in use file descriptors, second is allocated, but free, descriptors, and the third is the system configured maximum.

The uliit per process can be changed by the user, up to the maximum described in /etc/security/limits.conf:

[~]$ ulimit -n
1024
[~]$ ulimit -n 2048
[~]$ ulimit -n
2048

In addition, you have two kinds of limits. Hard and soft. You can play with the soft limits, but only root can raise  hard limits. To show hard limits, run ulimit -H -n. The user can lower hard limits, but never raise them, even back to the initial value if decreased.

[~]$ ulimit -H -n
4096
[~]$ ulimit -H -n 2048
[~]$ ulimit -H -n 4096
bash: ulimit: open files: cannot modify limit: Operation not permitted
[~]$

If you have any more question about limits, I suggest you ask a more specific question, as it was rather wide open. There's not recommended value; different processes require different approaches. The defaults are sane for most applications, whilst some applications may run in to issues.

The short answer is not to worry unless you run into problems.


My install of Ubuntu 20.10 is in a boot loop and I can’t fix it

First enter into the GRUB boot menu. Some say hold down Shift while booting, but I can't seem to succeed with that. It might be something that used to work.
What I do and almost always succeed with is hitting Esc one time only, just as the BIOS displays its text.

To get a root prompt, with the machine in a "sane" state, i.e. being able to run apt-get or apt, and most other commands, after getting to the GRUB menu, select an option that says Advanced options for Ubuntu and then select the latest kernel's recovery mode.
In the recovery mode menu select these options:

fsck - to have your file systems checked and mounted in writable mode.
Enable networking, to be able to run apt-get.
Drop to root prompt. Note that you need an extra Enter.
Undo the edits in lightdm.conf that broke your system.
After you're done, type reboot or shutdown --poweroff now.


Use other environment variables in PATH definition

As muru said, this is a duplicate question. You can't do it in /etc/environment, but you can create e.g. /etc/profile.d/mypath.sh and give it this contents:

export PATH="$PATH:$SCALA_HOME/bin"

Reference: EnvironmentVariables


Why have Canonical installed core Gnome apps as Snaps by default?

Is it just me who feels this hasn't been communicated clearly to the
  users or are the average users now expected to check developer blogs
  and launchpad for changes?

This was discussed online a lot over the last 5 months or so. Many news outlets covered it, including Phoronix and OMGUbuntu. We don't expect everyone to keep up with all the technical details of how Ubuntu is built. This is why we publish Release Notes which says

  "Some utilities have been switched to the snap format for new
  installs (Calculator, Characters, Logs, and System Monitor). Snap apps
  provide better isolation which allows them to be upgraded to new
  stable releases during the LTS lifecycle. "

In addition, for many, the switch from deb to snap is largely irrelevant technical detail. It would be (for many) like the switch from Upstart to SystemD. A technical thing that matters to people who care, but the vast majority it doesn't matter.

I also commented on the further point of why things are delivered as snaps on the linked reddit thread, but am reproducing here in case the comment disappears.

  When the LTS has just come out and most of the apps in the archive are
  at similar release numbers to those in the snap store, sure, it may be
  perplexing.

  However, take into considering those people who are still running
  14.04, a 4 year old release. When 14.04 came out everything in the archive was new and fresh. Cut forward 4 years and now a lot of that
  software is old. The same will be true for 18.04 users in the year
  2022.

  While it's true some people will upgrade to the next LTS, and many
  people did upgrade to 16.04. Not everyone does. We have a significant
  chunk of users who stick on older LTS releases. What we're doing with
  snaps is planting a seed for a tree that will grow in a year or so.
  Making sure that people who install the LTS can know they will get
  updates to software long into the future, and not be 'forced' to
  upgrade to the next LTS or interim release just to get the latest
  video player, utility or productivity application.

  With 18.04, this was the first release where we pre-installed some
  snaps. This was partly to test the process, likely more apps will
  switch to being snaps in the future.

  Now, all that said, snaps aren't perfect. Sometimes they can be slow
  to start, and the theming isn't right in all cases. We're working to
  fix these issues. I would strongly recommend if you have specific
  actionable feedback for the snap team, you take it to the forum where the developers hang out. https://forum.snapcraft.io/. The
  developers don't sit on Reddit all day (I do though ;) ) and need to
  hear these issues from users. We appreciate the feedback.


Higher resolution when switching to tty terminal

Please see this Ubuntu help entry:

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


How would I remove/ignore bad sectors in the Ubuntu Live CD?

You can run badblocks -sv /dev/sda to test the device, from the shell after the installer exits.

You can possibly check a box saying "scan disk for errors" before making the filesystem, and that may help it work around the problem.

If it doesn't, and if you really have 195 bad blocks, you are probably better off just buying a new disk.  Even if you did get it to install, more might fail in future and then where would you be?

Drives of decent size start at only about $40 in the US, and not that much more outside. I've been a poor student too but it's not that much.

mke2fs, the command that is used to initialize the disk has a -cc option that checks the disk for errors and lays out the filesystem so that it won't use those blocks.  If you check the "scan disk" option in the graphical or text mode installer, it ought to end up using that option, and then if there is any way to get this disk working, it will work.  If that doesn't work (you should paste the exact errors) then the disk is probably unrecoverably bad.


How do I get name of computer to display in arp-scan?

Your /etc/hosts file should look like this:

127.0.0.1   localhost
127.0.1.1   HOSTNAMEHERE

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

and your /etc/hostname file should look like this:

HOSTNAMEHERE


How do I install the LSI megacli in Ubuntu?

Its returning empty because you are running the executable without the libraries.

To install it correctly go the the LSI download site and search for megacli.

Download the latest version (release 8.07):

Extract it via a gui or with the command unzip MegaCli_Linux.zip.

Install the extracted .deb file with dpkg -i megacli_8.07.08-1_all.deb or just double click the deb file if you are running a desktop.


Ubuntu 14.04 does not detect my wireless network

Got it to work by changing my router's channel to 6. It was on 13 and Ubuntu wasn't able to detect it. Don't know why.


How can we install lethe on Ubuntu 18.04?

You found very interesting peace of software.
Having equivalent of Faronics Deep Freeze on Ubuntu will be great.

Let's start with downloading of the software:

wget https://kent.dl.sourceforge.net/project/lethe/lethe/0.3x/lethe_0.34_all.deb
sudo apt-get install ./lethe_0.34_all.deb

But it will not install with error:

Generating grub configuration file ...
/etc/grub.d/09_lethe: 22: .: Can't open /usr/lib/grub/update-grub_lib
dpkg: error processing package lethe (--configure):
 installed lethe package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 lethe
E: Sub-process /usr/bin/dpkg returned an error code (1)

We need to recreate this file from previous Ubuntu version, or maybe Debian Wheezy (see this link from packages.debian.org):

cat <<\EOF | sudo tee /usr/lib/grub/update-grub_lib
# stub for new grub-mkconfig_lib
# Copyright (C) 2007,2008  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"

. "${datarootdir}/grub/grub-mkconfig_lib"

grub_warn "update-grub_lib is deprecated, use grub-mkconfig_lib instead"
EOF

and make it executable

sudo chmod +x /usr/lib/grub/update-grub_lib

then install package again:

sudo apt-get install ./lethe_0.34_all.deb

then you should disable AppArmor to get NetworkManager and other stuff working on freezed system:

sudo sed -i "s/aufs=tmpfs$/aufs=tmpfs apparmor=0/" /etc/lethe/09_lethe /etc/grub.d/09_lethe
sudo update-initramfs -u -k all
sudo update-grub

Reboot and enjoy:

  $ cat /proc/cmdline
     BOOT_IMAGE=/boot/vmlinuz-4.15.0-33-generic root=UUID=2772ff62-4902-4409-a588-cffebbf33209 ro quiet splash aufs=tmpfs apparmor=0

I have tested this method on Ubuntu 16.04 LTS and 18.04 LTS: after installation of Lethe I booted new system, created new file, then rebooted and can't find the file in place. So it really works!


You are using ln -s with the arguments the wrong way round. Think cp when you use ln: the source comes first, the destination last.

You want to have a link /var/lib/mysql pointing to actual directory /home/databasesmysql. If you were copying you would do:

cp -r /home/databasesmysql /var/lib/mysql

So with ln -s you do:

ln -s /home/databasesmysql /var/lib/mysql


consolidation of html files with their folders

MS Word is the only application I know that saves HTML files in a 'files' folder, and associates js/css/images to their (encoded) html page. Is that what you mean?

No browser I am aware of, not even Internet Explorer in Windows, saves entire site directories for you in the same manner as does Microsoft Word can save related items to a Files folder.

Browser files are usually saved to the 'Downloads' directory if actually downloaded, otherwise they are cached.  In either case, you have to purge individual files or all files, there is no 'convenient' association of HTML files to their image/js/css files when floating in a download or cache folder.

That said, you might investigate Star Office or OfficeLibre and see if their Writer has the same ability to save HTML pages and their associated content in a single folder as MS Word can/does.


How to install Adventure Works DB on Ubuntu 16.04?

You can download the sample database here:
https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks2017.bak

Now, restore the database:

RESTORE DATABASE [AdventureWorks2017]
FROM DISK = N'/YOUR_DOWNLOAD_PATH/AdventureWorks2017.bak'
WITH MOVE 'AdventureWorks2017'
TO '/var/opt/mssql/data/AdventureWorks2017.mdf',
MOVE 'AdventureWorks2017_log'
TO '/var/opt/mssql/data/AdventureWorks2017.ldf';
GO


cli command to run keyboard shortcuts, e.g. Alt-F2?

That is almost certainly not a dedicated program but just a part of Unity. I know this is the case for Cinnamon for example.

As an alternative, you can set the hot corner to launch a terminal. That's basically the same thing except that you'll have to close the terminal manually.

In the specific case of cinnamon, what is run is a javascript script. Cinnamon runs a lot of javascript under the hood. That is not something you can run yourself, however, it is being interpreted by cinnamon itself and is not an external program. Specifically, Alt+F2 will run /usr/share/cinnamon/js/ui/runDialog.js but I don't think it will be possible to run that manually.


You can test if a TCP connection can be made to to a given host and port using bash:

bash -c 'read -t0 < /dev/tcp/<proxy-ip>/<proxy-port>'

This doesn't check if the service on the other end is a proxy, but merely if there is something listening on the other end.

Another option would be to run apt-get for a single repository, for example, by writing deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) restricted to a file and using it as the source.


Is there an easy way to set up a home FTP server?

The easiest thing would be to use SFTP. It has the advantage of being encrypted (communicating over SSH). To install a server for SSH/SFTP, press Ctrl+Alt+T to open a terminal and run this command:

sudo apt-get install openssh-server

Then use ifconfig to find out the IP address of your computer. You can then connect to it from other computers using this address.

If your computer is running ubuntu, just select the "Connect to server" option (I don't use unity, but it should be easy enough to find. You will get a window like the picture below. Make sure to use the correct IP address and enter your username and password.

If you need to connect from a Windows computer, you can use WinSCP.


How to configure Firefox to not save anything other than authentication cookies?

Go to Edit >> Preferences >> Privacy, untick everything except for cookies. Make sure to select the option "Clear History when Firefox closes" and to select "Cookies" in the advanced options.

Then install Biscuit add-on. This extension allows to select which cookies will be preserved when you close Firefox. You can select all cookies from specific sites or just the authentication cookies.

Make sure to tick the option "Remove all unwanted cookies on browser shutdown" at the bottom of Biscuit preferences.


Should /var/log be on an hdd partition when / is on an ssd?

Where do you reach such nonsense?  Unless you are running a very busy server, /var/log won't be written to that much.  You would have to be writing a few hundred MB/s to an SSD for several years to wear it out.  That would be an unfathomable amount of logs.


Why won't 12.04 install beside my Windows7?

If you already have 4 primary partitions on your main hard drive, this could be the issue.

You can check this with the gparted utility that comes with Ubuntu, just boot the live CD, open terminal and execute:

gksu gparted

Some computer manufacturer create multiple backup partitions to enable a system recovery. If this is the case, you can make a backup of a user partition, delete it and create a secondary partition.

You can create as multiple partitions on a secondary partition and ubuntu will install without problems.


"grub-install /dev/sda failed" for dual-boot with Windows 10

I ended up fixing it by re-installing in Legacy mode (successfully) and manually install grub-efi by doing the following from Can I install in UEFI mode with the alternate installer?

  After the installation, reboot the computer into a live CD or any
  Linux CD that can mount the hard drive partitions. Then, do the
  following: (replace # with appropriate partition numbers)

### Mounting ###

sudo mount /dev/sda# /mnt            #Mount root (/) partition
sudo mount /dev/sda# /mnt/boot       #Mount boot (/boot) partition
                                      (if separate from root partition)
sudo mkdir -p /mnt/boot/efi          #Create EFI partition mount point
sudo mount /dev/sda1 /mnt/boot/efi   #Mount EFI partition

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt                     #Chroot to your installation

### Installing ###

apt-get install grub-efi-amd64  #Install grub EFI bootloader

grub-install --recheck --no-floppy --force
                                     #Install grub bootloader in EFI partition

echo "configfile (hd0,gpt#)/boot/grub.cfg" > /boot/efi/ubuntu/grub.cfg
                                     #Tell grub to load grub.cfg from /boot

update-grub                          #Create grub menu list

exit                                 #Exit chroot

### Unmounting ###

sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt/boot/efi
sudo umount /mnt/boot
sudo umount /mnt


Ubuntu 16.04 4k@60hz via HDMI which card (and driver) is capable of that?

I also had some problems to get 4k@60hz on my television with Xubuntu 16.04 64 bit and an Asus Radeon RX 460 graphics card. After some configuration it works nearly perfectly now. Here is what I did and what is important:

Check if you selected the right HDMI slot at your television. On my TV only one slot supports 4k@60hz resolution.
On my TV I had to enable "deep color" for the correct HDMI slot
Set the HDMI slot of the TV in the TV settings to "slot connected to PC" if this option is available
Be sure to have a HDMI 2.0 cable or higher attached
Install the latest amd gpu pro driver from the amd support page
Correct the installation of the driver if necessary. I had to add symlinks to the vdpau libs otherwise accelerated video decoding is not working. I also had to change the "10-amdgpu-pro.conf" config file in order to avoid tearing in videos.
On Xubuntu I then have to activate the screen in the settings manager. This is a little annoying because often I have to try this multiple times until I get 4k@60hz resolution. This is probably a little bug but at least it is working in the end. Try to disable and enable the screen in the video settings or change the framerate lower and back to 60hz.

I have not installed the LunarG Vulkan loader yet.

Unfortunately there is no gpu accelerated decoding for videos in Firefox on Linux but after enabling OpenGL Off-Main-Thread Compositing I can at least watch 4k@30hz streams stutter-free on an Intel Core i5 750 CPU (4 physical cores at 2.7 GHz). The VLC player for example supports gpu accelerated video decoding, post-processing and rendering with version 2.2.0.

By the way I only have PCI-Express 2.0 slot and 3.0 is required for my graphics card but it's working good anyway even if I have not 100% performance.

I hope this helps someone :) Took me lots of hours to get everything working...


Click packages are the new packaging format used in Ubuntu Touch, and by Ubuntu 14.10, on the desktop version of Ubuntu as well.

Some of the features they provide are:

Simplified packaging for the developer. The Ubuntu SDK can automatically create Click packages of your Ubuntu Touch apps. If you want to create your own, the format is very simple, consisting of two files, manifest.json and <app-name>.json.

The manifiest.json file is the actual package definition and looks like this:

{
    "description": "Your tasks, every device, everywhere. Create and synchronize tasks using Ubuntu One, and connect to your boards in Trello.",
    "framework": "ubuntu-sdk-13.10",
    "hooks": {
        "ubuntu-tasks": {
            "apparmor": "ubuntu-tasks.json",
            "desktop": "ubuntu-tasks.desktop"
        }
    },
    "maintainer": "John Doe <john.doe@gmail.com>",
    "name": "com.ubuntu.developer.johndoe.ubuntu-tasks",
    "title": "Ubuntu Tasks",
    "version": "0.5"
}

The <app.name>.json file is the security profile for your app and looks like this:

{
    "policy_groups": [
        "networking"
    ],
    "policy_version": 1
}

To build your package, you can either use the Ubuntu SDK or by running

click build

The ability to run under confinement. What this means is that the app is prevented from doing bad things. It can only access its own private directory and access features that the user allows the app to use. This means that Click packages are very safe and the review process for publishing them is much simpler.

Once you've packaged your app, you can submit your application to the Click App Store. The review process is very simple and will be completed usually within a few hours. Once reviewed, your app will be available for installation from any device running Ubuntu Touch.

Would they make Debian packaging easier?

Yes and no. Debian packaging is completely different. However, if your app is made with the Ubuntu SDK, you don't need to use Debian packaging and can instead use Click packaging, which is much easier to use and much safer for the end user.


The date after the version number stands for the time when the version was compiled.

My guess is that the (5) has something to do with the Coordinated Universal Time (UTC) value. Maybe the time difference to UTC, in this case +5 hours? So far I couldn't find a document for that.

Seems like the number (5) stands for the times the makefile was executed (thx @ Sharath Manchala).

The version style is the following, just for proving my guess about the UTC date.

NTP uses A.B.C - style release numbers.

At the moment:

 A is 4, for ntp V4.
 B is the major release number.
 C is the minor release number.  Even numbers are 'stable' releases and
 odd numbers are "development" releases.

Following the release number may be the letter 'p' followed by a number.
This indicates a point (or patch) release.

Release candidates have -RC in the release number.

Here are some recent versions numbers as an example:

 4.2.2      A production release (from the ntp-stable repository)
 4.2.2p2    A production release (from the ntp-stable repository)
 4.2.3p12   A development release
 4.2.3p15-rc1   A release candidate for 4.2.4


Problems installing 20.04 desktop on main drive partition along side Windows 10

OP here.  For anyone having this same issue it was an problem with my version of Windows being in Legacy mode due to my drive somehow getting reformatted as MBR and not GPT during that first failed install.  I then tried installing Ubuntu as UEFI which would not work.  I had to change MBR to GPT (very simple!).  It was a bit of a long road but this post solved my issue:
Getting a “No EFI System Partition” error when trying to dual boot install Ubuntu 20.04 on a computer with Windows 10 already installed


http://www.thinkwiki.org/wiki/Tp_smapi#Installation_on_Ubuntu it says tp_smapi can not work on T430 because of the Ivy Bridge cpus.


I assumed I could use just the default desktop in ubuntu.
But i was wrong.
I installed mate like so:

 sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

And then I told xrdp to use it like this:

 echo mate-session >~/.xsession

And then i retried from my windows box and it works.


MacBook Pro 9,2, Ubuntu 12.10, Wifi works after suspend but not after reboot

Unfortunately, with Ubuntu 13.04 64bit, there is no out-of-the-box support for the wireless card of my macbook pro 9,2. But it can be activated by installing the package bcmwl-kernel-source:

sudo apt-get install bcmwl-kernel-source

That worked for me.
On the other hand, the sd card reader (integrated ethernet and card reader on broadcomm bcm57765 chipset) does not work and I haven't found a solution yet. If anybody did so, please let us know.


Repartitioning in 14.94 To Add Home Partion

You don't need to reinstall Ubuntu, but you do need to boot off of a Live CD.

From the Live CD, open up GParted.
Right-click on the ext4 Ubuntu partition and resize it. This will probably take up most of your hard drive. Shrink this partition as appropriate. Note that the changes won't be applied immediately.
In the free space that appears, right-click and create a new ext4 partition. This will be your /home partition.
Apply the changes (this is the check mark icon, if I recall correctly).
Boot into Ubuntu. In case there are any boot issues, use boot-repair.

The next steps are to move your files from /home to the other partition, and to have a directory in the other partition be recognized as /home. See the steps here or here for this.


bluetooth battery level indicator/display

I have developed a GUI application to get the battery level of a bluetooth headset and I tested it with my JBL tune 500bt You can check it on: https://github.com/Coutj/Bluetooth_project.git


"Wrong ufstype may corrupt your filesystem" - Should I be worried?

This message could be generated when the user or a script runs the update-grub script, which would explain why you get it after kernel update. From what i understood, update-grub tries to dynamically find all the possible partitions and operating systems in them for generating the most complete grub.conf file. one of the options(one of the last ones actually) that update-grub tries for mounting an unknown partition, is ufs. This is a bug however as it could be misleading and confuse the user.

More info: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1374759


How To Setup Domain Name for SchoolTool Local Server

If this is a local network, then you can use hostname.local to access the VM. For instance, if the VMs hostname is st, and you're connecting through a web browser, you can use http://st.local to access it without any setup. This will only be available on the local network. If you would like to change the hostname, that is done by simply editing the file /etc/hostname which only contains the hostname. In order to do so, press alt+f2 and enter gksu gedit /etc/hostname. You'll need to reboot for the change to be used.

If this should be available globally, then you'll need to add a DNS server, such as bind, and edit the zone file. You can read more about that here: https://help.ubuntu.com/11.10/serverguide/C/dns.html


Problem enabling Native Client (NaCl) in Chromium

appears from http://code.google.com/p/chromium/issues/detail?id=109989 that NaCl works if you download the official google version and not the Ubuntu distributed package (lame).


How to install ubuntu from another version of ubuntu?

To boot from a USB and then launch a live session of Ubuntu from your USB, you have to go into your BIOS and change your settings to first boot from USB  (Or you can select USB to boot from by entering the one-time boot selection). This will boot from a USB if there are any mounted, and then switch to booting from your hard drive into Grub. Grub will not show the USB as an option to boot from. Booting into BIOS or into the One-Time Boot Menu is typically some key like F2, F12, ESC, or anywhere in between. You can search in the manual for your computer to find the key, or you can look online for your model. If you want, you can post information on your computer model here and I can do the research for you.


What are practical advantages of using linux-image-virtual kernel?

The difference between the Virtual and Server kernels is that the Virtual kernel is intended to be utilized inside a virtual machine. The virtual kernel only includes the necessary drivers to run inside popular virtualization technologies such as KVM, Xen, and VMWare. The server kernel in contrast contains the necessary drivers to work with a wide range of hardware, and should be installed directly on host systems. Other than that, all other options are identical between the server and the virtual kernel.

https://help.ubuntu.com/community/ServerFaq#What_are_the_differences_between_the_server_and_virtual_kernels.3F

The difference is that the virtual kernel only bundles drivers needed for the common virtual hardware devices instead of all the modules for real-world hardware.

So it is considerably smaller in terms of disk space. I'm not aware of any tuning for performance or any functional difference that way, I think it's just for smaller images.

http://ubuntuforums.org/showthread.php?t=1635961


Ubuntu 16.04 - Where is the "make link" command now?

Apparently, the "make link" option still lies under Nautilus, just not visible.

To make use of it, just enter Nautilus Preferences > Behavior tab and mark the Link Creation option (Show action to create symbolic links).

Source: What happened to the "Create Link" feature in Nautilus in Ubuntu 16.10?


How can I get Microsoft Excel 2003 to work in Wine?

While you try to get used to LibreOffice (OpenOffice.org is essentially dead, so you should switch), you can try to install MS Office Excel with PlayOnLinux. It is available in the repositories, and makes installing most common/important Windows applications a breeze.


There are several ways you may wish to approach this one, I have tried to be complete as possible and hope that one of these solves your problem.

Is it needed?

On systems up to at least 16.04, yes, you need Upstart if you want to log in.

But if you are completely sure that you don't need upstart at all, just uninstall it:

sudo apt-get purge upstart

that will cause it to be removed from automatically from the menu too

In the case that you NEED upstart (probably something that depends on it) and want it still around but not to start up your system, you can get rid of the entry manualling by editing your grub configuration files. There are two ways of going about it (first one being the more dangerous of the two).

Temporary Removal

You can edit the /boot/grub/grub.cfg for TEMPORARY removal (regenerating with grub-mkconfig will UNDO this change). Remove the menu_entry block that bears the names Ubuntu ....... (upstart) { .. many lines .. }.1

Preferred Removal

The annoying upstart entry is generated because of a single variable inside the /etc/grub.d/10_linux template file, which is what you should edit. The variable in question is called SUPPORTED_INITS and is set very close to the beginning of the file. If you want to get rid of support for starting upstart, you must remove it from here.

Change this:

SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"

To This:

SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd"

Then you need to rebuild your boot configuration file from the template you just edited1:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Backup Your Changes

When making these changes, make a backup of the file you are changing, and put it in a safe place like a ~/Documents directory or something to ensure that a package manager operation doesn't accidentally delete it. If that is too much work, just make a copy of the line you are changing, and comment it out (of course in the case of grub.cfg, grub-mkconfig would overwrite those changes the next time it was run.

1You should always check your script after changing it to verify it will run. You can use grub-script-check /boot/grub/grub.cfg to ensure there are no syntax errors in your script after editing or generating a new one, and definitely before rebooting.


No sound on Ubuntu 18.4 on mini PC connected to TV via HDMI

Got it working thanks to advice on Reddit r/linux4noobs so posting here in case anyone else with the same problem ends up reading this.

The solution was to abandon 18.04 LTS and install 18.10. Worked from install.


just try this:

locate rubymine

you will get the path of of desktop launcher then just remove it

rm {{PATH}}

you need to root user to remove this launcher


A January 2013 Ubuntu update broke my wi-fi!

Well reset your modem. It happened to me also but resetting worked. Mine is Asus EeePC 1025C. Let me know if it fails


I just ran into the same problem, you can fix it by changing your printer driver.

go to your printer: http://localhost:631/printers/
in the "Administration" droplist, select "Modify Printer"
press continue till you can select your driver and search the list for your printer (next to the name of your printer it will probably say something like Gutenprint 5.2.8-pre1)
Press modify printer and that's it!


Alt+F2 not showing xkill on Ubuntu 18.04

One Linux keyboard shortcut gives you quick access to all of your software and some useful commands. It’s like a portable command line, and it’s probably already built into your Linux distro of choice. Just hit “Alt” and “F2” at the same time to get started. Whether you want to force-quit a hanging application or quickly launch your favorite text editor, this shortcut is indispensable for Linux users.

  Most long-time Linux users are probably already familiar with Linux keyboard shortcuts, but new Linux converts might not have discovered this simple shortcut yet. They should, because once you get used to using it you’ll wonder how you ever lived without it. It’s a great way to quickly launch your favorite applications, and can be used to do much more.

You need to type xkill in Enter a command prompt and hit Enter.

Unity used to have this kind of interface when Alt+F2 was used:

That was basically interface for entering a command with label Run a Command and Not a Dashboard(However it seems to be and that's what you are referring to.). It used to show suggestions as you type.
But in GNOME interface is like this:

And yes this doesn't show any sort of suggestions.

You can either create a Desktop Entry or define a keyboard shortcut in Settings → Devices → Keyboard to use xkill quickly.


Can't update `mysql-workbench` on Ubuntu 14.04

apt-get install downloads and installs the version that is currently in the repository. To get updates you type apt-get upgrade which will install any updates that are released for Ubuntu and other installed applications.

Few applications are kept up to date in the repositories; the web browser Firefox is one of them. Ubuntu takes what is in Debian Testing or Sid and keeps it at those package versions that works on a Ubuntu release. This keeps the system in a stable state. Security updates are usually provided to Ubuntu packages, but not new versions.

To get the newest version of applications you will need to find PPA's or backports. After adding either one you can then install the new application with apt-get install <new package>


Can't set a folder on another drive as default Downloads folder

Hey I guess your drive is not mounted at startup, therefore the link dous not work till you mount the drive (by opening it). I don't have experience how to do it, but I think this question gives a answer.


How to detect/monitor the hosts/urls being accessed?

For just watching general traffic destinations, I like using iftop:

sudo iftop

It'll show a live report with speeds, through-put, etc:

                25.0Kb          50.0Kb          75.0Kb          100Kb      125Kb
└───────────────┴───────────────┴───────────────┴───────────────┴───────────────
system.outflux.net         => wildcard-edge-launchpad-n  3.49Kb  3.94Kb  3.94Kb
                           <=                            3.38Kb  10.3Kb  10.3Kb
────────────────────────────────────────────────────────────────────────────────
TX:             cumm:  71.3KB   peak:    154Kb  rates:    154Kb  95.0Kb  95.0Kb
RX:                    47.6KB            126Kb            126Kb  63.4Kb  63.4Kb
TOTAL:                  119KB            280Kb            280Kb   158Kb   158Kb

Note that iftop will choose the first network interface it finds to monitor (usually eth0 for your ethernet cable). If you'd like it to listen to another interface, like your wireless card, you can list valid interfaces with ifconfig, and then call iftop -i [interface_name].

For watching your browser, I recommend the Tamper Data extension for Firefox. Opening its window will show you all the active and historical requests:


How can i get Ubuntu OS on a macintosh computer?

Here you go:

Installation

Helpful links:

Ubuntu on iMac

Issues?

EFI-booting ubuntu on mac


Wireless keeps disabling or stays disconnected (Realtek RTL8191SEvB)

In the Ubuntu Forums they recommend to download the driver from Realtek eg. http://218.210.127.131/search/default.aspx?keyword=rtl8192


How can I prevent my cursor from moving when I am clicking the trackpad?

On my HP Envy 14 Spectre I added this:

$ cat /etc/X11/xorg.conf.d/51-envy-quirks.conf
Section "InputClass"
    Identifier "Envy clickpad"
    MatchDriver "synaptics"
    Option "SHMConfig" "True"
    Option "LeftEdge" "1268"
    Option "RightEdge" "5680"
    Option "TopEdge" "1640"
    Option "BottomEdge" "4729"
    Option "AreaBottomEdge" "3900"
    Option "TapButton1" "1"
    Option "TapButton2" "3"
    Option "TapButton3" "2"
    #Option "SoftButtonAreas" "3915 0 3900 0 3032 3914 3900 0"
EndSection

Edges values depends on your trackpad, SHMConfig option is useful to gather edges values with synclient -m 100.

The option that disables that click area is AreaBottomEdge but it disables right or middle clicking too, only left clicking is enabled.

That is why TapButton2 and TapButton3 is used to mimic missing buttons.

The only drawback of this approach is that you can't drag pressing right or middle buttons, only left button.


You can leave the regular MySQL installation in place if you like and then follow the instructions in the MySQL Cluster quick-start guide to install, configure and run MySQL Cluster from the tar ball.


It seems that it has something to do with the administrator privileges. I managed to use it by sudo duplicity, and could then run some related programs like deja-dup.


Is there any way to show vnstat as indicator Unity?

I've generally found the utilities like vnstat to be problematic.  Whenever I have needed network flow analysis I have used either iptables or scapy on top of pcap
iptables example
sudo iptables -N measure
sudo iptables -A OUTPUT -o $INTERFACE -j measure
sudo iptables -A INPUT -i $INTERFACE -j measure
sudo iptables -A measure -m quota --quota $bytequota -m comment --comment "measure" -j ACCEPT
sudo iptables -A measure -j REJECT -m comment --comment "exceeded measure"
sudo iptables -A measure -j RETURN

This will count bytes on an interface.  Use different rules if you want separate values for input/output.   Very flexible and you can put results into whatever analysis you want (Kafka, google sheet etc).   Scapy is far more flexible but I can't provide an example in an answer box....


How do I write a bash script that logins into Ubuntu virtual machine?

I assume that you have open a terminal window and you can login on you VM via ssh.

Create a file ~/hello.sh with the next content:

#!/bin/bash
mkdir ~/testdir
cd ~/testdir
echo "Hello" > hello.txt

Next run the follow command

ssh user@host < hello.sh

You will be asked for password and the script will be run.

If you use certificate (recommended) change the command with

  ssh -i path_to_sert user@host < hello.sh

Log via ssh and check what you have

  cat ~/testdir/hello.txt


ping multiple IP's from mysql using bash?

Here is how I built my monitoring app (the portion that uses ICMP messages to retrieve alive host). In my case, the mysql server (MariaDB) is running on the same machine as the app.

In this cron, I only use 2 of the fields (ipv4 and icmp). The icmp field is used to determine if this nics should be monitored or not.

here is the script:

#!/bin/bash

#variables

SQL_U=username
SQL_P=password
SQL_D=database

mysql -u ${SQL_U} -p${SQL_P} -D ${SQL_D} -e "SELECT ipv4 FROM nics WHERE icmp=1;" | while IFS=$'\t' read ipv4;
do
    if [ "$ipv4" != "ipv4" ]; then
        PING_IP=$ipv4
        PING_LOSS=0
        PING_TEST=$(fping -c 1 -p 20 ${PING_IP} | awk '{ print $1 }')
        if [ "$PING_TEST" = "$PING_IP" ]; then
            PING_LOSS=1
        fi
        PING_C=$(date +"%Y-%m-%d %H:%M:%S")

        mysql -u ${SQL_U} -p${SQL_P} -D ${SQL_D} -e "INSERT INTO ping (ipv4, loss, created, modified) VALUES ('${PING_IP}', '${PING_LOSS}', '${PING_C}', '${PING_C}');"
    fi
done

All results are inserted into a table called ping. In which I insert the ip, the ping result in binary (0=loss, 1=received), created and modified date. With this script, I am able to monitore about 100 ips (for now) every 5min and collect statistic.Bare in mind that I am using fping instead of ping on a debian stretch machine. Due to it's many features.


"'precise' is no longer under development"

It sounds like you should choose () Continue. I don't need technical support at that screen, based on what you're saying in the question. You experienced a crash, but aren't getting it consistently, and can't force it to happen. But you want to file the bug report, so that it is known and tracked.


Jabber client with support of Gtalk XEP-136

Gajim seems to support XEP-0136, according to this issue and the Gajim support status for various XEPs:

  XEP-0136 Message Archiving
  Support: Yes
  Version: 1.2

You can install Gajim from universe: http://packages.ubuntu.com/en/precise/gajim


I have to exact same printer scanner etc. All I did was download the drivers from canon (Linux version of drivers). It will say OS system detected Linux. You have to agree to the terms and conditions. Download the drivers, I then used Ubuntu software centre to install the drivers. There is RPM and Debian Driver folders in the Main folder you will see them. I used the Debian 32 bit driver and installed both driver files that are in there. One driver file is something like 1.5 and the other is 13.3. Maybe diff dep on OS architecture. After the Go and add you printer and it should find the printer and install the drivers that are already installed. I then printed a test page to make sure that it all worked. Now the only thing left for me to do is get the scanner working. LOL


It sounds like when you installed Windows 7 it wrote over the mbr (Master Boot Record) and now it only boots to Windows. You should be able to fix this issue by using this tool: https://help.ubuntu.com/community/Boot-Repair

Basically, your Ubuntu operating system should be intact and working if it wasn't damaged when installing Windows. You just need to repair the mbr so that it knows that Ubuntu is on the computer and will let you boot to it. Ubuntu uses a software called Grub to boot between different operating systems. Using the Boot-Repair program should fix the mbr and set up Grub so that you can boot between Windows 7 and Ubuntu.


How start Xpad and viber minimised in the system tray when OS start. 14.04

For Viber, run the app with StartMinimized parameter.

/opt/viber/Viber StartMinimized


You can just use the Guest account of a freshly installed Ubuntu. It will be reset every time you logout.


Can't get Ubuntu 16.04 to boot after installing

After a lengthy discussion and troubleshooting in the comments, it was decided that a Ubuntu reinstall from DVD would solve the problem. Cheers, Al


How to prevent key repeat for my mute/unmute key?

You can disable key repeat for individual keys with the xset utility. It works on X.org level, independent of yourdesktop environment. For the mute/unmute key, you would do this:

Start the X event tester program xev in a terminal, make its window the active one and press the mute/unmute button to find out the keycode of your button. Look for a KeyPress or KeyRelease message containing XF86AudioMute in your terminal, like this one:

KeyRelease event, serial 48, synthetic NO, window 0x4a00001,
    root 0x98, subw 0x0, time 277961250, (-222,299), root:(879,323),
    state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

This is from a ThinkPad X201 and shows that the keycode is 121.
Execute the following command to disable key repeat for the key with keycode 121 (or whatever you found if your hardware is different):

xset -r 121

If this successfully disabled key repeat for the mute/unmute key, put this xset -r 121 command into your autostart to activate it on system start. Since it's X.org specific, it is ok to put it into your desktop environment's autostart configuration. No need to have it before X.org starts, and also not on the X.org login screen.


How can I hide the switch user part of Unity's top panel session indicator?

What I have used in the past is the following from this link: How to easily hide the username in the Unity panel

Steps:

Install dconf-editor: apt-get install dconf-tools
Open it and navigate to apps-->indicator-session and on the right-side, uncheck show-real-name-on-panel
Reboot

Additionally, you can open a terminal and type the following:

gesettings set com.canonical.indicator.session user show-menu false

Or download and install Ubuntu Tweak from here: http://ubuntu-tweak.com/ and follow these steps to turn off Fast User Switching which will hide the list of other users:

Click on Tweaks
Click on Miscellaneous
Check the box next to Disable "Fast User Switching"


Why is the software center not alphabetized?

There is an option there on the upper right corner of software center.

By Name

By Top Rated (Default)

By Newest First

You should change that by Name.

  Open Software Center
  Select Category (Accessories, Book & Magazines ... & etc).
  List of Softwares will display.
  On your upper right there is a selection box with the options above. Just select an option based on your preferences.


Input/Output error in ubuntu but can read data from windows

On the other hand, the windows boot normally and I can even access data on my linux partition /dev/sda6 using a third party program DiskInternals.

This is the root of your Problem. Since ubuntu bionic e2fsprogs
 creates filesystem with new feature. Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
 I mean metadata_csum.

copied from man e2fsck

  This ext4 feature enables metadata checksumming.  This feature
                stores checksums for all of the filesystem metadata
                (superblock, group descriptor blocks, inode and block bitmaps,
                directories, and extent tree blocks).  The checksum algorithm
                used for the metadata blocks is different than the one used
                for group descriptors with the uninit_bg feature.  These two
                features are incompatible and metadata_csum will be used
                preferentially instead of uninit_bg.

During access with your windows programm it changes/corrupts this stored metadata.


"error: XDG_RUNTIME_DIR not set in the environment." when attempting to run nautilus as root

When you run software as another user you're in fact starting the new minimal and isolated environment that doesn't carry on some "excessive" variables (among others variables responsible for injecting libraries or setting certain privileges). Replace your sudo nautilus call with the following - it will carry on user-specific x server settings from the current session:

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY nautilus

This is a one time low level solution but it will work on a malconfigured machine. If you want to permanently "fix your sudo" you need to find the issue with your environment configuration and correct it as described in other answers.


How to prevent Java applications from creating tray icon?

For Java Apps:

Actually for JDownloader case, It's a modular design. Tray icon comes as a plugin that can be disabled from:

JDownloader → Addons → Addon Manager → Extensions → Uncheck Activate box for JD Light Tray
For Java applications general case, It is possible to use Java security manager by writing a custom policy rules.

Create java.policy file in ~/.jdownloader contains:

grant codeBase "file:/home/user/.jdownloader/-" {

// full access
//    permission java.security.AllPermission;

// AWTPermission full or only selected elements from it
//    permission java.awt.AWTPermission "*";

    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
//    permission java.awt.AWTPermission "accessSystemTray";
    permission java.awt.AWTPermission "createRobot";
    permission java.awt.AWTPermission "fullScreenExclusive";
    permission java.awt.AWTPermission "listenToAllAWTEvents";
    permission java.awt.AWTPermission "readDisplayPixels";
    permission java.awt.AWTPermission "replaceKeyboardFocusManager";
    permission java.awt.AWTPermission "setAppletStub";
    permission java.awt.AWTPermission "setWindowAlwaysOnTop";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.awt.AWTPermission "toolkitModality";
    permission java.awt.AWTPermission "watchMousePointer";

// Added by try and learn
    permission java.io.FilePermission "/-", "read,write,delete";
    permission java.util.PropertyPermission "*", "read,write";
    permission java.util.logging.LoggingPermission "control";
    permission java.lang.RuntimePermission "*";
    permission java.net.NetPermission "*";
    permission java.security.SecurityPermission "*";
    permission javax.net.ssl.SSLPermission "*";
    permission java.net.SocketPermission "*", "connect,resolve";
    permission java.lang.reflect.ReflectPermission "*";
};

Modify jdownloader launch script to use custom policy

sudo nano /usr/bin/jdownloader

Add: -Djava.security.manager -Djava.security.policy=java.policy to java command call:

exec java ${JAVA_OPTIONS}  -Djava.security.manager -Djava.security.policy=java.policy -jar JDownloader.jar $*

These are the minimum rules that allowed me to launch jdownloader. You may need to add more permissions. Because there is no deny option you have to write all needed grant rules.

References:

java.awt: Class SystemTray
java.awt: Class AWTPermission
java.security: Class BasicPermission

See Direct Known Subclasses if you want to write a general template that grant AllPermission except accessSystemTray. So you can use it for all remaining java apps.

BTW, try to comment one of the rules by adding // to the beginning of line; So you can see how the error of denied permissions looks like. It tells you which permission you should to add. Also notice that I have used many - & * trying to extend rules as I'm looking for a quick solution (default was AllPermission anyway) and I'm not looking to jail the application.

Here is a template to start with, trying to grant all possible permissions:

grant codeBase "file:/home/user/.jdownloader/-" {

//    permission java.security.AllPermission;

//    permission java.awt.AWTPermission "*";

    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
//    permission java.awt.AWTPermission "accessSystemTray";
    permission java.awt.AWTPermission "createRobot";
    permission java.awt.AWTPermission "fullScreenExclusive";
    permission java.awt.AWTPermission "listenToAllAWTEvents";
    permission java.awt.AWTPermission "readDisplayPixels";
    permission java.awt.AWTPermission "replaceKeyboardFocusManager";
    permission java.awt.AWTPermission "setAppletStub";
    permission java.awt.AWTPermission "setWindowAlwaysOnTop";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.awt.AWTPermission "toolkitModality";
    permission java.awt.AWTPermission "watchMousePointer";

    permission javax.sound.sampled.AudioPermission "*";
    permission javax.security.auth.AuthPermission "*";
//    permission javax.security.auth.kerberos.DelegationPermission "";
    permission javax.xml.bind.JAXBPermission "*";
    permission java.nio.file.LinkPermission "hard";
    permission java.nio.file.LinkPermission "symbolic";
    permission java.util.logging.LoggingPermission "control";
//    permission java.lang.management.ManagementPermission "*";
    permission javax.management.MBeanServerPermission "*";
    permission javax.management.MBeanTrustPermission "*";
    permission java.net.NetPermission "*";
    permission java.util.PropertyPermission "*", "read,write";
    permission java.lang.reflect.ReflectPermission "*";
    permission java.lang.RuntimePermission "*";
    permission java.security.SecurityPermission "*";
    permission java.io.SerializablePermission "*";
    permission java.sql.SQLPermission "*";
    permission javax.net.ssl.SSLPermission "*";
    permission javax.management.remote.SubjectDelegationPermission "*";
    permission javax.xml.ws.WebServicePermission "*";
//    permission  "*";

    permission java.io.FilePermission "/-", "read,write,execute,delete,readlink";
    permission javax.management.MBeanPermission "*", "*";
//    permission javax.security.auth.PrivateCredentialPermission "", "read";
    permission javax.security.auth.kerberos.ServicePermission "*", "initiate,accept";
    permission java.net.SocketPermission "*", "accept,connect,listen,resolve";
    permission java.net.URLPermission "*";
};

Note:

Java Policy Tools is a GUI tool to edit policy files. It make it more easy t find out all available options from drop box. It should be already install with Java package.


How do I install Skype or Viber on Ubuntu Touch?

First, contact the Skype or Viber vendors (Microsoft, in the case of Skype) and ask them if they provide packages for Ubuntu on phones.


I believe you're looking for a program like Audacity. There are others out there, but Audacity will allow you to zoom in on certain sections of the wave and see if there is any abnormal sectors etc.


Is there a text editor which can display null bytes

You should consider using Hex Editor for such purposes, as normal editors don't display non-printing characters  unless its some side-effect or glitch.

I suggest Bless :

And in console you can use Midnight Commander's  mcview - F4 switches to hex mode:


Is there software to periodically start and close an application?

Cron versus background script

Of course the very first thing that pops into the mind is to use cron. Whether you use cron, or a small background script is mainly a matter of taste.

The advantage of cron is that it hooks up on an existing process (although a script adds, well, actually nothing to the processor load).

The advantage of a background script is that is more flexible; simply kill it and run it with other arguments if you'd like to change time- or other settings. You can also re- use it with other applications without having to do another setup, just a command is enough.

The script below can be run by the command (e.g.)

python3 <script> <command_to_run_application> <cycle_time> <application_run_time> force

Where the last argument, if set, forcefully kills the application. If not set, the application will close gracefully, to make sure possible changes etc. will not be lost.

The script

#!/usr/bin/env python3
import subprocess
import time
import sys

force = False
args = sys.argv[1:]; app = args[0].replace("'", "")
proc = app.split()[0].split("/")[-1]
cycle = int(args[1])*60; run = int(args[2])*60

try:
    if args[3] == "force":
        force = True
except IndexError:
    pass

def get_pid(proc_name):
    try:
        return subprocess.check_output(
            ["pgrep", proc_name]
            ).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

def kill(pid, force):
    if force == False:
        subprocess.Popen(["kill", "-s", "TERM", pid])
    elif force == True:
        subprocess.Popen(["kill", pid])

while True:
    subprocess.Popen(["/bin/bash", "-c", app])
    time.sleep(run)
    pid = get_pid(proc)
    if pid != None:
        kill(pid, force)
    time.sleep(cycle - run)

To use

Copy the script into an empty file, save it as cycle_run.py
Run it with the command:

python3 /path/to/cycle_run.py <command> <cycle_time> <application_run_time> force

where:

<command> is the command to run the application (without the --%u -section, in my case, copied from the .desktop file: /home/jacob/Downloads/Telegram/Telegram)
<cycle_time> is the (total) cycle time in minutes (3 hours = 180 in your example)
<application_run_time> is the time the application should run in minutes (15 in your example)
force is an optional argument, to forcefully kill the application. Simply leave it away to gracefully kill the application.

Running applications with arguments

If you run an application with arguments, make sure you use quotes around the command to run the application, e.g.:

python3 /path/to/cycle_run.py 'gedit /home/jacob/Desktop/test.sh' 30 5

Running applications minimized or in tray

Starting and terminating applications periodically will often be needed only minimized and/or in tray. As requested by OP, a few remarks on that:

If an application offers starting up in tray from command line, simply use the argument to do so. In the case of Telgram, the argument to use is:

-startintray

although the option seems not to work on all systems (it does on mine), as mentioned here. You will have to test in your situation.
If the application does not offer the command line option to startup minimized or in tray, I'd suggest using the (this) script in combination with the one here (I'd suggest the pid- version), which will make it possible to startup the application minimized.


It's a backup copy created by a text editor. It is not used for anything.


How to backup data on my home drive from a Ubuntu Desktop 10.10 that crashed?

Siply go under root in terminal type su (on live media it has no password)< mount your home partition and than you can perform any data manipulations with your user home directory


Installing Windows 8 alongside Ubuntu 13.04

1.Make free space for Windows 8
2.format the free space with an NTFS filesystem using gparted
3.use WINUSB tool to create windows 8 bootable usb(skip this if you have windows 8 DVD)
4.Windows 8 Installation will destroy the grub2 bootloader so you will not be able to boot into Ubuntu to solve that problem you have to reinstall grub using ubuntu live usb/dvd


Install Microsoft Office Pro 2010 on Ubuntu 13.04

Use playonlinux for installing it instead; it's easier to use.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E0F72778C4676186
sudo wget http://deb.playonlinux.com/playonlinux_quantal.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

After launching PlayOnLinux, click Install and search for Microsoft Office, then select Microsoft Office 2010.

If you still want to do it with wine, you can follow this guide: http://www.liberiangeek.net/2012/06/how-to-install-microsoft-office-suite-2010-in-ubuntu-12-04-using-wine-1-5/