Why am I not getting the Ubuntu 18.04 upgrade?

A thorough guide for upgrading is presented here. Other answers already mention you need to use:

do-release-upgrade -d     # Use this until 18.04.1 comes out
do-release-upgrade        # Use this after 18.04.1 comes out

Additionally though you need to check the file:

~$ cat /etc/update-manager/release-upgrades
# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.
Prompt=never

If the last line says "never" change it to "normal" for Ubuntu 17.10 users. For Ubuntu 16.04 LTS users, change it to "LTS". Otherwise you will get the upgrade...um "never":

rick@alien:~$ do-release-upgrade
Checking for a new Ubuntu release
No new release found.
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ do-release-upgrade -d
Checking for a new Ubuntu release
Upgrades to the development release are only
available from the latest supported release.
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ do-release-upgrade -c
Checking for a new Ubuntu release
No new release found.

These commands were issued with Prompt=never under Ubuntu 16.04 where it is available for upgrading yesterday (April 28, 2018). Changing the prompt to lts solved the problem.

You should either backup your data first or clone your data and run the upgrade in a test environment. Here is one script I wrote for such a purpose (but you can also do it manually with Live USB): Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade

I made some notes during the upgrade process and here is what you can look forward to:

Step 1: confirmation to proceed: Press [ENTER]
Step 2: packages will be removed: Y
Step 3: replace '/etc/systemd/longind.conf': Y
Step 4: Configuration file '/etc/sane.d/dll.conf', default N, take Y
Step 5: Configuration file '/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf' Take default N
Step 6: Configuration file '/etc/pulse/default.pa' default N, take Y
Step 7: Configuration file '/etc/grub.d/30_os-prober'' default N, take N
Step 8: Full screen grub menu config appears. Take option: keep the local version currently installed
Step 9: Configuration file '/etc/cron.d/anacron', default N, take Y to see what
Error Message multiple times: /sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
Step 10: Non-standard: Configuration file '/etc/vnstat.conf' (display differences 1.13 vs 1.18) take Y
Step 11: 220 packages are going to be removed. (can take hours) enter Y
Step 12: To finish the upgrade, a restart is required. Take Y

Note your steps will vary depending on software installed.

All the more reason for cloning is you can test what happens when you accept default of N or you use Y to get the most current configuration which may or many not be better.

Because your original Ubuntu version is left intact you can run the diff command against the new 18.04 configuration files if you chose to install them.


Unable to install Ubuntu 16.04 and 18.04 on HP Elite book 840 G3

Probably a little late but:- I had issues booting Ubuntu 19.10 on my HP 840 G3 until I updated the BIOS. It was a problem related to the APIC being configured by the BIOS at startup.
BIOS update fixed it.
I hope this helps someone.


How to boot from SATA3 drive, but install rest on NVME + PCIE Adapter

This is what finally worked:
Install Ubuntu 20.04 as usual until you get the the screen that asks if you want to erase Ubuntu, etc etc... you should select Something else, which brings up the custom partitioning dialog of the installer.
Partitions
sata drive

1GB for a /boot area
the rest formatted as a "System Partition"

nvme drive

50GB for a root / area
the rest is /home/

thanks to @oldfred!


Installing Linux on Packard bell GN45 (currently using Windows 7)

I have a Dell desktop, and I bought it refurbished, although the CD/DVD rom is there and works, it does not read when I try to use it to boot from it.  I have an external BR drive, and that always works.  The point to my long story is the drive could be bad, and that is why you can't boot from it.

So the answer given about burning a USB memory stick might be the answer.

Chris


guess ethernet interface is bounding, where would I find a log that proves or disproves

Yes, an auto-negotiation storm can cause infinite packet delay. Set an explicit speed; disable auto-negotiation .
Auto-negotiation storms don't  appear in logs - auto-negotiation is a very low-level hardware "feature".
You can look at the logs. sudo journalctl  -b 0 -u NetworkManager. Read man journalctl.


Kubuntu 12.04, need a  light weight mp3 player

Audacious is a good music player.
To install it type in terminal :

sudo apt-get install audacious

Some links for Audacious for further details :

Home Page
Ubuntu help
Installation


Reinstall xubuntu without losing data in the home folder

Try this:

Boot the Xubuntu Live-Usb.

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
fdisk -l

Suppose fdisk reports, /dev/sda1 = / and /dev/sda5 = /home, continue runing:

umount /dev/sda1
fsck -a /dev/sda1
umount /dev/sda5
fsck /dev/sda5
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
cp /etc/apt/sources.list /mnt/etc/apt/sources.list
chroot /mnt
nano /etc/resolv.conf

In the open file paste the following lines:

nameserver 208.67.222.222
nameserver 208.67.220.220

Ctrl+OSave file.
Ctrl+XClose nano.

Continue running:

apt update
apt dist-upgrade
grub-install --root-directory=/mnt/ubuntu /dev/sda
grub-install --recheck /dev/sda
update-grub
umount /mnt/dev
umount /mnt/dev/pts
umount /mnt/proc
umount /mnt/sys
umount /mnt
reboot


Can I download genuine Ubuntu from www.ubuntu.com?

Ubuntu is always genuine!

Ubuntu is legally free in all conditions.

Microsoft refers Genuine to as 'None Pirate' version of its Operating System (Windows).

It would be legal if you install it on as many of your computers or even to let your friends or family install it on theirs.

After Edit:
You mean 'Activation'. No since there is no licence granted to individual users unlike Windows, so you are not required to activate. You don't need any CD/Licence keys.


There is Calligra Converter:

sudo apt-get install calligra-libs

run with

calligraconverter input_file output_file

or you could try this solution:

  Artscript in Files/Nautilus

  Artscript is a software to convert/watermark/glue-together on the fly
  a big range of images format. Even SVG, *.kra and *.ora.

  Download and unzip Artscriptk source code in a folder. Get the last
  here

  Then with Files go to /home/<yourusername>/.local/share/nautilus/scripts
  Create a file Artscriptk
  touch Artscriptk
  give it execution permissions

sudo chmod +x Artscriptk

  and edit it:

gedit Artscriptk

  paste this inside, and customise the path depending where you unzipped Artscriptk sources:

#!/bin/sh
/home/<yourusernamehere>/path/to/artscriptk/artscript2.tcl $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS

  Now you can select files in Files/Nautilus, and do right click→script→Artscript
  and send the files to Artscript for using it.


tmp file in root folder with large size/ very long name

If your question is really "Will deleting this file damage my system?" No, deleting the file won't damage your system. But we don't know anything about the services and data ON your system.

Do just a little more investigation first:

When was it saved? (in Italian, for example, 'lug 22' its almost 5 months ago)
Do you remember what big changes you wrought as root back then?
Do you remember if you might have created some backups?

Also, make another test:

Change the file's name.
If after a normal backup cycle and a reboot cycle, your still don't need that file, then you have additional data to base your decision upon.


How to install Ubuntu 18.04 on a Legion y530 laptop with UEFI

With the sort of errors you initially saw, the first thing to check is the ISO with a hashcheck, and then the media selecting the media check grub menu option.  A memory check is the third thing to check.  Since you did this, the media is OK, but if interrupts are not handled correctly, the program can get scrambled, resulting in all sorts of random errors.  The noapic and nolapic options added to the line starting with "linux" in the grub menu item being booted change the way interrupts are handled, and apparently, allowed the program to complete.

The next problem is a video issue likely caused by proprietary video hardware. Until the proprietary video drivers are installed, adding the word "nomodeset" on the grub linux line allows the video to run, probably at a reduced resolution.  If you immediately install the proprietary video drivers (e.g. for Nvidia, run the Software and Updates program, select the Additional Drivers tab, and select the current (tested) driver).  If you don't want to do that, you can add the nomodeset word to the grub configuration by editing the /etc/default/grub and adding nomodeset to the line

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet splash"

Then run

sudo update-grub

to update the grub.cfg file, which controls the displayed grub menu.


Matlab related Sh file command not found

The command not found error means that the run_MainExploreDTI.sh is not executable. You have two choices:

Make it executable and then run it:

chmod a+x run_MainExploreDTI.sh
sudo ./run_MainExploreDTI.sh

Call it with sh:

sudo sh run_MainExploreDTI.sh


Ubuntu 16.04 - Dark patch on monitor (disappears on reboot)

On further reflection, and due to something that I just did, I think this might be happening when I Shift-PrtScr to get a screenshot of something, and then navigate to another window (eg. having used Copy to Clipboard in order to then paste the screenshot into another application).

The dark rectangle represents the area that I captured in my screenshot in one application window, and it remains in the foreground on my monitor as long as the PrtScr window is still open.

That's what caused it to happen just now, anyway.


I have a setup very,very similar to this, and I got Ubuntu 14.04.4 working on it. It's okay; I had problems getting wifi up and running and now I'm having problems with the wifi cutting out every so often (multiple times a day). I got it to install just fine by disabling secure boot and fast boot and by disabling UEFI and booting with legacy support. You can see all that here.

Also, once I got it installed I was having graphics card issues with the Nvidia card, so I just switched to the internal card in BIOS and it was fine after that. I don't care about using the Nvidia card, though.

Hope this helps.


Go to Software Center and search for Thunderbird, or Evolution. And then click on Install button ;-)


ntop: INTERFACES is not defined, please run 'dpkg-reconfigure ntop' and ntop is broken or not fully installed

Try this:

sudo apt-get purge ntop; sudo apt-get install ntop

Then the follow screen popps:

**Package configuration

┌─────────────────────────┤ Configuring ntop ├─────────────────────────┐
│ Please enter a comma-separated list of interfaces that ntop should   │
│ listen on.                                                           │
│                                                                      │
│ Interfaces for ntop to listen on:                                    │
│                                                                      │
│ none________________________________________________________________ │
│                                                                      │
│                                                                  │
│                                                                      │
└───────────────────────────────────────────────────────────────────

You can get the interface name if you click on the Network Manager in your top panel and select Connection Information. Near the top, you'll see something like "Interface: Ethernet (eth0)". If that's the connection you want to monitor, you'll enter "eth0". (Answer copied and pasted from answered Nov 1 at 19:41Jo-Erlend Schinstad)

I hope I was able to help you.
Cheers.


100MB of RAM not detected on 64-bit 12.10 (NVIDIA cards)

This might have something to do with Gibibytes vs Gigabytes as the default unit being used.

See the answer to Why is Ubuntu reporting a slightly different size for my Virtualbox disk?


