THIS is what finally worked!

1) Create the startup script file

in /etc/init.d - sudo nano /etc/init.d/StartVM.

Copy Paste the following in the file and replace "My VM Name" for your vm name:

#! /bin/sh
# /etc/init.d/StartVM
#

#Edit these variables!
VMUSER=spode
VMNAME="My VM Name"

case "$1" in
  start)
    echo "Starting VirtualBox VM..."
    sudo -H -b -u $VMUSER /usr/bin/VBoxVRDP -s "$VMNAME"
    ;;
  stop)
    echo "Saving state of Virtualbox VM..."
    sudo -H -u  $VMUSER /usr/bin/VBoxManage controlvm "$VMNAME" savestate
    ;;
  *)
    echo "Usage: /etc/init.d/StartVM {start|stop}"
    exit 1
    ;;
esac

exit 0

2) Give the script executable permission

with sudo chmod +x /etc/init.d/StartVM.

3) Tell script to run at startup.

tell the script be the first to shutdown and the last to startup.

sudo update-rc.d StartVM defaults 99 01


Never mind.

You can take a look at this for the solution. https://help.ubuntu.com/community/Wacom#Inkscape


Why can't I get my Nvidia 560 Ti to work with dual monitors?

I think you need to remove the third party drivers. I had the same issue and have seen other posts on the forum as well.


What Psensor data can you read from an intel gpu?

If I'm not mistaken the Intel GPU will have the same value as the CPU in terms of temperature for psensor data.

This command isn't psensor data but may help you find the info you're looking for.

intel_gpu_top


Clear the history of recent commands in terminal

In case of bash you could simply delete the content of ~/.bash_history.

The following should do it:

> ~/.bash_history


When I use "Connect to Server", how can it remember the IP address?

Connect to the server, and when viewing the directory on the server in Nautilus, simply press Ctrl+D to bookmark the location. If you unmount, and then open the bookmark again, it should automatically connect, assuming you opted to store the username/password in your keyring.


Sh: php command not found when trying to execute file from web broeser

Most likely the path for php isn't in the $PATH environment variable used for shell_exec when you are running it from the web server.

Use the full path for the php command, like

shell_exec (/usr/bin/php test.php)

You can use the which command on the command prompt to find the full path for php

which php


Backing up for syslog/dmesg/message to different folder

I suspect you just don't have access to them from the user that is running this script. Look at the file ownerships:

$ ls -l /var/log/{dmesg,syslog,message}
ls: cannot access /var/log/message: No such file or directory
-rw-r----- 1 root   adm 86384 Mar  9 11:12 /var/log/dmesg
-rw-r----- 1 syslog adm 18553 Mar 25 13:25 /var/log/syslog

You could read from these files if you had a user in the adm group but you'd not be able to write. The first user on a system is typically a member of the adm group but if your ~/Desktop copies are empty, I'd suggest your user isn't (check with the groups command). You do have a few options.

You could either look at adding ACL permissions for your user. These are separate from the standard permissions and adding explicit read/write access to your user doesn't really affect anything else. Which is nice.

sudo apt-get install acl
sudo setfacl -m u:$USER:rw /var/log/{dmesg,syslog,message}

This might need a reboot to take. You might even need to change your fstab. I haven't but ACLs seem to work okay here so I'm assuming that's not required any more.
You could change the unix permissions on the file. The safest way of doing this would be to add your user to the adm group and then to enable group write on those files:

sudo usermod -a -G adm $USER
sudo chmod g+w /var/log/{dmesg,syslog,message}

You'll need to log out and in again to see the effect.
Or you could let anybody read and write these files. This could be a security risk so I'm not giving you code... But honestly, while possible, you probably don't want this.
The other option is simply running the script as root with sudo ./scriptname. The downside of this is that anything this script does will be done as root. That includes creating new files (which >> can if the file doesn't exist already) and that can be a pain for the user.

And if this isn't academic curiosity and you're actually trying to get some work done in the best possible way, there are tools that do these things for you but better. You really want to look at logrotate. This Digital Ocean tutorial is the cleanest one I can find quickly.


Make sure the permissions on the mysql data directory is owned by the mysql user.

sudo ls -al /var/lib/mysql

Everything in that list should be owned by mysql (except the .. entry which would be owned by root).

If it's not the case, run the following command to fix it:

sudo chown -R mysql: /var/lib/mysql


Found the answer here and it works.

No sound on Ubuntu 15.10

So i created a file /etc/modprobe.d/intel.conf and added the following options -

options snd-hda-intel single_cmd=1
options snd-hda-intel probe_mask=1

And rebooted. Problem solved :)


How long does it take to partition during installation, and what happens if I restart

DO NOT RESTART!  You will likely regret it if you do!  Repartitioning an NTFS partition takes a lot of time, and once it starts you just need to let it go to completion.

Having said that, depending on what you're doing with that partition, you could end up with trouble afterwards.  If you are simply reducing the size of the partition by taking away some of the space at the end, you should be fine; I've done that many times without problems.

However, if you are resizing AND moving the Windows partition, you might be in for trouble.  Windows doesn't like that, and often rewards those who attempt it with the inability to boot into Windows, sometimes permanently.  I did it once, and recovery meant booting into Ubuntu, accessing the Windows partition to rescue everything of value, then reformatting the partition and getting rid of Windows entirely.  (By the way, it worked out: I've never reinstalled Windows on that machine and I've never missed it.)

The safest way to reduce the size of a Windows partition is from within Windows itself.  Once you have repartitioned and cleared out the space for a new OS, then is the time to boot into the Ubuntu (or other Linux) LiveDisk and install.


Ubuntu 14.04, problem installing package skype: i386

here's the solution that worked for me, I had the same problem,

dpkg --remove --force-remove-reinstreq skype

If you have any broken package, just replace skype with the name of the package.
Try that and let me know if that helped you.


Looking for USB VGA Adapter that works for sure?

A user reports it working on Ubuntu 9.04 after compiling some packages: http://mulchman.org/blog/?tag=displaylink

edit: apt-cache search displaylink returns xserver-xorg-video-displaylink - X driver for DisplayLink devices...it wouldn't be included if it didn't work. It might not support ALL resolutions, but I think it more than satisfies will it work.

edit: I would try pasting this section into you xorg configuration:

Section "Device"
        Identifier      "DisplayLinkDevice"
        driver          "displaylink"
        Option  "fbdev" "/dev/fb1"
EndSection

Section "Monitor"
        Identifier      "DisplayLinkMonitor"
EndSection

Section "Screen"
        Identifier      "DisplayLinkScreen"
    Device          "DisplayLinkDevice"
        Monitor         "DisplayLinkMonitor"
        SubSection "Display"
                Depth   16
        Modes   "1280x1024"
        EndSubSection
EndSection

Even with the windows drivers not all resolutions are supported across all chipsets.

another point worth noting is that in some configurations it has been noted that the DVI dongle doesn't function appropriately

okay maybe i found it:  http://lists.freedesktop.org/archives/libdlo/2010-November/000807.html

The most interesting thing is that I found out why I can use the
displaylink driver together with nvidia but not the fbdev driver.

This is just an explicit check (xf86Bus.c, xf86PostProbe()) whether both
framebuffer and pci devices have been claimed, if so the server refuses
to start.
The displaylink driver just clears the corresponding fbSlotClaimed flag,
no more magic required. But, there is another (similar) check in
xf86ClaimFbSlot() (xf86fbBus.c) that, when claiming a frambuffer slot,
makes sure no PCI slot has been allocated, I guess thats the reason why
the displaylink driven device must be registered first (as primary screen).

On another thread the green screen problem is attributed to using DirectFB

discussion here: http://web.archiveorange.com/archive/v/BNQl8iH957oQe619QVek
they indicate that it worked, if slowly.  but the box in question was a 266MHz monster so...


It doesn't look like it. You can drag into the terminal, but apparently you can't drag from the terminal.
Perhaps you already knew that though.

What you should know, is that selecting copies into a separate buffer, that middle clicking pastes from. That'll be a bit faster anyway, and it works with gnome-terminal.


You can use Geeqie Image Viewer:

Install it with

sudo apt-get install geeqie

Open Geeqie
Navigate to folder with your images
Select View -> Split -> Horizontal (or Vertical) then open first image on first part and second image on second.

Or you can install FSIV under Wine. It works great here.


what does 'y' stand for in apt-get install?

It stands for yes, so will answer yes to any questions that the apt-get command will generate.

You can find out the options of commands by viewing their manual page with the man command. In the output of man apt-get you can find the following section:

  -y, --yes, --assume-yes

       Automatic yes to prompts; assume "yes" as answer to all prompts and
       run non-interactively. If an undesirable situation, such as
       changing a held package, trying to install a unauthenticated
       package or removing an essential package occurs then apt-get will
       abort. Configuration Item: APT::Get::Assume-Yes.


Copy a list of files to remote computer while creating parent folders

Using rsync:

rsync -av --files-from=filelist.txt . remote:/some/location/

Run this from the directory where you have run find, the root of the directories, where the filelist.txt currently is.

--files-from reads files (newline separated) to be copied from the file filelist.txt.

--files-from should always use relative path (unlike mentioning directly), although you can be explicit about it:

rsync -av --relative --files-from=filelist.txt . remote:/some/location/


add blacklist acer_wmi to your /etc/modprobe.d/blacklist.conf , for example:

sudo -s
echo "blacklist acer_wmi" >> /etc/modprobe.d/blacklist.conf

and restart your computer.


Xubuntu 16.04 running slow on Core 2 Duo, 4GB ram SSD and Nvidia 9700 gts

With only 4GB of RAM when you have browser tabs open and watch movies you can run out of RAM. When things slow down open the terminal and type:

free -t

and something like this will appear:

              total        used        free      shared  buff/cache   available
Mem:        8032676     2723200     1758504     1706696     3550972     3233708
Swap:       8191996           0     8191996

This shows how much free memory (RAM + SWAP) you have available. As RAM approaches 95% usage and/or SWAP approaches 65% usage you will notice slow down and possible lock up's if Kernel version is less than 4.6.

In Kernel version 4.6 OOM (Out Of Memory) Killer was revamped to not crash systems as easily as before. Ubuntu 16.04 uses Kernel version 4.4 by default and Ubuntu 16.10 uses Kernel version 4.8 by default but you can upgrade at will albeit at the risk of not having an officially supported kernel version.

When using your browser you will find some websites will eat up RAM like kids in a candy store. In Google Chrome press Shift+Esc to bring up system monitor which will show you how much RAM each open tab is consuming.

Sample screen:


In one line:

