Why are . and .. are output as a hidden files when we do ls -a?

Leading dot filenames

Simple answer is because these filenames start with a dot. Any filename that starts with a dot is considered a hidden file on Linux (even if in this case the filename itself is just one character long) and is basically a "tradition" that goes back to first Unix OS . You can view them with ls -a.

If you want to know why on the code level, it is set as default within ls.c file of src/ls.c in coreutils package:

638 static enum
639 {
640   /* Ignore files whose names start with '.', and files specified by
641      --hide and --ignore.  */
642   IGNORE_DEFAULT,
643
644   /* Ignore '.', '..', and files specified by --ignore.  */
645   IGNORE_DOT_AND_DOTDOT,
646
647   /* Ignore only files specified by --ignore.  */
648   IGNORE_MINIMAL
649 } ignore_mode;

Simple applications

You asked:

  Is it something like they are by default added to every directory created to facilitate movement outside?

Yes, since . refers to directory itself and .. refers to the parent directory. Exception is the / directory which is the root of the filesystem tree. In that case, .. refers to / itself since there is no directory higher above it. Instead of memorizing each path, the convenience is that you can go up one level using cd ... Simple, right? Now imagine that you have a very long path. It is inconvenient to type full path to parent directory, whereas .. is far simpler. It also allows for simple scripting such as this function I keep in by .bashrc:

goup() {
    num=$1
    while [ $num -ne 0 ]
    do
        cd ..
        num=$(expr $num - 1 )
    done
}

By specifying goup 5 i can go up 5 directories, where each .. refers to parent of a parent of a parent.

In case of . it can be used by scripts to determine their current location, if that's ever necessary.

In other languages, utilities

Shells are of obvious attention. Their behavior is the same as of ls, by default ignoring filenames when one uses glob

$ echo *
LICENSE README.md ayatana-indicator ayatana-indicator.desktop debian
star:

We can mimic ls -a with shell glob if we add .* to include hidden files.

$ echo * .*
LICENSE README.md debian indicator-bulletin indicator-bulletin.desktop .git .gitignore

