This might be slightly off what your final question was, but I think it is pertinent to the situation. If you are struggling with NVidia drivers, this link has been super helpful for me.

http://www.terriblesysadmin.com/?p=38

Basically, these are the steps you need to do:

sudo apt-get update
sudo apt-get remove --purge nvidia-* xserver* libcheese7
sudo apt-get install xserver-xorg-lts-xenial
sudo apt-get install nvidia-384 nvidia-settings nvidia-prime ubuntu-desktop
sudo reboot

Notice that the driver is nvidia-384 instead of the older driver.
Now, if you finish to this point, you should have a stable machine.
BUT
I highly recommend, if you plan on doing CUDA or other GPU heavy swag, that you install CUDA 10.1 from dpkg instead. Installing CUDA not only installed CUDA (shocker), but it also installs the video driver that is most up-to-date and compatible with your system, which I believe is 418. Basically, you need to boot to a recovery (root) prompt and then run the associated sudo dpkg -i theinstaller.deb.
These are the local deb instructions:

sudo dpkg -i cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda

From this link https://developer.nvidia.com/cuda-downloads. I recommend the local deb link because it has been the most stable, consistent solution. I can also navigate the the NVidia files this way: the run file does not work for me.
I should also mention: the Acer Nitro 5, no matter what model (53, 55, you name it), will always kick the can when you install linux for the first time. You are not the only one struggling with this process. After installing the CUDA provided driver, I have not had any issues since with my Nitro 5.

One last thing:
About the gdm3 and lightdm: those are GUI managers. They are services that you can start and stop. compiz is also a common GUI manager. I am not an expert in GUI managers, so I would recommend you search those 3 specific terms. For the Nvidia driver installation of this answer, I am %100 confident.

On a side note: it appears that installing the NVidia drivers also gets the cooling fans to work properly. When I am running an intense Keras neural network training script, the GPU cooling fans kick in. More reason to simply install CUDA...


Nothing is wrong - you did well. You forwarded port 14265 from localhost to the remote node (VPS) to 14265 port. But apparently nothing is listening there! This is why you receive connection refused which is expected.

If you want a proof run a client on remote (VPS) node at the port you are forwarding your localhost to. Netcat would do the trick (install first if missing):

First session at the remote VPS:

VPS # apt install netcat
VPS $ nc -l 14265

Second session at local (replace VPS accordingly and add other flags to ssh):

$ ssh -N -L 14265:VPS:14265 ubuntu@VPS
$ telnet localhost 14265
test test test
^D
$

At remote node netcat should echo your test strings.
See? It works. If you don't have netcat running, the telnet would reply with connection refused.

The bottom line? Forward the source port to something which listens actively at the target.


Extract part of a video with a one-line command

This can be done using mencoder or ffmpeg.
mencoder
Say that you want to cut out a part starting at 00:00:30 into the original file with a 5 seconds length and that it shouldn't be reencoded (if you want to re-encode it you'll have to replace copy with audio and video codecs, for a list of available audio codecs issue mencoder -oac help, for a list of available video codecs issue mencoder -ovc help), then you issue:
mencoder -ss 00:30:00 -endpos 00:00:05 -oac pcm -ovc copy originalfile -o newfile

You'll have to replace orginalfile and newfile with actual file names, the latter is the name of the file that is created to hold the cut-out part.
ffmpeg
Say that you want to cut out a part starting at 00:00:30 into the original file with a 5 seconds length and that it shouldn't be re-encoded (if you want to re-encode it you'll have to replace copy with audio and video codecs, for a list of available codecs issue ffmpeg -formats -E), then you issue:
ffmpeg -ss 00:00:30 -i orginalfile -t 00:00:05 -vcodec copy -acodec copy newfile

You'll have to replace orginalfile and newfile with actual file names, the later is the name of the file that is created to hold the cut out part.

For reference see http://lazyxiong-tech.blogspot.com/2007/05/using-mencoder-to-cut-out-pieces-of.html and "7. Copy Only A Part Of Video" in http://segfault.in/2010/10/ffmpeg-tricks-you-should-know-about/


Can't open .exe file on CD because it's read only

The linux drivers seems to be available on the european site of canon.

http://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MX_series/PIXMA_MX420.aspx


When I install Trimmomatics_V0.32 through the command line on ubuntu LTS 14.04, I get an error

That is the wrong package name, it should just be trimmomatic

sudo apt-get install trimmomatic

Will install your package.


Login denied after installation of Ubuntu 14.04

You seem to have accidentally installed in OEM mode.
Add user manually, according to this for example. You should better use a new username.


You can do this with most of the modern web browsers. The feature is commonly called search engines. (Most browsers use secondary search bar for it, located next to normal search bar, chrome's is build in into the normal search bar)

Also you might want to check duckduckgo search engine where you can use !bang syntax e.g. !twitter StackExchange (!g for google, !gi for google images and so on). Duckduckgo also has some other neat features like Goodies. The one for twitter let's you search for @StackExchange and brings latest twitt in addition to normal web search.

And I am pretty sure you could do similar things with Unity dash. Not sure if anything like that exists yet.


Tool for viewing LibreOffice Writer files in terminal window

libreoffice provides a --convert-to option which can be used to convert a document to e.g. text or html:

convert input.odt to input.txt:
libreoffice --convert-to "txt:Text (encoded):UTF8" input.odt
convert every .odt in the current directory to .html:
libreoffice --convert-to "html:XHTML Writer File:UTF8" *.odt
convert every .ods in the current directory to .csv:
libreoffice --convert-to csv *.ods

The output can be opened with the pager or terminal browser of your liking: less, most or w3m to list just three.


Wine does not support usb drives without patches, and even with patches support is limited.

See: http://wiki.winehq.org/USB

I agree with the advice Manuel gave you, if you want to use a Windows application, run it from windows.

In my experience, if photorec does not work, you may wish to consider professional data recovery.

If you want to continue to do the work yourself, you can start here:

http://www.linuxforu.com/2011/03/digital-forensic-analysis-using-backtrack-part-1/

http://www.linuxforu.com/2011/04/digital-forensic-analysis-using-backtrack-part-2/


The DISPLAY environment variable indicates X11 programs which X11 screen they should connect to. If you only start unity, it tries to connect to the "default" X11 screen, :0, which fails because there is no X11 server to accept such connections.

You'll want to start a full X11 session; you can install and use the startx command, which will start an X11 server and fire up processes with the associated DISPLAY environment variable.

You'll have to configure it to start unity by creating a .xinitrc in your home directory; for the simplest session, you can try the following contents:

#!/bin/sh
exec unity


I ran into the same issue.  The problem was in the user .XAuthority file permission was owned by the root user.  I changed the file permission and was able to log back in.


You appear to have edited /etc/systemd/logind.conf.  Specifically the lines:
#HandleSuspendKey=ignore
#HandleHibernateKey=ignore
#HandleLidSwitch=ignore
#HandleLidSwitchExternalPower=ignore
#PowerKeyIgnoreInhibited=yes
#SuspendKeyIgnoreInhibited=yes
#HibernateKeyIgnoreInhibited=yes

which were originally:
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no

Lines beginning with # show the default settings.  When you change a setting you also need to uncomment the line (delete the #) for it to take effect.
Except for that, I think you had the right idea attempting to change HandleLidSwitch and HandleLidSwitchExternalPower to ignore, so uncomment those two.
I would restore everything else back to the defaults.


How do I optimize apt-fast with Amazon Web Services (AWS) mirrors?

apt-fast works in the same way common "download accelerators" work. It opens more connections than normal to the web server and then combines them all together for a speed boost.

Most sysadmins I know prevent this sort of thing by limiting the amount of concurrent connections from the same IP, afterall, if you're increasing the amount of connections to your computer, that's less bandwidth for other people.

However while investigating using Amazon's Ubuntu mirrors I found out that AWS is actually optimized for high connections, with lower overall throughput. So in other words, AWS optimizes serving HTTP totally opposite from what you'd think.

First install apt-fast:

sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast

Feel free to go through the config prompts, we're going to adjust them anyway.
Configure your system to use Amazon's mirrors.
Configure apt-fast to use more connections, by editing /etc/apt/apt-fast.conf:

Find the MIRRORS line, and add every region you want to add as an additional mirror. Basically it'll hit these repositories in addition to what's in your sources list, mine looks like this:

MIRRORS=( 'us-east-1.ec2.archive.ubuntu.com/ubuntu,us-east-2.ec2.archive.ubuntu.com/ubuntu,us-west-1.ec2.archive.ubuntu.com/ubuntu' )

Find the _MAXNUM= line, and adjust to the number of concurrent connections, I'm using:

_MAXNUM=35

Save the file, then you can use the apt-fast command in place of apt-get, or you can just alias it.

Things I've discovered:

I'm in the US midwest, for me a mirror mix of us-east and us-west works best, adding any other region does nothing to improve my speed. So you probably want to start with Amazon regions closest to you.
35 connections seems to be the sweet spot, anything lower is slower, anything higher seems to be higher latency and doesn't improve overall throughput; like anything else, test what works for you.
Don't set this up for a normal ubuntu mirror, a really high connection count can be bad, even though most competent mirror admins will deny the extra connections anyway.
I've only tested this remotely, since AWS mirrors in each region are basically LAN speed to the individual instances, then you shouldn't need to do this for your AWS instances.
If you're interested in improving your overall performance and you have more than 2 servers/desktops locally, considering caching apt downloads instead or running your own local mirror.


Lenovo IdeaPad Y500 Builtin Webcam does not work in 12.04

You may not have the most up to date kernel.

Try opening up Terminal and entering the following command, entering your password as necessary.

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

This will update your software and kernel hopefully getting the software you need for the camera.


Here is good guide that could help you to clean your laptop from istartsurf virus http://removalbits.com/removal-of-istartsurf-com-virus-from-internet-explorer-firefox-and-google-chrome/. Just follow it step by step and you will not need to reinstall your OS.


Ubuntu 14.04 LTS with NVIDIA Quadro K1100M

This problem is caused by a wrong way of installing Nvidia drivers. You probably downloaded a .run file form Nvidia site. In this case the driver is not properly installed and will need to be re-installed every time you update kernel.

The correct way of installing Nvidia drivers in Ubuntu is to go to System Settings -> Software & Updates -> Additional Drivers.
Alternative way is to use apt-get.

But if you already installed drivers from a .run file, then you need to uninstall them first by running that file again with "--uninstall" parameter.


Dell Inspiron 1545 wireless driver not working in Ubuntu 12.10 64-bit

Your device, 14e4:4315 uses the Broadcom STA driver. Please get a temporary wired ethernet connection and do:

sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl

Assuming the wireless switch is on, your wireless should now be working; check:

rfkill list all


If it has been packaged correctly, by installing UbuntuTV using the deb package from webupd8, you should (in theory) be able to ppa-purge the PPA and this would restore your system.

i.e.

sudo ppa-purge ppa:nilarimogard/test3
sudo apt-get remove unity-lens-video

If you see the following error message sudo: ppa-purge: command not found then install the ppa-purge package:

sudo apt-get install ppa-purge

However, as all PPAs are potentially destructive, a drive-image would be prudent to make, especially as UbuntuTV makes underlying changes to Ubuntu2D.

I've done some limited testing installing and ppa-purge the package.  From initial testing, ubuntu-2D works correctly after uninstalling - i.e. the same packages upgraded to v5 are downgraded to v4.x that is standard in oneiric.

However - the warning should be still applicable - drive-image your hard-drive.  Use it as an excuse to perform that regular backup procedure we all keep putting off... :)

