What compression is supported by debian file [.deb] decompressor?

From this blog post, it seems dpkg-deb handles compression. And from man dpkg-deb for 14.04:

-Zcompress-type
      Specify  which  compression type to use when building a package.
      Allowed values are gzip, xz, bzip2, lzma, and none  (default  is
      xz).

In 15.10:

-Zcompress-type
      Specify which compression type to use when building  a  package.
      Allowed   values   are  gzip,  xz  (since  dpkg  1.15.6),  bzip2
      (deprecated), lzma (since dpkg  1.14.0;  deprecated),  and  none
      (default is xz).

The source code for dpkg can be browsed at Debian Alioth. From what I can tell, it also uses tar in places, and if tar doesn't support zopfli, get ready to add support for zopfli to GNU tar as well.


As it seem's Ubuntu does not support Dell, but there is an answer in the link here Where can I find the Ubuntu drivers for a Dell 1700 printer., try it,hope it helps.


Can't get firefox to render the right size in a headless xvfb instance

Here is a solution, not pretty but works. Uses xdotool to set size after Firefox is running.

First:

xdotool search --onlyvisible firefox

This will display a single window ID, windowid. Then:

xdotool windowmove windowid 0 0
xdotool windowsize windowid 1280 720

You must first do the windowmove and follow it by the windowsize.

In some cases once I did this, the size and position were correct forever more, in other cases had to run again each time I ran Firefox.


How to change network proxy settings in Kubuntu 15.10

for the proxy settings you can see in
 https://wiki.ubuntuusers.de/Proxyserver
in my environment that worked fine


Why does "MimeType=text/x-shellscript;" not work in this .desktop file?

As you found in your vim.desktop file, there is a subtype called x-shellscript. However, its type is not text but application, i.e. application/x-shellscript.

Although "MIME type" is not available as a column in Dolphin (as opposed to e.g. Thunar), the MIME type is displayed in some dialogs, e.g. when you right-click a file and select "Open With..." (Next to the "Remember association..." check box at the bottom) and in the properties dialog when you select "File Type Options" (at the very top).

The reason why file reported a different MIME type is that it uses a different database. Most popular desktop environments nowadays more or less adhere to the freedesktop.org (formerly known as X Desktop Group, XDG) specifications which include Desktop entries and Shared MIME database. To find the MIME type according to that database, you can use the xdg-mime tool from xdg-utils:

xdg-mime query filetype [file]


How to get SD card reader working Realtek Device 5287

Now it works again with kernel 3.13.0-29-generic. I noticed that it used to work already in Precise Pangolin 12.04 with 3.11.0-20-generic. Also it did not work a couple of weeks ago in Trusty Tahr 14.04 with 3.13.0-27-generic.


How can I upgrade ubuntu 10.04 to 11.04?

you would need to upgrade to 10.10 then 11.04. You can't just skip a release. but you can upgrade from 10.04 to 12.04 (LTS to LTS).

there are a lot of questions on this point at the site, here's some.

Upgrading from the command line?
How do I upgrade straight from a very old release to the latest one?


How do I get internet access in my kubuntu 12.04 virtual machine using NAT and a wireless connection?

You may have more luck by using a Bridged Adapter mode which hooks into the networking interface of your choice, thereby piggybacking off of the host system's internet connection.

In cases where NAT does not automatically work on your system, using Bridged Adapter mode tends to work.


How to auto clear cache on ubuntu 17.10?

WARNING: The .cache folder can contain data including browser history and preferences. Please see Is it okay to delete ~/.cache? for more information.

If you would still like to continue, the best way is to have a cron job that regularly empties the recycle bin and deletes .cache. Your computer may act weirdly until a reboot, so it is probably best to do this at boot time.

Create a script named clearcache.sh in /usr/local/bin. You may need root permissions. Replace yourusername with your username. Edit it with your favourite text editor and add the following content:

#!/bin/bash
rm -rf /home/yourusername/.cache /home/yourusername/.local/share/Trash
mkdir /home/yourusername/.cache /home/yourusername/.local/share/Trash

Run crontab -e and add the following line at the end of the file to run every 30 minutes:

*/30 * * * * /bin/bash /usr/local/bin/clearcache.sh >/dev/null 2>&1

Or this line for every boot:

@reboot /bin/bash /usr/local/bin/clearcache.sh >/dev/null 2>&1

Or you can use a different time in the crontab just as long as the command is /bin/bash /usr/local/bin/clearcache.sh >/dev/null 2>&1.


Automatically modify clipboard content (regex pattern replacement) when copy-pasting

Introduction
The way question is posted, requires more than just having a simple script, but also a GUI interface for enabling/disabling the script. I've found that it would be easier to achieve via an Application Indicator that would be accessible from Ubuntu's top panel. This answer presents exactly that as a solution.
The clipboard-autoedit-indicator , which I've written specifically for this question, allows for automatic editing of clipboard contents based on a regex expression ( choice of sed or python's re style ). It uses Gtk's clipboard module and minimum dependencies, thus no need for installing additional tools such as xclip or xsel.
Installation
Run the following commands in terminal:
sudo add-apt-repository ppa:1047481448-2/sergkolo
sudo apt-get update
sudo apt-get install clipboard-autoedit-indicator

Usage
The indicator can be launched by typing in Unity Dash Clipboard Autoedit or  via calling /usr/bin/clipboard-autoedit-indicator from command-line. There are two indicator icons (colored and grayed-out clipboard icon) to display when dynamic editing of the clipboard is enabled/disabled. When editing occurs, notification is sent to the user.

The "Set regex pattern" menu item calls zenity forms dialog.  When user edits regex rule, it is remembered and stored in ~/.clipboard-autoedit-config.json file. The dynamic editing will be enabled automatically when user clicks OK button, but users can disable it via "Replacement Enabled" check menu item. The regex type defaults to python's re module.

Source code
The source code is available under the MIT license on GitHub. Further development and newer versions will be there, and if you have a feature request and/or bug report, please submit them on GitHub.


Enabling TRIM support does help maintain the highest performance of an SSD over time.  Enabling it is fairly simple, see this guide:

How to enable TRIM? (old link, for reference: )
How do I optimize the OS for SSDs?

You'll be happy with Ubuntu on an SSD -- it's quite snappy and works very well.


How to enable icons in menus in Ubuntu 14.04

To enable menu icons, run:

gsettings set org.gnome.desktop.interface menus-have-icons true

To enable button icons, run:

gsettings set org.gnome.desktop.interface buttons-have-icons true

Source: Ubuntu unity menu button have icons

Edit: You will probably have to log out and back in for the settings to apply.


This problems comes from a security update:
https://launchpad.net/ubuntu/+source/imagemagick/8:6.8.9.9-7ubuntu5.13

Someone reported it as a bug:
https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1796563

As a temporary fix, I edited /etc/ImageMagick-6/policy.xml and changed the PDF rights from none to read|write there. Not sure about the implications, but at least it allows me to get things done.


My CPU usage is unnecessarily high while creating a C program in Ubuntu 14.10

As a possible solution I suggest removing ibus. It has been reported that is causing issues with gedit. To do that, run:

sudo apt-get remove ibus

Then reboot, to be sure, and check if the problem went away.


How to make Boxee work on 11.04 and above?

For those who do not know
Boxee support for Windows, Mac and Linux was dropped, there are no more packages available to download from the site.
Source code is still available for those brave enough to venture down that path.
(If you have any further information about Boxee and Boxee releases that might affect this information please drop a comment so I can updated it.)


How to get nvidia-346 driver with optimus to work on Ubuntu 14.10

I have had similar issues in the past and have never been completely able to figure out. It also appears that some fixes don't work for others. The only was I have ever been able to get the newer drivers to work on my own system is by removing nvidia-prime and installing bumblebee to control the switching from Intel to NVIDIA.


It looks like the kernel options passed via gummiboot are different from those passed via GRUB. In particular, the gummiboot configuration is probably missing a root={whatever} option (where {whatever} is a description of your root filesystem, such as a UUID or device filename). See the gummiboot web page for details about gummiboot configuration files.


Probably your OpenVPN configuration was not correct and your VPN is not connecting.

See your log file for connection fault


How frequently is Ubuntu Gnome ISO updated? (Non LTS)

Release images are static and aren't re-released unless there's a serious bug on the installer. This is reflected in the dates of the images, as seen on the Releases site. There will probably not be a fresher ISO for 17.04.

LTS versions usually get point releases (eg 16.04.1, 16.04.2 ..). Sometimes these will just be updated versions of their predecessors but they often also include newer kernels. There's no hard rule on this so check release notes.

Versions in development will have "nightly" or "daily" images available, although these are really not suitable for day-to-day use. Don't assume that everything is latest and most secure, that's often not the case.

The graphical installers usually have a "download updates" option which downloads newer versions for installation. You're still booting into an older version to do the install though.

And 16.10 isn't a great candidate for staying on something until you find another Ubuntu release because it leaves support this July. I'd suggest the 16.04 base release (not the 16.04.2 point release which probably has an updated kernel in it). Doesn't fix your ISO security paranoia that might be driving this question, but if you can update from installer in a non-hostile network, I don't think there's a problem.


How can I change the color of the sidebar in Nautilus 3.2.0?

You would need to edit the css themes for the GTK+ 3 theme to accomplish this. You can use other themes (there many themes on gnomelook.org for you to look at).


fractional scaling via "xrandr" - setting at boot time

You could try the next solution if you use lightdm:

  Modify /etc/lightdm/lightdm.conf to add the following options:

  display-setup-script > calls your mycustomloginvideo.sh before the login screen appears
  session-setup-script > calls your mycustomdesktopvideo.sh before the user desktop session starts

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
# for your login screen, e.g. LightDM (Ubuntu 11.10) or GDM (11.04 or earlier)
display-setup-script=/usr/share/mycustomloginvideo.sh
# for your desktop session
session-setup-script=/usr/share/mycustomdesktopvideo.sh

You could also use a systemd service:

sudo vim.tiny /etc/systemd/system/xrandrd.service

    [Unit]
    Description=Run xrandr command
    After=graphical.target

    [Service]
    Type=oneshot
    KillMode=none
    ExecStart=/home/user/.config/xrandr.sh

    [Install]
    WantedBy=multi-user.target

