Locked out of dedicated server because of chmod

The command chmod -x / only removes the executable bit from the root-directory. If you'd be still logged in
as root, you could easily reverse the change with chmod +x /.

Obviously you are not logged in as root anymore, so you have locked out yourself from the system.
This can still be fixed. I just did the same, I ran chmod -x /, closed the terminal and I broke the
system, I can't even reboot.

I solved this booting from Live-USB, the problem is, that we can't use chmod to restore the correct permissions of the
damaged root-filesystem because it doesn't have a name. But we know that the root-filesystem is stored as inode number 2.
We can use the command debugfs to restore the correct permissions.

With lsblk | grep -v loop we can determine the device-name of the damaged filesystem.

Then we can run debugfs -w /dev/sdXY as root, take a look at my example below:

# debugfs -w /dev/sdb2
debugfs 1.44.1 (24-Mar-2018)
debugfs:  modify_inode <2>
                          Mode    [040644] 040755   # here enter correct permissions and hit enter
                       User ID    [0]               # here and in the following prompts only hit enter
                      Group ID    [0]
                          Size    [4096]
                 Creation time    [1564191527]
             Modification time    [1564191527]
                   Access time    [1567339087]
                 Deletion time    [0]
                    Link count    [24]
              Block count high    [0]
                   Block count    [8]
                    File flags    [0x80000]
                    Generation    [0x0]
                      File acl    [0]
           High 32bits of size    [0]
              Fragment address    [0]
               Direct Block #0    [127754]
               Direct Block #1    [4]
               Direct Block #2    [0]
               Direct Block #3    [0]
               Direct Block #4    [1]
               Direct Block #5    [9265]
               Direct Block #6    [0]
               Direct Block #7    [0]
               Direct Block #8    [0]
               Direct Block #9    [0]
              Direct Block #10    [0]
              Direct Block #11    [0]
                Indirect Block    [0]
         Double Indirect Block    [0]
         Triple Indirect Block    [0]
debugfs: quit                                       # here we quit

The permissions of this root-filesystem are correct now and I can reboot into the former damaged system.


How to authenticate Squid against a custom backend?

--user someuser and --password xxxx are the username and password used to authenticate against the MySQL database. The proxy users must be created in the table passwd inside the squid database.

For reference: squid_db_auth manpage, how to build squid authentication helpers.


Upgrade from Ubuntu 16.04lts to 18.04 can't be done because some existing packages are not being updated

You can try
sudo apt install linux-generic linux-headers-generic linux-image-generic

to upgrade those forcefully.
I think after that sudo do-release-update will be accepted.


How can I switch keyboard source quickly in Ubuntu 18.04 GNOME Shell?

It seems that a script can be used to override this extremely annoying behavior. Take a look here:

How to NOT show keyboard layout chooser popup when changing language in GNOME 3


How to get data from a bluetooth device that is not visible?

The reason you were not able to find it in hcitool scan is because the FitBit One is a bluetooth LE device.

You need to use hcitool lescan. Even then, your hardware needs to support it. Further, connecting to it wasn't even possible on my machine (lenovo p500 'ideapad') using hcitool lecc or gatttool --interactive (and then 'connect')


Reactivate Touchpad Two-Finger-Scroll on L430

Just found the answer by myself. Delete the file trackpoint.conf and reboot.


.jar file not working outside of eclipse

So that's why it didn't produce any errors. Remember how I told you that the directories were working differently from Windows? It seems the OS takes Home as the beginning path and not the location where the program is located in. Therefore it created all the files in Home folder. I don't know how to handle the directory issue, yet. But it's good to know the program is actually working.

Thank you, people anyway.

Edit: Also, it seems it's easy as replacing backslashes with forward ones to optimise the directory checking to Linux.


Unable to unmount partition from live USB

/dev/sda1 is apparently your swap partition. A swap partition doesn't get "mounted" so, as unmount is correctly telling you above: "/dev/sda1: not mounted".

Maybe you want to issue a mount on the command line, to see what is mounted.


Is Intel i5-1135G7 Iris Xe Graphics supported? Screen flickers and tears

Finally, after struggling for several days, I found 20.10 worked well.
BTW, to enable the keyboard, modified /etc/default/grub at line 10 as follows:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.direct i8042.dumbkbd i8042.reset=0" . Check kernel parameters here.
And then everything runs well. Except that I need to compile ROS noetic from source which took me another two days.


Is a DVD+R, that also has "RW" printed on it, re-usable?

If what you mean for the "separately" "RW" is something like this:

That means, literally, "The read-write characteristics of this disk are: DVD+R". Don't let the logo (the stylized RW) confound you.

So in this case you have a write-once media; you can't erase data.

The writable-once disks come in two flavors, DVD+R and DVD-R. Only the first ones allows you to add data if the disk is not full (multi-session).

So if you have a DVD+R disk, the general answer is "no, you can't" if you have closed the disk, or "yes, you can" use the rest of the capacity if you have not closed it by opening another session.

In this case, the answer is probably no, you can't because I think that the programs that write a bootable DVD also close the disk.

A real rewritable disc will have:


Typing Ctrl + Z will stop the active process and put it in the background.

[1]+  Stopped                 top

To view jobs that are in background, go with jobs command it will list processes that are in background:

jobs
[1]+  Stopped                 top

To 'pull' that job in front, use fg command, in this case fg 1.
Using stortcuts like Ctrl +Z , Ctrl +C etc means send adequate signal to the current process.

In this case it is SIGTSTP. You can read more with man signal.


How to remove Dual booting option and partition of Ubuntu?

First of all shrink that Logical Partition and then delete it, it will be transform as unallocated. In this situation you can extend the volume of C: or D:. Concerning the Ubuntu boot option task, I have deleted the sector Ubuntu/winboot/wubildr from cmd by this command bcdedit /delete {code identifier of the **Real-mode boot sector**}.  To this moment everything is fine, ubuntu boot option is successfully deleted.


Multiple monitor on laptop incorrect resolution


Why can't I install Steam in Ubuntu Win7 ntfs partition?

It's very good that you included the error message (dpkg: error processing steam_latest.deb (--install): package architecture (i386) does not match system (amd64) Errors were encountered while processing: steam_latest.deb). From this the problem is fairly clear. You have a 64 bit processor but the package ist for 32 bit. So you need a different package.

But as Steam is now in the Ubuntu Software Center, that would be the way to go. In linux you never download programs manually. If it's not in the Ubuntu Software Center, you can almost always find a repository for ubuntu where you can get what you want.


Kernel Panic while booting Ubuntu 14.04.1 Live USB, on Lenovo G50-70

Given the kernel panic you've shown (the Windows one might help as well), I would have to wager that this is a memory / RAM issue.

What you should do for the time being to pinpoint the actual issue:

Reboot your machine.
When the boot menu shows up (shown below), select the first Memory Test.
Let it run. Note any errors.

Please post back with any info from the test(s).


Turning off the red underline for mispelled words in Libreoffice?

Like mike suggested: from the tools menu deselect "automatic spell checking" (as a shortcut you can also press SHIFT+F7)


How to recovery files from lost a deleted partition

COMPLETE REVISION:

I suggested using RIP Linux because I forgot the name of the actual tool included in it that I used. I checked, and it turns out that the tool is called PhotoRec. As I said, it scans a partition looking for patterns that resemble certain file types, then copies these to a different location.

It turns out that PhotoRec is actually available from Ubuntu's APT repository, so if you currently have Ubuntu installed and running, or you currently have it running live, then you can install PhotoRec and run it in Ubuntu. This might be more convenient.

Also, I found that PhotoRec has a relative that might be more useful in this situation: TestDisk. TestDisk can perform other operations including but not limited to restoring partition tables. If you haven't made any major changes to the disk since deleting the partition, this might allow you to restore the partition and most of the files on it so that you can access most of your old files by going to My Computer. Note that you probably won't be able to boot the partition after restoring it, and you will probably lose all of your new partitions.

Both tools can be found here: http://www.cgsecurity.org/wiki/Main_Page


.desktop file are not shell scripts. ~ is a shortcut expanded by the shell. Replace "nautilus ~/Games" with "nautilus /home/USER/Games"


How do I show the same content on both screens?

Go to system

screens

and there find option

monitors

there You can find a checkbox saying:

show the same display on both screens

The situation can be different when using prop drivers. If so tell us what VGA card do You have and what drivers are You using.

Regards


Try this...
right click on your game
set "properties">local files> "backup game files"

but... you cannot worry about lost your games... They still your games and they are stored in the cloud .
You can download again your games (it is yours).
And the same holds for its SAVEGAMES , 98% of games of steam has backup online of your savegames.

ONLY ONE THINK...
DON'T LOSE YOUR LOGIN AND PASSWORD...

Only that...


For OP and for anybody else that finds this-

The problem is that you (and I) copy-pasted the instructions on MakerBot's website. The text on the website includes non-ascii characters that are visually similar to characters you recognize, and end up not showing up. Compare:

$ cat /etc/apt/sources.list | grep ^deb | grep makerbot | hd
00000000  64 65 62 20 68 74 74 70  3a 2f 2f 64 6f 77 6e 6c  |deb http://downl|
00000010  6f 61 64 73 2e 6d 61 6b  65 72 62 6f 74 2e 63 6f  |oads.makerbot.co|
00000020  6d 2f 6d 61 6b 65 72 77  61 72 65 2f 75 62 75 6e  |m/makerware/ubun|
00000030  74 75 20 74 72 75 73 74  79 20 6d 61 69 6e 0a 64  |tu trusty main.d|
00000040  65 62 20 68 74 74 70 3a  2f 2f ef bb bf ef bb bf  |eb http://......|
00000050  64 6f 77 6e 6c 6f 61 64  73 2e 6d 61 6b 65 72 62  |downloads.makerb|
00000060  6f 74 2e 63 6f 6d 2f 6d  61 6b 65 72 77 61 72 65  |ot.com/makerware|
00000070  2f 75 62 75 6e 74 75 20  74 72 75 73 74 79 20 6d  |/ubuntu trusty m|
00000080  61 69 6e 0a                                       |ain.|
00000084

The first 'deb' line was typed in by hand; the second resulted from copy-pasting MakerWare's apt-add-repository command line. Observe the unprintable characters between http:// and downloads (rendered on the right as periods; on the left as ef bb bf ef bb bf)

tl;dr: Don't copy-paste the command. Either type the whole apt-add-repository thing by hand, or add the following one line to /etc/apt/sources.list:

deb http://downloads.makerbot.com/makerware/ubuntu trusty main


18.04: Appindicators disappear after every reboot

The issue is caused by an old Unity app-indicator which is in the system autostart.
Remove it with sudo apt remove indicator-application and reboot.
A related post on Ubuntu 17.10 suggested just to delete the autostart file, but I think it's better to do a clean uninstall.


