Upgraded from 10.04 to 12.04, lost internet connectivity

I think it would be beneficial to step back, teach a man how to fish instead of just telling you what's wrong.

There are many components involved in making a good network connection

It can be the hardware: ethernet card, cable contacts, network interface on your directly connected switch, etc.
It can be the low level software: the kernel driver for your network card
It can be your routing table
It can be DNS

And these are all dependent on each other from the bottom up, e.g. if you can't route packets correctly, you can't reach your DNS service.

There's only one (sane) way to pinpoint the issue that I know of: one by one, by elimination.

One sentence stands out in your description:

  I can however see my Rails application running on this server when I access it via its ip address within our corporate network.

It is great that you tried this. This piece of information is golden because it eliminates many possible causes.  It means that your hardware and your (kernel) drivers and the connections inside the corporate network all look fine.  This is also confirmed by the fact that the ifconfig output shows packets being sent and received and no (zero) errors, collisions, or retransmissions.  At this point I'm sure your issue is in your configuration only.

I notice that your internal DNS server is at (non-public) IP: 10.24.2.171, this is not on your immediate subnet 10.24.5.0, you can tell this by this ifconfig output line:

inet addr:10.24.5.50  Bcast:10.24.5.255  Mask:255.255.255.0

Note that your mask leaves only the last of the 4 octets as 0, meaning you're broadcasting only over the 10.24.5.x subnet.  You may not have a full route to your internal DNS server.

The experiment I would do now would be to try and verify the routes to your essential components:

Your gateway 10.24.5.1
Your name server 10.24.2.171

It is essential to do these by IP since we don't yet know if your DNS server is ok and if you can talk to it.

# first traceroute the gateway:
traceroute 10.24.5.1

If this fails with an error like no route to host or destination is unreachable, it is almost certain that your issue is in the routing table.  If it is successful you've just made a huge step forward because routing is a big subject by itself.

# if successful traceroute the DNS server
traceroute 10.24.2.171

If this fails, your issue may be that the netmask is too restrictive.  Try to change it to 255.255.0.0. You can set this in /etc/network/interfaces by adding:

netmask 255.255.0.0

under eth0.

Once you fixed this, you would need to restart your network:

sudo /etc/init.d/networking restart

HTH


How to avoid using sudo when working in /var/www?

Most answers here are not written with security in mind. It's good to get a feeling that running sudo each time is not very wise. If you make a typo (for example a single space in a wrong place, such as recursively deleting / var/www/dir, which means / and var/www/dir, instead of /var/www/dir—please do not attempt), you might trash your system.
Note: Starting with Apache 2.4.7 / Ubuntu 14.04, /var/www has been moved to /var/www/html Adjust the commands in this answer accordingly.
See:

Where to place my local website starting with the 2.4.7 version of apache2?

Why has the apache2 www dir been moved to /var/www/html?

Changing the default document root for HTTP server

Bad ideas:

chmod 777 (sagarchalise) - this allows anyone with access to your system write into the directories and files and thereby allowing the intruder to execute any code under the www-data user
chgrp -R www-data $HOME (cob) - this allows www-data to read or write any files in the home directory. This is not keeping the Least Privilege rule in mind
chown -R $USER:$USER /var/www (kv1dr) - unless the world has read permissions on /var/www, the webserver running under www-data will not be able to read (serve) the files. If the file is a public-accessible plain HTML document, it might not be an issue if the world can read the file. But if the file is a PHP file containing passwords, it is.

NOTE: in the below solutions, I've granted www-data write privileges. However, /usr/share/doc/base-passwd/users-and-groups.txt.gz states:

www-data
Some web servers run as www-data. Web content should not be owned by this
user, or a compromised web server would be able to rewrite a web site. Data
written out by web servers will be owned by www-data.

Where possible, do not grant write permissions to the www-data group. www-data only needs to be able to read the files so the webserver can serve it. The only case where www-data needs write permissions is for directories storing uploads and other locations which needs to be written.
Solution 1
Add yourself to the www-data group and set the setgid bit on the /var/www directory such that all newly created files inherit this group as well.
sudo gpasswd -a "$USER" www-data

Correct previously created files (assuming you to be the only user of /var/www):
sudo chown -R "$USER":www-data /var/www
find /var/www -type f -exec chmod 0660 {} \;
sudo find /var/www -type d -exec chmod 2770 {} \;

(even safer: use 640 or 2750 and manually chmod g+w file-or-dir that needs to be writable by the webserver)
Solution 2
Create a symlink for each project to your home directory. Say your project is located at ~/projects/foo and you want to have it located at /var/www/foo, run:
sudo ln -sT ~/projects/foo /var/www/foo

