Partitions disappeared after power loss while installing

The first thing to do is to take a forensic copy of the drive.
Duplicating the drive entirely gives you the flexibility to work on repairing the problem on the copy while insuring you do no further damage to the original. I like dc3dd for this better than dd as dc3dd provides a progress report while it runs.

EDIT: newer versions of dd now include a progress report with the switch status=progress. To see if yours does see man dd

1) Boot from a Live media USB or DVD - Choose Try Ubuntu

2) Open a terminal with CTRL - ALT - T at the prompt enter

which dc3dd

this is just a quick way to see if you have the right tool installed for the forensic image. If it responds with a path like

/usr/bin/dc3dd

we have it. If not, we have to install it and enter

sudo apt-get install dc3dd before continuing to step 3

3) determine what your source (old) drive is named This is likely /dev/sda but to be sure look with Disks from the GUI in the attached image below you can see my sda1 is a 128GB drive with 2 64GB partitions.

4) attach the new drive Verify the device names with Disks from the GUI make notes! The old disk will be called source and the new one called target. So in this example source=/dev/sda and target will be /dev/sdb or whatever it says it is in Disks

Now that we have a plan we will duplicate the source to the target using dc3dd.

5) At the terminal issue the command

dc3dd if=/dev/sdX of=/dev/sdY change X to match the source (likely a) and Y to match the target (likely b or c) check your notes and be sure you have this right!!!

Note: To create an image rather than clone a physical drive change of=/dev/sdY to of=diskimage.dd

While we are copying the source drive to the target to insure we can always go back in case something goes wrong and we will be no worse off than before, we should likely familiarize ourselves with partitions in general. A good write up can be found at http://www.tomshardware.com/forum/270354-32-understnading-extended-logical-primary-partitions This knowledge will be useful later in the process.

6) When the copy is complete shut down, disconnect the drive marked source (old drive) and put it away somewhere safe.

7) Boot up the machine again with the Live DVD/USB with the target (new drive) attached.

8)We're going to install testdisk to recover the partitions on the target drive which is now identical to the source in terms of data.

Open a terminal and issue the command

sudo apt-get install testdisk

9) When the installation is complete we issue the command testdisk

The following example steps are from a very good step by step tutorial source

One condition:

    TestDisk must be executed with Administrator privileges.

Important points for using TestDisk:

    To navigate in TestDisk, use the Arrow and PageUp/PageDown keys.
    To proceed, confirm your choice(s) with the Enter key.
    To return to a previous display or quit TestDisk, use the q (Quit) key.
    To save modifications under TestDisk, you must confirm them with the y (Yes) and/or Enter keys, and
    To actually write partition data to the MBR, you must choose the "Write" selection and press the Enter key.

Log creation

Choose Create to instruct Testdisk to create a log file containing technical information and messages, unless you have a reason to append data to the log or you execute TestDisk from read only media and must create the log elsewhere.
Choose None if you do not want messages and details of the process to be written into a log file (useful if for example Testdisk was started from a read-only location).
Press Enter to proceed.

All hard drives should be detected and listed with the correct size by TestDisk:
disk selection

Use up/down arrow keys to select your hard drive with the lost partition/s.
Press Enter to Proceed.

TestDisk displays the partition table types.
menu partition table type

Select the partition table type - usually the default value is the correct one as TestDisk auto-detects the partition table type.
Press Enter to Proceed.

Current partition table status

TestDisk displays the menus (also see TestDisk Menu Items).

Use the default menu "Analyse" to check your current partition structure and search for lost partitions.
Confirm at Analyse with Enter to proceed.

Now, your current partition structure is listed. Examine your current partition structure for missing partitions and errors.

The first partition is listed twice which points to a corrupted partition or an invalid partition table entry.
Invalid NTFS boot points to a faulty NTFS boot sector, so it's a corrupted filesystem.
Only one logical partition (label Partition 2) is available in the extended partition. One logical partition is missing.

Confirm at Quick Search to proceed.

Quick Search for partitions
TestDisk displays the first results in real time.

During the Quick Search, TestDisk has found two partitions including the missing logical partition labeled Partition 3.

Highlight this partition and press p to list your files (to go back to the previous display, press q to Quit, Files listed in red are deleted entries).

All directories and data are correctly listed.

Press Enter to proceed.

Save the partition table or search for more partitions?
menu search!

When all partitions are available and data correctly listed, you should go to the menu Write to save the partition structure. The menu Extd Part gives you the opportunity to decide if the extended partition will use all available disk space or only the required (minimal) space.
Since a partition, the first one, is still missing, highlight the menu Deeper Search (if not done automatically already) and press Enter to proceed.

A partition is still missing: Deeper Search

Deeper Search will also search for FAT32 backup boot sector, NTFS backup boot superblock, ext2/ext3 backup superblock to detect more partitions,
it will scan each cylinder

After the Deeper Search, the results are displayed as follows:
The first partition "Partition 1" was found by using backup boot sector. In the last line of your display, you can read the message "NTFS found using backup sector!" and the size of your partition. The "partition 2" is displayed twice with different size.
Partitions listed as D(eleted) will not be recovered if you let them listed as deleted. Both partitions are listed with status D for deleted, because they overlap each other. You need to identify which partition to recover.

Highlight the first partition Partition 2 and press p to list its data.

The file system of the upper logical partition (label Partition 2) is damaged
damaged file system
    (click on thumb).

Press q for Quit to go back to the previous display.
Let this partition Partition 2 with a damaged file system marked as D(deleted).
Highlight the second partition Partition 2 below
Press p to list its files.

It works, your files are listed, you have found the correct partition!

Use the left/right arrow to navigate into your folders and watch your files for more verification

Note: FAT directory listing is limited to 10 clusters - some files may not appear but it doesn't affect recovery.

Press q for Quit to go back to the previous display.

The available status are Primary, * bootable, Logical and Deleted.

Using the left/right arrow keys, change the status of the selected partition from D(eleted) to L(ogical). This way you will be able to recover this partition.
set partition to recover

Hint: read How to recognize primary and logical partitions?
Note: If a partition is listed *(bootable) but if you don't boot from this partition, you can change it to Primary partition.

Press Enter to proceed.

It's now possible to write the new partition structure.
Note: The extended partition is automatically set. TestDisk recognizes this using the different partition structure.

If all partitions are listed and only in this case, confirm at Write with Enter, y and OK.

Now, the partitions are registered in the partition table.
NTFS Boot sector recovery

The boot sector of the first partition named Partition 1 is still damaged. It's time to fix it. The status of the NTFS boot sector is bad and the backup boot sector is valid. Boot sectors are not identical.

To copy the backup of the boot sector over the boot sector, select Backup BS, validate with Enter, use y to confirm and next OK.

More information about repairing your boot sector under TestDisk Menu Items. The following message is displayed:

The boot sector and its backup are now both OK and identical: the NTFS boot sector has been successfully recovered.

Press Enter to quit.

TestDisk displays You have to restart your Computer to access your data so press Enter a last time and reboot your computer.

End instructions from cgsecurity

If the drive is physically damaged we'll need a different approach using ddrescue


Use a command inside Zim Desktop Wiki with run command func

It probably uses /bin/sh to launch the command, not your shell. If you need to use an alias, try

bash -lic zim_up

I'm assuming your shell is bash.

-l use a login shell so your .bash_profile is sourced
-i force the shell to be interactive so aliases are activated
-c zim_up run your alias


Error trying to install OpenOffice or LibreOffice after removing OpenOffice

oooh mate what you have done....

In debian apt is wonderful command and play with it careful. Now as i understand your scenario. You are trying to remove your Office package. Remove packages from synaptic or software-manager is kind of easy, but through apt it might create problem sometime.

Before doing anything with apt, please take backup of /var/lib/dpkg/status and /var/lib/dpkg/avialable file. If anything goes wrong these files will help you to recover your apt correctly.

For Remove Libreoffice (complete)

  sudo apt-get purge libreoffice*

  sudo dpkg --configure -a

As you know libreoffice package contains lot of other libreoffice packages like libreoffice-draw libreoffice-writer etc. So you have to put libreoffice* (* represent all packages who start with libreoffice and end with anything).

NOTE: if dpkg --configure -a give you any error then you have to remove these packages one by one with

  dpkg --purge package-name

Hope it will fix your issue.


Connecting a bluetooth speaker (Anker SoundCore 2) requests PIN

The pin is not supposed to be entered on the speaker but from the computer. If your Bluetooth speaker has a default pin, just enter that and it should connect.


Unofficial/Local repositories and how do they differ from PPAs in Launchpad

If you boil this back to the simplest terms:

  What is an official repository and an unofficial one (Local Repository), including the ones created outside of Launchpad.

An official repository is one published as part of Ubuntu, managed by Canonical and Ubuntu MOTUs.

They currently consist of main, restricted, universe, multiverse, partner, extras and some exist in multiple "states" (-proposed, -updates, -backports, etc).

The repo names might change in time but the point is that these are .

On mirrors: The contents (MD5 hashes of files, etc) of the repository are signed with the Ubuntu key so even if you're pulling the official files from a non-official mirror, you can be fairly certain that they are the original files.

  How do repositories created outside of Launchpad compare to the ones found inside of it in terms of first, security, followed by any other features that both offer.

You can't implicitly compare security levels between a Launchpad PPA and another non-official repo hosted elsewhere. It all boils down to how much you trust the person running the repo.

The difference is with a Launchpad PPA, you can see the person who is packaging things. Most times you can see the source. In other repos (eg: dl.google.com or repo.steampowered.com) you likely know neither.

Trust is an odd thing.

Feature-wise a repo is just a particular structure of directories and files, hosted on the web. The only special features I've ever seen are authentication to allow only people who have purchased software to download it but this very basic web server security and hardly special :)

  How do official software repositories differ from the ones created by 3rd party PPAs in Launchpad or outside of it.

This is perhaps the biggest of the questions and it's probably best answered (if indirectly) by another question: How to get my software into Ubuntu?

Official repo software is supposed to have a development process behind it. Levels of testing that ensure quality and an amount of peer review. PPA maintainers can encourage this sort of process but it's not something you can assume. Some are better than others.


missing letter in between words on every application and system

Seems you have problems with the graphics card. Try 'sudo apt-get update && sudo apt-get dist-upgrade'. A new kernel version will probably solve the issue. Check this How do I fix fonts not rendering and missing letters? for more.

Hope it helps, thanks


No ethernet connection in dual boot with Windows 10 and Kubuntu

Solved by switching to an older kernel (Advanced Options at boot)


The 100MB partition is a system partition and contains boot files. Disk Manager will not allow you to remove this partition because removing this partition could cause the system to not boot providing that Windows 7 or Windows 8 on a MBR drive.

Now that being said, Do not attempt to delete on UEFI systems where Windows is installed on a GPT drive..

