Unmounting error trying to format a disk in Ubuntu 14.04

The slowness and the error message don't appear to be related.

Rather, it seems you are trying to format your system partition (typically /dev/sda1). In most cases, this isn't what you want, unless you are aiming for a complete system reinstall, in which case you should boot from an installation CD or USB drive anyway.

If you're very sure you want to format this partition, you'll have to boot from another device, such as a live CD or USB drive. The reason is that you can never unmount the partition running the system, since the system can't unmount itself. For the same reason, simply booting in recovery mode isn't enough.


For future people, I ended up taking inspiration from the other suggestions and did the following to recover the system:

Created Ubuntu 20.04 live USB stick
Boot system into it (for some reason for me Delete didn't work to get into BIOS like normal, but F12 did)
Mount the internal hard drive (sudo fdisk -l to find what it's mounted as, sudo mkdir /media/internal, sudo mount /PATH/FROM/FDISK /media/internal
Edit grub config to remove old invalid config (sudo nano /media/internal/etc/default/grub)
Follow directions in this post to update grub config substituting /media/internal/ for /mnt.
Reboot and it should work!


install json for java and set classpath in ubuntu

That error means that you did not add the library org.json.simple to your project.
If you are using maven, add the dependency:

<dependency>
    <groupId>com.googlecode.json-simple</groupId>
    <artifactId>json-simple</artifactId>
    <version>1.1.1</version>
</dependency>

Otherwise download the package and add it to the project manually. Here you can download it http://www.java2s.com/Code/Jar/j/Downloadjsonsimple11jar.htm


It is possible to set the high of the cinnamon bottom panel to 40 px?

Installing the newest unstable version from ppa solves the problem.


Gnome session doesn't look right... and shell extensions is empty?

You are not using Gnome Shell. Your desktop is Gnome Classic. So, extensions and themes are invisible because the only desktop environment that looks for Shell extensions and Shell themes is Gnome Shell, not Gnome Classic.

Maybe you have a problem with your graphic card software.


Prevening svn checkout list to be shown in terminal

You can redirect the output of svn command to /dev/null using:

svn <command> [options] [args] 2>/dev/null


Recursively compare counts of specific files between two directories

Since you have more .ogg than .flac, a simple approach would be to find all *.ogg names and check which ones don't have a corresponding .flac name. Something like:

find DIRECTORY02/ -type f -name '*ogg' -print0 |
    while IFS= read -r -d '' f; do
        flac="${f//.ogg/.flac}";
        flac="${flac##DIRECTORY02/}";
        [[ -e DIRECTORY01/"$flac" ]] ||
            printf "Missing file: %s\n" "$flac";
done

Here's the same thing as a commented script:

#!/bin/bash

## find all files in DIRECTORY02/ whose name ends in .ogg
find DIRECTORY02/ -type f -name '*.ogg' -print0 |
    ## Iterate over the results of the find command, saving
    ## each file as "$f". The fancy -print0 and read -d '' stuff
    ## is needed to deal with filenames that can contain newlines.
    while IFS= read -r -d '' f; do
        ## create the new $flac variable which is $f but with ".flac"
        ## instead of ".ogg"
        flac="${f//.ogg/.flac}";
        ## remove the "DIRECTORY02/" from the $flac variable. If
        ## the "$f" variable was 'DIRECTORY02/artist - album/file.ogg'
        ## it is now 'artist - album/file.flac'.
        flac="${flac##DIRECTORY02/}";
        ## Check whether the file exists in the same subdirectory under
        ## DIRECTORY01
        [[ -e DIRECTORY01/"$flac" ]] ||
            ## If it doesn't, print
            printf "Missing file: %s\n" "$flac";
done


100.0% usage by Audio codec hwC0D0: Realtek

Try changing "Enable Audio codec power management" to good in the Tunables tab for powertop. After doing so, hwC0D0 is no longer listed in powertop for me.


Why doesn't GNOME Shell run smoothly on my hardware?

You have a combination of things that can be improved. NVIDIA 7025/nforce 630a on-board video controller is "at best" a minimal performer. Recommend upgrading if at all possible.

AMD processor is a 2MB/AM3 which is not bad but if the board is a AM3 then there are other pieces that are faster than a AMD Athlon 240x2.

Mostly the GPU suffers from the nforce 630's performance. This is probably where your issues stem from. read specs here

Now all that being said. I would recommend Lubuntu as the system of choice.


Ubuntu 19.10, Thunderbird 68 can't login with IMAP but POP OK

I’m new to ubuntu myself and I’m having the same problem: when I try to add google account the web login prompt comes up, I can log in with my password and 2fa and when I click allow Tunderbird it gets me back to Thunderbird with an error saying ”Unable to login at server. Probably wrong configuration, username or password.“
I was able to replicate the issue in Ubuntu 18.04 as well!
The issue seems to be with OAuth2 and has been fixed in Thunderbird 68.2.1: https://www.thunderbird.net/en-US/thunderbird/68.2.1/releasenotes/ unfortunately Ubuntu 19.10 shipped with 68.1.2 :(

As a work-around I’m using 68.2.2 downloaded as a tarball from thunderbird website and everything works absolutely fine. As a test you can download it from https://www.thunderbird.net , un-archive it and run the thunderbird executable.

Question to Ubuntu veterans: what can we do to get version 68.2.1/2 included in the official repo? File a bug report?


In a terminal, reinstall alsa-base and pulseaudio, following next steps:

Remove alsa-base and pulseaudio:

sudo apt-get remove --purge alsa-base pulseaudio

Reinstall alsa-base and pulseaudio:

sudo apt-get install alsa-base pulseaudio

For them to load:

sudo alsa force-reload


Can I make grub2 boot from a CD in an external USB CD drive?

I'm sorry, but your only options seems to be plop. I have successfully tried on a computer whose BIOS that doesn't allow booting from USB-CD-Drive.

GRUB2 itself doesn't support booting from a CD-Drive but it supports booting from ISO files.


Ubuntu 20.04 LTS driver Intel Wi-Fi 6E AX210 160MHz

As is stated quite clearly on the firmware link you posted in your question, the Intel® Wi-Fi 6E AX210 is supported since kernel 5.10 as according to your uname output you are running 5.08 the Intel® Wi-Fi 6E AX210 isn't supported by your kernel version. The Linux 5.10 kernel (or later) will ship as part of Ubuntu 21.04 in April. This version will also get backported to Ubuntu 20.04 LTS at a later date. It's possible to manually install a mainline kernel in Ubuntu however if it breaks you get the pieces. Having entertained that warning, if you still can't wait and want to attempt to install kernel 5.10 or later you should review this answer.


You can upgrade from Ubuntu 14.10 to 15.04 easily now.

Fist make sure all updates are applied to your current system "sudo apt-get upgrade"

Then make sure the

file /etc/update-manager/release-upgrades

has the line:

Prompt=normal

Then the following command:

sudo do-release-upgrade


Protecting against (infinitely) slow DNS servers

You can try changing your DNS servers with Google's ones. It might be unfeasible if your ISP blocks external DNS queries, though.

I suggest you install a local DNS forwarding/caching nameserver such as pdnsd, which is highly configurable. Then you put nameserver 127.0.0.1 in your /etc/resolv.conf; pdnsd takes care of forwarding requests to other nameservers, or resolves lightning fast from the local cache. You can also configure a timeout after which a nameserver is considered to be non-responsive, so it would seem to fit your needs.

Pdnsd also supports parallel access to multiple DNS servers, so if one is slow the application will not be slowed down. It even supports this with fail-over servers (e.g. contact first two servers in parallel; if they don't respond, contact two more, and listen for responses from all four servers, etc.)

From the aptitude description:

pdnsd can be used with applications that do dns lookups, eg on startup, and can't be
configured to change that behaviour, to prevent the often minute-long hangs
(or even crashes) that result from stalled dns queries.

Security note: pdnsd is (self-confessed) not safe for outsiders to access: if your machine is out on the Internet, you need to configure a firewall to only allow local machine access.


Quickly creates wrong debian/copyright file

Check out this bug report: https://bugs.launchpad.net/python-distutils-extra/+bug/1025491

python-distutils-extra is pulling copyright strings from Glade files and is getting confused.


Adobe Flash installation problem in Xubuntu 16.04.1 i386

You can install Flash by enabling Canonical Partner and running

sudo apt update
sudo apt install adobe-flashplugin


How to upgrade Pulseaudio to the latest available version?

Warning:
  Upgrading pulseaudio should be the last resort when trying to fix an audio issues. Usually it is a missing setting, bad configuration, or incompatible hardware which cause such issues. Only if we know for sure that our issue was related to a bug that is now fixed, or in case we need new features added in a newer version we may try to upgrade pulseaudio.

Please also read about usage and limitations of a ppa:

What are PPAs and how do I use them?

For Ubuntu 12.04 there is a ppa from the Ubuntu Audio Development Team which includes pulseaudio 3.0.:

ppa:ubuntu-audio-dev/ppa

For latest and development versions of Ubuntu another ppa offers the latest supposedly stable pulseaudio version for testing:

ppa:ubuntu-audio-dev/pulse-testing

Installing pulseaudio from both ppa may introduce new bugs, and it may become difficult to downgrade later, so you should not be surprised if your sound issue became worse rather than better.


canon lide does not scan the bottom of the page in text mode

Setting resolution to 300dpi instead of 600dpi avoids the problem.
See Canon Lide 210 aspect-ratio-problem at 600 dpi for more information.


System with Intel wireless AC-9462 freezes unless WiFi is diabled due to missing firmware

I believe that the reason that you nor I can find any x.35 or x.36 firmware with a thorough web search is that they don't yet exist. The driver in question, iwlwifi, is written to look for the latest firmware version first; failing to find it, look for the next latest and so on until a suitable firmware file is found.

At the same time, the driver is written to automatically use later firmware versions as they are developed and included in newer versions of linux-firmware. In other words, when x.35 is written and released, the driver iwlwifi will find and use it without the necessity of a newer version of the driver. This is quite common in Intel and some other wireless drivers.

I think there is some reason other than firmware that causes your system to hang when using wireless. I invite you to ask a new open-ended question and include: dmesg | grep -e iwl -e wlp.

EDIT: We see this clue in your dmesg:

  Conflict between TLV & NVM regarding enabling LAR (TLV = enabled NVM =disabled)

I suggested that you try a driver parameter:

sudo modprobe -r iwlwifi && sudo modprobe iwlwifi lar_disable=Y

It seems to have solved the hang issue so I suggest that you make it permanent:

sudo -i
echo "options iwlwifi lar_disable=Y"  >>  /etc/modprobe.d/iwlwifi.conf
exit

You should be all set.


Can I place the Ubuntu One for Windows home sync folder anywhere on C:\ during installation?

How to use Ubuntu one outside the profile folder, or even the c:\ drive

This is an alternative, but I will present it with a side note saying that you might want to know what it actually does. but sure thing this is a valid alternative.

Some reading before going.

Something to consider on the road, hardlink for same volume (same drive letter), junction for different volume (different drive letter) on the same computer.

Small how-to using a program supplied with Windows 7 on the command line.

There is also a nice site with a shell extension here.

This is what I did myself to make it work:

Suppose you have a folder called Safe.data on Z: drive - z:\safe.data

What I did was to install the LSE shell extension and then simply right-clicked the safe.data folder inside the z: drive and selected "Pick link source".

After that I went to the Ubuntu One folder inside my profile folder C:\Users\username\Ubuntu One and right-clicked inside it then selected "drop as: Smart mirror".

This work as far as I'm concerned.

Please note that the "junction" link doesn't seem to work correctly with Ubuntu One, and also note that you can't add the "Smart mirror link folder" directly to Ubuntu One settings to sync it directly... to say it otherwise, make sure that the 'smart mirror link' is created inside an actual 'NORMAL' folder and select the 'NORMAL' folder to be synced when setup it up in Ubuntu one options.

That's about it.

BTW, don't know that guy with the LSE thing, but I always advice considering donating if you really enjoy. Those people keep this place nice like this.


Can't connect to Vsftpd Server - Passive reply with unroutable address

FTP protocol is specific, as it uses two simultaneous connections, in opposite to other protocols like SSH, HTTP or SMTP that use only one.
Therefore a NAT code on the router needs some special handling of the second connection in case of the FTP protocol - it cannot be handled just like a generic other protocol. Most routers have this functionality (and you don't have a problem with FTP on them), but some don't (and in that case you have a problem).
There is an option, pasv_address, in VSFtpd config file that you can use to tell VSFtpd to present a specific IP address on that second connection, so using this you can work around this router bug.


Upgrade to 18.04 (fresh and clean) from terminal without boot/physical access (on an existing Ubuntu system)

Sometimes the answer to a question is:

Please, don't do this!

Because you might have a full rsync backup, but it's not about the backup: It's about the restore!  How long is the restore going to take?  How are you going to restore if you don't have access?

Unless you have all of the following:

Remote console access!
A full bootable off-line back-up (E.g. CloneZilla even if it's on a 128GB USB Stick or a 1-2-4TB USB HDD)
The off-line backup drive contains a small 64 GB bootable partition containing a customized CloneZilla environment that will let you ssh into it to be able to  do the restore.
18.04.1 (never install the first version of an OS, that is true under any OS whether it's DOS, NetWare, Windows, *nix, BSD, ...)

If all of the above is true, just do a do-release-upgrade

¯\_(ツ)_/¯


Unfortunately the wink package is no longer available in the repositories of ubuntu since hardy

Wink Package Search, This mean that the package is missing..
You have two option :

Find someone that have a PPA here for your Ubuntu version. Search for wink package there..
Compiling from source.

What are PPAs and how do I use them?


My WiFi connection frequently stops working (no internet, not disconnecting)

The problem seems to have fixed itself on the next day, as it has not occurred in more than four hours.


What is needed for a networked home printer?

12.04 and later
To share a printer attached to a computer on the network open the printer dialog from the menu on the cogwheel on the to panel side. Choose the printer with a right click and tick "Share" to enable sharing. Next open "Server -> Settings..." from the panel menu as shown here:

This will open the following window

Select "Show printers shared by other systems" on the remote client, or "Publish shared printers connected to to this system" to make them visible to others on the net.
11.04 and earlier
Network printing is an in-build feature that is fully supported by Ubuntu. To setup a network printer you have to allow network printing on the host printer server (System -> Administration -> Printing -> Server -> Settings) by publishing your shared printer:

On the client side you have to setup this network printer, again from the System -> Administration -> Printing Menu by adding a new printer and selecting Network Printer. You have to give the name of the host machine where the printer is attached to:

Then, you will see the following screen:

By pressing 'Forward' a driver for this printer will be searched. Select the appropriate driver from the list and your new network printer is there.
Alternatives

By setting up Samba it is
possible to print from a Wndows
client, or using a printer attached
to a Windows host.

In addition there are routers that
support printer sharing of a printer
attached to the router. There is no
need to have another machine running
then. However it may be hard to setup
this feature from your router as
drivers for Linux are mostly
unavailable.

Some printers have an inbuilt
LAN/WLAN port capability where you
are able to attach your printer
directly to your network.


cryptsetup partitions not detected at boot

What I did to solve this problem was the following.

Deleted all the partitions set up with cryptsetup.
Then, installed cryptsetup via apt-get install.  This must be another version of cryptsetup.
Created the partitions again with cryptsetup luksFormat and the normal procedure.
The boot process managed to detect and open the encrypted partitions!

My conclusion is that the cryptsetupversion that is installed by default doesn't do its work properly.

Hope this helps.


How to boot Ubuntu physical partition via VirtualBox on Windows

Your setup is sufficient to access the Ubuntu partition through a virtual machine. Still, this partition is not the boot partition of your real machine, and the MBR of the boot loader Grub will likely not be installed on that partition but on the master boot drive.

To overcome this we may create a small additional boot drive in your virtual machine. Install Grub to this partition from a live system and let it point to booting Ubuntu from your real Ubuntu partition. This can also be done from Boot Repair.


It depends very much on your needs. What are your expectations? General comparison is available on Wikipedia

If you're just looking for a simple xmpp server for your private server, I would recommend Prosody. It's lightweight, easy to configure, supports SSL, and has a helpful community. You can get it up and running literally in minutes.


It is not worth spending time with, you may have plenty of things there since you installed which just are not  on boot disk. Just reinstall.


How to get an alert when my input volume is turned on and turn it off if I so desire?

Here is a simple script that scans a given pulseaudio input source for being muted*.

The source can be given as pulseaudio source index number as can be listed with:

pactl list sources

If the source was not muted a warning message will be displayed in a desktop notification.

#!/bin/bash
#
# Forces a pulseaudio source to be muted
#
# Usage:
# micmute <source> <wait> <--force>
# <source>: pulseaudio source index number
# <wait>: seconds to wait for checking
# <--force>: force muting microphone and notify
source="$1"
wait="$2"
force="$3"

echo "Scanning input #$source every $wait seconds."

while true; do
    if ! (pactl list sources | sed -n '/^Source #'"$source"'/,/^$/p' | grep "Mute: yes"); then
        if [[ $force == "--force" ]]; then
            pactl set-source-mute $source 1
            notify-send "Muting input $source"
        else
            notify-send "WARNING - input $source is not muted"
        fi
    fi
    sleep $wait  ## CLI option seconds to wait
done

Save that script with any name (e.g. micmute) and give it executable permission. The script then may be called with

./micmute <source> <wait> [--force]

<source> is the index number of the microphone source to be scanned.
<wait> will define the time in seconds after which we repeat our query for a muted source device.
--force is an optional flag to force muting of our source.

For me the following example line will query the mute state of my microphone (index 2) every 5 minutes, and it will forcedly mute it if it was unmuted.

./micmute 2 300 --force

* I preferred muting over setting the volume to 0 because of the advantage to restore the previous volume settings on unmuting.


How do I extract the contents of a partition backup done with dd?

You can mount it and access it as normal:

sudo mount -o ro,loop backup.bin /mnt

The files will appear in /mnt.


How to configure WebMin to accessed via internet (outside my network)

You need to open TCP port 10000 on the router and forward it to the system.

Keep in mind this is wildly insecure!

The proper way would be to, instead, set up an SSH tunnel between your remote system and your actual system with Webmin on it, and NOT EXPOSE webmin to the Internet directly.

There are a number of evils in webmin which allow for limitless bruteforcing of the webmin interface with it exposed right to the 'net which makes webmin bad to expose direct to the Internet.

UNDER NO CIRCUMSTANCES should you have Webmin directly accessible on the Internet because of the security risk to you, your data, and your network.  Strongly consider an SSH tunnel via SSH Key Auth and opening the SSH port instead and route traffic over the SSH tunnel to reach webmin instead.


You can edit this in
/etc/passwd

The fields in /etc/passwd are separated by :
The last but on field is the user's home directory.

Just make sure you do not introduce any extra spaces.


it's a known bug. Review & subscribe to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1169984
The bug report has workarounds while we wait for a fix to be committed. The workaround which works for everyone is to use the mainline 3.8 kernel as described in the report.


With your Netplan configurations, you're specifying the default gateways still for all three interfaces.  You need to pick one to be the Default interface.
This configuration negates your routing tables and uses DHCP to define your gateways - which won't work because that sets the system-wide default gateway.
We need to adapt it - disable the DHCP-assigned routes, and just let the addressing alone get assigned.
You'll also need your configuration set up proper for routing, and I think you were trying to overcomplicate the configuration.
Try using this configuration in your netplan configs:
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
      routes:
       - to: 0.0.0.0/0
         via: 192.168.0.1
         table: 1000
      routing-policy:
       - from: 192.168.0.0/24
         table: 1000
      nameservers:
        addresses: [192.168.0.10,192.168.0.20,8.8.8.8,8.8.4.4]
    eth1:
      dhcp4: true
      dhcp4-overrides:
        use-routes: false
      routes:
       - to: 0.0.0.0/0
         via: 192.168.1.1
         table: 1001
      routing-policy:
       - from: 192.168.1.0/24
         table: 1001
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]
    eth2:
      dhcp4: true
      dhcp4-overrides:
        use-routes: false
      routes:
       - to: 0.0.0.0/0
         via: 192.168.2.1
         table: 1002
      routing-policy:
       - from: 192.168.2.0/24
         table: 1002
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

This has some assumptions in play though, namely that (1) your networks are /24, (2) you want to DHCP your network but NOT have gateways defined for the other two interfaces (so eth0 is your primary, and eth1 and eth2 are just sitting on the other network but not the primary gateways), and (3) you are actually using Netplan.


Use the environment variable MANPAGER

export MANPAGER=more

e.g. in your ~/.profile or systemwide in /etc/environment

Thus only is affected the man command.


Print screen key opens default browser on Kubuntu. How to fix?

As per this Q&A: The print screen key does not open the screen shot tool in Kubuntu 16.10

Follow these steps:

Kubuntu 16.10 replaces the old screen shot tool KSnapshot with Spectacle but does not change the keyboard setting accordingly. Under System Settings -> Shortcuts -> Custom Shortcuts the folder "Screenshots" must be developed to show an entry "Start Screenshot Tool". The trigger for this entry must be set to be the print screen key. A dialog will prompt warning that the key is already assigned; it is assigned to KSnapshot; therefore ignore the warning.


Xubuntu 14.10 - after upgrade from 14.04 CPU Scaling not working

The problem seems to be cpufreqd (daemon) which was installed after update. I removed it and installed acpi (although the acpid was still there).

Removing cpufreqd seems to have solved my problem.


Screen always hangs when I try recording my screen with kazam

Use Simple Sceen recorder. Works fine with 16.04 LTS.

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder
sudo apt-get update
sudo apt-get install simplescreenrecorder


Just because a certain system is not certified, that doesn't mean that you can't run Ubuntu on it. You can test it by downloading a live version of Ubuntu, see if everything works as expected, then install Ubuntu Core.


Kernel Panic - Ubuntu 14.04 crashes when playing call of duty

A so called kernel panic happened (you can see this on the last lines of output). This can have a range of reasons, but you describe that it happens after having used the computer intensively for some minutes, therefore I suspect that gaming causes your computer to heat up, leading to this.


The best solution was suggested in the comments

  Preferences>Personal Stuff>Use Compact system titlebar and Borders

If that is not what you want, I suggest you file a  bug report / feature request.


Ubuntu 12.04 boot hangs with a black screen before grub menu after upgrade (gma500_gfx driver)

I have tested this solution with my own fitpc2 and it works.

You need to select "Windows XP", not "Other OS" in the bios settings.


With Linux, don’t expect to run a driver setup wizard. Brother is actually known for supporting Linux and do release its own printer drivers. Before you start this process, visit Brother’s website to see if they have support info for your model. While at the company site, look for .deb or a PPD file that you can use to manually provide the optimal driver for your printer.

Just google your model number (in your case 'Brother MFC-J5910DW') then download the Linux/.deb utility and printer drivers, whatever they have. May I emphasize reading any help they have there too. BTW, since you are there, download the manuals, etc.

Install then sit back and watch the fireworks fly. ;))


I had the same issue, go into terminal:

Type:

top

It will show a list of processes.

then type:

c

c is to sort by CPU.

If you see Apport at the top with 98% CPU it's glichted.

Here is how to disable it:
How do I enable or disable Apport?


How can I check if a particular partition ext4 is journaled?

sudo dumpe2fs /dev/sda1 | more, look for a line starting with Filesystem Features, should say has_journal.

To turn off journal and speed things up on a ext4 partition follow these steps:

Example uses sda1 device, this does not mean you should do it on your main disk, replace sda1 with the disk you are preparing, data loss will happen!

Create ext4 fs on /dev/sda1 disk

mkfs.ext4 /dev/sda1

To enable writeback mode use this. This mode will typically provide the best ext4 performance.

tune2fs -o journal_data_writeback /dev/sda1

To delete journal remove has_journal option, this will disable etx4 journal

tune2fs -O ^has_journal /dev/sda1

Check if everything is ok

e2fsck -f /dev/sda1

Done, recommended for speed applications only! Gl


What is the difference between / directory and /root director?

/ is the topmost directory in the file system.

/root is the home folder for the 'root' user (see id root).

All of those are sometimes confusingly designated by one word, root.


Extract mine only from file --mime-type to use in a if-else in bash script

Your first error is because you have a $ prefix on your assignment. Your second error is because you are trying to combine the execution of the command with the processing of the results (stripping the filename from the result). As always with bash scripting there are lots of ways to achieve the same thing so this is just one, try:
#!/bin/bash

mime=$(file -b --mime-type dog.jpeg)

if [[ $mime = image/@(jpeg|png) ]]; then
    echo "File is a jpeg or png."
fi

Then evaluate $mime but I suggest you search and read up on some bash scripting tutorials for if statements etc as your if statement is not valid bash script.


Can't format pen drive, showing write protected

Check whether your pen drive has a write protect switch on it, if none, the following command should help:

sudo hdparm -r0 /dev/sdb


Ubuntu bootup and shutdown error of nouveau

Install Nvidia drivers by running

sudo apt install nvidia-375

If you are using UEFI, disable Secure Boot in BIOS.


Xubuntu 14.04 removal of "Not installed" packages using Synaptic Package Manager

These packages are not being held around on your system. What Synaptic does is search through the repositories in your sources, and lists all of the packages that you could download and install. These are in the "Not Installed" category because, well, you haven't installed them. They do not need removed, because they are not there.

For further clarification, the "Not Installed (Residual Config)" category is not showing up because you have not yet removed any additional packages that left config files behind. This means either you haven't removed any packages yet, or you used the --purge option when removing packages, e.g.

sudo apt-get remove --purge foo

or

sudo apt-get purge foo

If you just do a regular

sudo apt-get remove foo

and package foo created global config files, those files are not being removed. Therefore, Synaptic sees them and says "Hey, you don't have these packages installed, but there are some left over config files for them." Still, nothing is physically ON your system that you do not want.


If you have already added the repository and GPG key.Skip to step-2 and execute the commands in your terminal to install opsview,
Adding repository:
Step-1:

Edit sources.list to add the repository
sudo gedit /etc/apt/sources.list

Add the below line to your sources.list file,
    deb http://downloads.opsera.com/opsview-community/latest/apt lucid main

Now to add the GPG keys,execute the following commands in your terminal,
sudo gpg --keyserver subkeys.pgp.net --recv-key 77CB2CF6
sudo gpg --export --armor 77CB2CF6 | sudo apt-key add -

Installing opsview:
Step-2:

To install opsview type the following in your terminal,
sudo apt-get update
sudo apt-get install opsview

Note:

For more information see this page.


Turns out, both these files are special cases.

/etc/init.d/keyboard-setup was long obsolete - when Ubuntu used Upstart, there was an Upstart job for this, so the init.d script was never properly used. When Ubuntu moved to systemd, this should have been changed, but was overlooked. A post-release update added a systemd keyboard-setup.service, properly obsoleting /etc/init.d/keyboard-setup. If you install 16.04 from the original ISO and upgrade keyboard-setup, you'll see something like this in apt's output:

Obsolete conffile /etc/init.d/keyboard-setup has been modified by you, renaming to .dpkg-bak

(Not that you modified it, but ...) That's why there's a dpkg-bak file for /etc/init.d/keyboard-setup. You can ignore it. See LP#1579267 for details.

/etc/default/chromium-browser is weirder, because chromium-browser's postinst script actually deletes it out of hand:

$ dpkg-deb --ctrl-tarfile chromium-browser_70.0.3538.77-0ubuntu0.16.04.1_amd64.deb | tar x -O ./postinst
#!/bin/sh

set -e

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
    update-alternatives --install /usr/bin/x-www-browser \
        x-www-browser /usr/bin/chromium-browser 40
    update-alternatives --install /usr/bin/gnome-www-browser \
        gnome-www-browser /usr/bin/chromium-browser 40
fi

rm -f /etc/default/chromium-browser

It has been this way since 2009. Some time in the dark ages /usr/bin/chromium-browser used to source /etc/default/chromium-browser, but now it sources /etc/chromium-browser/default (likely so that all chromium-browser config files can be kept in the same directory).

This missing file can also be ignored.


You make a database by typing

 mysql

In the prompt you enter, you then start by creating your database (as explained by onik in the comments):

 CREATE DATABASE dbname

Once you have made that database, you can experiment with it. You can simply type mysql in a terminal and you can get do anything sql related you want. It is possible that you have create to a role in your database with your username.

As described in Sauruv's answer you can also connect to the database as follows (without the space between p and your password or better, just do not use the -p option and you will get a password prompt [credits go to onik]):

Syntax:

mysql -u user_name -ppassword dbname

-u : Specify mysql database user name
-p : Prompt for password
dbname : Specify database name


Should I use Rufus or Etcher to duel boot Windows 10 and Ubuntu?

I currently use 18.10 and Windows 10 as dual boot. I first installed Windows 10 used Rufus to create a bootable USB for 18.10 and then installed Ubuntu. Everything works fine for me.


Laptop speaker is not working on Ubuntu 18.04

Try installing pulse audio volume control in a terminal with:

sudo apt install pavucontrol

then launch it in a terminal with

pavucontrol & exit

Mess with the output device settings and see if you get sound.


PDF Presenter Console is installed but invisible in Dash

Looking into its .desktop file in /usr/share/applications, it turns out that there is a line in the file:

NoDisplay=true

Which means the application is not meant to be called from the launcher: it is a command line tool. Also, in the file is a line:

Exec=pdf-presenter-console %f

Which means you can run it from a terminal window, by the command:

pdf-presenter-console [file]

Another way to run it is right-click on a .pdf file and choose: "open with"


How do I get EGL and OpenGLES libraries for Ubuntu running on VirtualBox?

GLFW, Mesa, Ubuntu 16.04 AMD64

I haven't tried it inside of Virtual Box, but this should work regardless since Mesa has a software implementation.

sudo apt-get install libglfw3-dev libgles2-mesa-dev
gcc glfw_triangle.c -lGLESv2 -lglfw

Output:

Source:

#include <stdio.h>
#include <stdlib.h>

#define GLFW_INCLUDE_ES2
#include <GLFW/glfw3.h>

static const GLuint WIDTH = 800;
static const GLuint HEIGHT = 600;
static const GLchar* vertex_shader_source =
    "#version 100\n"
    "attribute vec3 position;\n"
    "void main() {\n"
    "   gl_Position = vec4(position, 1.0);\n"
    "}\n";
static const GLchar* fragment_shader_source =
    "#version 100\n"
    "void main() {\n"
    "   gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
    "}\n";
static const GLfloat vertices[] = {
        0.0f,  0.5f, 0.0f,
        0.5f, -0.5f, 0.0f,
    -0.5f, -0.5f, 0.0f,
};

GLint common_get_shader_program(const char *vertex_shader_source, const char *fragment_shader_source) {
    enum Consts {INFOLOG_LEN = 512};
    GLchar infoLog[INFOLOG_LEN];
    GLint fragment_shader;
    GLint shader_program;
    GLint success;
    GLint vertex_shader;

    /* Vertex shader */
    vertex_shader = glCreateShader(GL_VERTEX_SHADER);
    glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
    glCompileShader(vertex_shader);
    glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &success);
    if (!success) {
        glGetShaderInfoLog(vertex_shader, INFOLOG_LEN, NULL, infoLog);
        printf("ERROR::SHADER::VERTEX::COMPILATION_FAILED\n%s\n", infoLog);
    }

    /* Fragment shader */
    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
    glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
    glCompileShader(fragment_shader);
    glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &success);
    if (!success) {
        glGetShaderInfoLog(fragment_shader, INFOLOG_LEN, NULL, infoLog);
        printf("ERROR::SHADER::FRAGMENT::COMPILATION_FAILED\n%s\n", infoLog);
    }

    /* Link shaders */
    shader_program = glCreateProgram();
    glAttachShader(shader_program, vertex_shader);
    glAttachShader(shader_program, fragment_shader);
    glLinkProgram(shader_program);
    glGetProgramiv(shader_program, GL_LINK_STATUS, &success);
    if (!success) {
        glGetProgramInfoLog(shader_program, INFOLOG_LEN, NULL, infoLog);
        printf("ERROR::SHADER::PROGRAM::LINKING_FAILED\n%s\n", infoLog);
    }

    glDeleteShader(vertex_shader);
    glDeleteShader(fragment_shader);
    return shader_program;
}

int main(void) {
    GLuint shader_program, vbo;
    GLint pos;
    GLFWwindow* window;

    glfwInit();
    glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
    window = glfwCreateWindow(WIDTH, HEIGHT, __FILE__, NULL, NULL);
    glfwMakeContextCurrent(window);

    printf("GL_VERSION  : %s\n", glGetString(GL_VERSION) );
    printf("GL_RENDERER : %s\n", glGetString(GL_RENDERER) );

    shader_program = common_get_shader_program(vertex_shader_source, fragment_shader_source);
    pos = glGetAttribLocation(shader_program, "position");

    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    glViewport(0, 0, WIDTH, HEIGHT);

    glGenBuffers(1, &vbo);
    glBindBuffer(GL_ARRAY_BUFFER, vbo);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
    glVertexAttribPointer(pos, 3, GL_FLOAT, GL_FALSE, 0, (GLvoid*)0);
    glEnableVertexAttribArray(pos);
    glBindBuffer(GL_ARRAY_BUFFER, 0);

    while (!glfwWindowShouldClose(window)) {
        glfwPollEvents();
        glClear(GL_COLOR_BUFFER_BIT);
        glUseProgram(shader_program);
        glDrawArrays(GL_TRIANGLES, 0, 3);
        glfwSwapBuffers(window);
    }
    glDeleteBuffers(1, &vbo);
    glfwTerminate();
    return EXIT_SUCCESS;
}

The key line lines of code are:

#define GLFW_INCLUDE_ES2
#include <GLFW/glfw3.h>

GLFW_INCLUDE_ES2 is documented at: http://www.glfw.org/docs/latest/build_guide.html#build_macros and a quick look at the source shows that it forwards to GLES:

 #elif defined(GLFW_INCLUDE_ES2)
  #include <GLES2/gl2.h>
  #if defined(GLFW_INCLUDE_GLEXT)
   #include <GLES2/gl2ext.h>
  #endif

This source seems to be is in the common subset of GLES and OpenGL (like much of GLES), and also compiles with -lGL if we remove the #define GLFW_INCLUDE_ES2.

If we add things which are not in GLES like immediate rendering glBegin, link fails as expected.

See also: https://stackoverflow.com/questions/3809236/how-to-develop-opengl-es-gles-2-0-applications-on-linux/39356268#39356268

Credits: genpfult made the code much more correct.

ARM Mali OpenGL ES SDK

download from: http://malideveloper.arm.com/resources/sdks/opengl-es-sdk-for-linux/
open the documentation HTML on a browser
follow the "Quick Start Guide", it's simple

Contains several interesting open source examples + windowing system boilerplate (X11 + EGL).

The build system supports easy cross compilation for ARM / Mali SoCs, but I haven't tested that yet.

The key component included seems to be the "OpenGL ES Emulator" http://malideveloper.arm.com/resources/tools/opengl-es-emulator/ which "maps OpenGL ES 3.2 API calls to the OpenGL API". But that does not ship with source, only precompiled.

Uses a custom enterprisey EULA that appears to be permissive, but yeah, ask your lawyer.

Tested on SDK v2.4.4.


Ubuntu 18.10 - Issue with screen inactivity and lock screen

Same here after upgrading from 18.04 to 18.10. First tried to disable my extensions. After about an hour working I tried to lock my machine and failed. So not a solution for me.

Googling some more, when I came across Lock screen curtain in Ubuntu 18.10 won't open and a suggestion there was to remove and add gdm3 from terminal:

$ sudo apt remove gdm3
$ sudo apt install gdm3
$ reboot

Now, half a day working later, 10+ locks, the issue has not returned.

Update 2018-11-16

Issues have returned unfortunately. After going through the bugreport this suggestion came by:

gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED

For me this seems to work.


Can't get HP Officejet 6500 card reader to work

No go on this I'm afraid. You have to access the card reader over USB.

  We have removed support for the hp-unload (the card reader). To access the card please use the built in USB mounting system.

Edit: I say that but the hplip package still seems to ship hp-unload. Try this:

hp-unload hp:/net/Officejet_6500_E709a?zc=HP05857E -i


Taking video and snapshots simultaneously using a webcam

The easiest way to accomplish this, would be to do the exact opposite of what you're trying to do:

first capture still pictures
then convert those still pictures to a video

(so basically a combination of both above answers)

I would: take a minimum of 16 fps as that is the minimum our brain needs to see smooth motion

If this is for a web application, you wouldn't even have to convert these still images to a video stream as you could use JavaScript to display 16 images every second (refresh page 16 times per second) provided you've got enough bandwidth available to upload 16 pictures / second. But that depends on your specific use case.


This is due to the memory issue on the CPU side, you can open the system monitor to see if you have enough swap file in the resources tag, when the mouse lag happens.

Also I would suggest to use 17.10 for GTX Nvidia card, since previous I tried to use GTX with 16.04.3 and mouse/keyboard lags after the system runs for a while. Then I switch to 17.10 then everything works out fine again.


Nvidia proprietary driver performance in 10.10

For those that don't know the specifics, the driver version is the recently-released 256.53. This was released in a rush after the previous version turned out to be a huge performance slug in certain situations.

However, there are still lots and lots of people (myself included) having problems with 256.53. This may be related to the kernel (as everybody involved seems to be on 2.6.35) but either way, the fix has to come from Nvidia.

And even if they do managed to get a new version out before Maverick releases, it needs testing and pulling into Ubuntu. Do not trust to hope.

I personally suggest you report your issue, along with a bug log (read the stickies) on the nvidia linux forum. In my experience, you'll get a lot more feedback there than you will through the standard support mechanism.


downloading and installing error: package is not a debian format archive

There is no package by the name of libstdc++2.10-glibc2.2. You can check this by going to the URL that you have mentioned in the question: http://packages.ubuntu.com/dapper/libstdc++2.10-glibc2.2.

When you run wget for the above URL, you end up downloading the web page (check the wget command output which states that you are downloading text/html).

If you want to install the C++ compiler and the C++ STL, then just install g++. sudo apt-get install g++.


weird iptables log messages after upgraded to server zesty-17.04

The source of the messages is the change for kernel 4.7

automatic-helper-assignment

  With kernel 4.7 and up the automatic helper assignment in kernel has
  been turned off by default. Netfilter conntrack helpers like for
  example nf_conntrack_ftp now need to be used in a different way. See
  Secure use of iptables and connection tracking helpers for more
  information.

  The new AutomaticHelpers configuration setting has been added to
  firewalld.conf:

  AutomaticHelpers
  For the secure use of iptables and connection tracking helpers it is
  recommended to turn AutomaticHelpers off. But this might have side effects on
  other services using the netfilter helpers as the sysctl setting in
  /proc/sys/net/netfilter/nf_conntrack_helper will be changed.
  With the system setting, the default value set in the kernel or with sysctl
  will be used. Possible values are: yes, no and system.
  Default: system AutomaticHelpers=system

  firewalld is now checking the
  /proc/sys/net/netfilter/nf_conntrack_helper kernel setting at start.
  With AutomaticHelpers set to system, this is the default, firewalld
  will use the actual setting in the kernel. This could wither be the
  default in the kernel itself or has been set using sysctl.

  If automatic helper assignment is turned off, firewalld will create
  rules in the PREROUTING chain of the raw table to enable the helper
  for the zone, where it is used. For this it uses the helper settings
  defined in the new helpers. These are the nf_conntrack_ module that
  provides the helper, the optional family if a helper could only be
  used for IPv4 or IPv6 and also the ports. The helper will only listen
  on the ports defined in the helper configuration. If there is a need
  to modify these ports, then it is possible to create an adapted
  configruaiton either with the GUI or command line tools or by copying
  the file to /etc/firewalld/helpers. If you want to change the
  protocol, please make sure that the helper is able to use this
  protocol. There is only a limited amount of helpers that are abel to
  handle more than one protocol.

  Here is an example of the ftp helper added by enabling the ftp service
  in the public zone:

# iptables -t raw -S | grep CT
-A PRE_public_allow -p tcp -m tcp --dport 21 -j CT --helper ftp

  A new backend has been added, the D-Bus interface has been extended,
  also the GUI and command line tools and the documentation.

For more info see [Solved] nf_conntrack default automatic helper assignment


Install Codeblocks 12.11 on Ubuntu 12.04 / 12.10

1º) Install libraries wxWidgets