Linked Question:

How do I install Ubuntu TV on my computer?


To disconnect a locked-up ssh session, typeEnter ~.

A full list of escape codes can be found in the ssh manpage or by typing ~?.


My Network Notification icon not showing Ubuntu Kylin 14.04

After a lot of failed attempts, I tried the solution @tamkderplar suggested to use Ubuntu's recover mode. Unfortunately it did not work.

So I tried my last resource, I used the update from USB stick. And since I was there I also updated my Ubuntu Kylin from 14.04 to 16.04.

Finally the network icon showed up.

I do not know why none of the solutions worked for me though.


Can't get audio from center channel and subwoofer in 5.1 setup

Nevermind. I've just found out what was happening. For anyone with the same issue, just run alsamixer from the Terminal and press F6 to make sure your sound card is selected. Then look for volume controls marked with "MM" instead of "00" at the bottom of the green bar [in my case: Center/LFE]. These are muted channels, so you need to select them using arrow keys and press "M" to unmute. Press "Esc" and you're good to go. As simple as that.

Now why Alsa Mixer overrides every other settings - like PulseAudio Control and system settings - and these channels are muted by default is beyond my comprehension


Disable HWE and continue with GA kernal of 16.04?

If you want the ga kernel, install the linux-generic kernel packages and then remove the linux-generic-hwe-16.04 kernel packages.

Reference: https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack


What does "official Ubuntu flavour" mean?

Who decides a distro should become official flavour?

The Ubuntu Technical Board. From the Ubuntu Wiki page on recognized flavours:

  Guidelines to have an image added to the dailies

  Official Flavor has been approved by Tech Board
  All packages are publicly available in Launchpad Archive (Main or Universe)
  Launchpad bug infrastructure is monitored and updated for tracking defects related to packages in an image.
  IS has signed off that there is sufficient space to support image builds and publishing
  Release team member lined up to work with team to debug adding it into servers.
  Community member lined up to test image and provide feedback at milestones.

  Guidelines to become and remain a recognized flavor:

  Image has track record of community interested in creating, supporting and promoting its use.
  Leading members have signed Ubuntu Code of Conduct.
  One or more developer with upload rights.
  Flavor lead identified and responsive though 6 month cycle.
  Flavor QA lead (may be different from flavor lead) identified to coordinate testing of image at milestones during release.
  Follow the milestone and release processes.
  Best effort support from flavor community for security updates and high priority bug fixes for default 9 month support period.
  If flavor ceases to do active releases for consecutive cycles, release team may request the TechnicalBoard review whether it should
  remain recognized flavor.

  What kind of support do they receive from Canonical or/and Ubuntu
  community? What privileges do "official flavours" have over unofficial
  derivatives of Ubuntu like Linux Mint, Elementary OS, Deepin OS,etc.?

From the same Ubuntu Wiki page:

  Resources and Services that Canonical provides for Recognized Flavors:

  Infrastructure

  status.ubuntu.com for work item tracking at flavor and individual level.
  launchpad mail list support for project communication.
  Ubuntu Security team will help the flavor maintainers distribute security updates to their users, by reviewing and sponsoring any
  updates they wish to provide.
  Notification of vulnerabilities can be provided by Ubuntu Security team to flavor maintainers, if universe package list to monitor is
  provided.
  Minimum of 1 person is offered sponsorship to UDS

  Daily ISO build and publish

  Use of launchpad build infrastructure.
  Daily publishing of builds on cdimage.ubuntu.com
  Best effort help from foundation and release team members on requested rebuilds and analysis of build failures.

  Coordination with Ubuntu release

  Optional inclusion in Ubuntu development milestone releases.
  Inclusion of image in release manifest if:

  has been made daily.
  has been released and tested in at least one beta milestone.

  If image is to be published as part of a release manifest:

  Images published and available through lifecycle.
  Inclusion in release announcement (pointers to flavor page)
  Inclusion in release notes (flavor overview and known issues)
  Use of the ISO tracker for coordinating community testing of images for milestone releases

  Link to flavor as recognized derivative from Ubuntu site http://www.ubuntu.com/project/about-ubuntu/derivatives
  Weekly meeting for sharing status and clarifying dependencies between teams.

And, of course, only official flavours are supported here on Ask Ubuntu.


Open System Settings and go into User Accounts. Select your user, and there should now be an option on the right to enable automatic login. Turn that on and you're done.


I get two kernel updates, one for Generic and one for Generic-PAE

If you don't need the generic kernel, remove it.

If you need it, but just don't want it updated, remove the linux-image-generic package.

To find out which kernel images are installed, run dpkg -l | grep linux-image in a terminal.


Has anyone got an Nvidia 940M to work on 14.04.4 LTS w/ Nvidia proprietary drivers?

You probably did not install nvidia-prime for your hybrid graphics.

Run in terminal

sudo apt-get install nvidia-352 nvidia-prime

If there are any errors, post output to your question. Then reboot.

You can also install a newer driver from a PPA

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime

Both 352 and 361 drivers support Nvidia 940M adapter.


How can I easily type full width alphanumeric Unicode characters?

It is possible to accomplish this by adding either a new xkb layout or layout variant. Here's what I did to add a new full width character keyboard layout variant (for the US keyboard layout):

Make a backup of /usr/share/X11/xkb/symbols/us, /usr/share/X11/xkb/rules/evdev.xml and /usr/share/X11/xkb/rules/evdev.lst
Add the layout variant to the end of /usr/share/X11/xkb/symbols/us

partial alphanumeric_keys
xkb_symbols "fullwidth" {

    name[Group1]= "English (US, fullwidth)";

    key <TLDE> {    [     UFF40,    UFF5E       ]   };
    key <AE01> {    [     UFF11,    UFF01       ]   };
    key <AE02> {    [     UFF12,    UFF20       ]   };
    key <AE03> {    [     UFF13,    UFF03       ]   };
    key <AE04> {    [     UFF14,    UFF04       ]   };
    key <AE05> {    [     UFF15,    UFF05       ]   };
    key <AE06> {    [     UFF16,    UFF3E       ]   };
    key <AE07> {    [     UFF17,    UFF06       ]   };
    key <AE08> {    [     UFF18,    UFF0A       ]   };
    key <AE09> {    [     UFF19,    UFF08       ]   };
    key <AE10> {    [     UFF10,    UFF09       ]   };
    key <AE11> {    [     UFF0D,    UFF3F       ]   };
    key <AE12> {    [     UFF1D,    UFF0B       ]   };

    key <AD01> {    [     UFF51,    UFF31       ]   };
    key <AD02> {    [     UFF57,    UFF37       ]   };
    key <AD03> {    [     UFF45,    UFF25       ]   };
    key <AD04> {    [     UFF52,    UFF32       ]   };
    key <AD05> {    [     UFF54,    UFF34       ]   };
    key <AD06> {    [     UFF59,    UFF39       ]   };
    key <AD07> {    [     UFF55,    UFF35       ]   };
    key <AD08> {    [     UFF49,    UFF29       ]   };
    key <AD09> {    [     UFF4F,    UFF2F       ]   };
    key <AD10> {    [     UFF50,    UFF30       ]   };
    key <AD11> {    [     UFF3B,    UFF5B       ]   };
    key <AD12> {    [     UFF3D,    UFF5D       ]   };

    key <AC01> {    [     UFF41,    UFF21       ]   };
    key <AC02> {    [     UFF53,    UFF33       ]   };
    key <AC03> {    [     UFF44,    UFF24       ]   };
    key <AC04> {    [     UFF46,    UFF26       ]   };
    key <AC05> {    [     UFF47,    UFF27       ]   };
    key <AC06> {    [     UFF48,    UFF28       ]   };
    key <AC07> {    [     UFF4A,    UFF2A       ]   };
    key <AC08> {    [     UFF4B,    UFF2B       ]   };
    key <AC09> {    [     UFF4C,    UFF2C       ]   };
    key <AC10> {    [     UFF1B,    UFF1A       ]   };
    key <AC11> {    [     UFF07,    UFF02       ]   };

    key <AB01> {    [     UFF5A,    UFF3A       ]   };
    key <AB02> {    [     UFF58,    UFF38       ]   };
    key <AB03> {    [     UFF43,    UFF23       ]   };
    key <AB04> {    [     UFF56,    UFF36       ]   };
    key <AB05> {    [     UFF42,    UFF22       ]   };
    key <AB06> {    [     UFF4E,    UFF2E       ]   };
    key <AB07> {    [     UFF4D,    UFF2D       ]   };
    key <AB08> {    [     UFF0C,    UFF1C       ]   };
    key <AB09> {    [     UFF0E,    UFF1E       ]   };
    key <AB10> {    [     UFF0F,    UFF1F       ]   };

    key <BKSL> {    [     UFF3C,    UFF5C       ]   };

    key <SPCE> {    [     U3000,    U3000       ]   };
};

Add the entry for the variant layout to /usr/share/X11/xkb/rules/evdev.xml and /usr/share/X11/xkb/rules/evdev.lst

In evdev.xml, search for <description>English (US)</description>, scroll down to the last <variant> block for the us layout, and insert the following after that:

         <variant>
           <configItem>
             <name>fullwidth</name>
             <description>English (US, fullwidth)</description>
           </configItem>
         </variant>

In evdev.lst, search for us:, scroll down to the last entry with us: and insert the following after that:

  fullwidth       us: English (US, fullwidth)

Remove the previously compiled keymaps:

# rm /var/lib/xkb/*.xkm

Logout and login

The new layout should show up in the Text Entry settings menu as English (US, fullwidth), which you can add into your input sources.


From man unrar:

-p<password>
  Set password.

So your line would be something like:

for file in *.part01.rar; do unrar x -p<password> ${file}; done;


Ubuntu 14.04 not shutting down completely

Try the terminal command:

$ sudo init 0

or $ shutdown.

Init 0 should shut down.

If it no workee, try using saucy, precise, or upgrading your distro with $ sudo apt-get update && sudo apt-get upgrade.


what steps to follow to organize/browse files after PhotoRec has finished

SOLUTION 1

Create a file called MergeByExt.sh

