How to make terminal output the background of my lock screen?

Set the org.gnome.desktop.screensaver.picture-uri key

Create the gdm profile which contains the following lines:

/etc/dconf/profile/gdm

user-db:user system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults

gdm is the name of a dconf database.
Create a gdm database for machine-wide settings in /etc/dconf/db/gdm.d/01-screensaver:

[org/gnome/desktop/screensaver]
picture-uri='file:///opt/corp/background.jpg'

Replace /opt/corp/background.jpg
with the path to the image file you want to use as the lock screen background.
Supported formats are PNG, JPG, JPEG, and TGA. The image will be scaled if necessary to fit the screen.
Update the system databases:

dconf update

You must log out before the system-wide settings take effect.

Next time you lock the screen, the new lock screen shield will show in the background. In the foreground, time, date and the current day of the week will be displayed.

If the background does not update
Make sure that you have run the dconf update command to update the system databases.

In case the background does not update, try restarting GDM.


Messed up with my ssh_config file. How can I recover the original file?

You can get the file from the OpenSSH client package:

apt-get download openssh-client
dpkg-deb --fsys-tarfile openssh-client_*.deb | sudo tar -xC / ./etc/ssh/ssh_config

This will extract the ssh_config from that package directly to its destined location /etc/ssh/.


Update to latest version of java after ppa is discontinued

I did search for all PPAs on special launchpad page.
And it gave some alternatives like Hellenic Schools Technical Support Team team PPA - they have  packages for Ubuntu

12.04 LTS (precise)
14.04 LTS (trusty)
16.04 LTS (xenial)
18.04 LTS (bionic)
19.04 (disco)
19.10 (eoan)
20.04 LTS (focal)

You can add this repository and install Java 8 from it with:
sudo add-apt-repository ppa:ts.sch.gr/ppa
sudo apt-get update
sudo apt-get install oracle-java8-installer


Shrinking root using logical Volume Management

You can take a look here. How can I resize an LVM partition? (i.e: physical volume)

You'll basically have to boot from a live CD, use system-config-lvm to shrink the logical volume and then use gparted to shrink the physical volume. Please pay attention to the details listed on that topic. You can ignore the commands if you're not experienced with the terminal.


Intel HD 3000 'Gen6+ requires Kernel 3.6 or later.' Ubuntu 12.04 Kernel 3.5

There's a 3.8 kernel available for Ubuntu 12.04, it should work.

sudo apt-get install linux-generic-lts-raring


LXDE System Tray: Skype, Pidgin and other active applications not showing up

It actually turns out I had to dig deeper than thought.

I had to click into the 'TaskBar (Window List)' in the list of applets. I was presented with another list of applets, and was able to use that to get System Tray reinserted onto my task bar.


How to edit sshd_config remotely? A problem of incorrect permissions?

Editing config files on Windows and transfering them back to Linux is dangerous because Windows uses different line breaks than Linux.

You should rather edit the file directly on the remote machine by typing sudo nano /etc/ssh/sshd_config make your changes and press CTRL+O to save and CTRL+X to exit. This way you also don't have to care about permissions cause you are already root.


Mounting truecrypt fails with "Error: device-mapper: reload ioctl failed: Invalid argument "

XTS (if anyone is wondering) is a mode of operation that allows you to use the block cipher repeatedly with a single key. It's currently the default in TrueCrypt.

I'm using kernal 3.0.0-12-generic in 11.10 (64-bit) and as far as I can tell TrueCrypt (7.1) is using XTS on my install. (according to the volume property page)

Also - I don't think Ubuntu ever supported TrueCrypt directly in the first place - it's not available through the Ubuntu Software Center and Unity ignores the application's notification icon which is critical for novice users (if they close the main TrueCrypt window). Bug 109701 (on launchpad) also suggests that licensing may be preventing better support commitment.


Instead of Install ubuntu alongside windows vista try do something else. That will hopefully provide the option for choosing the size of /, swap and home partitions. Thanks.


EXT4 under Ubuntu has no need for defragmentation like Windows does, due to the efficiency of the filesystem. It more or less automatically takes care of all of this for you on the fly.

If you really want to defrag your system (which can be a really bad idea), a guide is available here. To sum it up, run the following command to work on the whole system:

sudo e4defrag -c /

It will spit back output as it works. If no output returns, the system found nothing to defragment.


How do I make changes to /proc/acpi/wakeup permanent?

I ran into this problem again on Ubuntu 12.10. The suggestions from user MTS unfortunately also did not work for me. However, you can write a script to automatically set the usb properties in /proc/acpi/wakeup right before every suspend.

The solution is based on creating a suspend hook (based on this Archwiki article). Save the following as /usr/lib/pm-utils/sleep.d/45fixusbwakeup, and make sure to make it executable (chmod +x /usr/lib/pm-utils/sleep.d/45fixusbwakeup).

#!/bin/bash
case $1 in
    hibernate)
            echo "Going to suspend to disk!"
            ;;
    suspend)
            echo "Fixing acpi settings."
            for usb in `cat /proc/acpi/wakeup | grep USB | cut -f1`;
            do
                    state=`cat /proc/acpi/wakeup | grep $usb | cut -f3 | cut -d' ' -f1 | tr -d '*'`
                    echo "device = $usb, state = $state"
                    if [ "$state" == "enabled" ]
                    then
                            echo $usb > /proc/acpi/wakeup
                    fi
            done
            echo "Suspending to RAM."
            ;;
    thaw)
            echo "Suspend to disk is now over!"
            ;;
    resume)
            echo "We are now resuming."
            ;;
    *)
            echo "Somebody is callin me totally wrong."
            ;;
esac

What this does is change the status of every USB device that is currently enabled to disabled. If you only want to change specific USB devices, change the for loop in the script. For example to change only USB1 and USB3 change

for usb in `cat /proc/acpi/wakeup | grep USB | cut -f1`;

to

for usb in 'USB1' 'USB3';

Hopefully this helps someone else who has the same problem. This approach solved the issue for me.


Illustrator won't run in Linux.

However, Inkscape will.

Inkscape is a vector graphic editor that is quite similar to Illustrator. It can open and edit .ai files from Illustrator. Inkscape saves files as .svg which Illustrator can open, but the layer visibility can be a little wonky sometimes on the Illustrator side. All of the objects will be present in Illustrator so it's manageable.


Ubuntu 18.04 problem to connect to Windows 10 SMB share

It's a bug: https://bugs.launchpad.net/gvfs/+bug/1828107

It's actually a bug that was created when they tried to fix another bug: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1778322

In short: Browsing for smb hosts relies on the smb1 dialect to do the discovery. But the samba client is designed to go all the way up to smb3 and when it does host discovery doesn't work. They tried to fix that by forcing the file manager down to smb1 to do the discovery but then it gets stuck there.

Windows 10 disables smb1 on the server side so access is impossible. smbclient works because to can use the defaults and access Win10 via smb3.

So there are really only 2 workarounds for this problem:

Force Win10 back to smb1 on the server side which Microsoft does not recommend.

Or do a cifs mount of each individual share which will by default use a more current smb dialect. Something like this:

sudo mount -t cifs //192.168.0.100/share-name /mount-point -o username=username,password=some-password,uid=your-ubuntu-user-name

You can set this up in /etc/fstab - with a different syntax - if you choose to go this route.

EDIT: For the credentials in plain text issue you can create a credentials file and make it accessible only to root:

[1] Create a file say at /etc/samba/credentials

[2] Make it accessible only to root: sudo chmod 0600 /etc/samba/credentials

[3] Then add your credentials to it in this form:

username=user-name
password=user-password

Then an fstab statement would look something like this:

//192.168.0.100/share-name /mount-point cifs credentials=/etc/samba/credentials,uid=your-ubuntu-user-name 0 0


How could I make new empty and valid datadir for MariaDB?

Use command mysql_install_db

See https://mariadb.com/kb/en/mariadb/installing-system-tables-mysql_install_db/


grub era when loading windows on its own drive

It sounds like your Master Boot Record (MBR) on your Windows directory was, indeed, over-written. There are several ways to repair this, depending upon which version of Windows you are using. I would recommend the following webpage, as it lists methods for almost all currently popular Windows desktop versions: https://neosmart.net/wiki/fix-mbr/


Can't connect to Wifi in 16.04 after booting from Windows 10

Download wpasupplicant & libpcsclite1 from https://launchpad.net/ubuntu in your windows 10.

Copy wpasupplicant_2.4-0ubuntu6_amd64.deb and libpcsclite1_1.8.14-1ubuntu1_amd64.deb to your usb driver.

Boot your Ubuntu 16.04 and mount your usb driver.

sudo mkdir /media/usb
sudo mount /dev/sdc /media/usb

Install previous deb with dpkg -i

sudo dpkg -i /media/usb/libpcsclite1_1.8.14-1ubuntu1_amd64.deb
sudo dpkg -i /media/usb/wpasupplicant_2.4-0ubuntu6_amd64.deb

Set up wireless connection according to https://askubuntu.com/a/417498/426130


How do I change the order in which lenses appear in the dash?

Aking 1012 was right, almost. You have to change both the folder name and the .lens name in the folder for the change to take effect.

Head to /usr/share/unity/lenses:

gksu nautilus /usr/share/unity/lenses

Rename both the lens folder and the .lens file to change their alphabetical order, e.g.:

recoll --> yrecoll

and

recoll.lens --> yrecoll.lens

I found that editing the default lenses was quite buggy and resulted in some scopes being disabled. That's why I settled for editing my custom lenses only. This is the result for yrecoll and zwikipedia:


Extract this file to /usr/share/icons/your.current.icon.theme/categories/24 then reopen Gnome System Settings.

http://ubuntuone.com/1si6OVYcMVmDe5uJwBDz3L


12.04 upgrade from 11.10 failed, cannot finish upgrade

In such cases I solve this problem by using terminal instead Upgrade Manager:

Update sourcelists. First check you use right sourcelists:

sudo apt-get update

OR
Use diagnostic checker (Update + Diagnostic broken dependecies):

sudo apt-get check

THEN
Upgrade distribution (This is the equivalent of "Mark all upgrades" in Synaptic):

sudo apt-get upgrade

"Smart upgrade". It tells APT to use "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. :

sudo apt-get dist-upgrade

For other cases read this article:
AptGet/Howto: Package management with APT


How can I set up full access sharing on my network?