$ sudo apt-get install libwxgtk2.8-0
$ sudo apt-get install libwxgtk2.8-dev

2º) Download libraries http://packages.debian.org/squeeze/libhunspell-1.2-0
    (pay attention if your distribution is 32 or 64 bits)
    and install (This prevents errors when installing codeblocks)

$ sudo dpkg -i libhunspell-1.2-0_1.2.11-1_amd64.deb

3º) Download the binaries http://www.codeblocks.org/downloads/26
    (pay attention if your distribution is 32 or 64 bits)
    Debian stable is: codeblocks_12.11-2_amd64-debian-stable.tar.bz2 (squeeze)
    Unzip to a folder and install:

    $ sudo dpkg -i *.deb

4º) If you develop for MySql Install MySql connector
    Download the version for your distribution from the official site
    mysql-connector-c-shared_6.1.0-2_amd64.deb
    and install

$ sudo dpkg -i mysql-connector-c-shared_6.1.0-2_amd64.deb

5º) Finally the library with header files for MySql

$ sudo apt-get install libmysqlclient-dev

(To install the MySQL server search on google)


How to install "libqt5webview5-dev" on Ubuntu 16.04 LTS?

This may be possible. It doesn't seem to have many dependencies. We're going to pull it from the 18.04 repo and install it with apt.
sudo apt update
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/q/qtwebview-opensource-src/libqt5webview5-dev_5.9.5-0ubuntu1_amd64.deb
sudo apt install ./libqt5webview5-dev_5.9.5-0ubuntu1_amd64.deb