By contrast some other programs/utilities and programming languages don't hide these items (or at least they don't hide .). Their purpose, however, is much more extensive that merely listing directories, and they are far more suitable for parsing files (Please read Why you shouldn't parse the output of ls(1)).

$ find -maxdepth 1
.
./.git
./README.md
./LICENSE
./debian
./indicator-bulletin.desktop
./.gitignore
./indicator-bulletin

$ perl -le 'opendir(dh,$ARGV[0]);while( $file = readdir(dh) ){ print $file; }; closedir(dh);' "."
.git
..
README.md
LICENSE
debian
.
indicator-bulletin.desktop
.gitignore
indicator-bulletin

Python's os.listdir() is notable exception - it doesn't show . nor ... The glob module can be used to show same behavior as in shells.

$ python -c 'import os;print(os.listdir("."))'
['.git', 'README.md', 'LICENSE', 'debian', 'indicator-bulletin.desktop', '.gitignore', 'indicator-bulletin']

$ python -c 'import glob;print(glob.glob(".*"),glob.glob("*"))'
(['.git', '.gitignore'], ['README.md', 'LICENSE', 'debian', 'indicator-bulletin.desktop', 'indicator-bulletin'])


Chrome 38 Update broke the "use system title bar and boarders"

You can go chrome://settings and press button "Use GTK+ theme"


error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory

Try sudo apt-get install libboost-all-dev


Can not ssh to my VM created using openstack from out of openstack server?

Are you able to access the floating IP from the devstack host? If so, you may need to enable proxy_arp and ip_forward, using (as root or sudoer):

echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

There are more detailed instructions in a post I wrote here:

http://barakme.tumblr.com/post/70895539608/openstack-in-a-box-setting-up-devstack-havana-on-your


ubuntu 12.10, likewise, and logging in to the domain

ok, think I got it :

just type in this command line :

sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

and then reboot the computer and then you will have the ability to type in a user account, just type in DOMAIN\user


Hybrid graphic driver nvidia low resolution mode. and wine not working

First, let me make something clear, the problems you encounter while installing wine and those of graphics card are totally two different problems. Let's sort out your problems with wine installation first.

From what it seems your wine has some problems with dependencies,

Make sure you didn't add some custom repositories or ppas, if you did remove them from /etc/apt/sources.list and /etc/apt/sources.list.d and then do following,

Remove wine completely

sudo apt-get purge wine
sudo apt-get autoremove --purge

Then, solve existing dependency problems

sudo apt-get install -f
sudo dpkg --configure -a

Now once your dependencies are sorted you should get your graphics drivers sorted out, If you have hybrid graphics you will have to choose which graphics card to use, in your case i would suggest Nvidia rather than intel. Luis Alvarado has already written a very comprehensive guide for installing graphics driver in ubuntu here, Check it out and set up your display drivers.

After that is done, you will want to reinstall wine to play games or install windows softwares, to do that, type in,

sudo apt-get install wine

It should install without any problems.


Missing dropbox applet indicator. How do I get it back?

All you have to do is install libappindicator1, use the following command :

sudo apt-get install libappindicator1

Restart may necessary.


No efi system partition was found when trying to install ubuntu next to windows 10

We don't need an EFI System partition for installing ubuntu. And only root file system creation is enough. Click on the partition where you want to install ubuntu  and delete partition. Next again click the unallocated space and click the + button. Then select ext4 as the file system and set mount point to / (filesystem root). Tyen click the partition type as Primary. Then create the partition. Now click the new root partition and click Next to install ubuntu there.
Hope that helps


At first run

$ sudo apt-get update;sudo apt-get upgrade

this might take a few minutes(or hours).
If that's finished run

$ startx

your system is massivly outdated!
This can bring you in deep Trouble.

If startx isn't working try,run  like  Ade Malsasa Akbar said

$ sudo apt-get install ubuntu-desktop

If that isn't working too( because ubuntu-dektop is already installed) run

$ sudo apt-get install --reinstall ubuntu-desktop


Extra mouse buttons not working in virtualization (VMware/VirtualBox, ubuntu host)

Possible workaround:

After editing the VM's .vmx file to add

mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"
usb.generic.allowHID = "TRUE"

you'll be able to use your five-button mouse in the VM. To do so, open your VM, then navigate to Virtual Machine > Removable Devices > [Your Mouse] > Connect (Disconnect from Host). You'll get a couple warnings that you won't be able to use your mouse with the host anymore, and just click OK.

Now you can only use your mouse within the VM whether it's full-screen or in windowed mode. Hit Ctrl-G on your keyboard to get rid of the host mouse icon and fully immerse yourself in the VM. Once you need your mouse again outside the VM, hit Ctrl+Alt, then release. Now the focus is back to your host OS. Hold Alt and push V to bring up the Virtual Machine menu, and use your arrow keys to navigate to Virtual Machine > Removable Devices > [Your Mouse] > Disconnect (Connect to Host).

Now everything is back to normal. Hopefully something will change in either Ubuntu or VMWare Player soon to make it easier than this.


I don't have multiple monitors so I can't help you there. As far as opening 3 videos at the same time the closest I can suggest would be using "&" to open the files sequentially. They won't be in sync, but because they are opened 1 after the other very quickly they will be very very close to in sync, most likely resulting in a slight echo like sound. Of course this assumes the video file aren't ones that strain the system and that they are stored on a storage device capable of feeding the data rate of 3 videos at once. If not the out-of-sync gap between players will be more apparent. For example I tested this with 2 1080p 70mb mp4 files in a virtual machine, and they were almost in sync, a slight echo was the only indication they weren't. However when I attempted 3 the gap became larger because it was a 1080p video running 3 instanced in a vm, and vms don't get good performance. Keep in mind that this will only help you open the file, it not give you control over where the video's appear on your desktop screen. I believe the default is they layer instances over each other.

Example (assumes video file is called "example" and is located in your user accounts download folder):

"vlc /home/username/Downloads/example.mp4 & vlc /home/username/Downloads/example2.mp4 & vlc /home/username/Downloads/example3.mp4"


How can I upgrade the Ubuntu LTS kernel to newer?

New deployments of 12.04.2 will be installed with an updated kernel and a new X windows stack.
For existing 12.04 deployments, users will need to opt-in to what is being called the LTS Hardware Enablement Stack. If you already have Ubuntu 12.04 installed with an earlier kernel stack, it is recommended that you keep this stack in place rather than switching to a later kernel; the newer kernel and X stacks are provided for enablement of hardware not supported by earlier kernels, and there is generally no reason to upgrade to a newer stack if your hardware is supported by the default kernel.

In order to upgrade to the 3.5 kernel on 12.04.2, you will need to run the following command(s):

For the new kernel:

sudo apt-get install linux-generic-lts-quantal

For the new X stack:

sudo apt-get install xserver-xorg-lts-quantal

WARNING: If you are using the xorg-edgers PPA, do not install the xserver-xorg-lts-quantal package as this will most likely result in breakage.

Reference: https://launchpad.net/~xorg-edgers/+archive/ppa

This is only recommended for x86 hardware installations.

See also:

The 12.04.2 Release Notes for more details.
Quantal backported kernel in 12.04.2? What's going on there?
How to remove Kernel/LTS Enablement Stack?


AMD and Ubuntu 16.04LTS ... there are currently known issues. Check this out HERE


Disable auto login so I can choose desktop environment

Goto

  System Settings>User Accounts

Look at the right side press unlock and enter your password
and then turn off automatic login


I'm dual booting win7 and ubuntu12.10 and ubuntu thinks there's no space on the hard drive

You probably did Install it with Wubi, didn't you?

In my personal experience Installing Ubuntu inside Windows doesn't work at all...

Now, if you want you can install it alongslide Windows... Just follow the instructions of the answer of this question:

Can i install/run Ubuntu 12.10 on my laptop (ACER 5755G)?

Now, your problem is that when you installed Ubuntu with Wubi, you probably got the option to say how much space did you want for Ubuntu, now, 30 gbs is good for it if you're new... (you probably will not need a lot)... If you're running out of space, you can always use an external HDD, or partition your HDD so Ubuntu can use it... (give it a ext4 or ext3 format)


Need help interpreting log file and installing missing AMD driver dependencies

First line of output logged by installer said debclean: not found

You need to install the following packages in order to build your drivers :

sudo apt-get install build-essential cdbs dh-make dkms execstack dh-modaliases fakeroot libqtgui4


After moving home directory, ssh configuration is not working

There are a few things that you may need to check:

Ensure that the /home/user/.ssh directory has been copied to /media/newDrive/home/user/.ssh
Ensure that the containing directory, /media/newDrive/home/user, has the correct owner/permissions.

cp -R /home/user/.ssh /media/newDrive/home/user/.ssh
cat /home/user/.ssh/authorized_keys
chown $USER.$USER /media/newDrive/home/user
chmod 755 /media/newDrive/home/user


VLC does not support the audio or video format "hevc"

There is a VLC plugin available for HEVC playaback. To play H.265/HEVC videos with VLC player in Ubuntu OS we need to install vlc-plugin-libde265 module.

Use following commands to install vlc-plugin-libde265

sudo add-apt-repository ppa:strukturag/libde265

sudo apt-get update

sudo apt-get install vlc-plugin-libde265

Details can be found here: GStreamer plugin for 4K H.265/HEVC video streaming

more info on numerous distros can be found HERE


How to multiply negative numbers in bash

You have 3 opening left parentheses, but only 2 closing right ones.

z=$(echo "($p)*($h)+2" | bc -l)

In fact, you don't need any parentheses:

z=$(echo "$p*$h+2" | bc -l)


Django both installed via python3 and one via apt-get. Can I uninstall apt-get?

Any package installed with apt-get install can be removed with apt-get remove.

Add --simulate to check first what will happen before removing the package, try this first:

sudo apt-get --simulate remove python-django

If you are happy with the output, remove those packages with:

sudo apt-get remove python-django

That will leave you only with the pip version, that normally is more recent than the apt-get one, if something gets wrong, reinstall that version:

pip install --upgrade --force-reinstall django

Hope it helps.


how to dual boot ubuntu on a pendrive[USB stick ]?

As I know, nowdays Ubuntu default bootloader in GRUB2, not syslinux. So, you should:

Split your pendrive into two (or more) partitions.
Install Ubuntu on the empty partition - it should recognize Kali.

To be sure not to ruin your pendrive, ypu can try all manipulations into a virtual machine, for example, VirtualBox.


Make install unsuccessful, manually delete files?

If you never got to the "make install" part of any of the components of your installation, then there's nothing to "uninstall". You can simply delete the source tree folder as you will.

If you did manage to "make install" something, run the install command again for that component and redirect the output to a file:

<prompt:/location> make install > installLog.txt 2>&1

This will redirect both STDOUT and STDERR to the file. Then, use the installLog.txt to find where the files were installed, and manually delete them.

Alternatively, you can go through and edit out anything but the install paths in the installLog.txt, and then redirect the output of that file's content to a delete command:

Example content of installLog.txt

/usr/lib/pandas/inst.lib
/lib/pandas/inst.lib
/usr/local/bin/pandas.bin

Delete command

<prompt:/location> cat installLog.txt |xargs rm -r

Explanation

cat -- prints the content of installLog.txt to STDOUT (standard out)
| -- pipes the output of the cat command to the next command
xargs -- Takes the output of a redirect and passes it to the next command
rm -- you know what it does

Notes

If you can help it, for the love of the gods don't use source installations to install things. Use the system's provided apt-get package management system if you can. This sort of process is dangerous, outdated and can conflict and interfere with the system's already installed packages.

I'm sure there was a justified reason for doing this, but as a Systems Admin I highly recommend against manually installing anything source based, both for your future sanity, and for future proofing the install base.

If you insist on doing source installations, then I recommend two things to make your life infinitely easier:

Learn about docker. While it's not a perfect technology, it will save you some pain and suffering, because you're able to isolate your source installations in its own environment. You can use docker to run daemons as well.
Alternatively, learn to better use the configure script of your installations, so that you can actively participate in the install path process. Most configure scripts will allow for some install flag similar to "--install-path=/my/custom/install/path" or similar. For the great majority of them, you can run:

 ./configure --help

This will give you information on how to customize the installation. This will also cause later problems when trying to integrate multiple packages because you'll have to customize them as well to point to the location of the already installed dependency. That is another reason that you should stick to the system's package management as much as you can.


Can't Boot From DVD or USB Stick after Boot-Repair

I can't explain what happened exactly.  I was studying my machines operation and at one point, while trying to login, I got the same messed up screen but, after a while I did get into my machine.  The icons (like the wifi icon) were blanked out and I could not access my Windows drive but, I was able to run an update.  After the update, the system seems to be working fine; I can boot from my USB stick and; access my Windows drive from my Linux partition.  But, I still cannot boot Ubuntu from my DVD.


How can I periodically search ~/Downloads and add new files to Recent?

Introduction

Technically speaking, each GUI application that chooses to register the files it opens with Gtk.RecentManager can do so, and the files will appear in any application that reads the recent files, including the recent files indicator. However, command line applications don't do that. It is possible , however, to track a directory and add newly created files to RecentManager. The script presented below allows doing exactly that.

Usage

The usage is very simple - run the script with python3 and give it list of directories as command line arguments. Standard rules for quoting command-line arguments apply. Example:

python3 indexdir.py ~/Downloads

Source Code:

Also available on GitHub:

#!/usr/bin/env python3
# Author: Serg Kolo
# Date: November 19, 2016
# Written for: http://askubuntu.com/q/842038/295286
from gi.repository import Gtk
from gi.repository import Gio
from gi.repository import GLib
import urllib.parse
import signal
import time
import sys
import os

class Indexer(object):
    def __init__(self):
        self.callback()

    def callback(self,*args):
         self.indexdir(sys.argv[1:])
         time.sleep(3)
         GLib.idle_add(Gtk.main_quit)

    def get_file_uri(self,*args):
        file = Gio.File.new_for_path(args[-1])
        if not file.query_exists(): return None
        return file.get_uri()

    def indexdir(self,*args):
        mgr = Gtk.RecentManager().get_default()
        recent = [i.get_uri() for i in mgr.get_items()]
        for dir in args[-1]:
            full_path = os.path.realpath(dir)
            for file in os.listdir(full_path):
                file_path = os.path.join(full_path,file)
                file_uri = self.get_file_uri(file_path)
                if not file_uri: continue
                if file_uri in recent: continue
                print('>>> adding: ',file_uri)
                mgr.add_item(file_uri)

    def run(self,*args):
        Gtk.main()

def quit(signum,frame):
    Gtk.main_quit()
    sys.exit()

def main():

    while True:
        signal.signal(signal.SIGINT,quit)
        indexer = Indexer()
        indexer.run()

if __name__ == '__main__': main()


How to print the first word of a string in a specific column using awk

Try this,

awk 'NR>1{print $2}' csvfile | sort | uniq -c

Output:

      1 EASD
      1 ESCRBC
      2 INSTITUTE
      4 SCHOOL

or awk only:

awk 'NR>1{seen[$2]++} END{for (w in seen){printf "%s %s\n",w,seen[w];}}' csvfile

Output:

ESCRBC 1
SCHOOL 4
INSTITUTE 2
EASD 1

UPDATE:

For comma-separated file:

Try,

 awk -F, 'NR>1{split($2,arr," ");print arr[1]}' csvfile | sort | uniq -c

or awk only:

awk -F, 'NR>1{split($2,arr," ");  seen[arr[1]]++} END{for (w in seen){printf "%s %s\n",w,seen[w];}}' csvfile


Allow user via FTP to edit, delete & create files in specific folder

https://www.howtoforge.com/tutorial/setting-up-vsftpd-tls-on-debian-8-jessie/

:/# mkdir /var/www/trinityplay.net/public_html
:/# adduser --home /var/www/trinityplay.net/public_html trinity

same pattern for other users and their home directories

check your permissions with

:/# ls -ld /var/www/trinityplay.net/public_html

if you get a 500 vsftp error you may need to
add the following line in /etc/vsftp.conf

ftp_username=whatever-ftp-username

http://www.unix.com/ubuntu/71798-500-oops-vsftpd-cannot-locate-user-specified-ftp_username-ftp.html


It seems that we have a bug in our packaging metadata for 14.04. This is going to be fixed, but if you encounter that case, just ensure that snapcraft is installed:

sudo apt install snapcraft

As long as snappy try and snappy-remote gives some output, it means they are installed. We will switch them with --help in future release as the error they trigger without any argument can be puzzling.


create '@' like subvolume in another partition

Here's the way I got the needed results from my preseed in-target install script:

# create @log subvolume for mounting /var/log
# this is kludgy but since preseed didn't provide a way...
# this the only way i could create a hidden '@' handle for the /var/log partition
if [ ! -d /mnt ]; then mkdir /mnt; fi
mount -L log /mnt
btrfs subvolume create /mnt/@log
mv -f /var/log/* /mnt/@log/ || true
umount /mnt
while read -r line
do
    if [[ "$line" =~ "LABEL=log" ]]; then
        echo "LABEL=log       /var/log        btrfs   relatime,ssd,subvol=@log    0       2" >> /tmp/fstab
    else
        echo "$line" >> /tmp/fstab
    fi
done < /etc/fstab
cp -v /tmp/fstab /etc/fstab
btrfs subvolume list /
btrfs subvolume list /var/log


How Do I Use A Caching Proxy WIth debootstrap?

If you apt install squid-deb-proxy you can run debootstrap offline (even the InRelease files).

However, if you want to save bandwidth and continue to use the offline file once you are are online again you need to modify it slightly.

There are absolute paths in the squid-deb-proxy.conf file so you need to make a copy of it in your project and modify it.

Find the references to /etc and /var and modify them to be relative to separate it from the system files.

In order to still use the proxy when you are online you need to add this to the conf file.

#Use cached values when offline
offline_mode on

You can then start it like this:

mkdir -p squid/var/log/squid-deb-proxy
mkdir -p squid/var/run/

echo "Starting an instance of squid using the working dir for caches and logs instead of the system dirs"
squid -Nf squid/squid-deb-proxy.conf

Then before you start debootstrap

#Use a caching proxy to save bandwidth
export http_proxy=http://127.0.0.1:8000


Ubuntu Freezes while using terminal and firefox

Because there is not an official answer to this question (even thought there are about 10 in the comments), I will tell you your problem. The default nVidia driver that comes with ubuntu (nouveau) is an ingenious piece of junk. If you install the proprietary drivers for you nVidia card, your computer will stop freezing.


gedit `Comment Code` plugin installed but not working

The file should be of a recognised language by gedit, so that the plugin knows which comments it should use (#, --, <--...>, /*...*/, ecc...)


Error setting kb layout with `setxkbmap`

My mistake was assuming that the keyboard layouts that were important were the ones in the vm (/usr/share/X11/xkb/symbols/).

Actually, when using x-forwarding it is the keyboard layouts defined in my x server, xming (C:\Program Files (x86)\Xming\xkb\symbols) that are important, and colemak is not included with xming by default. I was able to just download the colemak definition and drop it in the xming symbols folder; then it works as expected.