The git application is not required to download a specific revision of xdotool. For GitHub you can download an archive with a specific shasum using the following URL format:

https://github.com/{username}/{projectname}/archive/{sha}.tar.gz

So for your needs the following should suffice:

wget https://github.com/jordansissel/xdotool/archive/edbbb7a8f664ceacbb2cffbe8ee4f5a26b5addc8.tar.gz

And that should be enough to get you going :)

References:

How to download .zip from GitHub for a particular commit sha? A stack overflow site question and answer that pretty much covers this question...


What is the recommended partition scheme for my Ubuntu Server?

Before you decide on partitioning schemes it might help to actually understand the reasons for splitting various parts of the linux.

Firstly multiple partitions are 'safer' since if one filesystem is damaged, the others should be alright. This won't save you from a disk failure. Backups would, as might the parity scheme in your raid level.

Secondly it was a way to use multiple drives of different styles before LVM - this is moot for you

Source - Linux Installation and getting started

In short, the multi partition scheme is sort of a relic of older times, continued for legacy reasons. If you need to ask why, you're better off with a single partition.

In the modern context the smart partitioning method would be to use a single large partition (and a second one, optionally for swap, swap files would be an option). Use LVM so you can add disks if you can if you think you may need to add space. A single large partition means things will handle themselves as long as there's enough space, and you can backup /etc/ /user/local and /home, and use that and a list of installed packages should a bare metal recovery be needed.


What does "Burn the image directly without saving it to disc" mean?

In order to burn an audio cd it has to convert to cdda audio format.  It can do this on the fly or in advance, and save it to the hard disk, then burn to the cd.  If the conversion is done on the fly, and the computer can't keep up, then you can end up with a ruined cd.  This is generally not an issue on modern computers, so it is safe to burn the image directly without saving it to disc.


After Upgrading to 15.10 VPN doesn't work quite as expected, connection possibly breaks

So I have also discovered that possibly a bug causes DNS leaks when using a network manager openVPN connection on Ubuntu 15.10

LAN/ISP DNS are not removed and remain available as possible DNS plus the VPN DNS. They cause the leak even though the VPN DNS are present. They might be used or not. It's random

My solution is to reset the VPN DNS (removing LAN DNS) by using a network manager script dispatcher calling dbus to update dnsmasq

Create a script /etc/NetworManager/dispatcher.d/99resetvpndns with the content

#!/bin/sh

interface=$1
status=$2

case $status in
    vpn-up)
    # because dnsmasq keep DNS LAN and leak our DNS, reset DNS servers to PIA ones
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:3520991966
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:3520991962
    ;;
    vpn-down)
    ;;
esac

and make it executable with

chmod +x /etc/NetworkManager/dispatcher.d/99resetvpndns

You need to change the uint32 value. There are your VPN DNS in integer form, not quad decimal form. Go to http://www.aboutmyip.com/AboutMyXApp/IP2Integer.jsp to convert your DNS to integer for example.