$ sudo systemctl enable xrandrd
$ sudo systemctl start xrandrd
$ sudo systemctl daemon-reload    # after each xrandrd.service file modification

You could try display-manager.service instead of graphical.target

Your script could be here:

$ nano ~/.config/xrandr.sh
#!/bin/bash
xrandr --output eDP-1 --scale 0.9x0.9

$ chmod +x ~/.config/xrandr.sh


My laptop with 19.10 cannot resume after every third suspend

Finally, I installed the propitiatory NVIDIA drivers. Since that I do not have this problem. Suspend/Resume works without glitches.
 (The installation of NVIDIA drivers was not "smooth". NVIDIA tried to activate Secure Boot in UEFI. However, all boot issue were easily resolved.)


Whenever there's something weird like this going on during shell initialization, your first step should be to examine all of the files that shells read to when starting. Since the various different types of (bash) shell read different files, you can use this command to find the string syncthing in all possibly re;revant files:

grep syncthing ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login \
               ~/.bash_aliases /etc/bash.bashrc /etc/profile \
               /etc/profile.d/* /etc/environment 2> /dev/null.

In your case, the offending file was one of the files in /etc/profile.d, so just remove or comment the relevant line out and you should be ready to go!


Ubuntu 15.04 & Windows 8.1 dual boot boots directly into Windows - how can I get the GRUB menu to show up?

I ended up installing EasyBCD on Windows and adding Ubuntu to the menu (in Linux > Grub2 I selected drive 1 linux root partition).  Now it boots Windows and gives a menu to select Windows or Ubuntu and it works great.


How to print text in the terminal as if it's being typed?

This does not work with Wayland; if you're using Ubuntu 17.10 and didn't change to using Xorg at login, this solution isn't for you.

You can use xdotool  for that. If the delay between the keystrokes should be consistent, it's as simple as that:

xdotool type --delay 100 something

This types something with a delay of 100 milliseconds between each keystroke.

If the delay between the keystrokes should be random, let's say from 100 to 300 milliseconds, things get a bit more complicated:

$ text="some text"
  for ((i=0;i<${#text};i++));
  do
    if [[ "${text:i:1}" == " " ]];
    then
      echo -n "key space";
    else
      echo -n "key ${text:i:1}";
    fi;
  [[ $i < $((${#text}-1)) ]] && echo -n " sleep 0.$(((RANDOM%3)+1)) ";
  done | xdotool -

This for loop goes through every single letter of the string saved in variable text, printing either key <letter> or key space in the case of a space followed by sleep 0. and a random number between 1 and 3 (xdotool's sleep interprets the number as seconds). The whole output of the loop is then piped to xdotool, which prints the letters with the random delay in between. If you want to change the delay just change the (RANDOM%x)+y part, y being the lower and x-1+y the upper limit – for 0.2 to 0.5 seconds it would be (RANDOM%4)+2.

Note that this approach does not print the text, but rather type it exactly like the user would do, synthesizing single keypresses. In consequence the text gets typed into the currently focused window; if you change the focus part of the text will get typed in the newly focused window, which may or may not be what you want. In either case have a look at the other answers here, all of which are brilliant!


All photos open in pink-black (combination) color in my Ubuntu

This is solved now.

When I looked at Update Manager window which correctly reads :

Software updates correct errors, eliminate security vulnerabilities and provide new features.

I've updated software available from Update Manager and that fixed my issue with photos.

Now photos look good with any viewer F-Spot Photo Viewer , Shotwell Photo Viewer etc.


What are suggested settings for a Grsync backup solution?

I set up two test directories; one on the source and one on the destination and tested the options.  Here are my conclusions:

No option selected:  Files that are identical on the source and the destination are not copied.  All other files are copied to the destination even if the destination files are newer.  Extra files that are on the destination that do not exist on the source are left alone.  This is a backup type operation.  So if you never edit the files on the destination, this option (no option selected) will keep all your files up to date.  Files that were copied to the destination in an earlier backup but later deleted from the source will remain on the backup copy.

Delete on destination:  This is identical to the above option except the extra files that exist on the destination but not on the source will be deleted.  If you accidentally delete a file or folder from the source but you have a copy on the destination, after this operation those files will be deleted from the destination.  Use with caution.

Ignore existing:  Do not copy files that are already exist on the source and destination drive, even if the file on the source is newer.  The old files remain unchanged on the destination.  As an example, if you modify some documents on the source drive and/or on the destination, they will not be copied.

Skip newer:  Do not copy an old file on the source over a newer file on the destination.  So if there is a destination file that is newer than the source file, the older source file will not be copied over top the newer destination file.  But files that exist on the source but don’t exist on the destination will be copied.  After this operation, the destination will contain all the newer files, whether the newer file existed on the source or on the destination.

Recommendations: I check Skip Newer and leave other options alone.  This will make a backup where the destination contains the latest versions of the files.  Older files will not overwrite newer files.  Old files on the destination that have been deleted from the source will remain on the backup copy.

You might want to exclude certain files or folders from the backup.  Click on the Advanced Options Tab to do this.  Here are some examples:

--exclude=/.  (exclude hidden dot files)

--exclude=*/Pictures

--exclude=*/Music

--exclude=*/Videos

--exclude=*.pdf  (exclude pdf files)


How do I install Idle on ubuntu the ide that comes with python?

In the terminal, type:

sudo apt-get install idle3


Just do this:

For ordinary laptop with:

primary ID : LVDS1
Resolution : 1366x768

and want to upscale resolution to 2049x1152 with no invisible border mouse, put this on your terminal:

xrandr --output LVDS1 --mode 1366x768 --rate 60 --fb 2049x1152 --panning 2049x1152 --scale-from 2049x1152

That goes for HDMI, etc. It works everywhere.


How to install Ubuntu 16.04 on external HD

OK finally sorted this by following

set bios options to boot bios instead of efi and boot from usb memory stick

boot from live cd on memory stick

use gparted to partition drive as ext4 saving 4gb free space to create swap

run installer and when asked where to install choose 'something else'

highlight new partition and click 'change'

set as ext4, mount to / then format

then highlight swap partition and set as swap

set the bootloader to the devx that is the external drive

click 'install now'

all went well but at the end the boot loader could not be installed so I chose the option to finish install without bootloader

when finished i booted again from memory stick and reinstalled grub on the external drive - all working fine now

did have some issues with .deb packages i copied over but simply downloaded again

also some strange issues with permissions but easily solved by searching askubuntu

also permissions seem to change when copying depending which drive you boot from.

Currently I set usb drive as boot device every time as I am not sure what problems I will create if I boot from internal drive by mistake

Hope this helps somebody

Thanks to Sudodus for the pointers you gave me that helped me find the full solution for me


Installing and accessing Clam AV Antivirus in 12.04

First of all note that you don't need antivirus for linux. Check the answer for this question Linux Anti-Virus

For clamav  it comes with noGUI but to do it in command line :

To Install Clamav

sudo apt-get install clamav

To update pattern files

sudo freshclam

To scan all your filesystem and remove infected files

sudo clamscan --infected --remove --recursive /

To download test virus

wget http://www.eicar.org/download/eicar.com

To uninstall

sudo apt-get remove clamav

But you can use a frontend GUI that works with calmav called AntiVirus Scanner(avscan). you can download from here.

Moreover there are many GUI frontends for calmav. you can check this menu here and choose one of them but i advise you by the one above(avscan)

If you want to use other GUI i advise to use comodo.Comodo has a free, modern, easy to use anti-virus program for various GNU/Linux distributions including Ubuntu 12.04.x.y 32 and 64 bit LTS. The graphical user interface is easy to learn how to use.


Why do "Properties" and df command return different used disk space?

Awesome, thanks Andrew. I reduced the space reserved for superuser to 2% using
sudo tune2fs -m2 /dev/sdc1


The easiest way for new users to install video drivers is by using the Software & Updates tool.

Press Super (the windows key) to open dash, type "additional drivers" into the text box to see a list of available drivers. It should look something like this:

Once you've found the driver and clicked on it, just press the apply changes button and enter your password. You will probably need to restart before the new driver takes effect.

If you don't see the driver you want listed then you may need to allow more software sources. Click on the Ubuntu Software tab and check the 4 checkboxes like this:


How to start VPN on Ubuntu server that is remotely controlled by VNC-viewer?

I solved this problem by creating a python script to check my external ip on the Linux box every and gmail it to me if it's different. I used cron to run it every 3 mins. It's really clunky but it works great.

#! /usr/bin/env python

# Check for internet connection

import urllib2
import time
import string

def internet_on():
    try:
        response=urllib2.urlopen('http://www.google.com/',timeout=1)
        return True
    except urllib2.URLError as err: pass
    return False

#loop_value = 1
#while (loop_value == 1):
#    try:
#   urllib2.urlopen("http://www.google.com")
#    except urllib2.URLError, e:
#   time.sleep( 10 )
#    else:
#   loop_value = 0

# Commands to be run if internet connection is present:
if internet_on():
    # Get external IP from canyouseeme.org by searching html page for an IP address
    import urllib
    import re
    f = urllib.urlopen("http://myip.dnsdynamic.org/")
    html_doc = f.read()
    f.close()
    m = re.search('(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',html_doc)
    # print html_doc
    #print m.group(0)
    current_ipaddress = m.group(0)

    # Look at last line of ip log file
    IPlog = open ('iplog.txt')
    lineList = IPlog.readlines()
    IPlog.close()
    # print (lineList)
    # print ("The last line is:")
    # print (lineList[len(lineList)-1])
    # or simply
    # print (lineList[-1])
    # print current_ipaddress

    # See if current IP has changed from last logged
    if current_ipaddress + "\n" <> lineList[-1]:
        #Append ip address to ip log file
        f = open('iplog.txt','a')
        localtime = time.asctime( time.localtime(time.time()) )
        f.write(localtime + "\n" + current_ipaddress + "\n")
        # python will convert \n to os.linesep
        f.close()

        # Mail new ip
        import smtplib
        smtp_server = 'smtp.gmail.com'
        smtp_port = 587
        sender = '****@gmail.com'
        # recipients = ["*****2001@hotmail.com", "john@***.com"]
        recipients = ["*****@***.com"]

        subject = 'SERVER ALERT'
        body = 'Server IP address has changed to: ' + current_ipaddress
        password = '**********************'
        smstext = body
        body = "" + body + ""

        headers = ["From: " + sender,
               "Subject: " + subject,
               #"To: " + "Fred and John",
               "To: " + "John",
               "MIME-Version: 1.0",
               "Content-Type: text/html"]
        headers = "\r\n".join(headers)

        session = smtplib.SMTP(smtp_server, smtp_port)

        session.ehlo()
        session.starttls()
        session.ehlo
        session.login(sender, password)

        session.sendmail(sender, recipients, headers + "\r\n\r\n" + body)
        session.quit()

        # Google Voice SMS send
        import pygvoicelib
        conn = pygvoicelib

        username="**************"
        apppass="****************************"
        auth_token="***********************************"
        client = conn.GoogleVoice(username,apppass,auth_token,rnr_se)
        #phone number below
        client.sms('1212*******',smstext)