Open the smb.conf file for editing (gksu gedit /etc/samba/smb.conf) and look through the Share Definitions section, it seems to have all you need.

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home director as \\server\username
[homes]
   comment = Home Directories
   browseable = yes

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# The following parameter makes sure that only "username" can connect
#
# This might need tweaking when using external authentication schemes
;   valid users = %S

Un-commpent means removing the ; from the beginning of a line (don't remove the hash signs). Uncommenting stuff in the first two paragragraphs, and setting the home directory to be writable and browsable, the way I've done above should really be it.

Save and exit when done, then restart samba with sudo service smbd restart.


How can I have a script run whenever I start a zoom meeting?

I wanted to answer this question too, but nothing seemed forthcoming.  I realized, though, that I had already scripted some lua things to set Zoom's windows to be "always on top" and pinned to every workspace.  That led me on a journey.
Here's the process
1. install packages
sudo apt install devilspie2 lua-sec

2. config devilspie2
and add this (or something like it) here: ~/.config/devilspie2/window_works.lua
if (string.find(get_window_name(),"Zoom")) then
    debug_print("Window: " .. get_window_name());
    pin_window();

    require("socket")
    local https = require("ssl.https")
    local body, code, headers, status = https.request("https://api.duckduckgo.com/api")
    debug_print(body)
end

NOTE: you can also simply run a BASH script if that is easier:
local command = "/bin/bash /home/[username]/scripts/thing.sh"
os.execute(command)

3. Profit!
When you open a new Zoom meeting (or something that matches the window name "Zoom"), that lua will run and it will pin the window (which you may or may not want) and it will then make an HTTP request.
relevant documentation

https://www.reddit.com/r/Ubuntu/comments/9yt88g/always_on_visible_workspace_by_default/
https://stackoverflow.com/questions/22831701/lua-read-beginning-of-a-string (this can be handy to fuzzy match window names)
http://notebook.kulchenko.com/programming/https-ssl-calls-with-lua-and-luasec


In 11.10 how do I swich between Unity and Gnome Shell sessions?

Once you have both installed, you can choose which session you want at the login manager (login screen).


Why is the library's linker name only in the -dev package?

The libsqlite3.so file is only a symbolic link to the fully versioned library file name, libsqlite3.so.0.8.6. At runtime, the dynamic loader only knows about the fully versioned library. This is true for most shared libraries. There are some libraries which are not versioned, and only available as libnspr4.so for example. However, such libraries are also packaged correctly, as appropriate.

Programs should not be trying to dlopen the non-versioned link of the library. If they wish to do that, they should instead use the libsqlite3.so.0 filename, for example, which is installed in the binary library package, rather than the accompanying -dev package. This way the program will continue working if sqlite3 breaks API compatibility at some point, and there is a libsqlite3.so.1 instead. Using libsqlite3.so.0 would ensure the program would use the API of the library which it was written to work with.


Problem installing Ubuntu 15.10 on Asus K501UX (NVIDIA drivers)

First add nouveau.modeset=0 to the boot parameters line in /etc/default/grub for example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"

Then update your grub config using:

grub-mkconfig -o /boot/grub/grub.cfg

Finally install bumblebee as described in this answer.

(This answer based on comments from @Ashu and @Leonardo.)


how do I extract the PID from the output of `lsof -i:8080`?

You can pipe the lsof -i:8080 output to awk to get the PID:
lsof -i:8080 | awk 'NR==2 {print $2}'

You can then combine it with kill:
kill $(lsof -i:8080 | awk 'NR==2 {print $2}')

You can also create a Bash function and add it at the end of your .bashrc:
function kill8080()
{
    kill $(lsof -i:8080 | awk 'NR==2 {print $2}')
}

I named the above function kill8080, but you can name it as you wish.


This is assuming that you have installed Ubuntu in a dual-boot setup alongside Windows.

Open the terminal, and type df -h

This will show you the drives mounted as well as occupied and free space.  Look for the filesystem mounted at /

This is your Linux partition.

Now type cd /dev/, then ls.

You should see several entries like

sda sda1 sda2 sdb sdb1 sdg sdg1

Each sd* is a storage volume, and the number is the partition.  The above example has two partitions (sda1, sda2) on the boot drive and two external drives available(sdb, sdg).  You need to mount the partition before accessing it. On my system, I have four partitions set up on my boot drive

sda sda1 sda2 sda3 sda5

where sda5 is my Linux partition, sda2 is the Windows partition and sda3 is the common storage partition.

To mount the drives right now, type sudo mount /dev/sdaX, where X is the number of the partion to mount.

To automatically mount the drives on boot, install mountmanager by typing

sudo apt-get install mountmanager

This installs an application that allows you to configure the auto-mounting of drives upon boot.  Open it up, and in the filetree select the sd* partition available, then enter the mount point for the partition.  I use the /media/ folder as the base mount point, then you specify the mount folder.

For example, my /media/ folder looks like

Library/ Storage/ Windows/

Once you've done this, you apply the changes via Partition -> Apply

This should make your partition visible in both Natutilus and the command line in /media/


gparted increase sdb1 from sdb2 free space

Warning: This answer does not work (see point 5). So you should try to do what is proposed in the comment by @oldfred.

You can't resize /dev/sda1 immediately because the extended partition /dev/sda2 is adjacent to it. So you have to:

backup your data !!
move /dev/sda5 to the left to fill the unallocated space
move /dev/sda6 to the left (immediately after /dev/sda5)
resize the extended partition /dev/sda2 so that you get an unallocated space at the right end
I'm sorry, this doesn't work as I have learnt here
move the extended partition to the right
extend /dev/sda1
done!


Checking LibreOffice-saved Microsoft Word files

If you really want 100% accuracy, then buy  Microsoft Office and install it through wine.

Another possibility is to install the free Microsoft Word viewer.


Unable to start an executable from Thunar

This problem seems to have been solved in Ubuntu 19.10 (Thunar version 1.8.9): After upgrading to Ubuntu 19.10, I no longer have Wayland in my login screen. So, I am using GNOME on Xorg by default.


Your home directory should be at /home/USERNAME/Downloads, where USERNAME is your username. You should be able to navigate there by opening /, then home, then USERNAME and Downloads.


Why can't I checkout with subversion 1.7 on a mounted cifs share?

You need to set the NOBRL option when mounting the CIFS share.  Apparently this is a problem with apps that use SQLite - SVN 1.7 and Firefox come to mind.

Here is the reference for NOBRL

NOBRL - Do not send byte range lock requests to the server. This is necessary for certain applications that break with cifs style mandatory byte range locks (and most cifs servers do not yet support requesting advisory byte range locks).


Windows XP in VMWare Player running HealTech OBD Tool will not connect to Motorcycle

Found an answer in another question, "VMware wont run in ubuntu 16.04 LTS (No Error msg even)".  Severus Tux recommended using VirtualBox instead of VMWare Player.  I installed VirtualBox, and with a little research got it running. OBD Tool now connects via the USB, and data can be read from our bikes.  VMWare may be able to work as well, and I would still like to try it if I figure out how to get it working.


I got this eventually fixed by updating the software of my Synology to the latest. Now rsync runs just fine (Ubuntu 16.04 LTS).


Flash without Adobe: some Youtube videos play, most don't

You are probably experiencing YouTube HTML 5 player. Most videos are available in HTML 5 except those that include advertising.


The read command takes a variable name, so remove the sigil:

read uid

What you are doing, is this: sending the contents of the uid variable as the variable name for the read command. Since this value is currently empty, you have

echo "a prompt: "
read

That is valid bash code. The default variable name for a "bald" read command is REPLY

Given your code, here is a mild rewrite:

function uid_Assoc {
        local arg1=$1
        echo "$arg1";
}

read -p "Please enter SUID: " uid
uid_Assoc "$uid"

Notes:

you don't need both the function keyword and the () syntax, choose one or the other (my opinion only)
localize variables in functions to limit their scope
use the -p option to read
always quote referenced variables (you never know how many spaces the user will type), unless you know why you need to leave a variable unquoted.


As you can see in the Ubuntu Releases Paragraph about Ubuntu on wikipedia, version 9.10 is too old (End Of Life) and is not supported anymore (even the server version).

You can find the repositories under the "old-releases" server http://old-releases.ubuntu.com/ubuntu/dists/

The first step here is to back up anything you could lose. After that, my opinion is that your best option is to clean install a new version and restore the backup.

If a clean install is not feasible

Upgrading

  EDIT: Rereading the source links I noticed that the upgrade method
  I've reported here could no longer work. I'll follow up once I know
  better.

  EDIT2: The problem happens in the upgrade from 9.04 to 9.10 because both of them
  are out of support, as discussed in this thread in AskUbuntu: Skipping intermediate Ubuntu OS upgrade to latest one,How do I upgrade from 9.04 to 10.04.2? .
  Since 10.04 is supported I think the procedure below should be safe (but still risky)

The second best bet is to upgrade to a newer release (and you should do so as often as possible when a LTS version is released, in my opinion). It's important that you read about End Of Life Upgrades. What follows is taken from there, but not as complete as that page.

Since you haven't upgraded in time, you have some extra steps to follow.

Always do a backup, I've never tried this procedure myself, so try at your own risk.

First edit /etc/apt/sources.list like this to point the repository to old-releases. Notice that 9.10 (your current installed release) is codenamed karmic, so we use that. (if you have "backports" or "proposed" section of the repository activated, remove the "#" before their line)

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
#deb http://old-releases.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse

Update with the new sources

sudo aptitude update && sudo aptitude upgrade

Install update-manager-core if not already installed

sudo aptitude install update-manager-core

The installation of the following packages (server kernel) is also required

sudo aptitude install linux-image-server linux-headers-server

You can now upgrade with this command, as mentioned in the "Upgrading Ubuntu server" for the release 10.04 (this is the release after the one you have installed)

sudo do-release-upgrade

I suggest that before that you take a look at the Ubuntu server guide index for the release 10.04. Notice that even 10.04 is not the latest release, but at least is the lastest LTS and still supported.

Source on End Of Life Upgrades
Source for jaunty, the procedure should be similar


Trying to install Ubuntu results in freezing splash screen - nomodeset did not work

First things first ... SCHENKER ships the same notebooks which are based on CLEVO barebones with Ubuntu preinstalled through their sub-company TUXEDO ... so it just must work somehow.
Second - of course you can't access a virtual console with this combination : Ctrl + Alt + 1 !

Even that I don't know the exact model you are having ... it is a quite new machine because it has the latest available graphics hardware. These new XMG machines have the option to disable the NVIDIA Optimus technology in the BIOS, which is what you should do until you have Ubuntu and the NVIDIA drivers successfully installed. Boot into BIOS and disable all NVIDIA related switches.

Now after having disabled Optimus in the BIOS, also disable Secure Boot in the UEFI settings.
This does not have any effect on Windows 10, it will boot in Secure Boot mode nevertheless.
Please follow exactly all of these instructions, most probably everything will work fine then.

Disable hibernation in Windows OS - open command prompt as administrator and execute :

powercfg /h off

Disable Fast startup in Windows -> open the Windows Control Panel -> Power Settings and uncheck Fast startup. In case that the setting is not visible, enable Show hidden settings.
Shutdown the machine completely, do NOT reboot it, otherwise it always starts Windows.

Boot from the Ubuntu installation media you created ... select Try Ubuntu without installing.
Press the E key and add the parameter nouveau.modeset=0 at the end of the linux line.
Press the F10 key and boot into the Ubuntu Live desktop - start the installation of Ubuntu.

After it has finished boot into BIOS and select Ubuntu as the default system to boot.
You can select to boot Windows alternatively from the GRUB boot menu afterwards.

Now boot the successfully installed Ubuntu operating system, select the Ubuntu menu entry.
Press the E key and add the parameter nouveau.modeset=0 at the end of the linux line.
Press the F10 key and boot into the Ubuntu system to first of all install the NVIDIA drivers.

When the login screen appears press : Ctrl+Alt+F1
Enter your user name and the password, then execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-375 nvidia-prime
sudo reboot

Boot into BIOS and enable the NVIDIA graphics with Optimus support - then boot the Ubuntu OS.
From now on you do not have to add the nouveau.modeset=0 parameter or any other parameter.

Notes : Set a Space between the last character in the linux line and nouveau.modeset=0.

Switch between intel and NVIDIA graphics from NVIDIA X Server Settings -> PRIME Profiles.

Additional information :

I am writing this on a XMG machine on which I installed Ubuntu 16.10 and the NVIDIA drivers. Another company that ships CLEVO based machines with Ubuntu preinstalled is system76 ...


how to save terminal files that you opened with "$ sudo vi"

To save, press:

:w

That is, the 'colon' key, then the 'w' key. Then the enter key.

To save and quit, hold the shift key, and hit 'z' twice.

To quit without saving, hit:

:q!

Then the enter key.


(K)Ubuntu 17.10 - No Audio devices found, no settings, no sound

I had the same problem and seeing the logs in /var/log/syslog I had an error for pulseaudio daemon:

[pulseaudio] module.c: Module "module-switch-on-connect" should be loaded once at most. Refusing to load.

So I opened /etc/pulse/default.pa and edited it using # to disable 3 lines:

#.ifexists module-switch-on-connect.so
#load-module module-switch-on-connect
#.endif

Maybe it'ś not the best solution but it solved my trouble.


Unable to setup connection to server (SQL)

The root MySQL account should not be used unless you are doing admin work on the database. For this reason, any attempt to connect as root must be done with sudo:
sudo mysql -u root -p

This will allow you to sign in as root, do your admin work, and know that unprivileged accounts are less likely to do bad things to your system unless you let them.


Dual boot shows ubuntu and windows, but windows is not loading

Do you mean default Ubuntu purple colour? First, you should check whether Windows will boot up independently of Ubuntu, ie on BIOS Boot Menu, not GRUB menu. It can be a little tricky if you haven't done this before.

To do that, start your computer and immediately select the appropriate function key and tap it quickly. I can't say which F number that is as it varies according to your computer model (on mine it's F12 key). Look it up in your manual or google for it. Sometimes it appears for a second at the bottom of the screen when you switch on. Assuming you already know or you find that key, and you have the BIOS boot menu up on screen, select Windows Boot Manager (or any similar sounding option name) and ENTER. If Windows fails to start up then you know it's a Windows boot problem, and  perhaps you should look here, or try this and choose 'Repair your computer', or search or ask a question in this forum to resolve it. If Windows boots up correctly, then it's a GRUB issue. Let us know and we'll take it from there.