apt-cache showpkg libqt5webview5-dev indicates the following dependencies must be met:

5.9.5-0ubuntu1 - libqt5webview5 (5 5.9.5-0ubuntu1) qtbase5-dev (0 (null)) qtdeclarative5-dev (0 (null)) libqt5webview5-dev:i386 (35
5.9.5-0ubuntu1) libqt5webview5-dev:i386 (38 5.9.5-0ubuntu1)

You might already have some/all of those installed, I have no idea because I haven't used 16.04 in a long time. They can also be installed in a similar manner.
NOTE: I have absolutely no idea if this will make your system unstable. It doesn't look all that invasive, but it may cause issues. Fortunately, you can undo all of this, but I highly recommend you backup your system before you attempt this.
Addendum: If you're curious as to how I got the address for wget, it's pretty simple.

Go to pkgs.org.
Find your package with the search function.
Scroll down and find the actual address for the .deb file.

With some work, you can install most anything. It's just not always a good idea.


Why does the Update Manager say 'Check your internet connection'?

I had similar issue on Ubuntu 14.04. To resolve it, when the Software Updater fails go to the settings > Ubuntu Software and change the server Download from to the Main Server as shown in the following image:

It was set on 'United States' and it was working fine, but suddenly this error showed up and as I mentioned changing the server fixed the issue.


