does ubuntu 12.10 run on acer aspire one d270 with intel Atom N2600 processor

The only people who can say for certain are the people who have one.

You are in a position of power though: you could download the LiveCD/USB and boot to it. Yeah, it's 700MB and the time to burn to USB but it's the safest way to find out if your hardware is still supported; it'll give you a realistic idea of how well a new install or upgrade should work.


ThinkPad T470p snd-hda-intel: headphones work but no onboard sound

Add this line -
options snd-hda-intel model=auto
at the end of
/etc/modprobe.d/alsa-base.conf
and reboot the system.
it started working for me. Apparently, we need to point out alsamixer to use auto-detection between speaker and headphones.


What's the difference between Ctrl-Alt-F1 and Ctrl-Alt-F3?

Besides the number there is no difference.

There are some examples where more than 1 tty is useful.

tail -f {logfile} will show new entries that are added in the logfile. Where you can use another tty to start, stop a service or do some kind of command line instructions, or do something in mysql.
same goes for analyzing CPU usages on your system: have sar or top/htop run on 1 tty and then use another session to start a browser, a command or service and by switching tty you can check what happens.

And yes you can do that from a terminal in the desktop but not everyone has a desktop ;)


Font "Ubuntu" is missing the U+26B7 Chiron Unicode Character

There seems no easy solution. But at least it is fixed in SmartGit 20.2 now.
As a Workaround you could disable the "Noto Sans Symbols" font with
sudo mkdir /root/fonts-backup/
sudo mv /usr/share/fonts/truetype/noto/NotoSansSymbols* /root/fonts-disabled/

to restore the font, restore from the backup folder or reinstall with
sudo dpkg -l |grep noto|grep ii|cut -d" " -f 3 | xargs sudo apt install --reinstall


Cannot read from 2nd SATA data drive connected via SATA docking station

Try from a terminal,

sudo mount -t ntfs-3g /dev/sdc5 /mnt

If it works works,then great
If does not work, please paste the errors reported.

Also can you attach a screen shot similar to screenshot.png from disk utility, but this time after selecting the sdc5 partition. The current screen shot is for sdc1 which is extended partition holding sdc5. If you click on the "1.5 Transportable Media Drive" (this is sdc5) box in volumes, you will select sdc5 and it will show properties of sdc5. That will help us to determine the command to get it mounted and its properties.

The same screen should allow you to mount sdc5 from GUI mode,
If it shows "Mount Volume"  and "Check filesystem" once you selected sdc5 try both and see if you are able to mount from there.

Report any errors if it fails to mount it from there.


Session freezes when using the screen command

By default C-A A does nothing. Do you have it bound to something in your .screenrc?

The only key combo I've had freeze my screen session is C-a s, which according to the screen manual does "xoff". I've never intentionally hit this combo. I used to blame it on screen freezing until I caught myself hitting C-a s instead of C-a a or C-a A.

Once you've hit that dastardly combo, the only graceful way out is to switch xoff to xon by using the key combo C-a q. Reading through the man page, it all has something to do with flow control. Near as I can tell it emulates Scroll Lock.

Read more about flow control in Gnu's Screen: manual


Ubuntu 16.04, dahdi 'make install' leads to ssl error

The problem is caused by the new and stricter method of kernel module signing.

There are a request open in Github:

  braykov commented on 28 Oct 2016

$ sudo make modules_install
make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-46-generic'
  INSTALL /home/bob/gm12u320/gm12u320.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  4.4.0-46-generic

This is actually open without solution yet.


Set pm-hibernate as default in Ubuntu 18.04

Based on the idea of this post I have managed to get my systemctl-hibernate service using plane pm-hibernate.

I am currently on Ubuntu 18.10.

change the content systemd-hibernate.service file (/lib/systemd/system/systemd-hibernate.service) to:

[Unit]
Description=Hibernate
Documentation=man:systemd-suspend.service(8)
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/usr/sbin/pm-hibernate

reload the daemon

systemctl daemon-reload

and go for it

systemctl hibernate

if you are using gnome and want to install the hibernate-button (which actually works with this solution) check out the solution presented here.


How do I set up an FTP user with access to web root using vsftpd?

FTP does not follow symlinks for good reasons. Instead, you should use a bind-mount.

# Create mount directory below ftp/files
mkdir /home/ftp_user/ftp/files/www

# Mount
mount -o bind /var/www/html /home/ftp_user/ftp/files/www

Try if it works.

To make it permanent add this to /etc/fstab:

/var/www/html /home/ftp_user/ftp/files/www none defaults,bind 0 0

Be aware that unlike a symlink, if you delete the www-folder you will remove all the files in /var/www/html too.


Error installing mysql server on Ubuntu 14.04

Try this:

sudo apt-get purge mysql-server
sudo apt-get purge mysql-common
sudo rm -rf /var/log/mysql
sudo rm -rf /var/log/mysql.*
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
sudo apt-get install mysql-server --fix-missing --fix-broken

Credits to thefourtheye


That model does have a wireless on/off switch just under the PC card slot, but I'm sure you know that already.


Mark stated that they will be able to deliver something in 6 month ( that means Ubuntu 11.04 ).

That may mean that there will be a way to install Wayland ( from repository ) and replace X with that; probably only for test purposes.

Also, according to Mark X application will continue to run under Wayland in a sort of  compatibility mode.

Graphics toolkits should be ported from X to Wayland to be 100% native (Qt is almost there), so I believe that we won't see Wayland as default before Ubuntu 12.10.

(Qt on Wayland)
http://virtuousgeek.org/blog/index.php/jbarnes/2010/09/20/qt_on_wayland_first_clock


Upgrading Linux kernel without installing grub dependencies?

After checking the dependencies for linux-headers-generic, linux-signed-generic and linux-signed-image-generic. I saw that none of them depends on grub. So a simple hold using apt-mark to ignore all grub-related packages fixed the issue for me:

$ sudo apt-mark hold grub* grub*:i386

dist-upgrade now ignores grub.


It's referring to this page from the readme, which tells you how to specify your hostname.

The warning is informing you that your hostname won't work outside your local network. Sendmail attaches your hostname as the sender of the message, but it is going to be useless on the other end because people outside your local network can't find the machine jeremie-MacBookPro. You should specify a hostname that can be resolved from anywhere, like jeremies-mbp.example.com.

Depending on your usage, this may or may not be a proper domain. If you're planning on sending mail through your laptop, I would suggest reading up on using sendmail with a relay host (So it only ever connects through your gmail account for example). Otherwise you're going to suffer some serious availability issues having your MacBook be your Mail Transfer Agent for your domain.


HP probook - Unable to boot into Windows after setting up dual boot Windows 10 and Ubuntu 18

During installation of ubuntu two option come to us: One of them "Install alongside windows" another procedure is customizing hard drive partition and installing which is
mentioned as "something else" during installation. The process you are going on is not right.Whatever you do you have to install grub boot loader on same drive so that u can boot windows and ubuntu. In bios option you must select ubuntu system boot loader as a first priority.


It's possible. You can just redirect output of free and sensors to a file:

free -mt >> memoryfile.txt

Using >> will append rather than overwrite the file.

That said, you may be reinventing the wheel here. Existing tools such as munin can simply be installed, some plugins enabled, and they will periodically monitor your system parameters to produce a graph and store them in a database. Presumably extracting data from this database to use it with dygraphs would be easier than devising a parser to massage raw output from sensors and free; well, that's not inherently difficult but as I say, it's already done in munin plugins.


Grub fails to install - core.img 'unusually large'

grub+btrfs module is too big for the free space in your MBR, see bug #1059827 - "Non trivial grub2 installs no longer fit in small embed areas".


Refresh install on dual boot system - Grub2 question

Note: this is for older BIOS/MBR systems not newer UEFI/gpt systems.

Do you know which drive's MBR grub is installed into now? It is better to have the Windows boot loader on the Windows drive and grub on the Linux drive.

If you do a new install the old grub will not match and not work.

You can install grub2's boot loader to the Linux drive with this, Then change BIOS to boot from Ubuntu drive:

reinstall from working (not liveCD/DVD/USB) system - first find Ubuntu drive (example is drive sdb but use your drive not partitions):

sudo fdisk -l

if it's /dev/sdb  then just run:

sudo grub-install /dev/sdb

If that returns any errors run:

sudo grub-install --recheck /dev/sdb
sudo update-grub

You can also install a Windows boot loader to the Windows drive if you have grub in it.

How to restore the Ubuntu/XP/Vista/7 bootloader

https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

You can also manually install just the lilo boot loader to the MBR as it works just like the Windows boot loader.

Restore basic windows boot loader - universe enabled if error on lilo not found:

Simply open Synaptic and Settings > Repositories and tick the box against the Universe repo in the Ubuntu Software tab. Close that window and click on reload before installing lilo with Synaptic or command line.

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

May show error messages about the rest of lilo missing: ignore them, we just want MBR with bootloader to boot partition with boot flag (Windows).

If you have grub in sdb, then change BIOS to boot from that drive.
When you reinstall a Linux system, use Something else and on manual partitioning screen choose the Linux drive from combo box at bottom of that screen to make sure grub is in the Linux drive.


Gnome Tweaks icons and cursor doesn't change

Have you tried reloading your desktop environment?
Press Alt+F2 and type in r. Press Enter. I believe your cursor will change to what you installed.


Seems you are using #!/usr/bin/python3 in head of your script. This tells bash to execute script with /usr/bin/python3, which might not be the same as python. When using virtual environment this is almost certainly not true. You can check which python is ran in venv with

$ which python

As a solution, try deleting first line and execute script as

$ python testDB.py

or, if you need to run it as script, replace first line with #!python.


First, make sure your camera is switched on.  Many laptop models have a special function key on the keyboard for turning the camera on/off:

https://askubuntu.com/a/91735/18665

A recent update broke some Lenovo webcams.  I'm not sure if this would apply to your Acer or not, but it's worth a try:

https://askubuntu.com/a/264461/18665

If this fixes your issue, please follow the instructions at the end for updating the bug report so we can get more attention from the developers for this bug.

Since that solution is specific to Lenovo laptops, there's a chance it won't work for your laptop.  But if your camera was working and stopped working, it's possible one of the kernel updates broke it.  I'd recommend going through and trying older kernels to see if any of them fixes it:

Run this command in a terminal to see which kernel you're currently using, and make a note of it:
uname -r
Run this command in a terminal to see which kernels you have installed:
ls /lib/modules
You should have at least a couple older kernels installed.  For each older kernel you have installed, reboot your machine and at the GRUB boot menu, go to Previous Linux versions and choose one of the older kernel versions (for example, Ubuntu, with Linux 3.5.0-23-generic).
Test your camera using the older kernel version in Skype and Cheese.  Make a note of the kernel version (use uname -r if you don't remember which one you picked) and whether or not the camera works.
You should eventually get to a version of the kernel where your camera works again.  If not, search for available kernels:
sudo apt-cache search linux-image-3 | sort

And then pick an older one to install.  For example:
sudo apt-get install linux-image-3.5.0-22-generic

Then repeat the above steps to test that version of the kernel, and keep trying older versions until hopefully you get to one that works.
Once you find a version of the kernel that works, submit a bug by typing this in the terminal:
apport-bug linux

Make sure you include relevant information, such as:

Your specific laptop model
The version(s) of the kernel where the webcam doesn't work
The version(s) of the kernel where the webcam works


journalctl json output breaking python's json parser

import json

    lines = []
    with open('C:\\Users\\Owner\\Desktop\\jsondata.txt','r') as file:
        for line in file:
            lines.append(json.loads(line))
        print(lines)


You will just have to find the name of package particular service comes from dpkg -S <Any file you know and think comes from that package which provided the service>

cat /var/lib/dpkg/info/<package>.conffiles

This will help.


How can I change my keyboard layout to a modified version?

Reading the instructions cleverly hidden in a link far down on this page reveals the information that <variant><configItem><name>psvorak</name><description>PSvorak</description></configItem></variant> needs to be added to the appropriate <layout> section of the file /usr/share/X11/xkb/rules/evdev.xml

After adding this, the modified x11 keymap works for me in both ubuntu and xubuntu.


How to resize a folder name area in Ubuntu 12.04?

Horizontal Adjustment: Overlapping icons

If this is your first experience with Ubuntu, you might have noticed that icons can be arranged in a way where their file names are overlapping.

This is not an error, it's a wanted behavior. The user should not be limited in the ways, he can arrange his icons. If he wants the icons to overlap, he should be able to do so.

What you expected is a "snap to grid"-like functionality like you might know from other operating systems. In Ubuntu you are free to place your icons where you want to place them and lock the arrangement. You might call that "lock to place" instead of "lock to grid".

This means you just have to move the icons until they do not overlap anymore. When you are happy with your arrangement, right-click to open the context menu and choose to lock the arrangement.

Vertical Adjustment: Change the number of displayed lines of icon text

- Install dconf-tools

Open up a terminal with CTRL+ALT+T and install dconf-tools with:

sudo apt-get install dconf-tools

- Change nautilus configuration

Start the dconf editor with the command:

dconf-editor

Then navigate through /org/gnome/nautilus/desktop and change the value for the field-key

text-ellipsis-limit to 0 (if you don't want your file names to be truncated)

or insert a value x > 0 for displaying up to x  lines of the file name.

- Restart nautilus

nautilus -q and then open a file-manager window to start nautilus again.

Icon Adjustments: Change details displayed in the icon text

Open a file-manager window and go to Edit -> Settings in the menu. In the Display Tab you can choose which additional should be displayed when the zoom level (Views Tab) is increased. If you choose None, only the name of the folder or file will be displayed.

See the Nautilus Documentation for more info.


How To Get Intel Graphics Control Panel In Ubuntu

Surprisingly there isn't much to be found. I did find this in Ubuntu Forums:

Is there a GUI control panel for Intel graphics?

  there's a program called driconf that can tweak some settings for your
  your videocard.

sudo apt-get -y install driconf

  It helped me with regnum and other games with missing textures, I hope
  it helps you too.

I dug up a screenshot from the developer's website:

If you install the package let us know how it works out.


How to install netspeed in Ubuntu 20.04?

Your solution is here ...

https://github.com/hedayaty/NetSpeed

clone project by

  git clone https://github.com/hedayaty/NetSpeed

  cd NetSpeed

  make install

  make enable

Output is zip file, extract to your local config path.

Restart ubuntu, open "tweaks" to customize.


How to make Okular follow the system theme?

What worked for me was:

sudo apt-get install qt5-style-plugins

This is taken from the ArchLinux documentation. It also recommends setting the QT_QPA_PLATFORMTHEME=gtk2 environment variable, but I did not need that.

See also this other AskUbuntu question, this solution applies to all KDE applications.


Aliasing gedit to suppress terminal output

My answer is heavily based on this post: http://ubuntuforums.org/showthread.php?t=2011495

An alias does not work like that, arguments are always passed to the end of the command. Using your alias as an example, gedit filename will actually run the following:

gedit $@ > /dev/null 2>&1 & filename

instead of

gedit filename > /dev/null 2>&1 &

Which is causing bash to think you inputting a second command called filename.

What you need to do instead, is create a function in your ~/.bashrc file, which will run the gedit command:

The following snippet is a slightly modified version of drmrgd's code

function gedit-bg() {
    if [ ! -n "$1" ]; then
        echo "USAGE: gedit-bg <filename>";
    else
        ( gedit "$1" > /dev/null 2>&1 & );
    fi
}

You will need to re-log for the change to take effect, once you do, you can use the method like so:

gedit-bg filename


How to cleanly setup the network Docker in Ubuntu Gnome 15.10

TL;DR: I had installed Docker using "apt-get install docker.io". Installing the latest version following https://docs.docker.com/installation/ubuntulinux/ fixes the issue.

After investigating the problem it appears that the version of Docker in 15.10 cannot both create and initialize the docker0 interface correctly. On the first run (service docker start) it will create the interface but fail to initialize it, and on the subsequent run (service docker restart) it will initialize it. This can be reproduced consistently adding and deleting the interface manually with brctl. This bug has been fixed in the latest Docker.


Asus UX303LAB brightness keys do not work

For your model 'acpi_osi=' should work. Don't forget to update-grub. Try to look if Fn+F5 and F6 generate evdev events.

If you have Intel graphics, to get these buttons really working you will have to point xorg to intel_backlight.

This can be done by adding a file 20-backlight.conf to /usr/share/X11/xorg.conf.d with

Section "Device"
    Identifier "card0"
    Driver "intel"
    Option "Backlight" "intel_backlight"
    BusID "PCI:0:2:0"
EndSection`

inside.


This sounds like a it might be a graphics driver issue. Try using the proprietary drivers or the open source drivers:

In the launcher, search for 'additional drivers' and launch it
select a different driver for your graphics card, install and reboot. See if that fixed it.


0.0038031 ACPI: Unable to load the System Description Tables

Your problem is not only yours. It is with everyone who is using BIOS v1.25. You need to downgrade your BIOS. I too was suffering from this problem and did the following:

Since 2015-12-28 no need to downgrade any more, just upgrade your bios (download, double click & restart)! I've switched from 1.25 to version 1.31 (2015/12/23) and it fixed this problem.

Go to your region's Acer support website page.

Search by Product Model:
Aspire E5-573x (Where x stands for your specific model)

Select the right OS and download a bios. In my case I downloaded 1.15.

Run the ZRT_115.exe.

It will fail.
But before you close the installer, go to C:\Users\name\AppData\Local\Temp\

Search for a folder (random letters).tmp

There should be a H2OFFT-W.exe and zrt.rd file in there.
Just copy this folder and close the failing install.

In that copied folder, edit the platform.ini file.

Before:

Quote:
[BIOSVersionFormat]
;[nb4-version] +
BIOSVFEnable=1
VersionFormat=XN.NN

After:

Quote:
[BIOSVersionFormat]
;[nb4-version] +
BIOSVFEnable=1
VersionFormat=XN.DD

The VersionFormat value now has XN.DD instead of XN.NN. This will ignore the fact that 1.25 -> 1.15 is a downgrade.

Prepare for a reboot, i.e. close unnecessary applications. Because it'll happen automatically after running the installer.

Run H2OFFT-W.exe.
Upon reboot, you'll see a bios installing progress bar.
After that is done, press F2 during startup to get to bios. The version should now be 1.15.

Now you will be able to installed any GNU/Linux distro of your choice.

Don't forget to up vote and accept the answer!


NVIDIA driver 331 recent update breaks Ubuntu 13.10

you have to add
nvidia_331
to /etc/modules
for unknown reasons the modul aliasing is not working for nvidia


Ubuntu One doesn't share some of my directories

You should check "sync locally" on your Ubuntu 13.04 client too. To ensure that your .../scans file is uploaded to the cloud, you should explore your files from Ubuntu One
and see if this file is uploaded.

If yes, then you haven't checked the "sync locally" in you Ubuntu 13.04 too.


Can I use libraries for my Ubuntu Touch app?

You can include them with your app, installing them to the same directory as the rest of your files.  If the rest of your app is in QML, and you are using qmlscene to launch it, use the -I flag to add your library's path to where qmlscene will try to load them from.


Java error when running Minecraft: "...the trustAnchors parameter must be non-empty"

I had this same exact problem.  What I did to fix it was:

sudo apt-get update & sudo apt-get install ca-certificates-java
sudo update-ca-certificates -f

Go to the Java website and download the .tar.gz linux file.
 Extract the file from the archive:

jdk-10.0.1_linux-x64_bin.tar.gz/jdk-10.0.1_linux-x64_bin.tar/jdk-10.0.1/lib/security/cacerts

Copy the file to

/etc/ssl/certs/java/cacerts


How to reliably get the name of a connected USB drive?

If I understand you correctly, use the available columns of lsblk to print full information of the usb:

For example:

lsblk -p -o NAME,SERIAL,VENDOR,MODEL,TRAN | grep usb

Wich gives the output:

/dev/sdc    000FEA0AB9F5BA60641508A8 Kingston DT 101 G2        usb

Available columns (for --output):

        NAME  device name
       KNAME  internal kernel device name
     MAJ:MIN  major:minor device number
      FSTYPE  filesystem type
  MOUNTPOINT  where the device is mounted
       LABEL  filesystem LABEL
        UUID  filesystem UUID
    PARTTYPE  partition type UUID
   PARTLABEL  partition LABEL
    PARTUUID  partition UUID
   PARTFLAGS  partition flags
          RA  read-ahead of the device
          RO  read-only device
          RM  removable device
     HOTPLUG  removable or hotplug device (usb, pcmcia, ...)
       MODEL  device identifier
      SERIAL  disk serial number
        SIZE  size of the device
       STATE  state of the device
       OWNER  user name
       GROUP  group name
        MODE  device node permissions
   ALIGNMENT  alignment offset
      MIN-IO  minimum I/O size
      OPT-IO  optimal I/O size
     PHY-SEC  physical sector size
     LOG-SEC  logical sector size
        ROTA  rotational device
       SCHED  I/O scheduler name
     RQ-SIZE  request queue size
        TYPE  device type
    DISC-ALN  discard alignment offset
   DISC-GRAN  discard granularity
    DISC-MAX  discard max bytes
   DISC-ZERO  discard zeroes data
       WSAME  write same max bytes
         WWN  unique storage identifier
        RAND  adds randomness
      PKNAME  internal parent kernel device name
        HCTL  Host:Channel:Target:Lun for SCSI
        TRAN  device transport type
  SUBSYSTEMS  de-duplicated chain of subsystems
         REV  device revision
      VENDOR  device vendor


How to auto mount drive when logging in?

There's probably a more elegant solution, but provided that you can't mount something with fstab when it's in an encrypted directory, you can simply use cron to run mount once you log in. This way your cron script runs after you decrypt your home directory.

I've had to mount some SMB shares this way because fstab would fail every time.


You have several TLS-related libraries in /usr/local/lib, in the normally configured system they should not be here. The APT installs libraries to /lib, /usr/lib and so on.

So you have to move the related libraries to home folder with:

mkdir ~/wrong_libs
sudo mv /usr/local/lib/libgnutls* ~/wrong_libs/
sudo mv /usr/local/lib/libnettle.so.7 ~/wrong_libs/
sudo mv /usr/local/lib/libhogweed.so.5 ~/wrong_libs/

and then all should be fine.


It turned out to be the fault the crappy repository used by Gazebo. Apparently, it provides packages that conflict with those in the standard repo. I removed its PPA and uninstalled all broken packages and that resolved the error.


Ubuntu Wifi over 40 times SLOWER than FreeBSD and Windows drivers

Here's the answer:

The Qualcomm Atheros QCA6174 with the ath10k_pci driver is a lemon and not just in the Ubuntu distros. As discussed here.


error while loading shared libraries: libQt5Sql.so.5 when installing Cisco Packet Tracer 7.2.2

Had the same issue. All of those libs are present in /opt/pt/bin, so if you start PacketTracer from there, it will work.

ana@catalyst:/opt/pt/bin$ ./PacketTracer7


How to set up cron to call php script - bash: */5: No such file or directory for setting cron job

About cron

Quoting wikipedia here

  The software utility Cron is a time-based job scheduler in Unix-like
  computer operating systems. People who set up and maintain software
  environments use cron to schedule jobs (commands or shell scripts) to
  run periodically at fixed times, dates, or intervals. It typically
  automates system maintenance or administration..

Please check this link for more informations about cron

View crontab

To output/view the crontab of the current user

crontab -l

To view the crontab of another user you would need sudo permissions

sudo crontab -l -u nameOfOtherUser

Edit crontab

To edit your users crontab

crontab -e

or for another user via

sudo crontab -e -u nameOfOtherUser

How your cron could look like

The possible cron line using full path to php

*/5 * * * * /usr/bin/php  -q /var/www/html/sitename/cron.php

or for debugging purposes as mentioned by @Brian

*/5 * * * * /usr/bin/php  -q /var/www/html/sitename/cron.php > /var/www/html/sitename/cron-temp.log 2>&1

This writes a log file called cron-temp.log in /var/www/html/sitename/

Regarding parameters

-q = quiet mode

Your todo

Edit your cron and add the new line which defines how often which script should be called
Wait until the interval triggers and check the log file if you are using this option


How to Integrate of Python 2.7.4 in Qt 5.0

sudo apt-get install pyqt5-dev-tools

write a sample program

from PyQt5.QtCore import *
from PyQt5.QtWidgets import *

class Form(QWidget):
    def __init__(self, parent=None):
        super(Form, self).__init__(parent)

        nameLabel = QLabel("Name:")
        self.nameLine = QLineEdit()
        self.submitButton = QPushButton("&Submit")

        buttonLayout1 = QVBoxLayout()
        buttonLayout1.addWidget(nameLabel)
        buttonLayout1.addWidget(self.nameLine)
        buttonLayout1.addWidget(self.submitButton)

        self.submitButton.clicked.connect(self.submitContact)

        mainLayout = QGridLayout()
        # mainLayout.addWidget(nameLabel, 0, 0)
        mainLayout.addLayout(buttonLayout1, 0, 1)

        self.setLayout(mainLayout)
        self.setWindowTitle("Hello Qt")

    def submitContact(self):
        name = self.nameLine.text()

        if name == "":
            QMessageBox.information(self, "Empty Field","Please enter a name and address.")
            return
        else:
            QMessageBox.information(self, "Success!","Hello \"%s\"!" % name)

if __name__ == '__main__':
    import sys

    app = QApplication(sys.argv)

    screen = Form()
    screen.show()

    sys.exit(app.exec_())

save this as sample.py

execute this by

$python3 sample.py

source : link


Hi try the following from terminal

1. sudo chmod 774 /var
2. sudo chmod 774 /var/www/

then check if you can now access the folder


Do I have to unmount the drive when using dd command?

It's possible (checked in this moment) but it's highly advisable to umount the device before a dd.

This may be not a problem in your special case if=/dev/urandom, but in other cases:

If is some activity on that partition during the dd command, there is no guarantee that you partition isn't broken.


ffmpeg-video trim from the end of the video

This will get you the duration of your file in seconds:

let A=$(avprobe input.webm 2>&1 | grep "^ *Duration: " | sed "s/^ *Duration: \\([0-9:]*\\).*/(((\\1)/" | sed "s/0\\([0-9]\\)/\\1/g" | sed "s/:/)*60+/g")

Although avprobe does return the fractions of the seconds, bash doesn't deal with fractions. So i'm just dropping everythinging that is less than 1 second.

After that you can easily do something like this:

let A=$A-5
avconv -i input.webm -t $A -c:v copy -c:a copy output.webm

Sorry for not using ffmpeg. I've switched to avconv a while ago, i believe that the options should be the same, and if not, it should be trivial to rewrite them as needed.

After this the question is only in wrapping the whole thing in the for loop and doing all the files at once.


To remove packages on Ubuntu, use sudo apt remove:

sudo apt remove oracle-java8-installer
sudo apt remove oracle-java9-installer
sudo apt remove oracle-java8-set-default

These are the same commands that you used to install these packages except replacing the word "install" with "remove".

Once you do that, you can install Java with:

sudo apt install openjdk-8-jre

This OpenJDK version is open-source and is the preferred option.

Oh and, please never try to remove any program with rm ever again.


In the top right 'manage your calendar' menu (left to the 'sandwich menu'):

Manage Calendars -> Import calendar -> "file browser" icon.


Ubuntu one (application) on ubuntu software center

Ubuntu one has ended it no longer exists. I recommend dropbox.
https://www.dropbox.com/install?os=lnx
or you can install dropbox from software center it is already in the repositories.


Question about setting up my Steam cache server

/srv/steamcache/depot is like any linux directory node, you can either use it as a local directory, or as a mount point bound to a physical partition on any of the systems drives or network storage.


How do I change the locale of Wine to Japanese on Ubuntu 14.04?

You can always run the game from the terminal instead of installing any other app and specify the language in the command:

LANG=ja_JP.UTF-8 wine /path/to/game/game.exe

In my case I wanted to play Saya no Uta (Japanese game with Japanese fonts) but it always showed squares and other non-Japanese symbols. I used to solve this kind of problem with AppLocale in Windows, but since I couldn't find an AppLocale replacement for Ubuntu then I launched the game through the terminal like this


"configure: error: Intel WiMAX SDK is required " error when recompiling Network Manager

It would appear that WiMAX support in network-manager is written against some specific SDK from Intel, which they seem to have dropped the ball on, as I can't seem to find a link to download it anywhere, and linuxwimax.org is dead. In order to compile network-manager against wimax-tools instead, it would need some work to look for that library, and match the API it uses.


Resize partitions | gparted | swapoff fail

The message indicates that your are running low of memory.
The current need is only satisfied with enabled swap space.

Most likely is that you loaded the LiveUSB content into ram at boot time.
Check the boot menu and deselect this option.

Some further remarks

As I see in your question, the swap space is not inside the partition you want to resize. So with a little bit luck you haven't the need to disable the swap space. Give it a try.

Generally I would consider to use LVM instead of bare partitions.
The "space management" is a lot easier and you can do it online without LiveUSB :-)

You can increase a partition if you have enough free space allocated for the LVM volume group.
If you run low of space in a volume group you can simply add a new physical volume to the volume group. So you work around the problem that you have to repartition your disk.


Skype online shows arabic letters in google chrome

Paste the following link in a new tab

chrome://settings/languages

and under languages see whether Arabic is turned on somehow, if yes then remove it. Also turn on the Auto translate and try again. If none of that works try restoring setting to their original default (this option is available at the bottom).

If the last option doesn't work either please do right click on the page and click on the option of "Translate to English" (all along I'm assuming english is your preferred or default language).


"None-type" error on Wubi after MD5HASH check fails

From the error messages, it appears that a file download has failed -- the file was corrupt due to transmission errors. These things are quite rare, but happen. Try to run the whole process again. It should show you this error in a nicer and clearer way and then not try to continue and get all kinds of other funny errors, but the program you're using is apparently not very well-written with regard to such error-handling.

Potentially useless but somewhat interesting background info: this is what the "invalid MD5" message means: MD5 is a so-called hashing algorithm, which computes a checksum value based on some data (the downloaded file). It is then compared to the known correct checksum value. MD5 checksums differ a lot even if just a single little piece of the data is different, and that is what has happened here.


Ubuntu 18 - how to ungroup apps in dock?

To mimic the Windows taskbar, install the extension "Dash to Panel". It immediately provides a Windows style bar at the bottom of the screen. It has plenty of configuration options, including the option you are after, i.e., ungrouping application buttons. 'Dash to Panel" is an excellent extension.


Sync settings/software on multiple machines

You can use Unison File Synchronizer to synchronise the configurations folders.  I use that to synchronise my user files and e-mail options and configuration folders.

Install unison: sudo apt-get install unison.

You would then need to create a profile inside folder ~/.unison

The file could be Synchronise_Profile.prf:

# Roots of the synchronization
root = /home/username
root = ssh://usrname@my.computer.com//home/username
#force = /home/username   # If you want to always override remote.
#batch = true  # If you do not want to have to confirm anything.

# Paths to synchronize
path = .config/xfce4/xfconf/xfce-perchannel-xml/
path = .config/xfce4/xfconf/   # And add any other folder to synchronize

# Some regexps specifying names and paths to ignore
ignore = Name temp.*  # Any files you may want to ignore
ignore = Name *~
ignore = Name .*~

More help on Unison File Synchronizer here.

It works through SSH so you can always make that work with SSH keys so you do not have to type passwords every time you synchronise.  More on SSH keys here.

Of course, unison can work from the command prompt so once you set your SSH keys and ensure you have the backup folders working on the profile you can add this to a cron event and do this transparently.

Edit: Just realised that you are also looking for synchronising other installed files so this means this response is only partial as it would not ensure the software installed on one system is installed in another system.


You don't need to create such an application. It already exists on your system!

To copy any file to another system, simply run the following:

scp /path/to/file/locally user@remotehost:/path/you/want/the/file/remote

You may still need to SSH into your remote host and change permissions, but scp will take care of the copying itself. See man scp for more details.

Alternatively, you can use rsync, which offers a few benefits, but it requires that rsync be set up on the server you're copying to. See man rsync for more detail.


How do I download pictures from my phone?

You can use Android app WebSharing Lite for copying files on your phone to your desktop and vice versa. Your phone should be connected to a wireless network and the desktop from which you would like to access the phone filesystem should be in the same network.


Why doesn't clicking on notification buttons in Xubuntu 12.04 dismiss the notification?

It's a bug in the XFCE4 notification daemon

This is the kind of problem we're talking about -- clicking on the buttons will perform the appropriate action, but will not dismiss the notification. You must "X" it out or click anywhere in the body to make it go away:

This has been a known bug in the XFCE4 notification daemon xfce4-notifyd
It was fixed late last year with the following note:

emit closed signal on correct object:
'widget' is actually the GtkButton when an action is clicked.
this is why notifications were never dismissed when an action got clicked.
long-standing bug finally fixed!
And was backported into the xfce4-notifyd 0.2.2-2 package in Debian; Ubuntu Precise still uses the buggy 0.2.2-1 package, and who knows if the fix will be backported to it.

- 01_fix-dismiss-notifications added, backported from upstream. Correctly
  dismiss notifications when clicked.                       closes: #672646

Solution: install the fixed Debian version of xfce4-notifyd

The fix has also trickled down into xfce4-notifyd for Quantal (the next Ubuntu release), but trying to install that will require upgrading your entire XFCE. If you feel like doing that, just upgrade to the latest XFCE from the Xubuntu Developers' PPA
Otherwise, just get the Debian package which has the same dependencies as the existing xfce4-notifyd and solve the problem! That worked perfectly for me.
Download xfce4-notifyd 0.2.2-2: 32-bit mirrors or 64-bit mirrors
Install with sudo dpkg -i or Software Center. Logout, and while not required, reboot for good measure!


The best way I have found to do this without removing my hands from the keyboard:

Most keyboards nowadays have a "right click" key (don't know if it has an official name), located between the right alt and right ctrl, looks like an icon of a menu. Clicking on that opens up the right click menu of the current window (your mouse doesn't have to be in the window itself).

Therefore, the shortcut is Keyboard Right Click Key + E.

BTW, If you don't have a right click button on keyboard, you can right click using:
SHIFT+F10, and then press E. Less intuitive, but also works...


How can i get my nic card to work in 10.10 throght the terminal?

From 10.10, you've got several upgrades that need to happen across a lot of versions that are now discontinued (10.10→11.04→11.10→12.04). That's the bare minimum for getting to a supported version. If you've already got connection issues, that's a lot of upgrading. That's hours-to-days depending on the connection speed.

It would take less time and less bandwidth if you just reinstalled with the version you want to use now. Download the CD with a torrent (to ensure it's not corrupted - great on bad connections) and then burn it to USB or CD.

I'd strongly suggest trying it before you install (to see if the kernel included is loading the right drivers, etc) but yeah... An install shouldn't take longer than 30 minutes and after that you're back in the land of supported software.


If I understand correctly, you only want to share the folder between all the local users on a single machine, yes? In that case, you do not need to involve sharing, because that is for sharing over a local network. Everything you need to do is to modify the permissions of the folder such that anyone can read and write in that folder. For example, you can set

chmod a+rwx folder

anyone will be able to read, write and delete files within that folder. If you set

chmod a+rwxt folder

then anyone will be able to read and write, but only the person who created a file or directory will be allowed to remove it.

The above command is for command line, but you can also set the permissions using the graphical user interface; right-click on a folder, select properties -> permissions.


Why can't I use `su --session-command` on Ubuntu?

Ubuntu and Debian uses the shadow-utils package since a worthwhile (log file goes to 01 Jan 1996). The util-linux su was moved from coreutils to util-linux package recently, the version in coreutils needed to be specifically build with it (most distros didn't). Apparently the only reason is that Debian always used shadow-util own implementation instead of coreutils su.

The header you will notice a message saying that there's another man page provided by the shadow-utils package which is the same as Debian/Ubuntu uses. If you see the bottom of the man page if both Ubuntu and CentOS you will notice this too.

In summary you are reading the wrong man.


How to stop the keyring dialoug when opening Chrome

I noticed that this window emerge only when I kept logged in my google acount, but today I succeeded stoping this window to appear doing the following steps that I have not seen in any forum:

Open Chrome
Enter the password and press "unlock"
Open "Seahorse" by searching it in the Unity Launcher
Right click in "Login"
Select "Lock"
Restart your PC and try it !!

I hope this solution help you to solve your problem


Posts by TomFreudenberg on github were very helpful. i8kutils is working like a champ on Dell Inspiron laptop but was hard to find a single procedure to get installed and configured for a Dell WITH bios fan control disabling. These are my detailed steps and machine:

Ubuntu 18.04 Bionic Beaver
Laptop: Dell Inspiron 7000 series (7737)
CPU: Intel® Core™ i7-4510U CPU @ 2.00GHz × 4

My solution steps (fans immediately shut off on last step):

Download .zip file (or git clone) to disable BIOS fan control for Dell laptops.
Then, as root:

cd Downloads
unzip -t dell-bios-fan-control-master.zip  (test zipfile; everything looked fine, so unzip files...)
unzip dell-bios-fan-control-master.zip
cd dell-bios-fan-control-master/
more Makefile  (look what it's going to do; looks fine, so compile with...)
make

Compiled fine, so:

./dell-bios-fan-control 0  (turn off dell bios fan control)
BIOS CONTROL DISABLED

Fan was still idling around 2500rpm. Hmmm.. recalled post indicating uninstall then reinstall i8kutils with the same /etc/i8kutils.conf config file.
Uninstalled and reinstalled i8kutils with:

apt-get remove i8kutils
apt-get install i8kutils

Fan immediately stopped upon reinstalling i8kutils.

Looks like it's working. Fan turns on properly when cpu temp hits 55C then turns off quickly because fan came on at the high setting.

Will continue to monitor temperature and fan states with 'sensors' to ensure all is working as configured in /etc/i8kutils.conf.

Thanks for the pointers and code. This is the only solution that worked for me.

tlp did nothing but that may be because bios was controlling the fans.


how do I assign multiple IP address when boot

You can put the command in rc.local file.

Open gedit with root access gksu gedit /etc/rc.local

Before the end line (exit 0), put your command without sudo

Like

ifconfig eth0:1 192.168.20.66
exit 0


Why are commercial PPA updates suddenly very slow?

Slowdowns occasionally happen because all PPA's are hosted only on Canonical/Launchpad's servers in the UK and are not mirrored around the world like the official repositories.
Right now, the Canonical servers are under extremely heavy load because of the recent release of 12.04.1 and all the people on 10.04 LTS who are now upgrading to it. (Automatic upgrades from 10.04 were not possible until 12.04.1 was available)
There's no fix right now, but speeds should be back to normal within the next few days as the load decreases.
If you use apt-get for package management, you may want to try the apt-fast alternative which will probably download the PPAs faster (it uses multiple connections to the server).


Is there any way to check history only of current session?

The history built in bash allows specifying filenames when used with -anrw flags, and -a flag description from help history states:

  append history lines from this session to the history file

Therefore, we can do:

~$ history -a this_session.history
~$ cat ./this_session.history
history mysession.history
cat mysession.history
clear
history -a this_session.history

For the record, -w (the write history to file opion) writes whole history to the specified file, so -a (append) here is preferred choice.

There's other manual ways. In particular ksh doesn't have -a flag as bash does, but what ksh  and mksh do have is HISTFILE environment variable ( and bash has that,too, because bash included lots of ksh features); by the way, this variable by default isn't set (at least mksh on Ubuntu didn't set it). So, for outputting current session to other file, we call HISTFILE prepended to command which in shell syntax means running command with additional environment variable you specify. Like so:

bash-4.4$ HISTFILE='mykshfile.hist' ksh
$ echo 'Hello'
Hello
$ echo 'World'
World
$
bash-4.4$ cat ./mykshfile.hist
�echo 'Hello'
echo 'World'

What you also can see from this is that ksh and its related shells output history with special characters, instead of plain text as what bash does. So, you may want to open that file with ksh.

As far as the POSIX  /bin/sh  shell on Ubuntu, which is Debian Almquist Shell or Dash, there exists fc built-in. However, on Ubuntu dash is compiled without lib-edit, which is a conscious choice by Ubuntu developers for performance reasons, so fc and other modes that require line editing  don't work out of the box (unless recompile dash yourself and install lib-edit).

Shell neutral ways would be to record your session with existing tools   or write your own function to record on per-command basis.


Organizing the Disk and Folder Structure for an Upgrade

Ubuntu can easily be upgraded without losing data. Because Ubuntu knows where each application resides (thanks to apt), there is no need for a separate directory for applications.

You'll mostly be fine with a separate /home directory, in case you want to wipe your root partition or clone your home directory. All user settings and documents are stored in /home.


You're using the wrong command.

echo "grep --ignore-case $1 *.find" > search.sh


My laptop runs very hot with Lubuntu 11.10, what can I do?

It seems you (and I)  have the same problem as most users using Intel processors. There is a power regression/overheating bug with Linux kernel used by 11.10. Good news is this bug has been fixed as witnessed by 12.04 beta 2 users.

Just upgrade to 12.04 on April 26 which I'm sure will take care of this problem once and for all. Hope this helps!


Package to install bash script that needs root/sudo access

Jeff!

Linux ignores setuid bits on shell scripts, and thereof it is the case with Debian and Ubuntu distributions. This is due to an inherent race condition involved in executing setuid root shell scripts that is described in detail in answer on this link:

https://unix.stackexchange.com/questions/364/allow-setuid-on-shell-scripts

Hope this helps.

gmt42


How to deal with forgotten password without loosing any data from ubuntu based laptop?

Boot your machine into Recovery mode and choose root like explained here, then  remount your hardisk to read/write access then you can use passwd to set a new password for your user. Just be aware not to change the root password in this console. Also look here for more about this problem.


I found this in another post. In a "Terminal", try entering:

sudo mkdir /media/${USER}

If you have other users on the same machine, say, fred, create /media/fred as well

Amazing that such a basic issue was not addressed before 12.10 was released!


How to pipe all bash terminal output through command

exec > >(COMMAND)

Where COMMAND is rev, lolcat or other. This won't work with cowsay.

E.g.

bash-4.3$ exec > >(rev)
bash-4.3$ echo hello
olleh

Explanation:

exec normally replaces the current shell with another process, but if you just give it a redirection like in this case, the redirection will take place for the current shell.
> redirect stdout
>(COMMAND) input into COMMAND

Note that if you have a PROMPT_COMMAND, you should direct it to stderr to avoid the redirected stdout.


install red5 server on an ubuntu12.04 server

java-package is not a package in the repositories and you probably already have Java installed in your system (type java -version to test that).

Instead of following some outdated tutorials on the internet you should have a look at already packed packages for your system, RED5 is available and packed for 12.04, so it will be easier for you to install it with apt.

To install RED5 in Ubuntu the only thing you need to do is to run sudo apt-get install red5-server in a terminal.

After install your server should be up and running, you can check it's status with sudo service red5-server status and access it via your browser at the address localhost:5080

This will install all the necessary packages and dependencies required to run RED5. After you do that the server will be available and running at http://localhost:5080.


The problem where you said "a keyboard in a circle being equivalent to a man" occurs when "the BIOS is NOT set up to boot the CD [or USB] in EFI mode, or if the disk [or USB] is not 64-bit" (https://help.ubuntu.com/community/UEFI). If you have windows 7 64-bit, your BIOS should be in UEFI mode. That page I mentioned should help you with configuring the BIOS/checking it. First check if you have a 64-bit operating system by doing the following:

boot into windows
open the start menu
right-click on Computer
select Properties
look under the "System" heading in the window that opens and look at what follows "System type:"

If it says 64-bit Operating System, you should use a 64-bit version of Ubuntu, so make sure that the download says AMD64 (indicating 64-bit) somewhere in the file name.

(By the way GRUB is the boot loader that Ubuntu uses)


Keyboard won't light up on a Sony Vaio VPCF121FX

Until a fix is released, enter this in a terminal:

echo 1 | sudo tee /sys/devices/platform/sony-laptop/kbd_backlight


How to revert back to GUI as the default interface from CLI in Ubuntu desktop?

Found the solution! So I'm posting it here myself...

To revert back to a graphical login and session (X session), GRUB_CMDLINE_LINUX_DEFAULT="text" in the /etc/default/grub file should be replaced by GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios" (or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=api" for some Dell laptops). After having done this editing, save the file and run the update-grub command, and then reboot to see if the graphical login greeter appears. If it does, that's it... you can then log-in...

But if you still remain stuck with the problem (like I was..), you can try using gdm as your display-manager (DM) or you could also try reinstalling lightgdm. I uninstalled lightgdm and set gdm as the new manager with the command that follows:

sudo stop lightdm
sudo start gdm
sudo dpkg-reconfigure lightdm

and choose the DM you want so that it is set as the default option.

If your choice of DM was gdm, now you may uninstall lightdm, sudo apt-get remove lightdm, and sudo reboot. And there you are with our old gdm graphical display-manager.

But if you choose lightdm which if which crashed earlier like mine did, you'd like to do a reinstall of lightdm instead like described below:

Log-in to a new tty (press Ctrl + Alt + F1) and enter the commands;

sudo stop lightdm
sudo apt-get purge lightdm
sudo apt-get install lightdm

and then set lightdm as the default manager and reboot to see it in effect.


Is it possible to upgrade directly from 15.04 to 16.04?

No you can not upgrade from 15.04 directly to 16.04.
You have to update from 15.04 over 15.10 to 16.04.

Just as additional information:

Upgrading from LTS to LTS works (example: 14.04 to 16.04 would be possible)


I'm the lead developer of Ubuntu One Files. And I also wish to use keepassx with it one day :)

Yes, more full-feature sync engine will come, I can't give any dates yet, though.


Ethernet cable not detected after force shutdown in Ubuntu 18.04

Thanks to the above suggestions in the comment and some research I got a solution for the above.

What worked:

Manually updating the /etc/network/interfaces file

auto eno1
iface eno1 inet dhcp

Why I believe it works:[Just my understanding]

Because of the force shutdown, netplan has been created as a new user account.
Therefore, netplan in the user account is not able to update the

  /etc/networking/interfaces

file with the new Ethernet interface mappings.

Will update the answer as I learn more


ubuntu removes my recovery partion hp notebook

If during your original Ubuntu install you didn't select the "Something Else" option to configure a dual-boot system, the installer reformatted the drive and wiped the Win8 Recovery partition. You'll have to contact HP to determine what your options are to get a System disc set that will restore the Windows Recovery partition. This may again require reformatting the drive and losing your Ubuntu install in the process.


WineHQ has nice repositories for most Ubuntu versions.

You should install wine using the steps listed on the official documentation instead of compiling by source.

Since you want version 3.15, you should pick winehq-staging, which I use in my xenial installation without problems.

Basically the steps are:

sudo dpkg --add-architecture i386 # if using a 64bit distribution of Ubuntu
curl -L https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
sudo apt-get update
sudo apt-get install --install-recommends winehq-staging # staging repo for 3.15 version

In addition, maybe you would want to have also the latest version of winetricks - according to the official documentation:

cd "${HOME}/Downloads"
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo mv winetricks /usr/local/bin/

Then you can type winetricks into a terminal to run it, for the further new versions it will guide you how to update.


One easy to use tool is Audacity which has the capability of showing distortion in your original file in an easy to under stand graphical manner. Simply import your file and then activate the clipping detection by using:

View --> Show Clipping

and you will see vertical red lines to indicate where the distortion is occurring. See below on a stereo mp3 file of my own:

This will give you an idea of any distortion in the original file, Audacity also has a tool that you might like to try to fix the issue under:

Effect --> Clip Fix

which I confess has had varied results on my own system...

References:

Audacity Waveform
Clip Fix


Greatly reduced wifi speed on Ubuntu 18 with multiple network cards

The user manual for the RTL8192E shows it is 2.4GHz only.
Likewise, the TP-Link TL-WL722N is 2.4GHz only.

Any 500Mbps connection will be using 5GHz frequencies, but neither of your WiFi adapters are 5GHz-capable.

If you leapfrog over WiFi and use an Ethernet cable for the desktop, you will get faster connections than 5GHz can provide; you can get flat cable in various lengths which you can carpet-tape to the baseboard or run under carpet, if you want the cable to be unobtrusive. Otherwise, get a 5GHz capable WiFi adapter.


If you want that you can install "nautilus-gksu" which will give you root access on the right click menu.


Just removed system-reserved-drive, can't boot into Ubuntu 14.04 anymore

Thanks for the help everyone. I would like to share a solution that worked for me. But first let me define what was actually causing this issue.

Problem:

Before deletion of System Reserved partition, my partitions were organized as follows:

System Reserved (NTFS),
Partition 2 (NTFS),
A block of two EXT4 partitions (a root and a home partition),
Partition 4 (NTFS)

When I deleted System Reserved, only one partition was left with a boot flag i.e. one of EXT4 partitions. But since this flag was on the root partition and thus was not visible in the first tier of partitions (an NTFS, another NTFS, a block of EXT4s and another NTFS), the system was giving a "Boot device not found" error.

Solution:

The following set of step helped me solve this problem:

Create a LiveCD of Ubuntu on a USB drive/CD
Boot from that drive and select Try Ubuntu
Use gparted to change the flag of the whole block of EXT4 partitions (or whole ubuntu partition; shaded as grey in the figure) to boot, this will make sure that a drive with a boot flag is visible in the very first tier of partitions


Prevent Ubuntu from automatically starting up after 10 secs with dual-boot

Boot into Ubuntu and install an app called Grub Customizer. Open a Terminal window and type:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

(Press Enter after each line of text).

Go to the main menu and start Grub Customizer. You can change default timing (those 10 secs) in the General Settings tab.

Alternatively, you can do similar actions in Windows by installing GRUB2Win application.

Just make sure you don't uninstall GRUB as Ubuntu needs it in order to boot.


I can think of three likely causes of your problem:

An incorrectly-prepared boot medium -- To create a bootable USB flash drive from a .iso file, a utility must be able to write an appropriate boot loader to the drive. As EFI and BIOS require different boot loaders, it's now entirely possible to create a USB drive that will boot with one type of firmware but not the other, which could explain why you can boot the disk on an EFI-based computer but not on your older BIOS-based machine. If this hypothesis is correct, using different options with your utility, or a different utility entirely, may overcome the problem. For a BIOS-based boot, I'd say that a simple dd operation is the most likely to succeed. In a working Linux installation, use sudo dd if=imagefile.iso of=/dev/sdc bs=4096 to create a bootable USB flash drive on /dev/sdc. (Of course, you should adjust both imagefile.iso and /dev/sdc to suit your source and destination. Note that the destination must be a whole-disk device like /dev/sdc, not a partition.)
A failure to use the computer's built-in boot options -- When you insert the USB drive in the computer on which you want to install Ubuntu, you must know how to get to your boot options menu. Normally this menu appears if you hit Esc, Enter, or a function key (typically F8 or above) soon after powering on. Sometimes you'll see a prompt about which key to use, but sometimes there is no prompt. In the latter case, you can guess -- try each possibility in turn. If nothing else works, you can adjust the boot order using the firmware setup utility.
An incompatible USB drive -- I've encountered some USB flash drives that fail to work as BIOS-mode boot devices, although they work fine as ordinary data drives. I don't know why this is the case. If neither of the preceding two points helps, you might try a different brand of USB flash drive.

If all of the preceding suggestions fail, you might try burning an optical disc, assuming your computer has an optical drive. These sometimes work more reliably than a USB flash drive.


Autoreconf error: failed with exit status: 1

Install libtool:

!sudo apt-get update -y -qqq --fix-missing && apt-get install -y -qqq autoconf libtool > /dev/null


You can not create more than 4 primary partitions.

You need to remove one of the existing partitions and create one extended partition. Then you will be able to create many logical partitions inside it.

In your case the easiest way will be to re-install Ubuntu. Your partitioning is wrong and it will take lots of effort get it right.

There is absolutely no need to have a separate /opt partition.
You have already 4 primary partitions and the extended partition is in a very awkward place aside to / to move everything.
Moving the / partition will require to re-install grub.

That is not impossible to move sda3 and sda4 to the right, then extend ext2, and then create some new partitions inside sda2.

But I do not see a reason to have this type of partitioning.

That is why I recommend to re-install. You can create one extended partition and inside it /, /home and /swap. And you can live space for installing Windows or other OS`s on 3 other primary partitions, if you like.


Reliably check if a package is installed or not

Essentially you only need to replace the if condition with

if dpkg --get-selections | grep -q "^$pkg[[:space:]]*install$" >/dev/null; then

It is not possible to use dpkg-query, because it returns true also for packages removed but not purged.

Also I suggest to check the exit code of apt-get before giving the successful message:

if apt-get -qq install $pkg; then
    echo "Successfully installed $pkg"
else
    echo "Error installing $pkg"
fi


It seems that you need to create an alias with:

sudo ln -s /usr/bin/nodejs /usr/bin/node

for uglifycss to work.


BTF: .tmp_vmlinux.btf: pahole version v1.15 is too old, need at least v1.16

Thanks for your response I have got the .deb file for dwarvesV1.17 and pahole is upgrade to V1.17.
Here is link for that http://archive.ubuntu.com/ubuntu/pool/universe/d/dwarves-dfsg/dwarves_1.17-1_amd64.deb


How remove all programs comes from a package?

As apt-get autoremove (suggested by Aaron) will remove all "helper-packages" nothing seems to depend on any longer, sometimes you want to keep some of them for one reason or another. So if that concerns you, another possibility would be:

$(apt-cache depends postgresql|awk '{print "sudo apt-get remove "$NF}')

Using Bash as your shell, this would basically do the following:

apt-cache depends postgresql would list all packages the postgresql depends on, including postgresql itself. But each line would look like depends on: <package> -- so we pipe the output to...
awk '{print "sudo apt-get remove "$NF}' which would take the last word on each line (which is the package name), and prints it out after preceding it with our intended command: sudo apt-get remove (you could of course also use apt-get purge instead).
finally, using the $() construct, we advise Bash to interpret the output as command to be executed.

You could alternatively replace the 3rd step and instead redirect the output into a file:

apt-cache depends postgresql|awk '{print "sudo apt-get remove "$NF}' >pg_remove.sh

And then inspect the file, optionally do some adjustments (such as commenting out/removing lines where you want to keep a package), and finally execute the script using

bash pg_remove.sh

Now you have a lot of possibilities to chose from :)

EDIT: Checking with more complex metapackages as e.g. lubuntu-desktop, above statements needs to be refined:

apt-cache depends <packageName>|grep "Depends on"|awk '{print "sudo apt-get remove "$NF}'

The grep is needed to restrict the result to dependencies (and skip the recommends etc.).

IMPORTANT: You should use this only for metapackages!!! otherwise, you may end up with an empty disk (e.g. postgresql-9.1 depends on libc6, and removing libc6 will certainly backfire as it is needed by a lot of packages).

So be careful, and better redirect to a file first (as explained) and investigate before execution.


timeshift restore to different partitions

Each parititon has its own uniqe ID (UUID). GRUB is probably unable to boot because it can't see other parition, because it still looking for the old UUID, which is saved in the /boot/grub/grub.cfg.

Another thing is /etc/fstab. If you're using block devices name (i.e. /dev/sdX), the system won't boot from another parititon. Use UUID's in your fstab instead.

You can look for partition UUIDs with:

sudo blkid | grep -v ^/dev/loop

Example /etc/fstab with UUIDs:

UUID=3e77522d-9de5-4f88-9331-f0af2ace3f80 /               ext4    errors=remount-ro 0       1
UUID=b00e75b8-8a39-11e9-bc42-526af7764f64 /boot           ext4    defaults        0       2

Solution 1

Make sure that your partition snapshot is full binary copy of the parition, with the same UUID. But in this case you'll need to change the old parition UUID, because otherwise you'll end up with two parititons with same UUID, that will conflict with each other.

Solution 2

Boot live CD and try to chroot into your new parition, using this wiki. Edit /etc/fstab and /boot/grub/grub.cfg, replace your old UUID to the new one. Then you should be able to boot. But you have to make sure that GRUB is installed on the device and it's first to boot in your BIOS configuration.

Other solutions

There are also similar QA on askubuntu that might be helpful:

How to fix the UUID in Grub after restore from another machine?
How can I repair grub? (How to get Ubuntu back after installing Windows?)


How to configure the xinput driver "multitouch" with absolute axes

I was able to make my Synaptics touchpad absolute with this command:

xinput set-mode <device name> ABSOLUTE

My <device name> is "SynPS/2 Synaptics TouchPad" (including quotes).  To find your device name, you can list your devices with the xinput command and no options.  Look for a "slave" device, which is the actual hardware, not the master device, which is virtual.  I was not able to set my "Virtual core pointer" to absolute, but I don't know about your "eGalaxTouch Virtual Device".

For me, the upper and lower bounds of the touchpad didn't quite reach the upper and lower bounds of the screen, but left and right were correct.  So you might have to adjust a scaling factor or coordinate transformation matrix or some such.  You can view your device properties with this:

xinput list-props <device name>

and set a property with this:

xinput set-prop <device> <property> <val>

Check the xinput man page for more info on setting properties.

I don't know if there is a way to put these settings in your xorg.conf file, but you can simply add the commands to your ~/.xinitrc file.  See
How to create an X session script.


Resetting CompizConfig Settings Manager  settings

If you're using Unity and you want to reset Unity to its default settings, want to reset the Unity Launcher icons or you've changed some Compiz settings which have messed up Ubuntu and want to reset everything, here's how to do it.

Reset Unity

If you want to reset Unity (this will only reset the Unity settings in CompizConfig Settings Manager and leave the other CCSM settings intact), open a terminal (or press ALT + F2) and enter:

unity --reset

Reset Unity Launcher icons

If you want to reset the Unity Launcher icons (dock bar on the left) to their initial state, run the following command:

unity --reset-icons

Reset Compiz

Warning: only do this if you really must and have no other option! Use both commands, or else you might not see the Unity launcher and top panel anymore! Use it at your own risk.

To reset all the Compiz settings (this includes all the plugins settings, etc.) to the default values, open a terminal (don't run it with ALT + F2! The top panel and launcher will disappear after running the first command but will show up after the second one so use a terminal) and type:

gconftool-2 --recursive-unset /apps/compiz-1
unity --reset

If something doesn't look right after this, log out and log back in.


change all file names (prefix to postfix)

This is possible with the rename command:

First check what would be done (by suppliying -n). If it looks good, drop the -n and run again:

rename -n 's/t_(.+)\.png$/$1_t.png/' *.png  # check only
rename    's/t_(.+)\.png$/$1_t.png/' *.png  # actually rename the files


Does a USB HDD contain info on previous mounts?

Simple answer is no.

The hard drive itself will not contain that information.

If you have access to the computer it was previously used with, then syslog will have recorded the plug/unplug events.

So you can know whether or not that drive was present on a particular computer.


Ethernet Connection randomly disconnects after transmit queue 0 timed out

First of all, I tried to replace r8169 with r8168 which happens to be a bug for many users having Realtek Ethernet Controller, but never solved the problem, even now almost an year after posting this. I face the same problem even with the latest kernel update 4.2.0-30-generic.
Solution:
Replace the current kernel with a stable older kernel version, in my case I installed kernel version 3.2.0-83-generic manually in 14.04 LTS. Now the Ethernet connection is stable and the problem is solved.
Download the following .deb packages from 1, 2, 3, 4 and install it:
sudo dpkg -i linux-headers-3.2.0-83_3.2.0-83.120_all.deb
sudo dpkg -i linux-headers-3.2.0-83-generic_3.2.0-83.120_i386.deb
sudo dpkg -i linux-image-3.2.0-83-generic_3.2.0-83.120_i386.deb

You can change the boot order by editing GRUB_DEFAULT=0 in /etc/default/grub as given here. Then
sudo update-grub
sudo reboot

I think you can try to install other latest v3.2 kernels which too may be stable, Ex: 3.2.0-98-generic
Note: I have tested it for both 32bit and 64bit Ubuntu 14.04 LTS


(Ubuntu 14.04) High Quality .OGV conversion to either .AVI or .MP4

I suspect that if you really want to import your video into another application for editing you would be better to use a lossless video format such as HuffYUV or FFV1 or even lossless h.264 using -qp 0 rather than -crf 0 as you have done. Depends which Cinelerra likes the most.

For lossless h.264 try the following and see if it is any better than your own results:

avconv -i Cinematic_1_Intro.ogv \
       -c:v libx264 -preset veryslow -qp 0 -vf scale="1280:trunc(ow/a/2)*2" \
       -c:a libmp3lame -qscale:a 3 -af 'volume=1.5' -ac 2 \
       Cinematic_1_Intro.mp4

A lot of this syntax comes from the current FFmpeg and I have not tested on an older avconv, in particular the scaling and volume changes where I have attempted to reproduce some of your settings...


The Following fixed my problem.  My sound card was a radeon 4200 series.

It is also notable that the open source driver for ATI/AMD (called radeon), has experimental support for HDMI/DisplayPort audio, at least for some cards. It is disabled by default, but you can activate it by adding radeon.audio=1 as a kernel boot parameter:

Run

gksu gedit /etc/default/grub

and change the GRUB_CMDLINE_LINUX_DEFAULT line so it includes radeon.audio=1, for example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1"

Run

sudo update-grub.

And reboot.


How to uninstall a flatpak application "Open Drive"

list all flatpak application installed on your system using command:

flatpak list

then grab the app id of opendrive and run command to uninstall

flatpak uninstall <app-id>


Try to install it, odds are it won't break anything regardless.

It should work unless it relies on dependencies that are outdated and no longer available in 14.04.


Can I remap mouse keys for games running using wine?

I think you will want to install imwheel as discussed in ManyButtonsMouseHowto under the Mapping More Buttons section. imwheel should allow you to "define application-specific actions to your additional mouse buttons".

So using imwheel you should be able to remap the button to whatever you want and have it only behave like that in the applications you want, in your case FTL and Witcher.


is the installation hang-up for pc with multiple harddrive and partitions present in 12.10 is fixed in 13.04?

I suffered this problem when shifting from 12.04 to a clean install of 13.04 with twin hard disks and a dual-boot to Windows.  The 'Disk Setup' stage refused to recognise existing partitions or free space.  Partman usually exited with error code 141 but sometimes crashed.  I lost three days days of my life and became intimately acquainted with testdisk.

Eventually I tracked the fault to the existence of dmraid metadata on the two hard drives.  It was not shown up by testdisk but was listed by dmraid.  Using dmraid -rE to erase the unnecessary metadata meant that the ubiquity install routine functioned normally.


Which desktops are completely minimalist?

Some environments spring to mind:

Window Maker (as mentioned in comments)
Enlightenment (aka E17)
You can also access everything from the right click menu in XFCE (Xubuntu). You could go super-minimalist by disabling all the default panels.


At

Enter file in which to save the key (/home/jason/.ssh/id_rsa): /home/jason/.ssh
/home/jason/.ssh already exists.

you are promted to enter a file name. You enter a directory name; /home/jason/.ssh.

Do not enter anything; the default value in the parenthesis is normally fine. If you want to save it to a custom location, this has to either be a file or a non-existing entity.

The error message Saving key "/home/jason/.ssh" failed: Is a directory is pretty clear.


polishing LXDE by fixing the scroll bars

Try this guide: http://ubuntuguide.net/disable-turn-off-overlay-scrollbars-in-ubuntu-12-10

Short version:
 * Open dconf-editor
 * Navigate to key "com -> canonical -> desktop -> interface"
 * change the value of "scrollbar-mode" to "normal"
 * Log out and back in


Detect the angle of the hinge of Hp x360

I checked and there are no interfaces that userspace programs can use to get this information and to my knowledge no platform driver in the kernel will provide you with this data.


How can I fix a Ubuntu upgrade when it was interrupted by a power outage?

It has happened to me before. No fix seems to work 100%, because your repositories are probably mixed between old and new. I sugest you to back up your home and do a Fresh, Clean install.


There is in fact a small delay before the pop up appears. So if you very briefly press Alt+Tab, you immediately will switch.

Alternatively, you may use Alt+Esc for quick window switching. This immediately moves you to the next window (and back). IF you repeatedly pres Esc while switching, you keep moving through the windows.

Eventually, you could map Alt+Esc to Alt+Tab. However, you may find that the Alt+tab pop-up comes in handy when you need to move several windows over.


The Ubuntu installation requires between 3-4 GB hard drive space, and 8-10 GB will be needed to run comfortably. But you may need at least 25-30 GB day to day.

Windows 7 on the other hand needs 16GB of available hard disk space (32-bit) or 20GB (64-bit), but that's just for windows itself.

Keep in mind that Ubuntu once installed, will have an office suite, utilities, and a lot of other applications, where with windows you need to install all these apps, which will require additional hard drive space.  Just to give you n example, Microsoft office pro fully installed requires 3.5-5GB.

Sources:Ubuntu & Microsoft


`dpkg-query` and virtual packages: how to read or interpret `${Provides}`?

python3:any (>= 3.3.2-2~) is not a virtual package, it's a substitution string created by the ${python3:Depends} pattern and filled by dh_python3 when called from dh_gencontrol when the package was built. Take a look at the debian/control file of the apturl source package:

Package: apturl-common
Architecture: any
Depends: ${python3:Depends},
 ${shlibs:Depends},
 ${misc:Depends},
 python3-apt,
 python3-update-manager
Replaces: apturl (<< 0.3.6ubuntu2)
Description: install packages using the apt protocol - common data
 AptUrl is a simple graphical application that takes an URL (which follows the
 apt-protocol) as a command line option, parses it and carries out the
 operations that the URL describes (that is, it asks the user if he wants the
 indicated packages to be installed and if the answer is positive does so for
 him).

Now why python3:any? Let's quote the debian policy:

  Specifying only any indicates that the source package isn't dependent
  on any particular architecture and should compile fine on any one. The
  produced binary package(s) will be specific to whatever the current
  build architecture is.

And this is exactly the case for the python3 binary package:

Package: python3
Architecture: any
Multi-Arch: allowed
Pre-Depends: python3-minimal (= ${binary:Version})
Depends: python3.4 (>= 3.4.3-1), libpython3-stdlib (= ${binary:Version}), ${misc:Depends}, dh-python
Suggests: python3-doc (>= ${binary:Version}), python3-tk (>= 3.4.3-1) , python3-venv (>= ${binary:Version})
Replaces: python3-minimal (<< 3.1.2-2)
Provides: python3-profiler
Description: interactive high-level object-oriented language (default python3 version)
 Python, the high-level, interactive object oriented language,
 includes an extensive class library with lots of goodies for
 network programming, system administration, sounds and graphics.
 .
 This package is a dependency package, which depends on Debian's default
 Python 3 version (currently v3.4).

Sources:

https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Architecture
https://alioth.debian.org/scm/loggerhead/pkg-python/python3-defaults-debian/view/head:/debian/control#L17


How do I re-enable disabled network notifications (never show again) in Unity?

Do:

gsettings get org.gnome.nm-applet disable-disconnected-notifications

if that is true, do a:

gsettings set org.gnome.nm-applet disable-disconnected-notifications false

Next time when you have something like this do a:

gsettings list-recursively | grep --ignore-case WhateverYoureLookingFor | more


Many (many!) bookmarks in Firefox make the desktop lock up on hovering "Bookmarks" in firefox. Fixes?

Optimize places.sqlite database. You can do that with BleachBit, an extension or a sqlite3 script.

If that doesn't help, export your bookmarks to a html file using the Import and Backup menu of the Bookmarks Manager (CTRL+SHIFT+O). Then close Firefox, open your profile folder  under ~/.mozilla/firefox/xxxx.default/ or something like that, then rename the file places.sqlite to places.sqlite.bak. Open Firefox, import your bookmarks from the html file using the Import and Backup menu.


All of the "Easy Transfer" type USB data transfer cables have their own software that is required for use, either embedded in the devices or coming separately on disk.  Examples of these devices include the "Easy Transfer Cable" (Software separate) and a heap of Chinese made devices similar to this one and the Amkette device you have which have the software embedded in the device.

I suspect the embedded software is in the form of an autorun that any Windows machine will start up and run to connect to the computer at the other end, which is also running the same software.  Cables sold with the claim that there is "no need to install any software or drivers" simply mean that this is embedded and needs no difficult user intervention to connect two Windows computers.

Alternate methods ranging from a simple ethernet cat 5 crossover cable, large storage USB hard drives, Bluetooth, and  of course fully networked groups of machines connected via a router are all so readily available that there just doesn't seem to be a lot of interest in this technology however further research (ie Google) yields the following information:

The setup appears to be what is called "USBnet", which connects two computers together as though connected by ethernet.  The only advantage For Ubuntu users that I can see here is if you have a computer with a broken RJ45 ethernet port or card, or if you have a device that doesn't have one but does have a USB port you can use.

Devices that might be compatible:

And this would include devices that use the same chip as those listed.  I have no idea if the device you have is compatible.  This compatibility list is taken directly from linux-usb.org - have a look at this page for more information and instructions.

Further to this, here's some instructions on how this was done on Intrepid Ibis.  To quote from message 2:

#On my primary machine with Intrepid, I configured USB0 using
ifconfig usb0 192.168.1.1

#On the other machine also with Intrepid, I configured usb0 using
ifconfig usb0 192.168.1.2

Then in Network Manager:

  Select edit connections > Auto usb0 and set a manual IP on both computers, using the same IP as default gateway as well.

It then goes on to give the following instructions for transfer:

Transferring files

Ensure that the Firewall is switched off and you can ping each other
If you can ping, setup an ftp server wu-ftp daemon on any one or
both the machines.
Install Filezilla FTP client on both computers
Thats it !! (Really)
start wu-ftp daemon using "sudo wu-ftp" on one machine
use filezilla on the other machine to quickconnect. Use the User ID and password of the host machine you are connecting to.
browse & transfer files

It also gives the warning that the file transfer speed was pretty slow.

Warning to others

Don't be tempted after reading this to plug a normal male-male USB cable into two computers to try it.  Such a cable would attach each TX and RX pin in the computers in the wrong order (so it wouldn't work anyway) and more importantly will tie the +5 and grounds of the power supplies together.  This can potentially short the two power supplies in a way that can damage them or your computer, and cause other problems up to and including having them burst into flames and burn your house down.  (OK, I'm being dramatic here, but it's a really BAD idea to do this)


Dual-boot bootrec /fixboot issues while uninstalling Ubuntu

bootrec /fixboot only fixes files (more precisely bootmgr) on the Windows partition. It should work without /fixboot.

More important is the fixed mbr. But if your Windows boots with the normal Windows boot loader (not grub), everything is fine.


How do I run a script when a Bluetooth device connects?

I didn't like the polling approach, so I did some digging on bluez and DBus. I ended up writing the following script:

#!/usr/bin/python

import dbus
from dbus.mainloop.glib import DBusGMainLoop
import gobject

import subprocess

# ID of the device we care about
DEV_ID = '00_1D_54_AB_DC_72'

dbus_loop = DBusGMainLoop()
bus = dbus.SystemBus(mainloop=dbus_loop)

# Figure out the path to the headset
man = bus.get_object('org.bluez', '/')
iface = dbus.Interface(man, 'org.bluez.Manager')
adapterPath = iface.DefaultAdapter()

headset = bus.get_object('org.bluez', adapterPath + '/dev_' + DEV_ID)
    # ^^^ I'm not sure if that's kosher. But it works.

def cb(iface=None, mbr=None, path=None):

    if ("org.bluez.Headset" == iface and path.find(DEV_ID) > -1):
        print 'iface: %s' % iface
        print 'mbr: %s' % mbr
        print 'path: %s' % path
        print "\n"
        print "matched"

        if mbr == "Connected":
            subprocess.call(["clementine", "--play"])
            print 'conn'

        elif mbr == "Disconnected":
            subprocess.call(["clementine", "--stop"])
            print 'dconn'

headset.connect_to_signal("Connected", cb, interface_keyword='iface', member_keyword='mbr', path_keyword='path')
headset.connect_to_signal("Disconnected", cb, interface_keyword='iface', member_keyword='mbr', path_keyword='path')

loop = gobject.MainLoop()
loop.run()


I have run into that problem as well. The way I solved it was by clearing out my application data and installing a beta version of Chrome. If you're having the same problem I used to have, try going to YouTube and clicking the "Show More" button for a video - it wouldn't render properly.

To clear chrome's application data, first make sure Chrome is not running (open this webpage in Firefox or something else). We're going to be backing up the data just in case something goes awry. Open up a terminal and run this command: mv ~/.config/google-chrome ~/.config/google-chrome.bkup.

Try using Google Chrome and seeing if the problem persists.  Don't worry, your bookmarks and things are safe in that backup or in the cloud if you're using Google Synchronization.

If the problem still persists, we can try installing the Google Chrome Beta. Google Chrome continually has three releases at a time: stable, beta, and development. Stable is designed for the general public, beta is for people who want a sneak peek at new features, and development is for people who want to live on the edge. I'm on the development version right now. The beta may have fixed the problem you are having.

Simply run these commands to remove the stable version and install the beta (make sure Chrome is closed first!)

sudo apt-get remove google-chrome-stable

sudo apt-get install google-chrome-beta


My DNS settings constantly set itself to default

I suggest you set the DNS nameservers in Network Manager. Right-click the NM icon and select 'Edit Connections.' Select your relevant interface, either ethernet or wifi. Select IPv4 settings  and change the mode from Automatic (DHCP) to Automatic (DHCP) addresses only. Fill in your DNS nameservers, save and close.


I've solved this by myself.
The cause of the problem is that /boot was put in the bcache drive since I installed 20.04 with default settings.
Unless initrd.img is loaded, the bcache drive is not recognized and grub cannot find /boot in it.
Now I put /boot outside the bcache drive and grub can find it and boot the system.
The followings are the way I set up bcache.
First, I manually partitioned the hdd with fdisk.
Device       Start       End   Sectors   Size Type
/dev/sda1     2048      4095      2048     1M BIOS boot
/dev/sda2     4096   1054719   1050624   513M EFI System
/dev/sda3  1054720   3151871   2097152     1G Linux filesystem
/dev/sda4  3151872 976773134 973621263 464.3G Linux filesystem

Second, logical volumes were created by:
# pvcreate /dev/sda4
# vgcreate vgubuntu /dev/sda4
# lvcreate -L 12Gi -n swap1 vgubutu
# lvcreate -l 100%FREE -n root vgubuntu

fdisk -l shows the result:
Disk /dev/mapper/vgubuntu-swap1: 12 GiB, 12884901888 bytes, 25165824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/vgubuntu-root: 452.26 GiB, 485608128512 bytes, 948453376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Then a bcache drive was created by:
# apt install bcache-tools
# modprobe bcache
# make-bcache -B /dev/mapper/vgubuntu-root -C /dev/sdc

/dev/sdc is the SSD.
fdisk -l shows:
Disk /dev/bcache0: 452.26 GiB, 485608120320 bytes, 948453360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x91af541f

In order to install the system in /dev/bcache0
a partition was made in it by fdisk /dev/bcache0.
fdisk -l shows:
Device         Boot Start       End   Sectors   Size Id Type
/dev/bcache0p1       2048 948453359 948451312 452.3G 83 Linux

After the preparation mentioned above, I installed the system using the advanced disk setting menu in the installer, where I set the mount points as the following.
/dev/sda1                       biosgrub
/dev/sda2                       EFI system
/dev/sda3                  ext2 /boot
/dev/mapper/vgubuntu-swap1 swap
/dev/bcache0p1             ext4 /

After the installation, I rebuilt initramfs in order for the system to recognize the bcache drive before mounting root file system. I editted a file and added a script in /etc/initramfs-tools/.
/etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
#
bcache

/etc/initramfs-tools/scripts/init-premount/10_bcache
#! /bin/sh
#
# Backing Device
echo /dev/mapper/vgubuntu-root > /sys/fs/bcache/register
# Cashing Device
echo /dev/sdc > sys/fs/bcache/register

Under the above settings # update-initramfs was done.
Without the latter script the system falls into BusyBox and you have to execute the above scripts manually because bcache drive doesn't appear until the scripts are executed.
I learned this operation from https://wiki.archlinux.org/index.php/Bcache.
And /etc/fstab is:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
#
# boot
/dev/sda3                               /boot   ext2    defaults        0   0
#
# swap
UUID=840f9099-58a2-45e5-958b-61becd00eabd none  swap    sw              0   0
#
# bcache root /dev/bcache0p1
UUID=bfff7e4c-c94d-4008-8f6e-0a82f41ccddf /     ext4    errors=remount-ro 0  1
#

# external 500GB SDD
UUID=2757914a-06df-4fbb-9364-2d14bb222766 /mnt/workstation ext4 defaults 0  0

This is all the things I've done for bcache to work in my system. These are much more complicated than using lvm or mdadm. No.1 reason is that the bcache drive is used for the root file system, which has to be recognized before initramfs mounts file systems. In addition, initramfs has to be placed in an ordinary separate drive outside the bcache drive.
So, if you use bcache drives other than root file system, such as /home,it will be much easier.


Ubuntu is quickly running out of RAM, and my computer is starting to freeze. What command will solve this?

In my experience Firefox and Chrome use more RAM than my first 7 computers combined. Probably more than that but I'm getting away from my point. The very first thing you should do is close your browser. A command?

killall -9 firefox google-chrome google-chrome-stable chromium-browser

I've tied the most popular browsers together into one command there but obviously if you're running something else (or know you aren't using one of these) just modify the command. The killall -9 ... is the important bit. People do get iffy about SIGKILL (signal number 9) but browsers are extremely resilient. More than that, terminating slowly via SIGTERM will mean the browser does a load of cleanup rubbish —which requires a burst of additional RAM— and that's something you can't afford in this situation.

If you can't get that into an already-running terminal or an Alt+F2 dialogue, consider switching to a TTY. Control + Alt + F2 will get you to TTY2 which should allow you to login (though it might be slow) and should even let you use something like htop to debug the issue. I don't think I've ever run out of RAM to the point I couldn't get htop up.

The long term solution involves either buying more RAM, renting it via a remote computer, or not doing what you're currently doing. I'll leave the intricate economic arguments up to you but generally speaking, RAM is cheap to buy, but if you only need a burst amount, a VPS server billed per minute, or hour is a fine choice.


I am experiencing the same issue. While I await a fix from ubuntu I have also decided this is an issue I would address with my CSA; for the following reason.

If I understand the issue presented, the issue only arises if a root user on the affected computer is allowed to forward X11 connections. In my environment, the same root users on the affected computers have access to root on any system reachable from that computer, hence, if they were to conduct malicious activity, this potential vulnerability would neither help nor hinder that user.

Secondly, if the problem depends upon the ability to forward X11 connections, then shouldn't disabling this feature with "ForwardX11Trusted no" and "ForwardX11Timeout 0" be a proper configuration fix? This is my current configuration and as I have no X11 installs, seems to fit.


apt-get update -y generates "invoke-rc.d: could not determine current runlevel"

You seem to be inventing a problem that does not exist.
Here are the current versions of openvpn for each release of Ubuntu:
$ rmadison openvpn
 openvpn | 2.2.1-8ubuntu1         | precise          | source, amd64, armel, armhf, i386, powerpc
 openvpn | 2.2.1-8ubuntu1.4       | precise-security | source, amd64, armel, armhf, i386, powerpc
 openvpn | 2.2.1-8ubuntu1.4       | precise-updates  | source, amd64, armel, armhf, i386, powerpc
 openvpn | 2.3.2-7ubuntu3         | trusty           | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 openvpn | 2.3.2-7ubuntu3.2       | trusty-security  | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 openvpn | 2.3.2-7ubuntu3.2       | trusty-updates   | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 openvpn | 2.3.10-1ubuntu2        | xenial           | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 openvpn | 2.3.10-1ubuntu2.1      | xenial-security  | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 openvpn | 2.3.10-1ubuntu2.2      | xenial-updates   | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 openvpn | 2.4.4-2ubuntu1         | bionic           | source, amd64, arm64, armhf, i386, ppc64el, s390x
 openvpn | 2.4.4-2ubuntu1.3       | bionic-updates   | source, amd64, arm64, armhf, i386, ppc64el, s390x
 openvpn | 2.4.4-2ubuntu1.4       | bionic-proposed  | source, amd64, arm64, armhf, i386, ppc64el, s390x
 openvpn | 2.4.7-1ubuntu2         | focal            | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
 openvpn | 2.4.7-1ubuntu2.20.04.1 | focal-proposed   | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
 openvpn | 2.4.9-3ubuntu1         | groovy           | source, amd64, arm64, armhf, ppc64el, riscv64, s390x

Note that older releases don't get newer versions. For newer software, use a newer release of Ubuntu.

Older releases DO get security patches; older releases are safe to use.

Next, let's look upstream at Debian, and see the recent OpenVPN uploads:

[2020-08-16] Accepted openvpn 2.5~beta1-3 (source) into experimental

This means that a Debian volunteer has packaged OpenVPN 2.5, and uploaded it to Debian for testing. These newly-uploaded packages will be in a future release of Ubuntu...
...Probably not 20.10, though. Debian Import Freeze for 20.10 is August 27, 2020. Testing is unlikely to be completed so quickly.


Setup password for ubuntu bootloader to protect my system from clearing root password?

You can do so by adding a password line in Grub.  To do so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo nano /boot/grub/grub.cfg

Add the following password line to the grub configuration file.

default=0
timeout=15
password HhdahyG@SVAGh%

You can use any password of your choice.


How do I install LibreOffice on 10.04 Server?

My fault. With help of colleague, it turns out the command is libreoffice4.1 instead of libreoffice. So I had successfully installed libreoffice.

But to share about how to call libreoffice on Ubuntu server version, there are some additional library to be installed.

# for X11 support
apt-get install xorg
apt-get install openbox

# for libdbus
aptitude install libc6
aptitude install libdbus-glib-1-2

And to convert to pdf, must specify writer_pdf_Export in my case.

libreoffice4.1 --headless --invisible --convert-to pdf:writer_pdf_Export result.odt --outdir /path/to/outdir


How do I make Thunderbird open links in Chromium?

This is what I found working for me:
You will need to access the "config editor" in Thunderbird itself.

Open Thunderbird. In 24.6.0, the menu can be accessed on the right hand side of the top menu bar (next to the search bar and is represented by three horizontal lines).

Click Edit > then click Preferences >,
a new window will open. You will need to select the  Advanced  tab, at the bottom of that tab Open the Config Editor.

Then, search for both network.protocol-handler.warn-external.http and
network.protocol-handler.warn-external.https.

These two are most likely to have a current value of false. Change the value to true (do this by simply right clicking on them) and the next time you try to open a link from some e-mail it'll ask you which browser to use. Chromium isn't likely to be shown in the list of choices, so use the navigate button. You can find Chromium at /usr/bin/chromium-browser.

If using google chrome as your browser of choice you may want to make it /usr/bin/google-chrome  or /usr/bin/google-chrome-stable
If Thunderbird doesn't ask you which browser to use when you click on a link after doing this, you can try deleting mimeTypes.rdf file in your profile folder to reset it. The profile folder is typically found as ~/.thunderbird/xxxxxxxx.default/

Original text by Htbaa


How to find a Window which should be visible on Ubuntu 14.04

It seems to be a unity bug. If you try to restart unity it works correctly.

Hit Alt + F2 and type unity --replace to restart unity.

After this, I think it will be OK....  :)