Now if that's not the case, or you're on windows 7 then take a look at Deleting Windows 7 System Reserved Partition


I tried different settings on "Configure Wine".

DVDFab works up to Windows version 2003.

The problem has been solved.


Bluetooth headphones no longer connect in 20.04

Sometimes the pairings go 'stale' and introduce pairing problems, especially after upgrades or firmware updates on either end of the connection.
Unpair the device completely and re-pair again from scratch.  That may help reestablish the link.


How to disable swapfile only for specific actions?

No, there isn't. "Swap" is a system-level action, and when swapping happens, the identity of the program is not available to the swapping code.


Apparently, somehow the led is not set automatically. The background- patch below will take care of that:

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

led = "/sys/class/leds/input45::capslock/brightness"

while True:
    time.sleep(1)
    ledstate = open(led).read().strip() == "1"
    capstate = "Caps Lock:   on" in \
            subprocess.check_output(["xset", "-q"]).decode("utf-8")
    if ledstate != capstate:
        newled = "0" if capstate == False else "1"
        open(led, "wt").write(newled)

How to use:

Copy the script into an empty file, save it as fix_led (no extension) in /usr/local/bin and make it executable.
Since you need to edit the file /sys/class/leds/input45::capslock/brightness you need to add the script to the sudoers file, as explained e.g. here.
Test- run the script by running

sudo /usr/local/bin/fix_led

in a terminal, test your Caps Lock key.
Now add the script to your startup applications: Dash > Startup Applications > Add. Add the command:

/bin/bash -c "sleep 10 && sudo /usr/local/bin/fix_led"

That's it. On next restart (log in), it should work.

Notes

Of course, the patch should work in all situations where the led is not functioning. the exact location of the file capslock/brightness may vary however. Set, if necessary, the location in the line:

led = "/sys/class/leds/input45::capslock/brightness"

in the head of the script (don't escape the : in python). I tested the script by making it set the led the wrong way :) (led off when Caps Lock was on, on when it was off).
The extra load of the script is none.

Explanation

Information on the current Caps Lock state can be fetched by the command:

xset -q

Once per second, the script checks if Caps Lock:   on is in the output. The script also checks if the current state matches the led state (either 1 or 0), as read from the capslock/brightness file.

If these two do not match, the script sets the led state according to the real Caps Lock state.


Install ubuntu 17.04 on dell xps 15 9560

Interestingly, I just did this earlier today on my Dell XPS 9560 with kernel 4.10.0-24-generic (latest as of this writing) and Gnome Ubuntu 17.04, and I get a black screen with cursor (cannot move it) on boot.

To get around the issue, you'll need to:

Reboot, and press ESC just after the Dell logo to get to the grub menu
Choose the older kernel (in my case, I think it's 4.10.0-09)
Log into your session, and install the Nvidia driver (via Software & Updates, Additional Drivers tab)
After the GPU driver has been installed, reboot

At this point, you should be able to log into your Ubuntu session running the latest kernel with no problems.

However, you're now running the Nvidia driver, which tends to run hotter (you'll hear the fan spinning), and reduces overall battery life between charges.

I'd prefer to run just the native Intel i915 GPU, but at the moment, it appears there's an issue with this (as of kernel >4.10.0-21). On this point, I haven't yet found a reasonable solution (I can disable ACPI entirely through the kernel, but the side-effects of this are not worth it).

Alternatively, you could also set grub to just boot an earlier kernel (<4.10.0-22), and you should be okay with running the i915 GPU.

UPDATE: After some investigation, it appears that the more recent kernels now support ACPI rev. 6, which requires a new kernel flag, acpi_rev_override=5. This appears to resolve my issues with disabling ACPI entirely (I can boot into desktop session, but lose various services, such as screen dimming), so using this flag instead may be a better overall solution. Sources: https://www.reddit.com/r/Dell/comments/5y3rii/xps_9560_battery_life_optimization_and_fan/ and https://bbs.archlinux.org/viewtopic.php?id=223056

Hope this helps!

Rich


How to get rid of the auto-opening search on desktop?

I solved my problem by using dconf-editor (had to install via terminal). On the left hand side, I opened org>gnome>nautilus>preferences, then in the right field, I found option "enable-interactive-search" and disabled it. Now, nothing happens when I randomly press a character key at the desktop.


There appear to be several technical issues impeding the progress of the new Ubuntu Forums theme. From a thread back in 2010 an Ubuntu Forums staffer confirmed there were several mock-ups made but goes on to outline there are "technical issues" with vBulletin that are hindering it's progress.


With gnome-sushi installed and then from Nautilus ....

To preview a song left click on the file then press the space bar. Gnome-Sushi will then play the file in a separate window.

Not as simple as the old mouse hover preview, but also better in that you can move the mouse away and it will keep playing until you stop it. If you click on another song the playback will switch to the new selection within the same preview window.


How can I ensure that my custom written C application runs at startup?

There are couple of ways. All based on what permission you require,

Easiest one is as follows,

The following is tutorial for
 - Open startup applications from the power cog

Click on ADD

Then provide the details,


You cannot self-host the server currently. It will be released as open source, meaning, some time in the future. There is still some work to do to make it possible to run it on arbitrary systems. When that happens, it should simply be a matter of using JuJu to deploy the service, or pulling it from the bzr branch and running it yourself.

Until then you will have to just wait, or write your own server based on the protocol, which is already open source.


sound preview / vista previa de archivos de sonido

English
The actual preview function like before is gone in Nautilus 3.x. The closer you can get is in this question: How do I enable MP3 preview? but is not the same. The option might be available in the future but until now there is no confirmation that it will be the same as before.

Español
La funcion de vista previa como se podia hacer antes ha sido eliminada en Nautilus 3.x. Lo mas cercano que puedes estar es encontrado en esta pregunta: How do I enable MP3 preview? pero no es lo mismo. La opcion podria estar disponible en el futuro pero aun no se tiene confirmacion sobre esto.


Looking for ways to watch PS Vue on Ubuntu

as of today ps vue has switched to an html 5 player.  I tested on 18.04b2 and it's working great


There used to be an option to enable editable menu accelerators for GNOME apps. The GNOME team removed the GUI for this, but at least under GNOME 2 it was still available via gconf. Recent Ubuntu versions use GNOME 3; I'm not sure of whether that still works (since GNOME 3 has migrated to dconf). I tried it in the old gconf-editor, and setting the option /org/gnome/desktop/interface/can-change-accels using dconf-editor, but it doesn't seem to work in Gedit (v3.4 on Precise).
According to Where to configure shortcut keys of Nautilus?, it doesn't work with Unity's global menu. You could load a different desktop environment and make the change there (if it works).
It may still be possible to edit the keyboard shortcuts by editing configuration files. According to a commenter on the (very outdated) Gedit shortcuts documentation page:

You don't really need a plugin to change keyboard shortcuts. This
(also) works:
~/.config/gedit/accels:

; gedit GtkAccelMap rc-file         -*- scheme -*-
(gtk_accel_path "<Actions>/GeditWindowActions/DocumentsPreviousDocument" "<Control>Page_Up")
(gtk_accel_path "<Actions>/GeditWindowActions/DocumentsNextDocument" "<Control>Page_Down")
(gtk_accel_path "<Actions>/GeditWindowActions/SearchFindPrevious" "<Shift>F3")
(gtk_accel_path "<Actions>/GeditWindowActions/SearchFindNext" "F3")

~/.config/gtk-3.0/gtk.css:

 @binding-set unbind-ctrl-d {
         unbind "<ctrl>d";
         unbind "<shift>F10";
         unbind "<ctrl>Page_Up";
         unbind "<ctrl>Page_Down";
 }
 GtkTreeView { gtk-key-bindings: unbind-ctrl-d; }
 GtkTextView { gtk-key-bindings: unbind-ctrl-d; }

According to one commenter, Ctrl-Tab is hardcoded and cannot be rebound easily, but there is a plugin that purports to do this. To install the plugin, see How do I install a plugin for gEdit v3?.
For gedit2, the plugin files go in ~/.gnome2/gedit/plugins.

If you're unable to get it to work, you could use a different editor that lets you edit shortcuts, such as KDE's Kate.
The list of default keyboard shortcuts in Gedit is available in the manual. Click "Help" > "Contents" > "Shortcut keys" in Gedit to access it.


I have used dual boot since Ubuntu 16.04. I have many experience of encountering broken grub and reinstalling OS.
I strongly recommend install them on separate drive and install them independently, which means install each OS with all the other drive unplugged. Each drive has their own EFI partition.
Also, I suggest Windows as first boot order in BIOS because Windows Update has high probability to destroy the grub.
I think a hard drive price is quite cheap compared with the time you spend to debug when the dual boot broken. I think it is ok to shrink the space from DATA drive and install OS in that space if you don't want to add another drive. Remember to backup important data all the time.


Error writing /etc/phpmyadmin/config.inc.php: Permission denied

You are trying to upload /save in /etc/phpmyadmin, while this directory have some permissions that disable user from writing on it, so you have to choose one of many scenarios to solve that:

Change the dir to some dir in your home
change permission of that dir using chmod. Read this for more info
change ownership of that dir

Personally I prefer to choose a directory in home to upload/save in unless you want to use this directory system-wide.


A fluke.  After I installed WINE 5.0 the sound/audio worked.  It must have installed some audio drivers Ubuntu was lacking?  Go figure.  Never the less I'm pleased.


How to install Ubuntu 18.04 on 256GB on Solid State Drive and 2TB Solid State Hybrid Drive with replacing Windows 10 and partitioning?

When the installer is run from the live USB, the user is prompted with install options. During this process it is possible to select which drive to install on. Whether to install alongside, or delete and install over the top of the current operating system. There are advanced options to set up partitions. If the boot drive that you wish to install on is already inside of the machine, then it is possible to install to that drive, and after installing the system you can add another drive to the system for data, etc, however the secondary drive will not be expanded storage of the boot drive.


How can I change the dpi of my monitors separately?

Ubuntu does not handle this very well yet - you can not have two monitors with drastically varying DPI and drag windows between them and have it work as it should. It is a limitation of Xorg and the widget toolkits. The problem is that they use a single DPI value, and then a window is sized in pixels, so if you have a 400 pixel wide window on your external monitor and drag it onto a hiDPI display, it will still be 400 pixels wide, but due to the increased pixel density will look far too small.

In Unity you can change the scaling of the Unity interface with "Scale for menu and title bars" in Display Settings, but this scaling does not affect applications.

What you might be able to do to mitigate this issue for applications is to lower the resolution of your hiDPI display using xrandr or Display Settings. The downside of this approach is that LCD displays look best at their native resolution, and using an alternative resolution can appear blurry. If this is a problem, you might be able to choose a resolution that is an integer scale of your original resolution (e.g. QHD => HD, 1920x1080 => 960x540 for FHD, 2560x1600 => 1280x800, 2880x1800 => 1440x900 etc.), but in practice you might not be able to do this because there is no exact integer scale resolution available.

Relevant bug reports:

Freedesktop bug #23705 - xserver forces 96 DPI on randr-1.2-capable drivers
Gnome bug #546711 - units and resolution independence


Passthrough AMD GPU to virtual machine without using second GPU

Yes, it is possible to pass one and single GPU on the host hardware to guest OS, but it requires host OS to not use that GPU - host OS will have no GUI in this case. I found a lot easier to borrow old Nvidia GPU for host OS…


How to move taskbar to bottom position as in Windows

I know this question is for 14.04, but as this is one of the first results for "moving taksbar to bottom", I think it will be helpful to others like me who want to do this on Ubuntu 16.04:

Just execute the following command:

gsettings set com.canonical.Unity.Launcher launcher-position Bottom

Or, if you prefer something more detailed, and more options, install unity tweak tool, as explained in the accepted answer.


Failed installation of package breaks apt-get

I fix this issue only with:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken


The installer encountered an error copying files to the hard disk, but the .iso file checksum is correct

maybe you will be surprised like I am. I recently encountered the same problem while trying to install ubuntu 14.04 on my other laptop (i3 Dell-Vostro). What I did is; I used Universal-USB-installer to create a bootable usb, then tried installing, it didn't work, I've been reading  lots of suggestions here with no luck. Solution - I simply decided to use another software which is rufus (https://rufus.akeo.ie/) to create a bootable usb, then it worked, just like that. I am surprised, as simple as that. So now I think that Universal-USB-installer didn't copy all necessary files,I hope this is helpful.


How do I install packages when using Ubuntu 18.04 LiveUSB?

Adding testdisk to a Live USB
Testdisk is located in the Universe Repository.
To enable, in terminal run: sudo add-apt-repository universe
Then run: sudo apt update and then sudo apt install testdisk
That should do it.


How do I concatenate multiple JPEG images into a PDF?

You can use LibreOffice to save as a PDF, DOCX, or pretty much anything Word can do. To save as a PDF in Writer, simply click File and then Export as PDF... about halfway down. If you happened to use Impress or any other LibreOffice program, the steps are exactly the same.

To save as DOCX from Writer, go to File >> Save As... and change the All Formats box in the bottom right of the window that pops up to Microsoft Word 2007-2013 XML (.docx). Simple as that ;).

If you need, I can edit my answer to include images.


Symbolic links error while creating Ubuntu UEFI bootable USB

You can find symbolic links with the -type l option to find. I don't happen to have a 15.04 beta CD image handy, but I do have a 14.10 image, and I ran the command against it:

$ find /mnt/cdrom -type l
/mnt/cdrom/dists/stable
/mnt/cdrom/dists/unstable
/mnt/cdrom/ubuntu

Those are all the symbolic links on the image file. I can't say I know precisely why they're there. If you can install from a medium that lacks these links, though, chances are everything will be fine and there will be no long-lasting problems caused by the fact that your installation medium lacks these links.

One more point: My preferred method of creating a Linux installation medium is to use dd, thus:

sudo dd if=imagefile.iso of=/dev/sdc

Change the if= and of= values as necessary. The resulting disk is something of a Frankenstein's monster in terms of its partitioning and related data structures, but it does work.


is it dangerous for me to install steam through playonlinux?even if I do not install it by the playonlinux server?

It is not necessary to download the installer through PlayOnLinux. All it does is download the installer from steam. Thus, is no different than you downloading it yourself.

As with any software, there is little to no danger if downloaded from an official source.

Steam does have a linux version. Is there a specific reason for using the Windows version under WINE?

Note: FYI -- PlayOnLinux, Does not actually host any games. It is merely a script engine that automates the process of creating a WINE prefix, installing the software, and creating launchers. The only thing actually downloaded from PoL is the script. Personally, I find that WineHQ's app data base is better than PoL.


Bash script to start and then shutdown/restart various processes

I'd tackle it something like this.

#!/bin/bash

startme() {
    cd ~/path/to/my/working-directory
    rackup faye.ru -s thin -E production &
    watch refresh.watchr &
    passenger start
}

stopme() {
    pkill -f "rackup faye.ru"
    pkill -f "watch refresh.watchr"
}

case "$1" in
    start)   startme ;;
    stop)    stopme ;;
    restart) stopme; startme ;;
    *) echo "usage: $0 start|stop|restart" >&2
       exit 1
       ;;