Errors installing Ubuntu / No graphics / ISO burnt to a partition / Grub4Dos

I ANSWER MY OWN QUESTION:
Finally I was able, again, to install ubuntu from an ISO burnt to a 4GB partition in the same disc. Two things I did different and I'm not sure which made the day:

I added a lba flag to the boot flag.
I placed the 4GB partition as the first partition, erased the Boot4DOS Files (grldr, menu.lst, menu-advanced.lst).

I was able to correctly launch the ubuntu installation directly from that partition. Indirect reference from a grub does not seem to work.


There is a command called unopkg which does exactly that.

See man unopkg for details. Its description reads:

  LibreOffice is a fully featured office suite for the daily use with
  all features you would normally expect in an office suite. There
  exists many LibreOffice extensions all over the world. For example,
  see http://extensions.libreoffice.org/ This tool allows managing the
  extensions from the command line.

For examples see also: https://help.libreoffice.org/Common/Extension_Manager


Update problem with "Failed to fetch" error

You're using a Wine and Ubuntu repository from five years ago. So yeah, that won't work anymore. ;)

It's a fairly innocuous problem. Edit /etc/apt/sources.list with administrator privileges and remove the lines with 'dists/edgy/' in them. Or leave them there, shouldn't matter.

In any case, none of this is affecting Firefox. F7 will land when it lands.