How do I get a Broadcom BCM4312 wireless card to work?

I have BCM4312 and 10.10 as well.  You might want to try reinstalling the drivers, given that you have already restarted the computer to see if you receive a wireless signal. In a terminal:

sudo aptitude remove bcmwl-kernel-source

to remove the drivers and

sudo aptitude install bcmwl-kernel-source

to install them again.  Restart and see if they are enabled/activated in your 'additional drivers' menu.


19.04 gnome session login after blank screen - is it impossible without mouse?

To use only keyboard entry at the login screen:

- selecting a user from the gdm3 selection list
- entering the password

Up/Down arrow keys to select desired user, ENTER key to select user, enter the password, ENTER key to log in.


xorg segfaults after upgrading to Ubuntu 20.04.1 - how to proceed?

Well, apparently I found a solution just after asking here.
Quite some time ago I installed proprietary amdgpu drivers and uninstalling them solved the problem. If other people face the same problem:
/usr/bin/amdgpu-pro-uninstall

I might at some point try to install a newer version of the drivers.


Do this...

sudo -H gedit /etc/gdm3/custom.conf

Change this...

WaylandEnable=false

To this...

#WaylandEnable=false

reboot

Retest Wayland.

Update #1:

after closer review, turned out it was already commented out
created another user account, and Wayland works there
this indicates a problem in the original user's account
the most common problems occur in the ~/.cache, ~/.local, and ~/.config folders

ONE at a time, rename the folder to .cache.HOLD, etc
log out, see if you can log in using Wayland
if not, rename the second folder, retest, etc
these three folders will recreate themselves and populate themselves with default settings. If renaming these folders fixes the problem, MOVE (not copy) the contents of the .HOLD folders back into their respective non .HOLD folders, but DO NOT replace existing files. Any files left over in .HOLD folders are suspects in causing the problem.


Slow system responsiveness reading some CD-R/DVD-R

What you're experiencing is indeed nearly broken CD/DVDs still being read (even though with enormous difficulties).

The solution is simple: Copy the CD/DVD to a new disk and the problem will be gone!

Do this soon as humanly possible and start with the worst of them as continuing to do what you're doing, will eventually result in more scratches on the disk's transparent layer (in your case probably semi-transparent layer) and eventually the disk will stop being read for ever.


Ideal RAM usage in Ubuntu server 18.04 LTS?

As a rule of thumb, you don't need to start worrying about memory usage up until Linux starts using swap.  The kernel keeps things around in memory to help speed up the system (like caching the filesystem) but will smartly evict pages if/when its approaching needing to use swap.
You can determine the amount of memory free by either doing grep MemAvailable /proc/meminfo or running top to see the "avail Mem" entry in the header.  These represent what memory the kernel has available if needed (i.e. this does not include disk cache).


After fresh instal of Ubuntu 18.04 on Yoga 3 pro bluetooth didn't work

I downloaded 'BCM20702A1-0489-e07a.hcd' from https://github.com/winterheart/broadcom-bt-firmware/tree/master/brcm and copied it to /lib/firmware/brcm/

maybe the easiest way to put it in the console:

cd /lib/firmware/brcm/

sudo wget https://github.com/winterheart/broadcom-bt-firmware/tree/master/brcm/BCM20702A1-0489-e07a.hcd

After restart the Bluetooth worked again...

Cheers :)


Try reinstalling Xubuntu. Reinstalling can usually fix these problems. If that doesn't work, it may be that the disk is damaged. If that seems like the case, try burning a new disk and reinstalling Xubuntu using the new disk. Note that there is a glitch where it deletes your Windows partition if you have one.


Fixing a splash screen that looks like a barcode

The mystery of the missing boot splash screen:
I installed Ubuntu 12.4 on my HP and had the same issue with my NVidia graphics card  - the graphical boot splash screen in Ubuntu stops working and looks scrambled after the first install or update of GRUB.
I found this solution elsewhere online and it worked so I thought I'd share it.
It is all due to a little variable called $vt_handoff in the /boot/grub/grub.cfg file that incorrectly blacklists my graphics card and decides that I am not allowed to see a graphical boot screen.
Simply edit the grub.cfg file and remove all $vt_handoff references in the code.
 sudo gedit /etc/grub/grub.cfg
The BASH script to fix the issue again and again:
Here's a short bash script to do the job.
Make it executable by using chmod +x and use the script every time after an update or upgrade.
FixBootSplash.sh :

#! /bin/bash
# Fix Ubuntu Plymouth Boot Splash
# if entry exists for $vt_handoff use sed to search and replace
# write to tmp file - move to original

checkVT=$(grep -c "\$vt_handoff" /boot/grub/grub.cfg)

if [ ! "$checkVT" -eq "0" ]
   then
     echo "> Found vt_handoff removing ..."
     sudo sed 's/$vt_handoff//g' /boot/grub/grub.cfg > /tmp/.grub.cfg
     sudo mv /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
     sudo mv /tmp/.grub.cfg /boot/grub/grub.cfg
   fi

echo "> Done"


How to batch rename files (images) based on CSV file

This should work for you:

sed 's/"//g' files.csv | while IFS=, read orig new; do mv "$orig" "$new"; done

Explanation:

sed 's/"//g' files.csv : remove the quotes
IFS=, : split the input on ,
while read orig new; do ... done : This will read each input line, split it on the value of $IFS (here a comma) and save the 1st field as $orig and the rest as $new.
mv "$orig" "$new" : this will rename the files as requested.

If your file only contains file names (like orig.jpg) and no paths (not /home/take2/orig.jpg or similar), the command above will only affect files in your current directory. So, you need to open a terminal, cd to the target directory and run it there.

Test first:

To test this, you can do a dry run first by printing the commands that will be run without actually executing them:

sed 's/"//g' files.csv | while IFS=, read orig new; do echo mv "$orig" "$new"; done


How to change video codec that is being use for videos?

Download SMplayer - look it up how to install software in ubuntu if you haven't done that before. In SMplayer in settings you can choose which codec to use if SMplayer won't resolve your problem on it's own.


Wifi speed is horrible all of the sudden- Ubuntu 14.04

Some revisions of Realtek NICs do not work well with the standard kernel driver.

So press Ctrl+Alt+T to go to a terminal and type:

sudo apt-get install r8168-dkms

That should solve it!


Tascam US-322 not working on Ubuntu 15.04

Tascam does not provide drivers for many of its AI products.  I have tried many times to get the company to reconsider but they seem to feel as if Linux is not worth their time and money.  Many have also asked that the company release an open-sourced version of their driver but every request is met with silence.  I would suggest selling your unit and getting a Focusright Audio Interface which is FAR more Linux/BSD friendly.


No 3d support is available from the host, on all VMware guests

[My setup: Ubuntu 16.10 64-bit Host (upgraded from 16.04) + VMware Workstation 12.5x + Windows 10 64-bit Guest]
I had the same two errors which you cite.  What worked for me is:
vim .vmware/preferences

mks.gl.allowBlacklistedDrivers = "TRUE"


How to get mysql-server setup on Ubuntu 15.04?

Ok so after much help from @kos and google I have managed to get it sorted.

The steps that seemed to work were as follows.

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Then I ran

tasksel

And ticked the lamp option.
For some reason this angle worked. Though I cannot tell you why.


After upgrading from 14.04 LTS to 16.04.1 LTS, uname reports wrong kernel

On the command line run the following to ensure you have the latest updates:

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

and probably best to update the initramfs:

sudo update-initramfs -u

and check you have the latest kernel installed, check in /boot:

ls /boot

and update the boot loader script to ensure it has been updated:

sudo update-grub

If that all works OK then reboot and see if that works.


How to combine/merge pages in pdf file (GUI)?

PDFJam (Not a GUI app)

Multiple pages can be combined with it.

sudo apt-get install pdfjam

Then you need to use the pdfnup command to combine pages:

pdfnup -2 [INPUT].pdf [OUTPUT].pdf

This will combine two input pages per one output page.

Refer to man pdfnup for more details.

Also refer this Stackoverflow question.


Establish internet connection with LTE card and netplan

A cellular connection is a modem connection, so the device type have to be modems instead of ethernets.

The netplan documentation says:

GSM/CDMA modem configuration is only supported for the NetworkManager
backend. systemd-networkd does not support modems.

Therefore you have to use NetworkManager instead of Networkd as renderer.
To use it you have to install NetworkManager and ModemManager first. Install it as described in the networkManager documentation :
snap install network-manager

and
snap install modem-manager

For an easy setup you can use:

  version: 2
  renderer: NetworkManager
  modems:
    <INTERFACE_NAME>:
      auto-config: true
      pin: <PIN>


It's because Virtualbox is not using hardware virtualization, without this it can only present a basic 32-bit CPU to the virtual machine. In order to allow virtualbox to  present a 64-bit your CPU, select the virtual machine in the VirtualBox Manager, click on "settings", then select the "system" category (on the left), then go to the "acceleration" tab (last one), and ensure "enable vt-x/amd-v" is both enabled and ticked.

If it's not tickable (i.e. greyed out), that means your CPU's virtualization support is disabled. Enable it in your system's BIOS settings and try again.


WinFF: Preset to convert to H.265/HEVC under Xenial Xerus?

The copy of Winff under Xenial Xerus on fresh installation does not produce H.265/HEVC files. It needs a new preset to be able to create these files.

First download and install WinFF, FFmpeg and and an 'expanded' codec pack for FFmpeg fromo the Ubuntu Repositories:

sudo apt-get install winff winff-doc ffmpeg libavcodec-extra

Then create a text file on your Desktop, or any other location, called hevc.wff and paste the following xml snippet into it:

<?xml version="1.0" encoding="utf-8"?>
<presets>
  <HEVC>
    <label>H.265 encoding with AAC sound</label>
    <params>-c:a aac -b:a 160k -strict -2 -c:v libx265 -preset medium -crf 28</params>
    <extension>mp4</extension>
    <category>My Presets</category>
  </HEVC>
</presets>

Save the file, right click on it and select: 'Open with WinFF' and this is enough to save your new preset in ~/.winff/presets.xml and make H.265/HEVC encoding possible from within WinFF!

The finished product can be seen in this screenshot from my own system:

Notes:

You will note from the graphic above that it is an easy matter to modify this preset to extend it as you see fit.
Extra presets can be conveniently added to the 'My Presets' category as you build up a small library of your own presets!

References:

FFmpeg and H.265 Encoding Guide
FFmpeg and AAC


Install Unite extension from GNOME extension store and modify its settings according to your need. Remember to restart GNOME shell by pressing Alt+F2 and then running r command.
It will look like this


Where can I find the files I just installed from the software center?

Personally I would use synapse as a unity replacement it will give you "similar" functionality to unity.