HP Laserjet 1000 printer installation poblem in Ubuntu 13.04 on HP G60-533CL Notebook

First make sure that your printer is already plugged in and powered up.

I installed from the commandline using:

$ sudo apt-get install python-qt4 hplip-gui

as PJ Singh suggested, then from the commandline I ran:

$ hp-setup

and clicked through the GUI to get everything setup. The program auto-detected my printer and a test page printed successfully.


Unable to upgrade to newest version of Ubunty from 12.10

The error message means Simple light DM manager isn't updated to be used with 12.10.

So it is failing to update the index file thus failing all over.

To correct it do the following,

Uninstall Simple Lightdm manager. sudo apt-get remove simple-lightdm-manager
Remove the repo, sudo add-apt-repository --remove ppa:claudiocn/slm
Now do the update, sudo apt-get update && sudo apt-get upgrade

Repo URL - https://launchpad.net/~claudiocn/+archive/slm


In XBMC, "OK", "Vol +/-" and "Back" buttons not working

It seems it is a problem of mapping, or something.

Just run sudo dpkg-reconfigure lirc, and in the first screen (Remote control configuration:), select Windows Media Center Transceivers/Remotes (all).
In the second screen (IR transmitter, if present:), you can select None.

Now, irw can output text:

$ sudo irw
000000037ff07be1 00 KEY_UP mceusb
000000037ff07be1 01 KEY_UP mceusb
000000037ff07bdf 00 KEY_LEFT mceusb
000000037ff07bdf 01 KEY_LEFT mceusb
000000037ff07bde 00 KEY_RIGHT mceusb
000000037ff07bde 01 KEY_RIGHT mceusb
000000037ff07be0 00 KEY_DOWN mceusb
000000037ff07be0 01 KEY_DOWN mceusb
000000037ff07bdd 00 KEY_OK mceusb
000000037ff07bdd 01 KEY_OK mceusb
000000037ff07bdc 00 KEY_BACK mceusb
000000037ff07bdc 01 KEY_BACK mceusb

And, every buttons in XBMC are detected.


I had the same issue and was able to resolve it by right clicking on the Shortcut -> 'Change When Expression' -> updating it to editorTextFocus
This is what my working Shortcut looks like


If you are using any type of firewall, the only way to allow connections is by opening up that port. If your app allows it, you can change the port it uses. There really is no problem with that port being open, technically. Because it's the default port for the service, an attacker may bulk scan hosts to see if that port is open, but that's only an issue if there is a known vulnerability in the service itself. Either way, whether you use the default port or a custom one, you will have to open that port in your firewall (UFW).


How do I automatically decrypt an encrypted filesystem on the next reboot?

The solution seems to be rather simple, and is sort of described in How to configure LVM & LUKS to autodecrypt partition?

Here is how I managed to do it

My /boot partition is /dev/sda1

My LVM volume that I want to decrypt is /dev/sda3

I was root, but if you're not append sudo to all the commands.

Start by making a keyfile with a password (I generate a pseudorandom one)

dd if=/dev/urandom of=/boot/keyfile bs=1024 count=4

Then set read permission for root and nothing for anyone else

chmod 0400 /boot/keyfile

Then add the keyfile as an unlock key

cryptsetup -v luksAddKey /dev/sda3 /boot/keyfile

(You will then be prompted to type the encryption password)

Find the uuid of the /boot partition with (this one doesn't require you be root)

ls -l /dev/disk/by-uuid/

Here's an example of what the looks like (it's not the actual output as I grabbed this from another machine)

test@test:~$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jan 15 03:36 025c66a2-c683-42c5-b17c-322c2188fe3f -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 15 03:36 9e7a7336-3b81-4bbe-9f1a-d43415df1ccb -> ../../sda1

Then edit /etc/crypttab with your favourite editor

nano /etc/crypttab

The content will look something like (again, this is from another machine)

sda3_crypt UUID=025c66a2-c683-42c5-b17c-322c2188fe3f none luks,discard

What you want to do, is you want to replace none with /dev/disk/by-uuid/[the uuid of the /boot partition] and you want to replace discard with keyscript=/lib/cryptsetup/scripts/passdev

The result should look something like this

sda3_crypt UUID=025c66a2-c683-42c5-b17c-322c2188fe3f /dev/disk/by-uuid/9e7a7336-3b81-4bbe-9f1a-d43415df1ccb luks,keyscript=/lib/cryptsetup/scripts/passdev

Save the file and proceed with updating the initramfs

update-initramfs -u

That's it, you can now reboot.

reboot

To remove it again (as I wanted to)

First I confirm that there are only two keys to the system (the original one and the new keyfile)

cryptsetup luksDump /dev/sda3 | grep BLED

This will generate an output similar to this

Key Slot 0: ENABLED
Key Slot 1: ENABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

To delete the key in key slot 1 (the keyfile)

cryptsetup luksKillSlot /dev/sda3 1

You're then prompted to type the encryption password (the original one, not the one in the keyfile)

Then delete the actual keyfile

rm /boot/keyfile

Update the initramfs again

update-initramfs -u

Now when you reboot you will be prompted for a password again. You're done.

reboot


Bypass low-graphics mode 12.10 when no monitor connected

You have a couple of options here, in term of a headless remote connection you will always run into issues due to lack of monitors. Things like vnc are not good for this.

You are much better to use something like xdmcp if you want a full remote desktop. If however you simply need to run the odd application then X11 port forwarding via ssh is a easier solution. see forwarding gui programs


Error while entring Ubuntu SSO credentials during snappy core installation on Raspberry pi 3

This is a network error. I was using a network which had a lot of restrictions and thus couldn't connect to the login page of ubuntu.


FA-66 sound card sometimes cuts out and stops working, causing me to restart Jack

It's possible like the jack/pulse combination is aborting due to XRUNs, which mean that the audio data couldn't be completed within the time required.

You can prevent XRUNs by setting the jack period size. In the Jack Settings (in qjackctl, click the 'Setup' button, and look in the 'Settings' tab), there's a parameter labelled 'Frames/Period'. Try increasing this value.

Note that increasing the period size will also increase the audio latency. But, unless you're doing realtime audio processing, this probably won't affect you.


It is at the time of this writing not possible (officially), which has stirred quite a debate. Better ways to control updates on the desktop are still being discussed.
Solution 1
Block the store in your /etc/hosts/ file:
127.0.0.1 api.snapcraft.io

For me what worked was sudo nano /etc/hosts, copy-pasted the line, then I hit F2, then Y, then ENTER.
Solution 2
Disable automatic updating if the network connection is metered.
First, go to your network settings.

Then, click on the cog wheels on the right side of both of your network interfaces and tick "restrict background data usage" - this marks the connection as being metered.

Finally, open a terminal and type (docs):
sudo snap set system refresh.metered=hold


Just deinstall the packages.

sudo apt-get purge libnccl-dev libnccl2


Ext3 partition seems to disappear after reboot

It seems that the partitioning was not correctly copied or your setup has changed since backing up. Which partition has your GRUB data? Read: was there a separate boot partition on the original drive?

Keeping the backup in a safe place(!), you might try to rewrite the partition tables using a tool like GParted, then afterwards reviewing your GRUB config.


Chrome/Chromium middle mouse button for scroll Linux, Mac

In Linux based/Mac systems, Google Chrome / Chromium hasn't got this feature.
You have to get an extension, eg.:  AutoScroll.


Copy the entire root directory (/) for transferring OS to new computer?

Dont't.
It is a waste of time.
Making a backup of your operating system is time consuming. Your backup is quickly obsolete. Operating systems come for free and install in less than an hour. The operating system you install in the future will be better than the one you are considering to backup now.
Instead invest this time and effort in a good backup of your user data.
Your user data are unique.
They do not exist anywhere else on this planet.
Once lost, they are lost forever.
Having a good backup of your data anytime is therefore priority number 1, and essentially your single only concern when you work with computers.
With that out of the way, no, it is not just a matter of copying and pasting an operating system to a new computer to have an operational system on your new computer.


Partially moving samba user to the new server

Probably it is not possible to just "convert" existing users to samba users.
I'd let them set their password with smbpasswd command

https://lists.samba.org/archive/samba/2011-December/165422.html


After installation NodeJS, my system can't run node command

The installation for Ubuntu and derivatives is very simple. Before installing be sure to uninstall the old nodeJS

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Check if in some of the commands you do not get an error.

To remove the nodeJS please see the following post : How to remove nodejs from Ubuntu 16.04?


If you are building a Qt project, Qt Creator tool may be of use -- it supports multiple Qt versions to be set as build kits, you just need to have the proper compiler installed and locate the qmake file of the desired Qt.

If otherwise you are convinced to build something from command line (ex.: development is not the key goal), check the following:

qmake --version  # which qt
pkg-config --modversion QtCore #module version

And yes, export QT_SELECT = <desired Qt version> also works, when you need to switch versions for you build.


How can I set up multiple libraries in Rhythmbox?

You'll have to edit the configuration key directly, either using the gsettings command line tool, or using dconf-editor as a GUI. The key is locations under org.gnome.rhythmbox.rhythmdb.