Official documentation of synclient parameters

Found it:

http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html

Thanks to @Rinzwind for the link to synclient man page.


Why do 15.04 gnome-shell topbar icons stop working

A complete re-login can perhaps be avoided by restarting GNOME Shell. Press AltF2, and run the r command. (Another useful command could be lg, for the Looking Glass, where you can inspect the state of GNOME Shell and its extensions.)


How to create and access extra space on USB Stick?

use disk utility to first see which partitions have been created and then you may modify them.Formatting alone the pen drive will not do.


MacBook Pro 5.5 32-bit or 64-bit 12.04 LTS

Using a 64 bit kernel for a 64 bit capable processor will guarantee that the kernel will be using optimizations for your processor. Not "legacy" or compatibility features for older processor architectures.
Using a 32 bit kernel will not help with any of your issues and I would say that its extremely uncommon to have problems because of using 64 bit kernels instead of 32 bit ones.
You are having backlight issues but I cant tell what hardware you are using.
According to google, its Nvidia, if so try switching from the Nouveau driver to the Nvidia driver which can be done easily in the "additional drivers" program.
If this doesn't help try installing:
mpb nvidia backlight driver
for your nvidia card.


You need to reverse the command, you are now creating a sym link from ~/juju/cache in to /var/cache/lxc.

Try ln -s /var/cache/lxc ~/juju/cache instead.


I am locked out of Ubuntu 16.04. Brand new guy! I'm lost.

I never heard of something like this. Are you sure that your password is one of those 2 you tried? Here is a solution that you might use if you don't find any other one:

Boot from your live Ubuntu drive that you used to install Ubuntu (whether it is a DVD, USB flash disk or any other storage medium)
Plug in a removable drive of your choice.*
Copy the /home folder from your internal drive that you have Ubuntu installed on, to the drive you plugged into your computer.