if [ "$#" -ne 2 ] || ! [ -d "$1" ]; then
  echo "Usage: $0 DIRECTORY EXTENSION" >&2
  exit 1
fi

folder=$1
ext=$2

mkdir $2
exts=$(find $folder -type f | grep $2)

for f in $exts; do
    mv $f $2
    echo $f moved to $2
done

Then you can call it like this (example to merge all the MP3 files in a single folder)

MergeByExt.sh /path/to/photorec/recover/root/folder .mp3

The folder will be created in the path were you executed the script

SOLUTION 2

This solution will create a folder with each extension inside each RECUP_DIR.X directory

Like this

RECUP_DIR.1\txt
RECUP_DIR.1\png
RECUP_DIR.1\jpg
RECUP_DIR.1\doc

Save this text to ByExtension.sh

dir=$1
if [ "x$dir" != "x" -a -d "$dir" ] ; then
    cd "$dir"
fi

dir=$(pwd)
basedir=$(basename "$dir")

exts=$(find . -mindepth 1 -maxdepth 1 -type f -print | grep '^\./.*\.' | sed 's/^.*\.\([^.][^.]*\)$/\1/' | sort -u)

for e in $exts; do

    # Skip extension if this directory is already named by extension.
    if [ "$basedir" = "$e" ] ; then
        continue
    fi

    mkdir "$e"
    for file in *.$e; do
        mv "$file" "$e"
    done
done

The you can go to main folder where PhotoRec folder recover the files and run this command

find . -depth -type d -print -exec /path/to/script/ByExtension.sh {} \;

Taken from http://ubuntuforums.org/showthread.php?t=1575901


Permission trouble ?
Type in a console sudo rm -rf folderName (be very careful as this command will erase the whole folder without warning, even if it is a system one)

Safer option, changing the permission of the folder (Adding to "All" users : "Writable") and erasing it afterward : sudo chmod a+w folderName and then rm -rf folderName


Correct permissions for sudo LAMP /var/www directory

The proper permission under /var/www/ is 755 for folders and 644 for files.

The value for  755 is readable by User, Group, and World, writable by User, executable by User, Group, and World. For uploading folder it should be different, and you should change manually.
Whereas the value for 644 is readable by User, Group,
and World, but writable only by User.

The short command to set folder and file under /var/www/ to 755 and 644 is:

find /var/www -type d -exec chmod 755 {} \;

find /var/www -type f -exec chmod 644 {} \;

These are simple commands so you will get all folder and files into these permissions, of course, that is not the best practice, it would better if you set spesifically the folders or files that you want to set (I edit this answers after considering comments from AzkerM).


Use Outgoing SSH to receive incoming SSH

I just copy/paste (slightly modified) part of @b_laoshi's answer from here:

  In this case, you can configure your ssh tunnel from ComputerA ->
  ComputerB such it can tunnel reverse connections as well.

  When establishing the ssh connection ComputerA -> ComputerB, do so
  with the -R option in the following manner:

ssh ComputerBUser@ComputerB -R 2222:localhost:22

  where ComputerBUser is the username for the account on ComputerB
  being authenticated and 2222 is a free port on ComputerB. We'll use
  this port to reverse-tunnel back to ComputerA from ComputerB.

  Now from ComputerB, you can issue the scp command in the following
  manner to copy files from ComputerB -> ComputerA where ComputerAUser
  is your username on ComputerA:

scp -P 2222 /path/to/file/on/ComputerB ComputerAUser@localhost:/path/to/drop/file/on/computerA

  or

ssh -p 2222 ComputerAUser@localhost

  What's happening here?

  It looks like we are simply telling ComputerB to send the file back to
  itself because we're passing localhost instead of ComputerA. We are
  indeed telling scp to pass the file back to ComputerB, but to port
  2222. All connections to port 2222 on ComputerB get forwarded to port 22 (default ssh port) on ComputerA.

  Thus, by tunneling backwards over the existing ssh connection, it
  doesn't matter that ComputerA is behind an NAT firewall.

EDIT:
To allow to establish a SSH tunnel without the need for an active terminal window, one can add the -N parameter (before the -R) (as pointed out in the link provided by @steeldriver). Moreover, if one wants to automatically setup a permanent background ssh connection, Erik Torgesta's great article provides you with all the necessary steps.

Related topics:

How do I access the SSH client side from the SSH server side?
Access remote multiple servers behind NAT


How can I restart a specificed interface instead of restart all interface?

Running sudo netplan apply should not cause interfaces to be brought down, if there are no changes to the configuration for those interfaces.  So this should be safe to run.  If you find that this command restarts interfaces whose configuration has not changed, that's a bug and should be reported at https://bugs.launchpad.net/netplan.


If you're using metacity, you could edit or create a bash script to edit it directly in gconf I guess:

~/.gconf/apps/metacity/workspace_names/%gconf.xml


Try to run the following command in a terminal:
sudo alsactl store 0

Try also this one, a  recent pc may have 2 sound devices :

sudo alsactl store 1


How to invoke a text file as a list of commands

Since 245,000 filenames probably won't fit on a command line, use find and xargs (man find;man xargs), and do something like:

find recov1/ -type f -iname '*.jpg' -print0 | \
    xargs -0 --no-run-if-empty mv -t /disks/Keep/new-s1-recov

I always use find ... -print0 and xargs -0 in case filenames contain blanks. You may have to use the xarg switches --max-args= or --max-chars= if xargs fails. You could also replace mv with echo mv for testing.


my usb is auto mounted to /media/usb0 and unable to paste files

It's was happened in my ubuntu machine also.i just unmount the /media/usb0 and then mount it in someother ( /home/uname/Desktop/mount )  directory.
sudo umount /media/usb0
sudo mount /dev/sda2  /home/uname/Desktop/mount


Is there a usage count for packages or programs?

If you opt in, popularity-contest reports usage statistics back to Ubuntu, but it could also be used for purposes like yours. From it's man page:

  The  popularity-contest  command gathers information about Debian pack‐
  ages installed on the system, and prints the name of the most  recently
  used  executable  program  in that package as well as its last-accessed
  time (atime) and last-attribute-changed time (ctime) to stdout.

The key word there is executable. So you'll probably get some false hits for data packages, etc.

So, for example, popularity-contest | grep '<OLD>' should give you a list of packages that have not been used for more than three months.

popcon-largest-unused gives you a list of unused package sorted by size.


How to open windows directly in full screen mode on Ubuntu 18.04?

Some applications such as Evince have options or a command line option that allows to launch them full screen. There is no overall setting that would allow you to automatically open new windows in full screen mode on Gnome Shell, which is the desktop used by Ubuntu 18.04. Still, there are some options.

1. Modifying the Gnome Shell Desktop

You can remove the topbar and remove window decorations on maximized windows to have a near-full screen experience.

Hide top bar will hide your top bar.
Pixel Saver will remove legacy title bars from maximized windows

Together, these extensions will give you a near full-screen experience on maximized windows.

2. Using Devilspie or Devilspie2

Devilspie and Devilspie2 are old tools still work perfectly on desktops that run on Xorg. You can define rules that need to be applied to newly created windows. As such, you could set that any window is automatically maximized, but you will need to exclude dialog boxes. This can do exactly what you want, but requires tinkling with a config file to set it up initially.


How can I install and run a medical app designed for windows server 2008 in Ubuntu?

I don't have any experiance with Oracle but if you are trying to run a Windows ".exe" file then yes, do use wine for that.

You can install it by typing: sudo apt-get install wine then click on the .exe file. Sometimes there are a few issues with fonts which you can download from the Ubuntu Software Centre if you have any issues with it.


Installing Ubuntu on older Toshiba's Satellite series laptop

It will not be OK, as the recommended minimum requirements are:

2 GHz dual core processor
4 GiB RAM

The good news is that you can install Xubuntu or Lubuntu, which are lightweight alternatives. Here are the requirements:

Xubuntu:

Ideally 1 GB of memory
A processor that supports PAE

Lubuntu:

Ideally 512MB of RAM
A Pentium II or a Celeron system are sufficient to run your system

Keep in mind that you should test them with a live CD before installing, and that the simulation on live CD is a bit slower than the installed OS.


The first thing to do is do enable IP forwarding. This is done either by using

echo "1" > /proc/sys/net/ipv4/ip_forward

Then, we will add a rule telling to forward the traffic

sudo iptables -A FORWARD -i LAN1 -o LAN0 -j ACCEPT
sudo iptables -A FORWARD -i LAN0 -o LAN1 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o LAN0 -j MASQUERADE

On this way LAN1 can go to internet through LAN0.

Edit 1

Try this

Example to route traffic for port 4444 and you can implement for port you need for

Let’s start from the iptable. Here we shall take 4444 as the service for routing. Use mangle table of iptable for modifying the 4444 packets.

  sudo iptables -t mangle -A OUTPUT -p tcp –dport 4444 -j MARK –set-mark 0×1

We are marking all packets with destination port 4444 as ’0×1′ .

To delete this entry from iptables we can use -D instead of -A.

Next, create a new IP route table in /etc/iproute2/rt_table by just giving an entry

100 4444table

Write rule for 4444 packets.

ip rule add fwmark 0×1 lookup 4444table

Add route at new table 4444table. Here we shall use ’192.168.1.1′ as the gateway for 4444. Address ’192.168.1.1′

We copy all entries except default gateway entry from main table.

 sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table 4444table $ROUTE; done

Add default gateway entry for 4444 packets to table 4444table

  sudo ip route add default via 192.168.1.1 table 4444table

Use ip route show table 4444table to show all routes at 4444table.


sftp -i parameter not being recognized (for private key file name)

Per the help message, order matters, the -i flag comes before the destination so it should be

sftp -i key user@domain.tld


We have the same laptop model and I also went searching for a way to control the fans the same way as with Armoury Crate since the instructions detailed in the ArchWiki weren't working for me then after quite some time I saw this on a reddit post:

In Kernel 5.6 there is a fan mode for asus laptops, check if you have /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy 2 - Silent, 0 - Balance, 1 - Turbo, similar to the modes in armoury crate on windows.

I use Manjaro which is already on 5.8 at this time so I tried modifying it and it worked excellently. Here's the reddit post if you want to check it out: https://www.reddit.com/r/linux_gaming/comments/g2na6s/asus_zephyrus_g14_the_first_few_hours_on_linux/


How do I change Firefox's `about:config` from a shell script?

[This doesn't provide what you've asked for but is a different way to achieve the same result.]

First, about the warning... You can make sure you never see it again (on a per profile basis) as shown below:

Now, as regards the preferences you desire. In general, you can create a simple text file called user.js. This file has to be placed in the relevant profile folder such as /home/username/.mozilla/firefox/random.default (where random is something unique to each user).

The structure and syntax of user.js is described in User.js file for example.

So in your case, you would have a line such as:

user_pref("set browser.urlbar.trimURLs","false");

or, to use your other example (but see further down):

user_pref("browser.search.defaulturl","https://duckduckgo.com/");

However, I suggest that you first ensure that the preferences you set are valid for the browser version you're using. I say this because I don't see browser.search.defaulturl at all in my about:config. I'm using Firefox 22 beta. Instead, I see:

browser.search.defaultenginename;Google

So, taking the example of using Bing instead of Google, the other line in your user.js if you're using Firefox 22, would be:

user_pref("browser.search.defaultenginename","Bing");

As the image indicates, you can search for additional engines.

So, in short, you can put your preferences in user.js and you can remove the nag screen by unticking in the first image.

Also, as indicated in the resource I linked to, you must restart the browser for the code in user.js to take effect.


How to audit SE elections results file on Ubuntu?

Use openstv You can download it from the universe repositories.

sudo apt-get install openstv

And the result you can get like this:

wget -O ballot.blt http://askubuntu.com/election/download-result/5
openstv-run-election -r TextReport MeekSTV ballot.blt


How to open Nautilus directory in current Terminal?

Dirty or not, the solution below worked perfectly in the 30 minutes I tested it frequently. The solution works as long as you can right-click a file (any) inside the directory:

1.

2.

3.

Nautilus script

#!/usr/bin/env python3
import subprocess
import os
import time

def replace(path):
    for c in [("%23", "#"), ("%5D", "]"), ("%5E", "^"),
              ("file://", ""), ("%20", " ")]:
        path = path.replace(c[0], c[1])
    return path

def get(command):
    try:
        return subprocess.check_output(command).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

t = get(["pgrep", "gnome-terminal"])
if t:
    w = [l.split()[0] for l in get(["wmctrl", "-lp"]).splitlines() if t in l][0]
    # get the current path
    current = replace(os.getenv("NAUTILUS_SCRIPT_CURRENT_URI"))
    dr = os.path.realpath(current)
    # raise the found terminal window
    subprocess.call(["wmctrl", "-ia", w])
    time.sleep(0.3)
    # copy the cd command to clipboard
    c1 = "printf 'cd ' | xclip -in -selection c"
    c2 = 'echo "'+"'"+dr+"'"+'"  | xclip -in -selection c'
    # paste & run it
    for c in [c1, c2]:
        subprocess.call(["/bin/bash", "-c", c])
        subprocess.call(["xdotool", "key", "Control_L+Shift+v"])
        time.sleep(0.05)

How to use

The script needs wmctrl, xdotool and xclip:

sudo apt-get install wmctrl xdotool xclip

Copy the script into an empty file, save it as open_in_terminal (no extension) in ~/.local/share/nautilus/scripts. Create the directory if needed. Make the script executable

That's it. Log out and back in and you'll have the script available as in the image (2).

Explanation

Right- clicking a file, we can get the path using nautilus' "NAUTILUS_SCRIPT_CURRENT_URI".
In a script, we can then load this path into the clipboard (using xclip)
Subsequently, the script raises the (first found) gnome-terminal window and pastes the path, preceded by the cd command. Since we used echo to load the whole line into the clipboard, Return is included.

Notes

It should be clear that there should be nothing running in the terminal, and it works best if there is only one terminal window open. In case there are multiple, the script picks the oldest gnome-terminal window.
The script needs to be tested thoroughly in practice. While I ran it, the timing was no issue even a single time, not even when the Desktop had to "travel" across four or five viewports to get to the terminal window. IF errors would occur however, with a few lines more we could make it actually wait in a smart(er) way for the terminal window to be raised. Let's see what happens. It doesn't seem necessary.
Since the script uses the realpath, also linked directories will work correctly.

More information on nautilus scripts here.

Alternatively, pick your own terminal window if you have multiple

If you want to be able to choose in which terminal window you would open the current (nautilus) directory, use the script below.

How it works in practice

Right- click (any) file inside the directory (in this case my desktop) like below:

Click on (or raise otherwise) the terminal window you'd like to use, and it will cd to the directory:

The script

#!/usr/bin/env python3
import subprocess
import os
import time

def replace(path):
    for c in [("%23", "#"), ("%5D", "]"), ("%5E", "^"),
              ("file://", ""), ("%20", " ")]:
        path = path.replace(c[0], c[1])
    return path

def get(command):
    try:
        return subprocess.check_output(command).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

# check if gnome-terminal runs
pid = get(["pgrep", "gnome-terminal"])

if pid:
    t = 0
    while t < 30:
        # see if the frontmost window is a terminam window
        active = get(["xdotool", "getactivewindow"])
        if pid in get(["xprop", "-id", active]):
            # get the current path
            current = replace(os.getenv("NAUTILUS_SCRIPT_CURRENT_URI"))
            dr = os.path.realpath(current)
            # copy the cd command to clipboard
            c1 = "printf 'cd ' | xclip -in -selection c"
            c2 = 'echo "'+"'"+dr+"'"+'"  | xclip -in -selection c'
            # paste & run it
            for c in [c1, c2]:
                subprocess.call(["/bin/bash", "-c", c])
                subprocess.call(["xdotool", "key", "Control_L+Shift+v"])
                time.sleep(0.05)
            break
        else:
            t += 1
            time.sleep(0.5)

Setup

Is exactly like the first script.

Explanation

The script has one difference from the first one: instead of automatically raising the first found terminal window, it waits for the first terminal window to have focus. Then it cd's to the directory inside that window.


Can't install usermin or virtualmin: "Expecting form-data encoding, but got normal encoding"

Bug -- a fix is expected soon:

https://sourceforge.net/p/webadmin/usermin-bugs/455/?limit=25


You have to first unlock to change in user accounts as follows:

Then add user as follows:

And make new account as Standard if you would not to create as
Administrative:


Kubuntu 14.04 login fails after lightdm/ xdm/ lightdm swap

I've been using Ubuntu since 2006.  From 2005 to 2006 I exclusively used Kubuntu.  Before that tried various other types of linux.  I like the look and feel of Kubuntu, but I didn't like how often it would crash in the most unpredictable ways.  Since then I've tried several KDE programs under Ubuntu, and time and again these KDE applications are visually appealing buggy as hell.  Do yourself a favor, upgrade to the REAL ubuntu.  KDE? Just say NO!


Is it necessary to have openjdk 6 installed in Ubuntu 12.04?

As you can see in this picture the OpenJDK 6 and 7 share some code base:

OpenJDK 7 implement newer features, while OpenJDK 6 is more used and therefore perhaps more stable.

Also here is the OpenJDK FAQ.


How do I recover from a "error: unknown file system grub" boot error?

The simplest way to fix that is with super grub disk. This is a disk that will automatically will fix grub for you. Get it Here

To know more about Grub Please Read this

Hope this will help.


How to remove link from application panel

Press Win+Alt and right-click the short-cut link to be presented with a right-click menu.  You should be able to delete the link.

If you are using fall-back mode then this key combination is Alt and right-click

Linked Question:

How to revert to GNOME Classic Desktop?


Black screen appears when booting new install of 11.10 on my desktop, cannot access Grub menu to fix

Running Boot-Info (formerly called 'Boot-Repair', installation instructions here) solved the problem. In Boot-Repair I chose Advanced options->GRUB options. I selected 'Add a kernel option:" and selected acpi_osi= from the drop down menu beside it to make the kernel not respond to osi queries (as suggested here because some bioses contain fixes for specific Windows versions that may not work with other OS's).

I clicked on 'Edit GRUB configuration file' which loaded /mnt/boot-sav/sda1/etc/default/grub. In this file I set GRUB_CMDLINE_LINUX_DEFAULT="" , removing it's quiet splash value to display the boot messages when booting (splash enables the splash screen with condensed text output and quiet splash results in just the splash screen image being shown), put a # in front of GRUB_HIDDEN_TIMEOUT to display the grub menu and set  GRUB_TIMEOUT=10 to give the user 10 seconds to make a selection. I don't recall but these changes may already have been made from my previous attempt to edit the GRUB configuration as described in the question.

More details on Grub2: https://help.ubuntu.com/community/Grub2

You can also adjust the amount of time to 'Unhide boot menu' in the Advanced options->Main options. This was left at the default value of 10 seconds. 'Reinstall GRUB' was also selected by default. In Advanced options->GRUB location, the default settings were 'sda1' for 'OS to boot by default' and 'Place GRUB in all disks (except USB disks without OS)' was selected.

I clicked 'Apply' and restarted the computer after Boot-Info finished running. I changed the boot order of hard drives in the BIOS (my usb pen drive was listed as a hard drive so I would adjust the order according to which drive I wanted to log into) then pressed 'Enter' at the Grub menu. After the boot messages, the login screen appeared. The system also automatically boots after the Grub menu appears for 10 seconds.


There are two things to understand to answer your question :

first, Canonical is backing Ubuntu. Not Mark Shutleworth. What I mean there is that Canonical is a commercial company that sells services (training, support, customizations for OEM...). Last time I heard from them, they were making some money, not enough to be profitable, but they are not crashing either.