Nevermind, figured it out. The big problem was that simultaneous read/writes to certain parts of the NFS share hosting the childnode root were creating race conditions, which are avoidable if you use an aufs-type overlay filesystem. By following this guide (http://adminotes.blogspot.com/2012/05/how-to-setup-diskless-ubuntu-1204-with.html), I was able to figure out the required syntax and scripts for setting up aufs on the child nodes. Now that I have this successfully working, each node loads Catalyst and X properly on boot.


Set the command killall transmission-gtk to run at 5:00am

killall will close all the running instances of a program you choose. You can find the name to give it in the System Monitor. For Transmission it is transmission-gtk.


Create an upstart script like the following

# ElasticSearch upstart script

description     "ElasticSearch service"

start on (net-device-up
          and local-filesystems
          and runlevel [2345])

stop on runlevel [016]

respawn

respawn limit 10 30

# NB: Upstart scripts do not respect
# /etc/security/limits.conf, so the open-file limits
# settings need to be applied here.
limit nofile 32000 32000

setuid elasticsearch
setgid elasticsearch
exec /path/to/elasticsearch/bin/elasticsearch -f -Des.default.config=/path/to/config/elasticsearch.yml -Des.default.path.home=/usr/share/elasticsearch/ -Des.default.path.logs=/var/log/elasticsearch/ -Des.default.path.data=/var/lib/elasticsearch/ -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/path/to/config/

Replace the paths with the absolute paths in your case. Save this as elasticsearch.conf in /etc/init/

Also note that you're best off running elasticsearch as it's own user (hence the setuid and setgid lines)


What is the thing in KDE that override my locale settings

Ok I erased the content of ~/.kde/env/setlocale.sh, and it works!

Tkanks!!


Mythbuntu HTPC: disk usage for a normal install

I find that 150G for all of / is a quite good size. It allows for ample space for games, movies, music etc. while maintaining plenty of room for the OS.

My current install is:

It's worth noting that I have don installs (fully running) in 7G and most of my servers on EC2 have a 10G / and a 40G /home (though there are exceptions based on certain needs).


SOLVED!

I have to thanks the answer found here that addressed me to solution published here by the user gartss (scroll down the page)

It is definitely a problem related to hard disk errors and/or bad sectors. In fact, by inspecting the directory /var/lib/dpkg/status/info (containing the list of files for every installed package) I've found two files containing unreadable characters even if they should be simple plain text files.

The chronology of what I've done:

run fdisk to check/fix errors

restart Ubuntu from live CD
run Terminal command line
got the list of disks by issuing the command sudo fdisk -l
run the disk check on all partitions but the boot: fsck /dev/sdaX (In my case X = 2 or 5 or 6)
answered "Yes" to all corrections proposed by fsck.
shutdown the PC and restarted normally (i.e. without the live CD)

opened the status file used by dkpg with gedit as superuser: gksudo gedit /var/lib/dpkg/status
saved a backup copy in the same directory (i.e. status-bkp)
searching the name of the offending package tzdata
deleted all the lines related to the package and saved the modified file (see below what I've deleted)
issued the command sudo dpkg dpkg --configure -a
issued the command sudo apt-get -f install(This reinstall the deleted package and adjust. all the broken dependencies)
tried to start the Updated Manager to check if all was finally fine: sudo update manager
after clicking "install" I've got a new error (wow!) for another damaged package, in my case:files list file for package libnss3-nssdb is missing final newline
opened again the status file like at step (2), deleted the offending package and saved it again (see below what I've deleted)
issued again the command sudo dpkg dpkg --configure -a
issued again the command sudo apt-get -f install
run again the Update Manager: sudo update manager
and............ all has gone fine! Now the update manager works again as before: System updated

Hope this helps!

Deleted lines (in my case) at step 2:

Package: tzdata
Status: install ok installed
Priority: required
Section: localization
Installed-Size: 2769
Maintainer: Ubuntu Developers
Architecture: all
Multi-Arch: foreign
Version: 2016f-0ubuntu0.16.04
Replaces: libc0.1, libc0.3, libc6, libc6.1
Provides: tzdata-stretch
Depends: debconf (>= 0.5) | debconf-2.0
Description: time zone and daylight-saving time data
 This package contains data required for the implementation of
 standard local time for many representative locations around the
 globe. It is updated periodically to reflect changes made by
 political bodies to time zone boundaries, UTC offsets, and
 daylight-saving rules.
Homepage: http://www.iana.org/time-zones
Original-Maintainer: GNU Libc Maintainers

Deleted lines (in my case) at step 10:

Package: libnss3-nssdb
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 86
Maintainer: Ubuntu Developers
Architecture: all
Multi-Arch: foreign
Source: nss
Version: 2:3.23-0ubuntu0.16.04.1
Depends: libnss3 (= 2:3.23-0ubuntu0.16.04.1)
Description: Network Security Security libraries - shared databases
 This package includes shared certificate and key databases.
Homepage: http://www.mozilla.org/projects/security/pki/nss/
Original-Maintainer: Maintainers of Mozilla-related packages


How do I use/bundle a custom version of Zenity in my script?

To use the custom zenity executable instead of the system default, we can place it in a directory and add the directory to the PATH.

Say I placed the executable in a directory $bindir.

Then I can add $bindir to the PATH variable.

export PATH="$bindir:$PATH"

Note that we need to add $bindir before $PATH, else it won't override the system executable. Because in PATH, the executable coming before is given more priority.


How to install Vmware 32 bit on Ubuntu 64 bit

'This is a x86 bundle and does not match that of the current architecture. Please download the x64 bundle.'

That message seems valid to me.

  I want to install the file called 'VMware-Workstation-Full-10.0.6-2700073.i386.bundle'.

No, you do not. You are making a mistake here. You do not install a 32-bit VMWare bundle in a 64-bit system.

You need to install 64-bit VMWare bundle in your 64-bit system. Inside a 64-bit VMWare you can then install different operating systems that can be 32-bit.


ping has a specific switch to set source interface: -I. As found in the manpage:

 -I interface address
          Set source address to specified interface address. Argument may be  numeric
          IP  address  or  name  of device.
          When pinging IPv6 link-local address this option is required.

As an example

$ ping -I wlan0 8.8.8.8

ping 8.8.8.8 through wlan0 interface.

Forcing an interface for a specific application needs some more work. You can find a solution in this superuser.com question and in this article linked in the answer.

UPDATE

The methods i exposed in this answer show how to force ping to use a specific interface. And links to some articles on how to force a generic program to use a specific interface.

Now, for all this to work, you have to configure some "advanced" routing. As you can see from the output of route -n you have multiple networks, but only ONE gateway to the Internet. That is good, as multiple gateway routing is quite an advanced topic and somewhat difficult to handle well.

This goes beyond what you asked in the original question. I suggest you to post a new question here or on Server Fault asking how to configure and manage multiple internet gateways on multiple network interfaces.

Or, better yet, try googling it ;) Also check the LARTC site for advanced linux routing configurations.


Click on the icon at top-right next to the "search" button.


How to use Integrated GPU for Hybrid Laptop Intel/ATI?

I would suggest to start with the default open source driver... then try with vgaswitcheroo..

instructions here..

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

I have a hybrid ATI/ATI graphics in my HP and both are enabled by default. using instructions from above I can disable the discrete graphics.. I still have to install this at boot and solve after suspend issues..but laptop is now cool to the touch


How to count the total number of words from all the files in a directory?

If you just want the total number of words in all the files in a directory (and assuming no sub directories, ignoring hidden files and other caveats), you could try:

cat * | wc -w

cat * simply concatenates the content of all the files in the current directory to standard output. This is piped into wc -w wc (word count) simply returns the number of words that (in this case) it reads from standard input.

If you're ok with slightly more complex output, simply try:

wc -w *

wc has other options that return number or lines, number of characters etc.


How do I create a new usergroup on a Mac partition?

I'm not sure about what you're trying to accomplish here (big picture), but here's how to add groups.

$ sudo addgroup mygroupname

However, system groups like sudo, adm and wheel have a low number group id. Do this for your group wheel:

$ sudo addgroup --system wheel

You should also be able to accomplish this using the GUI ('Users and Groups').


Is it possible to integrade an existing CryFS volume into the KDE vaults menu?

Yes, however at the time of writing it is not possible to do this by GUI and you will have to modify the config file: ~/.config/plasmavaultrc

With the example in the original post, where: ~/Dropbox/basedir is the basedir and ~/Documents/Data_Dropbox is the mount directory.

Add a section for your CryFS volume in the config file:

[/home/myusername/Dropbox/basedir]
activities=
backend=cryfs
lastStatus=1
mountPoint=/home/myusername/Documents/Data_Dropbox
name=DropBoxVault
offlineOnly=false

And under encrypted devices in the same file

[EncryptedDevices]
/home/myusername/Dropbox/basedir=true

Note that if you have not created a vault with the Vaults menu, there will be no encrypted devices part. Just copy the [Encrypted Devices] title too.
Logout of plasma and back in (probably there is a simpler way than the latter) and voilà!


I'm assuming you mean the first version which implemented compiz and the Unity Desktop instead of the old Gnome desktop.  The first LTS Ubuntu version to implement Unity and compiz was 12.04.

It is still available for download here.


You need to use libaio1 package, which provides the Linux kernel AIO access library - shared library

To install libaio Use the command

sudo apt-get install libaio1

For more information of libaio look here


Why can't the nagios user send mails using "sendmail"?

Edit: after extensive manual interrogation of your SMTP relay, it looks like the problem may be that the relay specifically blocks nagios@ as a sender:

[izx.I5] ? telnet smtp10.netcore.co.in 25
220 ESMTP
EHLO ********.com
...
MAIL FROM:nagios@********.com
250 2.1.0 Ok
RCPT TO:karthick@********.com
450 4.7.1 : Sender address rejected: Please checked sender domain
quit
221 2.0.0 Bye
Connection closed by foreign host

Does the nagios@****.com mailbox exist? Can you try simply rewriting nagios to e.g. nagios1?

To do this, in /etc/sendmail.mc add:

FEATURE(`genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl

Create file /etc/mail/genericstable and add the line:

nagios nagiosk

and /etc/mail/generics-domains and add lines:

localhost
localhost.localdomain

Then run sudo sendmailconfig and try again.

The issue appears to be your SMTP relay at netcore.co.in. Hosting/ISP SMTP relays are never "open", and usually set to only relay mails from one of "their" domains and from one of "their" IPs. Mails from root@localhost are probably getting through only because some mail  server daemons recognize root and make an exception for it, sometimes even replacing the @localhost part with whatever the reverse DNS (or IP) of the sender is (for example, my messages once went through in the form of root@dsl-111-222-111-222.ppp.isp.com). No such courtesy is afforded to the "nagios@localhost" user.

Two solutions:

The easier one may be to simply set (or fake) your sendmail FQDN to whatever is recognized/authorized by Netcore.

To do this, open /etc/mail/sendmail.mc and add these lines at the end before any MAILER lines, modifying appropriately:

MASQUERADE_AS('karthick.com')
FEATURE(`masquerade_envelope')

Then run sudo sendmailconfig, answering yes to everything and make sure sendmail is restarted. See here for some more basic info on Sendmail masquerading for relaying.

Alternatively, for the sake of completeness, to keep using nagios@localhost, you can do one of two things -- either disable relaying in sendmail and use it directly (if you have a static IP/PTR record or RDNS), OR you can set up sendmail to perform SMTP authentication with the Netcore relay.

These Netcore articles may help; you can try asking them too if possible:

Why does a sender address get rejected?
SMTP authentication for Netcore


Ubuntu freeze after moving window to the side

You can disable that feature :

Install Unity Tweak Tool, a program that will help you configure Unity :

sudo apt-get install unity-tweak-tool

Open it and go to Windows Snapping, and switch it off.

You will still be able to snap your windows using <Ctrl> + <Super> + <Left>/<Right>/<Up>/<Down>

Note : the <Super> key is also called <Windows>


You might put source ~/.bash_aliases in your ~/.bashrc file, or actually define aliases there.

Some background.


Your Motherboard seems to be in secure Boot EFI Mode:
1. If this is a parallel Installation Attempt to an existing EFI-booted OS u need to work the EFI-Boot-Functionality into your Stick Image: create the missing EFI-Folders manually and put the Setup-File (.efi) in.
2. go into your UEFI/BIOS and/or select the proper Boot-Device in the appropiate Mode: Your Stick should show up twice (EFI & without), this determines where the Installation-Routine is looking for the Setup-File: in /Boot for "normal" Installation and in /Boot/EFI for the "secure Boot" (signed) Installation.
(3.) as a workaround "secure Boot" can be disabled in the UEFI/BIOS


Partition does not start on physical sector boundary?

Your hard disk has Advanced Format 4096-byte sectors to which the partition is not perfectly aligned
This line explains the warning:
Sector size (logical/physical): 512 bytes / 4096 bytes

Your hard disk is one of the newer models which uses the Advanced Format of 4096 bytes per physical sector instead of the older 512 bytes/sector.
These HDDs can still provide a "legacy" emulation of 512 bytes/sector, which is why you see the logical sector size as 512.
In fact, lshw shows it's a Western Digital drive, the first company to switch to AF. They have an extensive page with lots of information on it, which you may wish to look at.

Thus, the warning occurs because partition 1 starts at logical sector 63 = byte 32256, a number not divisible by 4096; in fact it's near the end of the 7th physical sector (position 7.875 to be exact :)
Should you fix it? If so, how? [always backup!]
In theory this sort of partitioning may affect read/write IO rates somewhat, depending on your drive's firmware. If you are happy with the performance now, ignore the warning, and no need to do anything. If not, backup all important data first, and then use Gparted to move the partition so that it starts at 4096-byte sector; setting the start boundary at 1 MiB is an easy way to do it.

Technically, you can set the start to any logical sector which is a multiple of 8, e.g. 64 is good, 256 is good, etc., but 63, 255... are not.


How to create a Firefox shortcut stored with user and password?

WARNING: this method is insecure since bookmarks are not encrypted, which means anyone with access to your machine could login with your credentials if you save bookmarks this way.

Most web browsers support the following syntax:

  protocol://username:password@www.example.com/direcory

For example,

  http://bob:123456@www.example.com/secrets

Using this syntax will work in a Firefox bookmark (though FF will warn you when you click it)

Note that this only works for websites that use HTTP password authentication (.htpasswd files in Apache). This won't work, for example, on Facebook.


What is the Linux equivalent of C drive on SSD and D drive on HDD?

Drives aren't labeled like Windows in Linux. You can create separate partitions and/or drives for each folder (directory) or you can stack them under "root" /.

Any folder you don't allocate in a separate partition will by default be under the / folder as if you had a C: drive with \ folder.

I set up with HDD in anticipation of getting a 256 or 500GB SSD soon.  Here is what I would do with your layout.

SSD:
1 fat32 /boot/efi 380 MiB
2 ext4  /  24GB
3 linux swap 8GB (optional)
4 ext4 /home remainder of drive

HDD:
1 ext4 /other (whole drive)

-or-

1 ext4 /games (your size choice)
2 ext4 /movies (remainder of drive)

I hope this helps.


Any use of pkill is going to crash it; that's essentially its purpose.  Use a program like wmctrl instead, to tell it to exit properly.


Please download the correct driver for you from here: (I suppose your are working on Ubuntu 12.04)

32bit
64bit

If you are not using Ubuntu 12.04 Please download your right version from here.

After downloading the driver move the downloaded bcmwl-kernel-source_XXX.deb file to your laptop and install the driver. Open the terminal and cd to the directory having the file then run the command:

sudo dpkg -i bcmwl-kernel-source_XXX.deb


Open a file at a certain position and read one byte in bash

You can try cmp. It will compare two files byte by byte.

From man cmp:

cmp - compare two files byte by byte

Although the number of lines must be equals on two files. Also note that cmp will point to the first difference only, to point to the next differences you can skip specific bytes from the start.

$ cat foo
this is
a test
$ cat bar
this
is a test
$ cmp foo bar
foo bar differ: byte 5, line 1
$ cmp -b foo bar
foo bar differ: byte 5, line 1 is  40    12 ^J

To print the differing byte values use cmp -l, from man cmp:

   -l, --verbose
          output byte numbers and differing byte values


What is a good starting point for understanding how graphics work on a Virtual Machine?

In virtual and remote desktop environments, it is particularly difficult to render and deliver complex graphics to endpoints with adequate performance. The standard GPU was originally developed to offload processing calculations from the CPU for graphics-intensive applications.  NVIDIA introduced the first virtual GPU in 2012 to help solve that problem, reducing lag time when delivering graphics to remote users and providing the same performance they would get from a PC. This is especially useful for users that require computer-aided design or 3-D graphics applications.

-TechTarget

This explains that there are such things as Virtual GPUs. Like the OP stated, they wanted a starting point. Virtual GPU's are the things that you want to search for when learning about Virtual Machine graphics. These are the things that handle the rendering in VMs and I think that's what you want to learn about.


Does Ubuntu 18.04LTS require antivirus/malware?

Need is a strong word.

If you have your computer in your basement, not connected to the Internet, that you use as a glorified typewriter, then maybe you don't need Anti-Virus, because nothing is downloaded.

Maybe you like to download things from the Internet, and try new software.  In this case, you'd be safest running Anti-Virus.

If you are running a service where you accept files from others, then you most certainly need to run Anti-Virus, even if the viruses don't affect your system, as to prevent yourself from propagating the virus and being irresponsible.

Without further details, it will be hard for anybody to give you an accurate answer.  Your use-case and practices will impact the advice given.

clamav is often used on Linux systems to scan files for malicious content, for various purposes.  Unless you're trying to use some ancient hardware, anything should be capable of running good Anti-Virus with minimum impact.

Note

Anti-Virus options haven't changed much with Ubuntu 18.04.   This question (and its duplicates) are still good sources of information.

Anybody telling you that you don't need Anti-Virus is probably giving bad advice, or has a lot of knowledge about Linux systems.  Again, your practices, and knowledge, play a big part in your needs.


New Ubuntu Install on flashdrive not booting properly

Ordinarily, USB drives are formatted with FAT32, but when Windows formats a USB FlashDrive for FAT32, it imposes a 32GB maximum volume size. If you download and install the Rufus app then download the Ubuntu image with it and remake the LiveUSB with Rufus, you can specify ExFAT  (see below) which allows you full use of that 64GB flash drive, following the specs for FAT32, and boot from it as a FAT32 drive with no problem. Once that's done, then install full Ubuntu over the Ubuntu LiveUSB image.

Also, make sure Secure Boot is turned OFF and ?HCI/xHCI is ON in the Dell BIOS/Firmware setup.  Here are explicit instructions for creating a full Ubuntu install to USB.

Note: As a comment on this answer, Akeo, author of the superb Rufus Open Source LiveUSB creator, noted choosing ExFAT in Rufus formats the flash drive as 'Large FAT32' following the original FAT32 specs which do not have the Microsoft-imposed 32 GB limit. See first comment, below.


Ubuntu 19.04: Suspend fails on HP Spectre x360 (with NVIDIA GTX 1050Ti)

I discovered this last night and it works for me,

systemctl suspend -i

I got that from an error message running  'systemctl suspend' from terminal and it told me there were busy (or uninterruptible) processses and to try the -i option.

update: withdrawn as a solution, kept as a hint... didnt work any more.
I need to unplug the usb hub before suspending, dont need the -i, and then plug the usb hib back in after coming out of suspend with the power button

how do you issue the command before unplugging the usb keyboard?

sleep 5 ; suspend


MAAS does not currently support deployment of ESXi onto bare metal; the simplest way to achieve that goal may be to use vSphere's Auto Deploy tooling, as described in this blog post.

Having said that, MAAS now includes built-in support for power control of /VMs/ running on top of an already-deployed vSphere/ESXi; see "How to configure MAAS to be able to boot virtual machines via VMware type" for details.

(We used to support ESXi via a virsh solution, as outlined in this blog post, but that's been superseded by the native support.)


Stuck in a terminal tty - can't switch to another or break out of error

Select a different tty with Alt+Ctrl+F2 then use that console to fix your video card problem.

You can configure and change the video driver from the commandline with:

$ ubuntu-drivers devices
$ sudo apt install nvidia-###

The first command checks the available drivers.  The last command selects the driver.  You might consider selecting the recommended driver.


Ubuntu 14.04.01 - Unity Tweak Tool doesn't change theme and font settings

Had same problem after my 14.10 hang up. Solved via:

Open dconf-editor
Go to org.gnome.settings-daemon.plugins.xsettings
Unset and then set again active checkbox.

Or

gsettings set org.gnome.settings-daemon.plugins.xsettings active false
gsettings set org.gnome.settings-daemon.plugins.xsettings active true


You can add new items to your list of installed programs manually.

You will have to find out the corresponding terminal command, then add a custom .desktop file to your applications folder. You can find detailed information for doing so in the following post:

How can I edit/create new launcher items in Unity by hand?


Can see the nautilus menu in Desktop when using Gnome Shell

Yes, you should do ONE of the following (the one that you prefer):

1) Set from Gnome Tweak Tool that the file manager should NOT handle the desktop (this will also get rid of the icons on the desktop)

2) Remove the packages appmenu-gtk appmenu-gtk3 appmenu-qt.


Creative Sound Blaster Z not working under Ubuntu 14.10

There is a way I known to get sound out of this card, I have one and tried it.

It is form here:http://ubuntuforums.org/showthread.php?t=2147443&page=4

First of all, BEFORE turn the PC you need to plug the speaker or headphone to the front panel headphone socket.

Then open a terminal(ctrl+alt+t) and run one of the follow line of code ASAP after logining in.(Because it sometimes work, depend on luck)[enter your user password when sudo ask for it]

sudo kill `ps uax |grep pulseaudio | grep -v grep | awk '{print $2}'` ; sudo rmmod snd-hda-intel; sleep 3; sudo modprobe snd-hda-intel

OR

sudo kill `ps uax |grep pulseaudio | grep -v grep | awk '{print $2}'` ; sudo rmmod snd-hda-intel
//Then(This is not a command!)
sudo modprobe snd-hda-intel

Sometimes, you will need to run it twice.

If you encounter only one side sound out, then try alsamixer or gnome-alsamixer in terminal, check the sound level.

PS:It is really a hassle to change plug every time I change OS, so I could only stick with Windows.


K3b does not read blank CD after upgrade from ubuntu 12.04 to 12.10

It seems that Gnome automounts blank CDs and automatically formats them. I do not know how to disable this, but here is a work around : use KDE !

install KDE :

sudo apt-get install kde-plasma-desktop libk3b6-extracodecs
logout
select KDE
login again


Why hash file are always different in openssl aes-256-cbc output files?

CBC requires an IV: the very first block of data should be random. It is sent with the data so that the recipient has what they need to decrypt the message. The IV for CBC should be uniformly random and unpredictable. The openssl enc command creates an IV with 8 fixed bytes and 8 random bytes (it should be 16 random bytes). When you encrypt the same message twice, the IV changes. (There's an option -nosalt to use a fixed IV, which is even worse for security and shouldn't be done unless the password was itself generated randomly for a single message.)

All non-broken modes of encryption have an IV or equivalent, so that encrypting the same message twice results in different ciphertexts. This is necessary, at least, so that an adversary cannot detect whether two encrypted messages have the same plaintext. Repeating the IV for distinct messages can open other attacks; for example, with CBC, a common prefix to two messages is visible in the ciphertext if the IV is reused. If you ever find that encrypting the same message twice leads to the same ciphertext, something is broken.

Don't use the openssl command for serious work. It's meant only as a showcase of the library functions, and it's badly designed even for that. As we've seen, the enc command doesn't quite do things securely since its IV isn't as random as it should. A worse problem is the way the key is derived from the password: openssl enc uses a single round of MD5, which is bad — deriving a key from a password should use an intrinsically slow function (a key stretching function) to slow down brute force cracking attempts where the attacker tries likely passwords (dictionary words, 1337 variations, etc.).

The primary user-level encryption tool is GPG, available in Ubuntu in the gnupg or gnupg package. To encrypt a file with a password, use

gpg -c filename

You'll get prompted for the passphrase. The encrypted file will be stored in filename.gpg. To decrypt, run gpg filename.gpg and enter the passphrase.


List of GNOME 3 applets and gnome-shell extensions


Raspberry Pi 4: New official Ubuntu Server 18.04.3 64-bit is not booting

Have you checked the firmware upgrade for the pi4 before trying to install the official 18.04.3 version. see https://jamesachambers.com/raspberry-pi-ubuntu-server-18-04-2-installation-guide/.

I don't understand why my previous post (see text above) was deleted. The link provided, clearly documents that in order to boot 64bit ubuntu server, you need to upgrade the firmware. The link provides instructions for the firmware upgrade.  I am running 2 pi4 with unofficial ubuntu server 18.04.2 using this method and they have been working perfectly. I have 2 additional ones on order and will use this method to install official   18.04.3.

Happy to not contribute at all if the help provided in my comments isn't considered appropriate.


paste content from clipboard to text file in ex mode?


Here's a minimal testcase where the notebook is being styled with CSS.

from gi.repository import Gtk, Gdk

CSS = """
.myNotebook tab {
    background-color: red;
}
.myNotebook tab:active {
    background-color: blue;
}

"""

class TestWindow(Gtk.Window):
    def __init__(self):
        Gtk.Window.__init__(self)
        self.resize(600, 400)
        self.connect("delete-event", Gtk.main_quit)

        cssprovider = Gtk.CssProvider()
        cssprovider.load_from_data(CSS)
        screen = Gdk.Screen.get_default()
        stylecontext = Gtk.StyleContext()
        stylecontext.add_provider_for_screen(screen, cssprovider,
                                             Gtk.STYLE_PROVIDER_PRIORITY_USER)

        nb = Gtk.Notebook()
        context = nb.get_style_context()
        context.add_class("myNotebook")
        for x in range(1, 5):
            label = Gtk.Label("page %s" % x)
            nb.append_page(label, None)

        self.add(nb)
        self.show_all()

if __name__ == "__main__":
    test = TestWindow()
    Gtk.main()

This only changes the background color of the tabs, but more should be possible. Here is the style for the default Ubuntu theme, you're probably searching for the border-image.

.notebook tab {
    background-image: none;
    background-color: transparent;
    border-style: solid;
    border-image: -gtk-gradient (linear, left top, left bottom,
                                 from (alpha (shade (@bg_color, 0.9), 0.0)),
                                 to (shade (@bg_color, 0.9))) 1;
    border-image-width: 0 1px;
    border-color: transparent;
    border-width: 0;
    box-shadow: none;
    /*color: shade (@fg_color, 1.2);*/
}

.notebook tab:active {
    border-color: shade (@bg_color, 0.82);
    border-style: solid;
    border-width: 1px;
    background-color: shade (@bg_color, 1.02);
    background-image: none;
    /*box-shadow: inset 0 1px shade (@bg_color, 1.1);*/

    color: @fg_color;
}

Instead of CSS classes, you can also use the GTK widget name to apply the custom style to all widgets. Remove the context.add_class("myNotebook") and use the following CSS:

CSS = """
GtkNotebook tab {
    background-color: red;
}
GtkNotebook tab:active {
    background-color: blue;
}

"""

Or work with custom names. Add a name to your widget: nb.set_name("myNotebook")
And the CSS:

CSS = """
GtkNotebook#myNotebook tab {
    background-color: red;
}
GtkNotebook#myNotebook tab:active {
    background-color: blue;
}

"""


SyntaxError regarding async when attempting to run Jupyter in Python 3.7

For me, it was conflicting with apt-get installed python3, so I had to first uninstall it/them:

sudo apt-get remove python-pexpect python3-pexpect

And then

sudo pip3.7  install --upgrade pexpect


How can I make perf script -g python work?

Since Raring (13.04), perf is built without Python scripting enabled “to avoid a Python build dependency”. This came as a nasty shock to people like me who used perf in 12.04 LTS and upgraded to 14.04 LTS. This is documented in the debian-master/changelog file in the Ubuntu kernel git repos.

In short, if your kernel is 3.8.0-6.11 or later, you are — to use the precise technical terminology — “shit outta luck”: you have to build your own perf.

If you decide to do this the Ubuntu way, which is actually quite easy, you can google for tutorials with varying levels of detail (e.g. here or here). Once you have reached the stage where you have cloned the Ubuntu kernel git repo appropriate to your release and have checked out the tag corresponding to your current kernel (if your current kernel is 3.13.0-48-generic, the tag will be something like 3.13.0-48.80, i.e. with an extra number on the end), you must edit (w.r.t the root of the git repo) debian/rules.d/2-binary-arch.mk and remove NO_LIBPYTHON=1 from one of the make command-lines (it's used in \#ifdef checks, so changing it to NO_LIBPYTHON=0 won't work). This clause only appears once, so just search for it and take it out.

The distro's linux-tools-3.x.x-y package contains the actual perf binary, which ends up in /usr/lib/linux-tools-3.x.x-y/perf. This is built with fakeroot debian/rules binary-arch. This rule (binary-arch) takes a long time to build (~25 mins on my i7 laptop). If I'd paid more attention, I could probably have picked one that didn't build every kernel variant and module. Suggestions welcome.

Assuming that you've made no other changes, once this finishes, the package you want is linux-tools-3.13.0-48_3.13.0-48.80_amd64.deb (modulo your kernel version): this is the one with the binary, rather than symlinks or shell wrappers.

There may be a couple of other linux-tools packages, depending on exactly what you've built, linux-tools-3.13.0-48-generic_3.13.0-48.80_amd64.deb just contains symlinks and stuff (less likely to be different) and linux-tools-common_3.13.0-48.80_all.deb just contains the short generic perf wrapper script that ends up in /usr/bin; the latter is built with fakeroot debian/rules binary-indep.

You can install your new Python-capable perf with

# sudo dpkg -i linux-tools-3.13.0-48_3.13.0-48.80_amd64.deb

You can install as much, or as little, of the kernel, kernel modules, other tools packages, etc. as you're comfortable with. In principle, these should all be the same. I just installed the one package and everything seems to work OK: I have my Python-capable perf back.

Of course, you're going to have to do a lot of this again (from a git pull and checkout of the new tag onward) next time there's a kernel update. I'll have to keep up with this myself, so I was half-thinking of sticking my .debs into a PPA, but there doesn't seem to be much interest (this question upvoted twice in 3 months).


Intellij Idea Community Edition, cannot set `Gradle home`

In Gradle home option you need provide path to folder where your Gradle distribution was installed.

To determine the Gradle home location of your Gradle installation:

Create build.gradle containing:

task getHomeDir << {
    println gradle.gradleHomeDir
}

Run

gradle getHomeDir

Reference: Setting up Gradle Plugin For IntelliJ


Fedora what you have seen is most probably use Gnome 3 Desktop. So we simply have to install it in Ubuntu.

Open the Terminal and execute this command:

  sudo apt-get install gnome-desktop-environment gnome-session-flashback

Now logout and choose "Gnome" as the session, and login again:

You should get something like this:

Get Fedora wallpapers form here.


Screen resolution problems on Samsung monitor

(1) Before you use xrandr, use cvt to generate a Modeline with your desired resolution and frequency.  For example...

$ cvt 1280 1024 60.09

The result will be something like...

# 1280x1024 60.03 Hz (CVT) hsync: 63.81 kHz; pclk: 109.25 MHz
Modeline "1280x1024_60.09"  109.25  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

(2) Now, this is the new mode you should create using xrandr...

xrandr --newmode "1280x1024_60.09"  109.25  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

(3) Then add your new mode using xrandr...

xrandr --addmode VGA1 1280x1024_60.09

(4) Finally, test it...

xrandr --output VGA1 --mode 1280x1024_60.09

(Make sure the output display device, such as VGA1, is your correct device as shown in Ubuntu Display Settings).


You can use the command-line tool feh:

sudo apt-get install feh

To view all pictures randomly in, for example the ~/Pictures directory and all its subfolders, use the following command:

feh --recursive --randomize --auto-zoom --geometry 1600x1000 ~/Pictures

To view the pictures in their default geometry and in the order of the folder:

feh --recursive --auto-zoom ~/Pictures

You can find more information and keyboard shortcuts here.


What is the difference between kubuntu-desktop, plasma-desktop and
  kde-plasma-desktop packages?

Running apt show on each:

kubuntu-desktop

Description: Kubuntu Plasma Desktop/Netbook system

kde-plasma-desktop

Description: KDE Plasma Desktop and minimal set of applications

plasma-desktop

Description: Tools and widgets for the desktop

Look at the depends for each in the output of each apt show command to know more.

In brief, kubuntu-desktop provides a fuller KDE Plasma desktop experience relative to that obtained by installing kde-plasma-desktop.

It's a bit like installing xubuntu-desktop versus xfce4.

By the way, kubuntu-full provides even more packages than kubuntu-desktop.

I don't know the basis for the question, but I prefer not mixing desktop environments. Other users seem to handle multiple desktop environments just fine.


How to create a link to a folder in Ubuntu 18.04 using GUI

Drag the folder while holding the Ctrl+Shift button

You will see a "link" under the dragging hand badge while the folder is dragged as shown in the picture below.

If you drag the folder you want to link to, to a different folder, then the link will have the same name as the linked folder. The linked folder will have a black link arrow to show that it is a link.

If you create a link of a folder within the same parent folder the link will be called Link to <Name of Folder>.

Alternately Alt Drag

If you press Alt and drag-and-drop a little menu with copy, move, link, and cancel appears:

Hope this helps


You cannot test a different version of Gnome Shell on your current desktop system without removing the current version. You could

Set up a virtual machine using Virtualbox or Gnome Boxes, and install/test the new version there
Set it up on a different, spare computer, or install an Ubuntu version in a multi-boot setup on your current machine. This approach will be most representative, because then you are testing in the hardware environment where you eventually want to deploy that version.


How do I get the option (during login) to select Unity back?

Since lightdm is the default in ubuntu, a different login screen means you installed some other display manager. It seems that you are currently using gdm, so to revert back just input this line in the terminal:

sudo dpkg-reconfigure gdm

and choose lightdm as the default display manager.


As it turns out the easiest solution to my problem was to buy a new audio card for $20. Now the sound works great! My conjecture is that the mother board sound was dead, even though I was hearing a very faint "Front Center" via aplay.


route add -net 192.168.19.0/24 dev tun0 to netplan yaml 1 to 1 mapping

Did you check the netplan.io examples for route information?  What part of this documentation is lacking, or what issue are you having specifically?

Searching for route, I see this example:

     routes:
       - to: 0.0.0.0/0
         via: 9.0.0.1
         metric: 100
       - to: 0.0.0.0/0
         via: 10.0.0.1
         metric: 100
       - to: 0.0.0.0/0
         via: 11.0.0.1
         metric: 100

You'll have to share your /etc/netplan/50-cloud-init.yaml if you want more specifics.


Outside of the man pages and the ubuntu manual, is there a site for its setup and use?

This Ubuntu help page  will show you how to install and configure MySQL server using CLI.

  mysql is just one database that is on the server? or can it contain
  several or many databases

MySQL is a Database Server and not a database.

MySQL is only one of the DB server and there are others such as PostgreSQL, Oracle, Derby, etc...

You can create multiple DBs using MySQL server.

  I understand that mysql comes with lamp? or ubuntu. I am thinking that
  it is already installed but not sure how to access it, but that is
  another question for later

No it does not come with Ubuntu by default. Some LAMP packages such as XAMPP come with MySQL.


Ubuntu 14.04 on Mac using live USB gives corrupt display

I have found a solution to my problem, after trying various different ideas (booting from DVD, changing USB drive etc.)

I tried installing Ubuntu 15.04 instead of Ubuntu 14.04 onto the live USB. This finally worked!


Counting number of non-sleeping processes of a given user

In the output of the command

ps -e -o user,state

the state is the last character in each line. So we basically
count the lines that contain the given username and then
neither end in an S nor in a D:

ps -e -o user,state | grep -c -E 'pduck.*[^SD]$'

This will find (or count) all lines that contain the word pduck
(my username) and don't end in S or D.

The -E is neccessary so grep understands the regular expression.

@steeldriver suggested
in a comment to "select the user with -u pduck and omit
it from the list of output fields altogether". I agree, this is even better,
but we then need to drop the -e switch because that would select all
processes (not only those of user pduck):

ps -u pduck -o state | grep -c -E '[^SD]$'


How do I use Photoshop via wine on Ubuntu 15.04?

You can use playonlinux.

sudo apt-get install playonlinux

then open playonlinux and click install
wait for it to download the list and then close playonlinux
then reopen it and click install, then install a non listed program, follow the steps.
Hope this helps


Thank you for your help @Helio, you were right about the program not being able to access the partition before it changed the file. However I don’t think it was a problem with not mounting before the program ran, I used NTFS Configuration tools to change the read/write settings and that fixed it.

To people having the same problem: Install NTFS Configuration tools(available in Ubuntu software centre) and change the setting of the partition to allow read write access.


Will functionalities that we are used to in the old shell be available in Unity?

These will still be available in Nautilus file manager unless the nautilus developers decide otherwise. They probably won't be available in Unity's inbuilt file launcher. However, you can still open Nautilus to manage your files. If nautilus isn't included by default (I assume it will be), you can install it from the Software Centre.

'Where's the line between the dash and the file browser?' is a similar question.


Installing nVidia driver on 13.04 64bit Macbook pro 7,1

I had a similar problem to Lijunda, and was getting a black screen.

I booted using recovery mode and purged the nivida drivers. After a reboot everything works fine.


Outbound FTP backup to Synology server from Plesk fails with CSF active

It dawned on me that the problem was that CSF was not allowing the FTP server to respond back. I added its IP address to the CSF - Allow file and now everything works perfectly.


For tree view:

Using the menus

Goto View -> Sidebar -> Tree

Using the command-line

gsettings set org.gnome.nautilus.window-state side-pane-view "tree"

This method would set it to default.

To open a directory in a new nautilus window:

Double-Click on the directory holding Shift.

To open a new instance of nautilus

Right click on the launcher icon for nautilyus and click on Open a New Window.


Below is a guide I found on Airvpn forums.
It was very helpful in understanding the same problem I had.

In the following quick tutorial I will try to give
you some guidance to get a simple setup (hopefully) working. This is only
for general guidance. Adjust addresses, port numbers and protocols as
needed. E.g. If your router is on a different IP-address then adjust the
rule to fit to your needs. Also if you want to connect to a different
VPN-server use the IP-address of the server you wish to use. The IP numbers
used here are only as an example.

Keep in mind that rule ordering is
important and the first match wins! The rule which is entered first will end
up higher in the list. At the end I will explain more about this (see point
8).

Open an terminal window and enter the following commands and adjust them
to your needs.
Use su to log in as root if you haven't or place sudo before every command.
the $ represents the prompt in the terminal.
Enable UFW.

$ ufw enable

This will enable the firewall and now you can add rules.
Set the default behavior to deny all incoming and out going traffic.

$ ufw default deny out
$ ufw default deny in

Now all in- and outgoing traffic will be blocked.
Add a rule to allow traffic to your router (only if this is needed).

$ ufw allow out to 192.168.178.0/24

This will allow traffic to the router/internal network which in this
case is located on 192.168.178.0/24. If your computer has multiple
network interfaces you can add the interface which you want to use. E.g.

$ ufw allow out on eth0 to 192.168.178.0/24

This will allow only connections to the internal network/router on eth0.
If eth0 is not connected and you use for example the wlan0 connection
UFW will block the traffic and you will not be able to connect to the
router/internal network, because only traffic from eth0 is allowed to
connect to 192.168.178.0/24.
Add a rule to allow traffic to 46.19.137.114 on port 443 with UDP
traffic. This is the AirVPN_CH-Virginis_UDP-443 server.

$ ufw allow out to 46.19.137.144 port 443 proto udp

This will allow UDP traffic on port 443 to the Virginis server
(=46.19.137.144). This is needed to connect to the VPN-server. You can
add more than one VPN-server by repeating the above rule and adjust the
IP-address to the server which you want to add. It is also possible to
specify different port numbers. Just change the port number to the port
number which is needed to connect to the VPN server. If the proto udp
part is omitted then tcp and udp traffic is allowed and if it's changed
to proto tcp then only tcp traffic is allowed.
Add a rule to allow in- and outgoing traffic over tun0. This is the
traffic from and to the VPN-server.

$ ufw allow out on tun0

Now it's possible for an application like the browser to connect to
different sites on the web. All the traffic will go through the vpn
server.
In the case that you use a bit-torrent client, you will also need to
allow incoming traffic from the port which is specified by you in the
bittorrent client (this is the port which is needed to allow peers/seeders
to connect to the bit-torrent client (NAT).

$ ufw allow in on tun0 from any to any port 54321

This will enable incoming traffic which is coming from different
IP-addresses (the peers/seeders which want to connect to your client) to
connect through the VPN-server connection (which is tun0 here). In this case
port number 54321 is used, adjust it the correct port number!
If you now enter.

$ ufw status verbose

You will get a numbered list which something like:

Status: active
Logging: off
Default: deny (incoming), deny (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
54321 on tun0              ALLOW IN    Anywhere

192.168.178.0/24           ALLOW OUT   Anywhere
46.19.137.114 443          ALLOW OUT   Anywhere
Anywhere                   ALLOW OUT   Anywhere on tun0

This shows you which rules are applied and what the status of the
firewall is. When you enter:

$ ufw status numbered

You will get a numbered list. It will look something like this:

Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 192.168.178.0/24           ALLOW OUT   Anywhere (out)
[ 2] 46.19.137.114 443          ALLOW OUT   Anywhere (out)
[ 3] Anywhere                   ALLOW OUT   Anywhere on tun0 (out)
[ 4] 54321 on tun0              ALLOW IN    Anywhere

This is a numbered list. It is important to know that the order of the
rules is important. If you allow something with rule number 1 which
allows for example all incoming and outgoing traffic, all the other
rules which are specified after that will have no effect!

And as a final notice I will also point to the possibility to delete and
insert rules. If you enter:

$ ufw delete 1 # and confirm of course

Rule number 1 will be deleted and all the other rules which followed
rule 1 will shift up in this example the list will look something like
this (after $ ufw status numbered):

Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 46.19.137.114 443          ALLOW OUT   Anywhere (out)
[ 2] Anywhere                   ALLOW OUT   Anywhere on tun0 (out)
[ 3] 54321 on tun0              ALLOW IN    Anywhere

And if you want to add a rule on a specific spot it is possible by using
the insert command. E.g. we want to add a second VPN-server so we can
choose a different one in the case one is down (could happen you know
:-)) or if we want options. The command would look like this;

$ ufw insert 2 allow out to 119.81.1.122 port 443 proto tcp

this will add the SG-Sagittarii server

Now on spot number 2 there is a new rule inserted. The other rules will
shift down. We can generate a new list:

$ ufw status numbered

And the list will look like:
    Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 46.19.137.114 443          ALLOW OUT   Anywhere (out)
[ 2] 119.81.1.122 443/tcp       ALLOW OUT   Anywhere (out)
[ 3] Anywhere                   ALLOW OUT   Anywhere on tun0 (out)
[ 4] 54321 on tun0              ALLOW IN    Anywhere

This concludes the tutorial. Use it to you benefit and I hope some things
get a little bit clearer. Make the appropriate changes for you setup and
expand on it. And again the GUI version is nice, but the command-line
version is beter, it only takes a little bit of time to get used to it.


Well first I'd move your turn on/off logic into scripts:

Contents of /usr/local/bin/tv-turnon:

#!/bin/bash
DISPLAY=:0 xset dpms force on && DISPLAY=:0 xset s reset

Contents of /usr/local/bin/tv-turnoff:

#!/bin/bash
DISPLAY=:0 xset dpms force off

Make them runable

chmod +x /usr/local/bin/tv-turnon
chmod +x /usr/local/bin/tv-turnoff

And then setup cron to run them according to your schedule crontab -e

0 7 * * 1-5 /usr/local/bin/tv-turnon
0 17 * * 1-5 /usr/local/bin/tv-turnoff

(this will run in vi by default, if you're not familiar i to start inserting text :wq to save and exit)


Why I do not know, but I had some libgimp stuff in usr/share/loca/lib .  After removing this gimp works fine and can import pdf files.


Move all lowest-level subdirectories (but NOT mid-level directories or files) to a target directory

Assuming you are on a file-system where leaf directories have exactly 2 hard links, you can use a combination of find, xargs and mv like so:

$ find . -type d -printf "%n %p\n"                   \
    | grep '^2 '                                     \
    | perl -ne 'chomp; s/[0-9]+\s+//; print "$_\0";' \
    | xargs -0 -I'{}' mv -v '{}' /target/

This uses find to find only directories and print the number of hard links those directories have.

Then we use grep to remove any that aren't "leaves".

Next we use Perl to chop off the hard-link count, and print the files separated by \0.

Finally that lets us use xargs with the -0 flag to move the found directories into the target directory.

Using nulls (\0) rather than newlines or spaces is important for files with spaces in them. If your directory names are guaranteed not to have spaces in them you might be able to simplify slightly.

$ find . -type d -printf "%n %p\n" | grep '2 ' | cut -d " " -f 2 | xargs -I'{}' mv -v '{}' /target/

But it's probably better to be safe than sorry.


Virtual hosts not working Ubuntu both sites direct to the same root 14 LTS and apache 2.4.7

What I found was that for each virtual host configuration...

/etc/apache2/sites-availiable/doamin1.com.conf

and

/etc/apache2/sites-availiable/doamin2.com.conf

<VirtualHost *:80>

*//configriation*

</VirtualHost>

I changed /etc/apache2/sites-availiable/doamin1.com.conf to look like this

<VirtualHost domain1.com:80>

*//configriation*

</VirtualHost>

and /etc/apache2/sites-availiable/doamin2.com.conf to look like this...

<VirtualHost domain2.com:80>

*//configriation*

</VirtualHost>

I think that this is because both files were looking for the *:80 directive in the opening line of the block. This then caused the server to revert to the first conf file and used the "DocumentRoot" in that virtual host block.


How to create a new folder, with Nautilus configured to view items as list

The File menu still has the "New Folder" entry, and you can also use the keyboard shortcut CtrlShiftN.

If you're using GNOME Shell, the hamburger menu (the three bars on the top right) has the relevant entry:


Safely close virtualbox machine on host reboot

In case you really need to shutdown while a virtual machine in Virtual Box is running you could define your own script for a manual shutdown where you place a command to save the machine state before the shutdown process starts:

VBoxManage controlvm <name> savestate # <name> is the name of your VM
gnome-session-quit --power-off # this example displays the power-off dialog for >11.10

Alternatively you could also generate a script that always runs at shutdown.


How to copy text from PDF and paste it to other application preserving text format?

That is not possible in general.  Not even with Acrobat Reader Pro. Adobe recommended saving as Word doc or HTML.  Evince or Okular will allow you to copy and paste using the from the viewer in utf8 but that discards formatting, mostly.

As you said, the best bet might be to use the LibreOffice import which tries to preserve many features of pdf format that map on to odf.  Also,  you can use the pdftk tool to select specific pages from a larger pdf file and then import them into LibreOffice.


External monitor ubuntu 13.04 for NVIDI quadro 1000M on W530

My W520 has the same graphics card. I am using RHEL 6.4 so hopefully the solution is the same. You have to enter the BIOS and select discreet graphics only. Then make sure you are using the latest proprietary drivers available. Once the proprietary drivers are installed you will need to enable twinview. For more information on twinview please see https://help.ubuntu.com/community/NvidiaMultiMonitors


Create a bootable ubuntu backup partition

Just for note. There is many good methods that provide backing up your system, some of them also provide incremental backups.

Answering exactly what you want step by step

As I can see from your df -h output, you do not distribute your /boot, /usr, /var and other folder to a different partitions. So

1.
First of all you should create your Live CD or bootable USB stick with Ubuntu. Here is guide for Live CD and for USB stick.

2.
Now boot Ubuntu from CD or USB, you should see a menu with "Try Ubuntu without any change to your computer" at the top. In loaded Ubuntu open gnome-terminal (Ctrl + Alt + T), and run sudo gparted. Create new 55Gb ext4 partition using this tutorial. Remember this new partition name, it should something like /dev/sda6.

3.
Now you should mount your new successfully created partition (Lets say /dev/sda6) and your previous partition /dev/sda5. And copy all your files and folders hierarchy. Open gnome-terminal and do this line by line:

sudo mkdir /media/old_partition
sudo mkdir /media/new_partition
sudo mount /dev/sda5 /media/old_partition
sudo mount /dev/sda6 /media/new_partition
sudo cp -ax /media/old_partition /media/new_partition

This last command can work very long. Do not interrupt it. It should output nothing at the end if everything is ok.

Little quote from this guide.

cp -ax / /new-disk

This is the simplest method, but will only work if your original Linux system is on a single disk partition.
The -a option preserves the original system as much as possible. The -x option limits cp to a single file system; this is necessary to avoid copying the /new-disk and /proc directories.

4.
Now you need to update fstab in your new backup partition.

Find UUID of /dev/sda6 (new partition):

sudo blkid /dev/sda6

Find UUID of /dev/sda5 (old partition):

sudo blkid /dev/sda6

Then edit /media/new_partition/etc/fstab:

sudo gedit /media/new_partition/etc/fstab

And substitute UUID of /dev/sda5 to UUID of /dev/sda6. Be carefully, substitute only UUID.

5.
Now adding new entry to grub menu. Open /media/old_partition/etc/grub.d/40_custom using gedit and add this at the
end of the file:

menuentry "Boot backup Ubuntu" {
    set root=UUID=XXXX-YYYY
        linux /vmlinuz root=UUID=XXXX-YYYY ro quiet splash
            initrd /initrd.img
    }

Where XXXX-YYYY is UUID of new partition (/dev/sda6).

6.
Unmount everything and reboot. Before do this close everything what you have opened (gparted, gnome-terminal, gedit, others).

sudo umount /dev/sda5
sudo umount /dev/sda6
sudo reboot

Remove your LIVE bootable device.

Now you should see new entry in your grub boot menu.

Notice that this method do not backing up other than / mount points, such as /home, /var, /usr others, if they distributed between partitions. In such situation you should do steps 2-4 for each partition.


Don't kill it. The host NTFS partition is mounted as /host.

Running df will show you, for example, in this case the host partition is /dev/sda3

bcbc@ubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       15G  7.3G  7.0G  51% /
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           751M  920K  750M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  416K  1.9G   1% /run/shm
/dev/sda3       295G  113G  183G  39% /host
bcbc@ubuntu:~$


From your nova-conductor logs, there is no defined network for the corresponding user. You can find more information in neutron logs. This may occur due to IAM(roles and access rights).

One suggestion is create new private(internal) network by the user(rm@mail.com) then try to create VM on the newly created private network.


How to script the startup of an app using multiple precursory values?

Something like:
newhost=$(ngrok http https://localhost:3000 | \
    grep -E '^Forwarding\s+https://' | \
    grep -E  -o '[0-9a-f]{12}\.ngrok\.io`)

if [[ -n "$newhost" ]] ; then
    echo "$newhost" >>config.hosts
    rails server ...(the rest)
else
    echo "Failure in ngrok" >&2
fi

Read man grep bash.


I answered this question for someone else here.

Absurdly, one of the moderators gave my answer a -1, even though the questioner thanked me because my answer solved his problem.

Anyway, I suggest giving it a try to see if it helps.  FYI, the wireless card in the previous question was a Broadcom 4312 LP-PHY, but I think the patch will work either way.  Good luck!

And - moderators - go ahead and mark down my answer again.  Zero reputation is just another word for having nothing left to lose.


Will executing small-med updates on Windows 10 in a dualboot system (single SSD, partitioned) brick the Ubuntu partition?

Well, I do have Ubuntu and Windows installed in dual-boot on the same drive and I just updated Windows yesterday and have not experienced any issues whatsoever in both Ubuntu and Windows partitions because of this.


Canon MG2550 printer: "check your printer configuration"

I was able to download a printer driver for my Canon MG2500 printer from the following webiste:
https://www.canon.co.uk/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg2550.html?type=drivers&language=en&os=linux (64-bit)
If the install.sh scripts don't work, use dpkg -i for your respective architecture.


As you say in the comments:

  The program 'git' is currently not installed. You can install it by typing: sudo apt-get install git

Read the error messages before you continue.

To clone a Git repository, you have to install git

sudo apt-get install git

Now run the commands below in the same folder

sudo apt-get install linux-headers-generic build-essential dkms
git clone https://github.com/pvaret/rtl8192cu-fixes.git
sudo dkms add ./rtl8192cu-fixes
sudo dkms install 8192cu/1.10
sudo depmod -a
sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/


`df` command throws error on /run/user/1000/doc/ folder

As far as I can tell this is a flatpak bug, see:
$ systemctl --user status xdg-document-portal.service
● xdg-document-portal.service - flatpak document portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-document-portal.service; static; vendor preset: disabled)
     Active: active (running) since Thu 2020-06-04 11:44:00 IDT; 13min ago
   Main PID: 19879 (xdg-document-po)
      Tasks: 7 (limit: 16579)
     Memory: 2.7M
        CPU: 20ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/xdg-document-portal.service
             ├─19879 /usr/libexec/xdg-document-portal
             └─19887 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc

$ df -h > /dev/null
df: /run/user/1000/doc: Operation not permitted

$ systemctl --user stop xdg-document-portal.service
$ df -h > /dev/null
$

So flatpak fusermounts to allow exporting files to sandboxed applications:
Flatpak Command Reference - Flatpak  documentation


I want to confirm this issue since I installed Ubuntu 12.10 with the bcm4312 firmware wifi radio, B43 driver and WPA2 encryption.

I have a Dell Studio 1725 which has built-in Broadcom BCM4312 802.11b/g LP-PHY (rev 01) wifi radio. It will not connect to an Access Point using WPA2 encryption only, WPA/WPA2 mixed mode works fine. I use the current 3.7 Mainline Kernel.

I have been forced to use a ralink USB wifi radio to connect to my WPA2 AP.

$ lsmod | grep b43:
b43                   387883  0
mac80211              569499  4 rt2800lib,rt2x00usb,rt2x00lib,b43
cfg80211              217733  3 rt2x00lib,b43,mac80211
bcma                   40258  1 b43
ssb                    52833  1 b43


Can I Install A Program To Just One Directory?

Not really the way you envision - packaged software is usually intended for all users.

You can, after install, move the binary from a public location like /usr/bin/foo to a private location like /home/USERNAME/bin/foo. And you can chmod the permission so only you can execute it. However, these actions will break (for example) apt: No package upgrades, no simple path to clean uninstall, and any error aborts the entire apt queue.

Consider instead either 1) Manually installing from source, so you can contain your customizations, 2) Using AppImage versions the software, which do remain in one place, or 3) Using a private LXC/D container or VM so you can use apt/pip.

Of course, with Python, you can also use 4) virtualenv (venv).