There's two different issues in your description.
The "Windows Network" problem is due to samba changing a client protocol level. https://ubuntuforums.org/showthread.php?t=2384959
To restore it to how it used to work:
Install smbclient:
sudo apt install smbclient

Then edit /etc/samba/smb.conf and add a line under the workgroup = WORKGROUP line:
client max protocol = NT1

Save the file and reboot ... yes ... reboot.
Please read the forum post about why Samba changed this to see if it affects you.
The other issue about not finding 17.10 samba servers seems odd because starting with that release they should be "published" automatically regardless of protocol level. I would see if the following service is running on all your machines:
sudo service avahi-daemon status

If it's not running restart it:
sudo service avahi-daemon start

Changing the client max to NT1 should also fix the Ubuntu 17.10 discovery but the avahi method really should be working by default.


Wordpress PHP code not displaying in webpage

I would suggest you kindly check required module are enable or not in your Ubuntu os. After that give permission to directory.
Also enable apache rewrite mode


Looks like you have error in RewriteRule

try to replace

RewriteRule ^(.*)/$ public/%1 [L,R=301]

by

RewriteRule ^(.*)/$ /public/$1 [L,R=301]


FiFa Manager 13 is a windows application, and can't run under Ubuntu natively.  In order to be able to run it, you need to install Wine.

To install Wine, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.5
sudo apt-get install winetricks


Libreoffice Writer got me bad_alloc alert and then crashed in Ubuntu 15.04

Ok. Solved for me.

I have removed all libreoffice stuff with synaptic and then the libreoffice newly installed.

Selected packets:
libreoffice5 (1:5.01.1~rc2-0ubuntu~trusty1) and libreoffice-help-de

synaptic/apt select the other stuff (libreoffice-l10n ...).

Tried.

Then i have installed step by step the tools i need (script-provider, writer2latex, ...).

Work now for me without the Errors. I think there was incompatible stuff on the system. Try the same steps.


How to configure auto completion on docker-compose alias

For bash just do:

Get the configuration from the official project:

sudo curl -L https://raw.githubusercontent.com/docker/compose/1.23.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

Source

Reset the terminal to be sure new configuration are load.

reset

Update

Once the file is installed as before, open it whit your favorite text editor go to the end of file and append your alias to this line:

complete -F _docker_compose docker-compose docker-compose.exe

so after the modification it will be:

complete -F _docker_compose docker-compose docker-compose.exe *yoralias*

NOTE: be careful with the alias you choose, you could use a name of existing command (I.E. dc exist as a command Read here)


7-zip error:Extracting META-INF/AIR/hash-Unsupported Method

I think this whole issue is not important. I don't know a real reason, why I have to extract the Air file


ubuntu 14.04.3 bootloader cannot be installed at specified location

The message about the "reserved BIOS boot area" (what the rest of the world calls a BIOS Boot Partition) indicates that your installer has booted in BIOS/CSM/legacy mode. You might do better with an EFI-mode installation, although there's another way around this issue (see below). First, though, I strongly advise you to exercise caution. Installing a BIOS-mode boot loader to a partition that should not hold it can render all data on the partition inaccessible. If you're lucky, you might be able to recover files with advanced data-recovery tools, but you'll waste a lot of time (your own and others') because of a moment's impatience.

In an EFI-mode installation, the boot loader is stored as ordinary files in the EFI System Partition (ESP), which in your case is /dev/sda1. The Ubuntu installer doesn't actually ask where to install GRUB on such systems; it's smart enough to identify the ESP and install GRUB there. If you partition manually, though, the ESP must be appropriately flagged (as an "EFI boot partition" on older versions or as an ESP on newer versions). This should happen automatically, but you should not change that identification. Note that this will happen only if you boot the Ubuntu installer in EFI mode, which you apparently have not done. (The installer sets up a BIOS-mode boot loader if it's booted in BIOS mode and an EFI-mode boot loader if it's booted in EFI mode.)

Finally, to the other way around the issue: You said you're using my rEFInd boot manager. rEFInd doesn't need GRUB -- BIOS-mode or EFI-mode. If you've already installed rEFInd in OS X, and if your Ubuntu installation has completed except for the GRUB installation, you can boot to OS X and install an EFI filesystem driver for ext4fs. See the rEFInd driver documentation and the rEFInd page on booting Linux for lots more details. The mountesp script, which comes with rEFInd, should mount your ESP, enabling you to copy the ext4fs driver, which also comes with rEFInd, to the right location. Alternatively, you can re-run the refind-install script. This is overkill, but the script should detect that Ubuntu is now installed and set up the ext4fs driver automatically. Yet a third option is to use rEFInd on a CD-R or USB flash drive to boot to Ubuntu, then re-install rEFInd via the Debian package or PPA. In any event, once the ext4fs driver is installed, rEFInd should detect your Linux kernels and enable you to boot.


Boot from CD.
Run fdisk -l and see which is your linux partition, say /dev/sda2.
Mount the partition to say /mnt using mount /dev/sda2 /mnt
Now run the following magic command from anywhere:

grub-install --root-partition=/mnt /dev/sda

You will get the message

  no error reported

Reboot.


Your interfaces file looks right. Are you sure it isn't an issue with your network setup? How are you determining that the host OS is losing connection (i.e. dropped ping packets, trouble downloading files, etc)?

You may need to give qemu the inheritable CAP_NET_ADMIN capability, for 64-bit:

sudo setcap cap_net_admin=ei /usr/bin/qemu-system-x86_64

or for 32-bit:

sudo setcap cap_net_admin=ei /usr/bin/qemu

For detailed instructions on setting up a bridged NIC for KVM, see my blog post, http://john.wesorick.com/2012/01/setting-up-bridged-network-interface.html.


How can I insert # in beginning of line, if the line contains a particular string/word?

You can try the following:

sed -Ei 's/(^.*CMX.*$)/#\1/' your_file_name

It will replace the line containing ^.*CMX.*$ with itself, but by prepending with a #.

Here, in the replacement string \1 is the whole matched string in parentheses. ^ indicates the beginning of line and $ end of the line. .* matches any string (0 length or longer).


Ubuntu 14 upgrade problem , because i installed ROS in Ubuntu

It is not possible to upgrade with sudo do-release-upgrade from 14.04 to 16.04 with installed ROS packages.

The Indigo release of ROS is only available for Ubuntu 13.10 and 14.04. So you have properly Indigo installed on your system. For Ubuntu 16.04 only the Kinetic/Lunar release of ROS are available.

You can try to remove the ROS installation from your system (the packages at least), then upgrade to 16.04 and install Kinetic or Lunar. After that you have to adapt your ROS application to the new ROS release.

Since removing ROS, upgrade and reinstall ROS will create a lot of friction I would recommend to fresh installation of Ubuntu 16.04 or 18.04.


How to 'tab' an entire paragraph while composing an email in Thunderbird Mail?

In Thunderbird, select Write and type your paragraph.

On completion, highlight the whole paragraph you want indented and then select the option Indent Text (move right).

Your whole paragraph will then be indented.


Systemd on Ubuntu 16.04 gives no such interface error

There were two reasons for my problem.

Firstly, my .service file location was wrong. It should be /etc and not /lib.

