My other operating system has vanished even after running boot-repair

Try running this command to detect other operating systems:

sudo os-prober

and then this to update grub:

sudo update-grub


I am getting "expr: syntax error: unexpected argument ‘/bin’ " in this code. Kindly help

In the first line you have
# !bin/bash

instead of
#!/bin/bash


What software can I use to view epub documents?

You can use calibre software for viewing .epub documents.

To install calibre from terminal:

sudo apt-get install calibre

Or click the icon below.

calibre

If you don't want to launch the full calibre client just to view your ebook files you can add a .desktop launcher to calibre's inbuilt ebook viewer:

Create a new .desktop file in ~/.local/share/applications:

gedit ~/.local/share/applications/calibre-ebook-viewer.desktop

Copy and paste the following passage into the file:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=calibre
Exec=ebook-viewer
Name=Calibre Ebook Viewer
Comment=Display .epub files and other ebook formats
MimeType=application/x-mobipocket-ebook;application/epub+zip;
StartupWMClass=calibre-ebook-viewer

Save the file. You should now be able to launch Calibre's inbuilt ebook viewer both from the dash and through the right click "Open with" menu.


Ubuntu 20.04 change background to solid colour

Newer versions of Ubuntu Desktop have removed the capability to set the background to a solid color. You may run the following command in a terminal window to accomplish this task:
To clear the current image setting:
gsettings set org.gnome.desktop.background picture-uri ""

To set the primary color (the first color in a gradient or the solid color):
gsettings set org.gnome.desktop.background primary-color '#000000'

Reference: https://www.fcpace.com/node/55


In a cronjob copy files and change their names to unique values

How about putting every batch of log files in a separate directory. You could do it using:

dir=/etc/bak/`date "+%Y-%m-%d_%H.%M.%S"`
mkdir "$dir"
cp /var/log/*.* $dir

If you want to prefix all the copied files with a timestamp you can do:

(cd /var/log && ls -1 *.*) | awk -v date=`date "+%Y-%m-%d_%H.%M.%S"` '{ print "cp /var/log/" $0 " /etc/bak/" date  $0}' | sh


First, install the kexec tools using:

sudo apt-get install kexec-tools

Now, to reboot using kexec one needs to determine the version of the kernel you want to kexec into and also the the boot device and initrd you want to use.

For example, to find the current kernel you are running, use:

uname -r

and a quick and dirty way to find the boot device is to look for the root device in /boot/grub/grub.cfg, e.g:

grep "set=root" /boot/grub/grub.cfg

and look for the UUID of the boot device.

So, for my machine, my kernel is 3.5.0-17-generic, and my UUID is 69822458-67e5-437a-84ab-0c9e5c139d43, so I can load this kernel and initrd images into memory using:

sudo kexec -l /boot/vmlinuz-3.5.0-17-generic --append=" linux /boot/vmlinuz-3.5.0-17-generic root=UUID=69822458-67e5-437a-84ab-0c9e5c139d43 ro quiet" --initrd=/boot/initrd.img-3.5.0-17-generic

and then boot the kernel using:

kexec -e

One can kexec into a different kernel version; you don't need to use the one you are running.


Upgrading error - "unattended_upgrade crashed with apt.cache.LockFailedException in_fetch_archives(): Failed to lock /var/cache/apt/archives/lock"

Try

sudo rm -f /var/cache/apt/archives/lock
sudo apt-get -f -y remove
sudo apt-get -f -y update

I'm not sure that I correctly remembered these commands, so just try it.


unable to connect to another computer through the Internet using ssh?

If you have this laptop on a home network, you need to enable and set port forwarding on the router for that network. Namely, you need to port forward port 22 from your laptop making it available to 0.0.0.0/0 (no restrictions). Make sure you have a strong password, the Internet starts hammering open port 22's pretty quickly.


Installing pgAdmin 4 separately on Ubuntu 18.04

Yes, that is very well possible.

On your database server, enable access over the network (in the pg_hba.conf file).

On the other system, install pgAdmin and use the Server dialog to set up a connection to the database server.


Those are some library files that were somehow not uninstalled while evolution was
removed or replaced.
Ok here's what you need to do.

install synaptic package manager from software center.
Search for the evolution files showing up in the update
manager(evolution-common, evolution-indicator.
uninstall those files.
run sudo apt-get update in terminal

Problem solved ;-)


Cannot increase Ubuntu partition with GParted. Maximum size

You need to move the partition that is in the way.

i.e You need to move sda4 and sda5 to the left before you have room to expand sda3. You can see this from the graphical layout at the top.

Edit:

It is possible that you cant move sda4 and sda5 since one is inside the other. Can you try the below steps

Expand sda4 to encompass the entire free space.
Move sda5 to the left end of this free space(from the right end)
Shrink sda4 to again be as large as sda5
Resize your linux partition sda3


EFI partition not found error during Ubuntu installation

If you want to continue in EFI mode installation, you could do:

Shrink your sda7 releasing 500Mb of disk space
Create new partition using released space in FAT32
Make your newly created FAT32 partition bootable:
Garted -> Right click on FAT32 partition -> Manage Flags -> Check Boot and ESP

But it is better to install Ubuntu in BIOS mode by disabling EFI option for booting from USB stick. Because of Ubuntu installation in EFI mode will not detect your windows MBR partition. Maybe there's a way to make grub boot windows, but most probably a lot of investigation could be required to do it.

If you want to convert your windows to EFI mode, you need to reinstall it, but it will require your data backup.

Reference


Is the computer a modern one using Secure Boot (UEFI)? If so, you might need to create a GPT partition table (instead of an MDOS one) on the USB device. You can use GParted to do that — beware! doing this will instantly erase all data on the drive, so be very sure that you've chosen your USB and not your computer's drive. But if your computer doesn't use Secure Boot, don't worry about this.
I don't know the purpose of the 4Gb FAT partition in the tutorial. Maybe it's spare space to be able to port files to a different computer.
So, I suggest the following.

If your computer uses Secure Boot, you'll need a small FAT32 partition. Size 500Mb is about right. Tell the installer to use this for its EFI System Partition. (If your computer doesn't use Secure Boot, skip this partition altogether.)

If you need Windows to access some files, create a partition for transferring the files. Instead of FAT32, I suggest NTFS. Make it only as large as you'll need for transferring files; it doesn't have to be 4Gb if you don't need that. Tell the installer not to use this partition. (If you don't need to share with Windows, skip this partition altogether.)

For the Linux system, use all of the remaining space and format it to ext4. Tell the installer to use this as the root partition.

Don't create a swap partition. Ubuntu 20.04 uses a swap file by default, though you probably want to avoid using swap on a USB stick — it will slow your system to a crawl.

EDIT: The tutorial doesn't mention that you must change the target bootloader installation (compare steps 6 and 7 (Phase 2) at the bottom of each image). Please remember to do this, otherwise your USB won't boot on a different machine, and you could have problems on your machine when the USB isn't plugged in.
EDIT: To change the target bootloader.

In the guide, scroll down to Phase 2, step 6. Look at the bottom of the image, where it says, "Device for boot loader installation". Notice that it shows /dev/sda.
Compare that to the image in Phase 2, step 7. There, it shows /dev/sdb. This should have been mentioned in the guide, but wasn't.
You must set this to whatever your USB device is, otherwise it'll overwrite the bootloader on your internal disk — you don't want that to happen!
Be aware that this is the device (e.g. /dev/sdb) and not a partition (e.g. /dev/sdb2).


The scaling setting has nothing to do with multimedia playback.


How can I modify the small icon and title bar fonts in Unity?

I believe gnome-tweak-tool should have a resolution for this. You can change the font sizes throughout your desktop. It will create an application called 'Advanced Settings'. To get gnome-tweak-tool open up your terminal and:

sudo add-apt-repository ppa:ricotz/testing
sudo apt-get update
sudo apt-get install gnome-tweak-tool

When it is finished open up gnome-tweak-tool and go to Fonts. Tweak as needed.


Want to logout of ssh session but pvmove is running in foreground

Okay so looks like it has been asked and answered before.  Once I thought to write background and foreground in another session I had more appropriate search terms to work with.

The magic is done with reptyr - simply apt-get install reptyr

This is what I did (note I edited the lines to show which TTY the I/O is on):

(pts/4) /dev/sda5: Moved: 10.6%

(pts/5) # apt-get install reptyr
(pts/5) # screen

(pts/4) /dev/sda5: Moved: 10.6%

(pts/6) # ps -ef | grep pvmove
(pts/6) root 20618 13769 0 22:40 pts/4 00:00:00 pvmove /dev/sda5 --interval 10 --verbose
(pts/6) # reptyr 20618

(pts/4) [1]+  Stopped                 pvmove /dev/sda5 --interval 10 --verbose

(pts/6) /dev/sda5: Moved: 10.8%
(pts/6) /dev/sda5: Moved: 10.9%`

Nothing like playing with live fire (so long as you don't get burnt).


This technique is based on owl's answer, but:

It avoids deleting the .prerm file. This file is needed to ensure the package is uninstalled cleanly, and removing it could potentially leave traces of the package remaining, leave the system configured in a way that expects the package to be installed, or leave services provided by the package running, even once the files are removed.

That makes this technique safer, though potentially it might not work if there is also a problem running the .prerm script. (This may have been why owl said to delete it.) Fortunately, usually the .prerm script does not fail.
This technique potentially removes more configuration files, so depending on the cause of the problem, this might be more effective.

It also makes sure we are fetching the correct version of the package to install.

Run:

sudo dpkg -P php5-mysql
sudo apt-get --purge autoremove
sudo apt-get update
sudo apt-get install php5-mysql

If there are no errors, then everything is cleaned up from the previous installation and php5-mysql is installed. In that case, the package should work properly now.


How can I find out my current gvfs version?

Try dpkg -l | grep 'gvfs' | awk '{print $2,$3}'


How to use sed to replace an environment variable

This is a case for some ugly fancy quoting. Single quotes stop shell parameter expansions, and double quotes to allow them.

You can think of quotes as on-off switches in a sed expression, closing one type of quoting and opening another like this: 'strong'"weak"'strong'

Using $USER as an example:

$ cat file
$USER
some text ($USER)

$ sed 's/($USER)/('"$USER"')/' file
$USER
some text (zanna)


Problems with libconfig PKG_CONFIG_PATH enviroment variable

How did you obtain and install libconfig?

If you just installed the libconfig8 package, that is not enough. You also need to install the -dev package corresponding to it, in order to provide the development files (headers, static link library, and pkg-config data). I was able to find that for libconfig for precise on packages.ubuntu.com. So

sudo apt-get install libconfig8-dev

should do the trick.

As you can see from here, the file list for this package contains the following file path:

/usr/lib/pkgconfig/libconfig.pc

This is precisely the file that pkg-config needs to be able to pull out the CFLAGS and LDFLAGS corresponding to libconfig.

This directory is on the "built-in' pkg-config search path out of the box on Ubuntu. For this reason, it is not necessary to set PKG_CONFIG_PATH. You would only ever set that environment variable if you need pkg-config to look in directories other than those which it searches by default. So if you compiled a program and installed it in /home/user/apps/blah and the file /home/user/apps/blah/lib/pkg-config/libblah.pc needed to be available to pkg-config, you would set:

export PKG_CONFIG_PATH=/home/user/apps/blah/lib/pkg-config/libblah.pc

to make pkg-config find that installation of libblah.pc.

However, since you are installing libconfig from Ubuntu itself, it will automatically "plunk" the .pc file in the correct search directory.


Launch using dedicated graphics card disappeared after AMD driver updates Ubuntu 19.10

If you've installed amdgpu (and it looks like you have) then the radeon driver will have been disabled. You need the radeon driver for older cards - I have a Radeon HD5000 and a Radeon R9 290X. I was able to get the 290X running with amdgpu but the HD5000 stopped working. So I re-enabled the radeon driver for the old card and continued to use the new amdgpu driver for the new card.
See this answer for more details.


How to enable DHCP con Oracle VM VirtualBox server

I'm running VirtualBox right now to do testing.  I use this:

eth0 (Network 1):  NAT
eth1 (Network 2): Host-network, 10.1.1.1

Then I setup eth1 as the managed interface, and boot other VirtualBox machines on the Host-network only interface.  It's been working ok, minus errors I hit with the MAAS system itself.

Setup the Host network in the overall virtualbox preferences.  That sets up a virtual interface on your computer under that 10.1.1.1 IP address.  Then you can communicate with your MAAS server and all the nodes in that subnet.


Many process named "su-to-root" appeared on my system monitor, is my computer owned?

I'll put my last comment as an answer:

Unless we're talking about a server with a static IP-address which is visible form internet, in most cases people connect to internet via an ADSL modem (either via wi-fi or with a LAN cable). In this case it is the modem which will have an "external" IP-address, your computer will have a "local" address like 10.1.1.1 etc. In this case it's impossible to connect to your computer from the outside world unless you configured your modem to forward certain types of packets to a certain address in your internal network.

So, unless you have a "real" IP-address, the only practical possibility to get "owned" is to download something yourself, start it and give it your root password. Or, less likely, to visit a malicious website which would exploit a not-yet-pached vulnerability in your web browser, browser plugin or something.

So I think in this case the processes you saw was Firestarter asking you for your password.

Regarding the problem with Firestarter not writing logs - please have a look at this question


Fatal Error:

MYQL is failing to start because as the Journalctl output indicates, but you haven't provided the mandatory server-id.  Add the mandatory id as indicated in the code below.

/etc/mysql/mysql.conf.d/mysqld.cnf
Change from:

log-bin=mysql-bin
binlog-format = 'ROW'

Change to:

server-id=master-01
log-bin=mysql-bin
binlog-format = 'ROW'

This will get your server running while you address the proper formatting of your desired logging.

non-fatal warnings:

For the open files limit of your error you will have to either decrease the demand in the configuration you edited or increase the system's limits with:

/etc/security/limits.conf

* soft nofile [new number]
* hard nofile [new number]

The first column describes WHO the limit is to apply for. '' is a wildcard, meaning all users. To raise the limits for root, you have to explicitly enter 'root' instead of ''.

Taken from:
https://askubuntu.com/a/162230/29012


Does anyone know how to change the mouse behavior in Gnome Boxes?

It seems that this craziness is happening because Android x86 (assuming that's what you're using) is a niche OS and it doesn't have SPICE plugins available. That's like Virtualbox additions for SPICE (SPICE is the display protocol that Gnome Boxes is using).

I've noticed that when running Android x86 in Gnome-Box for the first time, the emulated mouse deviates a little from the host mouse but syncs almost perfectly. When turning off the box or restoring a snapshot, it tends no longer sync the host and box mouse.

Re-installing Android x86 with Grub fixed the mouse sync problem for me. Something to do with starting the box in a text environment instead of Android's graphical environment seems to have done the trick.

I would recommend making a new box and testing it before you delete your old one -- in case it does not work for you.

Turn off the box using Android x86 tty screen instead of doing force shutdown and don't do any snapshots while it's on.

To turn off using tty:

Press Alt-Left
Enter: poweroff
Press Enter


Folder Color works in most distros: Ubuntu, Debian, Mint, openSUSE, Arch Linux, or pretty much anything that has Nautilus, Nemo or the Caja File Browser.I'm not sure it will work with all the themes you've installed but it will with basic ones.

sudo add-apt-repository ppa:costales/folder-color
sudo apt-get update
sudo apt-get install folder-color
nautilus -q


This functionality is back in GNOME 3.8 now that Files is a Search Provider. It was taken out of GNOME 3.4 in order to make use of Providers instead, and only came back in 3.8. As Ubuntu 13.04 uses GNOME 3.6, you'll need to add the GNOME PPA to get 3.8 with recent files in the Shell Overview search. gnome archives


Based on the output of lsblk, one can safely say that both Ubuntu and Windows are correct: you do not have another hard drive installed on that computer. That said, many years of supporting people with Dell devices leads to the following probable solutions ... though your mileage may vary.
First, let's review the report regarding the hard drive that you provided:

This was at one time used in an external dock
You can hear it spin
You can see the drive in your BIOS
Booting the computer in either operating system is sluggish

If you can hear it spin, this is a good indicator that the drive is receiving power, but not much else. Your boot partitions for both Ubuntu and Windows are on an NVMe device, so the systems should load in the same amount of time regardless of whether you have a spinning disk installed or not. However, the fact that it's taking longer leads me to believe you have one of two problems:

The hard drive is not properly seated in the HDD bay⇢ A loose hard drive might have enough of a connection for power, but the data lines of the SATA connection may not be completely seated. Confirm the hard drive is properly mounted and screwed into place.
The hard drive is damaged⇢ Just because a disk spins does not mean it's any good.

The fact that booting the system takes noticeably longer means the computer — and the operating systems — are trying to access the device that is reported by your BIOS and failing each time. This can be caused by a number of things. Your best bet would be to use the built-in disk diagnostics that ship with Dell notebooks to test the device.
Here's how you can do it:

Restart your notebook
When the Dell logo appears, press F12 key to enter the "One-time Boot Menu"
Use the arrow keys to select "Diagnostics" and press Enter
Follow the on-screen prompts to test your hard drive

If the disk is bad, the system will let you know.


How to lock screen 30 minutes after unlock

Run the script below in the background, and it will lock the screen after an arbitrary number of minutes:

The script

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

t = 0; max_t = int(sys.argv[1])

while True:
    # check runs once per minute
    time.sleep(60)
    # check the lock status, add 1 to current time if not locked, else t = 0
    try:
        subprocess.check_output(["pgrep", "-cf", "lockscreen-mode"]).decode("utf-8").strip()
        t = 0
    except subprocess.CalledProcessError:
        t += 1
    # if unlocked status time exceeds set time (in minutes), lock screen
    if t >= max_t:
        subprocess.Popen(["gnome-screensaver-command",  "-l"])
        t = 0

How to use

Copy the script into an empty file, save it as lock_screen.py
Test- run it from a terminal with the lock- time as an argument (minutes)

python3 /path/to/lock_screen.py 30

(Although for the test, I'd take a shorter time)
If all works fine, add it to Startup Applications Dash > Startup Applications > Add. Add the command:

python3 /path/to/lock_screen.py 30


Patch, compile and run Wine without installing

If you have Wine installed through package management, the wine binary is located in /usr/bin. Then just compile the patched Wine version.

You can apply the patches and compile Wine. After the following two commands you can test Wine from the build directory:

./configure
make

To install Wine (optional if you plan on running Wine from the build directory). If you run this command, thewine binary usually installs to /usr/local/bin. If you want to define the install location, you can use the configure parameter, for example: ./configure --prefix=/opt/wine157 which installs Wine to /opt/wine157

sudo make install

Example (on 64 bit system):

wget http://mirrors.ibiblio.org/wine/source/1.5/wine-1.5.7.tar.bz2
tar -xvf wine-1.5.7.tar.bz2
cd wine-1.5.7
wget ftp://ftp.etersoft.ru/pub/people/amorozov/usb/1.5.7/0001-Add-support-of-native-Windows-drivers-for-USB-tokens.txt
wget ftp://ftp.etersoft.ru/pub/people/amorozov/usb/1.5.7/0002-Re-generate-some-files.txt
patch -p1 < 0001*.txt
patch -p1 < 0002*.txt
./configure --enable-win64
make

To show the Wine version from the build directory:

./wine64 --version

Installation:

sudo make install

Uninstall:

sudo make uninstall

See:

How to compile wine
Installing Wine 1.5: configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries
Building 32-bit Wine on a 64-bit (x86-64) system


Fixed! A simple fix really. Purged light dm, and installed it again.


Audio continues playing after switching users

That is probably working like currently designed. When switching users, all application of that user keep running by design. You may need to rely somewhat on the citizenship and discipline of the other users and ask them to close audio players when they leave the computer, or ask help of a user with root privileges (that might be you) to terminate these processes of the other user.


The sudo password is the password for your account.  So, when you first made your personal account installing Ubuntu, it asked you to make a password.  However, blanks can be done as well, or no password.


Is the MAC address of the Wi-fi network card the same if I use Windows and Linux on my laptop?

You can change the MAC address using macchanger:

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

IIRC it will revert back to its original value at boot. So if you dual-boot between Microsoft Windows and GNU/Linux, then you could simply change the MAC address to another MAC address every time you boot GNU/Linux.

This way you system will have MAC address A when running Microsoft Windows and MAC address B when running GNU/Linux.


Text to speech for selected text ubuntu 16.04

user597291 here again (don't have an account). Figured out how to do it with a single keybinding.

You can use xclip to take the primary selected text (i.e. highlighted text), then pipe that into the clipboard.

From there use xsel to take the clipboard text and pipe that to espeak. I also recommend sanitizing newlines, otherwise espeak will only read the last paragraph.

Method 1 (separate file):

The way I do it, the keybinding calls a script that does all of this which looks like sh ~/.custom-scripts/play-selected-text in the keyboard binding command.

The script looks like this.

#! /bin/bash

xclip -out -selection primary | xclip -in -selection clipboard
xsel --clipboard | tr "\n" " " | espeak

Method 2 (directly in keybind):

If you don't need a separate folder for custom scripts, you can just put this into the keyboard binding command section.

xclip -out -selection primary | xclip -in -selection clipboard; xsel --clipboard | tr "\n" " " | espeak


Sure, it's possible. Just install patched version of NotifyOSD.

sudo add-apt-repository ppa:leolik/leolik
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libnotify-bin
pkill notify-osd

What You also need is NotifyOSDConfig to configure it.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install notifyosdconfig

Now You can specify in which area of the screen You would like notifications to show up.

gsettings set com.canonical.notify-osd gravity 1

This is default option - You can also use all numbers from 1-6.

Now just run notifyosdconfig and You can change various settings - also opacity.

More information and video can be found here: http://www.webupd8.org/2012/11/patched-notifyosd-with-close-on-click.html .


Automatically start Bash script when opening a graphical program

This is probably the easiest way to do what you want.

#!/usr/bin/env bash

# Define the program to waitfor.
program_to_watch=soffice.bin

my_commands() {
echo "This is where your first command goes."
echo "This is where your second command goes."
}

clear
echo "waitfor program script"
echo "Author: Kris Beazley"
echo "Apache 2.0 License"
echo ""
echo "$(date): Waiting for $program_to_watch to start."

while true
 do
  sleep 1
  if [[ $(ps -A | grep $program_to_watch) && -z $var ]]
    then
    var=true
    echo "$(date): $program_to_watch started."
    echo "$(date): Asking \"my_commands\" to start, and going back to sleep."
    echo "$(date): $(my_commands)"
  fi
  if [[ ! $(ps -A | grep $program_to_watch) && -n $var ]]
    then
    unset var
    echo "$(date): $program_to_watch closed."
    echo "$(date): Going back to sleep."
  fi
 done

Just copy this to a text file and set to an executable, but make sure line #!/usr/bin/env bash has no blank lines in front of it.

To set executable type:

chmod +x myscript.sh


Working fine.  credits to @A.B.

Following Steps :

1.If not, backup your configurations and install apache2 again via

sudo mv /etc/apache2 /etc/apache2.bak
sudo apt-get purge apache2
sudo apt-get install apache2

2.Restart your server and check if the problem is solved

sudo service apache2 restart

If you get a error message like

The apache2 configtest failed. Output of config test was: apache2:
Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error
on line 1 of /etc/apache2/mods-enabled/alias.load: Cannot load
/usr/lib/apache2/modules/mod_alias.so into server: /usr/lib/apache2
modules/mod_alias.so: cannot open shared object file: No such file or
directory Action 'configtest' failed. The Apache error log may have
more information.

3.reinstall apache2-bin via

sudo apt-get install --reinstall apache2-bin

because the file /usr/lib/apache2/modules/mod_alias.so is part of the package apache2-bin


From Thunderbird select:

Edit>Preferences>Composition>Languages then select the language required.

As this seems only to change the language of the spelling selected, the other alternative is to open a terminal Ctrl+Alt+t and enter the following commands:

sudo apt-get update
sudo apt-get install thunderbird-locale-en-gb

With acknowledgements to Mozilla Support Forum https://www.howtoinstall.co/en/ubuntu/trusty/thunderbird-locale-en-gb


Resulution problem after installing NVIDIA binary driver (v346.96)

The easiest thing to do is add the resolution using xrandr - this is a good guide. You would then need to add the xrandr configurations to a startup file, so that you'll get your desired resolution upon reboot/startup:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it: #!/bin/bash
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
sudo xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00
Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

OR you can go the easy way and use a program that does the above for you -  ResolutionX.


In case you're still able to boot in multi-user mode (which is the default and corresponds to runlevel 6), do a regular boot, then start a shell terminal window and run:

sudo telinit 1

...in order to switch to runlevel 1 (single user mode).

If you're unable to boot at all, you can use the method explained at https://askubuntu.com/a/132983/389062, but instead of holding the shift key you hold the Esc key to enter the GRUB menu, then press e to enter the GRUB editor, look for the first instance of splash $vt_handoff and change it to splash $vt_handoff 1, then press F10 (or hold Ctrl while you press X) in order to boot in single user mode (runlevel 1).

After you're finished doing whatever you wanted to do in single user mode, just run:

telinit 6

...in order to switch back to runlevel 6.


Errors were encountered while processing: android-studio

Just because the package manager continues following an interrupt doesn't mean that the package itself will not contain errors.

Try removing the package and starting the process over again.

First purge the package:

sudo apt-get purge android-studio

Then fix any remaining issues:

sudo dpkg --configure -a   or
sudo apt-get update

Run the installation again:

sudo apt-get install android-studio


Trouble configuring Apache virtual hosts in ubuntu server 12.04

Remove NameVirtualHost *:80 from your virtual host's file.  This is already in /etc/apache2/ports.conf by default.

I placed NameVirtualHost *:80 in one of my virtual host's files and can confirm that I got the same error.


how do I remove the last 5 lines in bash history?

You can achieve removal from the history file using the commandline in two steps:

Typing history -d <line_number> deletes a specified line from the history in memory.
Typing history -w writes the current in-memory history to the ~/.bash_history file.
The two steps together remove the line permanently from the in-memory history and from the .bash_history file as well.

Ref: StackExchange


How to encrypt Ubuntu 18.04 after installation?

You can encrypt the home directory after installation with 16.04, but not 18.04. Detail for 16.04 follows below. For 18.04, due to a change documented in http://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1756840 , reinstallation with full disk encryption is the best practice.

--

For 16.04 /home directory encryption, following these steps, which require logging in as another user (said user, if you don't have another user, can be deleted after the encryption):

sudo apt-get install ecryptfs-utils cryptsetup

'user' below should be replaced with your own username

sudo ecryptfs-migrate-home -u user

You must log in as the other user account immediately – before a reboot!
A copy of your original home directory was made. You can restore the backup directory
if you lose access to your files.
You should generate and record a recovery phrase.
You should encrypt your swap partition, too, as a next-to-last step, with sudo ecryptfs-setup-swap
Clean up.

Log out and log back in as your original user account. Do not reboot your system before logging back in!  It will prompt you to copy a Recovery Passphrase which should be saved in multiple places outside of the PC and zealously guarded.

You’ll have to remove the backup directory from a terminal with a command like the following one. Be very careful when using this command – you could accidentally delete your real home folder or another important system directory if you type the directory name wrong: sudo rm -rf /home/user.random


How do I restore unattended-upgrades default settings and conf files in 19.04?

Reinstalling the package (purge then install it again) seem to do the desired action— it will overwrite current configuration file (e.g. /etc/apt/apt.conf.d)/50unattended-upgrade to the default value.

sudo apt purge unattended-upgrades && sudo apt install unattended-upgrades

Tested on 18.04 machine.


Is there a way to blank 2 of 3 monitors with a shortcut or hotkey and leave primary monitor on?

I would tun xrandr to find out how my outputs were named and then, assuming my three montiors are called DVI-I-2, DVI-I-2 and DVI-I-3, use the following to leave DVI-I-1 on while toggling 2 and 3:

xrandr --output DVI-I-2 --off --output DVI-I-3 --off
xrandr --output DVI-I-2 --auto --output DVI-I-3 --auto

How you bind that into your workflow is up to you.

I haven't tested chaining multiple --output arguments (I only have two monitors), so you may need to split each command in two. And if --auto doesn't work, setting --mode explicitly should. man xrandr will show you the light.


can ubuntu run mail server, web server, file server and VPN server at the same time in one single computer

Yes, you can run all these services together on one machine.

Yes. A ubuntu desktop version and server version are the same system and differ only in the selection of packages installed during installation. Most importantly, a server edition doesn't install a desktop environment, therefore has none. If you would install a desktop environment in a server edition you would have one. A desktop edition, on the other hand doesn't install some services needed for servers (like ssh). But of course you can just install them if you need them. Therefore, if you use any edition of ubuntu, you can use it to install a mail, web or other server without problems.
A difference between the two editions that might be relevant for you is the network management used. GUI editions use NetworkManager to handle network connections while the server edition uses old but trusted /etc/network/interfaces file and ifupdown.


Ubuntu wouldn't start after installing updates, but then after a few restarts, its starting again

Ah. You have encountered Ubuntu's alpha stage self-repairing AI. (just kidding there)

Things like this happen all the time. Old objects are in cache, data is in the wrong place, and all sorts of problems occur. The system noticed something wrong and tried to reconfigure stuff back to the defaults. It may have also cleared system caches.


Is it possible to open multiple instances of Software Center?

It would be minimum useless since when you are installing software using the Ubuntu Software Center the system locks apt so that there are no 2 applications trying to alter files at the same time.

ie: You cant do sudo apt-get update (or use it for something similar) when you are installing software in the USC, the other way around is also true.


Yes it is possible to static your IP

The following steps describes how to configure static IP address on Ubuntu 14.04.

You need to edit the file /etc/network/interfaces.

I have used gedit as an editor. If you don't have it installed you can replace it with vim or whichever you have.

sudo  gedit /etc/network/interfaces

Then change to include the following:

# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#iface lo inet interface
iface eth0 inet static
address 192.168.1.122
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
~

eth0 is the regular ethernet interface
address is the static IP address you choose
gateway is usually the router's IP address
dns-nameservers is the dns server IP address, this is needed for domain name resolution

After the change you can either reboot or run

sudo ifdown eth0

sudo  ifup  eth0

Check now. Run terminal and type:

ifconfig


Use the following command to edit the following file:

sudo nano /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override

Then copy and paste this into the file and replace /foo/wallpaper.png with the actual path to the actual file you would like to use for wallpaper (remember to put it in ' marks or this won't work!):

[com.canonical.unity-greeter]
draw-user-backgrounds=false
background='/foo/wallpaper.png'

alternatively, to set it to default, use this instead:

[com.canonical.unity-greeter]
draw-user-backgrounds=true
background='/usr/share/backgrounds/warty-final-ubuntu.png'

Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit nano.

When you are finished, run the following command to apply the changes:

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

source


ubuntu mate 20.04, how to change color of "time" in the top bar

You need to head to Appearance Preferences and then Customise and then tinker the Controls and Window Border. Thanks.


Official Nvidia drivers not compatible with ubuntu

That's why you're supposed to use the driver which are distrubuted through Ubuntu repositories. When you download driver from Nvidia site, it will modify kernel.

The way you are supposed to get to the nvidia drivers (though not newest) is to open Software & Updates from your Ubuntu Dash, click on the Additional Drivers tab and pick the driver from the menu which you want. Chances are that the nuveau driver is already installed, but if you want the proprietary nvidia driver, choose it, click on Apply Changes and after and wait for a while.

A alternative way to install these these same drivers  - Open a terminal and type

sudo apt-get install nvidia-current

For the tested version, or for the bleeding edge version (possible bugs)

sudo apt-get install nvidia-current-updates


This error may happen because your user doesn't have the required privileges to access your scanner. Make sure your user is member of the scanner group.

You can add your user to that group from the Unity Control Center, and then logout and login again so the applications can see the change.


ALT+Tab: How to switch to Desktop on Ubuntu GNOME 17.04?

Press Ctrl + Super + D. Super is normally the windows key - the same which opens the acitivites overview.

To view shortcuts, open settings and go to Keyboard and then the Shortcuts tab. This shortcut is "Hide all normal windows" under Navigation.

Incedentally, Super + D also works for me - I'm not sure why!

My pronouns are He / Him


How to get Eclipse Mars 4.5 in Ubuntu 16.04?

You can't get it directly from the standard Ubuntu repository, but you can add this PPA that has Eclipse 4.5 through apt:

sudo apt-add-repository ppa:mmk2410/eclipse-ide-java

Ref: https://launchpad.net/~mmk2410/+archive/ubuntu/eclipse-ide-java


Want to remove all printers but cant - printers keep returning

Removing cups-browsed may not be the correct approach. You've effectively removed potentially useful functionality from your Ubuntu system.
Instead, the issue is not with your Ubuntu system. Your printers are setup to broadcast their services, and any system running cups-browsed is going to pick them up.

cups-browsed is "a  daemon  for  browsing  the  Bonjour
broadcasts of shared, remote CUPS printers."

Bonjour, "also known as zero-configuration networking, enables
automatic discovery of devices and services on a local network."

Therefore, a better approach may be to turn off Bonjour on your printer. Bonjour can be easily disabled for individual printers without uninstalling software on every computer on your local network.
Note that turning off Bonjour does not prevent you from printing to and communicating with your printer, as long as you have explicitly set it up in Ubuntu.
Your printer should have a setting to turn Bonjour on and off. Here is an example from an HP printer...


No Wireless Networks are available (Ubuntu 16.04 LTS)

Few questions:

1) What model macbook Pro do you have?

You can flip it over its on top of the back plate

2) Can you get Ethernet if so plug it in and run

sudo apt-get update
sudo apt-get install firmware-b43-installer
sudo apt-get upgrade
sudo reboot

3) If step #2 does not work  can you paste the out put of

lspci | grep "Netowork"


I connected LAN and even that wasnt working. So I went into its settings and clicked on reset and the LAN started working.

Then I tried "Use this driver" again and the stupid thing started working again. :)


How do I execute a script after DHCP assigns an IP address on start up?

Hooks

There is an array of possibilities how to do this.
If you want to execute your script " after DHCP runs " then hooks are the right thing for you !
dhclient will execute everything in the directory /etc/dhcp/dhclient-exit-hooks.d/ after it exits.*
Its good practice to link your script to the directory, rather than place it there - but both works.
ln -s /path/to/your/script  /etc/dhcp/dhclient-exit-hooks.d/name_of_your_script

(*) However, dhclient doesn't "exit" per se, but rather continues to run and executes ("sources") this directory every-time it does something for a reason.
So, to prohibit your script from being executed numerous times, I suggest you wrap it with an "if statement" to execute it only if the IP address is bound or renewed like this:
if ([ $reason = "BOUND" ] || [ $reason = "RENEW" ])
then

# your script commands here

fi


Not able to make Windows as a default OS in GRUB2

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

Using these commands i am able resolve this issue


The module will refuse to load by default.
You can try to force it with modprobe -f. Maybe you are lucky.
Best method is to recompile it against the new kernel. Look into DKMS, that's what is used in Ubuntu for packages that use kernel modules. Here is an example with a mouse module.
Another possible method might be to post the file on a (relevant) mailing list and ask if someone could/can recompile it.

But ... having a source file might be crucial.


Install ubuntu 14.04 with pxe using local repository

In order to support installation from the local repository, the line in /etc/apt/mirror.list should be

deb-amd64 http://archive.ubuntu.com/ubuntu trusty main main/debian-installer restricted restricted/debian-installer


All internal drives are showing as removable, but actual removable drives no longer auto-mount

I was able to figure it out.  The udisks2.service was masked.  I had to run systemctl unmask udisks2.service and then systemctl enable udisks2.service.  After a reboot both problems were solved.


Install Conky in Ubuntu/Linux Mint open terminal Ctrl+Alt+T and copy the following commands in the Terminal:

sudo apt-get install conky conky-all

First of all Download Startup script with following commands:

cd && wget -O .start-conky http://goo.gl/6RrEw
chmod +x .start-conky

Now open Startup Applications > click Add  > New Dialog box will open click on Browse > Now press Ctrl+H see following screenshot.

>> Infinity Conky for Ethernet

To Install Infinity-Conky open Terminal and enter following commands:

cd && wget -O infinity-noobslab-eth1.zip http://goo.gl/ZiFbd
unzip infinity-noobslab-eth1.zip && rm infinity-noobslab-eth1.zip

>> Infinity Conky for Wifi

To Install Infinity-Conky open Terminal and enter following commands:

cd && wget -O infinity-noobslab-wlan1.zip http://goo.gl/qkIWg
unzip infinity-noobslab-wlan1.zip && rm infinity-noobslab-wlan1.zip

>> If gadget doesn't fit in your screen, you can change size in line 43 (minimum_size).
Enter Following command to open file in text editor and change size:

nano ~/.conkyrc


Move snap packages to another location/directory

Change snaps installation directory
This is a common issue that many ask for. It seems snap developers are not intending to solve it soon, so some solutions were suggested.
The first solution that was strongly refused by the community,but I didn't try, is to use symbolic links to link the directories that lead to snaps. This method seems not to work as the community replies says that apparmom does not work with symbolic links.
The Second solution is mount --bind the directory /val/lib/snapd/snaps which works fine for me with the already installed applications but failed to install new applications because I was moving the directory to another partition. That gave me an error about hard linking the snap application with the cache directory which is located in /var/lib/snapd/cache. I don't know if this solution may work if the location are in the same partition or not; but this is the reason why I am moving the snap directory to free some space from partition to another one.
Third and working option is to move the /var/lib/snapd directory as a whole then mount --bind to it from another location and that worked for me and here is the steps.
Just a small note, you already know, after the rsync is done in the below steps, you can backup the data inside /var/lib/snapd to another location until the whole process is successfully done then you can remove the backup data if you want to free more space but keep /var/lib/snapd directory itself even free, as it is used by the mount point.
##############################################################################
# Take Care this section may break the System !!!
##############################################################################
##Move snap folder to Home instead of root.
#Create the directory : you can change the location
mkdir -p /home/$USER/snap/snapd

#Copy the data
sudo rsync -avzP /var/lib/snapd/  /home/$USER/snap/snapd/

#Do backups
sudo mv /var/lib/snapd /var/lib/snapd.bak
sudo cp /etc/fstab /etc/fstab.bak

#Change fstab (Change $USER with your name or change the path totally)
echo "/home/$USER/snap/snapd /var/lib/snapd none bind 0 0" | sudo tee -a /etc/fstab

#remount fstab Or reboot.
sudo mkdir /var/lib/snapd
sudo mount -a

if ls  /var/lib/snapd/ | grep snaps
then
    echo "Re-mounting snapd folder is done successfully. !!!!"
    sudo rm -rf /var/lib/snapd.bak
else
    echo "WARNING : Re-mounting snapd folder failed, please revert !!!!! "
    echo "WARNING : Re-mounting snapd folder failed, please revert !!!!! "
    echo "WARNING : Re-mounting snapd folder failed, please revert !!!!! "
    echo "WARNING : Re-mounting snapd folder failed, please revert !!!!! "
    echo "WARNING : Re-mounting snapd folder failed, please revert !!!!! "

    # Trying to revert automatically
    sudo cp /etc/fstab.bak /etc/fstab

    sudo mount -a
    sudo umount /var/lib/snapd

    sudo mv /var/lib/snapd.bak /var/lib/snapd

    echo "Files located at ~/snap/snapd should be removed, but are kept for
    recovery until you, manually reboot the system and make sure the service
    is running correctly. Then you can manually remove the folder ~/snap/snapd
    !!!!!!!!!!!!!!, you should do that manually."

fi
##############################################################################
# Take care the previous section may break the System !!!
##############################################################################

References

Custom disk location for certain snaps issue
ask ubuntu Question  (Not best solution) Link
Suggestion to use bind mount instead of symbolic links in moving snap directories Link
Differences between bind mount and symbolic links Link
Make bind mount permenant


Why do Synaptic and Update Manager not use overlay scrollbars?

This was actually a bug which was reported on launchpad.net , it was confirmed by the Ubuntu Team and then subsequently fixed.

You can see the history of this bug here:

https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/843456


Can one modify ubuntu and publish it as their own linux distro?

There are plenty examples out there so yes (here is a list of 3rd party operating systems based on Ubuntu). But you are not allowed to use ...

the name Ubuntu or use any name that looks like Ubuntu.
the Ubuntu and Canonical pictures/images/logos.
you also may not give the impression your release is in any way related to Ubuntu or Canonical. "This release is based on Ubuntu 14.04" is the closest you probably can get to using a reference to Ubuntu.

So creating your own release is more than just a change in a setting in a kernel you will need to do.


How do I install the Fortran 9x compiler?

Install gfortran.

From man gfortran

   -std=std
       Specify the standard to which the program is expected to conform,
       which may be one of f95, f2003, f2008, gnu, or legacy.  The default
       value for std is gnu, which specifies a superset of the Fortran 95
       standard that includes all of the extensions supported by GNU
       Fortran, although warnings will be given for obsolete extensions
       not recommended for use in new code.  The legacy value is
       equivalent but without the warnings for obsolete extensions, and
       may be useful for old non-standard programs.  The f95, f2003 and
       f2008 values specify strict conformance to the Fortran 95, Fortran
       2003 and Fortran 2008 standards, respectively; errors are given for
       all extensions beyond the relevant language standard, and warnings
       are given for the Fortran 77 features that are permitted but
       obsolescent in later standards. -std=f2008ts allows the Fortran
       2008 standard including the additions of the Technical
       Specification (TS) 29113 on Further Interoperability of Fortran
       with C and TS 18508 on Additional Parallel Features in Fortran.


Does ClamAV provide any documentation on malware signatures?

Use the command:

sigtool --find-sigs <virus name> | awk ‘{ print $2 }’ | sigtool --decode-sigs

This will find the signature pull the signature part from the output and the turn it into “plain language”. The exception are hashes which just indicate the whole is known bad.

Then you can look for that plain language in the files in question and determine if it’s accurate or a false positive.

Update:
The use of sigtool in this fashion (--find-sigs and --decode-sigs) is not covered explicitly in the signature creation documentation (signatures.pdf). The documentation covers everything else needed to create your own signatures, including the accepted naming conventions and a description of what they imply (section 3.10 Signature names ... ClamAV uses the following prefixes for signature names ...)

Beyond that, it is an exercise for the end-user to determine if something detected is actually malicious or if it's a false positive, and the way to do that is to understand what the signature is looking for and where it is in the impacted file. As I mentioned, the only thing that doesn't work with is hashes. The best you can do for those is look up the hash in various online scanners and get a sense for what other engines are detecting them as and looking up the virus names as well.

If these two things (the existing documentation and the use of sigtool), do not answer the question then the question needs to be rephrased so it is clearer as to the intent of the question. The 'why' someone thought something is malicious should be clear from the decoded virus signature. If it's not, or if you disagree with the detection, it should be reported as a false positive so the signature can be improved / clarified / etc.

Looking at Win.Exploit.Unicode_Mixed-1 as an example, I would say that it's not a great sig for exactly this reason (it's not immediately clear what about that sequence is malicious).

It's unclear (to me) what about that sequence is malicious though it's probably something that is common to mixed unicode script exploitation (but again, that's a guess). From the name of the virus, the expectation would be that you would find it on Windows systems or on something that Windows systems can access and there's likely an exploit related to mixing unicode characters and non-unicode characters that matches that signature. With that information you can simply do a quick Google search for "Windows mixed unicode exploit" which will bring up 133,000+ results of sites talking about building exploits to take advantage of Unicode processing issues in Windows.

If you're seeing that in tcpdump output on your IDS, then it's likely a case of either one of your systems pulling that data from an exploited remote system (like a web server).

The OP was asking if there are "plans to regulate the signature names so that they are more regular and people actually know what they mean"...and that IS in the signature writing documentation. Or, at least, the guidelines are presented there which the ClamAV folks try to follow and recommend to others. If you are pulling from other third-party sources, they probably have their own naming conventions.

The OP is correct that the list of names in the documentation is woefully incomplete even for the signatures that ClamAV writes. But seeing as ClamAV is open-source and pretty much anyone can write signatures for it without approval from the ClamAV authors, there is zero chance of "regulation" of signature names.

The best you can do is break down the name, look at the signature definition, and Google. And sigtool will, at the very least, tell you what ClamAV is seeing as malicious even if it doesn't tell you why the signature author thought it was malicious to begin with.


Dell Inspiron 3520, installed 12.10 Can't get wifi to work

First thing you need to do is download the driver.
Do a google search for 'broadcom bcm43142 driver linux download deb'
Download the appropriate .deb file.
Then assuming you downloaded to ~/Downloads open a terminal and:

sudo apt-get install dkms
cd ~/Downloads
dpkg -i wire*.deb

This will install DKMS first then the driver.
You then need to reboot.

Hope this helps.


Emoji disappear when I print, export to pdf, or download a pdf after update to 20.04

It was written, that it is a bug: https://bugs.documentfoundation.org/show_bug.cgi?id=104403


Have you tried echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf and reboot


Will Ubuntu work on a GPT-partitioned 3TB disk?

If you're asking about Windows, this is probably the wrong place, but according to https://en.wikipedia.org/wiki/GUID_Partition_Table#OS_support_of_GPT you will need Windows 7 64-bit on a computer with EFI for it to work. Ubuntu should work fine with it in either case.


Chromium takes too long to load! (1+ minute)

There is a flag

--disable-gpu which may help since it is a compositor issue on a headless chrome


How can I rotate videos across platforms?

If you're using kubuntu you may want to try kdenlive (available from official repos), which is a really powerful video editor. It may be somewhat daunting, but it's user-friendly enough to give it a try.


Can my machine run Ubuntu( kubuntu | xubuntu | mint ) 12.04 WELL?

I read in a thread at ubuntuforums.org  that between actions from Canononical and NVIDA, support for my video card likely got inadvertently dropped in 12.04.  I'm guessing that led to a large part, if not all of my upgrade problems.

My system was running Ubuntu 10.10, which had updates turned off and support withdrawn this year.

I thought Unity was cool. However, I don't have a wide screen monitor and I'm doing more development at home these days. Learning new habits while programming would likely drive me bats right now since I am so busy.

So between the issue of Unity being very different and 12.04 not liking my hardware I decided not to upgrade to Ubuntu 12.04, but do a clean install of XUbuntu 11.10 instead.

I'm enjoying the simplicity of XUbuntu. Support for 11.10 only lasts until 2013 April. My computer will be 10 years old as of March that year.

At that point 1 of 3 things might happen:

the Nvidia support issue with 12.04 will be resolved
I will buy a new PC with new hardware that will be supported
I will go Mac

Either way the problem will be solved and as for right now I am back in business at home with a minimum of hassle.


How do you encrypt data before storing it?

What are your goals in encrypting your data?
The Ubuntu installer offers an option to encrypt your Ubuntu installation, using a technique known as "full disk encryption". When you boot your computer, you'll need to enter a passphrase that is used to decrypt the key that is used to encrypt your filesystem. If someone steals your computer, or your drive, and it is powered off, they'll need the passphrase before they can access your data.
If your concern is what other people on the system can see while it's running, then full disk encryption may not help much: but using file system permissions correctly can help keep non-root users from your files. Encrypting your files with gpg or other tools may help, in case your permissions settings aren't correct. However, working with gpg or other tools for this case can be a bit exhausting: it certainly isn't as easy as one passphrase at each boot.


What is the difference between the 'sudo' and 'admin' group?

Ubuntu 12.04 LTS and later

Administrators are added to the sudo group, but the admin group is supported for backward compatibility. From the release notes:

  Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the admin Unix group. In Ubuntu 12.04, administrator access will be granted via the sudo group. This makes Ubuntu more consistent with the upstream implementation and Debian. For compatibility purposes, the admin group will continue to provide sudo/administrator access in 12.04.

It is not created when you do a fresh install, though it is still present if you upgraded from previous distributions. Either way, the admin group appears in the /etc/sudoers file.

See implementation details and the official documentation.


MP3 files cut off in the Ubuntu One Android app

We are aware of the issue, and will fix it as soon as possible. You can subscribe to the bug on launchpad to stay up to date with the progress we make on this.


Error when trying to install Google Chrome

I don't know why but libudev0 is not shipped with raring, I think. (Atleast I dont know which package to install). But the deb files are there for 64 bit and 32 bit

So, please do the following

For 64 bit machines,

wget http://launchpadlibrarian.net/132294155/libudev0_175-0ubuntu19_amd64.deb
sudo dpkg -i libudev0_175-0ubuntu19_amd64.deb

For 32 bit machines,

wget http://launchpadlibrarian.net/132294322/libudev0_175-0ubuntu19_i386.deb
sudo dpkg -i libudev0_175-0ubuntu19_i386.deb

This installs Chrome

sudo apt-get install google-chrome-stable

The first command downloads the .deb installer for libudev0
The second command installs the libudev0
The third command installs google chrome

This works for me :)


Xubuntu is Ubuntu, but with an alternate desktop environment. Just run sudo apt-get install xubuntu-desktop in a terminal. Then log out and click the gear icon that appears next to your name in the password box. Select Xubuntu Desktop (it might be XFCE) from the menu and log back in. You'll now be in Xubuntu. If you want to switch back, just select Ubuntu Desktop in that same menu.


readpst error "could not get root record"

I had this issue using the -S switch. I compacted the PST and then it seemed to work.
According to the source code comment the problem is "first record is main record":

d_ptr = pstfile.d_head; // first record is main record
item  = pst_parse_item(&pstfile, d_ptr, NULL);
if (!item || !item->message_store) {
    DEBUG_RET();
    DIE(("Could not get root record\n"));
}

Hope this helps anyone with the same problem.


It thinks /.photoshop is a file extension, throwing it off. You need to insert a VALID picture and file extension.


Unable to install "google-chrome-stable_current_amd64.deb" pakage?

You can do nothing.

Google decided to stop supporting 32bit with Chrome.
So, either you move to a 64bit system, or you stop using Google Chrome.

It is a company (Google) choice and the only thing that the community can help you with, is giving you alternatives (like the open source Chromium Browser, on which Google Chrome is based).


Unable to edit files in mounted partition

I had the exact same setup and faced the same problem. So here is a solution:

Make sure fast startup is turned off in Windows Control Panel\Hardware and Sound\Power Options\System Settings.
Make sure you have shut down your PC and not hibernated it with windows.


It is more beneficial to dual boot Ubuntu with Windows for you now if you are willing to give Ubuntu a shot and in 95% of the cases no errors will pop up!

Be aware of the process as it may give some problems only in the first boot process, I suggest going through the following thread and print it or have an offline copy:

Lost Windows 7 in GRUB after installing Ubuntu 14.04

Mainly this is what you will need in case windows boot failed (mentioned in the previous link):

https://help.ubuntu.com/community/Boot-Repair

Some problems also may arise for your graphic cards management, at first it will detect the Intel chipset and work perfectly with it, if you found your self comfortable then no need for installing the nVidia chipset driver (depending on your work).

After being familiar with the environment you will see yourself depending on Ubuntu in every day-to-day tasks :)


I'm having trouble with make command for obs browser plugin

The instructions say

  "Run make in the obs-qtwebkit directory to build the plugin."

If you unpacked the archive in /home/nate/Downloads/obs-qtwebkit-master, that translates to

cd /home/nate/Downloads/obs-qtwebkit-master/obs-qtwebkit
make

rather than

make '/home/nate/Downloads/obs-qtwebkit-master'


if you want, im created a applet for ubuntu based in code https://github.com/jergusg/k380-function-keys-conf

https://github.com/carlossil01/k380-function-keys-conf-applet

thanks.


Disable Auto Opening of URLs when output from a command in terminal / guake

This is a feature of drush.
To disable it, pass --no-browser as an argument for the drush command.

For a more permanent solution, add the following to your drushrc.php file:

$command_specific['user-login'] = ['browser' => 0];

The drushrc.php file is located in the ~/.drush folder. You can create it if the file is not present.

Source: https://github.com/drush-ops/drush/issues/153


How do I loopback 2 input streams + line-in to line-out? (12.04)

It is possible to loopback multiple sources to same sink.

Check sources list (For me, I have only one microphone source: id=2)

$ pactl list short sources
0   alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor    module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
1   alsa_output.pci-0000_00_1b.0.analog-stereo.monitor  module-alsa-card.c  s16le 2ch 44100Hz   IDLE
2   alsa_input.pci-0000_00_1b.0.analog-stereo   module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED

Create a new virtual sink

pactl load-module module-null-sink sink_name=Virtual1 sink_properties=device.description=Virtual1

Loopback sources to Virtual1 sink (one by one), by id:

pactl load-module module-loopback sink=Virtual1 source=2

or by name:

pactl load-module module-loopback sink=Virtual1 source=alsa_input.pci-0000_00_1b.0.analog-stereo

See Share an audio playback stream through a live audio (video) conversation like Skype


removing all desktop environments installed and get a new one

If you do it like this I would suggest a re-install. And next time use a container (a Ubuntu installed in virtualbox or vmware) to play with desktops and not the system to actually use. Removing a container is easy. Restoring an OS is also possible but artifacts (configuration files or settings) might remain. Less hassle to just re-install.

  And any suggestions for the environments? Im looking for something with a good UI.

You forgot to define what "good" means. Unity is excellent. So are KDE, XFCE and LXDE. To each their own ...


Ubuntu 18.04 stuck in login loop due to unmet dependencies

I solved this by logging in via command prompt then entering the command:

sudo ubuntu-drivers autoinstall

This installed the correct NVIDIA GPU drivers and then it worked fine after restart.


file index with realtime search capabilities

hmmm... how about this very basic text-file DIY idea? It only updates when you run it, could have a new "index" file every day or whenever you'd like.
 sudo find / -type f -print > allfiles.txt

Then just grep "showmethis" allfiles.txt to find things... see their man pages for more info.

Or try some of these software packages available:
Basenji - Cross-platform media indexing/search tool - https://launchpad.net/basenji

Basenji is an indexing and search tool designed for easy and fast indexing
of media collections. Once indexed, removable media such as CDs and
USB sticks can be browsed and searched for specific files very quickly,
without actually being connected to the computer. Besides file hierarchies
and audio track listings, Basenji also presents extracted metadata
(image dimensions, mp3 tags etc.) and content previews of indexed media in a
clean and straightforward user interface.

Catfish - Catfish is a handy file searching tool for Linux and UNIX. The interface is intentionally lightweight and simple, using only Gtk+3. You can configure it to your needs by using several command line options.

Kfind - KFind can be used to find files and directories on your system. Part of the KDE base applications, so probably wants ~150MB of dependencies installed too if you're not using other K stuff.
Some other command-line options too:

doodle - a tool to search the meta-data in your files
locate - maintain and query an index of a directory tree

updatedb generates an index of files and directories. GNU locate can be used to quickly query this index.

mlocate - new implementation of locate, "improved"?


How to auto associate Microsoft Office extensions to Libre Office

Just right click on the document, and choose Open With LibreOffice Writer.

If not listed, click on Open With Other Application, and then choose LibreOffice Writer.

Or right click on the file, choose Properties, and then click on Open With, choose Libreoffice Writer, and then click Set as Default.

I would recommend that you completly remove LibreOffice, and re-install it.
To remove:

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

To Install the latest:

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice


ADmesh

ADmesh is the dmesh which is in Ubuntu main repository

Can install with

sudo apt-get install admesh


If ufw is configured to block outgoing traffic (which is not default policy) your ssh connection is blocked. You have to allow it.

sudo ufw allow out 22

On the server side ufw must be configured to allow incoming ssh connection (default port 22)

sudo ufw allow 22


Creating several files in different directories

If I understood you correctly, you want something like this:

for ((i=1;i<=1000;i++)); do
    mkdir -p inp/dir$i
    printf 'x=%s\ny=5s\n' "$i" > inp/dir$i/input_file.txt
done


How to connect with Flash One 1x EVDO CDMA (type st804) Modem

connect the modem to your usb port . then click at network applet that will exists at top panel of your desktop . after clicking selectedit  connections . then there create a connection to your modem at mobile broadband with new option . give enough feta details like apn and all. then save it and click at  your network applets and select your connection .


Is it possible to use two laptops as dual display monitors in the same X Session?

No, you cannot do this, because there is no way to connect the screen on the second laptop to the video output of the first.


How do I connect my NextCloud account to Ubuntu using a self-signed certificate?

Firefox uses its own certificate store, so it does not affect Online Accounts. But if you add your self-signed certificate to the root trust store of the system, then it should work. This Ask Ubuntu question deals exactly with this: How do I install a root certificate?


Where to find the Disk Image Mounter? is not in Dash, where it is?

Disk Image Mounter is intended to be used when right clicking an ISO file:

By default, it's not shown in the Dash.

To make it visible, do the following:

sudo nano /usr/share/applications/gnome-disk-image-mounter.desktop
Go down to the line that begins with:

NoDisplay=true

And put a # in front of it.

#NoDisplay=true

Save the changes by Ctrl+X, then Y, thenEnter.

Now, you should find it in the Dash:


LUKS encrypted HD opens with 1 click in Files - can this be scripted?

The Arch Wiki gives a pretty good overview:

https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#Mounting_at_boot_time

As long as the keyfile is accessible during boot time, it should be possible to do what you want to do. I don't know what you mean by "/etc/crypttab is processed too early during booting" - I unlock my home partition just fine as described in the link.

Then of course you have to ask yourself what use an encrypted partition is that is unlocked on booting without entering any password. Probably you will want to put the keyfile on a removable thumbdrive.


I cannot adjust brightness of my laptop HP g4 1351tx

I fixed it yesterday.
I just changed the driver version to Nvidia binary driver 331.113 by KDE system control panel.

By the way, I uninstalled the gnome desktop and installed the KDE instead.
The driver I selected doesn't work on gnome desktop, but works fine on KDE, I don't know why.

And after that I found that my nvidia display card was claimed while the Intel display card was still unclaimed. However, the brightness still couldn't be adjusted.

I kept searching for that and finally removed the boot parameter "nosplash nomodeset".
I added the parameter when I installed the ubuntu and without it ubuntu couldn't boot.

Since I've changed the open source driver to the nvidia closed source  driver and my desktop environment runs smoothly.

There's no need to adding the parameter so I removed it.

In some way, the parameter must be removed once I selected the correct driver so that the Intel display card can be claimed.

That means, if I don't select the correct driver and my display cards are unclaimed, I must use the parameter "nosplash nomodeset" to make ubuntu boot normally.


You need the recovery-krillin.img file linked on the Devices wiki page, in order to re-flash the factory E4.5. You then need to run the same ubuntu-device-flash command you are currently running with the --recovery-image=recovery-krillin.img argument appended.


How do I partition my system so that my SSD houses ONLY the Ubuntu OS and will allow ONLY the Ubuntu OS to reside there?

You can separate the base of your Ubuntu installation (/) from the main data area (/home). This is done during installation.

Boot into the Ubuntu installer and choose the Try Ubuntu before installing option when prompted.
Open Gparted and let it scan your drives.

Since your drives are new, I'm going to outline a few extra steps here to make sure everything goes well.

Select one of the drives from the dropdown in the top right of the window. Either one is fine, and one should already be selected. Just make sure it isn't your USB stick or DVD.
Under the Device menu at the top of the window, select Create a new partition table.
Choose the GPT option and Apply out of the window.
Select the other drive and follow the same process.
Now, re-select the drive you selected first.
Right click the area that says Unallocated Space, and choose the option to create a new partition in that space.
Make the filesystem of that new partition ext4, and make sure it is going to be made a Primary Partition. You can give the drive a label if you want, but it is completely optional.
Do the same partition creation process for the second drive.
Now that you have all those operations queued, click the green check-mark at the top of the window to apply them.
Once that is done, close Gparted and open the Ubuntu installer.
Go through the steps until you are prompted with a window that gives you options on how you want to install Ubuntu. Choose the Something Else... option and click Next.
Here, right click the partition on your SSD and go into its Properties.
Make the mountpoint / and hit OK. You can check the option to format as ext4 if you want, but you don't need to.
Go into the Properties of the HDD partition and mount it as /home.
Once all that's done, continue with the installation.
Reboot once the installation is done, and you should have Ubuntu on your SSD and your data on your HDD.

If you ever end up running out of space on the SSD (very unlikely unless you make another partition on it), you can move some folders from the SSD over to the HDD and symlink to them from their original locations, but this doesn't always work very well, and cannot be done with many folders. It would have to be another question with another answer.

If you have any questions, comment.


install google-chrome isnt working, why?

The fail-proof method of installing Chromium (open-source version of Chrome) would be to open a Terminal window and type:

sudo apt-get install chromium-browser

Alternatively, installing Chrome from Terminal window is like this:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i ./google-chrome*.deb
sudo apt-get install -f


Best Disk Partitioning Scheme for a Java EE Developer Machine

Use LVM2. That way you can dynamically create, remove, grow and shrink filesystems. Don't assign more space than you actually require and extend the filesystem when needed. It is easy to add a new install to the same disk, making the machine multiple boot (provided it supports LVM2 too). It is perfect for testing new OS releases before you wipe out the old one, either through separate LV's or through snapshots.

I use:

- /         2GB - more than enough, 1GB should do just as well.
- /var     10GB - you want some extra space here to accomodate updates/installation filess
- /var/log  5GB - you don't want applications to crash because of logfiles growing harder than you expected.
- /usr     10GB - this is where all your applications install
- /home     8GB - I have this on a different disk *and* I have extra filesystems for special directories eg. mail, music, iso-files, ...
- /tmp     50GB - I regulary do some fiddling with large temporary data files...

There is not really a good or a bad, it all depends on what you do and how much money you can spend.

=> Keep in mind that extending a file system is easy, whereas shrinking it is difficult.


I have to "stab" at the upper left corner to get launcher to appear

Try increasing the reveal sensitivity of the launcher.  This setting can be found by opening the System Settings app, selecting Appearance, and clicking on the Behavior tab. You can adjust the sensitivity with the slider, and also choose between the top-left corner or the entire left side as the hotspot.


Not able to install VLC Player or Audacity Ubuntu Software Center

Ok, here's what you can do. We'll try and install both the programs through the command line because that way, we'll be able to see more information on what exactly is happening. Before we start, make sure that you are connected to the internet. Then, follow the bellow steps:

Step 1

Hit Ctrl+Alt+T. This will open up a window, called a terminal. In this window, first, type the following:

sudo apt-get update

Enter your password when asked for it. This will then start showing lots of lines. This simply updates your "sources", so that when you install a program, you can do it seemlessly.

Step 2

Next, type the following:

sudo apt-get install audacity

You should get something like the following:

alaa@aa-UBUNTU:~$ sudo apt-get install audacity
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  audacity-data libflac++6 libid3tag0 libportsmf0 libsbsms10 libsoundtouch0 libsoxr0 libvamp-hostsdk3
Suggested packages:
  ladspa-plugin
The following NEW packages will be installed:
  audacity audacity-data libflac++6 libid3tag0 libportsmf0 libsbsms10 libsoundtouch0 libsoxr0 libvamp-hostsdk3
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,936 kB of archives.
After this operation, 16.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?

If you do get this, simply type y and hit enter. This will start downloading and installing Audacity. When it's done, simply search for Audacity in your programs and you'll find it there. If you did not get something similar to the above, or if something happened when you ran the sudo apt-get update command I gave you earlier, edit your message to include the error.

If everything went smoothly with you and Audacity installed correctly, you can do the same thing for VLC; you'd install it by typying:

sudo apt-get install vlc

EDIT

From the comments, it seems that your sources.list file is corrupted. Follow the following instructions:

In a terminal, type the following command:

gksu gedit /etc/apt/sources.list

Enter your password when prompted (the new one). This will open up a text editor like notepad, with some text inside it. Delete all the text inside, and copy all of the following to it:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring universe
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu raring partner
deb-src http://archive.canonical.com/ubuntu raring partner

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse

Hit Ctrl+S to save the file, and then close this window. This will take you back to the terminal. Now, follow the steps in my original answer (Step 1 and Step 2).


The good thing about Ubuntu is you really don't need to worry about disk partitions. If you are a normal user, and from your description, you are, you can go with the defaults quite happily, unless you have a burning desire to mess around, or if you have something which could increase in size in such a way as to fill up a partition (eg logging very verbose logs into /home could end up filling it and causing you problems, so doing that is generally not recommended)

Filesystems under unixes are not messy once you understand the structure - it is actually much more straightforward than Windows, for example.

You can of course move any part of your filesystem wherever you want - I tend to have my main music store (an external terabyte disk) mounted at /home/music but I could have put it anywhere.

Default under Ubuntu: Two partitions

/
swap

Common alternative: Three partitions

/
/home
swap


Create custom command to compile LaTeX files

I would use something simple, like

#!/bin/bash
rubber --pdf $1 && rubber --clean $1

then you save it in a folder in your $PATH and you are done.

I usually suggest to create (if not present) the folder ~/bin to contain your user's scripts, and then add it to your $PATH variable, following this solution.


Assuming you are running Ubuntu 16.04 - the default repositories offer currently homebank 5.0.3-2.

The launchpad-page lists no released 5.1 versions so far.

5.1rc is according to the project page a pre-release - which results in the following warnings:

use the prerelease version for testing only
backup your usual homebank file before doing anything
never save your usual homebank file with prerelease (change the name at least)

Ignoring those - the only option on Linux so far is downloading the source and then compiling the rc yourself on your machine.
The source archiv contains instructions how to compile/install the software - consider reading the detailed instructions in the file INSTALL.

Seems like it might be better to wait for a final 5.1 release.


Ubuntu 16.04 disconnecting from ethernet

EDIT:

Since you are using a VPN:

First, go into your NetworkManager settings and under the VPN settings for your network, in the "identity" section, open "advanced".

Then, untick "disable dead peer detection".

SOURCE

original answer to help people with a similar issue:

This looks like a problem with DHCP and there are a couple of things you can do to work around this problem. Also, since you have the same problem on Windows and Ubuntu, it is most likely a problem with your router but it may just be designed that way so according to your ISP, there technically is no "problem" with the router because it is functioning the way that it is designed. It could be some power saving feature on your computers and/or router or it could be something else that is causing a problem with DHCP.

To work around this problem you can set your local IP to a static IP in NetworkManager and also set the static IP for your computer in your router settings so that there is no DHCP lease to negotiate.

Click on the network manager icon on your desktop and then click "Edit Connections"
Double click on the connection (like, wired connection or whatever it is)
Click on the "IPV4 Settings"  TAB
Click on the dropdown menu for "Method" and select "Manual"
Under "Addresses", click "Add"

Now, here you have to do one at a time and use your TAB in between each one.

For "Address" type the current local IP address: 192.168.0.52 and then press the  TAB key to fill in the netmask
For "Netmask" type 255.255.255.0 and then press the  TAB key
For "Gateway" use 192.168.1.1 and then press  TAB

I am assuming your router uses 192.168.0.1 but it may be something else. Many cisco and linksys routers use 192.168.1.1 for their default internal address. Other common router IP addresses for gateway are: 192.168.0.1;  192.168.10.2; 192.168.1.254; 192.168.1.1.

The gateway is usually the same IP you use to connect to the router to change the settings.

Next, this step is optional. Click in the box for DNS servers and here you can use a public server like 8.8.8.8 or you can sometimes use 192.168.1.1 if your router provides DNS. You could also use an OpenDNS address or check with your ISP.
Additionally, in the NetworkManager settings, click on the checkmark box for "require ipv4 addressing".
Finally, go into your router settings and set the static IP (192.168.0.52) for your Ubuntu computer.

NOTE:

You must fill out the "address", "netmask", and "gateway" uninterrupted and this is why I suggest using the TAB key in between. If you find that you cannot click the "save" button because it is greyed out, click "cancel" and start over.

You can also try disabling IPV6. Click on the IPV6 tab in NetworkManager and click on the dropdown menu for "method" and select "ignore".


Automounting in ro mode (or with any options) NTFS partitions fails

What I did was this:
mv /bin/ntfs-3g /bin/ntfs-3g.bin
and replaced it with this code:

#!/bin/bash
echo "ntfs:*=$@"
p1=$1
echo "ntfs:p1=$p1"
shift
p2="$1"
echo "ntfs:p2=$p2"
shift
echo "ntfs:1=$1"
test "$1" == "-s" && shift
echo "ntfs:1=$1"
exec /bin/ntfs-3g.bin $p1 "$p2" $@

This seems to take care of the problem.
I am devising a system where an unattended laptops mounts and unmounts devices attached and detached from it's usb ports automatically to a folder shared via samba on the local network.
So far here is what I have:

apt-get install autofs

add this to auto.master:

<root path here> program:/etc/auto.usb.prg ro

The "ro at the end is what requires the ntfs fix. Without it all is fine, but the drives are mounted r/w and unplugging them without umount (which is not possible in an unattended laptop, with no UI) is unsafe.

Put this into /etc/auto.usb.prg

#!/bin/bash
# - confuses grep. I do not know why automount asks for this key sometimes.
test "$1" == "-" && exit
devData=`blkid|grep "$1\|${1/_/ }"`
# determining fstype as auto seems to not work well.
t=${devData##*TYPE=\"}
t=${t%%\"*}
echo "-fstype=$t :${devData%%:*}"

I created this file: /etc/udev/rules.d/85-usbdrive-sharing.rules

ACTION!="add", GOTO="carols_autommount_end"
DEVPATH!="*block/sd[b-z]/sd[b-z][1-9]", GOTO="carols_autommount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

ENV{ID_FS_LABEL}!="", RUN+="/bin/ls '/home/sftpuser/extern/%E{ID_FS_LABEL}'", GOTO="carols_autommount_end"
ENV{ID_FS_LABEL}=="", RUN+="/bin/ls /home/sftpuser/extern/%k"
# Exit
LABEL="carols_autommount_end"

I am having now trouble with removing the directories when the devices are unplugged. The rules could be rewrittend to send killall -USR1 automount on device removal. If at this time no clients are using the device, it will be unmounted.


sandboxed snap apps won't connect to network

A workaround I've found is to install the snap in dev mode.
snap install discord --devmode

I do not know what my issue is or why this helps.  This should not be the accepted answer.


Debian login screen after updating Ubuntu 18.04

I had the same problem. By looking at /var/log/apt/history.log I could see the update had removed ubuntu-session, ubuntu-desktop, gdm3 and gnome-shell.
After reinstalling those, it works fine again (maybe the most recent updates of the Linux kernel to 4.15.0-33 helped too).


Boot hangs after upgrade to kernel 3.13.0-43

Introduction

I also had the same problem after an update on a AMD A6-6400 processor with a Radeon HD GPU. Got the black screen of death (BSOD). I was able to boot up (sometimes) holding down the shift key to display the GRUB menu, selecting "Advanced options for Ubuntu" and then selecting a previous version of the kernel (3.13.0-40-generic).

Update V - System rebuild

My AMD processor is mounted on a Gigabyte GA-F2A88XN-blah-blah-blah motherboard with retrofit quiet cooling components. I hate noise. I like this system when it works properly because I can't hear it. Don't suggest I change the hardware. That is not going to happen.

The Old System

I had Ubuntu 14.04 LTS (32 bit) installed with the proprietary fglrx drivers enabled. The open source drivers used too much CPU power. I could hear the fans. The open source drivers sucked.

This fglrx configuration worked fine for about a year. Then the 14.04 automatic updates stopped working. More BSOD bullshit. That kind of thing. Enough is enough.

The New System

The new system started with Ubuntu 15.10 (64 bit) installed with the open-source drivers enabled. Everything seemed to work. I then enabled the fglrx drivers. Everything seemed to work. WooHoo. Time for lunch.

For some reason, after some time had passed, the custom cooling fans began to run at maximum speed. My black box was noisy and annoying.

The sun was shining on the box and it was a warm day, but the CPU should have been napping. Now it sounded like it was competing in the Tour-de-France.

I powered up the TV, turned on the remote keyboard. Make sure the proper HDMI input is selected. This takes probably 45 seconds. The box, meanwhile, is screaming for air. The Black Screen Of Death (BSOD) is the only response. This procedure takes more than 45 seconds.

So I press & hold the front-panel power button. I count to 10. Slowly. Nothing happens. WTF?!? I wait a bit more because I don't know what to do. Never had this happen before.

So then I pull the power cord.

Recovery from this condition is a bit complicated, but it can be done. I would tell you how I did this but I forget now and Your Mileage May Vary (YMMV) anyway. Just ask Volkswagon.

Short version: AMD A6-6400 on a Gigabyte GA-F2A... motherboard? Install Ubuntu 15.10 64 bit. Use the open source drivers. That works best.

Update IV

I have since altered a line in /etc/default/grub from

GRUB_DEFAULT=0

to

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-40-generic"

Note the text in the quotation marks is the exact same text as it appears on the 2 levels of GRUB menus. Adjust according to what appears on your own display.

After saving the edit, run the command:

sudo update-grub

This is not a solution of course, just a workaround, but at least it does boot up normally and everything seems to work. I hope a future update will make this problem go away. This last update was a total nightmare!

Update III

The latest kernel update (3.13.0.45) crippled my system. I am now using the latest AMD proprietary drivers and everything works again. This was another painful update. So now I'm thinking of using something other than Ubuntu. Seriously.

Update II

As reported below, the latest Linux kernel update (3.13.0-44) corrected the problem for me because I apparently use the Radeon driver. The problem was reported Dec 14 but it took almost a full month to correct the problem.

But wait! There's more! Apparently Kernel 3.13.0-44 has problems with NVIDIA drivers.

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331-updates/+bug/1409801

Update I

This morning (Jan 13) the software updater downloaded Linux kernel 3.13.0-44. It works on the A6-6400 on reboot. The file /etc/default/grub is back to its original form.

For the record, I also attempted to use several variations of the AMD fglrx suite of packages. It worked with the both the -40 and -43 releases BUT the rendered display was the wrong size! It turned a 50" HD TV into a 46" HD-ready TV. The smaller display was centered within the 50" display area. Very strange.


MAAS error with respect to node's BMC? How to activate debug logs?

So your node is a VM, right?

MAAS will call virsh as the "maas" user, so ~maas/.ssh/id_rsa has to exist, be correct in terms of permissions and be a private key allowed to login on the host where the VM is running.

You can test it by becoming the maas user on the MAAS machine and trying to use virsh as MAAS would. For example:

sudo -H -u maas virsh -c qemu+ssh://you@<host-where-vm-is>/system list --all

Also note you need libvirt-bin installed on the MAAS server, since that's where the virsh command comes from. It's not a dependency of the MAAS packages.


There isn't 100 GB free space as you expected; only 13.6 GB. I'd suggest searching for extra backups which could be moved out of /dev/sda and log files which could be deleted, as illustrated in https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu .

du -h shows where files are concentrated and can help you see where the low-hanging fruit are, where large numbers of files are.


You should not have both Postfix and Sendmail installed at the same time.  Postfix is a replacement for Sendmail.

So remove Sendmail (because Postfix is easier to use):

sudo apt-get remove sendmail

Then you should reconfigure Postfix.

 sudo dpkg-reconfigure postfix

There is a very good guide here:  https://help.ubuntu.com/community/Postfix

This will probably solve your problem.


How to fix this problem, where sometimes /dev/video0 becomes automatically /dev/video1 as a result other apps cant read

This is pretty common, but basically you shouldn't mess with stuff under /dev it's a special file system that gets regenerated causing just the problem your talking about. instead you need to set up a udev rule to make sure your devices are always getting the same name.

Use this information from comment 5, to setup your rules file.

It's a bit complicated to phase correctly in this site, but basically:

Get your device info with udevinfo -a -p $(udevinfo -q path -n /dev/video0) for each device.
Find something different about the devices
Head to /etc/udev/rules.d and make a new rules file (with a low number like 11)
modify the file to use your new attribute and give your device a new/static name

It's very complicated, but works quite well.


How do I get my computer connected to a wireless network using my Netgear WNDA3100v2?

"How do I get my computer connected...using my Netgear WNDA3100v2"

The answer is that you probably cannot.

ndiswrapper the package hasn't been updated regularly and not at all for some ten months. Questions on their own help forum go unanswered: https://sourceforge.net/p/ndiswrapper/discussion/323167/thread/dd8b33b1/

As well, the Windows XP inf and sys files are also quite old, dating to 2009:

ndiswrapper: driver bcmn43xx64 (,08/26/2009, 5.10.79.30) loaded

While there are a few threads reporting success, they are all with older kernel versions, 3.13-xx or so. While it is tempting to simply install an older Ubuntu version, these versions are, or will be soon, End-of-Life and will no longer receive any updates inluding critical security updates. As well, there is no guarantee that the specific Ubuntu version you pick will actually work properly with ndiswrapper.

On the other hand, for a few dollars, you could buy a fully supported, plug in and connect USB wireless. These sites will be helpful in selecting one: https://ubuntuforums.org/showthread.php?t=2309068 and: https://www.thinkpenguin.com/catalog/wireless-networking-gnulinux

I regret that I do not have better news.


As it seems its because the  /var/lib/dhcp3 or /var/run has not yet been mounted when
the DHCP client is started.

According to the ManPage of dhclient, try to specify the names and/or  locations  for these  files,  use  the  -cf,  -lf,  -pf  and  -sf flags, respectively,followed by the name of the file. (The DHCP  client  normally  gets  its  configuration  information  from

  /etc/dhcp3/dhclient.conf

,its       lease      database      from

  /var/lib/dhcp3/dhclient.leases

, stores its process ID in a file  called

   /var/run/dhclient.pid

and  configures  the  network  interface  using

   /sbin/dhclient-script


Ubuntu 18 with Mate desktop HiDPI scaling messed up

It turns out that the solution was to run mate-tweak and change HiDPI from Auto-Detect to HiDPI.


Dropdown menu is showing less items , when I right-click on the desktop

Actually you don't need to add liber-office application on right click menu. One of the best part of Linux OS is it is an extension independent. You can right click open new document and rename it to file.doc or file.ods or file.odt or file.ott or file.txt(for text document) whatever you want just add extension. So no need to have so many items on right click menu everything goes with a single file.

I hope that helps


I figured out why. Press shift+alt+ctrl + mouse click where you want to start, keep pressed the keys + click again and move the mouse.


If I'm not mistaken, installing Rhythmbox should pull in everything you need.  The phone will appear as a media player in Rhythmbox; you can drag/drop whatever you like.

I do know that iOS support is sketchy because Apple tries their very best to obfuscate the platform.


Did you also try?

 sudo gedit /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf

-- add the lines below:

  [Mapping analog-surround-21] device-strings = surround40:%f
  channel-map = front-left,front-right,lfe,lfe  paths-output =
  analog-output analog-output-speaker  priority = 7  direction = output

Reboot. You should have an extra mode in your "hardware" menu of the "sound" menu named "Analog surround 2.1"

can you do an lspci and tell me which sound card is your PC using?


There are more than one way to mount different filesystems in linux.

Over /etc/fstab (works mount in background during boot)
can mount filesystems on harddrives also network devices like samba, nfs for example.

Another possibility is gvfs(abbreviation for GNOME Virtual file system) is GNOME's userspace virtual filesystem designed to work with the I/O abstraction of GIO (Gnome Input/Output). is a little overview for gio

gvfs comes with "modules/backends" for trash support, SFTP, FTP, WebDAV, SMB, and local data via Udev integration, OBEX, MTP and others.

gvfsd is the main daemon
gvfsd-trash # is for  trash://
gvfs-mtp-volume-monitor for mtp devices
gvfsd-metadata

I got this bit from the manpage (man gvfsd-metadata):

  gvfsd-metadata is a daemon acting as a write serialiser to the internal gvfs metadata storage. It is autostarted by GIO clients when they make metadata changes. Read operations are done by client-side GIO code directly, and don't require the daemon to be running.

The gvfs metadata capabilities are used by the GNOME Files file manager, and others.
You can disable it.

systemctl --user mask gvfs-metadata.service
To revert it use

systemctl --user unmask gvfs-metadata.service

If you are unsure stop only for test purpose first

systemctl --user stop gvfs-metadata.service