How to change PrtSc key to right-click in Ubuntu 17.10?

Xmodmap is deprecated for recent Ubuntu versions and because it does not persist when rebooting/suspending/changing tty, it is better to hack the X keyboard extension, or xkb.

To do so:

First, make a backup copy  of your original file /usr/share/X11/xkb/keycodes/evdev
Edit the file and set

alias <MENU> = <PRSC>;

instead of what was defined before. It will assign the keycode assigned to <PRSC> to <MENU>.
Reboot, or restart Xorg.

Hence under X.Org server, your PrSc key becomes a Menu Key and it does persist in any case.


My boot drive says there is less space than actual

To get the actual space a partition or a file takes on the disk use du command. For example:

du -sh /boot  ##Will show the actual size on the disk /boot takes
du -sh /boot/grub/  ##Will show the actual size on the disk /boot/grub takes

The output ls -lah /boot needs some explanations:

Its basically show the literal file size. For example if a text file is 700 Bytes then it will show 700 bytes as the file size but e.g. in ext4 filesystem a file takes 4K space at minimum (block size) on the disk. So, ls is not showing what disk stores.
ls will show the directory entries as the block size your filesystem has (this is happening in your case), but actually the directory can contain files/directories having the size of MB/GB range. To get the actual size of a directory on disk use du command.