second, Mark Shuttleworth created the "Ubuntu Fundation", an association whose purpose is to fund the Ubuntu development/support, if Canonical fails. The Fundation has 10M$ in cash, and is doing nothing with it (well, I guess they have placed the money somewhere, but that's not the purpose). It is in a "dormant" state, and will be activated if Canonical cannot support Ubuntu anymore. If it is ever activated, it will pay the Ubuntu developer to continue their job, as long as possible, and at the minimum until the existing Ubuntu release reaches their respective end of life.
The important point here is that neither Ubuntu, Canonical, nor the Ubuntu Fundation are dependant on Mark Shuttleworth's money. He already gave some of it to those institutions, and now they own it... So even if Mark Shuttleworth spends all his millions, Ubuntu should stay in good shape.


Unity on 14.10 - Desktop issue after dist upgrade

reset the unity

$ unity-reset
$ setsid unity

if that didnt workout try to re-install the unity & the desktop

$ sudo apt-get autoremove ubuntu-desktop
$ sudo apt-get autoremove unity
$ sudo apt-get update
$ sudo apt-get install unity
$ sudo apt-get install unity-2d
$ sudo apt-get install ubuntu-desktop
$ sudo shutdown -r


How do I remove the Nautilus top bar on a second screen?

I think this is a bug. If you could move the shell's panel, you'd see that menu goes right across the entire screen and provides File/Edit/View/Go/Bookmarks/Help.

It's caused by the hacks Unity has to perform to get a menu for the desktop. Yes, I know you're not using Unity. Neither am I (Gnome Classic) and I've got it too.

Unfortunately the only way it's going to get fixed is if somebody improves the way that Unity deals with the menus, or they elaborate on the hack so it only does it when Unity is running.

There are patches floating around (check out the bug report) but I couldn't say if or when it's going to get pulled in.


I have been using Lubuntu since version 11.04 and I use Libre Office.  Unless you have very little RAM you can as well.  Information concerning Ease can be found
https://launchpad.net/~natesm/+archive/ease
and
https://launchpad.net/easeproject


How to install NVIDIA GeForce GTX 675M in Ubuntu?

See this link: http://tech.sixcolumns.com/2012/11/nvidia-310-19-drivers-released-how-to-install-it-in-ubuntu-12-1012-04/

It has instructions for how to install the drivers for your graphics card.


Writing a bash script to copy all files between user specified directories!

I can't think why you'd need a script for this.

cp /path/to/sourcedir/* /path/to/target

If you don't want to over-write files that have the same name in the source and target directories, use the -n or --no-clobber option.

cp -n /path/to/sourcedir/* /path/to/target

If you want to include hidden files (i.e. those beginning with a dot), use

shopt -s dotglob

before executing the cp command.


I have no idea why the image wouldn't boot in non-UEFI mode under a VM.  However, in "legacy mode" it appeared to not want to boot.   The screen went black for several seconds, and then it went back to the POST screen like the boot failed. When it did this the first time I assumed it had tried, failed, and had given up and was going to try to boot back into Windows so I entered setup again.  However, after a suggestion by sudodus, I tried again, and this time I somehow failed to hit the right key to enter setup and the install process just started!

So the answer is: the mini.iso won't boot in EFI (Secure Boot) like the regular Live USB will.  It instead requires disabling secure boot using using Legacy mode.


hsp/hfp doesn't work on Ubuntu 18.04.1 LTS with bluetooth headphones

If it is a Broadcom chip this might help you:

lsusb

# Bus 001 Device 003: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]

I could connect the headset before, but just like for you, as soon as I switched to HSP/HFP the mic and audio wouldn't work.

I tried some things. But I'm pretty sure this was the solving step:
Found this link in another article somewhere.

I replaced my BCM firmware file with the one downloaded from plugable (link below). Make sure that you have a that chip first! And I'd recommend to do some backup of the original firmware files as well.

cd /lib/firmware/brcm
# backup original
cp BCM20702A<yourversion>.hcd xxxBCM20702A<yourversion>.hcd

https://plugable.com/2014/06/23/plugable-usb-bluetooth-adapter-solving-hfphsp-profile-issues-on-linux/

Then I pretty much followed these instructions, point out that I had to use the name of my original driver. I first missed this and had something saying 'could not find' in

dmesg | grep -i blue

As soon as you replaced the files shut down your machine (not just reboot) and start it up again. Works for me now =)
I'd love to here if this did the job.


How can I boot into Ubuntu after installing Win7 on the side?

Insert your Ubuntu CD or live USB reboot your computer and set it to boot from CD/USB in the BIOS or in boot manager on newer PCs and boot into a live session.
Install and run Boot-Repair
Click "Recommended Repair".
Now reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting(may be different system to system). You will be able to choose between Ubuntu and Windows .

INSTALL BOOT REPAIR:
(Terminal in LiveSesion)
sudo apt install software-properties-common
sudo add-apt-repository -y ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
And boot-repair will appear.


Since you don't seem to be a programmer, you can't really do anything.

GIMP can't render all PSD files properly simply because it doesn't have some feature. E.g. in Photoshop gradients are often applied as layer styles, and GIMP doesn't have them.

There is support for PSD coming to Krita, another image editing application, but I really couldn't say how much it will support.


How do I convert existing forms to fillable PDF's?

You can use Libreoffice Writer to create the form and export to fillable PDF.

Libreoffice webpage

First of all,  open Writer and create a new document. Select "View" from toolbar menu, go to "Toolbar" and select "Form Control".

Now you can create your form.

Once you have finished, go to "File" and "Export to PDF". Remember to check "Create PDF form" option.


Store grive command output to variable in bash script

The problem was that grive command was outputting to the error stream, STDERR (File descriptor 2), which is normally used for passing error messages while the STDOUT (File descriptor 1) is used for showing actual (upon success) output of any program (strictly speaking).

I have not used grive, but according to your words the developer might have used STDERR only to show any messages from the command.

Now the command substitution you have used :

VARABLENAME=$(command)

will save the STDOUT of command to VARABLENAME, not STDERR. As a result the variable was empty and you were seeing messages on terminal.

I have suggested :

VARABLENAME="$(command 2>&1)"

this will save both the STDOUT and STDERR to the variable (in your case just STDERR as there is no STDOUT), So you would get desired result using echo "${VARIABLENAME}".

Also as there is no STDOUT you can save just the STDERR to the variable (generalization, true for any such program) :

VARABLENAME="$(command 2>&1 >/dev/null)"


VM cannot access webserver outside of internal network! (Ubuntu Desktop 12.0.2)

I just had to ping 8.8.8.8 and it was fixed...

I think the real cause was it wasn't connected to Google's DNS


remove file but exclude all files in a list

The rm command is commented out so that you can check and verify that it's working as needed.  Then just un-comment that line.

The check directory section will ensure you don't accidentally run the script from the wrong directory and clobber the wrong files.

You can remove the echo deleting line to run silently.

#!/bin/bash

cd /home/me/myfolder2tocleanup/

# Exit if the directory isn't found.
if (($?>0)); then
    echo "Can't find work dir... exiting"
    exit
fi

for i in *; do
    if ! grep -qxFe "$i" filelist.txt; then
        echo "Deleting: $i"
        # the next line is commented out.  Test it.  Then uncomment to removed the files
        # rm "$i"
    fi
done


Can I install to a USB key, but place the swap partition on my hard drive?

Yes, this is certainly possible but I don't know how you'll create an extended part. on your HDD since you already have 4 primary partitions.

Outline:

Install Ubuntu normally on USB, manually partition, skip creating swap, boot from USB.
Use sudo mkswap /dev/sdX to create swap on hard drive.
Edit /etc/fstab to include the swap partition and automount it.
Use swapon to turn it on.


A quick search on the web got me this list of editors for lrc-files.

If you have KDE this might be interesting for you: Lrceditor-Amarok
This one is written entirely in python: lrcShow-X

Hope one of them meets your needs.


Package from Ubuntu Software Center not seen in apps

Windows Wireless Drivers is a front-end package for ndiswrapper, which I have not needed to learn to use.  There is a tutorial on it at https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper


Would install LAMP conflict with python?

Python is not related to any of the lamp packages. So no, they shouldn't conflict with each other.

P.S. If you do not need the full LAMP stack, you don't have to install all of its packages. For example, if you need to install just PHP Apache, you can do that by running

sudo apt-get install php5

If you need both Apache and PHP, then you would run

sudo apt-get install php5 apache2


Python 2.7: no documentation found when typing help('print')

This looks like a bug of Python 2 as something like help("dir") works properly. It probably does not work because print is a special keyword, unlike Python 3. Stick to Python 3 or run the following command instead of help("print"):

help("__builtin__.print")


Solved my issue, this thread had the answer: https://ubuntuforums.org/showthread.php?t=2333185

Edit the following file.

nano /var/lib/dpkg/info/python-minimal.postinst

From

#! /bin/sh
set -e

python2.7 -m compileall /usr/share/python/ >/dev/null

to

#! /bin/sh
set -e

python -m compileall /usr/share/python/ >/dev/null

Then

apt-get install python2.7-minimal


http://www.moosechips.com/2008/09/ubuntu-rebuild-a-source-package/ as in my edits solved my problem


how do I install Firebird 2.1 on Ubuntu 13.04

First download the package listd + +5.  Once the download is done, go to the folder where you saved the package probably the Downloads folder, and click with the right mouse button.  Select Open with Ubuntu Software Center.  Once software center opens, click on the install button

Download Firebird, then just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, go to the folder where you saved the file, probably the Downloads folder, and run the command(s) below:

sudo Tar-xzf FirebirdSS *. Tar.gz
Cd FirebirdSS *
sudo . / Install.sh

When it ask you to enter the password for the SYSDBA user, enter the default password, which is: masterkey

Source:vivaolinux


Why environmental variable returns none in Linux?

When you define a variable in ~/.bashrc, that variable will be present as soon as ~/.bashrc is "sourced" (read). This only happens when you start a new shell (e.g. when you open a new terminal).

So, if you add the new line to your .bashrc file, you will then need to open a new terminal and run your python script there. Alternatively, you can run source ~/.bashrc to source it into the current shell.

Now, you mention sublime but don't really explain why that's relevant, so I will assume you are running your python script inside the sublime editor somehow. Presumably, it has some sort of shell emulator. If that is the case, then the details of how and where to define the variable will depend on how sublime sets up its shell. Try the following:

Just close the sublime window and then open it again and see if it has now re-read your .bashrc.
Sublime could very well not read .bashrc at all. If you are running sublime from some GUI button, you will probably need to log out and log back in before it manages to re-read the variables.
Try opening a new terminal and running sublime (or whatever the command name for launching sublime from the command line is). Does it see the variable then?


GRUB problem after installation of 11.04

I had a similar problem. Here's how I fixed it (what I remember at least; I was basically just following some forum posts I found, mixed with some experimenting).

Press M to do a manual recovery.
run mount -o remount /. IIRC / is mounted read-only, so this will remount it for writing.
run dpkg --configure -a.
Type Ctrl+D to exit the shell and reboot.
Hopefully, it should boot fine so you can finish the upgrade. I actually don't remember exactly how I did that, sorry. I followed the instructions from the Ubuntu forums, but I can't find the post right now. I'll look for the instructions I followed or maybe someone else can answer it.


I couldnt get MythTV system events to work. Tried my best playing with permissions all in vain. Here is a my current working code. Replace the database variables with your settings. Save it as say /etc/cron.daily/idle_htpc.py If any of the step fails program will quit. Just sudo crontab -e this for every 5-59/15 * * * * /etc/cron.daily/idle_htpc.py /var/log/htpc_out 2> /var/log/htpc_err 15 minutes

Step 1: Look if there are any SSH connections

Step 2: Check if live or recorded video being played at the moment. If not sleep for 5 minutes

Step 3: Check once again if live or recorded video being played at the moment

Step 4: Check if there was a live stream within the last 5minutes just in case there was a sub-5  minute stream while the script was sleeping in Step 2. However if there was a recorded playback there is no means to detect here.

Step 5: Check the next upcoming recording and if there is one and it is >5minutes from now set ACPI wakeup 3 minutes before start time and shutdown or else clear ACPI wakeup and shutdown.

Hope this helps someone.

#!/usr/bin/python3

import pymysql
import pymysql.cursors
from datetime import timedelta,datetime
import subprocess
import time
import sys

print ( datetime.now().strftime("%Y-%m-%d %H:%M:%S"), file=sys.stdout)

def check_Logins():
    #Returns the number of SSH connections
    #result= subprocess.run('who | grep -cv "(:"', stdout=subprocess.PIPE, shell=True)
    result= subprocess.run("netstat -n |grep tcp |grep ':22' |wc -l", stdout=subprocess.PIPE, shell=True)
    print ('Logins:'+result.stdout.decode('UTF-8'), file=sys.stdout)
    return (int(result.stdout.decode('UTF-8')))

def check_if_InUse():
    #Checks if a live stream or a previosuly recorded program is being served at this moment. If yes, non zero value is returned
    InUse=1
    connection = pymysql.connect(host=$host,
                             user=$username,
                             password=$password,
                             db=$db,
                             charset='utf8mb4',
                             cursorclass=pymysql.cursors.DictCursor)

    try:
        with connection.cursor() as cursor:
            # Read a single record
            sql = "select count(*) from inuseprograms where recusage !='jobqueue' and recusage !='flagger'"
            cursor.execute(sql)
            result = cursor.fetchone()
            InUse = result["count(*)"]
    finally:
        connection.close()
    print ("Count: "+str(InUse), file=sys.stdout)
    return InUse

def check_live_5min():
    #Checks if there were any live streams served in last 5 minutes
    RecInUse_5min=1
    connection = pymysql.connect(host=$host,
                             user=$username,
                             password=$password,
                             db=$db,
                             charset='utf8mb4',
                             cursorclass=pymysql.cursors.DictCursor)

    try:
        with connection.cursor() as cursor:
            # Read a single record
            sql = "select max(starttime) from recordedseek"
            cursor.execute(sql)
            result = cursor.fetchone()
            print ('Recent: ', result['max(starttime)'], file=sys.stdout)
            print ('Current: ',datetime.utcnow(), file=sys.stdout)
            if datetime.utcnow()-result['max(starttime)']>=timedelta(minutes=5):
                RecInUse_5min =0
    finally:
        connection.close()
    return RecInUse_5min

def get_next_rec():
    #Returns a tuple indicating if there is any scheduled recording if yes, how far into the future
    retdata = (True, timedelta(minutes=1))
    connection = pymysql.connect(host=$host,
                             user=$username,
                             password=$password,
                             db=$db,
                             charset='utf8mb4',
                             cursorclass=pymysql.cursors.DictCursor)

    try:
        with connection.cursor() as cursor:
            # Read a single record
            sql = "select MIN(next_record) from record where recordid!=1 and next_record IS NOT NULL;"
            cursor.execute(sql)
            result = cursor.fetchone()
            if result['MIN(next_record)'] is None: #no scheduled recordings
                retdata= (False,timedelta(minutes=1))
            else:
                retdata= (True,result['MIN(next_record)']-datetime.utcnow())
    finally:
       connection.close()
    return retdata

if check_Logins()==0:
    print ('First check passed', file=sys.stdout)

    if check_if_InUse() == 0:
        print ('Second check passed', file=sys.stdout)
        time.sleep(5*60)

        if check_if_InUse() == 0:
            print ('Third check passed', file=sys.stdout)
            if check_live_5min()==0:
                print ('Fourth check passed', file=sys.stdout)
                (valid,upcoming) = get_next_rec()

                # Clear any previously set wakeup time
                result = subprocess.run('echo 0 > /sys/class/rtc/rtc0/wakealarm',stdout=subprocess.PIPE,shell=True)
                print ('Clear:'+result.stdout.decode('UTF-8'), file=sys.stdout)

                if valid is True:
                    # Generate wakeup time string
                    upcoming = upcoming - timedelta(minutes=3)
                    wakeup_string="'+"+str(upcoming.days)+" days + "+str(max([int(upcoming.seconds/60)-3,0]))+" minutes'"
                    print ('Setting for '+wakeup_string, file=sys.stdout)
                    wakeup_command="echo `date '+%s' -d " +wakeup_string+ "` > /sys/class/rtc/rtc0/wakealarm"
                    #Setup wakeup time
                    result = subprocess.run(wakeup_command,stderr=subprocess.PIPE, shell=True)
                    print ('Set:'+result.stderr.decode('UTF-8'), file=sys.stdout)
                    #Check if alarm is set. It should show the unix time stamp
                    result= subprocess.run('cat /sys/class/rtc/rtc0/wakealarm', stdout=subprocess.PIPE, shell=True)
                    print ('Check:'+result.stdout.decode('UTF-8'), file=sys.stdout)

                print ('Shutting down', file=sys.stdout)
                subprocess.Popen(['/sbin/shutdown', '-h', 'now'])


You will have to answer "yes" to the question Are you sure you want to continue connecting (yes/no/[fingerprint])? that ssh asks.


Shows "unable to locate package unzip" error

Type sudo apt-get update to get the lists updated.

If its the first time you are running this command, it would download something like 20 MB of data.

Then type sudo apt-get upgrade to install the updates, if you want.

You can avoid this step, if you want to install updates later.

After first step finishes successfully, you should be able to install the package unzip by typing sudo apt-get install unzip.


Cannot install Matlab 2016b to Ubuntu 16.04

The message means that you have to be currently located in your home folder, and then execute the install script to start the installation process.

To do that, just open terminal, and then execute the install script from there by using the full path to the install script.

./path/to/installscript

which can be

./home/<your username>/Downloads/R2016b_glnxa64_dvd1/install


Is it worth upgrading from 12.04 LTS to 13.04

You can always download 13.04 iso image and try the live environment and see if you like it. There is no objective answer I suppose.

Of course you should certainly upgrade before the support ends and for 12.04 it means before April 2017. One reason to upgrade would be that as Ubuntu is coming to phones and tablets it must become more resource efficient. As people claim 13.04 delivers notable improvements in that sense. That means, it is likely to do the same tasks faster.

On the other hand, if your not an enthusiast who just enjoys new things and don't care if they don't work then it makes sense to wait before moving to new release. After first few months there is hope that most critical bugs have been revealed and fixed.

I am using 12.04 myself and really wondering whether it is worth the trouble of upgrading to 13.04. Even if you use the release upgrade feature it makes sense to make backups as things might go wrong (as you can read from various questions here) and the whole process takes time and effort. So maybe wait for 14.04 and upgrade next summer.

On the other hand if your current system has any chronic problems you might want to try if those have been fixed in the newer release.

EDIT: I upgraded to 13.04 and yes it is faster as everybody have been telling me.


It is not possible to run a vb script through Ubuntu. There are however some alternatives

Try installing Internet Explorer in wine

Download Internet Explorer and save it to your home directory

Open a terminal and type:

wine IE8-WindowsXP-x86-ENU.exe

try running your script through IE

Install a Windows (through virtualbox for example)

1) Install Oracle VM VirtualBox.

2) Extract an ISO image from a Windows XP CD you have, IMGburn and k3b have this functionality.

3) Click the New button (the first of the four below the menu).

4) Use the Wizard to create a virtual partition for Windows XP. Windows XP is the default OS selected, so all you have to do is name it. (Windows XP, for example, is a good name).

5) Choose the amount of RAM to be allocated to this OS (when it's in use). Don't allocate too much because there will be less RAM for your host system to run, which will crash your entire system.

6) Create a new hard disk since you probably don't have one already. Click Next to Continue. You will be taken through the Create New Virtual Disk wizard, which will allow you to choose hard disk size, dynamically expanding/fixed size, etc.

7) Review the summary it provides at the end and verify the information is correct. After that, the new Virtual Machine will be created.

8) Mount the ISO image by clicking on the Settings button. Click the Storage section on the left hand side of the window. Click on the Empty CD medium in the Storage Tree.

9) Open the Virtual Media Manager, depicted with an icon like a folder with an up arrow, next to CD/DVD Device under Attributes.

10) Add the disk image file by clicking Add, then choosing the location of the Windows XP ISO image. Select it with Select, then press OK in the Settings Window. Launch the VirtualBox by pressing Start.

11) Install Windows. You should have the Windows installer running now. Remember that since you have not yet install the Guest Additions, you will have to press your Host key (normally Right-Ctrl)

12) Install Guest Additions. While the machine is running, under the Devices menu, click Install Guest Additions, which will launch a setup wizard inside Windows XP. Now you will have OS mouse integration, so you won't have to press the host key to switch between your host and guest. You also can copy and paste between the two operating systems. Now that you have Windows XP installed, you can install programs you use.


Well thats because you changed the theme, try to change another theme. The icons sets are different from theme to theme.


Your laptop screen has adjusted to match the shape of the television.  Because its mirroring it has to do this or else it would look weird on the tv instead.  Since sometimes TVs are used for presentations or other business projects it matchs the TVs shape not the computer screen's.


sudo is denied access to change keyboard backlight?

Try

sudo su -

this will change you to root, and try it this way.
Sometimes I observed that this way I have more rights than simply with sudo


i suggest you installing as a seperate operating system.the easiest way to do that is using the wubi installer.just download wubi installer from the ubuntu website and install it you can choose any desktop ie. kde, xfce, unity etc and after installing you can use it as a seperate os, and if you want to delete the ubuntu just go to control panel from windows and uninstall wubi that's it.


You need permissions to open the file (read, and write if you want to edit). Then I would use vi/vim, or a more "user friendly" nano, followed by the name of your header file, to read its contents, assuming you are already inside /usr/local/include.


Bash for loop - how can I include blank newlines? (IFS)

You can't do this using the shell's field splitting.

Adjacent whitespace characters from IFS are parsed together, so you cannot use field splitting to distinguish between adjacent whitespace IFS characters. From the standard (Shell and Utilities, section 2.6.5):

  Each occurrence in the input of an IFS character that is not IFS white space, along with any adjacent IFS white space, shall delimit a field, as described previously.

That's just how it is.

Since this is a hypothetical question, and you haven't said what it is exactly that you're doing, I won't suggest another way.


Sharing folders between more than two computer

I think NFS is the best and most easy way to make it, you can learn more about NFS and have a trial of it.

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

https://help.ubuntu.com/12.04/serverguide/network-file-system.html


The easiest way is to simply type cd. Argumentless cd means cd will bring you to your home directory, which is also known as ~. This means cd ~ would also work, albeit with a couple more keystrokes.


How to add more languages docs to Devhelp? (Java etc)

cppreference.com provides an offline version of their site in devhelp form. They have it in a ppa here:
https://launchpad.net/~p12/+archive/ppa

it should install by way of:

sudo add-apt-repository ppa:p12/ppa
sudo apt-get update
sudo apt-get install cppreference-doc-en

For 14.04 You have to append -html which makes it

sudo apt-get install cppreference-doc-en-html


There's nothing wrong there. The command is just printing the UTC time for verification. Usually, in Ubuntu, the system clock is assumed to be in UTC and the timezone information is used to adjust the time w.r.t. UTC for applications. You don't need to worry about the UTC time.


Software center "install" button doesn't do anything

There seems to be a workaround. A similar bug was manifest in the update manager in 11.04, so I modified that command line. Instructions:

Launch the terminal with Ctrl+Alt+T
Paste (without quotes) "gksudo software-center & exit"
Press enter.
Enter your password.

Ironically, the workaround is a little more convenient after started, since you don't need to type your password repeatedly when installing multiple programs.


How to have similar sound quality in Banshee and Rhythmbox (or Totem)?

It happens that I was able to fix somehow this problem.

I ran gstreamer-properties and noticed that the default output plugin was set on "autodetect". I looked at the available plugins and closed the gstreamer-properties windows while "autodetect" was still chosen as the default output plugin. When I ran Banshee, the sound was then identical to the one produced by either Rhythmbox or Totem.

In order to try to reproduce and understand the previous problem, I successively chose, as default output plugins, ALSA, ESD and PulseAudio Sound Server. In all cases, the sound between the three applications was strictly identical.

Calling gstreamer-properties seems to have fix this problem.


MySQL active after every boot, but I only want it to start when I need it

systemctl disable mysql.service to disable service on boot.
Type systemctl start mysql.service when you need and systemctl stop mysql.service to stop.


Create a context menu item: Take Ownership of files/folders

Your (short) script seems not to do the job as a nautilus script, but here on Ubuntuforums, I found one that works quite nicely. It has some more advanced options, as described in the poster's comment on Ubuntuforums:

"Note: This is non-recursive by default, so it will only operate on the specific folder and files that you have selected. If you want recursive behavior - uncomment the "#RECURSIVE=-R;" line. It is left out be default since the risk of messing up ownerships is pretty big when something like this gets so easy. "

How to use

The script below is copied without a change. Paste it in an empty file and save it in ~/.local/share/nautilus/scripts (the script's comment mentions ~/.gnome2/nautilus-scripts, but that seems outdated) , make it executable, and after log out / in, it will be available in the context menu (under > scripts).

Note: you need gksu to be installed to use it

#!/bin/bash
#Title=Make owned by current user
#Title[se]=Gör nuvarande användare till ägare

# Make owned by current user - Makes the selected files owned by the current user with group
# being the user's primary group (the first in the output from the "groups" command)

# Installation:
# Put this script into the Nautilus script dir (~/.gnome2/nautilus-scripts) and make it executable.
#
# Usage:
# Right-click on files in Nautilus and choose Scripts -> Make owned by current user
#
# Notes:
# This operates non-recursively by default, so it will only operate on the specific folder and files that
# you have selected. If you want recursive behavior - uncomment the "#RECURSIVE=-R;" line further down.
# It is left out be default since the risk of messing up ownerships is pretty big when something
# like this gets so easy.
#
# Acknowledements and version history:
# v20080131 - Fredrik Wollsén
#
# License GPL v3
#
# Feel free to provide feedback on this script here:
# http://ubuntuforums.org/showthread.php?t=683945
#
# Suggestions for improvements:
#  - Show a zenity dialogue box to dynamically decide whether or not the command
#    should be run recursively or not.
#  - Show a zenity progress bar for the execution of the command.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

USER=`whoami`;
GROUP=`groups | sed -r 's/ .*//g'`;
#RECURSIVE=-R; # Uncomment this to make the ownerships be implemented resursively

# default to a group name identical to the username if a group is not found (is this case even possible? this if-statement could be totally useless - but: better safe than sorry...)
if [ "$GROUP" == "" ] ; then
GROUP=$USER;
fi

gksudo -- chown -v $RECURSIVE $USER:$GROUP "$@"| zenity --text-info --height=100 --width=300;

exit 0;


In larger context: what you want to do?

In answer to question: most probably you are missing directory /etc/xinetd.d. Try installing xinetd first (sudo apt-get install xinetd).


Unlimited Terminal Scrollback in Server Edition?

In my understanding, you cannot with framebuffer (memory allocation).

To begin with fundamentals... You cannot have unlimited scrollback in real world with real pc hardware (unless you figure out how to make unlimited ram or hard disk on your computer). Framebuffer reserves the memory for scrollback buffer so you cannot exeed the amount you specify. Also that size is wasted from your memory - no matter is your buffer full or empty. In desktop edition terminal, scrollback is limited by memory and swap, it is not unlimited.


I ran into this same problem when trying to get a login sound played in XFCE. What I did was create a user service (called xfce4-login-sound.service) and placed the file in $HOME/.config/systemd/user:
[Unit]
Description=XFCE4 login sound (with delay)

[Service]
ExecStartPre=/bin/sleep 3   # <--- this is the key, adjust delay as needed
Type=oneshot
ExecStart=/usr/bin/canberra-gtk-play -i desktop-login

[Install]
WantedBy=default.target

Afterwards, I enabled the service:
systemctl enable --now --user xfce4-login-sound.service


Use gpicview to scroll between all images in a directory using mouse or keyboard like arrows or pageup

Turns out the files didn't have the proper suffix.  Although GPicView would successfully open the jpeg's even though they didn't have a .jpg or .jpeg extension -- it wouldn't navigate through them.

adding the jpg suffix to all the files  solved the problem.

For example

for f in * ; do mv -v -- "$f" "$f".jpg ; done

or

rename 's/$/.jpg/' *


Which file is changed after I do "make menuconfig"?

In general, after a make menuconfig or make config, the .config file is changed. This file describes which options are choosen and will tell make and Makefile which file to compile and which options to activate.

As said by @Lekensteyn, the previous config file will be renamed in .config.old


How can I use OpenCV 3.0 without overwriting my current version of OpenCV (2.4.8) on Ubuntu?

You should be able to just put the OpenCV download into a directory, run cmake there and make it.  I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.


Changed from windows to ubuntu 18.04 - Hdd mount issues

re: "drives overwrite the changes on each other"

Using the sudo blkid and cat /etc/fstab commands, we see that /dev/sdc2 and /dev/sdd2 have the same UUID. You obviously cloned these disks, and that's why the mount problem.

Use these commands to reset the UUID on ONE of these partitions...

sudo uuidgen -r # generate random UUID

sudo tune2fs -U UUID_from_previous_command /dev/sdd2 # set new UUID

You can also use gparted to reset UUID's.

re: "Partition 1 does not start on physical sector boundary"

This can only be solved by rebuilding the disks from scratch, and making sure to select the "align to sector boundaries" when creating the partitions.


I solved the problem converting the file system from ext2 to ext4.

If you have the same problem, the first thing to do is discover what is your file system with sudo parted -l . If it is ext2 you should convert this to ext4. Review this question where you will find useful information related this procedure.

NOTE: You wont lose data converting your file system (if you do it well without problems..)


dell studio slim 540 not installing ubuntu 12.10

If you have another system or Operating System use the Ubuntu ISO and Unetbootin and use a pen drive to install Ubuntu

Step 1: Download UNetbootin

Grab the UNetbootin executable. Download for  (Windows version or Linux version what ever applicable for you) and save it on your desktop.

Step 2: Execute UNetbootin and Create your own portable Linux distribution

After installing UNetbootin, insert the USB flash drive into an empty USB port of your PC. (Note: This is important, because if you insert it after you’ve opened the UNetbootin application, you will not be able to use the USB stick.).

Now, double-click on the UNetbootin executable, to launch the UNetbootin application.

all you have to do now is to select your favorite Linux distribution ISO image file which you have already downloaded, double-check if the USB drive selected is the one which you want to make bootable and click on OK.

If you have not already downloaded a Linux distribution, then UNetbootin can download it for you and then go ahead with the process of creating the bootable USB stick. All you have to do is select the preferred distribution and then the version/edition, and click on OK to begin the process.

That’s it! After the process completes, reboot your machine and boot from the USB stick.


How to Upgrade Ubuntu core snappy from 15.04 to 16.04

I'm afraid there's no upgrade path from Snappy Ubuntu Core 15.04 to 16.04-- you'll need to reflash.


How can I know which application is asking me for my password?

I ended up using the apport-bug command to figure this out.

I ran apport-bug -w and then clicked on the dialog afterwards. This generated the following bug report which contains the path to the executable at /usr/bin/gnome-calendar.


Ok so sbt had errors since the build file had references to the system environemnt [system.getenv("JAVA_HOME")) in java and in sbt it was scala.sys.env("JAVA_HOME") and similarly to JAVAFX_HOME]