If your home directory has no execute bit (descend) set for other (for security reasons), change the group of it to www-data, but set the execute bit only (no read/write). Do the same for the ~/projects folder as it may contain other projects than www. (You don't need sudo if you have previously added your user to the www-data group.)
sudo chgrp www-data ~ ~/projects
chmod 710 ~ ~/projects

Set the group to www-data on ~/projects/foo and allow the webserver to read and write to files and files+directories and descend into directories:
sudo chgrp www-data ~/projects/foo
find ~/projects/foo -type f -exec chmod 660 {} \;
find ~/projects/foo -type d -exec chmod 2770 {} \;

Even safer: use 640 and 2750 by default and manually chmod files and directories that need to be writable by the webserver user. The setgid bit should be added only if you want every newly created file in ~/projects/foo to be accessible by the group.
From now on, you can access your site at http://localhost/foo and edit your project files in ~/projects/foo.
See also

Permissions issue: how can Apache access files in my Home directory?
Reasons why /var/www should not have chmod 777


So if you are saying that you added a Kali Linux alongside your Ubuntu sources, then I would assume it succesfully applied Kali updates to Ubuntu resulting in a broken OS. I suggest you look into how to repair Ubuntu with an Ubuntu live install disk, matching the Ubuntu version you currently have installed.


I found this thread, which claims (part of) the solution is:

sudo aptitude remove --purge dunst

Edit: It works! After a reboot (login & logout may do it four you), I now have the "old" notifications in the righthand top corner back.


Ubuntu doesnt boot if selected in bootup option. Installed alongside Windows 8

here is a link with option at end below named "boot-repair" :

http://ubuntuforums.org/showthread.php?t=2097815

have you tried it with

to enable efi instead of uefi in bios ?


After an update I can't get pass the log in screen and the resolution is changed

You or someone else installed an Nvidia driver a wrong way.

After each kernel upgrade it stops working.

You can install same driver from ppa. In this case it will stay permanently. Run in terminal the commands

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-352
sudo add-apt-repository -r ppa:xorg-edgers/ppa

and reboot


I change wifi adapter . it solved.
sudo add-apt-repository ppa:kelebek333/kablosuz

sudo apt-get update

sudo apt install rtl8188fu-dkms


The problem was solved with recent software updates and my PC's CMOS battery dying (and that resulted in reset of settings).


How can install vlc 2.1.6 on ubuntu 16.04lts

You can find the version that you are looking for here .
Download it (vlc-2.1.6.tar.xz), extract it, enter to the extracted folder then you can install it and its plugins by typing: make install. You an find more information in the INSTALL file.


How to create a live Ubuntu USB drive with persistence for BIOS using only terminal?

Most of the solution (below) comes from this great article which comes close to working, but not quite, as it needs some updates a few places. But I suggest you look at it, as it's more complete in explanation of steps.

This is for my BIOS based laptop.  I'm guessing this might not work for a EUFI boot machine.

TIPS:

Don't make the grub configuration file as that article above suggests, but rather as I show below.
Once you finally have it working below, you'll find that over time the file system will become full unexpectedly.  I finally figured out that this occurs because Ubuntu is silently doing apt-get update and this will fill up all of your file space and then you'll get a warning message.  (It took me a couple of years to figure out what was going on.)

The initial fix was to do apt-get clean to dump the apt cache, but this doesn't really solve the underlying problem.  Then I tried simply disabling the wi-fi so it couldn't do an automatic update.  This works great for me!  Now my sticks last a long time without problems.

Steps carefully tested to work:

1. Download Ubuntu 16.04 ISO image here.

2. set some variables to use below:

iso=/path/to/isoimage #e.g. iso=~/Downloads/ubuntu-16.04-desktop-amd64.iso

s=/mnt/isoimage   #Source mount point for ISO files (via loop file system)
t=/media/USBRoot  #Target mount point for USB files in partition #1

  !! Next, BE VERY CAREFUL to correctly point to the USB stick, and not to your hard drive, with this next step, as you can accidentally overwrite your hard disk. (Tip: lookup and confirm using lsblk or the like)

dev=/dev/sd?  #set the "?" to your USB drive letter, e.g. /dev/sdb

3. Plugin and optionally erase If partitioning fails below the erase is recommended.  (Before when I had dd'ed an iso image to the usb device, I had to zero it out before I could make fdisk work properly again.).

sudo dd if=/dev/zero of=$dev  #bs=2048 is optional and doesn't seem to matter

  You'll get a message like this when it's done:

dd: writing to ‘/dev/sdb’: No space left on device
30326785+0 records in
30326784+0 records out
15527313408 bytes (16 GB) copied, 4099.2 s, 3.8 MB/s

  The erase step is because I've found that sometimes a quick format won't work.  I don't know for sure, but I suspect that 2nd copies of the partition map, or the like are being found and are confusing the partitioning software.  So writing all zeros to the USB stick before we begin seems to make sure that you're starting fresh.  But, and yes, I know, it takes LONG time to complete.

4. Make partitions. Use a partitioning tool to put a msdos type partition map on the usb stick and partition it into two partitions as follows:

  Partition 1) VFAT32 partition for the kernel, ramdisk, grub, and persistence via casper-rw file.  Use all of the remaining space for this.

  Partition 2) bootable partition for the linux iso image.  Make it about 2G in size (because that's how big the .iso file is).

  The size of the #2 partition needs to be about 2g, so subtract this from the size of the drive and then divide by 512 to get the size of the #1 partition in sectors.  In my case that's 16gb - 2gb = 14gb / 512 = about 27343750 sectors.

  Tip: unmount the device now if it is mounted or you will get an error when you are done with fdisk.  Don't use the graphical unmount button, as it seems to make the device un-findable (until the USB drive is unplugged and then replugged back in), rather use the terminal command as follows:

? Question: I'm not sure why these partitions can't be swapped, with the boot partition as the first partition.  But for what it's worth, I tried that and could not get it to work.

sudo umount ${dev}1
sudo umount ${dev}2

  Here's how: You can use either fdisk, parted, gparted, or cfdisk but I like fdisk.

sudo fdisk $dev
o                             [create partition map], and then

n (p) (1) (2048) 27343750     [new partition #1]
t c                           [change partition type to type c, or W95 FAT32], and

n (p) (2) (default) (default) [new partition #2]
t 2 83                        [type 83 or linux], then
a (2)                         [set [toggle] the bootable flag], and

p                             [check new table], and finally

  It should look something like this:

Disk /dev/sdb: 14.5 GiB, 15527313408 bytes, 30326784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa42995f9

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1           2048 27343750 27341703   13G  c W95 FAT32 (LBA)
/dev/sdb2  *    27344896 30326783  2981888  1.4G 83 Linux

  Then do this:

w                         [write the partition table to the usb drive]

  You should get a response like this:

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

  or if you forgot to unmount it first then you will get this:

The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

  In which case you simply go back, unmount it as described above, and then run fdisk again and only hit w, and you're done.

5. Write the iso image to the 2nd partition.  I struggled with whether to include a block size parameter or not here, (e.g. bs=2048), and in the end it appears it doesn't matter or has little effect.  Also note this partition doesn't need formatting, as the ISO will effectively format it when copied directly to the partition.

sudo dd if=$iso of=${dev}2

6. Format the first partition.  Note, he formats this with VFAT32 (i.e. long file names version of FAT32).  I'm guessing this is to make it easy to read that partition on any machine (i.e. portability).  [I plan to see if ext3 might also work and will update this later w/ that test].

sudo mkfs.vfat -F 32 -c ${dev}1   # for vFAT32 file system

7. Mount partition #1 to be able to install files into it.

sudo mkdir -p      $t
sudo mount ${dev}1 $t

8. Install grub into the first sector of the usb stick and into the root directory in partition #1.

sudo grub-install --no-floppy --root-directory=$t $dev

9. Copy the kernel and ram disk files.  (NOTE, this is revised from the article.  The kernel now comes as an *.efi version, (but it's still just a kernel), and initrd (the ram disk with all of the packages) is now compressed with lz rather than gz).  First we mount the image file (as a loop device) where we will get these two files from:

sudo mkdir -p           $s
sudo mount -o loop $iso $s
sudo cp                 $s/casper/{vmlinuz.efi,initrd.lz} $t/boot/

10. Create a file to hold the persistent file system. Adjust the size if you want.  This is set as 1024x1mb=1gb.  Note that inside the casper-rw file it's an ext3 file system.  The name casper-rw is magic, so don't change it.

sudo dd if=/dev/zero of=$t/casper-rw bs=1M count=1024
sudo mkfs.ext3 -F       $t/casper-rw     #takes a long time

11. Create a simple grub configuration file. Be sure to give it a (possibly newer?) cfg not conf file name extension so grub can find it (ref).  Use your favorite editor, or use:

sudo nano $t/boot/grub/grub.cfg

12. Paste the following grub commands in.

  *Notes: you can use echo and read here for more debugging if necessary. Also the "ro" "splash" and "quiet" are optional (but suggested) kernel options with mostly self explanatory behaviors.  See this quite helpful post on how to use the GRUB> prompt if necessary.  I'm guessing that he had a .conf file because this might have been for GRUB 1.0, rather than GRUB 2.0, and this might also explain the commands he had not working. Also note that the root is partition 1 (i.e. msdos1).

echo LOADING USB DRIVE
echo
echo To continue press any key
echo To abort press ^-alt-delete
echo
read
echo Proceeding...

set default=0
set timeout=10
set title="Ubuntu (Live)"
set root=(hd0,msdos1)

linux /boot/vmlinuz.efi boot=casper file=/preseed/ubuntu.seed persistent ro splash quiet
echo vmlinuz.efi loaded

initrd /boot/initrd.lz
echo initrd.lz loaded
echo
echo Grub done. Booting...
boot

13. sync (recommended) and cleanup (optional):

sync

sudo umount $s;  sudo rmdir  $s
sudo umount $t;  sudo rmdir  $t

14. Backup your new USB drive.

  dd if=$dev of=/your/backup/location  #takes a long time

  To later restore it use the reverse:

  dd if=/your/backup/location of=$dev  #takes a long time

15. Reboot and hit a key to boot Ubuntu USB stick.

16. Add your backup script to it.  Here's my incremental script which deals with two laptops.  FIRST CHECK IT CAREFULLY FOR YOUR SYSTEM AND ADJUST IT AS NEEDED.  Name it mybackup and hard link myrestore to it (ln mybackup myrestore).  Set execution permissions with chmod u+x my{backup,restore}.  Run it with ./mybackup

#!/bin/bash

#Usage:
#
# mybackup                               - show list of current backups
# myrestore                              - ''
#
# mybackup  <machine> <BackupFolderName> - machine: love2d or sharon-pc
# myrestore <machine> <BackupFolderName> - by convention name is 'nn-descriptiveName' (so it sorts by date)

#################################################################
#################################################################

### PARTITIONS ######################
#Partition labels (also used for mount point folder names):
#  Note: use labels rather than UUID as they might be more controllable.
BackupDrive='Linux backup'              # USB backup drive (I removed space from 'name' & it removed it from 'label')
 BackupBase="$BackupDrive/Backups"      # Backup base folder directory & name
     SubDir="files"

### PARTITIONS LABEL HELP:
#lsblk -o +label        gives  (note older method was blkid, but this suggests we use lsblk):
#NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT                              LABEL
#sda      8:0    0 465.8G  0 disk
#├─sda1   8:1    0   199M  0 part                                         SYSTEM
#├─sda2   8:2    0 288.1G  0 part
#├─sda3   8:3    0     1K  0 part
#├─sda4   8:4    0  29.3G  0 part                                         Shared
#├─sda5   8:5    0  23.3G  0 part                                         d8root
#├─sda6   8:6    0 119.5G  0 part                                         d8home
#└─sda7   8:7    0   5.4G  0 part [SWAP]

#sdc      8:32   0   3.7T  0 disk
#├─sdc1   8:33   0   128M  0 part
#├─sdc2   8:34   0   2.7T  0 part /media/ubuntu/Seagate Backup Plus Drive Seagate Backup Plus Drive
#└─sdc3   8:35   0 976.6G  0 part                                         Linux backup

### MOUNTING 1of2 ######################
 sudo umount "/mnt/$BackupDrive">& /dev/null    # --- cleanup from prior failed attempt:
 sudo mkdir  "/mnt/$BackupDrive">& /dev/null; sudo mount -L "$BackupDrive"      "/mnt/$BackupDrive" -o defaults,suid >& /dev/null #Allow to set user owner of files

########################################################################
### FUNCTIONS #################################################################

####################
function usage          { echo; echo "Usage: ${0##*/} [machine name: Love2d|Sharon-pc] [BackupFolderName]";echo;}

####################

####################
#If parameter just show dirs for that machine, else show for both
function myls {
 echo -n "'$1' existing backups:"
 if [ -d "$2" ]; then echo; ls -lFgG "$2" |grep -v ^total |grep ' [0-9][0-9]-' |sed 's/..................//'; else echo ' (none)'; fi;
}

##################
function currentbackups {
 if [ "$1" ]; then
        myls "$1"               "/mnt/$BackupBase/$1/$SubDir"
 else
        myls 'Love2d'           "/mnt/$BackupBase/Love2d/$SubDir"
        echo
        myls 'Sharon-pc'        "/mnt/$BackupBase/Sharon-pc/$SubDir"
        echo
 fi
}

###################
function badmachine     { echo "Machine type '$1' is invalid.";}

###################
function cleanup        {
 # echo "--- cleaning up --------------------------------------"
 sudo umount "/mnt/$BackupDrive"
}

########################################################################
########################################################################

### CHECK INPUTS #######################################################
#Check if backup name paramter exists:
if [ $# = 0 ]; then usage;                                                                                cleanup; exit;     fi

if [ $# = 1 ]; then if [ "$1" != "Love2d" -a "$1" != "Sharon-pc" ]; then badmachine "$1"; usage; else usage; currentbackups "$1"; fi;                       cleanup; exit;     fi

if [ $# = 2 ]; then if [ "$1" != "Love2d" -a "$1" != "Sharon-pc" ]; then badmachine "$1"; usage;                                         cleanup; exit; fi; fi

### MOUNTING 2of2 ######################
if [ "$1" = 'Love2d' ]; then
    MyHome='d8home'             # Love2 Debian /home      partition name
    MyRoot='d8root'             # Love2 Debian /   (root) partition name
  MyShared='Shared'             # Love2 Debian Shared     partition name

 sudo umount "/mnt/$MyRoot"     >& /dev/null    # --- cleanup from prior failed attempt:
 sudo umount "/mnt/$MyHome"     >& /dev/null    #
 sudo umount "/mnt/$MyShared"   >& /dev/null    #

 sudo mkdir  "/mnt/$MyRoot"     >& /dev/null; sudo mount -L "$MyRoot"           "/mnt/$MyRoot"                          >& /dev/null
 sudo mkdir  "/mnt/$MyHome"     >& /dev/null; sudo mount -L "$MyHome"           "/mnt/$MyHome"                          >& /dev/null
 sudo mkdir  "/mnt/$MyShared"   >& /dev/null; sudo mount -L "$MyShared"         "/mnt/$MyShared"                        >& /dev/null

else
#    MyHome='uhome'             # Love2 Ubuntu /home      partition name
#    MyRoot='uroot'             # Love2 Ubuntu /   (root) partition name

    MyHome='a41eaa3e-bd31-4ebc-86d4-cf8ed5f3e779'               # Love2 Ubuntu /home      partition name
    MyRoot='f3b7424c-0144-42a6-8488-62fbee94d245'               # Love2 Ubuntu /   (root) partition name

 sudo umount "/mnt/$MyRoot"     >& /dev/null    # --- cleanup from prior failed attempt:
 sudo umount "/mnt/$MyHome"     >& /dev/null    #

#sudo mkdir  "/mnt/$MyRoot"     >& /dev/null; sudo mount -L "$MyRoot"           "/mnt/$MyRoot"                          >& /dev/null
#sudo mkdir  "/mnt/$MyHome"     >& /dev/null; sudo mount -L "$MyHome"           "/mnt/$MyHome"                          >& /dev/null

 sudo mkdir  "/mnt/$MyRoot"     >& /dev/null; sudo mount -U "$MyRoot"           "/mnt/$MyRoot"                          >& /dev/null
 sudo mkdir  "/mnt/$MyHome"     >& /dev/null; sudo mount -U "$MyHome"           "/mnt/$MyHome"                          >& /dev/null
fi

#=================================================================
BackupDir="$BackupBase/$1/$SubDir/$2"   # /dir/BackupFolderName

#rSync stuff:
MyRsync="sudo rsync -aAXv --delete"
RootExclude=" --exclude={\"/dev/*\",\"/lost+found\",\"/media/*\",\"/mnt/*\",\"/proc/*\",\"/run/*\",\"/sys/*\",\"/tmp/*\"}"
HomeExclude=" --exclude='*cache*'"      #this does not work

if [ "${0##*/}" = "mybackup" ]; then
echo backing up...
        sudo mkdir -p "/mnt/$BackupDir/root"    # Making directories to save backup to
        sudo mkdir -p "/mnt/$BackupDir/home"

        echo "--- Backing up:  / -----------------------------------"
        $MyRsync $RootExclude   "/mnt/$MyRoot/"                 "/mnt/$BackupDir/root/"
        echo "--- Backing up:  /home -------------------------------"

        $MyRsync $HomeExclude   "/mnt/$MyHome/"                 "/mnt/$BackupDir/home/"

   if [ "$MyShared" ]; then             #no shared partion on Sharon's machine
        sudo mkdir -p "/mnt/$BackupDir/shared"
        echo "--- Backing up:  Shared ------------------------------"
        $MyRsync                "/mnt/$MyShared/"               "/mnt/$BackupDir/shared/"
   fi

else

        # Confirm
        read -p "YOU ARE ABOUT TO OVERWRITE YOUR PARTITIONS - CONFIRM (y/N)?" -n 1 -r; echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo "Aborting.";exit; fi
        echo;
        read -p "DANGER!  Really overwrite your hard disk partitions? (y/N)?" -n 1 -r; echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo "Aborting.";exit; fi

        echo "--- Restoring:   / -----------------------------------"
        $MyRsync                "/mnt/$BackupDir/root/"         "/mnt/$MyRoot"
        echo "--- Restoring:   /home -------------------------------"
        $MyRsync                "/mnt/$BackupDir/home/"         "/mnt/$MyHome"

   if [ "$MyShared" ]; then             #no shared partion on Sharon's machine
        echo "--- Restoring:   Shared ------------------------------"
        $MyRsync                "/mnt/$BackupDir/shared/"       "/mnt/$MyShared"
   fi

fi

cleanup
 sudo umount "/mnt/$MyRoot"     ;sudo rmdir "/mnt/$MyRoot"
 sudo umount "/mnt/$MyHome"     ;sudo rmdir "/mnt/$MyHome"

if [ "$MyShared" ]; then                #no shared partion on Sharon's machine
 sudo umount "/mnt/$MyShared"   ;sudo rmdir "/mnt/$MyShared"
fi

 echo "=== DONE. ============================================"

exit 0


debian/rules editconfigs fails on Raspberry Pi 4 with Ubuntu 20.04 aarch64

Removed armhf from archs in the else branch of linux-raspi-5.4.0/debian.raspi/etc/kernelconfig.
Now...
if [ "$variant" = "ports" ]; then
        archs=""
        family='ports'
else
        archs="arm64"
        family='ubuntu'
fi


How to install Geany Third-Party Plugins

This is not a perfect answer but there is a similar plugin called "zencoding" (github.com/codebrainz/geany-zencoding) which has a much clearer readme. To get this package to work (after following the readme) it is important to change the default keybinding (keyboard shortcut) as CTRL+SHIFT+E is used for the function "find usage" as welll as the zen coding function "expand abbreviation".


Realtek rtl8192ce wireless slow intermittent access

Late answer but hopefully helps some people...

I have a Thinkpad x121e which uses this driver (rtl8192ce) and when I installed Ubuntu 14.04 I kept having WiFi disconnects, about every 15 minutes.

From a post on the Arch Boards I found a fix. The problem is apparently with powersaving features of the driver, specifically ips (link power save) and fwlps (presumably firmware power save). These are enabled by default.

The fix is to create a file /etc/modprobe.d/rtl8192ce.conf and add this text to it:

options rtl8192ce ips=0 fwlps=0

You will need to be root to do this. Then reboot and hopefully you'll have a stable WiFi connection. (Incidentally I'm using a newer kernel from kernel.org but I don't think that is relevant/important to this fix).


Well Conky is really the only (good) way to go.
You can try Conky with a gui if you think it's hard configuring it with the terminal. You can try conky-manager.

sudo apt-add-repository ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install conky-manager


Use snapcraft list-plugins to list plugins. "make-project" isn't a valid one, but "make" is. So you need:-

plugin: make


How to avoid being prompted for a password by sudo?

Well, the only thing I can think of is

echo 'password' | sudo -S command

The -S flag makes sudo read the password from the standard input. As explained in man sudo:

  -S, --stdin

  Write the prompt to the standard error and read the password from the standard input
   instead of using the terminal device.  The password must be followed by a newline character.

So, to run ls with sudo privileges, you would do

echo 'password' | sudo -S ls

Note that this will produce an error if your sudo access token is active, if you don't need to enter your password because you've already done so recently. To get around that, you could use -k to reset the access token:

echo 'password' | sudo -kS ls

I don't know of any way of getting you into an actual root shell (like su or sudo -i) do. This might be enough for what you need though.


Does ubuntu support dell inspiron one 2310 with nvidia geforce 520mx?

For what I know DELL is one the companies that has good support with Ubuntu. The deal with the Nvidia card might be a little tricky but I highly recommend using the PPA for the Nvidia/Ati cards. It has solved a problem with another Nvidia mobile model I had and another 2. It has support for your card also.

To install the latest drivers from the PPA do the following:

In the terminal type: sudo apt-add-repository ppa:ubuntu-x-swat/x-updates

Then update your repositories by typing in the terminal this: sudo apt-get update.

Afterwards go to the Additional Drivers app by typing in the dash Drivers. Install the Nvidia recommended driver from the list and reboot.

This solved several cases of Old Nvidia cards and some mobile Nvidia cards.


How Do I Change Some Of The Default Shortcuts?

Go to system settings (click the power button on the top right on Ubuntu 12.04 desktops to access the System Settings menu), click keyboard, then the shortcuts tab, under Navigation, look for 'Hide all normal windows' set it and your good to go.


Your device  2357:0109 TP-Link TL WN823N RTL8192EU is covered by the driver rtl8xxxu that’s included in recent Ubuntu versions. Please confirm:
modinfo rtl8xxxu | grep 0109

If you get this output, then your device has a driver already installed:
alias:          usb:v2357p0109d*dc*dsc*dp*icFFiscFFipFFin*

Find out what the interface name is:
ip addr show

The interface name will be something like wlx12457803 or some such. Please make a carefully proofread note of the interface name. Also note the ethernet name. It will be something like enp0s25 or similar.
Next, with a temporary ethernet connection, get an internet connection:
sudo dhclient enp0s25

Of course, substitute your ethernet interface name, if not enp0s25.
Once you have a connection, install some prerequitites:
sudo apt update
sudo apt install wireless-tools wpasupplicant

In Ubuntu server installation, networking is handled in netplan. Please amend your netplan file thus:
sudo nano /etc/netplan/*.yaml

Change the file to read:
network:
  version: 2
  renderer: networkd
  wifis:
    wlx12457830:
      dhcp4: yes
      access-points:
        "network_ssid_name":
          password: "**********"

Of course, substitute your interface name.
Please note that the access point name and password are enclosed in quotation marks ". Also, netplan is very specific as to indentation and spacing. Please proofread carefully.
Save (Ctrl+o) and exit (Ctrl+x) the text editor nano.
After saving the file, please do:
sudo netplan generate
sudo netplan apply

Reboot. Check to see if you connected. Do you have an IP address?
ip addr show

Are you connected?
ping -c3 www.ubuntu.com


Can't reach tomcat server on Ubuntu 14.04 host from VirtualBox 4.3 Windows 7 guest or Ubuntu 14.04 guest

The nmap results were the biggest hint that the problem was not the network configuration with VirtualBox.  The issue was with Tomcat.

I opened the conf/server.xml file in my Tomcat home directory.  Then I changed the line

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               address="myhostimage.site.org" URIEncoding="UTF-8"/>

to

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               address="0.0.0.0" URIEncoding="UTF-8"/>

Suddenly, I could reach my host Tomcat from the guest VirtualBoxes.  I even changed my VirtualBox settings back to NAT/10.0.2.2 and it still works.

I prefer the NAT/10.0.2.2 solution because I work on a laptop which I move from network to network, where it gets new IP addresses from DHCP.  If I have to put the IP address in all of the hosts files, that's a pain.


Login screen Ubuntu. How to add to ubuntu 14.04?

It looks like you need to disable automatic login.

To do this, go to System Settings. Click on "User Accounts". Click the "unlock" button at the upper right corner of the window, then change "Automatic Login" to off.


Ubuntu Studio 14.04.1 does not offer Bulgarian phonetic keyboard layout

My plain vanilla Ubuntu system contains a keyboard version of Bulgarian phonetic.  I've posted it here.

Download this file to ~/downloads/bg.txt and compare it to your current keyboard lay-out file in /usr/share/X11/xkb/symbols/bg by using the following command:

diff ~/downloads/bg.txt /usr/share/X11/xkb/symbols/bg

If they are identical (which they should be) just go to the dash by pressing Alt+F1Enter, type system settings, click the only remaining icon and add a new keyboard and take Bulgarian phonetic from the list and you're up and running!

If they are not identical, copy the file over yours by the following command:

sudo cp ~/downloads/bg.txt /usr/share/X11/xkb/symbols/bg

and then take the solution for identical keyboards.

щастлива типизиране!


Upgrading to Alpha fails due extras repositories

Just disable the "extra" repositories. These packages still not have trusty counter part, since most of them are for Stable versions:

To disable the extras repositories, just remove all the extras entries from /etc/apt/sources.list file or use the software sources and untick the extras entries there.

sudo sed -i '/extras\.ubuntu\.com/d' /etc/apt/sources.list


You can install multiple libraries with one command:

apt install lib1 lib2 lib3

To avoid apt-cache search you can just type the beginning of a library's name into apt install command and press TAB to autocomplete.


Removable USB Drive disappears from "FILES" list when closed. Can not unmount

Plug in the USB drive to an available port.

then Run the following command as sudo in your Terminal application in order to check the available storage devices on your system and the file system they are using:

$ sudo fdisk -l

Your USB device will usually be listed at the end of the output mostly as sdb-(number). In our case it is listed as sdb1, running a FAT32 file system.

Create a mount point for your USB device through the following command:

Syntax:

$ sudo mkdir /media/[mountPointName]

Note: The name of your mount point can not include spaces; you can seperate the words through an underscore ‘_’.

to mount the USB storage device to the mount point that we created. We will use the following command in order to mount a FAT32 device:

$ sudo mount -t vfat /dev/sdb1 /media/USB -o [securityoption]

the security option is needed and allows you to give/gain access to the USB by specifying one of the following values for permission;

uid=1000

gid=1000

Utf8

dmask=027

fmask=137

For NTFS, use the following command:

$ sudo mount -t ntfs-3g /dev/sdb1 /media/USB

Your USB has now been mounted. You can access it through your media folder.


Problem 1: the /64 on the end of the address parameter is incorrect. That's what the netmask parameter is for; you should delete the /64 on the end of address.

However, the error you're seeing is what you'd expect if there was already a tunnel configured with the name "he-ipv6". At a guess, you've already run ifup he-ipv6, and it's got as far as creating the tunnel before falling over with an error due to the trailing /64. Try doing

sudo ip tun del he-ipv6

to delete the half-configured tunnel before trying again.


How do I obtain the offical Ubuntu patched kernel source without using git?

These steps are very general and apply to every package in Ubuntu/Debian.

This will download the source package and applies all Ubuntu patches.

apt-get source linux-image-3.... # select the exact package you want

Install all build dependencies.

sudo apt-get build-dep linux-image-3...

Enter the directory of the source.

cd linux-... # change accordingly

Do the changes to the source you need.
After finishing the edits, add a new version to the changelog (else it's going to complain the source doesn't match):

dch --local mysuffix

Build it with unsigned changes file and unsigned source package (for local testing):

debuild -uc -us

This will take a while!
Find the packages one level below:

ls -al ../*.deb

Install them like any other package.


postgresql ignores sysem locale on installation

Just figured out that I had no /etc/default/locale, so ran

update-locale LANG=en_US.UTF-8

and now it installs correctly


Black screen, unable to access Ubuntu, boot menu or GRUB

I'm not quite sure what's going on, but I do have a few steps I try whenever something like this happens:

If I can't get into the bios screen, I'll sometimes try unplugging all hard drives, disc drives, and USB drives to see if I get a "No boot drive detected" message. If I get that, then I can usually get into the BIOS again
I'll try booting with the same drive on another computer. I have occasionally taken apart a laptop to do this, because the extra data point can be extremely useful for troubleshooting
If I am able to access the BIOS after unplugging the hard drive and the hard drive is still loading on another computer, I'll check if there's any incompatibility between my ubuntu setup and my motherboard, for example, is UEFI enabled? Is the motherboard in AHCI mode? You can also try booting into a live USB and updating the motherboard firmware (https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool)
If I am not able to access the BIOS after unplugging the hard drive, then evidently something has gone very terribly wrong with the motherboard. Since the last time the motherboard worked was when it had windows installed on it, I might try seeing if it can load the windows installation media or a live windows USB (as linked above). If you can get windows working, I again suggest that you try updating the motherboard firmware, which might fix some of your issues. If you can't even get windows to load anymore, it might be time for a new motherboard
If the BIOS loads just fine but I can't get the ubuntu drive to work on another PC, then something went wrong with the installation. If possible, I'd try to get a live USB copy of ubuntu running and reformat the drive to try again (you probably used this for the install, but just in case - https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-windows#1-overview)
If all else fails, you have a graphics card installed and your motherboard has built-in display output ports, I'd try removing the card. It might just not have liked something that ubuntu did to it


Firstly you must first make sure that the devices on your network support sending to remote host.

Then you have to configure supported protocol on Ubuntu machine for receiving logs from other devices (ssh or sftp, for example, depends of your network devices).

Finally, I guess you will need to parse and analyze your logs, so I think you also will need some tool for doing it (for example Logstash or Graylog).


How to run Humble Bundle V games on a system with Nvidia Twinview?

All Games work after some tweaking:

Amnesia,  Sword & Sworcery, Psychonauts, Super Meat Boy:

These are SDL games, and like all SDL games, they will act strangely if you have two monitors. To run them on only the primary display:

SDL_VIDEO_FULLSCREEN_DISPLAY=0 /opt/amnesia/Launcher.bin64 - note this will probably be called "Launcher.bin32" or similar on 32-bit systems.

SDL_VIDEO_FULLSCREEN_DISPLAY=0 /opt/swordandsworcery/run.sh

I didn't need to do any further tweaking with these and they seem to work perfectly.

NOTE: To apply this tweak to all SDL games such that they can be run this way from the dash, just add

SDL_VIDEO_FULLSCREEN_DISPLAY=0

to /etc/environment on a new line and then reboot.

Limbo:

I had a lot more trouble with this game. With dual head enabled the game crashes with a segfault. Normally this can be avoided by running wine in explorer virtual desktop mode (I have to do this with almost any wine game) however, in this came, Limbo is bundled with a custom wine where explorer mode doesn't work. I had to use the distro-supplied wine instead, and then it works correctly, but you have to run it with the normal startup scripts once to get the ~/.limbo directory created, so:

/opt/limbo/launch-limbo.sh - if this works, great, if not:

sudo apt-get install wine1.4

cd ~/.limbo/limbo/drive_c/Program\ Files/limbo/ - you MUST cd or the game will crash

wine explorer /desktop=limbo,1920x1200 limbo.exe - replace 1920x1200 by your desired resolution

To start the application like this when launched form the dash:

sudo gedit /opt/limbo/launch-limbo.sh

comment out the existing code and add:

cd ~/.limbo/limbo/drive_c/Program\ Files/limbo/
wine explorer /desktop=limbo,1920x1200 limbo.exe

Again, replace 1920x1200 by your desired resolution

Bastion

You can launch it in windowed mode at pretty much any resolution by adding options while launching:

cd /opt/bastion/Bastion/
./Bastion.bin.x86_64 -windowed -x 1680 -y 1000

(My monitors have 1680x1050 & I subtracted 50p for the Unity top bar - so its kinda fullscreen)

To launch the game in windowed mode with the dash-shortcut:

cd /opt/bastion/Bastion/
sudo gedit bastion64.sh

And add " -windowed -x 1680 -y 1000" (without quotes, with desired resolutions) after "LD_LIBRARY_PATH=lib64:. ./Bastion.bin.x86_64".


dpkg: error: cannot scan updates directory `/var/lib/dpkg/updates/'

It seems you have done something terrible to the directory /var/lib/dpkg refer to this posts here to know more about dpkg This and This

Back to your problem, to solve the problem, you should try doing the following,

First Option

Return the dir status only if it was the one messed up.

sudo mkdir /var/lib/dpkg/updates

Then do

sudo apt-get update
sudo apt-get upgrade

Then install the packages as normal

Second Option(This solution assume you have completely messed up with /var/lib/dpkg

Restore a backup of /dpkg/status/  from /var/backups/ or /var/lib/dpkg/ since status holds the database of dpkg,you will probably be able to restore the database and everything will turn back to normal.

In the dir /var/backups/ you will be having a folder like dpkg.status.0 ,and compressed file dpkg.status.1 ,dpkg.status.2 etc,this are the backups we are targeting,we are going to use backup dpkg.status.0 to restore,do the following:

Since you already have dir /var/lib/dpkg
Copy the backup to that dir

sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/

NOTE:The latest backup is dpkg.status.0 file,but If you want to backup from the archive file i.e. dpkg.status.#.gz do

sudo cp /var/backups/dpkg.status.#.gz /var/lib/dpkg/

gunzip -d /var/lib/dpkg/dpkg.status.#.gz

Then rename dpkg.status.# to status i.e. dpkg.status.0

sudo mv /var/lib/dpkg/dpkg.status.0 /var/lib/dpkg/status

Then create the folder update

sudo mkdir /var/lib/dpkg/update

Then sudo apt-get update and sudo apt-get upgrade

After that you can install the softwares as normal!


Why does apt-get require sudo?

Not always. You can perfectly use apt-get without sudo. There are instances where you don't need sudo at all, like using apt-get download which downloads a package to your current directory, apt-get source which downloads the debian sources files to your current directory, changelog which downloads and prints the changelog of a given package, and any command which has the --simulate/--dry-run/--no-act (in the case of install you need also --no-download).

This is because these actions/commands doesn't require to write system directories.

Now, why apt-get needs sudo? Actually it doesn't. You can ditch apt-get, download a package with wget and use dpkg --extract and extract the package in whatever directory you like. There's also --instdir which should work for binary only package.

Now, why this isn't the default? Because it's a pain. To do what you want, we would need to repackage each package twice, one for the right way, and another to do what you want. At build, binaries normally need to know where are the files and libraries they need (in some cases, this is hardcoded at compilation).

Now, what you can do instead? Just chroot some environment a la virtualenv, where you can install packages without root.

Summary, this is not the way that apt-get was meant to be used, and I don't know another package manager similar to apt-get which allows you to do that. At the end of the day, apt-get is just a front-end to dpkg which could do some of this.


Script that send Public/Global IP On restart

You could try using sendmail.
install

sudo apt install -y postfix

choose internet side and enter your server's hostname

Write a script e.g. in sudo nano /usr/local/bin/sendIPmail:

#!/bin/bash

# 1. gets the primary IP
#from https://stackoverflow.com/a/25851186/7111561
IP=$( ip route get 1 | awk '{print $NF;exit}' )

# 2. send it using sendmail
#from https://stackoverflow.com/a/13390926/7111561

#--- adjust those ---
recipients="your.mail@address,another@mail.address"
subject="some subject"
from="info@your.server"
#--------------------

/usr/sbin/sendmail "$recipients" <<EOF
subject:$subject
from:$from

New IP is $IP
EOF

exit 0

make it executable

sudo chmod +x /usr/local/bin/sendIPmail

and call it on every reboot
run

sudo crontab -e

(select your editor e.g. 2 for nano)
Add the line

@reboot /usr/local/bin/sendIPmail

This does not require any external webpages or complex scripts/setups and uses only packages from the official Ubuntu repos.

NOTE: Alternatively you really should consider using a static IP address for a server!


Compilation time slow on a single computer

Turns out the CPU was not cooling properly, and this wasn't reported to the OS, nor in any way did it make the system shut down.

During compilation, CPUs maxed out quickly at 100C. Running sensors showed that the critical limit of the CPU was in fact 100C. After dismounting the cooler, I could see that only a small patch of thermal paste had actually touched the CPU!

After reapplying the thermal paste, compilation takes 4 minutes, but the CPU still reaches 95C, so I have ordered a Cooler Master 212 EVO instead of the stock Intel cooler we have now.

I guess out IT dept. owes a round of beer for not building the computer properly.

Thanks for the help all!


Your ISO is stored in the /home/ubuntu-builder To access

Open  the home folder icon on the Ubuntu launcher

Open file system

Open Home directory there you will see your home directory and ubuntu-builder directory

Open ubuntu builder directory and you should see the ISO you made


Ravi,

To answer your question, I am assuming you want to modify the hypervisor source code and that you are an experienced Linux kernel coder. If you do not have experience with kernel coding, then you should probably first try a simpler kernel coding project to gain some experience. Explaining how to modify the Xen shadow memory code is beyond the scope of AskUbuntu. The answer will certainly not fit one of these replies. What you want to do is  very complicated.

First of all, struct page_info is not a list. It is a building block abstract data type that is used in more than one list in the Xen hypervisor. So please tell us which list you are looking at that uses page_info.

As you have already seen, there is a reference count in a page_info structure, but it cannot be used to directly to do what you want, AFAIK. The back pointer _domain that you see as part of the page_info struct is only defined for pages not being used as shadow pages.

Xen can be configured to do what you say, allocate all memory when the guest is started, but it can also be configured to use ballooning and allocate memory later, both up and down. To learn about balloon driver and this kind of memory allocation, see the Xen wiki at http://wiki.xen.org/wiki/Main_Page.

There is also a feature called transcendental memory, referred to as "tmem" in the source. If configured to use tmem, Xen will take memory away from a guest that is not using it, to give it to another guest that needs it more. So there is more work if you want to modify the Xen hypervisor to track guest access of all shadow memory, running in all possible memory management modes.

If you are not kernel coding but just trouble shooting, you can connect a serial terminal to the hardware that is running Xen (see the Xen wiki for how to do that) to see memory usage. Once you have the serial terminal running correctly you can not only talk to dom0 but by hitting Ctrl-A 3 times, you can talk to the hypervisor directly. Keypress 'h' to get a help list of commands.

Sincerely,

Segfaultreloaded


How to configure Ubuntu 13.04 to shutdown when the power button is pressed

Ubuntu has a menu entry which allows you to bind keyboard events to commands. I would assume that the action triggered by the power button would also be accessible from this menu.
Make a script called 'shutdown.sh' (or something) and put it in your home directory.
It's contents should simply be 'shutdown -h now'.
Run 'sudo chmod +x shutdown.sh' to make it executable.
In a terminal, run 'sudo nano /etc/sudoers', this is will open a text file for editing. Open it with a GUI text editor by replacing 'nano' with 'leafpad', 'gedit', etc. - whatever you have installed.

Add these lines to the end of the text file:

Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot
<your username> ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

Obviously, replace '' with your actual username.
Save the changes you made (using Ctrl+o if you're using nano)
Finally, configure the power button to launch your script using the Ubuntu keyboard menu.
Like I said, I don;t use Unity so I am not sure of the exact procedure necessary to configure the power button to launch script, nor am I aware of the name of the key you will have to enter into the keyboard menu.

More information about editing the sudoers file can be found here: Ubuntu Sudoers


If using Ubuntu, you should be fine just installing some packets from the repository. php-gnupg has GPGME's libgpgme11 package as dependency. So instead of compiling GPGME on your own, simply install the required packages:

sudo apt-get install php-gnupg

This also means you will get updates for GPGME and the PHP library together with your operating system, and will not have to care about them manually.


sed: -e expression #1, char 11: unknown option to `s'

The format of a sed substitution (s) command is

s/pattern/replacement/flags

so in s/,/\g; s/\t/,/g it's interpreting , as the pattern, \g; s as the replacement, leaving \t/,/g as a sequence of flags. Since \t is not a valid flag, that's an error.

Presumably what you intended was

sed 's/,//g; s/\t/,/g' "${tsv_file}" >> "${csv_file}"

to remove all the commas and then convert tab separators to comma separators. However if you have a TSV file that contains commas, you might want to consider using a dedicated CSV formatting tool such as csvformat from the csvkit package (which will properly quote fields, allowing you to retain commas within a comma-separated format) rather than trying to handle them on an ad hoc basis.


Touch screen not working on an HP Touch-smart 610

I have the same device on which I installed ub 12.04 (64 bits), I also asked a question about it a while ago. For me also the touchscreen does not work from the live CD. You need to install, then update the system, and then remove a certain section from a Xorg configuration file to make things "work".

See here my question and the solution: Mouse selects everything on its own

(I do not guarantee that it will work for you. Also I do not multitouch, just singletouch. The device should however be able to do multitouch.)


Can not install google-chrome-stable on ubuntu 12.10 because of libnss3 (>= 3.14.3)

You may have to purge google-chrome, libnss3, libnss3-1d, and then do an autoremove, and then an autoclean. Then install libnss3, and libnss3-1d again from official repositories.
Then go to google and redownload chrome, and reinstall.

sudo apt-get purge ***name of packages && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get install ***libnss3 libnss3-1d


It is a bug in Grub, see Launchpad bug #1311247 - error: malformed file, press any key to continue. The upstream bug report is at bug #42134: loadenv.c – check_blocklists – algorithm for block overlap check is wrong. There does not seem to be a reliable workaround - you will just have to wait for it to be fixed.


Can no longer use Screen Share to connect Mac to Ubuntu since upgrading to 14.04

Sorted.
Using a combination of clues from http://discourse.ubuntu.com/t/remote-desktop-sharing-in-ubuntu-14-04/1640 (which is all about VNC access) and https://bugs.launchpad.net/ubuntu/+source/vino/+bug/1281250 (which discusses the bug introduced into Vino) I have managed to resolve the matter.
Essentially you have to disable encryption on remote desktop access in Gnome due to a bug that has come to surface in Vino. However some threads tell you uncheck it in the wrong place. Follow these guidelines and you should be able to resolve it quickly.
Specifically it's
dconf > org > gnome > desktop > remote-access > require-encryption - uncheck
and NOT
dconf > desktop > gnome > remote-access > enabled - uncheck
Here is how you do it:

First make sure Desktop Sharing is set up properly.
Download dconf-tools by typing in Terminal sudo apt-get install dconf-tools
Run dconf-editor
Expand org
Expand gnome
Expand desktop
Select remote-access
Uncheck require-encryption (don't click on Set to Default as it rechecks it)
Exit dconf-editor

It should now work. Tested through a reboot and all good.
Hope it helps.
(I have got a screen shot of dconf but don't have enough points on here to post it - I am sure everyone can work it out for themselves though! :-) )


There are many possible reasons for this. For instance, if your computer is using BIOS, you have to make sure, that the disc selected as boot device in BIOS setup, and the device you installed the Ubuntu Bootloader (GRUB) to are the same. Also, when installing Ubuntu, you should make sure that the bootloader is installed to the MBR of the HDD you want to use as a boot device in BIOS, not to one of its partitions.

If your computer is using (U)EFI, you must be careful to install both, Windows and Ubuntu in EFI mode (preferred), or both in BIOS compatibility mode (emergency solution, if EFI does not work). If you use BIOS compatibility mode, the pervious paragraph applies. If you use EFI mode, you might have to go to the EFI setup screen after installing Ubuntu, since both, Windows and Ubuntu, will create an EFI boot entry and on some computers EFI does not automatically switch to Ubuntu. The labeling is slightly misleading, since the Ubuntu entry actually launches a bootloader that allows you to choose every time you boot your PC, if you want to boot to Ubuntu or Windows.


Cutting numbers into a specific decimals

You can use sed:

sed -E 's/([0-9]+\.[0-9]{5})[0-9]*/\1/g' file

Add -i option to add file in place.


How do I add a shortcut to the Unity Dash?

Make sure there's no

Hidden=true

line in the .desktop file.

No idea how that line got in there - possibly created by alacarte?

Thanks to Jacob Vlijm for suggesting that I post the contents of the file.


Sequence of files used when booting the Lubuntu 14.04

First the kernel boots, then it launches init, which uses the scripts in /etc/init.d/ to start up all of the system services. The final service to be started is lightdm which in turn starts xorg and then draws a login screen. man boot-scripts. The whole startup process, from boot loader to graphical login, is complicated, and understanding it all requires understanding how initrd works, how upstart works, how the individual init scripts work, how udev works, how xorg works, etc. Each subsystem has its own configuration scripts.

Do not expect to be able to learn it all overnight - it takes years to become an expert. I would suggest you start by reading the scripts in /etc/init.d/ and playing around with starting and stopping them. Most of the configuration files are, in general, found in /etc/ - if you look in that directory, you will find many files, each with its own purpose, each installed by some software. To find out which package a particular config file came from use dpkg eg. dpkg -S /etc/locale.alias will tell you that file came from the locales package. Some of these files have their own man pages (eg. locale.alias), for others you will have to read the package docs or search the web.


Unable to change Alt_R key using xmodmap

using xmodmap like you did above worked for me. My assumption is that Alt_R may be assigned to the function of minimizing windows somewhere and that the system doesn't forward the keypress to the Terminal after this. Have you checked the system shortcuts or maybe in compiz? Not sure if there is a compiz-module to minimze windows via a shortcut though.


installing Oracle Java 7 as Firefox (v. 22) plugin fails

Try the instructions/PPA described here: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

I installed Java 7 using that method, and the plugin has been picked up by Firefox (currently 25.0). I am currently on Ubuntu 13.04, but this has worked on 12.04 as well.


How you install R 3.2.2 in Ubuntu 14.04 LTS?

I don't know of a "good/"easy" way to get an intermediate version of R (one between the Ubuntu repo version and the current one), but you have a few options:

You will likely need to install dependencies anyway, so you could try installing from deb. If you only need the one version installed on your system, this may be the way to go. Install it using gdebi, which automatically resolves dependencies for you (first sudo apt-get install gdebi-core; then sudo gdebi packageName.deb).
You can attempt to build from source, but that can be a pain. The upside is that you can have multiple versions of R installed this way by specifying a --prefix=/path/to/use in the ./configure step (see here).

wget https://cran.rstudio.com/src/base/R-3/R-3.2.2.tar.gz
tar xvf R-3.1.1.tar.gz
cd R-3.2.2
./configure
make && make install

If you are familiar with Docker, you can get version-specific R images:

docker pull r-base:3.2.2

then

docker run -it --rm r-base:3.2.2


How can I programmatically change the sidebar auto-hide behaviour?

Add the following lines at the beginning of your script:

AUTOHIDE=$(dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode)
dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1

The first line saves whether or not we currently autohide to the variable AUTOHIDE. The second line simply turns on autohiding.

Then, add the following at the end of the script:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode $AUTOHIDE

This restores the autohide setting from the variable we saved earlier. If autohiding was enabled before you launched Minecraft, the script won't turn it off; otherwise, it will.

I can only think of two situations in which this wouldn't work:

If you lauch Minecraft using exec, in which case the code at the end wouldn't get called (not much we can do about that except for not calling it with exec).
You run multiple instances of Minecraft at the same time, which would require a more elaborate method (which I would be happy to detail for you, should you be interested).


Block device full - how do I clear space

/dev/sdaN is not a directory, but a reference to the Nth partition of your hard drive. df -h shows that /dev/sda1 is mounted on /. If you want to see what is taking up space on a device, you look in that device's mount point, in this case /.


Press the ESC button or F10 during startup to access the boot &/or BIOS menu.

https://superuser.com/questions/521389/how-do-i-boot-my-samsung-laptop-from-a-cd-dvd

http://forum.notebookreview.com/samsung/709669-getting-series-3-notebook-np300-v5a-boot-second-hdd.html


Methods for creating good admin documentation?

Create a script.

We have a post installation script for when we need to install a new server. After the basic Ubuntu server is installed we do a semi-unattended installation of apache, mysql and some other software. Then we extract an image with our software and settings for both apache (ie. site-enabled) and mysql (ie. my.cnf).

The fun part of Linux is that anything is a file so this script also has lots of "sed" statements that alter settings files from command line. Think along the lines of performance tweaks, cron jobs in /etc/crontab, our own log files.

Comments above the commands make sure anyone should be able to understand what is happening.

Having these things on paper only works in theory but after a while it is useless since  people forget to update changes they made ... Having them in a script will have everyone updating this script (since it makes their work easier).


This also worked for me:

%domain^admins ALL=(ALL:ALL) ALL

I assume this is because of the following commands used when setting up PBIS:

sudo /opt/pbis/bin/config UserDomainPrefix $domain
sudo /opt/pbis/bin/config AssumeDefaultDomain true
sudo /opt/pbis/bin/config LoginShellTemplate /bin/bash
sudo /opt/pbis/bin/config HomeDirTemplate %H/%U

This seems to make the domain accounts appear as local accounts to the system by assuming the domain name is before the login account. Therefore the domain name is not required by the sudoers list.

Any thoughts?


How would I mount a remote server so it persists after a reboot?

You can do this by editing /etc/fstab

This thread should be helpful: http://ubuntuforums.org/showthread.php?t=1173714


Firefox/Chrome, how to whitelist localhost and wikipedia.org?

For Chrome there is a command line parameter you can use:
google-chrome --host-rules="MAP * 127.0.0.1, EXCLUDE wikipedia.org","MAP * 127.0.0.1, EXCLUDE *.wikipedia.org"

This maps every domain to localhost excluding wikipedia.
For Firefox create a file /usr/lib/firefox/distribution/policies.json with this content:
{
  "policies": {
    "WebsiteFilter": {
      "Block": ["<all_urls>"],
      "Exceptions": ["*://wikipedia.org/*","*://*.wikipedia.org/*","*://localhost/*"]
    }
  }
}

You can find more information about the policies supported by firefox at https://github.com/mozilla/policy-templates


Goto the shutdown button at the top right and select system preferences. From there in images...

Unlock and see the settings here:

This will NOT work with on an ecrypted home.
Other users can log in by choosing log out when the system has booted.

And since this question got 3 of the same answers something extra...
When you enter gconf-editor in command line and go to...

this will turn the system of without any confirmation when you press the power button ;)


It looks like you wiped out the uefi boot partition on the hard drive, you still need this partion eventhough you went to Legacy Boot ... the system BIOS is still looking for this, you need to recreate the partition table to include that first partition ... then you can go from there ...

That error message from GRUB tells the story its missing the /boot/ partition ...

I'm really new at this but I did the same thing ... so I took my backup copies of the windows restore that I made when I got the computer put it all back then when I restarted it I booted the Linux install and blew it all away and installed Linux ... Linux re-formatted ever thing again, and I got it working ... I originally thought I had bad HHD .... good luck - fixitmr-


How to disable livepatch tokens remotely

The token is stored in /var/snap/canonical-livepatch/common/machine-token.

The only option I found so far is to have a backup of the machine that you can boot in a virtual machine (if it wasn't a VM to begin with as in your case). Preferably you have a disk image that you can convert to a virtual machine image, but a tarball of the root partition may also work. I tried changing the hostname and chrooting with /sys /proc /run and /dev mounted but had no success, snap reported that it could not find the livepatch snap. The operation is successful when you see the following message:

Successfully disabled device. Removed machine-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Bear in mind that machine token is not your authentication token. Also I'm a bit in doubt about the limit and how it's supposed to work if there is no portal to enable and disable it (for non-Ubuntu advantage users).

  Q: But I don’t want to buy UA support!

  A: You don’t have to! Canonical is providing the Canonical Livepatch Service to community users of Ubuntu, at no charge for up to 3 machines (desktop, server, virtual machines, or cloud instances).
  http://blog.dustinkirkland.com/2016/10/canonical-livepatch.html

This is interesting, I just tried it out and enabled it on 4 machines. I went further and enabled 6 machines.

  Ubuntu Community users of the Canonical Livepatch Service who want to eliminate the small chance of being randomly chosen as a canary should enroll in the Ubuntu Advantage program (starting at $12/month).

The more free testers the better?


Help documentation and translations of the programs in other languages. So you can download other "translation entries" and set for instance Firefox to german, swedish or italian if you like. However, if you only use one language in all of your programs, then it makes no sense to check for 100 other translation files that you don't need anyway.


Is there a program out there that will adjust audio volume to a certain level system wide?

We can adjust default output device, and volume level for an application by installing and running pavucontrol :

here shown in XFCE


https://wiki.ubuntu.com/WilyWerewolf/ReleaseNotes

Due to changes in syslinux, it is not currently possible to use usb-creator from 14.04 and earlier releases to write USB images for 15.04 or later; we believe that it is also not possible to use usb-creator from a 15.04 or later system to write USB images for earlier releases. For now the workaround is to use a matching release of Ubuntu to write the images, but we intend to issue updates soon to work around this incompatibility.

At launchpad they are known as bug 1325801, bug 1446646 and bug 1499746.


How to do `sudo apt install aptitude` but auto default to install package maintainer version?

If you automate answering to questions in apt, you do that for all prompts at once. It is not possible to selectively disable prompts. See this answer: -y or --yes or --assume-yes will automatically answer -y to all prompts.


Installing Ubuntu 16 on My Dual Boot PC [Last Step Not Working]

As soon as you install the Ubuntu ,1st update it and Install Grab2 customizer and change the order of boot there.
Grab2 customizer must show the windows and ubuntu option in the list.

sudo apt-get update

sudo apt-get install grub-customizer

Note: please don't restart Ubuntu on its installation


How to remove an unknown key from LUKS with cryptsetup?

The magic option is luksKillSlot.

The point is to figure out which of your three keyslots contains the
key to be deleted. If you don't know it yet, you can check this out by trying
all the known keys one after another and let cryptsetup tell you
which key refers to which slot. The unknown key then refers to the remaining slot.

Check which slots are used (in my case slots 0, 1, and 2 are used). Replace /dev/sdb4
with your actual device:

root@host:~# cryptsetup luksDump /dev/sdb4
LUKS header information for /dev/sdb4
...
Key Slot 0: ENABLED
...
Key Slot 1: ENABLED
...
Key Slot 2: ENABLED
...
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Now open (=decrypt) your device with your first key and let cryptsetup be verbose
so it shows which slot was used to unlock the device:

root@host:~# cryptsetup -v open --type luks /dev/sdb4 someAlias
[enter one of your two known keys]
Key slot 2 unlocked.
Command successful.

Remember which slot (2 in this case) the first key refered to and undo the step:

root@host:~# cryptsetup close someAlias

Repeat with your second known key:

root@host:~# cryptsetup -v open --type luks /dev/sdb4 someAlias
[enter the second of your two known keys]
Key slot 0 unlocked.
Command successful.
root@host:~# cryptsetup close someAlias

Now you know that the two known keys refer to slot 2 and slot 0. So slot 1
must be the one that contains the unknown key. Delete it with:

root@host:~# cryptsetup -v luksKillSlot /dev/sdb4 1
Keyslot 1 is selected for deletion.
Enter any remaining passphrase:
[enter one of the two known keys]
Key slot 0 unlocked.
Command successful.

Check it out:

root@host:~# cryptsetup luksDump /dev/sdb4
LUKS header information for /dev/sdb4
...
Key Slot 0: ENABLED
...
Key Slot 1: DISABLED
Key Slot 2: ENABLED
...
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED


Can I delete upgraded versions of kernel to free up space?

You can delete the upgraded versions of kernels, but then you might never get kernel upgrades anymore (because certain kernel meta package will be deleted, too; in your case it would probably be linux-generic-hwe-16.04). To get security updates, it is better to use the latest available kernel.
With such low /boot partition size, it might be a good idea to install linux-purge and run e.g.
sudo linux-purge --keep=1

That will purge all kernels except the one(s) depending on the meta kernel(s), and one earlier version of each of those kernels. It will not remove the current booted kernel.
You could run it periodically, e.g. during each boot. How to do that automatically is a matter of a separate question.
If you have a good reason to stick with the kernel version 4.15.0-99, you could use
sudo linux-purge --choose

to remove the other ones selectively.


I think I figured it out the problem was most likely that the drive was format in NTFS. I formatted it to EXT4 and so far no more problems.


Try installing unity-lens-applications

You can do this by sudo apt-get install unity-lens-applications

If that doesn't work, remove it with sudo apt-get purge unity-lens-applications MAKE SURE IT WON'T REMOVE ANY OTHER PACKAGES! If it does, make a note of them.

Then, sudo apt-get install unity-lens-applications <+ any purged>

Also, try sudo apt-get install unity-scope-home

If that doesn't work, try rm -rf ~/.local/share/zeitgeist and relogging.


mdadm checking RAID 5 array after each restart

UPDATE 04/05/2021 begin.
My previous answer seems to be not helpful.
The check occurred again despite the change in /etc/default/mdadm.
I've found something else to investigate.
mdcheck_start.service
mdcheck_start.timer
mdcheck_continue.service
mdcheck_continue.timer
/etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer
/etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer
/etc/systemd/system/mdmonitor.service.wants/mdmonitor-oneshot.timer
systemctl status mdcheck_start.service
● mdcheck_start.service - MD array scrubbing
     Loaded: loaded (/lib/systemd/system/mdcheck_start.service; static; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● mdcheck_start.timer

systemctl status mdcheck_start.timer
● mdcheck_start.timer - MD array scrubbing
     Loaded: loaded (/lib/systemd/system/mdcheck_start.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Sun 2021-05-02 19:40:50 CEST; 1 day 14h ago
    Trigger: Sun 2021-06-06 22:36:42 CEST; 1 months 3 days left
   Triggers: ● mdcheck_start.service

May 02 19:40:50 xxx systemd[1]: Started MD array scrubbing.

systemctl status mdcheck_continue.service
● mdcheck_continue.service - MD array scrubbing - continuation
     Loaded: loaded (/lib/systemd/system/mdcheck_continue.service; static; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● mdcheck_continue.timer
  Condition: start condition failed at Tue 2021-05-04 06:38:39 CEST; 3h 26min ago
             └─ ConditionPathExistsGlob=/var/lib/mdcheck/MD_UUID_* was not met

systemctl status mdcheck_continue.timer
● mdcheck_continue.timer - MD array scrubbing - continuation
     Loaded: loaded (/lib/systemd/system/mdcheck_continue.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Sun 2021-05-02 19:40:50 CEST; 1 day 14h ago
    Trigger: Wed 2021-05-05 00:35:53 CEST; 14h left
   Triggers: ● mdcheck_continue.service

May 02 19:40:50 xxx systemd[1]: Started MD array scrubbing - continuation.

sudo cat /etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer
#  This file is part of mdadm.
#
#  mdadm is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=MD array scrubbing

[Timer]
OnCalendar=Sun *-*-1..7 1:00:00
RandomizedDelaySec=24h
Persistent=true

[Install]
WantedBy=mdmonitor.service
Also=mdcheck_continue.timer

sudo cat /etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer
#  This file is part of mdadm.
#
#  mdadm is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=MD array scrubbing - continuation

[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=mdmonitor.service

sudo cat /etc/systemd/system/mdmonitor.service.wants/mdmonitor-oneshot.timer
#  This file is part of mdadm.
#
#  mdadm is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=Reminder for degraded MD arrays

[Timer]
OnCalendar=daily
RandomizedDelaySec=24h
Persistent=true

[Install]
WantedBy= mdmonitor.service

UPDATE 04/05/2021 end.

Try sudo dpkg-reconfigure mdadm.
Please note that I am not sure if the above tip would help.
I have the same problem with my raid5 on 20.04.
First I've tried editing the /etc/default/mdadm manually and changed AUTOCHECK=true into AUTOCHECK=false.
It did not help.
Today I've used dpkg-reconfigure mdadm.
Now the /etc/default/mdadm file looks the same (AUTOCHECK=false) but as a part of dpkg-reconfigure mdadm there was also an update-initramfs call. I hope it will help.
... update-initramfs: deferring update (trigger activated) ...
The extended log:
sudo dpkg-reconfigure mdadm
update-initramfs: deferring update (trigger activated)
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
File descriptor 3 (pipe:[897059]) leaked on vgs invocation. Parent PID 655310: /usr/sbin/grub-probe
File descriptor 3 (pipe:[897059]) leaked on vgs invocation. Parent PID 655310: /usr/sbin/grub-probe
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Found linux image: /boot/vmlinuz-5.4.0-71-generic
Found initrd image: /boot/initrd.img-5.4.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-70-generic
Found initrd image: /boot/initrd.img-5.4.0-70-generic
File descriptor 3 (pipe:[897059]) leaked on vgs invocation. Parent PID 655841: /usr/sbin/grub-probe
File descriptor 3 (pipe:[897059]) leaked on vgs invocation. Parent PID 655841: /usr/sbin/grub-probe
done
Processing triggers for initramfs-tools (0.136ubuntu6.4) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-72-generic

The full /etc/default/mdadm file:
cat /etc/default/mdadm
# mdadm Debian configuration
#
# You can run 'dpkg-reconfigure mdadm' to modify the values in this file, if
# you want. You can also change the values here and changes will be preserved.
# Do note that only the values are preserved; the rest of the file is
# rewritten.
#

# AUTOCHECK:
#   should mdadm run periodic redundancy checks over your arrays? See
#   /etc/cron.d/mdadm.
AUTOCHECK=false

# AUTOSCAN:
#   should mdadm check once a day for degraded arrays? See
#   /etc/cron.daily/mdadm.
AUTOSCAN=true

# START_DAEMON:
#   should mdadm start the MD monitoring daemon during boot?
START_DAEMON=true

# DAEMON_OPTIONS:
#   additional options to pass to the daemon.
DAEMON_OPTIONS="--syslog"

# VERBOSE:
#   if this variable is set to true, mdadm will be a little more verbose e.g.
#   when creating the initramfs.
VERBOSE=false


Can't burn cd's with Brasero or K3B, it doesn't see the cd

I'm having the same problems. The problem only happens when more than 3.8 GB of data is being burned. It has become a real pain to reinstall cdrtools constantly, and there are an increasing number of tricks needed to make burning programs work. Big, big fail on the Debian/Ubuntu front...

The problem is with cdrkit ( wodim /genisoimage ) which doesn't handle large volumes of data very well. This is a problem dating back years and stemming from the replacement of cdrtools with the dysfunctional (and unmainained) cdrkit.

This is one of my biggest gripes with Debian/Ubuntu.


You can use this shortcut: Ctrl+L.

Or, go to Files and select Enter Location:

See also: Where to configure shortcut keys of Nautilus?


ubuntu 12.4 LTS dualboot with windows xp not working

I had exactly the same problem with windows 7 and ubuntu 12.10. Your Windows Bootloader has been overwritten by Ubuntu its. With a windows xp recovery cd you can reinstall the windows xp boatloader


sudo cp --preserve=timestamps /home/CorrectUser/.config/monitors.xml /var/lib/lightdm/.config/

This fixed my resolution in login screen.
When i tried to hardlink instead of copy,it didn't worked.(the hardlinking operation failed)Weird


Popcorn-time.se ubuntu 14.04 lts black screen

I try to solve the problem; but there is none. Hopefully another version of Popcorntime is working fine! :)

Try to install from https://www.popcorntime.ws/download

Unpack and run from terminal ./Popcorn-Time


Type

apt-cache policy libreoffice

You should get output that looks something like this:

libreoffice:
  Installed: 1:4.2.4-0ubuntu2
  Candidate: 1:4.2.4-0ubuntu2
  Version table:
 *** 1:4.2.4-0ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     1:4.2.3~rc3-0ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

The one with *** is your currently installed one (or maybe it's the candidate version.. I'm not positive now that I think of it)

To install specifically, say, the second one (in my case) you would type

sudo apt-get install libreoffice=1:4.2.3~rc3-0ubuntu2


How to install CollabNet Subversion Edge 4.0.10 in Ubuntu 14.04?

There is a dedicated page hosted by collabnet on this topic.

How ever summarizing the process:

If you have Java installed. Set you JAVA_HOME to point your installation directory. If you don't have java installed then install it first.
Extract your files from archive
tar -vzxf CollabNetSubversionEdge<your_version>.tar.gz
Change directory and execute executable csvn/bin/csvn start


There could be one of two issues with this.

You may not be running the installer as root.
You may have another package manager or installer running, or a broken APT.

If you do have a broken APT and you are sure you have exhausted any other option, try removing the lock and doing a reconfigure by doing:

sudo rm /var/lib/apt/lock
sudo dpkg-reconfigure -a

This should remove the lock and reconfigure dpkg, so you should be able to install again. be careful not to shut down your PC while installing something via APT again.


Looks like my scrennshots are correct.
That is the default alsamixer displays spdif.

I did not know, that the optical cable got two diffrent input types. I have changed the direction and did a reboot. All is working now.


From a bare minimum Ubuntu to something like an AWS Ubuntu standard image

That is a tough one. I can not provide "the set of commands", but describe how I would approach this task.

.deb packages have priority's. Most of the packages have the priority optional, but the ones that are interesting here are the packages with required, important and standard priority. Those are the ones that are usually installed on every system. apt-get is one of them. You could scan the Packages file of the main repository for a list of all packages that are required and important priority, download all the .deb files and install them with dpkg -i. (I sincerely hope you do not have to bootstrap dpkg!) Then you should have a functional apt system. Then you should be able to use aptitude in order to install all standard packages. Done that you could install the task server with tasksel.

Packages file for amd64

Good luck


How to display the IP address of the sender when rsyslog rejects a UDP message?

I downloaded the version 5 source (https://github.com/rsyslog/rsyslog/archive/v5-stable.zip) and looked at plugins/imudp/imudp.c.  In this file, it's a hardcoded message with no option for displaying the sender's frominet IP address:

if(glbl.GetOption_DisallowWarning) {
    time_t tt;
    datetime.GetTime(&tt);
    if(tt > ttLastDiscard + 60) {
        ttLastDiscard = tt;
        errmsg.LogError(0, NO_ERRCODE,
        "UDP message from disallowed sender discarded");
    }
}

I also found that tools/syslogd.c contains a now-unused remnant chkMsgAgainstACL() that did display the fromHost value.

errmsg.LogError(0, NO_ERRCODE,
    "UDP message from disallowed sender %s discarded",
    (char*)fromHost);

I'm not sure why Rainer decided not to keep that feature.  He does discuss some performance issues around this section of the code here: http://blog.gerhards.net/2009/11/acls-imudp-and-accepting-messages.html

In any case, it looks like I'd have to compile my own version of rsyslogd if I want to display the sender's IP address.


There were two DMs one above the other that caused the issue.

I selected an alternative theme using gnome-tweak-tool

and then removed the theme.
sudo apt remove flat-remix-gnome

And reinstalled default gnome-desktop gdm3 using
sudo apt install --reinstall ubuntu-gnome-desktop gdm3

and restarted gdm3 service
sudo systemctl restart gdm3


So, after I successfully booted installation of Debian and installed it on the HDD I just tried to boot Ubuntu from USB one more time. It was same as before flashing screen and stuff, but after few seconds screen was flashing in longer delays and randomly so I let it few more seconds and it booted. I also connected LAN cable to the ethernet port, but I thing that can not be problem so I still do not know what happend, but it is working now so no problems at all.


Virtual playback device with remapped channels

I finally did it, using:
load-module module-remap-sink sink_name=RemappedStereo sink_properties="device.description='RemappedStereo'" remix=no master=MASTER_DEVICE channels=3 master_channel_map=side-right,front-right,lfe channel_map=front-left,front-right,lfe

Use pacmd list-sinks | grep -e 'name:' to find your <MASTER_DEVICE>.
Still, downmixing doesn't work correctly, I think.


formated windows without uninstalling ubuntu

updating the grub menu would solve the problem

  sudo update-grub


Is there a utility to show total up/download quantity of a process

Just keep the nethogs running.

You can change display modes by pressing M.
The first default mode is kbps, after pressing M few times you can get total bytes.

Edit: added screenshots


Some default fonts different between two 14.04 installations

Try deleting:

  ~/.config/fontconfig/fonts.conf

Some times font preferences are stored there and this place is not affected by tweak tools like Ubuntu and Unity tweak tools, these don't even show what is stored there.


xrandr reports external VGA output connected even with no cable attached

After adding

Option "monitor-VGA" "VGA"

to the "Device" section of your xorg.conf, add the following "Monitor" section:

Section "Monitor"
    Identifier "VGA"
    Option "Ignore" "True"
EndSection

This will tell X to ignore the output.


Dual boot Ubuntu 14.04.3 LTS with Win 10 on separate hard drives

It looks like you've got an HP. Many HPs have known EFI bugs that prevent them from booting anything but Windows via the normal EFI boot order mechanism. This might be your problem; however....

There's no evidence of GRUB on your EFI System Partition (ESP; /dev/sda2 in your case). This might be an oversight of Boot Repair/Boot Info Script; it sometimes omits valid boot loader files. It could also be that the files have "disappeared" because of a filesystem error. This can happen because you haven't disabled the "Fast Startup" feature in Windows 8 and later. In Windows 8, you can do so as described here, among other places. In Windows 10, the instructions are here, among other places. (You may also need to disable hibernation, as described here.) Note that disabling Fast Startup won't fix any filesystem damage that already exists, so you may need to use Boot Repair or some other tool to re-install GRUB. Alternatively, since you want to use rEFInd in the long run, you can skip GRUB -- use rEFInd on a USB flash drive or CD-R (you can get images from its downloads page), boot Ubuntu using it, and install rEFInd.


Shell how to print an array of elements in pairs of ranges with comma and hyphen

You can simply use printf "%d-%d," "${myarray[@]}":

$ printf "%d-%d," "${myarray[@]}"
0-9,11-20,22-31,33-42,$

However, that lacks a final newline and has an extra comma, so you could extend it to:

$ echo $(printf "%d-%d," "${myarray[@]}") | sed 's/,$//'
0-9,11-20,22-31,33-42

This will fail if your array doesn't have an even number of elements (it will print an extra 0):

$ myarray=(0 9 11 20 22 31 33)
$ echo $(printf "%d-%d," "${myarray[@]}") | sed 's/,$//'
0-9,11-20,22-31,33-0

You might prefer to use %s instead which just leaves the last one empty:

$ echo $(printf "%s-%s," "${myarray[@]}") | sed 's/,$//'
0-9,11-20,22-31,33-

And finally remove the trailing -:

$ echo $(printf "%s-%s," "${myarray[@]}") | sed 's/[,-]*$//'
0-9,11-20,22-31,33


Can't find openvswitch-brcompat on ubuntu 13.10

Add the below  line to your /etc/apt/sources.list file and then save it,

deb http://cz.archive.ubuntu.com/ubuntu precise-updates main universe

Update the repositories,

sudo apt-get update

Install the package,

sudo apt-get install openvswitch-brcompat


Tried to install wireless driver and now terminal and update manager no longer work either

The message "Could not get lock /var/lib/dpkg/lock - open" generally means the some other program to install or remove software is open; it may be Software Updater, Ubuntu Software Center, Synaptic or similar. Please find and close it. It may take a reboot.

bcmwl-kernel-source is incorrect for your 14e4:4312 device; you need to purge it. Please open a terminal and do:

sudo apt-get remove --purge bcmwl-kernel-source

And then get a temporary wired ethernet connection and install the needed firmware for your device:

sudo apt-get install firmware-b43-installer

After it completes, detach the ethernet and reboot. Your wireless should then be working.


Plugging network adapter in causes system to freeze

After rebooting you can press Control key, Alt Key and T key simultaneously to invoke the terminal. Then type:

dmesg

Scroll back through the most recent boot messages to the last messages when your system died. Copy and paste relevant error messages under a new thread "what does this error message mean?"

If dmesg doesn't provide any clues. Start up Nautilus (the file manager in Ubuntu). In the left pane select "Computer". Then on the right pane select the directory icon "var". Then select the icon "log". Then scroll down and double click on "syslog" (not syslog.1 .2 or.3, etc). Hold down the Control Key and press the End Key to go to the bottom of the file. Then scroll back to the time of the freeze and look for errors there.

What is the make and model of the wireless adapter? What is the make and model of your computer? These are relevant facts that a quick google search might answer.


OBS Studio is still black screen on ubuntu 18.04 LTS Xorg with nvidia

I have Ubuntu 18.04, after Nvidia driver installation OBS window capture stopped work at all. Just giving black screen.
For me helped Mesa utils installation: sudo apt install mesa-utils
Also check your opengl version.

glxinfo | grep "OpenGL version"

The app mesa-utils was missing in my case. After installation OBS window capture function works like a charm.


Since I do not have 2 PCs readily available, I'm not sure that this works. But by experimenting around this solution you should be able to get it to work.

Let's say you want to work from PC1 and play sounds on both PC1 and PC2.

On both PC1 and PC2:

Install PulseAudio Preferences:

sudo apt-get install paprefs

On PC1 only:

Open PulseAusio Preferences dialog (from Dash, say).
In the Network Access tab enable Make discoverable PulseAudio network.... This will make the sound device in PC2 accessible from PC1, if allowed by PC2.

On PC2 only:

Open PulseAusio Preferences dialog.
In the Network Server tab check Enable network access to local sound devices and Allow other machines on LAN to discover local sound devices. This makes the sound device in PC2 visible to PC1.
Do not check Don't require authentication - that will allow others on the LAN to spam your sound system.

Providing authentication:

Copy ~/.pulse-cookie file from one of the PCs to the other, so that that file is identical in both PCs. It doesn't matter which PC's file is copied to the other.

At this point (possibly after rebooting the two PCs), you should be able to play sounds from PC1 on PC2's sound system:

On PC1

Open the volume control dialog.
In the Output tab change to PC2's sound device (Under the list "Play sound through").
Play some sample audio in PC1 and verify that you can hear the output in PC2.

Now you want the sound server on PC1 to forward sounds to both sound devices (available locally to it). For this you have to create a virtual sound device whose slaves are the two available devices. An easy of doing this is

On PC1:

Open PulseAudio Preferences dialog.
In the Simultaneous Output tab, enable Add virtual....
From the volume control dialog, choose this virtual output device.

Notes:

Simultaneous output on all local sound cards may not be desirable, in which case you should take a look at pacmd's module-combine option to combine only select sinks.
If you wish to work from either PC1 or PC2 and want all sounds to play on both PCs, perform PC1 and PC2 specific steps on both PC1 and PC2.
Hopefully the network is strong enough that no noticeable sync errors will creep in. If not, apparently one will have to modify some buffer sizes to set things right.

Sources:

http://blog.nekoconeko.nl/blog/2012/03/03/PulseAudio-over-network.html
http://psung.blogspot.in/2011/09/network-audio-with-pulseaudio-made.html


Open music files with different application from dash?

You can change the default application used for music files by going to System Settings > Details > Default Applications and then replacing Rhythmbox with whatever media player you prefer.

(You can also leave Rhythmbox on your dock so you can launch it when you prefer to use it instead)


Looks to me like a Plasma widget was set to use this folder.

Check if you have any widgets (e.g. FolderView widget) using this directory.


From the problem description, the issue is completely clear.

Your issue is:

libgfortran3 is what you wish to install.
     =>=> but it requires gcc-5-base (= 5.4.0-6ubuntu1~16.04.11)
     .. .. ..=>=> But gcc-5-base (5.5.0-12ubuntu1~16.04) is available.

See, the problem is, to install libgfortran3 you need (exactly, because of = sign)  5.4.0-6ubuntu1~16.04.11, but this version is not available. What IS available is: 5.5.0-12ubuntu1~16.04, which cannot satisfy the dependency (because the condition is exact match). So nothing is installed.

And since nothing  has been, your installation base is also correct, and in correct state. But the package IS broken.

Solution

First download the deb of libgfortran3

 sudo apt download libgfortran3
 sudo dpkg -i --force-depends libgfortran [your version] .deb

The first will download the libgfortan3-version.deb to your pwd.

Next, modify /var/lib/dpkg/status to make dpkg shut up.

 /var/lib/dpkg/status

edit /var/lib/dpkg/status
Find the package with the broken dependencies
edit the Depends: line to stop the package complaining.

Find the line:

Package: libgfortan3

Next edit the line Depends (a few line after the previous one)

Modify:

Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11)

To:

Depends: gcc-5-base (>= 5.4.0-6ubuntu1~16.04.11)

That should fix it.


What are the file "pointer" things, and how do I change them?

That is a symbolic links or often phrased as symlink

  A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias.

Excerpt from https://kb.iu.edu/d/abbe

You can update the symlink so it points to newer version of cuda, simply running following command.

sudo ln -sf /usr/local/cuda-10.1 /usr/local/cuda

Check if the file retain different link by execute ll on the terminal window, you can see that it's no longer pointing to old cuda version.


Trouble installing Ubuntu on a virtual machine - low graphics mode

when starting ubuntu make sure the window of virtualbox is full screen. if it can achieve at least 800x600 xorg should start with vesa drivers.
if it doesnt start the problem is somewhere else
make sure you have internet connection into virtualbox when installing it.
As far as I know ubuntu installs guest additions automatically (I had to remove them manualy)


Can't add Sublime Text to the Gnome Shell Dock

The shortest way:

Press Super to activate overview.
Type main menu and hit Enter
Add new item, where the command is sublime_text.
Voila, you have your shortcut.


Clone the repository with:

git clone http://github.com/kivy/kivy
cd kivy

It could be that you still need some extra packages. To install them, do:

sudo apt-get install cython
sudo apt-get install libgstreamer1.0-dev
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-ttf-dev
sudo apt-get install libsdl2-image-dev
sudo apt-get install libsdl2-mixer-dev

For a standard build use:

make

Or for a build with MesaGL use:

make mesabuild

And install with:

sudo make install

But I suggest using checkinstall:

sudo apt-get install checkinstall
sudo checkinstall python setup.py install


Access Windows XP files from Ubuntu 12.04

Open a file browser (called Nautilus) by clicking on the folder icon in the Unity Launcher (the vertical bar on the left of your screen). The icon should look like a folder with a darker house printed on it.

A Nautilus window opens up. In the left column you should find your windows partition. It should be called "OSDisk" or something like that. Click on the link and you will be able to browse the files of your windows installation.


Lenovo sources list added to /etc/apt/sources.list.d/

That is hardware support for ThinkPad P14s/P15s on focal. It has been an empty repository until lately see here and is now part of the distro.
Still I don't understand why it is explicitly added to apt during update. It is not activated in your "Software & Updates" I presume.(Either in "Other Software" or "Addtional Drivers")


Install Ubuntu alongside windows and something else

Install Along Side

This option will automatically partition and install Ubuntu, including getting GRUB to have all the info needed to dual boot.

This is the easiest option to go for, and best for a beginner.

Something Else

This option is much more advanced. It gives you control over partitioning and creating the Swap etc. You need to know what you're doing to ensure that everything is correct.

This is the advanced option, best for an experienced user.


I want to compile my java program but the terminal is showing this

This is a problem in your command

javac why

instead use

javac why.java

You can also see this problem is already solved in this community
For more details visit this link:
 - How to compile a .java file on Ubuntu?


ah.. jeah, I take it you want to execute a command, not just put text into the terminal ;-)

In your home directory you find a hidden file named .bashrc
This file holds a list of commands that are execute whenever you start a shell. You could append your command there...

But...

If you do this with complex stuff, this stuff will always execute when you open your shell. Depending on what it is this may make your shell unusable.. you don't want that.

What you want is an alias.

append to your .bashrc

alias i_can_remember_that="long and strenuous command"

everytime you type now i_can_remember_that into your shell, the long command gets executed. You can even pass additional parameters to the alias:

i_can_remember_that foo will in fact run long and strenuous command foo

The name of the alias can be choosen freely of course. Sometimes you even want to override another command that way. i.e. a common alias is:

alias ls='ls --color=auto -B' which replaces ls with a more complex call of itself.


Yes and No.

They may transport the same visuals and formats like when they were saved with MS Office, but they may not be 100% compatible at the end.

They are preferable if you are thinking of long term storage or sharing in an open-source-aware ecosystem, but do not share them if you deal with MS-only shops.

For example, I have to endure headhunters that always ask for CV's and resumes in some MS-Word-Format. I prepare and archive such documents in LibreOffice but export and send them as PDF. They never complain.


In most systems, python refers to python2 and python3 refers to python3.

The reason a symbolic link created with python to refer to python3 is considered unsafe is because this will cause applications that used python to refer to python2  to crash or misbehave. This is mainly because python3 is not backward compatible with python2; they are very much different in syntax as well as semantics.

You should rather use aliases as a better alternative to use python to refer to python3.

symbolic links in general are not bad, it depends how you use them.


You can just type "ntfs" instead of "ntfs-3g".
Like this mount -t ntfs /dev/sda3 /media/9A36761B3675F89 .


Depends libntfs10 error while installing testdisk

Run the following commands:

cd /tmp
sudo mkdir download
cd download
sudo wget http://ubuntu.mirror.iweb.ca//pool/main/l/linux-ntfs/libntfs10_2.0.0-1ubuntu4_amd64.deb
sudo dpkg -i *.deb
cd

Now, retry to install testdisk:

sudo apt-get install testdisk

  Note: The above instructions are for a 64-bit machine.