Is it any way to temporarily install make 3.81?

GNU maintainers are usually pretty good about things like this: if you build and install make-3.81 from source, it will go into /usr/local/ by default (leaving the current version of make in /usr/bin), and you should be able to remove it completely by running sudo make uninstall from the source directory afterwards.

To illustrate:

steeldriver@xenial-vm:~/src/make-3.81$ ./configure
steeldriver@xenial-vm:~/src/make-3.81$ make
steeldriver@xenial-vm:~/src/make-3.81$ sudo make install

Then check the version:

steeldriver@xenial-vm:~/src/make-3.81$ hash -r make
steeldriver@xenial-vm:~/src/make-3.81$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-linux-gnu

Now uninstall it and check again:

steeldriver@xenial-vm:~/src/make-3.81$ sudo make uninstall
steeldriver@xenial-vm:~/src/make-3.81$ hash -r make
steeldriver@xenial-vm:~/src/make-3.81$ make --version
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


Open a terminal (Ctrl + ALt + T) and type sudo apt-get install myunity. Press y, then when it is done, type myunity.Go to the themes tab, clcik the theme you want to apply and click OK. You can also install themes from this tab.


Ubuntu 16.04: Xorg cpu usage and usb hub

I had a similar issue on Ubuntu 20.04 which amazingly enough was caused by using a custom version of .Xmodmap.
Further reference:
https://bugs.kde.org/show_bug.cgi?id=306352


XPS 13 9370 Developer Edition doesn’t recognize Live USB

Found the answer at https://www.reddit.com/r/Dell/comments/7r05wb/9370_first_boot/. Apparently you have to first enable Thunderbolt Boot in BIOS.


How to read/mount full Ubuntu volume from now external hard drive

I had this issue and found a solution from this Ubuntu Forums Thread. I will give further details in case others have this issue and/or that link goes dead in the future.

System Details

Running Ubuntu 16.04 on primary. I have 2 internal drives (SDA = Ubuntu 16.04 with Grub, SDB = Windows 10). I also had an internal SATA drive with Ubuntu 14.04 from a different machine which I decided to mount using an SATA-to-USB external dock, which subsequently placed this disk at SDC; I will refer to this drive as "delta" (view these with sudo lsblk or sudo fdisk -l, or optionally launch GUI "Disks" from Dash)

Issues

Simply looking in Nautilus (Files GUI) I can see a 255 MB Volume when the delta drive is connected, however this is the Partition 1 Master Boot Record (Linux Bootable; EXT2). Looking in Disks GUI it is clear I have an Extended Partition (partition2) of 1,000 GB and Partition5 which is 1,000 GB LVM2 Physical Volume, but no option to mount this partition.

Fix

First run

$ sudo vgscan
Reading all physical volumes.  This may take a while...
Found volume group "ubuntu-vg" using metadata type lvm2
Found volume group "ubuntu-vg" using metadata type lvm2

The issue with this output is that both my primary drive and this secondary "delta" drive are showing the same volume group name ubuntu-vg which causes some conflicts and makes it difficult to distinguish one from the next. So we need to change one of them.
Unplug the secondary (delta) drive. If it is internal you'll need to shutdown to do this, since I'm using a dock I just power it down.
After reboot, re-run:

$ sudo vgscan
Reading all physical volumes.  This may take a while...
Found volume group "ubuntu-vg" using metadata type lvm2

Run:

sudo vgrename /dev/ubuntu-vg /dev/ubuntu-vg-primary

Choose anything you want as the new name, I opted to append -primary here.
Now either shutdown and re-attach secondary and reboot, or just attach the drive if using an external dock as I am.
Again run:

$ sudo vgscan
Reading all physical volumes.  This may take a while...
Found volume group "ubuntu-vg-primary" using metadata type lvm2
Found volume group "ubuntu-vg" using metadata type lvm2

This is what we want to see; two unique volume group names.
To activate our secondary (delta) drive volume group, run:

$ sudo vgchange -ay ubuntu-vg
2 logical volume(s) in volume group "ubuntu-vg" now active
2 logical volume(s) in volume group "ubuntu-vg-primary" now active

Make a mount point if you haven't already, such as:

sudo mkdir -p /mnt/delta/

Make the mount point owned by your user:

sudo chown $(id -u):$(id -g) /mnt/delta/

Important Note:

At this point your system would either fail to reboot into Ubuntu, or it would attempt to load the version of Ubuntu corresponding to the "secondary" drive; At boot time the default/standard is to load from volume group identified as "ubuntu-vg". In order to handle this situation I went ahead and did the following:

$ sudo vgscan
2 logical volume(s) in volume group "ubuntu-vg" now active
2 logical volume(s) in volume group "ubuntu-vg-primary" now active
$ sudo vgchange -ay ubuntu-vg
$ sudo vgrename /dev/ubuntu-vg /dev/ubuntu-vg-secondary
$ sudo vgscan
2 logical volume(s) in volume group "ubuntu-vg-secondary" now active
2 logical volume(s) in volume group "ubuntu-vg-primary" now active
$ sudo vgchange -ay ubuntu-vg-primary
$ sudo vgrename /dev/ubuntu-vg-primary /dev/ubuntu-vg
$ sudo vgscan
2 logical volume(s) in volume group "ubuntu-vg-secondary" now active
2 logical volume(s) in volume group "ubuntu-vg" now active

Finally we can mount with:

sudo mount /dev/ubuntu-vg-secondary/root /mnt/delta/

At this point you can navigate in Nautilus to "Computer" then /mnt/delta/ and view the root of your external drive. You can quickly add a bookmark to this location so that you can easily access it. You could proceed (cautiously) to backup your existing /etc/fstab (to /etc/fstab.bak) and modify the existing fstab to attempt to auto-mount this device/location to the mount point. Make sure to test your fstab before shutting-down or rebooting.

Using sudo blkid I was able to find all of the relevant UUIDs, devices, partitions, volume group info, as well as FS Types, and use this information to add a mount entry directive to my fstab. For example:

UUID=d7556cd2-67b3-4fb4-acc8-1e33dd0eb040       /mnt/delta      ext4    defaults        0       2

Test using sudo mount -a (no output means good; any output can mean there are errors which should be dealt with before attempting to reboot else you may not be able to reboot back to your OS properly).


Removing mdadm array and converting to regular disks while preserving data

What I ended up doing was repeating this procedure until I had all of the files off.

mdadm /dev/md0 --fail /dev/sd... --remove /dev/sd...
mdadm --zero-superblock /dev/sd...
mkfs.ext4 /dev/sd...
resize2fs /dev/md0 (disk size)
Copying 2TB of data to /dev/sd...
Go to step 1 until all of data is off of md0.

After this is all done I did the following:

mdadm --stop /dev/md0
mdadm --remove /dev/md0

All went well and I didn't even loose any data. Obviously you should back up your data, but in my case backing up 6TB isn't really feasible. Therefore, I was willing to take the risk. There were a lot of vulnerability points to this process and it takes a long time. I'd urge you to only do this with data you either have backed up or can easily recreate.


Control sound permissions, revoke access to audio

Check System
To enable ACL, the filesystem must be mounted with the acl option.
It is very likely that the ACL option is already active as default mount option of your filesystem. Check typing (replace sdXY with correct partition):

sudo tune2fs -l /dev/sdXY | grep "Default mount options"

the output should be something like:

Default mount options:    user_xattr acl

also check that the default mount option is not overridden, in such case you will see noacl in /proc/mounts in the relevant line. Type:

sudo cat /proc/mounts | grep noacl

If you need, you can set the default mount options of a filesystem using the tune2fs -o option partition command, for example:

 tune2fs -o acl /dev/sdXY

Using ACL:

to modify ACL use setfacl:

setfacl -m "u:username:permissions

or

setfacl -m "u:uid:permissions

for example, to revoke access to sound card for a user, type:

setfacl -m "u:u1:---" /dev/snd/controlC0

You can easily try if it works, putting playing an audio track and then executing the command: if the sound is interrupted, the command has been executed

You can also check if the permissions have been changed with:

getfacl /dev/snd/controlC0 ( Control Interface /dev/snd/controlCX )

Refer to manual man acl and  man setfacl for more options.


How to use FQDN instead of just the host part at command prompt?

Open your ~/.bashrc.

Find this:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

And replace \h with \H, like this:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\H\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ '
fi

\h is the short-hostname, and \H is the FQDN.


if you wish to use WUBI then you just run it from inside Windows

visit this link from Internet Explorer etc and start the install from in windows

http://www.ubuntu.com/download/desktop/windows-installer


How to search the location of Shell Script

Those scripts are in the ROOT directory. 1st time I see this done like this and it feels ... wrong. Plese put them in /bin or /usr/bin. You can use cd / and ls -l to show you a list of those files. Editing is done with vi or another command line editor.
This file you posted is the crontab file and is edited with crontab -e but you need to be logged in as the user this crontab belongs to. If that is root you need root access to be able to edit this.
The lines with a # in front are commented and not executed.


Unable to upload files with any browser on Ubuntu 14.04, why?

Please check whether addon is enabled in browser and use the below command,

sudo apt-get install ubuntu-restricted-extras

Hope this helps.


Ubuntu kept freezing and can't boot after entering Win 10

I solved the problems myself: I am still keeping the security boot enabled.

type the following command in Win 10 command prompt:

bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

This will give me the ubuntu option when I start the laptop.

The freezing problem after clicking "shut down" seems to be related with the Nvidia driver. I followed the first answer in the post :
Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics

I used to use X.org driver, now I'm using Nvidia driver 390 (proprietary): there are Nvidia 396, 410, 415 available in my "Software & Updates", all of which are open source.


Installing C POSIX libraies in Ubuntu 14.04 LTS

The things you have listed are header files - which do not have a one-to-one correspondence with Ubuntu (Debian) packages.

In particular, sys/ioctl.h and sys/unistd.h should both be provided by the libc6-dev package and ncursesw/ncurses.h by the libncursesw5-dev package i.e.

sudo apt-get install libc6-dev libncursesw5-dev

If you haven't already installed the GCC compiler, you can install the build-essential metapackage which includes the compilers as well as libc6-dev

sudo apt-get install build-essential libncursesw5-dev


Log in screen background different from desktop

Install ubuntu tweak If you haven't installed yet.

open it go to tweaks tab then Login settings and there you can choose your login wallpaper.

