Unable to ssh to raspberry pi with ubuntu from chrome book

You are trying to connect to localhost on another PC doing like this and not to the raspberry.

If I'm using a PC which has let's say IP 192.168.1.10, using localhost will actually point at your local address.

Now what you're trying to do is access a device outside your local address and for doing that you need to use the target device IP.

ssh pi@ip-of-raspberry

E.g. (assuming your raspberry has ip 192.168.1.30)

ssh pi@192.168.1.30

Both devices should be on the same LAN or under the same VPN (If you're using it)

Also Ubuntu 16.04 uses systemctl, if you want to know the status of ssh:

systemctl status ssh


Anybody having problems with 13.10 updated software and nvidia drivers?

had a sort of similar issue.

I am using ubuntu-x-swat ppa (ppa:ubuntu-x-swat/x-updates)
after update to nividia_331, nvidia was not loading on boot
using sudo modprobe nvidia_331, and then sudo service lightdm start would get everything working (get me into the GUI)
adding nvidia_331 to /etc/modules solved this, but I am not sure if that is the proper way to do it or not


Will be something deleted if I upgrade from Ubuntu 12.10 to 13.04?

Nothing except for system files should be deleted or modified. Some programs might not be updated (due to the package manager disabling 3rd party repositories), but you shouldn't have any other issues.


I sugest you to generate here a new sources.list file and replace with your /etc/apt/sources.list that obviously have something wrong inside ("The list of sources could not be read").

See here how to replace sources.list with the new one.

More help: https://help.ubuntu.com/community/Repositories/CommandLine.


Upgrade two computers on the same WIFI network from 12.04 to 12.10

Upgrade the first computer normally, then copy all of the .deb files that it downloaded to an external drive:

cp -v /var/cache/apt/archives/*.deb /media/pendrive

Next copy all of the .deb file onto the same directory on the second computer:

sudo cp -v /media/pendrive/*.deb /var/cache/apt/archives/

Then upgrade the second computer.  Of course, change /media/pendrive/ to the correct path for your deb backup device.

This way, the update will happen on the second computer but it will be able to re-use the .deb files that have already been downloaded without downloading them again.  Both computers must be the same release - either 32 or 64 bit.

You can also use this technique to update both systems normally.  Set one to update automatically if you wish, and the other one to not check for updates automatically.  Periodically copy the updated .deb files to the second computer and run the update.  If you keep this library of .deb files then you can also use it after installing a new machine to make the first update very quick - do not let the system do the updates during installation and instead do it manually after installation.

I actually use scripts to maintain the .deb file backups, restore them, and even copy them to a new system while it is being installed.  Using cp with the -n switch it doesn't try to copy over items that are already there and is very easy to use and maintain.  Here's the one I use to upload the .deb files to the pendrive.  Note that the pendrive should have a volume name so that it's mountpoint is always /media/yourname - the script will accept the volume name as an argument eg

debupdate yourname

The script can also keep separate backups for different releases without getting confused - it stores the archives under /media/yourname/archives/kernel  where kernel is the major release level (ignoring the -xx extensions).  If you're worried about the .deb files being deleted you could run this several times during the update, or maybe automate it to do so.

Here's the script:

#! /bin/bash
#copy the contents of the working archives to the given device
#No files will be overwritten (existing will be skipped)
#
args=("$@")
rel="$(uname -r)"
release="${rel:0:6}"
#
# For releases with single digit third series, truncate the '-'
if [ "${rel:5:1}" == "-" ]; then
release="${rel:0:5}"
fi
##############
#
echo
echo "Kernel release level is "$release
#
#
#
if [ -z ${args[0]} ]; then
    echo "You must pass the volume name of target"
else
    if [ ! -d "/media/${args[0]}" ]; then
     echo "Backup device ${args[0]} not found"
     exit 1
    else
     mkdir -p /media/${args[0]}/archives/$release/
     cp -nv /var/cache/apt/archives/*.deb /media/${args[0]}/archives/$release/
    fi
fi


How to a show the disc usage by directory in my home directory using the Terminal?

For use as screen based terminal program (curses/ncurses etc):

See ncdu - example output:

ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help
--- /usr/share/icons -----------------------------------------------------------
  189.2MiB [##########] /oxygen
  169.3MiB [########  ] /hicolor
  130.2MiB [######    ] /HighContrast
  123.9MiB [######    ] /gnome
   74.0MiB [###       ] /nuvola
   57.9MiB [###       ] /Faience
   46.5MiB [##        ] /Breathe
   46.1MiB [##        ] /Faenza-Blue-Dark2
   43.2MiB [##        ] /AwOken
   40.1MiB [##        ] /elementary-xfce
   31.9MiB [#         ] /AwOkenDark
   26.4MiB [#         ] /elementary
 Total disk usage:   1.7GiB  Apparent size:   1.4GiB  Items: 308833

For use on terminal in line-by-line text mode:

To show sorted sizes of subdirectories and files in the current directory:
(For not showing files, see below)

Run this in the directory containing the directories you want to measure,
$HOME in your example:

du -sch .* * | sort -hr | less

Or, just the same command in the more verbose long option form:

du --summarize --total --human-readable .* *  | sort --human-numeric-sort --reverse | less

This shows the

du - disk usage inside the current directory,
-s (--summarize) - showing a per item total value,
-c (--total) - and a global total value as sum of all per item values,
-h (--human-readable) - showing sizes as 6.8G, 4.0K, 5M etc, instead of byte counts,
.* - listing files and directories named with dot as first character,
* - and all other files and directories,
| sort -hr - sort the result, handling the human readable file sizes, in reverse order,
| less - and show the resulting list in a pager, largest on top.

Note: depending on the shell used, and it's options, using .* in a directory where no filenames starting with . exist may cause an error. In that case, the .* is redundant and can be left out (And that's what the error was trying to tell you)

Examples of output lines, in original sort order:

39G     total
7.7G    Downloads
6.8G    .local
3.4G    .mozilla
2.6G    .thunderbird
1.6G    dev
1.4G    .cache
490M    work
7.3M    AnInterestingPaper.pdf
60K     .bazaar
8.0K    .gitconfig
4.0K    .tigrc

For an exact answer of the question, the files need to be left out from the list.
It makes the list much more readable usualy, so it's worth to do; Just not when manually typing the command in a shell, as it get's  a bit long. So, for use in a script etc:

Use find to list only directories (do not use the common syntax find . -foo for the directory argument to prevent a ./ prefix on the file names in the result list):

find .* * -maxdepth 0 -type d -print0 | du --files0-from=- -sch | sort -hr | less

For use with the graphical desktop (not the terminal as asked):
(Was not asked for, but adding a short hint on good GUI tools for the task for completenes.)

See gdmap and filelight (or baobab). Both provide very interesting diagrams, and to get the best intuitive view it is worth a try to combine gdmap with one of the other two.


The packages which are held back are related to the kernel and won't be upgraded with the apt-get upgrade command. To upgrade these you should use:

sudo apt-get dist-upgrade


Dell Latitude 3340 Twitching mouse cursor when using touchpad or just resting 1 finger on touchpad!

Touchpad driver problem? I had a problem with my touchpad on a Dell Latitude 3340 with Ubuntu 12.04 preinstalled by Dell. My touchpad was not recognized as a touchpad. Funny that Dell sells stuff that are supposed to work out of the box, but they don't.

After a lot of searching, trial and error I got it fixed with these instructions:

http://ubuntuforums.org/archive/index.php/t-2102346.html

Look at mikesmithv suggestion (7th answer from bottom up).

My touchpad works and is recognized as a touchpad.


This seems to be a working version of the command that works in both old and new sfdisk versions.

# p1 74MB FAT
# p2 Remainder Linux
sfdisk -u S -L $CARD_DEV << EOF
63,144522,0x0C,*
160650,,,-
EOF

"-u S" sets the units to sectors which is default in the new version but required to be set in old version

"-L" keeps the old version from erroring out when creating the partitions.

source: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/509510


Does 'Unredirect fullscreen Windows' option in compiz improve performance for video playback?

This option causes drawing to occur directly on the screen rather than drawing off-screen and then copying the drawn content back onto the screen.

Thus, yes it can dramatically improve graphical performance.

However there can be a draw-back - on some graphics cards/monitors - using this option can result in dramatic flickering.  Particularly - this flickering effect can occur on full-screen apps.

Thus - its work experimenting, but if you see flickering, its best not to use.

Remember using CCSM can break your desktop.

If you want to toggle this value, you can use:

gconftool-2 --set /apps/compizconfig-1/profiles/Default/plugins/composite/screen0/options/unredirect_fullscreen_windows --type bool 0

Change 0 for 1 to switch this option back-on.


always show notifications in activity overview (gnome shell 3.10)

It seems the only way to always see notifications in Activities overview with GNOME 3.10 is by writing an extension or patching GNOME Shell.
There is a bug registered in GNOME bugzilla about this problem "Message Tray isn't easily discoverable (isn't shown in Activities Overview)", see:
https://bugzilla.gnome.org/show_bug.cgi?id=719649

Also I've found another old bugreport, related to this problem:
https://bugzilla.gnome.org/show_bug.cgi?id=641723

Also I've found one extension which helps access messaging tray in GNOME Shell:
https://extensions.gnome.org/extension/634/tray-pressure-visualizer/

Currently only high mouse pressure activates notification area/messaging tray. Low pressure does nothing. Pressure is defined by the number of pixels past the edge of the screen. If pressure is set to 250px, you need to move your mouse 250px past the edge to activate it. This setting can be tweaked in /usr/share/gnome-shell/js/ui/layout.js:

// The message tray takes this much pressure
// in the pressure barrier at once to release it.
const MESSAGE_TRAY_PRESSURE_THRESHOLD = 250; // pixels
const MESSAGE_TRAY_PRESSURE_TIMEOUT = 1000; // ms

For example, to have the message tray appear instantaneously set MESSAGE_TRAY_PRESSURE_THRESHOLD to 0.


Can i use a partition formatted as NTFS (HDD) for my data and install Ubuntu on SSD?

Yes, you can use a NTFS partition to store data and expect it to be problem free.
However, if you want put anything on a NTFS formatted volume that needs proper permissions or ownership to work properly, NTFS does not understand these concepts as they pertain to UNIX (which includes Ubuntu).


It also happened to me when I tried to open Devices section.

Someone pointed out that you can reset the last panel using a terminal:

gsettings set org.gnome.ControlCenter last-panel ''

It does not solve the Devices section issue.


Firefox & Thunderbird 2020 how to restore menu in the system default style: in menu bar or in window's title bar? (Unity)

I found this answer for Thunderbird 60, but it worked for me in 68. This may not provide all the flexibility you're after, but it will at least put the menu inside the title bar, which frees up some space.

To disable the title bar at Thunderbird 60, you need to go to system
menu Edit -> Preferences and choose Advanced tab. Then click at Config
Editor at page left bottom corner, open it and look for
mail.tabs.drawInTitlebar. Double clik on it and your bird should be
titleless.


Unity Launcher Hotkeys doesn't launch a new instance of my application

Super+1, Super+2… just have a similar effect than clicking on the icon with the mouse.
This mean that it will focus the current application if aready started, or launch application not started.

You can force starting a new instance of the application with Super + Shift +

See What are Unity's keyboard and mouse shortcuts?


what does -alt |more command do in ubuntu

I believe you have missed part of the command.

ls -alt | more

http://linuxcommand.org/man_pages/ls1.html

-a   : do not hide entries starting with .
-l   : use a long listing format.
-t   : sort by modification time.
|    : pipe the result to the next part of the command.
more : present the result one page at a time.


Why ubuntu software updaes are significantly larger than windows and android?

It appears that on some platforms, notoriously large software is updated incrementally. It makes sense: Internet browsers are huge, they update frequently, but the binary difference may not be that big.
https://wiki.mozilla.org/UpdateGeneration
The advantage of this is saved bandwidth, but the cost is generating the binary diff between versions on the server side. And if a user skipped one or more updates, either each of the diffs from one older version to the next must still be kept on the server, or that user will get the full package anyway, in which case there is no advantage over simply always copying the big full package. So the server needs to keep at least two versions of each package available: The latest diff and the full package. In practice, it will probably be even more.
Linux package managers work differently: Not only do they generally always transfer the whole new package, not just the diff. They also allow for scripts to be executed during the process:

a pre-install script before the package is installed
a post-install script after the package is installed
a pre-uninstall script before the package is uninstalled (removed)
a post-uninstall script after the package is uninstalled

This can be used for example to convert existing databases from an older format to a newer one or to collect information from the running system (e.g. hardware information) and store it in that package's configuration database; or to safely remove any of those when a package is finally uninstalled.
Upgrading to a newer package version means uninstalling the old version and installing the new version; so in that case, all four of those scripts (if the package defines them) are executed.
But in the case of incremental upgrades, that is getting more complicated: There is no more clean uninstalling of the old package so that all the old files are removed; they have to be kept so the incoming binary diff can be applied. So any of those scripts can no longer rely on any of those files being there or not being there; they have to cope with a lot more scenarios.
It gets worse with the current trend of packing everything into snaps or flatpaks: In that case, you don't only get the new package, but everything around it; basically the better part of the underlying operating system, at least all the used libraries (direct and indirect dependencies).
I don't know if those all-inclusive package formats can handle incremental upgrades; if not, it would probably be worthwhile to think about that.


Will Ubuntu use lzm2 or xz compression to save space on the CD?

Some packages are already compressed using xz, and there is increasing support for this in the tools.  While this improves the space situation for the alternate images, live and preinstalled images are distributed with the packages unpacked, and so do not benefit from this.

Live images are unlikely to be converted to use xz anytime soon, as the current squashfs-lzma breaks rsync/zsync, significantly raising the bandwidth requirements for mirroring the image archives.  If this is confirmed as fixed, there is likely great interest in switching, as there is never enough space for everything desired on a CD.

Preinstall images are unlikely to be converted to use xz in the short term, due to relative unfamiliarity and a desire to support a wide range of intermediate environments used to convert the distributed image to an on-disc format.


Shut down time is too long for around ten minutes

Step 1:
Open your Terminal window and enter the below command.

gksudo gedit /etc/init/network-manager.conf

Once the configuration file is opened, copy and paste the below code, below the existing ‘stop on stopping dbus’.

kill timeout 1

Step 2:
       I do not think the below step is necessary, but you can do the same to the ‘modem-manager’, just in case. For that, enter the below command.

gksudo gedit /etc/init/modemmanager.conf

Then look for the existing ‘stop on stopped network-manage’ text line, and simply paste the below code just below it.

kill timeout 1

Update:

sudo apt-get autoremove modemmanager

sudo rm /etc/init/modemmanager.conf

sudo apt-get install modemmanager

cheers.................


How can I share my clipboard between two X servers?

I came up with a solution that seems to work pretty well.  I'm not sure if there's a better way, but I wrote a script that starts my VM and then monitors the clipboard on display :0 for changes.  When a change is detected, it copies the clipboard contents to display :1.  It does this bidirectionally, so I can copy and paste from the VM just fine too.

Here's the script:

#!/bin/bash

virtualbox --startvm "Windows 7" --fullscreen &
waitpid=$!

watch_clip() {
  local curr="" prev="" from=$1 to=:0

  # On first run, we need to copy from :0 to :1 but not vice versa
  if [[ "$from" == ":0" ]]; then
    xclip -o -selection clipboard -d :0 2> /dev/null | xclip -selection clipboard -d :1
    to=:1
  fi

  while true; do
    # Get the current clipboard contents
    curr=`xclip -o -selection clipboard -d $from 2> /dev/null`

    # Compare to previous results and copy if it's changed
    if [[ "$curr" != "$prev" ]]; then
      echo "$curr" | xclip -selection clipboard -d $to
    fi

    prev="$curr"
    sleep 0.5
  done
}

watch_clip :0 &
watch_clip :1 &
wait $waitpid

Then all that's needed is the command to start the second X session:

startx ./.startwin7 -- :1

I haven't noticed any issues, but if anyone can think of a better way I'd definitely appreciate the input.


Netbeans 8.2 throws 'Unexpected exception' after launching on Ubuntu 18.04

Ok,

Seems like I was being an unmitigated fool.

The problem was I had installed the wrong version of openjdk. I had installed openjdk 11 while the Netbeans 8.2 required openjdk 8.

So I uninstalled the whole openjdk package from the system

'sudo apt remove - - purge openjdk*'

Then installed openjdk 8 by issuing

'sudo apt install openjdk-8-jdk openjdk-8-jre'

Then Netbeans (obviously) started working like a well-oiled machine as usual.

Sorry for the trouble folks.


Can both appmenu-qt and appmenu-qt:i386 be installed at the same time?

I experienced the same problem and here is how I got it solved. Most probably it's not the best solution and you found a solution yourself but I'll post it anyways.

First I installed the 64 bit package and downloaded the i386 manually from here.

Then I opened the file with file-roler and extracted the /usr and copied it over. Now VirtualBox and Skype are both using global menu.


By default, the filename of the URL is used as the target filename. If redirection occurs, it is preferable to use the final filename. That can be accomplished with the --trust-server-names option of wget:

wget --trust-server-names http://example.com/file.php

From the manual page of wget:

  --trust-server-names
   If this is set to on, on a redirect the last component of the redirection
  URL will be used as the local file name.  By default it is used the last
  component in the original URL.

If the target filename is not what you intended, you can use the -O (long option: --output-document) option as in:

wget http://example.com/file.php -O meh.tar.gz


Linux/Unix doesn't necessarily rely on the extensions like windows does. In other words, a file may already be an executable program. For instance, let's use which command that finds the actual binary files for programs and commands, on something like gnome-terminal.

$ which gnome-terminal
/usr/bin/gnome-terminal

As you can see, there's no extension. As far as scripting goes, many users like to add .sh and .py or even .awk ( which i do a lot ), but that's mostly for convenience.

Now, if you have a program and you want to find its binary somewhere on the system, first thing you want to check is /bin and /usr/bin folder, on any Linux system.

There is however something similar to desktop shortcuts. In /usr/share/applications/ folder you can find tons of .desktop files. That's the second place I'd look into. Unless it's a program you've installed manually, not with Software Center or apt-get command, you can be 99% sure that there is a .desktop file for that program. Additionally , you can open those files with gedit or any text editor for that matter, and find Exec= line to see the actual path to the binary being executed.

So lets recap:

use which command if you know the full command to find where it is stored
check /usr/bin/ and /bin
check /usr/share/applications

Additional note: in order to have a script or a binary file run, it also must have permissions set to x (executable) for the owner of the file, group, and/or other users. For instance, I've made a script called whiletest.sh. Let's find it's permissions by mixing ls -l and which command

ls -l $(which whiletest.sh )
-rwxrwxr-x 1 xieerqi xieerqi 161 May 18 22:42 /home/xieerqi/bin/whiletest.sh

So as you can see, we have read-write-execute permissions for the owner(first 3), read-write-execute for the owner group (next 3 ), and read-execute but no write permissions for other users and groups. These executable permissions aren't given by default when you create a file. Initial permissions would be -rw-rw-r--, ie only read and write access for owner and group. To make any file executable, you'd need to run chmod 775 /path/to/file or chmod +x /path/to/file. Why two different ways ? You can think of the permissions in terms of binary numbers. So initial permissions -rw-rw-r-- can be read as 5 for owner (in binary 110, or read set, write set, execute reset), 5 for group, and 4  for others (binary 100, read set, others not set).

For more info on file permissions, you can check this tutorial from linux.com

Additional info about apt-get:  As requested in the comments, here's more info about apt-get . The apt-get command is used to install software through command line in terminal. This is what actually Software Center uses behind the scenes to install software.

Personally, I've not used Software Center in a long time, and mostly use apt-get like so:

Search for a desired program with apt-cache search. For instance, apt-cache search text editor. If the output is long (and typically it is), I pipe the output to the paging program called less, like so. apt-cache search text editor | less.
Install desired software with sudo apt-get install program-name. For example, sudo apt-get install emacs .
Remove undesirable programs with sudo apt-get remove program-name (to just remove a program) or sudo apt-get purge program-name (to wipe out every config file as well as the program itself) . For instance, sudo apt-get remove emacs.
Frequently when you install something, additional packages are installed because a program needs them, but once the program removed , they might not be needed anymore. You can use sudo apt-get autoremove and sudo apt-get autoclean
If you just want the source code of the program, run sudo apt-get source program-name. For instance, sudo apt-get source xterm

For more things that you can do, check out the man-page for apt-get


How to find owner and group of a directory?

You can do this:
1st way:

ls -l /path/to/file

*the third field in the ls -l output is the user and the fourth is the group

2nd way:

stat /path/to/file

$ stat py
  File: `py'
  Size: 32              Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d      Inode: 429064      Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/  razvan)   Gid: ( 1000/  razvan)
Access: 2012-07-27 17:49:05.682143441 +0300
Modify: 2012-07-01 03:58:02.848540175 +0300
Change: 2012-08-01 21:12:57.129819212 +0300

The razvan in the Uid field is the owner/user, the razvan in the Gid field is the group. 8-|

3rd way:
Get only the user and group with stat:

stat -c "%U %G" /path/to/file


Remote Shutdown Ubuntu on Lan Using a Mac AppleScript

If you are going to try to do this all via apple script, then “cats” comment seems on point: you need an Apple forum.
But it seems to me that your real problem is how to avoid being challenged for passwords.  And ssh-copy-id was invented precisely for that purpose.  If you are willing to give it a go...
On the target Ubuntu host:
Create a dedicated user for this purpose
sudo adduser --force-badname SandMan
Next, edit /etc/sudoers to allow SandMan to execute "sudo /sbin/shutdown ..." unchallenged.
sudo visudo
(This opens "nano" as the editor by default - you'll have to muddle through on your own; I change all mine over to vi.)  Insert the following before the includedir directive at the end:
%SandMan ALL=NOPASSWD: /sbin/shutdown
Save the file
You should now be able to log into your host using the SandMan user and execute sudo /sbin/shutdown --help without being challenged for the password.
To allow you to execute the shutdown directly from your MACs terminal window try (from your MAC terminal):
ssh-keygen -t rsa -b 2048 -f ~/.ssh/SandMan_rsa
ssh-copy-id -i ~/.ssh/SandMan_rsa SandMan@12.34.56.78

This is good syntax for Ubuntu 20.04, but I am unsure this will work on the MAC without tweaking.  But if it does work, you should then be able to shut down your target from the MAC terminal with:
ssh -i ~/.ssh/SandMan_rsa SandMan@12.34.56.78 /sbin/shutdown -h now


Does the libreoffice calc auto change command language?

Yes, it will show the Calc functions in Polish, and there will not be any errors.

I unzipped an .ods file created with a Spanish user interface, and it still showed the English function name in the XML code.  So apparently English is always used as underlying, and function names gets translated to the user interface language.


Find number of files in folder and sub folders?

May be something like

find . -type f | wc -l

would do the trick. Try the command from the parent folder.

find . -name <pattern> -type f finds all files in . and subfolders. The result (a list of files found) is passed (|) to wc -l which counts the number of lines. -name <pattern> only looks for certain files.


Sound Stops working after I close my laptop lid

It is a driver problem most likely. Try updating them. After you close and reopen your lid, use terminal to kill and start all audio programs. If that works then you may want to make shortcuts for those commands.


Steam may be trying to use a Windows-specific font, and ending up with an italicized local replacement by accident. Try installing the ttf-mscorefonts-installer package to see if that helps.


If you have not done so, you should try systemctl poweroff and see if that works.


Installation of the Catalyst drivers in a ATI / Intel hybrid laptop

(Taken from the ATI wiki site):

  Intel/ATI Hybrids

  Use of Catalyst on older systems (those with a mux) is no longer supported. I have one report of switching success with Catalyst 11-6, but ATI has now disabled switching in Catalyst, even if it worked fine with older Catalyst versions. X will refuse to start and you will find this message in your Xorg log:

(WW) PowerXpress feature is not supported on A+I Mux platform. Please uninstall fglrx driver.
 (EE) No devices detected.

Your hybrid solution of Intel/ATI cards in your system is not supported by the Catalyst drivers. Switching was once possible but has been disabled  later on by AMD.

Unless you can disable the Intel card in your BIOS and run only with the ATI graphics there is no way you can install the AMD drivers for your card. You are stuck running the Intel graphics card by default.

You will not be able to install Catalyst drivers in this situation and you can run Ubuntu with your Intel graphics card.


Can VirtualBox use external beamer / screens?

The way Virtual Box works it will use the graphics card and monitors attached to your host computer. This means that the guest OS only has a virtual graphics adapter to operate.

To answer your question: Yes, it is definfitely possible to view the screen of your Virtual Box guest Windows on a monitor or beamer attached to your Ubuntu host computer provided Ubuntu is able to adress it (which is very likely the case). You don't even need any additional drivers for Windows. When running Virtual Box in full screen mode it will operate very similar (but slower) to a native Windows.

The present release of Virtual Box allows providing multiple virtual monitors, all of which can be displayed from the host OS. If we installed the Oracle Extension Pack to make it a PUEL-version we are even able to view the virtual screen over a network using the RDP protocol.


apt will only replace the current package of something if there is a newer package. Updates that come now will likely be to previous versions. It won't downgrade it unless they do something spectacularly silly with the versioning.

Lock version is not as clever as it sounds. It's supposed to do what it says on the tin, lock the version... But it only locks it within Synaptic. Anything else that does package upgrades (read: Update Manager, apt-get, aptitude, etc) ignores this. This is probably buggy behaviour so I would expect this to be fixed in time.

But to stop things getting upgraded, you want to "hold" it. To do that, load up aptitude, find the package (/ is the quick-key for searching, n finds the next instance) and press h on it to hold it. This is respected a lot more than Synaptic's "lock" feature.

Edit: Another way of doing this via the command line is by running this:

sudo -i
echo <package-name> hold | dpkg --set-selections

But as I started with, I don't think you need to do this in your circumstances. Provided you're using a package version that is clearly newer than the current stable releases (and isn't just a random build number - you can see in Synaptic) you'll be fine.


Is it safe to sleep computer while updating software?

Probably not.

If it's still just downloading the updates then interrupting it is fine, but if the package manager has already started unpacking files then don't interrupt it.

Best case interrupting the package manager will require doing a sudo dpkg-reconfigure -a, worst case you interrupt it while updating the boot loader or something and that can be bad.


Installed libjava3d-java but cannot compile my Java3D project

You have to add the jars to the classpath when compiling and when running the final jar file with the application.

When compiling:

javac -cp /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath.jar MainClass.jar

To specify the classpath when running the jar, put the classpath in the manifest file. Add the following line:

Class-Path: /usr/share/java/j3dcore.jar /usr/share/java/j3dutils.jar /usr/share/java/vecmath.jar


Two answers in one
I've posted two answers here:

A bash script which is hopefully easier to understand
A one-liner using common Linux utilities grep, sed and cut

How the Bash script looks in operation
I've turned off gnome-terminal line wrap to make input and output files easier to read.

───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/askubuntu$ tput rmam # Turn off line wrap
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/askubuntu$ cat aptfilein
Published repositories:
 * test_repo_one/xenial [i386,amd64] publishes {main: [xenial-main_20190311]: Snapshot from mirr}
 * test_repo_one/xenial-security [i386,amd64] publishes {main: [xenial-security-main_20190311]: }
 * test_repo_two/trusty [i386,amd64] publishes {main: [trusty-main_20190312]: Snapshot from mirr}
...
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/askubuntu$ time aptfileparse.sh
5 lines read from aptfilein
3 lines written to aptfileout

real    0m0.025s
user    0m0.016s
sys     0m0.004s
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/askubuntu$ cat aptfileout
 test_repo_one/xenial [xenial-main_20190311] [xenial-multiverse_20190311] [xenial-restricted_201]
 test_repo_one/xenial-security [xenial-security-main_20190311] [xenial-security-multiverse_20190]
 test_repo_two/trusty [trusty-main_20190312] [trusty-multiverse_20190312] [trusty-restricted_201]
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/askubuntu$

The actual Bash script
Remember to make the script executable with chmod a+x script.sh
#!/bin/bash

# NAME: aptfileparse.sh
# PATH: ~/askubuntu
# DESC: Parse Apt File giving new lines.
# DATE: July 1, 2019.
# NOTE: For: https://askubuntu.com/questions/1127821/text-processing-aptly-output-file
#       Program would be ~10 lines shorter (but harder to read) with arrays.

: <<'END'
/* -----------------------------------------------------------------------------

INPUT FILE LAYOUT
=================

Published repositories:
 * test_repo_one/xenial [i386,amd64] publishes {main: [xenial-main_20190311]: Snapshot from mirror [xenial-main]: http//gb.archive.ubuntu.com/ubuntu/ xenial [src]}, {multiverse: [xenial-multiverse_20190311]: Snapshot from mirror [xenial-multiverse]: http//gb.archive.ubuntu.com/ubuntu/ xenial [src]}, {restricted: [xenial-restricted_20190311]: Snapshot from mirror [xenial-restricted]: http//gb.archive.ubuntu.com/ubuntu/ xenial [src]}, {universe: [xenial-universe_20190311]: Snapshot from mirror [xenial-universe]: http//gb.archive.ubuntu.com/ubuntu/ xenial [src]}
 * test_repo_one/xenial-security [i386,amd64] publishes {main: [xenial-security-main_20190311]: Snapshot from mirror [xenial-security-main]: http//gb.archive.ubuntu.com/ubuntu/ xenial-security[src]}, {multiverse: [xenial-security-multiverse_20190311]: Snapshot from mirror [xenial-security-multiverse]: http//gb.archive.ubuntu.com/ubuntu/ xenial-security[src]}, {restricted: [xenial-security-restricted_20190311]: Snapshot from mirror [xenial-security-restricted]: http//gb.archive.ubuntu.com/ubuntu/ xenial-security[src]}, {universe: [xenial-security-universe_20190311]: Snapshot from mirror [xenial-security-universe]: http//gb.archive.ubuntu.com/ubuntu/ xenial-security[src]}
 * test_repo_two/trusty [i386,amd64] publishes {main: [trusty-main_20190312]: Snapshot from mirror [trusty-main]: http//gb.archive.ubuntu.com/ubuntu/ trusty[src]}, {multiverse: [trusty-multiverse_20190312]: Snapshot from mirror [trusty-multiverse]: http//gb.archive.ubuntu.com/ubuntu/ trusty[src]}, {restricted: [trusty-restricted_20190312]: Snapshot from mirror [trusty-restricted]: http//gb.archive.ubuntu.com/ubuntu/ trusty[src]}, {universe: [trusty-universe_20190312]: Snapshot from mirror [trusty-universe]: http//gb.archive.ubuntu.com/ubuntu/ trusty[src]}
...

OUTPUT FILE LAYOUT
==================

 test_repo_one/xenial [xenial-main_20190311] [xenial-multiverse_20190311] [xenial-restricted_20190311] [xenial-universe_20190311]

Five fields to extract: name, main, multiverse, restricted, universe

----------------------------------------------------------------------------- */
END

 INPUT="aptfilein"
OUTPUT="aptfileout"

> "$OUTPUT" # Erase previous output file

# Read all input lines
while IFS= read -r line ; do

    let CountIn++
    ! [[ "$line" =~ " *" ]] && continue     # skip lines not starting " *"
    # Get name
    line="${line#" * "}"                    # remove leading " * "
    lout="${line%%" "*}"                    # name is up to next " "
    line="${line#" "*}"                     # remove name from line
    # Get main
    line="${line#*"{main: "}"               # remove leading "{main: "
    lout="$lout ${line%%":"*}"              # main is up to next ":"
    line="${line#":"*}"                     # remove name from line
    # Get multiverse
    line="${line#*"{multiverse: "}"         # remove leading "{multiverse: "
    lout="$lout ${line%%":"*}"              # maultiverse is up to next ":"
    line="${line#":"*}"                     # remove multiverse from line
    # Get restricted
    line="${line#*"{restricted: "}"         # remove leading "{restricted: "
    lout="$lout ${line%%":"*}"              # restricted is up to next ":"
    line="${line#":"*}"                     # remove restricted from line
    # Get universe
    line="${line#*"{universe: "}"           # remove leading "{universe: "
    lout="$lout ${line%%":"*}"              # universe is up to next ":"
    line="${line#":"*}"                     # remove universe from line

    # Append line to output file with leading space
    echo " $lout" >> "$OUTPUT"
    let CountOut++

done < "$INPUT"

echo  "$CountIn lines read from $INPUT"
echo "$CountOut lines written to $OUTPUT"

One-liner with common utilities
One-liners are popular in the Linux community and there are some excellent awk and perl answers posted in this Q&A. Here is an example using common utilities most experienced command line users are familiar with:
$ time grep ^" \*" aptfilein | sed 's/ \* //;s/ /: /;s/^/ /' | cut -d':' -f1,3,6,9,12 --output-delimiter=''
 test_repo_one/xenial [xenial-main_20190311] [xenial-multiverse_20190311] [xenial-restricted_20190311] [xenial-universe_20190311]
 test_repo_one/xenial-security [xenial-security-main_20190311] [xenial-security-multiverse_20190311] [xenial-security-restricted_20190311] [xenial-security-universe_20190311]
 test_repo_two/trusty [trusty-main_20190312] [trusty-multiverse_20190312] [trusty-restricted_20190312] [trusty-universe_20190312]

real    0m0.011s
user    0m0.003s
sys     0m0.008s

grep ^" \*" aptfilein - the grep command selects lines containing a search string. The carrot (^) denotes the string must start at the beginning of the line. The backslash (\) denotes the asterisk/splat (*) is to be taken literally and not act as a wildcard character that selects everything. In summary this grep command selects all lines beginning with  * in file aptfilein.
sed is a "stream editor" that edits lines coming in and changes them and passes them out. There are three sed changes here 's/ \* //;s/ /: /;s/^/ /'. The changes are between quotes (') and delineated (separated) by a semi-colon (;) deliminator. They are broken down in next three points.
s/ \* // - search first occurrence of * and change it to null. This will erase the * that begins at each line.
s/ /: / - searches for the first space and changes it into a colon (:) followed by a space. This is necessary to change our first field into a key. For example test_repo_one/xenial  becomes test_repo_one/xenial: .
s/^/ / - tells sed to insert a space at the beginning of each line.
cut -d':' -f1,3,6,9,12 --output-delimiter='' - Uses the cut command to select key fields # 1, 3, 6, 9 and 12. The key fields are delimited by a colon as argument -d':' stipulates. Normally output fields are delimited the same but this is overridden to null using --output-delimiter=''` parameter.

Note: The one-liner is faster than bash which is slower at string processing.


Won't install on an hp Pavilion with a Radeon HD6470M

I managed to work out the problem.

The top row of the keyboard has the brightness and volumes, etc., keys as primary, and the Function keys (F1, F2, etc.) available when pressing the "Fn" key. So I went into the BIOS and switched them around. It turns out the the LiveCD did not like that. It obviously causes a hardware conflict, which for some reason manifests as a Radeon error (I have no idea why).

In any case, it works now.

Hope this helps people trying to reinstall Ubuntu: Make sure your BIOS is set to factory settings!!!


For some reason I don't see an option to add a comment on my iPhone using the StackExchange app, so I'll offer an answer that finally worked for me. I gave up on trying to configure Samba, it never worked, ever. What does work is BitTorrent Sync 2.0 and it is fast, it costs money though, I'm fine with that, it is absolutely the easiest and fastest way to share files between OS X and Ubuntu


You don't need a script; the following command-line is enough:

for dir in */; do tar cvzf "${dir%*/}".tar.gz "$dir"/; done


No Terminal Library Found when Compiling Vim

I think you should install a ncurses-dev library.

you can do so by running sudo apt-get install libncurses5-dev libncursesw5-dev


How to delete unreachable revisions from a shared repository in Bazaar

The only way to end up with a shared repository that does not contain these revisions is to create a new repository, and branch all the branches that you wish to keep into it.

Deleting revisions is not considered a safe operation because there may be some branch that Bazaar does not know about that depends on them.


How to keep an UbuntuListView between its boundaries?

Add clip: true to the UbuntuListView.

By default, QML objects have this set to false, which allows them to draw outside their allocated rectangle.  I assume this is an optimization, since it allows the renderer to avoid calculating clipping for each element.  Most QML objects only draw within their allocated rectangle, so you don't notice this.  But list views with lists long enough to scroll will draw outside of that rectangle, so you need to turn on clipping if you don't want to see that.


Multiple errors while installing acroread on Ubuntu 12.10 64b

Did you check this post? Where can I get Adobe Acrobat 64?

This what worked for me.
Just type this into the terminal:

sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install acroread

as it's precise repository it might cause some packages conflicts


Unity greeter login screen has a garbled white dot grid?

You can get rid of the white dots.

sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid false

Got it from here.


Troubleshooting Proprietary NVIDIA 319.49 Driver

This was a very strange problem that seemingly resolved itself. Or rather, something I did resolved it. Possible factors that may have contributed to its resolution are:

The reinstallation of the nvidia-common package
The reinstallation of the entire driver (though I did this multiple times)
The running of nvidia-xconfig, nvidia-modprobe, and nvidia-persistence
Running the tested proprietary driver listed in the Additional Drivers tab of the Software Properties application before the final reinstallation of the current driver.


Connecting a Bluetooth 4.0 LE mouse (Microsoft mobile mouse 3600)

After a few false starts I have Microsoft Bluetooth Mobile Mouse 3600 working on a Dell XPS with Ubuntu 14.04.  I took the advice in Logitech MX Master Mouse pairs, but won't work
and installed Bluez 5.41

Using bluetoothctl I was able to pair and 'trust' the mouse.
On my first attempt the mouse would work fine for a few minutes, then I'd need to power off and power on bluetooth using hciconfig hci0 down; hciconfig hci0 up

Eventually I figured out that I had two entries for the mouse in /var/lib/bluetooth/XX:YY:ZZ.....   Once I wiped out the contents of that directory and started over, pair, etc. all was fine.


You have two options.

the quick one: using Gparted, format the 100Gb block as ext4. Let's say most of your stuff is in /home/username/Videos. Create a new directory called /home/username/NewVideos. Mount the new partition at /home/username/NewVideos. Move all of your stuff from Videos to NewVideos. Remove the (now empty) directory Videos, and rename NewVideos to Videos. Edit /etc/fstab so your new partition will automatically be mounted at /home/username/Videos at the next reboot.
the thorough one: You need to boot from a LiveUSB for this. Move your partitions around so the 100Gb unallocated block is next to your /home partition. Then, merge these partitions (see How to merge partitions?).

In all cases, make sure you have backups of all your data.


How to catch the command failure events in ubuntu?

What could be done is to use functions. They run as subshells, so you can catch errors of one subshell via redirection, and send it to other function to deal with it. The script bellow handles only failure of one command.

#!/bin/bash
err_handling()
{
    # grab command from output
    cmd=$(awk -F ':' '{print $1}'  < /dev/stdin)
    # re-run with some proper argument
    $cmd /dev/sda1

}

main()
{
    # let main stop on error
    # so note , last line won't run !!!
    set -e
    # This will fail with df: asdf: No such file or directory
    # err_handling function will grab the command name
    # and rerun it
    df asdf
    echo "Last line"
}

# Run main with redirecting stderr to stdout
# and original stdout to /dev/null. That way
# only stderr goes via pipe
main  2>&1 >/dev/null | err_handling

You could handle multiple commands, if you tell awk to filter output. For instance, this reads all stderr form main, and for each err line, extracts command. case...esac is used to handle specific cases of errors

#!/bin/bash
err_handling()
{
    while read line
    do
        # grab command from output
        cmd=$(awk -F ':' '{print $1}'  <<< "$line" )
        # re-run with some proper argument
        case $line in
            # do something with cmd depending on error
            *not\ found*) echo "$cmd wasn't found" ;;
            *No\ such\ file*) echo "$cmd didn't find your file" ;;
        esac

    done

}

main()
{
    # let main stop on error
    # so note , last line won't run if set -x is set !!!
    # set -x
    # This will fail with df: asdf: No such file or directory
    # err_handling function will grab the command name
    # and rerun it
    df asdf
    asdf
}

# Run main with redirecting stderr to stdout
# and original stdout to /dev/null. That way
# only stderr goes via pipe
main  2>&1 >/dev/null | err_handling

Note, as i mention in the comments - some commands don't use stderr, for instance file command. In such case, you'd need to redirect its stdin and handle it via pipe or otherwise


The fdutils web site refers to http://www.geocities.jp/tedi_world/format_usbfdd_e.html for usb floppy drives.


ubuntu 16.10 RTL8723BE can't login after reinstall of the driver kernel 4.8.0-34

Boot with the 4.8.0-32 kernel, remove your old wifi driver and download the newest Realtek driver from github:

sudo apt-get purge rtlwifi-new-dkms linux-firmware
sudo apt-get install build-essential git
git clone https://github.com/lwfinger/rtlwifi_new.git

Now reboot and boot with the 4.8.0-34 kernel and try these steps:

Step 1: Install the driver:

cd rtlwifi_new
make
sudo make install

Step 2: Find the strongest signal

Now you should detect which antenna receives the strongest signal. Repeat the following commands to find it: Replace XXX with 0, 1 or 2

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=XXX
iwlist scan | egrep -i 'ssid|level'

The latest command will show an output similar to this one:

enp3s0    Interface doesn't support scanning.
lo        Interface doesn't support scanning.

                    Quality=24/70  Signal level=-86 dBm
                    ESSID:"YOUR WLAN NAME"

Obliviously this received signal is too weak(Quality=24/70) so in this case you should check the other antenna. Remember to run all of the three commands that's mentioned in the step 2.

Note: More than one antenna may receive a signal but you should pick the one that receives the strongest signal from you modem.

Step 3: Config your wifi

Run the following command to config your wifi, replace xxx with the found antenna number.

echo "options rtl8723be ant_sel=XXX" | sudo tee -a /etc/modprobe.d/rtl8723be.conf

If you still haven't connected to your wifi then:

sudo service network-manager restart

If not again then:

sudo reboot

Finally read these references if this solution wasn't helpul:

https://sites.google.com/site/easylinuxtipsproject/reserve-7
http://www.linuxlinx.com/2016/07/another-solution-how-to-fix-realtek.html
http://www.linuxlinx.com/2016/05/install-realtek-rtl8723be-wifi-driver-ubuntu-linuxmint.html

The alternative solution:

If you can't solve your problem then I think you have only one option, removing 4.8.0-32 kernel and letting Ubuntu 16.10 boot with the old kernel. For removing the new kernel you must boot with the old kernel so you will not have problem with sudo anymore.

sudo apt-get purge linux-image-4.8.0-34-generic

Don't worry about downgrading your kernel because you always can install it manually again.

You can also test another version of kernel and see if your system works  with it or not. Download its source from here: https://www.kernel.org

BTW version 5.0.0 is releasing in the mid of 2017 and you can give it a try as well.


Yo can easily add the command to Startup Applications as follows.
Search in applications for Startup Applications and click on it to run:

In Startup Applications click the Add button then enter Maestral in the Name: field, /usr/bin/python3 -m maestral_qt -c maestral in the Command: field and Run Maestral on login. in the Comment: field then click the Save button like so:

That's it. Now, every time you login, Maestral will start automatically.

Notice:
The above steps will create a new .desktop file in ~/.config/autostart/ and you can run ls ~/.config/autostart/ to find the file and see how it's done the right way. The file might be named after the first part of the command i.e python3.desktop and if you run cat ~/.config/autostart/python3.desktop you should see something like this:
[Desktop Entry]
Type=Application
Exec=/usr/bin/python3 -m maestral_qt -c maestral
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Maestral
Name=Maestral
Comment[en_US]=Run Maestral on login.
Comment=Run Maestral on login.


If you mean in terminal you would need to run this command.

kill -9 kills processes instantly

kill -9 <process id>

pkill will allow you to use the process name

pkill -9 <processname>

or if you have multiple processes running like say chrome you would do something like this

sudo killall -9 <process name>

Hope this helps answer your question


When was my kernel updated and installed

I list the info I could collect, and how.
Below, the details.

How each package was installed (which method, automatic/manual).

With apt list --installed | egrep '^linux' | grep $(uname -r).
When and how each package was installed.

With grep $(uname -r) on /var/log/apt/history.log* (I copied and sudo gunzipped somwhere else to keep clean).
When each package was installed.

With grep $(uname -r) on /var/log/dpkg.log*.
When the PC was rebooted.
I do not know if this info is complete (e.g., covering shutdowns from power outages, etc.)

With grep reboot on /var/log/kern.log*. This gave the date/time of reboots, along with numbers [    0.18????] which I do not know what they mean.

With grep reboot on /var/log/dmesg*. This gave just the last of the reboots in kern.log* (one per file, so I guess each file starts at reboot), along with only numbers [    0.18????].

With grep reboot on /var/log/syslog*. This gave a few less reboots than dmesg*, along date/time.

grep shutdown on /var/log/syslog* did not give any more info.

How each package was installed (which method, automatic/manual)
From apt list --installed | egrep '^linux' | grep $(uname -r) I get 4 packages:
linux-image-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed,automatic]
linux-modules-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed]
linux-modules-extra-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed]
linux-modules-nvidia-390-5.4.0-42-generic/focal-updates,focal-security,now 5.4.0-42.46 amd64 [installed,automatic]

This shows the kernel was automatically updated.

When and how each package was installed
Grepping /var/log/apt/history.log*.
$ grep -B 4 -A 4 -nH $(uname -r) /var/log/apt/history.log
...
/var/log/apt/history.log-67-Start-Date: 2020-08-06  18:34:47
/var/log/apt/history.log:68:Commandline: apt-get install linux-modules-extra-5.4.0-42-generic
/var/log/apt/history.log-69-Requested-By: user1 (1000)
/var/log/apt/history.log:70:Install: linux-modules-extra-5.4.0-42-generic:amd64 (5.4.0-42.46)
/var/log/apt/history.log-71-End-Date: 2020-08-06  18:35:41
...
$ grep -B 4 -A 4 -nH $(uname -r) history.log.1
...
history.log.1-208-Start-Date: 2020-07-22  06:26:33
history.log.1-209-Commandline: /usr/bin/unattended-upgrade
history.log.1:210:Install: linux-modules-5.4.0-42-generic:amd64 (5.4.0-42.46, automatic), linux-modules-nvidia-390-5.4.0-42-generic:amd64 (5.4.0-42.46, automatic), linux-image-5.4.0-42-generic:amd64 (5.4.0-42.46, automatic)
history.log.1-211-Upgrade: linux-modules-nvidia-390-generic-hwe-20.04:amd64 (5.4.0-40.44, 5.4.0-42.46)
history.log.1-212-End-Date: 2020-07-22  06:27:05
...
$ grep -B 4 -A 4 -nH $(uname -r) history.log.2

When each package was installed
Grepping /var/log/dpkg.log*.
$ grep -B 6 -A 5 -nH $(uname -r) /var/log/dpkg.log
...
/var/log/dpkg.log-318-2020-08-06 18:34:48 startup archives unpack
/var/log/dpkg.log:319:2020-08-06 18:34:54 install linux-modules-extra-5.4.0-42-generic:amd64 <none> 5.4.0-42.46
/var/log/dpkg.log:320:2020-08-06 18:34:54 status half-installed linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:321:2020-08-06 18:35:00 status unpacked linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log-322-2020-08-06 18:35:00 startup packages configure
/var/log/dpkg.log:323:2020-08-06 18:35:00 configure linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log:324:2020-08-06 18:35:00 status unpacked linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:325:2020-08-06 18:35:01 status half-configured linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:326:2020-08-06 18:35:05 status installed linux-modules-extra-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:327:2020-08-06 18:35:05 status triggers-pending linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:328:2020-08-06 18:35:05 trigproc linux-image-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log:329:2020-08-06 18:35:05 status half-configured linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log:330:2020-08-06 18:35:41 status installed linux-image-5.4.0-42-generic:amd64 5.4.0-42.46

$ grep -B 6 -A 5 -nH $(uname -r) /var/log/dpkg.log.1
...
/var/log/dpkg.log.1:3123:2020-07-22 06:26:33 install linux-modules-5.4.0-42-generic:amd64 <none> 5.4.0-42.46
/var/log/dpkg.log.1:3124:2020-07-22 06:26:33 status half-installed linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3125:2020-07-22 06:26:36 status unpacked linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3126:2020-07-22 06:26:36 install linux-image-5.4.0-42-generic:amd64 <none> 5.4.0-42.46
/var/log/dpkg.log.1:3127:2020-07-22 06:26:36 status half-installed linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3128:2020-07-22 06:26:37 status unpacked linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3129:2020-07-22 06:26:38 install linux-modules-nvidia-390-5.4.0-42-generic:amd64 <none> 5.4.0-42.46
/var/log/dpkg.log.1:3130:2020-07-22 06:26:38 status half-installed linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3131:2020-07-22 06:26:39 status unpacked linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1-3132-2020-07-22 06:26:39 upgrade linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-40.44 5.4.0-42.46
/var/log/dpkg.log.1-3133-2020-07-22 06:26:39 status half-configured linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-40.44
/var/log/dpkg.log.1-3134-2020-07-22 06:26:39 status unpacked linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-40.44
/var/log/dpkg.log.1-3135-2020-07-22 06:26:39 status half-installed linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-40.44
/var/log/dpkg.log.1-3136-2020-07-22 06:26:39 status unpacked linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-42.46
/var/log/dpkg.log.1-3137-2020-07-22 06:26:39 startup packages configure
/var/log/dpkg.log.1:3138:2020-07-22 06:26:39 configure linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log.1:3139:2020-07-22 06:26:39 status unpacked linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3140:2020-07-22 06:26:39 status half-configured linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3141:2020-07-22 06:26:40 status installed linux-modules-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3142:2020-07-22 06:26:40 configure linux-image-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log.1:3143:2020-07-22 06:26:40 status unpacked linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3144:2020-07-22 06:26:40 status half-configured linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3145:2020-07-22 06:26:41 status installed linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3146:2020-07-22 06:26:41 status triggers-pending linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3147:2020-07-22 06:26:41 configure linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log.1:3148:2020-07-22 06:26:41 status unpacked linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3149:2020-07-22 06:26:41 status half-configured linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3150:2020-07-22 06:26:43 status installed linux-modules-nvidia-390-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1-3151-2020-07-22 06:26:43 configure linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log.1-3152-2020-07-22 06:26:43 status unpacked linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-42.46
/var/log/dpkg.log.1-3153-2020-07-22 06:26:43 status half-configured linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-42.46
/var/log/dpkg.log.1-3154-2020-07-22 06:26:43 status installed linux-modules-nvidia-390-generic-hwe-20.04:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3155:2020-07-22 06:26:43 trigproc linux-image-5.4.0-42-generic:amd64 5.4.0-42.46 <none>
/var/log/dpkg.log.1:3156:2020-07-22 06:26:43 status half-configured linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
/var/log/dpkg.log.1:3157:2020-07-22 06:27:04 status installed linux-image-5.4.0-42-generic:amd64 5.4.0-42.46
...


Merge LUKS-partition with partition on another HDD

You would need to create a luks partition on the second disk -  How to create an encrypted partition?
Ensure both the luks partition have the same passwd - How to change LUKS passphrase?
This should allow you to automount the second patition with a single passphrase - Full Disk Encryption with LUKS: auto mount second volume
Create a PV on the second and merge it with the first - How can I create one logical volume over two disks using LVM?


I had the Exact Same problem, Upgrade RAM and Enable Swap
if you have 4GB RAM i think very good and enough, make sure Swap is enabled
for more instructions about making swap please comment to me, but first make sure it's off or on


burning CDs or DVDs and ISO files in ubuntu 18.04

CD/DVD burning softwares are not included by default in recent versions of Ubuntu, as many recent computers do not have a optical drive, and their usage is declining.
However, many burners are available for free in the Ubuntu repositories. You can use Brasero, a free and efficient CD/DVD burner. Here's how to install it.
GUI Method: Open Software Center, and search for Brasero. Click the install button, and enter your password.
Command line method: Open a terminal and enter the command
sudo apt install brasero

It will ask for your password, but the password won't show up in the terminal for security. Press enter after entering your password.


Ubuntu 17.10.1 overheating on laptop with GTX 1060 Mobile and i7 7700hq CPU

okk so i mistook the the pch_skylake-virtual-0 as intel skylake GPU, and 75 degrees are normal for pch chips, same is on windows. so it's pretty normal i guess, it concludes that my laptop is running normal. because CPU core temps never exceeded 55 degree Celsius.


for ubuntu 20.4 users , you must install gnome-calender from snap store to use the add event feature


Where can I download the drivers for a Canon MP 420 Series?

I'm assuming in this answer that you have made a typo - possibly you are asking for the MX420 series drivers or the MP240 drivers.

There is a PPA which you can install to add these drivers:

sudo add-apt-repository ppa:michael-gruz/canon
sudo apt-get update

Then for the MX420:

sudo apt-get install cnijfilter-mx420series

For the MP240:

sudo apt-get install cnijfilter-mp240series

More information can be found on launchpad.


Installed Ubuntu with faulty RAM: do I need to reinstall?

I recommend a reinstall, or at least a full integrity check of installed files. It's quite possible that some of the files were corrupted during installation.

You can check the integrity of files that are provided by a package with the following command:

cd /
md5sum -c /var/lib/dpkg/info/*.md5sums | grep -v 'OK$'

If some packages turn out to contain corrupted files, you can reinstall them with sudo apt-get --reinstall install PACKAGENAME.

Beware that this only checks files that are directly provided by packages, not configuration files that were modified locally, binary files that were compiled locally, your own data, etc.


Cannot boot using live CD in grub rescue mode

To me, this looks like your computer is set up such that your HD is the first boot device. If that's the case or if you're unsure, you should check in your BIOS if your CD / DVD drive is set before the HD in the boot order.


VBOX on ubuntu Could not read from Boot Medium! System Halted Error

Make sure the virtual machine is booting from the correct device. When you turn on the machine press F12 to enter the boot selection then press C to choose CD-ROM.

In my experience when a virtual machine complains about inability to read the boot medium it usually means that the vm hard drive's partition table has become corrupted, or the vm hard drive file itself has become corrupted. However since you have yet to install the OS I would propose that perhaps your iso is corrupt. Just a thought.

Download link for Windows XP Professional SP3, should you desire a new iso:

Windows XP Professional Service pack 3


man takes the -L option as well as environment variables as $LC_MESSAGES and $LANG into account, but it can’t display man pages in a language they are not (yet?) translated to. Using find we can easily get a list of available translations, e.g. for cp:

$ find /usr/share/man -name "cp.*"
/usr/share/man/man1/cp.1.gz

That means there’s only one version, not located in any of the language subdirectories, that’s the default English one. Let’s take a look at results for the man command:

$ find /usr/share/man -name "man.*"
/usr/share/man/nl/man1/man.1.gz
/usr/share/man/zh_CN/man1/man.1.gz
/usr/share/man/ru/man1/man.1.gz
/usr/share/man/ja/man1/man.1.gz
/usr/share/man/sv/man1/man.1.gz
/usr/share/man/sr/man1/man.1.gz
/usr/share/man/es/man1/man.1.gz
…

The list goes on and shows the available languages, es being one of them. You can use one of

LANGUAGE=es_ES.utf8 man man
man -L es_ES.utf8 man
man -Les man

to display it. In fact, if the locale environment variables in your terminal are set accordingly man will always display man pages in Spanish and only fall back to English if a Spanish translation is not available, like you experienced with man cp. To set this up, run locale and see if $LANGUAGE is set to es_ES.utf8. If it’s not, add a line LANGUAGE=es_ES.utf8 to your ~/.bashrc or define an alias like alias man='man -Les'.

Catering to waltinators answer there may be additional packages available holding translations, you can take a look at their file lists on https://packages.ubuntu.com or with e.g. apt-file list manpages-es. manpages-es and manpages-es-extra look promising, however none of them contains a man page for the cp command.


Why does Speech to text websites are not working in my Ubuntu 18.04 laptop?

a) Make sure you are using Google Chrome

b) Speaking near the mic and loud enough

c) Turned on the mic in settings.

Juste tested in Ubuntu 18.04.3 LTS with Google Chrome, and it works.
The following article is updated with troubleshooting.

https://www.debugpoint.com/2018/07/speech-recognition-to-text-in-linux-ubuntu-using-google-docs/


Ubuntu 17.10 with LXDE locking leads to black/blank screen

Press Ctrl-Alt-F1 to go to a virtual terminal, and log in. Issue this command:

  ps ax | grep lock

If you see light-locker running, kill it

  killall light-locker

Return to your gui by pressing Ctrl-Alt-F7. Hopefully it is unlocked now.


How do I get the Apple Wireless Keyboard Working in 10.10?

http://ubuntuforums.org/showpost.php?p=9842686&postcount=98

  Press fn-F6 twice to disable numlock. To switch numlock off permanently after log-in go to System -> Preferences -> Keyboard -> Layout -> Layout Options -> Miscellaneous compatibility options -> turn on "Default numeric keypad keys"

For those of you still looking... I had this same problem. Here is the solution!


ERROR message : EXT4-fs error: ext4_find_entry 1451

The file systems containing Ubuntu seems to be damaged. Please start from a Live DVD/USB, open a terminal (Alt+F2) and run:

sudo e2fsck -p /dev/nvme0n1p7
sudo e2fsck -p /dev/nvme0n1p8

This either fixes the issue or uncovers more underlying issues.


Can't load GRUB all of a sudden (UEFI problem)

I haven't figured out an exact solution for this but I managed to get back to Ubuntu by a more "general" (for lack of a better term) solution.

I was having a look around at my BIOS when I noticed an option to turn off Secure Boot (wonder why I never noticed it before when I was having trouble dual booting Win8 and Precise). I turned this off and voila, GRUB loads. What's more is that I can now load Windows 8 from GRUB; I no longer need rEFInd as an intermediary. Choosing Win8 from GRUB shows some error tho (which I can bypass with just a press of any key). I'll look into this some other time, unless I figure it's something really risky.


Nepali Font Rendering Problem in Firefox

Open Firefox
Go to Preferences -> Content
In that window, click on Advanced button present beside Fonts & Colors
A new popup window will appear
In that window, select Devanagari in Fonts for select box
Select Lohit Devanagari in Serif, Sans-serif and Monospace select boxes
Click on OK button

Now, you should be able to see Nepali fonts properly rendered in your Firefox browser.


How and why does NetworkManager during systemd boot create a connection in /run/NetworkManager/system-connections colliding with /etc/...?

The file in /run gets written during boot by netplan. I personally would disable netplan and configure the profile in NetworkManager directly.


Internal microphone only works with headset plugged in

You can try installing and running pavucontrol. It's a tool that allows you to control the playback, input devices (which probably is what you're looking for), output devices and much more.

Open terminal and enter the following command:

sudo apt install pavucontrol

You can now open it from Dash. Go to Input Devices tab and from
there, you can choose the port which the sound will be captured by.
When you hit this option, a list of microphones (both internal and
plugged) will be shown, allowing you to choose the one of your
desire.

Maybe, using pavucontrol will allow you to force your system to choose corretly the input device at the right time when you plug and unplug your headphone. Give it a try and see if that works. Besides, you will have much more control of what's happening with the sound of your system using this tool.


NX Client (win) fonts not rendering after Ubuntu Upgrade

I was able to get the fonts to show up in GTK applications by going into the NX client's "Use custom settings" panel and checking "Disable..." for all the "Performance" checkboxes. Qt applications work fine either way.


Ubuntu16.04 LTS: failed to download package files. Check your internet connection

Open a terminal (ctrl+alt+t) and do the following to fix your sources lists problem:

sudo rm /etc/apt/sources.list.d/maverick-partner.list
sudo rm /etc/apt/sources.list.d/lucid-partner.list

This will remove those old files which cause you an error, and probably did already cause you an error before you updated.

You might as well make sure your /etc/apt/sources.list contains proper links too. Below i post you a version of the 16.04 LTS sources list which has all package sources enabled. Just do sudo nano /etc/apt/sources.list and replace the content with the following block:

#deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

You can delete the content of the file quickly when you place the cursor on the first line start and press ctrl+k until all lines are gone, then you copy the block here and paste it into the file with ctrl+shift+v. I simply condensed the whole file into a few lines so it would not take a lot of space here. Other thing you can do is, checking if the lines which contain http in the sources.list all mentioning xenial as version word.

After you done that, end your editing by ctrl+x, press y to save and return to confirm the file name.

After that run a sudo apt-get update && sudo apt-get dist-upgrade and then use simply the GUI tools provided to change the repositories you want to have switched on.


How can I run different XFCE sessions for the same user?

I am not sure whether the settings that you want are user- or session-specific. You can try and see.

In Settings Manager - Sessions and Startup - General: check 'Display chooser on login' so as to be prompted after login to chose between your Xfce sessions. To save a certain session, you can save it manually ( Settings Manager - Sessions and Startup - Session) or check 'Automatically save session on logout" (Settings Manager - Sessions and Startup - General).


Is there a way to see how many downloads have been made for a folder publicly shared on Ubuntu One?

No, at the moment you cannot track the number of downloads of files that you share publicly.

It is not implemented in Ubuntu One and I cannot find it on the feature roadmap so I would not expect it. It is just something that is not so much requested, I would say.


How to subscribe to updates of a specific package?

You can setup special software on your machine or in your browser.

Use SiteDelta Watch addon in Firefox. It scans page or its region for changes and show notification if interesting area of page was changed. You need to do the following:

install this addon from addons.mozilla.org
open needed page https://packages.ubuntu.com/source/bionic/nss-pam-ldapd in Firefox
click SiteDelta Watch button on Firefox toolbar and click Monitor

Then click on down arrow to open right sidebar

Click Add new and select paragraph with version number

That is all, SiteDelta Watch will inform you on page change.

Other method is to set up local python watcher - urlwatch:

Install it

sudo apt install python3-pip python3-keyring
pip3 install urlwatch --user
pip3 uninstall keyring

Set it up according to recommendations from official GitHub page - create file ~/.config/urlwatch/urls.yaml with contents:

name: "APT package watch"
url: "https://packages.ubuntu.com/source/bionic/nss-pam-ldapd"
filter:
  - xpath: '//*[@id="content"]/h1'
  - html2text: re

Note: in code above xpath: '//*[@id="content"]/h1' refers to the h1 header element with text Source Package: nss-pam-ldapd (0.9.9-1) [universe] (as in SiteDelta method).
Run urlwatch first time manually and create crontab job for it. SMTP notifying is supported too.

Personally I use both - SiteDelta and URLWatch.


Using a de-colorized version for clarity:

PS1="\D{%H:%M} Ubuntu \w$(__git_ps1) \$ "

The double quotes tell Bash to evaluate what is between the quotes, including $(__git_ps1), but /usr/lib/git-core/git-sh-prompt hasn't been sourced yet, hence the error.

Simply change it to use single quotes, which will prevent $(__git_ps1) from being evaluated until the PS1 is evaluated (i.e. when the interactive shell is ready for input and shows you the prompt).

PS1='\D{%H:%M} Ubuntu \w$(__git_ps1) \$ '

Escaping the dollar sign also works, but it's harder to read:

PS1="\D{%H:%M} Ubuntu \w\$(__git_ps1) \$ "

By the way, ~/.bash_aliases is intended for shell aliases, so it's a weird place to put your PS1. Personally I would put it in ~/.bashrc instead.


Cannot add PPA - "user or team does not exist"

I found a working solution at add-apt-repository derrière un proxy d'entreprise (in French).

To summarize it, you have to export the env variables HTTP(S)_PROXY, lowercase and uppercase in your term.

Then execute:

sudo -E add-apt-repository ppa:...

The -E option will preserve the env vars defined above, and will enable the proxy use.


Broadcom Wireless not working in Ubuntu 14.04 LTS kernel 4.4

Since kernel v4.4 is from Ubuntu Xenial, as a workaround you can use the bcmwl-kernel-source package from Xenial too (source):

Go to https://launchpad.net/ubuntu/xenial/+package/bcmwl-kernel-source and select the package with the highest version with “(Release)” behind it for your architecture (currently 6.30.223.248+bdcom-0ubuntu8).
On the page for that release build in the section “Downloadable files” select and download the only Deb package built (e. g. currently bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu8_i386.deb for i386).
Install that package with Software Center or GDebi or directly with dpkg:

sudo dpkg -i bcmwl-kernel-source_*_$(dpkg --print-architecture).deb

If there are missing dependencies follow up with:

sudo apt-get install -f

This should allow your system to build the kernel module with the wireless adapter driver for kernel v4.4 successfully. As a side effect it you may not have a working driver in earlier kernel versions (e. g. 3.13 or 3.16).


Install Ubuntu server in the old computer

Follow the instructions in How do I install Ubuntu Server (step-by-step)

Towards the end, at the Software Selection window:

Select Openssh Server, the first one in the image above. You will use ssh to connect to the server and interact with it. It will be a command line interface, as the server does not have any GUI.

Connect the old computer to the new computer

I assume the new computer already has Ubuntu Desktop installed. The connection will be using a LAN cable. For simplicity, I assume it will be via a wired router. That is, both the computers are connected by LAN cables to a wired router.

Find the Local IP address of the old computer

Log in to the old computer terminal and enter:

ifconfig

You will see something like

eno1      Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.x.yyy  Bcast:192.168.0.255  Mask:255.255.255.0

Note down the inet addr:. the x may be eitehr 0 or 1, and yyy will be another number. It is the local LAN IP address of your server. You will need this to connect to the old computer.

You will also need the user ID and password of the server in the old computer. You created these when you installed the Ubuntu server in the old computer.

Try to connect from the new computer

Open a terminal in the new computer by pressing Ctrl+Alt+T and enter:

ssh server_user_ID@192.168.x.yyy

Note: use your own server's user ID and the IP address you noted down above.

You will be prompted for password. Enter your server user's password. Nothing will be seen on the terminal and the cursor will not move. This is normal.

If successful, you will see the command prompt change from the new computer's userID@NewComputer:~$ to ServerUserID@oldcomputer:~$.

If this step works, congratulations. You can control your old computer from the new computer.

Copy and move files between computers with Nautilus in the New computer

Open Nautilus and find the Menu item "Connect to server".

Under Server Address Enter:

sftp://server_user_id@192.168.x.yyy/home/server_user_id

Press Connect. You will see a password dialog box:

Enter the password associated with server_user_id and select if you want the password is to be remembered or not. Again click Connect.

Now you should see your home folder of the laptop.

Notice there is a new entry under Network on the left panel of Nautilus that begins with server_user_id. Right click on it and choose "Add Bookmark" to create a permanent bookmark for your server's home folder in the Nautilus of the Desktop.

Now you can access the files and folders in your old computer from your new computer.

See the  Ubuntu to Ubuntu section of How to share files through the local network? for more details.

Advanced topics

Use public and private key pairs to login and disable password based login. Private/public keys are more secure than passwords, as they are harder to guess. This is not an issue if you only access your server from within your home. The default settings of your router should prevent any attempts from reaching the server from outside. See How can I set up password-less SSH login?
Network File System (NFS) can be used to attach the server folders to the desktop's system when the Desktop boots, assuming that the server is always running.

Thanks to muru for suggesting these topics in the comments.

Hope this helps


How can I mirror my iPhone to Ubuntu 16.04?

Airshou is not working properly. You can look into Everycord to mirror your iPhone to Ubuntu. Everycord is available for all operating systems. You can download Everycord very easily. I hope this is useful.


You can check the package history logs reside at /var/log/apt/, you will get the names of all the packages installed/removed along with the commands that were used to do so. Moreover you will see the date of the operation too.

You will find the latest logs in /var/log/apt/history.log and older logs in gzipped format e.g. /var/log/apt/history.log.1.gz, /var/log/apt/history.log.2.gz etc.

By the way, if you just want a list of all the packages currently installed (via dpkg) in the system, you can run:

dpkg --get-selections | cut -f1 > ~/installed_packages.txt

Now the file installed_packages.txt in your home directory will contain the list of all installed packages.


Yes the virtual environments are stored (hidden) in your home directory. Simply copy the folder related to the virtal environment to your other computer or sync the folder using rsyncd to avoid having several different versions.
The virtual environment folders can be found in ~/.virtualenvs on a standard Ubuntu installation.


Does 12.04 support hibernating to a swap file?

As far as I know the file /etc/initramfs-tools/conf.d/resume has the parameter from where to fetch the hibernation data and it was originally a device, but in (many) recent versions uses UUID. It defaults to the swap partition you installed and I know this because if you by some chance change your swap partition or UUID you need to update it there and run sudo update-initramfs -u for hibernation to work again. This is true for at least Quantal, Precise and Lucid so I guess its true for current supported versions too.

The swap partition must be at least as large as your total memory.
Be aware that hibernating to swap can be a (physical) security risk if you don't use full disk encryption (LUKS via the alternative install cd). It's possible to use the data on the swap to find the vectors to decrypt your gnome keyring passwords.


boot menu shows up but Ubuntu won't work

It seems that other people have had similar problems before. Try the suggested answers in this topic

ubuntu 14.04 black screen when installing

that basically tell you to add

nomodeset nolapic

to your boot parameters.


apt-get /usr/bin/datetime.so wrong ELF class

Because this apt-file search /usr/bin/datetime.so returns no output:

Delete the file /usr/bin/datetime.so by making a backup:

sudo mv /usr/bin/datetime.so /usr/bin/datetime.so.bak

and run this again:

sudo add-apt-repository -y ppa:chris-lea/node.js


No wireless connection on 12.04 upgrade from ubuntu version 10 with Broadcom network controller

Please run the following commands in your terminal.

    sudo apt-get update

    sudo apt-get install firmware-b43-installer

    sudo apt-get remove bcmwl-kernel-source

Then reboot


which channel of ubuntu touch is better for daily use in nexus 4 RC or Stable or Devel

If you're not wanting to do much in the way of debugging you're probably going to want to stick to Stable. You might also benefit by reading up on some of the terms you're going to run into using actively developed software:

Ubuntu Touch Image Channels

Software release life cycle - Wikipedia


for the Pinnacle Systems MovieBox Plus (710-USB), a driver for Linux is available for the Pinnacle MovieBox USB video capture/playback device.

Pinnacle MovieBox USB Linux driver can be downloaded from here


In such occations like this, you need to put the packages "is not going to be installed " in to the main installing list.

Use the following command :

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql libmysqlclient18 mysql-server-5.5 perl-modules


Ubuntu 14.04 on VirtualBox and access to comman line

You could use server version of the OS - that comes with no GUI whatsoever. If you insist on using Desktop version, your question requires combination of two things.

First , if you need to edit same file in both Windows and Ubuntu VM, you need to have a shared folder between virtual machine and the host OS. With VirtualBox, you will need to set that up in Settings -> Shared Folders.

In addition to that, I suggest you add your user on virtual machine to vboxsf group. Use sudo usermod -a -G vboxsf username for that

Second, you need to disable X server (the GUI) in the VM. Basically, you need to alter /etc/default/grub file to have GRUB_CMDLINE_LINUX_DEFAULT="text"


aticonfig: No supported adapters AMD Catalyst 15.7 Ubuntu 14.04

I advice you to follow the instruction you could find on this page:
https://help.ubuntu.com/community/BinaryDriverHowto/AMD#Installing_via_the_command_line

Check also to have enabled Backport and Partner source on APT and disable any internal graphics card if you have it.

I solved my problems like this.

Best


Does Dropbox work ok with Ubuntu server 13.04?

Ubuntu server and Ubuntu desktop are basically the same, and uses the same packages. The difference are which packages are installed by default.
So yes, everything that works in the desktop edition can be installed and used in the server edition.

And you might want to use the program git-annex instead of DropBox. As git-annex are open source, more secure and much more flexible than DropBox.


PCmanFM prompt "This file is executable. Do you want to execute it?" when double clicking a file

Apparently, this is the way PCmanFM deals with binary files, but not only PCmanFM. In Linux, a binary file is meant to be run, instead of doubleclicked. For example, in your case, ./sublime_text would be the way to run it. That said, doubleclicking is convinient, so you can create a custom launcher on the desktop or in the menu.

In a terminal window, run leafpad SublimeText.desktop, and paste in the following:

[Desktop Entry]
Type=Application
Icon=/home/vitaly/Sublime\ Text\ 2/Icon/128x128/sublime_text.png
Name=Sublime Text
Comment=Sublime Text
Categories=Applications
Exec=/home/vitaly/Sublime\ Text\ 2/sublime_text
StartupNotify=true
Terminal=false

I've assumed that your username is vitaly, and that you've extracted the program to your home folder. You'll need to correct the paths if that's not the case.


As a user (if you don't need all your users to have such access), you can create a .desktop file:
alexis@ubuntu:~$ cat ~/.config/autostart/systemctl.desktop
[Desktop Entry]
Type=Application
Exec=systemctl --user start vino-server
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=vino Server
Name=vino Server
Comment[en_US]=Auto-start the VNC service on boot and login back in
Comment=Auto-start the VNC service on boot

That will automatically start vino (as shown in the Exec) whenever you log in your account. You can mark your account as "auto-login" so it works 100% automatically.
I do not know that it would work with lightdm and any user who logs in. I haven't tried that.


Never mind , turn out I found the solution
By adding nouveau.modeset=0 in the etc/default/grub and reboot it work.


How to remove all that country-specific dictionaries (like En_AU, En_CA, de_CH, etc)?

Emi Bcn from Launchpad said:

  Look at /usr/share/hunspell/ and delete all files you don't need/want. It's all!!

It worked for me except just in case I went to myspell and aspell folders too and erased the ones I didn't need.


General error mounting filesystems after upgrade from 10.04 to 12.04

For some reason, the update change the permission of /bin/mount and umount which prevented the system from booting properly. I booted from live CD and changed the permissions back and it booted fine this time with all updates! Problem solved!


Ubuntu 20.04 LTS ::: Unity ::: Dash Issues ::: Missing Programmes

I have it resolved.
Essentially, I have re-installed Unity.
sudo apt update.

sudo apt install ubuntu-unity-desktop --install-suggests

Following @Eirik advice of thinking about it differently...
Dash was working, except it didn't seem to know what what was installed on the HD. Nothing wrong with Unity. SO it seemed to be some db issue. So, if I re-install Unity that should also [re]build the db at the same time. 30 mins later I have a fully working 20.04 LTS with a working Dash.
Oh and @Eirik I hate Gnome. I'm going to have a proper look at UbuntyUnity.org and may run that on a separate machine and see how that works out.....
Cheerio.
P.


Run python script IN TERMINAL after Lubuntu login?

It seems your script is running, but you want the term to stay open.  If that's the goal:

Exec=lxterminal -e "python ~/scripts/myscript.py && /bin/bash"

Should keep the term open for you...


How to go to previous step in 10.04 server installation?

The installation will always tell you if you can go back with the command written somewhere.

But if you reach the point of no return and still wants to go back. Then there is no command. Either you start over with a fresh install or you try to fix what you wanted to change when the installation is complete.


Can landscape be used to proxy package updates?

Landscape-only Solution

There is a feature in Landscape called 'Repository Management'.  This feature is a bit complex to use and is more intended for people who want to stage updates across all their lab infrastructure.  But, feel free to look it over at the following links:

https://help.landscape.canonical.com/LDS/ReleaseNotes12.09#Repository_Management
https://landscape.canonical.com/static/doc/user-guide/ch09.html#idp51261860
https://landscape.canonical.com/static/doc/api/repositories.html

Just keep in mind, it lacks a user-friendly view in Landscape.  That major caveat aside, it does work and is seamless from the client point of view -- even supporting private repositories (https).

Squid Deb Proxy

If you are just wanting to do some proxying of the ubuntu archives though, you should look into squid-deb-proxy:

# On the landscape server or any machine your client can see with internet access:
sudo apt-get install squid-deb-proxy

# On the landscape client (you may have to do this by hand the first time, i.e.,
# download debs and use dpkg -i):
sudo apt-get install squid-deb-proxy-client

If you are using public repositories (like the Ubuntu archive and Launchpad PPAs), this should just work.  But see the docs and the multitude of questions/answer on squid-deb-proxy here and on the forums if you need help getting things configured.


How to install Intel CedarView drivers on Ubuntu 12.10 or higher?

I am fairly sure this is impossible. The problem is that CedarView drivers are closed-source, outdated and Intel is no longer updating them. The driver supports 3.2 kernel only, and its DKMS module fails to compile under any newer kernel (including 13.04's kernel: 3.8).

Because the driver's source is closed, neither Canonical nor Ubuntu developers are capable of modyfing it to be compatible with newer kernels. Also there is no way you could patch it on your own by following some magic guide, for such patch will never exist as long as the driver's source is closed.

So what to do then?

There are several options.

Convince Intel to open-source the driver. This way they would not need to manage it, as the Ubuntu community might hack on it to apply updates. However, I expect it's clear how difficult it may be to convince Intel to such move.
Convince Intel to update the driver to a newer kernel. This may be difficult too, considering the fact they gave so little love to this driver, and it is definitelly not of their interest anymore.
Use Ubuntu 12.04 LTS Precise Pangolin, 32bit. While 12.04 currently uses 3.5 kernel, you can install 3.2 manually. If you do, cedarview drivers should install correctly. Make sure not to use the -pae kernel, as is also not supported. Also, you need to use the 32bit system, as the driver does not support any other architecture.

Yeah, I am aware this all is utterly annoying, and super-silly. Please direct all your complains in this matter to Intel, as it is only them who is responsible for this absurd.


Please consult the excellent resource: https://help.ubuntu.com/community/AutomaticSecurityUpdates and feel free to choose any of the suggested methods to automate the updates:

Use the GNOME Update Manager
Use the unattended-upgrades package
Use cron-apt
Write your own cron script that calls aptitude

My favorite way to update the Ubuntu machines is by using the "unattended-upgrades" package: sudo dpkg-reconfigure --priority=low unattended-upgrades, it has a quick interactive dialog which will create the file: /etc/apt/apt.conf.d/20auto-upgrades with these two lines:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
Please consult the file /etc/apt/apt.conf.d/50unattended-upgrades, it has a lot of goodies, like list of packages denied upgrade, automatic removal of unused packages, automatic reboot after upgrade (even at specific time) and you can decide what other options you may want use for the updates.
Happy updating!!


Dual-Ubuntu: how do I disable one OS from using the swap partition?

Press Alt+F2 and type: gksudo gedit /etc/fstab; enter password when prompted
Find a line like the following:

# swap was on /dev/sda6 during installation
UUID=adc15cab-1cd4-4278-9a1d-59016cced6dd none      swap  sw    0       0

Comment out the UUID= line by adding a # in front of it. Save and exit.
Lubuntu will no longer attempt to use that swap partition.


This link gives you the principles to follow if you want to try to do this. I suggest you don’t try to mount your home drive but symlink it instead.
Backup your system. This could go wrong.
I think you need to work in a live environment. (Using install media and choose “Try Ubuntu”)
You will need to make the following directories on the system partition:

/home
/home/naufil
/home/naufil/Desktop

You will need to copy the hidden directories and files from your home partition to /home/naufil
You will need to edit your /etc/fstab file so that the home partition mounts at somewhere like /mnt/home
You will need to place a symlink in /home/naufil/Desktop that points to /mnt/home/home/naufil
I cannot guarantee that this will work as expected or that it will achieve what you are looking for since it’s a rather odd thing to want to do.


Unable to install flash player on Ubuntu 16.04

This is a known problem in 16.04 that happens because /var/lib/update-notifier/package-data-downloads/partial/ is owned by root:root but apt drops privileges and runs as user _apt when downloading files.

More details and a quick fix on launchpad:

sudo chown _apt:root /var/lib/update-notifier/package-data-downloads/partial/
sudo rm /var/lib/update-notifier/package-data-downloads/partial/*.FAILED
sudo apt install --reinstall update-notifier-common

To get rid of the warning:

N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/'

Remove file /etc/apt/apt.conf.d/50unattended-upgrades.ucf-old, more information can be found in another askubuntu.com question.


On the file that you produced do:

ls -l ./hello

It's likely the file does not have execute permissions. You may see something like this:

-rw-rw-r-- 1 mark mark 2 Dec 18 11:37 hello

but what you need is something like this:

-rwxrwxr-x 1 mark mark 135163 Dec 18 11:39 hello

To get to this state use the command:

chmod gu+x ./hello

This command gives group and user execute permissions. Then try the above ls command again. See if you can execute it now.


Dual Boot Windows 10 with Ubuntu 14.04 LTS

I'm not quite sure, do you want to keep your Ubuntu 14.04 installation?

I personally would just backup all my data, either on a second drive or on an extra partition. Then i would proceed with installing Win 10 by whiping the WinXP partition. This will overwrite your bootloader, so you won't be able to directly boot into Ubuntu 14.04.

Afterwards Ubuntu 16.04 can be installed on a ext4 partition, either on a new one or on the one used by 14.04.

Further advice can be given if you list your current partitions/harddrives.


You can run Ubuntu, but you might find it to be a bit slow. You can try the lightweight  official variants Lubuntu or Xubuntu if you wish; they still have all the same available software and support.

Ubuntu will destroy the Windows boot sector and MBR - but nothing else, unless you tell it to during Setup - to install the Grub bootloader. Grub will allow you to set up Ubuntu and Windows alongside each other in a dual boot configuration, allowing you to choose between the two upon boot.

If you want to, you can try Ubuntu 12.04 with Wubi. This allows you to install Ubuntu as you would a program in Windows, making it easy to "Uninstall", just as you would any other Windows program, from the Control Panel. This, however, doesn't work with the latest and (some say) greatest version of Ubuntu, 13.04.


changing keyboard layout on a Thai-laptop - into German

This should be possible, at the install you are asked wich keyboard layouts
you want to use,or you go into the system setting click on keybord at the bottom of the window there is a button saying keyboard layout or likewise click it, in this new window at the bottomthere is a plus sign if you click it you can select additional layouts.

If there is more than one keyboard layout selected in thesettings then a little keyboard symbol appears in the upper right of your screen, you can easily switch layouts at any moment even if you are not logged in.


Can not SSH into machine from local network when gateway route is added to netplan config

The correct config is

network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0:
      routes:
       - to: 0.0.0.0/0
         via: 10.0.0.1
      dhcp6: yes
      addresses: [10.0.0.125/24]
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]

You had declared a /32 netmask for your interface, which means the kernel does not consider any other addresses "local".  Assuming you want 10.0.0.x to be treated as "local", the correct netmask is /24.

You also were declaring both a default route (to 0.0.0.0/0) and a gateway4.  You only need to do one of these.

You do not need to declare dhcp4: no, as this defaults to no.


I did this:

sudo apt-get install python3-pandas

But also needed others like this:

sudo python3 -m pip install --upgrade numexpr

Whatever you do, do not uninstall or modify default python, python2 or python3. System uses python and changes will totally break Ubuntu.


How do I make a Ubuntu VM that boots to Terminal but has GUI capabilities?

You can check out docker. Docker is an light weight

http://docs.docker.io/installation/ubuntulinux/


Nautilus won't browse my USB hard drive unless I double click it twice

I believe that this is because it is actually an external disk and that Ubuntu is not mounting it automatically. So your first double click is actually telling it to mount. The second telling it to open.

If you would like it to duplicate the behaver of the usb drive, someone else will have to tell you how to set this up or I may find out how to do it and get back to you.


ubuntu on a usb wont load computer says remove media device

Make usb(pen drive) bootable using poweriso tool or other tools available. Without making usb bootable its not possible to install.
see here


The NVIDIA X driver is not new enough to support the nvidia-settings Display Configuration page

Problem was solved for me by switching from "(version current) [Recommended]" to "(post-release updates) (version current-updates)"
.


Boot-up Password: Can Ubuntu show the password's characters?

How can one have Ubuntu reveal my password's characters as they type?

A password during boot will never be visible; that is intentional and there is no code in the software to have it echo characters. On the desktop it is possible. And with 2 terminals you can have it echo the "su" password but that is it.

My password is long

Excellent.

and my keyboard unreliable.

This looks like you are trying to fix a problem that is not a problem?
I would say: replace your keyboard.