It is common to use JAVA_HOME system variable so this is added in linux by adding the location of java installation to the /etc/environment file. Mine was JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64". Remember to not use CLASSPATH in the environment file since it hinder the running of java files.

/etc/environment:

...
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
JAVAFX_HOME="/usr/share/java/openjfx"

Remember to reboot after setting new environment variables.

Also note that update-alternatives should be done both to java and javac. And the

java --version

does not work since in java 8 it is just

java -version

Also in sbt you can use this line to to add

 unmanagedJars in Compile += Attributed.blank(
   file(System.getenv("JAVA_HOME") + "/jre/lib/jfxrt.jar"))

to set current jfxrt (javaFX) file wherever that is (modify accordingly)


Firefox sluggish, printing error message

You can use the program dbus-launch to get around this issue. So before you start Firefox type export $(dbus-launch). Now you can start Firefox. However there might another error message appear. If yes you can work around with export NSS_USE_SHARED_DB=ENABLED. Now Firefox should start without error messages or warnings.

Can can put that alltogether in a shell script:

#!/bin/sh
export $(dbus-launch)
export NSS_USE_SHARED_DB=ENABLED
firefox &

If no dbus-launch is installed on your system, you should install the package dbus-x11. The program is part of this package.


Lost all my applets when I upgraded (to 13.10). How can I get them back?