See man du for more info.


Just delete the .steam folder(hidden)... press ctrl+h to show hidden folders, then delete .steam in your home directory, and re-install steam through wherever you got it in the first place. Follow the setup instructions, then viola!


Good way to copy ALL files from a Windows drive to external HDD if I don't know where important files may locate?

I would suggest you use the rsync command to do this. Copy-pasting is not useful in case your operation fails and you need to resume at some point. Moreover, rsync can tell you what it is doing. The command would be rsync -azv --progress /old-location /new-location. If the rsync command fails for some reason, just repeat the command. Rsync will happily move all files, including hidden files. If the rsync command (after a repeat) no longer copies anything, you can be certain that all files have been copied. Only filenames with special characters (like é or ñ) may in some cases be modified.


Is there any way to make the screensaver stop, while Skype is in progress?

This command disables screen locking in Ubuntu:

gsettings set org.gnome.desktop.lockdown disable-lock-screen true

You could skip the second script and just do:

#!/bin/bash
skype &
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
{
    while pgrep -x skype >/dev/null; do
        sleep 1
    done
    gsettings reset org.gnome.desktop.lockdown disable-lock-screen
} &

Edit:

For Xubuntu there are four commands to disable screen locking:

gsettings set apps.light-locker light-locker-enabled false
gsettings set apps.light-locker late-locking false
gsettings set apps.light-locker lock-on-lid false
gsettings set apps.light-locker lock-on-suspend false