What does the :any part mean to apt in a debian package dependency list?

The word any means any architecture here.

For example, on a amd64 system any of amd64 or i386 will satisfy.


As you already know JavaScript (and HTML I assume) you might like "Crosswalk" by Intel.

This is an open source project that will package your HTML as an Android, Windows, iOS or Linux (DEB) application.

See the Linux documentation here.


can ubuntustudio compose music (e.g. play guitar then auto write notation note)

You may compose with Tuxguitar and MuseScore for example, but these are for writing notation, then playing them as MIDI. However you have to write the notation yourself, they won't do it for you.

For guitars I recommend Tuxgitar because it has tablatures, but for everything else I recommend MuseScore.

Both software is readily available in Ubuntu, you just have to install it through the package manager.


USB, WIFI, Ethernet not working after kernel removal

You can find the correct linux-image-extra-... package in Ubuntu repositories and download it. It should match your current kernel version.

If you can't use USB from that system, you can always boot from Ubuntu LiveUSB, where everything should work.

Copy the deb package to your HDD, then reboot into your system and install the package with dpkg.

An alternative way is to chroot from Live system, to your installed OS and install the package that way. But it is a bit longer to explain.


Does Darktable manage the files of a collection?

No

Darktable only offers image manipulation and tagging operations, file management must be done in other applications


Here are suggestions from other answers. The steps described in other answers are:

Follow this answer by @imolit:

  uninstall your Nvidia or AMD driver

  I.e. sudo apt-get purge fglrx* or sudo apt-get purge nvidia-*

  reboot
  start Steam and let it update, while using the open drivers
  reinstall your proprietary driver
  and finally reboot again.

You can also try switching your driver to X.Org X server - see this answer by @Michael:

  Open Additional Drivers
  Select "Using X.Org X server(open source, tested)" driver.
  Then go to Ubuntu Software Center and install Steam (steam-launcher).
  Then change Graphic driver back.


Upgraded from 13.10 to 14.04 with wrong user name and can't access any files

Start by rebooting into recovery mode (covered on this question). Get up to the point where you're root.

After that look at stat /usr/lib/sudo/sudoers.so. I see:

...
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
...

By the looks of it, that won't ring true for you but not entirely sure what you've done. If the owner isn't root or the permissions are anything but 0644, we can fix that quickly:

chown root: /usr/lib/sudo/sudoers.so
chmod 0644 /usr/lib/sudo/sudoers.so

If that permissions/ownership is the only problem, that should fix it. Just run reboot to boot back into Ubuntu-proper.

If you nuked /usr completely (with a chmod -r ... /usr, for example), you need to restore ownerships to a lot more files. Thankfully, /usr is fairly rooty. You can restore the bulk of permissions with:

chown -r root /usr
chown daemon /usr/bin/at
chown libuuid /usr/sbin/uuidd

If you want to know how I got those two stragglers, I ran sudo find /usr -exec stat -c '%U %n' {} + | grep -v root on a cleanish system. If you have a recent backup, I'd suggest running that against your backup.


Why has Ubuntu 13.10 more recent packages than 13.04?

Ubuntu =/= Debian. The fact that Ubuntu is based on Debian, and the fact that Ubuntu takes packages from Debian's testing, imply no relationship between them, including package management and package compatibility.

Raring and Saucy are different distributions, with different repositories, and different versions of the packages.
For example, Raring has Libreoffice 4.0, and will always have it until its End Of Life, while Saucy has 4.1, and will always have it.


Node modules installed but not available

Installing express globally generally isn't a good idea, the way most node modules work is by being installed on a per-repo basis so anyone can recreate the environment by running npm install.

Thus the recommended way to install express is to run npm install express --save, which will not only download the module but also create an entry in the project's package.json.

Express is then never run directly from the command line but instead added using require() in either app.js or a file run by it. An example for how to do this is express' official Hello World.


How do I fix the "no such partition" error from GRUB?

Did you turn off your computer in the middle of disk formatting? If so you might need to fix your filesystem or, if you can afford to lose the data, just reinstall ubuntu and reformat the drive during installation.


Nvidia driver installed but sytem running Gallium 0.4 on llvmpipe

If you look at your NVidia card compared to modern equivalents I would say: disable it in the BIOS if a laptop, remove it from the PC if a desktop and run Xubuntu (or Lubuntu). Your performance is going to be much better in that case.

The only other way is to buy a new one. (Sorry to be the harbinger of bad news)


Firefox is part of the Ubuntu 16.04 distribution package, so you will get Firefox distro updates when you update your system. A couple of different ways to do that...

GUI Method:

Use the Software Updater, hit the Super, or Windows key and type, Software Updater, (without the quotes) and hit the ENTER key.

or,

Terminal Window Method:

Open a terminal window (press CTRL+ALT+T):

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


Actually I kind of stumbled upon an almost too obvious solution.

I can just connect a flash drive or external HDD using an OTG cable. Cables are available readily at any local store for about a dollar. No setup is required.

Source: https://www.youtube.com/watch?v=7VUhFKJgqqQ


How to cleanup old wireless networks from the dropdown list

Check your Bluetooth connections in Settings. That's what those are.


Glitch while installing or updating software?

Purging those kernel packages and their configuration files, then re-installing them may solve the issue. In terminal:

sudo apt-get purge linux-image-3.5.0-23-generic linux-image-extra-3.5.0-23-generic linux-image-generic && sudo apt-get install linux-image-3.5.0-23-generic linux-image-extra-3.5.0-23-generic linux-image-generic


How to encrypt or protect folder with password in ubuntu 14.04

I use veracrypt, which is the now active fork of TrurCrypt for these purposes.

You can create a encrypted vault and mount it whenever you want.


How to install Teamspeak 3 on Ubuntu 14.04 LTS

I solved it, the only problem were some blank spaces inside the desktop entry.


The easiest way to disable hardware acceleration in flash is to do it in the flash player window from the right click > settings & un-check the box for hardware acceleration.

In many cases though the box can't be clicked. If that's the case then  you must not have scrollbars present so use F11 to fullscreen the window, then you'll be able to click in  the box. After doing so press F11 again to return to normal window. (happens mainly when using compiz. On a 32 bit player going fullscreen works here, on a 64 bit player it currently  doesn't

I don't see a "Adobe flash player settings panel" but if it's available with the option to disable hw accelerating then try to full screen it if the box isn't clickable

An alternate method would be to access the player settings in a non compiz session which is the surest way to do


My problem is solved by deleting the ~/.local/share/zeitgeist folder and then restart.


How to check in script if upstart event was emited?

Short version: No.

Long version: Upstart events themselves are not recorded (unless --verbose or --debug used as init parameter and you grep dmesg). What you can do is check if a job whose start on stanza is net-device-up has been started (or make one for yourself for this purpose only).

