Trying to move MBR to another disk using linux, or something... end result, dual linux and windows. Complicated, please read

Sounds like you moved your bootloader with that old laptop drive you put back into the laptop.

The one way I can think of to fix this is to CHROOT into your Ubuntu installation with a Live USB/CD. Then fix/install your bootloader.

CHROOT:

You will need to have a bootable CD or USB stick of Ubuntu to boot up your computer to. Select "Try Ubuntu before installing" to boot into the Live environment.

Once booted, start a Terminal window and type:

  sudo blkid | grep ext4

This will list all partitions (and I am hoping you didn't change the default installation suggestions) and the 'grep' filters out all entries without 'ext4' in the line. This should show you the harddrive/partition you need to mount.

Verify that it is the right partition/drive:

  df -Th | grep ext4

Next mount the partition into the Live environment:

  sudo mount /dev/sdXY /mnt

.. where '/dev/sdXY' is the partition you found to be the right one in the blkid command.

Get the chroot environment ready by mounting all the necessary folders:

  for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Once you have mounted the folders, you can chroot into the old desktop drive to fix your boot loader:

  sudo chroot /mnt

Now fix your bootloader by installing and updating it:

  grub-install /dev/sdX

Note that this is '/dev/sdX' and not '/dev/sdXY'. You don't want the bootloader in the partition, you want it on the drive (ie. /dev/sda).

Next, create the Grub menu:

  update-grub

If there are no errors, you should now have install your dual-booting GRUB menu. If everything seems ok, type 'exit' and reboot.


Depends what do you expect from "developer studio". Almost every text editor supports some features such as syntax highliting, try gedit.

Many developers still prefer working in command line with vim editor. It's very powerful, but it has (for today) unusual control mechanisms (3 modes, etc.). See http://www.vim.org/

If you prefer more powerful IDE, there are 2 options included in the Ubuntu packages by default. However, noone of them is installed out of the box. You can get NetBeans and Eclipse by simple:

sudo apt-get install eclipse
sudo apt-get install netbeans

Both of them are based on java so you need java to run them (java is installed by default so you don't need to bother with this). I have very good experience with NetBeans, it supports many programming languages, enterprise features, versioning etc. Check it out on http://netbeans.org. However, usually there is not the latest version in the packages so you can download it from the webpage. It works perfectly for me, except updates, so I need to update manually.

I don't have any experience with eclipse but it's said to be even better than NetBeans. Especially, it supports many SDKs or addons for special development like Android or Windows Azure.

The third option of IDEs I'd offer to you is IntelliJ IDEA. As far as I know, it's not present in packages, but you can download it on the official webpage: http://www.jetbrains.com/idea/. There is many versions of JetBrains IDEs, supporting different languages and providing different options. Some of them are free, some of them are paid.

Of course, there is a LOT of more options. Depends what language are you willing to use, what services you need to connect to etc.


How can I get the current network traffic broken down by subnet

Assuming you could obtain current network traffic, broken down by subnet, and put that process into a shell script, you could then install indicator-sysmonitor and add your script to the indicator.

I also happened upon bandwidthd which may help.


Why is my BASH script [script] producing a '[script]: command not found' error?

So I figured it out. I had preemptively created an alias alias torb=torbrowse in my ~/.bash_aliases file. This was getting in the way of BASH seeing the symbolic link. Commenting out the alias fixed the issue!

$ torb

The above command now properly launches tor-browser

I guess something I can glean from this, that I didn't know before, is that aliases can produce this behavior in bash and can prevent scripts from being properly loaded into the environment.

Thanks for input everyone :)


Can I install PulseEffects (v3.0.6 or newer) to Ubuntu 16.04.3? If yes, how?

Try using these instructions.

I haven't tried it myself.

These are the suggested commands:

wget https://launchpad.net/~yunnxx/+archive/ubuntu/gnome3/+files/pulseeffects_1.313entornosgnulinuxenial-1ubuntu1_amd64.deb
sudo dpkg -i pulseeffects_1.313entornosgnulinuxenial-1ubuntu1_amd64.deb

When you run the second command, you may see some dependency errors, which should be resolved by running

sudo apt install -f

After installation, you can run the program from the terminal using

pulseeffects


ip_forward=1 in Ubuntu 20.04 after reboot fails

When the netplan is generating the configuration, it will write a file for each interface to /run/systemd/network/ in a format: 10-netplan-{interface}.network. After that the systemd-networkd will apply the configuration.
systemd-networkd will find configuration files in /run/... and your config files in /etc/... and it will precess them in lexical order.
From www.freedesktop.org/.../systemd.network.html:

All configuration files are collectively sorted and processed in lexical order, regardless of the directories in which they live. However, files with identical filenames replace each other.

[Match] Section Options
The network file contains a [Match] section, which determines if a given network file may be applied to a given device; and a [Network] section specifying how the device should be configured. The first (in lexical order) of the network files that matches a given device is applied, all later files are ignored**, even if they match as well.

So now you can see that the IPForward option will never be applied.
Now you need to focus your troubleshooting on sysctl.conf
From www.freedesktop.org/.../sysctl.d.html:

Configuration Directories and Precedence
Configuration files are read from directories in /etc/, /run/, /usr/local/lib/, and /usr/lib/, in order of precedence, as listed in the SYNOPSIS section above. Files must have the ".conf" extension. Files in /etc/ override files with the same name in /run/, /usr/local/lib/, and /usr/lib/. Files in /run/ override files with the same name under /usr/.
All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Thus, the configuration in a certain file may either be replaced completely (by placing a file with the same name in a directory with higher priority), or individual settings might be changed (by specifying additional settings in a file with a different name that is ordered later).

EDIT:
It is possible that there are application which will override the sysctl.conf
For example ufw firewall configuration in /etc/ufw/sysctl.conf might have line such as net/ipv4/ip_forward=0 which would take precedence over /etc/sysctl.conf. It is not default configuration though, and it would have to be configured manually.


Samsung M2070 losing connection to Ubuntu (20.04)

I have done the exact installment procedure but this time, when adding printer after installing its drivers through install.sh, I specified the HP destination to the IP address of the printer (HP 192.128.0.18) and it seems to be working fine, not losing connection.


Brightness controls are not working in sony vaio with amd radeon hd 7650

I found the solution:

Download the amd radeon driver from here
Run terminal and tupesudo apt-get install linux-headers-3.5.0-17-generic
Go to directory where you have downloaded the zip file of driver which might be /home/your_username/Downloads. Extract the zip file there. You will see a .run file.
Run command: sudo sh amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run

It will open the installer window. Now install the driver. After finishing it will ask you to reboot but don't.
Open a new terminal and type: sudo amdconfig --initial
Now reboot your system. Your brightness control will work fine.


Safe to install this Xerox printer driver on Ubuntu 13.04?

i'm not sure where I found them on Xerox's site but I usually just download the .ppd file instead of the .deb package.  During the install of the printer when it asks for a driver or ppd file, i point it to that.

It looks like the main complaint about the deb is that the files should be owned by root instead of whoever it leaves it as.  That might be an easy post-install fix.

http://www.thegeekstuff.com/2010/04/view-and-extract-packages/ will tell you how to get the files out of a deb so you can examine them more closely in a safe directory.

The other errors:
E: XeroxPrtDrv: bad-package-name
E: XeroxPrtDrv: package-not-lowercase
E: XeroxPrtDrv: maintainer-address-missing Xerox

don't sound at all like a real problem.

The only one that does sound like a problem is:
E: XeroxPrtDrv: malformed-deb-archive found 4 members instead of 3
According to http://lintian.debian.org/tags/malformed-deb-archive.html
that is a serious problem.  I suspect the deb won't even work.  You probably need to contact Xerox and let them know they have a malformed-deb-archive problem with those packages.


How do I force detection of an unrecognized keyboard while booted in the Live CD?

I hate answers like this, but unfortunately you've stumbled upon a known, and reported bug.

Your built-in keyboard will not work on Ubuntu 11.04, but if you plug-in an external one it will.

My only consolation is to say keep an eye on this:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/677633

Hopefully, now the bug is confirmed, people will start doing their best to fix it for 11.11.

Here's to hoping!


Ubuntu Software Center - Error - "cannot perform the following tasks"

Make sure that the list of available software is up-to-date before trying to install GTK Common Themes. In all currently supported versions of Ubuntu, open the terminal and type:

sudo apt update
sudo snap install gtk-common-themes


Where Can I Find a Novell NetWare Client for Ubuntu?

It is possible to access NetStorage through WebDav in Ubuntu. You need to install the fusedav package and run something along the lines of:

fusedav -D -u username -p password_here http://server.com/oneNet/NetStorage /home/greg/netstorage

This isn't quite perfect, it occasionally goes a little buggy on me, but works for the most part. You might be interested to know I started a bug about not being able to connect in Nautilus to NetStorage.

You may also be interested to know about ncpfs (see below & Google it), though I haven't used it myself.

  ncpfs allows you to mount volumes of NetWare servers under Linux and to print to NetWare print queues and spool NetWare print queues to the Linux printing system.


Cloud storage that works with rsnapshot?

You run rsnapshot on the remote server, it rotates the snapshots using hard links and rsyncs your files from your local machine over ssh.

rsync only sends over the changes so your bandwidth use is minimised, rsnapshot on the server manages the hardlinks to minimise disk space.

What the best cloud solution is depends upon how much disk space you need and other things


Ubuntu connects to wired connection, has DNS, works on local network, no Internet

You likely don't have a default gateway set. Type route -n and if you have a default gateway set, you should see an entry similar to:

0.0.0.0         128.100.13.254  0.0.0.0         UG    0      0        0 eth1

In the above example, 128.100.13.254 is my default gateway, which is accessible via my eth1 interface.

If you don't have a default gateway set, and you know what its IP is, you can add it by issuing the command:

sudo route add default gw YOUR_GW_IP_HERE


first you need to have a Ubuntu 14.04 LTS(latest version) 32bit iso file and next create a live usb using unetbootin

in this link how to create ubuntu live usb with unetbootin
http://www.pendrivelinux.com/using-unetbootin-to-create-a-live-usb-linux/

boot from the pendrive and select "try ubutnu without install"

u will go to a screen like this

there install ubutnu 14.04

continue with your installation untill u see this like in below image

this is very important select "Something else" by selecting this u can select the partition where ubuntu gets installed, after that u will go to

here select your windows 8 partition

identify it with its size, still cant find it then minimize the 'installation window' and press windwos it opens dash type "disks" open disks and see ur windows 8 number under "device number"

then select that partition at the 'installation window' and select 'change' & 'partition type as ext4' & 'mount point as \' & select format

select your hard disk /dev/sda at the "Device for boot loader installation" & install now

it seems too lengthy but quite easy

i hope this helps


System Preferences Closes When I Click On Apparence

They both are managed by the gnome-control-center binary. Hence, whenever you open one or the other it uses the same window in a way to not waste resources. Until now, I haven't found a way to force more than one window open.


Will the Compiz version's dash be the same as the current dash?

In 11.04, you'll be able to remove the home screen shortcuts, and of course add them back.


What is the difference between the default user group and root group?

The difference is who has access to the file.

As you're aware, there are three unique permission bits: the user (u), the group (g), and others (o). Each one of these can be treated differently depending on the set bits.

For example, if a file is set to permissions 770 (rwxrwx---), it means both the owning user and owning group can read, write, and execute the file. If we disable the write bit for the group (resulting in rwxr-x---), it means the owning group can read and execute the file, but not edit it.

So, why is this important? Say you're on a server with a bunch of other people making a website. All of these users are in a group we're going to call developers. We need all of the developers to be able to write to the file, so we give the group read and write permissions. This way, every developer can access the files they need.

Now, let's say there's a folder in our fictional work environment that developers should be able to see, but not change. In that folder, we remove the write permission from the group. This allows devs to see it (and optionally run it), but not change it.

However, as the root user, things are different. Root can already do whatever they want, so it doesn't really matter. It's important to note, though, that when root:root owns a file and write permissions are off for other users, nobody else can edit that file. This is very often used for system configurations that only admin users can touch.

Now, what this means for your two questions:

When you're the owning user and root is the owning group - you control the file entirely, and can set (useless) permissions for root. Similarly, members of the group root (normally just root) can use the file according to the set permissions.
When you're both the owning user and group - you control the file even more entirely. Only your user and your personal group are "owners" and everyone else goes through the "others" permission set.

Functionally on most modern systems, though, there is no difference between modes 1 and 2.


You need to create aliases of you network interface.

You have two options for doing this.

one is to create temporary aliases using ifconfig command. The aliases setup this way will be lost upon a reboot and you will need to recreate those aliases;
if you need a more permanent solution, you can edit /etc/network/interfaces file and add alias' definitions there.

For more details on these two methods please visit Ubuntu Linux: Creating ethernet alias for eth0 network device.

If you only needed 2 instances of your program, I would recommende using a virtual machine, but for running five instances you will need 4 virtual machines which is not practical as it will almost halt your machine.


Simple: type in terminal

For copy

cp /PATH1/file [file2 file3 ...] /PATH2/[newfilename or noting to use the same name]

and for more info about cp use man cp

For cut(move and rename)

mv /PATH1/file /PATH2/[newfilename or noting to use the same name]

and for more info about mv use man mv


You do trust us with your data already.

What they mean with this is that it would be very very very to do something you do not want them to.

All they need to do is have the update software ask for your sudo password and Canonical can do anything with your system: delete system files, copy your documents over to a cloud server, delete your bookmarks etc etc.

Obviously they are not going to do that since it would also end Ubuntu as an OS (imagine the slack they will get from Richard Stallman :D ).

The EFF does have a point though. The way it is setup is not about our privacy but about making a profit for Canonical and/or Aamazon. The way it is set up now is "anyone who does not want this can remove it" (opt-out). But privacy would be better guarded if it would be "if you want it you can turn it on with this action" (opt-in).


gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true
....Shows the mounts on the dock. (I don't believe gnome displays it via desktop)
Additionally, make sure your usb is actually mounted when you plug it in.... gnome-disks can easily show that.
....gnome-disks can also can easily edit the "Edit mount options"(which is essentially /etc/fstab) that affect the mounts displaying - ",x-gvfs-show" or even easier just checking the "show in user interface" box.


Disk Usage Analyzer stealing mimetype assocation inode/directory from Nautilus

To me it seems the appropriate way is to define Nautilus as the default application to handle the mimetype inode/directory. This can be done via console with

xdg-mime default nautilus.desktop inode/directory

What it does is adding the following line to .local/share/applications/mimeapps.list

inode/directory=nautilus.desktop

About accepted answer: I don't know what adding a colon and a number to the mimetype in the baobab desktop file does, but if it's just disabling the unwanted behaviour this won't be sufficient. I can imagine another application hijacking/overriding the mimetype assocation again.

Another point is that you have all your defaults defined in one place.


How do I resolve an error when attempting the "opam init" command?

It seems like you are trying to execute a program that might not be a valid Linux binary; a quick search for this error online will return many sites explaining how to solve it, like these:

bash: ./program: cannot execute binary file: Exec format error
https://superuser.com/questions/800019/unable-to-execute-binary-file-exec-format-error
https://appuals.com/fix-cannot-execute-binary-file-exec-format-error-ubuntu/

Check if the program you're trying to execute is compatible with your Linux kernel version, like these sites I linked suggest.
However, before actually doing this, I'd try changing that path to /usr/local/bin/opam, it also looks like you might have a typo in there  (usually in Linux that folder is called usr, not use).


does updating the system help ie. sudo apt-get update && sudo apt-get upgrade

it looks like the version mysql-server-core-5.5 it needs 5.5.46-0ubuntu0.12.04.2 is not the one it thinks is available 5.5.54-0ubuntu0.12.04.1

a system update may help satisfy the dependencies.
cheers,


Open Software and Updates and go to the "Other Software" tab.  You will see your ppas all unchecked and labeled as "disabled on upgrade to xenial".

Just check the boxes and hit close. It will want to reload the information - let it - and then you can reinstall your software.

If you want to get rid of the line saying "disabled" you can highlight the ppa and hit edit.  Make the change in the comment box.

This will work unless the ppas do not exist for 16.04


Nautilus unable to enable tree view in Ubuntu 14.04

Simple as checking a box. And then you can use <- and -> arrow key to open and close folders.


That's installing in your ~/.local/bin directory, which probably isn't part of your PATH. One thing you could do is copy it to a directory that is in your PATH, such as /usr/local/bin. Another way would be to add .local/bin to your PATH:

$ export PATH=$PATH:~/.local/bin

You would need to put this in your .bashrc for it to execute every time you open your terminal.


A lot of system settings are missing after installing Pantheon

This is likely caused by the setting of XDG_CURRENT_DESKTOP.

What does echo $XDG_CURRENT_DESKTOP say in a terminal?

The .desktop files used for gnome-control-center components contain a line like OnlyShowIn=GNOME;Unity; and are therefore not displayed with another XDG_CURRENT_DESKTOP setting.

Try XDG_CURRENT_DESKTOP=GNOME gnome-control-center from a terminal.

I am not sure, where and if it makes sense to override this variable, but I have just done so in my custom startup script for AwesomeWM.


This is a utility of the Gnome Shell developpers. It's homepage is reported by apt show to be https://wiki.gnome.org/Projects/GnomeShell. It is a package of the Universe repository, and is not preinstalled. It can be explicitly installed through the package gnome-shell-extension-prefs, but it may also be installed along with the official Gnome Shell extensions, gnome-shell-extension, for which it is a recommended package. In Ubuntu, apt is configured to install recommended packages by default.


Kubuntu 15.04 - Mouse fails to drag-and-drop or select properly

I've had that problem with Kubuntu ever since 14.04 or so, I had the issue where I wanted to triple click to highlight a line and would have to instead double click and hold on the third click for the line to highlight.

I had a little success in adjusting the speed at which double-click is registered in the mouse/touchpad settings, I slowed mine down a little bit and it did help to a point.

I would research the mouse sensitivity config and see if there may be a solution there. Maybe pointer threshold?


Every time I try to go to certain websites, Firefox gives me the server not found

This is a new "feature" in Firefox that uses Cloudflare DNS servers. See this web page for more details. Also assure that your Proxy settings are correct.

Go to Firefox preferences, choose General, Network Settings, Settings, and disable "DNS over HTTPS". Retry your various web sites.


Keeping the same /home partition after a clean install

It is  safe for the most part as long as you don't click the format check box. I've installed Ubuntu myself in this way for three releases now, and have not lost any data. However most would encourage you to backup before attempting this.

When the partitioning window shows up while installing Ubuntu click the format box on the /

But do not format  /home


How to convert multiple files with Winff?

I'm not familiar with WinFF, but, in general,

for i in *.mpg ; do
    j=${i%%.mpg}
    j="${j}.mp4"
    WinFF $i $j
done

should do the trick.

Be sure to run this the first time with 'echo WinFF' in place of 'WinFF' to see what commands will be generated.


Photoshop installation issaue-Unable to preserve original file

You can install this using playonlinux. To install playonlinux:

sudo apt-get install playonlinux

Then, run playonlinux:

playonlinux &

click on install, wait for it to update, and then click on graphics.

Adobe photoshop cs6 should be one of the first ones listed. Click on it and then click install.


How to check version of ubuntu bootable USB

If its from unetbootin, then the lines at the end of ubnfilel.txt tells which version it installs.


To use port numbers below 1000, you need root privileges. To bind on a number lower than 1000, run it with sudo.


Simplest way to set up new user with SSH access on remote host, given root access

Part of your problem lies in the creation of .ssh. What I'd do use use ssh-keygen, which will create it if doesn't exist and set permissions properly (and, of course, create a key pair for the user).

$ scp -i digitalocean id_rsa.pub storage-1:/tmp
$ ssh digitalocean storage-1 '
adduser --gecos "" --disabled-password  ceph
echo | sudo -u ceph ssh-keygen  -N "" -f ~ceph/.ssh/id_rsa
sudo -u cp /tmp/id_rsa.pub ~ceph/.ssh/authorized_keys
'

Notes:

use adduser instead of useradd - it creates a skeleton home directory, from /etc/skel.
--gecos "" and --disabled-password are used to avoid prompting. If you don't mind prompts for name and password, you skip these options.
ssh-keygen can create .ssh with the right permissions
Again, -N "" and -f ~ceph/.ssh/id_rsa are used to avoid prompts. You can skip these if you don't mind prompts for the key location (for which the default is fine) and if you wish to set a passphrase.
Neither .ssh nor .ssh/authorized_keys need to have 700 as the mode. As long as only the owner can write to them, it's fine (755 for .ssh and 644 for .ssh/authorized_keys is just fine).


Manually updating software installed with apt-get

You can remove with apt-get, then find deb package for version you are looking for and install using dkpg -i <package-file>.deb

If you get dependency errors, case gets more complicated. We will need more info to help.


Samsung NP305U1A laptop won't resume from suspension

You didn't specify which graphics card drivers are you using. With your graphics card it can be either the open source ones, embedded into the kernel, or the proprietay ones that come with the Catalyst management software.

If you are using the proprietary ones, I suggest you try and uninstall them; then you can test wether it was their fault or not.

If you didn't install the Catalyst suite, you can download it here to make the reverse test.

Tell us how it went. :-)


In my case these simple steps worked for me fine:

Press Ctrl+Alt+T to go to a terminal and type:

sudo gedit /etc/default/grub

This will open the grub config file. Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force apm=power_off"

Then save & close it.
Type in the same terminal:

sudo gedit /etc/modules

This will open the modules config, just add the following:

apm power_off=1

and save the file.
Next type in the terminal:

sudo update-grub

Source


I got it! :)

