You should  be able to use poweroff to turn off a system.

Run this command:

sudo visudo

Add this line near the bottom (before the #includedir line), or edit an existing line:

USERNAME ALL=NOPASSWD: /sbin/poweroff

(replace USERNAME with your username)

Press Ctrl+X, Y, Enter.

Change your launcher to use the sudo /sbin/poweroff command.

To additionally make this work for reboot, add /sbin/reboot to the NOPASSWD: line above.


Existing dualboot xubuntu & win10, added new drive, how best to config system?

With full credit to @PonJar:

In Gparted on a liveUSB: clone the EFI and Old Xubuntu partitions to the new drive.
Still In Gparted on a liveUSB: expand New Xubuntu to fill the new drive.
Still In Gparted on a liveUSB: give Old Xubuntu a new random UUID. You'll have to run e2fsck in terminal but it's pretty much as it tells you to do, then try again with the random UUID.
In Windows, computer management, disk manager, delete Old Xubuntu.
In windows, download Mini Tool Partition Wizard Free, and expand Windows to fill the empty space.

You may have to repair GRUB. I used Boot Repair a number of times, and found it worked better when installed into a liveUSB than when used as part of a YUMI Multiboot USB (fat32 UEFI+BIOS), because it gave all the options. However Boot Repair did also mangle the GRUB on that LiveUSB, which can be fixed by using a separate windows install and adding another tool to the USB then saving.


Why is Ubuntu menu display corrupted on VirtualBox?

Disabling "3D Acceleration" prevents  the screen corruption from occurring.


Is it possible to convert Ubuntu to pure Lubuntu?

I don't know anything about your machine's specifications, your needs, or your experience and the following maybe inappropriate or not applicable.

If you feel you need support, Ubuntu maybe a better option than Lubuntu for two reasons. One, there are, in my opinion, more Ubuntu users here than there are Lubuntu users. Two, Lubuntu, from 18.10 onward, uses LXQt, not LXDE and the LXQt experience is still being refined.
If you need stability, Ubuntu 18.04 is an LTS version which will be supported for five years (till April 2023). Ubuntu 19.04 and Lubuntu 19.04 are supported only until January 2020. The source of the dates is here.

If you still want to go ahead with trying to remove software unique to Ubuntu, you can download the manifests for each system and compare them.

The Ubuntu 19.04 manifest is available here.

The Lubuntu 19.04 manifest is available here.

Once you've saved both manifests to a folder on your computer, open a terminal in that folder and run:

comm -13 lubuntu-19.04-desktop-amd64.manifest ubuntu-19.04-desktop-amd64.manifest

The order is important: first the Lubuntu manifest, then the Ubuntu manifest.

The output will be a list of files only present in the Ubuntu 19.04 manifest and absent from the Lubuntu 19.04 manifest. Read man comm for what comm does.

Caveat: Being listed in the manifest does not necessarily mean that the file is present on completion of the installation process. An example is ubiquity and related files. These files, along with some others, are automatically removed as part of a clean-up.

On further reflection, /var/log/installer/initial-status.gz is a better source of what was actually installed on your Ubuntu system.

If you copy that file to your home folder and unzip it using gunzip initial-status.gz, you can then run

grep -E "^Package:" initial-status | awk -F " " '{ print $2 }' | sort

to get a list of packages that were finally installed (after the cleanup that occurs during an installation). In that respect, it is preferable to relying on the manifest.

Once you've got the list, you can decide which applications from Ubuntu you want to keep or remove.

Edit:

I'm not sure that purging ubuntu-desktop would be an easier route. ubuntu-desktop is a metapackage. Removing a metapackage may not remove the packages specified by the corresponding metapackage.

I looked at this in a VM of Ubuntu 19.04 (minimal install upgraded from 18.10 minimal install).

dkb@dkb-UM:~$ apt purge -s ubuntu-desktop
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-shell-extension-desktop-icons ubuntu-desktop-minimal
  xdg-desktop-portal xdg-desktop-portal-gtk yaru-theme-gtk yaru-theme-icon
  yaru-theme-sound
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ubuntu-desktop*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Purg ubuntu-desktop [1.431]
dkb@dkb-UM:~$ apt purge -s ubuntu-desktop-minimal
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  ubuntu-desktop* ubuntu-desktop-minimal*
0 upgraded, 0 newly installed, 2 to remove and 6 not upgraded.
Purg ubuntu-desktop [1.431]
Purg ubuntu-desktop-minimal [1.431]
dkb@dkb-UM:~$


Bluetooth not detecting anything in Ubuntu 16.04 in HP laptop

This post was originally written in Polish.  Below is the Google Translated text, translated to English from Polish.

Wrong. Unfortunately, the version of Ubuntu 16.04 is a lot of mistakes I currently also working on ubuntu 16 .Dzisiaj want to download music from your computer to your phone via bluetooth and after switching did not detect anything . when I went to turn on the menu and once again turned on the window it wrote that it is not turned on even though it turned into this option turned off the computer a few times before but it worked for a short time .

The solution is so !

The device connect to your computer and then it will detect it . Or view on your phone settings, bluetooth what is the ip of your bluetooth and type in the window in ubuntu . That should do it ! if there is , unfortunately, you have to upload files such as : sd card . I would recommend for the future.


General Questions about Linux Server set up

Is there much of a difference between Ubuntu desktop and Server?

No. A desktop install basically is a server with a desktop environment. systemd has
a service that decides to show a login (aka. server version) or start the next service in line that creates the desktop session.

  How do you remotely control/access the server from a macbook pro or any OSX computer for that matter?

One way would be to install a SSH server. That way you can use the rcp (remote cp) like so:

rcp {files} {user:password}@{server-ip}/dir/to/copy/to

You can harden your system by also introducing ssh key pairs; that will lock anyone else out from accessing your server that did not synch the ssh key pairs.

What you ask for screams Google or Amazon cloud instance though and not a native server setup. That last one is far too time consuming and requires constant maintenance.


Combining multiple types of HDDS & SSD Into one recognizable drive

To answer part of your question. I have a similar setup (Ubuntu 15.04 with a 2 TB HDD and a 250GB SSD). With two drives it's easy, you simply put your root directory / on one and your /home directory on the other.

During installation, choose a custom installation and mount your root directory and swap space on the SSD. I usually dedicate 1-2 times the amount of RAM to the swap space (i.e. 16GB of RAM, 32 GB of swap space).

On the HDD select it as your /home folder mounting point.

BAM! There you have it, your system critical components are now on the SSD with the superior read/write rate, and your user files (Downloads, Documents, Music, Pictures, etc.) are on your inexpensive, large storage platform. Your system should now fully boot astronomically faster. If you ever need to store a database or serve content (i.e. an Apache Web Server), make sure to put it in a system directory like /var so the content can be accessed quickly.

Now the rest of your question. I don't have very much experience in LVM or RAID, but I imagine you could combine your two HDDs into one Logical Volume to contain your /home folder.

Note that my method does not optimize content, it is a manual configuration. By default, system items will be installed on the SSD (minus some user specific configuration files) and your files, scripts, downloads, etc. will be placed in the default directory /home/<user>/.

Happy hacking.

Regards,Lisenby


How do I get more than 80 columns in command line mode?

The following command:

docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -ti container bash

works under most, if not all circumstances.


What do I do if Grub sometimes freezes and/or I get "ATA bus error" in my logs?

In the end, it seems it was cables.

Following the suggestion in a bug report, I changed the SATA cable, used a different SATA power plug from my power supply (insufficient power is a possible culprit), and made sure the SATA cable wasn't near any other power cables (possible electical interference from other, especially power, cables).

It works fine now.

I've since put the original SATA cable back in, and it still works. I'll switch power cables soon, and try dangling the SATA cable near other power cables... Likely the SATA cable was either dislodged or a bad connection developed due to humidity or some such.


Monitor not turning off when screen saver is on

The screen saver isn't meant to turn it off. It is literally just a blank screen. If you want to turn the screens off, go to System Settings, click Brightness & Lock then chose how long you want the screen to turn off after from the dropdown.


18.04 recently lost tap-to-click at login (gdm)

Try this: Enable ‘Tap to click’ in Ubuntu. It worked for me.

  Open terminal via Ctrl+Alt+T, then run command to get root privileges:

sudo -i

  Type in your password (no visual feedback while typing) when it prompts and press Enter.
  (Not required in default Wayland session) Allow user gdm to create a connection to the X server:

xhost +SI:localuser:gdm

  Switch to user gdm in the terminal:

su gdm -s /bin/bash

  Finally enable 'Tap to click' via gdm user:

gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true

  Restart your computer and done.

sudo reboot

  How to Restore:

  To restore the setting, open terminal and redo the previous steps
  except run the following command instead of the command in Step 4:

    gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click false


This is because you are in a directory not writable to your current user.

Try this instead. You will find the application downloaded and saved to your desktop.

cd ~/Desktop/
wget http://us.mirrors.quenda.co/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip -O apache-maven-3.6.0.zip

Example:

In my home directory, download is successful:

subroot@subroot:~$ wget http://us.mirrors.quenda.co/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip -O apache-maven-3.6.0.zip
--2019-05-15 11:06:47--  http://us.mirrors.quenda.co/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
Resolving us.mirrors.quenda.co (us.mirrors.quenda.co)... 108.61.245.101, 2001:19f0:a:5::28a6
Connecting to us.mirrors.quenda.co (us.mirrors.quenda.co)|108.61.245.101|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9102386 (8.7M) [application/zip]
Saving to: ‘apache-maven-3.6.0.zip’

apache-maven-3.6.0.zip                   100%[================================================================================>]   8.68M  1.59MB/s    in 13s

2019-05-15 11:07:01 (700 KB/s) - ‘apache-maven-3.6.0.zip’ saved [9102386/9102386]

subroot@subroot:~$

But if I change to the root folder / I can't download because I don't have permission to write to that folder.

subroot@subroot:~$ cd /
subroot@subroot:/$ wget http://us.mirrors.quenda.co/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip -O apache-maven-3.6.0.zip
apache-maven-3.6.0.zip: Permission denied
subroot@subroot:/$


Looks like a bad video card.  Not clear if the graphics is on the mobo or on a PCI card.  In any case, the latest drivers for series 7 can be found at http://www.geforce.com/drivers/results/51453

Obviously, you want to check your cooling situation, fans not working, clogged filters and so on.  This sounds like a classic overheating problem.

Since the video is quitting on you, it might be easier to work on it if you can ssh into it from a different machine.  Also, trying a different video card could help.  Based on your question it looks like the OS itself is not crashing.  Just the video out is losing sync.

One way to completely eliminate drivers as the issue would be to liveCD a different operating system such as Windows.  Even booting memtest from CD / DVD ought to do it.  I have Tor on a thumbdrive as a test tool for things like this.  Your symptoms make it seem highly likely that the problem is defective hardware but I've included troubleshooting steps above to help prove or eliminate that possibility.


To change your user password:

Reboot
At OS selection menu, select "Advanced options for Ubuntu" and then select the first entry that ends with "(recovery mode)"
At the prompt, select "root"
mount -o remount,rw /
passwd [username] to change the password

This should at least let you log in via a VT (Ctrl+Alt+F1) so that we can further diagnose the problem if one still exists.


Sound over HDMI only with mirrored screens? (except for test-sound)

Have you tried installing alsamixer and then going to Select Sound Card by pressing F6 and check if your Sound Card is there and make it default ?


Unable to ping from host to guest in KVM

The scenario you describe is a guest that is connected on a bridge so it gets an address on the local LAN - probably 192.168.1.xxx.

Please note your guest address (run ipconfig in windwos or get the address from GUI).
This is probably the address from the DHCP server.

Communication between your host and guest (or any other computer on the LAN and the guest) should be possible but may be blocked by the firewall on the destination.

First thing I would try is to check the connectivity:
 1. Can you access the web from the guest?
 2. Can you ping the router from the guest?
 3. Can you ping the guest from other computers on the LAN?
 4. Can you ping the guest after disabling the windows firewall?

The above should give clues that will help resolve the communication.
Good Luck


Awk selecting specific fields and requiring a variable at the same time

Awk programs always consist of pattern-action pairs. In your case, you want action {print $1,$3} when the record matches pattern $1~/chevy/. So
#!/usr/bin/awk -f

$1~/chevy/ {print $1,$3}


Allow to change keyboard language while password field is focused

As I understood, you have to set back your preferred keyboard layout everytime you login. If it is the case, you can go to "Settings - Region and Language - Input sources" and set the language you want to login with in first position.
Also, in that same section, when you click on Options, you can set "Allow different sources for each window" or "Use the same source for all windows", depending on your preferences.
Hope this answers to your question.


You will need a connection to the internet to install
sudo apt-get install git build-essential linux-headers-generic
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
make
sudo make install

Reboot

After a kernel update is installed, you will need to reinstall the driver
cd rtl8192eu-linux-driver
make clean
make
sudo make install

Without internet, you can download https://github.com/Mange/rtl8192eu-linux-driver/archive/master.zip on a computer with internet access and transfer it to the Ubuntu desktop.  Right click on the file and choose extract here.  Then in terminal
cd Desktop/rtl9182eu-linux-driver
make
sudo make install
Reboot


Is it possible to add a desktop in Ubuntu 11.10?

First, you need CompizConfig Settings Manager (ccsm). If you haven't got it already, you can download it from the Software Centre.

Next, go to General Options > Desktop Size, and adjust the Horizontal Virtual Size and Vertical Virtual Size to achieve the grid you want.


How to set session-wide environment variables and PATH?

The example in the wiki, for setting session variables via ~/.pam_environment, states in a note:

The syntax used for modifying PATH, which syntax differs from script files, is required for variable expansion to work.

Hence your first row should look like:

ANDROID_HOME DEFAULT=${HOME}/Android/Sdk


SElinux Permissive setting enable/disable black screen

When the black screen first appears type in your password ( YOU WON'T BE LOOKING AT ANYTHING ON THE SCREEN) and hit enter. it might be your graphics card keeping your screen dark while your operating system is still working and you just cannot see it until completly booted  :-)


How can I change the Google Chrome webapp icon?

With daily chromium builds and recent BAMF you can (if you look closer to that screenshot, you can see an example with my site and high-res icon). But in the current state of chromium you need to do some hacking to make it support this easily:

Make chromium generate a .desktop file for the application Menu too (if you don't want you to create one by scratch).
Get your chromium app window WM_CLASS with xprop | grep WM_CLASS | awk '{print $4}' (if it's just "Chromium Browser" or something similar you need to update chromium).
Edit that .desktop file (located into ~/.local/share/applications) with gedit or any other text editor; the file should contain:

StartupWMClass=$APP_WM_CLASS_Found_on_step_2
Icon=~/your/icon/file/name/or/path

i.e. (for an app pointing to http://mail.google.com with google_mail.png in ~/.local/share/icons):

StartupWMClass=mail.google.com
Icon=google_mail.png

Restart bamfdaemon or unity at all; now when you'll run an application with that WM_CLASS the settings defined in the desktop file you've just edited will be used; icon included ;)


Postfix won't work. Are MX and A records correct?

One suggestion solution is,

SSH-Login root
type "sudo nano /etc/postfix/main.cf"
Find line "inet_interfaces = loopback-only" and replace with "inet_interfaces = all"
Save by CTRL+X and hit Y
restart postfix by "sudo /etc/init.d/postfix restart"

Thread can be found on DigitalOcean


Ubuntu Error with Database but not on Debian

The problem is clearly stated:

  Field \'pskinsurl\' doesn\'t have a default value

You try to insert a record in a table without specifying a value for the above mentionned field and no default value is known in the table definition.  The difference you observe between the two servers can come from a difference in the database server you use or in the definition of the table.
So you have 3 options:

Add a value for that field in the INSERT statement.
Modify the definition of your table
Make sure you use the same database server on both servers.


How do I hide CIFS volumes in the Places menu?

You can hide the volumes in Places Menu.Type the following in terminal to create a new file hide-partitions.rules under /etc/udev/rules.d

sudo gedit /etc/udev/rules.d/hide-partitions.rules
Now copy/paste the following to hide-partitions.rules

  ACTION!="add|change", GOTO="hide_partition_end"
  SUBSYSTEM!="block", GOTO="hide_partition_end"
  KERNEL=="loop*|ram*", GOTO="hide_partition_end"
  KERNEL=="sda5", ENV{UDISKS_PRESENTATION_HIDE}="1"
  LABEL="hide_partition_end"

Save the file and close it.
Now we are going to hide the partition sda6(Stuffs) from Places Menu.

Edit the fstab file

sudo gedit /etc/fstab
Put a # in front of the line

UUID=B630D52430D4EC7D /media/sda6  ntfs-3g  defaults,locale=en_IN  0  0
So it becomes

#UUID=B630D52430D4EC7D /media/sda6  ntfs-3g   defaults,locale=en_IN  0  0
Save the file.
Reboot the sytem.
Now the volume Stuffs will be removed from the Places Menu.


Play/search a Shout Cast FM station on Ubuntu 12.04 LTS

you can use Banshee Media Player with its add-ons, it's available at Ubuntu Software Center. I just checked there's Hindi radio available. You can also visit their official website


No more AnyConnect compatible vpn transport in Ubuntu 16.04?

I am having the same problem on fresh install of Ubuntu 16.04.
You can however connect via terminal :

sudo openconnect https://<remote.host.here>

after that you should be prompted for user name and password.


No Wifi - “Activation of network connection failed” Ubuntu 16.04 & 18.04

The issue was that my clock was set 2118 (100 years in the future). For whatever reason, this did not allow DHCP to work. I was able to get online using manual IP address assignment with the help of @chili555 which made me realize all website SSL certificates were expired, and led me to figure out the clock issue. Thanks again @chili555.


Analogous to python (python 2.7) and python3 (python 3.X), there's pip (python 2.7) and pip3 (python 3.X).

To install a python3 module, use pip3.


Installed Ubuntu alongside Windows 7, can't boot Ubuntu

Following this answer fixed it for me:
https://askubuntu.com/a/156956/422210

(install Boot-Repair and press "Recommended Repair"


When purging old kernels should I also purge `linux-image-extra`?

There is no need of linux-image-extra without linux-image of the same version. You can purge them.


You can do this with a new tool that several users here on Ask Ubuntu have made.  Its called Unity Tweak Tool.  It's still in early development but it is very stable from my testing.
To install it:
sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
sudo apt-get update && sudo apt-get install unity-tweak-tool

Now open the dash and search for "Unity Tweak Tool".  It looks like this:

Open it up and navigate to Launcher.

From there you can:

Change the transparency of the launcher

Change the color of the laucnher

Auto-hide the launcher

Or change the background for applications (This is closest to what you want I think)

Another suggestion is changing your icon theme under Icons.

You need to note however, you can't very well change icons of other applications.
Brightness is relative, but I got them this dark:

For certain icons, like the software center, you might have to change the actual icon, wherever the system stores it.


Unable to boot from usb - Apple Mac Mini

Some touch combination are available by holding down certain keys during startup on MAC device

After reading this page Mac features touch combo You should press C  immediately after you press the power button.

Let us know if is working on your MAC.


Determining commands in packages for apt, snap, flatpak

snap info snapname will tell you the size, but won't tell you if it needs any "content" (sometimes called "platform") snaps (like gnome-3-34-1804) or bases (like core20). You may already have them installed, but equally may not.
Snaps have libraries bundled (other than those that exist in the base and any platform snaps used), so there isn't really a concept of dependencies / libraries being pulled in aside from the content/base snaps.
You can however snap download snapname to grab it, then unsquash -l snapfilename to list what's in it. You can also fully unpack it with unsquash snapfilename to get a good idea of what's inside.
Snaps also (sometimes*) contain a manifest which details what's in it. Once the snap is downloaded you can unsquashfs snapfilename snap/manifest.yaml and peer into that to see which libraries were included in the snap. You can also (sometimes*) pull out the original snapcraft.yaml which was used to build it, using the same method: unsquashfs snapfilename snap/snapcraft.yaml.
* The "sometimes" is because it depends how a snap is built. They're not all built the same way.


Ubuntu 18.10 RC install - where is disk encryption

The new "Live-Server" image doesn't have any disk-encryption options yet. But the alternative iso which uses the old/but-finished stable installer, does have disk-encryption options.

Direct Download

Directory Browsing

Update: For 19.04

Direct Download

Directory Browsing


I am not sure what happened this the cursors, but I managed to do partial workaround: find in the web some perfectly scalable cursor theme, then make it default

sudo update-alternatives --install /usr/share/icons/default/index.theme x-cursor-theme /usr/share/icons/path-to-cursor-theme.theme 91
sudo update-alternatives --config x-cursor-theme

AND make link to the cursors in that folder from default cursors:

cd /usr/share/icons/default/
sudo ln -s ../folder-with-cursors/cursors cursors
cd /usr/share/icons/Adwaita/
sudo ln -s ../folder-with-cursors/cursors cursors


Ubuntu 14.04 won't load onto an empty hard drive

Here's my best advice.  Disconnect your windows hard drive completely during installation.  You can solve the GRUB issues later, but the risk to your windows installation is highest while installing Ubuntu.  (and the other way around moreso).

As for master/slave jumpers, I advise you to get in the habit of using CS (cable select) which takes advantage of the cables having address selections internal to them so that they determine which is which.

So to resume your question of why, anything, I just don't know, but I can tell you how to make things work.  Make the installation with only one drive present and you probably won't have further issues.  I would also advise you to let Ubuntu erase and used the entire drive, permitting it to set the partition sizes.  As for the swap drive, I personally recommend the use of the "Dynamic Swap Space Manager" because it adjusts swap space as needed.


How to get the dropbox icon back without removing Chrome?

Are you sure you aren't trying to mix up 64bit and 32bit software? I have Dropbox, Chrome and libappindicator1 installed correctly, with amd64 (64bit) architecture. I would say you need everything 64bit (unless on an older system). From the error, it looks like the installed version of chrome is 32 bit. So try to download the "64bit .deb" version from https://www.google.com/chrome/browser/.

This should hopefully be compatible with your Dropbox (make sure that too is 64bit).

btw you can check the version and architecture of a library with

dpkg-query -i lib*indicator*


There was a last post I didn't really believed because there wasn't any explanation, but it solved my problem.
I did sudo apt purge timidity-daemon then rebooted. Sound was back.
To proof it further, I re-installed it. Poof! Sound gone.
So for me, the solution was to:

sudo apt purge timidity-daemon
either reboot or sudo alsa force-reload

It seems timidity is installed by default, so I guess something got broken when I force shutdown and this package got exclusivity or some sort on the sound...


How to boot an USB installer ISO image from an internal SSD?

Get the uuid of the partition on the disk:

sudo blkid
/dev/sda1: UUID="6f2b5b8c-f0af-4d4d-a32b-2481a9e2c5d7" TYPE="ext4" PARTUUID="694a694a-05"

Store the ISO in the root of the partition, in this example we will use ubuntu-19.04-desktop-amd64.iso.
Mount the ISO and copy the first menuentry from /boot/grub/grub.cfg, and paste it in /etc/grub.d/40_custom:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Try Ubuntu without installing" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash ---
    initrd  /casper/initrd
}

Change the following in bold:

menuentry "Try Ubuntu without installing" {
                                             # the uuid you got i step 1
    search --no-floppy --fs-uuid --set=root 6f2b5b8c-f0af-4d4d-a32b-2481a9e2c5d7
    set iso_path=/ubuntu-19.04-desktop-amd64.iso
    loopback loop $iso_path
    set gfxpayload=keep
    linux   (loop)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash iso-scan/filename=$iso_path ---
    initrd  (loop)/casper/initrd
}

Update grub:

sudo update-grub

Next time you reboot you will have an entry to boot the ISO.


Changing from Ubuntu Budgie 18.04 to Bionic Beaver

Bionic Beaver relates to Ubuntu 18.04 LTS, being a codename for the release and applies if you're using the Budgie desktop, GNOME or any other desktop.  All updates are stored in a 'bionic' directory on archive.ubuntu.com (or country/local mirrors)

You could just

sudo apt install ubuntu-desktop

and add the default GNOME desktop to your existing machine. At login you can select which you want to use for that session.

Having multiple DEsktops uses more disk space (as you'll have both), you'll have larger updates (both will upgrade), it can also complicate menus, as you'll have more programs installed (that can do the same thing unless both desktops use the same programs), but I like this and have it on my own systems.

If you install using 'something else' & ensure you don't format your partitions (ie. select the same partitions, just overwriting them), the installer takes note of your installed programs, wipes system directories & installs your new Ubuntu into those system directories, then restores the programs you had installed before (or added by you if from Ubuntu sources). It doesn't touch your settings or files either (but this doesn't mean you shouldn't backup - do it always in case of power outage, or accidently formatting your partitions)


First of all, port 22 is used for ssh, not mysql. In addition, its not common to run mysql visible on the internet.

But, if you do have ssh access, you can work around this, by tunneling mysql trough ssh.

In one terminal, run

ssh -L 3306:localhost:3306 example.com

where example.com is the remote ssh server. This creates a tunnel, between port 3306 locally, and on the remote end. This is encrypted and transported via ssh, so any secrets (passwords and queries) are encrypted while transported over the internet.

In another terminal, you will be able to run

mysql -h localhost --protocol=TCP -u username -p

--protocol=TCP is required, as by default mysql will connect to the socket connection on localhost, but this is unavailable, as mysql is not running locally. This connects to the ssh-tunnel set up previously.


Can't Open JPG - Error interpreting JPEG image file

As SVG files are basically XML files (i.e. text files), I suspect your problem is in fact with binary files, most likely an endianness problem.

When the byte array gets assembled and streamed via the network, it isn't written byte-by-byte but aggregated in bigger chunks (probably for speed reasons).
For example, you want to send 4 bytes (ABCD) from your machine but they get written as BADC on the remote server.

As why with text files this does not happen... well usually text files composed of simple ASCII chars (unless they're encoded in UTF-8 or such...), so they are handled byte-by-byte instead.


How to relocate the Unity top panel to the bottom?

Currently you cannot relocate this bar in Unity. It must be at the top of the screen.


Can't remove a package - not installed so not removed

One option would be to go to the folder you installed it from (where the Makefile resides - pretty much where you unzipped it to in the first place, and where you navigated for the initial make install command) and typing sudo make uninstall. Generally speaking this will remove the files that were copied to various places during the installation process (if it's appearing in your Dash then it's unlikely to have only put files into the home folder)

The reason the apt-get commands aren't working for you is that you installed from a zip file - apt-get only controls packages downloaded from the repositories, so you can only apt-get remove or apt-get purge packages you apt-get installed in the first place.


No Wifi conection in HP Pavilion x360 with Ubuntu 18.04 LTS (Realtek RTL8821CE)

According to this post, the problem could be solved:

sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x *.sh
sudo ./dkms-install.sh
reboot


How can I resize pictures in foot or inch units?

Image files like jpeg or png store discrete pixels only. How long 10 pixels are is purely a matter of convention or use. If you diplay the pixels on an old 70 dpi monitor, 10 pixels are 1/7 inch. If you print the pixels on a high resolution 1200 dpi printer, the 10 pixels are a mere 1/120 inch long.

So before you can talk about resizing in terms of real world lengths like foot or meter, you need to fix (fake) a resolution.

Then there are still two ways to resize. Just pretend them to have a different resolution. Or have a program like ImageMagick compute a different number of pixels pretending they keep the resolution. In the end resizing always means to change the number of pixels, whether you do it explicitly or your display or print program does it under the hood to fit the original number of pixels into a given frame size.


Wubi doesn't work on UEFI systems that use GPT disks. Every new computer with Windows 8 has a UEFI boot, because that's the only thing that supports secure boot. It works fine with Windows 8 if you boot with BIOS.

There's no practical workaround at this time, other than waiting for a fix from Canonical's Ubuntu installer team. The amount of effort required to switch to a legacy BIOS boot and replacing the GPT disk with a MBR partition table setup would negate the whole point of Wubi: to easily install and remove Ubuntu from Windows (for trial purposes).

Anyway, Wubi support was officially dropped since 13.04 and is no longer an supported install option for Ubuntu: Intention to drop Wubi from 13.04 release.


seems my perl was broken, after sudo apt-get install --reinstall libperl5.26 I was able to run wget -qO- "https://yihui.org/gh/tinytex/tools/install-unx.sh" | sh and install worked.


Grub rescue no such device, also cannot access BIOS

Using the awesome guide of drs350 in ubuntuforums.org (kudos to him) you can boot up your live CD and even install Ubuntu from the grub rescue> prompt. Here the exact steps:

Preconditions

This procedure will work for:

Ubuntu family releases using Grub 2
Malformed Grub 2 menu (grub.cfg)
Missing Linux kernels & initramfs images
Corrupted system folders (not including the module folder)

In order for this procedure to work, you must:

Have an Ubuntu family Live CD ISO image on a partition accessible from the Grub rescue prompt.
Grub modules from a previous installation must be found and properly loaded.

The procedure will not work for:

Missing Grub 2 modules (normally in /boot/grub or /usr/lib/grub/i386-pc )
Corrupted Ubuntu ISO images
Corrupted partition structure - "ls" returns only "(hd0)"

Boot Procedure

Download the ISO.

Download an Ubuntu ISO from: http://www.ubuntu.com/desktop/get-ubuntu/download
or
Download an Ubuntu Netbook ISO from: http://www.ubuntu.com/netbook/get-ubuntu/download

Locate the Ubuntu partition and the folder containing the Grub modules.

The Grub folder containing the modules must be located so the correct modules can be loaded. This folder would have been created during the initial installation of Ubuntu and should be located in the Ubuntu partition. This folder would normally be located at either (hdX,Y)/boot/grub or (hdX,Y)/usr/lib/grub/i386-pc

Find your existing Ubuntu partition and the module folder.

ls                               # List the known drives (hdX) and partitions (hdX,Y)
ls (hdX,Y)/                      # List the contents of the partition's root
ls (hdX,Y)/boot/grub             # Normal location of the Grub 2 modules.
ls (hdX,Y)/usr/lib/grub/i386-pc  # Alternate location of the Grub 2 modules.

ls - should return all known drives (hdX) and partitions (hdX,Y)
ls (hdX,Y)/ - should show the contents of the root directory of the partition.

If you get an "error: unknown filesystem" this is not your Ubuntu partition; more on that later.
If this is the Ubuntu partition, you will see the Ubuntu folders, including lost+found/, home/, boot/ and vmlinuz and initrd.img. Use this address as the first part of the next command.

ls (hdX,Y)/boot/grub - should display several dozen *.mod files. This is the folder you are looking for.

If you don't find the modules, try the alternate location: ls (hdX,Y)/usr/lib/grub/i386-pc

Load the modules.

set prefix=(hdX,Y)/<path to modules>

This command must correctly point to the folder containing the Grub modules. The address should be the one in the previous section which displayed the modules.
Examples:

set prefix=(hd0,5)/boot/grub
set prefix=(hd1,1)/usr/lib/grub/i386-pc

Load modules:

insmod linux
insmod loopback
insmod iso9660
insmod fat        # If ISO is located on fat16 or fat32 formatted partition.
insmod ntfs       # If ISO is located on an NTFS formatted partition.
insmod nftscomp   # If NTFS compression is used on the partition. Load if you aren't sure.

A "file not found" error means that the path in the prefix is incorrect or the specific module does not exist. The prefix setting may be reviewed with the set command. Rerun the "set prefix=" command with the proper path.
Locate the Ubuntu ISO file.

Using the same combinations of ls commands, locate the Ubuntu ISO image.

ls (hdX,Y)/

You are looking for contents including the ISO, such as ubuntu-10.04.1-desktop-i386.iso
Expand the path if the ISO image is not located in the / folder.
If you receive an error: unknown filesystem you may need to load the filesystem module (such as ntfs or fat. Return to the previous section for guidance.)

Create the loopback device.

loopback loop (hdX,Y)/<path to ISO>/<ISO-name.iso>

Example:

loopback loop (hd1,1)/ubuntu-10.04.1-desktop-i386.iso

Load the Linux kernel and initrd image.

set root=(loop)
linux /casper/vmlinuz boot=casper iso-scan/filename=/<ISO-name.iso> noprompt noeject
initrd /casper/initrd.lz

If the path to the ISO or filename is not correct, the boot will halt at the BusyBox screen and produce a message stating "can't open /dev/sr0: No medium found".

Note: If the ISO file is not in the / folder, include the path in the iso-scan/filename= entry. See second example.

Examples:

linux /casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-10.04.1-desktop-i386.iso
linux /casper/vmlinuz boot=casper iso-scan/filename=/my-iso/ubuntu-10.04.1-desktop-i386.iso

Boot.

That should be it. If the commands ran without any messages/errors, the commands were accepted as entered. It's now time to boot:

boot

Install Ubuntu - From Live CD ISO

Note on Oneiric Daily ISO Installs: The current daily build of Oneiric Ocelot requires login to get to the Desktop. Choosing the default user will not allow use of sudo as no password exists for the user. Select 'Other', then username 'Ubuntu' and leave the password field blank. This will allow the use of sudo to unmount the /isodevice during the installation process.

Installation onto your hard drive is possible from a booted ISO file. A CD is not required. An Internet connection is recommended but not required. Without a connection packages installed from the ISO will not be updated and additional packages will not be downloaded.

Boot to the Live CD Desktop using the above ISO boot procedure.

Note: If you have a large amount of RAM you may be able to use the toram option. This will allow the system to boot into memory and permit automatic unmounting of the isodevice1 during the installation. /isodevice must be unmounted for a successful installation. If /isodevice cannot be unmounted by the installer, the installation will fail unless the user forces its unmounting. This forced unmounting is included in the procedure detailed later in this section.

If you would like to try the toram option, replace the linux line in the above and use this one instead:

linux /casper/vmlinuz boot=casper iso-scan/filename=/<ISO-name.iso> noprompt noeject toram --

If /isodevice can be unmounted by the installer at the prompt, the installation will continue.
If you have insufficient memory (it failed on my system with 3GB) and start the installation, the installer will be unable to unmount /isodevice, the install will fail and the system may freeze. Reboot and complete all the steps in the "Boot Procedure" section. Do not repeat this subsection and continue below.

Open a terminal: Applications, Accessories, Terminal
Unmount /isodevice

sudo umount -l -r -f /isodevice

Start the installation procedure by double-clicking the "Install Ubuntu" icon.

The installation will proceed as would any installation of the same release, similar to the Alternate CD.

The guide continues to a network install procedures, which may not be useful for this specific case, also I can't vouch for it effectiveness, so I'm leaving that part outside my answer.

If the guide needs improvement, feel free to comment. I checked until I could (since I won't break my grub just to test out).

Source:

http://ubuntuforums.org/showthread.php?t=1599293&p=9987717#post9987717


Can't disable lock-screen in Ubuntu Gnome 15.04

The answer is to set the ubuntu-lock-on-suspend flag rather than the disable-lock-screen flag:

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false

This must arise because Ubuntu Gnome is using Ubuntu to handle to the lid-close and locking mechanism which is not what the Gnome utilities/settings are set to handle.


How can I import new songs into my Clementine library?

Open the preferences dialog box through tools menu.

Click on "Music Library" in sidebar of preferences dialog box.

Hare you can add more folders to your music library. Clementine will scan these folders on every startup for new songs and will add them automatically to your music library.


Ubuntu 20.04 cannot keep apps open after resume

This is an issue I remember having on an HP a few years back. This is how I solved it:

Create a file as root named /etc/acpi/lid.shFor example, in a terminal: sudo vi /etc/acpi/lid.sh
Paste the following into the file:

#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi

Make the file executable with: sudo chmod +x /etc/acpi/lid.sh

This should solve your problem.


It seems there's a bug already submitted regarding a related issue.

If that bug affects you or related to you problem help raise its heat so it gets attention.


Ubuntu does not remember Bluetooth setting

gksudo gedit /etc/default/tlp and go to line 5 which should read

RESTORE_DEVICE_STATE_ON_STARTUP=0

Change it to

RESTORE_DEVICE_STATE_ON_STARTUP=1

Save, exit gedit, reboot and see if problem is solved


apt-get does not connect to repository for update

I think you either have lost internet connection, or are working behind a proxy.
Either that or the ppas that you are trying to update have been deprecated.

If you are behind a proxy, this solution works:
How to run "sudo apt-get update" through proxy in commandline?


To upgrade packages with bugfixes in a terminal we need to perfom at least two steps:

update the (apt) cache for packages

sudo apt-get update

upgrade packages

sudo apt-get upgrade

extended upgrades and removal of packages including kernel upgrades (as done with update manager)

sudo apt-get dist-upgrade

We can also combine those commands in a single line to perform similar to the update manager:

sudo apt-get update && sudo apt-get dist-upgrade

Watch out for unwanted package removals before you accept with Y.


I solved this, by using gksudo in desktop files, like this:

[Desktop Entry]
Type=Application
Exec=gksudo /home/kiosk/.config/autostart/serve.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Serve

I dont know why this worked though, if anyone knows, please tell.


How to start remote desktop service in Ubuntu 13.10?

Just click on the Windows button then search for Desktop Sharing.

Enable it from there.


Correct Monitors Not Detected on 16.04 Nvidia or Nouveau

I was able to resolve this by manually setting up my own /etc/X11/xorg.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Acer"
    ModelName      "x183h"
    HorizSync       30.0 - 80.0
    VertRefresh     55.0 - 75.0
    Option         "DPMS"
    ModeLine       "1366x768_60_0" 85.9 1366 1438 1626 1798 768 769 772 795 +hsync +vsync
    Option         "IgnoreEDID" "True"
    Option         "UseEDID" "FALSE"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "ModeValidation"  "NoWidthAlignmentCheck, NoDFPNativeResolutionCheck"
    Option         "ExactModeTimingsDVI" "TRUE"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes       "1366x768_60_0"
    EndSubSection
EndSection


Microsoft Office to Libre Office without change it settings

The only application that is guaranteed to correctly open MS Office documents is MS Office.

You knew that (or you should) when you used it in the first time: you have been storing your data using a closed, proprietary format, managed by a closed, proprietary set of applications.

LibreOffice tries to read MS Office documents the best it can. It uses a mix of reverse-engineering the files and using the published OOXML "standard" to do this, but the conversion is not perfect (and probably it never will be). This is due to complexity of the files, closeness and sometimes different philosophies in the program design (just as an example, background color and highlight are treated in fundamentally different ways in LO and MS Word, and similar things happen to some of the conditional formatting in spreadsheets). Most documents that use VBA (Visual Basic Macros) will not work.

Now, you can try to minimize damage (having the exactly same fonts installed helps a lot, although some of the standard fonts in MS Office are non-free), and LO 5 is reportedly better at it, but in the end, you will not have the exact same document unless you buy and use MS Office.


How do I know which graphics card is being used in a hybrid system?

By default optimus is not supported in ubuntu so you are probably using your intel card if you havent installed bumblebee. if you want to use optimus you can use the bubble bee projects to run particular programs through the nicer nvidia GPU. it uses a virtual framebuffer to reroute the whole thing. Pretty tricky stuff but relatively transparent to the end user.

http://www.bumblebee-project.org/


How would I make a program go back to the start.

response=no
while [[ "$response" != "yes" ]]
do
    echo "Is that all? (Yes/No)"
    read -r response
done

References and advice:

The while command and the read builtin in the GNU Bash Reference Manual.
in general, prefer [[ to [ (although it does not matter much in this specific case, it's a good habit unless you need specifically [)
same goes for quoting variable expansion (more discussion here)


Ubuntu 16.04 dual boot w/ Windows 10 froze completely while using Android Studio. What should I do?

According to the official documentation (https://developer.android.com/studio/index.html#Requirements):

3Gb RAM minimum for IDE and 1Gb more for emulator.

So I think that your system is short. So... how much RAM are you assigning to the emulator?


If anyone is still having this problem (mine was after I upgraded to kubuntu 18.04 from 16.04) here was my fix:

I used ssh to log into my pc remotely (you may have trouble here-sorry) then turned off the X desktop.

$ sudo systemctrl stop display-manager

After that, I installed the nvidia driver:

$ sudo apt-get install nvidia-driver-390

Reboot and it seemed to work.  Hope that helps someone.


update android phone os with ubuntu 12.04

In theory, an Android phone doesn't need a computer to upgrade. In practice, this is usually the case - all I had to do to upgrade was home, menu, settings, about phone, software version, check for updates, apply. (It was something like that, but it's also sometimes a little different by phone as well.)

It should be noted that occasionally, a company will force you to use their proprietary desktop software to upgrade your phone. They will almost certainly distribute their software for only Windows, and so unless it works in WINE or Mono it won't work in Linux. What kind of Android phone do you have?

Also, if you plan on rooting and using a custom ROM, all you need for this is to put the ROM on the micro-SD card in the phone, which can be done on whatever OS you like. Again, it's an entirely phone-contained process after you root. Rooting works on Windows, Mac, and Linux; you need to have the android SDK setup and Mono set up and use SuperOneClick.


Implementation of a slider on appindicator

The sound indicator is not exported from an application. If you create a media-player, you never specify that there are sliders or play-pause buttons, you just say, that the application is a media-player.

Your problem is, that you can not sent the information "I need a slider" to the software which creates the menus. It is not that this software can not create sliders.

For details of the implementation, you can look at the code: bzr branch lp:indicator-sound


How to install GKrellM Background Changer in Ubuntu 14.04?

1) I downloaded the plugin from the link to my Desktop and I extracted it there.

2) In a console:

sudo apt-get install libgtk2.0-dev

It's necessary for compiling with make.

3) Change into the new directory and make:

4) Copy gkrellmbgchg.so to ~/.gkrellm2/plugins:

5) Close and launch GKrellM and, in its Configuration Options -> Plugins, "Enable" "Background Changer". Finally, click in OK:


cannot open libmpfr.so.4 after update on ubuntu 18.04

The package libmpfr4 has indeed been dropped in 18.04

It was replaced by the package libmpfr6.


Why aren't my bold colors displaying properly?

GNOME Terminal version 3.28 (appearing in Ubuntu 18.04) introduces a new configuration option so that the bold attribute doesn’t change to the “bright” counterpart of the color.


You will need to uninstall.  From a Unix & Linux post, the concept is backup before upgrade/updating anything.  There is no real undo action without having a bash script made.  In the future, back everything every time before updating, period.


Modifying common keyboard shortcuts in Ubuntu [14.04]

Step 1:     Download Autokey from either the Ubuntu Software Center or use the terminal:

sudo apt-get install autokey-gtk

Step 2:     Open Autokey (search AutoKey in dash menu)

Step 3:     Create a New Top-Level Folder from File ► New ► Folder

Step 4:     Select Folder and create New Script from File ► New ►Script

Step 5:      In the "# Enter script code" enter keyboard.send_keys("shortcut you desire to imitate")

Examples

keyboard.send_keys("<ctrl>+<v>")
keyboard.send_keys("<ctrl>+<c>")
keyboard.send_keys("<ctrl>+<s>")

Note : repeat Step 4-5 for each hotkey you want to add

Step 6: Click on the second set on the Hotkey and set your hotkey

Step 7: Save and test them out.It should work now.

Extra Stuff

Enable automatically start Autokey at login (Edit ► preferences ► general) , clear the special hotkeys (Edit ► preferences ► Special Hotkeys) and we are done.


I suspect that you're looking for either of the following two:

How can I have a dash-like search under Xfce?
How do I get this Mac OS X exposé behavior?


See here. You are forgetting to add "sudo" since you are using the root user to login into MySQL.

sudo mysql -u root -p

Tested on Ubuntu 18.04 with MySQL Version 14.14 Distribution 5.7.25.


How to get OpenSSH to use ksshaskpass under KDE?

I don't know the internals so to explain why in GNOME it works and in KDE it doesn't, but I can suggest a solution.

Define a function like the following in your ~/.bashrc:

ssh() {
    if ! ssh-add -l &>/dev/null; then
        ssh-add </dev/null &>/dev/null
    fi
    command ssh "$@"
}

i.e., if the agent has no key stored already (! ssh-add -l), then call it with input from /dev/null: this is to convince ssh-add has no terminal, and force to ask the password with a GUI window.

You could set the SSH_ASKPASS environment variable to point to a different application to ask for the password.


How to change the kernel to boot in GRUB?

SET GRUB_DEFAULT=0 is for all intents and purposes an index number indicating the first entry.

If your intent is to modify an existing entry to use a different kernel you can edit /etc/boot/grub/grub.cfg find the appropriate line and adjust for example:

linux   /boot/vmlinuz-3.13.0-86-generic root=UUID=03a31723-1f61-4bae-ae5d-403cd35d0adc (and etc)

and change the vmlinuz-x.xx-x-xx-blahblah bit to point to your existing preferred kernel.

The above is a bit of a hack though and might break at the next update. (I've done such things on flash drives booting ISO's that never change and never update grub on them.)

If your intent is simply to select a kernel already on the grub menu as default, I think you'll find the powerful grub customizer by Daniel Richter quite useful.

You can right click on a kernel entry in the list configuration and choose to move it up or down or edit it.

On the General Settings Tab, You can easily select and set the default entry by name from the list of predefined entries (as you indicated in your question.) See the image below for an example:

Save your changes and reboot and enjoy your new default boot entry.


I have a tatadocomo 3G data card my dmsg output also looks similar to this. My data card was detected by network manager but I was not able to connect to internet anyhow.

But now I am able to connect to internet with sakis3g. I think this may work for you also.

Sakis3G is a tweaked shell script which is supposed to work out-of-the-box for establishing a 3G connection with any combination of modem or operator. It automatically setups your USB or Bluetooth™ modem, and may even detect operator settings. You should try it when anything else fails!

Download  sakis3g from here
Extract it to desktop
Open terminal and run

cd Desktop

sakis3g

then an interactive window will come then

select > connect to 3G
select > USB device
select > ZTE WCDMA Technologies MSM
select > interface #3
give apn: tatadocomo3g
username: TIM | password: TIM

this is how I connect my 3g modem with sakis3g as explained here

you have to enter your apn,  username, password w.r.t your connection  you have


arctic p311 bluetooth headset crappy sound

It looks like it is still not possible currently in Ubuntu or Linux in general, though it should be.


When I tried the Live CD, my multiple monitor setup worked. After I installed, it didn't. What gives?

On the LiveCD you were using the free Nouveau driver. Generally worse performance but you do get KMS and xrandr works.

But now, you're probably on the closed source driver which does offer better performance (especially in 3d) and better power settings and scaling. All you need to do is run nvidia-settings (there's probably an entry in the dash) and edit your settings from within there.

If it's not installed, just search for it in the Software Center.


Installing CUDA purges previous NVIDIA driver installation

This is for standalone desktop with nvidia graphics. If you wish to retain your existing driver, download the 7.5 CUDA deb from nvidia, during install, deselect driver option otherwise your existing driver would get over written. Make sure to do the bash entries as described in the nvidia manual. if you have the driver installed, make sure to install nvidia-modprobe and reboot or else CUDA will not see your driver install.


Execute a script upon logout/reboot/shutdown in Ubuntu

How to do it with systemd
If you find this thread after June 2016, Ubuntu and its derivatives including Mint will be using systemd to control system initialization and shutdown. I had problems with the old approach so researched the systemd way.
With systemd you create one or two files to call your scripts using the templates below, and execute a command.  Simple.

GUI Version
First create the scripts you want to run at startup and/or shutdown.  I created .scopening_atstart and .scfullcopy_atend.
Then make sure that they are both executable by right clicking the file, selecting properties and making sure that, under permissions, you have ticked Allow executing file as a program.
The two files I created populate and save the contents of a ramdisk. They also create a file in my home directory to prove that the service is working. They were of the form:
#!/bin/sh
cp -pru /home/john/zRamdisk/subdirectory1/* /home/john/.wine/drive_c/subdirectory1/
rm /home/john/stop_time
date +%D' '%T > /home/john/stop_time

Then I opened my file manager as root, opened /etc/systemd/system and created a file startup.service and a file save-ramdisk.service.  Obviously you can choose your own names and generic names could have included a startup file called johns_start.service and a shutdown file called johns_shutdown.service.  Just don't pick existing service names.
[Unit]
Description=Startup Applications

[Service]
Type=oneshot
RemainAfterExit=false
ExecStart=/home/john/.scopening_atstart

[Install]
WantedBy=multi-user.target

and
[Unit]
Description=Save Ramdisk to Wine drive C

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/home/john/.scfullcopy_atend

[Install]
WantedBy=multi-user.target

You can use the same service files, substituting the full path of your executable script for mine.
Finally for each one execute the command systemctl enable your_files_name (but without the suffix service). So my first one was systemctl enable startup
Reboot the computer once to start the services.  The start service will be executed whenever systemd enters the multi-user target and the stop service when it exits the multi-user target.  Alternative service files with different activation conditions will be described below.

CLI (Command Line) Version
This description assumes that you operate from your home directory rather than /home/john, use sudo as needed, and your choice of editor where I write vim or svim.
Create startup and shutdown shell scripts with the first line #!/bin/sh and make them executable using chmod +x my_new_filename.
Create two files as above, or in this example, one file to handle startup and shutdown tasks.  I will execute scripts in my home directory but @don_crissti showed some alternatives at Stack Exchange.
svim /etc/systemd/system/start_and_stop.service

and copy in the file content:
[Unit]
Description=Run Scripts at Start and Stop

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/home/john/.startup_commands  #your paths and filenames
ExecStop=/home/john/.shutdown_commands

[Install]
WantedBy=multi-user.target

Then Enable the Service with the command:
systemctl enable start_and_stop

and reboot your system after which the services will be active.  The commands systemctl is-enabled start_and_stop and systemctl is-active start_and_stop can be used in monitoring your new services.

Changing the Trigger Conditions for Shutdown
The files above all use the open or close of the multi-user environment to initiate running the scripts.   The file below uses the beginning of four potential shutdown processes to initiate its scripts.  Adding or removing the targets on the Before line + the WantedBy line will let you make finer distinctions:
This file was proposed in an answer at Unix & Linux by @Matthias but I was unable to get it to run until I added an Install section.
Again, edit the script in /etc/systemd/service/ and enable it using systemctl enable your_file_name.   When I changed the targets I used the systemclt disable file_name command and then re-enabled it which symlinked it to the target directories. Reboot and the service will be operating.
[Unit]
Description=Do something required
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target
# This works because it is installed in the target and will be
#   executed before the target state is entered
# Also consider kexec.target

[Service]
Type=oneshot
ExecStart=/home/john/.my_script  #your path and filename

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

Debugging
I recently (2020) did a little distro hopping, first to KDE Neon where I discovered that although KDE is light on memory, its cpu usage was considerably higher than mint, and then to Fedora 33 XFCE.
With the second, neither of these scripts worked.  So I followed the hints and used systemctl status and journalctl -xe to find the issues.  It turned out that something didn't have permission to run the scripts in my home directory.  I experimented unsuccessfully until I changed the invocation to:
ExecStart=/usr/bin/bash /home/john/.scopening_atstart

This may help someone; but be aware that your system may be using /bin/bash so check your file names and paths.


As you you say you're very new to Unix alike, so I'd give you a simple hint using GUI press Superkey or go directly to Dash on Launcher and type: Startup Applications launch the appropriate icon. When it's opened looks like this:

click Add then Browse and choose the path in a line command to an app you'd like to startup, by default they go to /usr/bin/ for example for psensor it be /usr/bin/psensor choose and press Add you can also name it your way.


Install sysfsutils

sudo apt install sysfsutils

Edit /etc/sysfs.conf (as root), add this line at the end of the file:

/module/bluetooth/parameters/disable_ertm=1

Save changes and restart

Reference:

https://ubuntuforums.org/showthread.php?t=2339212


hardship veiwing PDF and trying adobe reader

Because Adobe Reader for Linux is version 9, and Adobe has already phased out Acrobat/Reader 9, it is no longer accessible through the get.adobe.com site. The information on the Immigration Canada website is also dated (when you click on the download link, you get redirected to the get.adobe.com site).

However, there are third parties which have redistribution rights for Adobe Reader for Linux. Search engines are your friend.


What is wrong with My Apache2 (Alternate) 000-default.conf file

You should symlink your /etc/apache2/sites-available/RecipeCenter to /etc/apache2/sites-enabled/100-RecipeCenter.conf. (The number doesn't matter too much, though the files are included in alphabetical order, so whatever name you choose for the symlink, it should alphabetically come after 000-default.conf.

Apache actually includes vhost config files from /etc/apache2/sites-enabled. It doesn't include sites-available. The structure is made up like this to allow you to easily enable/disable sites by creating/deleting symlinks in /etc/apache2/sites-enabled, without the need to move or remove files.


Which program am I using to lock screen?

This might not detect all screensavers but it worked for me:

ps -ef | grep 'screensaver'


These symptoms seem very odd. If you think it could be a disc problem, you should try installing from a USB stick. You might also want to download the disc image again because it may have been corrupted somehow.


Communicating between a screen and a script

You should start the screen command before reading from the fifo. This example will list the current directory in screen and the nonexistent path error will be redirected to the fifo.
#!/bin/bash

[[ -p screen.fifo ]] \
|| mkfifo -m 660 screen.fifo

exec 3<>screen.fifo

session=test

screen -ls $session >&- || screen -dmS $session
screen  -S $session \
        -X stuff 'ls \$PWD nonexistent 2> screen.fifo\n' &

while IFS= read -r -u 3; do
echo REPLY: $REPLY
done

You can also use tee to write to both screen and the fifo:
#!/bin/bash

[[ -p screen.fifo ]] \
    || mkfifo -m 660 screen.fifo

session=test

screen -ls $session >&- || screen -dmS $session
screen  -S $session \
        -X stuff "printf '%s\\\n%s\\\n' hello world | tee screen.fifo\n"

text="$(cat < screen.fifo)"
echo "$text"


Enable disk encryption after installation

If you want to enable encryption of your home folder you will need  to install and use these packages: ecryptfs-utils and cryptsetup. Also you will need another user account with administrator (sudo) privileges. The full documentation is here:

How to Encrypt Your Home Folder After Installing Ubuntu

If you want to enable full disk encryption after installation, the short answer for now is probably: no, you can't. Anyway, if you are interested about this, your question is duplicate of:

Is there a way to do full disk encryption after the install?
Full disk encryption


What is the 'bizcom' logo that's appeared following my upgrade?

It turns out that this is related to a Plymouth theme, and I was able to revert it, though I'd like to know the history of this "bizcom" thing.

In the past, I changed plymouth themes, and I'm guessing there must have been a configuration fallback with the upgrade that gave me the "bizcom" image.

The image is part of the "glow" theme.  (I discovered this through a combination of Google searches and manually going through plymouth image directories with 'Eye of Gnome').
The "throbber" images, e.g., /lib/plymouth/themes/glow/throbber-19.png match the image I was seeing.

I followed the suggestion from this question,
How do I change the plymouth bootscreen? , and ran
sudo update-alternatives --config default.plymouth

I changed the theme to /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth and the strange bizcom logo disappeared, and I have the expected Ubuntu branding back.


snap package nano-editor not visible on ubuntu core

It's because the nano-editor package uploaded by rws was only built for amd64 architecture, and not the arm based arch the pi uses.

I emailed the maintainer of the package and asked them to upload an arm build too.


Empathy icon not displayed in gnome panel

Solved. These are the steps I followed:

Quit Empathy if it is running.
Launch Empathy. Then, Edit -> Preferences -> Notifications. Uncheck the "Show incoming messages in the messaging menu" box.
This will put up the Empathy bubble notification icon in the panel.

The process will work irrespective of whether you have the Indicator-Applet added to your panel or not.


USB Wi-Fi Netgear WNDA3200 "Unable to allocate URBs" error

In Ubuntu 12.10 "Unable to allocate URBs" error disappeared and Netgear WNDA3200 is working fine.


Prevent Skype resolvers getting your IP on Ubuntu

Type the following command:

gedit ~/.Skype/YourSkypeName/config.xml

Search for <Account> and add in that section:

<PrivateSkypeMode>1</PrivateSkypeMode>


Is MaaS, juju, or the charm responsible for ssh-keygen on nodes?

MAAS will make sure /you/ have access to each node by adding the key that Juju tells it (and that key is only your public-key). Units do not have SSH access to themselves by design (think of the security implications!).

If you wanted to make it so that all units or services can access each other you need to have each machines generate an SSH key for the user you wish to interface then send their public ssh-key to each other via the relation. So if this is for a master -> slave setup here is how you would do something like that:

master-charm/metadata.yaml

name: master-charm
provides:
  master:
    interface: my-charm-interface

slave-charm/metdata

name: slave-charm
requires:
  master:
    interface: my-charm-interface

Then in each charm, you'll need to do something like the following:

(master|slave)-charm/hooks/master-relation-joined

#!/bin/bash

if [ ! -f ~user-you-want-access/.ssh/id_rsa ]; then
  ssh-keygen -t rsa -N "" -f ~user-you-want-access/.ssh/id_rsa
  chown -R user-you-want-access.user-you-want-access ~user-you-want-access/.ssh
fi

relation-set public-key="$(cat ~user-you-want-access/.ssh/id_rsa.pub)"

(master|slave)-charm/hooks/master-relation-changed

#!/bin/bash

key="$(relation-get public-key)"

if [ ! -z "$key" ] && ! grep -q "$key" ~user-you-want-access/.ssh/authorized_keys; then
  echo "$key" >> ~user-you-want-access/.ssh/authorized_keys
  chown -R user-you-want-access.user-you-want-access ~user-you-want-access/.ssh
fi

These are just meant to stub out how you would model something like this. You could do the same thing for access between nodes themselves using the peer relations.


18.04 Touchpad only working in center area Lenovo P50

In case anybody else has this issue...the fix was to manually install the synaptics driver. was not installed on ubuntu 18.04 during minimal installation option.

solved


Headphone not working Ubuntu 14.04.2 LTS - ASUS K55VM

I had a similar problem with ubuntu 12.04 I solved it by turning of my computer removing the battery and hold the power button for 5-6 seconds to remove any charge from the capacitors and it seemed to work for me. Maybe it's not that but it's worth a shot.


Is the terminal named "?" the grandmother of all processes?

The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes.  The steps are described in  Linux kernel documentation:

  Operation

  When using initrd, the system typically boots as follows:

  the boot loader loads the kernel and the initial RAM disk
  the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
  if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
  mechanism” section below.
  root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
  /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
  init can do).
  init mounts the “real” root file system
  init places the root file system at the root directory using the pivot_root system call
  init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
  the initrd file system is removed

Note also that ? indicates it is a daemon. To quote daemon(7) man page:

  A daemon is a service process that runs in the background and
         supervises the system or provides functionality to other processes.


You need to add a directive like this to the config file. Adjust for your LAN ip range and server IP.

route add 192.168.1.0 mask 255.255.255.0 gw 192.168.1.2

Then restart the server.


Which device drivers are built into the kernel?

Core drivers that are considered critical to the loading of the kernel are usually built into the kernel, while other hardware drivers, etc. are built as modules or .ko files.

The .ko modules are usually stored under the /lib directory on your root partition. To use any of these, the kernel must first be able to detect and access the underlying storage device and then access its filesystem. So it's safe to assume that a kernel without SATA/SCSI and ext2/3/4 support built-into it won't really boot ;)

You can choose to switch most built-in kernel drivers into module form. The Ubuntu kernel team decides whether to modify the Linux kernel team's default configuration and include/exclude additional built-in drivers for the stock kernel images you download.

If you build your own kernel, you can do the same:

In the above screenshot, the * indicates a built-in driver, while M indicates a module.
Loopback device support, which is often essential to booting a system, is built-in by default.
The low-speed USB driver (USB 1.0) is also built-in by default to allow you to boot off a USB stick, but here I have changed it into a module.


How to remove existing partition that used to be primary installation?

One option is not to delete it at all. I shuffle partitions regularly, and when I'm done copying, I boot into a livecd, run gparted (a gui partitioner), and resize my nearly empty partition to as small as it will go... you can either resize one or more of your other partitions to recover the space, or allocate the spare space to a new partition.


How to update Ubuntu (and the kernel) without updating Grub's configuration

Short answer is that you can't (that I'm aware of), unless you know the intricacies of how to manually edit the grub configuration and list files that it uses for booting, however if your goal is to preserve the current state and version of grub and the grub.cfg (including the list of options for Grub to boot from) you ultimately can't achieve your update goal.

Updating the kernel means you need grub to identify the new kernel when you boot, in that it has to specifically say "Use this kernel instead of that other kernel." during the boot process.

There's no way around that (that I'm aware of), because if you don't update grub, you will never boot to the new kernel.


How do I stop the screensaver from coming on during VLC movie watching?

Open VLC Media player and go to Tools -> Preferences (Shortcut key is CtrlP)
Select All from Show settings in the bottom-left corner of the Preferences window .
Now click the Video Tab on the side.
Now tick the Disable Screensaver box and click save.


Resolve dependency errors while installing libmotif

After much research, I finally decided to create a custom Ubuntu ISO with all the libraries required pre-installed on the ISO, using Cubic.

This way , the user could just install the new ISO and all the libraries , software would be pre-installed . This would not bring up any more dependency issues.


As you said, doing a fresh install of Ubuntu 19.04 and creating a new partition table will fix the issue.


Changing the background of the login screen changes the design of the login screen

I figured out what the problem was. The problem is with lightdm in the sense that it changes the design of the login screen into the old layout. I believe the correct method was to just follow the answer at How do I change the login screen in Ubuntu 16.04+? and follow the unity-greeter settings and not install lightdm-gtk-greeter-settings.

Also, once unity-greeter has been suitably configured, the following command had to be executed in the terminal.

sudo apt purge lightdm-gtk-greeter lightdm-gtk-greeter-settings


There are a number of companies out there who sell printed DVDs of Ubuntu and other distributions, just a "buy ubuntu dvd" in Google away. Some won't ship there, I'd be surprised if you couldn't find any.

But there are few places in the world where you're the only Ubuntu user. I would suggest looking to the local Loco: the Ubuntu Sri Lankan Team. Get in contact and explain your problem. I would be surprised if somebody couldn't help you out by either bleeming you out a DVD or putting you in contact with somebody who sells them.


The document you linked doesn't count the table of contents, the toc is numbered in roman numerals and then the pages start with number 1. If you use evince, it shows both real count as the "pdf count":


Make sure you have done the standard checks to ensure the problem is with your device:

move computer closer to the router (if possible)
disable ALL other devices connected to the network (except the router)
restart the router
try connecting via Ethernet cable (if possible)

I know they are frustratingly mundane but they are worth checking anyway to get a picture of where the problem starts (from personal experience, I have a laptop which can knockout all other devices on the network for example, and interference is occasionally a problem)

Please could you give details on:

What you refer to when you say "doesn't work"; at what point in the process of connecting to the network does it fail? Can you see your home network in the list of networks, can you select it and get to the point of entering the wireless password (assuming it is secured), do you get a specific message telling you it cannot connect or does it appear connected to the network but you have no internet/network traffic?
The wireless hardware you are using. I'm no expert but opening terminal (ctrl + alt + T) and typing sudo lshw -C network (then your password when prompted) should give you details of your network devices. Are you using an internal wireless card or a USB wifi dongle?
What computer you are running 13.04 on (is it a laptop or PC)
If you can, give details of the router you are communicating with (there can be issues with different versions of wireless interfaces 802.11b/g/n)


Is there any way to see overall Ubuntu One sync progress?

You can install the Ubuntu One Indicator Applet. Just run :

sudo add-apt-repository ppa:rye/ubuntuone-extras
sudo apt-get update && sudo apt-get install indicator-ubuntuone
/usr/lib/indicator-ubuntuone/indicator-ubuntuone

See also: http://ubuntuforums.org/showthread.php?t=2042684

This didn't work for me so well, but maybe it works for you.


Gnome 3.10: Can I get the old system status menu back without downgrading?

Open Terminal & type this

sudo apt-get install gnome-session-fallback

If you just want to disable extensions then refer this post


How to choose the paper size in LibreOffice?

Click on Format --> page, and you can get it done that way.


Where can I find Cinnamon/GTK border theme named "Simple" from Mint 17.3?

Turns out this was a Metacity-only theme :/


Pin tabs in default web browser on Ubuntu Touch

Sorry, but it seems there is currently no option to pin any tab in the default web browser on Ubuntu Touch. You only can bookmark pages.


"Unable to mount Android, Error initialising camera: -60: Could not lock the device" when connecting a Samsung Galaxy S2 via MTP

I found that when I was plugged into a usb 3.0 port I got the following messages:

usbfs: USBDEVFS_CONTROL failed cmd gvfs-gphoto2-vo rqt 33 rq 102 len 0 ret -71

But when I plugged into a usb 2.0 port it worked.


Will pygobject for Python 3 be included in 11.10?

Yes, the launchpad page for pygobject shows that 3.0.0 is in Oneiric, and that there is a python3-gobject package available for it.


Delete 'N' no lines only on the Nth occurrence of a pattern in a file using the sed/awk command

To delete the second test and the line that follows it:

$ awk '/test/ && ++f == 2 {getline;next} 1' file.txt
test
apple
mango
carrot
test
banana
gauva

How it works:

/test/ && ++f == 2 {getline;next}

Every time we meet line matching the regex test, we increment variable f and, if f==2, we read in another line with getline and then jump to start over on the next line.  This has the effect of discarding both the test line and the following line.
1

For all other lines, we print the line.  (1 is awk shorthand for print-the-line.)

Alternate

In this approach, we capture the line number of the second occurrence of the line matching test in the variable N.

We print a line only if N is not yet assigned or else if the current line is at least 2 lines after line number N.

$ awk '/test/ && ++f == 2 {N=NR} (!N) || NR>=N+2' file.txt
test
apple
mango
carrot
test
banana
gauva


Ubuntu 14.10: cannot find 25_custom in /etc/grub.d

So it seemed that Boot Repair is creating the 25_custom file. This file does not get created when installing 14.10, so in order to create the boot theme, a small change to the tutorial needs to be made.

After some testing I found out how to fix it by grepping on the string "class windows"

It showed that in etc/grub.d/30_os-prober are two entries with the string class windows. If you change the second one (which also has osprober-efi as a string that the other doesn't), then you'll change the boot title of windows. It used to show up as "Windows Boot Manager" and I changed it to "Windows". Here is what I actually replaced in the 30_os-prober file.

It used to be: '$(echo "${LONGNAME} $onstr" | grub_quote)'

I replaced it as: '$(echo "Windows" | grub_quote)'


Do I need to act on "Tomcat6 APR based Apache Tomcat Native library not found"?

Tomcat native library is a native (non-java) library that can improve the performance of Tomcat in some situations.

This is only hint. You can ignore it.

However, if you want to try it you can install it via:

sudo apt-get install libtcnative-1


My Ubuntu screen is in full zoom and it is all white screen

from the comments, it is observed that you have changed these two

Bightness to High
Contrast to High

Assuming you are with GNOME

these two changes can be controlled with command line,

the default values are,

for brightness:

org.gnome.desktop.a11y.magnifier brightness-red 0.0
org.gnome.desktop.a11y.magnifier brightness-green 0.0
org.gnome.desktop.a11y.magnifier brightness-blue 0.0

for contrast:

org.gnome.desktop.a11y.magnifier contrast-red 0.0
org.gnome.desktop.a11y.magnifier contrast-green 0.0
org.gnome.desktop.a11y.magnifier contrast-blue 0.0

So, logon to any console by pressing Ctrl+Alt+F2 or F3 or F4 etc..

then run the below commands to reset the values to default and then reboot.

gsettings set org.gnome.desktop.a11y.magnifier brightness-green 0
gsettings set org.gnome.desktop.a11y.magnifier brightness-blue 0
gsettings set org.gnome.desktop.a11y.magnifier brightness-red 0
gsettings set org.gnome.desktop.a11y.magnifier contrast-green 0
gsettings set org.gnome.desktop.a11y.magnifier contrast-blue 0
gsettings set org.gnome.desktop.a11y.magnifier contrast-red 0


Can't find wired connection option on Ubuntu 18.04

Looks like you have to install the pppoe package first, then you need to run some commands via CLI to make it work.

Basically, you have to create a new entry on NetworkManager with the nmcli utility.

See the answer to this question for the procedure (it's for 17.04 but should work on 18.04 too).


Install Ubuntu on PC with Windows XP Home and Professional

You may install Ubuntu by choosing something else and then shrink your ntfs partition to 20 GB and create ext4 partition from 20 gb free space mounted at root (/), then install. It will work like charm.


The (actual) issue here is that you have duplicate entries of the Google Chrome repos and are using repos from raring and lucid.

Start by opening up /etc/apt/sources.list, and you should see an entry for archive.canonical.com. Change the raring there to trusty. You should also see an entry for plex.r.worldssl.net. Unless you have it set to lucid for a very good reason (also assuming that you can still use the packages from that repo), change that to trusty.

Finally, you might see two entries for dl.google.com; if not, check to see if there are any files related to Google in /etc/apt/sources.list.d/. Remove one of the two entries. If there is one entry in /etc/apt/sources.list, and a Chrome-related file in /etc/apt/sources.list.d/, remove the one that's in /etc/apt/sources.list.

Run sudo apt-get update now.


Is an ordinary CD (like for music downloads) ok for downloading Ubuntu or do I need a DVD disc?

You can install Ubuntu 12.04.4 LTS from a CD. Please see here: http://www.ubuntu.com/download/desktop/install-desktop-long-term-support


Configuration is mostly done with text files in /etc/nut.  The example files provided are well documented, and should include a full set of files.  I deploy the following:
 - nut.conf (all systems) - standard startup mode script, now checked by Ubuntu
 - upsmon.conf (all systems) - controls which ups to monitor for power failure
 - upssched.conf (all systems) - controls scheduled activities based on events
 - upssched-cmd (all systems) - command script run by upssched.conf (see below)
 - upsd.conf (NUT servers) - controls network access for the server
 - ups.conf (NUT servers) - controls which UPS(s) get monitored
 - /etc/default/nut (Debian based systems, including Ubuntu) - controls which programs are launched on system reboot.

If you have multiple systems on one UPS you will need to decide if files need to be modified per system or type.  nut.conf will at should be different for clients and NUT servers. The NUT server configuration files need to be done per server.  upsmon.conf needs to indicate which UPS(s) to monitor and use to trigger a shutdown.  Seen the man pages and/or documentation.

You can configure and control your UPS with the nut-cgi package which provides a web based interace via http://localhost/cgi-bin/nut/upsset.cgi.  I use upstats.cgi to  monitor the UPS.  You can use the supplied templates, or modify them to suit. It requires the following files:
 - hosts.conf - which hosts to report on
 - upsset.conf - indicates you have secured your server and wish to enable upsset.cgi

For on-line configuration, I have had success with knutclient.  It provides a nice interface to monitor and configure your UPS.  Once the configuration is done, it is rare you need to use it.  The NUT site lists other tools under Related Projects.

I wrote the following script to dump load shortly after a power failure (Don´t trigger them on the monitoring server.  I don't use it any more, but may give you an idea how to do it.

#!/bin/bash
# /etc/nut/upssched-cmd - Run scheduled commands

case $1 in
    apc1-on-batt)
        /sbin/shutdown -h now +0
        ;;
    belkin-on-batt)
        /sbin/shutdown -h now +0
        ;;
    *)
        logger -t upssched-cmd "Unrecognized command: $1"
        ;;
esac

# EOF


If you follow this guide: http://www.srcds.com/db/engine.php?id=1098643920

This guide should guide you through the installation part. You shouldn't have to install srcds as root.

(The chmod +x hldsupdatetool.bin is the important part)


Have you tried to uninstall tlp? Maybe gdm3 display manager is broken. You could try to install other display manager.

Press Ctrl+Alt+F2 simultaneously (You could press Ctrl+Alt+F7 to go back)
Log in
$ sudo apt purge tlp
$ sudo reboot
If did not help, try
$ sudo apt purge gdm3 (if gdm3 is installed)
$ sudo apt install lightdm (it could prompt to select display manager by default if there are a few of them)
$ sudo reboot

Also, you could search for proprietary video card drivers. Maybe tlp could not work with your default video drivers.


URLs from applications are not opened directly, but downloaded and then opened

I recently have a similar problem I managed to fix it by changing default browser.

Remember to do it through the settings not from the browser it self


How can I sort packages by ratings / downloads in Ubuntu Software Centre?

I don't think it's possible at the moment. Additionally, in my USC, ratings only appear in the software list when I click on a single application.


Ubuntu, and Linux in general, are virus-resistant by design in at least two ways:

Fragments of Windows executable code (viruses) don't natively run on Linux. The system call method differs.
Linux/Unix does protections/permissions differently from Windows, so the execution of an evil script by a user can only harm the user executing it, not the system. Viruses want to harm the system.

You can get Anti-virus programs for Linux, but they are used for checking E-mail for Windows viruses (e.g. on mail servers).


Ubuntu 16.04 Installation: Crashes during boot

The following instructions went well for me:

How to install Ubuntu 16.04 64-bit on a new PC

Insert a USB key, larger than 2GB
Format the USB with FAT32: Spotlight > Disk Utility > ms-FAT + GUID
Write the ISO file to the USB key with unetbootin
Boot the target PC from the USB key in UEFI mode
Select Install Ubuntu, adding the following boot parameters (next to quiet splash):  pci=noaer pci pcie_aspm=off
During the installation choose Erase disk and install Ubuntu 16.04 and choose to install updates during installation (requires internet access)
When installation completes, reboot and then add the additional boot parameters mentioned in step 5 to the line beginning GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub:

sudoedit /etc/default/grub

find the line and enter the additional parameters between the double quotes, separated by spaces, alongside quiet splash (order does not matter). Finally, the line should look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer pci pcie_aspm=off"

Save and exit, then run

sudo update-grub

to write the changes to GRUB's startup script.


You type this into your terminal this to see the running devices.
If it's not seen there, it's definitely a driver issue.
If you're trying to disable the driver, do this :

xinput list

It'll list the running devices.  You can disable it by

xinput disable [devicename/ID]

The devicename is something kinda like ETPS/2 Elantech Touchpad, but I find disabling it by the device ID easier.

Note: This will be re-enabled after a system restart.  It's good if you plan on re-enabling it sometime soon, but not necessarily right now.
(I sometimes carry a small book on my computer... I disable the keyboard temporarily since I don't use it, because who wants a tiny book repeatedly smashing the 'k' key?)

Here's some more information on xinput if you have any other questions about how to use it.

The reason why it possibly not show up, or possibly may have an error is most likely that it's possibly not supported by the kernel yet, or some sort of driver error.

There is a similar issue noted here which completely fixed their similar issue.  The person on the other thread had specific drivers to fix their touchpad, however.

Focaltech touchpad drivers
Other information on related bugs with Focaltech

(To spare you scrolling time, it was fixed in linux-generic-lts-wily package.)

If there's something that I missed, comment and I'll respond as soon as I can.


did you try after sharing to right click the parent folder, go in permissions tab and click on apply permissions on contents?

Hope it helps


how to use "update-alternatives" to manage multiple installed version of the same app

I've found how to do that. At first I checked out default path of  npm which is older version (1.3.10) in /usr/bin/npm , I noticed that it's a symbolic link to  /usr/share/npm/bin/npm-cli.js I removed it

    sudo unlink /usr/bin/npm

Then I tried following command

   sudo update-alternatives --install /usr/bin/npm  npm /usr/local/bin/npm 10
   sudo update-alternatives --install /usr/bin/npm  npm /usr/share/npm/bin/npm-cli.js 20

Now I can easily switch between them using

  sudo update-alternatives --config npm

It works well


Decrease Windows partition and increase Ubuntu partition data loss?

Only use Windows partition manager to reduce the size of that partition.  Windows 8 (and probably windows 7) will shrink its partition while the operating system runs, and ensure that there is minimal data loss.  There is always a possibility that this will not work, so backup what you need to.

GParted can be used to increase the size of, or add a partition to, your Ubuntu system.  You will probably need to boot from a live CD (or USB) to be able to perform this task, and it does take a goodly amount of time to complete.  After booting from the USB, open a terminal and type

sudo apt-get install gparted

which will install gparted onto your USB.  You can then run the program from the USB to dismount the HDD Ubuntu partition, resize it, and remount it.


What causes Ubuntu to become randomly laggy and not fix until I restart?

After more investigation, I concluded that the error is some incompatibility with the kernel 3.x, I had the same error in Fedora Live, Ubuntu Live...

Solution

I don't have the time to troubleshoot this issue and play with th system until it works fine, so I installed Debian Wheezty which uses Kernel version 2.x.

Edit

Without noticing it, I was using the wrong power adapter for my computer (65W instead of 90W). One day my computer was lagging and I removed the card that goes to the wall from the adapter, leaving the adapter connected to the computer and suddenly the computer works fine again, this is when I started suspecting the adapter.


How to let non root user take ZFS snapshot?

It seems zfs allow support was added as a feature in (the still not released) ZoL 0.7.0.

Judging from the names of the installed packages (why can't you just do zfs --version?):

# dpkg-query --list | grep -i zfs
ii  libzfs2linux                                0.6.5.6-0ubuntu14                             amd64        Native OpenZFS filesystem library for Linux
ii  libzpool2linux                              0.6.5.6-0ubuntu14                             amd64        Native OpenZFS pool library for Linux
ii  zfs-doc                                     0.6.5.6-0ubuntu14                             all          Native OpenZFS filesystem documentation and examples.
ii  zfs-zed                                     0.6.5.6-0ubuntu14                             amd64        OpenZFS Event Daemon (zed)
ii  zfsutils-linux                              0.6.5.6-0ubuntu14                             amd64        Native OpenZFS management utilities for Linux

Ubuntu 16.04 seem to be running version 0.6.5of ZFS on Linux.

That's probably the explanation to why it is not working for me. The error message could've been more explicit imho.


This product release requires the presence of 32-bit compatibility libraries when running on Intel(R) 64 architecture systems

To begin, according to https://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu, Ubuntu has deprecated the 32bit libraries.  Packages for 32bit development are nearly impossible to find.  YOU MUST INSTALL the Intel Compilers for 64bit Intel 64 ONLY.

The intel website and the instructions are for Ubuntu version 14.04.

link: using-intel-compilers-for-linux-with-ubuntu

The rest of this information is provided as it may be helpful but not as an answer to your question.

The downloaded packages are rpm packages for redhat distros like fedora. Ubuntu is Debian based so we use .deb files instead of .rpm(s).

First, do a quick search of what you are looking for using apt-get. Open a terminal and type the following command:

apt-cache search stdc

You will see a whole list of related packages and the Debian equivalent will be listed here. To narrow the results, you may want to check out these packages:

apt cache search lib32stdc

To install any of these packages use the sudo apt-get command like in this example:

sudo apt-get install lib32stdc++6

The synaptic package manager is a frontend GUI for apt-get and can really help you search for what you need. To install, run the following command:

sudo apt-get install synaptic

To run, do a search for synaptic in your applications or open a terminal and run the following command:

sudo synaptic

Also, there is an intel compiler available through apt-get:

sudo apt-get install faucc


Multi-line group capturing between braces

By default, grep reads and processes single lines.

In newer versions of grep, you can use the -z option to tell it to consider its input to be null separated instead of newline separated; since your input doesn't have null terminations, that's essentially equivalent to perl's 'slurp' mode. So you could do

$ grep -zPo '{[^}]*}' testttt
{It captures this! }
{
It can't
capture this!!! why?
}

or, more perlishly, using a .*? non-greedy match with (?s) to include newlines in .

$ grep -zPo '(?s){.*?}' testttt
{It captures this! }
{
It can't
capture this!!! why?
}

Alternatively, if pcregrep is available,

$ pcregrep -Mo '(?s){.*?}' testttt
{It captures this! }
{
It can't
capture this!!! why?
}


Alt-tab selection icons are too big in Xfce4

In Xfce, that "Alt-Tab selection icons" feature is called windows preview.

  But in this new machine, the tabs I see when I pressed Alt-tab is too big.

The new machine is most likely running Xfce 4.12 for 16.04 release. The older desktop environment Xfce 4.10 did not have this feature, and the newer one Xfce 4.12 has the windows preview. User will see the windows preview only when display compositing is enabled in Xfce.

  How can I reduce the size to normal one?

Unfortunately, the size of windows preview is automatic. That is determined by the number of running application windows that can fit within the screen. Given any particular screen size:

With several running programs, windows preview will appear big
With few or more running programs, windows preview will appear small

For example, given a laptop that runs Xfce with screen resolution of 1280x800: the windows preview will appear big when switching between 6 or less running programs, and the windows preview will appear small when switching between 7 or more running programs.

User can instead hide the windows preview.

Go to Settings > Window Manager Tweaks > Compositor and uncheck the option for:

Enable display compositing, or
Show windows preview in place of icons when cycling

Uncheck option 1 to run Xfce without windows preview and without desktop effects at all. Else, uncheck option 2 to only hide the windows preview, but still have some desktop effects. Either way will work.


Ubuntu 18:04: How do I add an application to the list of default applications?

timidity has some kinda pseudo guis. From help

 timidity -h
Available interfaces (-i, --interface option):
  -in          ncurses interface
  -ie          Emacs interface (invoked from `M-x timidity')
  -ia          XAW interface
  -id          dumb interface
  -iA          ALSA sequencer interface

MimeType=audio/midi;audio/x-mod;
Exec=/usr/bin/timidity -ia %F

And I can play this midi files from your linked side as well.


To be explicitly clear,

Yes, you can install Windows 10 in a VM with an Ubuntu host provided you have sufficient RAM, disk space, etc.
Yes, you need a licensed copy of Windows 10. This means you're going to need a valid retail (not OEM) product key if you want to run it as a guest OS.
If you have a retail copy of a different Windows version that is not being used, you might be able to install that first and then upgrade it (cheaper?), but I'm not sure what versions you can directly upgrade from.