to install ubuntu tweak

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak


Where is the synergy configuration file?

You will find the synergy configuration file in the Directory
  $HOME/.config/Synergy/Synergy.conf

In this configuration file there is an option crypto Pass


You could add the script to your sudoers configuration file:

sudo visudo

Then find the following:

%sudo ALL=(ALL) ALL

add after:

 your_username ALL=(ALL) NOPASSWD: /path/to/your/script

CTRL+X and confirm.


Use gksu in your launcher

gksu zenmap
gksu nmapfe

You can edit the zenmap launcher with alacarte. Screenshots of alacarte and configuration of the zenmap launcher:

sudo apt-get install alacarte


Why can't I restore grub after installing Windows?

There's 100GB of unallocated space in the extended partition, before the 4GB swap partition. The Windows Restore erased your Linux partition.

The only thing to do now is trying to recover the lost partition. See: Deleted Partition Recovery.


Please help, no back light anymore. MacBook pro won't boot

Okay,
I solved the above problem by installing ubuntu fresh. And then do not have the drivers installed automatically, but do this yourself later. Problem seems to come from NVidia. By not installing this I no longer have the above problems.
The MokList message, I have left it for what it is. It cannot cause any further problems.
But what I do run into is the enormous heat development in the macbook.
standard I already measure an average of 72 degrees Celsius in core 1 and core 2. When I stream a movie from my NAS, the temperature rose above 90 degrees Celsius. The fan will then run at full volume. A little later I see the temperature again towards 72 degrees Celsius. But this is still very high. Especially when almost no tasks are being performed. Someone here experience more in combination with a MacBook Pro?
Edit:
Now I am a bit worried about the temperature.
As long as I have no other applications open, the temperature of the CPU is already above 70 degrees Celsius.
And in some cases there are peaks of up to 96 degrees Celsius. This is really too warm and I don't expect any long-term preservation of the hardware with this.
I would like to hear if this can be solved properly.
From the following site I have executed point 1 (TLP) and point 2 (thermald).
https://itsfoss.com/reduce-overheating-laptops-linux/
What can I do now?
https://i.ibb.co/dKm39fb/Schermafdruk-van-2021-05-04-20-29-32.png


I doubt ntfs-3g is the most reliable tool to fix and/or format an NTFS partition. Since you have a Windows OS at hand, have Windows check / reformat your NTFS partition. Worked for me in the past.


Remmina refuses to scale the remote screen res to fit in smaller client screen

I had the same issue (same release). Upgrading to 1.3.4 did not work for me, same issue appeared.

The solution was to put scaling back to 100%. I am not sure this can be considered a solution, as 100% scaling for 4K makes everything tiny. But at least you can access your entire desktop.


Opening a file from terminal only by typing its name

Use Ubuntu's command-not-found hook, as specified in Command Not Found Magic. It is currently used to suggest packages to install. Refer to /usr/share/doc/command-not-found/README which should be installed on your system.

Better yet, because it does not depend on the command-not-found package, (re)implement the Bash builtin command_not_found_handle to do an xdg-open if $1 is an existing file, and to delegate all other cases to the previous implementation.

# Save the existing code for the handler as prev_command_not_found_handle.
# Bit of a hack, as we need to work around bash's lack of lexical closure,
# and cover the case when it is not defined at all.
eval "prev_$(declare -f command_not_found_handle)" >& /dev/null \
     || prev_command_not_found_handle () {
            echo "$1: command not found" 1>&2
            return 127
        }

# Define the new implementation, delegating to prev_handler.
command_not_found_handle () {
    if [ -f "$1" ]; then
        xdg-open "$1"
    else
        prev_command_not_found_handle "$@"
    fi
}

Good question, nifty feature.

Thinking it over some more: you might not like the feature as much as you think, unless you also extend the bash_completion handler. Imagine wanting to open file-with-a-long-name.txt, then setting

alias o='xdg-open'

will make (about) four key presses suffice:

o f<Tab><Enter>

Whereas typing the full file name takes a tedious 26 - and that excludes backspacing over the inevitable typos.


it is simple, just to preferences => edit => general, on the tab for console change the command there to

console application commands:
konsole --new-tab -p tabtitle=%d -e telnet %h %p