I had to run pvresize command.  As soon as I ran

pvresize /dev/sda3
Physical volume "/dev/sda3" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
root@xxxxx:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               ubuntu-vg
  PV Size               <199.00 GiB / not usable 16.50 KiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              50943
  Free PE               40960
  Allocated PE          9983
  PV UUID               rmuSVO-uUCF-iKiA-0v8Q-IScl-zvHd-jfAzMn

root@xxxxx:~# lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
  Size of logical volume ubuntu-vg/ubuntu-lv changed from <39.00 GiB (9983 extents) to <199.00 GiB (50943 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.

All was looking good but df -h still showed:

Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              798M  1.1M  797M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   39G  4.0G   33G  11% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0                          90M   90M     0 100% /snap/core/8268
/dev/loop1                          92M   92M     0 100% /snap/core/8592
/dev/sda2                          976M  145M  765M  16% /boot
tmpfs                              798M     0  798M   0% /run/user/1000

So I then ran

root@xxxxxx:~# resize2fs /dev/ubuntu-vg/ubuntu-lv
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required
old_desc_blocks = 5, new_desc_blocks = 25
The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 52165632 (4k) blocks long.

and finally!

root@xxxxx:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              798M  1.1M  797M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G  4.0G  184G   3% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0                          90M   90M     0 100% /snap/core/8268
/dev/loop1                          92M   92M     0 100% /snap/core/8592
/dev/sda2                          976M  145M  765M  16% /boot
tmpfs                              798M     0  798M   0% /run/user/1000

Hopefully this helps someone else.


Skype freeze when trying to realize a call

This should make a permanent change for the workaround:

sudo sed -i 's/^Exec=.*/Exec=env PULSE_LATENCY_MSEC=30 skype %U/' /usr/share/applications/skype.desktop

Thanks go here

If you are using KDE:

Another non-terminal way is to to right-click on start button and select "Edit applications...":

NOTE: If you are using KDE session restoring (System Settings -> Startup and Shutdown -> Session Management -> On login: Restore previous session) then after system restart (or login) Skype will not catch PULSE_LATENCY_MSEC environment variable until you restart it via its .desktop file.


Wireless not working/ Wireless enabling dysfunction

Get rid off from the Network manager on Ubuntu. Before doing it, first, install Wicd Network manager by sudo apt-get install wicd, then remove the connection manager sudo apt-get remove --purge network-manager-gnome network-manager. check if you have any settings on /etc/network/interfaces just keep

   auto lo
iface lo inet loopback

then Wicd should give you what you want


Use this:

NAME_REGEX="^[A-Z][[:alpha:]]{4,8}$"

This will match [A-Z] at the start of the name and them the name can contain any alphabetic characters i.e. [A-Za-z] and the total characters would be between 5 to 9.

On the other hand if you want only lowercase letters after the first uppercase:

NAME_REGEX="^[A-Z][a-z]{4,8}$"

Furthermore if you want any number or any upper/lowercase (using character classes):

NAME_REGEX="^[A-Z]([[:alpha:]]|[[:digit:]]){4,8}$"

Using ranges:

NAME_REGEX="^[A-Z]([A-Za-z]|[0-9]){4,8}$"


20.04 Sony WH-1000XM4 does not output to headset

Found a solution here
Ubuntu 20.04 no sound out of Bluetooth headphones
mv ~/.config/pulse/ ~/.config/pulse.old
systemctl --user restart pulseaudio

Worked!


Should i enable zram and/or lower swappiness value?

I think you should enable zram, but not in 12.04 as I still didn't test it. I'm testing zram with K/ubuntu 14.04 in a hp compaq 6710b with 1.5gb of ram and I have noticed a big improvement in the overall office work performance.
Before the swap to disk started to happen with few apps open, and it push down the performance. Now I open lot of apps with big memory in use and the computer work very well with zram activated.

In 14.04 LTS you just need to do it:
sudo apt-get install zram-config
and reboot after install

That's it.
Important notice: it's recommended only for desktop/tablet/laptop/phone. Not for server, as there is completely different scenario.


I had to make sure that files in the share had nobody.nogroup

sudo chown nobody.nogroup  file.docx


Can grub move boot folders back to root?

Depending on how exactly you "moved everything", you may try to boot from the installation media, and then in the live session mount the root filesystem on /mnt and move everything back where it was. Try and see if it works.

(The important thing is whether you moved the files and directories preserving ownership and permissions or not. If the move did not preserve ownership and permissions then I don't see how you can recover.)


How to Unlock Maxtor Blackarmor Portable hard drive disk

plug the hard drive in a usb port.  then click on open to view files.  a window will open and you will see the word  launcher click on the icon and that will take you to the unlock screen where you will type in your password. then click on unlock at the lower corner of the screen


Migrating a Wubi install and Drivers, and data when the Wubi install is messed up

First let's fix what happened on the other question.

You shouldn't just apt-get remove video drivers.  You should use jockey-gtk to switch between open drivers and closed drivers.
Press CTL+ALT+F1 to get to a terminal.  Log in.

Update
sudo apt-get update
Get the latest packages
sudo apt-get upgrade
Make sure the driver switcher is installed
sudo apt-get install jockey-common
Update the driver database
sudo jockey-text -u
Get a list of all drivers available
sudo jockey-text -m any -l
Install one, just wait.  It takes a bit and there's no feedback on progress.
sudo jockey-text -e xorg:nvidia-current
Make sure changes are written to disk
sync
Check to see that it's installed but not active yet
sudo jockey-text -m any -l
Restart
sudo init 6

You should now get to a GUI on boot.  You can use the additional drivers tool(jockey-gtk) to disable the binary driver if you want and it will enable the noveau driver for you.  Or you can just leave it if you don't want to mess with it once it's working.

Then the migration process should be straightforward.  It's documented here.
And yes, if you migrate it will carry almost all of your settings and almost all of your files.


How to perform a distribution upgrade using apt-fast?

I tried it out, and it does work.

Ado-release-upgrade would update your software sources to point to the newer version of ubuntu. After it runs an update, and asks you to press enter to start the process of upgrade, just open a new terminal, and start the upgrade yourself.

You'd need to delete the lock file for apt first.

sudo rm /var/lib/apt/lists/lock
apt-fast dist-upgrade

Remember that this has to be entered on a new terminal, because, if you cancel the upgrade at that step, the upgrade rolls back the changes to the repositories.

After apt-fast finishes, you can shift to the original terminal and continue the upgrade


I had the same trouble. You'll need to change the bios settings. First of all, disable secure and fast boot options (enable crm). Change the SATA config to IDE and (for any reason.. do not ask me why) I had to set the windows mode to windows 7 in bios.
Once you did the changes the installer can get finished (I used a live usb stick created in ubuntu).
After that I still needed to boot windows, adding an entry for Grub2 using EasyBSD. Now you can reboot and use Grub to choose the Ubuntu/Linux Distibutions.


The solution provided in this answer is yet effective for your needs even in Ubuntu 12.04.

Placed here for your convenience.

  You can change your default folder for www content by editing the
  information provided inside the /etc/apache2/sites-available/default
  file. By dropping sudo gedit /etc/apache2/sites-available/default
  and changing any occurrence of the /var/www or (maybe your case)
  /var/www/html and setting the folder that you wish to use.

  The contents of the file will look like this:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost

  DocumentRoot /home/geppettvs/www
  <Directory />
      Options FollowSymLinks
      AllowOverride None
  </Directory>
  <Directory /home/geppettvs/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
  </Directory>

  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

  In this case I am using my /home/geppettvs/www folder in order to
  place the files that will be exposed to the public via http
  connections (port 80).

Give this a try. I hope this help you.

However, I suggest you to run a search before opening a new question. Your question may be closed as du

Good luck!


Installing Linux on Wyse Cx0: minimal system needed

Just change the internal flash memory. You can change it up to 8GB than get ddr2 RAM from a laptop and replace it to have a 1GHz 2GB ram and 8 GB internal storage. Then you can run up to Win 8 32-bit if you like. I dual boot mine with Ubuntu 18.04 and Win 7 black edition.


Fonts too small for high resolution screen for Xubuntu?

I had the same issue with fonts in GTK-based applications (Thuderbird, Chromium etc).

I changed .gtkrc-2.0 file:

...
gtk-font-name="Oxygen-Sans Sans-Book 13"
...

There was 10 size previously.


unable to install Ubuntu 15.10. installer freezes

Could be as simple as a corrupted iso.

Compare the checksum of the .iso image that you downloaded to the published values at https://help.ubuntu.com/community/UbuntuHashes.

WinMD5Free is a freeware Windows tool I've used for this.

I've run into this while using Chrome to download the iso files on Windows. I've since used both Edge and Firefox to download isos with checksums that match.


Not able to install python-dev because of dependencies on Ubuntu 16.04

Seems you don't have an important repository in your sources.list enabled.

Add this line:

deb http://archive.ubuntu.com/ubuntu/ xenial-updates main universe multiverse

to /etc/apt/sources.list, then use sudo apt update.

it should do the trick.


How to prevent graphical applications from being started with sudo

The problem is not using graphical applications per se, but rather the fact that many graphical applications create (or change the ownership of) dotfiles in the invoking user's home directory, and that sometimes prevents the application from starting again when run as user.

A possible solution might be to always run sudo with the -H flag:

-H, --set-home
            Request that the security policy set the HOME environment
            variable to the home directory specified by the target user's
            password database entry.  Depending on the policy, this may
            be the default behavior.

If policy allows it (which it does, in current Ubuntu installations, AFAIK) then this will cause applications to write any such data to root's home directory /root instead of the sudoer's home directory.

A way to achieve that would be using an alias i.e. add alias sudo='sudo -H' to your interactive shell's startup file (e.g. ~/.bashrc).

I can't think of a situation in which -H would be undesirable in a sudo command, but if there is one then you can invoke the unaliased command as \sudo somecommand.

For a more detailed discussion, including options to preserve $HOME globally via the sudoers file, see How is sudo set to not change $HOME in Ubuntu and how to disable this behavior?


Screenshot (CTRL + SHIFT + PrtScn) not in clipboard

For me, this problem occurred when I was not starting gnome-settings-daemon. I am using the Awesome window manager and my setup scripts did not start gnome-settings-daemon. For me, just running gnome-settings-daemon & in a terminal fixed it. The better solution was to make my Awesome WM startup scripts start it, which makes it automatic.

If you are using the standard Gnome setup (i.e., not using a separate window manager), then this solution probably doesn't apply to you.


You can try to unload the EHCI controller (USB 2.0) before shutdown.
  1.Check your ID (Bus/Device/Function), use these commands in Terminal:

$ cd /sys/bus/pci/drivers/ehci_hcd/
$ ls -1

  For example, my outputs are:

0000:00:02.1
bind
module
new_id
remove_id
uevent
unbind

  The first one is my ID. Check your ID
  2.Now you need to create the script, use this command in Terminal
  (rc0.d is used when you shutdown your computer)

$ gksu gedit /etc/rc0.d/K99mycustomscript

  3.This will open gedit, now paste this line:

echo -n "YOUR_ID" > /sys/bus/pci/drivers/ehci_hcd/unbind

  For example, in my case is:

echo -n "0000:00:02.1" > /sys/bus/pci/drivers/ehci_hcd/unbind

  4.Save and close gedit
  5.You need to make your script executable

$ sudo chmod +x /etc/rc0.d/K99mycustomscript

  6.Now if you want to run your script on reboot (rc6.d):

$ sudo cp /etc/rc0.d/K99mycustomscript /etc/rc6.d/K99mycustomscript

  Luck!
  Check my references


In a terminal,

sudo update-alternatives --config x-window-manager

will probably do the trick. Alternatively you can

sudo apt-get purge xmonad

and that should do the trick also.


How can I run update-grub if I can't boot into linux?

Boot from the live CD. Open the terminal

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

-Press Enter
- Then type:

sudo apt-get install -y boot-repair && boot-repair

The open boot repair. Perform recommended repairs. If that does not fix it then paste the link here for the boot summary.


I'm not familiar with Django, but I'm seeing the next:

The default Cron's shell is /bin/sh.
The command source is synopsis to . within bash, but not in sh.
So sh -c 'source ...' will return an error, but && means if the previous command return true do the next one, apparently your command fails on this first part. You've redirected only the output of the last command to the log file, so probably it remains blank.
In addition I do not think you can successfully source .bashrc within sh.
Within crontab, the default vale of the envvar $PATH is /usr/bin:/bin. For all commands/scripts, that are located outside of these directories, you should apply the full path; you can export a new value of $PATH, before the job; or even you can use $(which my_command) instead of just my_command.

According to the above, I suppose, your crontab entry must be something like:

*/5 * * * * bash -c 'source /home/user/.bashrc && source /home/user/django-apps/venv/bin/activate && python /home/user/django-apps/project/manage.py runcrons' > /home/user/cronjob.log 2>&1

The last part 2>&1 will redirect also the errors to the log file.

The other way, that I would prefer, is to create a simple script that will execute all these commands:

#!/bin/bash
source /home/user/.bashrc
source /home/user/django-apps/venv/bin/activate
python /home/user/django-apps/project/manage.py runcrons

The script should be executable:

chmod +x /path/to/script.sh

And the crontab will be more simple:

*/5 * * * * /path/to/script.sh > /home/user/cronjob.log 2>&1

If the Cron job is triggered by the crontab of a specific user, and if you want to make the script more portable you can replace /home/user with the environment variable $HOME (keep in mind you need to use double quotes, when you work with variables in the shell).


If indeed you find you don't have python 2.7 its in the repositories

sudo apt-get install python2.7

You may find, however, that instead of calling python to compile, having multiple versions will need you to specifically call python2.7.

You can overwrite this behavior by redirecting the 'python' link in your /usr/bin/ directory to the python2.7 executable. (This may cause problems if you're keeping legacy programs that are expecting 2.6 and are badly coded, however I very much doubt it.)


Run 12.04 from USB with no hard disk usage

We have an excellent guide & video on installing ubuntu to an external hard drive or usb device.
I have copied & pasted the main details below, but it may be clearer & and easier using the link & video as follows.
Have a look at this link to my personal website for more details & a video.

**

How To Install Ubuntu To A Usb Drive

We recommend using a live CD/DVD and unplugging any other USB drives as this makes life easier.
We will assume that you are using an unpartitioned Usb drive and CD/DVD for this guide.

Insert the Ubuntu live CD/DVD, switch on the computer, and tell it to boot from CD/DVD using your 'Bios'.

It will take a couple of minutes to load and you will be presented with two choices.
'Try Ubuntu' or 'Install Ubuntu', you should select 'Install Ubuntu'

You will then be presented with a number of options.

You need to select the bottom option 'Something Else'

This will bring you to the partitioning menu.

Your Primary hard drive will be listed as 'Sda' followed by any partitions that are on it like Sda1 or Sda2.

Below this will be your usb drive, it will be listed as 'Sdb'.

Click on 'Sdb1' which is the only partition on the drive and select 'change'.

You need to select 'use this partition as Ext4 File System'

(some distributions such as Mint reqiure you to manually select 'format' at this point)

Then you need to set the 'mount point' as '/' which is the root file system and click ok.
You will be taken back to the previous menu and that partition will have a tick next to it.

Now click on 'Sdb' just above that partition, this selects it as the device to install to.

Now just below is an option for where the bootloader is to be installed.

It is VERY IMPORTANT that you CHANGE THIS OPTION.

THE BOOTLOADER MUST BE INSTALLED TO YOUR DEVICE listed as '/dev/Sdb'

If you do not do this the bootloader will be installed to your internal drive.

You are now ready to install to your external device, simply click 'Install'

You will need to answer a few simple questions like 'name' and 'create password', then you can sit back and relax.

Additional Information

You will need to tell your bios to boot from the Usb device each time you want to use it.

You can easily set USB as your first boot device in the bios, and your normal system will load if the device is not connected.

Do not be surprised if your Usb installation takes 3 or 4 minutes to fully boot, especially when using a cheap Usb memory stick.

If you choose to install from a usb drive instead of CD/DVD, or you have multiple hard drives and Usb drives connected you need to make sure you are installing to the correct device, as it may not be sdb.

The easiest way to ensure that you are installing to the correct device is to use disk utility.

Open disk utility before connecting the device and note the devices on the left.

Then connect your device and it should appear at the bottom of the list.

Click on that device and look at the top right of the window for 'Device'.

It will say something like 'Device :    dev/sdc' and so 'sdc' would be the device you need to install to.**


These lines are wrong:

Exec=~/D3GO/D3GO
Path=~/D3GO/
Icon=~/D3GO/D3GO.png

You must to use the full path names.


Missing File - Unable to install alongside windows 8 or on own on Samsung Series 9 Ultrabook

You are trying to use Wubi on Windows 8.

Wubi does not support Windows 8.  The lack of support for Windows 8 with Wubi is one of the reasons Wubi support was dropped from 12.10, 13.04, and onwards.

Wubi will not work with Windows 8.


How to change default paper size in 'Print to file'?

I am not sure but try this and reboot your computer:

paperconfig -p a4

http://manpages.ubuntu.com/manpages/lucid/man8/paperconfig.8.html


Launcher icon doesn't start MySQL workbench

I am using Ubuntu 14.04 and was in the need of the same thing, so I resolved with this with a couple of easy steps.

I launched MySQL from the command:mysql-workbench

I right clicked the icon and locked it to the launcher

In the terminal I ran the following:

gedit .local/share/applications/mysql-workbench-bin.desktop

I removed the Path which was pointing to /home/USER

Finally, I edited the Exec from mysql-workbench-bin to mysql-workbench

This is the final result:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=MySQL Workbench
Icon=mysql-workbench-bin
Exec=/usr/bin/mysql-workbench
StartupNotify=false
StartupWMClass=Mysql-workbench-bin
OnlyShowIn=Unity;
X-UnityGenerated=true

The only thing that I would just make sure that you have the right paths, other than that this should work.


How to use fingerprint reader on Lenovo ThinkPad? Ubuntu 20.04

Fingerprint - GUI says that it is not compatible with 20.04 and as such if you see that a package is unmaintained you should quit using it especially for stuff like security.

You could try out this method. Use the second one  with default apps:

This method will not work for all the devices. Ubuntu does not support major types of Fingerprint scanners available on the market. This is the best alternative and official way to enable the Fingerprint login on your Ubuntu systems.

Open the “Settings” option
Go to the “Users” option
Press on Disabled option, next to Fingerprint Login to add a fingerprint for the selected account.
Follow the instructions provided in the manual
Slowly move your finger in 360° over the Fingerprint scanner
The dialog will say “Done” message once it got completed

This is also something you could try out.


Give special permissions to groups about a specific directory

This is exactly what sticky bit is for, look at /tmp.

You can do:

sudo chmod 1777 /everyone

Now, everyone can write to /everyone, but only owners will be able to remove/modify/rename their files. Obviously the directory owner:group can perform actions based on the permission assigned to them, which in this case, is anything. Go for something restrictive for them if you want more control over their permissions.


Could you please try to check Keyboard - System Settings with Keyboard Repeat parameter, it may be sometimes helpful to turn it off and on again. Then please also check the Delay and Rate parameters. I have 660ms of delay and 25.00 repeats Rate by default.


Where to install/ unpack android studio in ubuntu?

It’s not too complicated:

Open Terminal (if it’s not already open)
Install Java:
sudo apt install openjdk-11-jdk

Install Android Studio:
sudo snap install android-studio --classic

Open Android Studio from the application menu or, if you prefer the terminal:
android-studio

No need to make it too complicated


Where to find the legitimate key-values of nautilus accelerators?

I never found any official entry for this in the GNOME documentation, but - as pointed out in my answer on installing Nautilus scripts - you can use the keycodes reported by xev for the most part.

The only exceptions I found were the various modifier keys:

CTRL = <Primary>
ALT = <Alt>
SHIFT = <Shift>

As for the different properties/actions controllable through the accels file: As far as I know the only actions supported are the ones already listed in the file by default (though commented out).


Sound problems with non-KDE applications on Kubuntu

Possibly one of the non-KDE things you're using pulled in Pulseaudio.  If that's the case, Pulse needs to be at the top of the list in the multimedia settings in System Settings in order for things to work correctly.


How to install nginx/development on 14.04?

FYI: I'm the maintainer of that PPA, so this is all knowledge related to why 14.04 isn't supported in the PPA anymore.

Just an FYI, "NGINX Development" is no longer "Development".  The Development branch became the "Mainline" branch, so you should refer to it as such - the PPA's nginx/development is because it's an 'old' PPA held over from before they called it Mainline.
I've meant to change it but it hasn't been a huge priority so...

Why doesn't the PPA support Trusty 14.04 anymore?
The required dependencies for newer NGINX don't exist on 14.04, and we build only the Debian packages from Debian, not the Ubuntu specific variants.  As such, the builds for 14.04 of NGINX packages fail because one or more bits of code in NGINX do not build in the (now over 4 years old) 14.04 code bases.
The build logs show this failure:
cc -c -fPIC -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/http/modules/perl -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/objs -I objs/addon/ndk -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/src -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/objs -I objs/addon/ndk -I /<<PKGBUILDDIR>>/debian/modules/nchan/src -I /<<PKGBUILDDIR>>/debian/modules/http-lua/src/api -I /usr/include/lua5.1 -I /<<PKGBUILDDIR>>/debian/modules/rtmp -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/src -I src/mail -I src/stream \
        -o objs/addon/store/store_common.o \
        /<<PKGBUILDDIR>>/debian/modules/nchan/src/store/store_common.c
make[3]: *** No rule to make target `/<<PKGBUILDDIR>>/debian/modules/nchan/src/hiredis/hiredis.c', needed by `objs/addon/hiredis/hiredis.o'.  Stop.

... across all architecture builds in 14.04 for the PPA (build logs for 1.15.0: amd64, arm64, armhf, i386, and ppc64el).  The exact build failure lies in a third party module that ships with nginx-extras and is in use by a number of individuals.  This build failure is not unique to the Mainline branch of NGINX, either, as the same failure happens in the Stable branch.  And this build failure only happens in 14.04.
This module does not build in 14.04 under any circumstances; as such 14.04 builds fail to complete.  I could drop this feature from the package for Trusty, but that would make the packages not consistent across releases.
For this reason, I dropped 14.04 as a supported from the NGINX PPAs.

The PPA used to have an older 1.13.x build in it, why doesn't that work anymore?
As for the PPA no longer having 1.13, that's because routinely (usually once a year at about the same time each year sometime in mid to late July) I go through and clean up the PPAs to remove versions of the package for "Not Supported in the PPA" releases.
This is why the PPA no longer works for 14.04, because I went and cleaned up the packages in the PPA.
(We had a similar issue with Precise back in 2014 where I had to kill off Precise builds for the same reason: older libraries wouldn't build the newer NGINX and module requirements)

Alternative to the PPA: Use NGINX Upstream Repositories
This will  not contain nginx-extras or any third party modules such as the Lua module - if you need those you are out of luck.
Now, to get updated NGINX in 14.04, you can try to use the instructions to install the NGINX Upstream Repositories, however in order to do this you have to remove all other NGINX packages first, and make sure you aren't using any third party modules such as Lua

"The Real Problem", or, "Why you should actually upgrade to a newer Ubuntu instead of using 14.04 for newer NGINX":
The primary reason you really should be going and upgrading to a newer Ubuntu instead of trying to use 14.04 is that HTTP/2 on 14.04 will not have all the required features necessary for true HTTP/2 support - namely ALPN support from the OpenSSL libraries.
HTTP/2 needs ALPN support to truly function in the modern age; this is not available from OpenSSL libraries in Ubuntu 14.04.  The other mode for HTTP/2 (NPN) is not supported by many browsers, so you won't actually get HTTP/2 support from many libraries now, as many browsers and such do not support NPN HTTP/2.
The only approach which fixes this is upgrade your systems to at least 16.04, as those will provide new enough OpenSSL to enable HTTP/2 support and also will provide you the ability to use newer builds of NGINX as the libraries are newer and the build dependencies to compile newer NGINX and the packages from Debian exist.


This is five years after the fact, but it seems this question still ranks highly in Google searches of this problem, so I'll mention what just worked for me in a fresh install of Ubuntu 20.04 LTS:
sudo apt-get install gstreamer1.0-libav

I want to note that this Ubuntu came with VLC already installed, and that I don't have h264enc nor gstreamer1.0-plugins-bad nor libgstreamer-plugins-bad1.0-0 installed: apt list --installed + grep does not show them, as I only have the good, bad and ugly gstreamer plugins. Installing the libav package alone solved SubtitleEditor's complaints about the H.264 and MPEG-4 decoders.


Suppose it is Ubuntu Trusty (14.04) release, which has 0.9.1 officially

Update again in 2017/03/07 to reflect to the changes in new release, see https://blog.docker.com/2017/03/docker-enterprise-edition/

Official guideline is here Install docker for Ubuntu, old release had different package name.

docker.io: is used to be very old version in default ubuntu repo (can skip here)
docker-engine: is used before release 1.13.x
docker-ce: since 17.03

for docker-engine

# add the new gpg key
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# add new repo
$ sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"

Then you can smoothly upgrade to latest docker version

$ sudo apt-get update

# remove the old
$ sudo apt-get purge lxc-docker*

# install the new
$ sudo apt-get install docker-engine

And in the case that you don't want to install latest package then you can do something like below.

$ sudo apt-get install docker-engine=1.7.1-0~trusty

for docker-ce

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce


Where can you find possible key combinations and their outputs?

Maybe you can try something like this? It just reads in from the keyboard and echo's it back out!

#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
#include <linux/fb.h>
//All other includes
#include <time.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>

char getkey()
{
    fd_set rfds;
    struct timeval timev;
    int ioready;
    char ch;
    FD_ZERO(&rfds);
    FD_SET(0, &rfds);

    timev.tv_sec = 0;
    timev.tv_usec = 0;

    ioready = select(1, &rfds, NULL, NULL, &timev);

    if(ioready)
    {
        read(1, &ch, 1);
        return ch;
    }
    else
        return '\0';
}

int main()
{
    while(1)
    {
        char my_char = getkey();
        if(my_char == 'q')
            break;
        printf("%c", my_char);
    }

}


Problem with dual monitor on 16.04 with lenovo yoga 260

For this issue, I think the best answer is to refer people to the Lenovo site.  I believe this is a known issue. See, for example:

https://forums.lenovo.com/t5/Displays-Options-and-Accessories/Lenovo-Yoga-260-and-OneLink-dock-external-display-issue/td-p/3327704

An employee states:

  11-04-2016 11:30 AM

  In response to customer reports of blinking or flickering on external
  monitors connected to Yoga 260 ThinkPad systems via OneLink+ VGA/RJ45
  adapter or OneLink+ dock, Lenovo has provided a solution for Yoga 260
  ThinkPad systems under warranty.

  To contact Lenovo Service, please click here and reference Service TIP
  SF16-T0080/ HT502248. This solution will require the Yoga 260 to be
  serviced.

However, some users report that it is not a problem with the laptop, but is instead either a bad cable or a bad dock. The discussion above has comments like this:

  for me, this seems to be only a cable issue (at least for now).
  Problem solved by using a new cable ATM.


How to use an Android phone or iPad as a virtual microphone and/or video input?

Finally Droidcam worked both for video and audio. For the audio there is a problem where I have to use this (pacmd load-module module-alsa-source device=hw:Loopback,1,0) in the terminal each time after I reboot or shut down my PC.


How to get coredump from process crashed inside a docker container using apport?

For those who really interested, here is our findings.

In order for apport.socket to be listened, you have to install systemd first. In order for systemd works properly, it must be the first process in the container, so you have to change your ENTRYPOINT command to be /sbin/init. In order for apport to work properly inside the container, you have to install python3-systemd module which enables systemd activation and parameters propogation. In order to run your process, you have to write simple unit file which describes how to launch your application with systemd. For ubuntu 18.04 you also have to install init package to allow /sbin/init to be run.

If you use some other kind of other virtualization, like vmware in my case (which runs host ubuntu, on which docker containers are running), you also have to remove ConditionVirtualization=container from apport-forward.socket file, because otherwise systemd will not listen activation socket mentioned earlier.

Combining altogether, here what you can do in order to enable apport inside container to work properly.

Dockerfile

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic
COPY dotnet.service /lib/systemd/system/
RUN apt-get update && apt-get install -y --no-install-recommends \
    systemd \
    init \
    apport \
    python3-systemd && rm -rf /var/lib/apt/lists/*
RUN sed -i "s/enabled=0/enabled=1/g" /etc/default/apport && \
    sed -i "s/'problem_types'/#'problem_types'/g" /etc/apport/crashdb.conf && \
    sed -i "s/ConditionVirtualization=container//g" /lib/systemd/system/apport-forward.socket
RUN systemctl enable apport-forward.socket && \
    systemctl enable dotnet.service

# our app
COPY . /opt/app
WORKDIR /opt/app
EXPOSE 5000
ENTRYPOINT [ "/sbin/init" ]

dotnet.service

[Unit]
Description=My service

[Service]
Type=oneshot
ExecStart=/opt/app/MyServiceElf

[Install]
WantedBy=multi-user.target

all this adds additional ~65MB of data, which is looks crazy, so we forward this question to apport repository


best version for Quick Links: ASUS Eee PC 1001PXD-EU17

You should download and install  Ubuntu 11.10 32-bit. Unfortunately, this netbook does not support 64-bit Ubuntu, so trying to boot from the disk would result in an error. You can get Ubuntu at www.ubuntu.com. Click "Get Ubuntu" towards the bottom of the page. Click Download and Install. Click "Start Download" (the big orange button). Burn the disk image (.ISO) to a USB flash drive and boot from it on the netbook. Let me know if you need further help.


My laptop has no numpad, no numlock, how can I simulate it?

Test this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i

apt-get update

apt-get install xvkbd

Xvkbd is a virtual (graphical) keyboard program for X Window System.

When xvkbd is started, the image of a keyboard will be displayed on the screen.

Clicking any key on the xvkbd window will send the character to the focused window as if the key had been actually typed with the hardware keyboard.

Source: http://homepage3.nifty.com/tsato/xvkbd/


How do you use a shell other than bash at a terminal as default?

If you want to change your shell as a user, type:

chsh -s /path/to/your/shell

or simply

chsh

You'll have to enter your password and your login shell is set to the one you chose. You can only select a shell which is listed in /etc/shells.


Ubuntu 18.04 not showing maximum usable ram

May want to check the "Integrated Graphics Setting"  in Peripherals (I have Gigabyte motherboard, your settings may be different on MSI) on your BIOS. This setting controls the amount of RAM allocated to the GPU on the 2400G, when set to auto on my motherboard, it allocates around 2 GB of Ram. When all the overhead is taken into account I have about 13.9 GB left from my 2x8 (16 Gb) Ram.  If you have a dedicated GPU unit separate from the 2400G, you can force the Ram to be smaller through this BIOS setting.  On my rig, I have found that "Auto" on the Integrated Graphics Setting gives the best overall performance, as I do not have a separate Video Card.


How to bind the terminal command on firefox start?

edit the firefox lunch properties
command

firefox %u; rm -rf ~/.wine-pipelight/*; rm -rf ~/.wine-pipelight/./.*; cp -a ~/viewright_backup/. ~/.wine-pipelight/

you can check the lunch in terminal but if you close the terminal the firefox shuts down too


"amixer set master mute" not working with external USB speakers

The next was previously posted in this answer: Setting microphone input volume using the command line?

Taking in consideration what I mention over here, in your case it would be something like:

amixer -c 0 set Master 0DB

But you should perform tests in order to check it.

I hope this is helpful for you.

  If you are using ALSA, amixer can be helpful for your script
  programming.

  When dropping the amixer --help command in a terminal you will see
  something like this:

  Depending on your soundcard, levels may be different than mine, but
  you can use alsamixer in the terminal in order to check which levels
  and which features in your sound card you can call in a command to set
  the volume as you wish.

  In my example, with my principal sound card (I have 2: the embedded
  and a PCI audio card), levels are from 0 to 100, this way I can change
  the volume of a desired input/output in my soundcard by dropping in a
  terminal the next command:

amixer -c 0 set Front 50DB
amixer -c 0 set Front 64DB

  In the first command, the result will set the Front panel output to
  78% level and the second one will set the Front panel output to 100%
  level.

  In order to gather information related to your mixer controls, drop
  the amixer command with no parameters and you will get a list. Or
  indicate which audio device you wish to see a list of controls with
  amixer -c X (where "X" is the number of your audio device).

  BTW: Remember that DB values are calculated logarithmically and not
  linearly.


Upgraded Ubuntu 19.10 -> 20.04 and my search bar is now BROKEN can't find apps etc

Same as here. I did the same steps you mentioned and did not work. Remove and reinstall gnome-extensions does not works as well too.
It seems some gnome extension bugs the search dock. I tested removing the last one i had installed. Screenshot Tool. Reboot and it works fine for me!


Boot options not shown after BIOS setup update driver installation

The BIOS is actually UEFI.

Just open the settings again and, in the boot menu, where currently is "Windows boot manager", select and change to "Ubuntu" again.


Change GTK 3 themes to spesific apps causing %f not detected

To handle filenames with space, put %f between quotations

Exec=sh -c 'GTK_DATA_PREFIX=/usr/share/themes/Ant/gtk-3.0/gtk.css wps "%f"'


I withdraw the question. I installed the Onboard keyboard and enabled onboard integration through Gnome Extensions. Solved the issue and has more features.


Thunderbird window gets stuck maximized with no window controls

This did not help: the only thing helped was

First exit Firefox, then rename localstore.rdf and xulstore.json in the profiles directory of thunderbird:

cd ~/.thunderbird/your_profile
mv localstore.rdf localstore.rdf.bak
mv xulstore.json xulstore.json.bak

The only thing you have to do now is to rearrange your frames within firefox.


Fresh 18.04.1 LTS install results in inability to login

The resolution to this problem is to boot into rescue mode (after BIOS POST, press esc or shift until you get the grub boot menu, then choose a rescue mode, and then choose the root console).  Then you can verify that the user does not exist and create one.  IE:  adduser WHATEVERUSER; adduser WHATEVERUSER sudo.  Once that is done, reboot to regular mode and you will be able to log in.  The linked question was perfectly clear and deserves an answer but I can't answer it since it is closed.  I'm sure there are other people besides myself and Curtis who run into that problem after install.  I think I've used the same install media on different hardware without that issue so I don't know what causes it.

References:

How do I rescue my Ubuntu server from the sever ISO ubuntu-18.04.1-live-server-amd64.ISO?

https://websiteforstudents.com/reset-forgotten-ubuntu-user-password-on-ubuntu-16-04-17-10-18-04/

How can I add a new user as sudoer using the command line?


Unable to make PHP use my latest cURL v7.54.1

Firstly, I had remove all traces of previous cURL installations.

Lastly, I had to compile cURL with option:

./configure --prefix=/usr/local

... and as answered in https://stackoverflow.com/questions/5998680/ubuntu-64bit-11-04-server-and-curl-install-fail by @samir

ln -s /usr/local/lib/libcurl.so.4 /usr/lib/libcurl.so.4

... and also issue command

sudo ldconfig

before removing and re-installing php7.1-curl.


First use the following command in terminal to find out your mouse id:

xinput list

Once you find it, run the following commands for editing lightdm.conf file with root privileges:

sudo -i
gedit /etc/lightdm/lightdm.conf

Add the following two lines at the end of lightdm.conf file:

greeter-setup-script=xinput --disable <mouse_id>
session-setup-script=xinput --enable <mouse_id>
#replace <mouse_id> with the id of the mouse that you found it with `xinput list` command

Save the file and close it and don't forget to close that root shell.

Now, reboot your system and use only the keyboard at the login screen.


How can I change the Bluetooth Received files folder location from Home>Public to the customized folder location?

Search for Personal File Sharing Preferences  from the Dash.

You'll get a menu of options and you can change the default folder home to any other folder to bluetoothed into.

you can also use the app named blueman

sudo apt-get install blueman

you can easily change the folder using its "Local Services" option


Wifi on HP Stream doesn't recognise any networks

HP has started to use only one antenna on some of their laptops as found in this post by Jerry Gorland who has a Stream 11 and a picture from here by modev32

Larry Finger stated that Realtek is working on code that will detect what connector the antenna is connected to but no timeline has been released


Your Trash for your /home (device: /dev/sdb4) directory is currently empty.
However, you may have deleted files under device /dev/sda4 which seems to be mounted at /media/cheran/New Volume. To check these files run:
find /media/cheran/New\ Volume/.Trash-* -type f

If you are sure that these are the files to be deleted, run:
rm $(find /media/cheran/New\ Volume/.Trash-* -type f)

Note: You may need to add sudo before rm if you do not have permission.


Ubuntu 16.04 LTS doesn't load main window after login

please check whether you have got any icons in right top corner of your desktop window. if yes, no problem in installing. Even though 16.04 OS having some drawbacks, it is very good at its performance matter


from the same Gnome-Tweaks application you can turn on and off the "Icons on Desktop" button or it sub options as shown below.

or you can turn on and off the "Icons on Desktop" button
by the below commands in terminal.

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


Omnikey 6121: cannot write to OpenPGP smartcard

Weird, but I finally managed to make this setup work (Omnikey 6121 + OpenGPG v2 card). This is how a mere mortal can achieve the same:

Disable 90gpg-agent-mine and 90ssh-agent-mine in /etc/X11/Xsession.d/ so that they won't try to start gpg-agent or ssh-agent
Create a new gpg-agent-wrapper like explained in https://blog.flameeyes.eu/2010/08/smart-cards-and-secret-agents

In (1), the reason to not start gpg-agent from there is that it will not enable --enable-ssh-support, which is something I wanted.

By issuing a gpg --card-status, you will now notice a small delay and then:

gpg: detected reader `OMNIKEY CardMan (076B:6622) 6121 00 00'
Application ID ...: ......

That means card now also will work for writing operations! Yay! And my keytocard was successful :)


How do I make the Battery notification more obvious?

I am not sure how easy it is to tinker only the low battery alert notification, but you can manually set up a slightly better notification system for yourself following this hacky workaround:

First you'll need to install acpi by running

sudo apt install acpi

Next you need to create a bash script. Create an empty text file, say battery-alert.sh and add the following lines

#!/bin/bash
while true
    do
        export DISPLAY=:0.0
        battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
        if on_ac_power; then                           #check if AC is plugged in
                :
        else
             if [ $battery_level -le 5 ]; then         #check if the battery level is below 5%, change the number after "-le" to set your preferred battery level
                notify-send -u critical "Low Battery!" "Please plug your AC adapter, battery level: ${battery_level}%" -i battery-caution
             fi
        fi
sleep 300                                              #wait for 300 seconds before checking again, change the number after "sleep" to set your preferred waiting period
done

Save the file.
Make the script executable and run it. You'll get a persistent notification (you'll have to click it to dismiss it) if the battery level is below 5%.

You may also consider adding the script to your startup applications so that it starts automatically every time you boot your laptop.


Messed up partitions after 11.04 upgrade

Solved there : http://ubuntuforums.org/showthread.php?p=12493772#post12493772

(names of the fakeraid partitions got edited somehow during the upgrade)


The answer depends entirely on the specific laptop. A great many drivers exist by default in the kernel for common devices. Laptop manufacturers, however, love to surprise the world, and by extension Ubuntu, with new devices for which there is only a mostly working Windows driver. In those cases, a question and answer here on this site usually solves the problem.

There are a few wireless drivers that require proprietary firmware files or drivers. Ubuntu is not truly free and open source if it includes by default those files and so the option is given to install additional drivers during install.

  So is the expectation for laptops that you have to have windows
  drivers already in place and Ubuntu has to be installed side by side?

Not at all. I am fairly certain that your experience was anomalous. A great many of us here have no Windows install at all. In my own case, on a Lenovo T410i, I did a bare harddrive install and everything worked as expected right from the start.

I urge you to try the live USB or DVD again and if everything works as expected this time, install. If not, post a question with specific questions. If you want extra assurance, remove the Windows harddrive entirely before you start.


After `apt-get upgrade` mdadm won't auto-assemble RAID at startup

Apparently I ran into this bug. Unsure why my installation worked that long (this bug is a year old and started on 14.04), but here is the fix:

sudo nano /etc/default/grub.d/dmraid2mdadm.cfg

Find the following line

        GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT $DMRAID2MDADM_TOAPPEND"

and comment it out like this

##        GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT $DMRAID2MDADM_TOAPPEND"

then run

sudo update-initramfs -u && sudo update-grub

Reboot and it works again. It may make sense to remove the configuration file at all since the transition from dmraid to mdadm seems fully done on my Ubuntu Gnome 15.05 setup.


How do I setup my wifi & pppoe and use them asus x550

This is a bug(Mark yourself affected) in the wifi driver, there are some workarounds. The one that worked for me:

echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus_nb_wmi.conf

This creates a file asus_nb_wmi.conf in /etc/modprobe.d that will load asus_nb_wmi, with the parameter wapf=1 that will be activated at next reboot.

Note: Fn-F2 will not work

The following is excerpt from: [SOLVED] Fix : Asus WiFi Disabled (Hard-blocked), Fn+F2 won't work, just in case the aforementioned workaround does not work for you.

  Until this issue is fixed with newer updates, you may use "xbindkeys"
  tool to set a hotkey (can be a single key or a key-combination) of
  your choice to toggle the WiFi enabled/disabled.

  This is how -

  A. Create a Script to do it smartly :

  1) First, we create a script (for ease of use, and so that we can
  toggle it on/off using the same hotkey) - Code:

#!/bin/bash
# Script to toggle the wireless blocked/unblocked

# index no. of phy interface IFACE=`rfkill list all | grep phy | cut -c 1`

# WiFi block state 0=active, 1=blocked BLOCKED=`rfkill list all | grep -iA1 phy | grep -ic soft.*yes`

if [ $BLOCKED -eq 1 ]; then     rfkill unblock $IFACE

else    rfkill block $IFACE fi

  Copy-paste the contents of the above box in a text file and save this
  file in your Home directory with the name - "wifitoggle.sh". Make sure
  the first line is (without double quotes) "#!/bin/bash" and last one
  is "fi".

  2) Make the script executable by running the following command in a
  terminal - Code:

chmod +x wifitoggle.sh

  3) Run the following command to Create a symlink to this script in
  /bin directory - Code:

sudo ln -s $HOME/wifitoggle.sh /bin

  Now proceed to binding it with a hotkey as follows -

  B. Bind the Script with a HotKey of your choice :

  1) Install xbindkeys-config (a GUI frontend to xbindkeys - the program
  that captures and binds hotkeys with commands) - Code:

sudo apt-get install xbindkeys-config

  2) Create a default config file for it (else it would crash on key
  capture step) - Code:

xbindkeys --defaults > ~/.xbindkeysrc

  3) Run the program from terminal or "Alt+F2" (because it does not
  create a launcher in Unity dash) - Code:

xbindkeys-config

  let the terminal running in the background.. In the GUI box that
  opens, 3 example shortcuts are already present. You may leave them.

  4) Click on "New" button at the bottom of the GUI.

  5) In the right hand pane of the GUI, fill in a suitable name in the
  "Name" field, e.g. "Toggle Wifi"

  6) Click on "Get Key" button. This will open a tiny blank box doing
  nothing but waiting for your input.

  7) Press the desired key (or key combination) that you want for
  toggling Wifi on/off. For example, "F3" key (as it remains mostly
  unused). The tiny box will disappear and the key will be recorded.

  8) In the "Action" field, type this - Code:

/bin/bash /bin/wifitoggle.sh

  9) Click on "Apply" button and test the hotkey to see if it works as
  expected.

  10) Click on "Save & Apply & Exit" to save the new hotkey to the
  default file and exit.

  From now on, as soon as you will press this key or the
  key-combination, the wifi will change its state from On to Off, or Off
  to On.

  The Fn key doesn't seem to be noticed by any key capture program I
  could find (probably that's why it is considered "Hardware Switch"),
  so it's not possible to use it yet.

  Once more, I'd request anyone who needs this workaround to submit a
  bug report against the problem, or add themselves to the "Affects Me"
  list, and point to this thread as a possible workaround.

  The stronger it gets reported, the sooner we'll get it fixed, thus not
  requiring such crude workarounds.

Thansk to fossfreedom, and seth for the research!

Workaround(s)

[SOLVED] Fix : Asus WiFi Disabled (Hard-blocked), Fn+F2 won't work

Bug

Bug #971809 “168c:0032 Wifi connection unstable -- Atheros AR948...” : Bugs : “linux” package : Ubuntu


When you do a search, you see that the package is only available on trusty and not on vivid.

You can't install your package. Sorry

http://packages.ubuntu.com/search?keywords=libafpclient0&searchon=names&suite=trusty&section=all


Why does changing a device UUID prevent boot?

While the part of the question has been already answered here: https://unix.stackexchange.com/questions/137862/why-does-fstab-use-uuid-instead-of-the-actual-file-system-name

I will try to provide another explanation. Currently you are using UUID to mount the root filesystem via fstab. This has one advantage when adding a hardware you always refer to the same disk. When you are changing your boot disk make sure you change the UUID in your fstab. Use blkid command to get a new disk UUID. This is fairly easy when you attach both disks to the same system, get the new UUID and change the UUID in the fstab and before removing the old disk you need to copy the root file system to the new disk.

You may use another way without specifying the UUID in the fstab. You will need to refer for instance to /dev/sda and specify the file system in fstab. You may later on fail when you attach a second drive and the system changes /dev/sda of the root disk to /dev/sdb for instance. This is where the UUID comes handy.

Embedded systems and also some other systems might have the boot directory together with /etc/fstab on their own partition, so when you supply wrong UUID at the boot time and system does not find it, the system will simply not boot.

So before changing the disk, you will need to check the boot partition layout, the fstab location and mounting the devices at the boot time.


Problems installing KDE in Ubuntu 12.04 xorg problem

xorg

  :~$ apt-cache show xorg

  Description: X.Org X Window System

  This metapackage provides the
  components for a standalone  workstation running the X Window System.
  It provides the X libraries, an X  server, a set of fonts, and a group
  of basic X clients and utilities.
  .
  Higher level metapackages, such
  as those for desktop environments, can  depend on this package and
  simplify their dependencies.
  .
  It should be noted that a package
  providing x-window-manager should also  be installed to ensure a
  comfortable X experience.

Try

The kubuntu-desktop is depending the xorg. Try to install the xorg. Do you get an error message ?


How to make separate partition from partition where I mounted /home?

Perhaps KDE Partition Manager would be the answer to your question. It allows you to resize without losing data and create new partitions.


Try this utility https://github.com/ichiriac/ubuntu-smart-fan, it's based on lm-sensors and it will manage the fan speed and log them.


Unity Launcher Does Not Remember Favorites

Here again to notify that after the installation of dconf-tools, libdconf-dbus-1-0, libdconf0 everything goes well:

sudo apt-get install dconf-tools libdconf0 libdconf-dbus-1-0

I found this on a bug submitted for empathy that did not save the settings.


./configure not working when installing python 3.6.1

You've done some stuff with the Python 3.6.1 source code bundle as super-user and now the file ownership is screwed up. Typically there's no need to build a source code bundle as super-user. The subsequent installation (i. e. make install or checkinstall) may require super-user privileges if you want to install the software in a system location.

To re-transfer the file ownership to yourself run:

sudo chown -R "$USER:" ~/Desktop/Python-3.6.1


An Unique key/id that corresponds to only one combination of Ubuntu OS and hardware

To uniquely identify hardware is what machine-id is created for. Due pay extra attention to the last paragraph.

Synopsis
/etc/machine-id
Description
The /etc/machine-id file contains the unique machine ID of the local system that is set during installation or boot. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. This ID may not be all zeros.
The machine ID is usually generated from a random source during system installation or first boot and stays constant for all subsequent boots. Optionally, for stateless systems, it is generated during runtime during early boot if necessary.
This ID uniquely identifies the host. It should be considered "confidential", and must not be exposed in untrusted environments, in particular on the network((. If a stable unique identifier that is tied to the machine is needed for some application, the machine ID or any part of it must not be used directly. Instead the machine ID should be hashed with a cryptographic, keyed hash function, using a fixed, application-specific key. That way the ID will be properly unique, and derived in a constant way from the machine ID but there will be no way to retrieve the original machine ID from the application-specific one. The sd_id128_get_machine_app_specific(3) API provides an implementation of such an algorithm.

The last paragraph explains how to use this in applications: you need to hash machine-id before exposing it to an application or when using to connect to something. That means you need to code something: you need to create a salt and hash machine-id. That salt could be an identifier that is your OS.


Package 'samba' is virtual - Error when installing Samba

I had a similar issue and I resolved this by running the following:

sudo apt-get update

I'm surprised the system doesn't automatically do an "apt-get update" immediately after installation  - but the above fixes this.


A temporary work around is to use Ctrl+Alt+F1 to go into a virtual terminal and then Ctrl+Alt+F7 to go back to the GUI. The cursor then comes back.


Telegram-desktop snap package doesn't run after reboot

This problem affects me too. The first time I connected required snap interfaces to telegram, and it worked. But today the problem showed up itself again. I fix it by remove and install again telegram with:

sudo snap remove telegram-desktop
sudo snap install telegram-desktop

Note that by now exists a telegram-desktop package within default ppa and you can install it by

sudo apt install telegram-desktop


How do I find and set my $EDITOR environment variable?

You can set the $EDITOR variable with this command:

export EDITOR="/usr/bin/nano"

This will define the variable EDITOR for the current session and pass it into the environment of all its child processes. To set it permanently you must define it in one of the system configuration files. The highest level at which you can do this is to set it in /etc/environment. This defines it globally:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
EDITOR="/usr/bin/nano"

Check that variable is defined:

$ echo $EDITOR
/usr/bin/nano

Editor's note: it's often preferable to put environment variables in your own ~/.profile, which is a lot easier to fix if something goes wrong.


How do I check whether a module is installed in Python, and install it if needed?

How to know if a python module is installed or not in the system: You can do a very easy test in terminal,

$ python -c "import math"
$ echo $?
0                                # math module exists in system

$ python -c "import numpy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy
$ echo $?
1                                # numpy module does not exist in system

How will I install it if it is not installed

You can install specific module by downloading respective packages from repository, for example you can install scipy as,

sudo apt-get install python-scipy ## for Python2
sudo apt-get install python3-scipy ## for Python3

Alternately You can also install a python module using python-pip as suggested by Zack Titan in the comment below, To install numpy you can use

pip install numpy

Warning: It is highly recommended to install python-modules using official Ubuntu repository only and not to use the pip method as superuser(i.e., as root or using sudo). In some cases it may leave your system unusable by breaking system python.

How to install packages using pip into local virtual environment.


Boot stuck after discovering USB devices

I ran into the same issue with Xubuntu 11.10 AMD64, Core I7 2600 and Nvidia GTX 560 Ti. Setting the "acpi=off" boot option allowed the boot to complete. I then installed to hard disk, and made sure to update the kernel to the latest available. It was able to boot off the hard disk without any special boot options.


Nokia 8 does not work as USB modem in Ubuntu 16.04

It turned out that you just need to upgrade your kernel to make Nokia 8 work as a USB modem. I don't know the exact minimal kernel version that supports it, but it does not work in 4.10 and it does work in 4.15 and 4.18.

In Ubuntu 16.04, it is enough to switch to HWE (HardWare Enablement) kernel which is currently 4.15:

sudo apt-get install linux-image-generic-hwe-16.04

And reboot.

Or you could upgrade to Ubuntu 18.04 where the kernel version is 4.18.

Newer versions would probably work as well, but I only consider LTS ones.


How to install folding at home (Folding@home FAHControl) on Ubuntu 19.10

The work-around mentioned in the link above to sudo apt-mark manual python-gnome2 will not work for 19.10 because that package does not exist in the ubuntu repo :(

Forcing the deps with --force-depends does not work for the same reason, python-gnome2 does not exist.

This is worked on my Ubuntu 19.10 Desktop...YMMV

Step 1 (prerequisites)

Make sure you have these packages installed

sudo apt install python # installs python2.7
sudo apt install python-gtk2 # used by the GUI
sudo apt install equivs # improvement by @Chemary, Tx!

Step 2 (create control file)

Now we need to trick Ubuntu into thinking it has python-gnome2.  To do this we will use "equivs".  Lot's of good docs on it, but here's a brief rundown:

equivs-control python-gnome2

This creates a DEB control file called python-gnome2 (see example below) in the current directory that you will need to edit.  Or you can use this one...feel free to put in your own name/email and stuff...leave everything else

Step 3 (edit control file)

Using any text editor change the created control file like this.  It will be in your current directory (assuming your working from the terminal) and will be called python-gnome2

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: python-gnome2
Version: 1:42
Maintainer: Jack Ford <mike@clustergarage.io>
Architecture: all
Description: A fake package to make FAHControl install

Step 4 (build a fake package)

Then build a fake package with the control file you just edited

equivs-build python-gnome2

This will create a DEB package in the current directory called python-gnome2_42_all.deb ...assuming your control file looks like the sample above.

Step 5 (install)

Now you can install your fake package and fahcontrol successfully and your Apt tree will not be broken.  Run these commands from the current directory.

sudo dpkg -i ./python-gnome2_*_all.deb # improvement by @Chemary, Tx!
sudo dpkg -i ./fahcontrol_7.5.1-1_all.deb

Note: If you downloaded fahcontrol_7.5.1-1_all.deb file to say your Downloads directory, then you would need to install it from there e.g.

sudo dpkg -i ~/Downloads/fahcontrol_7.5.1-1_all.deb

Step 6 (save the world!)

Then run it like this from the terminal

FAHControl

Or use from your application launcher.  Mine looks like this

Hope that helps!


How can I access the scanner functionality of my Samsung CLX 3175N over the network?

I have had success with this script, on the older Samsung all-in-one, CLX-2160N, and apparently it also works on the CLX-3160N

http://www.jon.demon.co.uk/dell1600n-net-scan/

I have a little wrapper script that passes my usual preferences to the script, so I can just run "./scan" at a terminal

The procedure is

Run the script in --listen mode with the correct parameters
Walk up to the printer and use the menu to select network scan

Select your options

Scan your image

The script should have written files to the folder you specify in the --scan-dir option.

While this is nowhere near as simple as "Simple Scan", I scan infrequently enough that I'll put up with a little fiddling.


How can I use the notify-send command in combination with the Calcurse calendar?

About Calcurse

As often, reverting to a (very) basic, but nevertheless complete functionality feels weird, but in a way refreshing. Not sure if I would use it though.

Although the bottom of Calcurse's window suggests an option to pipe, and Calcurse's website mentions "user-configurable notification system" I couldn't find a way to use it for automatic scheduled notifications of all events.

At the same time: indeed such a reminder functionality would be a useful addition. The script below can be used as a plug- in for calcurse to show reminders. I hope you find it useful.

It is extremely easy to use; simply run the script in the background. All it does is check the events for today (updated twice per minute), and run notifications at an arbitrary time before expiration.

What is needed to create reminders

The output of the command:

calcurse -a

looks like:

12/29/15:
 * Free today!
 - 12:00 -> ..:..
    See if this script does its job :)

It immediately occurs that the scheduled items start with a "-", while items for all day start with "*". What we need to do is create two groups (lists) of items:

the scheduled ones
the unscheduled ones

Of the first category, we need to parse out the time, convert it into a format we can calculate with, so we can show reminder at n- minutes before expiration.

Subsequently, we need to "keep an eye on the clock", to compare the set time (of the event) to the current time. If the time span between the two enters the set warning time, simply show the notification.
Finally, to prevent repeated notification, we need to add the item to a "done" list.

Additionally, the script cleans up the "done" list; if an item does not occur in today's items anymore (either if you removed it or the day switched during your session), the items are removed automatically.

The result

On startup (log in)

the script shows all today's items, in succession:

On an arbitrary time before expiration (in this case 15 minutes)

the scripts reminds you in a notification:

The script

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

warn = int(sys.argv[1])

def get(command):
    return subprocess.check_output(command).decode("utf-8")

def convert(t):
    # convert set time into a calculate- able time
    return [int(n) for n in t.split(":")]

def calc_diff(t_curr, t_event):
    # calculate time span
    diff_hr = (t_event[0] - t_curr[0])*60
    diff_m = t_event[1] - t_curr[1]
    return diff_hr + diff_m

def cleanup(done, newlist):
    # clean up "done" -lists
    for item in done:
        if not item in newlist:
            done.remove(item)
    return done

def show_time(event, s = ""):
    # show scheduled event
    hrs = str(event[0][0]); mnts = str(event[0][1])
    mnts = "0"+mnts if len(mnts) != 2 else mnts
    subprocess.call(["notify-send", s, "At "+hrs+":"+mnts+" - "+event[1]])

startups = []; times = []

while True:
    currtime = convert(time.strftime("%H:%M"))
    events = [l.strip() for l in get(["calcurse", "-a"]).splitlines()][1:]
    # arrange event data:
    groups = []; sub = []
    for l in events:
        if l.startswith("* "):
            groups.append([l.replace("* ", "")])
        elif l.startswith("- "):
            sub.append(convert(l.split("->")[0].replace("-", "").strip()))
        else:
            groups.append(sub+[l])
            sub = []
    # run notifications
    for item in groups:
        # on startup:
        if not item in startups:
            # all- day events
            if len(item) == 1:
                subprocess.call(["notify-send", "Today - "+item[0]])
            # time- specific events
            elif len(item) == 2:
                show_time(item, "Appointment")
            startups.append(item)
        # as a reminder:
        if all([len(item) == 2, not item in times]):
            span = calc_diff(currtime, item[0])
            if span <= warn:
                show_time(item, "[Reminder]")
                times.append(item)
    # clean up events
    startups = cleanup(startups, groups); times = cleanup(times, groups)
    time.sleep(30)

How to use

Copy the script into an empty file, save it as run_ccursereminders.py
Test- run it with the time you'd like to be warned (before expiration time, in minutes) as an argument. An example, to run reminders 30 minutes before your appointment:

python3 /path/to/run_ccursereminders.py 30

If it works as you wish, add it to Startup Applications: choose Dash > Startup Applications > Add. Add the command

/bin/bash -c "sleep 30 && python3 /path/to/run_ccursereminders.py 30"

where the last 30 is the number of minutes to warn you before an appointment expires


Acer 5750G/5755G Perl script requires access to /dev/port

on my system:

amias@rome:~$  ls -l /dev/port
crw-r----- 1 root kmem 1, 4 May 27 10:53 /dev/port

This suggests that you need to run it via sudo, i would also resist the temptation to open up the permissions to /dev/port as it will weaken your security.

What you could do is configure sudo to allow you to run that script as root without a password.

sudo visudo                # launch the safe sudo config editor

then add the following line at the bottom of the file substituting your values for user and the path to the script

user localhost = (root) NOPASSWD: /full/path/to/script

It would be wise to make that script be owned by root and not writable by anyone else but root, an attacker could find out that it will be run as root and could insert other commands that could compromise your system.