Here's one way to do it:

time=$(($(date -d"1776-07-04 00:00:00" +%s) - $(date +%s)))

sets a time variable you can use like so:

echo $time
-7595723059

The +%s tells date to format to seconds since 1970-01-01 00:00:00 UTC which helps give us a starting point for doing the math in seconds.

Now it can also be added to a script with the same variables.

:~$ time=$(($(date -d"1776-07-04 00:00:00" +%s) - $(date +%s)))
:~$ printf '%dh:%dm:%ds\n' $(($time/3600)) $(($time%3600/60)) $(($time%60))
-2109923h:-12m:-55s

If you want Years:Days:Hours:Minutes:Seconds since, it would be the following:

printf '%dy:%dd:%dh:%dm:%ds\n' $(($time/60/60/24/365)) $(($time/60/60/24%365)) $(($time/3600%24)) $(($time%3600/60)) $(($time%60))

Which would give you output like the following:

:~$ time=$(($(date -d"1776-07-04 00:00:00" +%s) - $(date +%s)))
:~$ printf '%dy:%dd:%dh:%dm:%ds\n' $(($time/60/60/24/365)) $(($time/60/60/24%365)) $(($time/3600%24)) $(($time%3600/60)) $(($time%60))
-242y:-11d:-7h:-46m:-37s

Hope this helps!


Unlock screen in 14.04 without `gnome-screensaver-command`

This worked for me:

  On the command line:

  gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true

  The on-screen keyboard appears when you first sign-in but you can close it.

After this gnome-screensaver-command -d works.

Taken from benshayden on https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/1307163


Can Evolution and Thunderbird share an addressbook?

Yes, Thunderbird uses EDS by default in 11.10, which means that it is shared with Evolution. EDS currently has issues with DesktopCouch addressbooks, but others seem to work nicely.


bash script to delete last 10 lines in histroy

There are several errors.

i= history | wc -1

You've got spaces in here so you'd need to wrap this in "" to avoid an error, and additionally you've added an unneeded space after the equal sign. However, all you've done is create a variable containing "history | wc -1". Firstly, there is no "wc -1". I think you meant "wc -l", which counts the lines. Secondly, I think you wanted to actually run this command.

You could use:

i=$(history | wc -l)

However, it's always going to be 0 as the result, because you're in a subshell.

j= $i-10

You've added a space after the equal sign. You could use "j=$i-10", but that's not actually going to do any math.

Try something like:

j=$(echo "${i}-10" | bc -l)

You're probably going to want to write an if statement to handle senarios where i is 10 or less.

Try something like:

if [[ "$i" -lt "11" ]]; then j="1"; fi

for x in {$i..$j}

You can't use variables here. The result will be #..# instead of a list of numbers. You could get around this problem by creating a one-liner for do done statement that is echoed into a variable and then use eval to actually execute it. This way the $i and $j will already have been replaced with the actual numbers when the command is run.

Ultimately though, the entire approach is pointless, because when you run the history command in the shell script you're going to get zero as the result of the count, because you're in a subshell, and subshells do not report their history. To see what I mean, run several commands, and then run this script:

#!/bin/bash
history | wc -l

As you can see, the result is 0. Why? Because it's the history of the subshell, and the subshell doesn't report history. Even if you add other commands into the script before the history command, the result will be 0.

Start over. Look into editing the history file directly as @kos has suggested. Keep in mind commands from the current shell aren't written to the file until the shell exits.

Good luck.


How to set-up Xubuntu to show Applications menu on desktop right-click?

You have to disable all desktop icons in the Desktop configuration dialog in the Icons section. This will make the Application menu your right-click menu.

Unfortunately you can't have both.


VertTwoFingerScroll and VertEdgeScroll not settable via xorg.conf

Just to repeat my previous comment: Nikita Volkov's answer:

Run dconf-editor (apt-get install dconf-editor if you have to install it), go to org.gnome.settings-daemon.plugins.mouse, uncheck active.


Lenovo finger print reader already claimed

I encountered the same error. Simple solution: Stop the fingerprint daemon.

sudo service fprintd stop

Previously I enrolled fingerprints using the terminal. Later I tried to handle everything in the Settings GUI, where the error occured.


Settings -> Universal access -> Typing -> Screen Keyboard
sudo apt update && sudo apt upgrade

Maybe this will work?


This is telling you that indicator-datetime isn't listed in the repositories in your sources. You may need to check that this package is available for your version of Ubuntu and/or add the required repository.

See What does Package <package> has no installation candidate mean? for a better explanation.


could not install the upgrades the upgrade has aborted. your system is in an unusable state. a recovery will run now (dpkg -configure -s)

After reading this, I decided to use nano and delete the whole block. Then I ran dpkg --configure -a, and this fixed my broken package.


How to grep for two patterns in multiple files

The following command can print out when the file matches the search criteria:

grep -Zril 'String1' | xargs -0 grep -il 'String2'

Here is an example:

~/tmp$ ls
Dir1  Dir2  File1  File2

cat File1
AccessToken is not here
Registrationrequest it is here

cat File2
iAccess
ByteMe Registrationrequest

I copied both File1 and File2 into the Dir1 and Dir2 for testing:

~/tmp$ grep -Zril 'AccessToken' | xargs -0 grep -il 'Registrationrequest'
File1
Dir2/File1
Dir1/File1

Then if you want to see what is in the files add the following to the end of the search:

xargs grep -E "AccessToken|Registrationrequest"

Example:

~/tmp$ grep -Zril 'AccessToken' | xargs -0 grep -il 'Registrationrequest' | xargs grep -E "AccessToken|Registrationrequest"
File1:AccessToken is not here
File1:Registrationrequest it is here
Dir2/File1:AccessToken is not here
Dir2/File1:Registrationrequest it is here
Dir1/File1:AccessToken is not here
Dir1/File1:Registrationrequest it is here

Hope this helps!


Openconnect GUI: The service providing the VPN connection was stopped

Try to make following changes:

sudo ufw disable
sudo nano /etc/sysctl.conf

Add the following at the bottom of the file:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

You NEED to restart!

After the restart, all VPN connections work straight away!


What is this type of command: command-name > &! file-name