rm ~/.mozilla/firefox/*.default/.parentlock

Explanations: You need to remove the .parentlock file in your mozilla profile:

cd ~/.mozilla/firefox
ls

This will show you one directory with a strange name, such as 12abc34d.default. Go to that directory and remove .parentlock.


No Sound even after fresh install of Ubuntu 14.04 x64

Install Sound card drivers and needed Alsa packages :

sudo apt-get install build-essential linux-headers-`uname -r` alsa-base alsa-base-udeb alsa-firmware-loaders alsa-oss alsa-source alsa-tools alsa-tools-gui alsa-utils alsamixergui


Try adding your user to mail group like this:

sudo adduser yourusername mail

And if you are using PHP with HTTP server (such as Apache), you'll need to do this to:

sudo adduser www-data mail

Apart from the actual question - if your mailing needs are limited to personal/local development  - I highly recommend ssmtp.


Try using task manager (from More tools menu or by Shift+Esc) to see which tab is causing high CPU usage.


Edit /etc/bluetooth/main.conf:

sudo gedit /etc/bluetooth/main.conf

Change InitiallyPowered = true to InitiallyPowered = false

If that doesn't works, run sudoedit /etc/rc.local and add this before line with exit 0:

rfkill block bluetooth

Source(s):

How to turn off bluetooth? [duplicate]

How can I deactivate Bluetooth on system startup?


This means that no named process was running. The reason why grep shows up is because it was executing while ps was started. To add headers, and avoid adding grep to the output, use:

$ ps u -C named
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

As you can see, I do not have named running. You can add the h option to hide this header as in:

$ ps uh -C named


Where is the source code of Ubuntu and how do I compile it?

There's no such thing as "Ubuntu source code". It's not a single package, it's a software distribution. You'd need to compile everything, to the kernel, core utilities and libraries to Python, APT and Unity and it would take ridiculous amounts of time.

If you want to make an Ubuntu-based distro, you'll have some basic steps:

Download Ubuntu ISO;
Extract the ISO's content somewhere;
Unsquashfs casper/filesystem.squashfs file inside extracted ISO;
Correctly mount --bind /dev, /dev/pts, /proc and /sys to the unsquashfs'd filesystem and chroot into it;
Make your changes in the chroot environment and unmount the binded filesystems;
Create a new filesystem.squashfs from the chroot directory and place it in /casper;
Make an ISO image with your new customized Ubuntu distro.

A more detailed approach can be found at https://help.ubuntu.com/community/LiveCDCustomization .


As given in this Super User post, remounting it works:

$ df -h | grep udev
udev                                      1.0G  4.0K  1.0G   1% /dev
$ sudo mount -o remount,size=3G /dev
$ df -h | grep udev
udev                                      3.0G  4.0K  3.0G   1% /dev


Why does it take a long time to open certain small text files in Vim?

If your system is really idle during that time it should not take so long to open a small file. Check if the same issue is present with other editors first.

hen check things like current memory usage, number of open files, i/o bottle necks etc using tools like top, iostat, vmstat & sar data for any issues to confirm the system is not under heavy activity when the issue reproducible. These tools help in determining what your system is doing during that time which would help you narrow down further.

If its not under any load, next thing to check is the number of files/inodes on same partition and the number of directory entries under /var/..for this use tools like dumpe2fs.

My 2 cent's, let me know if you need more help.


Cron job fails for any time other than default * * * * *

Use only one zero for the minute. It is also usually a good idea when creating cron jobs to use the full path of the command you are using. This is because cron jobs run in a special very limited shell environment, and your path may differ from what you use when logged in. If you don't know it, you can easily find it out with the which command:

which wget

Another thing, the last command root wget http://www.abc.com/a.php, is incorrect. root is not a valid command. I am guessing you meant to use sudo. This would be unnecessary if you are running the cron job as root, i.e.

sudo crontab -e


Open a terminal (ctrl-alt-t) and type

ubuntu-bug -w

a message will pop up instructing you to click on a window to file a bug report about the application owning that window.

Incidentally, this uses apport, which collects a lot of useful debugging information automatically and is the preferred way to report Ubuntu bugs.


Ubuntu Grub/EFI won't boot - I really need help

Oldfred is on the right track. To elaborate and provide further advice:

Somewhere along the line, you inappropriately changed the partition type code on /dev/sda1 from that for an EFI System Partition (ESP) to that for a BIOS Boot Partition. The former is required to boot a computer in EFI mode, whereas the latter is used by GRUB in BIOS mode to boot from a GPT disk. Making this change by itself would not have caused problems, but combining it with other mistakes (like installing a BIOS-mode copy of GRUB) could be -- and seems to have been -- disastrous. To correct this problem, you must do two things:

Change the "bios_grub flag" to a "boot flag" with parted or GParted; or change the type code from EF02 to EF00 in gdisk, cgdisk, or sgdisk. (These two program families have different ways of identifying type code information.) If you fail to make this change, you're likely to run into further problems in the future.
You must also create a new FAT32 filesystem on the partition. GParted provides a GUI tool for doing this; or you can type sudo mkdosfs -F 32 -n ESP /dev/sda1 to do it from an Ubuntu Terminal.

Windows boots in EFI mode from GPT disks. Thus, in your case you do not want to go anywhere near BIOS-mode booting, even for Ubuntu. Unfortunately, many tutorials recommend enabling the EFI's Compatibility Support Module (CSM) when installing Ubuntu as a routine matter. This is a Bad Idea, for reasons I elaborate on here. It appears that you enabled your CSM (aka "legacy boot support" or some similar term), which in turn resulted (along with the type code change) in GRUB damaging your ESP. You should go back into your firmware setup utility and disable the CSM! It will do you no good and could lead you down a path to further trouble in the future.
You must re-install your Windows boot loader to make it bootable again. You should ask on a Windows forum about doing this.
You must re-install an EFI-mode boot loader for Linux to make it bootable again. Boot Repair should be able to do this; or you could use my rEFInd, as Scott Stensland has suggested.
Completely re-installing both OSes is another option, although it's not really necessary. Also, that path could easily lead you into yet more trouble if you don't first address the fundamental problem of the CSM (or fully understand how to control your boot mode, which is a tricky subject).


Please help me remove power plug and unplug sound from ubuntu 20.04 LTS

I'm not aware of any particular method to remove just the sound for a single system action, but there are two options that might work for you:
1 Mute System Sounds
Open Settings and go to "Sounds", then change the "System Sounds" value to zero by moving the slider all the way to the left.

2 Do Not Disturb
What I generally do during meetings, in person or online, is put my device into Do Not Disturb mode. This allows me to continue to have the sounds I want while the distractions are pushed off to the side.

Hopefully one of these two options will accomplish your goal ...


Launcher icons are stored in /usr/share/applications. Go to your terminal and type: sudo nautilus /usr/share/applications, then right click the application you want, select Properties and click the icon on the properties window. Now you can set it to any icon you want.

*edits
*here is an example .desktop file.

[Desktop Entry]
Name=Give me a name!
Comment=Explain me here!
Icon=/home/t32/t32.png
Exec=/home/t32/bin/pc_linux/t32marm -c /home/t32/config_usb.t32
Terminal=false
Type=Application
Categories=This is important, select a category that is present
StartupNotify=true

*use one of the following as category: Accessibility, Customization, Education, Games,
Internet, Office, System, Accessories, Developer, Graphics, Media, Other. Exec is the command to run, Icon is an absolute path to where the icon lives. Usually you wouldn't need to alter anything else. You may keep this as a scratch and reuse.

*copy this to a whatever-you-name.desktop file, edit as needed and put the file in the /usr/share/applications directory. If paths are true, it will pop up in the gnome menu. I don't know if lucid had Unity or gnome3, but if it has, when you search it by the name you gave it, it will be visible in the unity lens, gnome activities thing. If you have gnome2, it would be grouped under the corresponding category in the applications menu.

*And this kind of launcher are so cute that they are valid in GNOME, KDE and (probably) all others.


Same issue here (17.04), on 16.10 I simply issued the following command in a terminal which was essentially disabling the wifi power management...

sudo iwconfig wlp8s0 power off

unfortunately it doesn't help anymore
let me know if that worked for you

in your case wlp8s0 would be wlp3s0

//edit
I used different command
to get the status (which returned power_save on)
sudo iw wlp3s0 get power_save

then disabled it by running:
sudo iw wlp3s0 set power_save off

no issues so far :D source: https://bbs.archlinux.org/viewtopic.php?id=145645


How to upgrade to KDE Plasma 5 on Ubuntu 14.04.3?

Run the following commands in terminal:

 sudo add-apt-repository ppa:kubuntu-ppa/backports
 sudo apt-get update
 sudo apt-get dist-upgrade
 sudo apt-get install plasma-desktop plasma-workspace plasma-workspace-wallpapers
 sudo apt-get dist-upgrade


NVIDIA driver problems on Macbook Pro mid 2010

maybe that's the well known "EFI with proprietary Nvidia drivers enabled" related problem. You should try this answer : https://askubuntu.com/a/613573/581590 which solved my problem (but it was a long time ago).
Hope that helps.


Unfortunately no, juju and orchestra need DNS to work and agree between clients and the juju managed machines. You can "fake it" by editing the /etc/hosts files on all the machines to be correct if you haven't set up orchestra's built in dnsmasq server to do DHCP and DNS, which is the simplest method, but requires a dedicated network for your managed machines (since it would fight with an existing DHCP server).


Unity launch bar and menu bar won't come up on Ubuntu 16.04

There's been a few posts lately of launcher disappearing. Most likely everyone suffered from the same update which introduced a bug. When you boot your computer choose from the grub menu "Advanced options for Ubuntu". From the submenu select the next oldest kernel version that works.
Other than that check these Q&As:

Unity doesn't load, no Launcher, no Dash appears
Ubuntu 16.04 - Unity doesn't load - no Launcher or Dash appears
No launcher and menu bar on ubuntu 16.04
Ubuntu Menu and Launcher not showing after 2/16/2018 update
Ubuntu 16.04 Unity does not load - icons and not displayed

Edit: July 15, 2019
After answer was accepted a comment was made how system worked in recovery mode. If that's the case try the solution in this answer:

Ubuntu Menu and Launcher not showing after 2/16/2018 update

Open a terminal and use:
rm -rf ~/.config/compiz-1/compizconfig/*
sudo reboot

When rebooting select the most recent kernel rather than the older recovery option.


How can I set default applications in Unity Launcher for other users?

Those settings are in the schema "com.canonical.Unity.Launcher", key "favorites" in the com.canonical.Unity.gschema.xml file under the /usr/share/glib-2.0/schemas/ directory.
Then those xml schemas are compiled in a binary file with the name gschemas.compiled that can be used by GSettings.
To change those settings you can edit the com.canonical.Unity.gschema.xml file, but in my opinion the best way is to create .gschema.override file. (to overwrite the default settings).

NOTE:I recommend you to do this in a Virtual Machine or in a Test Machine to see is everything is OK.In this example I wil create a gschema.override file to edit the applications in the Unity Launcher. It will show by default only Nautilus & Gedit.

1) To see the default values you can open a Terminal window Ctrl+Alt+T and type:

sed -n 52p /usr/share/glib-2.0/schemas/com.canonical.Unity.gschema.xml

The Result:
<default>[ 'application://ubiquity.desktop', 'application://nautilus.desktop', 'application://firefox.desktop', 'application://libreoffice-writer.desktop', 'application://libreoffice-calc.desktop', 'application://libreoffice-impress.desktop', 'application://ubuntu-software-center.desktop', 'application://ubuntuone-installer.desktop', 'application://ubuntu-amazon-default.desktop', 'application://UbuntuOneMusiconeubuntucom.desktop', 'application://gnome-control-center.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices' ]</default>

Or with dconf-editor.

sudo apt-get install dconf-editor

The .desktop files are the default applications in the Launcher.
nautilus
firefox
libreoffice-writer
libreoffice-calc
libreoffice-impress
ubuntu-software-center
ubuntuone-installer
ubuntu-amazon-default
UbuntuOneMusiconeubuntucom
gnome-control-center

2) To create a gschema.override type:

sudo nano /usr/share/glib-2.0/schemas/99_launcher.favorites.gschema.override

The format would be:
[Schema]
key = values

The content of the 99_launcher.favorites.gschema.override would be:
[com.canonical.Unity.Launcher]
favorites = ['application://nautilus.desktop', 'application://gedit.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices']

Save the changes with Ctrl+O,Enter then Ctrl+X.
3) Compile the schemas.

sudo -i

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

Now you can create a new user , Login as the new user to see the new default icons in the Launcher.
NOTE: To add your programs by default in the system-wide, you need the .desktop file for each application under /usr/share/applications/ directory.

Default:

New Default:

Hope this helps.


It looks like you need to use the curses.h file instead.  See here : https://stackoverflow.com/questions/8792317/why-cant-i-find-conio-h-on-linux


Lost Windows 10 during installation of Ubuntu 17.10 for UEFI

had same issue dual boot, and they say boot livecd and install something,
but I found it so easy livecd - install grub-customizer and use the
"write to mbr" option. reboot and all fixed.

Clonezilla saves original mbr and can use linux dd command to put it back or clonezilla itself will put it back for you. But am not skilled at most clonezilla options.


Composite->Refresh Rate is actually the right setting. However, having a second monitor makes all of compiz always run at the lowest refresh rate supported, regardless of the setting. Anyway, for future reference, these two lines work for me, as long as I only have the 165Hz monitor connected:

xrandr --verbose --output DP-2 --mode 2560x1440 --rate 165
dconf write /org/compiz/profiles/unity/plugins/composite/refresh-rate "165"


problem with update manager and software center

edit the file with gedit

gksu gedit /etc/apt/sources.list

Comment out (add a # at the very front) or delete line 1.

Save and exit.

If you want us to review the line, post it here.


Assuming you have created a database named servermail, now the guide says that you must create a user named usermail with password mailpassword.

The names can change to whatever you like, just keep consistent naming.

The usermail user must be created inside MySQL shell. He is not related to system's users.

If you follow the guide and type:

GRANT SELECT ON servermail.* TO 'usermail'@'127.0.0.1' IDENTIFIED BY 'mailpassword';

in mysql> prompt, you will create a user named usermail that will have select privileges on servermail database which is located at local host (127.0.0.1) and the user's password will be mailpassword.

It is a copy & paste procedure just remember to set a secure password!


Unable to reconfigure ttf-mscorefonts-installer

I had OK with this Answer, https://askubuntu.com/a/858620/640587.

wget http://httpredir.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb

After finish running these command in terminal, check on an editor like as LibreOffice. You can find Microsoft font such as Arial, Comic Sans MS and so on.


How can I get the /dev/ location of a USB device?

If you want to known the drive name in the /dev/ folder, I normally

disconnect USB
in a terminal, type dmesg -w
insert USB

And the kernel will show some messages including the name of your device.
Other options are

lsblk
sudo blkid
sudo fdisk -l

And you may want to check this to mount it.
How to access a usb flash drive from the terminal?


To get back to the GUI mode in the console mode run this command:

sudo systemctl set-default graphical.target

Then restart the system, after which you should edit the /etc/default/grub and remove the text added previously.

Optionally, to suppress the kernel output during boot, change

GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX="text"

to this or how it was in your setup previously:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Then run sudo update-grub from your terminal to have to update Grub.


What is the "friendliest" shutdown CLI command to use with KDE Connect?

A graceful shutdown means that the programs receive a hang up signal (HUP). If the program is developed properly, it will listen to this signal and act accordingly (prepare the program to get shut down, clearing used memory, deleting tmp files, etc.).

It does not really matter, if it is done on the GUI or on the terminal, the HUP signal will be send either way.

This also answers your question if Ubuntu behaves differently then other distros. It does not. The mechanism is the same. An odd behaviour can be expected from programs which don't act properly when they get a HUP signal, but this is because the program does not do it properly, it has nothing to do with the distro.

P.S.:

shutdown -h

will power off the system, while

shutdown -r

will reboot the system (so this is unusable for you)

Just use shutdown or add -P or --poweroff (but this is the default anyway according to the man page).


Must I create a bootable USB drive on the computer I intend to use it on?

No, it doesn't matter on what computer you create the bootstick on. The stick can then be booted from basically any computer with support for the installed architecture.

Example: If you download the 64bit ISO for a 64bit computer, on a 32bit computer, you can create the bootstick from on this 32bit machine. However, you can't boot Ubuntu on this machine, since it doesn't understand 64bit instructions. If you now plug the stick into the 64bit computer, you can boot Ubuntu from there.

Think of the bootstick as a DVD: You can burn a DVD on one computer and boot Ubuntu from it on another one. The bootstick is nearly the same.

My preference: Use UNetBootin for creating the bootstick. It's the best-working tool I know and is available for Windows, Linux and Mac OS X.


Having several sound issues with Ubuntu 12.04

I've found a way which will surely solve your problem of low sound in headphone.

First play any song so that you can feel the change in sound.
Run this command in terminal:

alsamixer

if alsamixer is not installed then install it by: sudo apt-get install gnome-alsamixer
In terminal itself one interface will be opened as shown here:

(source: akamaihd.net)

Now use your  ->  arrow key to reach to option mic select. It is shown in red colour for which it is displaying Mic1 as value. For you it would display Mic2
Change it to Mic1 by using Up or Down arrow keys.
Your headphone sound should be increased. If not then try to change (increase/decrease) other values by Up or Down arrow keys.

Hope it would work for you this time..
Reply if you need any further assistance..


Loading current time into mysql database

You can do it the same way as you do the LOAD INFILE:

mysql -uroot -pmysql
-e "update database.TABLEA set `time`=now() where `time` IS NULL or `time` = '';"

will change TABLEA and set time for all records to now() where time IS NULL or where time is empty (since you do not suply the time stamp with the file this will only alter the new records.

Add a "where" if you need to change less records. Or something like "where time IS NULL" if the field is NULL or the actual key the records in the text file have.

2 other methods:

Of course you can also provide the timestamp by adding it into the text file you upload.
You can also edit the table itself and add CURRENT_TIMESTAMP as default to ONE(!) column in the table.

By the way: please do not provide the password with this method. It will be shown in your processes list thus viewable for all. More about this can be found in the official MySQL manual 6.1.2.1. End-User Guidelines for Password Security


GoAccess installation fails on Ubuntu 16.04.2 LTS due to linux-image package

Actually I found the answer, it was lack of space in boot. This is the answer that worked for me - https://askubuntu.com/a/171225/742040


Failed to apply network settings, connect to the Bluetooth network via this machine

Here is the workaround from ubuntu launchpad

The patch for /usr/lib/python3/dist-packages/blueman/main/NetConf.py is

diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py
index 61f5a63..24268df 100644
--- a/blueman/main/NetConf.py
+++ b/blueman/main/NetConf.py
@@ -299,7 +299,7 @@ def get_default(cls):
         NetConf.default_inst = obj
         f.close()
         return obj
- except IOError:
+ except (IOError, UnicodeDecodeError):
         n = cls()
         try:
             n.store()


Following the steps bellow i had no problem to create, run and view the created user interface:

Create a new project and select "Graphical application" and press next

Select a parent directory for the project and press next

Input in the fields "Project name" and "Project title" the desired values and press OK

The project window will open and at the left column the project layout will be shown. Double click the FMain file to open in the editor.

Drag and drop a label and a button into the form from the available components shown at the right column of the IDE

Select one control at a time and input some string at their text field property (Just like at Visual Studio)
Double click the button and the source editor will open, at the respective event handler provide some action, in mine i opted to change label's text property on click:

Public Sub Button1_Click()

    Label1.Text = "You pressed the button, good!"

End

Click the green play button ("Run") and the form will show up

Here is the result of pressing the button


Remove list of files from different subfolders

Use the following command:

while read file;do find . -type f -name "$file"basz.dat -delete; done < list.txt

This will find all files that whose name match with the ones given in your list.txt in all sub-directories of the current directory and delete them.


SoftRAID array not visible to apps on boot?

The easiest way would be to add a static mount point entry in /etc/fstab which is OK if the RAID array is always available during boot, e.g. the disks are not removable media like USB plugged disks. Otherwise the boot process may stall or fail.

You also need to create a folder to mount the RAID array to. Best would be to not use /media or any subfolder because that is used by automagically-mount processes like udev rules and could thwart your mount.

So, I would recommend...

mkdir -p /data/apps

Then add the entry to your /etc/fstab.

UUID=f9e0cb41-0eec-4711-849b-b6264496e7be /data/apps               ext4    errors=remount-ro 0       2

Then unmount the raid and mount it at the new mointpoint.

umount /media/alistair/apps
mount -a

Then you also should check if the /dev/md0 device is still getting mounted when you try to access /media/alistair/apps which could lead to problems and we have to check how to disable that.


How can I run command in a folder without changing my current directory to it?

If you want to avoid the second cd you can use

(cd .folder && command --key)
another_command --key


How to install Ubuntu 14.04 LTS on Windows 8?

Install the Linux Live USB Creator from http://linuxliveusb.com/. Open the application and click the "Download" button from the second box and select "Ubuntu 14.04 KDE" (64 or 32 bit depending on what you want.) from the drop down menu. Pop in a USB and follow the steps. Be sure to check the "Format Key" Check box. It can't boot with other files on the Key. Click the "Install" button. Boot your laptop and press F9. It should say "F9... Change Boot Order" When it boots into the menu, select the USB from the menu and press enter. This should work. Your ISO may have been bad.


UEFI option for booting through USB is deleted after Ubuntu 16.04.2 installation (Dual boot with Windows 10) on Dell Vostro 3558

Some EFIs tend to corrupt their NVRAM-based boot options when new options are added, causing old ones to be deleted or causing the computer to become unable to detect external media and present them as options. This sounds like what you're seeing. Some things you might try include:

Reset the firmware -- Resetting the firmware can clear the problem and enable you to get a fresh start. It sounds like you've done this and the problem is recurring whenever you add the Ubuntu entry back, but that's not 100% clear.
Update your firmware -- You might try checking with the manufacturer to see if a firmware update is available. (Most manufacturers call these "BIOS updates," although we're talking about computers that use (U)EFIs, not BIOSes.) If you're lucky, there will be a firmware update that will fix the problem.
Report the bug to the manufacturer -- They can't fix bugs they don't know about. To be sure, this will be very unlikely to produce a fix in the short term, but in the long term, reporting firmware bugs will help fix them for future models (and maybe even some current models). The manufacturer may also know of a workaround.
Use rEFInd -- My rEFInd boot manager should detect boot loaders on both built-in hard disks and removable media, and build a menu showing everything it finds. (Give or take entries affected by options set in refind.conf and some loaders that are automatically hidden for various reasons.) Sometimes you must hit the Esc key to get rEFInd to re-scan for boot loaders to get those on external media to show up. Note that you can test rEFInd on a CD-R or USB flash drive if you don't want to risk installing it to your hard disk right away.


If you are proficient in the console just Ubuntu Server in the VMs. There is no desktop environment, GUI or graphical installation by default, just the bare console, but it will run comfortably even with 265 MB of RAM.


Combine 2 or more mov/avi files side-by-side?

Have a look here https://stackoverflow.com/questions/4239939/ffmpeg-how-to-play-2-flvs-next-to-each-other-in-1-flv/4240140#4240140


Internal Speakers not functioning after removing headphone

As said by Mark Rooney increasing the volume worked for me.


My default keyboard layout has changed after rebooting

Make sure you have system keyboard layout enabled on ibus-setup:

Press Alt + F2 and run ibus-setup on command field.
New window will appeared, navigate to Advanced tab.
Check Use system keyboards layout option.
Close the window.

Then, disable Use system Defaults item from Keyboard settings:

Go to Settings > Keyboard > Layout tab.
Uncheck Use system defaults.
Close the window.

Add setxkbmap us -variant intl command to $HOME/.profile:

echo setxkbmap us -variant intl >> $HOME/.profile

This command should set English (US, International with dead keys) layout on every login.


shell script is not executed after adding it as a crontab job

58 * * * * ubuntu /home/ubuntu/backup/mysqlbackup.sh >/home/ubuntu/backup/log/backup.log

This is incorrect format.

The format is described in the crontab file:

  # m h  dom mon dow   command

ubuntu is not a command. Remove it, so the line reads:

  58 * * * *  /home/ubuntu/backup/mysqlbackup.sh >/home/ubuntu/backup/log/backup.log

Systemwide crontab, specified in /etc/crontab has the user field:

These files also have username fields,
# that none of the other crontabs do.
[...]
# m h dom mon dow user  command


How to change files permissions from a different hard drive?

Based on the mount output, it looks like your second hard drive is formatted with the NTFS file system.  This isn't a bad choice if you want to be able to access the files from both Ubuntu and Windows, but has slightly different semantics to native file systems.

The NTFS driver does have support for mapping Windows user IDs to equivalent UNIX user IDs though, which might help.  There is a tool called ntfs-3g.usermap that can help you build up the user mapping:

First unmount the NTFS partition by running sudo umount /dev/sdb1 from a terminal.
Build up the user map by running sudo ntfs-3g.usermap /dev/sdb1 in the terminal.  Provide the Ubuntu user account names for each Windows account you want to map.  The program will create a file called UserMap in the current directory.
Remount the file system and copy the UserMap file to the special .NTFS-3G directory:

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

sudo mkdir /mnt/.NTFS-3G

sudo mv UserMap /mnt/.NTFS-3g/
You may need to unmount and remount the file system again to make this user mapping take effect.

Once this user mapping file is in place, your Ubuntu user account should have access to any files or folders owned by your Windows account, and any files you create in Ubuntu should look like they were created by your Windows account when you boot Windows.


It seems you nginx server is handle by an upstart process.

Look in the /etc/init folder, and check if there is not a file which handles nginx.

grep -r nginx /etc/init

Then edit this file, and remove the respawn option in the config file.


How to access the UEFI firmware settings? (aka BIOS)

So it seems to boot directly to Windows.

No, it does not directly boot to Windows 8.

If you shut down your computer properly (no standby), it should boot like any other computer before, including performing a power-on self-test (POST). The only difference is, that UEFI machines can perform this whole process much faster.

Branding = Confusion

A source of confusion may be branding, because computers that come with UEFI and a preinstalled copy of Windows 8 have a consistent branding during boot, which means that these machines just display one high-resolution splash image, where there would have previously been several pixelated or blurry images until the Windows boot splash appeared.

Manufacturers today use branding to blend in the device pre-boot sequence with the Windows 8 boot process. Correct, the memorable boot splash has been mostly replaced by branding, but you can still identify that the Windows 8 boot process has taken over when the spinning dots appear:

Here is a post by Hans de Goede explaining steps required to achieve flickerfree boot on Fedora

Entering the firmware settings menu, aka BIOS

So to be clear: there still is something like the "BIOS". It may look very fancy on some models, but it's still the same and can be accessed by pressing a certain key during the boot sequence. Unless you are using a Chromebook or any other device that deliberately is not compatible to PC clone standards and does not ship with a firmware settings menu.

You should consult the manual for your device to find the right key. Even when the manual is on poor technical and more lifestyle level, you may still find a section with instructions for how to boot from external media. It's usually F12, but it can also be a proprietary button like the Novo button which is placed next to the power connector on some models.

In case you may find that accessing the menu with the key is still too hard or unreliable, even while spamming the key the whole time after pressing the power button – you have to press the button in the right timeframe – there is another option by telling the operating system or boot loader (GRUB, rEFInd, gummiboot) to boot into the firmware settings menu.

From within Windows 8

It's possible from within Windows 8/8.1, have a look at the Windows Startup Settings article on the Windows site for more details.

In Windows 8 go to:

General > Advanced startup

In Windows 8.1 go to:

PC settings > Update & Recovery > Recovery > Advanced startup

Which will take you to a blue screen... with options to choose from.

Choose an option > Troubleshoot > Advanced Options > UEFI Firmware Settings


Gnome Shell - How to prevent an application from starting behind the application in focus?

Gnome Shell, which is used by Ubuntu, has the feature that launched applications are opened in the background. While this may be desirable in some workflows, many users will consider this an annoyance. A gnome Shell extension, appropriately named "No Annoyance", changes this behavior, and makes sure a launched application is immediately raised.

Install the extension with the command sudo apt install gnome-shell-extension-no-annoyance, or using Synaptic Manager (not installed by default) or even using "Software". To enable the extension after installation, you can use "Gnome Tweaks" (not installed by default).


If this is still a problem you could do the following.

1.) Re-install libnss3-1d

or

2.) Downgrade to a previous version

The easiest way to do either of these is using Synapic Package Manager.

To Re-install

Load Synaptic Package Manager.
search for libnss3-1d
right-click on the package and select "Mark for re-installation".
Press the apply button.
Test to see if it worked.

To downgrade - not recommended as you may then miss some security fixes

Load Synaptic Package Manager.
search for libnss3-1d
click the package menu and select "Force version".
select the version you require and click "Force version".
Press the apply button.
Test to see if it worked.

Thanks
Chris


single line group of commands as individual?

& runs the left hand side command in the background. If you want to run the second command only if the previous one ran successfully, use

 command1 && command2

If you want to run the second command even if the previous one is not successful, use

command1 ; command2


Installing Universal USB Installer on Ubuntu 12.04

Universal USB Installer is a windows-only program. For Ubuntu you should follow this simple guide to create a bootable USB-Stick:

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu


How to install nvidia driver with secure boot enabled?

Try this:
- Step 1: Download latest driver from NVIDIA website, https://www.geforce.com/drivers.
- Step 2: Create new pair private key (Nvidia.key) and public key (Nvidia.der) by entering command:
openssl req -new -x509 -newkey rsa:2048 -keyout PATH_TO_PRIVATE_KEY -outform DER -out PATH_TO_PUBLIC_KEY -nodes -days 36500 -subj "/CN=Graphics Drivers"

Example:
openssl req -new -x509 -newkey rsa:2048 -keyout /home/itpropmn07/Nvidia.key -outform DER -out /home/itpropmn07/Nvidia.der -nodes -days 36500 -subj "/CN=Graphics Drivers"

- Step 3: Enroll public key (nvidia.der) to MOK (Machine Owner Key) by entering command:
sudo mokutil --import PATH_TO_PUBLIC_KEY

Example:
sudo mokutil --import /home/itpropmn07/Nvidia.der

--> This command requires you create password for enrolling. Afterwards, reboot your computer, in the next boot, the system will ask you enroll, you enter your password (which you created in this step) to enroll it. Read more: https://sourceware.org/systemtap/wiki/SecureBoot
- Step 4: For the first time install NVidia driver, you need to disable Nouveau kernel driver by entering command:
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf; sudo update-initramfs -u

--> Reboot.
-Step 5: Install driver by entering command
sudo sh ./XXXXXX.run -s --module-signing-secret-key=PATH_TO_PRIVATE_KEY --module-signing-public-key=PATH_TO_PUBLIC_KEY

where:
XXXXXX: name of file installer (download from NVIDIA).
PATH_TO_PRIVATE_KEY: full path to private key. If you place in home folder, use /home/USER_NAME/ instead of ~
PATH_TO_PUBLIC_KEY: full path to public key. If you place in home folder, use /home/USER_NAME/ instead of ~
Example:
sudo sh ./NVIDIA-Linux-x86_64-390.67.run -s --module-signing-secret-key=/home/itpropmn07/Nvidia.key --module-signing-public-key=/home/itpropmn07/Nvidia.der

--> Done
Read more https://us.download.nvidia.com/XFree86/Linux-x86/319.32/README/installdriver.html


What is edge.launchpad.net and how does it work?

There is absolutely no difference between edge.launchpad.net and launchpad.net. It used to be used for easy testing of new Launchpad code, but is now deprecated.

Back in the olden days (well about twelve months ago) then anyone could join a special group on Launchpad. If you were a member of this testing group then whenever you visited launchpad.net you were automatically redirected to edge.launchpad.net. Because of this automatic redirection, a lot of people forgot about it, and posted links to edge.launchpad.net all over the place. Although this wasn't harmful (anyone could go test on edge.launchpad.net) I can see people being confused by it.

For some reason they've let the domain hang around for a while, to be honest they've probably just forgotten about turning it off (well redirecting everyone back to launchpad.net).

Anyway, the point is that right now, you get exactly the same results whether you view edge or the main domain.


Couldn't change graphics with Fn keys on my Acer laptop.

This helped me (notice a little bit different parameter), added to /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_backlight=vendor"

Then runupdate-grub and reboot.

Source:
http://www.refreshit.info/2012/08/solved-brightness-increase-and-decrease.html


Change caret blinking speed in whole system Ubuntu 20.10

Yes, this is possible if by caret you mean cursor.
Go to Settings > Universal Access > Typing >Cursor Blinking and press Enter
This will show a slider which you can adjust to suit your needs.

reference


Antivirus for play windows game in Ubuntu

The correct answer to this question is "It Depends".  We are not Subject Matter Experts on all the games or applications you use, but as an IT Security professional I can give you a little bit of insight into here, though ultimately it's up to you to determine whether you believe you are "at risk" and need an Antivirus.  (Though I recommend you go with one, even if it's just to regularly scan your system weekly or such, it's ultimately Your Choice whether you take that step.)

There are viruses which in the past have had effects on systems beyond just Wine and PoL.  These viruses are rare but viruses which do not need full Windows admin rights can do damage, and therefore Wine on its own should not be considered "virus proof".

If you intend to use Wine and PoL with web applications like Poker Stars or potentially unvetted and unsecured software you should probably have some type of AV protection in play regularly doing scanning, however there is not any one guarantee about 'good antivirus solutions' like this.

If all you do is one or two games, and not anything else, your risk of getting hit by Wine-runnable viruses remains low.  However, if you run a lot of Windows-designed applications and not all of them are from trusted sources, your risk is higher.

Whether you use an antivirus or not is your own choice, and should be decided on your assessment of risk to your system or data.  If you do choose to go for an Antivirus program in your environment, you should probably take a look at this question for what's available.


Install EFI-mode GRUB2 on Ubuntu booted from legacy-mode

See my Managing EFI Boot Loaders for Linux page for information on this topic, and in particular the page on installing boot loaders. My rEFInd documentation page on installing rEFInd goes into more detail for rEFInd, and you can adjust the critical commands for other boot programs, such as GRUB.

Doing it the "right" way requires an EFI-mode boot in order to register GRUB with the firmware; however, you can install the files from a legacy-mode boot and then use Windows, an EFI shell, or sometimes even the firmware's built-in user interface to register the boot program with the firmware.

Alternatively, you can give the boot program the name EFI/BOOT/bootx64.efi on the EFI System Partition (ESP). This is a fallback filename for EFI-mode booting; if no other boot program is available, the firmware uses this filename. In fact, if you intend to move your USB device from one computer to another, this is the preferred way to do it, since then you won't need to register the boot loader with each computer's firmware.


Auto mount remote NTFS drive on local system

Quite simple really,  I just permanently mounted the NTFS drive on the remote system by editing the fstab file and then mounted it locally using sshfs, now I just need to write a script to automate the local mounting.


Headless machine: Increase Remote Desktop resolution

Have you considered to try an NX technology?, like FreeNX or NXnoMachine ?, it can be more friendly and configurable


[Sat Sep 29 14:16:39.277794 2018] [ssl:emerg] [pid 20797] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: TRUSTED CERTIFICATE) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?

This line is the actual error. The Certificate is not in correct format, or corrupt.

Verify that the certificates are readable with openssl x509 -noout -modulus -in certificate.crt to verify the certificate. It should output modulus of the certificate.

To verify key, use openssl x509 -noout -modulus -in keyfile.key.

The modulus of the certificate and key file should additionally be identical. Otherwise they do not match.

If openssl fails, get new certificate files from your provider.


Need help getting serial data using Octave

You are reading the ASCII value of "1" from the serial port in this case:

octave:1> x = double ("1")
x =  49

Answer taken from the help-octave mailing list, where the developer of instrument-control answered your question more thoroughly.


can I install multiple ubuntu distros at once?

Multisystem allows you to install multiple distros into USB stick. Check out for more info http://www.pendrivelinux.com/multiboot-create-a-multiboot-usb-from-linux/


Ubuntu 13.10: I still hear sound from laptop speakers when headphones connected

It may not change the settings automatically.

Try going to "Sound Settings" -> "Output" and choose the device you want to output to. It solved my problem with an HP USB headphones.


Can't shrink Ubuntu partition Gparted ERROR (238277632K 00:00:05)

This question was answered on the GParted Forum.  See Can't shrink partition - ERROR 238277632K 00:00:05.

The TL;DR is to use live media with e2fsprogs < 1.43 such as GParted Live 0.25.0-3 in the meantime until the base issues can be addressed.


How to install ubuntu on lenovo ideapad y510p?

I am had the same problem with you and how I solved it is through a few methods:

Press 'e' at the option of 'Install Ubuntu' and then add the parameter of 'nomodeset', next to splash.
The black screen is probably because your brightness is set at the lowest. Go on and press Fn + Up to increase brightness.

Everything should be fine then! :)


How can I determine the version number of my Ubuntu One for Windows client?

Open a terminal and type dpkg -l | grep ubuntuone-client... just kidding.

Navigate to the Windows Control Panel and click the item that is—in various versions—referred to as "Add/Remove Programs" or "Uninstall a Program". You will find a list of installed software and metadata about it, including the version number:

On some versions of XP you might need to click the "Click here for support information" link for the Ubuntu One entry to reveal the version number.


Install lsb:

sudo apt-get install lsb-core


Ubuntu 12.10 upgrade stopped halfway through

You can give a try to fix your problem using Recovery Mode if none of the method works for you. If you are using wired connection then no problem, for wireless connection I'm not sure whether it will work or not, because I never tried to enable network in Recovery Mode when using wireless connection. Although you can give it a try.

When your system starts chose Recovery Mode (2nd option in grub menu).
From the Menu just go to Grub option, it will give a message like Updating grub will mount your system in read/write mode. Just chose yes to mount your system in read/write mode. It will update your grub and will exit from Grub menu.
chose network option it may enable your network.
Then chose dpkg menu from the list, chose yes for all.
Finally chose root option and login. Execute following commands one after another:

# apt-get autoremove
# apt-get autoclean
# apt-get update
# apt-get -f install
# apt-get dist-upgrade
# apt-get upgrade

Then reboot your system and check whether your issues are fixed or not. Run this command to reboot:

# reboot

Reply if something goes wrong.s


Does Ubuntu support Radeon HD 6750M or 6490M?

The question is not if Ubuntu supports your hardware or not, it is more if your hardware builder has made any drivers for your hardware to be usable in Linux.

The Radeon HD 6750 is officially supported by ATI's Catalyst drivers and the xserver-xorg-video-ati open source drivers.

The Radeon HD 6750M will work even tough you will find your self with a watermark on the right bottom corner of the screen saying your hardware is not supported. That can be fixed following some simple steps.

The Radeon HD 6490 or the 6490M are not officially supported by ATI's Catalyst drivers but the open source xserver-xorg-video-ati driver should work without a problem.

The xserver-xorg-video-ati open source driver will be installed by default once your card is detected, the performance in not au pair with the closed driver but really big improvements are done with each release so its definitely an option.

You can easily toogle between the open source xserver-xorg-video-ati driver and the closed driver by following these steps.


PAM USB on 14.04 su "username" = "no passwd entry for user 'Thornton'"

I am using this on 14.04 and it is working. Some things I have noticed:
Only one usb device per username. Otherwise the error "no device found for user 'username'"

I did not change the /etc/pam.d/common-auth file at all. "ie auth sufficient".

Use $ pam-auth-update instead, unless you are adding events to detect when the usb device is plugged in or disconnected. Be warned, the $ pam-auth-update command will not work after you manually change the /etc/pam.d/common-auth file. You will need to manually manage it. pam-auth-update will force reverting to the default file if run in the future.

Use the following command after plugging in the desired usb device. Change "MyDevice" to any one word you want. like MyDevice, Lexar32gb, Sandisk, etc.

$ sudo pamusb-conf --add-device MyDevice
Please select the device you wish to add.
* Using "Verbatim STORE N GO (Verbatim_STORE_N_GO_07A10D0894492625-0:0)" (only option)

Which volume would you like to use for storing data ?
0) /dev/sdb2 (UUID: A842-0654)
1) /dev/sdb1 (UUID: CAAF-0882)

[0-1]: 0

Name            : MyDevice
Vendor          : Verbatim
Model           : STORE N GO
Serial          : Verbatim_STORE_N_GO_07A10D0894492625-0:0
UUID            : A842-0654

Save to /etc/pamusb.conf ?
[Y/n] Y
Done.

Use this command to add the user account you want linked to the device.

$ sudo pamusb-conf --add-user username
Which device would you like to use for authentication ?
* Using "MyDevice" (only option)

User            : username
Device          : MyDevice

Save to /etc/pamusb.conf ?
[Y/n] y
Done.

After this, Test the functionality by:
This is a successfull test.

$ su username
* pam_usb v0.5.0
* Authentication request for user "username" (su)
* Device "-MyDevice" is connected (good).
* Performing one time pad verification...
* Access granted.

This is a fail.

* pam_usb v0.5.0
* Authentication request for user "username" (su)
* Device "-MyDevice" is not connected.
* Access denied.
Password:

If you get:

* pam_usb v0.5.0
* Authentication request for user "uername" (su)
* Device "-MyDevice" is connected (good).
* Performing one time pad verification...
* pad verification failed (i think this is the error line)
* Access denied.
Password:

Perform a

$ rm ~/.pamusb/*

This will erase the pad file, and running the

$ su username

will force a recreation of the pad file with the correct group and file permissions.

Let me know if this helps.


In your GNU GRUB menu screen (where you select Ubuntu, Advanced options, Memory test, Recovery, etc), you can edit the command line by pressing 'e' on the highligted line. Now, you can edit the parameters that are passed to the kernel during boot time. If you replace init with init=/bin/sh, you will escape to a root shell at an early point. From here, you can mount disks, and fix other issues.

To see what goes on during boot you can edit the boot sequence as described above, and get rid of the 'quiet splash' section as well (or press ESC during boot when you see the splash screen or everything is black).

I would pay attention to the boot sequence as the text flies by, it might hang at a certain point. That's your clue. ;)


Install error: can't select and install software, install GRUB or LILO boot loader

From a live CD I looked at /etc/default and didn't see a grub file. I did a clean install from the same disk and it worked.


How can I change the name "Rubbish Bin" to "Trash" (or "Recycle")

There is an option to select the interface language at the login screen. I've just tried loggin out and selecting Australian English, and now have the 'Rubbish Bin' in Nautilus. Select English USA and you should get 'Trash'.


How do I set the permissions for newly created files?

You need to set the "umask". If you want to do it systemwide, you can change the value in /etc/login.defs. If you want to do it on a per-user basis, do it in each user's .profile.

You can check the current umask by giving the command "umask" with no parameters. It may output something like this:

0002

With this value, files you create will be readable and writable for you and your group, while being only readable for all others. If you want to create files that are world-writable (a discussion on the security implications of this is out of scope here) change the umask to 0000:

umask 000

as I mentioned, to change this persistently for your user, edit .profile, uncomment the line containing "umask 022" and change the value accordingly.

Read an excellent explanation of what the umask values mean in Wikipedia:

http://en.wikipedia.org/wiki/Umask


you may want to check if :

Your router's and client's dhcp settings are the same (auto-dhcp / manual ip)
Your router hasnt any mac-filter lists enabled
You are running a firewall on your Laptop (firestarter,upf etc)
look for fresh drivers for your network card


there is no solution, the ati 5400 is not supported, amd and intel haven t wrote good driver, i have the same notebook, you have too disable the ati card with acpi_call, and use the intel 3d
see :
http://linux-hybrid-graphics.blogspot.com.es/2010/07/using-acpicall-module-to-switch-onoff.html

and desactivate ati driver


how to remove postgresql and phppgadmin from xampp stack

Try to nuke by using the command

sudo dpkg --purge postgresql-XXX

In the place of XXX add the version.


Wine entries persist after uninstall wine

The following did the trick for me:

sudo apt-get remove wine1.4-dbg wine1.4-common wine1.4-amd64 wine1.4-dev winetricks wine1.4-i386
sudo apt-get autoremove

Reboot and be wine free.


What's the difference between -p tcp and -m tcp in iptables?

-p The protocol of the rule or of the packet to check.

  The specified protocol can be one of tcp, udp, icmp, or all, or it can
  be a numeric value, representing one of these protocols or a different
  one. A protocol name from /etc/protocols is also allowed. A "!"
  argument before the protocol inverts the test. The number zero is
  equivalent to all. Protocol all will match with all protocols and is
  taken as default when this option is omitted.

  -m Specifies a match to use, that is, an extension module that tests for a specific property.

  The set of matches make up the condition under which a target is
  invoked. Matches are evaluated first to last as specified on the
  command line and work in short-circuit fashion, i.e. if one extension
  yields false, evaluation will stop.

Added info

-m Also matches packets of the specified protocol name. If '!' precedes the protocol name, this matches all packets that are not of the specified protocol. Valid protocol names are icmp, udp, tcp... A list of all the valid protocols could be found in the file /etc/protocols. So I think it would be safe to omitt the -m

Source:IPtables ManPage


In the meantime i created a ppa where one can easily install a Kernel 4.0 compatible version of the bcmwl package on Ubuntu 14.04, 14.10 and 15.04.

sudo apt-add-repository ppa:longsleep/bcmwl
sudo apt-get update
sudo apt-get install bcmwl-kernel-source

So if you do not want to compile it yourself, grab it from there.

Check the ppa repository yourself at:  https://launchpad.net/~longsleep/+archive/ubuntu/bcmwl


Either blank screen during boot or poor resolution console in Ubuntu Server within VirtualBox

It is probably a better idea to run a vm-server in headless mode and console into it, having any terminal width your guest can manage. There is a virtualbox-headless command for the purpose. You can set up a stty in the guest and redirect boot messages to the same stty by a kernel command line in grub, like:

BOOT_IMAGE=/boot/vmlinuz-3.0.0-10-generic root=/dev/sda1 ro console=ttyS0,38400n8 vt.handoff=7

then, in the host, copy /etc/init/tty6.conf to tty8.conf and replace the line

exec /sbin/getty -8 38400 tty6

with:

exec /sbin/getty -8 38400 ttyS0

Finally configure the image to output serial0 to /dev/pts on the host. (This works good with kvm, it should also go with virtualbox)

Anyway, if you don't like this approach, install the guest additions. Then you should be able to achieve higher resolutions. The slow scrolling comes from the fact that the vga16fb is indeed 16-bits color info per pixel and the poor console has to transform each pixel to the 24 or 32 bits of your hosts X11 and monitoring pixel changes isn't trivial, so if you somehow can increase the color depth to match your hosts, scrolling should speed up.


Problem solved. I tried for a second time to follow the guide here and this time it worked. I'm now at Catalyst 12.8 and everything is running just fine.


In gedit the printing text size can be set from within the File | Print dialog.

Select the Text Editor tab and change the Body font size.


Seagate 10TB drive showing as 1.2TB on Ubuntu Xenial

You say it's an NAS drive, which implies you either bought something marketed as a complete NAS solution (in which case it's badly broken, and should be returned) or you put a bare drive in some sort of enclosure. If the latter, then the problem is almost certainly that the enclosure has a 32-bit addressing limit. This usually causes disk capacity to "wrap," sort of like the odometer on an old car. In a car with a 5-digit odometer, once you hit 99,999 miles (or kilometers), the odometer "wraps around" and shows a mileage of 0 when the car really has 100,000 miles on it. When the car has a true mileage of 150,000 miles, the odometer reads 50,000, and so on. Something analogous happens on devices with 32-bit limitations, but the wrap point is typically 2 TiB, then again at 4 TiB, 6 TiB, and 8 TiB. What you're seeing is therefore the part of the disk's capacity above 8 TiB. (Note that TB is not the same as TiB; TB is smaller than TiB, so you're not seeing a full 2 TB, much less 2 TiB, between 8 TiB and 10 TB.)

This sort of problem is extremely common with USB enclosures. You identified the disk as an NAS device. I'm not all that familiar with this type of device, but my understanding is that these are file-level servers; but your output identifies the disk as /dev/sdb, which is not how I'd expect a true NAS to appear -- unless you've shown the NAS device's kernel output. Thus, I am a little bit confused. You may want to clarify matters by identifying the exact products involved and from where you're getting that kernel output -- on your Ubuntu computer or on the NAS.

In any event, there are several possible solutions:

Direct connection -- You can connect the disk directly to the computer's motherboard, rather than via your external enclosure. It's very rare to have such problems in Linux with disks that connect directly via a SATA port. (Windows users aren't so lucky; there are Windows drivers with 32-bit limits.)
Reconfigure the enclosure -- Some enclosures have switches that can adjust how they treat the disk. These usually enable a "translation" of eight 512-byte sectors into single 4096-byte sectors, thus raising the 2 TiB limit to 16 TiB. This is big enough to handle your 10 TB disk. (You should be aware that this change will invalidate existing partition definitions, though, so do this only if you have not already partitioned the disk and stored data on it.)
Change the interface method -- Some USB enclosures also sport eSATA ports. Using eSATA normally works around the problem.
Get a new enclosure -- If all else fails, you can often fix the problem by buying a new enclosure. If my suspicion that you're using a USB enclosure is correct, you can either get one that does the sector-size translation I've just described to boost the capacity to 16 TiB or you can switch to an enclosure with a different type of interface, like eSATA or a true NAS that partitions the disk itself and communicates over Ethernet using NFS, SMB/CIFS, or some other higher-level protocol.


Print-screen button not working in Lubunt 14.04.03

Sorry ...  PrintScreen button is working fine.  I made a silly mistake.

I was immersed in what I was doing on a headless machine through teamviewer.  Teamviewer does not send the PrintScreen key to the remote machine.  It is processed locally.  I just found all the screen shots I tried to get (of the headless client screen !) on the host machine.  To it's credit teamviewer is so good that I forgot that I was using a remote system !


The difference between the UTC and TAI is a file that holds leapseconds. See the contents of /usr/share/zoneinfo/leap-seconds.list. systemd has(/should have?) no impact on this.
You need to configure NTP to include it (note: NTP v4.2.6 changed the way on how the leapfile is used). See the Ubuntu NTP manual section5 and the "leapfile" option.  From the manual page for NTP:

leapfile leapfile
This command loads the NIST leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from NIST national time servers using ftp as the ASCII file pub/leap-seconds.list.
The leapfile is scanned when ntpd processes the leapfile directive or when ntp detects that leapfile has changed.  ntpd checks once a day to see if the leapfile has changed.

So that could be adding to /etc/ntpd.conf something like this:
leapfile /usr/share/zoneinfo/leap-seconds.list

See also the man page  for update-leap.

update-leap will validate the file currently on the local system and if necessary, updates leap-second definition file. Ordinarily, the file is found using the "leapfile" directive in ntp.conf(5).  However,  an alternate location can be specified on the command line.

Mind that this breaks POSIX compliance as it will introduce times like "23:59:60".


How to get byobu to launch tmux instead of screen?

Byobu 5.x has excellent support for tmux.  New installations of Byobu 5.x and above will default to using tmux as the backend.  Upgrades from older versions, however, will not automatically make that switch.

Still, you can manually run byobu with tmux by typing byobu-tmux.  Similarly, you can manually choose to run with the screen backend by typing byobu-screen.

Running byobu will launch with your selected default backend.  You can choose between tmux and screen by running byobu-select-backend.

kirkland@ubuntu:~$ byobu-select-backend

Select the byobu backend:
  1. tmux
  2. screen

Choose 1-2 [1]: 1


You can use:

cat *word* > new_file

Now all the files with the "word" in their name will be concatenated in "new_file".


How do I properly run this systemd service on shutdown?

Here's an example of a simple service that performs a task before shutdown. Please note that the default dependencies are disabled by the DefaultDependencies=no option

[Unit]
Description=SleepBeforeShutdown Service
DefaultDependencies=no
Before=halt.target shutdown.target reboot.target

[Service]
Type=oneshot
ExecStart=/bin/sleep 30
RemainAfterExit=yes

[Install]
WantedBy=halt.target shutdown.target reboot.target

After creating/editing your service unit file run
systemctl enable yourservice.service and reboot.
(it is not necessary to run systemctl start yourservice.service).
After that, any time you run shutdown, halt or reboot, the type-oneshot service will do its thing first and then the system proceeds with actual shutdown/reboot.

Edit
I've now found a previous post where the same solution was offered. I do not have the credits to post comments with a link to the question above, so I'll leave my answer as is (even though, strictly speaking, it's a duplicate) Moderators, please remove this post if it violates the rules.

Edit 2
And yet another old post with the same answer. Really not that difficult to find ...


How to make a program appear on the desktop like conky?

I found what I was looking for!

http://m.lifehacker.com/294005/embed-a-terminal-in-the-desktop-with-compiz-fusion


unable to install jscoverage in ubuntu 16.04 but it works in 14.04

There is no such package on 16.04 LTS and 18.04 LTS repositories:

See list search results on packages.ubuntu.com:

  Package jscoverage
     trusty (14.04LTS) (devel): Javascript code coverage [universe]
     0.5.1-2: amd64 arm64 armhf i386 powerpc ppc64el

But you can install this package manually:

wget http://mirrors.kernel.org/ubuntu/pool/universe/j/jscoverage/jscoverage_0.5.1-2_amd64.deb
sudo apt-get install ./jscoverage_0.5.1-2_amd64.deb

Then you can use it

$ jscoverage --version
jscoverage 0.5.1
Character encoding support: iconv
Copyright (C) 2010 siliconforks.com
License GPLv2+: GNU GPL version 2 or later <http://siliconforks.com/jscoverage/license.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I reported bug 1788836 to LaunchPad about missed packages on 16.04 LTS and 18.04 LTS. Homepage of the project says that project is abandoned:

  Note: Any future development of the JSCoverage code base will likely occur in the new JSCover project on GitHub, which reuses a substantial amount of JSCoverage code and aims for a high degree of backward compatibility with JSCoverage. JSCoverage itself is unlikely to have any further releases.

So it was dropped from Debian and then from Ubuntu.


Run a Command-line Program with an Environment Variable

If you want only mpv to be affected, just alias it:

alias mpv='DRI_PRIME=1 mpv'

You can add this to ~/.bashrc or ~/.bash_aliases.


Terminal autocomplete doesn't work properly

bash-completion is a set of bash scripts which enables customized completion for specific commands.
This is not just for files and directories, but also e.g. for the commands. So you type partial of commands and by hitting Tab we get a auto completion of commands.
Installation
Step 1: Install bash-completion
$ sudo apt-get install bash-completion

And some times it works if we re-installed it by the follwing command:
$ sudo apt-get install --reinstall bash-completion

Step 2: Enable bash-completion in your .bashrc file
Open your gedit ~/.bashrc and if these content doesn't exist there, add them at the end of it and save it.
# enable bash completion in interactive shells
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

Important: After changing the file you need to source your  ~/.bashrc with source ~/.bashrc or reopen your Terminal. It should be fixed now.


For anyone who comes here in the future follow this link to see the answer to the question, the answer in short is that samba doesn't appear to work to well with Access.


How do I enlarge the icons in the Firefox bookmarks-bar?

A nice trick here is to play with GTK dpi:

Double dpi factor:

gsettings set org.gnome.desktop.interface text-scaling-factor 2.0

Launch Firefox
Change back dpi factor, so it will not affect other applications:

gsettings set org.gnome.desktop.interface text-scaling-factor 1.0

You may create a script for that or a desktop launcher. (You may use any float number like 1.5, 3.5...)

Reference: ArchLinux: Applications & Desktop Environments: Gnome3 and DPI


Have a look at the  Nvidia site and download the correct drivers, the program will detect if you do not have the correct drivers and if not will tell you what you need to download - I had a similar experience, you don't want to force install the wrong drivers


Installing Ubuntu onto USB - nothing happening?

An Ubuntu installation that gets stuck in the middle is often caused by a defect in the target installation media, in your case the 16GB USB stick. In fact if you try to install Ubuntu again on the same drive, it will often get stuck again at approximately the same stage of the installation process.

Your situation is complicated by the fact that there are USB two flash drives, either of which could be causing the problem. The first step is to run a Lubuntu live session from the 2GB USB flash drive. If the Lubuntu live session runs without any problems, that rules out a possible problem with the 2GB USB flash drive. The next step would be to try repeating the Lubuntu installation on a different 16GB USB flash drive if you have one.

I have posted another answer about how to do a full installation of Ubuntu on a USB flash drive that also may be helpful, especially the four bullet points at the end.


Cross-platform Duplex scanner with good support in Ubuntu?

I have very good personal experience with the HP digital senders.
basically something similair to this this, http://www.ebay.com/itm/HP-9200c-Digital-Sender-Scanner-Only-21-051-scans-/170830490394?pt=LH_DefaultDomain_0&hash=item27c64a6b1a#ht_500wt_1129

but there are plenty versions around.

I claim good compatibility since its a stand alone device.
Very nifty. It can send you the scanned files directly as emails (pretty platform independent) there is also an app that scans the file directly to a folder on your desktop (probably not as independent as the email feature)


Will installing Ubuntu erase my existing OS?

Not if you don't want it to. Boot in to live CD when ask click "Install Ubuntu" then "install side by side with Windows." Set HDD sizes for both OSes, and install.

When you boot you will see a boot loader called grub with about 5 options. One is Ubuntu; one is Windows; the rest are verious safe modes for Ubuntu. Choose your os and off you go.

Or mount a live CD in Windows and click Wubi to create Ubuntu as a windows program if you just want to try it out.


Try passing boot parameter vga=xxx (in your case i suggest vga=791, so 1024x768, 16 bit color).

See vga numbers in https://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers


How does Chromium pick a MIME-type handler?

Look at this ArchWiki entry in the section on File associations. To quote from there:

  Unlike Firefox, Chromium does not maintain its own database of
  mimetype-to-application associations. Instead, it relies on Xdg-open
  to open files and other mime types, for example, magnet links. See
  Xdg-open for more information.

  There are exceptions to this rule though. In the case of mailto URIs
  chromium calls out to xdg-email which is similar to xdg-open. Other
  protocol handlers may have equivalent scripts so check /usr/bin/xdg*.
  ...


Looking for an alternative 18.04 desktop environment that works well with multiple monitors and workspaces like Unity did

GNOME is inherently limited, by design.  The developers have taken simplicity to the extreme.  Many configuration options that users (think they) want either do not exist or must be set via special tools (such as gsettings from the command line).  Issues with GNOME will be left for others to address and will not be discussed further.

The rest of this answer is specifically in response to the question, "What options [alternative 18.04 desktop environment] do I have in 18.04...?"

Unity may continue to be used on Ubuntu 18.04.

sudo aptitude install ubuntu-unity-desktop

There are other Ubuntu Flavors that default to different desktop environments:

Ubuntu Budgie
Ubuntu MATE
Xubuntu (XFCE)
Lubuntu (LXDE)
Kubuntu (KDE)

Rather than installing different Flavors from scratch, other desktops can be installed on an existing system.  Each flavor has a corresponding package, which may be found by searching:

sudo aptitude search .-desktop$

Most, such as KDE Plasma, don't "pulls the windows of applications on non-primary monitors along as you move from one desktop to another."

sudo aptitude install kubuntu-desktop


Cannot access mounted drive in some apps

The issue seems to be that Audacity was a snap. Using the regular version from the reps works. This is the before and after.

audacity is /snap/bin/audacity
steve@zaphod:~$ type -a audacity
audacity is /usr/bin/audacity
audacity is /bin/audacity
steve@zaphod:~$


no valid OpenPGP data found while installing Google bazel

I fixed this problem by adding the following commands in the ubuntu server:

sudo nano /etc/resolv.conf

then add the line on the bottom line

nameserver 8.8.8.8


How do I get rid of a duplicate application?

There are multiple ways to install applications in Ubuntu. For example, you can copy the application's file to the places they need to go manually, you can install a Debian package, you can install an application via Snap and others. If you install the same application with two or more of these methods, you can end up with multiple copies of the same application. Probably, this is what happened here.
Chances are, you installed one copy of the Discord client from a Debian package (a file ending with .deb) and another copy via Snap. You can check that with
dpkg -l '*discord*'

(I'm not aware of an official apt repository for Discord, so I'll stay on the dpkg layer for this answer)
If this prints a line for discord starting with ii, there's a copy of the Discord client installed from a Debian package. It should look similar to
ii  discord        0.0.11       amd64        All-in-one voice and text chat for gamers

Regarding Snap, you can list the installed Snaps with
snap list

The list printed by this command probably contains an entry for the Discord client, as well.
You can remove the reduntant installation with
dpkg -r discord

or
snap remove discord

respectively.
To find out which copy is working and which isn't, you just have to try. If you uninstalled the "wrong" copy, you just need to reinstall it. This is done by downloading the *.deb file from [https://discord.com/new](Discord's home page) and installing that with something similar to
dpkg -i discord-0.0.11.deb

or
snap install discord

respectively.


This is a pretty original question.  I can only answer part 3).

Your routing table determines which interface is used.

The shell command:

route

dumps your current routing table. It shows which network interfaces are being used for each destination network. The output includes a metric for each rule for determining 'precedence' by the routing code in the network stack (part of the Linux kernel).  The default route is the catch-all destination for anything that didn't match other routing rules.

You may also use ifconfig -a to see which interfaces are available on your system.

The routing table can be also be modified (as root) with the route command by passing the add or del to add or delete routes (man route for full details) but unless you really know what you're doing, you should leave this job to the network manager.


Nvidia quantal/main/binary-amd64/Packages 404 Not Found

Most logical answer: there is no quantal folder because there is no nvidia driver for quantal (yet). Or there is one and the PPA for it does not exist yet.

And yes... in a beta you can expect the answer to be: manual install and since this package is fairly crucial prepare for a re-install when you mess up.

Also: a suggestion: did you check "software settings"/"software sources". I have seen a proposal to add additional driver to that section of Ubuntu. If that made it in you might need to install it from there. This is done by ubuntu-drivers-common.

Found it ...

From  my machine:


Why does cd ~k (& tab) expands to cd ~kernoops when I already have a folder named "~kernel-ppa" in pwd?

As you know, ~ expands to your home directory. But what you seem to have missed is that ~john expands to the home directory of the user named "john".

Check your /etc/passwd file:

% grep ker /etc/passwd
kernoops:x:107:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false

It has a "system user" named kernoops (for internal bug reporting reasons). So when you type cd ~kTab the shell gives preference(1) to user name expansion before local directories expansion, and you have cd ~kernoops. Now  it results that user "kernoops" home dir is /, so it cds to it.

In my shell, zsh, I have no double slash(2):

[:/] % cd ~kernoops/
[:/] % pwd
/
[:/] % cd //
[:/] % pwd
/

As an aside, this directory name is not well thought. It will need triple care in scripts and whatever. The only worst idea I can think is embedding a tab in it...

Footnotes:

(1) In zsh, even if I have a directory named ~xdir and no user starting with x; doing cd ~xTab does not expand and not quoting the ~ gives error:

[:~/tmp/x] %  mkdir \~xdir
[:~/tmp/x] % ls
~xdir
[:~/tmp/x] % cd ~xdir
zsh: no such user or named directory: xdir
[:~/tmp/x] 1 %

(2) I seem to remember that posix made an exception for the initial // in a path --- it should be maintained because some old unix variant (I used the apollos with Domain/OS that had that) used //machine-name/... to seamless access other machines' filesystem in the local network (security was not invented yet). So probably bash is right here. If you do cd /// you will have the normal / in both shell, though.

Yes, found on unix.se!


What you're asking (and many other nice features) is not possible in nautilus 3.6/3.8. This tutorial explains how to install a pached nautilus 3.4 in ubuntu 13.04


Unable to resolve DNS for kubernetes cluster on Ubuntu only

I just setup an A record instead which which is less flexible but I have no idea what else to do for Ubuntu, CNAME only records don't seem to resolve correctly.


How to override the DHCP-provided nameserver?

If you want to override or append to the name servers suggested by the DHCP server, you can configure this in /etc/dhcp/dhclient.conf, eg:

interface "eth0" {
    prepend domain-name-servers 10.0.0.2;
}

You can also do this from the "Edit Connections" control in the network indicator in Unity or GNOME.


Can DHCP server launch external application after it leases address to new network device?

Answering my own question:

udhcpd can do pretty much what's necessary by combining options:

auto_time 1 #in seconds

notify_file /home/user/notifier.sh

Script is called each time udhcpd.leases file is written, which is 1 second (as set in auto_time). Then the script can analyze changes.


Virtualize Ubuntu 11.04 from my USB stick

That's not virtualization. What you're describing is installing Ubuntu on a USB stick, which is quite possible. (I have done this successfully, and in fact was running Ubuntu off a USB hard disk for about a year.)

To do this:

Copy anything you want to keep off the USB disk.
Run the Ubuntu live CD, plug in your USB disk, and start the Ubuntu installer.
At the partitioning step, tell it to install to the USB drive (likely /dev/sdb, assuming you have 1 internal hard disk).
Install. Tell it to install the bootloader only on the USB drive, and not on the internal hard drive (which would trash the computer's OS installation).
Reboot. You may want to change the BIOS configuration to boot from the USB stick.

Caveats

Install the basic graphics drivers (xorg stuff), but not the AMD/ATI or Nvidia drivers (which can cause problems if you boot on a system without the corresponding graphics card).
Be warned: it will be fairly slow, since all disk writes go to the USB disk.


Run this...

How to restart the networking service?

Do not run this in a root shell, just run it using sudo.  I've seen the SIO errors the first time you run the command, but not the second time.  You may have to run it twice in a row.

I would also comment out the auto eth statements.


Lenovo Thinkpad w520 Wireless Drivers Not Working

Well, for what it's worth, all I had to do was use the older kernel and it was able to auto-detect the driver, I guess it just isn't supported in the newest one.  Probably should've tried it sooner.


Package 'gnome-control-center' has no installation candidate

gnome-control-center package exists in main repository of Ubuntu. To enable it, you can run either of the below three commands:

add-apt-repository with main:

sudo add-apt-repository main

add-apt-repository with full address of archive:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main"

Editing SourcesList with tee:

echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list

Once enabled, try installing gnome-control-center again.


A start job is running for dev-disk-by x2duuid-ad0b043b\x2d404c... .device (7s / 1min 30s)

Your swap line in /etc/fstab is incorrect.

Update: We're going to have to create a new separate swap partition for Ubuntu...

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.

Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower part of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot the a Ubuntu Live DVD/USB
start gparted
resize (shrink) sda1 by moving the right side of the partition to the left, reducing it by 3G
create a new swap partition in the newly unallocated 3G space, note the sdaX number
click the Apply button
quit gparted
optional...

open terminal
type sudo fsck -f /dev/sdb5 # to fix errors on sdb5

reboot to Ubuntu

In terminal...

sudo blkid # copy the full /dev/sdaX UUID to the clipboard

sudo cp /etc/fstab /etc/fstab.bak # backup the file first

gksudo gedit /etc/fstab # edit the file, save, and quit gedit

Change this:

# swap was on /dev/sda6 during installation
UUID=ad0b043b-68a6-... none            swap    sw              0       0

To this:

# swap was on /dev/sdaX upon reconfiguration
UUID={put UUID for sdaX here} none            swap    sw              0       0

Notice the ... in the UUID numbers. The number is cut off. You need to use the full UUID taken from the sudo blkid command for /dev/sdaX.

Still in terminal...

sudo swapon -a # observe no errors when enabling swap

reboot

Update #1:

After reviewing a screenshot of gparted, it looks like something else is going on. /dev/sda6 USED to be swap, but now it's a Ext4 partition, and /dev/sda5 is a swap partition. It may be a swap for another OS. I've slightly adjusted my procedure.

Update #2:

Turns out that /dev/sda5 was a swap partition for another OS. We're going to have to create a new separate swap partition for Ubuntu. I'll rewrite some of my procedure. I'll also add a fsck for /dev/sdb5 that has errors.


Unable to access home folder in linux subsystem(WSL) from cmd

The files in ../AppData/Local/lxss/ are protected by microsoft (hidden and system).

If you wish to corrupt Windows bash you can do it by unchecking "Hide protected operating system files (recommended)" in the folder options window.

In this Microsoft blog: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/

Microsoft wrote:

  DO NOT, under ANY circumstances, create and/or modify Linux files
  using Windows apps, tools, scripts, consoles, etc.

  Also note: Opening files using some Windows tools may read-lock the
  opened files and/or folders, preventing updates to file contents
  and/or metadata, essentially resulting in corrupted files/folders.
  Creating/changing Linux files from Windows will likely result in data
  corruption and/or damage your Linux environment requiring you to
  uninstall & reinstall your distro!

  Note: Your “Linux files” are any of the files and folders under
  %localappdata%\lxss – which is where the Linux filesystem – distro and
  your own files – are stored on your drive

  Remember: There’s a reason we gave the %localappdata%\lxss\ folder ‘hidden’ & ‘system’ attributes


nVidia driver kills text virtual consoles - how to get them back?

Apparently, the current version of the driver on this card does not clone the console screen on all monitors, but instead displays it only on one, powering down the other two.

Adding nomodeset to the GRUB_CMDLINE_LINUX_DEFAULT parameters (so the line reads, for example, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset") in /etc/default/grub (and then running sudo update-grub) fixed the main problem; I now have normal virtual console operation.  (I also got rid of the quiet & splash options, since there was no usable splash screen anyway, only a blank screen during most of the boot process.)

(Note that this solution does not do anything to help the problem of the "Authentication is required to update SMART data..." dialog appearing most of the time after switching back to X from text.)


What does the installation of linux-{image,headers}-generic-lts-backport-natty do?

The sudo command is allowing you to run the apt-get command with admin privileges.
The apt-get command is installing (first example) or removing (second example) software packages. "Purge" simply means configuration files are deleted too.
For explanations of the various packages, you can check here


Ubuntu 14, services don't stop, shutdown doesn't work

After much Googling, I forced a reinstall of dpkg and ran a series of cleans, autoremoves, and the like.  I also ran an apt-get update && upgrade -y which had new linux headers and a new plexmediaserver (which I had to force install).

All of a sudden I can stop/start/restart both apache2 and tomcat7, and am able to reboot by simply running sudo reboot.

I'm not 100% sure what I did if I'm honest, but I think it was largely the dpkg reinstall and the successive operations ran with the reinstalled version mentioned above.

EDIT: I will try to remember to accept my own answer.  Mods, feel free to do so before 21 hours in case I forget.  Thanks.


Cannot compile PHP 5.3.29 on Ubuntu 16.04

I use ubuntu 16.04, and all work's fine.
Here example how install php5.x.x link

Pre-requisites

You will need these two extra packages if you don't have them:

sudo apt-get install build-essential libxml2-dev

Install PHP

In terminal:

wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
tar -xvf php-5.3.29.tar.bz2
cd php-5.3.29
./configure
make
make test # Neither mandatory nor a bad idea.
sudo make install

The instructions will untar the source build and they will install php in your system.


Getting back to kernel version where DKMS worked

As we see from your paste, you followed both the sudo make install and the dkms process. That is what leads to the message:

Module version v5.5.2_34066.20200325_COEX20180712-3232 for 8821ce.ko
exactly matches what is already found in kernel 5.4.0-31-generic.

In other words, dkms is not going to install it because sudo make install has already installed it.
These two methods are different ways to do the same thing; they need not be mixed and may result, as you've seen, in confusing results.
I suggest that you do:
cd ~/git/rtl8821ce
sudo make uninstall
sudo dkms remove rtl8821ce/v5.5.2_34066.20200325 --all

Confirm that it is removed:
sudo dkms status

It should return nothing. If so, try only the dkms process:
sudo dkms-install.sh
sudo modprobe 8821ce

Your wirless should now be working.
To install it for kernel version xx-37, the latest available, as far as I know, reboot into xx-37 and repeat:
cd ~/git/rtl8821ce
sudo dkms-install-sh

EDIT: In our chat we found this in your wireless info paste:
0: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no

Soft blocked:yes typically means either that Airplane Mode is set to On in Network Manager or else in Settings > WiFi. After checking and toggling both, your wireless is now working properly.


Is it possible to trace the add-relation hooks in debug-hooks window?

You should see meaningful output in the debug-hooks window.  I can think of two reasons why you might not:

you ran debug-hooks after the relation was changed or while the hook was running
you didn't use the correct unit name (e.g. nova-cloud-controller/0) as a debug-hooks parameter.

Juju captures the standard output of the hook execution and logs it out.  Right now it isn't easy to filter this out, but soon, we are likely to have it at least grep friendly.

It looks like the error you are getting is this:

  nova-cloud-controller: Couldn't obtain SSH host key from xxn79.

juju debug-log doesn't yet provide the ability to do filtering of the log, but this is on our roadmap.