I don't know if all four are needed, but those are the ones which are used for the guest session.


Bash login script with zenity for CIFS mount

I would do it like this:

#!/usr/bin/env bash

## Define a function that launches the zenity username dialog
get_username(){
    zenity --entry --width=300 --title="Mount $MOUNTDIR" --text="Kasutajanimi:"
}
## Define a function that launches the zenity password dialog
get_password(){
    zenity --entry --width=300 --title="Mount $MOUNTDIR" --text="Parool:" --hide-text
}

## Attempt to get the username and exit if cancel was pressed.
wUsername=$(get_username) || exit

## If the username is empty or matches only whitespace.
## See http://www.tldp.org/LDP/abs/html/string-manipulation.html
## for an explanation of this syntax. The . means any non-space
## character so when this is less than 1, the username is empty
## or just whitespace. Since this is a while loop, the process
## will be repeated until the username is correctly submitted.
while [ "$(expr match "$wUsername" '.')" -lt "1" ]; do
    zenity --error --title="Viga kasutajanimes!" --text="Palun sisestage oma kasutajanimi"
    wUsername=$(get_username) || exit
done

## Same as the previous loop but for the password. Sorry if
## the message is wrong, I don't speak this language :)
wPassword=$(get_password) || exit

while [ "$(expr match "$wPassword" '.')" -lt "1" ]; do
    zenity --error --title="Viga Parool!" --text="Palun sisestage oma Parool"
    wPassword=$(get_password) || exit