"Errno 13 Permission denied" for pip and anaconda

According to conda's github page:

Its may because of ~/anaconda3's owner and group. You can change this directories owner and group by this command:

sudo chown -R $USER:$USER ~/anaconda3

According to this answer:

If the above command not works for you, this one may be helpful:

sudo env "PATH=$PATH" conda update conda


Audacity hangs when using audio drivers other than JACK

This appears to be a known issue. Two things to note:

Specifying a high latency on launch seems to help:

env PULSE_LATENCY_MSEC=300 audacity

There are things happening in the development version (September 2015) that probably aren't in Ubuntu's repo version yet, that are helping to fix this.

So I'd try the first then try updating to the development version... And failing that, engaing with the developer directly under that bug report.


Apt-get install fails, can't find this error message anywhere

I've had the same problem with a telegram on ubuntu. try to install it via ppa

sudo add-apt-repository ppa:atareao/telegram
sudo apt-get update
sudo apt-get install telegram


How to remove single file from /usr directory?

I don't recommend you remove anything by hand from the /usr folder, but if you REALLY want to not listen to my recommendation you can remove it with this command:

sudo rm /usr/share/applications/XnRetro.desktop

But I really don't recommend that you remove things from /usr without removing whatever installed to there, because it can sometimes cause problems.

You might want to consider as an alternative moving the file so it has a .old extension.  The method as outlined in another answer here, by Daniel, explains how to do this by using this command:

sudo mv /usr/share/applications/XnRetro.desktop /usr/share/applications/XnRetro.desktop.old


This is not possible with the true Unity 3d environment.  Unity is actually a compiz plugin running an Openbox toolkit called Nux, so to attempt to run Unity without compiz is an exercise in futility.  You could check into Unity 2d, however, which has a similar appearance, but is a separate set of packages not dependent on Compiz.


How does this program statically link to a .so in a non-default path

Simple explanation how to run an executable requiring a unique LD_LIBRARY_PATH, e.g. a path to libs in the current directory/ :

Short : export LD_LIBRARY_PATH=. where the dot ( . ) means 'the current directory'

Usually also the system LD_LIBRARY_PATH will (have to) be included : export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH

"Hard coding" of e.g. ida64 : The function in the executable to be run first is setting the unique LD_LIBRARY_PATH . ... Other example : firefox .


How to setup DHCP client to preferentially choose a DHCP server over the other

I believe I am in the same boat.  I guess that the DHCP server on the modem is very limited in features (mine does not allow to specify a PXE or bootp server, for example).  You want the gateway DHCP servers to be prioritized for features but fall back to the modem DHCP server for resilience, right?
I believe you need to address this the other way around. Why would you want to go around and configure all your clients?  Then you might as well give them a fixed IP.  This should be automatic and transparent for all clients in the LAN.
Does the modem DHCP server allow you to specify a reply-delay?  If so, you're already golden.  Set the gateway DHCP server to respond immediately and the modem DHCP server with a 3-second delay.  Have the former serve IP in the range of 192.168.7.50-59 and the latter in 192.168.7.100-150, for example.
If the modem DHCP server has no reply-delay option, then go ahead and configure your Ubuntu gateway DHCP server for a 3-second delay.  If you use dnsmasq, the relevant configuration knob is --dhcp-reply-delay.  Furthermore, limit the IP numbers handed out by the modem to a short TTL.  Then you periodically need to run a DCHP client request from the Ubuntu gateway machine to clog the usable IP space on the modem DHCP pool.  Then, when a request comes from a real client only the gateway DHCP server will have any IP numbers available to serve.  When the Ubuntu machine goes down, the IP space it was hogging will slowly get released (due to the low TTL) and be available for requests from ordinary machines.


running 20.04.1 server but missing netplan config files

SOLVED! Not sure if this is the proper way, but I edited /etc/network/interfaces and gave the second NIC a static IP address. However, running sudo /etc/init.d/networking restart did not work, so I had to restart the VM for the change to go into effect.
It looks like this method of managing interfaces is from Ubuntu 16.04.
Hope that helped someone out there.


Print Screen captures two Spaces not one

When you have multiple screens connected, I assume that print-screen usually captures both monitors at the same. It happens to me even now though I'm on a 12.04 (LTS).

You have number of options to over come this but of course not just limited to Print screen.

You may use ALT+ Print screen (this will only capture the current active window but not the entire screens itself)
You may also use Screenshot app from dash menu, hit super (WIN) key & select Grab the current window (will take the last active window) or Select area to grab (required area can be selected) else the other options as required
Use Shutter , pretty advanced screenshot application that lets you do a lot more than just take screenshots - including choosing where to save them

Source: How can I print-screen just one window and not my entire desktop?


sudo ./get_folder.sh no such file or directory

Given the instructions you quoted in your question, I assume you are trying to install XDS from this page.
Note:  While I can solve your installation problem, it looks to me like XDS requires a full-blown graphical environment, something that WSL does not currently provide.  See the end of this answer for more details on that.
As far as I can tell, the installation script is simply bugged.  It starts with this code:
#!/bin/bash

if [ "$(whoami)" == "root" ]; then
  export DESTINATION=/usr/local/bin/linux_bin
else
  export DESTINATION=$HOME/bin/linux_bin
fi
mkdir -p $DESTINATION
cd $DESTINATION
# run a "runme" helper script so that the current get_folder.sh may be overwritten by the new one:
grep -v runme ./get_folder.sh > ./get_folder.sh.runme
chmod +x ./get_folder.sh.runme
exec ./get_folder.sh.runme && exit

wget -O- https://strucbio.biologie.uni-konstanz.de/pub/linux_bin/xds_extra_linux.tar | tar xjvf -

When run with sudo, that:

Creates the /usr/local/bin/linux_bin directory
Changes to that directory
Attempts to create and run a copy of itself (the script) so that the original can be overwritten by newly downloaded files in the last line.  The grep command removes the "self-replicating" portion of the script from the newly created copy.

However, because of the cd, the script just isn't there.  It's attempting to run the grep against /usr/local/bin/linux_bin/get_folder.sh, but the script is still in the original location.
The result is an empty /usr/local/bin/linux_bin/get_folder.sh.runme, which does get executed "successfully" in line 13, as you can see from the message.  But, of course, running an empty script doesn't do anything.
That's it - The "copy-of-the-script" then exits, without even getting to the "download and untar" step.
Likely the creators of the script have fallen into a bit of a mental "trap" - When they are testing it, they are likely always running it on a system where they already have it installed.  So it works.  But it won't work the first time.
The solution is fairly simple.  While you mention that you are running this on Windows Subsystem for Linux, the failure actually occurs on plain-Jane Ubuntu as well.  BUT, the nice thing about WSL is that I can spin up a new "throwaway" instance in less than a minute in order to test something like this without bloating my everyday session with software I don't need.  So I actually did test this out, and it worked:
From the directory with your get_folder.sh:
sudo mv get_folder.sh /usr/local/bin/linux_bin
cd /usr/local/bin/linux_bin
sudo ./get_folder.sh

This works because your previous failed attempts at running the script already created the directory, so you just need to move the script there (where it erronously expects to be) and then run it again.
Additional information on running graphical applications under WSL
To run graphical apps in WSL, you'll need to do one of two things:

Enroll in the Windows Insider program and run the latest Preview version of Windows.  This includes support for WSLg, a new feature that will allow you to run a full-blown Linux GUI under WSL.  Of course, you must be willing to deal with any bugs that come along with running a "beta" version of Windows.

Second option is to manually set up an X Server and the necessary libraries.  This is far beyond the scope of this answer, so I'll just ask you to use your search-engine-of-choice to find installing x on wsl.

Please note that I have not done either of these.  I'm very much looking forward to the next Windows release towards the end of this year that includes WSLg in a production version, but I have no need to add support for it before then.


Where can I order pressed Ubuntu 12.04 64bit Desktop CDs with professional graphics?

On-Disk.com does; here is their page for Ubuntu 12.04. I am sure there are others as well, but I have always had good experiences with on-disk.com.


This means only one: there is a bug in your BIOS ACPI. Say thanks to your machihe's OEM. And the only thing you can do/try is to update BIOS/UEFI to the latest version from OEM's support page. But also there is no any warranty it is fixed in most recent version of BIOS/UEFI. Most often it is not. But you should try.
P.S. And this is not related to your VB issues.


Resizing windows to a particular width and height instantly

I propose two solutions
wmctrl
Install the wmctrl package, then you can resize your window with
wmctrl -r string -e 0,left,up,width,height

where string is a substring of the window's title, (left,up) are the desired screen coordinates of the upper left window's corner, and (width,height) are the desired window's dimensions.
For a more precise window's choice, run wmctrl -l, which will give you a list of records containing window's ID, screen's number and window's title. Then you can resize a particular window by ID with
wmctrl -i -r ID -e 0,left,up,width,height

More information in wmctrl man page.
devilspie
Install the package devilspie, then create the folder ~/.devilspie and a file my-name.ds in this folder, with content:
(if (is (window_name) "My Window") (geometry "widthxheight+left+up"))

then execute devilspie to resize your window.


OSS alternative to Adobe reader for filling online pdf forms