Alternatively you can check ifconfig output in your remote connection script for a properly configured eth0 (whatever if you're using).


Getting specific firefox source snapshots for installed firefox in lucid(or whichever)

The source is contained in a tarball, which you need to extract:

apt-get source firefox
cd firefox_3.6.16+build1+nobinonly
tar xjvf mozilla-1.9.2-3.6.16+build1-source.tar.bz2
cd mozilla


Monitoring network bandwidth tool(vnstat):

install vnstat:

apt-get install vnstat

Monitoring command:

vnstat -m  monthly bandwidth

root@test:~# vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '16    106.13 MiB |   95.41 MiB |  201.54 MiB |    1.70 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated       273 MiB |     245 MiB |     518 MiB |

vnstat -d daily bandwidth

vnstat -h hourly bandwidth

  Q.I need to know if it is possible to track the monthly Bandwidth usage
  with Ubuntu and if it reaches a certain threshold to switch the VM
  off?

you need to manually monitor the bandwidth if montly bandwidth goes above your hosting limit you can manully shutdown the vm or you can use ufw firewall to block traffic.(script can be made for shutting down vm)

ufw firewall:

apt-get install ufw

sudo ufw default deny incoming

sudo ufw default deny outgoing

Teamspeak bandwidth usage:

if you are using good quility Codec audio(32KHz) each user will upload approx. 8KB/s of data.

considering 20 players 20*8= 160 KB/s(around 1GB in one hours).

considering 20 players playing 12 hours/day =12*1= 12GB/day

per month bandwidth usage = 30 * 12 = 360GB

Note: all players are not speaking at the same time.(if yes, bandwidth may increase)

considering 360GB/month is average bandwidth. Mostly all hosting provider provide around 500GB/month.

counter strike 1.6 server with voice enable:

I had cs 1.6 server which was voice_enabled and had 28-32 concurrent players. it was using approx 4-5GB/day.

Source :

http://www.thegeekstuff.com/2011/11/vnstat-network-traffic-monitor/

http://humdi.net/vnstat/man/vnstat.html

https://www.digitalocean.com/community/tutorials/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-and-debian-cloud-server

http://forum.teamspeak.com/threads/76111-How-much-Bandwidth-does-TS3-take


How do I stop Ubuntu from asking for my password every time I install something?

sudo nano -w /etc/sudoers

(and enter your password one last time). Then use the editor to change the line that says:

%sudo  ALL=(ALL) ALL

into:

%sudo  ALL=(ALL) NOPASSWD:ALL

or even:

%sudo  ALL=(ALL:ALL) NOPASSWD:ALL

(to allow assuming any group as well as any user).


Unfortunately No

Testdisk shows a D mark on all your partitions which indicates that these can not be recovered by the current version of Testdisk.


Recover a text file from a pendrive knowing the filename

testdisk has multiple modes of operation, and I think in simple mode it just does a sector-by-sector scan of the disk looking for things that look like files.

You'll want to follow to the letter this guide, which details going into advanced mode and then selecting the desired partition.

The ability to recover the filename from a deleted file depends on the filesystem used.

In FAT filesystems (including, I believe, FAT32) when a file is deleted the first character of its filename is overwritten and thus can't be recovered, but the rest of the filename can.  When testdisk recovers a deleted file on a FAT filesystem, it substitutes the missing first letter with an underscore.  So after recovery with testdisk (assuming you chose the right mode), instead of looking for "myfile.txt" you'll want to look for "_yfile.txt".  I'm not sure what testdisk does for multiple files that have identical names from the second letter onwards.

Note that testdisk is designed for use on an entire partition or drive at once and it's designed to be able to recover from a partition you can no longer mount, so when it recovers files it doesn't recover them in-place, it must recover them to a separate drive.


If anyone is interested i found the solution to my own problem!

Stupidly I was missing a further clang-dev package install.
I had convinced myself there was a problem with my install as i had seen
the identical issue talk about on the Web.


mount partition with installed ubuntu from another ubuntu installation

followed this guide
https://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/

the point about
sudo fsck.ext4 -v /dev/XXX

fixed the problem after the huge amount of approved fixes

thanks to all.


Ubuntu Software Center Error: Failed to lock the package manager

It looks like apt-get are running so paste this on terminal to stop it before using Software Center:

sudo killall apt-get


What Packages Does KDE Vaults Need to Operate?

The Ubuntu plasma-vault package page for 18.04/bionic doesn't mention "ecryptfs" in any of the dependencies, so I'd say no.

But, there's nothing like getting a custom answer about your specific system, so you can always simulate a remove (or install) to see what other packages would be removed (or added) with a package manager interface like Synaptic, or just

apt-get --simulate remove plasma-vault

The relevant lines should be similar to this non-vaults example:

The following packages were automatically installed and are no longer required:
  libecryptfs1 libtspi1
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ecryptfs-utils


You can not run ntpd with unprivileged ports: http://support.ntp.org/bin/view/Support/TroubleshootingNTP#Section_9.8.

However you can use openntpd which is a project from the OpenBSD folks. OpenNTPd does not require a privileged port for full time operation / clock discipline.

http://www.openntpd.org

More information for the skeptics:

I am including this since there seems to be some uncertainty that openntpd uses an unprivileged port. For starters looking through any of the presentations about the design considerations of openntpd you can see the developers do not list "sending from port below 1024" as one of the uses of privilege separation. This is how openntpd works, by default, in fact you can not configure openntpd to use  a privileged port if you wanted to.

More importantly you can see evidence for this behavior in many  posts about openntpd that show printouts from netstat or. This launchpad bug report   lists the output of netstat when openntpd is running:

 netstat -atpun | grep ntp
 udp 0 0 myIP:57706 88.190.225.228:123 ESTABLISHED 32455/ntpd
 udp 0 0 myIP:46760 188.40.33.81:123 ESTABLISHED 32455/ntpd
 udp 0 0 myIP:33742 88.190.225.228:123 ESTABLISHED 32455/ntpd
 udp 0 0 myIP:34625 85.10.199.217:123 ESTABLISHED 32455/ntpd

See the client port for the established connections? It is above 1024.

Another example from these instructions using freebsd provides the output of sockstat:

freebsd# sockstat -4 -p 123
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
_ntp ntpd 31696 4 udp4 83.228.93.76:54555 212.70.148.15:123
_ntp ntpd 31696 6 udp4 83.228.93.76:56666 195.69.120.36:123
_ntp ntpd 31696 8 udp4 83.228.93.76:49976 217.75.140.188:123

See how the local address has a port above 1024?

One more example of netstat on linux with openntpd:

# netstat -u -p

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 aquilonia:32771         skylar.fbagroup.co.:ntp ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:32772         gw.roaima.co.uk:ntp     ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:33050         ginny.provu.co.uk:ntp   ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:33051         cobra.first4it.co.u:ntp ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:33053         shrewd.pub.knigma.o:ntp ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:34275         cheddar.halon.org.u:ntp ESTABLISHED 2504/ntpd
udp        0      0 aquilonia:34290         81-5-136-18.dsl.ecl:ntp ESTABLISHED 2504/ntpd

Notice the client address?


How to restore nautilus 20.04 appearance

The things present in your images are:
Main theme:

Ubuntu's default "Yaru" theme

you seem to be using the "Yaru Dark" variant
you can change between 3 variants: "Light", the default, and "Dark", on the Appearance tab of the standard Settings app (also called Gnome Control Center)

Icon-sets:
Those dark-grey/purple-ish folder icons belong to the icon-set used by the "Yaru" theme, also called "Yaru" icon-set. To me, these seem to be optimized for dark themes.
The brighter, orange icon-set is called the "Humanity" icon-set. They were used as the default on previous versions of Ubuntu (e.g. 16.04). I find that they offer a much more readable experience in Nautilus, when using a light theme.
You can change the icon-set used in your theme either by running commands like these in the terminal:
# To choose Yaru
gsettings set org.gnome.desktop.interface icon-theme 'Yaru'

# To choose Humanity
gsettings set org.gnome.desktop.interface icon-theme 'Humanity'

or by installing the gnome-tweaks app and changing the "Icons" setting on its Appearance tab.


Create edited boot ISO file of Ubuntu, i386-pc not found

Accidentally I found out that I needed to turn on EFI in the Virtual Box. So the solution will be:

  Use x86_64-efi instead of i386-pc, copy all the internal files to
  grub folder and continue the guide.


You need to get the full theme:

sudo apt-get install adwaita-icon-theme-full

The icons that you are receiving errors regarding are listed as present in that package.


mplayer configure Error: libavutil/x86/asm.h header is required for shared FFmpeg

If you want to build mplayer from source, I would install all its build dependencies:

sudo apt-get build-dep mplayer


To get some apps not snapped yet on my Ubuntu Core arm i used the classic snap:

  sudo snap install classic --devmode --edge

then

  sudo classic

then apt-get is available


Which hardware manufacturers are more friendly to Ubuntu, besides Intel?

As you mentioned, Intel is great with open-source drivers:

For their integrated graphics
And for the other most common source of Linux driver hell, internal wireless adapters

I would be sure to get a laptop (upgrade the configuration if necessary) to get one of the Intel Centrino adapters -- either the 1000-series, or somewhat higher-end 6000-series is OK.

The other aspect is the entire system, especially dual-graphics, which aren't well supported in Linux for either AMD or Nvidia (and you will have to get one of them if you want discrete graphics). For that, I'd recommend you consider getting a Lenovo Thinkpad, preferably the T, X or W series (which have their heritage in IBM). They have excellent Linux compatibility, and their BIOS includes dual-graphics options many laptops do not which give you some degree of control over when the discrete card (and hence more battery!) is used. Thinkpads also have an excellent user support community for Linux hardware here.


freeipa-server is finally a standard module to be installed in the 16.04 LTS version without any additional PPA's!

sudo apt-get install freeipa-server


update manager gives unmet dependency error

My guess is that you are missing one of the canonical repositories so will you please launch Software Sources and under Ubuntu Software tab make sure it is set similar to:

After changing setting make sure you run sudo apt-get update. You are then ready to retry the installation / update.


For the DSL connection, set it up like this:
nmcli con edit type pppoe con-name "newconnection/whatever"
set pppoe.username ....
set pppoe.password ....
save
quit
Then:
 nm-connection-editor
and disable "Automatically connect" for the Ethernet/Wired connection in the General tab. Then for the DSL/PPPOE connection, in the IPv6 settings tab, Method, select Ignore.
Then in the terminal: sudo service network-manager restart. It only works like this for me. In Ubuntu 18.04 I didn't have to do the ignore IPv6 thing.


.gif is an extremely inefficient format for video files.
If you are flexible with the format, the best option is to convert the file to .mp4:  This will reduce the file size by an enormous degree without significant loss of quality.  In many cases it can reduce the file size of a .gif by a factor of 100x or more.  Use the following command:
ffmpeg -i input.gif -pix_fmt yuv420p output.mp4

Replace input.gif with the source filename and output.mp4 with the desired name for the new file.

If you need the format to be .gif, you can shorten the animation to reduce the size.  To do this, you will need to define start and end times in ffmpeg.
Here is an example:
ffmpeg -i input.gif -ss 00:00:00 -to 00:00:03 -c copy output.gif

-ss defines the start time in HH:MM:SS
-to defines the end time.
You can also use -t to specify duration instead of end time.
You can add a decimal point to indicate milliseconds. (ex. 00:00:05.5)

A third option would be to scale down the dimensions of the image:
ffmpeg -i input.gif -vf "scale=iw/2:ih/2" output.gif

This will halve the image dimensions, and roughly quarter the file size.  You can scale this down even further by changing the value. For example, scale=iw/3:ih/3 will result in an image with one third the original dimensions.


Ubuntu on a USB stick - boot in both BIOS and UEFI modes

NB : Here I present the manual way to proceed. It's a bit more complicated (not impossible thought) but you can control exactly what you want/need. If you don't understand anything, maybe using a software like MultiSystem would be a better solution for you.

There are two ways to create such usb key. You can use a mdos/MBR partition table or GPT partition table. Both have advantages and drawback, I'll try to describe the mdos version first, and may come to the GPT version later when I have more time.

mdos/MBR partition table

First, be sure to have all you data backup. These operation may be dangerous if you don't know what you do, and could erase your hard drive if you do bad manipulations, so be sure to know what you are doing before typing a command.

Step 1: Find your usb device

Use the command

lsblk

to find the name of your USB device. You can for example run lsblk, plug your key, and run one more time lsblk to see what changed. The device that appears is your key, and will be noted has /dev/sdX.

Step 2: Create the partitions

You can use any program you like : gparted, fdisk, cfdisk (a command line tool for fdisk)... Then do the following operations

First start the program (sudo gparted or sudo fdisk /dev/sdX depending on the program you choose)
Then reset your device to have a msdos partition table (in gparted it's in "Device/Create a new partition table", with fdisk type o.
Then create three partition. The first one is in FAT32, it will be the partition of data (it could also be NTFS, ext, or any other filesystem), the second one is an EFI partition (based on FAT) and must be bootable and around 150M, the last one is the partition with the iso, and must be bootable and in FAT32 (if you use ext2, if will boot, but you wont be able to use persistence). Here is what you would like to have at the end of the process (please, note the flags (drapeau in the picture), they are important) :

If you want to create them with fdisk, you should have something like this :

$ sudo fdisk -l /dev/sdc
Disque /dev/sdc : 14,3 GiB, 15376000000 octets, 30031250 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x2d844503

Périphérique Amorçage    Début      Fin Secteurs Taille Id Type
/dev/sdc1                 2048 14682111 14680064     7G  b W95 FAT32
/dev/sdc2    *        14682112 14989311   307200   150M ef EFI (FAT-12/16/32)
/dev/sdc3    *        14989312 30031249 15041938   7,2G  b W95 FAT32

To do that follow these steps:

sudo fdisk /dev/sdX
o

n
p
1
<Enter>
+7G     # Or any size you want, just be sure to let arount 2G at the end of the device
t
b

n
p
2
<Enter>
+150M
t
ef

n
p
3
<Enter>
<Enter>
t
b

w

sudo mkfs.fat -F32 /dev/sdX1
sudo mkfs.vfat /dev/sdX2
sudo mkfs.fat -F32 /dev/sdX3

Step 3: Mount the partitions

Now, mount them to write on them

mkdir /tmp/usb{2,3}
sudo mount /dev/sdX2 /tmp/usb2/
sudo mount /dev/sdX3 /tmp/usb3/

Step 4: Install grub on the two partitions (EFI and non-EFI)

Then, you need to install grub on the two partitions. Be sure to have grub installed, and then run :

sudo grub-install -v --no-floppy --boot-directory=/tmp/usb3 --target=i386-pc /dev/sdX
sudo grub-install -v --no-floppy --boot-directory=/tmp/usb2 --efi-directory=/tmp/usb2 --removable --target=x86_64-efi /dev/sdX

Step 5: Copy the iso file and configure grub

Then copy your iso file in the following folder :

sudo cp <your iso file> /tmp/usb3/linux-iso

and put the grub configuration in the two grub configurations /tmp/usb2/grub/grub.cfg and /tmp/usb3/grub/grub.cfg (NB : it can be grub2/grub.cfg depending on your grub version)

insmod loopback
insmod iso9660

menuentry 'XUbuntu 16.04 "Xenial Xerus" - amd64' {
          set isofile="/linux-iso/xubuntu-16.04.1-desktop-amd64.iso"
          search --no-floppy --set -f $isofile
          loopback loop $isofile
          linux  (loop)/casper/vmlinuz.efi locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=$isofile boot=casper file=/cdrom/preseed/ubuntu.seed noprompt ro quiet splash noeject --
          initrd (loop)/casper/initrd.lz
}

NB : you should edit this file to match the good iso file, here we supposed we put the file in /tmp/usb3/linux-iso/xubuntu-16.04.1-desktop-amd64.iso.

Reboot, and try it in both UEFI and non-UEFI mode : it should work, but you shouldn't have persistence yet !

Step 6 : add single persistence

Adding persistence is very easy. The idea is to create on the 3rd partition (in fact any FAT32 partition would be accepted) an empty file casper-rw that will contain some ext2 filesystem. It will be then positionned above the iso file, so that if the system is modified, the file casper-rw will record these modifications. If you want to record only the home, then do exactly the same steps, but with the filename home-rw instead of casper-rw (it may be usefull if you mind only to the document data, and if you prefer to avoid the problems with full persistence explained after). Finally, note that instead of a file, you can just create a partition in ext2 whose label is casper-rw or home-rw and it will give exactly the same result, except that you will be able to have more than 4Gb of modifications (max size in FAT32 system).

To create the file, just run :

sudo dd if=/dev/zero of=/mnt/usb3/casper-rw bs=1M count=512

(here it's 512M, but you can change the size of the data up to 4G)

and add persistent in the line linux ... in the files /mnt/usb{2,3}/grub/grub.cfg (modify the two files). It should looks like this :

insmod loopback
insmod iso9660

menuentry 'XUbuntu persistent 16.04 "Xenial Xerus" - amd64' {
          set isofile="/linux-iso/xubuntu-16.04.1-desktop-amd64.iso"
          search --no-floppy --set -f $isofile
          loopback loop $isofile
          linux  (loop)/casper/vmlinuz.efi locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=$isofile boot=casper persistent file=/cdrom/preseed/ubuntu.seed noprompt ro quiet splash noeject --
          initrd (loop)/casper/initrd.lz
}

Now reboot : you should have persistence ! You can even mix persistent and non-persistant files like this :

insmod loopback
insmod iso9660

menuentry 'XUbuntu 16.04 "Xenial Xerus" - amd64' {
          set isofile="/linux-iso/xubuntu-16.04.1-desktop-amd64.iso"
          search --no-floppy --set -f $isofile
          loopback loop $isofile
          linux  (loop)/casper/vmlinuz.efi locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=$isofile boot=casper file=/cdrom/preseed/ubuntu.seed noprompt ro quiet splash noeject --
          initrd (loop)/casper/initrd.lz
}
menuentry 'XUbuntu persistent 16.04 "Xenial Xerus" - amd64' {
          set isofile="/linux-iso/xubuntu-16.04.1-desktop-amd64.iso"
          search --no-floppy --set -f $isofile
          loopback loop $isofile
          linux  (loop)/casper/vmlinuz.efi locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=$isofile boot=casper persistent file=/cdrom/preseed/ubuntu.seed noprompt ro quiet splash noeject --
          initrd (loop)/casper/initrd.lz
}

Multiple persistence

For the moment, all the OS in the key have the same persistence file. And if it's a casper-rw which is shared, if can break everything (the data in one OS has nothing to do with the data in the other OS). To have one persistent file for each system, it's very easy, put the file in a given folder, for exemple persist/xubuntu:

mkdir /mnt/usb3/persist/xubuntu/
sudo dd if=/dev/zero of=/mnt/usb3/persist/xubuntu/casper-rw bs=1M count=512

and add persistent persistent-path=/persist/xubuntu in the grub.cfg files :

insmod loopback
insmod iso9660

menuentry 'XUbuntu persistent 16.04 "Xenial Xerus" - amd64' {
          set isofile="/linux-iso/xubuntu-16.04.1-desktop-amd64.iso"
          search --no-floppy --set -f $isofile
          loopback loop $isofile
          linux  (loop)/casper/vmlinuz.efi locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=$isofile boot=casper persistent persistent-path=/persist/xubuntu file=/cdrom/preseed/ubuntu.seed noprompt ro quiet splash noeject --
          initrd (loop)/casper/initrd.lz
}

You can also note that I didn't find a way to have one casper-rw partition for each OS, so I don't see how to have multiple persistence AND persistence of more than 4Gb for all the OS. If anyone has an idea, I'd be glad to hear about it. Maybe partition mounting could temporary solve this problem ?

Drawback of persistence

When you use persistence, you should be aware that upgrading may be dangerous. It could indeed break your system if the modifications touch the kernel, so avoid to do too much of them. Moreover, sometimes it doesn't fit well when you change the computer, some people explains that they lost internet when the internet card changed. If you want to upgrade your system, you should consider to install it directly on the usb key (like if the usb key was a disk), but this method could fail if you try your key on a computer which needs proprietary software that are not included in the installed OS. If someone has a solution that bypass these drawbacks, I would be glad to hear about it.

Sources

To configure grub to match other systems or if you want to use GPT instead of MBR, you may be interested by the following links :

https://wiki.archlinux.org/index.php/Multiboot_USB_drive
https://blog.garamotte.net/posts/2015/10/18/fr-one-usb-key-to-boot-them-all.html
https://github.com/aguslr/multibootusb

Enjoy, and not hesitate to ask if you have questions.


Can I give the default user that runs Perl scripts from cgi-bin different permisions?

Should anyone come across this I found my answer.

The default user (for Perl/CGI commands) is located in /etc/apache2/envvars

I commented the line out

#export APACHE_RUN_USER=www-data

Replaced it with the user I wanted

export APACHE_RUN_USER=franklin

then after saving the file I restarted the service

sudo service apache2 restart

I should note that even though I am sure it would have been the wrong thing to do, trying to make the default user 'root' produced an error.


How can I disable/enable the on-screen keyboard's auto-show behavior from a script?

Well, you can look into the source code of block caribou to see how it actually blocks it and block in the same way from your script :)
https://github.com/keringar/cariboublocker

I think the easiest one-line solution would be to try to disable/enable the block caribou extension from your script.

$ gnome-extensions list
$ gnome-extensions enable cariboublocker@git.keringar.xyz
$ gnome-extensions disable cariboublocker@git.keringar.xyz

edit: I actually really like your idea of running commands when switching between tablet and desktop mode and I felt someone should have implemented that already. I found https://github.com/alesguzik/linux_detect_tablet_mode that might help in running those commands.


I had the same problem on Ubuntu 10.04 LTS (Lucid Lynx) with the VLC 1.0.6 Goldeneye.
Every now and then (from several seconds to a dozen or so) there were short but annoying sound jitters / clicks / cracks when watching DVB-T.

The following change of VLC settings solved it.

Open "Tools" -> "Preferences" ("Ctrl+P"), click "Show Settings" -> "All", find "Input / Codecs" -> "Access modules" -> "DVB" ("DVB input with v4l2 support"), increase "Caching value in ms" from the default value of 300 to something like 1000.


Font characters displayed as squares in Ubuntu 18.04

I found the solution, was more simple than I thought.

First, you need to update local cache as described here:

rm -rf ~/.cache/fontconfig
sudo fc-cache -r -v

Then, you need to find fontconfig folder inside snap, since this is the snap version of chromium.

find ~/snap/chromium/ -name 'fontconfig'

Last, remove this folder inside .cache:

rm -rf ~/snap/chromium/common/.cache/fontconfig/

Afterwards, chromium will recreate this folder automatically by using your local updated fontconfig inside ~/.cache/fontconfig.

Restart chromium browser to take this effect.


ATI 6470m & intel HD graphics 3000 drivers?

I have an intel core i3 with hybrid graphics too (ati+intel) and the only solution that i found was to disable the intel card on bios to use the ATI on ubuntu. Then i installed the ATI driver selecting restricted drivers. Currently, hybrid graphics isn't well supported on linux so, maybe its better we wait a few more months.

Edit: If you want, you can read the comunity documents about hybrid graphics and how to change both graphics but as i said, its better to wait a few more months for more support.

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


Sony USB3.0 stick (USM64GXL) not recognized

You can try this workaround and see if it helps:

Create a new file like quirks.conf in /etc/modprobe.d/

sudo -i
nano /etc/modprobe.d/quirks.conf

Put the following line:

options usb-storage quirks=054c:09c2:u

The format is quirks=::u where  is the VendorId and  is the ProductId of your quirky usb device, which may be found via lsusb. The 'u' flag disables uas for the device.

It is advisable that you do this before you attach the device to the system.


How can I remote control Ubuntu from a Mac?

It depends on your BIOS and Network Configuration.

From your BIOS, look for the option to restore from AC Power Loss normally containing

Restore from AC power loss [always off | always on | last state].

I normally put it to last state, so if there is a power loss when it is off it will remain off, however if it is on during the power loss, it will automatically turn on when power comes back.

Also, you can enable the Wake on LAN feature on your BIOS if you can remotely access your router. For that, read : WakeOnLan

To access your Ubuntu from a Mac, you may need to install a remote control software like TeamViewer.

Goodluck.


As Ubuntu is based on Debian, you could use the latest Debian package, Package: gajim (1.3.0-1). You have two options for installation method:

Command line
GUI

First download the .deb file.
Command Line
You can use either dpkg or apt:
sudo dpkg -i <path to .deb file>

or
sudo apt install <path to .deb file>

So,
sudo dpkg -i ~/Downloads/gajim_1.3.0-1_all.deb

GUI installation
Double click the .deb package and the Software Center should open and offer to install the package for you.
If, for some reason, the Software Center doesn't open automatically when you double click, then right click the package, and select Open With and then choose the Software Center.
Alternatively, instead of the Software Center, you could use gdebi. If you don't already have gdebi, install it with the Software Center (oh, the irony).


Installation of Ubuntu 12.10 not sucessful in Samsung np100 notebook

Are you installing from your USB flash Drive during the install did you change where Grub installation on the usb or the hard drive. second are you installing 64 bit or 32 bit. Third If possible download the ISO from ubuntu web site i looked up the model Samsung NP-N100S-E01IN  comes with Dos and meego I would try booting from the usb drive it could be possible that the grub boot loader was installed  on the usb drive if that doesn't work try installing again with out the updates and in the install menu select something different find the drive on the notebook reformat to ext4 check box for boot \ and make sure you change where the Grub boot loader install to the hard drive


simple , open your terminal and paste as

cd /var/lib/apt/lists/partial
sudo rm -rf jm.archive.ubuntu.com_ubuntu_dists_precise-updates_main_i18n_Translation-en
sudo apt-get update


Cannot install Ubuntu within Windows 8.1, BIOS based

You can create USB Boot disk in either Startup Disk Creator or Unetbootin:

Startup Disk Creator

Note: Startup Disk Creator is included to Ubuntu, so you need either run Ubuntu (on other computer) or boot any machine from USB or CD/DVD Live.

Unetbootin

Unetbootin exists for Linux, Windows, Mac


Do the following and see if it works

Make a bootable USB/DVD and Boot into it.
After the load, open a terminal
type the commands

sudo -i
fdisk -l

Fdisk will inform you as your partition / (root) called, say for example it is /dev/sdb1, continuous running:

umount /dev/sdb1
fsck -y /dev/sdb1
reboot

Remove the DVD/USB and boot from the HDD/SDD (whichever is yours)


Took this from the ubuntu iP rights page

You can use the Trademarks, in accordance with Canonical’s brand guidelines, with Canonical’s permission in writing. If you require a Trademark licence, please contact us (as set out below).

You will require Canonical’s permission to use: (i) any mark ending with the letters UBUNTU or BUNTU which is sufficiently similar to the Trademarks or any other confusingly similar mark, and (ii) any Trademark in a domain name or URL or for merchandising purposes.

You cannot use the Trademarks in software titles. If you are producing software for use with or on Ubuntu you may reference Ubuntu, but must avoid: (i) any implication of endorsement, or (ii) any attempt to unfairly or confusingly capitalise on the goodwill of Canonical or Ubuntu.

You can use the Trademarks in discussion, commentary, criticism or parody, provided that you do not imply endorsement by Canonical.

You can write articles, create websites, blogs or talk about Ubuntu, provided that it is clear that you are in no way speaking for or on behalf of Canonical and that you do not imply endorsement by Canonical.

I highly recommend you read the actual site as this is just a spinet of the information on the site.

Also here is the rights for the Ubuntu logo.

Here is the rights for the canonical logo.


Advice for installation on Probook 450 G

I guess you just simply don't have space to allocate extra partitions.

You may resize your existed partitions by using GParted with Live USB or shrink partition by windows built-in Disk Management.
And I would highly recommend you to backup important data before resizing your partitions.

And, personally, I would leave space in the end of disk, It's easier to fill up by later, and then created a extended partition, since only 4 primary partitions or 3 + 1 extended partition are possible, and Linux works perfectly fine in logic partitions (you can have unlimited logic partitions in extended primary partition).

Good luck.


The results of rmadison gcc show that gcc 9 is the default gcc in Ubuntu 19.10.

$ rmadison gcc
 gcc | 4:4.6.3-1ubuntu5   | precise         | amd64, armel, armhf, i386, powerpc
 gcc | 4:4.8.2-1ubuntu6   | trusty          | amd64, arm64, armhf, i386, powerpc, ppc64el
 gcc | 4:5.3.1-1ubuntu1   | xenial          | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 gcc | 4:7.3.0-3ubuntu2   | bionic          | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:7.4.0-1ubuntu2.3 | bionic-security | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:7.4.0-1ubuntu2.3 | bionic-updates  | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:8.3.0-1ubuntu3   | disco           | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:9.2.1-3.1ubuntu1 | eoan            | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:9.2.1-3.1ubuntu1 | focal           | amd64, arm64, armhf, i386, ppc64el, s390x

You can safely uninstall all the other versions of gcc because you checked that no other installed packages have other versions of gcc as dependencies.

In addition to possibly having installed packages that require non-default versions of gcc as dependencies, some developers install multiple versions of gcc alongside each other because different programs that they are developing target different versions of gcc as their GNU C compiler.


setting up a Ubuntu desktop on an Ubuntu server

I believe you can use tasksel to install the default ubuntu‑desktop so that it works as it would if you had installed it alongside the OS.

After installing tasksel you should be able to run it with sudo, and then just select the ubuntu‑desktop collection.


Sorry, but there is no "factory reset" option in Ubuntu. You will need to reinstall it. To keep your files intact:

If you have a separate /home partition, unmark the "format" partition and set its mountpoint to "/home" during the installation.
If you do not have a separate /home partition, copy the entire /home directory to an external storage drive, such as a flash drive. You will need root privileges to do it, so run 'gksudo nautilus /' in a terminal, without quotes, to open the file manager with such privileges. Then just copy-paste the "/home" directory to the external drive. After you reinstall Ubuntu, your files should be there.


Wine "untrusted source" error when attempting to run an executable

iTunes has some problems installing through wine, I can tell you how to get it to run, but it may not function properly, and if it does not function properly, it is a pain to remove

you would do the following, right click on the exe, go to properties, then permissions, click on allow exicution of this file, also make sure that the read and write permissions are set.  this will allow wine to open the file, and run it.


Multipath Raid 6 - MDADM can't find superblocks - 18.04

The problem was due to using the devices and not targeting partitions.

First step was to pre-partition each of the drives.

sudo mkfs.ext4 -F /dev/mapper/35000c500415cbb87
sudo mkfs.ext4 -F /dev/mapper/35000c500415cbbef
sudo mkfs.ext4 -F /dev/mapper/35000c500415cfea3
sudo mkfs.ext4 -F /dev/mapper/35000c500415d0e3b
sudo mkfs.ext4 -F /dev/mapper/35000c500415d6e3b
sudo mkfs.ext4 -F /dev/mapper/35000c500415e456b
sudo mkfs.ext4 -F /dev/mapper/35000c500415e4e5f
sudo mkfs.ext4 -F /dev/mapper/35000c500415e8223
sudo mkfs.ext4 -F /dev/mapper/35000c500415ee867
sudo mkfs.ext4 -F /dev/mapper/35000c5004160b2df
sudo mkfs.ext4 -F /dev/mapper/35000c5004160b6bb
sudo mkfs.ext4 -F /dev/mapper/35000c50041611daf

Then I was able to go through the same create process using the partitioned drives

sudo mdadm --create --verbose /dev/md0 --level=6 --raid-devices=12 /dev/dm-0 /dev/dm-1 /dev/dm-2 /dev/dm-3 /dev/dm-4 /dev/dm-5 /dev/dm-6 /dev/dm-7 /dev/dm-8 /dev/dm-9 /dev/dm-10 /dev/dm-11
sudo mkfs.ext4 -F /dev/md0
sudo mkdir -p /mnt/md0
sudo mount /dev/md0 /mnt/md0
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
sudo update-initramfs -u

Then I had to add to the /etc/mdadm/mdadm.conf instead of the /dev/mapper entries

DEVICE /dev/dm-0
DEVICE /dev/dm-1
DEVICE /dev/dm-2
DEVICE /dev/dm-3
DEVICE /dev/dm-4
DEVICE /dev/dm-5
DEVICE /dev/dm-6
DEVICE /dev/dm-7
DEVICE /dev/dm-8
DEVICE /dev/dm-9
DEVICE /dev/dm-10
DEVICE /dev/dm-11


$ lspci -v -s 01:00.0

That should output the memory in Brackets after the usual output.


Can I use 12.04 to build Ubuntu Phone apps?

Yes.

Requirements

The example provided at Ubuntu App Developer lists the requirements for:

Operating System – Ubuntu (12.04 and higher is required because of PPAs mentioned below)
Qt5 and Ubuntu QML Toolkit available from the following PPAs. Both the PPAs provide packages for Precise (12.04) and higher.

ppa:canonical-qt5-edgers/qt5-proper  (Click here for instructions on using PPAs.)
ppa:ubuntu-sdk-team/ppa  (Click here for instructions on using PPAs.)

A Code Editor (preference for Qt Creator  - although you may use the editor of your choice)

Terminal Commands

Running the following commands should install everything you need:

sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update && sudo apt-get install ubuntu-sdk notepad-qml

If you also want to install Qt Creator:

sudo apt-get install qtcreator

Note if you already have Qt4 or if you plan to use that in future

It's good to read the following note from PPA:

  Qt4 and Qt5 are fully co-installable with the migration to the new qtchooser tool. [note: on 12.04 LTS not yet simultaneous Qt4 / Qt5 development executables, but libraries are fine]. The previous Debian/Ubuntu approach relied on renaming binaries and using  alternatives. When packaging against Qt5, include a dependency to qt5-default in addition to other dependencies. For Qt4, use qt4-default. Install qt5-default also on your machine to have Qt5 as the default configuration. See man qtchooser for more information.
  If you have older Qt4/Qt5 packages that have wrong/higher version numbers or conflict otherwise, you may use a variation of the following to force the versions in this repository, provided the other PPA:s are disabled:

  Qt5 revert: Pastebin Link
  Qt4 revert: Pastebin Link
  Qt4 revert if you've both i386 and amd64 installed: Pastebin Link.

  You can use the same to revert also to original archive versions, before which you should do sudo dpkg -P qt5-default qtchooser.


Network problem after upgrading from 12.04 to 14.04!

Edit /etc/resolvconf/resolv.conf.d/head:

sudo nano /etc/resolvconf/resolv.conf.d/head

Add the following line to the top of the file:

nameserver 193.229.0.40

Save the file:

CTRL + X
Restart your network (or reboot your pc):

sudo service networking restart


After long time of research I found this solution:

https://forum.kde.org/viewtopic.php?f=20&t=97252#p311733

  The reason here was: In owncloud I had calendars and addressbooks with the same name. KDE was not able to deal with this, while e.g. caldav/carddav on android did fine. Maybe it would work with different ressources, but I just renamed the addressbooks.

Thanks to: mlorenzen

If this should not help try this in addition:

I reinstall akonadi-server & akonadi-backend-mysql
I deleted all files in /home/.kde/share/config
(be carefull, your mail account information are there as well)


Gparted error moving partition and shrinking it

Are you changing alignment from Cylinder to MiB?

If so you might work around the issue by either:

Use "Align to MiB" and try leaving at least 1 MiB unallocated space at the start or end of the partition when resizing.
Use "Align to Cylinder" to maintain cylinder alignment when resizing.


Switch keyboard layout hotkeys doesn't work on lockscreen

The bug has been reported here:
Bug #1244548 - Keyboard shortcut for changing keyboard layout does not work on lock and login screen
and, as you said, it is only possible to change layout by clicking the layout indicator.
No workaround is known so far, so the only thing you can do is to wait until a fix is released. The importance of this bug is set to medium, so it may take a while. If you want to speed up the process, you may register on launchpad (if you are not registered yet) and state that the bug also affects you (it increases the bug heat by 4 points per affected user). Also, you may subscribe to notifications from launchpad, so that you receive an email when the bug is closed (they also increase the bug heat by 2 points per subscriber).


15.10, Getting some 404 errors when I apt-get update

The "Caffeine Developers" PPA does not have packages for Wily, as you can see because "Wily" does not appear in the "Published in" drop-down list. This is probably because version 2.8.3 of caffeine is in the official Wily repositories, rendering this PPA useless.