Reinstall Ubuntu, and make sure you type in the right password and memorize it.
Replace the /home folder in your new Ubuntu installation with the copy you have in your removable drive.
Logoff or reboot if needed (I'm not sure if a logoff is enough, so please if anyone knows comment on the answer).

Now you should have all of your personal files and settings back, because they are all stored in the /home folder.

Considering the installation is fresh (at least that is what I can understand) probably you haven't installed a lot of apps if any, so a reinstall would not be hard as you won't have to reinstall a lot of apps again.

*Make sure the drive you plug in has sufficient space for the /home folder.


ERROR* UVD not responding, trying to reset the VCPU!

Seems the issue related to Radeon graphic driver. You need to edit the Grub file.

Option-1: If Ubuntu is able to boot:

sudo nano /etc/default/grub
Change the line GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="radeon.modeset=0" or, GRUB_CMDLINE_LINUX="nomodeset" and Save the file
sudo update-grub && sudo systemctl reboot

Option-2: If Ubuntu is not able to boot:

To edit Grub during the boot, do the following:
Immediately after the BIOS splash screen during boot, press and hold the SHIFT button. This will display you grub containing a list of kernels and recovery options
Press e to edit the kernel
Find the line ending with quiet splash. Add your boot option before these key words - i.e. so the line looks like nomodeset quiet splash
ctrl+x to boot

It should work now. Also remember, if you want to permanently use nomodeset, then, after boot, follow my Option-1.


Unable to install NVIDIA driver for GeForce 1650 in Ubuntu 20.04.2

I had many issues in my laptop which is Acer Aspire A7 with AMD Ryzen 5500U and NVIDIA GTX 1650.
After installation (dual boot) of Ubuntu, it won't boot up.
If you have installed NVIDIA Driver , remove them and follow the below steps.
In-order to fix that you have to add nomodeset parameter in the grub only once.
Once that is added you will be able boot into Ubuntu and login.
Next the Brightness functionality was not working , also once the NVIDIA driver (460) is installed Ubuntu won't boot up at freezes at a cursor blinking.
After spending few weeks going through the NVIDIA and Ask-Ubuntu forums , I came to know there is specific problem in Linux Kernel support for AMD Ubuntu support.
This is how I solved:
After login into Ubuntu using nomodest parameter
Ubuntu 20.04 has kernel of 5.8 , AMD 5000 series requires 5.10+ kernel version , in-order to upgrade this follow:
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

After this

open mainline application , by typing mainline in terminal.
Select latest kernel available and install.
remove the nomodeset parameter from grub, don't forget to do sudo update-grub, if you did this in /etc/default/grub, then reboot
Make sure to disable secure boot option in BIOS
Select the latest ubuntu kernel and login

Next we need to fix the AMD firmware to fix brightness control.The GPU of the 5xxx series will be called Cezanne, a descendant of the 4xxx Renoir GPU. Currently, it has the codename “Green Sardine” so the driver tries to load green_sardine firmware.
Now after login navigate to https://people.freedesktop.org/~agd5f/radeon_ucode/gs/

Download all of them and copy to /lib/firmware/amdgpu
Then in terminal type sudo update-initramfs -u
Reboot
Now the brightness functionality should be working, now you can install NVIDIA graphics
Add the drivers repo sudo add-apt-repository ppa:graphics-drivers/ppa
Next sudo ubuntu-drivers devices or you can install from 'Additional Drivers'
Install recommended driver, reboot
nvidia-smi should be showing process and nvidia-settings will be launching NVIDIA profile

References:

https://forums.developer.nvidia.com/t/ubuntu-mate-20-04-with-rtx-3070-on-ryzen-5900-black-screen-after-boot/167681/30

https://www.debugpoint.com/2021/01/install-nvidia-driver-ubuntu-linux/#:~:text=Install%20Nvidia%20Driver%20in%20Ubuntu%20Linux%201%20GUI,Open%20the%20application%20Nvidia%20X%20Server%20Settings.%20

https://ubuntuhandbook.org/index.php/2020/08/mainline-install-latest-kernel-ubuntu-linux-mint/


Note that a star (*) matches every value for the particular field. The date and time fields are at the beginning of an entry and consist of: MIN HOUR DAY_OF_MONTH MONTH DAY_OF_WEEK

So, when you write "* */5 * * *" it means every minute, every 5 hours, every day... The problem lies in the "every minute" selection. I guess you want to change it to a single value between 0..59. For more information do, "man 5 crontab".


NOTE: This solution only works for Ubuntu versions up through 17.10.  Ubuntu 18.04 and later do not have the pdftk package due to the packages being removed due to the dependencies to run the package being removed from the Archive for Bionic and later.

    NOTE2: even if officially removed from 18.04, there is a snap version of pdftk; you can install it with snap install pdftk.

You can use pdftk. Install it with sudo apt-get install pdftk. Then, suppose you want to rotate the page 4 of your document test.pdf 90 degree clockwise:

pdftk test.pdf cat 1-3 4east 5-end output out.pdf

You can do much more in pdftk, changing page order, rotation, merging various PDF files. The manual page is your friend here.

From man pdftk, referring to the cat operation:

  <input PDF handle>[<begin page number>[-<end page num‐
                   ber>[<qualifier>]]][<page rotation>]

             Where the handle identifies one of the input PDF files, and
             the beginning and ending page numbers are one-based refer‐
             ences to pages in the PDF file.  The qualifier can be even or
             odd, and the page rotation can be north, south, east, west,
             left, right, or down.


Will long-term use of ubuntu via wubi harm my PC?

No, using Wubi or extended periods of time will not shorten the life span of your computer at all.

However, there are many advantages to dual booting as opposed to using Wubi. For example:

Wubi is slower then a dual booted Ubuntu install, and Wubi installs cannot Hibernate (it can Suspend).
Wubi installs are also much more likely to break through an update.
Dual booting the computer does not endanger Windows 7 at all, and the Ubuntu installer makes dual booting very easy.

I would highly recommend dual booting if you intend on using Ubuntu for long periods of time.


Update notifier doesn't work [cache issue]

Hi I am new to ubuntu so I am trying it out, I got to know wine because I wish to use Dreamveaver but with no success, I even tried to install some .dll from winetrick and tried to remove some because apparently wine has made my computer into a "windows server"(that's what an error message said). Anyway after doing those things,I had the same problem as yours until this morning.

E: Unknown error: «<class 'KeyError'>» ("The cache has no package named 'wine1.7-i386'")

As I had "lost" wine1.7-i386, I tried to reinstall it so I ran

sudo apt-get update
sudo apt-get install wine1.7-i386

then it updated my wine1.7 and wine1.7-amd64  and also installed wine1.7-i386.
hey also while downloading wine1.7-i386 it aborted for some forgotten reason.
but I retyped the same command and it continued. And now the error message is gone.
Hope that will help you.

PS: I never used sudo rm /var/lib/update-notifier/dpkg-run-stamp or and the rest.


How can I upgrade php7.0 to the latest old stable in Ubuntu 16.04?

OK, I found my answer:
https://wiki.ubuntu.com/Testing/EnableProposed

  To enable the proposed archive for Ubuntu 16.04 and later use the Software & Updates program and ensure that Pre-released updates (xenial-proposed) is ticked in the Developer Options tab.

Here I can selectively choose packages from proposed.

If someone knows when the proposed goes into updates, that would be a great addition to the answer.


swich from ubuntu (unity) lockscreen/login to gnome

To switch lockscreen/login to gnome, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo dpkg-reconfigure gdm


cal/ncal show three months, starting on Mondays, one week per row


Make SWAP parition from existing Ubuntu partition

To resize your Ubuntu partition and create a new swap partition from that space,follow the below steps,

Boot Ubuntu live disk and then open Gparted.
Right-click on the Ubuntu partition and select Resize option to create a new unallocated space of the desired size.
From that unallocated space,create a new SWAP partition.
Now right-click on the swap partition and select and select swap-on.
Add an entry for your swap partition in /etc/fstab file to make swap-on the partition on startup.
See this for how much space did you have to allocate for your swap partition.


Accessing Ubuntu Files from a Wubi Installation within Windows

You would require a ext filesystem driver for windows to access ubuntu files from windows.Download ext2 driver from the below link:

http://sourceforge.net/projects/ext2fsd/


On Aquaris m10 Ubuntu edition, an external keyboard is missing many characters

Are you saying that the "Germany" keyboard layout is not available on the tablet's options? What type of keyboard does the tablet believe it's dealing with?

To activate the accented ASCII character combinations, you usually have to go into the system settings and tell it explicitly which "compose" key to use. That's the key that signals to the system that you're about to ask for a combo to be treated as a single alternative character.

For example, if you want to combine CTRL + "^" + "e" to get "ê" -- then your "compose" key is CTRL. You have to tell the system that one of the CTRL keys is the start of a combo.

On Macs, it's set up by default, but on most of the Linuxes I've set up recently, there's no compose key configured until you select one yourself.

To do this on desktop Ubuntu, there's a help file with instructions, here: https://help.ubuntu.com/community/ComposeKey

I don't have the Aquaris tablet yet, so I can't give you explicit instructions on the tablet version, but I bet if you get your tablet into Desktop mode, you can apply those instructions to the tablet too.


I would suggest, use a live CD to access all of your data and back them up onto external storage.

You can back up the Home folder hidden files too, this contains application settings, especially look at the .config folder.

To display hidden files, navigate to the folder you want to look and and use 'CTRL H'

Then I would suggest a fresh install. Once installed reinstall your applications and copy back the appropiate .config files, etc.

OR

You could try to start up an Ubuntu live CD session in order to undo the changes?

Use the terminal command

Code:

sudo nautilus

and navigate to your Linux partition, and attempt to reset the changes using the live disk as a reference.

Some info HERE


Ubuntu 20.04 wifi randomly disconnecting after update

You probably need to update your drivers. Give this a try:
sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh

Reboot
Make sure that secure boot is disabled before starting.


Trying to understand commands affecting unmounted drives

On one level, the kernel software is able to read and write a disk drive, but only entire blocks and/or sectors. On a higher level, a different piece of software (the file system driver) is able to see these blocks and sectors as a file system, and read and write files and directories. In order for the file system driver to work, a mapping must be made between the physical blocks on the disk and the folder structure. That is called mounting the disk.

However, when copying entire disks, you don't want the file system to change once you have started copying. In order to prevent this you unmount the file system. Now, only the low-level commands are able to access the disk. ntfsclone and dd are examples of low-level commands that guarantee the file system is not changed while they are busy.


Ubuntu 12.04.4 64-bit & AMD HD7850 GPU, issue with additional drivers menu

As a general rule for myself, if they all say the same thing then I check the description, in which case it was the same again. Most of the time, the second and third entries are an update and an experimental driver. I'd pick from the top and work my way down if nothing changes. The thing is it removes the previous driver and stops using it when you click to install one of the others.

I'd recommend going to the Ubuntu Help Page for Binary Driver installation. I just last night, installed Ubuntu 12.04.4 LTS on my desktop running AMD 995 Black Edition CPU with HD Radeon 6970 GPU, and nothing would install and kept wanting to send error reports. Now I realize this isn't your problem, but to avoid the problem because it was a pain, try removing/purging all traces of any previous 'fglrx' drivers installed prior, and clean it out, then re-install, and not from menu but via command line. I've always had the best results doing everything by command line and while I'm also aware that some users are worried about messing something up, its also the best way to learn. At the very worst, you'll have to re-install 12.04.4 LTS which you can quite easily do.

Also take a look at AMD Driver and Support website and read up about their latest proprietary driver release as there are some instructions on there as well.

And ofcourse don't forget to check which one you need to if you do do it via the AMD website or by command line, 32bit or 64bit.

Binary Driver How To

AMD Support Website Catalyst 13.12 x86


For your second question, the best way to install Ubuntu in a different partition is as follows:

Partition your Hard Drive into two paritions and install Windows 7 to your first partition and leave the second partition unformatted.
Now, install Ubuntu 12.04 by pointing the rest of your unpartitioned area of hard disk as the installation location.
The partitioning size you can do according to the usage of each of the OS you have. (The one OS you use primarly can be given more space). But, it is better to give at least 10 GB for one OS since you have 320 GB in total with you.

Note: If you try to install Windows 7 after Ubuntu installation, then, Windows 7 will erase the grub (The Windows domination :)) and that you may need to install seperately later (using the command "sudo grub-install" by booting with the booting device you used for Ubuntu installation), which can become difficult for you if you are new with this.


downloading a software that States it requires windows?

You should have a look at 4+ Ways to Run Windows Software on Linux

To me the best solution is to install Virtualbox (documentation there VirtualBox/Installation

And then to install your version of Windows 7 via Install windows 7 through virtual box

The only thing to be sure is that your processor supports virtualization.

The list on intel ones is here About Intel® Virtualization Technology

Then install your "whellen software" within the virtualbox directly from your PC DVD drive.


Ubuntu 11.10 restart and shutdown not working fully

I found the answer at ubuntu forums. Adding the following to my grub seems to do the trick but it takes a while to reboot. NOTE: Do not do as suggested on that thread but instead add this to your /etc/default/grub file and then do update-grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vt.handoff=7 rootdelay=90 reboot=a,w"


The files goes to:

/sdcard/u1/Ubuntu One/

Regards.

ps.: Make sure to refresh the cache of your Android file browser.


You might want to try out GitLab.

However, as far as I know, there has not been a packaged version for Ubuntu, so you'd have to carry out the installation manually, and installation may be a little intrusive (it may litter files that are not tracked by the package manager over your system). Once it's up, management is pretty much a breeze though.

To get around the "intrusive" issue, you might want to consider installing it in a VM or a Linux Container (LXC) that runs only GitLab (like an application server).


"Failed to start Apply Kernel Variables" message when Booting

The last 4 lines of your sysctl.conf file

root soft nofile 10000
root hard nofile 12800

www-data soft nofile 10000
www-data hard nofile 12800

Should be in another location.  Edit these lines out of /etc/sysctl.conf, or place a # before each line, and try placing these limits in /etc/security/limits.conf as suggested in Ubuntu 14.04: can't get past 4096 max open files for non-root user, nofile ulimit -n on Ubuntu 14.04 LTS and https://serverfault.com/questions/165316/how-to-configure-linux-file-descriptor-limit-with-fs-file-max-and-ulimit

Also, you may need to edit /etc/pam.d/common-session and add the following line to the end:

session required pam_limits.so

as described in https://askubuntu.com/a/162230/283721


My computer went to sleep whilst upgrading 16.04 to 18.04, now I can't log in

For anyone having this same issue. I booted to recovery mode from grub, did a fsck check and a dpkg fix from the default menu. I rebooted and went into root, mounted the drive and ran "dpkg --configure -a".

Some daemons refused to run or install because of broken packages and whatnot (and I couldn't connect to wifi somehow), so after that, I booted into ubuntu and instead of logging in through the GUI, I went into the virtual terminal with Ctrl+Alt+F3 and logged in. Once I was in, I turned on my network card and connected, then I ran "sudo dpkg --configure -a", "sudo apt-get update" and "sudo apt-get dist-upgrade". After a reboot, it worked perfectly.


Try to remove your snap installation using this command

sudo snap remove skype

then download the .deb file from Official Skype website.

Then install it using dpkg for ex:

dpkg -i /path-to-/deb-file.deb

Note: check this answer for more information about snap.


How can I read system mail on my admin account?

Installing bsd-mailx should give you a minimal mail reader command mail.  You can rad the mail file with less if you wish. You mail will be a file in /var/mail.

Setting up your mail server for no local delivery and creating an off-host alias for root should get you mail to a central location.  Generally, you will want to use a Smarthost for delivery.


Shell script does not run when I double click

Sounds like your script lacks a shebang line. Make sure the very first line of the script reads:

#!/usr/bin/env bash

or

#!/bin/bash

On a side note, you should avoid putting .sh extension on a bash script, since bash is not sh. Preferably use no extension at all.


How do you uninstall everything to do with a specific program (redshiftgui)?

Your PC can't remove it because another app is using the apt.

You can detect and kill that process which is using apt (it can be software center or another terminal installing something with dpkg etc.).

But if you want an easy way: restart the computer :)

Here is the code for removing all things about redshift:

sudo apt purge '*redshift*'


If you are asking about the entries like

Jul 28 06:34:14 RaspberryGate CRON[678]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))