The only shell that I know of in which > &! is valid is (t)csh. From man tcsh:

   > name
   >! name
   >& name
   >&! name
           The  file  name  is used as standard output.  If the file does
           not exist then it is created; if the file exists, it is  trun‐
           cated, its previous contents being lost.

           If the shell variable noclobber is set, then the file must not
           exist or be a character special  file  (e.g.,  a  terminal  or
           `/dev/null') or an error results.  This helps prevent acciden‐
           tal destruction of files.  In this case the `!' forms  can  be
           used  to suppress this check.  If notempty is given in noclob‐
           ber, `>' is  allowed  on  empty  files;  if  ask  is  set,  an
           interacive confirmation is presented, rather than an error.

           The  forms  involving `&' route the diagnostic output into the
           specified file as  well  as  the  standard  output.   name  is
           expanded in the same way as `<' input filenames are.

Ex. if file exists but nofile doesn't, then

$ csh -c 'set noclobber; ls -l file nofile > & outfile'
$ cat outfile
ls: cannot access 'nofile': No such file or directory
-rw-r--r-- 1 steeldriver steeldriver 70 Nov 22 15:10 file

Then

$ csh -c 'set noclobber; ls -l file nofile > & outfile'
outfile: File exists.

But adding !

$ csh -c 'set noclobber; ls -l file nofile > &! outfile'

succeeds. So the ! has a somewhat similar meaning to that in vi.


"Problem occurred when checking for updates" and now I can't use terminal

You can press Ctrl+Alt+F1, login to console and run there

sudo apt-get install -f
sudo apt-get update
sudo apt-get upgrade


there is no package with name libstdc++  see here.  i think you are looking for libstdc++6.so install using
sudo apt-get install libstdc++6

or
if you looking for another library that is missing in your system then search which package have that library and install or extract that package and copy library directly .


Have wrecked current 14.04 installation. Want to reinstall

sudo dpkg -l | grep linux-image

this will display the kernels
    purge the newer one by this

sudo apt-get purge linux-image-3.13.0-76-generic

update grub by this

sudo update-grub

  change the version with your one

but first check if you can boot into the machine with older kernels selecting an older kernel from the advanced option in grub


Ubuntu 15.10 - jboss wildfly 9.0.2.Final, Eclipse Mars crash due to JVM error

I had the exact same problem as you experienced.

Turns out a RAM memory module in my machine was broken. After removing the broken memory module everything went back to normal.


step by step how to install office 2007 into a 32bit wine prefix

Test this:

Open a terminal,Press Ctrl+Alt+T
Run it:

$ sudo -i

# apt-get update

# apt-get install wine winetricks

# exit

$ sh winetricks msxml3 dotnet20 gdiplus riched20 riched30 vcrun2005sp1
Enter Wine Configuration

Click Libraries tab

Add riched20

Select it and click edit.

Choose built in then native.
Go to Microsoft Office 2007 and open setup.exe.
If launching an application seems to freeze on the splash screen, try pres the enter key.


How do I activate Function Keys without pressing the fn button in the mac keyboard?

Typing this in terminal:

sudo su -c "echo -n 0x02 > /sys/module/hid_apple/parameters/fnmode"

enables F keys without needing FN.

To restore, change 0x02 with 0x01.

Must be run after each reboot.


Will incremental backup notify if a previous full/incremental backup didn't succeed?

In general: when a synch fails the next time it should do a synch based on the previous successful synch or it should make a copy of the whole file. But this depends on the actual command and the software used.

Use the "rsync" command and create your own solution. That way you know what it does, you can create exceptions and can put in safeguards (like sending mails). And you learn something about your machine.

"rsync" is just a command like any other. Example:

rsync [options] [arguments] | mail -s "subject" e@mail.com

Figure out what options and arguments you want to use. Put it into a script and call the script from /etc/crontab.


Why did show desktop icon go away and how do I get it back?

If you press Alt+Tab under 11.10, Show desktop is the leftmost icon. If you don't want to press Alt+Shift+Tab to go backwards, you can release Tab and use the arrow keys while still holding Alt.


Why does `apt-get -f install` tell me that 141 packages were not updated?

It appears as though this is due to dependencies. From a debian page which can be found here;

  If the dependencies have changed on one of the packages you have
  installed so that a new package must be installed to perform the
  upgrade then that will be listed as "kept-back".

According to the Debian page above running the command

apt-get dist-upgrade

Will address the issue you are having, this could cause broken functionality but I image it should be fine


Gzip freezes during the execution of ./configure command

I just find a workaround for this. But it is not a best way to solve the problem.  I execute the same command as root user it worked fine and not freezed. But this solution is not good enough. Because newly generated files by this command are belongs to root user. So we have to change ownership from root to default user which in my case lfs.

Permissions also should be recursive.

$ chown -R lfs gzip-1.9


The most likely place to look into is /var/log/. I remember a time when logrotate was not configured to handle all relevant log files.

Start with du -sh /var/log/* to see if there is a "huge" directory there.


Intel network card "Not Ready" to use on an HP G71

try to turn the wireless on with hotkey

usually Fn + F[1 - 12] (just look for button that have signal / antenna icon)

in my laptop its Fn + F3


The redirection operator is not part of your sudo command. In other words, when you execute sudo bash -c echo "profile" > /sys/class/drm/card0/device/power_method, what actually happens is:

The shell executes sudo bash -c echo "profile"
sudo, which has the setuid bit set, asks for your password, and forks the process bash -c echo "profile" with EUID set to 0 (i.e., the command is executed as root)
The bash command executes echo "profile" and prints profile to standard output as root.
bash terminates, sudo terminates
The shell running your original command takes the string from standard output and tries to redirect it to /sys/class/drm/card0/device/power_method, which gets you a Permission denied since the shell is not running with root privileges.

There are a number of ways to solve this. One is to give the entire string with the redirection operator as argument to bash -c:

sudo bash -c 'echo "profile" > /sys/class/drm/card0/device/power_method'

I've also often seen people use tee, which looks somewhat nicer (and doesn't execute the echo command as root):

echo "profile" | sudo tee /sys/class/drm/card0/device/power_method

tee reads from standard input and outputs that to both standard output and all files you passed it as parameters.


Is it safe to upgrade to 18.04 on a dual-boot Windows 7 machine

"Safe" is a relative term. That makes this a hard question to answer.

IF your system is in proper working order,
AND IF you have taken the basic preventative measures to avoid common release-upgrade problems,
AND IF you have proper backups,
AND IF you're not in a hurry, you have a stable network connection, and reliable power supply,
...then your release-upgrade is very, very likely to go quickly and smoothly.

We recommend a full backup of all your data on both OS before making major changes (including upgrades) to either OS. This site is littered with the shattered dreams and lost data of folks who failed to take basic precautions...and got badly burned.

In 13 years of using Ubuntu, I've needed my backups exactly once (my mistake, not Ubuntu's). But that day I was very, very happy to have those backups.

If your system has some kind of problem that you hope a release-upgrade will fix, STOP. Fix all problems before release-upgrading. Release-upgrades usually make unfixed problems worse.

Yes, it's possible that a release-upgrade might break a dual-boot. It's rare, but it does happen. It's often caused by some underlying problem. And it's usually pretty easy to fix.


1. Figuring out the key code emitted by Fn+PgUp

You can use the lsinput and input-events commands to look at the output of the Fn+PgUp combination.

Then you can assign the key combination via the ACPI Event Definition as defined here.

2. Shell commands to switch on-off: can be integrated in ACPI Events, shortcut keys, etc.
Switch on the lamp:
echo 255 > /sys/class/leds/tpacpi\:\:thinklight/brightness
Switch off the lamp:
echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness

For more information regarding ThinkLight on Linux:
http://www.thinkwiki.org/wiki/ThinkLight


Try editing your /etc/X11/xorg.conf.d/50-synaptics.conf and adding this:

Option "SoftButtonAreas" "RBL RBR RBT RBB MBL MBR MBT MBB"

RBL is Right Button Left,
RBR is Right Button Right,
RBT is Right Button Top,
RBB is Right Button Bottom,
MBL is Middle Button Left,
MBR is Middle Button Right,
MBT is Middle Button Top,
MBB is Middle Button Bottom.

This defines the area of the clickpad where the touching clicks do not move the cursor. Maybe this didn't work way back then.

My ELAN1300:00 clickpad has these numbers where the middle button is from 40% to 60% of the touchpad width:

Option "SoftButtonAreas" "1924 0 1600 0 1379 1923 1600 0"

There can also be % values instead of touchpad coordinates:

Option "SoftButtonAreas" "1924 0 90% 0 1379 1923 90% 0"

This says the bottom 10% of the touchpad is reserved for the Soft Buttons and a touch will not move the cursor when beginning in that area. The /var/log/Xorg.0.log should show the final numbers used by the Xserver after interpreting the config file.


Kodak EasyShare M590 plugging into Ubuntu

I am answering the question myself, the camera has a menu to switch from Kodak software to "Other applications (Apple Iphoto, etc)" which turn the device into mass storage mode.


how to recursively extract where folders are uncompressed but files inside them are compressed.

You can achieve this with find (See: manpage) and its -exec flag. for tar archives the following line will do the trick:

find wordpress/ -type f -name *.tar.gz -exec tar -xf {} \;

For gunzip you can use:

find wordpress/ -type f -name *.gz -exec gunzip -k {} \;

If there are both file-types you need to do this kind of different a bit, first run gunzip without the -k (keep file) flag and then run the find line for tar files as well a tiny bit changed:

find wordpress/ -type f -name *.gz -exec gunzip {} \;
find wordpress/ -type f -name *.tar -exec tar -xf {} \;


How to put desktop icons in Ubuntu 13.10?

Open Nautilus, navigate to /usr/share/applications. Then copy and paste the .desktop-Files to your desktop.

You can also drag'n'drop from there with the middle mouse button (usually by clicking your scroll wheel) and choosing "Copy here" on the desktop.


Why do the default Applications in Ubuntu always change?

There are always specific reasons why applications are removed and new ones are added from the default installation media; these programs are of course still available via the Software Center.

9.10

Pidgin was replaced by Empathy

Empathy is a GNOME Application and better integrates with the whole desktop environment. Before Empathy was developed like crazy Pidgin was the de-facto standard for most distros. Only when Empathy's development boosted, they replaced it. I don't see  any chances of it being replaced any soon.

10.10

F-spot was replaced by Shotwell

F-Spot development was getting stagnant and there were hardly any active maintainers (IIRC). Right now there is only one major developer AFAIK - Ruben Vermeesh

On the other hand, Shotwell is lighter and more actively developed.

11.04

Gnome Shell was replaced by Unity

Just a small correction. They are not replacing GNOME, but only the traditional gnome-panel which is anyway going to be deprecated in coming days. Means you won't get able to use it for very long. Later in a year or two you will have to choose between Unity or gnome-shell

Rhythmbox was replaced by Banshee

Banshee has faster development as claimed by their developers. My personal experience is that their developers are usually very passionate about the software. I have met their developers on IRC and they are more than ready to help in case of any problems.

Just a good software is not a criteria. Active upstream development, active bug squashing, regular/predictable release schedule are the requirements.

Also Banshee developers tried getting Banshee on the default installation during UDS-N at Florida. This means they are taking up marketing and propagation too. I have always found them to be one of the best people in Free Software.

OpenOffice was replaced by LibreOffice

I think every distro is planning to do so. OpenOffice is still under the clutches of Oracle and LibreOffice development is faster. There is no copyright assignment in LibreOffice as against OpenOffice.

You might want to know that always Ubuntu never shipped with pure OpenOffice but with Goo-org which contains many patches which Sun was not ready to accept in OpenOffice. Goo-org was maintained by Novell primarily. The application was just branded as OpenOffice but was Goo-org

11.10

PiTiVi was dropped

Poor reception and low rating in Software Center was cited as the major reason for dropping it. Secondly, it's target userbase was very small since it is a video editing application.

12.04

Banshee was replaced by Rhythmbox

Space concerns were cited for dropping Banshee which had of late had suffered some regression in quality (controversial debate).

Tomboy, gBrainy and Mono Dropped

Since Banshee was the biggest user of mono stack, it was decided to drop Mono drop the CD itself and this Tomboy was also dropped. A game named gBrainy which also uses Mono was removed.

I can understand that there are confusions, but you cannot just throw an application in default and be sure that it's development is going to be still awesome till next release.
Every UDS you have a track called "Default selection track" where changes to default applications are discussed. They discuss which application's development is slowing down or getting buggier and the have to be replaced by which applications (if that is better)

My answer can have factual inaccuracies. Please point them out. I have written the answer to best of my knowledge and memory


I found an answer here.
The solution is as follows.

logout your kde desktop
open console session by pressing Ctrl + Alt + F1
give username and password
rm -rf .kde/share/config/plasma-*
now you can logout console session by logout command or pressing Ctrl + D
now go back to your default graphical session by pressing Ctrl + Alt + F7
now login and you will see your fresh new default panels


I believe this might be an issue with the Padoka PPA as of 2016-11-07 (same happened to me, Ubuntu 16.04.1, Padoka PPA, Radeon 380X). I suspect it'll be fixed soon. In the meantime, you can download and install the AMDGPU-PRO driver from http://support.amd.com/en-us/download, or purge the Padoka PPA using: ppa-purge paulo-miguel-dias/mesa


OpenVPN and all packages found in the server version of Ubuntu are also found in the Desktop one. Not only that but you can even find more info here: What is the difference between 12.04 Desktop & 12.04 Server images and here: What's the difference between the server version and the desktop version?

With this knowledge you can save valuable time setting up your server.

When you have all the prerequisites you need you can then install OpenVPN in your desktop PC since... it ALSO comes in Ubuntu Desktop ^^.

The 3 points mentioned in the file in the link you provided are already met with the Desktop version:

You will need to be able to install and configure software on your server.
You will need to be able to copy files from your server (i.e. scp, mounting a USB drive, etc)
You will need to be able to set up a port forward on your router.

The rest of the VPN configuration is easier since you have a GUI environment but you can also work on it via the terminal.

So in general you are better off working with the desktop in your case.

Just in case you are wondering, the performance will be the same but the configuration will be faster.


I fixed the font rendering on my system after reading this topic. Removing/renaming the home (profile) directory and starting over didn't make any difference.

You need to open the xfce4-settings editor and set the /Xft/Lcdfilter string in the xsettings channel from lcdnone to lcdlight. Other options to try are lcddefault and lcdlegacy as seen here under Rendering subtitle. Here is the CLI way:

xfconf-query -c xsettings -p /Xft/Lcdfilter -s lcdlight

or if the old value doesn't exist:

xfconf-query -c xsettings -p /Xft/Lcdfilter -n -t string -s lcdlight

After changing that option you need to restart the applications to see the differences. Here are my before and after screenshots (after is the like it was on 11.10). Btw, the screenshots are resized so you should right click on them and click View image or Open image in new tab to really see the differences.


nontech newbie trying to learn terminology

lol, same happened to me 4-5 years ago when I first heard about Linux. My head still hurts while reading some guides and stuff like that :D
Well, first, you have to learn terminology... whats what. Like, for example, root administrator is the absolute owner of that OS (stands for Operating System, like Windows 7, Ubuntu etc.). Therefore, root administrator can do everything on (install, uninstall, delete system files, modify them and so on). Normal users cant. It's like Administrator on Windows. Now, how I learned all that is by simply googling that what I didn't understand or knew. So, just now I typed Linux terminology and this is what came up: Is Linux Confusing?

After you lean all that terminology you will have the foundation for reading some articles on the web about Linux, how it works, whats the difference between Windows and Linux and so on. And how to find those articles? Google is you best friend ;)

Do you have to become a geek to use Ubuntu? Nope :) You just have to familiarize yourself with it, just like you did with Windows, Androind on your mobile phone, navigation in your car... Or maybe you could ask that same guy that installed it for you to tell you some basics of Ubuntu, and Linux itself.

In any case, have fun! :D


Cache usage under memory usage in System Monitor

cache is where linux uses some of your RAM to keep a cache of data recently read from the disk.
Whenever a process wants more memory, cache is given to it as readily as free. free is the money you spent on RAM being utterly useless, cache is Linux making some use of it (so long as nothing else wants it).

as stated in this answer.


Experiencing Suspend/Resume Problem After Latest Kernel Update - Ubuntu 14.04

I've just answered a related solution to a similar issue here: https://askubuntu.com/a/1194066/356228. Found the solution why trying to setup Extended Security Maintenance (ESM) for Ubuntu 14.04.


Cannot update - PPAs do not have release files

It simply means that these two repositories have not yet been updated for 18.04.  You could try editing /etc/apt/sources.list to replace bionic with artful or whatever is the latest version shown.

If you click on your links in the question and then click dists, you will see which versions are available.


Can I remove file-roller without removing ubuntu-desktop?

You can safely remove ubuntu-desktop as it is a meta-package, and does not provide any actual content. It only depends/recommends other packages. Removing it will not remove Unity or other features.

See also: What is the difference between a meta-package and a package?


Laptop Fan/Heat high when using only Ubuntu 13.04

Most of times it could be about your graphic card gets warm and because your graphic card is integrated into your cpu the system thinks that cpu gets warm

install mesa-utils and mesa-utils-extras and reboot  , for installing use the following command-

sudo apt-get install mesa-utils mesa-utils-extra

it will work for Intel Graphic Cards

If you are having NVIDIA graphic card then use bumblebee because mesa and NVIDIA will conflict with each other for sure.. to install bumblebee use-

sudo add-apt-repository ppa:bumblebee/testing

then for 12.04 and 13.04 use-

sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic

otherwise  for 13.10 use-

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generi

( for newcomes: the $ before this command is just an indicator that tells this command should be entered in a standard user command shell. if you want to use it just press <ctrl>+<alt>+<t> and copy-paste without this dollar mark )

If that doesnt work, try to

Cleaning your laptop- As might be its because of just that, stopping fan from running  properly.
Update bios - After updating it can perform good operations like increasing compatibility .That solved my issue.
Update Kernel

hope the very first suggestion will resolve your problem.


"Wired Network Disconnected" even when connected- no ethernet connection possible

Found the solution:

In /etc/NetworkManager/NetworkManager.conf, I changed managed=false to managed=true.

Then run:

sudo service network-manager restart

and voila.


Installing GNU parallel utility on Ubuntu 14.04

You should be able to install it using apt-get. Per "Where do I get a package for GNU Parallel?":

sudo apt-get install parallel

In your specific case, though, you'll want to run sudo make install instead of just make install. Alternatively, you'll need to specify a new root directory to your configure script.


Cannot resize the ubuntu partition with GParted

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

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

boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
start gparted
move sda6 partition all the way left
resize the right side of sda6 all the way right
click the Apply icon


Installing Old Package from Old Ubuntu to New version of Ubuntu

Following example illustrates how to install a package not available in a particular version of Ubuntu but available in an older Ubuntu:

If you want to install openjfx8 in 19.04 which is available in 18.04 at https://packages.ubuntu.com/bionic/arm64/openjfx/download.

Append deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe to /etc/apt/sources.list
Do sudo apt update
Install the packages: sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
Mark hold to prevent upgrade: apt-mark hold openjfx libopenjfx-jni libopenjfx-java
To prevent any other complications Remove deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe from /etc/apt/sources.list
Do sudo apt update


Fails to download respository Information check internet connection

Do a backup of your sources.list file.

    cd /etc/apt/
    sudo cp sources.list sources.list.001  # if sources.list.001 doesn't exist

After generate a default set of sources e.g. from Ubuntu Sources List Generator. Here you can select your release and country. Else
you can find on internet e.g. here too.

Then copy it inside your sources.list file

    sudo nano /etc/apt/sources.list
                                     # Now paste the list, save and exit
    sudo apt-get update              # to resynchronize the package index
                                     # files from their sources
    sudo apt-get -f install          # just in case you need to fix something

Now it would be possible to use the software centre too.


When you used which php the reply was,

/usr/local/bin/php

It existence within /usr/local indicates your PHP was not installed using a package provided by your OS but it was installed manually either by compiling it yourself or by some third party installer.

Thus in order to remove it you'll need to follow the instructions provided with where-ever you originally got it from.

If you simply want to stop the php command on the command line from calling up that installation of PHP you can rename that single file, /usr/local/bin/php to something like /usr/local/bin/php-54 or something.  This will stop the name clash with any other PHP version you install from an OS package, but it doesn't uninstall the rest of that PHP installation.

The rule with /usr/local is that is a specific area for system-wide software you can install yourself where you are responsible for installation and removal of software, as it is not managed by your OS.


Trying to install call flow application ... keeps failing

You don't need to install callflow system wide to solve your problem. Actually you don"t even need to call cmake.

  This is a collection of awk and shell scripts that will take a capture
  file that can be read by tshark and produce a callflow sequence
  diagram

There's nothing to compile, callflow returned an error because $SETUPDIR is not defined.

you can start callflow this way:

SETUPDIR=. ./callflow -h

For better results of course edit your conf/callflow.conf to fix the SETUPDIR path to be /home/jj/Documents/callflow-20120624-180 instead of /usr/local/callflow.

Now edit the callflow bash script (line 5) to replace the default CONFDIR value:

CONFDIR="/etc/callflow";

by

CONFDIR="/home/jj/Documents/callflow-20120624-180/conf";

Now you can run it from source:

sylvain@sylvain-ThinkPad-T430s:~/Downloads/callflow-20120624-180$ ./callflow -h
Usage: callflow [options] <filename>
See callflow --help for extended help.


Can't Run COD4 On Different Partition 16.04 [SOLVED]

Solution:

In winecfg under the drives tab, you have to add the drive manually. My drive was within somewhere like Media/deniz/drivename; when I used autodetect, the parent would show up as D: . In D: , you have Media/deniz/drivename as a subdirectory. You have to navigate to that, choose it and click add and then apply.


virtualbox-guest-utils recommends virtualbox-guest-x11, and by default Apt installs recommended packages as dependencies. You can prevent this by using the --no-install-recommends flag:

sudo apt-get install --no-install-recommends virtualbox-guest-utils


When your music streaming subscription expires, your account will be
  reverted back to the free 5GB of storage.

Source: Ubuntu One Help FAQ


How to disable the startup "Web Authentication for Google" application?

Same problem, logged into Google, My Account, went to connected apps, manage apps, removed Gnome Evolution, logged out, restarted ubuntu, when the pop up appeared, clicked allow and it went away, this seems to have solved the problem.

The bug only appeared after I installed the latest updates for ubuntu 16.10


Excel 2010: How do I change the look of the dialog box(s)/Pop-up windows?

Not the answer you are looking for, but I that's how Wine works, and you can't change it from the applications. These dialogs are WinAPI calls, which are run by Wine, using the Windows theme of Wine.

I hope someone proves me wrong :)


(1) Backup Your Files

MAKE SURE YOU'VE COPIED YOUR FILES AND DATA TO A SAFE PLACE, NOT ON YOUR COMPUTER.

(2) Download Ubuntu 17.10

Download the 17.10 ISO from ubuntu.com (ubuntu-17.10-desktop-amd64.iso) and save it in your Downloads folder.

(2) Create a Partition to Boot the Live ISO From

Make sure you've completed step #1!!!

Open the GParted application. If you don't have GParted, install it from the Software Center or use sudo apt install gparted.

In the top right of the gparted window, you must make sure your current hard disk is selected.
Since you mentioned you don't have a USB stick or CD, there  should be only be one option in the dropdown for you.
It will probably be somethig like /dev/sda, but make sure you have the right disk selected!

Use gparted to resize your disk and create about 3 GB of space at the end of the disk.

Then create a new primary partition in this space, and format it to the ext4 file system.

Note the name of the partition; it may be something like /dev/sda3/.

You can close GParted now.

(3) Mount the New Partition

Open the Disks application and select the partition you created above. (The Disks application calls this a "Device", but make sure it is the same as the partition name you noted in step #3).

After selecting it, click in the "mount" icon.

Disks will mount the partition and will display the mount point; it will look something like /media/nightx/xxxxx.

Make a note of the actual mount point. For the rest of this answer, I will use /media/nightx/xxxxx, so replace as necessary. Make sure you can read and write to /media/nightx/xxxxx (try creating a text file and deleting it).

You can close Disks now.

(4) Copy the Live ISO to the New Partition

Open a terminal, and enter the following:

sudo cp ~/Downloads/ubuntu-17.10-desktop-amd64.iso /media/nightx/xxxxx

(Make sure /media/nightx/xxxxx/ubuntu-17.10-desktop-amd64.iso is owned by root; using sudo to copy the file ensures this).

(5) Edit Grub to Boot the Live ISO

In a terminal, do the following:

sudo gedit /etc/grub.d/40_custom

Copy the following into this file.

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

menuentry "Install" {
    set isofile="/ubuntu-17.10-desktop-amd64.iso"
    loopback loop (hd<X>,<Y>)$isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
    initrd (loop)/casper/initrd.lz
}

In the text above, replace <X> as follows:

If your new partition name has an "a" (like "sda") replace <X> with "1"
If your new partition name has a  "b" (like "sdb") replace <X> with "2"
If your new partition name has a  "c" (like "sdc") replace <X> with "3"

In the text above, replace <Y> as follows:

If your new partition name ends in "1" (like "sda1") replace <Y> with "1"
If your new partition name ends in "2" (like "sda2") replace <Y> with "2"
If your new partition name ends in "3" (like "sda3") replace <Y> with "3"

For example, if your partition name is "sda3", in the 9th line above, you should use...

loopback loop (hd1,3)$isofile

Also note, there are no angle brackets (< or >) in the the final text.

Finally, save the file (/etc/grub.d/40_custom) and exit Gedit.

Type the following to double check that your changes were saved and are correct:

cat /etc/grub.d/40_custom

(6) Update Grub

Now, update grub using:

sudo update-grub

Check the output and make sure you do not get any errors.  If you see errors, double check step #5.

(7) Boot to the Live ISO

Restart your computer.

Press the ESC.

You will see the Grub Menu.

(If you see your Ubuntu Login screen, you will need to restart and try hitting ESC at the right time).

One of the Grub options will be "Install", which you had configured in step #5.

Select "Install" using your arrow keys and press Enter.

If you get an error message (~ about Grub not being able to find a boot file), that means you did not set <X> and <Y> correctly in step #5.  You can return to step #5, and try different number combinations until you find the right designation for your new partition.  Be sure to execute step #6 each time you edit /etc/grub.d/40_custom.

(8) Prepare to Install

If you were successful, you will boot into the Ubuntu Live ISO directly from your hard disk!!

Before you click on the installer, be sure to do the following...

Open a terminal window by typing CTRLALTT. In the terminal, type the following:

umount -l /dev/sda3

Rememebr to replace /dev/sda3 with the name of the new partition you noted in step #3.
This command tricks the installer into thinking this partition is unmounted; in reality, the Live ISO is being accessed from there.

(9) Install Ubuntu

Make sure you've completed step #1!!! (This is your last warning!)

Launch the Ubiquity installer to install Ubuntu.

During the install, you should select the option "Something else", so you can explicitly avoid formatting /dev/sda3.

The options "Erase Ubuntu..." or "Erase everything..." may work, but I don't have experience with these.  (If you try either of these options, please comment back if they worked).


Can ndiswrapper be used for things other than wireless drivers?

For Flash you used NSpluginwrapper which is an entirely different beast.

ndiswrapper only covers the NDIS (Network Driver Interface Specification) so as the name suggests, it's only good for network cards where Windows drivers follow this specification.

It's not going to help you with anything else.


Wifi gets hardware-disabled after waking from sleep

Try running this command from the Terminal when you wake your device from sleep -

sudo modprobe -r e1000e ; sudo modprobe e1000e;


problem with setting up multiboot ISO usb using syslinux

Well, I got a syslinux-booting USB key to load an unpacked ubuntu vmlinuz and initrd. The best I can offer is the steps that worked for me...

Download the ubuntu of your choice (obviously)
Mount the iso (I used Windows 10), and copy all the mounted files to a directory in your flashdrive.

[Optional] Rename the folder on your flashdrive (I chose ubu)

Modify your syslinux configuration to point linux and initrd to the right files
Make sure your append has the right flags

The syslinux.conf entry that worked for me:

label installUbuntu2WORKSEE
menu label ubuntuInstaller2WORKS
linux /ubu/casper/vmlinuz.efi
initrd /ubu/casper/initrd.lz
append boot=casper iso-scan/filename=/iso/ubuntu-16.04.3-desktop-amd64.iso

After boot I was given the standard "Try Ubuntu" desktop - I could install or just use it as-is. I've heard bad things about consistently using a USB key for Ubuntu or other desktop OS without making changes to internal OS settings to prevent frequent writes to the key which will prematurely fry your NAND memory. I also can't explain all the boot flags - I don't know enough yet. Perhaps someone else can who is more familiar with Ubuntu.

Note: my flashdrive is FAT32, and has more than 4GB of space available. The .iso file and unzipped/unpacked files may take close to 4GB of space. However, I have fatdog64 (a puppy variant) also loaded on this key, along with its iso and a puppy iso. So multi-booting is possible.


Do you know how to install google chrome to my desktop?

Unless you bought your computer >10 years ago, you probably need the 64 bit install.

To install Chrome on Ubuntu, try the following in a terminal:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Once that is done, install it with:

sudo apt install ./google-chrome-stable_current_amd64.deb

else, you could instead install Chromium, it's open-source and is less invasive:

sudo apt install chromium-browser


I would suggest a tool called NitroShare.

Install it and it will instantly recognize any other computers on your LAN that are also running NitroShare, even if they're Windows or OS X. You don't even have to know the other IP address.

Basically all you do is launch the program, then click on the icon in the upper-right-hand-corner and choose Send Files or Send Directory & choose the file or directory to send.

Then you choose the destination and bam - it's underway.

It also makes very good use of your network bandwidth, so the transfers are nice and quick.

This tool currently only works with a GUI, but terminal control is planned - making it even more useful for servers and headless machines.


unexpected output of variable in Bash script

The last line should be

echo "contents of original directory variable:" $originalDirectory

Without the $ it is text, not a variable content. So you get the text.

So it is an expected output ;-)


Unable to locate package software-properties-common

After sudo apt-get update, I was able to install software-properties-common.


I had the same issue, solved by editing /var/lib/dpkg/info/xplico.postrm.

Change the line

apache2ctl restart

to

/etc/init.d/apache2 restart

then you can run upgrade to remove xplico automatically.


Ubuntu 16.10 DVI only works with VGA adapter

Solved it, thanks to https://forums.linuxmint.com/viewtopic.php?t=235180 just had to play with xrandr some more...now need to make this fix automatic on boot, later.
Solution:
cvt 1920 1080 59.8

1920x1080 59.79 Hz (CVT) hsync: 66.96 kHz; pclk: 172.50 MHz

Modeline "1920x1080_59.80"  172.50  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
~$ xrandr --newmode 1920x1080_59.80  172.50  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
~$ xrandr --addmode DVI1 1920x1080
~$ xrandr --output DVI1 --mode 1920x1080


Wireless PCI Card Linksys WMP54G V2 doesn't work in ubuntu 12.04

If you are having real trouble with the linux drivers with broadcom which is no surprise. I can suggest using ndiswrapper and use the windows driver. This creates a wrapper around the windows driver and allows you to use it for wireless on your Linux machine.

You can install it from the repos with apt-get install ndiswrapper ndiswrapper-utils. Its also has a GUI based tool from Ubuntu in GTK+ framework called ndiswrapper-gtk. Just add the windows driver to that and see how its goes. The GUI is very self explanatory.

But I have also posted the link to the ndiswrapper wiki for any other information.

LINKY HERE


Install Windows 8 and Ubuntu 13.04 using UEFI boot and third boot as Backtrack 5r3 and grub to select OS at startup

You can fix this problem in many ways, but either of the following is likely to be easiest:

Boot a live CD-R or USB flash drive in EFI mode and run Boot Repair. This should get GRUB up and running with Windows detected. The trick is forcing an EFI-mode boot of a live CD. You may need to play with your firmware's boot options. Typically, hitting a function key (which one varies) produces a boot menu, and you should select the one for your live CD that mentions "EFI" or "UEFI."
Download the CD-R or USB flash drive image of my rEFInd boot manager and prepare a medium with it. You should then be able to boot to it. If rEFInd lets you boot both Windows and Linux, boot to Linux, mount your EFI System Partition (ESP) to /boot/efi, and install the Debian-package version of rEFInd. You'll then use rEFInd to select your OS on subsequent boots.

If one of these fails, try the other one. If you continue to have problems, post back with the URL that Boot Repair provides; this will give us detailed information on your system's configuration.


Remove other OS which is installed alongside Ubuntu

First, boot into a livecd just to be on a separate load disk, then delete the elementary OS partition. DO NOT reboot now, instead open a terminal and run "sudo update-grub /dev/sda" (replace sda with what the DISK, not PARTITION that you want; it will automatically add all available entries to the menu)


If using GRUB:

With sudo, edit /etc/default/grub and edit the GRUB_CMDLINE_LINUX_DEFAULT line adding intel_idle.max_cstate=1 to whatever might already be there. After saving the file run sudo update-grub, then re-boot. Suggest that you save a copy of your original grub file first.

To check that your cstate is not going deeper than 1 use turbostat (package: linux-tools-common).

Example (where there is already something on the GRUB_CMDLINE_LINUX_DEFAULT):

Before (edited):

$ sudo turbostat -S --debug sleep 10
 Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 PkgWatt CorWatt GFXWatt
       1    0.04    1654    3411       0    0.12    0.03   99.82    0.00      29      29    0.07    0.03   99.51    3.85    0.20    0.23
10.001629 sec

Make the change (using my method for configuration control):

~/config/etc/default$ cp /etc/default/grub ./
~/config/etc/default$ cp grub grub.original
~/config/etc/default$ nano grub

Change this:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

To this:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_idle.max_cstate=1"

And update:

~/config/etc/default$ sudo cp grub /etc/default
~/config/etc/default$ sudo update-grub
~/config/etc/default$ sudo reboot -r now

Now check (edited):

$ sudo turbostat -S --debug sleep 10
 Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 PkgWatt CorWatt GFXWatt
       0    0.02    1920    3411       0   99.98    0.00    0.00    0.00      39      39    0.00    0.00    0.00   10.49    6.66    0.23
10.001079 sec

Your should also see these messages in dmesg and var/log/kern.log (edited):

~$ dmesg | grep intel_idle
[    1.019709] intel_idle: max_cstate 1 reached

$ grep intel_idle /var/log/kern.log
Mar 23 08:10:32 s15 kernel: [    1.019709] intel_idle: max_cstate 1 reached


Command line doesn't recognize VPN and makes requests from real IP?

Well, I found out the problem.

Turns out I was using my Astrill VPN configured as OpenWeb. This means that the VPN is only tunnelled via web browsers and whatnot.

I then changed my configuration to OpenVPN, which means "it has advanced split routing/split tunnelling features and can tunnel all applications on your computer." All applications meaning web browsers, and everything else including the terminal command-line. Now all my requests from the command-line are made through the VPN tunnel, and I am a happy man.

I guess the OpenVPN configuration is the "system-wide proxy" that I always thought would be the configuration of all VPNs. Using OpenWeb previously explains why I can only access China's blocked sites from the web.

If you'd like to know more about the difference between VPN protocols - here's what Astrill has to say, but I don't know if this is applicable to all VPNs. However, I'd imagine their explanations to vary only slightly.


Removing is too messy (because a lot of other packages depend on it even if they don't use its functionality), but disabling is relatively straightforward.

Ideally this should be done using dpkg-divert (but that has a problem with diverting to the same file), to not confuse apt/dpkg when you upgrade your system.

cd /usr/share/dbus-1/services
# This part create a copy of your original files
sudo cp org.gnome.evolution.dataserver.AddressBook.service org.gnome.evolution.dataserver.AddressBook.service.backup
sudo cp org.gnome.evolution.dataserver.Calendar.service org.gnome.evolution.dataserver.Calendar.service.backup
sudo cp org.gnome.evolution.dataserver.Sources.service org.gnome.evolution.dataserver.Sources.service.backup
sudo cp org.gnome.evolution.dataserver.UserPrompter.service org.gnome.evolution.dataserver.UserPrompter.service.backup

# This part does the trick
sudo ln -snf /dev/null org.gnome.evolution.dataserver.AddressBook.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.Calendar.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.Sources.service
sudo ln -snf /dev/null org.gnome.evolution.dataserver.UserPrompter.service

If we just delete the file or use any empty file the next update/upgrade will put them back. So we're using a symlink to an empty file (/dev/null is a special empty file, it stays empty even if you write something into it).

Here you find an article about what /dev/null is.


Fresh 16.04 install, network not working

As I mentioned in a comment, it was the router.  A reboot took care of it.  I should have thought of that but didn't suspect it, as all the other devices connected were working fine.

In some ways, the computer world hasn't changed in 40 years.  When in doubt, reboot!


Screen Brightness on Acer AspireV: bar appears, brightness doesn't change

This may not be the most modest approach, but it works for my Ubuntu 12.04 Acer.

You will need to run this command as super user (su).

$ sudo su
# echo 200 > /sys/class/backlight/intel_backlight/brightness

This will change your brightness (on a scale of 0-1000). Be careful you don't put in 0 or your screen will turn off!

If this process works for your machine, it's not too difficult to write a short script that macros the command to your keyboards shortcut keys.


GSnap – free VST pitch-correction is a Windows only thing.

From the main page

  This site contains several free VST effects and instruments for
  Windows.

Sorry to be the harbinger of bad news.


After an update, locking and logging in puts me back at login screen

https://serverfault.com/a/742102/104546 gave a solution to a different question that also applied here: after an update, you may have to run sudo systemctl restart systemd-logind (ctrl+alt+f1 first to get to a plain terminal), then you can log in again.


How can I automatically change spaces to underscores in the file save dialog box?

I can't think of anything that would change that in the box but you could run:

rename 's/ /_/g' *.xls

... in the directory that these are being saved to. You could save that as an alias in ~/.bash_aliases like: alias underscore="rename 's/ /_/g' *.xls" and then just run underscore.

Or you could create a new shortcut/link on your desktop that did something similar. It would probably need to run through Bash so you'd have a command like:

bash -c "cd yourXlsDir; rename 's/ /_/g' *.xls"


Ubuntu 20.04 LTS new installation: Setting window not visible

I guess the problem due to the upgrade from Ubuntu 18.04 to 20.40. I had a gnome-tweaks on my machine before the upgrade. I removed it, and I installed gnome-control-center. Something like the following could work:
sudo apt-get purge gnome-tweaks
sudo apt-get update
sudo apt-get install gnome-control-center


When is CUDA gonna be released for Ubuntu 20.04?

For Cuda only, you can refer to @meetnick's answer.
As per June, 16th, 2020, I managed to install CUDA 10.1 and cuDNN 7.6.5 on Ubuntu 20.04 and they work perfectly with Tensorflow 2.2.0
Here are the steps that I followed
1- Install CUDA (10.1):
As per now, there is no deb file or run file for Ubuntu 20.04, so the only solution is to run:
sudo apt install nvidia-cuda-toolkit

It will take a while to be installed.
After that, to make sure that CUDA is installed, run:
nvcc -V

You would get an output similar to the following:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

This means that CUDA is successfully installed on your Ubuntu 20.04.
The slight difference is that cuda is not installed in the usual path (/usr/local/cuda, /usr/local/cuda-10.1). Instead, it is installed in /usr/lib/ (/usr/lib/cuda/).
You can get where CUDA is installed by running the following command:
whereis cuda

2- Install cuDNN (7.6.5):
first go to this link then choose Download cuDNN. You'll be asked to login/create an account. After logging in, you'll be asked to accept the Terms of the cuDNN Software License Agreement.
A list of downloadable cuDNN will be displayed, click on Download cuDNN v7.6.5 (November 5th, 2019), for CUDA 10.1 then choose cuDNN Library for Linux.
After the download is finished, extract the file, then open the terminal and run:
cd cudnn-10.1-linux-x64-v7.6.5.32 # or whatever folder you got after extracting the file

Then:
sudo cp cuda/include/cudnn.h /usr/lib/cuda/include/

After that:
sudo cp cuda/lib64/libcudnn* /usr/lib/cuda/lib64/

Finally:
sudo chmod a+r /usr/lib/cuda/include/cudnn.h /usr/lib/cuda/lib64/libcudnn*

Once you finish,  you have to add the CUDA path to your ~/.bashrc file. You need to run:
echo 'export LD_LIBRARY_PATH=/usr/lib/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/lib/cuda/include:$LD_LIBRARY_PATH' >> ~/.bashrc

Then run:
source ~/.bashrc

3- Optional:
Now you can install Tensorflow-gpu (2.2.0) and test if uses your GPU or not.
pip3 install tensorflow-gpu==2.2.0
Then run python3 and type the following lines:
import tensorflow as tf
tf.config.list_physical_devices('GPU')

If everything went as planned, you'll get an output telling that Tensorflow has access to your GPU.


focal InRelease' changed its 'Suite' value from 'focal-updates' to 'focal-security'

You have to simply press y followed by Enter answering the prompt in your question.
Or re-add this repository with commands below:
sudo add-apt-repository -r ppa:inkscape.dev/stable

sudo add-apt-repository ppa:inkscape.dev/stable

And then use this repository as before.


The following methods will ensure your changes persist as long as you use gnome:

Install and run dconf-editor (if you're on 12.10, dconf-editor might be pre-installed):

$ sudo apt-get install dconf-tools

$ dconf-editor
Go to the following settings directory:

org.gnome.settings-daemon.peripherals
Under touchpad, uncheck the touchpad-enabled checkbox.

If you prefer not to meddle with dconf-editor's GUI, run the following command instead:

gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled false


My problem is similar in Ubuntu 14.04.
If I use "eject" to remove a data cd and then close the empty tray, the button on the tray stops working. The command
"sudo eject -v"
fails to open the tray.
I do not believe it is a hardware fault as after a restart the button works again.


how to remove deepin desktop environment from Ubuntu 18.04

Try this:
Start in text-only mode
Switch on your computer. Wait until the BIOS has finished loading, and press and hold Shift, which will bring up the Grub menu.
    Select the line which starts with Advanced options.
    Select the line ending with (recovery mode)
    Press Return and your machine will begin the boot process.

After a few moments, your PC should display a menu with a number of options, including Drop to root shell prompt.
Press Return with this option highlighted.

The PC will start in a terminal.
Run these commands:
Mount partitions in read-write mode
mount -o remount,rw /
mount --all

Update repositories
apt-get update

Install aptitude and deborphan
apt-get install --reinstall aptitude deborphan

Eliminate the components of deepin that are not necessary in Ubuntu
aptitude remove '?and(?reverse-depends(deepin),?not(?reverse-depends(?exact-name(ubuntu-desktop))))'

Reinstall ubuntu-desktop
apt-get install --reinstall ubuntu-desktop

Eliminate orphan packages
deborphan
apt-get --purge remove $(deborphan)
deborphan --libdevel
apt-get --purge remove $(deborphan --libdevel)
deborphan --find-config
dpkg --purge $(deborphan --find-config)

Remove unnecessary packages
apt-get autoremove

Remove downloaded packages
apt-get clean

Restart system
reboot


Connecting to Eduroam 16.04 LTS wicd - University of Bath

This will hopefully work for other universities too

Create the following template file for eduroam:
(/etc/wicd/encryption/templates/eduroam)

name = Eduroam
author = hautod
version = 1
require identity *Username password *Password
----
ctrl_interface=/var/run/wpa_supplicant
network={
  ssid="eduroam"
  key_mgmt=WPA-EAP
  pairwise=CCMP
  group=CCMP TKIP
  eap=PEAP
  ca_cert="/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt"
  identity="$_IDENTITY"
  domain_suffix_match="radius.bath.ac.uk"
  phase2="auth=MSCHAPV2"
  password="$_PASSWORD"
}

Append "eduroam" to '/etc/wcid/templates/active' so it looks similar to this:

wpa
wpa-peap
wpa-psk
wpa-psk-hex
wpa2-leap
wpa2-peap
wep-hex
wep-passphrase
wep-shared
leap
ttls
eap
peap
peap-tkip
eap-tls
psu
eduroam

You should now be able to connect using your full university email as the username and your university password.


Display terminal command result in Desktop notification

In most cases you can use notify-send with command substitution $(). For example:

notify-send "XAMP Start" "$(sudo /opt/lampp/xampp start)"

Inside a scrip you can use a function to wrap the entire output:

#!/bin/bash
main() { echo "Line 1"; echo "Line 2";  echo "Line 3"; }
notify-send "Script output" "$(main)"

If you need to run that function with sudo:

notify-send "Script output" "$(sudo bash -c "$(declare -f main); main")"


Unable to boot after formatting extra hard drive

After formatting the drive, /etc/fstab was no longer accurate. Once it was appropriately updated, everything started functioning normally again.


How to solve this problem 23 not upgraded

The message "X not upgraded" is displayed when you install one or more packages while upgrades are available, but choose not to install the upgrades, or when you choose not to install some available upgrades while installing others.  It does no harm, as such, it's just to inform you there are upgrades that you haven't installed yet.

In your case, apt-get upgrade -f isn't a command to install upgrades; it only displays those that are available -- equivalent to unchecking all available upgrades in a package manager and then hitting "Apply".  If you execute sudo apt-get upgrade you'll tell apt to actually install all available upgrades (and their dependencies, if there are some new ones).


You can insert your your live USB/CD and boot into it, and use gparted to resize your partitions, but there is a decent chance that your bootloader will be broken as  a result of that.

It'll be better if you shrink a desired drive, create an ext4 partition in the new space that you created and follow this guide to move your home folder there.


I assume you're using the generic-pae kernels; it's safe to remove the -server kernels, which you aren't using.

You must keep at least one kernel image (linux-image-2.6.38-16-generic-pae, etc.). It's recommended to keep at least 2, because if an update hoses the most recent kernel, you can still boot using the previous one.

You should also keep linux-image-generic-pae, which is a tiny meta-package that causes the latest kernel to be installed.

You should keep the corresponding headers for each kernel you keep; the headers are needed to build kernel modules for that kernel.


Here's what worked on my HP-2140us:

Install the "Infrared Remote Control" app from the software center
If you haven't installed lirc before, you'll get a config screen; if the install completes without one, open a terminal and type sudo dpkg-reconfigure lirc
Select ENE KB3926 as your receiver and None as your transmitter.
Open Preferences > Infrafed Remote Control, unlock and set the "IR Remote Control" settings to Manufacturer: HP, Model:TSGH-IR01
Press a few buttons on the remote and make sure they come up in the "Configuration Test" area.  If they do, you're done!

Finally, if you plan to use the remote with rhythmbox/totem/banshee/etc., you'll need to enable the lirc/remote control plugins in those apps.

update: you might need to restart after step 3

update 2  For Rhythmbox support add this in ~/.lircrc:

begin
    prog = Rhythmbox
    button = PlayPause
    config = playpause
end

begin
    prog = Rhythmbox
    button = Skip
    config = next
end

begin
    prog = Rhythmbox
    button = Replay
    config = previous
end

begin
    prog = Rhythmbox
    button = VolUp
    config = volume_up
end

begin
    prog = Rhythmbox
    button = VolDown
    config = volume_down
end


How to convert `rm` and `ra` audio files to mp3 in (L)ubuntu?

1) add medibuntu repository. Instructions here

2) install ffmpeg libavcodec-extra-53

3) Run
ffmpeg -i inputfile.ra outputfile.mp3

To use this through a GUI:

get WinFF


you have 2 swap partitions there.
delete one using gparted.
do in terminal:

cat /proc/swaps

to see which one is mounted and delete the other one.

then delete it in fstab

sudo nano /etc/fstab

Ctrl+O to save, Ctrl+X to exit and reboot.


A bootable device not detected showing on first boot after installing 18.04

You have UEFI boot enable on your device and you installed Ubuntu on legacy mode.

You need to change boot options from UEFI to Legacy. Refer your manufacturer guide to access BIOS Settings.


Replace all lines in vim with whatever is after the last slash on a line

You can use awk. You want last field but you have different delimiter.
-F : --field-separator.
Awk NF gives you the total number of fields in a record So when I say NF, it hold the last field number or its index. so {print $NF} is similar to { print $1} or {print $2}.
➜  awk -F'/' '{print $NF}' test.txt
fff
gg
hhhhh


Can't switch between users without logging out

There was a problem with the nvidia-340 driver. I switched back to nouveau and now all is working fine.


I copied the contents below from a Kubuntu 11.10 install of mine and pasted it in the etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

The output when running update-grub:

kamil@kamil-MG-63MI-7109:~$ sudo update-grub
[sudo] password for kamil:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-15-generic
Found initrd image: /boot/initrd.img-3.0.0-15-generic
Found linux image: /boot/vmlinuz-3.0.0-14-generic
Found initrd image: /boot/initrd.img-3.0.0-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 11.10 (11.10) on /dev/sda1
done
kamil@kamil-MG-63MI-7109:~$

Problem Solved.
:-)


OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to storage.googleapis.com:443

It was my router issue

Please check your router to see if it is doing a transparent proxy for you?

If it is, then you may want to turn that off.

If you can't turn it off, then you might want to install a VPN solution that will allow you to bypass it.

Just a thought.

Just got this solution from here


What is the difference between sudo -i and su?

EDITED. Note: This answer has been heavily edited since its last iteration based on Eliah Kagan's comments.

sudo -i runs a login shell with root privileges, simulating an initial login with root, acting similar to su -. The primary difference between sudo -i and su - is that sudo -i can be executed using a sudoer's password, while su - must be executed with the root account's password. Hence, if you are on a default *buntu install, where root login is disabled, sudo -i can be used while su and its variants cannot.

If you run the following commands:

$ sudo -i
[sudo] password for <username>: <enter user's password>
# cd ~
# pwd

you will get the output:

/root

Hence, you can see that sudo -i simulates an initial root login, including changing the home folder ($HOME) to root's, rather than your own. This also means sudo -i reads login files like .profile.

Meanwhile, sudo -s starts a new shell but without simulating initial login - login files are not read and $HOME is still set to your user's home folder.

If you run the following commands:

$ sudo -s
[sudo] password for <username>: <enter user's password>
# cd ~
# pwd

you will get the output:

/home/<username>

From this, you can see that sudo -s does not simulate an initial login, and does not change $HOME.


How can I recover my home folder and log in again after accidentally moving in into "lost+found"?

The best solution is to boot from a Live CD and un-do the action you took before by accessing your hard drive from the Live CD.  If you find that any important files are lost, you'll probably need to restore them from backup.

For future reference, you should never move/remove your home directory, and the "lost+found" folder on a partition is not for normal use and you shouldn't use it for file storage.

If you want to hide stuff in your home directory from other users, you change its permissions - you don't move it outside of your home directory.

I'd suggest to change your home directory's permissions to 771 - just that directory, not recursively.  That will still allow, for example, the login manager to access your wallpaper, but people will not be able to see a list of files in there.  If you want it to be even more hidden (so someone cannot see anything in there even if they know the directory/file name), use permission 770.

Keep a record of what you did and what it was previously.


How to call a function from case in shell script?

When you are calling a function, it should be defined and known, when you are calling the function1 at this like:

u) function1 ;;

Interpreter has no idea where this function is, because it has not seen it yet; so put your functions above the case sentence.

That would fix the issue.


Why X is relying on software instead of hardware with "nomodeset" kernel parameter for 3D acceleration?

From what I understand, the X.org guys have ripped out XAA (X Acceleration), and are requiring DRI (/dev/dri/card0) to be available to render anything other than via llvmpipe (software rendering). When you load with nomodeset and acpi_osi=, you are preventing your card from being detected by DRI.  You may be able to log in, but it will very sluggish.

You can test what you are running by typing

glxinfo | less

And searching for Gallium 3D and/or llvmpipe.

The glxinfo program may require the mesa-utils package, just

sudo apt-get install mesa-utils

To install if needed.


Normally the sources are beneath the binary packages.

# ubuntu precise
deb http://de.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu precise main restricted universe multiverse

The deb-src line defines the source repository.


/etc/default/locale contains the system default settings, but if you have user level settings e.g. in ~/.pam_environment they take precedence.

If you want to use en_DK.UTF-8 for a single locale category, I'd recommend that you edit your ~/.profile file and add:

export LC_TIME="en_DK.UTF-8"


Is it possible to bond 2 bonded interfaces?

Sorry I dont think that is possible. The reason is you are trying to layer the same network layer on top on the first. Typically, you can tunnel L2 (ethernet) over tunneling protocols like L2TP or GRE etc. So you will have to create full L3 stacks on your bond0 and bond1 and layer a tunneling protocol on top of it to make them look like L2. At that point, you should be able to bond the two links.

You are best off with doing a bonding of all 4 interfaces into a single bond. That should give you the redundancy and high bandwidth without the complexity.


how do i make shell ask for confimation for rm -rf command (even sudo)?

You can create a bash script that ask confirmation and then run the desidered program.
Create a file named ask containing:

#!/bin/bash
echo "Are you sure to run $1 command?"
read RES
if [ "$RES" = "Y" ] || [ "$RES" = "y" ] ; then
    echo "Running the command..."
    $@
else
    echo "Command aborted"
fi

Copy ask script in /usr/bin/ and set it as executable (or add the script path tho PATH variable):

sudo mv path_to_ask_script/ask /usr/bin/ask
cd /usr/bin/
sudo chmod 777 ask

Then you have to create an alias in the ~/.bashrc file:

alias dd='ask dd'

Now by typing dd, the ask script should be executed, ask for confirmation and eventually call the dd command.

To extend to other command just add an alias like:

alias command_name='ask command_name'
as example:
alias rm='ask rm'

For the rm command you can simply create an alias as:
alias rm='rm -i'

Script tried and fully working on 16.04 with gnome-terminal


Dual Booting Sony Vaio with 4 Primary Partitions Already

You have an UEFI install with gpt partitioning. gpt does not really have primary partitions as they all are the same, or all partitions are primary and you can have as many as you want. Standard limit is 128 partitions.

Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

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

Some specific info on Sony

http://www.slideshare.net/Tinydile/vaio-pro13-win8ubuntu1310uefi


How to send a byte as mutiple input to a file in Ubuntu

You can use multiple print statements in the python command:

python -c 'print "\x31"; print "\x32"' | ./file

Or a single print statement, using a newline:

python -c 'print "\x31\n\x32"' | ./file

Or multiple python commands grouped together before the pipe:

(python -c 'print "\x31"'; python -c 'print "\x31"') | ./file

It seems the characters must not be separated by a newline, in which case:

python -c 'print "\x31\x32"' | ./file


Ubuntu machine on VirtualBox won't get past login screen

As it turns out, the sudoers file was damaged ... and maybe more stuff.  So, here are my notes on recovering the data.  Hopefully they help someone in a similar situation.

Set broken VM's networking to Host Only
boot the broken VM to Knoppix "inserting" the ISO in its "CD drive".
Mount the disk
Find the stuff wanted
start SSH service
Create user with known password. The fact he can't sudo is OK.
Open up permissions of stuff desired to be retrieved. I'm not sure how this is possible with a read-only HDD, but I'm not arguing.
On a different clean VM with plenty of disk space ... also on Host Only networking ... verify SSH to the broken VM under Knoppix.
retrieve stuff via rsync


How do I stop all processes in a chroot?

I don't trust anything but the kernel to keep a sane state here, so I don't (ab)use init to get this job done, nor do I count on myself actually knowing what is or isn't mounted (some packages can mount extra filesystems, like binfmt_misc).  So, for process slaughter, I use:

PREFIX=/mnt/chroot-0
FOUND=0

for ROOT in /proc/*/root; do
    LINK=$(readlink $ROOT)
    if [ "x$LINK" != "x" ]; then
        if [ "x${LINK:0:${#PREFIX}}" = "x$PREFIX" ]; then
            # this process is in the chroot...
            PID=$(basename $(dirname "$ROOT"))
            kill -9 "$PID"
            FOUND=1
        fi
    fi
done

if [ "x$FOUND" = "x1" ]; then
    # repeat the above, the script I'm cargo-culting this from just re-execs itself
fi

And for umounting chroots, I use:

PREFIX=/mnt/chroot-0
COUNT=0

while grep -q "$PREFIX" /proc/mounts; do
    COUNT=$(($COUNT+1))
    if [ $COUNT -ge 20 ]; then
        echo "failed to umount $PREFIX"
        if [ -x /usr/bin/lsof ]; then
            /usr/bin/lsof "$PREFIX"
        fi
        exit 1
    fi
    grep "$PREFIX" /proc/mounts | \
        cut -d\  -f2 | LANG=C sort -r | xargs -r -n 1 umount || sleep 1
done

As an addendum, I'd point out that approaching this as an init problem is probably the wrong way to look at it, unless you actually have an init in the chroot and a separate process space (ie: in the case of LXC containers).  With a single init (outside the chroot), and a shared process space, this is no longer "init's problem", but rather just up to you to find the processes that happen to have the offending path, hence the above proc walk.

It's not clear from your initial post if these are fully-bootable systems that you're just upgrading externally (which is how I read it), or if they're chroots that you use for things like package builds.  If it's the latter, you might also want a policy-rc.d in place (like the one dropped in by mk-sbuild) that just forbids init jobs starting in the first place.  Obviously, that's not a sane solution if these are meant to be bootable systems as well.


Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?

Note this answer is specific to versions of Ubuntu using Wayland, 17.10 being the first release to use Wayland by default.

It is a feature not a bug! It is a design feature of Wayland that you can not start graphical applications as root from the terminal.

The main discussions are of course on the Fedora sites. See Fedora bug #1274451 and Graphical applications can't be run as root in wayland (e.g. gedit, beesu, gparted, nautilus) on Ask Fedora. But there is some discussion on the Ubuntu sites as well (Ubuntu Devs Uncertain about Using Wayland by Default in 17.10 - OMG! Ubuntu).

Ubuntu bug report: Unable to launch pkexec'ed applications on Wayland session

Potential work around - If you are editing system files with a graphical editor (such as gedit) use a command line tool such as nano or vim or emacs. nano is typically easier for new users, vim is more powerful and has more features, see this Vim Tutorial or similar.

At any rate , if you really want or need to run graphical apps as root, set xhost first which forces fallback to Xserver.

To set permissions run:

xhost si:localuser:root

When you are finished, to remove permissions

xhost -si:localuser:root

You can add a graphical / desktop option to do this as per this synaptic bug report

  pkexec'ed applications may be healed with xhost +si:localuser:root placed in XDG autostart as follows (N0rbert's idea):

cat <<EOF | sudo tee /etc/xdg/autostart/xhost.desktop
[Desktop Entry]
Name=xhost
Comment=Fix graphical root applications
Exec="xhost +si:localuser:root"
Terminal=false
Type=Application
EOF

You could add this xhost command to .bashrc, but I would advise a pair of aliases

alias gsuon='xhost si:localuser:root'

alias gsuoff='xhost -si:localuser:root'

You can name the aliases whatever you wish.

For details see:

https://bugs.launchpad.net/ubuntu/+source/backintime/+bug/1713313
https://bugs.launchpad.net/ubuntu/+source/nmap/+bug/1713311
Arch Wiki: Running X apps as root
Arch Wiki: Xhost
What are xhost and xhost +si?

Switch back to Xorg

If you prefer Xorg for any reason, you can select to run on Xorg at login

See How do you switch from Wayland back to Xorg in Ubuntu 17.10?


Yours isn't supported, only some Nexus devices are actively supported
(full list here https://wiki.ubuntu.com/Touch/Devices)


How do you make Ubuntu Server run smoothly with an AMD/ATI ES1000 Graphics card?

My 1st suggestion would be ... delete the desktop.

So you are running an ubuntu desktop as a server. Or a server as a desktop. But the desktop eats resources your server would like to use. The desktop depends on the AMD/ATI ES1000 Graphics card. The server depend on it a lot less.

So ditch the desktop and use command line and web-based tools to manage the server.

2ndly: looking at the specs of this card... it is a server graphics card designed as an integrated solution for remote server management, it has a max of 64Mb memory and is lacking 3D support. It is NOT intended for a desktop. Not even back when it was sold, let alone an odd 10 years later.

That is also the reason you will not find any additional hardware for this card.

Using it for a desktop system is probably impossible with any type of desktop, not just Ubuntu. You really really need to ditch the desktop. Or use something else (that else might be Damn Small Linux)


Is there a "To do list" after installing Ubuntu MATE 14.04.1

Ubuntu MATE is still Ubuntu and uses the same packages and shares most system configurations. You can apply most tips and tweaks here as well. (Like installing ubuntu-restricted-extras, looking for proprietary drivers, updating the system, etc.)

As for customizing the desktop appearance, look for Linux Mint MATE customizations tips. These tips are applicable for Ubuntu MATE, too.


Why is /etc/default/locale not sourced at login via ssh?

... and minutes later I figured it out ... bloody PAM!

Tracked it down by looking at all /etc files sourcing /etc/default/locale and PAM turned up. It sources it in /etc/pam.d/sshd.

Then I remembered that I only recently disabled PAM in /etc/ssh/sshd_config by commenting the line #UsePAM yes when I wanted to jail sftp users via chroot'ing.

Solution: Either re-enable PAM in sshd_config, or source /etc/default/locale in /etc/environment, /etc/profile, or ~/.profile

Mods can delete the question and this answer if they wish. I'll leave them in case others fall through the same crack.

However!

Shouldn't this actually be a bug worth reporting to the Ubuntu devs? Shouldn't locale settings be configured on all logins, regardless whether PAM is used on not?


cd xilinx_path/ISE_DS/common/lib/lin64
sudo mv libstdc++.so.6 libstdc++.so.6.orig
sudo ln -s /usr/lib/libstdc++.so.6.0.14 libstdc++.so.6

These solved my problem.


how can I remove the clear screen before login

for systemd set TTYVTDisallocate to no.

to achieve this, run systemctl edit getty@tty1  and enter the code below

[Service]
TTYVTDisallocate=no


List closed-source installed applications

The program vrms will do this. Run sudo apt-get install vrms, and then run vrms. This identifies which programs are free/open source by seeing which repository they were installed from. However it will ignore programs you installed by just downloading a .deb file from the web, as they are not from any repository.


ubuntu 16.04 software updater fails with "failed to download repository information"

For some reason your keys are not validating your packages anymore. This can either be because the mirror you are downloading packages from is bad or your keys are bad. Since you already tried changing your mirror it's unlikely your mirror is bad, but instead you are likely missing keys somehow.

Go to the System Settings and open the Software and Updates then go to the Authentication tab. You should see some keys in there like the ones in this screenshot, if not hit the "Reset Defaults" button:


12.10 error after login -Evolution calendar

This is a bug. You can find more on it here.

The solution that the bug report proposes is:

sudo apt-get --reinstall install evolution-data-server indicator-datetime unity-scope-gdocs

You can also select the option to no longer report this bug (I think this is in the pop-up).

Or you could switch of bug reports as such. The latter is a personal choice. You can do it typing privacy in the Dash, then look for this screen:


System unresponsive if left unattended for a few days

Usually a system locks up when we do something. It's not often it locks up when we do nothing. On new Intel Bay Trail CPU's with Kernel version < 4.7.2 there are reports of freezing unless "intel_idle.max_cstate=1" is on the grub command line.

Your first choices after reboot are to look at dmesg. Then look at /var/log/kern.log (go to the end and scroll up). Then look at /var/log/syslog (also starting at end). Hopefully error messages are listed indicating what is leading up to the freeze up. Some users have a /var/log/messages file that can be viewed but it doesn't exist on my system (Ubuntu 16.04 / Kernel 4.7.2).

Because you are doing nothing for 3 or 4 days yet the system crashes on it's own my inclination is it's running out of memory (RAM + SWAP). To confirm this you will have to check on it once a day and type:

free -t

in the terminal. If my hunch is right each day you will see less and less available memory until the third or fourth day when there is none left. If my hunch is wrong there are no warranties on the crystal ball and you are back at square one digging though message files.

What applications are running on your system whilst unattended for 3 or 4 days? A poorly written application can allocate RAM for working storage and then forget to give it back to the Operating System later.


You may follow the installion instruction provided under their manual here

To install JRE 8 you need to activate the universe repostory.


WARNING: all packages have been deleted from this repository

The repository has moved. It doesn't mean the files don't exist just placed somewhere else.


Can't use metacity themes in gnome flashback session (metacity) Ubuntu 16.04

You can use GSettings to change theme:
gsettings set org.gnome.metacity theme THEME_NAME

Above will work with Metacity 3.16.x and 3.18.x, but starting with 3.20 Metacity by default will use GTK+ theme. To use Metacity themes you will need to change two settings:
- gsettings set org.gnome.metacity.theme type metacity
- gsettings set org.gnome.metacity.theme name THEME_NAME

Available types are metacity and gtk. When using gtk type Metacity will ignore THEME_NAME and will use GTK+ theme.


How do I make the Unity Launcher background transparent?

You want to remove the 1px white border around the launcher, right?
If that's the case, I believe it's hard coded and it's not something that can be achieved without messing up with unity source code, or in your case - with the unity-rotated one :)


Unresponsive harddrive unlock screen after kernel upgrader 4.4 -> 4.8

If anybody stumbles past this question, my solution ended up being installing kernel 4.9 instead. Not sure what is wrong in 4.8, but I see no issues yet running 4.9 instead.

My computer is a Dell XPS 9550, if that's any help


Repackaging .deb with an alternate target

To do this kind of thing you would normally just modify the source package locally in the way that you desire, tweak its version and/or name, and upload that to your PPA.  You can achieve the environment variable change by setting it in debian/rules.

The documentation tree at https://help.launchpad.net/Packaging/PPA answers a number of common questions in this area.

I would suggest looking into the existing binutils-*-cross source packages in Ubuntu (e.g. binutils-arm64-cross) as a model for this, though.  Those do it by build-depending on binutils-source.  It would probably be quickest to take whichever one of those is most up to date, search-and-replace architecture names, adjust the changelog, and upload.


xdotool search window of Gedit doesn't work

Ubuntu 17.10 by default uses Wayland instead of Xorg and Gedit runs under Wayland itself instead of the XWayland compatibility layer. xdotool doesn't work with windows running under Wayland.

As a workaround you may switch back to an Xorg session from Wayland following this Q&A: How do you switch from Wayland back to Xorg in Ubuntu 17.10?


System freezes after copying large files

I found the solution. Seems like KDE keeps remembering something from the previous session. Turning it off in Setting > Startup and Shutdown >  Desktop Session solves the issue.


How can I dual boot Ubuntu with Windows 7?

See this page http://www.ubuntu.com/download/help/install-ubuntu-desktop
In the Installation type page, Ubuntu installer will automatically detect your pre-installed Windows and give you an option to install it alongside Windows 7. Select that option. After that allocate disk space for Ubuntu. If you want to completely move to Ubuntu, I would recommend giving some 50 GBs to it; Otherwise 10 GB is good.


I don't know much about the driver rt3290sta except, from working with it over the years, I know that it's getting a bit old. The fact that the interface appears as 'rename3' suggests that it's an unhappy driver. I would much rather tweak some settings and get the default driver rt2800pci working well.

Please open a terminal and do:

gksudo gedit /etc/modprobe.d/blacklist-ralink.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Change the file to read:

#blacklist rt2800pci
#blacklist rt2x00pci
blacklist rt3290sta

Proofread carefully, save and close the text editor. Then set your regulatory domain explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Finally, the default driver, rt2800pci, seems to be troubled by 802.11N. If your router is capable of it, I suggest that you switch from mixed 802.11B, G and N to B and G only.

I also notice this:

Channel occupancy:
  5   APs on   Frequency:2.412 GHz (Channel 1)
  2   APs on   Frequency:2.437 GHz (Channel 6)
  8   APs on   Frequency:2.462 GHz (Channel 11)

Your router is on the very crowded channel 1. I suggest you change to channel 6.

Reboot the computer and the router and let us hear your report. I will edit my answer as needed to add further troubleshooting steps.


Problems with RTL8822BE Bluetooth on Ubuntu 18.04

This isn't much of an answer, but I was running into a very similar issue to yours after updating my kernel to 4.18.0-18. When I switched back to 4.18.0-15, Bluetooth seemed to be working again. I ran some diagnostics (lshw, lspci, hdiconfig dev, etc.), but didn't do much else.

When next I switched back to 4.18.0-18, for some unknown reason the issue magically fixed itself. I am unable to reproduce the breakage that I was seeing earlier, which is very spooky but at least it is fixed now.

So maybe, try switching back to an older version of the Kernel and see if Bluetooth comes back? If so then you might be able to figure out what part of the kernel update broke Bluetooth for you, and maybe you'll get lucky like me and the problem will fix itself.


I cannot close terminal after updating my pc

Press Alt+F2 and type: xkill
Click on terminal window.


Start the computer with a Ubuntu live-dvd/usb.

Select try.

Initiated the live session.

Open a terminal.

Identify the drive running:

sudo su
fdisk -l

Suppose is /dev/sda, run:

dd if=/dev/zero of=/dev/sda bs=512 count=1

Where:

if=/dev/zero - Read data from /dev/zero and write it to /dev/sda.
of=/dev/sda - /dev/sda is the drive to remove the MBR including all partitions.
bs=512 - Read from /dev/zero and write to /dev/sda up to 512 bytes at a time.
count=1 - Copy only 1 BLOCK input blocks.


any reason Ubuntu Software Center does not accept paypal?

PayPal is now supported in Software Center:

click the buy button in software center...

login to your launchpad account when prompted... and then you can pay using PayPal


Image viewer - How to view images that are in order in the folder as clicking next in the viewer?

The image viewer show the images in alphabetical order. This cannot be customized, unfortunatelly. You would need to rename the pictures, for example by prepending the name with a number, in order to alphabetically sort them in the order you want.


Could not find a version that satisfies the requirement pybarcode

To install pyBarcode dependency of GNU Health open the terminal and type:

sudo apt update
sudo apt install python3-pip
python3 -m pip install --user pyBarcode

To install gnuhealth-3.4.1.tar.gz: How do I install a .tar.gz (or .tar.bz2) file?


Proper way to run Rider without Missing Templates

I came up with temporary tiny-hack-solution like this;

I created a desktop shortcut with sudo bash commands in it. When I click it a terminal asks sudo password. If I enter it correctly, then I can launch rider, update rider etc. But it's a bad way to do it. ( If I update toolbox, what to do ? etc. )

[Desktop Entry]
Version=1.0
Name=run toolbox
Comment=runs toolbox
Exec=bash -c 'cd /opt/jetbrains-toolbox-1.15.5605 && sudo ./jetbrains-toolbox; bash'
Terminal=true
Type=Application

Name[en_US]=runtoolbox.desktop

Is there anyway to work properly with Jetbrains's Rider in Ubuntu ?


(16.04) How to "detach" programs from terminal?

You'd best prepare for this ahead of time when starting the program.

There are are a number of options you can use when starting it.  You can start it using the nohup option, whereas it would continue to run if you send it to the background and close the terminal.

There's the Screen option.  Screen is an application.  It isn't installed by default.  You can install it with:

$ sudo apt install screen

You can then start a screen session by running screen at the terminal.

$ screen

While in screen you can bring up the help screen by hitting the keyboard shortcut: Ctl+A then hit ?.  The Ctl+A puts screen into the listening mode for the a command to key to follow.

Applications started in a screen terminal will continue to run when you close the terminal.  You can connect to the screen terminal on a different login... even from a different computer and continue with the application.

Screen has the detatch and reconnect functionality that you describe in your question.

Notes:

To detach a terminal running screen, just close it.  To attach a terminal to a previous detached screen use these steps:

Find the screen you want to attach to:

$ screen -list

Use one of the attach options to attach to one from the list:

$ screen -D -r [desired detached screen]


Thinkpad T530 with Optimus and Docking Station

Install 14.04.3 and install nvidia-prime for an optimus card
so you can switch graphics to performance mode or not in nvidia-settings


How to make a window transparent while moving it

You can do this from CompizConfig Settings Manager:


Install archlinux package pk2cmd-plus on Ubuntu 12.04 64bit

Ok, so I finally solved it. I had to have the package libusb-dev installed.

This is what I did:

1) I downloaded the source and the new device file from Archlinux, unzipped it, and compiled it.

make linux

2) Copied the executable and the device file to another folder (according to the readme-file).

sudo cp pk2cmd /usr/local/bin/
sudo cp PK2DeviceFile.dat /usr/share/pk2

3) Changed user privileges to the binary (before doing this I had to run pk2cmd as root).

sudo chmod u+s /usr/local/bin/pk2cmd

4) Updated .bashrc with the line.

export PATH=$PATH:/usr/share/pk2

And now it works :)

mikael@computer:~$ pk2cmd -?v

Executable Version:    1.21.00
Device File Version:   1.63.148
OS Firmware Version:   2.32.00


juju ceph-mon is in error state after servers reboot. hook failed: "config-changed"

A Solution was upgrade ceph-mon charm because of Python 3 compatibility patch was issued. It was simple:

juju upgrade-charm --force-units ceph-mon
juju resolved ceph-mon


Is Ubuntu LTS based on Debian Unstable or Testing?

It's true technically that Ubuntu LTS is based on a snapshot of Debian Testing whereas other Ubuntu releases are based on Debian Unstable.

However, this is a simplistic way of looking at it.  It mustn't be forgotten that Debian Stable, too, comes originally from Debian Unstable, and Debian Stable is a very polished final product - so the fact that something spent time in Debian Unstable earlier in its life cycle is not an indication of its quality in the final release.  After Ubuntu branches off the packages it imports from Debian, Ubuntu and Debian then independently continue the process of fixing and tracking bugs and getting packages ready for release, following their own separate processes and timelines.

In the case of Ubuntu LTS, it branches off from Debian at a later stage in Debian's process: once Debian's branched it off into Debian Testing - implying Ubuntu will benefit from more of Debian's own testing and bug fixing prior to the point at which Ubuntu's process starts.  The primary way in which Ubuntu will benefit is reduced effort getting the packages ready for release.  Ubuntu has different release goals and requirements to Debian which indicates that an Ubuntu LTS won't necessarily be equivalent to a Debian Stable.

Another thing to consider is the distinction Ubuntu makes between packages it supports officially (eg main/restricted) and packages it provides only "community support" for (eg universe/multiverse).  The packages in the latter will be modified relatively little after the import from Debian.

And lastly, there are quite a few packages in Ubuntu that are not sourced from Debian at all, for commercial or licensing reasons or because they are Ubuntu specific.


Having problems booting xubuntu after installation

can you press ctrl+alt+f2  (after login) and write this . sudo apt-get install ubuntu-desktop cream after sudo cream /etc/lightdm/lightdm.conf  and change all codes to it

[SeatDefaults]
autologin-guest=false
autologin-user=enes
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
greeter-show-manual-login = true


Locked out of 15.04 after the latest update

I just had the same problem and fixed it by removing all nvidia drivers:

sudo apt-get purge nvidia-*

(The glob didn't expand here so you might need to type them all..)

Booting with nouveau.modeset=0 added to the linux line in the grub. (Press E at the grub menu entry and add the text)

Login in to the system, right clicking for at terminal and running:

dconf reset -f /org/compiz/

and

setsid unity

After this I reinstalled the nvidia drivers via the additional drivers menu.

Hope it helps!


How do I get rid of a ghost printer in Gnome?

It turns out that this printer isn't installed anywhere on my system.   This is Gnome auto-discovering my Brother laser printer (the one that is installed as HL4570CDW).   So it ends up that the same printer shows up twice on the list (but only once functionally.)

I discovered this because I noticed that my printer's administration web interface said that the printer was located in the "Basement Utility Room" which exactly matches what the Gnome programs were saying.   I figured out how to change that setting.  Once I updated the printer to say it was in the "Office (1st Floor)", the dialog immediatly changed to say so as well:

If I unplug my printer from the network and try to print from a Gnome application, the "ghost printer" no longer appears.   If I plug the printer back in and try to print it re-appears on the list.

I went into the printer configuration and disabled network services one at a time until I found the one that was causing the printer to magically appear (although non-functional.)   The culprit is IPP.   If I disable IPP services on the printer (and reboot it), then I no longer get the ghost printer even when the printer is on and connected to the network.

When IPP is disabled, you can still install the printer as LPD or raw socket.  However, IPP may be important for printing from other platforms such as Windows and Mac.

In the end it appears to be a bug that a printer discovered via IPP is non-functional.

To stop programs from showing auto-discovered printers in the print dialog, you need to reconfigure the avahi  daemon service as detailed in this answer to How do I disable automatic remote printer installation?:

  edit /etc/avahi/avahi-daemon.conf and in the [server] section, add enable-dbus=no  then restart the avahi-daemon service: sudo service avahi-daemon restart

Once I configure avahi like this, I no longer see this ghost printer even when the printer is available with IPP.