You will need to add there ppa to install Synapse ppa:synapse-core/ppa

What are PPAs and how do I use them?

As far as I know after you have installed software using the software centre it tells you which menu it would be visible, in the detailed information section where you would rate the program.


How can I access another computer's terminal outside the local network?

In most cases just as you are running under a local network the other computer might also be running under a local network.  That would make it impossible for you to connect directly that computer's IP unless the configured port forwarding of their router to go to that specific computer.

You could setup a common VPN (virtual private network) that would put both you and the other computer on the same network.  Then you would access the computer's IP (from the vpn) the same way you access computers on your local network.

Some information on setting up a Virtual Private Network can be found here.


/etc/cron.daily/popularity-contest is a shell script, and it takes --crond as an argument for controlling how often it runs the actual popularity-contest command and whether to send mails about it. This is specific to this script, and certainly not a generally available option.


When you set up a new Ubuntu system and login as a user the directory /snap/bin does not exist. This path will be created once you install your first snap package with the snap package's commands symlinked. To be able to execute those symlinked commands you need to have /snap/bin included in your session's PATH environment variable.

There is a shell script at /etc/profile.d/apps-bin-path.sh that will add the /snap/bin into your PATH when it is parsed at login. However, it requires that the /snap/bin directory to already exist when your session is started.

The easiest way, therefore, to get everything correctly set-up is to install a snap, and then log-out and back into a new session. This will set your PATH appropriately and will continue to do so every time you login in the future.


network-manager won't show same SSID hotspots!

Network Manager attempts to roam for you.  It will show only one SSID even when there are many access points, then attempt to stay connected to the best one.  Access points with the same SSID should really be identical and there is no reason to prefer one over another.  Unfortunately neither Wicd or Network Manager does a perfect job of this.  Wicd doesn't try and just stays connected to the access point you pick unless it is completely hopeless.  Network Manager has some roaming logic but doesn't always get it right.

You used to be able to disable roaming from Gnome Network Admin and I can't imagine they've removed that option.  Go into connection properties and there should be a checkbox.


Is there a lubuntu 18.10 partitioning tool like "disks"? I don't find it in the menu

KDE Partition Manager

If you haven't seen it before, look up the page on the Lubuntu manual - https://manual.lubuntu.me/3/3.1/3.1.7/kde_partitionmanager.html


“NetworkManager is not running”- error. After manually upgrading nmcli to 1.0.6 on ubuntu 12.04

Open your terminal, type:

sudo /etc/init.d/network-manager start

Reference: http://www.necopost.com/2012/06/network-manager-not-running-error-on.html


I decieded to open up the laptop, i cleaned out the fan, and the motherboard, finally in applied new thermal paste while it was open, and it magically work