esac


Try executing below command -

sudo apt-get install ubuntu-restricted-extras

and do a system restart and check you are able to play the video.


USB FastE or GigE that "just works" with Linux 2.6 kernels

Fast Ethernet USB adapters are widely available and should be for a couple of years at least. For example, the majority of USB network adapters at Newegg.com are still Fast Ethernet :-)

Among those, I would highly recommend the D-Link DUB-E100 as something I have personally used and that works out-of-the-box; it has in-kernel drivers. I see that it now comes in two revisions, A and B, but the internal chipset should be identical.

From the official Linux-USB page, the module is usbnet and the supported chipset is the ASIX AX88172. Alternative adapters mentioned there include the Hawking UF200 and Netgear FA120.


Files and folders disappearing after using mv

when you did mv 11100/world ../server you moved the server folder one level up so to find your folder do cd ../ from your home directory


Computer, Home icons disappear from desktop after reboot

Maybe nautilus has been disabled to start at each session.

You can try following this answer:

  Go to Startup Applications, click "Add" and insert the command
  nautilus -n. This way you can have nautilus autostarting in the
  background even if hide-desktop-icons feature is in use.


I assume you are following the instructions from https://wiki.winehq.org/Ubuntu
wget -nc https://dl.winehq.org/wine-builds/winehq.key
The message you see means that you already have a file with the same name in the folder you are running your commands from. With the -nc option, wget is refusing to overwrite this file.
You can just delete this file manually and run the command again.


The correct answer was given by Mechanical Snail(check the comments above) on Stack Exchange. The answer's brief and simple, every Flash device uses a MLC because it is cheap and has a higher density. Giving SLC to the customer would make the pendrive costly as cost per gigabyte for SLC is more than MLC. For uses like these MLC is always preferred over SLC.


Different wallpapers on multiple monitors

The trick

It seems impossible to separately set wallpapers for the main screen and the second screen. What can be done however is to set a wallpaper, and have it spanned over two screens. We can automatically create a spanning image of two wallpapers of your choice and (also automatically) switch the wallpaper and the picture options, depending on whether the second screen is connected or not.
To make it look nice, it is necessary that at least the vertical screen resolution of both screens is identical, which is the case in your situation.

In practice

Preparation

In this solution, The preparing work you have to do is:

First, install imagemagick to automaically create the spanning image:

sudo apt-get install imagemagick

Prepare two separate background images of your choice for both the screens:

The dimensions should exactly match the screen's dimensions (16:9 in your case)
The vertical resolution of both images should be exactly the same.

call them screen_1.jpeg and screen_2.jpeg (exactly those names). A script will create the spanning image.
Create a folder in your home directory and copy both images into the folder.
Copy the script below into an empty file and save it as auto_wall.py, together with the two images you prepared.
In the head section of the script, there is a line:

screen_check = "HDMI-0 connected"

if necessary, replace HDMI-0 by <your_second_screenname> (run the command xrandr if necessary to find out)

Run the script (and keep it running in the background) by the command:

python3 /path/to/auto_wall.py

Now if you connect your second screen, the wallpaper on your second screen should switch within a few seconds to screen_2.jpeg you prepared.

If all works well, add it to your startup applications.

The script

#!/usr/bin/env python3

import subprocess
import os
import time

curr_dir = os.path.dirname(os.path.abspath(__file__))
screen_check = "HDMI-0 connected"

single_picture = "'file://"+curr_dir+"/screen_1.jpeg'"
double_picture = "'file://"+curr_dir+"/span_image.jpeg'"

def execute_set(command):
    subprocess.call(["/bin/bash", "-c", command])

def execute_get(command):
    return subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8").strip()

def switch_tosingle():
    execute_set("gsettings set org.gnome.desktop.background picture-uri "+single_picture)
    execute_set("gsettings set org.gnome.desktop.background picture-options zoom")

def switch_todouble():
    if not os.path.exists(double_picture):
        create_spanimage()
    execute_set("gsettings set org.gnome.desktop.background picture-uri "+double_picture)
    execute_set("gsettings set org.gnome.desktop.background picture-options spanned")

def create_spanimage():
    image_1 = curr_dir+"/"+"screen_1.jpeg"
    image_2 = curr_dir+"/"+"screen_2.jpeg"
    span_image = curr_dir+"/"+"span_image.jpeg"
    execute_set("convert "+image_1+" "+image_2+" "+"+append "+span_image)

def check_ifconnected():
    command = "xrandr"
    check = execute_get(command)
    if screen_check in check:
        return True

def check_wallpaper():
    check = execute_get("gsettings get org.gnome.desktop.background picture-uri")
    if check == single_picture:
        return "single"
    elif check == double_picture:
        return "double"

def arrange():
    test = (check_ifconnected(), check_wallpaper())
    if test == (True, "double") or test == (False, "single"):
        pass
    elif test[0] == True:
        switch_todouble()
    else:
        switch_tosingle()

while True:
    arrange()
    time.sleep(5)

Replacing images

In case you want to change wallpaper(s), just replace one or both of the images you copied to the folder (but mind the name) and remove the span_image.jpeg, created by the script.

I tested it on Ubuntu 14.04 and 14.10, and it worked perfectly. The fact that you use Gnome should not make a difference.

Switching wallpaper settings manually with a key combination

If, for some reason, you would prefer to switch to the spanned wallpaper manually after connecting / disconnecting the external monitor, you can replace the last three lines:

while True:
    arrange()
    time.sleep(5)

by a single line:

arrange()

and add a keyboard shortcut to do the switch: "System Settings" > "Keyboard" > "Shortcuts" > "Custom Shortcuts"

Add the command:

python3 /path/to/auto_wall.py

to a key combination of your choice.


Try re-installing the default network manager in ubuntu by opening a terminal and typing:

sudo apt-get install --reinstall network-manager

If the issue presists, you can install an alternative network manager, Wicd. Look it up in the Software Center.

*Note that you should better remove the default network manager after installing Wicd,to avoid any conflicts between the two:

sudo apt-get remove network-manager


Use windows laptop as second screen to Ubuntu laptop

These are some references to get you started:

Extend Desktop to Monitor over LAN

Extend Linux Desktop to another X Windows Display:

https://superuser.com/questions/71794/extend-linux-desktop-to-another-x-windows-display

DMX HOmepage:

http://dmx.sourceforge.net/


Ubuntu 14.04 hangs while using Android Studio

Does Ubuntu hang when you are not using the Android virtual mobile device emulator? Genymotion is much faster than the Android emulator in Android Studio, and the HP Pavilion dv6-6155tx with its Core i5 processor and 4GB RAM could easily run it.

Since the laptop is hanging when you run your application on the phone, you could try developing your application on a virtual Android OS in Genymotion. This would buy you some time to keep on developing your application, while you try to find out why the phone is making your laptop hang.

Because your existing project is getting stuck in Gradle, I wonder if you created a new project in Android Studio to print something to the screen if it would build properly.


The file your are trying to start requires AT LEAST 1 ARGUMENT.

As you can see here the method used here is oracle callgraph <package> and the code in the software has your message:

args := flag.Args()
+ if len(args) == 0 || args[0] == "" {
+ fmt.Fprint(os.Stderr, "Error: a mode argument is required.\n"+useHelp)
+ os.Exit(2)

It will exit the program with that error message if the amount of arguments is zero or is it is empty.

If your filename is filename I expect it needs to be at least

oracle filename


Are the Operating Systems on the same disk or are they on multiple ones?

If there is more than one operating system on the disk, then you can use Gparted to reformat the partitions so you can use them as data partitions.

You can use

lsblk

to list all of the partitions so you know which one to blow away by looking at the mount point. e.g the line

└─sda5   8:5    0  80.7G  0 part /

would been that device is the root file system of the current os so you know not to reformat that partition.

It is possible to move different parts of your file system to different partitions, but some directories can't be in a partition of their own.

Visit this website for more information on splitting up ubuntu into multiple partitions.

Also, consider reconfiguring grub so that you don't get the deleted operating systems listed in the menu.To do this try using either of these two commands but I haven't tried them myself so I don't know if they will work.

sudo dpkg-reconfigure grub

--or--

sudo update-grub

Please let me know if you have any more problems.


No sound with a Creative Labs Soundblaster live EMU10K1X

try https://wiki.ubuntu.com/DebuggingSoundProblems

There is a basic trouble shooting guide.


The correct permissions of /bin/su should be: -rwsr-xr-x

-rwsr-xr-x 1 root root 40128 May 17  2017 /bin/su*

In order to fix this specific issue you should:

Change file owner to be root:root
Change file permission to be -rwsr-xr-x

This can be done using:

sudo chown root:root /bin/su
sudo chmod 4755 /bin/su

The first command, which change the owner of the file to be root.
The next command will change the permission to allow read/execution by any user, and will set the s bit to the /bin/su command.

Q: Why performing chown on /bin/su also removed the set-user-id / set-group-id bits?

A: By design execution of chown might remove the set-user-id / set-group-id bits. When those bits are set, execution of such file, will result of running the file as the owner of the binary file, instead of the owner of the process which execute the file. Changing the file owner (or group) without removing the set-user-id bit, will result with a file which will be execute as different user then planned originally, which might result in a security hole.

Some references:

  chown POSIX standard

Unless chown is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a regular file shall be

  cleared upon successful completion; the set-user-ID and set-group-ID
  bits of other file types may be cleared.

Ubuntu chown man page suggest running info coreutils 'chown invocation' in order to get the full documentation of chown

13.1 ‘chown’: Change file owner and group
=========================================

‘chown’ changes the user and/or group ownership of each given FILE to
NEW-OWNER or to the user and group of an existing reference file.
Synopsis:

....

   The ‘chown’ command sometimes clears the set-user-ID or set-group-ID
permission bits.  This behavior depends on the policy and functionality
of the underlying ‘chown’ system call, which may make system-dependent
file mode modifications outside the control of the ‘chown’ command.  For
example, the ‘chown’ command might not affect those bits when invoked by
a user with appropriate privileges, or when the bits signify some
function other than executable permission (e.g., mandatory locking).
When in doubt, check the underlying system behavior.


Start up message: the Disk driver for /dev/mapper/cryptswap1 is not ready yet or not present

This error message indicates that the the system was unable to use its encrypted swap partition.

Not being able to use swap may cause slowdown, especially if your machine doesn't have much RAM installed.

Assuming the system is booting, you should be able to fix the problem without too much hassle.

Step by step

Boot and open a terminal (ctrl+alt+t)
Run this command sudo gedit /etc/fstab, a new window with the text
editor should appear.
Change the line /dev/mapper/cryptswap1 none swap sw 0 0 to read
/dev/mapper/cryptswap1 none swap sw,noauto 0 0
Save
Back in the terminal run sudo gedit /etc/rc.local and add these
two lines right after exit 0:

sleep 5
swapon /dev/mapper/cryptswap1

I hope this fixes your problem, good luck.


Can't create file /proc/sys/net//ipv3/ip_forward (to IP forward before arpspoof)

1- Where your example says ipv3, it should probably read ipv4.

2- Here's one other way to accomplish this without using sudo -s:

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward

Now, the explanation for this problem is as follows. The original command has this structure:

$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
^^^ Part 1 ^^   ^^^^  Part 2 ^^^^

Part 1 runs as sudo, BUT you're then trying to redirect output to a file. The redirection itself "runs" as an unprivileged user, that's why it has no permission to write to the file.

The solution I propose does the "echo" as an unprivileged user, but then pipes that to the "tee" command, which we run through sudo. Thus, tee will be run as root and will be able to write to the file.

Tee basically takes standard input and writes it to both a file and stdout. This is commonly used to write to a file while also getting the output on-screen. If you want to know more about tee, check the man page.


Can't delete partition on USB Stick after using Startup Disk Creator

Use gparted and create a new partition table.

Then you can create one or more partitions.


How to prevent WLAN connection from dropping permanently on a Fritz USB WLAN N stick?

Perhaps a dupe here. The tricks below worked for me a day but now they are again not working, irritating! So this case is not resolved at least with Thinkpad X220.

I. Generic partial solution

  The tip by this article
  here
  does not solve it but makes it a bit better:

$ sudo /etc/init.d/networking restart

  The fix is still missing, investigating.

II. Some Intel models

  Apparently a fix by Chili555
  here is

$ sudo modprobe -r iwlwifi
$ sudo modprobe iwlwifi 11n_disable=1

  so send feedback to Intel to fix this stupid recurring bug, this is
  old! The latter apparently works for Intel Ultimate-N 6300. I tested this on X220 Lenovo Thinkpad -laptop and it worked, hopefully a lasting solution -- this makes very bad reputation to Intel as non-professional provider!

Perhaps related, a ton of material in google but hard to find the relevant

  Some summary of things, looks similar as my found solutions or hacks,
  here
  [BUG] The recurring bug already filled by Redhat here.
  [RESOLVED] Dell 1390 wireless (BCM4311) Ubuntu 12.04 no wireless icon in unity
  [Reported? Bug?] https://askubuntu.com/questions/142951/cannot-connect-to-wlan-with-increased-frequency
  [Resolved, related?] https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/199216


service have to be restarted`
Issue One: Device not detected
sudo lsusb
sudo lspci

lshw -C network
Output similar as this:

*-network
description: Wireless interface

product: PRO/Wireless 3945ABG [Golan] Network Connection

vendor: Intel Corporation

Issue Two: Driver module missing
sudo lsmod
sudo modprobe modulename
sudo modprobe rt2800usb
sudo nano /etc/modules
man lsusb
man lspci

Issue Three: DNS
nmcli device show wlan1 | grep IP4.DNS
ip address
ping 8.8.8.8

As a final step, either restart your machine or restart the Network Manager from the Terminal:
sudo service network-manager restart


How to access the shared folder between two computers running ubuntu

Option 1

Under Places, Connect to Server... Set Service type to Windows share, and fill in the details.

Option 2

In Nautilus, press CTRL-L, type smb://serverip/, e.g. smb://192.168.0.2, and press Enter.


How do I open phpMyAdmin? I have PHP script output

It looks like an incomplete configuration. Few things to check:

Make sure that PHP is installed and running correctly. Try to run php -v from a command line and see if returns version information or any errors.
Make sure that the PHP module is listed and uncommented inside of your Apache's httpd.conf This should be something like LoadModule php5_module "php5apache2_2.so" in the file. Search for LoadModule php, and make sure that there is no comment (;) at the beggining of the line.
Make sure that Apache's httpd.conf file defines the PHP MIME type. This should be something like AddType application/x-httpd-php .php. Search for AddType, and then make sure there is an entry for PHP (again it must be uncommented).

Maybe that you could try to install PHP and PHP module for Apache again with the command line (I don't know what is your version of PHP, so may need to adapt):

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

I you have php7, just change php5 by php7.0, for example:

sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt

The command line to enable PHP module for Apache is:

sudo a2enmod php5

or

sudo a2enmod php7.0

You can follow this tutorial for the missing parts: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04

A tutorial of installation for PHP7 and Ubuntu 16: https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/


How can I convert a .MXF video file to .MKV with Ubuntu?

Looks like mxf containers usually hold mpeg2video which FFmpeg easily converts, although there are some variations on this codec theme. I illustrate one conversion method with a publicly available sample file:

First download this sample file:

wget http://www.freemxf.org/samples/freeMXF-mxf1.mxf

This converts easily enough with the latest FFmpeg:

ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mkv

And then all should be well :)

A few extra points:

If you are troubled by FFmpeg errors with the Repository FFmpeg get the latest version here:

Compile FFmpeg on Ubuntu, Debian, or Mint
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
If you prefer a different container another good choice would be mp4:

ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mp4

And if you want to use the aged avi container something like the following should do the trick:

ffmpeg -i freeMXF-mxf1.mxf \
       -c:v mpeg4 -q:v 2 -vtag XVID -max_muxing_queue_size 1024 \
       -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 \
       output.avi

References:

Material Exchange Format (MXF) Wikipedia


Is it possible to install Firefox on Ubuntu with no desktop enviroment?

You can install any package available in the repositories using APT. APT is responsible for satisfying dependencies.

Counter-intuitively, the Firefox package does not depend on the X server (or Wayland) which is needed to display it. When I tried to run Firefox without X server running, I got:

$ firefox
Error: no DISPLAY environment variable specified

So to install required packages to display Firefox, issue:

sudo apt install firefox xorg

Then you can run:

startx
firefox

to get a very basic Firefox window (even without the ability to resize or close it etc. by the usual means).

You can exit Firefox by pressing Ctrl+Q. Then run exit to quit X server.


The key difference between 11.04/11.10 and 10.04 is the default interface called Unity.

 picture from this AskUbuntu question

This compares to the Gnome-2-Panel interface used by 10.04

Some of the terminology changes between the two due to the incorporation of elements from Gnome-Shell & Unity compared to the standard Gnome-2-panel interface.

Thus - as a beginner, can I suggest you use 10.04 until you feel more comfortable before progressing to later versions of ubuntu.  However saying that - if you are feeling adventurous - jump straight into 11.10.  If you have any issues, come back here or the ubuntu-forums.  You'll find us a friendly lot offering lots of advice.

As an alternative/or addition to your book, can I suggest the second edition of the Ubuntu Manual Project book - written by many contributors specifically from the new users point-of-view.


Why am I offered an upgrade from 14.04 to 15.10, instead of 16.04.1

Because 15.10 is not end of life yet. It is today but that will be at the end of the day, not in the middle.

The 14.04 to 16.04.1 is NOT active yet. It should be yes, but it is not.


Reset all Google Chrome settings on Ubuntu

A general answer to that can be found in the link below, this should be closed as duplicate.

What is the correct way to completely remove an application?

Basically

apt-get purge package
apt-get install package


Have you added the Ethereum PPA to your system?
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt update
sudo apt install solc

There’s also a snap version if you prefer:
sudo snap install solc

If you prefer the daily builds, then:
sudo snap install solc --edge


How to boot to recovery mode in 10.04? holding shift key doesn't work

I assume that you can't boot into a "normal" session and need recovery mode for repairs...Would it work for you to boot a live CD and make the repairs that way?


"For mail merge to work properly, LibreOffice must be restarted"

I solved it by installing the following missing packages:

apt-get install default-jre libreoffice-java-common \
  libreoffice-base libreoffice-base-drivers


Ubuntu 16.04 usb drive only available after opening in Nautilus

I run Plex server at home, and the only way that I was able to solve this with USB hard drives was to manually add them to the /etc/fstab file so they would come up on the same mount after every reboot.

First, get the UUID of the partition of the drive:

blkid

Mine that we are going to use is a Seagate external drive.

~$ blkid
/dev/sda1: LABEL="Seagate Backup Plus Drive" UUID="6AAA4323AA42EB61" TYPE="ntfs"

Or you can use lsblk:

:~$ lsblk -o NAME,LABEL,TYPE,UUID
NAME   LABEL                     TYPE UUID
sda                              disk
└─sda1 Seagate Backup Plus Drive part 6AAA4323AA42EB61

We can see the UUID there of 6AAA4323AA42EB61.  Now, we create a mount point where we are going to have that drive mount every time:

sudo mkdir -p /media/Seagate

We will now add the information to the /etc/fstab file so that every time we boot the computer it will mount that drive in the same location.  We will add a nofail option so that if the drive is disconnected or not powered on the boot process will still complete.

First, backup your /etc/fstab file in case something goes wrong.

sudo cp /etc/fstab /etc/fstab.orig

Then use your favorite editor with sudo access and add the following line to /etc/fstab.  Or I will put a line below it that will allow you to add it via an echo line:

UUID=6AAA4323AA42EB61 /media/Seagate ntfs defaults,nofail 0 0

That line can be added via echo like so:

sudo bash -c 'echo "UUID=6AAA4323AA42EB61 /media/Seagate ntfs defaults,nofail 0 0" >> /etc/fstab'

You can then run sudo mount -a to mount the drive in that location now, or you can reboot the host and it should come up in the same location every time now.

Hope this helps!


What is the difference between /usr/locale and /usr/local?

In distributions like Ubuntu, /usr is where packages are supposed to install stuff and /usr/local is where the system administrator can install stuff outside the packaging system. From the Filesystem Hierarchy Standard:

  The /usr/local hierarchy is for use by the system administrator when
  installing software locally. It needs to be safe from being
  overwritten when the system software is updated. It may be used for
  programs and data that are shareable amongst a group of hosts, but not
  found in /usr.

  Locally installed software must be placed within /usr/local rather
  than /usr unless it is being installed to replace or upgrade
  software in /usr.

/usr/locale seems to be a mistake in packaging. It contains translations of text used by some Unity lenses, but those are supposed to go in /usr/share. For example, here's the directory structure of /usr/locale:

~ find /usr/locale
/usr/locale
/usr/locale/da
/usr/locale/da/LC_MESSAGES
/usr/locale/da/LC_MESSAGES/unity-lens-files.mo
/usr/locale/da/LC_MESSAGES/unity-lens-applications.mo

And in /usr/share/locale, one will find hundreds of such files:

$ find /usr/share/locale | head
/usr/share/locale
/usr/share/locale/tig
/usr/share/locale/tig/LC_MESSAGES
/usr/share/locale/tig/LC_MESSAGES/iso_639_3.mo
/usr/share/locale/tig/LC_MESSAGES/iso_3166.mo
/usr/share/locale/tig/LC_MESSAGES/iso_639.mo
/usr/share/locale/hsb
/usr/share/locale/hsb/kf5_entry.desktop
/usr/share/locale/hsb/LC_MESSAGES
/usr/share/locale/hsb/LC_MESSAGES/kjobwidgets5_qt.qm

Packages are not supposed to create more directories in the top level of /usr. This seems to be a harmless bug. You may report it if you feel like it.


Ubuntu Version 18.04 LTS 32bit is supported

You can upgrade to Ubuntu 18.04 with the do-release-upgrade.

I upgraded a 16.04 LTS to 18.04 using this command:

$ sudo do-release-upgrade -d

As Pomsky suggested, it's the 32bit iso that is not provided by Canonical.  The actual supported files are in the repository.

You will have to wait a few days or use the -d option and get it immediately.

This is my installation mode:

$ file /lib/systemd/systemd
/lib/systemd/systemd: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=b6190e3094045363f5cca4d20db62b82aed17e4f, stripped


Run command: sudo apt-get remove opencv.

This will uninstall the opencv and then delete the opencv folder from home, that's it.


How do I get an Ubuntu ISO that matches my Virtual Box image?

In short, 12.04 is a LTS release, 12.04.2 is the 2nd maintenance release or service pack.

As long as you run apt-get update && apt-get dist-upgrade -y in the VM and wait for it to finish. You should be on 12.04.2 already, run lsb_release -a to confirm.

Using the 12.04.2 ISO is fine, there is no point to use 12.04 GA ISO.


Try this, Broadcom uses bcmwl-kernel-source. Those packages and its dependency dkms are on the installation DVD or USB. Insert the install media and go to pool > restricted > b > bcmwl and pool > main > d > dkms drag and drop the bcmwl deb package to some folder on your PC (eg: to your desktop) (Otherwise directly install from the USB or DVD itself). . Now we install the deb files. Open a terminal and:

cd ~/Desktop
sudo dpkg -i *.deb
sudo modprobe wl

I think it'll solve your issue with wifi connectivity.


Ubuntu 16.04 removed php5 packages and removed those with PHP 7.0 packages that doesn't have php5, but just php inside package names, so replace your command with:

sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-intl php-pear php-imagick php-imap php-mcrypt php-memcache php-ming php-ps php-pspell php-recode php-sqlite php-tidy php-xmlrpc php-xsl

Similar question here: PHP and Apache2 broken after upgrade to Ubuntu 16.04 or PHP rendered as text after Ubuntu 16.04 upgrade


The keyboard shortcut setting doesn't respond to certain changes

For Ubuntu 19.04 use the following method:

Run gnome-tweaks command (without sudo of course)
Select Keyboard & Mouse
Click Additional Layout Options
Expand Switching to another layout
Select the checkbox at the left of Alt+Shift

After that, if you want to check the change:

Go back to Settings and select Region & Language
Click the gear icon ⚙ to the right of Input Sources to display the Input Source Options box
Check that the new shortcut appears at Next source


Removed UEFI partition, how do I fix a new one?

If you've got sufficient free (unallocated/unpartitioned) space on the disk, you can use GParted, parted, gdisk, or other tools to create a new partition in that space. The partition must:

Be big enough -- I recommend 550 MiB or a bit more, but significantly smaller than that can work.
Use a FAT filesystem, preferably FAT32 (a really small partition would need FAT16, though).
Have the type code for an EFI System Partition (ESP), which is identified as having a "boot flag" in GParted, parted, and other tools based on libparted; or as having a type code of EF00 in gdisk.

Note that if you don't have sufficient unpartitioned space on your disk, you'll need to shrink an existing partition. Depending on how your partitions are set up, this could be a tricky task. This question and its answer covers this task. If you need more help, I suggest you post a new question, but be sure to include partitioning and LVM details, since there are so many variables related to these details that a meaningful answer without them will be impossible.

Also, creating the partition is not sufficient; it must also contain a boot loader, and the firmware must be configured to boot that boot loader. There are many ways to set this up, but the two easiest are:

Run Boot Repair on the computer. This must be done from an EFI-mode boot, so you'll need to boot from an installation or emergency disk in EFI mode, which can be tricky to do if you don't understand the details of how your computer manages its boot modes.
Install my rEFInd boot manager on the computer. The best way to do this is to boot your normal installation using rEFInd on a USB drive or CD-R (download links for both are available on the rEFInd downloads page) and then install rEFInd via the Debian package or PPA.

You should need to do one of the above two things (or any of many other things that will have similar end results); however, if one doesn't work for you, you can either try to debug it or try the other approach.


Ubuntu, Lubuntu, Xubuntu, Ubuntu Mate, Kubuntu installation hangs: Version 15.04

sudo apt-get install ubuntu-restricted-extras

This command should install all the stuff you need to play mp3 files (and some more).


Trouble with an USB modem on Ubuntu 11.10

More and more USB devices have their MS Windows drivers onboard; when plugged in for the first time they act like a flash storage and start installing the driver from there. After installation (and on every consecutive plugging) the driver switches the mode internally, the storage device vanishes (in most cases), and a new device (like an USB modem) shows up. Modem maker "Option" calls that feature "ZeroCD (TM)" since it eliminates the need for shipping a separate driver carrier.

I would imagine that Ubuntu is detecting your modem as a usb flash drive instead of a modem and that's why gnome-ppp is not detecting it.  You need to set the mode manually in order for it to be detected as a modem.  I have provided a link to download and explain in further detail on how to go about performing this operatioin.

http://www.draisberghof.de/usb_modeswitch/


Why does a system update ask for my password?

In my experience, most updates don't ask for a password. The system is able to update the necessary files without extra permissions.

When it does ask for your password, it's to send to sudo, which lets you run a command with root permissions. There are some files that can't be modified except with root permissions, such as the kernel. When one of these has an update, you need to authenticate to allow the system to update those files.


How to disable touchpad while typing in gnome?

Using your terminal, enter

gsettings get org.gnome.desktop.peripherals.touchpad disable-while-typing

This will show you true, if the system is set to disable the touchpad while typing.  You can set the key with

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true

Graphically, run dconf_editor, and navigate to the path org->gnome->->desktop->peripherals->touchpad and inspect the value of the key disable-while-typing


How to install latest version on cifs-utils (v6.10) on Ubuntu 18?

The repositories for your current ubuntu version don't have the newer packages available.
What you could try to do if you really need that package into your Ubuntu install is to download the package from the newer versions, or even get the source and build by yourself. Keep in mind that the former might not work due to dependencies, while the former would probably work but would also be a more involved process.
My recommendation would be to actually upgrade your ubuntu install to the latest LTS (20.04) if possible, since it'd bring you the latest package without much worries.


make LAN clients find my website through a URL

See man dnsmasq, which says, in part:

trusty (8) dnsmasq.8.gz
Provided by: dnsmasq-base_2.68-1_i386 bug

NAME

       dnsmasq - A lightweight DHCP and caching DNS server.

SYNOPSIS

       dnsmasq [OPTION]...

DESCRIPTION

       dnsmasq  is a lightweight DNS, TFTP, PXE, router advertisement and DHCP
       server. It is intended to provide coupled DNS and  DHCP  service  to  a
       LAN.

       Dnsmasq  accepts  DNS  queries  and  either  answers them from a small,
       local, cache or forwards them to a  real,  recursive,  DNS  server.  It
       loads  the  contents of /etc/hosts so that local hostnames which do not
       appear in the global DNS can be resolved and also answers  DNS  queries
       for  DHCP  configured  hosts.  It can also act as the authoritative DNS
       server for one or more domains, allowing local names to appear  in  the
       global DNS.

So, it seems to me that you should (on each and every client) add to /etc/hosts

192.168.1.1 www.mywonderfulsite.com

Any other asliases for 192.168.1.1 should appear on the same line, not separate lines. Multiple lines in /etc/hosts with the SAME IP address leads to confusion, puzzlement, frustration and some pounding head on desk.


How does LXDE/Openbox create the app/process environment?

To make the change of LC_TIME effective also when launching programs from the graphical environment, put that line in ~/.profile instead of ~/.bashrc.


Launch application on ubuntu server using php

First of all, don't reinvent the wheel. There are various apps that let your phone act as a wireless keyboard/mouse. For example (these were just the ones I happened to know, there are loads):

Hippo Remote for iOS
Unified Remote for Android.

You also have things like kodi (previously knokwn as XBMC) to turn your computer into a media center which might do what you need.

If you still prefer to set something up yourself, you will need to allow the nginx user to connect to an existing X session. You will also need to log in once manually (or just set the machine to auto-login to the GUI). You could actually have your server start an X session but it makes more sense to have your user do so so that all your settings etc are there.

Allow other users to connect to your X session.

You will need to run xhost + to disable access control. The simplest way would be to just add that command to your ~/.profile. Edit ~/.profile and add these lines:

## Only run this when logging in graphically
[ -z "$DISPLAY" ] && xset +

You will need to tell your php app which DISPLAY to connect to. For example:

<?php
if ($_GET['button']) {
  $cmd = "export DISPLAY=:0;  kodi";
  exec($cmd);
}
?>

kodi

Note that this is very insecure, use at your own risk.


Bluetooth is always turned on when on startup. How do I fix this problem?

There are more technical solutions - none of which worked for me, at least, not without killing the manager or the adapter - so, after a couple of hours going around in circles, I gave in and made a simple "fix" - I wanted to keep the icon, essentially, but have bluetooth switched off at start up.

Create a file, call it sbo.sh, the contents of which should be:
#!/bin/bash
sleep 1
rfkill block bluetooth
I saved this in /opt (any user space would do), then made sure I was owner:
sudo chown myname:myname /opt/sbo.sh
...and that it was executable:
sudo chmod u+x /opt/sbo.sh
Then I opened "Startup Applications Preferences"
Clicked on "Add" then entered the following details:
Name: Switch Bluetooth Off
Command: /opt/sbo.sh
Comment: Switch off bluetooth but keep icon at start

Seems to work.  The one second pause ("sleep 1" in step 1) is important... it's enough of a lag for the device to become enabled.  Doubtless not the most elegant work around, but after a couple of hours twiddling with things (like /etc/rc.local, systemd, etc.) to no avail... it's something that works.


correct source code for developing and loading kernel

To install the kernel source, try this:

sudo apt-get update
sudo apt-get install linux-source

to obtain the source for the currently running kernel you can alos use the command:

sudo apt-get source linux-image-$(uname -r)

To obtaining the kernel sources for an Ubuntu release using git:

git clone git://kernel.ubuntu.com/ubuntu/ubuntu-`<release>`.git

Replace <release> with interesting one, ie

raring (13.04) kernel source 3-8.0
saucing (13.10) kernel source 3-11.0

You can download the  linux source package directly from here.

Refer to ubuntu pages for more help.


exporting environment variable using .sh file

Without any change into your script you can simply run in like this:

. setup.sh

or

source setup.sh

it will cause your variables to be set in the current shell otherwise bash will open a non-interactive shell, runs your command into that and after it's finish, it closes that shell.

for more explanation, help source:

  source: source FILENAME
  Execute commands from a file in the current shell.
  Read and execute commands from FILENAME in the current shell.


Given the kernel panic you've shown (the Windows one might help as well), I would have to wager that this is a memory / RAM issue.

What you should do for the time being to pinpoint the actual issue:

Reboot your machine.
When the boot menu shows up (shown below), select the first Memory Test.
Let it run. Note any errors.

Please post back with any info from the test(s).


How can I exclude specific folders from thumbnail generation?

You could make it a hidden folder.

Press Ctrl+H to see all of them. To make it hiden edit the file name to start with .

Is visible

dirname

Is hidden

.dirname

To view it with ls, use the -a

ls -a /home/<USER>

shows me this:

...
.audacity-data          Scripts
.Audible                .selected_editor
backup                  Shotwell
...

Here you can see the ones that are hidden and the ones that aren't.


Is it possible to take out specific tabs from firefox (i mean get links)(by number) from bash or smthing else(for remote usage)?

You can use Python to accomplish this task by this rather inelegant solution:

#!/usr/bin/env python3

"""
Copyright (c) 2018 Helio Machado <0x2b3bfa0>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

import json
from pathlib import Path
from lz4.block import decompress

def load_recovery(path):
    """
    Loads the recovery.jsonlz4 file from the path specified and
    parses the json data to a native structure. This file contains
    the current tabs of the browser.
    """
    with open(str(path), "rb") as recovery_file:
        assert recovery_file.read(8) == b"mozLz40\0"
        compressed_data = recovery_file.read()
    json_data = decompress(compressed_data)
    recovery = json.loads(json_data.decode())
    return recovery

def recovery_path():
    """
    Get the path to the recovery.jsonlz4 file.
    """
    firefox_path = Path.home() / ".mozilla" / "firefox"
    profile_path = list(firefox_path.glob("*.default"))[0]
    session_path = profile_path / "sessionstore-backups"
    return session_path / "recovery.jsonlz4"

windows = load_recovery(recovery_path())["_closedWindows"]
tabs = [tab for window in windows for tab in window["tabs"]]
urls = [tab["entries"][0]["originalURI"] for tab in tabs]

# Here you go!
print("\n".join(urls))

License:  GPLv2

This should be a good start point; even if your question is not as dumb as you may suppose, I think that you should try a bit harder at finding solutions and post your research results along with the question.

I'll leave the question unmaintaned and as Community Wiki.


Cannot install Ubuntu 16.04.1 - video mode problem

When options menu appears, and before you select to install ubuntu, select nomodeset after presing F6 button.
From the UbuntuAnswers:

  The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

Other option is to install without graphical interface (which mean ubuntu server, or some lighter gui, like lubuntu), and then install ubuntu desktop from there.


I have an iMac G4 with a clock frequency of 1 GHz and the same graphics card. Currently my mum is using it, running Debian 7.7 (stable). In the past I experimented a lot with the computer, having tried Debian, Ubuntu, Fedora, and even YellowDog Linux. Debian was the least trouble, especially more recently, where PPC support is declining everywhere. I don't think I had to do anything special to get the graphics running.

Anyway as far as I know nouveau is much better than the nv driver. Did you confuse "nv" with "nvidia", the proprietary driver? I don't think that can be made to run under PPC, since it contains/ depends upon a "binary blob" for x86.

After all Ubuntu is based on Debian, so both largely use the same configuration tools.


Qemu/KVM Postcopy migration fails in hirsute / v5.11 kernels (solved)

The v5.11 kernel contains the following upstream change userfaultfd: add user-mode only option to unprivileged_userfaultfd sysctl knob
This will also apply to e.g. a Focal-HWE kernel once on v5.11 or to Focal userspaces in a container under a Hirsute kernel (that is the example above).
This was done for security reasons, if you want/need to re-enable un-limited userfault handling to be able to use postcopy again you'd want/need to set the control knob to one like:
$ sudo sysctl -w "vm.unprivileged_userfaultfd=1"

I mostly wanted users to be able to find the background and solution, therefore I also documented this in bug 1926249


A) Buy a UPS.

B) You can shutdown properly over ssh.


Will the latest versions of software in Ubuntu daily image stay in the LTS?

Unless they are proven to cause serious regressions, packages are rarely downgraded in a development release. Once the final version is released, the package versions are frozen. Updated versions (called backports) may be created on a per-case basis, and on request.


How to migrate from Banshee to Rhythmbox?

My two cents, applicable to Banshee 2.3.3 / Rhythmbox 2.95:

Music library: just specify your Music folder to Rhythmbox and it will be imported
Playlists:

Dynamic Playlists: as far as I know you will have to re-create them. Not fun, with additional complication due to the different feature sets of each player.
Static Playlists: just export them as .m3u in Banshee and re-import them in Rhythmbox

Playcounts and ratings

Playcounts: I don't know
Ratings: create a dynamic playlist for each of the stars (i.e. create "rating1,rating2,rating3,rating4,rating5" dynamic playlists, then export them as .m3u, then import them in Rhythmbox. I just tested it, both players use filenames relative to ~ , so you will be fine.
One solution to both would be to implement #538549 - Use of ID3v2 Popularimeter for Rating (maybe Play Count)

Radio stations: I don't know
Cover pictures: while not a "migration" option, Rhythmbox 2.9x/3 does a better job at handling cover art. Try it by enabling the Cover Art and Cover Art Search plugins in Edit / Plugins. In my case (cover art stored as .jpg in the folder, or as ID3), they are recognized just fine

Hope that helps! Good luck :)


Since you've mentioned that data is always in the same columns, AWK is appropriate for this task. However small thing is that You have data that is up to certain point has space as separator , but then switches to using vertical bar as separator. Thus we need a bit of more complex AWK hackery.

awk '{gsub(/[;]/," ");printf "%s %s ",$1,$2; for(i=1;i<=NF;i++){ if($i~/\|\|\|/) {gsub(/\|/," ");printf "%s %s",$(i+1),$(i+5);break} } printf "\n"; }' testData.txt

To put the above code into scripting form,

#!/usr/bin/awk -f

{
  gsub(/[;]/," ");
  printf "%s %s ",$1,$2;
  for(i=1;i<=NF;i++){
     if($i~/\|\|\|/) {
        gsub(/\|/," ");
        printf "%s %s",$(i+1),$(i+5);
        break
     }
   }
   printf "\n";
}

Put that into a file, call it myScript.awk or anything, add exec permissions withchmod +x myScript.awk and give it input file as argument

Sample run:

$ chmod +x dataExtract.awk
$ ./dataExtract.awk testData.txt
2 41620CSQ=G missense_variant

Side note: in the question you said missense_variant is 4th field, but actually that's 5th field in the example you've posted.I've adjusted accordingly

Edit as requested in comments:

#!/usr/bin/awk -f

{
  gsub(/[;]/," ");
  printf "%s\t%s\t",$1,$2;
  for(i=1;i<=NF;i++){
     if($i~/\|\|\|/) {
        gsub(/\|/," ");
        printf "%s\n" $(i+5);
        break
     }
   }
}


To view available speed governors use this command:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave

If you do have more than one governor you can check what is currently in use with this command:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave

To change your processor to performance mode use:
$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance

You will then notice CPU% utilization drop by about 5% but also notice speed will increase from about 1000 MHz to 3000 MHz and temperatures will spike by ~10 degree, depending on your processor:

I have noticed that even when set to powersave mode (as I always use) when Ubuntu first boots it runs in performance mode for 90 seconds before it eventually kicks into powersave mode.
None-the-less after manually setting the governor to performance mode using the appropriate command above. It has stayed in performance mode for 10 minutes now as confirmed by using the appropriate command above and doubly confirmed by conky display above.

I left the governor set on performance for 30 minutes and it worked just fine. It might interest some readers what the conky display looks like when switching off of performance governor back to the default powersave governor:

CPU% utilization has spiked by 5%, but CPU frequency has dropped by 1500 MHz and temperature has decreased by about 10 degrees. Overall I think powersave mode is the best for most configurations.

Conky Code
April 12, 2019 - Someone requested conky code so I'm including today's version. The refresh rate is set at 2.5 seconds today whereas in .gifs it's probably 1 second or .75 second. I've edited the code a bit here because mine is setup for three monitors and most people will have one monitor.
The storage section is a little tricky. You need to change the device names to your own and there are if tests if a partition isn't mounted shows system information like cache and buffers.
override_utf8_locale yes
use_xft yes
xftfont ubuntu:size=10.5
xftalpha 0.5
uppercase no
no_buffers yes              # Subtract cached and buffered ram from memory usage.
short_units yes             # Use "G" instead of "GiB"

text_buffer_size 2048
update_interval 2.5          # change to .001 for 1000 times per second stress test
own_window_class Conky
own_window yes
own_window_type dock
own_window_transparent no
own_window_argb_visual yes
own_window_argb_value 145  # semi-transparent
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 400
maximum_width 400
alignment top_right

draw_shades yes
# off-white
default_color ECEAE4
# blue
color1 1EB5FF
# light blue
color2 30DDFB
# dark blue
color3 0090ff
# lime
color4 98FF76
default_shade_color 000000

draw_outline no
draw_borders no
stippled_borders 0

TEXT
#------------+
# Distro     |
#------------+
${color}Today is:${color green}$alignr${time %A,}$alignr ${time %e %B %G}
${color}Distribution:${color green}$alignr ${execi 6300 cat /etc/issue.net} $machine
${color}Kernel:$alignr${color green} $kernel
${color orange}${voffset 2}${hr 1}
#------------+
# i7-6700 CPU|
#------------+
${color2}${voffset 5}Intel® i-7 6700HQ 3.5 GHz: ${color1}@  ${color green}${freq} MHz
${color}${goto 13}CPU 0 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
#${cpugauge cpu1 20,40}
#${cpugraph 1 15,200 555555 AAAAAA -l}
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
#------------+
# Temperature|
#------------+
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${execpi .001 cat /sys/class/thermal/thermal_zone7/temp | cut -c1-2}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for kernel >= 4.13.0-36-generic
${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 1 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for temperature with Kerenel 4.4
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 0 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
${color green}$running_processes ${color1}running of ${color green}$processes ${color1}loaded processes.
${color1}Load Average 1-5-15 minutes: ${alignr}${color green}${execpi .001 (awk '{printf "%s/", $1}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $2}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $3}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4}
#------------+
# Intel iGPU |
#------------+
${color orange}${hr 1}${if_match "intel" == "${execpi 99999 prime-select query}"}
${color2}${voffset 5}Intel® Skylake GT2 HD 530 iGPU @${alignr}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_cur_freq_mhz)} MHz
${color}${goto 13}Min. Freq:${goto 120}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_min_freq_mhz)} MHz${color}${goto 210}Max. Freq:${alignr}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_max_freq_mhz)} MHz
${color orange}${hr 1}${else}
#------------+
# Nvidia GPU |
#------------+
${color2}${voffset 5}${execpi .001 (nvidia-smi --query-gpu=gpu_name --format=csv,noheader)} ${color1}@ ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.sm --format=csv,noheader)} ${alignr}${color1}Temp: ${color green}${execpi .001 (nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)}°C
${color1}${voffset 5}Ver: ${color green}${execpi .001 (nvidia-smi --query-gpu=driver_version --format=csv,noheader)} ${color1} P-State: ${color green}${execpi .001 (nvidia-smi --query-gpu=pstate --format=csv,noheader)} ${alignr}${color1}BIOS: ${color green}${execpi .001 (nvidia-smi --query-gpu=vbios_version --format=csv,noheader)}
${color1}${voffset 5}GPU:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader)} ${color1}Ram:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.memory --format=csv,noheader)} ${color1}Pwr:${color green}${execpi .001 (nvidia-smi --query-gpu=power.draw --format=csv,noheader)} ${alignr}${color1}Freq: ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.mem --format=csv,noheader)}
${color orange}${hr 1}${endif}
#------------+
# Prcoesses  |
#------------+
${color1}${voffset 5}Process Name: ${goto 200}PID ${goto 265}CPU% ${alignr}Mem%
${color}${goto 13}${top name 1} ${goto 190}${top pid 1} ${goto 270}${color green}${top cpu 1} ${alignr}${top mem 1}
${color}${goto 13}${top name 2} ${goto 190}${top pid 2} ${goto 270}${color green}${top cpu 2} ${alignr}${top mem 2}
${color}${goto 13}${top name 3} ${goto 190}${top pid 3} ${goto 270}${color green}${top cpu 3} ${alignr}${top mem 3}
${color}${goto 13}${top name 4} ${goto 190}${top pid 4} ${goto 270}${color green}${top cpu 4} ${alignr}${top mem 4}
${color}${goto 13}${top name 5} ${goto 190}${top pid 5} ${goto 270}${color green}${top cpu 5} ${alignr}${top mem 5}
${color}${goto 13}${top name 6} ${goto 190}${top pid 6} ${goto 270}${color green}${top cpu 6} ${alignr}${top mem 6}
${color}${goto 13}${top name 7} ${goto 190}${top pid 7} ${goto 270}${color green}${top cpu 7} ${alignr}${top mem 7}
${color}${goto 13}${top name 8} ${goto 190}${top pid 8} ${goto 270}${color green}${top cpu 8} ${alignr}${top mem 8}
${color}${goto 13}${top name 9} ${goto 190}${top pid 9} ${goto 270}${color green}${top cpu 9} ${alignr}${top mem 9}
${color orange}${voffset 2}${hr 1}
#------------+
# Storage    |
#------------+
${color1}RAM Use/Free:${goto 148}${color red}$mem ${color red} ${goto 220}${membar 15,100} $alignr${color}${memeasyfree}
${color1}Linux Root:${goto 148}${color red}${fs_used /} ${color red} ${goto 220}${fs_bar 15,100 /} $alignr${color}${fs_free /}
${color1}Ubuntu 18.04:${goto 148}${if_mounted /mnt/clone}${color red} ${fs_used /mnt/clone} ${color red} ${goto 220}${fs_bar 15,100 /mnt/clone} $alignr${color}${fs_free /mnt/clone}${else} ${color yellow} /mnt/clone ${endif}
${color1}${if_mounted /mnt/old}Broken 16.04:${goto 148}${color red} ${fs_used /mnt/old} ${color red} ${goto 220}${fs_bar 15,100 /mnt/old} $alignr${color}${fs_free /mnt/old}${else}Cache RAM:${goto 148}${color green}${cached} ${color1} ${alignr}Buffers: ${color green} ${buffers}${endif}
${color1}${if_mounted /mnt/e}WSL+Linux:${goto 148}${color red}${fs_used /mnt/e} ${color red} ${goto 220}${fs_bar 15,100 /mnt/e} $alignr${color}${fs_free /mnt/e}${else}Swap:${goto 148}${color green}${swap} / ${swapmax} $alignr${color green}${swapperc}%${endif}
#${color}NVMe Win 10:${goto 148}${if_mounted /mnt/c}${color green} ${fs_used /mnt/c} / ${fs_size /mnt/c} $alignr${color green}${fs_used_perc /mnt/c}%${else}${color yellow}/mnt/c${endif}
#${color}${if_mounted /mnt/d}HGST_Win10:${goto 148}${color red} ${fs_used /mnt/d} / ${fs_size /mnt/d} $alignr${color green}${fs_used_perc /mnt/d}%${else}Cache RAM:${goto 148}${color green}${cached} ${color} Buffers: ${color green} ${buffers}${endif}
#${color}${if_mounted /mnt/e}WSL+Linux:${goto 148}${color red}${fs_used /mnt/e} / ${fs_size /mnt/e} $alignr${color red}${fs_used_perc /mnt/e}%${else}Swap:${goto 148}${color green}${swap} / ${swapmax} $alignr${color green}${swapperc}%${endif}
${color orange}${voffset 2}${hr 1}
#------------+
# Network    |
#------------+
#${color1}Network using vnStat "-i", "-w" and "-m"
${color}${goto 5}Today ${goto 100}Yesterday ${goto 225}Week ${goto 325}Month ${color green}
# vnstatd updates database every five minutes
${execi 300 vnstat -i enp59s0 | grep "today" | awk '{print $8" "substr ($9, 1, 1)}'} ${goto 110}${execi 300 vnstat -i enp59s0 | grep "yesterday" | awk '{print $8" "substr ($9, 1, 1)}'} ${goto 220}${execi 300 vnstat -i enp59s0 -w | grep "current week" | awk '{print $9" "substr ($10, 1, 1)}'} ${goto 315}${execi 300 vnstat -i enp59s0 -m | grep "`date +"%b '%y"`" | awk '{print $9" "substr ($10, 1, 1)}'}
${color}Down: ${color green}${downspeed enp59s0}/s ${color}${goto 220}Up: ${color green}${upspeed enp59s0}/s
${downspeedgraph enp59s0 25,190 000000 ff0000} ${alignr}${upspeedgraph enp59s0 25,190 000000 00ff00}$color
Total: ${color green}${totaldown enp59s0} $color${alignr}Total: ${color green}${totalup enp59s0}
#Bit Rate:$color ${wireless_bitrate wlp60s0}
#------------+
# Brightness |
#------------+
${color orange}${voffset 2}${hr 1}
${color1}${goto 5}Rise: ${color green}${execpi 300 cat /usr/local/bin/.eyesome-sunrise} ${goto 155}${color1}Set: ${color green}${execpi 300 cat /usr/local/bin/.eyesome-sunset} ${alignr}${color1}Level: ${color green}${execpi 10 cat /sys/class/backlight/intel_backlight/brightness}

Bottom half of conky screenshot
Just noticed the conky images above are top half only. The bottom half is included below so the code makes more sense. Also note the Intel iGPU appeared before because prime-select intel was used. Here the nVidia GPU appears because prime-select nvidia was used:


Black Screen When Plugging in Intuos CTL 480 on Ubuntu 12.04

It seems you have been victim of this Heisenbug(1):

On launchpad:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1310800
Upstream: https://sourceforge.net/p/linuxwacom/bugs/238/

If it is it, a workaround is to issue

sudo modprobe wacom

before connecting the tablet. After doing that, you should have the driver loaded; check it with

lsmod | grep wacom

if you have an output like

[romano:~] 127 % lsmod | grep wacom
wacom                  62856  0

Then the driver has been loaded. If you are suffering this bug, now you can plug the tablet without problem. If your computer still crashes, you are facing another bug.

(1) It is a strange bug, because I was not able to reproduce it at will. For me it disappeared after upgrading the kernel and/or when I installed a locally compiled driver as explained here.


This link helped to solve my issue.

  the default config restricts the use of bitmap fonts, that's all.

$ sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
$ sudo ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/70-yes-bitmaps.conf

Nothing more is needed, the fonts should be available instantly.


Can't create folders or documents in subdirectories of /home/user/

~/Documents is missing the x permissions (execute). Please do a

chmod 755 ~/Documents

And you can add items to that directory. It should looks similar to

drwxr-xr-x 2 rinzwind rinzwind  4096 mrt  2 19:21 Documents

And to explain this: the permissions on a directory are a bit different to files.

"r" or "read" permissions means you can list items inside that directory.
"w" or "write permissions means you can create, rename, write and remove files inside that directory and edit the directory's attributes.
"x" or "execute" permissions means you can enter and access files and directories inside the directory.

So "execute" is a must to be able to do anything inside the directory.

"s" or "sticky" bit makes it so that only the owner can rename and remove files and directies inside the directory.


Is this W-LAN repeater-modem supported by Ubuntu too?

First, the TP‑LINK TL‑WR710N is a wireless router, not a wireless adapter. Second, the answer you linked is the process to install a driver in an Ubuntu computer to drive the TP-LINK adapter. I doubt that the router is running Ubuntu.

Next, I suspect that they are using entirely different chipsets.

The router should work out of the box with no need at all to install drivers.


Locking the system does not affect running processes if they expect any interaction.


Can't connect to wireless network on Ubuntu Server

I have tried doing this before and it's a real pain. My suggestion is to either:

Hook your Ubuntu Server installation to the internet using an Ethernet cable then install what you need (Preferred)
On a separate machine use apt download and download all the necessary *.deb files into a folder on a flash drive (Make sure to remember dependencies!) then plug it into the Ubuntu Server and run sudo apt install /path/to/dir/* and have them all installed like that.

In general I would not suggest running a server hooked up to Wi-Fi. Use Ethernet instead because it's far more stable and the system will hook itself to the internet software-wise at boot up.

I am sure there are other ways to do what you want. But these two would probably be the most straight forward solution.


Ubuntu 20.04: Cursor blinking at boot after installing nvidia drivers

I am using nvidia-driver-460 version 460.39-0ubuntu0.20.04.1.
The GDM screen would only appear after typing Ctrl+Alt+F2 followed by Ctrl+Alt+F1.
Please comment and let me know if the following resolves the problem for you? Also, please mark yourself as affected by Bug #1811023 in Launchpad so this issue gets fixed.

Solution
The following seems to have fixed the issue for me, and the GDM screen now appears without having to resort to the above "trick".

Edit the file /lib/udev/rules.d/61-gdm.rules.
sudo nano /lib/udev/rules.d/61-gdm.rules

The original file looks like this:
# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/lib/gdm3/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
DRIVER=="nvidia", RUN+="/usr/lib/gdm3/gdm-disable-wayland"

Comment all of the lines as shown:
# disable Wayland on Hi1710 chipsets
# ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/lib/gdm3/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
# DRIVER=="nvidia", RUN+="/usr/lib/gdm3/gdm-disable-wayland"

Type Ctrl+X to exit, then Y, and then Enter to save the file.

Ensure that the Wayland is not disabled in GDM.
sudo nano /etc/gdm3/custom.conf

Comment the "WaylandEnable" line, if it is not already commented, as shown:
# WaylandEnable=false

Type Ctrl+X to exit. If you made changes, type Y, and then Enter to save the file.

Finally, reboot.

Explanation
The /lib/udev/rules.d/61-gdm.rules file is supposed to prevent GDM from displaying the Wayland session option when the NVIDIA proprietary drivers are installed, since NVIDIA does not support Wayland.
However, in Ubuntu 20.04, there seems to be another redundant mechanism or rule that also prevents GDM from displaying the Wayland session option. I suspect this, because even after making the above change, the Wayland session option is still not displayed in GDM. (Setting WaylandEnable=true in /etc/gdm3/custom.conf has no effect).
Therefore, I have a hunch that there are two conflicting rules, and disabling one of the rules (i.e. /lib/udev/rules.d/61-gdm.rules) seems to remove the conflict.
Here is the journalctl boot log before making the above changes. You can see there is an error loading the "fb" module.
/usr/lib/gdm3/gdm-x-session[964]: (II) Loading sub module "fb"
/usr/lib/gdm3/gdm-x-session[964]: (II) LoadModule: "fb"
/usr/lib/gdm3/gdm-x-session[964]: (II) Loading /usr/lib/xorg/modules/libfb.so
/usr/lib/gdm3/gdm-x-session[964]: (II) Module fb: vendor="X.Org Foundation"
/usr/lib/gdm3/gdm-x-session[964]:         compiled for 1.20.9, module version = 1.0.0
/usr/lib/gdm3/gdm-x-session[964]:         ABI class: X.Org ANSI C Emulation, version 0.4
/usr/lib/gdm3/gdm-x-session[964]: Xorg: ../../../../dix/privates.c:384: dixRegisterPrivateKey: Assertion `!global_keys[type].created' failed.
/usr/lib/gdm3/gdm-x-session[964]: (EE)
/usr/lib/gdm3/gdm-x-session[964]: (EE) Backtrace:

Here is the journalctl boot log after making the above changes. You can see the "fb" module loads successfully.
/usr/lib/gdm3/gdm-x-session[1357]: (II) Loading sub module "fb"
/usr/lib/gdm3/gdm-x-session[1357]: (II) LoadModule: "fb"
/usr/lib/gdm3/gdm-x-session[1357]: (II) Loading /usr/lib/xorg/modules/libfb.so
/usr/lib/gdm3/gdm-x-session[1357]: (II) Module fb: vendor="X.Org Foundation"
/usr/lib/gdm3/gdm-x-session[1357]:         compiled for 1.20.9, module version = 1.0.0
/usr/lib/gdm3/gdm-x-session[1357]:         ABI class: X.Org ANSI C Emulation, version 0.4
/usr/lib/gdm3/gdm-x-session[1357]: (II) Loading sub module "wfb"


EXT is the filesystem Linux uses. Similar to what FAT was and NTFS is for Windows. Instead of using a new name Linux used a number for the newer versions of this filesystem. So EXT2, EXT3 are older, and nowadays obsolete, versions of EXT4. There are also systems that use BTFRS. That one is suppose to be the next filesystem for Linux (it supports some nifty features like on the fly snapshots).

  How do i know if graphical file managers use ext 2,3 or 4?

You typically do not need to know this except when installing (just like with Windows Linux needs to have a formatted filesystem, ext4 being the current default, for it to work). ext4 uses journaling and allows for permissions. And some other features Linux needs.

If you need to know the formatting of your system there are several ways.
From command line:

sudo file -sL /dev/sd* | grep ext

/dev/sda2: Linux rev 1.0 ext4 filesystem data
/dev/sda5: Linux rev 1.0 ext4 filesystem data
/dev/sdb1: Linux rev 1.0 ext4 filesystem data

But you can also use gParted. It is in the repositories. An example:


Functional Difference Between screen Command and Background Process

screen is a terminal emulator, that multiplexes serveral virtual terminal into one. When you will run the screen command, your program would start running in a virtual terminal window of screen (you can name the window with -t option). Now you can detach from the multiplexer anytime you want (using C-a C-d, assuming default bindings), and come back whenever you want, and (re)attach with the same screen session using screen -rD (or similar depending on session status), and will get the same controls
Backgrounding inside a subshell will be prune to SIGHUP as the parent shell won't track the grandchild, but you can not (directly) track/control the process anymore, let alone reattaching capabilities that screen provides. Of course you can check the process's status with PID (by using tools like ps/top or directly parsing /proc/PID/) but i do not know if that would be suffice in your case. So, if you need to see any output from the process (assuming no redirection is in place) or want to check/control the process, use screen/tmux/byobu or alike.


Why is there a 4-layouts limit for keyboards?

Quoting Peter Hutterer (Red Hat employee working on X.Org):

  Some information about this feature and why it hasn't been implemented yet:
  Te 4 group limit is forced by the protocol wire format. support for more than
  4 groups can only be added by adding additional requests and events to XKB and
  rewriting clients to switch to this new XKB version.
  In addition, compatibility to the old protocol must be ensured so that current
  XKB clients will still function correctly with the new XKB version.

  This is both complex and very time-consuming. Volunteers to tackle this problem
  are of course very welcome.

  [...]

  It's encoded in some bits on the protocol, with the other bits being used for
  other information. so you need extra bytes in the requests/events for anything
  above 4, and adding extra bytes requires bumping the protocol. And then you
  have to deal with those clients that only understand 4 groups and what to do
  with them if a keyboard is on group 5.

Why we don't have a hack above this layer - I don't know... this must be the lamest limitation ever. :D