then yes, they are normal - for Debian-based systems

From the DEBIAN SPECIFIC section of man cron:

  Support for  /etc/cron.hourly,  /etc/cron.daily,  /etc/cron.weekly
  and    /etc/cron.monthly  is provided in Debian through the default
  setting of    the /etc/crontab file (see the system-wide example in
  crontab(5)).  The    default  system-wide crontab contains four tasks:
  run every hour, every    day, every week and every month. Each of
  these tasks will execute  run-parts providing each one of the
  directories as an argument. These tasks    are disabled if anacron is
  installed (except for the  hourly  task)  to    prevent conflicts
  between both daemons.


I'm at a loss. The best suggestions I have is try re-installing the drivers or trying the non-proprietary nv driver. If the problem is still there with the nv driver, then it is most likely not a driver issue.

Good Luck


Changing default text input on Nexus 7 Ubuntu to bluetooth keyboard

Currently, bluetooth is not quite working on the image yet, so this won't be possible yet.

Here's the bug:
#1070770 bluetoothd dies with glibc malloc memory corruption when used with brcm_patchram


How to mount Smartphone to recover files

MTP mode wont work. It's an abstracted filesystem meaning Photorec (et al) don't have direct access. According to the Photorec website, you'll need to throw the phone into Mass Storage mode. Once you've done that, it should see the drive correctly.

I'm not sure what sort of recovery you're doing here. If the screen is broken and you're stuck in MTP mode, you might still be able to do a recovery, using adb and dd to create a raw image of the affected partition. Move that over to Ubuntu, mount it and recover.

If you have neither access to the screen or root, you're fighting a much, much tougher battle. For what it's worth, I've been in that exact spot before and it's not good. All I can say is thank Google and Facebook for the various privacy-invading cloud syncs :) They have saved my behind a couple of times now.


Firstly, like George Edison commented, what Chrome are you using. Update Chrome to the latest version in case it was a bug that has been fixed.

Secondly, I tested on various sites and it works fine, remembering the last location I was in for a Browse. I would guess that it's probably the site you're trying to upload to; it's probably coded to go to the parent folder by mistake. Try it out on something like Gmail attachments or another popular site and see if the problem persists.


Upgrade the kernel to linux-image-extra-4.13.0-1005-azure-edge

Worked first time:-)


How to take a screenshot of a fullscreen video?

You can use VLC or scrot for this task.

Using VLC

This method allows you to make a screenshot using VLC, which is a very common program. To install VLC, use sudo apt-get install vlc