Secondly, upstart was installed earlier by me. This prevents .service files from running (I don't know why). Once I uninstalled upstart and re-installed systemd, the problem was solved!


cp - cannot create regular file : permission denied

Check if you are really superuser with:

whoami

if the output is root, then you are superuser and you can make the copy of the file with:

cp -f /tmp/ok_pcscd_hotplug.sh /lib/udev/.

otherwise you have to use sudo:

sudo cp -f /tmp/ok_pcscd_hotplug.sh /lib/udev/.

If you're still not able to write to the directory, then it is possible that:

the directory has the immutable flag enabled. check with lsattr.
the directory is mounted with read-only permissions: type in terminal:

cat /proc/mounts (or mount or cat /etc/mtab)

and check the output, if directory is mounted read-only.

If you are in the first case, change the directory attributes with chattr;

remove immutable flag on file or directory chattr -i <file/dir>
adding immutable flag on file or directory again chattr +i <file/dir>

If you're in the latter case, edit the file /etc/fstab.


How to install Canon LBP330 in Lts 16.04

Try the following:

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

Official page

Any difficulties try this question here. Hope it helps


Writing a find command with ffmpeg to process videos

IMHO, the "Good" way to do this is to break it into two steps:

Find the big files.
"Fix" them.

And, I'd put step 2 into a bash script, stored in /home/username/bin/fixvideos

My find command would then look like:

find '/home/username/Videos/' -type f -name '*.mkv' -size +3G -print0 |\
    xargs -0 --no-run-if-empty /home/username/fixvideos

and, the script in /home/username/fixvideos is something like:

#!/bin/bash
# handle "-v" or "--verbose" as optional 1st parameter, the rest are "*.mkv" files
# which will be rescaled and converted to ".mp4", using ffmpeg
declare -i verbose=0
#
if [[ "$1" = "-v" ]] || [[ "$1" = "--verbose" ]] ; then
    verbose=1
    shift
fi

while  [[ $# -ne 0 ]]  ; do
    # the base name, without the extension
    bname="${1//.mkv}"
    oname="$bname.mkv"
    if [[ $verbose -ne 0 ]] ; then
       echo "Reading $1, writing $oname" >&2
    fi
    ffmpeg -i "$1" -c:v libx264 -c:a copy -acodec copy \
       -vf scale="trunc(oh*a/2)*2:720" -preset superfast \
       -crf 24 -b:v 400k "$oname"
    #
    # shift all the filenames down so the next file is actually next
    shift
done
exit 0


Installing Samsung Magican on Linux

There is something called samsung magician dc that you can install in linux. It can be downloaded from this link. The manual can be found in that dropdown list. Extract the tarball from the first link, and open the resulting folder. There will be two directories, 64-bit and 32 bit. Open the one corresponding to your operating system. The samsung magician executable is in this folder. The file is a simple binary so make it executable and run it.

Using Samsung Magician On Linux

The usage of samsung magician is described in the manual. Also some information on how to use the software can be obtained from sudo ./magician --help. One thing to know is that you pretty much always have to run magician as superuser. For example to list the samsung disks attached to your system you would use the command sudo ./magician -L There are many more operations desribed in the manual.

Installing firmware

The Samsung magician dc manual is vague on how to install firmware (specifically on how to lay out the directory containing the firmware). To see how to install firmware see this answer.

Perfomance update

The 840 evo has a performance update which (I think) is independent from firmware and cannot be done with samsung magician dc. I think this performance update was the original goal of your question, so I will address it. The performance update can be found here. I have not done this update, but the installation guide is there.


Does Firefox have something similar to ActiveX in terms of security vulnerabilities?

does firefox under ubuntu has something similar to activeX, in terms of security vulnerability?

‘ActiveX’ can be considered in two parts, the object model and the installation method. Firefox has something similar—and cross-platform compatible, Ubuntu or other—for both.

The object model of ActiveX is Microsoft COM; Firefox's equivalent is XPCOM. Many other Windows features and applications that are nothing to do with web browsing use MS COM, and there have traditionally been endless problems where COM controls that were not written for secure web usage were nonetheless available to web pages. This caused many compromises. Firefox is better off here as XPCOM is not shared with the rest of the system. Newer versions of IE have better controls for mitigating what sites are allowed to use what controls.

(As a side-issue, because many add-ons for Firefox are themselves written in JavaScript, a high-level scripting language, they are often more secure from buffer overflow and string handling errors than extensions for IE which are commonly written in C[++].)

The control-downloader part of ActiveX has also been cleaned up a bit since the bad old days when anything in the My Computer zone could install any software it liked, and aggressive loader scripts could trap you in an alert loop until you agreed to approve the ActiveX prompt. Firefox's equivalent, XPInstall, behaves largely similarly, with the ‘information bar’ on all but Mozilla's sites by default and a suitable warning/prompt before installation.

There is another built-in way you can compromise yourself in Mozilla: signed scripts. I have never seen this actually used, and certainly there'll be another warning window appear before a script gains extra rights, but it kind of worries me that this is available to web pages at all.

  for example an exploit through flash will gain access to my pc under my user rights

Yes, the majority of web exploits today occur in plugins. Adobe Reader, Java(*) and QuickTime are the most popular/vulnerable. IMO: get rid of those, and use FlashBlock to only show Flash when you want it.

(*: and Java's dialogues before it lets you give up all security to some untrusted applet is a bit bare too.)

Ubuntu gives you some questionable plugins by default, in particular a media player plugin that will make every vulnerability in any of your media codecs exploitable through the web (similar to the Windows Media Player plugin, only potentially with many more formats). Whilst I have yet to meet an exploit targeting Linux like this, that's really only security through obscurity.

Note that ActiveX itself is no different. A web browser compromise based on ActiveX still only gives user-level access; it's only because prior to Vista everyone habitually ran everything as Administrator that this escalated to a full-on rooting.

  and then follow to exploit some known vulnerability in X to gain root rights. that is not "easy".

Maybe, maybe not. But I think you'll find the damage some malware can do from even a normal user account is quite bad enough. Copy all your personal data, observe your keypresses, delete all your documents...


How to hide terminal output when executing a command?

If you can avoid writing stuff in the console, it depends on how output from the program is created. If it is streamed to standard output, then it is just enough to do

$ eclipse >/dev/null

and no output should be made.

To suppress error messages as well:

$ eclipse >/dev/null 2>&1

Or in bash, simply:

$ eclipse &>/dev/null

But if they do it somehow differently then it might be a problem to stop it from writing in the console.

if possible use the solution given by MuffinStateWide


git grep
You can use git grep for multiple patterns combined using Boolean expressions, e.g.:
git grep --all-match --no-index -e "fax" --and -e "phone" --and --not -e "address"

You can combine different patterns with Boolean expressions such as --and, --or and --not.

--all-match When giving multiple pattern expressions, this flag is specified to limit the match to files that have lines to match all of them.
--no-index Search files in the current directory that is not managed by Git.
-l/--files-with-matches/--name-only Show only the names of files.
-e The next parameter is the pattern. Default is to use basic regexp.

Other params to consider:

--threads Number of grep worker threads to use.
-q/--quiet/--silent Do not output matched lines; exit with status 0 when there is a match.

To change the pattern type, you may also use -G/--basic-regexp (default), -F/--fixed-strings, -E/--extended-regexp, -P/--perl-regexp, -f file, and other.
Check man git-grep for further help.
grep
Here is the grep syntax which uses chain of command substitutions:
grep -L "address" $(grep -l "phone" $(grep -rl "fax" .))

Explanation:

Find the filenames having the "fax" pattern (grep -rl "fax" .).
Filter found filenames which are having "phone" pattern (grep -l "phone" $(cmd)).
Filter further down to exclude files not having address (grep -L "address" $(cmd)).

If you're working with large data, consider using ripgrep instead.
find
Above example may not work well with files with whitespaces, so here is the version with find:
find . -type f -name '*.txt' \
  -execdir bash -c 'grep -L "address" "$(grep -l "phone" "$(grep -l "fax" "{}")")"' ';' \
2>/dev/null

See also: Check if all of multiple strings or regexes exist in a file


Setting the user environment variables in bash_profile

Include that source command into .bashrc to run it automatically when opening a terminal. You only see a hidden file, i.e. a file of which the name starts with a dot, in the output of ls if you use the -a option.


Correct your sources.list as suggested here.
Backup your existing list (not because it's useful but because it's a best practice)

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

Install a correct sources.list:

sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list

Add the universe repository:

sudo apt-add-repository universe

Install wine for your architecture:

for 32-bit:

sudo apt install wine32

OR for 64-bit

    sudo apt install wine64

If you are running a GUI you might wish to open Software & Updates and check that you have all your desired repositories enabled there. I usually check everything on the Ubuntu Software tab and officially supported non-free drivers as well as important security and recommended updates on the Other Software tab.

Note:
Be aware that there are still some multiarch dependancy issues

Personally I'm still running wine on 16.04 as while you can install mono under 18.04 with sudo apt install mono-complete some programs I use require gecko and there's currently no gecko package available for 18.04

Sources:

How do I enable the "Universe" repository?

https://packages.ubuntu.com/search?keywords=wine&searchon=names&suite=bionic&section=all

How do I restore the sources.list file?


How to listen live sounds from input from external sound card?

Your problem is likely that the automatically picked source and/or sink for the loopback module is wrong. If you don't specify the source and sink when loading the module, e.g. with:

pactl load-module module-loopback latency_msec=1 source=1 sink=0

then the source and sink are picked automatically. To get the name of your sinks and sources you can use pactl list sources and pactl list sinks. From that output you can use in the above command the number id of the source, or its name, which can be something like alsa_output.pci-0000_00_14.2.analog-stereo.

But the easier way is likely to just simply use

pactl load-module module-loopback latency_msec=1

and then launch pavucontrol, go to the Recording tab, change Show: Applications to Show: All streams. Now you can see from where the loopback module is recording, change it to the source from which your piano sound is coming. Then go to the Playback tab, and do similiarily and change the output of the loopback module to the sound sink where you would like to hear your piano.


total newbie please help with installing the ISO

You should first use a hypervisor like VirtualBox (free) on your Windows, to create a virtual Linux, and experiment there, while you still use Windows.. once you are ready to convert your hardware, and know what you are doing, then install on the hardware.. this way you will be able to revert back to saved snapshots, with ease, when you screw up..


Change default location of programs / users

I think what you want is to move your /home folder to the 1Tb drive, while keeping the system files (including applications) on the fast SSD drive.

You can achieve that by moving the contents of your /home folder to the other drive and then adding a line to /etc/fstab which will tell the system to mount it at /home

So, as root, in terminal (I would do that while booted in the "rescue mode" or from a live cd), you need to do something like

mv /home/* /media/disk/
nano /etc/fstab

(replace /media/disk by the path where your 1Tb drive is mounted at)

And then add a line similar to

/dev/sdb1       /home       ext4    relatime,errors=remount-ro      0       1

(replace /dev/sdb1 by the name of your 1Tb drive - you can see it by doing 'cat /etc/mtab', for example)
Then you can test if it works by mounting/unmounting the /home and checking if it works:

mount /home
ls /home # see if the contents appeared
umount /home

then reboot and enjoy


Still using mirage, this script to copy a file's contents and a custom action (Edit -> Custom Action) does the job.

Script:

#!/bin/bash
command -v xclip >/dev/null 2>&1 || { echo "Need command xclip. Aborting." >&2; exit 1; }
[[ -f "$1" ]] || { echo "Error: Not a file." >&2; exit 1; }
TYPE=$(file -b --mime-type "$1")
xclip -selection clipboard -t "$TYPE" < "$1"

Action:

/home/user/path/to/script %F


How much disk space does a clean Ubuntu Studio installation need?

A minimum of 7.6 GB are required for a clean ubuntu-studio-12.04 install:


Login takes long time when there's no internet

Laptop ethernet?  Your graphical boot animation/logger (Plymouth) is waiting for your hardline net connections so you can mount any network file systems.  To remedy your problem, you can keep either change the timeout for Plymouth, or you can specifiy your ethernet adapter to not be configured by NetworkManager -- try appending 'auto eth0 inet dhcp' to your /etc/network/interfaces file.


How to enter the BIOS when the fastboot mode of the motherboard is enabled?

This in terminal worked for me just now with an Asrock A300W:

  systemctl reboot --firmware-setup

source: http://forum.asrock.com/forum_posts.asp?TID=5578


Bridge wireless connection from OSX 10.8 to Ubuntu 12.04 LTS

You can bridge the wireless connection to the wired connection on the mac system.
Then you connect both pcs by an ethernet cable. If at least one system has GbE, you don't need a crossover cable.

I think it will be much easier to buy an 10€ usb wifi connector. Watch out for Linux compatibility.


NetworkManager constantly prompts for admin password

The best way to set polkit rules is by creating a pkla file, as opposed to editing the policy files in /usr (which get overwritten on updates)
Here is a step by step process to allow stop those annoying wifi-scan password prompts:

In terminal, run sudo su -
cd /etc/polkit-1/localauthority/50-local.d
nano 10-network-manager.pkla

Then paste in the following:
[Allow wi-fi scans for all users]
Identity=unix-user:*
Action=org.freedesktop.NetworkManager.wifi.scan
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Save and exit using CTRL+X and y
service network-manager restart

This worked for me on Ubuntu 20.04


go to (ubuntu software center) and search (PulseAudio volume control) or (PulseAudio)

and go terminal and put (alsamixer)


Netplan configuration error: "Invalid YAML ... did not find expected key."

So, with regards to the specific error you're getting, you've failed basic YAML syntax and indentation, which is one of the reasons netplan is complaining.  YAML is extremely indentation-oriented for how it interprets commands, config arguments, etc.  You need to have proper indentation for YAML configs to be parsed.  Surprise, you aren't doing that at all, and breaking YAML syntax.  That's why netplan is complaining because you aren't providing proper YAML.

But even more importantly than the YAML syntax which will make Netplan work, you have some critical failures with your network configuration, and you really need to fix these regardless.  These failures are, specifically:

10.0.2.15/64 is not a valid IPv4 CIDR range.  The acceptable CIDR ranges are between /0 (for all IPv4) and /32 (for a single address) for IPv4.  Most networks are /24 for the CIDR range (with this IP range, that would encompass 10.0.2.1 - 10.0.2.255 as usable address space, though I would assume the .1 is the Gateway and the .255 is the Broadcast, but that might differ in your network so double check all the values!).  The proper CIDR range is needed so the system knows what its netmask and reachable IP space is.
10.0.2.0 isn't a proper gateway address.  The .0 address is not a usable address in IP subnetting, as it's usually held by the network prefix alone.  And since your netowrk config attempts to do a /24 but horrendously fails, this gateway should probably be 10.0.2.1 - but again, double check these values with your network admin first.

So, fixing your indentation and fixing the network to assume it's a /24 based on the attempted IP and gateway you specified, your YAML should look like the below, with the proper indentations.  And compared to your existing one, you really need to learn how indentation works.

network:
  version: 2
  ethernets:
    enp0s3:
      dhcp4: no
      dhcp6: no
      addresses: [10.0.2.15/24]
      gateway4: 10.0.2.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]


At least in version 4.2.0.11, there does appear to be such an option

$ skype --help
Skype 4.2.0.11

Usage: skype [options]
Options:
  --dbpath=       Specify an alternative path to store Skype data files.
                        Default: ~/.Skype
  --resources=    Specify a path where Skype can find its resource files.
                        Default: /usr/share/skype
  --secondary           Start a secondary instance of Skype.
  --disable-api         Disable Skype Public API.
  --callto
  skype:?
                        These commands allow Skype links handling.
  --pipelogin           Command line login. "echo username password | skype --pipelogin"
  --version             Display version information and exit.

$ skype --version
Skype 4.2.0.11
Copyright (c) 2004-2013, Skype
$


The output of btrfs subvolume list / shows multiple subvolume snapshots (apparently created by an apt trigger for backup). Those can claim a lot of disk space, if many file blocks have been changed since the creation of the snapshot, and they don't show up in the directory listings (and therefore don't contribute to the disk usage of the listed files).

You can delete old (or all) snapshots with btrfs subvolume delete [snapshot name] (see man 8 btrfs for details) if you feel you don't need them anymore. Afterwards a periodically (typically every few seconds) run btrfs kernel service will release the now unused disk space within a minute or so.

If you want do disable or reconfigure that apt trigger, I suggest you create a new question.

On a completely different note, I suggest you add the ssd mount flag to your root partition. /home has it already.


Set Self Signed Certificate for single VirtualHosts

You seem to be listening to port 80 instead of port 443 in your Virtual Host configuration.

The top line should be:

<VirtualHost *:443>

There might be another issue as well. You mention the following:

  I have some virtual hosts that I want to protect, so I tried to use the same certificate to access my sites in https [...]

Yet, you also mention that you are accessing your sites with the server's IP address.

This approach will not work, you cannot have multiple virtual hosts listening on the same host, only one will work.

For example, consider you have the following two virtual hosts:

example.conf
kopakabana.conf

When you access your server through Apache, it will need to figure out which site it needs to serve. It cannot serve both.

Since you access your site through an IP, Apache will serve the first matched virtual host. In your case, it may be resolving to the default config file.

What you need to do is to actually assign a server name to your virtual hosts. And if you want to run them with the same certificate, you can create them as subdomains and assign them a wildcard certificate.

For example, consider the following virtual hosts:

example.conf

<VirtualHost *:443>
    ServerName example.mymachine.local
    # [...]
</VirtualHost>

kopakabana.conf

<VirtualHost *:443>
    ServerName kopakabana.mymachine.local
    # [...]
</VirtualHost>

In this case, you would create a certificate for *.mymachine.local and use it on both of them.

Next, just edit the /etc/hosts file on your own machine and append the following to it so your browser can resolve the domain properly.

192.168.1.202   example.mymachine.local
192.168.1.202   kopakabana.mymachine.local

Finally, instead of accessing https://192.168.1.202, you would access https://kopakabana.mymachine.local or https://example.mymachine.local.


How can I find out what app is running (actual name, not published name)?

Try

grep -i "access prompt" /usr/share/applications/*.desktop
/usr/share/applications/gcr-prompter.desktop:Name=Access Prompt

In this example, the application's "common" name is Access Prompt and the name that shows up in the output of something like ps -o pid,ppid,stime,time,command -u $USER is gcr-prompter.

This approach has two limitations:
  - it only looks in /usr/share/applications (because that's where most .desktop files are found). But some .desktop files may only be in ~/.local/share/applications.
  - depending on how you define a "application", some applications may not have a .desktop file. In such cases, the application's "common" name and actual name will be the same.


Ubuntu 12.04 and 13.10 freeze and white screen with nvidia gtx 660

Thanks for the reply floppy!

What I did in the end was to do a clean install of 12.04 and install nvidia-304. Then I got the familiar black screen with a white-outline cross, but when I typed my password and hit "enter" i got a white screen and could do Alt-t to open a terminal.

What eventally solved it was switching to Unity 2d by typing:

sudo /usr/lib/lightdm/lightdm-set-defaults -s ubuntu-2d

Now, after installing mesa-utils, the system recognized my graphics card and I can see that it is in use by using the command:

sudo /sbin/lsmod | grep nvidia

I will have to make due with unity 2d :)


Pressing AltSuperS will disable or enable speech dispatcher.

The last thing you should hear is "screen reader off" :-

ps. The Super key is the "windows" key...


File manager doesn't remember list preference

Open the file manager go to preferences and set View new folders using to List View.
This will change the default view, which should stick after a reboot.


Brightness problem with ubuntu 15.10 and z500 lenovo laptops

That's indeed a tough one, I agree... Here's a possible solution.

First we would have to boot ubuntu in recovery mode ('Advanced options for Ubuntu') and drop to a 'root' shell.

1.) As you see in the UI menu, the 'filesystem state' is 'read only',so first we would have do remount the '/' (root) filesystem read/write:

The command for this is... (as described here)

mount -o remount,rw /

That change will not be permanent, but only for the current session.

2.) Now we try to give the system some default brightness value after boot:

For that we ad a basic instruction to a file called '/etc/rc.local'. Open that file

nano /etc/rc.local

Use the arrow keys and ad the following line just above the 'exit 0' statement. The value '2000' should do but you can change that afterwards. Also this is for Intel GPUs only. For other brands the command would be different.

echo 2000 > /sys/class/backlight/intel_backlight/brightness

Save the file with < ctrl >X and the 'Y' key.

Maybe we have to enable the rc.local service

systemctl enable rc.local
systemctl start rc.local

3.) You can now exit the 'root' shell. Type...

exit

... and then 'Resume normal boot' from the UI.

4.) If we are lucky you should now have some brightness in your Ubuntu system. You can now play with the '2000' value in a terminal with something like...

echo 2250 | sudo tee /sys/class/backlight/intel_backlight/brightness

If you found your desired value, change it in /etc/rc.local, to make it permanent (see above).

sudo nano /etc/rc.local

Indeed that doesn't yet solve your 'brightness key' problem, but you get a working system. I think that's a good start.


Error "503 OUT OF DISK SPACE" when installing a package

The error is from the server, so either it is broken ( unlikely ) or you are using a proxy server and it is broken/out of space.  Wait a while and it will probably clear up.


How do I add make a directory like a variable?

There are many ways to set a variable. To make it available globally you can use:

export SPEC_DIR=/my/directory

To make this persist over reboot you can add it  to $HOME/.bashrc or more globally in /etc/environment.

If you want to use it just in one script you could just set it with:

SPEC_DIR=/my/directory


Wifi will be amazing, and then it will go away

Please try opening a Terminal window at startup and simply type

ping www.google.com

As for me, I received a message "ping: sendmsg: No buffer space available" after some time. This was due to an unsupported network card by the kernel. For me, it helped to install a new kernel.

... or you can try this solution for your RTL8188EE wifi card:
Wireless not working on Toshiba Satellite C55-A5281


Open the terminal and type:
sudo snap remove snap-store

When you right-click an application's icon and select Show Details, the Software app opens and shows details about that app. Of course in order to open the Software app it must be installed.
There are two different software apps in Ubuntu 20.04, Software  and Snap Store . The Snap Store was originally named Ubuntu Software before the first point release of Ubuntu 20.04 was released. Now it is named the Snap Store and as its name suggests it has only snap packages in it. The Software app has both snap and .deb software in it. The Snap Store and the Software app can be installed alongside each other without removing either app.
If the app with the orange shopping bag icon that was named Ubuntu Software in Ubuntu 18.04 got removed in 20.04 it can be reinstalled by running sudo apt install gnome-software.  My Ubuntu 20.04 was upgraded from Ubuntu 18.04. The old Ubuntu Software app's name was changed to Software by the upgrade and the color of the app's shopping bag icon changed from orange to light blue. Even though the name of the app has changed, the name of the app's package is still gnome-software.


OWA works from Browser and MS Outlook but fails from Evolution-EWS

You may be better off switching to Thunderbird and using the OWL extension.
Owl for Exchange

There is a free trial and then it costs 10 euros per year. My experience has been that it works well to access email, calendar, and contacts for EWS and OWA and is well worth the money. I have tried Evolution and Kmail with little to no success. If you are able to find a way for OWA to work reliably in Evolution please post a response here.


syslinux.cfg must be a text file, not binary, here is the SYSLINUX documentation. Can you just borrow a working file, or create a new one with an entry

label live
menu label Start Linux
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz --

(remove the persistent file=/cdrom/preseed/ubuntu.seed if you don't have one)


How to include a space character with grep?

Make sure you quote your expression.
$ grep ' \.pdf' example
grep .pdf

Or if there might be multiple spaces (we can't use * as this will match the cases where there are no preceding spaces)
grep ' \+\.pdf' example

+ means "one or more of the preceding character". In BRE you need to escape it with \ to get this special function, but you can use ERE instead to avoid this
grep -E ' +\.pdf' example

You can also use \s in grep to mean a space
grep '\s\+\.pdf' example

We should escape literal . because in regex . means any character, unless it's in a character class.


Wireless network keeps prompting for password, unable to connect on Ubuntu 16.04

In your paste, we see this:
Cell 01 - Address: <MAC 'LIMYPfamily1' [AC1]>
                    ESSID:"LIMYPfamily1"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    Extra:wpa_ie=dd1a0050f20101000050f20202000050f2040050f20201000050f202
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    Extra:
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    Quality=43/100  Signal level=47/100
                    Extra:fm=0001

Most wireless drivers in Linux don't work very well with TKIP. In addition, it is the least secure of all the protocols available. This suggests that your routers are set to factory defaults which are neither as secure as possible nor Linux-friendly. I suggest a few tweaks.
WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.
Next, I recommend that your regulatory domain be set explicitly. Check yours:
sudo iw reg get

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

Of course, substitute your country code if not Iceland. Set it permanently:
sudo nano /etc/default/crda

Change the last line to read:
REGDOMAIN=IS

Proofread carefully, save (Ctrl+o followed by Enter) and close (Ctrl+x) the text editor.
Is there any improvement?


Issues installing makerware on Ubuntu Linux 15.04 vivid

Yeah just been through this process myself and discovered makerbot software is simply not up to date. For example it has dependences compiled against Mesa 10.5.9 and we are currently at 11.1.

I simply don't want to roll back a HUGE chunk of my Linux 15.04 install to satisfy this software so will give it a pass.

Cura appears to work btw, however I have yet to figure out howto connect up my EcubMaker with it just yet (profiles all set to go, just no communication over USB/COMS, even thought it connects).


Ununtu 15.10 desktop on a HP Laptop Video Driver Issues Nvida

I got it working.  Yea I figured it out on my own big pat on my back as a new user.  Here is what I did.

ctrl alt f1 (to get to CLI)

sudo apt-get install NVidia-current

sudo reboot

and then it worked.

Thanks


Try this

Installation

A few important points with the approach here:

Some Xerox printers are Samsung OEM. This printer looks like a clone of Samsung SCX-4521F [www.samsung.com]. Treat this printer like the latter whenever possible.
Use CUPS for the printer.
Use the Samsung Unified Linux Driver for the scanner.

Step 1: Setup the Repository for Samsung Unified Linux Driver

No free or open-source alternatives are available to make full use of this multifunction printer yet. You will see later that we need the Samsung Unified Linux Driver mainly for supporting the scanner.

Add the following repository:

deb http://www.bchemnet.com/suldr/ debian extra

You can do this with Synaptic Package Manager, Software Sources, etc.
2. Install the GPG key, from http://www.bchemnet.com/suldr/suldr.gpg, for the repository. You can do this with Synaptic Package Manager or Software Sources, or paste this line to your terminal:

wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -

Reload / update the repository information.

Step 2: Install the Printer Driver

Here, you can choose to use either one of the following drivers:

The open-source driver provided by the Splix project. (Check this too: http://www.linuxprinting.org/show_drive ... iver=splix)
The Samsung unified printer driver. In this case, install the samsungmfp-driver package.

Either of the drivers seems to work fine. I personally do not have any particular recommendation yet until further testing. (For the moment I use the Splix driver.)

From the start menu, invoke System -> Administration -> Printing.
Use the driver for 'Samsung SCX-4500 Series'. Choose either the Splix or the Samsung driver according to your preference.
Check the 'Printer Options' in the 'Printer Properties'. Change the options where appropriate (especially the 'Paper Size').
Try to print a test page. It should work!

Step 3: Install the Scanner Driver

Install the samsungmfp-scanner package.
{SKIP THIS for Ubuntu since 10.04. But tell me if you found that this step is necessary for the scanner to work.} Add users you allow to access the scanner into the lp group. You can use System -> Users and Groups from the start menu to do this, or use the adduser command.
Reboot the computer. (Restarting some service(s) should do the trick too. But I haven't figured out which one. Tell me if you've found it.)
Now Graphics -> Simple Scan or xsane should be able to detect and use the scanner! You can use sane-find-scanner or scanimage -L to detect the scanner too.


How can I have Rhythmbox download album art for tracks?

AlbumArtSearch is a third party plug in for Rhythmbox that will search for and download the cover art for the currently playing track. Unfortunately, it doesn't run in the background automatically, though the fact that you can refine searches makes sure you get the covers that you are actually looking for.

First install the two dependencies:

sudo apt-get install python-webkit python-mako

Next download the plugin. You can get it at the link above or run:

wget http://albumartsearch.googlecode.com/files/albumartsearch_0.2.tar.gz

Finally you need to extract it in the folder ~/.gnome2/rhythmbox/plugins This can be done with Nautilus or by running these commands:

mkdir -p  ~/.gnome2/rhythmbox/plugins
tar -xvf albumartsearch_0.2.tar.gz -C ~/.gnome2/rhythmbox/plugins


Why file executing are prefixed with dot and slash?

Because the directory you are in is not in your PATH.

What you want is possible with ...

export PATH=$PATH:.

You could add this to wherever you currently have your PATH set but a fair warning: this is a potential security risk because you could replace standard commands like ls. Never ever put the "." in front of any other directory. NEVER.


For an old machine with 4 GB of RAM, is a 32-bit or 64-bit system faster?

64bit is typically faster but does use slightly more RAM. If you are running into a situation where 64bit addressing is using up all your RAM, that could be an argument for using 32bit.

That said, 4GB of RAM is plenty for a typical desktop. Therefore the issue you are seeing is likely nothing to do with the architecture and probably something else (a wonky driver, hardware fault, etc).

And that said, trying 32bit might not hurt. It's monetarily free and the only real cost is the time it takes to download and install. There's no other way to switch between architectures.


Unable to purge efi-grub in live session

Okay, I found another way. I oversee in my question that ubiquity would also be gone.
Start live-session.
pkexec gparted

Create a MS-DOS partition and file system for / and others (maybe for $HOME) and format them. Start installation over desktop starter.
When it comes to create file system choose I thought it is called some thing else,
integrate your existing file system with the right mount points without formatting.
Ignore all warnings for EFI file system and proceed with the installation.  After installation (error pop up can not install GRUB to /dev/sd* (whatever your hard drive is named))
Ignore it.
Next step is important, do not quit live-session go back to it
and run
sudo dpkg-reconfigure grub-pc

Choose your hard drive and let GRUB install itself in MBR.
I saw no error. Remove installation media and start Ubuntu from the hard drive.


What is the best way to install Python packages?

updated: 2019-05-11: This post mostly mentions virtualenv, but according to the Python doc about module installation, since Python 3.5 "the use of venv is now recommended for creating virtual environments", while virtualenv is an alternative for versions of Python prior to 3.4.

updated: 2018-08-17: since conda-4.4.0 use conda to activate anaconda on all platforms

updated: 2017-03-27: PEP 513 - manylinux binaries for PyPI

updated: 2016-08-19: Continuum Anaconda Option

This is somewhat a duplicate of easy_install/pip or apt-get.

For global Python packages, use either the Ubuntu Software Center, apt, apt-get or synaptic

Ubuntu uses Python for many important functions, therefore interfering with Python can corrupt your OS. This is the main reason I never use pip on my Ubuntu system, but instead I use either Ubuntu Software Center, synaptic, apt-get, or the newer just apt, which all by default install packages from the Ubuntu repository. These packages are tested, usually pre-compiled so they install faster and ultimately designed for Ubuntu. In addition all required dependencies are also installed and a log of installs is maintained so they can be rolled back. I think most packages have corresponding Launchpad repos so you can file issues.

Another reason to use either Ubuntu packages is that sometimes these Python packages have different names depending on where you downloaded them from. Python-chardet is an example of a package which at one time was named one thing on PyPI and another thing in the Ubuntu repository. Therefore doing something like pip install requests will not realize that chardet is already installed in your system because the Ubuntu version has a different name, and consequently install a new version which will corrupt your system in a minor insignificant way but still why would you do that.

In general you only want to install trusted code into your OS. So you should be nervous about typing $ sudo pip <anything-could-be-very-bad>.

Lastly some things are just easier to install using either Ubuntu packages. For example if you try pip install numpy to install numpy & scipy unless you have already installed gfortran, atlas-dev, blas-dev and lapack-dev, you will see an endless stream of compile errors. However, installing numpy & scipy through the Ubuntu repository is as easy as...

$ sudo apt-get install python-numpy python-scipy

You are in luck, because you are using Ubuntu, one of the most widely supported and oft updated distributions existing. Most likely every Python package you will need is in the Ubuntu repository, and probably already installed on your machine. And every 6 months, a new cycle of packages will be released with the latest distribution of Ubuntu.

If you are 100% confident that the package will not interfere with your Ubuntu system in any way, then you can install it using pip and Ubuntu is nice enough to keep these packages separate from the distro packages by placing the distro packages in a folder called dist-packages/. Ubuntu repository has both pip, virtualenv and setuptools. However, I second Wojciech's suggestion to use virtualenv.

For personal Python projects use pip and wheel in a virtualenv

If you need the latest version, or the module is not in the Ubuntu repository then start a virtualenv and use pip to install the package. Although pip and setuptools have merged, IMO pip is preferred over easy-install or distutils, because it will always wait until the package is completely downloaded and built before it copies it into your file system, and it makes upgrading or uninstalling a breeze. In a lot of ways it is similar to apt-get, in that it generally handles dependencies well. However you will may have to handle some dependencies yourself, but since PEP 513 was adopted there are now manylinux binaries at the Python Package Index (PyPI) for popular Linux distros like Ubuntu and Fedora. for example as mentioned above for NumPy and SciPy make sure you have installed gfortran, atlas-dev, blas-dev and lapack-dev from the Ubuntu repository For example, both NumPy and SciPy are now distributed for Ubuntu as manylinux wheels by default using OpenBLAS instead of ATLAS. You can still build them from source by using the pip options --no-use-wheel or --no-binary <format control>.

~$ sudo apt-get install gfortran libblas-dev liblapack-dev libatlas-dev python-virtualenv
~$ mkdir ~/.venvs
~$ virtualenv ~/.venvs/my_py_proj
~$ source ~/.venvs/my_py_proj/bin/activate
~(my_py_proj)$ pip install --no-use-wheel numpy scipy

See the next section, "You're not in sudoers", below for installing updated versions of pip, setuptools, virtualenv or wheels to your personal profile using the --user installation scheme with pip. You can use this to update pip for your personal use as J.F. Sebastian indicated in his comment to another answer. NOTE: the -m is really only necessary on MS Windows when updating pip.

python -m pip install --user pip setuptools wheel virtualenv

Newer versions of pip automatically cache wheels, so the following is only useful for older versions of pip. Since you may end up installing these many times, consider using wheel with pip to create a wheelhouse. Wheel is already included in virtualenv since v13.0.0 therefore if your version of virtualenv is too old, you may need to install wheel first.

~(my_py_proj)$ pip install wheel  # only for virtualenv < v13.0.0
~(my_py_proj)$ pip wheel --no-use-wheel numpy scipy

This will create binary wheel files in <cwd>/wheelhouse, use -d to specify a different directory. Now if you start another virtualenv and you need the same packages you've already built, you can install them form your wheelhouse using pip install --find-links=<fullpath>/wheelhouse

Read Installing Python Modules in the Python documentation and Installing packages on the Python Package Index main page. Also pip, venv, virtualenv and wheel.

If you're not in sudoers and virtualenv isn't installed.

Another option to using a virtual environment, or if you are using a Linux share without root privileges, then using either the --user or --home=<wherever-you-want> Python installation schemes with Python's distutils will install packages to the value of site.USERBASE or to wherever you want. Newer versions of pip also have a --user option. Do not use sudo!

pip install --user virtualenv

If your Linux version of pip is too old, then you can pass setup options using --install-option which is useful for passing custom options to some setup.py scripts for some packages that build extensions, such as setting the PREFIX. You may need to just extract the distribution and use distutils to install the package the old-school way by typing python setup install [options]. Reading some of the install documentation and the distutils documentation may help.

Python is nice enough to add site.USERBASE to your PYTHONPATH ahead of anything else, so the changes will only effect you. A popular location for --home is ~/.local. See the Python module installation guide for the exact file structure and specifically where your site-packages are. Note: if you use the --home installation scheme then you may need to add it to the PYTHONPATH environment variable using export in your .bashrc, .bash_profile or in your shell for your localized packages to be available in Python.

Use Continuum Anaconda Python for Math, Science, Data, or Personal Projects

If you are using Python for either math, science, or data, then IMO a really good option is the Anaconda-Python Distribution or the more basic miniconda distro released by Anaconda, Inc. (previously known as Continuum Analytics). Although anyone could benefit from using Anaconda for personal projects, the default installation includes over 500 math and science packages like NumPy, SciPy, Pandas, and Matplotlib, while miniconda only installs Anaconda-Python and the conda environment manager. Anaconda only installs into your personal profile, ie: /home/<user>/ and alters your ~/.bashrc or ~/.bash_profile to prepend Anaconda's path to your personal $PATH recommends sourcing conda.sh in your ~/.bashrc which lets you use conda activate <env|default is base> to start anaconda - this only affects you - your system path is unchanged. Therefore you do not need root access or sudo to use Anaconda! If you have already added Anaconda-Python, miniconda, or conda to your personal path, then you should remove the PATH export from your ~/.bashrc, and update to the new recommendation, so your system Python will be first again.

This is somewhat similar to the --user option I explained in the last section except it applies to Python as a whole and not just packages. Therefore Anaconda is completely separate from your system Python, it won't interfere with your system Python, and only you can use or change it. Since it installs a new version of Python and all of its libraries you will need at least 200MB of room, but it is very clever about caching and managing libraries which is important for some of the cool things you can do with Anaconda.

Anaconda curates a collection of Python binaries and libraries required by dependencies in an online repository (formerly called binstar), and they also host user packages as different "channels". The package manager used by Anaconda, conda, by default installs packages from Anaconda, but you can signal a different "channel" using the -c option.

Install packages with conda just like pip:

$ conda install -c pvlib pvlib  # install pvlib pkg from pvlib channel

But conda can do so much more! It can also create and manage virtual environments just like virtualenv. Therefore since Anaconda creates virtual environments, the pip package manager can be used to install packages from PyPI into an Anaconda environment without root or sudo. Do not use sudo with Anaconda! Warning! Do be careful though when mixing pip and conda in an Anaconda environment, b/c you will have to manage package dependencies more carefully. Another option to pip in a conda environment is to use the conda-forge channel, but also best to do that in a fresh conda environment with conda-forge as the default channel. As a last resort, if you can't find a package anywhere but on PyPI, consider using --no-deps then install the remaining dependencies manually using conda.

Anaconda is also similar in some ways to Ruby RVM if you're familiar with that tool. Anaconda conda also lets you create virtual environments with different versions of Python. e.g.: conda create -n py35sci python==3.5.2 numpy scipy matplotlib pandas statsmodels seaborn will create a scientific/data-science stack using Python-3.5 in a new environment called py35sci. You can switch environments using conda. Since conda-4.4.0, this is now different to virtualenv which uses source venv/bin/activate, but previous to conda-4.4.0 the conda commands were the same as virtualenv and also used source:

# AFTER conda-4.4
~/Projects/myproj $ conda activate py35sci

# BEFORE conda-4.4
~/Projects/myproj $ source activate py35sci

But wait there's more! Anaconda can also install different languages such as R for statistical programming from the Anaconda r channel. You can even set up your own channel to upload package distributions built for conda. As mentioned conda-forge maintains automated builds of many of the packages on PyPI at the conda-forge Anaconda channel.

Epilogue

There are many options for maintaining your Python projects on Linux depending on your personal needs and access. However, if there's any one thing I hope you take away from this answer is that you should almost never need to use sudo to install Python packages. The use of sudo should be a smell to you that something is amiss. You have been warned.

Good luck and happy coding!


How do I share my connection with ICS and an Xbox 360?

The issue is that these ports aren't opened with your router.

Port 88 (UDP)
Port 3074 (UDP and TCP)
Port 53 (UDP and TCP)
Port 80 (TCP)

Open these ports and it should be fixed. Though this website incorporates windows, you should be able to modify the info to suit ubuntu.

http://www.ehow.com/how_4550488_open-router-ports.html


Extremely bad sound (crackling) on analog/headphones with Realtek ALC892 Codec

Are you still having this issue? Supposedly the problem can be fixed by disabling "auto-mute". Use the command alsamixer and ensure your terminal window is widened so the option shows, then navgate to it with the arrow keys. I think up/down disables it. There are some that say this doesn't work though so I'm sorry if it doesn't fix the issue.


Hauppauge 610 Analog Video Capture Script or Command

Preliminary Steps

Launch VLC with vlc -vvv. This turns on verbosity to 2 (debug). This can also be seen in VLC GUI by going to Tools > Messages. Then follow the steps listed above in the screen shots to display the needed information for the command in the debug log. Then you can adjust the appropriate syntax by looking at the script below and online. You can also see the code and syntax by selecting Show more options. (The first screenshot in my question above.) However, this is only how I was able to create the cvlc command below. You may simply want to adjust the below script to your needs.

Initially, I was unable to get the audio to work with the one RCA audio port on my camcorder. I fixed this by going to Tools > Preferences > All (radio button, bottom left). Then I went to Input / Codecs > Access modules > ALSA. I changed the Sample rate to 48000 Hz. After changing this setting you will be able to stream your video. The other sample rates were causing an error.

Go to Media > Open Capture Device. Select Video device name and Audio device name (note that in the screen shot above it is default because I was using the microphone port instead. Yours will be different if you're using the RCA connection on your Hauppauge device.) Select NTSC (or whatever format your video tapes are). Click Play. While playing, go to Tools > Codec Information. You will want to adjust the below script according to the information given there. I adjusted the frame rate to 29.97 and sample rate to 48000 Hz. in my script because of the information given there.

About the Script

a. You are prompted to input the filename and metadata. Files are set to save to ~/Videos.

b. VLC (cvlc)

I set the timeout to 122 minutes because my 8mm tapes are two hours. The --foreground option allows you to hit 'ctrl c,' and it will stop only this portion of the script and continue to the next part. (Some videos I have are shorter.)
You can use VLC GUI to find the audio and video device names. (See the above screenshot.)
Know whether your video is NTSC or another format.
vcodec and acodec are set set to mpeg2 and mpga. The Amazon product page for the Hauppauge 610 states that it encodes to MPEG-2.
For MPEG-2, VLC GUI only gave the option for .ts format. (See second screenshot above.) Therefore I am using mux=ts. Initially I was using vcodec=h264 acodec=mpga and mux=mp4. However, there were audio sync issues and the sound would drop out at certain places in the video. Also see the mux= section here.
I needed samplerate=48000 for it to work.
The frames per second given on the Codec Information were 29.97. This is standard for VHS / 8mm tapes. Therefore, I decided to match it.
I chose to deinterlace. I thought this looked better.
Using mux=ts will create a large file. My two hour videos are 5-7 GB.

c. FFmpeg compresses further with libx264 (from about 5 GB to about 1.5 GB) and adds in the metadata. There were additional handwritten notes about each 8mm tape and I wanted to include this additional information with the file. In the same command, FFmpeg moves left channel audio from only left to both left and right channels as a stream copy with no additional audio compression. My camcorder has only one RCA audio port. So this fixes the one speaker issue. Thanks to mondaugen for their answer on the one-channel audio issue.

d. Lastly, you are notified when the script finishes. For my personal script, I am actually using the following instead.

On my computer:

exo-open --launch WebBrowser $HOME/Videos/video-finished.htm

File contains:
VIDEO FINISHED

On my phone:
You can install gcalcli to receive a notification on your phone via Google Calendar when the script completes. Below, the date and time for two minutes in the future is put into a variable. Then a calendar entry is created for that time. A reminder is set for the start of that event. Google Calendar needs a two minute buffer. (I tried one minute.) So, you would be notified two minutes after the encode finishes.

new_date=`date --date="2min"`
gcalcli --calendar 'Name of Your Calendar' --title 'Video Finished' --where '' --when \'"$new_date"\' --duration 5 --description '' --reminder 0 add

End Product

The final result produces the larger .ts file and a further compressed .mp4.

CPU Usage

I have an AMD A8-6500B processor. cvlc runs at about 15% cpu usage. However, ffmpeg was running at about 97%. Therefore, in my script (not in the one below), I added the -threads 3 option to keep CPU usage at an overall 75%. I am able to do this because my processor is quad core.

#!/bin/bash

# Name:         Hauppauge 610 USB-Live 2 Analog Video Digitizer and Video Capture Device Conversion Script
# Author:       jbrock
# Dependencies: VLC media player; ffmpeg, in Ubuntu you will need to add a ppa to install.
# License:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
# Usage:        Digitize analog tapes to .ts format. Then convert to mp4, add metadata, and make sound work on left and right channels.

# Enter the name of the file.
echo -n "Enter file name: "
read archivo

# This is for metadata. It will show up in the media player playlist or after clicking Properties (in OS X Info) on the file context.
echo -n "Enter a description: "
read comentarios

# Encode video and stop after 122 minutes. The foreground option allows you to hit 'ctrl c,' and it will only stop this portion of the script.
timeout --foreground 122m cvlc v4l2:///dev/video0 :input-slave=alsa://hw:2,0 :v4l2-standard=NTSC :live-caching=300 --sout '#transcode{vcodec=mpeg2,acodec=mpga,ab=128,channels=2,samplerate=48000,fps=29.97,deinterlace}:std{access=file{no-overwrite},mux=ts,dst='$HOME/Videos/$archivo.ts'}'

# Convert to H.264 to compress further, add in the metadata comments, and make output from the left speaker to both speakers.
ffmpeg -i $HOME/Videos/$archivo.ts -c:v libx264 -preset medium -crf 22 -metadata comment="$comentarios" -af "pan=mono|c0=FL" $HOME/Videos/$archivo.mp4

# Show the 'finished' message.
notify-send "VIDEO FINISHED"


Even with an SSD, there will still be some variation. Depending on the rest of your computer, the technology of the flash drives, the speed of the controllers, etc, you might see no difference, or the opposite of what you might expect.

However, in most cases, USB 3.0 flash drives should be faster. I use a 128GB USB 3.0 flash drive for pretty much all my installations (I think it still has GNOME 15.10 on it). Installing to a normal SATA III HDD, the installation takes about 15 minutes. From what I can remember from using a USB 2.0 stick when my USB 3.0 wasn't available, it took a little longer to install, but not very much.

So yes, USB 3.0 is faster, but as long as you have a high quality USB 2.0 flash drive and fast internal hardware, the difference will be noticeable, but not terrible. As long as you can spare a USB 3.0 drive, use it. You'll get the faster speeds with computers that can support it, and USB 2.0 computers will still install at 2.0 speeds.

If you just want to use the Live Environment, use USB 3.0. Since there's no bottleneck from the hard drive, using the LE with 3.0 will be much faster than 2.0, since data is being read directly from the drive, and not being copied anywhere except RAM.


Cannot connect through wireless interface on a server?

I solved this 20 minutes later. I had done a lot to try to get networking working. I was just about to delete a line in /etc/modprobe.d/blacklist-ath_pci.conf when I decided to give nm-applet one last shot and after filling out the SSID and other information for my network for the two-dozenth time, I just decided to manually set the MTU value.

After applying, I finally got the coveted ¨Connect¨ dialog! I had been reading about this mythical beast all evening.

So if anybody looks in here, sometimes with an Atheros 5K, you have to manually set the MTU.


Audio Randomly Switches from Line Out to Headphones

The issue turned out to be a faulty USB DAC, probably due to a short in the cord. The moment I borrowed a friend's DAC, the problem stopped. Not sure if this problem is what the others were experiencing in the threads I mentioned.
The cord had been previously damaged prior to moving to Linux. The problem never occurred in Windows though, so either Windows handled the damaged cord in a way that was never made apparent, or it only affected Linux.


TeamViewer 12 & Ubuntu 16 - Can't Connect

an easy fix for me is
Same problem after Upgrading to Ubuntu 17.04 Beta, but i was tired of playing around with network DNS connections hoping it would fix itself in the final version.

and, this worked for me after 2 weeks of giving up.
It won't survive a reboot though, but it is a temporary fix.

sudo teamviewer daemon stop

sudo teamviewer daemon start

I hope this helps, Mark
Ubuntu 17.10 Beta with Gnome

Here is my previous post for fixing the DNS issue in 17.04
dddddddddddddddddddddddddddddddddddddddddd

Here is my (a) solution for general network (DNS, Server, Connections, Loading, Teamviewer ...)  issues which solved the Teamviewer "Not Connecting".

I realized that this issue was originating from a service called ‘systemd-resolved’. This is a DNS caching and validating service that comes pre-installed with Ubuntu 17.04

The solution came from this website

https://www.hecticgeek.com/2017/04/ubuntu-17-04-systemd-dns-issues/.service NetworkManager status

Go to the Update section half way down


VLC freezes when trying to play large files on networked windows share

I believe you may be experiencing this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1176379


OP answered the question in a comment

  I turned USB keyboard support in my BIOS and now keyboard works in GRUB


There was a utility called ext2read to browse Ext partitions in Windows (including Ext4 partitions) which may not work anymore as mentioned in the comment below by @heynnema and could corrupt your partitions.

The project isn't updated since 2012


Ubuntu 11.10 not showing up in GRUB bootloader after update and restart :(

Boot into the Ubuntu Live CD and run a few commands.

First, identify which is the Ubuntu partition:

sudo fdisk -l

Next, mount it (replacing sda2 with the appropriate partition number):

sudo mount /dev/sda2 /mnt

And finally, reinstall Grub (replacing sda with the appropriate hard drive):

sudo grub-install --root-directory=/mnt /dev/sda

Now, run this:

sudo update-grub

This should detect your Ubuntu installation and add it to the Grub menu.


Can't install microsoft office as playonlinux doesn't find cdrom

Try to burn an image dvd from an .iso file of your office 2007, I did with the enterprise version. It worked for me.


How can I copy files with common names and paste them into another folder?

I assume you mean you have a structure something like:

├── f1
│   ├── a1
│   ├── a2
│   ├── b1
│   ├── b2
│   ├── c1
│   ├── c2
├── f2
│   ├── a3
│   ├── a4
│   ├── b3
│   ├── b4
│   ├── c3
│   ├── c4

and you want to end up with a directory like this:

a-files
├── a1
├── a2
├── a3
└── a4

Assuming:

the current working directory is the parent directory of all the directories f1 f2 f3

You could do:

mkdir a-files
for files in f*/a* ; do cp "$files" a-files ; done

to copy all files starting with a to a new directory a-files from all directories starting with f. You can repeat for files starting with b...

mkdir b-files
for files in f*/b* ; do cp "$files" b-files ; done

Note: if there are any duplicate filenames, each file written to the new directory will overwrite another with the same name, so at the end of the loop, the new directory would only have a copy of the last file to be written with that name. You could use the -n flag to cp to prevent overwriting, and then you would get the first file with that name instead of the last one:

for files in f*/a* ; do cp -n "$files" a-files ; done


Can I install Windows 8.1 after installing Ubuntu 14.04?

You have to select your dvd drive in your UEFI boot menu or give it higher priority in your UEFI boot order. Then it will boot. To find out which key to press, watch your screen instantly after switching your pc on. And grub might still have the old entry although the system is already gone. Running sudo update-grub should fix this. But maybe it is still there? Check your partitions using gparted, please.


Dual Boot Win7 and Ubuntu: UEFI vs MBR clean install

If you have successfully installed Windows 7 with UEFI then everything should be in place. You would just need to boot the Ubuntu media the same way for installation and it should provide you the install alongside option.

  1) Will I lose much functionality or efficiency if I simply switch the bios to legacy and do everything that way, which seems to be much easier?

In theory UEFI is actually easier. This mostly depends on the firmware, some laptops have issue but desktop boards should be fine. A mix of connected GPT and MBR disks causes problems during Windows (re-)installation. Also with GPT the limitation of only up to 4 primary partitions is gone. The best thing of all: no more bootloaders overwriting each other! A broken Linux bootloader (configuration) doesn't result in a broken Windows and vice versa. UEFI is much more flexible.

  2) would it be best to format one primary partition on each drive as NTFS

I don't understand. Why would you want to format a partition for Linux with NTFS before installing?

  3) what would be the best way to set up the drives for a clean install?

If you have installed Windows 7 properly in UEFI mode Ubuntu would just need to create a root partition and a swap partition, it would install it's bootloader to the existing EFI System Partition. If that is not the case and you don't see the install alongside option, we need to find out why.

  The other half of the HDD would be Ubuntu data, and I suppose that would be my '/' partition

I thought you were going to install Ubuntu to the SSD, so to use it for operating systems and the larger drive for data, or am I mistaken?


I've seen that as well.

I don't have a solution, but I have a workaround (echo 3 | sudo tee /proc/sys/vm/drop_caches) and potentially more information so someone can bring the investigation any further.

It's not a network issue because at "Reading package list...", it is just reading files in /var/lib/apt/lists/. A:

strace -tt -T -fo strace.log apt-get update

gives:

16394 14:43:03.921130 open("/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages", O_RDONLY|O_LARGEFILE) = 7 <0.000012>
[...]
16394 14:43:03.995238 read(6, "-3.1ubuntu2)\nConflicts: linux86\n"..., 32444) = 32444 <0.000111>
16394 14:43:05.787187 read(6, "c (<< 1:14.b.4-dfsg), erlang-exa"..., 32239) = 32239 <0.000069>
16394 14:43:05.788025 read(6, ".deb\nSize: 42130\nMD5sum: c7de671"..., 31695) = 31695 <0.000068>
16394 14:43:05.870734 read(6, "5: 29c4b395a92bdc12932f151c3643a"..., 31607) = 31607 <0.000071>
16394 14:43:05.890862 read(6, "e-pack-af-base\nFilename: pool/ma"..., 32538) = 32538 <0.000070>
16394 14:43:05.891425 read(6, "buntu-usb-live, ubuntu-dvd-live,"..., 32090) = 32090 <0.000066>
16394 14:43:05.891960 read(6, "cd9755b03ac2c9b8251125c7b6618\nDe"..., 32195) = 32195 <0.000034>
16394 14:43:06.043001 read(6, "rg>\nArchitecture: all\nVersion: 2"..., 32535) = 32535 <0.000072>

See how those 8 read system calls took over 2 seconds even though each individual call takes less than 1 ms.
Running time apt-get update or looking at top, that process is not busy between those two calls. So why the delay?

Then I did:

echo t > /proc/sysrq-trigger

a few times and looked at the outcome in kern.log:

 apt-get         D 00000000     0 16790  12706 0x00000000
  e8695d30 00000086 f7bd5e6c 00000000 f7bd5e44 f74a6580 c1990e00 c1990e00
  efe46efe 000042cb f7b9de00 e71a7230 f74a6580 c107e116 00000000 00000000
  044aa200 00000000 00000000 00000000 00000000 e8695d0c e8695d0c c1038de8
 Call Trace:
  [<c107e116>] ? enqueue_entity+0x186/0x220
  [<c1038de8>] ? default_spin_lock_flags+0x8/0x10
  [<c15e13bd>] ? _raw_spin_lock_irqsave+0x2d/0x40
  [<c15e0533>] schedule+0x23/0x60
  [<c15deecf>] schedule_timeout+0x12f/0x290
  [<c1075c38>] ? ttwu_do_activate.constprop.86+0x58/0x70
  [<c1055190>] ? usleep_range+0x40/0x40
  [<c15e0846>] io_schedule_timeout+0x86/0xd0
  [<c15cef7d>] balance_dirty_pages.isra.17+0x3f5/0x4b4
  [<c15e118d>] ? _raw_spin_lock+0xd/0x10
  [<c1180781>] ? __set_page_dirty_buffers+0x81/0xb0
  [<c110deb5>] ? set_page_dirty+0x55/0x60
  [<c11812c9>] ? __block_page_mkwrite+0xe9/0x170
  [<c110f3ae>] balance_dirty_pages_ratelimited_nr+0xde/0x100
  [<c1126f53>] do_wp_page+0x503/0x830
  [<c1128ef7>] handle_pte_fault+0x267/0x2c0
  [<c1129c62>] handle_mm_fault+0x1e2/0x280
  [<c15e4988>] do_page_fault+0x158/0x4c0
  [<c104e4dc>] ? irq_exit+0x5c/0xa0
  [<c15e22d0>] ? do_debug+0x180/0x180
  [<c15e4830>] ? vmalloc_fault+0x195/0x195
  [<c15e1c53>] error_code+0x67/0x6c

So, not sure what that means but that looks about the handling of page faults, so points at a potential memory management issue.

I then tried a:

echo 3 >/proc/sys/vm/drop_caches

And that did make the problem go away.

Now, it very much looks like a kernel issue. So, I've updated to the latest kernel (3.8 backport from raring) and that's where I'm at. Will update if the problem persists with the newer kernel.

Edit

The problem does persist with the new kernel, though not as bad. And same thing,

echo 3 | sudo tee /proc/sys/vm/drop_caches

clears the problem for a while. I've only seen that happen on MSI laptops (Product Name: CR61 2M/CX61 2OC/CX61 2OD).

Edit December 2015

As confirmed by btrace aptitude/apt-get does appear to do some disk I/O at the time. It's got a temporary file (/var/cache/apt/pkgcache.bin.<random-chars>) mmapped in memory which is why it doesn't show in the strace output.

Still can't explain why it only happens on some machines only, why dropping caches helps, why switching to 64bit helps.

If somebody can reproduce it, an interesting test could be to see if that also happens when running under eatmydata or if moving /var/cache/apt onto tmpfs or a ramdisk helps.


Run 'sudo service mongod start' at boot time

The simplest way is to use update-rc.d. Enter following command to add mongod to system services means starting at boot time:

sudo update-rc.d mongod defaults


The short answer is no.

A quickly edit command will open all python files in your default editor. You can however use your preferred editor or IDE for development.


grep multiple files into one set of data

Use join:

$ join file1.txt file2.txt
apple fruit  red green
tomato vegetable  green yellow


If you install it via apt-get, you may not need to set that.  I checked and groovy/groovyConsole seem to run properly.
If you do need to set it GROOVY_HOME should be /usr/share/groovy.
I've never used it, but I figured it out by looking at this.  It tells you that GROOVY_HOME should have subdirectory of ./bin.
After the apt-get install groovy && sudo updatedb && locate groovy | grep /usr | grep bin it definitely looks right.
If you used a binary installer or put it somewhere else, those steps should help you find it.


Problem with AMD HD 8xxx Series graphics card

To have the very latest AMD drivers, you should try the worg-edgers PPA:

https://launchpad.net/~xorg-edgers/+archive/ppa

It solved the same kind of problem on one of my Ubuntu 12.04 workstation.


How can I install apps previously installed on a different installation on my new installation?

It might be possible for some but it's likely that the version of the apps available for 12.04 are different than those that were available when 11.10 was released.

It would also depend on whether you still had the .deb available in the apt cache in order to copy it, you would also need to check dependencies.

You can search for packages here and see if the versions are the same.

http://packages.ubuntu.com/

Some idea of which packages you are talking about would help.


You can't. "Unity" is the Desktop Environment you are currently using and it is built to be with a left menu bar and a dash. You could hide it, but there isn't any option to remove it.
If you want to get closer to the OSX look, you should change your Desktop Environment.
In my opinion, I would think that the best suited for this would be "Cinnamon" or "Xfce".
Note : those 2 screenshots were found on Google Image and show how you can turn Cinnamon & Xfce into a OSX-look-alike. None of these Desktop Environment are like this by default.

Cinnamon :

Cinnamon is a Linux desktop created by the Linux Mint Team, which provides advanced innovative features and a traditional user experience. The desktop layout is similar to GNOME Panel (GNOME 2); however, the underlying technology was forked from GNOME Shell (GNOME 3). The emphasis is put on making users feel at home and providing them with an easy to use and comfortable desktop experience.
To install cinnamon 2.0 on Ubuntu :
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

After installing all the necessary packages, just log out and change the log-in option to Cinnamon.
This D.E. (Desktop Environment) has a built-in theme manager provided by Linux Mint and Cinnamon Community.

Xfce :

Xfce is a lightweight and modular Desktop environment currently based upon GTK+ 2 though in the future it may be ported to GTK+ 3. Xfce contains a suite of applications such as a window manager, a file manager, and a panel to provide a complete user experience. Xfce is popular with many users, partly because it is lightweight but also because a large amount of settings are exposed in a GUI. This is in sharp contrast to desktops such as GNOME Shell which hide many settings from the user.
To install xfce 4.10 on Ubuntu :
sudo apt-get install xubuntu-desktop

After installing all the necessary packages, just log out and change the log-in option to Xfce.

After a tour, and if you are satisfied with one of these new D.E., you can uninstall Unity.
But please aknowledge that I (personnaly) think that you should use Ubuntu the way it was meant to be used, even if the possibility of tweaking the OS is one of the main Linux-feature. In my humble opinion, I think that if you like OSX, you should buy a MAC instead of making Ubuntu looking like it, because Ubuntu will never be OSX (and it's not his goal).


Video Recorder Tool (Screencast) for Ubuntu 11.10

Here's a recent I answer I just gave: How to record my screen?.

I'm also looking into kdenlive for video editing. See: Video editor to create professional appearance


I think SSL support doesn't depend on an extension, it's already built into Ubuntu's PHP. Try creating a PHP file in your web server with this content:

<?php phpinfo() ?>

then access it in a browser (http://<server>/<file>.php). You should see:

and

I have only these PHP packages installed: libapache2-mod-php5, php5-cli, php5-common, php5-gd, php5-mcrypt, php5-mysql.


Kill all process by name running over one hour via terminal

I figured it out, on my print column print $2, I was printing the time, not the process id, so by changing that to print $1 it works. ie,
kill $(ps -eo pid,etimes,args | awk '/ebook-convert/ { if ($2 > 3600) print $1 }')


How do I create a new text file with a new name from a phpscript everytime it is executed

here's a php script that writes a file named using the unix timestamp:

#!/usr/bin/env php
<?php
file_put_contents("file" . ((int) microtime(true)) . ".txt", file_get_contents("/proc/cpuinfo"));
?>

if you want fill the file from i.e. stdin, change /proc/cpuinfo to php://stdin

here's a shell script that does the same as the original php script

#!/bin/sh
cat /proc/cpuinfo | tee "file`date +%s`.txt" > /dev/null

you can chmod +x both of these and execute them


If you're worried about ports being open, you can use another (Linux-based) computer and perform a port scan of your server using nmap.  See this for a quick tutorial or just Google for nmap to see the many tutorials out there.
I presume you're accessing your repository by private/public key pair?  If you're not, there are many tutorials out there; see this for some help on:

creating a private/public key pair
disallowing passwords and
configuring the server to allow private/public keys

Are you connected to a router?  If so, there may be port forwarding, etc. that you need to set up on that as well.  And that includes keeping its firmware up-to-date.
Lastly, my personal opinion is if you are worried about security, don't put something valuable on it.  System security also comes with experience and making mistakes...  Hope this helps!


Help! Stuck on GNU GRUB 2.02 after restart

So, dumbest solution possible: I fixed it by turning the computer off and on again.

Man is that a relief. Now that my heart rate is slowing down,  I think I’m going to crawl back to being coddled by my Mac.


How do you make gnome-shell get out of the way in fullscreen apps?

Egads, I've found a partial solution.

It seems that Virtualbox's Mouse Integration is causing these problems. Disabling Mouse Integration and fully capturing the mouse instead clears up the issues for that program. The issue still persists in Chrome for me however. (The virtualbox solution seems to be a cheat, as it disables the native pointer which is probably what gnome-shell is listening for.)


Bash script that runs a command with arguments and redirects

The issue had to do with writing the script in Windows in Sublime Text and then transferring it to a Linux server.  Switching the mode in Sublime Text made the difference

Videonauth also pointed out that I should have just one redirect symbol ">" since for the first line since it is a new file


Kubuntu 16.04 ibus does not change language with Alt+Shift

I believe you cannot set the hotkey to Alt+Shift, since that is an invalid key combination for ibus (and many other things in Linux). Hotkeys usually consist of:

Exactly one key code (e.g. a,3,\,Enter,↑,Tab,Esc,F11,Caps Lock)
Zero or more modifiers (e.g. ShiftAltCtrlSuperMetaHyperAlt
Gr)

So (normally) never only modifier keys.


Problems with Audio device (ALC-889) - Ubuntu 16.04

The issue is that Ubuntu 16.04 defaults to HDMI as default audio if HDMI is present on your computer. In my case, it does see my Sound Blaster Audigy 2 card, but HDMI (from my video cards) is set as default; and the way to change that differs from how you did that in 14.04.

The files, folders and procedures almost work, but don't if you follow 14.04's "No Sound" issues because file names and locations have changed in 16.04. I get this information from a week of Googling and experimenting. But it appears that it is a known bug so an answer should be coming soon. In the mean time, I guess we both have to wait. When I need sound, I revert to a 14.04 netbook. Netbooks can't meet the system requirements of 16.04, but more than meet 14.04's requirements. That should say something.

Although I don't have an answer for you, I hope this gives you some insight into the issue we are having. If you come up with something, let me know. Thanks,