done


It seems unlikely that just adding a repository would have removed you from sudoers (or more likely, the admin group).
Are you still in the admin group?
Simply run groups from a terminal. You should see a list come out. You're looking for the word admin. If that's in there, this isn't your issue.
The easiest way to restore your sudo rights is to reboot in recovery mode (hold left-shift at boot, select a recovery mode kernel, boot to the root prompt). Once in there you might be able to run (swap oli for your username) :
adduser oli admin

But I've seen some thing that suggest this might not work from a recovery console. Try it. If that doesn't work, or you want to check, run nano /etc/group
Look for the admin group and add your username to the end, like so:
admin:x:115:oli

You should then be able to reboot and be in the right group.
Has something melted /etc/sudoers?
Unfortunately you can't read /etc/sudoers unless you're root. So back to recovery mode (as above). Once you're in there run nano /etc/sudoers. You're looking for a pair of lines like this:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

If that's there, this isn't your problem. If it's commented out or missing, whack it back in there!


How do I digitally sign a PDF with a S/MIME certificate?

Your only option is Portable Signer. Download it and run the jar. It requires a private key in a p12 file though (not compatible with SmartCard).

You might expect Ubuntu document signing tools like qdigidoc or gpg would do, but no, they don't play with PDF signatures.

You might then expect Ubuntu PDF manipulation tools like qpdf, which provides encryption, or pdftk, which provides watermarking, to provide signing features too, but, no, they don't.

The total list of opensource tools available for your purpose is:
http://wiki.cacert.org/PdfSigning

Unfortunately, none of the tools is currently maintained and none can be found in Ubuntu packages. Portable Signer is the most well maintained of all.

Portable Signer hasn't been updated since 2014 - this is the most well maintained among all.
jSignPdf hasn't been updated since 2013.
jPdfSign hasn't been updated since 2006.
CACert's PdfSigner uses outdated iText tool.
OpenSignature hasn't been updated since 2008.
Footprint's link is broken.
jPDFSecure (commercial) – updated in 2017 but it is a Java library not a user tool.


Can't set maximum resolution on an LG Flatron L177WSB