Wow! I found out how to get my applet back. I will have to see what happens on next reload/reboot but the window is definitively here, only it is behind another window, consistently.

First, list all your windows in a console screen as in:

wmctrl -l

That gives you a list of windows as follow:

0x01c00003  0 halk Top Expanded Edge Panel
0x01c00015  0 halk Bottom Expanded Edge Panel
0x01800029  0 halk alexis@halk:2014 8
0x02400002  0 halk XdndCollectionWindowImp
0x02400005  0 halk unity-launcher
0x02200006  0 halk Desktop
0x02400008  0 halk unity-panel
0x0240000b  0 halk unity-dash
0x0240000c  0 halk Hud
0x04a000a0  0 halk upgrade - Lost all my applets last time I upgraded (to 13.10). How can I get them back? - Ask Ubuntu - SeaMonkey
0x04600055  0 halk Inbox - alexis@m2osw.com - Shredder

As we can see, wmctrl command shows the name of each window. Part of the list we see: unity-panel and Top Expanded Edge Panel. If you use the -G option as well:

wmctrl -l -G

You see the positions too (Geometry):

0x01c00003  0 0    0    1920 24   halk Top Expanded Edge Panel
0x02400008  0 0    0    1920 24   halk unity-panel

And as you can see those two windows are positioned at exactly the same coordinates: (0, 0), and have the exact same size (1920, 24).