That 188.2.100.* address is weird and wrong. It looks like you configured eth0 to have a fixed address and default route, so the one your wireless router is setting is not taking effect (see the network route for wlan0 is OK, but there's no default route so that's why you can't access any sites). Check either in network manager -> edit connections or in the /etc/network/interfaces file.

Also, these settings don't change magically by themselves, so try to remember if you changed them at some point by hand and where you did this.


and should more drivers be showing ?

No; but it depends on your hardware. The general 2 are video card and in some instances there is also one for your NIC (if you do not have a broadcom... nothing will show).

Am I missing something here

Well. There is NO 16.04 AMD 3rd party driver so that one will not show up. Your NIC is probably a native one too.

more info:

If you use the AMD Catalyst (fglrx) driver on Ubuntu you may wish to avoid upgrading to Ubuntu 16.04 LTS next month.
The ‘Xenial Xerus’ will not support the widely used — and widely hated — proprietary graphics driver for AMD/ATI graphics cards.
Instead, Ubuntu “recommend[s using] open source alternatives (radeon and amdgpu)”, and say “AMD put a lot of work into the[se] drivers, and we back ported kernel code from Linux 4.5 to provide a better experience.”

Tip: Do make sure you did an update after installation.


AppArmor Error: "invalid VM definition" after starting lxc on updated version of libvirt (1.2.12)

I have tracked down the problem to domain XML validation in virt-aa-helper utility. This is the utility which is supposed to generate apparmor profiles on demand. It is not the structure of the XML that fails, but the reported error seems to indicate that this is the case. A logical validation inside the function virDomainDefParseXML function in domain_conf.c is broken for LXC containers.

I am not familiar enough with libvirt code to modify this shared area - I may have broken something else, but the following patch seems to work:

if (!(flags & VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS)) {
    /* If the logic here seems fairly arbitrary, that's because it is :)
     * This is duplicating how the code worked before
     * CapabilitiesDomainDataLookup was added. We can simplify this,
     * but it would take a bit of work because the test suite fails
     * in numerous minor ways. */
    bool use_virttype = ((def->os.arch == VIR_ARCH_NONE) ||
        !def->os.machine);
    virCapsDomainDataPtr capsdata = NULL;

to read

if (!(flags & VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS)) {
    /* If the logic here seems fairly arbitrary, that's because it is :)
     * This is duplicating how the code worked before
     * CapabilitiesDomainDataLookup was added. We can simplify this,
     * but it would take a bit of work because the test suite fails
     * in numerous minor ways. */
    bool use_virttype = (def->os.type != VIR_DOMAIN_OS_TYPE_EXE) &&
        ((def->os.arch == VIR_ARCH_NONE) ||
          !def->os.machine);
    virCapsDomainDataPtr capsdata = NULL;

Unfortunately, I couldn't find a way to fix this without a recompile. If you use a 64-bit machine, you can download packages I've built locally from this link (excuse my Microsoft account).

Note: To see if you are affected by this bug, enter the following in a command prompt (copied from this forum post):

$ export VM=foo ; virsh -c lxc:// dumpxml $VM |\
   sudo /usr/lib/libvirt/virt-aa-helper -c \
   -u libvirt-`virsh -c lxc:// domuuid $VM`

Where foo is the name of the lxc container that fails. If you see the output

virt-aa-helper: error: could not parse XML
virt-aa-helper: error: could not get VM definition

then probably it is the same bug.


My session ends after trying to open settings

Fixed! I had to purge gnome-control-center from terminal and reinstall it

sudo apt purge gnome-control-center
sudo apt autoremove
sudo apt install gnome-control-center


s-nail: /home/ion/Maildir: No such entry, file or directory

A workaround:
sudo ln -s ~/Maildir/ /var/mail/username


Use Keyboard shortcuts while computer Locked

"Locked" by definition means: block access. To make your shortcuts run, unlock the machine or keep it unlocked.
An alternative approach may involve setting up an ssh connection. You could then execute the script through SSH from the windows machine so it switches the keyboard. Still, you will need to unlock starting to work on the Ubuntu machine.


Try this:

Open Advanced sharing settings by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type network, click Network and Sharing Center, and then, in the left pane, click Change advanced sharing settings.
Click the chevron Picture of the chevron icon to expand your current network profile.

Under Password protected sharing, select the following option:

    Turn off password protected sharing

Click Save changes. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

If this works it means the problem is related to password protected sharing.


Intel Graphic 3rd with 12.4 "nomodeset" working but?

Why are you trying to use the nomodeset option? The intel VGA-s should be used with KMS enabled, so you shouldn't use the nomodeset option.

(Also unrelated to your question, but the mei module is known to cause problems, so if you don't need it you may want to blacklist it.)

UPDATE:

So you said in the comments that booting with KMS enabled results in a blank screen, but if you close/open the laptop lid everything gets normal. Maybe you have the problem stated here. You might try the solutions presented there.

Here is another similar problem which says that it is a problem that the blacklight is off. It links to this workaround. You may try that one also.

Or try the boot parameters presented here. (add the acpi_osi=Linux parameter also, not just the acpi_backlight)


Netplan configuration doesn't seem to be taking effect

You have to decide whether to run with NetworkManager or netplan.

Ubuntu Desktop users should probably use NetworkManager, and use its GUI tools.

Ubuntu Server users should be using netplan.

Your .yaml file is a combination of both NetworkManager and netplan. Can't do that.

If you're going to use NetworkManager, your .yaml should look like this...

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

followed with a:

sudo netplan --debug generate

sudo netplan apply

Then you need to configure /etc/network/interfaces with command syntax similar to, but not exactly, like the remainder of your existing .yaml file. However, rather than editing /etc/network/interfaces just use the NetworkManager GUI tools to configure your wireless networks.


Man.  I feel dumb about how long this took me to fix.  Clearly I know nothing about administration...

Problem was that I set up my forwarding through GoDaddy to my server, but that's it.  I expected my server to know it was coming from mysite.com somehow, but I wasn't passing it in the request.  The request was just /.  The answer was to change my forwarding from:

234.56.78.912:80   (where the first part of that ip I just made up...)

to

234.56.78.912:80/mySite/home.html

Now when it hits the server the request is mySite/home.html and it is recognized.  Thank you trial and error!


Sound default keeps going back to HDMI/DisplayPort 2

Solution from here helped me.
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1850887

Commented out "load-module module-switch-on-connect" in /etc/puslse/default.pa


A daemon is an always-available process, usually run by root or a system user. Daemons generally have no display output by default, and are often started by init before any users login.

Example: syslogd (or rsyslogd) is a classic daemon. It starts before login, monitors the syslog port, reads log entries from applications, processes those log entries according to its config file, and writes the processed log entries to the appropriate log files.

Daemons are sometimes called services, though other part-time processes (like GeoClue) share that label.

Daemon Mode usually means 'no display output', and 'keeps running when you logout'. A proper daemon should be in /usr/sbin (in your case: /usr/local/sbin) instead of /home.


Does the Microsoft Classic Intellimouse work on Ubuntu?

The only option was to try it out, so I bought one and...
Yes, it appears to work perfectly (at least, I have not encountered any issues yet...), on Ubuntu 18.04.1 LTS with GNOME 3.28.2.
System specs: AMD A10-5800k with Samsung SSD.


Detect correct resolution dual monitor VGA 9800gt Ubuntu 12.10

I think what you need to do is disable EDID probing. Methods vary depending on graphics chipset/driver. For example, with nvidia’s binary blob driver, you use “Option "IgnoreEDID" "false"”. This goes in your monitor configuration section. YMMV.


Problems to run my CUDA program in ubuntu

Fix the space after __global and add the line:
cudaDeviceSynchronize();

before your return.
Then the comand
nvcc hello.cu -o hello

should produce a working hello executable if you have properly defined your PATH and LD_LIBRARY_PATH.

The ldd output on hello is:
$ ldd hello
    linux-vdso.so.1 (0x00007ffcbe796000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f92f056f000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f92f054c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f92f0546000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f92f0365000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f92f034a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92f0158000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f92f0610000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f92f0007000)

I do have the libpthread-stubs0-dev:amd64 package installed. I cut and pasted your source, made the two modifications mentioned, and it worked for me (both hello's on the same line).  Does nvidia-smi show the nvidia driver is in use?


Showing left battery percentage on command line on ubuntu 18.04?

acpi will show various battery status information, e.g.,
$ acpi -b
Battery 0: Charging, 86%, 00:25:30 until charged


Which bookmark sync technology will be used in 11.04?

We will continue to use and expand the bindwood plugin we currently have.


Press CTRL+ALT+F1, type your username and password, then type ls -lah if the ".Xauthority" file reads like this:

  -rw-------  1 root root .Xauthority

Then do:

sudo chmod 777 .Xauthority
sudo chown username:username .Xauthority

Then restart lightdm by doing:

sudo service lightdm restart

This should hopefully fix your problem. If you have installed nvidia drivers and rebooted and this problem appeared, then tell me and I'll try to help you fix this problem.


Find the "shortcut" names list of executable scripts

Here's how:
find $(echo $PATH | tr ':' ' ') -type l -ls


upgraded to 12.04 Boots straight into command line

There appears to be issues with the nouveau drivers. I suggest reinstalling 11.10 as I couldn't get 12.04 to work on my system either.


I need to make a dvd converted to a mp4 for my TV

Please make sure to follow this instructions in order to enable support for commercial encrypted DVDs before using any conversion tool.

When done you can use the great Handbrake for ripping/converting to MP4  MKV. Handbrake is free, reliable and very user-friendly, for the most part intuitive, but slower than many paid software for Windows. he official website link is FYI only. The software is now available directly at the Ubuntu repositories.It can be installed with Ubuntu Software or, in terminal:

sudo apt-get install handbrake handbrake-cli


Short answer: Ubuntu doesn't decide which battery to use.

Long answer: your ThinkPad's embedded controller (EC) firmware decides when to use (and charge) which battery. The firmware policy is fixed and the operating system or apps are not allowed to change it.


Actually the network manager was missing , so this is fixed by :

sudo apt-get install network-manager-gnome


Change Faenza-Radiance default empathy icons

Well that's easy.

Open up Nautilus/PCmanfm/Marlin/Thunar and go to /usr/share/icons/Faenza-Dark/status/ or /home/.icons/Faenza-Dark/status/

There you'll see different icon sizes 16, 32, 48, etc, inside locate these files:

empathy-available.png
empathy-away.png
empathy-busy.png
empathy-extended-away.png
empathy-invisible.png
empathy-offline.png

And copy the files from the Faenza-Dark folder over the Faenza-Radiance folder, overwritting them in the process, you need root permissions to move them should they be in /usr/share/, open up a terminal and type gksu nautilus that will spawn another window with root permissions so you can copy the files between folders located in / such as /usr/.

There is no need to use this if the icons are in your home folder and DO NOT USE sudo nautilus.

Copy the desired sizes, and done that should do it.


Why isn't Steam available in Ubuntu's software center?

If you're using a 64-bit version of ubuntu you wont see steam in the official repos. Only the 32-bit version is officially supported. I had to get the .deb from steam's web site.


That image is built without extra package.

So you do not need to install that package. Just install these:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-headers-4.4.1-040401-generic_4.4.1-040401.201601311534_amd64.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-headers-4.4.1-040401_4.4.1-040401.201601311534_all.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-image-4.4.1-040401-generic_4.4.1-040401.201601311534_amd64.deb

This is if your system is 64-bit.

The easiest way is to download debs to your home folder and run:

sudo dpkg -i linux-headers-4.4.1*.deb linux-image-4.4.1*.deb


Have a look at this question:
Unity Notifications do not look normal?
Removing some Xfce packages (with the "purge" option)  worked for me.

If you do need the package xfce4-notifyd for some reason, you could try to modify OSD configuration as offered here: How to customize on screen notifications?.


Sudo command in bash script halts the script

Your script halts because sudo su starts a new shell process. Your original shell process - the one that is running your script - is waiting for the sub-shell to end.

I propose to run whole script with root privileges instead of asking to log in as root from script itself. Remove sudo su part from your code and run script like that:

$ sudo ./yourscript

This is common practice. Note, that system administration scripts like for example update-grub don't ask for root password - they are just expected to be run as root.


Is there supposed to be a Windows Network folder in the file manager?

Are you seeing the  Windows Network folder in the Browse Network

If so this is normal, it is the folder where the information goes that allows Ubuntu to connect to an existing Windows network.  If your really paranoid, click it and see that it is empty unless you have other computers on a home network then you will see them by their computer names.

Addressing other things you mentioned:

Your ISP has little to nothing to do with any problems you had, you somehow downloaded a file that contained a virus, so you need not change it.  Your ISP only connects you to the web,  to think that your ISP could be responsible is like blaming the phone company if you dial a number wrong and end up on a sex line.

B.T.W running more than one virus program at one time is highly discouraged, they can conflict with each other and counteract one another.

You do not need to buy a new hard drive.  If you are going to install Ubuntu as your only OS you will select the option to Replace  Windows during installation the disk will be reformatted effectively wiping all data so any virus present will be destroyed.  In any case any Windows viruses can not run on Linux, the file systems are too different.


Move the vlc window, and close it prior to disconecting the second monitor. Vlc saves it window position when it closes.


Emacs info manual missing in Ubuntu 17.10

The Emacs documentation is in the package emacs25-common-non-dfsg.


How do I know what programming languages are pre-installed in Ubuntu?

An article in Ubuntu's own help pages points out five (perl, python, ruby, awk, and sed) are installed by default.


How to insert Tensor second order notation in libreOffice Math?

At least in LibreOffice 5, it appears to be possible simply by nesting the overline command:


You need to install the package

firefox-locale-$code

where code is the two-letter symbol of your language.


You can simply write another script like this:

#!/bin/bash

# go your script's directory
cd /path/to/script/

# launch your script
run_your_script.sh

If you want it to be executed on each startup, assign the new script to user root and put it in /etc/init.d/


Try following command to add missin gpg keys sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192 then sudo apt-get update. This will fix the problem.


Ubuntu 12.04.3 installation on a DOS netbook

I believe that you can install Ubuntu to any computers but you might have some driver issues after installation which can be fixed. So I cannot say that it'll definitively work on this model without any problem. You need to install and see. If you face any problem just ask to the community. You can find all kind of drivers or answers for your questions.

According to Ubuntu, it works on some Asus models %100. Here is the link which you can see the certified models:

http://www.ubuntu.com/certification/make/Asus/

You don't need Windows. Just boot it with your usb and install.


How can Firefox install WebApps without root privileges?

That WebApps are not actually applications, there are just links to the sites (like normal bookmarks) + special items in Launcher.

Also this "Apps" are installing only for current user, not for all users.

So no need to have root privileges to "install" them.


Which package should I file a bug against for pen input?

Input-related issues generally have to do with X.org (also known as X11, also known as X server).

However, this might be a kernel bug, as the symptoms occur only after suspension. The problem may be that the kernel fails to wake up your device.

Therefore I'd report a bug against Linux:

ubuntu-bug linux

That command will attach many useful information about your hardware that will help figuring out what's wrong. In case it turns out that the problem is not caused by the kernel, someone from the bugsquad will "forward" the bug to the right project.


ubuntu 14.04 - hibernate resume failure after cloning system to other hard-drive

Edit the file /etc/initramfs-tools/conf.d/resume and put the proper UUID in the file, like so:

sudo blkid # to determine the correct UUID for swap partition
gksudo gedit /etc/initramfs-tools/conf.d/resume
sudo update-initramfs -u
reboot

Contents of file:

RESUME=UUID=correct_UUID_here


You can't to my knowledge do it directly in gnuplot, but you can make the correct file in the terminal just before running gnuplot (I am assuming your data file is called file.dat):

seq 2.5 0.1 30 > xaxis.dat
paste xaxis.dat file.dat > newfile.dat

Now you can plot newfile.dat in gnuplot.


dual-boot, windows 10 can see Ubuntu ext4 partition

I guarantee you that Windows driver ext2fsd corrupted your Ubuntu file system. Uninstall it asap.

Let's see if we can recover your Ubuntu file system...

For 18.04 or newer...

boot to a Ubuntu Live DVD/USB
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier

sudo fsck -f /dev/sda6
sudo fsck -f /dev/sda7

repeat the fsck command if there were errors
type reboot


How to install gnome shell extensions without installing ppa repo in 13.10?

This is how I did it on 14.04 recently.  You could try it in 13.10, it might work the same.

$ sudo apt-get install gdm gnome-shell ubuntu-gnome-desktop

Note, if you want to keep your ability to run unity, you might want to skip installing gdm.  I've had better experience going full gnome, all the time and just using gdm, but gdm is not compatible with unity.


How to sync extension and theme in google-chrome

The issue is known: Issue 170107

The solution is to go to Extensions, enable Developer mode and press Update extensions now. That will immediately pull all the extensions for your account.


Can't seem to upgrade to 20.04 from 18.04 due to held back packages: libsensors4, libsensors-config, colord

After an aborted, almost complete, upgrade, I had a very similar problem. I have libsensors4 installed, and if I tried to remove it or install libsensors5, a huge number of other packages get removed.

The problem is that my libgl1-mesa-dri depends on libsensors4, as seen here:

$ apt-cache rdepends libsensors4
libsensors4
Reverse Depends:
  lm-sensors
  sysstat
  libgl1-mesa-dri
  libsensors-config
  libsensors-config

This package is not from the official Ubuntu package repository, but from a ppa kisak/kisak-mesa. You can see it in its version string 20.0.7~kisak1~b -- the problem is also that this is a higher version than the Ubuntu one:

$ sudo apt list   libgl1-mesa-dri
Listing... Done
libgl1-mesa-dri/now 20.0.7~kisak1~b amd64 [installed,local]
libgl1-mesa-dri/focal 20.0.4-2ubuntu1 i386 [residual-config]

So my solution (below) is to get rid of packages from this PPA. If you have similar outputs on the commands above, try the following to purge the PPA:

$ sudo ppa-purge -o kisak  -p kisak-mesa
Updating packages lists
PPA to be removed: kisak kisak-mesa
Warning:  Could not find package list for PPA: kisak kisak-mesa

If you can't purge it, like seen above, first add the PPA, then purge it again. If it's another PPA blocking you, replace the name in the command below.

$ sudo add-apt-repository ppa:kisak/kisak-mesa
[...]
$ sudo ppa-purge -o kisak  -p kisak-mesa
[...]
Suggested packages:
  lm-sensors
The following packages will be REMOVED:
  libsensors4
The following NEW packages will be installed:
  libllvm9:i386 libsensors-config libsensors5
The following packages will be DOWNGRADED:
  libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglapi-mesa:i386 libglx-mesa0
  libosmesa6 libosmesa6:i386 mesa-opencl-icd mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers mesa-vulkan-drivers:i386

Now the PPA is gone and apt will work better. Finally make sure you have all the desktop packages installed:

$ sudo apt install ubuntu-desktop


How to prevent a package from being installed

This can be done with APT pinning.

Create /etc/apt/preferences.d/we-hate-chromium with the contents:

Package: chromium
Pin: origin ""
Pin-Priority: -1

A negative priority causes the package to never be installed by APT. (It can still be installed directly with dpkg, though.


Ubuntu detects external hdmi screen and TV says its connected but nothing appears on tv screen

I had similar issue in Ubuntu Studio 14.04 LTS, running kernel version 3.13.0-43. I added an HDMI display (no sound capability) to my desktop as an addition to my older DVI monitor. Attempting to add the new screen from boot/power-on caused a system freeze. Attempts to add the HDMI display after boot via the Display applet under Settings Manager prompted a scrambled screen and system or X crashed (couldn't tell which one, screen unresponsive to anything but hard power cycle).

Booting to an earlier kernel version -in this case 3.13.0-40- resolved the issue (you can boot to prior kernels under the Advanced options in the Grub boot menu).

Interestingly, I found a strikingly similar issue with kernel 3.17.3 (Kernel Bug Tracker – Bug 88481) that had the exact same error message I had been getting from DMESG: BUG: unable to handle kernel paging request at ffffec2000000900. This seems to have possibly been brought on by commit ffe0245532b98efc4bc0e06f29c51d3f0e471152 in at least the case of the later kernel version.

References:

Bug 88481 - Kernel oops leaves system without graphical output [radeon]
https://bugzilla.kernel.org/show_bug.cgi?id=88481

HTH.


I had the same problem, and I also looked everywhere, tried everything.

Finally I got it working installing the next packages:

i965-va-driver intel-gpu-tools xserver-xorg-video-intel-dbg xserver-xorg-video-radeon-dbg xserver-xorg-video-r128-dbg xserver-xorg-video-ati-dbg

note: using kernel 3.8.0-31-generic

I am not sure what did the trick but it worked, now I can see the /sys/kernel/debug/vgaswitcheroo/switch.

Good luck,
Regards

Giri


This is resolved through the comments, not quite but its a bug

  This is a known bug. See
  http://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/…
  and duplicates. – @ali1234


If you're just looking to grab files off of your Ubuntu filesystem from this dual booted laptop, and you only have access to Windows, there's a great little utility from DiskInternals that will allow Windows to open a Linux filesystem.

You can find it on this page:
http://www.diskinternals.com/download/

And then scroll down to find "Linux Reader" in the list of freeware products.

The utility will allow Windows read EXT-formatted partitions, and you can copy and save files from the partitions into your Windows partition.


Dual boot Win8.1 and Ubuntu on Lenovo PC's in UEFI mode

YES PROBLEM SOLVED!!!

But in a very silly way.
I'm eager to tell you. It is because of a bug in: Startup disk creator.

As I told I'm using startup disk creator to create a bootable USB.
I MUST use a 64 bit version of Ubuntu but I also had downloaded the image:

ubuntu-14.04.1-desktop-i386.iso

When starting Startup disk creator in Ubuntu 12.04 LTS BOTH images were present:

ubuntu-14.10-desktop-amd64.iso
ubuntu-14.04.1-desktop-i386.iso

In Startup disk creator you can click the button: "other" to select the image you want.
I selected the amd64 version, not the i386 version. Then ran into trouble described above. If there are 2 images in the storage location just one image will be selected no matter which image you select. In the standard screen of Startup disk creator it is not visible unless you make the window wider.
I tried several times, yes, it is reproducible. There is no version visible. It came with Ubuntu 12.04 LTS.

Workaround

Remove or rename the image you do not want from you download directory and everything will be fine.

Image burning to USB and installing worked perfectly.

The only thin I'm puzzled of is why the 64bit amd image is working on a Lenovo B50-70 with Intel core i3. But that is another question. However, I can confirm that it works!

It works perfectly and is super fast!!!
Happy with Ubuntu.


Why do my windows disappear when I move them to different workspaces?

After browsing some answers like this one How can I reduce or increase the number of workspaces in Unity?, I checked general options in my CompizConfig and noticed that "Number of Desktops" is set to 4.

I don't quite understand what is this number of desktops, is it for multiple monitors or what, but if I set it to 1 then my problem is gone.

Note: If this is true, then Takkat's answer in linked topic (currently second answer with 7 up-points) is 'problematic' as it would introduce my problem for those that follow it.


Boot process enters an infinite loop after installing Ubuntu 11.04 together with Windows 7 and XP

and welcome to AskUbuntu.

Your Ubuntu installation is on /dev/sda6. Please use the following commands to reinstall GRUB correctly from the CD:

sudo mount /dev/sda6 /mnt

sudo grub-install --root-directory=/mnt /dev/sda


Missing Windows 7 when i installed ubuntu 12.4

Boot using a live usb/cd of ubuntu.
Use boot-repair to fix the problem.

After booting with live usb/cd ,Run following command in terminal,

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

Use Recomended Repair

At the end this will give you url , post it here if unresolved.

Also in live mode see the windows file are there or not.


You can use a command line application called "gammu". Open the terminal (press Ctrl+Alt+t) and type sudo apt-get install gammu. Type in the password when prompted(password will be invisible).After installing gammu create the configuration file for gammu using the command   gammu-detect > .gammurc. Ignore any output in the terminal. This command will create a hidden configuration file in your home folder. Open your file browser (nautilus) and press ctrl+h to view hidden files. Check whether the .gammurc file is created.Open the configuration file created and check for the devices detected by gammu. The devices listed as ttyUSB0 to ttyUSB3 belong to the D-Link modem.Using gammu you can send ussd only if you are not presently connected to internet. So to send ussd disconnect from the internet connection.Now to send a ussd type the following command in "terminal" : gammu getussd "USSD_CODE". For example gammu getussd *125#. Then wait for some time and you will get the reply for the ussd(time depends on the network provider. Took 2 min for me!).If proper reply is not getting, add the device number along with the above command ie, gammu 1 getussd *125# or gammu 2 getussd *125# etc.'gammu 1 getussd *125#' worked for me in Ubuntu 14.04 with D-Link DWP-156. It should work with DWP-157 as well. Good luck on that :) Explore the manual pages of gammu by issuing the command man gammu in the terminal.


From my understanding it is possible that I can get problems with the motherboard drivers if I don't reinstall Ubuntu.

Says who? Those drivers are generic.

  Is there any way I can back up the graphics driver on another hard drive and reinstall the driver if I need to do a clean install of Ubuntu?

Why did you ask about the graphics driver? You mentioned motherboard before. The DEB installer file will be in /var/cache/apt/archives/; if you want you can copy it from there. Otherwise you will need to download it from the web.

But you should not have to. From my experience removing proprietary drivers before you move your hard disk to another system should just work. Ubuntu will rebuild the device drivers every time you boot and will use the generic drivers for everything, including you graphics card, unless you have proprietary drivers installed.  I would file a bug if it does not.

In case you start using a newer graphics card from the same manufacturer check if your current graphics card is supported by the driver. Is this is so or if you intend to keep the current graphics card you can keep your old Ubuntu and just connect the hard disk to the slot on the motherboard.
If you start using a newer graphics card not supported by the current driver or if you start using a different graphics card and switch to AMD from nVidia or nVidia to AMD (or any the manufacturer) remove the graphics card driver from your current install and then connect the hard disk to the new motherboard.

Booting the system will then use the generic driver, it might fall back to "low graphics mode" but you can then always install the graphics card driver after you have an internet connection. From command line if need be.


Configuring Network without Default Gateway

I always enter 0.0.0.0 as default GW when I don't really need one.

Actually, if you enter IP and netmask, and never touch the GW field it will automatically fill in 0.0.0.0 as the default GW when you press Save.


How can I hide one wine app from the Unity panel without blacklisting all wine apps?

It's basically the same as How do I whitelist Truecrypt to show in the indicator area? except remove Wine and don't add TrueCrypt.


i ran again the comand curl -L https://install.pi-hole.net | bash it worked again.


Verizon 3G on Samsung XE500C21 with 12.04

Here is things to do after successfully put ubuntu in your samsung chromebook.

Go to software center and install synaptic.

For gobi Novatel Wireless you have to install gobi loader in synaptic or software center and reboot to activate your 3G mobile broadband.

With modem manager you can send sms check ussd and network. The link: http://www.ubuntugeek.com/modem-manager-gui.html

You can either see here the way to activate your GPS it's natively for gobi 2000 but it must be the same for gobi 3000: thinkwiki go to GPS section you must see something like   echo "\$GPS_START" > /dev/ttyUSB2, see more details there.

just try and keep searching ...


I don't think it is possible because you can't install Xorg on it. If you could, I would do the following.
1) enable automatic logging in and boot straight to command line

2) gut (keep important stuff though) the /etc/X11/xinit/xinitrc file and add the following:

exec java -jar /path/to/jar.jar

3) add in the rc.local to execute startx on boot

This should boot into your jar on boot.
If you can pull this off let me know, because I am working on a similar project.


How do I resize a Linux filesystem data .bin file?

We will try to make your two MB root.bin file to a 12 MB to demonstrate the steps.

Create a copy of your file (just in case for backup purpose):

cp root.bin 12mb.bin

Run this command to add 10M to the file size:

dd if=/dev/zero of=12mb.bin bs=1MiB count=10 conv=notrunc oflag=append

Now 12mb.bin is not 2M any more, actually its size is 12M.

Run:

e2fsck -f 12mb.bin

to check the filesystem on the file, then run:

resize2fs 12mb.bin

Done. mount it somewhere:

sudo mount 12mb.bin /mnt

check the size:

df -h --output=size /mnt/
Size
 12M

And the existence of files:

ls /mnt

We can also use losetup to act with the file like a block device:

sudo losetup -f 12mb.bin

then:

sudo losetup -l | grep -i "12mb.bin" | awk '{print $1}'
/dev/loop0

and we can resize /dev/loop0.


Ubuntu Mate For Rpi2 default resolution can't be changed

maybe you're experiencing the default setting for the overscan.

try uncommenting

disable_overscan=1

in /boot/config.txt (or /boot/firmware/config.txt on some distros) by removing the # and save (as root)

here's a more detailed description.

EDIT:

manpage


Ubuntu is showing me update packages that I don't need, How can I delete them?

If Nvidia drivers have been installed from the repos or a PPA with DKMS, it will not "die" after a kernel upgrade.

AMD drivers are updated, because Ubuntu has pre-installed open source drivers for many GPUs.

I suggest upgrading all suggested packages and installing Nvidia drivers properly if there is a problem with them.


Attempting to run a game (DFO) on Ubuntu

You can try this workaround reported here:

Pando Media Booster (PMB) based installers don't work (Atlantica Online, League of Legends, LotRO)

(prepending GC_DONT_GC=1 to the command line works around)

Much as it pains me to say so, If all else fails you could just run Windows under VirtualBox. I've resorted to such tactics to accomplish things that just weren't possible otherwise.


Why "Ubuntu light" font is rendered with normal width when set as interface font in gnome?

After some experimenting i've found the way to force light fonts in interface. You just remove all styles thicker than your desired.

Now my interface is running in thin Roboto, looks stunning on hidpi display. Generally it works this way:

Pick font (Roboto in my case)
Download files from somewhere, fonts.google.com is a good place to start things off
Unpack it
Install only Roboto-ThinItalic.ttf and Roboto-Thin.ttf

Other option is to remove thicker files from /usr/shared/fonts/, i.e. /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-* and add back light files (Ubuntu-L.ttf, Ubuntu-LI.ttf).


Is it possible to resize a partition in use?

It is not possible to resize a mounted ext4 partition.

This is possible only for btrfs but only "the right-hand border".

You can boot with Ubuntu LiveUSB and resize it this way.


Surround Sound on Ubuntu 14.04 with Logitech G430?

This site helped me out with that same question. I'm using the Logitech G930 headset.
 Edit the PulseAudio daemon.conf file by opening a terminal and enter:

gksu gedit /etc/pulse/daemon.conf

And search for: default-sample-channels. Remove ";" from the begining of the line, and instead of "= 2", change it to the number of speakers your system has. For instance if you have a 5.1 system, the number should be 6, for a 7.1 system: 8 and so on.
This is how that line used to look before you made any changes:

; default-sample-channels = 2

And this is how it's supposed to look after:

default-sample-channels = 8

Now you can save the changes and either restart your computer or:

killall pulseaudio && pulseaudio

Check to see if the channels are muted. Open a terminal and type

alsamixer

You can now test the channels by typing this in a terminal:

speaker-test -c 8

Again, replace the number with your number of speakers.

source: http://www.webupd8.org/2009/06/enable-surround-sound-in-ubuntu-linux.html


freezing and getting this on every boot: kernel: intel_soc_dts_thermal: request_threaded_irq ret -22

The error: "kernel: intel_soc_dts_thermal: request_threaded_irq ret -22" comes from the Intel SoC DTS Thermal driver.  It requests a threaded irq handler and for some reason one of the parameters to the kernel function request_threaded_irq() are invalid and it returns error -22 EINVAL, "Invalid parameter".  From what I can intuit from the code, it is most likely that the interrupt is invalid or the settings requested are not valid.  As it stands, this error means that some thermal zone trip point information cannot be read, so it may affect the ability to measure and/or control the systems temperature.

Since this driver is not running (because of the initialization failure), the only affect it can have is perhaps being able to control thermal overrun (for example via thermald), but that kind of issue would manifest itself in a machine shutdown on thermal overrun, which you are not seeing, hence I don't think it is related to your machine hang.


How do I get the contents of a 1-line text file into the bash command buffer?

The command buffer you are referring to is the bash history file... a history of bash commands.  The history buffer is written to ~/.bash_history when you log out of the terminal.  It's loaded into the buffer when you log in.

You can get the line you want into your bash history buffer by appending the line to your ~/.bash_history file, then manually reloading your bash history file into your buffer with the history -r command.

This is an example:

$ echo "command wanted" >> ~/.bash_history && history -r

Now when you hit the up arrow you will see "command wanted" in your "command buffer".

With this command line you will see the content of your textfile when you hit the up arrow:

$ echo $(<textfile) && cat textfile >> ~/.bash_history && history -r

Be sure to have your textfile terminated with a newline.


LibreOffice crashes on startup after upgrade to Ubuntu 15.04

I also faced the same problem. This solved my problem. To summarize, just install fglrx-updates.


follow the instructions here:

https://help.ubuntu.com/community/BinaryDriverHowto/ATI

under
Manually installing Catalyst 12.1

do everything there step by step until

"sudo amdcccle

To read more about the AMD/ATI Catalyst Control Center click here. Keep in mind that all configuration options for the ATI Catalyst Control Center mentioned there may not be available for your Ubuntu system. "

works with hybrid graphics card (intel / radeon)

you might have to change the filename of the .run file to the filename of the more recent file you downloaded.  (when typing in the terminal, you can use the tab key on your keyboard to autocomplete)

tested in Xubuntu 11.10


Creating Hadoop Cluster in ubuntu using laptop and desktop

You can install Hadoop on any of the machine don't have to think whether it is laptop or desktop you have to make sure for the connectivity between them. And perform all the necessary steps to install Hadoop if you want any document to install Hadoop (apache hadoop) please comment I can provide you one.

And it is not clear with your question what you want exactly....

If you want something else please clarify


Cannot See Directories on Ubuntu 19.10 from Windows 10

For starters, you need to actually create a smb share. It is done by editing configuration file. Most cases, it is fairly tedious job for some reason and often results in frustration and failure.

As a recommendation if you run your desktop headless, is to install a tool called Cockpit. It also has a plugin for Samba(also docker and others).

sudo apt install cockpit cockpit-storaged

Then install Samba plugin for Cockpit by running

wget -O - https://raw.githubusercontent.com/enira/cockpit-smb-plugin/master/install.sh | sudo bash

After that, open browser, enter your desktops local IP adress and add port 9090(for example, 192.168.0.110:9090), then log in with your desktop's credentials(and tick "Reuse my password for privileged tasks" if you want to adjust the settings there). Then you can fairly simply manage and create your SMB shares.

As I am running a headless too, I am not going back to ssh after having Cockpit for sure. You can set a static IP, SMB shares, manage docker, manage Tuned powersaving settings, even virtual machines, if you want and the best part - it has a terminal right there as well.


How can I change partition table without data loss?

I suggest you use Gparted.

Well, first of all, delete the 100 gb partition you created.

Then, reduce the size of the extended partition by a 100 gb.

Finally, create a new primary partition in the unallocated space left by the previous step.


Keyboard shortcut to move windows between multiple workspaces in 18.04

Launch the Settings application and go to Devices > Keyboard.

You would be able to find the preset shortcuts to move a window between workspaces here and also change these to ones you prefer. Even if no shortcuts are assigned, you can set new ones.


How about gvfs-mount, if you like the way nautilus handles things:

gvfs-mount 'ftp://youruser@yourserver.com/path/'

You will find the respective path mounted in $HOME/.gvfs/.

For more information use

gvfs-mount --help

as there is no man page. dpkg -L gvfs-bin will give you all the gvfs-tools that you can use from commandline. And also Google is your friend.


Drag-and-drop file onto script in Nautilus

You need a .desktop file with EXEC= entry.

See related feature request on launchpad and bugzilla.


Ubuntu GNOME 16.04 occasionally crashes - How to diagnose?

SOLVED: I was using Nouveau drivers, the default ones. I changed to nvidia proprietary drivers I downloaded from the website (.run file) and now it works.

So there is obviously a problem with the combination of GNOME(?)+NVIDIA GTX660 (other models?)+Nouveau

If you are facing the same problem, use nvidia proprietary drivers.


I am also missing same functionality. However, if you are looking for current time at different places then Time & Date indicator applet could be off your help.

To show the current time at different places, follow this procedure.

Click on Time indicator applet -> Click on Time & Date Settings... -> Click on Clock tab -> Select Time in another location checkbox -> Click on Choose Locations..

Now enter the name of the place and wait for applet to search it. Once it returns the results, then select the place you want to display.

Now come out, all places you have selected will be visible in your time applet indicator along with their current time.


How to set up Ubuntu for multiple users at the same time?

What you're looking for is called "multiseat", and you need to set it up to work that way. The instructions are here:

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


Fixed it:

First booted in the Ubutnu installation (the one with corrupted graphics) but I tapped on the SHIFT key as it booted to enter grub menu

then I chose advanced options and booted using recovery option

I pressed ALT-F4 (maybe F3... ) while booting and chose the option root

Now I was in command line root and connected to wifi using the following:

service network-manager restart

then:

nmcli device wifi rescan ( this was optional for me)

then list networks:

nmcli device wifi list

and to connect:

nmcli device wifi connect SSID password 123455

(I replaced SSID with my network name)

and finally

ubuntu-drivers autoinstall

rebooted and problem solved


Low Disk Space message, but disk usage says 377GB available

The most likely cause is Wubi or the CD you have in your system or that you mounted your Windows partition in /.

/dev/sr0        410M  410M     0 100%
/dev/loop0       11G  8.8G  935M  91%

The "377GB" that you see available is because you mounted the hosts hard drive into /, if you move that partition to /media you will see the real numbers:
sudo mkdir /media/host
sudo mount --move /host /media/host


One of the cause of this is a log file going crazy and being filled up with, the du -sh is ok but your going to be hunting around your system.

I would start at /var/logs and run watch on it, see if how much it grows over an hour or 3.

sudo watch du -sh /var/log

You can try other directories like /home as well.


Adding the etc/ssl/certs/Addtrust_External_Root.pem certificate solved the problem!


Is live patching now available for HWE kernels?

HWE Kernels are supported by canonical-livepatch.  In the link https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack#Kernel_Livepatching at the bottom it states:

For clarity, the Canonical Livepatch Service is only available and
supported against the generic and lowlatency GA kernel flavours for
64-bit Intel/AMD (aka, x86_64, amd64) builds of the Ubuntu 16.04
(Xenial) and 18.04 (Bionic) LTS releases.

canonical-livepatch only supports the running kernel at the time and will not patch any other kernels that are installed on the system unless you reboot to the desired kernel.
When you install a HWE kernel, you install a generic kernel, i.e. linux-generic-hwe-20.04.  However, not all generic kernels are supported by canonical-livepatch.  Through a test of my own I installed a mainline kernel of 5.11 (I know it is the newest but it was just to show that it is unsupported).
terrance@terrance-ubuntu:~$ canonical-livepatch status
last check: 23 minutes ago
kernel: (unsupported)

On my 20.04 LTS installation I have both the default kernel of 5.4x installed as well as the HWE 5.8x.  When checking the canonical-livepatch against them they both show the same output other than the kernel version.
terrance@terrance-ubuntu:~$ canonical-livepatch status
last check: 17 seconds ago
kernel: 5.4.0-65.73-generic
server check-in: succeeded
patch state: ✓ no livepatches needed for this kernel yet

terrance@terrance-ubuntu:~$ uname -a
Linux terrance-ubuntu 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

terrance@terrance-ubuntu:~$ canonical-livepatch status
last check: 27 seconds ago
kernel: 5.8.0-43.49~20.04.1-generic
server check-in: succeeded
patch state: ✓ no livepatches needed for this kernel yet

terrance@terrance-ubuntu:~$ uname -a
Linux terrance-ubuntu 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

terrance@terrance-ubuntu:~$ apt-cache policy linux-generic-hwe-20.04
linux-generic-hwe-20.04:
  Installed: 5.8.0.43.49~20.04.29
  Candidate: 5.8.0.43.49~20.04.29
  Version table:
 *** 5.8.0.43.49~20.04.29 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.4.0.26.32 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages


Did you see the answers to this question? There are a million ways of wiring these audio chips, so can you please add the model name of your laptop? Also have a look at this bug. You need to find the right model, maybe this list helps.

Lucid is a year older than your Sandy Bridge laptop, so I guess it would be better if you install 11.04 or wait two months and install 11.10.


After updating Ubuntu 18.04 LTS to 20.04 LTS, mobile usb doesn't support for my mobile

Did you maybe change the cable as well?

Try connect the phone before you boot up the PC, does it recognize it now? Helps to narrow the problem

Weird but in this case a user fixed it after installing his nvidia-drivers:
18.04: USB and other removable devices are not recognized after upgrade from 17.10

What is the output of lsusb?

Are you sure you did enable MTP on your Android device? (Go to notifications and change from charging to MTP file transfer)


Ubuntu installation interface not responding

make sure that you meet ubuntu's minimum installation requirements:

2 GHz dual core processor or better

2 GB system memory

25 GB of free hard drive space


Why doesn't Canonical update Thunderbird to version 38?

This answer focusses on the conceptual question: Why has Canonical made this decision?

It doesn’t suggest workarounds for the decisions Canonical has made. Those have already been given in another answer.

There are generally two ways for a downstream distributor (like Canonical) to deal with upstream releases.

Simply pass the new release on to the consumer.
Pass on only security fixes to the consumer.

For most packages, the second option is preferred. That keeps things stable. If Ubuntu passed on the latest PHP to me, my PHP scripts might suddenly stop working, because the syntax is slightly different in the latest version. On the other hand, if they passed on nothing at all, I might be vulnerable to attacks. So they pass on the security fixes only. That’s why my PHP version is PHP 5.6.4-4ubuntu6.2: it has the syntax of PHP 5.6.4, but also has some Ubuntu-specific tweaks when they’ve taken security fixes from later versions of PHP and put them into this version. This is known as backporting, and is the usual method. I’ll get a new version of PHP only when I update to a new version of Ubuntu.

That makes sense for a scripting language like PHP. You can see why I’d want stability. The latest version has slightly different syntax which might break existing scripts. For a desktop program like Thunderbird, however, there’s more debate about which method is preferable.

Some people prefer stability. The new version of Thunderbird might have a different user interface, which they don’t want to have to learn.
On the other hand, some people want those new features, and don’t see why they should have to wait for a new version of Ubuntu before they get a new version of Thunderbird.

It’s a balancing act. Consider also this:

Backporting security fixes is a lot of work for the Ubuntu team: it’s probably easier for them just to pass on the entire update.

For Firefox, Ubuntu does pass on the latest releases. The decision on whether to do this or to backport security fixes only is made on a case-by-case basis.

Another thing to consider is this: Different people want different things. Some people want stability and security fixes only, no changes in behaviour. Others want the latest and greatest new features. If Ubuntu’s repos work for the former crowd, the latter can always go directly to the source and get the latest stuff from there. However, if Ubuntu’s repos cater to the latter crowd, the former have nowhere to go, and are likely to end up just running old software with no updates, not even security updates. As such, it makes sense for Ubuntu to provide stability and backported security fixes for most packages.


If you're developing things*, I strongly recommend using virtualenv to create an entirely separate package environment for your development. This allows you to install anything without conflicting with the system... And perhaps more importantly, means the system updates won't conflict with your development (something I have lost hair to in the past).

If you have an installed program that depends on a newer version of a Python library, that's a bit tougher.

You could remove the python-xxxx package from Apt and install with sudo pip, but that might cause dependency issues with apt.
You could leave the packaged version and just install-over with sudo pip. This is dirty in so many ways but can occasionally work. I still wouldn't recommend it.
Or you could properly package up the newer version of the library into a deb and install it. I've just found a super-quick way of doing this, so I'll go over that now.

As I mentioned in the third bullet, packaging python packages is pretty simple once you know how. I'm going to suggest using stdeb. Once installed it makes the whole thing as simple as sudo pypi-install xxxx but there is immediately an issue: The current repository version is bugged and won't work. A newer version works though, and no, the irony is not lost on me.

You need to enable the Proposed repos (look in Software Sources under updates), then sudo apt-get update and finally sudo apt-get install python-stdeb.

Once you have done that, you can simply call:

sudo pypi-install xxxx

And stdeb will generate a python-xxxx package with all the right version information and install it.

* things not intended to be released to the wider Ubuntu community, where using pre-packaged dependencies is desirable.


Joplin app requires two clicks in dash to open

Adding Joplin as a startup application and turning on the "Start application minimised in the tray icon" option fixed it for me.


How to see, which key is pressed, as seen by unity window manager?

Try one of these maybe, they don't seem to have a problem with mod3 (which they display as Hyper)

easystroke

run twice to show UI, add action, click command and change to key, then it'll grab and show next keystroke.
compizconfig-settings-manager (ccsm)

for example navigate to general options -> keybindings and change one of them, then grab key combination.


I'm not sure whether we have the same problem, but for me, this helped:

sudo apt remove --purge libreoffice libreoffice-kde
sudo apt install libreoffice-gtk libreoffice

see also https://github.com/flathub/org.libreoffice.LibreOffice/issues/31 to see when the flatpack issue will be fixed


Why do I get "undefined reference" errors compiling a simple C++ program with gcc?

C++ programs need to be linked with the C++ standard library. Although you could link the standard library manually i.e. gcc -o hello hello.cpp -lstdc++, it's not generally done like that. Instead, you should use g++ in place of gcc, which links libstdc++ automatically.

Ex. given

$ cat hello.cpp
#include <iostream>

int main(void) { std::cout << "Hello world" << std::endl; return 0; }

then

$ gcc -o hello hello.cpp
/tmp/ccty9cjF.o: In function `main':
hello.cpp:(.text+0xa): undefined reference to `std::cout'
hello.cpp:(.text+0xf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
hello.cpp:(.text+0x14): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
hello.cpp:(.text+0x1c): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/ccty9cjF.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp:(.text+0x4a): undefined reference to `std::ios_base::Init::Init()'
hello.cpp:(.text+0x59): undefined reference to `std::ios_base::Init::~Init()'
collect2: error: ld returned 1 exit status

whereas

g++ -o hello hello.cpp
$ ./hello
Hello world


Can I connect dual displays on Thinkpad W541?

I am not familiar with thunderbolt but I am confident that what I know can help you. First connect your cables to your monitor and computer. Now go to settings:

Now select Displays:[

You should see a screen like this:

One of the problems that I faced when I first set this up was that resolution becomes much bigger on the original monitor. It will take a little work but you want to check the menu that says "Mirror displays (May limit resolution options)."

Also under General options make sure that "All displays" is the menu that shows.

Finally, click "Apply" You will be asked if you wish to keep these settings. You are all set, and the next time you connect your computer you will not have to do this again.


Is there a way to increase the screen saturation on Ubuntu?

You should begin by accessing System Settings > Color, so you could calibrate your monitors at there. It may be necessary to install some packages, Ubuntu automatically will install them.


How do I re-activate (wake?) the monitors from the command line

xset dpms force on

If you have a more complicated system where you need to wake more than one display, you could iterate through them with something like this:

for display in `ps aux | grep -oE "/usr/bin/X\s[^ ]+" | cut -d " " -f 2`; do
    xset -display $display dpms force on;
done


How instal Device usb wirelles mediatek - MT7601u RALINK on Ubuntu 20?

Secure boot will need too be disabled, check in terminal mokutil --sb-state
Then in terminal
sudo apt install git dkms
git clone https://github.com/jeremyb31/mt7601u-5.4.git
sudo dkms add ./mt7601u-5.4
sudo dkms install mt7601u/1.0

Reboot


Two swap partitions. One on SSD and another on HDD. Want to delelte the one on SSD

To remove the swap you need to live boot your system using a LiveCD or USB.
As root runthe following command to ensure swap is disabled:
swapoff /dev/<driveNameOfSwapToRemove>

Now open your fstab file as root located at /etc/fstab. It will look something like this:

# <device>             <dir>         <type>    <options>             <dump> <fsck>
/dev/sda1              /             ext4      defaults,noatime      0      1
/dev/sda2              none          swap      defaults              0      0
/dev/sda3              /home         ext4      defaults,noatime      0      2

Now remove the line that points to your swap (eg /dev/sda2) and then save and close the file.

If the other swapspace is not listed under your fstab file simply run
swapon <swapdrive name> to enable it immediately. To enable it on boot you need to add it to your fstab using the same format as above.


I've found that libnss libraries seem are loaded after chroot. So they are needed in the chroot jail. Link them there:

cp -vl /lib/i386-linux-gnu/libnss_* /var/spool/postfix/lib/i386-linux-gnu/


How to remove characters from file names using command line?

You can achieve this with a for loop and some bash expansion. If you're already in the directory containing the files:

for f in ./*; do mv "$f" "${f%.*.gif}.gif" ; done

If your directory containing the files is called /home/gifstore/ :

for f in /home/gifstore/*; do mv "$f" "${f%.*.gif}.gif" ; done

The ${f...} performs expansion of each filename we've saved into the variable named f. The % in the expansion of the filename means remove the shortest match of the following pattern from the end of the variable. The pattern is .*.gif, meaning any amount of characters between . and .gif. Finally we append the literal string .gif outside of the expansion to create our new filename, and rely on the mv command to move the file.

This won't work for hidden files, starting with ..


Syntax error in netplan.yaml after adding wifi section

Please consult:

cat /usr/share/doc/netplan.io/examples/wireless.yaml

You have omitted the line:

renderer: networkd

Also, the letter a in access-points in the example is at column 7. I don't see how yours could be at column 23.

Please recheck the spacing in the entire file.