then {the second console application commands:

Local serial connections (remember to install socat)
konsole --new-tab -p tabtitle=%d -e socat UNIX-CONNECT:"%s" stdio,raw,echo=0


Desktop edition to Server edition and support

There are no different repositories for desktop and server packages (hence you can install all available server components in a desktop installation). The difference between desktop and server support with an LTS is just, that server-related packages get updated two years longer. So you won't get five years support for e.g. GNOME applications just because you installed the server version.


Keep getting kicked back to login screen after Xorg -configure

I would suggest you remove /etc/X11/xorg.conf and let Xorg detect everything itself while starting up, as that's the recommended way (especially if you are using open source drivers like the 'intel' ones).

The Xorg -configure option is probably still there for non-linux operating systems.


Using ubuntu14.04/windows 10 as OS's... my ethernet connection (straight into the wall, not a router) has stopped working

Does your ethernet work under Windows? Is it activated there?
I've had it happen before, that if I deactivated my network adapter under Ubuntu/Windows that it was also deactivated in the other OS and I could only reactivate in which ever OS i deactivated it.

Not sure if that helps, but it might be worth trying out.


ubuntu 20.04 [change in login screen after installing lxqt]

When you installed LxQt it changed the display manager from the default GDM to SDDM, this was likely not uninstalled with the desktop.
Log back in to your desktop and open a terminal, type
sudo service sddm stop

to stop the current display manager, then
sudo dpkg-reconfigure gdm3
sudo service gdm3 start

to set the new (default) one.
Now you will have to reboot for this to take effect.


This could be your SWAP partition. It's used as a sort of overflow for your RAM so could improve performance. I'd leave it.


Lubuntu 14.04 xorg-server crash every ~6 hours (NVidia)

Answering partially my own question : I managed to get more stability by configuring nvidia-settings -> PRIME settings -> power saving mode.
It disables 3d acceleration but it's stable (more than with nouveau drivers). I just can't use cuda anymore when in this mode.

I've also tried to update the kernel (using apt-get install linux-image-3.19.0-33) but it doesn't solve the stability issue so I reverted back by apt-get purge linux-image-3.19.0-33.

What's more frustrating is that I got it to work fine for a few months using 14.10 and 15.04 with bumblebee (Yet I remember having a hard time configuring it (to make it use nvidia 352.037 driver version from the nvidia website and a subtle bumblebee configuration trick substituting "." for ":" in configuration file to match pci bus address), but it got totally broken by migration 15.10), but and I can't get it to work right under 14.04.

With a little luck when 16.04 will be released in a few months, those nvidia-drivers issues will be resolved.


How can i run a command script by opening it in a terminal by clicking on it

Easy, you are using sudo in a non interactive shell. It can't do anything since it wants to start a interactive shell but can't.

Also nwipe has no GUI so your command would do, uhh, nothing? Since it would open a terminal use the command and close it again.

What you actually need is a .desktop file that runs your command and leaves the terminal open. Don't forget to make it executable or rather "make it a trusted file"

[Desktop Entry]
Version=1.0
Name=nwipe
Comment=RUN MY WONDERFUL NWIPE
Exec=sudo nwipe
Icon=utilities-terminal
Terminal=true
Type=Application
Categories=Application;


HUD and menu integration for Ubuntu Touch apps

In QML you can use the Ubuntu.Components.Action to define reusable actions that can be used in the toolbar items, as well as the HUD.


Random freezes on 20.04 with Dell XPS 9310

After some trial and error, I managed to fix my problem by upgrading the kernel version. I installed the package linux-oem-20.04-edge and chose the most recent kernel when booting the system. uname -s now tells me that I am running the version 5.10.0-1008-oem. I haven't experienced any freezes in about a month now.


Can't install ppa:utouch-team/utouch on Lucid

You get the error because the PPA only provides ginn for Maverick and Natty, and not for 10.04. I am afraid you'll have to upgrade to a more recent version.
I'd recommend 11.10, the latest stable release.


What happens when I press buy button in software center?

After clicking on the Buy button, Ubuntu Software Center will prompt
  you to login or create an Ubuntu Single Sign On account.

  Ubuntu Single Sign On (Ubuntu SSO) is a service provided by Canonical
  Ltd that allows users to login to multiple websites and access
  multiple services. Use your Ubuntu SSO to login to the following
  Canonical websites:

  Launchpad
  Ubuntu One
  Ubuntu Shop

  PURCHASING SOFTWARE

  If you already have an Ubuntu Single Sign On account, proceed with
  your software purchase:

  In the More Info screen, click on Buy
  Login to your Ubuntu Single Sign On account
  Review the Quantity, Description and Amount of your software
  purchase
  Enter your Billing address
  Enter your Billing information
  Click Review Payment to proceed (or cancel to stop)
  Review your payment information
  Click Submit Payment to purchase software1

1Source:Ubuntu Software Center Documentation

If the App is free, but shows the buy button and $0.00 like the app in the image below, after you login, you will get

And below is the final outcome.  The App was installed without paying a dime.

For repositories, and how they integrate with USC seeIntegration with Ubuntu Software Center.


With a computer with working internet go to http://packages.ubuntu.com/utopic/amd64/bcmwl-kernel-source/download and select a mirror site to dowload from.  Copy the file to a USB, DVD or whatever to get in on the Ubuntu pc and double click on it to install


How do I search for lines in a file that only contain ASCII characters and then act on them?

If you want whole lines consisting only of ASCII characters you need to anchor your pattern to the start and end of line e.g. with grep

$ grep -P '^[[:ascii:]]*$' file
English words only
English words only
English words only
Also English words only
English words only

Some tools provide a whole-line flag such as grep's -x or --line-regexp:

   -x, --line-regexp
          Select  only  those  matches  that exactly match the whole line.
          For a regular expression pattern, this  is  like  parenthesizing
          the pattern and then surrounding it with ^ and $.

allowing you to use:

$ grep -Px '[[:ascii:]]*' file
English words only
English words only
English words only
Also English words only
English words only

Multiline matching adds a whole other layer of complexity, since many of the common command line text processing utilities are line based. You can force grep to slurp a whole file using the -Z flag however there are tools such as pcregrep or perl itself are probably more appropriate at that point.

The next issue you need to solve is how to interpret the concepts "start of line" and "end of line" in the context of a multiline match. Some tools  provide flags for that, as described in Regex Tutorial: Anchors: perl is one of these, which provides a /m modifier. You still need to slurp the file by unsetting the default record separator (done here using -0777); for example

$ perl -0777 -pe 's{^([[:ascii:]]+)\n([[:ascii:]]+)$}{$1 / $2}mg' file
English words only
English and 日本語
日本語のみ
English words only
English and 日本語
日本語のみ
English words only / Also English words only
English and 日本語
日本語のみ
English words only
English and 日本語
日本語のみ


How to recover data from Ext4 partitions?

You had one system that contained a number of video files, then a new OS installation was performed.

If the new system was installed without reformatting, then the files may just be there, not needing recovery at all. (Check what folders are in /home; perhaps an old home directory from a previous installation is in there, next to your own home directory in the new installation.)

However, if the partitions containing the video files were removed or reformatted, and then data was written on the disk where they existed, it's highly probable the new data (from the newly installed operating system) irreversibly overwrote large parts of the video files. It's likely some parts of all of them were overwritten. This is hard to recover, it could take hours, days, weeks, or you might not succeed, and it would involve trying to repair damaged video files, since it's unlikely you'd be able to recover the files intact.

Unless the TV episodes you lost are rare and cannot be obtained again, it's not worth it to attempt recovery. What you'll likely get from recovery after the drive was formatted and another OS installed is, at best, highly corrupted files. While better outcomes are possible, probably most of the files would cut out and stop playing altogether, somewhere in the middle. It would be one thing if you had just accidentally formatted it, but once a overwriting has happened, data recovery is only worthwhile in cases where valuable, difficult-to-reconstruct data are lost.

It's a hassle to get the files again, and takes time, but so does data recovery, and data recovery will likely take more of your personal time and effort (while preventing that computer, or at least that hard drive, from being put to productive use).

Usually, I only recommend attempting data recovery if the likelihood the data has been overwritten is very low (not the case here), if the value of the lost data is very high (probably not the case), or if the data has intangible value that's hard to quantify but you are very attached to it (e.g., your own creative/artistic works regardless of whether or not they are monetizable; the only copies of pictures of your children or from a vacation with a now-deceased relative).

Still, if you want to try, there's a slight possibility you may recover significant data. It's possible that, by chance, the files were mostly located somewhere on the disk that was not overwritten by the new OS installation.

If you want to attempt recovery, first take a look at this page:

Data Recovery (Ubuntu wiki)

You would image the drive, then perform analysis on the image to recover files from it. Photorec (it's not just for pictures) might be a good analysis tool to start with.

Also I recommend taking a look at this question:

Is there any recovery software available for ext4?

Some of these other questions may also be of help.


When you want nc to listen, you need to use the -p parameter to specify the listening port like this:

nc -l -p 5000 -e /bin/bash


Lenovo G50-30 mic built in volume problem

If the microphone is a stereo one, the signals from both channels cancle each other out and become close to a null value. If you disballance both channels slightly, you may get it to work properly.


Manually deleted current kernel headers package

Try:

sudo apt-get --reinstall install linux-headers-$(uname -r)


Hyperlinks clicked in evince document viewer are not opening, any ideas on how to fix?

None of the above solutions worked for me, however this does work :

See what is currently on its ignore list

ls -la /etc/apparmor.d/disable

Now add Document Viewer (evince) to that list

sudo ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable/usr.bin.evince

engage the change

sudo service apparmor restart


Can't open Nautilus Windows from external programs on Ubuntu 18.10

I figured it out. Nautilus was opening as expected, but in the desktop of my second monitor, which was shut off this whole time. I'm not very smart.


Scroll up/down stops working in Chrome Ubuntu 18.04

I had the same issue but I was able to fix this by disabling smooth scrolling via chrome://flags/#smooth-scrolling

Although I didn't get the same experience of scrolling thereafter on Chrome but it stopped this from happening.


Ubuntu 16.04 WIFI will always disconnect by itself after more than half an hour

Your computer has integrated Intel Wireless-AC 7265 module according to official Intel specifications. The Intel wireless modules have default region (country) embedded setting in its configuration "world" (00), which can restrict connecting for some wireless standards, e.g. it can disable IEEE 802.11ас standard in some cases. First of all create /etc/modprobe.d/cfg80211.conf file:

sudo touch /etc/modprobe.d/cfg80211.conf

Add the following line to the file:

options cfg80211 ieee80211_regdom=UA

where UA is region (country) code. Replace the code with some unrestricitve country - see List of countries.

Reboot your computer and see if problem is solved. Also check if contry code is set correctly:

iw reg get

If the problem hasn't gone away, the next possibility is to disable power management for wireless card. Check the state of wireless card power management:

iwconfig

If the last command returns for you wireless card Power Management:on - disable it temporarily (until next system reboot):

sudo iwconfig wlan0 power off

where wlan0 is name of your wireless module, replace it if it differs for you.
Check power management status again:

iwconfig

Don't reboot computer and observe if the problem gone away. If power management disabling has helped, make the setting permanent - open in your favorite text editor (let it be vim for instance) file:

vim /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

and in the line wifi.powersave = 3 replace 3 with 2, so after editing the line will be wifi.powersave = 2. Reboot your computer and check power management status again:

iwconfig


export $PATH not working correctly on Ubuntu 13.10

It's not related to a $PATH error, on 13.10 you need to install the 13.04 ia32-libs package.

You can download the ia32-libs package from the raring repository.

Download it from a mirror and install it manually, then you should run the arm-none-linux-gnueabi-gcc executable.

sudo dpkg -i ./ia32-libs_20090808ubuntu36_amd64.deb


Where can I apt-get install asterisk 11 on Ubuntu 16.04?

There is not much packaging made for asterisk. One of the most popular will be the debian/ubuntu official repositories, but there not up-to-date. Those distros freezes a version and apply patches, what makes asterisk version a little tricky (ubuntu 16.04 offers 13.1.0 and debian 9 13.14.1 ). Xivo was building updated packages, but it's for debian. Now wazo is also pushing some packaging, anyway this ones also patches asterisk to adjust with their software...


"This application is unconfined. It can access all personal files and system resources." - what does it mean?

If it is a well known software, it's perfectly OK to install. However, software often has bugs, which either good hackers or bad hackers can discover. In the later case, unconfined app means there is a chance that software that is exploited by malicious attacker will give them access to more than just confined environment, including system and files.

It's worth mentioning that some of the applications have access to X11 server, which is your standard GUI on Linux, which is inherently not a very secure. Application that is compromised, then, will have access to X11 resources, including among other things, the clipboard, and that could give access to the attacker to number of exploits. This doesn't mean that either application is bad or X11 itself are bad, or their interaction is bad. It's merely an acknowledgement of the greater attack surface given to malicious actors.

In other words, it's just a warning or disclaimer. It doesn't mean the software itself is inherently bad/broken/malicious.

See also:

https://askubuntu.com/a/760813/295286


Ubuntu 12.10 network settings UI grayed out

Did you happen to edit /etc/network/interfaces? If you manually configure, or a program did, network manager won't manage them.
For example... here is one that I let network-manager take care of...

auto lo
iface lo inet loopback

If you have a lines assigning ip's and stuff, they you are taking control and essentially telling network-manager not to mess with it


By default, Superd hides all windows on the current desktop (Note that Super is the win key). This is not relevant in the Overview (after you press Super on its own), so it should and will not work there.
In Ubuntu, system wide shortcut keys (Super to go to the overview, Alt+F4 to close the window, Alt+Tab to close applications) are not available while an application menu is open. You can only get away from the menu by closing it out (hitting Esc will do). It is currently designed to work this way, and unfortunately cannot readily be changed without editing source code, or alternatively, filling an issue to the developers.


You could make a new launcher that ran this:

wine "`zenity --file-selection`"

You might need to install Zenity first though:

sudo apt-get install zenity


RakNet crosscompile issue from x86/64 to ARM64 jetson nano missing

You can simply comment out the use of io.h in FileList.cpp, its not actually used in the file when building ARM so it isn't missed.


How to make Opera to ignore system palette in Lubuntu

In Opera go to big Opera Tab on your upper left and click Appearence or you can just shift+F12

Click on theme of your choice and click OK. You can also discover new theme by clicking Find More Theme button.

Hope it help.


Pointing a domain name to my home web server

Does your browser report "Connection Timed Out" when you try to connect to port 80 or 443?

If it does, it's most likely because your ISP blocks incoming connections to those ports for "security reasons" (though most ISPs just don't want consumers running web servers without special plans).

There's no way of getting around this short of changing ports. Luckily for you, the secondary ports for HTTP and HTTPS usually aren't blocked by ISPs, and are accepted by modern browsers in terms of security. The secondary ports are 8080 for HTTP and 8443 for HTTPS. Change those ports and you should be able to connect.

On a slightly off-topic note, if you need a server manager for your Minecraft server, PufferPanel is free and works rather well. I use it myself and find it's very handy for managing my MC servers remotely. It does take some setup, but the setup is well documented and isn't too difficult.


backup your personal data. Always important to do anyways. Store what is important on an USB. I do not bother with video and music (I could always re-download those but my projects are on my system, on a backup on an external medium and stored on-line at an ftp I own).

do not format the location you stored them. You can do that using the "something else" method or picking the "replace but save my documents" method.
Tip: I have my data on a separate partition and not in /home/ and edited  ~./config/user-dirs.dirs to point to that partition. So I format / and /home, mount them and mount my partition without format without any risk of loosing personal file. My /home/ is empty except for the hidden files.


Script to find empty files in the current directory?

If you don't need to recurse (i.e. descend into / count empty files inside subdirectories) then you can just use standard file tests e.g.

n=0
for f in *; do
  [[ -f "$f" ]] && [[ ! -s "$f" ]] && { echo "$f"; ((n++)); }
done
echo "Number of empty files: $n"

From help test:

  -f FILE        True if file exists and is a regular file.
  -s FILE        True if file exists and is not empty.


HP Pavilion 15 with AMD dual graphics - Ubuntu live environment not starting

I had similiar issue with Ubuntu 13.10 on HP Pavilion 17-e050sm laptop:

Microprocessor AMD Quad-Core A4-5000M APU with Radeon HD 8330 Graphics (1.5 GHz, 2 MB cache)
Chipset AMD A76M FCH
Memory 4 GB DDR3
Video Graphics AMD Radeon HD 8330 Graphics (up to 1.98 GB)

and solved it by passing nomodereset kernel option (press F6) before booting live session.
Hope it helps you,

Regards!


unable to download 480p format using youtube-dl

It involves a reasonable amount of work but one method would be:

Install the latest FFmpeg following these directions. This will not interfere with any system FFmpeg or avconv installations.
Make sure you have the latest youtube-dl by running:

sudo youtube-dl --update

Point youtube-dl to your new, local copy of FFmpeg:

youtube-dl -f 135+141 --prefer-ffmpeg --ffmpeg-location $HOME/bin <url>

Decrease your commandline complexity by adding your preferences to your $HOME/.config/youtube-dl.conf file as:

--prefer-ffmpeg
--ffmpeg-location $HOME/bin

It is a little hassle but once setup correctly you should have no further issues...


F? (f.e. F8) shortcuts not working in geany

I observe that this only happens after accidentally pressing the shortcuts in the VTE (the embedded terminal). Even after switching focus back to the main editor, these shortcuts still do not work.

To fix, go to Edit -> Preferences -> Terminal, then uncheck the "Override Geany keybindings" option. However this will disable all keybindings for the terminal, including Ctrl+C for SIGINT. If you don't want that, you'll have to restart Geany everytime it doesn't work.

This bug has been filed here, but it was closed as "won't fix". It seems to be affecting Unity only, and to quote Lex Trotman,

  This is a Unity bug and not something we can fix.

I reported this on Launchpad.


By the AwOken

https://launchpad.net/~alecive/+archive/antigone

The awoken-icon-theme_2.5~ppa1~raring1_all.deb has Installation_and_Instructions.pdf. It is telling:

  3.2 KDE

  From 1.1 version of kAwOken iconset, there are two possibilities:

  DeviantArt download Download the iconset from the link provided in the
  first page of this pdf. Extract the archive you downloaded, then
  System Settings → Application Appearance → Icons and click the Install
  Theme File button. Then, click the Open file dialog button on the
  right of the location text entry, select the kAwOken.tar.gz file you
  just extracted, and click the Ok button. To install also kAwOkenDark
  and kAwOkenWhite iconset, you will have to iterate the same procedure.

  Using the ppa From the 1.1 Version, I mantain a ppa (Personal Package
  Archive), to always get users syncronized with the latest updates of
  the set. So it’s strongly recommended using this installation type.
  The usage is very simple:

  sudo add-apt-repository ppa:alecive/antigone && sudo apt-get update
  sudo apt-get install kawoken-icon-theme

  This will install the iconset in /usr/share/icons folder, so the
  directory is different from the usual installation through DeviantArt.

  Now you can start customizing your iconset the way you want. You’d
  find very useful the instructions shown below.

If the kAwOken iconset is not working then inform the developer/packager.

Quote from https://launchpad.net/~alecive/+archive/antigone :

  For questions and bugs with software in this PPA please contact
  alecive.


How do i install Andy the android emulator on Linux?

They state that here is a linux version in the making.

in this article the download link takes me to a plain text page where it says:

"Andy doesnt run on a mobile device, The Linux version is closed for Alpha if you want to join the testers please email alpha@andyroid.net or visit us again after July 30"

July 30 of what year I don't know, i'm gonna send em a mail for joining the alpha testing group

I did a more extensive search and found that the system requirements say it's compatible with Ubuntu 14.04 and up also I noticed they removed a reference to linux in this article, google still shows the old text..

I will post a update when they get back to me to let you know what the current standing is.

Edit: Genymotion is what I would recommend for the time being. Do keep a eye out for Andy tho Genymotion is very good but it is aimed at developers, if you want you can read the last link I posted they explain some differences there.


How do I add an additional IP address to /etc/network/interfaces?

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address aaa.aaa.aaa.aaa
  netmask 255.255.254.0
  gateway bbb.bbb.bbb.bbb
  dns-nameservers ccc.ccc.ccc.ccc ddd.ddd.ddd.ddd eee.eee.eee.eee
  dns-search vps-number.com

auto eth0:0
iface eth0:0 inet static
  address fff.fff.fff.fff
  netmask 255.255.254.0

Then you can run sudo ifup eth0:0 to bring it up and sudo ifdown eth0:0 to bring it  down.


Unable to install Ubuntu (Lenovo Legion Y520)

Steps:

Flash Ubuntu on a USB, with for example Rufus.
Disable secure boot and fast boot in BIOS which you can access by pressing F2 when the Lenovo logo appears at boot.
Enable UEFI instead of Legacy.
If you want to install Ubuntu and Windows on the same disk, create a partition in windows disk management to install Ubuntu on that.
If you want to install Ubuntu on a separate disk, just follow the Ubuntu installation and chose that disk in the installation, no, it won't wipe windows as Windows 10 is on a separate disk.


Mysql [warning] 'user@localhost' has both a password and an authentication plugin specified

It seems that these warnings are spurious, and may be as a result of a bug being present in MySQL 5.5.x when either the mysql_native_password or mysql_old_password authentication plugins are specified in the mysql.user table.

  ...in MySQL 5.5, if the plugin column is set to either of those plugins and the password is specified, the server complains about it by logging warnings to the error log... Those warnings are spurious. They lead to the impression that something is wrong with the account when that is not the case.

Here's the bug report:

Bug #71465: mysql.user row with plugin and password generates bogus warning


How to Download the video files on internet?

Here is a quick solution. You do not even need a software to download videos from web.

All you have to do is run following commands after the video has been completely loaded on browser.

$lsof | grep Flash

$cat > /proc/PID/fd/FD > filename.flv

Replace PID and FD with their corresponding value from the output obtained from the first command.

Consider following example.

lsof | grep Flash

chrome     3151     abnormal   23u      REG       8,23  1274744  1058929 /tmp/FlashXXmkVBxq (deleted)

cat /proc/3151/fd/23 > "video.flv"


Failed to create folder while install matlab R2015a on ubuntu 14.04 LTC

I was getting the same error while installing.
the mistake was I was not giving sudo permission
you have to use sudo ./install
without sudo you will not be able to create the required folder.


echo $'$foo': the $'[...]' token around $foo interprets $foo literally (as $foo) and tries to expand ANSI C-like escape sequences in it, which are not present, so echo yields $foo;
echo $"$foo": the $"[...]" token around $foo expands $foo to its value (pwd) and tries to translate it if the current locale is not POSIX / C; this is not happening, because either the current locale is POSIX / C or a translation for pwd is not available, so echo yields pwd;
echo $`$foo`: the `[...]` token around $foo allows the expansion of $foo, so $foo is expanded to its value (pwd); the expanded value is run in a subshell, whose output (~/scripts) replaces the whole `[...]` token, so echo yields the $ token followed by the ~/scripts token ($~/scripts).

Ultimately, the last one prints $~/scripts because $`foo` is a combination of a literal $ followed by a command substitution; so the leading $ is interpreted as a literal $ and the trailing `$foo` as a command substitution.


why does mounting a volume on a building raid cause sync speed to drop?

I found the cause. EXT4 is populating inode list since it is a freshly created filesystem which causes the rebuild speed to drop.


Why using `dpkg -x` killed my 19.04 system?

On freshly installed system /lib is a symlink to the /usr/lib:

$ ls -l /lib
lrwxrwxrwx 1 root root 7 Apr 30 02:24 /lib -> usr/lib

But the dpkg -x has overwritten /lib symlink with new contents.

On the killed system it now contains only one folder (from atop package contents):

/lib/systemd/system-sleep/atop-pm
/lib/systemd/system/atop.service
/lib/systemd/system/atopacct.service

So the system can't find libraries.

I have solved this problem by booting LiveCD, mounting problematic system and recreating the symlink:

cd /media/user/problematic-disk/
sudo mv lib/* usr/lib
sudo rmdir lib
sudo ln -s usr/lib lib

and finally reinstall the package with sudo apt install --reinstall atop.

Notes:
1. the Ubuntu 16.04 LTS and 18.04 LTS are not affected because of the fact that they do not have symlinks on the / level (except kernel and initrd).
2. the dpkg -x method should be used very carefully (as last chance to fix the things) and not be used at all on 19.04 and newer versions because of the many symlinks on the top-level (bin -> usr/bin, lib -> usr/lib, lib32 -> usr/lib32, lib64 -> usr/lib64, libx32 -> usr/libx32, sbin -> usr/sbin).


I cannot use hibernate/sleep in Ubuntu 12.04

There are numerous duplicates of this question but I'm gonna answer it anyways....

To get the 'Hibernate' option type the following command in the terminal >>

pm-hibernate

If your PC succeed in going to Hibernate mode and you have no problem waking it up, then you know your PC supports the Hibernate feature. Then again in the terminal type/copy-paste >>

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla

then add the following:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Save (Ctrl + o) and exit (Ctrl + x).

Restart the PC. The Hibernate option should be visible under the 'Shut Down' dropdown.


Execute a command 20 seconds after the desktop is booted

As a workaround: simply create a script:

#!/bin/bash

sleep 20
synclient TapButton3=2

Save it as something.sh, make it executable (for convenience reasons)
Add it to your startup applications: Dash > Startup Applications > Add add the command:

/path/to/your/script.sh

If necessary, you can experiment with the sleep 20 value; from your question, it looks like the command should be run after login process has finished (after it is reset by some process).

At the same time: it would be a more "clean" solution to find out which process makes the settings change, and fix that.

edit:

simpler solution: Add the following to your startup applications (Dash > Startup Applications > Add):

/bin/bash -c "sleep 20&&synclient TapButton3=2"


Apt-get does not recognize node software installed via nvm

The simplest approach, whenever possible is to only use either nvm or .deb packages. This will probably save you a lot of headaches in the long run, so look into that first. It seems like nearly anything node-related that is provided by a .deb package could be installed via nvm instead.

If that really isn't possible, however, you may be able to create "dummy" .deb packages using equivs-control and equivs-build to tell apt that you have the dependencies installed. Note that this could potentially confuse apt if you get things wrong. Also, even if you uninstall nvm packages, apt will still think you have the substitutes you've defined in the dummy packages until you uninstall the dummy packages themselves.

First, install "equivs" so we can build the dummy packages:

sudo apt-get install equivs

Create a control file that describes the dummy package:

cd ~
equivs-control nodejs-dummy

Edit this control file:

nano nodejs-dummy

Un-comment and change lines in the control file as desired. In particular set the "Provides:" line to list the packages that you've substituted using nvm. For example:

Package: nodejs-dummy
Version: (version slightly higher than what the apt package actually provides)
Maintainer: Your Name <yourname@example.com>
Provides: nodejs
Architecture: all
Description: Something that will remind you what this does ;)

Build the package:

equivs-build nodejs-dummy

Finally, install it:

sudo dpkg -i nodejs-dummy_use_the_actual_filename.deb

Rinse and repeat for whatever packages you've substituted using nvm. If a package depends on a specific version of another package you've replaced with nvm, you may need to use that exact version number it depends on. I'm not sure what issues might arise from do so, however, and you'll likely need to keep rebuilding your dummy packages whenever the OS packages change versions.


About private addresses

The IP addresses you're trying to resolve to names (the reverse lookups) are so-called private addresses, as defined in RFC 1918. In short, the following IPv4 range of addresses are defined in there:

10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

Opposed to public addresses, these aren't routed across the Internet and are solely to be used behind NAT in a private network. Many people are using this and therefore absolutely not unique. For this reason it is of no interest to have public DNS servers respond to reverse lookup requests for private ones.

Why it isn't working

Google and all other public DNS servers on the Internet aren't interested in private addresses as they're not routable over the Internet. So, basically, you're doing it wrong by asking a server totally not responsible for your network.

In case you were looking to override this with a local configuration like in /etc/hosts, this won't work:

Can /etc/hosts config reverse resolution? No.
Do entries in local 'hosts' files override both forward and reverse name lookups? Yes, but no, actually

Local DNS server

If you want to be able to do reverse lookups within your private LAN, then you'll have to set up your own DNS server with the appropriate records and have all your local clients using this DNS server. You may already be running one, but you didn't specify anything of it in your question and if you have, you appear not to be using it.

A quick all-in-one solution I can recommend is Dnsmasq . It's a DHCP and DNS server in one1 with the advantage of using the hostname for DHCP also in DNS. From the manpage of dnsmasq is the following excerpt:

  Dnsmasq  accepts  DNS  queries  and either answers them from a small,
  local, cache or forwards them to a real, recursive, DNS server. It
  loads the contents of /etc/hosts so that local hostnames which do not
  appear in the global DNS can be resolved and also answers DNS queries
  for DHCP configured hosts.

Setting up a complete Dnsmasq is a bit out of the scope here as it will replace your current DHCP server, which I don't know is an accepted solution. Anyway, for this part of the configuration this setting will be important:

domain=mydomain.lan,192.168.1.0/24,local

In which you tell it to serve the 192.168.1.0/24 network with short hostnames to use the mydomain.lan domain name and will not be forwarded to the upstream recursive DNS server. Result will be that a machine with the hostname myhost requesting a dynamic address will be automatically used in the local resolver and listens to queries myhost.mydomain.lan and the reverse pointer will resolve likewise.

I'm not aware of a "How do I set up Dnsmasq for a home network the good way?" question on this site. If you or others are interested, I'll be happy to Q&A it.

1 Actually even more, like TFTP server as well.


Following @user535733 's suggestion I set the offending packages to manual by typing

sudo apt-mark manual libcec4 libp8-platform2 libva-drm1

P.S. I could dist-upgrade to kodi17 to see what would happen then but I don't have the time to learn the new interface and reconfigure it for my use-case yet.


grep does not do numeric comparisons, and is not the tool to use here. I'd use:

sort --field-separator=":" --numeric-sort --reverse --key=7 --ignore-leading-blanks filename | \
    tail --lines=3  | \
    sort --field-separator=":" --numeric-sort --key=7 --ignore-leading-blanks


NVIDIA Driver version on NVIDIA X Server Settings

Nvidia v340.46, (which I am also using), has not yet been added to the Ubuntu repository. You must have installed it from the Nvidia website. There are no updates yet, and the Ubuntu update manager recognizes it as a manually installed driver.


How to change circular icon to indicate chosen session in unity-greeter?

Overview

The badges for the Lightdm are stored in /usr/share/unity-greeter.

You can possibly add a new badge to the directory mentioned above. I guess you would want to name it as custom_awesome_badge.png or whatever is the name of the session in /usr/share/xsessions/. All the badges are of 22 x 22 pixels.

From the lightdm maintainer on the ubuntu-devel list:

  Take /usr/share/unity-greeter/unknown_badge.png and use it as a  template (just a 22x22 white circle).
  Add your logo as a transparent cutout of the white circle (see other  badges in that directory for examples)
  Ship your logo as  /usr/share/unity-greeter/custom_SESSIONNAME_badge.png, where
  SESSIONNAME  is your X session name (e.g. 'xfce' for XFCE).

  Unity Greeter will automatically look there, falling back to the generic
  white circle icon if not found.

Set of ready-made custom badges

You can download a large set of additional badges here. To install them just copy the folder content to /usr/share/unity-greeter.


You need 8.6 GB disk space to install Ubuntu .This PC has 8.1 GB

I had a similar problem with my new Dell Latitude 7400, i tried installing from scratch with an empty disk with the same issue. It turn out that in the bios configuration, the device type was Raid. Chaning it to AHCI fixed the problem.


Clean, safe way to auto restart (and monitor) daemons/services

An external utility like monit may be useful. You can have it monitor processes and restart them if they go down. You can also configure alerts if certain thresholds are surpassed. And it's available as an Ubuntu package!


Now Ubuntu 14.04 LTS is available as 14.04.2. It has 3.16 kernel by default.

In August 2015 version 14.04.3 will be released with kernel 3.19.

This kernel 3.19 is already available to install from Ubuntu repositories by running

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

You did not mention which specific hardware problems you have. If you ask specific questions, it may appear that these issues can be solved without changing kernels.

You can also install latest mainline kernels like 4.1 from Mainline PPA.

It is definitely Dell's responsibility to fix hardware issues since they ship laptops with Ubuntu OEM.


VLC's image appears darker in Ubuntu than in Windows

Go to the Power Manager:

And Slide the Display bar to a higher value and/or uncheck Dim display when idle.


I have found the solution on another site. what I did to fix :

sudo apt-get install gtk-theme-switch

Start the newly installed "gtk-theme-switch" then select the desired theme and voila problem fixed. Bu I still don't know what caused the problem in the first place.


Open terminal(Ctrl+Alt+T)  and run :

gstreamer-properties

Change the settings under Default Input to the below screenshot.

Close the gstreamer-properties and plugin your mic to see if its working.

Note: If its still not working then you may have to try giving different Device inputs  under Default Input.


With a Linux system (Ubuntu), you can use ddcprobe.

run in a termial

sudo apt-get install xresprobe

then

sudo ddcprobe

You'll see lots of info about your graphics card. Then at the end, you'll see

monitorserial: xxxxxxx
monitorname: xxxxxx
monitorrange: xxxxxx


arm linux gcc compiling.. exported path in .bashrc doesn't work with sudo but it works with su

Use sudo -E instead of sudo to preserve your modified PATH. Otherwise PATH isn't preserved and thus arm-linux-gcc can't be found (see man sudo for details and possible permanent fixes).

If that doesn't work try sudo env PATH=/path/to/gcc:$PATH make target.


To install the latest version of gcc-4:4.6.1 through Official repositories just run

sudo apt-get install gcc-4.6 cpp-4.6 gcc-4.6 gcc-4.6-base

Or installing through Ubuntu software center

For the mentioned version gcc 4.4.6 is already available through Oneric official repositories.

Through terminal just run

sudo apt-get install gcc-4.4 cpp-4.4 gcc-4.4 gcc-4.4-base

Or install it through Ubuntu Software center. But the above Latest version is always advisable.

You don't have to use the source .tar package for installing , it is core library package and hence recommended to install it via above official way.


How to upgrade Ubuntu 12.04 in a dual-boot system with 13.10 CD?

When you're in the "something else" section of the installer.

Change the ext4 Linux partition.

Set mount point to "/".

I also tell it to format it too, just to be safe.

Setting the mount point to "/" will install all of Ubuntu into that ext4 partition. The other options are for making different partitions for different directories. A common one is to have "home" in a separate partition. This is not necessary, but can be useful if the operating system gets junked; your personal files will be safe.

Make sure the boot is set to the correct drive. I don't know how you have your disks set up.

Click next/ok/whatever, and you'll be on your way to Ubuntu 13.10.


Can installing Lubuntu instead of Ubuntu help in decreasing the processing time of my program on an embedded system?

Rather than Lubuntu, I would suggest you to use Xubuntu, which is even lighter.Strip it down by unintaliing all unnecessary softwares like maybe transmission bittorrent client.
 If you are more experienced user, get something very light like TCL and install only necessary software.

Considering that you install Stripped down Xubuntu and also taking in mind your system specs, it would surely give a performance boost compared to Ubuntu(stripped or not stripped). But it may or may not be 20%, depending on what you do.

Does your setup use something like 80% CPU? Then the gain would be higher.I think you should try Xubuntu(strip it), if you have time to do it. Using Ubuntu for your system is a lot of unnecessary wastage.


The renaming task can quite easily be done with awk:
awk -v"a=1" '/func[0-9]+()/{$0="func"a"()";a+=1}1'

This replaces every line matching func[0-9]+() with a function name with an incrementing number and prints every line.
Explanations

-v"a=1" – set a=1 before execution of the program begins - /pattern/{action} – for lines matching the regular expression pattern, perform action
/func[0-9]+()/ – matches every line containing “func” followed by one or more digits ([0-9]+) and “()”
$0="func"a"()" – set the currently processed line ($0) to “func” followed by the content of variable a and “()”
a+=1 – increase a by one
1 – shortcut to print the current line – in fact it‘s another statement with expression and action, just that the expression is simply 1 (= true for every line) and the action is the default one, which is print. You can replace this with {print} if you like.

Example run
$ <functions.bash cat
func1()
{
command1
}
func3()
{
command3
}
$ <functions.bash awk -v"a=1" '/func[0-9]+()/{$0="func"a"()";a+=1}1'
func1()
{
command1
}
func2()
{
command3
}


After I install program with wine, I can't launch it due to missing dll's. How do I add them?

From the Wine website:

  There are of course DLLs that Wine does not currently implement very
  well (or at all).

  In case Wine complains about a missing DLL, you should check whether
  this file is a publicly available DLL or a custom DLL belonging to
  your program. In the latter case, check that you have installed your
  program correctly.

  Most often applications will assume that a required redistributable
  package has already been installed and subsequently fail to run when
  the required dependencies are not met. For example:

  err:module:import_dll Library MFC42.DLL (which is needed by
  L"C:\Program Files\Foo\Bar.dll") not found

  Redistributable packages which install the necessary runtimes can be
  obtained through the use of winetricks. Note, these components are
  subject to their own license and are not part of the Wine project. You
  should refer to the application's AppDB entry for advice on what is
  required.


How to prevent PDF from opening on previously-viewed page?

This is probably not possible according to link below. I also did not find any setting in dconf-editor. Obviously, there is no such setting in application itself (Evince).

https://answers.launchpad.net/ubuntu/+source/evince/+question/108052

Closest to what you need is probably just opening the document and then pressing Ctrl+Home.


Ubuntu 14.04 Windows 8.1 Grub Crashes Install

GRUB can fail to install because of filesystem damage on the ESP. Another clue that this may be an issue is your Boot Repair output, which has generated multiple entries for certain files. This could be a Boot Repair bug, but it's also possible that it indicates damage to the underlying filesystem. You can check the filesystem on the EFI System Partition (ESP) with the dosfsck utility in Linux, as in sudo dosfsck /dev/sda1. This damage can occur if you did not disable Fast Startup in Windows. You mention disabling this feature, but it's not clear if you were referring to the Windows feature or to an EFI feature with a similar name. The Windows feature, if left enabled, can produce filesystem damage and problems installing an EFI boot loader, so it must be disabled. See this page (or others; a Web search should turn up lots of entries) for details.

If you continue to have GRUB problems, I recommend abandoning GRUB in favor of something else. Although Ubuntu's default boot loader is GRUB, it's a tricky program to fix when things go wrong -- it's just too big and complex to be properly managed by the average user. See this page of mine for information on GRUB alternatives. The easiest to try is likely to be my own rEFInd boot manager. You can download the version on USB flash drive or CD-R and boot to it. It should detect your Ubuntu installation and give you options to boot it. Provided you didn't use a separate /boot partition, this should work, and if you then install the Debian package in Ubuntu, it should boot from hard disk. Unfortunately, because you wiped the Ubuntu installation from your disk, you'll need to re-install to try this. Note, however, that the USB flash drive and CD-R versions of rEFInd require that Secure Boot be disabled. (You can use rEFInd with Secure Boot, but doing so requires jumping through some extra hoops.)


How can I access windows files on an ubuntu live boot

Windows software won't run in Ubuntu (let alone a live session) just like that. Some may work when installed directly in Ubuntu with the help of Wine.
You can't run software installed in a Windows partition from a Ubuntu live session.


Sounds like grub did not install. Or it may be just going directly to windows.

First try booting while holding the SHIFT key. If Grub is installed, and on the correct partition, it will bring up the windows and ubuntu options.

If there is no menu, you may have to reinstall grub.

You can install again manually without going through the Ubuntu install again. Here is a guide

Based on comments below, it doesn't look like Ubuntu installed. Either burn a CD again or make a pen drive to boot to. Bad burns happen more then you'd think.

You can do this from windows, with a 2 (or more) GB flash drive and free software out there.

Use this with the ISO and USB drive

You may have to enable USB legacy support to boot to the USB drive. In Ubuntu, you can get to a terminal after you click "Try Ubuntu"

When your data is securely backed up, install again. Make sure that you are putting the bootloader onto the correct partition. sudo fdisk -l /dev/sda will show you where the boot sector currently is.
Make a parition on the drive and make sure that the / (root) is on the partition you create. It is a good idea to create a swap partition as well. A couple gigs is plenty.

Here is a far more detailed guide

And here


View threads/conversations in Evolution just like Gmail can

It's not exactly like in GMail but there is an option View -> Group by Threads or CTRL+T to group a thread in Evolution.


Can you please file a bug by running sudo ubuntu-bug ubiquity?  It should automatically attach the files in /var/log/installer. Please be sure to describe the series of steps you went through to produce this issue.

Thanks!


How to enable nVidia CUDA driver after apt screwed everything up

I made some progress. Basically I looked at the dependencies of the cuda package in Synaptic and found it depended on nvidia-352 which sounded like it might have the actual driver. So I did the following user-friendly easy command:

sudo apt-get install --reinstall nvidia-352

This gives the following user-friendly error:

ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-352.0.crash'
Error! Bad return status for module build on kernel: 4.2.0-35-generic (x86_64)
Consult /var/lib/dkms/nvidia-352/352.79/build/make.log for more information.

Consulting that file and near the end you see this easy-for-beginners-to-understand message:

Compiler version check failed:

The major and minor number of the compiler used to
compile the kernel:

gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)

does not match the compiler used here:

cc (Ubuntu 4.9.3-5ubuntu1) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It is recommended to set the CC environment variable
to the compiler that was used to compile the kernel.

The compiler version check can be disabled by setting
the IGNORE_CC_MISMATCH environment variable to "1".
However, mixing compiler versions between the kernel
and kernel modules can result in subtle bugs that are
difficult to diagnose.

*** Failed CC version check. Bailing out! ***

So what has happened is that CUDA actually only supports GCC 4.9, and apparently the kernel was built with GCC 5.2. I have both installed so I reset the paths to 5.2 using these Windows-shamingly easy-to-use commands:

sudo update-alternatives --config gcc # And choose gcc-5
sudo update-alternatives --config g++ # And choose g++-5

The retry the reinstall. This time it worked. Then I reset my compilers back to 4.9. Going to restart to see it works.

Edit: Yep that works.


Why doesn't wobbly windows in Gnome work?

The wobbly windows is a feature not of Gnome, but of the window manager e.g. Compiz.  The Window manager in Gnome Shell is Mutter.  and this does does not support Wobbly Windows (yet).  There is a Gnome Shell extension in beta that allows you to get a wobbly window effect.  This appears to be buggy currently and is only a beta.


Is ubuntu 3.13.0-24-generic same as ubuntu 13

You should use Ubuntu 14.04. It currently uses the 3.13 kernel series.


How to upgrade softwares from currently installed LAMP on a 64-bit Ubuntu 12.04 LTS system? Please provide me the step-by-step instructions

Without wandering into the unknown territory of compiling packages yourself, the best solution here is to find and add a PPA (which is a "personal" repository) which hosts these packages.

Luckily for you, there are PPAs for all your packages, maintained by debian packagers / maintainers:

PHP 5.5: https://launchpad.net/~ondrej/+archive/ubuntu/php5 (ppa:ondrej/php5)
Apache 2.4.10 (and up): https://launchpad.net/~ondrej/+archive/ubuntu/apache2 (ppa:ondrej/apache2)
MySQL 5.6.20 (and up): https://launchpad.net/~ondrej/+archive/ubuntu/mysql-5.6 (ppa:ondrej/mysql-5.6)

The process of adding PPA's is easy. Find the "ppa:" line in the list above, open up a terminal, and type:

sudo apt-add-repository ppa:name

This will add that PPA to your repositories, and you can then run

sudo apt-get update

to have your packages updated and upgraded just as if it was from the official repositories.


Boot-Repair made Dual Boot System unusable

The EndEntire error: premature end of file and EndEntire error: cannot load image messages might indicate a problem that needs to be fixed from the Windows side -- namely, damage to the Windows boot loader. (OTOH, if you have a backup of your EFI System Partition, or ESP, from before the error occurred, you may be able to recover by restoring that backup. IMHO, such a backup should be made as a matter of course both before and after installing Ubuntu -- but that's another matter.) If I'm right about this, you'll need to get your hands on a Windows recovery disk, use it to fix the Windows boot loader, and then re-install a Linux boot loader or change the boot order so that what you've got now boots first.

I also recommend you re-read my second response to your answer to your earlier question. In particular, prepare a rEFInd USB flash drive or CD-R and try booting with it. This tool (which I maintain) can boot Ubuntu without GRUB, and can chainload to the Windows boot loader, so if GRUB is acting up, rEFInd can provide a workaround -- either temporary or permanent.

Disclaimer: I'm not a fan of GRUB 2. It's a bloated pig of a program with a finicky configuration file that's so difficult to maintain that GRUB provides a series of scripts to perform that task. The result is like a house of cards -- it holds together OK under optimal conditions, but if anything about your configuration is sub-optimal, the whole thing will come tumbling down and be difficult to put back together again. FWIW, my disaffection with GRUB 2 is what motivated me to fork the earlier rEFIt into rEFInd. GRUB 2 has improved since that time, but the fact that I took on maintenance of an open source boot manager rather than deal with GRUB 2 should say something about GRUB 2's problems, at least in my eyes.


Repacked proprietary software keeps updating the same deb

To have different versions of the software installed at the same time, you need to use different package names rather than different version numbers; only one version of a package (identified by name) can be installed at the same time.

For example, let's say you need to have MySoft 7 and MySoft 8 installed at the same time, but also need to upgrade each version when the vendor releases minor updates. Maybe you start with MySoft 7.0 v6 which you want installed in /opt/vendor/mysoft7 and MySoft 8.0 v2 which you want installed in /opt/vendor/mysoft8 then you would build two packages:

Package: mysoft7
Version: 7.0.6

and

Package: mysoft8
Version: 8.0.2

to create mysoft7_7.0.6_amd64.deb and mysoft8_8.0.2_amd64.deb. In theory you can use whatever version scheme you want, but it would be advisable to conform to Debian conventions when specifying the version number.

Then, if you need to upgrade either version due to upstream changes from the vendor, then you would build a new version of the relevant package and update the relevant version number. For example, if MySoft 8.0 v3 is released, you would now build:

Package: mysoft8
Version: 8.0.3

Installing this package would then automatically uninstall mysoft8 version 8.0.2 thereby removing the files installed from mysoft8_8.0.2_amd64.deb and replacing them with the files contained in mysoft8_8.0.3_amd64.deb

If you need every single upstream version installed at the same time, then you would need to use a different package name for every version. At this point, the package version number becomes irrelevant and you can just use 1.0. Each would need to install to a different directory, because a file can only be owned by one package at a time. In this scenario, you would have to clean up unwanted old versions of the software manually by uninstalling the relevant package.

I am slightly unclear on why your current deb would try to reinstall if it is already installed (which, unfortunately, is the crux of your question!). It suggests that apt thinks that the version of the package available in your repo is higher than the version installed. Perhaps the size of the version number is confusing it? /var/log/dpkg.log and /var/log/apt/history.log should show you what is going on.


Can't move(restore) or delete folder in trash

See what:

lsof | grep Pasta

says. It looks to me like some process still has a grip on the file.


Please replace your sources.list file with this. I uncommented all recommended repositories (main/restricted/universe/multiverse from xenial, xenial-updates and xenial-security; no backports, no partner, and no sources) and removed a few unnecessary lines:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

After that, download the package lists using:

sudo apt update

Now, as you had package updates disabled for a while, let's get your system up to date first:

sudo apt upgrade

After that, install curl as you originally intended to do:

sudo apt install curl


Check if a file (passed as an argument to a script) is of .iso type

You want the file command:

% file ubuntu-16.04.2-desktop-amd64.iso
ubuntu-16.04.2-desktop-amd64.iso: DOS/MBR boot sector ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Ubuntu 16.04.2 LTS amd64' (bootable); partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 14432, 4864 sectors

Take a look specifically at the --mime-type and --brief (-b) flags:

% file -b --mime-type ubuntu-16.04.2-desktop-amd64.iso
application/x-iso9660-image

You can then use grep or similar to parse the output of the file command, and then read the status code:

% file -b --mime-type ubuntu-16.04.2-desktop-amd64.iso | grep -q iso; echo $?
0
% file -b --mime-type wolf1.png | grep -q iso; echo $?
1

If you want to use this in a script (where $1 is the passed in file, note the lack of brackets):

#!/bin/bash

if file -b --mime-type $1 | grep -q iso; then
    echo "Is ISO"
else
    echo "Is not ISO"
fi

Example:

% ./x.sh ubuntu-16.04.2-desktop-amd64.iso
Is ISO
% ./x.sh wolf1.png
Is not ISO


installing the newest LittleCMS library in 14.04

First of all, go to http://sourceforge.net/projects/lcms/files/latest/download?source=files to get a proper installation, I would not trust that site. Then

  cd /home/your_user/Downloads/lcms2-2.7.tar.gz

Now

  tar -zxvf lcms2-2.7.tar.gz

Then

  cd /home/your_user/Downloads/lcms2-2.7

Then do these next three lines

  ./configure
  make
  sudo make install

If that doesn't work (I'm not sure how this file is setup)

Do

  sudo sh install-sh.sh

You're done!


If you cannot save the BIOS settings in Lenovo laptop, most probably you are impacted with the recent bug in Ubuntu 17.10.

Basically, several Lenovo and some Ace devices have troubles changing the BIOS settings. The issue is critical and Canonical has temporarily removed Ubuntu 17.10 ISO downloads.


I've fixed and now it's working :P

I've done step by step as the installation instruction at https://github.com/lwfinger/rtlwifi_new to install new driver wifi.


Annoying notification that wont go away in kde plasma 5

I solved the problem. In synaptic package manager, under the 'Missing Recommends' section, there is an entry called 'flashplugin-installer'. I installed it and now that problem is gone.

Hope it helps someone with the same problem.


Nautilus (Files) 3.18.2 show other partitions as other locations, not under home directory listings

It is possible to downgrade nautilus but a better solution is mounting that partition via fstab in a specific directory and then add that directory as a bookmark in nautilus. In order to do this, open the fstab file from this path: /etc/fstab and then add 3 lines to the end of fstab with a structure similar to this:

UUID=1A2345B678901234 /path/to/dir            ntfs    user,rw              0       0

You have to replace values in this line with uuid of your file system, directory which you want to mount the partition in, partition type, options, dump and pass. Then click on menu key in nautilus and add mount points as bookmarks to the sidebar of nautilus windows.


Could things be broken by adding a folder in /home

I have done this before, with no negative effects.

I have a set of virtual servers and I log in to them by authenticating with LDAP. Some of the VMs are not configured correctly and don't create a home directory when a new LDAP user logs in.

So in the past I have logged in, created a directory in /home that matches my username. Then when I log back in it treats it as my home directory.
However, all those user files like .bashrc that are usually created in a home dir are not there. Which is to be expected.

You also need to change the permissions of the directory so it matches a home directory.


What partition to use to keep data files in Ubuntu?

I'm assuming this is your desktop box. If it's so, don't split your filesystem into various partitions (separate /usr, /home, /var, ...) because sooner or later you'll run into a problem of having no space left on /var and /home has tons of gigs (or vice versa).

So, create one big partition, and have another one for swap. If you have a decent desktop (4+ GB of RAM) you're safe with a gig or two of swap (unless you want to use 'hibernate', then have swap double the size of your RAM).

Use ext4, no need to stick with ext3 these days. Also, using fat32 is also not needed, unless you're sharing your setup with Windows installation (even then, it's better to use NTFS in windows, and use ntfs-3g or something like that to read/write those partitions from linux).

So, to sum it all up: one partition for all your files, another for swap. No fat32.


Ubuntu One, Dashboard shows 14.5mb used and files folder shows nothing

It's likely that you are affected by this bug. There is a contact address in the link.


Why the old packages are still available in the official software center?

You missed the way Ubuntu provides software: every six month there is a new release, and the software do not get updated along this time, apart from security updates and bug fixes. Only some major software, like firefox, could be updated to a new version during the six months period.


As you can see in the file there are multiple places where config files are also loaded.

!includedir /etc/mysql/conf.d/:
Check every file in this directory if the setting is overwritten by one:

grep -i lower_case_table_names /etc/mysql/conf.d/*

or check the files manually and search for the config value.

# - "~/.my.cnf" to set user-specific options.: Check the .my.cnf of the user that runs the mysql daemon, maybe there is this setting overwritten.

Find out the uid of the user with:

ps -ef | grep mysql

The first row is the uid. Find the user's home directory with:

grep <uid> /etc/passwd

the 6th :-separated string is the home directory. When in this directory is a .my.cnf, this file is loaded.

Stop the mysql daemon with /etc/init.d/mysql stop. And check if the daemon is stopped with pgrep mysql and pgrep mysqld. If the pgrep commands still return pids then kill those pids with kill. Sometimes mysql needs a very long time to stop with huge databases, thats normal. So first wait before killing things.

If you are sure mysql is stopped and all config files are cleaned from this config value, then start mysql again with /etc/init.d/mysql start and check the value.


How can HTML5 Ubuntu Touch apps access camera and microphone?

If you are using HTML, you should be using Cordova to access the native devices. You are saying that Cordova is not working for you, but unless you are more descriptive in what exactly is not working, it's difficult for anyone to help.

Alternatively, if you port your app to pure QML, you can then use the Camera component to access the device's camera.


Computer froze during upgrade to 16.04, now can't run GUI

This happened to me as well, and it was definitely frightening. Luckily it proved pretty simple to recover from. I'm far from certain on this, but perhaps it'll be the same for you? Here's what I did:

When I logged directly into my terminal, I was informed by a line above the command prompt that:

E: Error: BrokenCount > Orun-parts: /etc/update-motd.d/90-updates-available exited with return code 255

Per Ashish's answer at this link, I ran:

sudo dpkg --configure -a

Running this continued the installation process. I then had to continue to follow the output, manually choose to install replacements of certain files, and rerun the whole command once to get around a 'loop' that came up in the 'triggers'. (Let the single quotes here signify that I have very little idea what my OS is doing in this process, so I took this all at face value and just kept trudging through. NOTE: I AM NOT SAYING THIS TO RECOMMEND IT, just to explain what happened. I was just more concerned with getting back into my normal environment and ensuring that my work was backed up than with researching extensively each of the options that popped up.)

Eventually the dpkg --configure command exited without Error status. Then I was able to switch the machine off and on again and boot up in the GUI.

At that point a number of red flags went off and Ubuntu threw up a bunch of error and failure messages. I used point-and-click to navigate through these as I could, restarted once again for good measure, then opened a terminal and ran:

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

After this, things seemed to settle down and seemed to be mostly back to normal. apt-get update currently seems incapable of running, and a number of other minor and strange behaviors are popping up (e.g. getting error messages from Floobits when I run Vim, which I've yet to research). I have a feeling that this kind of stuff will continue for a while as I smooth things out.

Importantly though, I am back in my normal OS environment and files all appear intact! :)

I am far from an expert in this sort of stuff, but I hope this helps.

D


Celeron n3150 powerful enough to run Ubuntu 16.04?

Those are recommended specs, but yes, the N3150 should be plenty powerful to run Ubuntu relatively smoothly. If you wish for a lighter distribution I recommend Lubuntu.

Cores do not make up performance deficits in most cases. Cores simply allow additional threads/tasks to be run at one time, but do not speed up a single task/thread. The N3150, despite its 4 cores, is still rather slow for intensive tasks such as games and/or video/photo editing.


Script to delete old files(tar) in a directory if the number exceeds 15?

Diclaimer:I've tested the following commands with filenames that contain spaces, but not with filenames that contain newlines. I suspect that they will not play nicely with filenames containing the newline character, and would avoid using them if you suspect filenames containing them may be created.

This approach relies on the ctime of the file so if files have any of their attributes changed, they will appear to be newer than their creation time. Only you can decide whether relying on ctime is applicable in your situation. If you'd rather use mtime, change -printf "%C+ %p\n" to -printf "%T+ %p\n" in the find commands.

The following command can be issued inside the directory containing your tar files. This assumes that the filenames are all something like something.tar. If the filenames are not of this format, the command will need to be modified, either changing the -iname '*.tar.' to -iname '*.tar.gz*' if the files are .tar.gz files, or by removing the entire -iname '*.tar.' string if you just want to operate on any files in that directory, regardless of filename format.

find . -mindepth 1 -maxdepth 1 -type f -iname '*.tar' -printf "%C+ %p\n" | sort -n | cut -d ' ' -f 2- | head -n -15 | xargs -I{} echo "{}"

If this shows you the oldest files, outside of your 15 file limit, then use the following command to delete those files.

find . -mindepth 1 -maxdepth 1 -type f -iname '*.tar' -printf "%C+ %p\n" | sort -n | cut -d ' ' -f 2- | head -n -15 | xargs -I{} rm "{}"

By Way of explanation:

find . -mindepth 1 -maxdepth 1 -type f -iname '*.tar' -printf "%C+ %p\n" will list all of the files that end in .tar in . (the current directory) without recursing into subdirectories. It then prints the ctime timastamp followed by a space and the file name with a trailing newline character.
| sort -n sorts the output of find numerically, so files are listed from oldest to newest (by ctime) .
| cut -d ' ' -f 2- removes the added timestamp that find created, but preserves the order of the files listed by sort.
| head -n -15 trims the bottom 15 items from the output of cut.
xargs -I{} rm "{}" runs the rm command on each file, ensuring the filename is not split on whitespace.

This can be written as a bash script, with the number of files to retain and the directory on which to operate as variables in the script. It's possible to pass in the directory and file retention count as arguments instead, but I won't cover that here.

#!/bin/bash

file_limit=15
dir=/directory/containing/tarfiles

find "$dir" -mindepth 1 -maxdepth 1 -type f -iname '*.tar' -printf "%C+ %p\n" | sort -n | cut -d ' ' -f 2- | head -n -"$file_limit" | xargs -I{} rm "{}"

If you save this script somewhere e.g. /home/user/trim_old_gits and ensure that you have given it executable permissions. The script can be run from the command line by entering:

/home/user/trim_old_gits

Or from within /home/user:

./trim_old_gits

As mentioned in Jacob's marvellous python answer, using the cron utility would be a good way to ensure that this happens on a regular basis, if it's not crucial that the files be deleted immediately, or inotifywait if timing is more sensitive.


Having trouble to boot from USB on my notebook

Make sure you have disabled secure boot. In the boot options there will probably be an option to boot from CSM or Legacy, select this option. Also check to see if there is a Quickboot option, and if so, disable it.


Cannot start live session or install on ROG GL552VW

I managed to install the Ubuntu daily live 16.04 version on the same laptop by using the following extra parameters at boot time:

nouveau.modeset=0 acpi_osi=! acpi_backlight=native idle=nomwait

Adding these parameters at boot solved the issue for me, allowing to install. The laptop is completely functional but it is overheating quite badly without any CPU load (maybe for missing driver, didn't debug this yet).


It's a shell function in /lib/lsb/init-functions. You should see . /lib/lsb/init-functions earlier in the init script.


Since having asked this question also on the Audacity forum, I was advised to install pulseaudio, and that fixed the problem.


Ubuntu 14.10 gets stuck in a loop and keeps trying to re-mount smartphones

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1160847:

The workaround I am using:

    Add this rule to /lib/udev/rules.d/69-libmtp.rules

    #skip Nexus 4/10 for UT debug ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", GOTO="libmtp_rules_end"

    Add a new file to /etc/udev/rules.d called 99-android.rules
    # enable access to nexus devices SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0666"

    The usb devices get mode 0664 by default so adb will require root without this.

    sudo udevadm control --reload-rules sudo service udev restart


How to restore deleted files in Ubuntu phone

In Ubuntu, if you delete files using File manager or on the Desktop by highlighting a file and hitting Delete, or you right click on a file and select 'Move to Trash' (or 'Move to Rubbish Bin', if, like me, you live in the UK) then the file goes in $HOME/.local/share/Trash.

However, there is no such file on an Ubuntu Phone, so you cannot recover deleted files.

Whenever you delete something the confirmation message will tell you that you are about to permanently delete the file.


How can I make a backup of an EFI System partition?

You can just copy everything inside it (i.e. e.g. sudo cp -R /boot/efi /path/to/backup is fine, however personally I'd suggest to use tar: sudo tar cfz /path/to/backup/ESP_backup.tar.gz /boot/efi);

The filesystem in which to store the backup is irrelevant; the only concern might be the permissions, but the UEFI firmware doesn't cater for Linux permissions (in fact FAT32 doesn't even support them), so that's not a concern at all.


Installing Ubunu 16.04 Windows 8 Dual Boot (VERY CLOSE)

In Ubuntu, use the command

sudo efibootmgr -v

to see the UEFI boot order,
and the command

sudo efibootmgr -o XXXX,YYYY,...

where the XXXX etc. are the numnbers on the boot items.
Put Ubuntu's shimx64.efi bootloader first, or grubx64.efi if you are not using secure boot.

On some machines you might need to set the UEFI Settings/BIOS supervisor password before making any permanent changes in nvram entries.

google "efibootmgr can't change boot order"  and there are many solutions posted (some here) for this problem.


You forgot to escape the $ signs in the $(printf...) parts by doubling them to $$, so make is doing that part itself and does not find an expansion. If you prefer you can use $(shell printf '\033[0;1;31m') to have make run the command.


Neuroimaging Use: How big for partitions (root, home, swap) and some other Qs

As to part 1 of this post:   Swap with those specs is purely a preference but even /home is not required BUT given your use case HIGHLY HIGHLY recommended as /home is where all those imaging files will go NOT root (/).

as for part 2 of this post: you will need to better define "maxing it out"  but also of note  LibreOffice and kingsoft Office  are BOTH in ubuntu repos and do 98% of Office suite  / mathlab is as well,

I personally would have bootloaders on both drives with the primary OS having  control of the loader on that disk(s)  using winboot  for the (mostly) windows drve and grub on the linux drive.


There are several syntactical issues with the code you've posted but that's not the main issue here.

The problem with the low-level init systems like update-rc.d (et al) is they'll run before X has started. Even in event systems like Upstart where you can wait for starting-x, you're still outside the X environment and you lack things like the DISPLAY variable. That's obviously a huge issue for things like xrandr where you need an X server.

Thankfully X (or I should say the script that loads X) will look for an ~/.xsession file when it starts. This is a perfect place to lodge commands like this. It has to be executable and contain a proper launch stanza. We can do all of this in one command:

install -b -m 755 /dev/stdin ~/.xsession << EOF
#!/bin/sh
xrandr --output VGA-1 --gamma 3:3:3 --brightness
EOF

Just paste that in and it should create the file. Next time you log in, it should run.


How to enter the terminal from the boot manager?

Even when using Wubi, you should still be able to get to the Grub bootloader by pressing Esc after selecting Ubuntu in Windows's boot manager. Press e to edit the first menu option.

Look for the line starting with linux and add text to the end of this line. This will make your system boot into text-mode.

Finally, press Ctrl-x or F10 to boot. After a while you should see a login prompt for a terminal.

From here, log in and remove/replace xorg.conf


How to enumerate a variable in a loop starting at 01?

Simple as adding a variable (a=1) at the beginning:
#!/bin/bash
a=1
for i in *.mkv; do
  new=$(printf "Movie - %02d.mkv" "$a")
  mv -i -- "$i" "$new"
  let a=a+1
done

Here is in one line as you asked for:
a=1; for i in *.mkv; do new=$(printf "Movie - %02d.mkv" "$a"); mv -i -- "$i" "$new"; let a=a+1; done


Can't get xterm to work. DISPLAY not set.

You need to use the -X flag

ssh -X user@server


Screen flashes gray as I log in, can I stop it?

This is a known Metacity bug visible when logging in to a Unity 2D session.

Switch to Unity 3D, or wait for the bug to be resolved.


apt-get update error in ubuntu utopic 14.10

The reason you cannot download the ppa files is because, well... they do not exist...

If you go to the ppa webpage in launchpad you can see that there are no builds available for your installation (utopic). The latest built file is from precise and although you cannot normally use this ppa you can mod the source.list file to spoof your ubuntu version.

Go to the source.list file and change the line

deb http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu utopic main

to deb http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu precise main

and it should work as far as apt-get is concerned.

Disclaimer: installing a package that is not directed for your installation is generally safe, HOWEVER you CAN break your system if the dependencies get messed up. So while this is a possibly safe workaround, be careful on what you choose to install from old ppas (i.e. use common sense and do not install drivers)


Many people have found luck mounting Android 4.x devices using Go-MTP.

Here is how you can add it and give it a try.

sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs
sudo apt-get install go-mtpfs-unity

After that you can watch this video for more instructions.

You can also try:

 sudo apt-get install mtp-tools mtpfs


You can fix fonts by installing ms fonts. Open your software center and search for them.

By the way looking for review of application in winehq is also good idea.so that you can know what's the problem is & if somebody did provideed any solution you can use that.

Bottom line is look at winehq also.


Set new window to open at center of the screen - Xubuntu

There's no need to install anything or mess with scripts. Open the settings manager, click on Window Manager Tweaks, select the Placement tab, and slide the bar under "Minimum size of windows to trigger smart placement:" all the way to the right. Every window you open should now be centered.


This
is how I created a launcher for Eclipse.

Had the same issue :) exactly for Eclipse.


AMD-V is being used by another hypervisor. (VERR_SVM_IN_USE)

This error is because you have virtualbox and kvm installed. The kernel modules conflict.

The "simple" solution is to use one or the other, but not both. You can, however, use both as long as you are willing to manually (or script) loading / unloading the kernel modules.

To see your modules

#Virtualbox modules
sudo lsmod | grep vbox

#kvm
sudo lsmod| grep kvm

To remove a module

# remove virtualbox
sudo rmmod vboxdrv
sudo rmmod vboxnetflt

#remove kvm
sudo rmmod kvm
sudo rmmod kvm_amd

use insmod

sudo insmod /full/path/to/your/modules

You can find the module with

locate kvm | grep .ko
locate vbox | grep .ko

Use the modules for your current kernel.


The editor settings are inherited from KTextEditor, and apply when KDevelop's semantic highlighting doesn't override them, e.g. for files not in a supported language.

The hues used for semantic highlighting aren't configurable currently.

They're blended with the underlying editor colour; the intensity is configurable under "Configure KDevelop -> Language Support", including disabling it by setting this to zero.


In a terminal, type this command: udevadm info --name=/dev/ttyUSB0 --attribute-walk
You should have enough information to identify your device.


The SD card reader was broken. Replaced under warranty and it works now.


You can install opencv-3.1.0 from sources using CMake:

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
  /path_to_opencv_directory

  make -j 8  #"-j 8" means you build opencv in parallel in 8 thread

  sudo make install  #install opencv to standard directory (/usr/local/)

For full opencv installation description you can go there: opencv installation guide

  P.S.: there is really no need to use any opencv.sh scripts. Everything should be installed intuitively and based on documentation.


Well as far home folder goes

sudo chown -R $USER:$USER /home/$USER

will do  the trick I think.


My wifi isn't working like it used to work before

It might be due to the issue with network manager. Try the below command

 sudo service dbus restart

 sudo service network-manager restart