The Top Expanded Edge Panel is the one we want above. The unity-panel is the one obstructing our panel applets.

wmctrl -i -r 0x01c00003 -b add,above

I use the -r option with the XID and not the window title because wmctrl has problems with window names. (see Why wmctrl doesn't work for certain windows?)

If you make a mistake and use the wrong XID, you can remove the above property using:

wmctrl -i -r 0x01C00003 -b remove,above

This may not be a permanent solution, but it works. All I'll have to do is run a script that finds the window and raise it. The problem probably comes from the order in which things are created when starting X-Windows.

There is a script one can use to specifically force the Top Expanded Edge Panel to the top:

#!/bin/sh
PANEL_XID=`wmctrl -l | awk '/Top Expanded Edge Panel/ { print $1 }'`
wmctrl -i -r $PANEL_XID -b add,above


Live Linux USB to boot on a MAC but made on a PC?

Just wanted to Post back with the answer to my own question.

It is quite possible.

Short answer: you need 2 things along with a windows OS installed on a comp.

Rufus rufus.akeo.ie
EFI Bootable Linux like Ubuntu 14.0 or higher http://www.ubuntu.com/download/desktop

Must be for 64 bit OS (amd64)
Choose GPT for the partition Scheme and FAT32 for the file system, in Rufus and create. This will work for MAC or for windows 8 computers like Surface Pro 1-3 (when modifying their boot order). Silly easy.

Long answer: a collection of information

It comes down to BIOS vs UEFI. (great link here https://wiki.manjaro.org/index.php?title=Some_basics_of_MBR_v/s_GPT_and_BIOS_v/s_UEFI)

BIOS, using MBR partitioning scheme, is obviously used on windows 7 and earlier pc's, along with some Linux OS's as well.

GPT (GUID Partition Table), using UEFI which replaces BIOS, is used for MAC computers along with Windows 8 computers like Surface, Surface PRO, and others.

At the end of the day, the LIVE USB that was created worked on both Win8 and MAC computers as the partition scheme was the same. A second USB would be needed to live boot with computers that use MBR/BIOS.

Thanks to LiveWireBT for an answer. If only I'd checked it earlier it may have saved me all the research time!

And thanks all for letting me post here!


Problem with Super + Grave global shortcut

This is easy to fix. You need to get the Gnome Tweak Tool and navigate to the keyboard settings. On Cinnamon, you can do the same by opening  Settings->keyboard->Layouts->Options. You should see something like this:

Open the "Alt/Win key behavior" and change it from "Default" to "Hyper is mapped to Win":

That should solve the issue.


No network connection but nameserver ok, no firewall

Try this:

# stop network manager
sudo /etc/init.d/NetworkManager stop
# if on a cable connection, re-run with dhcp
sudo ip link set dev eth0 down
sudo dhclient eth0
# try to ping via ip first
ping 8.8.8.8

(Update after ifconfig output)

Currently you use wlan, just to make sure plug in a caple and re-check with eth0 and DHCP. There must be a default route to the gateway as was noted in a comment, e.g.

 sudo ip route add default via 192.168.178.1


Safely remove folders that only Windows uses

Feel free to delete all the folders you mentioned. Ubuntu does not use them, and instead uses its own recycle folder called ./Trash
Edit 1: Expect Microsoft Windows to re-create the recycler-related folders the next time you connect the drive to a windows machine.
Also, the found.000 folder indicates your hard drive had a problem reading data in the past, which Microsoft scandisk caught and tried to recover. If the data on the drive is important to you, please ensure you have a current backup of that drive.
Thanks to brunopereira81 for mentioning the source of the found.000 folder.
Hope that helps


Apt's "not installable" means that the package with that name does not exist.  Since these are standard Ubuntu packages in 16.04 and above, it indicates your repositories are not up to date or you have excluded some essential repositories in your Apt sources, or you are trying to install a version of phpmyadmin intended for 16.04 or later onto an older Ubuntu.


With a machine that new, a 64 bit OS is the right choice for almost all users.

Since you are planning on installing Ubuntu on your laptop, the desktop version is the way to go. That will give you a desktop environment to get started with. While most servers don't use graphical programs, for someone new to Linux an OS with only a command line can be very intimidating.

I'd recommend Ubuntu 12.04 for your laptop, since that version is known to work with very little problems. Also, if you should later decide to try the latest version, it's only an upgrade away, no need to reinstall Ubuntu.


Elantech touchpad stopped working after restart

I found the solution! I found it here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/667707 and a workaround from comment #3 worked.

sudo rmmod psmouse
sudo insmod /lib/modules/`uname -r`/kernel/drivers/input/mouse/psmouse.ko


Disk errors when booting, system doesn't run properly after disk check

Use a Live CD/DVD to boot into. While doing that use "Disk Utility" and repair the errors.

This cannot be done on a system while having the disk mounted.

http://www.ubuntubuzz.com/2010/06/ubuntu-1004-disk-utility-tools_28.html

the reference above is for 10.04 but is relevant for 11.04


What is the convenient way to take a screenshot and share it to Google+?

You may be able to cobble together an API plug-in for shutter using the Google Plus API info.

To fix the unable to locate on nanoshot, you'll need to add the nanoshot ppa.

sudo add-apt-repository ppa:nanoshot/ppa
sudo apt-get update
sudo apt-get install nanoshot

More information on the installation procedures can be found on the nanoshot page


Process: 11481 ExecStart=/sbin/afsd $AFSD_ARGS (code=exited, status=1/FAILURE)

I looked at.

dpkg: error processing package openafs-client (--configure):
 installed openafs-client package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 openafs-client

Checking out related answers to.

dpkg: error processing package openafs-client

Led me to.

sudo apt remove openafs-client

Then updated and upgraded.

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

On the Konsole I was prompted with.

The following packages were automatically installed and are no longer required:
  dkms openafs-modules-dkms
Use 'sudo apt autoremove' to remove them.


How to install games (.sh and .bin games)?

ok then , it is  about your OS bit size(32bit or 64bit) you can try :
sudo apt-get install ia32-libs
and then try installing again.if any problem report us please...


Use a program called screen.

Install it on the server and run screen and any program that runs will remain active on the server.

To install it run

sudo apt-get install screen

More details about other commands here http://www.kuro5hin.org/story/2004/3/9/16838/14935


That is not possible since the introduction of Unity in Ubuntu.

Resizing the top panel is a Gnome feature and not part of Unity. Related: https://unix.stackexchange.com/questions/40415/how-do-i-resize-gnome-shell-top-bar


Does Dell XPS 13 Ubuntu Edition come with drivers for fingerprint sensor and webcam drivers?

The Dell XPS 13 2-in-1 7390 webcam is different hardware than on the developer edition xps 13 7390. Dell supports Ubuntu on the developer edition and the webcam works fine on that laptop.
Currently, the 2-in-1 webcam is NOT supported. See more information on the following links:
https://wiki.archlinux.org/index.php/Dell_XPS_13_2-in-1_(7390)
https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1
https://wiki.gentoo.org/wiki/Dell_XPS_13_2-in-1_(7390)


Files unavailable although drive is mounted on boot

OP's own answer edited out of the question:

  Solved. The problem was that the drive was ready to mount and not
  actually mounted. So I wrote this on startup:

sudo mount -t ntfs /dev/sbb3 /media/MyStorage

  where /dev/sbb3 is the partition to mount and /media/Mystorage is
  the place to mount it.


The screen flickering is back on the 2nd boot and boot time is longer after updating grub. Why?

For few weeks, I read just about every post on screen flickering and whenever possible tried the suggested solution or suggestion. Nothing worked. However, when I run systemd-analyze time, I was getting normal boot times. The only problem was the consistent delay of more than 2 minutes in getting to the desktop.
So I decided to test the monitor by itself and not connected to the same power bar as the pc. When I did that, I saw the flickering of the screen before I turned on the computer. And the flickering would stop after about one minute and half to 2 mn. This told me that my monitor was basically coming to the end of its useful life.
I should have started the debugging of the screen flickering by testing the monitor itself, I would have avoided a lot of frustration.


How to install R version 3.2.1 – collect2: error: ld returned 1 exit status

For a full list of steps to install a version from source, skip the following lines and read on with Install from source

To install/remove the GNU R statistical computation and graphics system you need the package r-base.

Therefore

sudo apt-get install r-base

or

sudo apt-get purge r-base

To install/remove the GNU R collection of recommended packages  you need r-recommended

sudo apt-get install r-recommended

or

sudo apt-get install r-recommended

Install from source

The version 3.2.1 is in the Wily Universe repositories.

To install the version 3.2.1 on older Ubuntu versions, you have to compile the packages for yourself

Download and extract

cd
wget https://cran.r-project.org/src/base/R-3/R-3.2.1.tar.gz
sudo apt-get install tcl tcl-dev tk-dev tk
tar xf R-3.2.1.tar.gz
cd R-3.2.1

Create a Makefile with configure and enable shared libraries (--enable-R-shlib) and Tcl/TK-support (--with-tcltk)

./configure --prefix=/usr/local --enable-R-shlib --with-tcltk

or simply with (without shared libraries)

./configure

And start the build process

make

After that, install. I prefer the installation with checkinstall, to create and install a deb package

sudo apt-get install checkinstall
sudo checkinstall

But you could also use the standard way

sudo make install

And now, you have version 3.2.1 installed

 % /usr/local/bin/R

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Install RStudio Desktop

Download the latest version here, e.g.

wget https://download1.rstudio.org/rstudio-0.99.467-amd64.deb

Install via

sudo dpkg -i rstudio-0.99.467-amd64.deb

Check the install output and install missing packages, e.g. in my case

sudo apt install libjpeg62

Start RStudio via Unity Dash or GNOME Activities or via command line

/usr/lib/rstudio/bin/rstudio


Your graphics card is no longer officialy supported. You have these options:

a) Use 12.04 with fglrx (precise x and kernel stack)

b) Use 12.10 with OSS drivers

c) Use PPA for 12.10 that enables fglrx installation to 12.10 with old AMD graphics

If you'll choose option c, follow this:

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy
sudo reboot

AMD decided to put all its graphics cards without DirectX11 support to "Legacy" state. This means they aren't going to add support for new xserver and linux kernel versions. PPA mentioned above installs git version of xserver, which is fully compatible with legacy fglrx and patched fglrx for compatibility with Quantal Linux kernel.


You are using the free radeon-driver for your graphics, which has a bad 3d performance, therefor the games are not running, you need to install the fglrx-driver to play 3d-games.
Take a look at:

https://help.ubuntu.com/community/BinaryDriverHowto/ATI


Did you try to use ufw on the host machine?
You could do for example

sudo ufw deny proto tcp from 10.0.0.1 to any port 25

This should disallow tcp from 10.0.0.1 to any IP address on port 25.

You can find more examples here: How to deny an ip address from connecting to my system?