No matter what you do, if you have a PDF form, and you want to fill it out, it will be downloaded in any case; otherwise, PDF would have to be interpreted and presented to the user on the server (this is, in fact, the case if the LiveCycle Forms Server is used on server side, and it would serve HTML5 (nowadays) if you access it via a web browser.

So, the answer is no, there is none (but I will stand corrected if there is). If you insist on filling the form within a web browser, you better stay with Adobe Reader and the Firefox plug-in. You have the best possible functionality, and you will not have problems with smart forms.


'cat': can't open file: Permission denied

In a regular filesystem e.g. ext4, if you only have w permission in a file, you won't be able to read (cat) it, you need read (r) bit for that. Note that, root can read any file regardless of the permission bits.

Now, /sys is a mount point of special sysfs provided by Linux kernel which is actually a virtual filesystem and works differently than regular filesystems. /sys contains device related info of the system.

Modifying something in /sys would directly alter kernel's internal data structure so it depends on kernel what it would permit or deny.

For /sys/module/nf_conntrack_ipv4/uevent, you have only w bit set for owner (root), even if you add r bit for root (which is a very bad idea), while reading the file you would get I/O error because by design the kernel would not allow anyone to read the uevents for the nf_conntrack_ipv4 module.


Can't install gtfp using terminal in Ubuntu 16.04

Try to add universe repository manually, update lists and install gftp:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install gftp


Having problems while building or running a code using Codeblocks 13.12

I too had the same problem. It means that either the GCC compiler is missing in your Ubuntu or you have not set the correct path name for the compiler:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install g++


If enabled, disable automatic login.
Log out.
Click on the cog icon next to your name in teh login screen.
Choose Ubuntu 2D.
Type your password and hit enter.


The system is running in low-graphics mode error in "Virtualbox"

I just had the same error with a fresh installed ubuntu 12.04.2 that where just downloaded as well.

Just updating the system was enough for me:

sudo apt-get update
sudo apt-get upgrade


ubuntu 12.10 Lenovo b570e, WiFi connected but not working

http://www.iasptk.com/ubuntu/19593-ubuntu-1204-wifi-not-working-at-laptop-or-notebook-unblock-it

Check if the wifi card is blocked (Terminal)

rfkill list wlan     (for wifi)

OR

rfkill list all             (for wifi and bluetooth)

UNBLOCK:

rfkill unblock wlan     (for wifi)

OR

rfkill unblock all             (for wifi and bluetooth)

Restart the network:

sudo service network-manager restart


binary is whitelisted installin from live-cd win8

First, the "binary is whitelisted" message is displayed by the program that Ubuntu uses to deal with Secure Boot (namely, shim); it indicates that the follow-on program (typically GRUB) is properly signed and therefore trusted. There's no need to "whitelist the ubuntu efi in your bios," as bodhi.zazen suggests.

Second, the "launch CSM" option you mention is not similar to Secure Boot. Under a "bare-bones" EFI implementation, all OSes boot using unsigned EFI boot loaders. The Compatibility Support Module (CSM) and Secure Boot both change this, but in entirely different ways. CSM is just another name for a BIOS emulation layer, aka "legacy boot" mode. Enabling CSM means that the computer will be able to boot a BIOS-mode OS -- but usually, enabling CSM doesn't guarantee a BIOS-mode boot; other factors determine whether the computer boots in BIOS mode. Secure Boot, by contrast, is mutually exclusive with a BIOS-mode boot; Secure Boot requires that all EFI boot loaders be signed with a private encryption key whose public counterpart is stored in the computer's NVRAM. Note that many EFIs permit enabling both CSM and Secure Boot; the firmware decides how to boot depending on what it finds on the hard disk and what its boot order settings are. Some EFIs, though, block BIOS/CSM/legacy-mode boots if Secure Boot is active.

Thus, by disabling the CSM option, you've simply ruled out the possibility of booting Ubuntu in BIOS/CSM/legacy mode. This is probably a good thing, since Windows 8 is almost always installed in EFI mode, and mixing boot modes across two OSes can get tricky. The "binary is whitelisted" message you got, though, indicates that Secure Boot is still enabled on your computer. (If it were disabled, shim would instead produce a message to that effect.)

Unfortunately, Ubuntu's Secure Boot support is based on an early version of shim, and I've seen quite a few reports of problems with that support. Thus, my initial suggestion is to go back into your firmware setup utility, find the options that control Secure Boot, and disable it.

Another thing to try is a firmware update. Sadly, many EFIs are buggy; but the better manufacturers, including ASUS, have been issuing frequent bug-fix updates. Thus, it's possible that updating your firmware will get you past this hurdle.

If neither of those suggestions help, then it gets trickier. Replacing GRUB on your Ubuntu install medium with another EFI boot loader is a possibility, but this is likely to be a significant challenge if you're not already familiar with EFI boot loader installation. It's also much harder on CD/DVD media than on a USB flash drive. Another option would be to go into the firmware, enable a CSM-mode boot, and install Ubuntu in BIOS/CSM/legacy mode. You can then install an EFI boot loader for Linux on your hard disk, which might be easier to get working than doing it on the Ubuntu install medium.


Different keyboard layouts with different languages 18.10

To assign different keyboard layouts on each language.

System settings > Text Entry, select your IME (this example Mozc), click on the screwdriver and wrench icon.

On the Input Method Configuration window, select Chinese/Japanese with the Input Method Engine, and click on the Gear/Wrench icon below (red marker), please.

If this item is "Input Method Default" (your system default) or "Dvorak" then you get Dvorak layout.

Scroll and select "English US" then you get the QWERTY layout for Chinese/Japanese IME individually.


Here is the detailed description of accessing samba from Windows8. I'm using this method and works pretty fine!

create one user in ubuntu server

#useradd smb1
 #passwd smb1

Set the password accordingly

# smbpasswd -a smb1

For example, set the password as samba123$.

Add a user to a Samba share

Open via vi /etc/samba/smb.conf

[accounts]
comment = Accounts data directory
path = /home/tester
valid users = smb1 smb2 smb3
public = no
writable = yes

Save the file

Then Restart samba service!

/etc/init.d/smbd start
/etc/init.d/nmbd start

Then try in windows!


If you are landing here with Ubuntu 20.04 Focal then you need to run sudo apt install libimobiledevice6 usbmuxd libimobiledevice-utils


Boot your Macintosh, click Bootcamp. it'll tell you all the process you want to know.

Ubuntu (and all its sub-DE) seems capable of utilizing all Apple's hardware, and should be able to work flawlessly.

*DE stands for Desktop Environment such as KDE, XFCE and so on.


Error during installation Openldap on ubuntu

Apparently, your APT configuration is set to connect using a proxy server. This server cannot be reached and that is what the error is about. How do we know that? Well, it should not connect to a local IP address for the Ubuntu mirror for downloading the packages. The combination with the connect to port 8080 instead of plain HTTP on port 80, this is behaviour of APT that can only be caused by proxy configuration settings.

I assume your proxy server isn't online anymore and you don't want to use it anymore.

Find the configuration line responsible for it:

grep -rni proxy /etc/apt

The results will list something like

/etc/apt/apt.conf:1:Acquire::http::Proxy "http://1.2.3.4:8000/";

What you see here is that in the file /etc/apt/apt.conf on line 1 APT is configured to connect using that proxy address. On your system filename and line are likely to be different.
Edit the file with the line. Comment it (prepend it with a hash #) or simply remove the line. Use a text editor, e.g. nano (or any other of your preference):

sudo nano /etc/apt/apt.conf

Save and close.
Update the APT lists:

sudo apt-get update

Happy updating/installing.


How to remove/install a package that is not fully installed?

For advanced users, use at your own risks.

According to the following error message :

subprocess installed post-installation script returned error exit status 127

You may want to edit /var/lib/dpkg/info/[package_name].postinst and comment everything (or better yet, try to understand it and identify the issue), then try apt-get again.

Note that though in this particular question the message concerns "post-installation", it could have mentioned e.g. "pre-removal" or "post-removal" instead (in which cases the extension of the file to be edited would have been .prerm or .postrm).


Firefox 43.0.4 on Ubuntu 15.10 incredibly slow to load pages

I had a similar problem.  Disabling Ubuntu Modifications add-on solved it.  According to these answers, it is the interaction of adblock plus and the Ubuntu Modifications add-on.

Firefox very slow [closed]
Mozilla Firefox terribly slow on Ubuntu 14.04


iptable rule to route only outbound traffic through VPN

Figured it out based on info I found here.  For completeness I'll repeat what what was said there:

This is a classic problem.  When you connect your server using its public IP address, the return packets get routed over the VPN. You need to force those packets to be routed over the public Ethernet interface. These rule/route commands should do the trick:

ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev ethX
ip route add table 128 default via z.z.z.z

Where x.x.x.x is your server's public IP, y.y.y.y/y is the subnet of your server's public IP address, ethX is your server's public Ethernet interface, and z.z.z.z is your default gateway.  For example:

ip rule add from 172.16.9.132 table 128
ip route add table 128 to 172.16.9.0/24 dev eth0
ip route add table 128 default via 172.16.9.1

It is important to note that the above example makes use of the server's public IP, but since I'm behind a router and all connections into the server are being forwarded from the router I can just use the server's local IP as seen in the example below:

ip rule add from 192.168.1.10 table 128
ip route add table 128 to 192.168.1.0/24 dev eth0
ip route add table 128 default via 192.168.1.1

It is likely you will want these rules to persist after a reboot.  There are several ways that can be done, one such way is to add the rules to your etc/network/interfaces file under the appropriate interface as seen below:

# Only packets related to connections initiated by this machine should go
# through the VPN.  All other packets should be routed around the VPN.  This
# allows this  machine to be accessed via its public IP, but prevents its
# public IP from being exposed by services like transmission.

up ip rule add from 192.168.1.5 table 128
up ip route add table 128 to 192.168.1.0/24 dev enp4s0
up ip route add table 128 default via 192.168.1.1

down ip route del table 128 default via 192.168.1.1
down ip route del table 128 to 192.168.1.0/24 dev enp4s0
down ip rule del from 192.168.1.5 table 128


Your should reset your repository by resetting sources.list file which will be in /etc/apt/sources.list

Visit http://repogen.simplylinux.ch/ to generate the new sources.list file according to your Ubuntu version

Backup sources.list before you do something destructive like an in-place sed replace on it in the future

e.g. sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup.


How to stop my 12.04 randomly loging me out?

I had this same issue in Ubuntu 10.10. It was caused by X (the graphical window system) crashing. What graphics card are you using? A good first step is to check if there are proprietary drivers available for your graphics card. Click System Settings -> Additional Drivers.

The thing that finally got it working for me was to enable the X-Updates repo, which has newer drivers, etc.

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade

Reboot.


How to recover files from crashed Windows computer with Ubuntu

No, instead you use a different program to extract the ISO image to bootable media, such as a USB flashdrive, following these instructions direct from Ubuntu click this link for the instructions in more detail.

  Download the Pen Drive Linux's USB Installer.
  Pick Ubuntu Desktop Edition from the dropdown list.
  Click 'Browse' and open your downloaded ISO file.
  Choose the USB drive and click 'Create'.

Once created, then safely remove the USB drive from your Windows machine, put it in the sick Pavilion and reboot. There's a list of function keys which comes up on the screen early in the reboot process; one will give you a list of boot devices ( F6, maybe? It varies). Press that during reboot and then choose the USB flash drive, and Ubuntu will launch.

Once Ubuntu is up, you can use the Nautilus File Manager to copy files from your hard drive to a flash drive (this one or another one) or to an externally connected hard drive. Nautilus is very much like Windows File Explorer.


Does Ubuntu 13.04 work on HP Pavilion g7-2243us?

Pretty much any answer you'll get for this will be a speculative one, such as mine.

There is no reason to believe that Ubuntu won't work on your laptop. If you have good reason to be worried, then it is best to do a "dual-boot" installation first and test it out.

Download the latest .exe installer from here.

It will prompt you with options to install alongside windows as a dual-boot.

After installing, during the boot up of your computer, you will see a menu letting you choose to boot to Ubuntu or windows.


Tips for creating a kid-friendly, secure environment for Ubuntu 12.10?

Try DansGuardian

  DansGuardian is an award winning Open Source web content filter which
  currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX,
  and Solaris. It filters the actual content of pages based on many
  methods including phrase matching, PICS filtering and URL filtering.
  It does not purely filter based on a banned list of sites like lesser
  totally commercial filters.

To install DansGuardian

And for the latest version you can download from Here.  Its available in .tar.bz2 file.  On instructions of how to install see this Post.

Source:DansGuardian


Rhythmbox or banshee both are very good and they support ipods and iphones.


What you need is kmousetool.According to man kmousetool,

    KMouseTool clicks the mouse whenever the mouse cursor pauses briefly.

    KMouseTool can also be configured to wait for a specified time for a drag to begin, before unclicking the mouse. This way, you can use it for drag and drop operations as well.

To install kmousetool, open a terminal and type

sudo apt-get install kmousetool

Open kmousetool and you will see a window like this.

Here enable Smart drag and let the defaults "as is" for now. Click Apply and then click Start. You are ready to go.

This app requires a bit of practice and may seem hard to use at first, but with proper settings(which you may choose to change once you get acquainted) and a bit of practice, this can become a handy tool for anyone.


How to update 17.10 from a 17.04 VM whose disk needs partitioning with GParted that's not installed?

Well this would work with any hypervisor provided you know how to attach an .iso image and change the boot order. Boot an .iso with gparted grow the partition and then the typical unsupported release upgrade procedure. I currenrtly don't have virtualbox installed so can't show screenshots.


What's keeping Shotwell from replacing EOG?

Note: I work for the Yorba Foundation and am the lead developer of Shotwell.  The following are my own opinions and observations.

When Ubuntu first approached us about making Shotwell the default photo manager, we suggested to them that Shotwell not replace EoG as the individual photo viewer. At the time Shotwell's photo viewer lacked many significant features that EoG offered, including pan-and-zoom and a thumbnail strip view of all images in the current directory. EoG's metadata viewer (Image -> Properties) is also more thorough than Shotwell's.

That said, we're constantly looking to improve Shotwell and all these items I've mentioned are slated for inclusion at some point.  (Pan-and-zoom has been added since Ubuntu's decision.)  If Shotwell had a thumbnail strip view (or even a sidebar listing all files in a directory) I would feel comfortable recommending it as a default photo viewer – but that's a decision for the distro, not me.


info emacs missing after upgrade to Ubuntu 18.04

Installing package emacs25-common-non-dfsg should solve the problem, as the package contain documentation for Emacs.

sudo apt install emacs25-common-non-dfsg


You can use

grep -oP 'Active: \K.*'

to print the line without “Active: ”:

$ systemctl status ssh.service | grep Active
   Active: active (running) since Sat 2018-03-31 14:15:07 CEST; 1 months 13 days ago
$ systemctl status ssh.service | grep -oP 'Active: \K.*'
active (running) since Sat 2018-03-31 14:15:07 CEST; 1 months 13 days ago

-o tells grep to print only the matched parts of a matching line
-P enables Perl-compatible  regular  expressions  (PCRE), that’s needed to use \K, which keeps the text matched so far out of the overall regex match.


show output from script that would be seen in terminal

You could redirect the output to some files, e.g. like this:

./yourscript.sh 1> log.txt 2> errlog.txt

then you could open another terminal window and there you could do something like

tail -f log.txt

and then you should see the output there. The -f option to the tail command means that output is appended as the file grows.


You can use Remmina VNC client for Ubuntu:

sudo apt install remmina

I prefer Vinagre:

sudo apt install vinagre

For more examples, see https://www.ubuntupit.com/10-fast-and-secure-remote-desktop-client-software-for-linux/


Notice the '.' in front of the directory? On unix systems, the dot means the file is hidden. To view it in nautilus (the program used to view files in the gui, also known as "files"), go to your home directory and press "Ctrl+H". You will now see a whole bunch of "dot" files. Out of these, you will find .wine. The other dot files are used to store resources, settings and other stuff which you don't directly use (instead, a program you use uses the files).


You can try Lucky Backup

  Lucky Backup is an application that backs-up and/or synchronizes any
  directories with the power of rsync, another simple backup tool.
  Features include backup, safety, synchronization, exclude/only include
  options, allows custom rsync options, remote connections, restore and
  dry-run operations, scheduling, profiles and command line mode.1

To install it you can either download it, or install it from the Ubuntu Software Center.

Another one is Grsync

  Grsync is a simple Rsync graphical user interface(GUI) using GTK2,
  while Rsync is a powerful open source command line backup tool for
  Linux.2

To install it you can download it from Grsync

Another Solution is AMANDA.

  AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
  backup solution that allows the IT administrator to set up a single
  master backup server to back up multiple hosts over network to tape
  drives/changers or disks or optical media.3

To install it you can download it fro Amanda

For a list of other backup software click Here

1Source:luckybackup

2Source:Grsync

1Source:Amanda


Press and hold ALT, click on one such window, and drag it down.


You have created your virtual box definition incorrectly. Your best option is to create real partitions that way they are available to linux and the virtual machine.

I would create a new real partition, add it to the vm, then copy the files over. Then use it for your home partition on both your vbox and your real boot.

I personally use this setup quite a bit. I boot 90% of time in to linux but every once in a while I need Mac, when in Mac I use virtual box to access my linux box.


Printing PDF shows binary numbers in the left side

I have an Epson L4150, but I was facing the same problem.

I connected the printer and the Ubuntu installed the drivers automatically. Didn't work. Installed the drivers manually. Didn't worked.

Then, I deleted the printer, and added one manually:

Access printer configs.
Delete the existing one.
Click on Add, or Add new.
Select the same Epson option.

Other option is to add the printer using CUPS. For doing that, access localhost:631 using Mozilla (Chrome didn't work for me). Then, click Administration menu → Printers → Add printer.


colord-sane crash after boot at startup on Xubuntu 16.04 64-bit

I could not fix it uninstalling sane-utils and colord.

sane-backends release 1.0.25+git20150528-1ubuntu4 solves this bug as pointed out here:

  * debian/patches/kodak_avahi_crash.patch:
    - Fix crash when Avahi fails scanning for Kodak scanners

In order to fix it I had to download and install this sane-backends release:

wget https://launchpad.net/ubuntu/+archive/primary/+files/sane-backends_1.0.25+git20150528.orig.tar.gz -O sane.tar.gz
tar -xf sane.tar.gz
cd sane-backends-git20150528
./configure
make
sudo make install

Finally, reboot. Hope it works for you.


I tried a sort of "Windows solution", but instead of switching off and on again, I un-installed and re-installed it, and the problem has gone! I'll still avoid Snaps wherever possible though..


If you're on Ubuntu you, just use the command sudo hp-setup in the Terminal. But if you're using something like Xubuntu you have to install Hplip from the Software Manager first.


Unity crashed, how can I report that to developers?

Segmentation fault (core dumped)

means that the application has done something unexpected, hence the crash.
For that, need to:

ensure you are up to date with latest version of the package
enable apport (see https://wiki.ubuntu.com/Apport#How to enable apport)
ensure /var/crach/compiz.crash is cleaned (rm /var/crach/*compiz*.crash)
wait for it to crash :)
shortly then, apport should trigger a dialog with "A crash happened on your system, do you want to report it?". If it's not the case, you can force it to be reported manually: ubuntu-bug -c /var/crach/*compiz*.crash.
Ensure to choose "report full information" as the light report is not useful for unity.
the browser will open a new tab, where you can file additional information like, describing what you were doing during the crash.

Page with more debugging techniques:

https://wiki.ubuntu.com/Unity/FilingBugs


This is caused by snapd updating the chromium snap to a newer revision while it is running, and is a known issue tracked by bug #1616650. I recommend you enable the refresh app awareness experimental feature:

snap set core experimental.refresh-app-awareness=true

and then restart chromium. This will prevent automatic refreshes of snaps when an app of theirs is running (the current implementation actually delays the refresh, up to a maximum of 7 days, so the update will eventually be installed if the app hasn't been restarted in the meantime).

This experimental feature should eventually become stable and default. I am also working on displaying a notification to prompt users to restart chromium when an update has been installed while running.


The problem in your approach is that you use exec.

$ help exec
exec: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
    Replace the shell with the given command.

    Execute COMMAND, replacing this shell with the specified program.
    ARGUMENTS become the arguments to COMMAND.  If COMMAND is not specified,
    any redirections take effect in the current shell.

[...]

If you omit the exec and simply run your executable as shown below, your login session should not terminate when you close the application.

exec /home/TUI/bin/main

However, see How do I start applications automatically on login? for alternative (and possibly easier) approaches to autostart applications on login.


Where will be my Grails default installation location?

You can use dpkg -L grails-2.0 to list files from this package.

Also you can use dpkg -S /file/name to find out if the file belongs to any package.


What kind of video graphics are you using? I had an ubuntu derivative once hide my mouse after a fresh install and not sure why, but by using a different graphics card instead of onboard graphics helped solved the problem.


Edit /usr/bin/do-release-upgrade and comment out lines 123 - 127

# make sure to inform the user if his distro is no longer supported
# this will make it appear in motd (that calls do-release-upgrade in
#  check-new-release mode)
#  if m.no_longer_supported is not None:
#    url = "http://www.ubuntu.com/releaseendoflife"
#    print(_("Your Ubuntu release is not supported anymore."))
#    print(_("For upgrade information, please visit:\n"
#            "%(url)s\n") % { 'url' : url })

Make sure to remove comments after upgrade!


Keep getting this message on start up "An error occured while mounting ext3"

Here's your problem (paste from /etc/fstab)

/u01  ext3  errors=remount-ro 0 1
UUID=3dc778b4-509c-41d9-a010-2b53417de528  /u01  ext3  errors=remount-ro 0 1

The first line (/u01....) is incorrect, it's missing the device to mount; it's redundant when you have line 2, so just comment it out with a # in front.

Please paste the outputs of sudo fdisk -l and sudo mount after you have done that and rebooted.


Try additional software. That's how I installed the drivers for my GeForce GT 635M.

Go to dash (super key by default) and type in 'additional drivers' and launch the additional drivers program. Once it loads, you should see that nvidia binary driver is available but not selected. Select it, and restart when prompted.


Ubuntu 16.04 making requests to search.apps.ubuntu.com

I found out it is being generated by snapd https://www.ubuntu.com/desktop/snappy, don't know how to disable the periodic requests it is making so I ended up just disabling that service (snapd.service) as I'm not using any snaps.

If in the future someone figures out how to disable the periodic requests it is  making please feel free to post it here.


Import from csv scientif number representation doesn't permit any math value using Libre Office Calc

Explanation

Please notice that the number in column D in the screenshot in your question is right adjusted as a number, while the other numbers with a dot are left adjusted as text.

I think you have a locale that uses comma , instead of dot . to separate the decimals.

So if you convert the csv file (replace the dots with commas) before you import the data, it should work.

Conversion with tr

You can use tr to replace the decimal dots with commas. It is a good idea to check first (in an editor) that there are no 'other dots' that you want to preserve.  For example, there are probably commas that separate the columns, and you should convert them to tabs before you replace the decimal dots.

So for example (use your own file names)

< csv-dot.txt tr ',' '\t' | tr '\.' ',' > csv-comma.txt

Example

$ echo 5.4e-07,4.00e-07>csv-dot.txt
$ < csv-dot.txt tr ',' '\t' | tr '\.' ',' > csv-comma.txt
$ for i in csv-*;do echo -n "$i: ";cat "$i"; done
csv-comma.txt: 5,4e-07  4,00e-07
csv-dot.txt: 5.4e-07, 4.00e-07


Not able to delete folder from gui or terminal

this problem probably cause because of BleachBit(root), because just previously I used that, and NON-REMOVABLE NvXhVL3Rue folder got created.

  Running a "SMART data & self test" from DISK utility for that partition helped to
  delete that folder


I am guessing you have an already compiled TAR ball from http://www.oracle.com/technetwork/java/javase/downloads/index.html therefore you don't need to compile JAVA.

In a nutshell: Simply extract it into a folder (sometimes /opt/java) and create a symlink of the java executable to /usr/bin/java and configure further with update-alternatives.

See the Easy Linux Tips Project: Oracle (Sun) Java JRE for Ubuntu, Linux Mint and Debian for detailed instructions.


In Gparted, use the menu in the top-right to select your USB flash drive

Unmount any mounted partitions on the flash drive
Format the partions


How do I capture a screenshot of a window, and all the windows on top of it?

Using shutter and wmctrl, an edited version of this script does pretty much exactly what you describe: it takes a screenshot of the area, a specific window covers on your screen, no matter if and how the window is (partially) below other windows.

The marge around the window, to be included in the screenshot, is arbitrary; set it to zero if you like.

In practice

I have an Inkscape window on my screen, with id 0x0520000e, partially covered by a few gedit windows.
I run the script with the window id and the marge (in px) around the window as arguments:

python3 <script> 0x0520000e 10 10 10 10

(where 10 10 10 10 is the marge in px around the window on the left/right/top/bottom. Set to 0 to have no marge in the image)

The result:

The script

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

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
time.sleep(0.5)
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])

command = "shutter -s="+(",").join([x,y,w,h])+" -e"
subprocess.call(["/bin/bash", "-c", command])

How to use

The script uses Shutter and wmctrl:

sudo apt-get install wmctrl shutter

Copy the script below into an empty file, save it as custom_screenshot.py.
Run it by the command:

python3 /path/to/custom_screenshot.py <window_id> <left> <right> <top> <bottom>

where , <left> <right> <top> <bottom> are the marges you'd like to keep in the image around the window, like in this answer.

Example command:

python3 /path/to/custom_screenshot.py 0x0520000e 20 20 20 20

Explanation

In Shutter, it is possible to take a screenshot of a defined area of the desktop.
With the window id as an argument, the script looks up the window's exact position with the help of wmctrl (wmctrl -lG to be precise), and the output of xprop -id <window_id> (in the line _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 for example).
Subsequently, a screenshot is taken from the found area, with an arbitrary marge.

Note

The script does not overwrite existing screenshots. New screenshots are named:

outputfile_1.png
outputfile_2.png
outputfile_3.png

and so on...

EDIT

Since you mentioned in a comment that speed is an issue:

Based on this script, if we do exactly the same trick, but use Scrot instead of Shutter, we can skip the sleep 0.5 and make it a lot faster:

The script

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

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])

# setting default directories / filenames
home = os.environ["HOME"]
temp = home+"/"+".scrot_images"
img_in = temp+"/in.png"
# if you prefer, you can change the two line below:
output_directory = home+"/"+"scrot_images" # output directory
filename = "outputfile"                    # filename
# creating needed directories
for dr in [temp, output_directory]:
    if not os.path.exists(dr):
        os.mkdir(dr)
# creating filename (-number) to prevent overwriting previous shots
n = 1
while True:
    img_out = output_directory+"/"+filename+"_"+str(n)+".png"
    if os.path.exists(img_out):
        n = n+1
    else:
        break
# Take screnshot, crop image
subprocess.call(["scrot", img_in])
subprocess.Popen(["convert", img_in, "-crop", w+"x"+h+"+"+x+"+"+y, "+repage", img_out])

To use

Use it exactly like the first script, only:

This script needs scrot, imagemagick and wmctrl

sudo apt-get install imagemagick wmctrl scrot

images will be stored in ~/scrot_images

Explanation

While the first script uses the command line option of Shutter to shoot a defined section of the desktop, Scrot does not support that. It only takes a screenshot of the whole screen.

We can combine however imagemagick's option to make an out-take of an image, with the method to find the exact window's coordinates we used in the first script, and crop the image accordingly.
Since Scrot is extremely light weight and quick, even combined with imagemagick's crop action, we have a pretty fast way of making screen shots of a window's area.

Still not fast enough?

Not sure if it is needed, but with a bit of rewriting (see script below), it would be possible to make a series of shots even faster by first shoot the whole series, then (afterwards) do the cropping. Assuming the window would stay in its position, this would save a considearble amount of the time:

Shooting only with Scrot (no cropping):

real    0m0.263s
user    0m0.205s
sys     0m0.037s

Shooting, including cropping:

real    0m0.363s
user    0m0.293s
sys     0m0.040s

Serial shooting

Finally, as an example to make a series of screenshots, the script below, as suggested in the EDIT.
This one first shoots all images in a row, then does the cropping on all created images at once.

Use the script like the second one, but with one additional argument: the number of shoots in a row, for example:

python3 /path/to/custom_screenshot.py 0x0520000e 0 0 0 0 20

to make 20 screenshots of window 0x0520000e at a row (could be hundreds), no marge around the window.

The script

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

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])
# setting default directories / filenames
home = os.environ["HOME"]
temp = home+"/"+".scrot_images"
# if you prefer, you can change the two line below:
output_directory = home+"/"+"scrot_images" # output directory
filename = "outputfile"                    # filename
# creating needed directories
for dr in [temp, output_directory]:
    if not os.path.exists(dr):
        os.mkdir(dr)
# do the shooting
t = 0; l = []; shots = int(sys.argv[6])
while t < shots:
    img_temp = temp+"/"+str(t)+"in.png"
    l.append(img_temp)
    # reading arguments,arranging commands to perform
    subprocess.call(["scrot", img_temp])
    t += 1
# do the cropping on all images in a row
for img in l:
    n = 1
    while True:
        img_out = output_directory+"/"+filename+"_"+str(n)+".png"
        if os.path.exists(img_out):
            n = n+1
        else:
            break
    subprocess.call(["convert", img , "-crop", w+"x"+h+"+"+x+"+"+y, "+repage", img_out])


You will want to be connected to another means of accessing the internet such as Ethernet so you can download the required drivers.

If you are running 13.04 or 13.10:
Open the dash and type 'drivers'. Click on 'software & updates'. The click the last tab to the right called 'additional drivers'. If your wireless card requires proprietary drivers that Ubuntu recognizes they may be listed here. If you have listings here select a driver and try it out.

If you don't have any drivers listed here. Return to the first tab,'Ubuntu Software', and be sure the 'Proprietary drivers' box is checked.

If you are running 12.04:

Open the dash and type 'drivers'. Click 'Additional Drivers' (also known as Jockey). You should see your Wireless Driver listed here. Select the recommended driver, and download/install.


A virtual machine does not see the hardware of the host machine directly.

Your Ubuntu is not supposed to use the wireless interface. You do not need to install any wireless driers or connect to wireless networks from there.

If your host machine is connected to internet, your geust machine will see a wired virtual interface if you've set up the Virtualbox correctly.


Apache unmatched sub domain being caught by a random domain

Apache uses the following process to find the best-matching virtual host:

Find a list of virtual hosts that match the IP and port, use wildcard if none are found.  In your case, a wildcard is set in the default virtual host.
Figure out if we're going to use IP-based or Name-based virtual hosts.  If only one IP and port option matches, IP-based is used and that vhost is selected.
If IP-based matching could not be used (because there is more than one vhost on that IP and port), get the list of vhost candidates (by IP and port) and try to match the ServerName and ServerAlias directives with the Host HTTP request header.
If no best match could be found in 3, default to the first vhost found on that IP and port.
If no IP and port match were found, try to match a wildcard vhost, such as 000-default.

Based on your symptoms, I would guess that you are using Name-based virtual hosts, and Apache is never getting down to step 5 because it uses the best IP-based match in step 4.  You should be able to fix this by setting an explicit NameVirtualHost with IP:Port in 000-default and a server name that appears first alphabetically.

You can find more details about Apache's vhost selection process here.


Yes, UGet can download such a file without problems, if your network connection is reliable. However, if your network is not reliable, or your internet connection drops half way through the download, you can still finish downloading the entire file, if the server you're downloading from supports resuming incomplete downloads (most do these days).

To increase the download speed (by downloading multiple pieces of the file at the same time) and potentially make the download even more reliable, you can install the aria2 plugin (by typing sudo apt install aria2 in a terminal, and then enabling it in the UGet settings)

That said, is the file available to download vis BitTorrent too ? If that's the case you should probably use that, as you'll get possibly faster speed and more reliability, as BitTorrent is designed to handle resuming, unreliable connections, and so on.


Ubuntu 12.10 Quantal Quetzal and AMD 12.11 Beta Driver

You might need to first completely uninstall fglrx, then install the linux headers

sudo apt-get install linux-headers-generic

Then try to either use fglrx-updates from Additional Drivers or Catalyst 12.11 beta from AMD's site (this won't fix the watermark, though).


Dual Boot computer can reach sites under Windows, but not under Ubuntu

SOLUTION!
I discovered that invoking
$> sudo dhclient
would populate the IPV4 fields in the Network Manager.
Then I found guidance from archlinux that suggested creating the file
/etc/NetworkManager/conf.d/dhcp-client.conf with the content
[main]
dhcp=dhclient

Rebooting with this configuration file in place generates the IPV4 addresses.
JOY!


/usr/local/bin/gfortran: Command not found

Thanks all, it seems that I have a fix. I found that the makefile contained in the source folder of the tar file had a different target path

-> usr/local/bin/gfortran

whereas gfortran on my Ubuntu was located in

-> usr/bin/gfortran

So I just deleted the "local/" in the makefile and the program worked perfect!


The file you should take a look at is ~/.xsession-errors in your home directory (note, that this collects output from all the graphical programs you start, so not everything you can see there has to be related to your problem).

If there are issues with the greeter/LightDM, then you can go through the logs in /var/log/lightdm (I assume you are using Ubuntu 11.10).


Yes, in Sound Settings -> Output tab, you can select the HDMI output device and the sound will be directed to HDMI. Choose the appropriate profile in the Mode dropdown menu.


Superblock set in the future, fixing system clock

Probably your BIOS battery is failing.  This seems to be somewhat common in some models of old laptops.  Replacing the battery would probably fix the problem.  Another solution that worked for me is to tell e2fsck your clock is broken:

Put the following in /etc/e2fsck.conf:

[options]
broken_system_clock = true

Then you have to get that conf file added to your initramfs.
Put the following into /etc/initramfs-tools/hooks/e2fsck-conf.sh:

#!/bin/sh

PREREQ=""
prereqs()
{
   echo "$PREREQ"
}

case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac

. /usr/share/initramfs-tools/hook-functions
CONFFILE=/etc/e2fsck.conf
CONFDIR=`dirname "$CONFFILE"`
if [ -f "$CONFFILE" ]
then
   mkdir -p ${DESTDIR}${CONFDIR}
   cp $CONFFILE ${DESTDIR}${CONFDIR}
fi

Then execute sudo update-initramfs -u.

Source: Debian user forums.  I took the liberty of making the initramfs hook script a bit more verbose.  That's purely my stylistic preference.


Cannot get system to boot upp with new cloned disks

It was that easy. Edited fstab to the names of the drives and the boot worked.


This is a bug but here is a workaround until there is a bug fix.  Close the psensor graph window instead of minimizing it.  When you want to view the psensor graph window again right click the little psensor thermometer icon in the panel (top bar), click "Show" and then click the psensor icon on the Launcher (left sidebar) to show and put focus on the psensor graph window.

The spike in CPU usage doesn't only occur when the psensor graph window is minimized but anytime the graph window does not have the focus.  You can verify this by having just one other small window on the desktop, Terminal for instance, and Alt-Tab between them.  You'll see the CPU usage jump and fall as you do.

This is a bug with psensor 1.1.3-2ubuntu3 in ubuntu 16.04. The jump in CPU usage does not occur in an identically configured psensor 1.1.3-2ubuntu2 in ubuntu 15.10.

I'm running a custom built PC with an AMD A8-3870 APU and no discrete graphics card or motherboard graphics.  I am not using proprietary graphics drivers just the default graphics with ubuntu 15.10 and 16.04.


Is there a Tomboy fork which allows embedding images (or files)?

I don't believe there is a fork of Tomboy that will enable you to insert images.

However, if you are looking for a similar note-keeping software then can I recommend KeepNote.  This will work on Ubuntu as well as Windows.

Here is a screen-shot - note the ability to embed images directly into the note.


If you closed the desktop client before receiving the email verification token, you might be able to complete the validation via the web.

In the email, there should be a unique token string that I will refer to as $TOKEN here.  Open your web browser and point it at:

https://login.ubuntu.com/token/$TOKEN/

Follow the prompts and it should validate your account.  Once that is done, try logging in with the desktop client again and say you have an existing account.


After many upgrades to my server, still booting into old kernel

Issue the dist upgrade to install the latest kernel.

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Keep the old kernels, don't delete them so that you can still selection under the advance menu in the grub boot manager if you need to go back. No need to manually modifying the grub boot manager file.


Alsa snd-aloop kernel module for 16.04 or 14.04 server?

Well, I could try loading it in Ubuntu 16.04 Desktop Edition (VirtualBox with disabled audio card). As you can see, it is installed with linux-image-extra package which may be you don't have already.

~$ modinfo snd-aloop

filename:       /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko
license:        GPL
description:    A loopback soundcard
author:         Jaroslav Kysela <perex@perex.cz>
srcversion:     0A4CE16C028DAB4BC8260D3
depends:        snd-pcm,snd
intree:         Y
vermagic:       4.4.0-42-generic SMP mod_unload modversions
parm:           index:Index value for loopback soundcard. (array of int)
parm:           id:ID string for loopback soundcard. (array of charp)
parm:           enable:Enable this loopback soundcard. (array of bool)
parm:           pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)
parm:           pcm_notify:Break capture when PCM format/rate/channels changes. (array of int)

~$ dpkg -S /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko

linux-image-extra-4.4.0-42-generic: /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko

~$ sudo modprobe snd-aloop
~$ alsa-info.sh --stdout

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################

!!Script ran on: Thu Mar 23 10:28:23 UTC 2017

!!Linux Distribution
!!------------------

Ubuntu 16.04 LTS \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" NAME="Ubuntu" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04 LTS" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" UBUNTU_CODENAME=xenial

!!DMI Information
!!---------------

Manufacturer:      innotek GmbH
Product Name:      VirtualBox
Product Version:   1.2
Firmware Version:  VirtualBox

!!Kernel Information
!!------------------

Kernel release:    4.4.0-42-generic
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         x86_64
SMP Enabled:       Yes

!!ALSA Version
!!------------

Driver version:     k4.4.0-42-generic
Library version:    1.1.0
Utilities version:  1.1.0

!!Loaded ALSA modules
!!-------------------

snd_aloop

!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - Yes

!!Soundcards recognised by ALSA
!!-----------------------------

 0 [Loopback       ]: Loopback - Loopback
                      Loopback 1

!!PCI Soundcards installed in the system
!!--------------------------------------

!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------

!!Modprobe options (Sound related)
!!--------------------------------

snd_pcsp: index=-2
snd_usb_audio: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
snd_usb_audio: index=-2
snd_usb_caiaq: index=-2
snd_usb_ua101: index=-2
snd_usb_us122l: index=-2
snd_usb_usx2y: index=-2
snd_cmipci: mpu_port=0x330 fm_port=0x388
snd_pcsp: index=-2
snd_usb_audio: index=-2

!!Loaded sound module options
!!---------------------------

!!Module: snd_aloop
    enable : Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
    id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
    index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
    pcm_notify : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    pcm_substreams : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8

!!ALSA Device nodes
!!-----------------

crw-rw----+ 1 root audio 116,  2 Mar 23 11:18 /dev/snd/controlC0
crw-rw----+ 1 root audio 116,  4 Mar 23 11:18 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116,  3 Mar 23 11:18 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116,  6 Mar 23 11:18 /dev/snd/pcmC0D1c
crw-rw----+ 1 root audio 116,  5 Mar 23 11:18 /dev/snd/pcmC0D1p
crw-rw----+ 1 root audio 116,  1 Mar 23 11:18 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Mar 23 11:18 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root  60 Mar 23 11:18 .
drwxr-xr-x 3 root root 200 Mar 23 11:18 ..
lrwxrwxrwx 1 root root  12 Mar 23 11:18 platform-snd_aloop.0 -> ../controlC0

!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [Loopback]

Card hw:0 'Loopback'/'Loopback 1'
  Mixer name    : 'Loopback Mixer'
  Components    : ''
  Controls      : 97
  Simple ctrls  : 1
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
...

For general solution, look at:

How do I find the package that provides a file?
Just checked a fresh Ubuntu 16.04.1 Server. It has the snd-aloop module. linux-image-extra* package was installed as dependency of linux-image-generic meta package which is also a dependency of linux-generic meta package. So a quick fix:

sudo apt install linux-generic


System won't boot unless I type "exit" at initramfs prompt

Boot Degraded RAID

Modify  /etc/initramfs-tools/conf.d/mdadm

BOOT_DEGRADED=true

Update initram

sudo update-initramfs -u

Reboot


Open your site's nginx configuration /etc/nginx/sites-available/yoursite

'yoursite' is the name of whatever you named your site.  Mine was 'default'.

Change include fastcgi_params; to include fastcgi.conf; and restart the service:

sudo service nginx restart