You can set resolution using following command.

xrandr --output VGA1 --mode 1440x900

You have to change VGA1 according to xrander properties of your computer. You can find it by the second line of your xrandr output.

If 1440x900 mode is not in your xrandr you have to manually add it by using the commands below.

gtf 1440 900 85

85 is the refresh rate. Then the output would be some thing like this,

# 1440x900 @ 85.00 Hz (GTF) hsync: 80.33 kHz; pclk: 156.79 MHz
  Modeline "1440x900_85.00"  156.79  1440 1536 1696 1952  900 901 904 945  -HSync +Vsync

To add a new mode use the command below with the above output without 'Modline' word

xrandr --newmode "1440x900_85.00"  156.79  1440 1536 1696 1952  900 901 904 945  -HSync +Vsync
xrandr --addmode VGA1 1440x900_85.00

Then to use it type command below.

xrandr --output VGA1 --mode 1440x900_85.00


How to automatically kill / terminate process as soon as it is launched?

A cron job won't work as the standard version does not support execution frequencies higher than 1 Hz (every 1 second). Plus, as you already mentioned, saving your credentials into a file is usually a bad idea


up grade to ubuntu 15 without loosing apps installed

14.5 LTS

That is not an existing version. I assume you mean 14.04 LTS?

  LTS

That is not an existing version. I assume you mean 16.04 LTS?

  Can it possible ?

Yes. But I suggest you make a backup of your data. Success depends largely on your accuracy and handling of the upgrade when the upgrade show errors or possible input you need to provide.


How to upload a file from Google Colab to GitHub or Kaggle?

To add a file to a Git repository and upload it to GitHub please refer to its official help articles Creating a new repository, Cloning a repository, and Adding a file to a repository using the command line. I’ll include the most important steps below:

Install Git:

sudo apt install git

Create a repository on GitHub.
Import (or “clone”) the Git repository and enter its top directory:

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
cd YOUR-REPOSITORY

Place the desired file into the repository directory (or one of its sub-directories) e. g. by moving or copying it from another place or downloading it from an external resource.
Add the file to the Git repository:

git add my-file

Commit the changes to the repository:

git commit --message="Add my-file"

Upload (or “push”) the committed changes to the upstream repository (here: at GitHub):

git push

Obviously you don’t need to repeat steps 1–3 if you did them before.


Downloading Dropbox from terminal with wget makes command crash.-UBUNTU SERVER 12.04

That's because -O - tells wget to write the file content to stdout (your terminal) instead of saving it to a file.

The actual instructions at https://www.dropbox.com/install?os=lnx, say:

32-bit:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -

64-bit:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

which has wget output the file contents (which is a gzipped tar archive) to a pipe with a tar command on the other end. And the tar is told to read a gzipped archive from stdin (-f -).

On a side-note, using the debian package is easier.


xdotool - how do I select text using shift+Home or shift+End?

Try the following:

xdotool keyup Shift+Super+Left key shift+Home

The keyup statement will release the hotkey you are pressing before simulating pressing the key combination shift+Home.


Ramdisk / tmpfs which does not remove subfolders and symbolic links on reboot

A reboot is not required to empty out a tmpfs mount. If you mount a tmpfs mount, then populate it (for example, create a subdirectory underneath the mount), then umount it, your subdirectory is gone (if you redo the mount, it starts out empty). If you want persistence across mounts (let alone reboots), tmpfs by itself will not suffice.

One way to use tmpfs in such a way that the mount is initially nonempty is to use OverlayFS, with a nonempty lower directory, and a tmpfs mount as the upper directory.

Your question says that the symlink disappears as a result of the reboot, but I don't believe that's what happens. The symlink, in a persistent directory, points at a (possibly non-existent) directory in the tmpfs mount.

A simpler approach which might suit your purposes is to replace the symlink with a tmpfs mount point,  using something like this:

rm /home/ubuntumaster/streamer/stream
mkdir /home/ubuntumaster/streamer/stream
sudo mount -t tmpfs -o size=2048M tmpfs /home/ubuntumaster/streamer/stream

If you choose to use /home/ubuntumaster/streamer/stream as a mount point rather than a symlink, the /etc/fstab for that might look like this:

tmpfs /home/ubuntumaster/streamer/stream tmpfs rw,size=2048M 0 0

If you prefer to use a symlink, the target of the symlink can be the tmpfs mount point; that might look something like this:

sudo mkdir -p /media/stream
sudo mount -t tmpfs -o size=2048M tmpfs /media/stream
ln -s /media/stream /home/ubuntumaster/streamer/stream

You can avoid problems during reboot by testing changes to /etc/fstab using the mount command before you reboot. In the case where /home/ubuntumaster/streamer/stream is not a symlink, that might be this (after editing /etc/fstab):

sudo mount /home/ubuntumaster/streamer/stream

If, say, you mistakenly skip the mkdir, mount will complain about the missing mount point.


Why apt-get prompt me to run -f install and it cannot be run properly?

Use the following command in terminal

sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

If you get the same error try:

sudo dpkg --configure -a
sudo apt-get -f install


It's not running.  What you're seeing is the grep command that you're executing.  When it's done, the process doesn't exist anymore.  If you replace nginx with any other word (elephant, etc), you'll see the same result.

What error do you see when you try to start nginx?


There is no keyboard layout named Tai Viet. You can make some extra keyboard layouts available in Text Entry by running the command:

gsettings set org.gnome.desktop.input-sources show-all-sources true

You may also want to install the ibus-m17n package, which (next time you log in) will make a few IBus input methods available for typing Tai and Vietnamese languages.


How to enable global menu for a specific application?

Inspired from here:
DISABLE THE APPMENU (GLOBAL MENU) IN UBUNTU
you can do this to disable global menu for all applications first:

sudo su
echo "export UBUNTU_MENUPROXY=0" > /etc/X11/Xsession.d/81ubuntumenuproxy

Then restart your computer.

And then you can change the ".desktop" files of WebApps and add "UBUNTU_MENUPROXY=1" in the "Exec=..." line. Something like this:

Exec=UBUNTU_MENUPROXY=1 the_command_here

the "*.desktop" files are either here:

/home/USERNAME/.local/share/applications

where you replace USERNAME with your username
or here:

/usr/share/applications


Change language to arabic without changing window/GUI alignment

As Arabic is an RTL (right-to-left) language, you cannot. The UI elements are changed position, because that is how they are supposed to be displayed, in order to fit the right-to-left orientation of the language.

Another answer on UX StackExchange has some more info on why it is necessary.


You are missing the package x-ttcidfont-conf. A simple sudo apt-get -y install x-ttcidfont-conf should solve the problem.


IMHO the standard procedure to do such a task is to use the command usermod and not to mess with the os files...
Have a look at usermod


First, I recommend you go into your firmware and disable Secure Boot, if you haven't already done so. This isn't always required, but Secure Boot seems to cause a lot of problems with many Ubuntu installations, so IMHO it's best to disable it. This will not solve the specific problem you're reporting, though.

Second, do one of the following things:

In Linux, install my rEFInd boot manager. There's a Debian package that you can install quite easily. The result is that when you reboot, you should see rEFInd rather than GRUB. rEFInd should enable you to boot Windows or Linux (and to boot Linux either directly or via GRUB).
In Linux, install and run the Ubuntu Boot Repair tool. This should fix your problem, but it will probably leave stray and non-functional boot entries. Some users find that it doesn't create bootable Windows entries, but it does for others.

If you try Boot Repair first and it doesn't work to your satisfaction, be sure to run it again and restore the backup files it created before trying rEFInd. There's an option in the advanced menu of Boot Repair to restore its backup files.


Is there one file that all Desktop Managers (GNOME, KDE, XFCE and etc) are required to read/execute when users login?

If you are trying to get a script to run on login, just add it to your startup programs (system>preferences>startup applications).

Anything you add to this will be read by all 3 of the D.E.
For example you could write a script in /home/username/bin, and add this to your start up programs.


I have put a file called resolution.conf in /usr/share/X11/xorg.conf.d to set the resolution. Put the resolution of choice in front. This works very well in virtual machines so should work on your box. The code is as follows:

Section "Screen"
   Identifier      "Default Screen"
   Device          "geforce256"
   Monitor         "S/M 950p"
   DefaultDepth    24
   SubSection "Display"
           Depth           16
           Modes           "1440x900" "1600x1200" "1024x768" "640x480"
   EndSubSection
   SubSection "Display"
           Depth           24
           Modes           "1440x900" "1600x1200" "1024x768" "640x480"
   EndSubSection
EndSection

Create the file in e.g. /home/username/file_of_choice.
Now open a terminal and go into the directory: cd /home/username/file_of_choice after this copy the file to /usr/share/X11/xorg.conf.d sudo cp resolution.conf /usr/share/X11/xorg.conf.d you will be asked for your password.

Reboot and the chosen resolution should work.

Make sure you choose a resolution that your screen can handle otherwise you will have no easy way to correct the mistake.

PS) If you only want to add a file (after you made it) use the last part of my instruction, or open Nautilus by typing in terminal:gksu nautilus (from Ubuntu 13.04 and up pkexec nautilus if I'm correct) and create the file directly in the right directory.


Thinkpad T440 trackpad multitouch not working

You need to upgrade kernel. Run in terminal

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

and reboot.


My Bluetooth crashes whenever I skip a song on Rhythmbox

Found the solution shortly after posting sorry for all the fuss!

For others with this issue, I installed Pulse Audio Volume Control as suggested here No sound from bluetooth headset, but it's detected

I just had to switch the Rhythmbox output, which was still going to my computer speakers for some reason even though the system sounds were correctly going to my headphones.


Weather this solves the problem or not I dont know, but you compile the drivers by downloading them

uncompress and run

make
sudo make install


Poorer battery life after kernel upgrade: 4.5.2 (16.04 LTS)

You have installed TLP to extend the battery life on your laptop, but are still getting poor battery life.  When you look at the output of tlp -stat output you found the error message x86_energy_perf_policy: program for your kernel not installed.

When you attempt to install the energy performance policy by sudo apt-get install linux-tools-generic the install appears to work but does not have any effect.

I have looked at the code for x86_energy_perf_policy and I could see no issues with it. It does not appear to be kernel specific so it looks like x86_energy_perf_policy which is part of linux-tools-common is not linked into the kernel properly.

This will have a big effect on battery life for laptops with Intel CPUs since the default policy is to maximise performance at the expense of energy expenditure (and hence battery life).

I may be wrong and x86_energy_perf_policy could be depreciated and TLP has yet to catch up but this looks like a serious kernel bug. I could attempt to patch your kernel to resolve this, but this issue will effect this and subsequent versions of the Linux kernel until it is resolved so I suggest you raise a bug by entering ubuntu-bug at a terminal. Feel free to paste parts of this answer into your bug report if this helps.