Start up VLC and open your video
Make the video fullscreen ( double click the video or press F11 )
Go to the time or frame where you would like your screenshot and press pause (this isn't really necessary since VLC can take snapshots on the fly, but this will help you get an exact frame)
Right click anywhere on the video, and go to Video -> Take Snapshot

Your video will be saved in the default snapshot directory ~/Pictures/ as xxxx-xx-xx-xxhxxmxxs.png (the directory to save screenshots can be changed by going to Tools -> Preferences -> Video -> Video Snapshots and changing the directory setting.

Using Scrot

This method isn't as elegant as the one above, but it will work with most video players.
Scrot isn't installed by default, so you may have to use sudo apt-get install scrot.

Pause your video player.
Open terminal
Issue the command sleep 10 && scrot /path/to/new/image (obviously change /path/to/new/image)
Quickly change to your video in fullscreen
Wait

Using Scrot + Keyboard Shortcut

Now, this method can be quite annoying to use, so let's bind it to a shortcut.

Open System Settings (This can be found in the dash.
In the Hardware section, go to Keyboard -> Shortcuts ->  Shortcuts
Now click the plus "+" button, and give your new command a name (e.g. "Screenshot"), and for the command type in scrot -e 'mv $f /your/pictures' (As always, change the directory to your liking)
Now click on where it says "Disabled" next to your command, and the text should change to "New accelerator...", enter your new keystroke in.

(Optional) If you want to remove the existing keystrokes for PrintScreen, you can click on the left side where it says "Screenshots" and remove each key-binding manually.

You can look scrot's documentation for more powerful features. man scrot


Emacs gtk keys not working in ubuntu 18.04 with i3

Found a way to solves gtk Emacs.
Use i3-gnome!

See https://github.com/csxr/i3-gnome
also
How can i3 use gnome settings in Ubuntu 18.04


I think you need to run:

mythtv-setup

or if that doesn't work:

sudo mythtv-setup

and you have to set up a password or user before you can login.


You can authenticate using a username/password perfectly fine without a server/CA certificate. However, I highly recommend configuring it to verify it with your CA certificate to prevent Man-in-the-Middle attacks.

Without any server verification anyone can impersonate your OpenVPN server and just accept your username/password. Results:

The attacker can intercept all traffic. As you don't verify the server you're connecting to, anyone can claim to be your server in a public network (or private network controlled by the attacker).
The attacker knows your username/password combination. Very very bad in case you reuse the same password for other things as well.

In Network Manager, it works fine without CA Cert as shown below, but please don't use it like that! If you don't use any server/CA certificate on Windows, you're really vulnerable to the above attacks.


Samsung laptop running Ubuntu 15.04 shuts down at 30% battery without warning

Maybe an end of life battery?

Check in the Bios (under boot options) if there is:

Smart Battery Calibration entry, then run it!

So restart and check the accuracy of the battery level, you can access it clicking the energy panel icon (the battery icon top right on the panel).


I think you answered your own question. A lot of programs use /tmp for storing temporary files, and they can be huge.

For example Brasero defaults to that directory to store a CD/DVD's image file, which can be 4.7 GB of size. It's not worth risking a serious slowdown (or a system lockup) in an out of memory situation if your RAM and swap get full.

For advanced users it's no problem to change some applications' defaults and mount /tmp as tmpfs. For general use it's just not worth the risk I guess.


Latest kernel update (4.8.0-39-generic) for 16.04.2 ... crashing after login?

Update: turns out the root cause for the crash is a problem with Symantec Antivirus. My company forces us to run that; and although its version 1.0.14.13 compiles with 4.8.39 ... it causes that crash upon login.

At least for me that means that I have to wait updates from symantec here.


How to search and replace text files with "/"

Yes. In this case it's useful to choose a different delimiter like _, this way you don't have to escape the slash:

sed 's_\./\._0|0_'

Example:

$ cat test
./.
$ sed 's_\./\._0|0_' test
0|0

Add

-i to change the file in place rather than print the output to stdout,
-i.b to do so and save a backup with .b as an extension and
g to the end of the expression to change multiple occurences per line rather than just the first one (→ 's_\./\._0|0_g').

Explanations

s/A/B/ – replace A by B, the same as s_A_B_, ssAsBs or whatever you can imagine:

  Any character other than backslash or newline can be used instead of a slash to delimit the BRE and the replacement. [source]

s/A/B/g – replace A by B and do it globally, so don't stop doing it after the first finding (per line!)
\./\. – the literal string ./., a dot needs to be escaped with a backslash because they are part of basic regular expressions and else would take any character, matching a/a, a/b, /// and so on
0|0 – the literal string 0|0


Network icon shows an Internet connection, while ping does not

You indicate a static IP, but the profile has no name servers listed... that is the base problem.  I'm not familiar with the file you show, but would guess it needs a line like below.  What I show below is the old-school way to put it directly into the resolv.conf file.

If ping by IP address works, but names do not work, then look in the file /etc/resolve.conf
At a minimum this file must contain at least one line like:

nameserver 54.23.123.4

I made that number up, so don't use it.  If there are no lines (up to 3) that start with the word "nameserver", or if the IP that is given is wrong, then, that is the problem.

If you know the IP of one or more of your name servers, the just add one to three of these lines and it should work right away.  Note that you must be root or use sudo to do this.  Also, use a text editor, not a word processor (or save as plain text).

Note, if you should use DHCP instead of a static IP, the DHCP client should over right this file upon making the connection and should put the nameserver lines in it as per the numbers told to it by your ISP's DHCP server.  So do not be surprised if this file gets over written.


Ubuntu stuck at spinning logo at boot time

your problem described is a bit broad, to be sure, I assume you can access your BIOS but Ubuntu can't load grub, so you get a black screen, a first good idea would be to check some common solutions like the ones described here
https://www.makeuseof.com/tag/fix-ubuntu-linux-pc-wont-boot/
but coming back to answering your question. What I would try before reinstalling is boot from a live media Ubuntu (CD or USB) and follow this steps
https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
I hope it's useful, if it doesn't work or gain insight on the problem you should add it as a comment.


Can't get IPython to start: "ImportError: cannot import name start_ipython"

IPython from the default Ubuntu repositories does not install ipython to /usr/local/bin/ so it looks like you have installed IPython in another way, and now it isn't starting properly. The easiest way to get things back to normal would be to uninstall IPython and then reinstall IPython from the Ubuntu repositories. You can find IPython in Ubuntu Software or reference it by its package name ipython.

By now IPython 2.x has become less useful, and it's time to consider installing IPython 3.x with the following command:

sudo apt install python3-ipython


I can't comment at the moment, but in simple terms, the main focus here should be to fix the mysql password, sudo service mysql stop,
run the command nano password to invoke the nano editor, paste the following text substituting with the new password

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    FLUSH PRIVILEGES;

Then save the file (CTRL-X, save the file), now start mysqld with the created file

    sudo mysqld --initfile=`pwd`/password

this will reset the mysql password, you may want to run sudo killall mysqld; sudo service mysql start

I'd then suggest using https://help.ubuntu.com/community/WordPress in order to install wordpress. It isn't a production ready environment, but will suffice for testing.

carry on if you actually want a "proper" install;
We are now going to start the installing process. I'm going to assume that you're running  ubuntu 14.04, and that you have nothing else on your webserver. (earlier versions will probably be the exact same, however replace /var/www/html with /var/www)

sudo -s This will run all commands as root, be wary of what you type!

okay, first we need mod_rewrite, apache2 comes bundled with it, however it is disabled by default!

a2enmod rewrite; service apache2 restart;

next,
cd into the web root folder
cd /var/www/html

wget http://wordpress.org/latest.tar.gz
tar -vxaf latest.tar.gz
mv wordpress/* ./
rmdir wordpress

We've just downloaded all of the relevant files required, and moved them into the correct place, next let's allow www-data (the user account for the web-server to modify files)

chown -R www-data:www-data ./

Next, let's allow .htaccess files,
nano /etc/apache2/sites-enabled/000-default.conf
and change the AllowOverride line to read Allowoverride All.

you should then be able to login to your webserver and setup the wordpress install.


Yet another question about turning off auto-maximize

The window manager tweaks option is called: "Automatically tile windows when moving towards the edge". Find that one, in the Accessibility tab, and un-tick it.


Reported/Confirmed as Bug #1639180.  I had the same problem and ended up manually installing Nvidia-304.131 (you have to first install the MTRR patch to the Nvidia run file).


The .iso you downloaded is a file much like a zip archive.

You can use it with virtualbox to boot and install Ubuntu.

Windows manages or recognizes the file in various ways, in your case it recognized it as an .iso and mounted it with some sort of tool to create a virtual drive F: , daemon tools ?

Unmount or eject F: and use the .iso file in Virtualbox.

See https://www.windowscentral.com/how-mount-or-unmount-iso-images-windows-10 or similar for further information.


Cyborg RAT 3 Mouse and Kubuntu 12.10 - I can't get the guides to work

Well, I eventually determined that with the xorg.conf I mentioned above from Ubuntu Forums, it works until I press either of the mode buttons (one changed a colored LED, and another changes the sensitivity of the pointer). Using an answer to another askubuntu question about R.A.T.3 mice, I was able to figure out that buttons 10 through 14 correlate to those mode buttons. So in the above configuration, I changed 13 and 14 to 0's, and now it works! Here is the configuration I am currently using:

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Madcatz Mad Catz R.A.T.3 Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 0 0"
EndSection

The functionality of the two mode buttons is preserved, as they operate with the mouse's on-board firmware. Although I changed the MatchProduct line, but it appears that the configuration works either way.


I found a solution here:
How to enable integrated GPU (with QSV) on Coffee Lake CPU in Ubuntu 18.x

I can now extend my desktop across multiple monitors.  HOWEVER, the desktop display on the 2-HDMI monitor flickers/blackouts constantly.  Again, I know its not the monitor/cable/power because I also share this monitor with a windows machine and do not see the flicker.  I can consistently make the desktop blackout if I move the mouse off the edge of monitor.  I'll keep digging and post any updates as the screen flickering is very annoying.

Any insight is appreciated.


Why can't I boot the Ubuntu installer CD?

During boot your HP Notebook should display a message stating

Press Esc Key for StartUp Menu

Pressing Esc should show a menu with your boot options.

Select the internal cd/dvd rom drive and it should boot from your cd.

If you want you can also access the BIOS setup through the F10 Key during boot and set your default boot order.

I recommend following this manual from HP, look into Chapter 5.


A power reset worked for me!
It fixed all hotkeys troubles, AND also a problem with no speaker sound after plugging and unplugging headphones.
Running Ubuntu 20.10, see
https://support.hp.com/us-en/document/c01684768
---> press and hold the Power button for 15 seconds to reset.
then all hotkeys were fine.


Does Kaspersky Antivirus 2012 work on ubuntu 12.10?

It is common for new Linux users to wonder what the best antivirus for Linux is after coming from Windows. Antivirus applications are unnecessary for Ubuntu or Linux in general. There are only a handful of viruses on Linux, and most of them are "proof of concept" type viruses, so you would have to hunt them down, download them and manually install them yourself. There are very few, if any viruses in the wild. I do not personally know anyone who runs Ubuntu/Linux and uses an antivirus program, and know no one who has ever had an issue. At most, people run antivirus checks on shared files, to make sure that they do not pass any viruses on to Windows users.


The correct driver for your device is not 88x2bu; as the name of the device implies, it is 8814au. Let's install it:

sudo apt update
sudo apt install git dkms
git clone https://github.com/zebulon2/rtl8814au.git
sudo dkms add ./rtl8814au
sudo dkms install rtl8814au/4.3.21

Reboot and your USB wireless should now be working.

I suggest that you also disable the internal device by blacklisting its driver. Find out which to blacklist with:

lspci -nnk | grep 0280 -A3

One of the items reported will be 'kernel driver in use.' For example:

03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b2] (rev 83)
    Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:c270]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

Blacklist the driver with:

sudo -i
echo "blacklist iwlwifi"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r iwlwifi
exit

Of course, substitute your exact driver, if not iwlwifi. If in doubt, post the lspci result here and we'll be happy to help.

EDIT: The previous approach was not productive, for reasons that I don't understand. I did notice, as I compiled the driver myself, that there were many warnings; however, no errors. We always hope that the warnings are harmless, but, in this case, perhaps not.

Let's remove the unproductive driver and try a different version that compiles with no warnings at all and, certainly, no errors, on my 19.10 system. From the terminal:

sudo dkms remove rtl8814au/4.3.21 --all
sudo rm -rf rtl8814au

Now, let's install a hopefully more stable driver:

git clone https://github.com/tpircher/rtl8814AU.git
sudo cp -R . /usr/src/rtl8814au-4.3.21
sudo dkms build -m rtl8814au -v 4.3.21
sudo dkms install -m rtl8814au -v 4.3.21

Reboot and tell us if there is any improvement.


Ubuntu 14.04 system installation crashes on Thinkpad t440

I've seen the same error before when installing Ubuntu on an old computer. The Ubuntu installer was hanging about halfway through when retrieving files. I tried replacing the hard drive with another hard drive, and after that the Ubuntu installer went all the way through the installation from start to finish without hanging, and after the installation was finished it rebooted successfully to Ubuntu.


How do I begin to diagnose and fix indicator-datetime-service using 100% CPU and 90+% memory in 16.10?

This happened to me on Ubuntu 17.10. The cause of the problem for me was that the evolution data server was trying to sync with Google calendar events and somehow caused a memory leak.

Before doing anything, you may need to stop the indicator datetime service temporarily to get your computer in a usable state. Here's how:

Open up System Monitor
Sort services by the highest CPU or Memory consumption
indicator datetime service should show up at the top
Right click on it and select stop process.

Now we need to disable the Google calendar sync.

Here's how to do it:

Open up Calendar
From the menu, select calendar > Calendars
From online accounts, select Google (or maybe it's another one for you)
Disable calendar sync for the online account

I actually just removed the online account entirely and when I rebooted the problem was gone. Hope this helps.

A clue on how to solve this is here.
Here's the full bug report.


unsuccessful sudo apt-get update not working

sudo lsof /var/lib/dpkg/lock (man lsof) will show all processes that have the file open. On my system (YMMV), with synaptic running:

$ sudo lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
synaptic 14382 root   15uW  REG    8,6        0 424990 /var/lib/dpkg/lock


How can I sort a text file from number of occupied lines?

With GNU Awk version 4.0+

gawk '
  BEGIN {RS=""; ORS="\n\n"}
  {a[$0] = length($0)}
  END {
    PROCINFO["sorted_in"] = "@val_num_desc"
    for (i in a) print i
  }
' file.txt

Note that this sorts on number of characters, including punctuation and whitespace.


USB-C Charging doesn't charge UP while suspended (i7-8565U Whisky Lake)

This issue was resolved with a kernel update some time after posting the question.


Just  try running  aptitude   update   then  upgrade
 from the terminal    Sudo aptitude

This  fixes  a bunch of stuff


Emulating the left mouse click with the help of xdotool and xbindkeys

Are just just trying to emulate a left-click, or do you really need to use those programs? you can emulate 123 left clicks, with a 1-second delay between each, using nothing but xdotool by using:

xdotool click --delay 1000 --repeat 123 1

For 3 clicks with a 10-millisecond delay between each, use

xdotool click --delay 10 --repeat 3 1

The syntax is: xdotool click --delay <delay in milliseconds> --repeat <amount of clicks> 1 <1 = left click, 2 = Right Click>
So, for 1 left click, it would be: xdotool click --delay 0 --repeat 1 1
and for 1 right click, it would be: xdotool click --delay 0 --repeat 1 2


The easiest way to do a network install would be to boot netboot.me or billix, both of which have Ubuntu network installers provided.  However, both of those options download the image on the fly.

If you are looking to install from a local image over your network connection, follow these instructions for a local netinstall via using DHCP, TFTP, and PXE: https://help.ubuntu.com/community/Installation/LocalNet


What is the difference between Ubuntu GNOME and Gnome Desktop or just installing Gnome Shell on Ubuntu?

Ubuntu used to come with LightDM, and Gnome desktop as default.
Ubuntu with a different DM and GUI was given a prefix (Kubutu, Lubuntu, Xubuntu, Edubuntu).

When Ubuntu switched to Unity DM and Desktop, the phrase Ubuntu Gnome was coined to refer to the old installation while Ubuntu referred to the new.

With the release of 17.04, Ubuntu has gone to a new DM (gnome-shell) and returned to the gnome desktop (named ubuntu-desktop).

Removing one DM and desktop and installing another is no different than installing the flavor of Ubuntu that originally has that DM and desktop.
For example, if you remove the Unity DM and desktop then install KDM and Plasma/KDE desktop, you would now have Kubuntu. Note:in most cases the greeter (login) has to changed with the DM.


By default the file system reserves 5% for the root user, which is what you're seeing in gray. You can change this using tune2fs. For example, to change the reserved space to 1% you would use:

sudo tune2fs -m 1 /dev/sdb1

where /dev/sdb1 is the location of your drive.

I have tested this successfully on Ubuntu 13.10


Limited or no connectivity on windows clients

You need to enable ip_forward and configure MASQUERADING with iptables in such a way that your internal network can route traffic to the internet via the external interface of your firewall if I understand your question correctly.


aptdaemon : Depends: python-aptdaemon (= 0.31+bzr506-0ubuntu6.1)

Notice the = sign.  Its dependent on python-aptdaemon of that version.  A newer version is being installed in the system.  As such, the system is trying to resolve the dependencies by trying to downgrade that package, which explains why everything else is imploding.


Execute program in Geany produces geany_run_script.sh script

Creating run_script is default behaviour. This is due some issue running inside internal vte might cause. However, you can configure it: Edit->Preferences->Terminal->"Don't use run script" (Execute programs in vte has to be enabled for it. Therefor you will need have libvte installed)


Change permission for ALL folders and files

I actually suggest NOT following Evandro's answer, because not only does it give permission to yourself, it gives open permission to any application or entity on your computer, including those which may have malicious intent. Especially if you're running a web server, you'll want to avoid having open permissions like that. I suggest giving read listing permissions to other users and full access, including write to yourself.

sudo chmod -R 755 /var/www

Which will give you web-appropriate permissions recursively throughout your web directory.


Black Screen problem after setting ubuntu 12.4

I had the same problem. what i did was right click and select change desktop background,
all settings, additional drivers, update and restart.
at the log in, click the icon and select Ubuntu 2D, and log in.


Have a read of the Upgrade Notes here. It is recommended that you upgrade from progressive versions or LTS releases only.

Try and install via the method outlined by UbuntuGeek here and let us know how you get on.


Since it's just for some friends, try using Hamachi.  There's a nice gui for it called Haguichi.

First, download Hamachi and install the .deb for your system.

Then, type the following into the terminal.

sudo add-apt-repository ppa:webupd8team/haguichi
sudo apt-get update
sudo apt-get install haguichi

You should be able to open it and create a network for your friends.  Just give them your hamachi ip (usually is 25...*).  No port forwarding necessary!


Many fonts are packaged for Ubuntu and available via the "Fonts" category of the Ubuntu Software Center. If you prefer apt-get, search for packages starting with otf- or ttf-.

Font files that are placed in the hidden .fonts directory of your home folder will automatically be available (but /etc/fonts/fonts.conf indicates it will be removed soon.). You can also place them in the ~/.local/share/fonts directory on newer versions of Ubuntu per the comments below.

You can also double-click on the font file (or select Open with Font Viewer in the right-click menu). Then click the Install Font button.

If you need the fonts to be available system-wide, you'll need to copy them to /usr/local/share/fonts and reboot (or manually rebuild the font cache with fc-cache -f -v).

You can confirm they are installed correctly by running fc-list | grep "<name-of-font>"

You may need to restart some programs, like OpenOffice Writer, before they actually show the new fonts (usually such programs are caching the font list when they start up).

Edit: Changed advice to manually install into /usr/local/share/fonts instead of /usr/share/fonts to reflect comments and best practice.


How to know which package makes 'tntnet' service autostart?

General answer

If the software is made for Linux there should only be one location:

/etc/init.d/

There should be a script there called tntnet and this should be either an upstart script (new method) or an init script (old method).

Just to prove it I installed it ;)

  Specific for tntnet

pwd
/etc/init.d
ls tnt*
tntnet

and the file itself:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          tntnet.org
# Required-Start:    $local_fs $remote_fs $time $network
# Required-Stop:     $local_fs $remote_fs $time $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: modular, multithreaded web application server for C++
# Description:       web server in which dynamic content can be written in
#                    ecpp, where C++ code can be embedded in HTML layout.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/tntnet
NAME=tntnet
DESC=tntnet

test -x $DAEMON || exit 0

To stop tntnet from auto starting you can do tntnet stop from command line or remove the service. This should work:

update-rc.d tntnet disable


The kill command just sends a signal to the process, and the default signal (when you don't select one), is trapped by the process and maybe ignored or handled in some other way.  Use signal -9 , which is the non-maskable signal, to ungracefully kill the process.  You might check any documentation of the process to possibly find a signal which will tell the process to clean up and terminate, but -9 is the usual "just kill it" approach.

kill -9 2339

should kill it since you own the process.
or from the names for the signals (list from kill -l)
kill SIGKILL 2339


Ubuntu 17.10 64 bit freezes if left Idle

It is possible that it freezes because the display manager (GDM) defaults to Wayland (with Xorg as a fallback) and you machine might not support Wayland. My machine actually froze, too, while GDM was trying to use Wayland. I just disabled it in /etc/gdm3/custom.conf. Just uncomment WaylandEnable=false.


I finally found the solution...i added the "suspend button" at power off/logout buttons and my pc now can be in suspend status. But after clicking to wake it up
my monitor was remaining black..my graphic card is Nvidia Geforce 450 ts, so i installed the 390 driver and now everything is okay and with maximum resolution also...
Hope that helps...


16.04 Black Screen with Mouse Pointer after wake from screensaver

Buddy first of all .. thats some config you are rockin'.

Ubuntu 16.04 uses lightdm for display manager. I have seen some bugs in the past regarding similar issues. I would recommend re-installing lightdm or upgrading your system to 18.04 lts.

sudo apt-get purge lightdm

sudo apt-get update

sudo apt-get install lightdm

dpkg-reconfigure lightdm

reboot

But as a personal suggestion, your system is really high end and I think you should be on at least the latest LTS version. Consider upgrading your OS.

As far as I can remember Ubuntu 18.04 LTS uses GDM for display manager.


How to have the list of the url failures?

You can try that command this way:

wget -c --rejected-log=/path/to/logfile -i file.csv

--rejected-log=logfile:

Logs all URL rejections to logfile as comma separated values. The values include the reason of rejection, the URL and the parent URL it was
found in.

Note: You need to create a log file for use and give the path in that command

See: man wget


Install kerberos client without interactive session

Add export DEBIAN_FRONTEND=noninteractive before it, then it should work.


Errors were encountered while processing gdk-pixbuf-psd

Fixed it by editing this file:

/var/lib/dpkg/info/gdk-pixbuf-psd.postinst

I commented line 23 (which is indicated in the error), then ran

sudo apt-get install -f

successfully. After that, I removed the package using Package Manager


I think you should follow the Ubuntu official guide about sound issues, specifically in the step 1 for your Ubuntu version:

https://help.ubuntu.com/community/SoundTroubleshootingProcedure#Step 1

It helps you upgrading alsa packages in the safest way at the versions available at these PPA:

https://launchpad.net/~team-iquik/+archive/alsa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=lucid

https://launchpad.net/~ubuntu-audio-dev/+archive/ppa?field.series_filter=lucid


Okay, I think I figured it out. Well, enough to get past it anyway...

Apparently Ubuntu stores the UTC time to the system time in the BIOS and Windows stores the local time. If the system time reads 12:00PM, Ubuntu adjusts to display the correct time for your time zone. For example, Central Time is UTC-6 so it would read the 12:00PM system time and subtract the 6 hours for me and show 6:00AM.

Windows on the other hand saves the local time. So if I save the clock to show 6:00AM in Windows, Ubuntu will no longer display the correct time. I have no idea why this causes Ubuntu not to boot AT ALL but it is what it is...

I got Ubuntu back up and running by using boot-repair. I booted to an Ubuntu install disc and typed this from the terminal:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

Then I selected Recommended Repair and restarted once it was finished.

There's a way to either force Ubuntu to treat the system time as the local time or force Windows to treat it as UTC time. This link showed me how to do that:

Clock time is off on dual boot


If you have a HDA Intel sound card, you can update to the latest ALSA release by following this guide, or going to this ppa and downloading the one for your Ubuntu version.

Adding the PPA to your sources is not advised, because it will try to update ALSA every second day.


Default group permissions for /var folder

/var is used by various processes to write lock files, cache, pid files, log files, ... Some files / sub-directories will need one kind of permissions / ownership, some will need something different.
I'm afraid to tell you that you cannot solve your problem with only one command (unless you have a backup of /var with all permissions and ownership preserved).
To help you to understand the challenge, here is a printout of my /var :
drwxr-xr-x  2 root   root      4096 mar 15 21:36 backups
drwxr-xr-x 29 root   root      4096 mar  4 10:53 cache
drwxrwsrwt  2 root   whoopsie  4096 fév  6 20:21 crash
drwxr-xr-x  2 root   root     12288 oct 27 10:48 games
drwxr-xr-x 98 root   root      4096 mar  4 11:40 lib
drwxrwsr-x  2 root   staff     4096 oct 20  2009 local
lrwxrwxrwx  1 root   root         9 mai 31  2012 lock -> /run/lock
drwxr-xr-x 27 root   root     12288 mar 20 07:44 log
drwxrwsrwt  2 root   mail      4096 jan 29  2013 mail
drwxrwsrwt  2 root   whoopsie  4096 mai 12  2013 metrics
drwxr-xr-x  3 root   root      4096 oct 11  2011 opt
lrwxrwxrwx  1 root   root         4 oct 26 22:52 run -> /run
drwxr-xr-x 11 root   root      4096 mai 12  2013 spool
drwxrwxrwt  5 root   root      4096 mar 20 07:52 tmp
drwx------  3 root   bin       4096 mar  9 12:13 webmin
drwxr-xr-x  6 benoit root      4096 oct 31 21:22 www

You will remark that some of these directories need to be setuid (the s flag in the permissions - sudo chmod g+s /var/metrics).
tmp will be with the sticky bit (sudo chmod 1777 /var/tmp)
And you still have to go inside each of these directories !
By the way, setting the ownership of the whole /var with read-write rights for the group is a bad idea. This means that if the web server is badly configured, a hacker may have the possibility to read and write the whole /var directory.
Remember that under /var/lib you will find the data files of MySQL, Postgres, ... if you use it.
If you want to fix the permissions and the ownership without reinstalling the system, you will have to do a second installation of Ubuntu elsewhere and check what are the exact permissions and ownership on /var (ls -lR /var)


Is there a Windows 7 theme for Ubuntu 15.10?

You could try noobslab's Windows 7/8 theme.

sudo add-apt-repository ppa:noobslab/themes
sudo add-apt-repository ppa:noobslab/icons
sudo apt-get update
sudo apt-get install win-themes
sudo apt-get install win-icons

Source


The script ~/.profile is executed at each login, you can put your script here.

But be aware that if you login in two different virtual terminals, the script will be executed twice.


Essentially, you need to add a new user account.

First, restart. As soon as the BIOS screen disappears, press Shift. When you see what is called a "GRUB" screen, you need to select the Advanced options for Ubuntu and then chose "Recovery Mode".

When you see a screen with about 8 options, you need to use the arrow keys to select "Drop to Root Terminal".

Then when that opens, run the following commands:

adduser username

then you will see this (in this example, I replaced username with twimmy:

Adding user `twimmy' ...
Adding new group `twimmy' (1001) ...
Adding new user `twimmy' (1001) with group `twimmy' ...
Creating home directory `/home/twimmy' ...
Copying files from `/etc/skel' ...

Then it asks for the username twice:

Enter new UNIX password:
Retype new UNIX password:

If it's successful, it asks for this:

passwd: password updated successfully
Changing the user information for twimmy

It asks the following info, make sure to enter a name (as it's used at the login screen).

Enter the new value, or press ENTER for the default
    Full Name []: Tim Hitchins
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n] Y

Now we need to give the user sudo privileges with this command:

sudo usermod -a -G sudo username

and then restart and boot as normal. You should be able to login with the user you just created!


will booting Ubuntu in my samsung np550p5c-s06in brick it?

First, WUBI is useless on a computer that uses EFI to boot. Don't even bother trying to use it.

Beyond that, the Samsung "bricking" problem has been worked around by new kernel features. I don't know precisely when Ubuntu implemented these features, but I'd be shocked if they weren't available in the latest release (13.10). If you want to be absolutely sure, you can install and use Ubuntu in BIOS/CSM/legacy mode -- but this is awkward unless you also convert Windows to boot in the same way. The least awkward way to mix boot modes is to use my rEFInd boot manager: Install it in Windows, add hdbios to the scanfor options in refind.conf, and install Ubuntu in BIOS mode.


Complications With Dual Boot Of Ubuntu and Windows 8 UEFI

When installing any OS on an UEFI based computer and GPT disk
installation source - USB/DVD - should be booted the UEFI way.

Nothing more.

Ubuntu GRUB can chainload Windows on BIOS and UEFI.
Windows boot manager can chainload GRUB/Ubuntu only on BIOS/MBR.

BootNext utility can boot Ubuntu/Linux directly from Windows.


The info you posted looks fine. Out of curiosity, why are you using dsa keys instead of rsa?
Check the permissions and ownership on all files and directories (ie: ./.ssh/)
Is the user account locked? (can you login with the password?)
Failing that, check the server log file, which should tell you why it is refusing the public key (you may want to start the server in more verbose mode if it isn't immediately clear why) - comparing the one that works with the one that does not for clues.


Uninstall Ubuntu 12.10 and revert back to Windows 7

This is essentially a case of installing Windows 7, which involves booting from the Windows 7 installation disc and installing over your complete hard drive.  Whether or not you have Ubuntu (or any OS) already on that drive doesn't really change the procedure, except that perhaps the installation may prompt you as to whether you want to overwrite existing partitions and/or use the whole drive (you want to use the whole drive).

This isn't really an Ubuntu related question, so I'll leave the specifics of how to do this to other sites on the internet.


Persistent live Ubuntu

A good and  easy way to add some software to a live USB stick with Ubuntu is to create a persistent live system, and to install the software into it.

You can create such a system with mkusb according to the following links.

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

https://help.ubuntu.com/community/mkusb/persistent

Please notice that in a persistent live drive

Many valuable program packages are found in the repository universe, but it is not activated in [persistent] live standard Ubuntu. Make it active with

sudo add-apt-repository universe

Do not update & upgrade like an installed system
Update the lists according to the current content of the Ubuntu repositories

sudo apt update

Install programs like you would install into an installed system, for example to install the package manager Synaptic,

sudo apt install synaptic

and then install the Teamviewer software you want from a debian file (like you would install it in an installed system),

https://community.teamviewer.com/t5/Knowledge-Base/Installation-of-TeamViewer-on-a-Ubuntu-system/ta-p/45
You cannot use a new kernel and cannot use new device drivers (for example proprietary drivers for graphics or wifi), because these are started at boot before the overlay system (of the persistent live system) is activated. If this is what you need, please use an ...

Installed Ubuntu system in a USB stick

A good method is to create an installed system in a fast USB 3 stick. This would work like an installed system in an internal drive (but maybe slower). It will be easier if you disconnect (unplug) the internal drive before you start installing.

An installed system (compared to a persistent live system)

is more stable and can be updated and upgraded without restrictions.
is portable but not as portable between computers (as a persistent live system). Installed proprietary drivers may reduce portability between computers,
should be tweaked to reduce writing to the stick in order to reduce wear of the memory cells.

You can create an installed system in a USB stick according to the following link to another question and answer at AskUbuntu (and links from my answer there),

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)


Palm detection not working in Ubuntu 16.04

You need to enable the detection first then set the dimensions. Just reverse your commands.

xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Palm Detection" 1
xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Palm Dimensions" 5 5


Running apt-get update and redoing apt-get install seems solve the problem.


can't add vpn .ovpn file in network manager

I have used 20.04 to do the same thing recently without any issues so I don't really have an answer but a possible workaround - you could try running the nm-connection-editor tool via the command line. I discovered this recently and there are some settings there that are not possible in the standard Ubuntu settings app.
So if there is an issue with the Ubuntu network settings app the tool may not have the same issue.
I have spotted other problems with the ubuntu network settings app - I cannot delete static routes via the app, the window just goes white as if the GUI has crashed. I have to delete them manually by editing files.


Ubuntu 18.04 LTS update broke nvidia dual monitor setup

same thing happened to me upgrading 16.04.5 from 4.4.0-127 kernel to 4.4.0-128 and up.
GE9400 video card
A clean install of 18.04.1-ubuntu desktop using proprietary drivers during install had the same issue - only one monitor usable(nvidia-settings had no Xwindow menu items to reconfigure)
A clean install of 18.04.1-mate using open source drivers worked, upgrading that install to proprietary nvidia then worked
I'd try changing your install to open source nvidia and if that works re-install the proprietary drivers
hth


How to create a USB Ubuntu boot device from OSX for PC?

1. Prepare the USB stick

(You can skip this step if you intend to use the USB stick with only generic PC hardware.)

-Launch Disk Utility from Applications>Utilities or Spotlight search

-Insert your USB stick and observe the new device added to Disk Utility

-Select the USB stick device (you may need to enable the option View>Show All Devices) and select Erase from the tool bar (or right-click menu)

-Set the format to MS-DOS (FAT) and the scheme to GUID Partition Map

-Check you've chosen the correct device and click Erase

2. Install and run Etcher

To write the ISO file to the USB stick, I suggest Etcher (you can download it from this link).
After downloading this and clicking to mount the package, Etcher can either be run in-place or dragged into your Applications folder.

3. Etcher configuration

Etcher will configure and write to your USB device in three stages, each of which needs to be selected in turn:
-Select image: select the ISO image of Ubuntu.

-Select drive: select your USB drive.

-Flash!: press that button to make your USB drive bootable (you will be asked to provide your password).

After entering your password, Etcher will start writing the ISO file to your USB device.
When everything has finished, you will be notified.

Credits: Create a bootable USB stick on macOS


For windows follow these instructions.

For Ubuntu:

Open a terminal window and
type df -h to get the size of the root volume, then type sudo resize2fs /dev/<disk – mine was sda1>, then after a few minutes and the operation is completed type df-h again to verify your root volume has increased.

Do windows first.


Faenza / Ubuntu Mono power icon problems

I had this problem too.  I prefer the Faenza-Dark variant but has a rubbish battery icon like in your screenshot.  If you used the ppa to install the icons then you should have a Faenza-Ambiance/Radiance theme to choose which fixes it, but as I prefer the -Dark variant I had to make a custom version.  What I did was copied Faenza-Dark to another folder like Faenza-Custom sudo cp -r /usr/share/icons/Faenza-Dark /usr/share/icons/Faenza-Custom
Then edit  it.  sudo nano /usr/share/icons/Faenza-Custom/index.theme delete everything in it and paste in this

[Icon Theme]
Name=Faenza-Custom
Inherits=Faenza
Comment=Icon theme project with tilish style, by Tiheum

Directories=status/22,stock/22

[status/22]
Size=22
Context=Status
Type=Fixed

[stock/22]
Size=22
Context=stock
Type=Fixed

then use gnome-tweak-tool to choose the Faenza-Custom theme and it will have the fixed battery icon


14.04: Compiz Fusion effects are glitchy

Unity team doesn't care about Compiz effects, and Unity's window decorator (introduced in 14.04) just breaks them. If you disable Unity plugin, most of these will work correctly.


Extending Disk Size - Ubuntu 16.04 - Virtualbox (.VHD) - Windows 10 Host

A dynamically expanding virtual hard disk is one in which the size of the .vhd file grows as data is written to the virtual hard disk. They generally start out quite small and grow to the maximum size you set. The reason you can't resize it with gparted is it's dynamic and only grows when data is added to it and that size is curtailed by the maximum that you set. Since your image shows the lvm flag on your volume, I'm assuming you are using the Logical Volume Manager.

Create a new partition in the unallocated space you show in your image.

Then reboot your VM or issue the command echo 1 > /sys/class/block/sda/device/rescan to tell the kernel to rescan the drive.

Determine the device name of your new partition. I will use the example of /dev/sda6. (change this to match your situation)

To add this to our LVM configuration first we create a physical volume using the device name we determined previously.

pvcreate /dev/sda6

Next determine the name of your volume group by issuing the command pvdisplay look for a line that looks something like this:

VG Name               ubuntu-1604

I will use ubuntu-1604 in this example as the volume group name. Modify as necessary to match your conditions

Using this info obtained in the above process we will extend our volume group with the command vgextend VG name device name for example:

vgextend ubuntu1604 /dev/sda6

Find the logical volume name with the command lvdisplay

It might be:

LV Name                /dev/ubuntu-1604/root

Now, let's extend the logical volume to all free space available:
lvextend -l+100%FREE /dev/ubuntu-1604/root

Finally lets look to see how we did with df -h

Sources:

LVM HOWTO

expand hard disk LVM


You can add the Screenshot application to the Dock just like any other application. Open the application overview, search "Screenshot". As you start to drag the icon to the left, the Dash will reappear. Drop the icon on the Dash in between two icons already on the dock, and it will be pinned.


TurboBoos can be disabled only in BIOS settings, if you have no such option there you can't disble TurboBoost short of customizing BIOS ROM.
To update value in such files from console use
echo -n 100 > /proc/filename. Values are not generally stored anywhere.
To allow non-root to do it, create a script that modifies values, and use visudo to allow access to script.


Correct.

Depending on what you want to test, you can also disable bapm for example.

See the full list of boot parameters for amdgpu and their explanation here.