How to Handle Full Install USB and Swap Space

Bootable USB and Swap Space
A computer can have multiple swap partitions and a fresh install of Ubuntu will use them all, even if they are not listed in fstab, In addition the computer can use a single swap file if it is listed in fstab.
Even Live and Persistent bootable USB devices will use all the swap partition(s) they find.
Ubuntu 20.04 will create a swap file during installation as long as there are no swap partitions on the computer. (This is another reason to unplug the internal HDD/SSD when installing).
Once the swap file has been added to fstab the computer will not use any swap partition that are not listed in fstab.
Security:
A flash drive can be easily lost or misplaced. If you use a pendrive when dealing with sensitive data, the drive should be fully encrypted.
A swap partition can be copied or cloned just like any other file or partition.
A swap file is part of the root partition and automatically gets encrypted along with it.
It is generally not a good idea to encrypt the swap partition on someone else's computer, when using a bootable USB.
To prevent any data from being left in the host computer's swap partitions, a swap file should be used or swap should at least be turned off before exiting: sudo swapoff -a.
To replace a swap partition with a swap file on a bootable USB:

Check the swap that is in use:
sudo swapon -s

If swap partition(s) found:
sudo swapoff -a
sudo nano -Bw /etc/fstab

Add "# " before the UUID of the swap partition(s):
# UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX   none   swap    sw     0       0

Add a line for the swapfile:
swapfile   none    swap     sw      0       0

Create the swap file:
sudo fallocate -l XG /swapfile

Where X is the swapfile size in GB
    sudo mkswap /swapfile

    sudo chmod 0600 /swapfile

    sudo swapon /swapfile

Reboot:
sudo reboot

To enable Hibernation:

Increase swap file size to match RAM size up to 8GB per above as required.

Edit /etc/default/grub to add resume location and offset to grub.cfg:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX resume_offset=XXXXX"

Use UUID from root.

Use offset from sudo filefrag -v /swapfile

cscameron@cscameron-T:~$ filefrag -v /swapfile Filesystem type is: ef53 File size of /swapfile is 4819255296 (1176576 blocks of 4096 bytes) ext:     logical_offset:        physical_offset: length:   expected: flags: 0:        0..       0:     303104..    303104:      1: 1:        1..    2047:     303105..    305151:   2047:             unwritten 2:     2048..    4095:     311296..    313343:   2048:     305152: unwritten

resume_offset=303104

Update GRUB
sudo update-grub

Test hibernation
sudo systemctl hibernate

A hibernate button can be added using gnome extensions.
NOTES:

There is a slight possibility of getting holes in a swapfile when creating it with fallocate. /var/log/syslog can be searched for the phrase swapon: swapfile has holes to ensure there will be no data loss.

For the best chance of successful resume, plug the USB into the same slot it was in while hibernating. It should be okay to run the host machine from it's own OS while the USB is in hibernation.


I ran:

sudo apt install openssh-server

and now it's working.  If anyone can give a better explanation, I will vote their answer.
I thought that OpenSSH was already installed, and it included SFTP server, but maybe not. I had the sshd_config file on my disk.

I did a whole new install and it worked from the start.  The differences were:

1) I didn't install any machine name resolution so Windows could connect by machine name (I will try that later)

2) I didn't install any desktop, using the command line only this time.

Other notes: If using Virtual Box for the Virtual Machine, changing network adapter to bridge adapter so you get a 192... address instead of a 10... address.


How to manually partition a reinstall upgrade to a dual boot

If you do the "Install alongside Windows" it will format everything that is not Windows and install, if you do "something else" you can change around partitions as you please, but I don't believe you can make a NTFS partition. However, you can use gparted on the live cd or install it and using it after the install to do what you are wanting to do. Or you can do it in Windows.

Per the Ubuntu site, it needs about 4.5GB to install, so that's about 15GB or more space for stuff.

There is enough space in boot

with 4GB of RAM swap is optional, but if you hibernate you would need to do a work around.

Either I was dreaming when I installed 14.04, or I saw a 4th option which was remove 12.04 and install 14.04, which keeps your partitions. Your table looks fine.


Today's X rarely requires manual configuration. X now automatically configures itself with reasonable defaults. Both GNOME and KDE provide GUI utilities for customizing settings beyond these defaults if you like.

However, sometimes you need to muck with the configuration manually, beyond what these tools allow.

Quick xorg.conf

Most systems don't ship with an X config file any more, but sometimes you need one. Here's a basic skeleton:

Section "Device"
        Identifier      "Configured Video Device"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
EndSection

Configuring using xorg.conf.d (Ubuntu 10.04 and newer)


How to block access to all SSIDs except for a preferred SSID

With network-manager, you can enforce a specific access point BSSID via the connection editor Edit... then select the Wifi tab and enter the BSSID:. Obviously this solution requires that your users don't have sufficient privileges to subsequently modify network-manager wireless settings.


Found in other answers, this is how I fixed the problem:
sudo lshw -C network

*-network
    (...)
    logical name: wlp58s0
    (...)

I then ran sudo ifconfig wlp58s0 up and after that sudo service network-manager restart. This fixed my wifi and after reboot it is still working.

Since the dell xps13 (9350) has had many troubles with wifi, I hope this will help others to fix theirs too.

EDIT: This only fixes it once, after reboot the same steps have to be performed again to get it back on.


Where i can find information about updates

The package manager keeps logs in /var/log/apt. You can see changes made with:

cd /var/log/apt
cat history.log

Depending on how long since the upgrade, the relevant entries may have been compressed to save space. The /var/log/apt directory will contain archived log files named history.log.X.gz where larger values of X mean older log files. You can read the compressed log files using zcat without needing to manually uncompress them:

cd /var/log/apt
zcat history.log.1.gz

You should see lines like

Upgrade: package1:arch (oldversion, newversion), package2:arch (oldversion, newversion)...

from which it should be fairly easy to see what was upgraded recently.


Error mounting NTFS partition after hybrid shutdown with Windows 8

What @grimpitch says is absolutely correct.

Just adding that you can mount windows 8 drive in read-only mode as the error message suggests.
It can be useful if you only want to look at and copy files from the windows drive.

For it, first you have to create a directory as mount point:

sudo mkdir /media/*youruser*/newdisk

Later, mount the drive with:

sudo mount -t "ntfs" -ro "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/*youruser*/newdisk"

Change words with *, with your user name. /dev/sda4 could be also different, depending on the partition is the one where windows 8 is installed.

Note the args values are taken for your particular error message, for other users take the error message, change -o by -ro and type appropriate user name.

Also, note, with this method, you cannot edit, write or create new files in the windows drive.


Rhythmbox not saving the album art permanently

As far as I know, the Plugin isn't working at all because the Site where the Covers can be found has decided to disable Rhythmbox-Users completly because of too high traffic.

What you can do is searching your Covers manually via images.google.com, save them as folder.jpg in the album-folders and (if you want) inject the Artwork into your .mp3-files with a Tag-Editor like Mp3Tag (works fine with Wine).


WiFi only works after restarting, but not shutting down from Windows

I'm facing this issue and I believe Windows 10 has a fast startup feature which doesn't shut down your system but instead puts your kernel in a deep hibernation state to boot faster. This unfortunately means that when you boot into ubuntu, you aren't performing a clean boot. You can try turning this off by following steps here. If that works, awesome! Else I'm afraid you might have to resort to restarting windows for now


Looking for a script/tool for moving files and subfolders to directory by year

Save this text into a file (sort.py) and run it:

./sort.py src-dir/ dst-dir/

It loops through the source directory, gets the mtime of all files and folders, and moves them to the destination directory. Note: It's not recursive! Use it at your own risk!

#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-

import os
import sys
import shutil
from datetime import date

# Check arguments
if len(sys.argv) > 2:
    src = sys.argv[1]
    dst = sys.argv[2]
else:
    print "Arguments: ./sort.py [src] [dst]"
    sys.exit(1)

# Check paths
if not os.access(src, os.R_OK):
    print "Source path not found"
    sys.exit(2)

if not os.access(dst, os.W_OK):
    print "Destination path not found"
    sys.exit(3)

# Start sorting from root
for f in os.listdir(src):
    fpath = os.path.join(src, f)
    mtime = os.stat(fpath).st_mtime
    year = str(date.fromtimestamp(mtime).year)
    ypath = os.path.join(dst, year)
    if not os.access(ypath, os.W_OK):
        os.mkdir(ypath)

    print "Moving %s to %s" % (fpath, ypath)
    shutil.move(fpath, ypath)


X-notifier doesn't work in Chromium Browser

The X-notifier blog says that the latest version of that addon needs version 21.x or later of Chromium, one that at this stage is not in the official sources.

In the future it will be, hopefully.

But this problem might reappear for future versions,as future addons/extensions may keep asking for newer versions of the browser, in which case see unofficial sources or beta and dev versions.

So, see How to install the latest stable version of Chromium? (including unofficial ones) and How do I get the latest (beta and development) version of Chromium?


Custom keyboard shortcuts in gedit 3.10 on ubuntu 14.04

A couple of things -

you wouldn't edit ~/.config/gedit/accels as root, it's a user file. Typically any edit to an accels file would require removing the ; from line for it to hold. In the case of gedit doesn't matter, you can't successfully edit that file.
To actually change just edit the plugin itself, open /usr/lib/x86_64-linux-gnu/gedit/plugins/codecomment.py in a root text editor for 64 bit install & change there. 32 bit is in i386-linux-gnu

(- at or about lines- 89 - 95, just change the letter(s), leave as <control>


You may not use relative paths in $PATH. Well, you may, but each time the system then tries to look up a command, it will try to resolve the relative path entry there based on your current working directory, which can be anything.

Also don't duplicate the $HOME/bin entry.

Note that normally you place your custom paths in front of the default (i.e. before the old $PATH), so that they have higher priority. I don't know if it is intended that you put them last.

You don't need to re-export the variable either, this one is already exported (although it doesn't hurt).

So all you need should be to change the second half of your file to this:

# User specific environment and startup programs

PATH="$HOME/bin:/data/biocs/b/bio425/bin:$PATH"


How to resolve package conflicts installing LibreOffice 3.6.4?

Most likely there are still traces present from your old libreoffice installation, you can remove these with

sudo apt-get purge 'libreoffice*'

Then try to follow the guide again.


How to Play Music in Cycle with Omxplayer?

In @andrew.46's comment

omxplayer --loop song.mp4


How to get a list of currently open files / application instances in unity launcher quicklist?

Alan Bell has created a python script to do just this.  There is a PPA available (currently only for Precise Pangolin).  Hopefully we'll see this feature available as part of official Unity releases in the future.

sudo apt-add-repository ppa:alanbell/unity
sudo apt-get update
sudo apt-get install unity-window-quicklists

Logout and login.

For more information see Alan Bell's blog post and PPA for Unity Window Quicklists


Package: zipcmp
    ...
    Description-en: compare contents of zip archives
     zipcmp compares two zip archives and checks if they contain the same files,
     comparing their names, uncompressed sizes, and CRCs. File order and compressed
     size differences are ignored.


Error: setlocale() failed when I run crunch in ubuntu

I had the same problem. I think it is because your os doesn't know your locale.
Just add

# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

to your .bashrc and it worked for me.


Ubuntu 13.10 numeric pad type wrong numbers

There was an option in 13.04, in Keyboard -> layout Options (accessible through Region and language -> Layout -> Options too). Your one was probably ATM/Phone-style.

I do not know if in the simplification-frenzy on 13.10 it has simply moved in another window of it has been culled. You can add yourself to https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1245064.


problem with my other windows installation on another drive

So I understand correctly: You have/had a dual boot of windows and ubuntu, and now the boot loader is broken and you can't get into windows?

If you have removed ubuntu and all you get is grub, it's because your boot loader was replaced by grub. You need to download a Windows repair ISO for a USB stick, or a Windows installation media from Microsoft. Boot your computer from USB and then run the boot repair commands. This will fix your boot loader and allow you to launch Windows again. No need to install Windows again the boot loader is the only thing corrupted.


Is there any application to convert gif file to txt file in linux?

I think you are looking for gif2txt This GitHub project appears to be able to convert even multi-image gifs to ASCII art. Here's an example source image:

https://raw.githubusercontent.com/hit9/gif2txt/gh-pages/test.gif

and example output:

https://hit9.github.io/gif2txt/out.html


Error in blacklist.conf file: Ignoring bad line starting with

Since you've deleted /etc/modprobe/blacklist.conf which is an important file. It tells Ubuntu to blacklist some problematic kernel module. So, I suggest you to reinstall the package kmod which provides that file. But you should reinstall it such a way that it will overwrite your modified changes.

To do so, use this command in a Terminal

sudo apt-get --reinstall -o Dpkg::Options::="--force-confask" install kmod

This will ask you a question whether you want to retain your modified blacklist.conf file or want to overwrite it with the package maintainer's one. You will select Y here to overwrite.

Next you need to generate the initramfs using the command

sudo update-initramfs -u -v

Reboot, and the error should be gone.

Edit: I didn't consider it as an overkill to install kmod only for a config file because, this kmod package is less than 100KB. Also It is better for a new user to directly restore the original version without copying from somewhere else.


The reason for the below error:

  bash: /usr/local/hadoop/bin/hadoop: Permission denied

Is that fact that you are trying to execute /usr/local/hadoop/bin/hadoop which it isn't execute-able.

Running the below command will make the hadoop file executable.

chmod +x /usr/local/hadoop/bin/hadoop

I suspect that all the files which ends with .sh should be executables.

The below command will turn the .sh files to be executables:

chmod +x /usr/local/hadoop/bin/*.sh

Note:

There seems to be a problem with the hadoop downloaded file / unpacking process.

I've downloaded hadoop-2.7.4.tar.gz (binary tar.gz file) from the official site.

When I test the tar.gz file I clearly saw that the original bin/hadoop file was execute-able (the x flag in the -rwxr-xr-x permission)

 tar tzvf hadoop-2.7.4.tar.gz  | grep "bin/hadoop"
-rwxr-xr-x kshvachk/eng   1360 2017-08-01 03:35 hadoop-2.7.4/sbin/hadoop-daemons.sh
-rwxr-xr-x kshvachk/eng   6452 2017-08-01 03:35 hadoop-2.7.4/sbin/hadoop-daemon.sh
-rwxr-xr-x kshvachk/eng    8786 2017-08-01 03:35 hadoop-2.7.4/bin/hadoop.cmd
-rwxr-xr-x kshvachk/eng    6488 2017-08-01 03:35 hadoop-2.7.4/bin/hadoop


How to run python script at Ubuntu start?

You can also use crontab for this.

cd ~/myappfolder while true; do timeout 1h python worker.py --log-level=ERROR; done exit 0

Create a .sh file and save it. (For example to /etc/myscript.sh) Test run it. If you get a Permission Denied error run chmod +x /etc/myscript.sh

Then run these commands:

crontab -e
@reboot /etc/myscript.sh

Those commands insert the last line into crontab so it runs everytime you reboot.


See my filed bug and fix here:

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1385143/comments/2


Steam not launching after switching Graphics Card?

As mentioned in the comments, the solution is to remove the .deb file installed from the Steam website and do sudo apt-get install steam as it automatically installs the required libraries and packages required for the proper functioning of Steam.

Edit : Check out this answer to fix the Integer parameter error that throws up.


For Ubuntu 11.04 and newer

Before adding a PPA you should be aware of some of the risks involved:

Are PPA's safe to add to my system and what are some "red flags" to watch out for?

Always remember that PPAs are provided by the community, you should be aware of the possible risks before just adding a PPA.

First open the dash by either clicking on the Home button (On the top-left Corner) or pressing the Super Key .

Search for 'Software Center' and launch the Ubuntu software center.

Move the mouse to the top panel where the name of the application is written.
Now Go to the Edit menu and select Software Sources.

For newer versions,  right click and click Software and Updates

Then, click Other Software,

Enter your password when prompted.

Switch to the 'Other Software' tab.

Now  click 'Add', a box will appear.

You have to enter the PPA in the box. It can be found in BOLD on the launchpad page.

Now click 'Add source' and close the Software Sources. The cache will be refreshed

Now install the software from the software center.


Yes, it will work, make sure to install the latest version 14.10 64 bits to use the 8GB of RAM, all hardware is compatible.


How can I restore the Time and Date to the panel?

It may be related to this bug.

https://bugs.launchpad.net/ubuntu/saucy/+source/gtk+3.0/+bug/1199877

Short answer, just enable proposed updates and update unity panel service and gtk3.


Press Window key and search for Startup Applications
Click on Add Button
Name: Chromium
 Command: /usr/bin/chromium-browser

PS: I use Ubuntu and not Lubuntu but I think it should do the job.


Spacebar not launching application / open file

I don't think you can, but shift+space will open the selected file.

The reason I don't think you can do what you asked is that it is simply not listed as an option, and you wouldn't want to remap the space key because you would no longer be able to enter a space.

On my 10.04 system (Gnome), it works the same way.  Perhaps it changed on an update, but I don't know that it ever worked that way.  I wouldn't expect it to.


I had the same problem a few days ago. The reason it is happening is because a program called X Windows (that is responsible drawing windows) is failing to start. Because X doesn't start, the session manager, (typically, lightdm or gdm) keeps trying to restart X. This is why your screen is flickering. each time X tries to start up, it takes control of your Gfx card, but... something along the way goes boom.

Anyways, the good news is that everything is probably ok, and a little work will get it fixed up.

As a first debugging step, even thought it seems paradoxical, could you try uninstalling the nvidia drivers with something like

$ sudo apt-get remove nvidia-*

and reboot your computer.


At least a part of the question - how to get rid of the message about the need to install libc6: i386 - has a solution that the steeldriver brought me to.
He led me at the ESET support page. I see that my 'Recommended updates (xenial-updates)' are checked, similarly as 'Recommended updates(trusty-updates)' for another Linux distribution in that manual and I hope the alerts

me@furtherPC:~$ software-properties-gtk
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gdk, Gtk, Gio, GLib
me@furtherPC:~$
 don't matter. Software Updater tells that my Ubuntu 16.04 is up to date.
The recommended commands

sudo apt-get update
sudo apt-get upgrade
 worked without warning. After the furtherPC restart
as_a_root@furtherPC:/home/me$ sudo dpkg --add-architecture i386 && apt-get install libc6-i386
[sudo] password for as_a_root:
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
as_a_root@furtherPC:/home/me$
has not worked but
as_a_root@furtherPC:/home/me$ sudo apt-get install libc6-i386
 has downloaded and installed 10.4 MB files. Now running that installation file

as_a_root@furtherPC:/home/me/pathESET$ ./eset_nod32av_64bit_cs.linux
No protocol specified
(eset_nod32av_64bit_cs.linux:5531): Gtk-WARNING **: cannot open display: :0
as_a_root@furtherPC:/home/me/pathESET$
will not raise the message that libc6: i386 is needed, however it reports  further errors. Perhaps I understand correctly that

me@furtherPC:~/pathESET$ dpkg-query -W libgtk-3-bin
libgtk-3-bin    3.18.9-1ubuntu3.3
me@furtherPC:~/pathESET$
 means that the furtherPC has the required GTK + 2.6 or newer installed. I have also asked ESET support and will tell the result here.


How do I turn off automatic updates COMPLETELY and FOR REAL?

How to uninstall Unattended-Upgrades: sudo apt remove unattended-upgrades

WARNING: Uninstalling this package is a bad idea for most users. You will no longer get automatic security patches. Running your Ubuntu system without unattended upgrades is untested -- you may encounter unexpected errors. Running an unpatched Ubuntu system may leave you vulnerable to published exploits. If this is an enterprise or school system, running an unpatched Ubuntu system may violate your network owner's policy.

Someday, if you change your mind and want to restore automatic security patches: sudo apt install unattended-upgrades

How to uninstall Update-Notifier: sudo apt remove update-notifier
Update-Notifier includes the small alert icon at the top of your screen and the little dialog that both nag you when upgraded packages are available. They seem small, but they are an important part of the Ubuntu user experience.

WARNING: Uninstalling this package is a bad idea for most users. Removing this package will ALSO remove your desktop metapackages (ubuntu-desktop-minimal and ubuntu-desktop). For some (not all) users, removing the desktop metapackages may make their entire desktop stack eligible for autoremoval. The desktop metapackages MUST be reinstalled before you run do-release-upgrade to migrate to the next release of Ubuntu. Don't forget. You have been warned.

Someday, if you change your mind and want to restore this package: sudo apt install update-notifier

How to uninstall Update-Manager: sudo apt remove update-manager
Update-Manager includes the large daily/weekly upgrade selection dialog and the release-upgrade graphical frontend.

WARNING: Uninstalling this package is a bad idea for most users. Removing this package will ALSO remove your desktop metapackages (ubuntu-desktop-minimal and ubuntu-desktop). For some (not all) users, removing the desktop metapackages may make their entire desktop stack eligible for autoremoval. The desktop metapackages MUST be reinstalled before you run do-release-upgrade to migrate to the next release of Ubuntu. Don't forget. You have been warned.

Someday, if you change your mind and want to restore this package: sudo apt install update-manager


Test -lt Command in the If Statement with a String Variable

Bash variables are essentially untyped1 - tests that only make sense for a particular type may fail at evaluation time if the value cannot be converted successfully. Valid forms of arithmetic test are:

$ b=4; if [ $b -lt 5 ]; then echo "less"; fi
less

or (using arithmetic expression syntax)

$ b=4; if (( $b < 5 )); then echo "less"; fi
less

As noted in the ARITHMETIC EVALUATION section ofman bash, the dereferencing $ may be omitted in the (( ... )) context:

  Shell variables are allowed as operands; parameter  expansion  is
  performed before the expression is evaluated.  Within an
  expression, shell    variables may also be referenced by name without
  using  the  parameter    expansion  syntax.

So

$ b=4; if (( b < 5 )); then echo "less"; fi
less

The same is not true in the POSIX [   ] test syntax, which will treat b as a string literal:

$ b=4; if [ b -lt 5 ]; then echo "less"; fi
-bash: [: b: integer expression expected

If you try to perform a [  ] arithmetic test on a variable that contains a non-numeric value it will fail for the same reason i.e. that the value cannot be converted to a numeric type:

$ b=foo; if [ $b -lt 5 ]; then echo "less"; fi
-bash: [: foo: integer expression expected

1 Rudimentary type checking may be implemented using declare -i if the -u shell option is set ex.

$ set -u
$ declare -i b
$ b=foo
bash: foo: unbound variable
$ echo $?
1

whereas assignment of a valid numeric value

$ b=4
$ echo $?
0

succeeds.


how can I make my ubuntu machine discoverable by name for ssh from other linux machines?

If you're running some kind of shared folder system  like samba, the machine is discoverable using the local domain, try something like:

ssh nameofthemachine.local

If not, you'll need to setup some DNS local server either in the network or in the ssh server itself to translate domain names into IP's.


Passing Disc space from Linux to Windows

EDIT: According to your fdisk output, I adjusted the solution. Also, as it was pointed out, you need to boot on a live session (LiveCD or LiveUSB) so that none of your partitions are mounted.

Follow these steps to rearrange your partitions:

If you are not familiar with partitioning using GParted, read this post: How to resize partitions?
Resize sda7 (Home) to 81920 MiB and move it as far as possible to the right.
Resize sda6 (System) to 30720 MiB and move it as far as possible to the right.
Resize sda2 (Windows) so as to fill the empty space (≈ 40 GiB).
Repair GRUB using Boot-Repair. You shouldn't need to fix the MBR, but if Windows fails to boot after these steps, it wouldn't be a bad choice to try that. See this article: https://help.ubuntu.com/community/Boot-Repair (follow the 2nd option if you want to stay on your live session)


Cannot access shared folder on another Ubuntu machine

Do you configure correctly :

adduser john
addgroup users
sudo chown -R john:users folder
sudo chmod -R 0770 folder/
sudo nano /etc/samba/smb.conf

And add following lines:

[folder]
path = /home/samba/folder
valid users = john
guest ok = no
writable = yes
browseable = yes
security = user

/etc/init.d/samba restart
sudo usermod -a -G users john
sudo smbpasswd -a john
enter passwd:


Adjust microphone volume in Kubuntu 14.04

Just click on the loudspeaker-icon in the notification-area in the task-bar.
This will open a menu with sliders to adjust the volume of playback-devices and capture-devices. Your microphone will be one of the capture-devices.


It appears the cache subfolder is missing. For Ubuntu Linux just open terminal and run mkdir ~/.cache/vlc


How can I replace Snap application such as Gnome Calculator with a deb?

Snap packages installed by default in Ubuntu 18.04 LTS are:

gnome-calculator
gnome-characters
gnome-logs
gnome-system-monitor

Which can be found using the command sudo snap list. To remove default Snap apps use:

sudo snap remove gnome-calculator gnome-characters gnome-logs gnome-system-monitor

Then install their .deb counterparts with:

sudo apt install gnome-calculator gnome-characters gnome-logs gnome-system-monitor

Additionaly, you can uninstall the whole Snapd ecosystem from your computer with:

sudo apt purge snapd squashfs-tools gnome-software-plugin-snap


Password required every time I open a file

When I logged in today and checked the parent folder again it was "/home/niam/ like it should be. Very strage, but now, everything seems to work...


Automatically mouting partitions at startup

Edit /etc/fstab with sudo -e /etc/fstab and comment # line containing partition you don't want. In second column you have mountpoints. Don't touch root partition /


Default home directory permission allow read?

Yes, and in combination with the default umask that will give any local user read access to the bulk of any other users files. The exception being those individual directories/files which for one reason or another gets created with a more strict set of permissions.

That is probably not a desirable situation on a lot of a multi-user systems. Preferable you will then have your user-creation script, your configuration management or whatever set more restrictive home directory permissions.


It is normal that processes that you start over an ssh connection - and the same goes for a local terminal instance - stop when the ssh connection - or the terminal console or window - is closed. To allow processes to continue while you are not anymore connected, you can use multiplexer tools like GNU screen or tmux. These tools allow to "detach" a session from the terminal. The session then keeps running on the host system. You later can reconnect to such session to interact with it again.


New to Ubuntu. How do I access my files?

Step 1: Hit ctrl+alt+T
This will open a terminal window

Step 2: Type sudo mount -a and type your root(login) password.
This will mount all partitions on your 500GB HDD

Step 3: Go to file manager named FILES. Navigate to 'File System'.
You will see lots of directories(etc, bin, home, lib, dev, mnt...). Check the media directory for your partitions.

Sorry for my English.


I think I would start in the source directory and try fgrep -ir depends * | less, and copy down the filenames I think look interesting. This goes through the entire source tree doing a case-insensitive search for "depends".

Sometimes it helps to look at debian/changelog to see what changes were made in the area you are studying; it sometimes references the names of files affected.

With a fast look I'd say apt-pkg/orderlist.cc, apt-pkg/algorithms, and apt-pkg/packagemanager.cc look interesting.

Sometimes I find a string with fgrep, find a routine where it is used, and then use fgrep again to find where the first routine was called, ad nauseum.

Here you can find a class in algorithms used in Ubuntu that covers graphs and how they can be used to process dependencies, for example (just in case that may be useful to you). The class begins at 17:00 UTC and is taught by tomek204.


Missing /etc/hosts file – How can I create a new hosts file?

Lines in the /etc/hosts file have the following format:

<IP> <HOSTNAME>.<DOMAIN> <ALIAS>

You can create and/or edit the file with your preferred editor:

sudo nano /etc/hosts     # with nano in a terminal
gksudo gedit /etc/hosts  # with gedit
kdesudo kate /etc/hosts  # with kate

Here are some useful lines for the file – lines beginning with # are comments and get ignored, empty lines are allowed:

# The following line is desirable for IPv4 capable hosts
127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

You can read more about the format and get examples on the manpage (How can I get help on terminal commands?):

man hosts

There's also a Howto on ubuntuforums.org.

Further reading:

What is the use of /etc/hosts?
What are the default settings for 'etc/hosts' and 'etc/hostname'?
How should I add a host name to /etc/hosts?


How do I deal with "unauthenticated sources" errors in the Software Center?

Open the Terminal and enter the commands below one by one:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

Update:
This might not help in some later versions, which might require alternative solutions like the one in the other answer, or this one that seems to do the job in some cases under Ubuntu 16.04:

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


gnome-shell, gnome 3, unity, cinnamon, mate confusion

-If I add cinnamon, mate, gnome2/3, could I still call it it Ubuntu, or would it be Mint?

It is still Ubuntu.

  Why not just add Mint instead of cinnamon, or mate, into Ubuntu? Or is Mint just those at the core, and not the other way around?

I did not understand what you mean, Mint as Ubuntu is a community of users and developers, both with goals that may or may not convey same thing.

  -I had terrible battery drain using Mint. Something was wrong with the kernel with my laptop type. If I add cinnamon, would I get that battery drain again?

Cinnamon is a Desktop Environment and it's just that it is not an Operating System. . Cinnamon might have been "heavier" in terms of resource using so it "may have caused your battery to drain faster.

  -And lastly, would I be able to get that awesome HUD if I add the other things?

No, HUD is intended to be used with Unity only.


Unable to install printer driver for Canon Pixma mg4250

For Canon Pixma MG4250 and other "old" Canon printers, the package cups-backend-bjnp is needed. First install it:

sudo apt install cups-backend-bjnp

Then your printer will be avaliable in Ubuntu's list of printers.
And you may change the color model to KCMY.


Is it possible to open docx files that have been saved in Ubuntu's LibreOffice in Microsoft Office?

Yes, it is possible :
DOCX is handled by LibreOffice.

Meanwhile, some formatting functions are not compatible between both "offices".
Sometimes, some colors applied will not being seen in each other.


How can I use Jack for all my system sounds?

Ubuntu uses PulseAudio for the default audio.

For info in intergrating with JACK:

http://jackaudio.org/faq/pulseaudio_and_jack.html
http://trac.jackaudio.org/wiki/WalkThrough/User/PulseOnJack


what are duty of locale and locale-gen commands?

From Wikipedia :

  In computing, a locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language identifier and a region identifier.

The locale programs will output a set of shell variables and their values. These are the variables that alter the behaviour of some commands regarding the language, character sets usage and so on.
From my system :

benoit@thorgal:~s locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
benoit@thorgal:~$

This tells those commands, which listen, to use American English and UTF8 encoding for the special characters.
If I change the value of LANG and put fr_FR.UTF-8 instead, then commands, that support it, will write their output in French instead of English. Of course, only, if the French translation is installed.

For the locale-gen command, I think that the first paragraph of its man page is self-explaining :

  Compiled  locale  files  take  about 50MB of disk space, and most users
         only need few locales.  In order to save disk  space,  compiled  locale
         files  are not distributed in the locales package, but selected locales
         are automatically generated when this package is installed  by  running
         the locale-gen program.

When you run locale-gen or locale-gen <locale code> you compile the needed locale file(s), allowing commands to use the locale specified within the environments variables displayed by locale.

Example: locale-gen en_US.UTF8

You can get the available locale codes by using the command locale -a.


If your terminal supports 256 colours then set this in your .vimrc se t_Co=256
If your not sure then set this in your .vimrc se t_Co=16

Explanation:

Getting consistent colors in different terminals is challenging because different terminals support different numbers of colors.

I ran this command on my vim which showed me the current colour setup  :echo &t_Co
This returned 8. Most themes in vim need more colours than 8.

Source: http://vim.wikia.com/wiki/Using_GUI_color_settings_in_a_terminal


Can't update because of "untrusted" packages?

If you've installed packages from ppa it may happen. To unblock the updates, I'd suggest to open the Software Sources and deselect a few of them (temporarily):

Open the Ubuntu Software Center,
then Edit-> Software Sources...
Finally open the "Other Software" tab

After deselecting a ppa, try again to open the Software Updater to request an update. It should quickly give you the untrusted source.

As pointed by karel, you can also update your system using sudo apt-get update && sudo apt-get upgrade on the command line. It will prompt you if you want to install such packages.


What is the guest OS type? if it's Win7 then;

(assuming you've already installed guest additions)

You need to set USB filters so that the USB devices get sent to the guest OS.

From the main Virtualbox window open the Settings dialog, then the USB section, then click the little "add filter" button on the right side of the screen. You should be able to create a filter from any currently connected USB devices.

After you've done this (maybe restart to be sure the host OS isn't capturing any of the USB devices for itself--Ubuntu will try to automount the flash drive so you might also want to check and make sure that it is unmounted too) then boot into the guest OS and you should see your USB devices

Hope that helps


It says your fan is disabled, you need to go into your bios and enable it from there, it should work after that.


Viber Installation error (Status_Custom_Error)

work step by step from here

Download Viber Debian
Install with ubuntu software
Enter your phone that Viber installed on
Scan the QR


Set permissions on a directory for "passing but not browsing"

I believe they mean that you should set "execute but not read" permissions.  This lets people traverse ("pass") the directory, but not list ("browse") the files it contains.  Although it's an uncommon arrangement I still use those permissions occasionally at work, which is where I recognised the wording from.

In your case, it means that files and directories inside /home/alu1 can only be reached by other users if they already know the right path, and they can't use ls to find out any names they don't already know.

For example, if you knew that every user had a standard /home/<user>/Public/ directory with 777 permissions, then you'd be able to cd into that and use it as normal, but you wouldn't be able to see what else people kept at the top level in their home directory.  (You might be able to have a guess at some things, of course, but that's a different story.)

If the alu1 home directory is /home/alu1, and assuming that you want to keep full permissions for the owner, then you can set the requested permissions as follows:

chmod 711 /home/alu1

Alternatively, if you prefer to use the symbolic permissions syntax, you should get the same results by using

chmod u=rwx,go=x /home/alu1


You may not want to hear this but if you enjoy a lot of Windows-only software and need it to perform as well as it would on Windows then dual-booting - having an actual bare-metal Windows installation - is the best way to achieve this.

Any kind of emulation layer, and Wine is an emulation layer despite what people say the name stands for these days, has the potential to degrade performance.

In particular, DirectX is a big and complicated beast and providing an entire emulating API for it adds a huge amount of weight, so any 3D game is going to suffer greatly under Wine.  Subroutines that are hardware-accelerated in Windows may be emulated in software under Wine, or they may be hardware-accelerated but in a different, and less efficient way.  The bottom line is a lot of the time you will get severely degraded performance.

Wine is a great exercise in providing API compatibility for Windows applications, and should be admired for the success it has had in doing so, but one should never expect anything to perform as it would in Windows itself.

Note: some decent games are natively available for Linux, through Steam or otherwise, and should run well enough on Linux.  What won't run as well are games released exclusively for Windows, particularly if they use DirectX which will be the heavier, slower emulation on Wine.


Can't change the brightness with nomodeset

Although it's like a brute force method it worked for me. Initially, when my Ubuntu was stuck at the purple screen:

I restarted the system.
Pressed E key and added nomodeset as: ro quiet splash &vt_handoff nomodeset.
Pressed F10 and once the system restarts , open terminal.
Write sudo gedit /etc/default/grub/ in the terminal.
Add nomodeset like this, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
Save the file and write sudo update-grub.

Now the main part:

Go to applications and open software and update.
Click additional drivers and choose the recommended one and NOT X.Org xserver.
Once Done with this, restart the system.
But this time again press E on grub menu and (remove) nomodeset and press F10.
The system will start normally.
Once started, open the grub file again as in step 4, but this time remove nomodeset and save the file.
Write sudo update-grub and restart the system.

Congratulations! Now your system will work perfectly with normal boot, without nomodeset and you would be able to inc/dec the screen brightness.


Cannot connect to wi-fi with AR5BWB222 on Ubuntu 13.04

What I have personally done to create my networks is the following (though I have done this with fixed ethernet rather than wireless connections - I am guessing it works the same):

Firstly, remember that ifconfig = fixed connections, and iwconfig = wireless connections, so you won't see wireless connection information with the ifconfig command
Next, if you have the GUI / desktop installed, use the UI menu item (top right corner drop down menu) to create a new network connection ... select the correct MAC address, and then choose your DHCP or static settings etc.
sudo nano /etc/NetworkManager/NetworkManager.conf
edit the last line after [ifupdown] to managed = true
this is only one approach, but it is basically choosing to use one set of management tools over another (I believe)
Next: sudo nano /etc/network/interfaces
and if there is a connection there for your wlan0 (or whatever the connection is called - for mine it is of course eth0), which says something like: #iface wlan0 inet dhcp, and you wanted to set a static address ... then you comment out that line
Finally, if you are getting the error message about the avahi-daemon not liking your .local domain, you just edit as follows:
sudo nano /etc/default/avahi-daemon
change or add > AVAHI_DAEMON_DETECT_LOCAL=0

Now reboot ... you should be able to connect to your fixed or wireless connections ... apologies if this is only for fixed, I don't remember reading that part (though I think I did manage to get it to work for a wireless connection, that was a while ago, let me know how you go)

One other alternative I saw involved downloading tools:

sudo apt-get install wireless-tools

... but I didn't go down that path, so you would have to google that one yourself.

Good luck !


Ubuntu 12.10 Can't find my Creative Bluetooth Speaker (D200)

It is often better to research your subject before posting it on Askubuntu.
Here is an article that answers directly your question : Creative D200 on Linux.

Here is a detailed tutorial based on that article :

Scan for bluetooth devices
Press the bluetooth button behind the speaker during the search for 3 seconds
Once it shows up on the list, choose PIN options
Choose 0000 as the PIN
Connect to the speaker
Go to System settings> Sound settings
Choose Creative D200 as default speaker in the Output tab.


The files scope relies on two main data sources to return results:

Zeitgeist is used to return recently used files.
The system locate database is used to search your entire home folder.

If you have chosen to encrypt your home folder, then your home folder will be an ecryptfs mount when you are logged in.

The default configuration for updating the locate database in /etc/updatedb.conf skips ecryptfs filesystems.

You can change this configuration by editing the PRUNEFS variable in that file, but note that this will leak the names of files in your home folder onto non-encrypted storage.

Unfortunately, I don't think there is currently a solution (beside this alternative) that will let you search your files in the dash and keep their metadata private.

If you add the command alias updatedb-home='export LOCATE_PATH="$HOME/mlocate.db" && updatedb -l 0 -o $HOME/mlocate.db -U $HOME' you then can run updatedb-home periodically to update db, or add it also to .bashrc to run it on every login.


Some of the files that you deleted were still open by a running program, and so could not be freed yet.  Rebooting killed that program and freed the space.


Fix "Package system is broken" error without synaptic

I eventually traced the problem to a broken package from the oibaf PPA, as described here.

Following advice from one of the posters there, I eventually fixed my problem by manually downloading the offending mesa packages and all their cross-dependencies from the official Ubuntu repositories (http://packages.ubuntu.com/) and installing them using dpkg -i.

I then ran apt-get install -f, which revealed some more broken dependencies, so I found and installed these as with the previous packages.

After a few rounds of this, I eventually managed to run apt-get install -f without errors, then ran `apt-get dist-upgrade' to update with the latest (unbroken) versions (having already removed the oibaf PPA).

Painful, but effective.


dhcpd offers ip address but client doesn't get ip

I found a solution, iptables was blocking the dhcp port.
I needed to add this rule that would cause UFW to open the DHCP port, called bootps in /etc/services

sudo ufw allow bootps


Does a sidebar like Google Desktop sidebar exist for Ubuntu?

I don't think so, however there is something called Conky which can display CPU information and more.

You can install it by running the following command in the terminal:

sudo apt-get install conky conky-all

Or install it the Ubuntu Software Center, by searching for conky.

The problem however is that you still need to configure Conky by yourself which can be tricky, the best thing to do that is by using the program called Conky Manager or visit the website of conky. http://www.webupd8.org/2013/07/conky-manager-gui-for-managing-conky.html
http://conky.sourceforge.net/

Personally I don't use conky but I hope this helps a bit.


Ubuntu not booting from USB; No "continue" option in the installer when choosing to install alongside Windows

With windows 8 in addition to changing you boot order in your bios you must disable secure boot and OS Mode Selection (both in your bios) for it to recognize Ubuntu.


i am trying to install a netgear wna3100 usb adaptor

Just trigger the code in the terminal

sudo apt-get install ndisgtk ndiswrapper-dkms dkms linux-headers-generic build-essential

Go here for more info
Click here


ATI radeon mobility 3650 overheats and shuts down computer in Xubuntu and not Windows. Why?

Right it seems that the command aticonfig --initial initialized the /etc/X11/xorg.conf file and filled it with the correct configuration for my graphics card. Before I did this the file had almost no information in it so if anyone has a similar problem check that  /etc/X11/xorg.conf is set up correctly (might be in a different folder for others). I played UT2004 after doing this and the frame rate issue is gone, even on higher settings. Although the graphics card got hotter there was no emergency shut down and I played it for a while.

If you want a way to check if the file is set up correctly run aticonfig --odgc --odgt --adapter=all (this was suggested in Bill's answer so credit goes to him). This command normally returns performance information about your graphics card. If /etc/X11/xorg.conf isn't set up correctly it will return an error that asks you to run aticonfig --initial.


If you have a USB sd card reader, try using that to mount the card instead of through the device that the card belongs to (like instead of plugging the cable into your phone/ camera from your computer). This just makes sure there really is a problem with the card and not with your device.

The second benefit of using a USB adapter is that you can touch the card to see if it is hot. If the card is burning up then you have a short and there is no way to recover any data- this usually happens if you accidentally bent the card slightly or if there has been physical damage to the card. How hot is too hot? It will almost burn your fingers...

The circuitry is really fragile in these cards so it doesn't take much to fry them. I have never had any luck with recovery software. Hard lesson learned - never keep anything valuable on SD flash- it is by far the least reliable storage medium.


su without password with pam su-authentication

su to root without a password

In the file /etc/pam.d/su put this as the line:

auth            sufficient      pam_permit.so

To restrict this just to your username, use this line instead, replace the yourusername with your actual username:

auth            sufficient      pam_succeed_if.so use_uid user = yourusername

You can also restrict this to a group, here the group allowedpeople can su without a password:

auth            sufficient      pam_succeed_if.so use_uid user ingroup allowedpeople

then login

su yourusername


How to share a remote mounted folder using sshfs?

You must use the "allow_other" mount option for sshfs to make mounts visible to all users.  If that doesn't fix the problem, you should probably give the mount options you use.


How to use sed to substitute current date?

Apparently you cannot parse the output of BSD cal for the current day. This is because it's highlighted. If you turn off highlighting with the -h switch, it will work:

➜  ~  cal -h | sed "s/$tmp/$pat/"
     Abril 2014
do lu ma mi ju vi sá
       1  2  3  4  5
 6  7  8  9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
dd 28 29 30

To identify the output of cal, check the strace:

strace cal
[...] # tons of lines here
write(1, "       1  2  3  4  5  \n", 23       1  2  3  4  5
) = 23
write(1, " 6  7  8  9 10 11 12  \n", 23 6  7  8  9 10 11 12
) = 23
write(1, "13 14 15 16 17 18 19  \n", 2313 14 15 16 17 18 19
) = 23
write(1, "20 21 22 23 24 25 26  \n", 2320 21 22 23 24 25 26
) = 23
write(1, "\33[7m27\33[27m 28 29 30           \n", 3227 28 29 30
) = 32
write(1, "                      \n", 23
) = 23
exit_group(0)                           = ?


What parts of Ubuntu are not written to often?

It's a non-issue. To wear out a 10,000 cycles 64 GB SSD, you'd have to write 10,000 times 64 GBs, that is, 64 GBs a day per 27 years. Way too much for an average user.

It was a problem when SSDs had less cycles and thus wore out early.


If you are using VLC, it's better with Tools > Preferences> Audio > Effects > Enable Time-Stretching audio - unchecked (default is checked), and maybe Output module: Audio memory output(default is Automatic). It's some settings thing, but I didn't figure it out just yet. Any new trial&error very welcomed. (I'm using VLC 2.2.2 on eOS Loki, based on Ubuntu 16.04)


ubuntu one installation failure from the app centre

Ubuntu One has been discontinued both according to the wikipedia and according to Canonical's own blog.


im trying to download the ubuntu update but it stops mid way and it says failed to download repository information

I had a similar problem. Try running the software updater through the terminal rather than opening the program. It worked for me.


Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:

$ eval $(ssh-agent)

## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;

After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add

$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa

With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:

## ~/.ssh/config
AddKeysToAgent yes

This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.

Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.


Never before had a problem with Ubuntu desktop graphical display; Trying to use nvidia GT630

SOLVED

This was an issue with the boot process hanging not with anything video related!

At first my video card failed, which I replaced. When I could not boot to desktop, I used recovery mode to see the boot process hang at intel e1000. So I disabled internal lan in bios.

Still the thing wouldn't boot to desktop. I used the recovery mode again and found the boot process hanging on rt2800pci ! So I removed my airlink wireless card and...presto!...I can boot to GUI desktop.

Strange to me that some OSs (Live FreeBSD) don't get hung up on hangs while others do. Also strange to me that Ubuntu server doesn't get hung up, but when overlaying ubuntu-desktop or kubuntu-desktop or xubuntu desktop it does!

Lesson: Always start trouble-shooting the recovery mode issue!

This event was two network hardware failures. I got distracted thinking it was a video issue because of the different behavior of server boot and server with gui overlay boot.


Chrome two finger scroll then right clicks

I had the same issue only in Chrome too.
You can solve this problem by using 50-synaptics.conf config file :

wget http://hgdev.co/wp-content/uploads/50-synaptics.conf
sudo mkdir /etc/X11/xorg.conf.d
sudo cp 50-synaptics.conf /etc/X11/xorg.conf.d/

You can also manually edit this config file to better fits your preferences. The Arch Wiki page on Synatics trackpad will be helpful for this.


Ubuntu 14.04, a lot of problems with `JACK` and `qjackctl`

Your user needs to be in the audio group.

sudo usermod -a -G audio $USER

Log out and back in for the change to take effect.


Google+ integration for the new Friends App

Currently there exists no native OAuth-authenticated API GET.

https://code.google.com/p/google-plus-platform/issues/detail?id=96&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary%20Component

It makes it hard to implement.

Good question though ;)


unable to upgrade from 12.10 to newer ver.

Short answer, you can't do that much of a jump in releases.
Backup what you need and do a fresh install, it's a lot easier.


Are there any note-taking applications that allows for typing and drawing on a touch screen?

you could try using image editing software such as gimp or krita. krita has a touchscreen version as well. It is called krita sketch
https://krita.org/item/krita-on-the-go-krita-sketch/


Ubuntu 12.10 : wireless not working after update

Here's what you want to do:

Boot into Windows - that's the only OS you have with internet access - and open your browser. Use it to download the following file: http://mirror.pnl.gov/ubuntu//pool/restricted/b/bcmwl/bcmwl-kernel-source_5.100.82.112+bdcom-0ubuntu3_amd64.deb (or see any of the mirrors here).
Reboot into Ubuntu and Move the downloaded .deb file into you home directory. Double-click it to install.
Reboot, and connect to the internet. Install the drivers properly using the Additional Drivers tab in the Software Sources program.

The package file installs the kernel module (that is, the device driver) into the kernel, so that the core system can recognize and use the device. What I think happened is that when you updated your kernel (the kernel-related packages, by default, are linux-image-generic, linux-headers-generic, linux-headers-X.X.X-YY, linux-headers-X.X.X-YY-generic, linux-image-X.X.X-YY-generic, and linux-image-extra-X.X.X-YY-generic), the driver was not carried over into the new kernel. The kernel uses a program called "dkms" (stands for Dynamic Kernel Module Support) to ensure that all the appropriate kernel modules, which include device drivers such as for your wireless card, are built for each new kernel. If a kernel module, particularly one that comes from somewhere other than the kernel itself, is not "registered" with dkms, it will not be carried over and built into the new kernel, and the device it is responsible for will fail. For your wireless card, a kernel module was built externally and was not originally part of your kernel, and it wasn't registered with dkms. Step 3 will ensure that it is.

There's a very handy document here (if you haven't seen it already) that has a lot of helpful details about Broadcom chips and Linux.


It's not advisable, but you can undercut apt and go directly to dpkg.

For example, taking postfix and postfix-dev:

$ sudo apt-get purge postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done.
The following packages will be REMOVED:
  postfix* postfix-dev*
0 upgraded, 0 newly installed, 2 to remove and 99 not upgraded.
After this operation, 4449 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Now we use dpkg to purge postfix without removing dependents:

$ sudo dpkg --purge --force-depends postfix
dpkg: postfix: dependency problems, but removing anyway as you requested:
 postfix-dev depends on postfix (>= 3.1.0-0).
 postfix-dev depends on postfix (<< 3.1.0.0-0).
 postfix-dev depends on postfix (>= 3.1.0-0).
 postfix-dev depends on postfix (<< 3.1.0.0-0).

(Reading database ... 293223 files and directories currently installed.)
Removing postfix (3.1.0-3) ...
Purging configuration files for postfix (3.1.0-3) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for man-db (2.7.5-1) ...

And now re-install postfix:

$ sudo apt-get install postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin dovecot-common postfix-cdb postfix-doc
The following NEW packages will be installed:
  postfix
0 upgraded, 1 newly installed, 0 to remove and 99 not upgraded.
Need to get 0 B/1152 kB of archives.
After this operation, 3697 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package postfix.
(Reading database ... 293035 files and directories currently installed.)
Preparing to unpack .../postfix_3.1.0-3_amd64.deb ...
Unpacking postfix (3.1.0-3) ...
...


Automatic suspend - "Computer will suspend very soon because of inactivity" - how can I disable this?

The solution is to disable automatic suspend:

Open GNOME Control Center, go to Power tab (or simply gnome-control-center power)
In Suspend & Power Button set Automatic suspend, to Off when Plugged In.

This will change settings from

$ dconf dump / | grep -i "suspend\|sleep"
sleep-inactive-ac-timeout=900
sleep-inactive-ac-type='suspend' # <
sleep-inactive-battery-timeout=900

$ gsettings list-recursively | grep -i "suspend\|sleep"
org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
org.gnome.settings-daemon.plugins.power button-power 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 900
org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' # <
org.gnome.settings-daemon.plugins.power button-suspend 'suspend'
org.gnome.settings-daemon.plugins.power button-sleep 'hibernate'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'

to

$ dconf dump / | grep -i "suspend\|sleep"
sleep-inactive-ac-timeout=900
sleep-inactive-ac-type='nothing' # <
sleep-inactive-battery-timeout=900

$ gsettings list-recursively | grep -i "suspend\|sleep"
org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
org.gnome.settings-daemon.plugins.power button-power 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 900
org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing' # <
org.gnome.settings-daemon.plugins.power button-suspend 'suspend'
org.gnome.settings-daemon.plugins.power button-sleep 'hibernate'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'


If you are using recent versions of Matlab, go for this:
Home -> preferences -> Keyboard -> shortcuts

In shortcuts, click on the shortcut you want to change. Then it will be displayed under: 'Shortcuts for '
Click on it once and then press the shortcut combination you want. Then click on apply. Make sure there is no conflict in which care it will show a red cross. In such a case, you will need to change the conflicting shortcut first.


unable to listen sound in my Ubuntu system

TRY THIS:

 sudo apt-get install libmp3lame0
 sudo apt-get install ubuntu-restricted-extras

Also you can try

 alsamixer

and disable auto mute


How to make a link to a .desktop [Desktop Entry] file

As a security policy you can't "execute" .desktop files from nautilus unless they have +x (execute permission).
Because you have created a symbolick link you must set the +x on the original desktop file, open a terminal and execute:

sudo chmod a+x /usr/share/applications/compiz.desktop

Please note that the +x maybe lost if the compiz package get's updated, it's probably a better idea to copy the .desktop file and set the +x on your copy.


window 8 installation with already using dual boot window 7 and ubuntu

hurry....!! i successfully install 3 OS in my laptop.
We require 3 different partitions and EasyBCD software that is free available. Lets try:-

(1) install your PRIMARY OS like windows XP,7,8 with and also install EasyBCD for
smart boot loading.

(2) Now in another partiton install ubuntu with dual booting concept and use "ext4"  partition

(3) use EasyBCD to set the booting options between 2 os.

(4) now in another partitions that is NTFS install windows 8 and " after successfully installation , in search open 'msconfig' file , there is a boot option , make the window 7 as a primary and default option and restart the pc.

now 3 OS are available for selection and work upon it.
enjoy.......


Update Ubuntu 11.10 without internet connection

One guide to installing this particular application is at http://ubuntuforums.org/showthread.php?t=1941773

Take a look at the aptoncd or apt-zip packages for easier package management of offline systems.

At a minimum, you'll need the libssl-dev and make packages, plus their trees of dependencies. So try an 'apt-get --simulate install libssl-dev make' to get the list of packages you need to download from http://packages.ubuntu.com and install.

The specific answer to your "How do I upgrade offline" question has two parts, and you need both parts together for a successful upgrade. First, the Alternate CD image has upgrade packages for the default install. Second, keep that list of other packages handy, and download the latest versions of them all into an apt-zip or apt-on-cd repo. When you upgrade, the system needs both sets of packages handy.


Software to convert MP3 to MIDI and MP3 to KAROKE

To convert from Mp3 to Midi you can use AmazingMidi on Wine.

Or by using Audacity.

To Convert MP3 to Karaoke Audio, you can use MP3 Karaoke 6.0.1.


Importing PKCS#12 (.p12) files into Firefox From the Command Line

Thanks for the reply, As it happens over the last 24hr i have tracked down why this was not working.

I tested the same c ommand on Suse, Debian 6 and fedora, and it worked fine on all of them which i found a bit strange, however once i updated Ubuntu 10.04 it worked. so i checked what the last updated had supplied, and it seems the recent OpenSSL update has resolved this issue.

To confirm this, once back in the office i installed the same open SSL update, and it all worked fine.

As a final check i tried this on a fresh Ubuntu 10.04.1 install, it failes, run updates it works..

to be very specific. the pk12 command

pk12util -d /home/df001/.mozilla/firefox/qe5y5lht.tc.default/ -i client.p12

works


What's the easiest way to remove the "total " line from the output of ls -l?

Looking in the source code of coreutils, I found out that total will always be displayed when using the -l option on directories.

Using the -d option to list entries instead of directory contents hides total. But if you run that without arguments (or on a directory), it'll just show the directory and not its contents. Therefore, you need wildcards. * matches all files and .* matches hidden files as well (which corresponds with the -a option):

ls -ld * .*

As for the -h option, it works for me. 1118360 bytes show up as 1.1M. Files smaller than 1024 show up in bytes.


Is there a program for analyzing NTP server statistics?

Not a precise answer to your question, but I see you mention you now use a gnuplot script that analyses /var/log/ntp/loopstats. I do the same, and below is the one I use myself.

If anyone is doing something better, I'd be curious too.

#! /usr/bin/gnuplot
# Remember to check you have these lines in /etc/ntp.conf and that ntpd is actually running:
#    statsdir /var/log/ntpstats/
#    statistics loopstats peerstats clockstats
#    filegen loopstats file loopstats type day enable
#    filegen peerstats file peerstats type day enable
#    filegen clockstats file clockstats type day enable

# Resolution: fullscreen
set term x11 size `xrandr | awk '/\*/{sub(/x/,",");print $1; exit}'`
set grid
set bars 0.4
set y2tics
set y2range [0:]
set ytics nomirror
set xdata time
set timefmt "%s"
set format x "%T"
set title "NTP statistics"
set ylabel "Clock offset / Roundtrip delay (ms)"
set y2label "Frequency offset (seconds per day)"
set xlabel "Time of day"
local_time = `date +%s --utc -d "12:00:00 $(date +%z)"`
utc_time   = `date +%s --utc -d "12:00:00"`
localdifferencefromUTC = utc_time - local_time
timeoffsettoday = `date +%s --utc -d "today 0:00"` + localdifferencefromUTC
plot \
  "/var/log/ntpstats/loopstats" u ($2+timeoffsettoday):($3*1000):($5*1000/2) t "Clock offset" w errorlines lt 1 lw 2 pt 187, \
  "/var/log/ntpstats/peerstats" u ($2+timeoffsettoday):($6*1000):($8*1000/2) t "Roundtrip delay" w errorbars lt 26 pt 26,\
  "/var/log/ntpstats/loopstats" u ($2+timeoffsettoday):($4*0.0864):($6*0.0864/2) axes x1y2 t "Frequency offset" w errorline lt 7 pt 65,\
  0 w l lt -1
pause mouse close


How to force PS1 to evaluate so I can use terminal title as a status bar?

I got the behavior I wanted like this:

Use gnome-terminal to create a window with the "Running" title
Keep the window open after execution by calling exec bash
Put the call to "set-title Complete" in a file called ~/.statusrc which I passed to the new bash.

gnome-terminal --maximize --title="Running" -- /usr/bin/bash -c \
". /home/user/.bashrc; doStuff.sh; exec bash --rcfile /home/user/.statusrc"

The ~/.statusrc file looked like this:

#!/usr/bin/bash

. ~/.bashrc
termtitle "Complete"


Dropbox gone from indicator area after upgrade to 11.04

have you checked if it's actually running? possibly you run a non-current release of dropbox, and just the indicator has vanished. dropbox only recently added indicator-applet compatibility, which is needed for natty.

upgrade dropbox by running

dropbox stop
rm -r ~/.dropbox-dist
dropbox start -i

edit: not that bug after all, thx jorge. Seems to be fixed with a new dropbox version, though:
http://forums.dropbox.com/topic.php?id=37361&replies=20#post-315358


How can I use Ubuntu to rescue files from an NTFS drive?

If it is a linux partition (ext4)

Go into a LiveCD or LiveUSB, then run sudo fsck -t ext4 /dev/sda# (where sda# is the device and partition number for your drive).  If you're unsure which to run this on, please feel free to include in your question the output of sudo fdisk -l, and I can help narrow down which one to check.

If it is a Windows or NTFS partition

If the drive is "NTFS" and its returning unclean, you should boot into Windows and run a chkdisk on that partition.  Within Linux, if you run an fsck on NTFS, its likely to break something (NTFS is a windows format, so you should use windows chkdisk).  The NTFS fsck, while it may find the general errors, may cause problems if you need to run the NTFS drive within Windows.


I ran into the same error while trying to install a package in 17.10, but it won't work for 17.10.

The only way to resolve this would be to run the snap package on Ubuntu
16.04 and then you'll be able to definitely run it.

Also, don't run it on a 16.04 live CD either. You'll be needing a system or a Virtual Machine with 16.04 installed on it.


How to Change Monitor Resfresh Rate (Radeon Fury X) in Ubuntu 15.10?

Okay so I just want to apologize for wasting anyones time (my own included).

Here's what I did to change the refresh rates on all my monitors:

Open AMD Catalyst Control Center with superuser permissions sudo amdcccle
In Display Manager, go to the "Display Properties" tab and change your refresh rate there.


Is there a pdf-reader which can find letter ä in a document?

As probably you are using KDE, I would suggest qpdfview which is build on Qt libs. (Evince require more GTK libs)

qpdfview

sudo apt-get install qpdfview

Evince

sudo apt-get install evince

Acroread

If you can't get it in software center, Check https://get.adobe.com/uk/reader/otherversions/ . Download .deb package.

Okular I didn't check Okular 1st, after I tried it, it does work! So what's wrong?


Can I install gnome 3.12 on ubuntu 12.04?

No you cannot install. It can be installed only on Ubuntu 14.04+.

Currently even on 14.04, its not recommended. It breaks Unity. Hence I recommend installing Ubuntu Gnome 14.04 to use gnome 3.12


How to get the crash log file for Lightworks?

Well different applications have different logging systems. There's no one central log that contains all the output from all the programs that run on your system.So basically it depends on the application.

The crash reports are generally stored in /var/crash/.But not all programs crash reports need not be present,it depends on whether the application wishes to store it.

For lightwork, according to their website the Lightwork log files, called lightwork.log and lightwork.log.1; you will find these files in the following location: Linux: \home\your_user_name .


Downgrade from the PPA

:~$ apt-cache show ppa-purge

  Description: disables a PPA and reverts to official packages

  This program disables a PPA from your Software Sources and reverts
  your system back to the official Ubuntu packages. You can use this to
  return your system to normal after testing a new version from a PPA.

  Homepage: https://launchpad.net/ppa-purge

It is available from the lucid-backports: http://packages.ubuntu.com/search?keywords=ppa-purge&searchon=names&suite=all&section=all

More:

http://bigbrovar.aoizora.org/index.php/2010/01/10/how-to-safely-remove-ppa-repository-from-ubuntu/
What's the name of PPA? (for ppa-purge)
How do I remove all packages from a certain repository?


I don't think Bash will autocomplete in general inside quotes. If you leave the quotes out it will autocomplete filenames in the current directory:

$ java -cp l<TAB>
library.jar  library-extensions.jar
$ java -cp library.jar:l<TAB>
library.jar  library-extensions.jar


What should be done with laptop freezing on boot iff monitor is attached - Dell laptop with Lubuntu 20

This is a tough diagnosis problem. Some more info would help, as listed below.
In the meantime, and as listed in the sources below for related (although not exactly the same) problem, you could try these alternatives, perhaps in combination:

Reduce the timeout for booting to 1.
Set Recovery Mode as the default boot option.
Avoid the splash boot loader, using GRUB_CMDLINE_LINUX_DEFAULT="".
See How do I disable the boot splash screen, and only show kernel and boot text instead?
Use nomodeset in the boot option in Grub.
You could set it permanent for a while with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset".
See also How do I set 'nomodeset' after I've already installed Ubuntu?
Force booting from a LiveCD by setting the boot order and/or disabling the HD.
This will give you a system where you can perform tests.
Force booting from an external HD by setting the boot order and/or disabling the internal HD.
This will give you a system where you can perform tests.
YMMV depending on what you have in the external HD.
Try determining if you have the correct graphic drivers.
This is an unlikely source of error, as the problem is with Grub...

Sources:

Boot freeze when using second monitor (Xubuntu 16.04)?
My computer boots to a black screen, what options do I have to fix it?
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1559308
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1872159
https://ubuntu-mate.community/t/system-freezes-when-connecting-to-external-monitor/5825
https://www.reddit.com/r/linuxhardware/comments/hc0pzn/lenovo_p53_grub_hangs_with_usbcdisplayport_cable/
https://itsfoss.com/fix-ubuntu-freezing/
https://larryreznick.com/2019/05/07/forcing-an-external-monitor/

Useful additional info:

What do you mean by "bootlooping"? Your description looks more like a boot freeze.
Monitor brand, model, resolution.
PC model and OS of your old Lenovo that was working fine with your monitor.

Did it have Grub?

Are you willing you install Grub on that old PC as a means of testing?
Connector you were using with the Lenovo.
Do monitor&Dell have another connection that may be tried?
Do you have another monitor or TV that you can try with your Dell?


How do programs choose which icon to use

If you look in /usr/share/applications/, you'll find a lot of files that end in .desktop. These .desktop files associate icons with applications.

In terminal, if you cat /usr/share/applications/shotwell.desktop you'll find a line that says Icon=. You can change this to the full pathname of another icon of your choice. However, software updates may replace this file and remove any edits that you make.

A better way is to copy a given .desktop file to ~/.local/share/applications and edit the Icon= line there.

The Icon= is only for the main application icon. For internal icons, you'll have to look for a simplescreenrecorder folder in /usr/share/icons or /usr/share/pixmaps.


This kind of information is slightly dependent on the specific Linux distribution.

Following a couple of commands that may help...

ls /dev/input/by-id/*mouse && echo "yes" || echo "no"

cat /proc/bus/input/devices | grep -E 'Name|Handler'

cat /proc/bus/input/devices | awk -v RS="" '/TouchPad/ {print "laptop";last}'

xinput --list

sudo dmidecode --string chassis-type
--> this last one will return something like "Laptop", "Notebook" "Portable", "Sub Notebook", "Main Server Chassis", ...
(cat /sys/class/dmi/id/chassis_type to avoid sudo)


Your problem is due to the new NSS backend in nut, which was added in 2.7.1 (Changes from 2.6.5 to 2.7.1).  The client tries first to contact tcp/3943 with a STARTTLS command and gets ERR FEATURE-NOT-CONFIGURED from upsd, so it shows that warning.

The rationale for this change is that you are transmitting passwords in plaintext over the wire and the developers added SSL certificate support to prevent that.  The client is being noisy, after all.

The error message is actually from the client, but you cannot exclude it with a grep because it's coming from the error output (stderr).

The easiest way of solving your problem is to pipe it properly:

upsc ups@neutron.local 2>&1 | grep -v '^Init SSL'

or if you're just using some part of the output for e.g. an RRD graph and you were getting garbage in your cron output, just add the 2>&1 and it will be a normal line:

upsc ups@neutron.local 2>&1 | grep 'battery.charge:' | awk ...

The not-so-easy way of fixing this is to actually configure SSL certificates and the rest of the stuff, like described in 9. Notes on securing NUT | Configuring SSL | NSS backend usage.


ATI Driver issue, fglrxinfo returning null display error, Xorg.conf file looks funky

This is how I got it to work on my Intel/AMD hybrid setup:

Update X.org to latest version by adding the following PPA:

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update && sudo apt-get dist-upgrade

Symbollically Link lib & lib64 to avoid lib64 error:

sudo ln -s /usr/lib/ /usr/lib64/

Install ATI Driver Manually DO NOT build deb packages:

sudo sh ./amd-driver-installer-12-1-x86.x86_64.run

Update X.org:

sudo aticonfig --initial --nobackup

After that, reboot your computer.


If your songs are all labelled exactly in the format you have suggested: Acris & Infra - Justice.mp3 a simple for loop can accomplish both tagging and renaming sequentially with one command.

Test the following on a small, backed up selection of your files:

for f in *.mp3; do
   artist="$(printf "$f" | cut -d '-' -f 1 | sed 's/ *$//')"
   eyeD3 --artist "$artist" "$f"
   mv -nv "$f" "$(printf "$f" | cut -d'-' -f 2 | sed 's/^ *//')"
done

Two points:

The mv command has the safeguard of the -n or --no-clobber option in case any of your collection have 2 different artists / files with the same song title...
You will need to install eyeD3 to do the tagging or simply change the syntax to use whichever tagger you are most happy with


UDEV Rule for external mouse detection to turn Touchpad On and Off

I want to add an edit for people desperate with the ALPS touchpad which is recognized in ubuntu 16.04 as a mouse and not as touchpad.

It's enough to modify the script as follows:

#!/bin/sh
#
# Enables the touchpad if and only if there aren't any external mice connected.
#
# Originally from:
#     https://wiki.archlinux.org/index.php/Touchpad_Synaptics#System_with_multiple_X_sessions

# This supports also ALPS touchpads.

#Here puts how is named (Run 'xinput list' for the name to put below)
TOUCHPAD="ALP..."
FOUND=0

for MOUSE in `find /sys/class/input -name mouse\*`
do
    if [ "`cat $MOUSE/device/name`" != "$TOUCHPAD" ]
    then
        FOUND=1
  #Find a Mouse device other than the TouchPad and record the variable.
        break
    fi
done

DISPLAY=:0
export DISPLAY
for USER in `w -h | cut -d\  -f1 | sort | uniq`
do
    XAUTHORITY=`sudo -Hiu $USER env | grep ^HOME= | cut -d= -f2`/.Xauthority
    export XAUTHORITY
    TOUCHPADDEVICE=$(($(xinput list | grep -i "$TOUCHPAD" | cut -d= -f2 | cut -d[ -f1)+0))
#Find the Touchpad Id
    if [ $FOUND -eq 1 ]; then
#If another device is founded, disable touchpad
        xinput disable $TOUCHPADDEVICE
    else
#else enable touchpad
        xinput enable $TOUCHPADDEVICE
    fi
done


I've installed the coherence plugin as well, and at first I had the exact same behaviour as yours. After a little while, my library had shown up (I use a NAS with Twonky installed).

The one thing that comes to my mind, after enabling media sharing in Windows 7, is that you also have to disable "password protect sharing" in the "sharing" configuration pane for DLNA devices to be able to access Windows Media Player library.


How can I loop sleep/hibernate/reboot/cold boot for testing in Ubuntu?

One idea: write some code in /etc/rc.local that keeps a counter in a file and, as long as the counter hasn't reached 500, calls reboot.
You'll want to be careful about the location of the file - it needs to survive the reboot, so don't put it in /tmp.
It may also be a smart idea to only call reboot if the counter file exists so you can break out of the reboot loop by booting a live Linux and removing the counter file.


Just had the same problem.

I have no clue where it comes from but a reboot solved it for me.

I then made my system more robust by changing the logrotate defaults in /etc/logrotate.conf and /etc/logrotate.d/* from fixed times to size-dependent.

This way I have a longer history on slow log files and a better prevention against disk overflow from logs gone wild.


Logkeys keylogger not working on Ubuntu box in Vagrant; appears to not see keyboard events

Answering my question for posterity, in case anyone ever does something similar, which is highly unlikely!

In my tests, I had only been connecting to the box with vagrant ssh, and was typing in my original terminal window.  I changed my Vagrant file to include a gui, with config.vm.provider "virtualbox" { |v| v.gui = true }, and vagrant launched a CLI window with the guest.  The typing in that terminal worked, and the debug was output to the original terminal.

Unfortunately I don't have time to investigate exactly why the keystrokes on the host box weren't showing up in the guest ... probably something obvious I'm missing.  If anyone has a good idea, please post as I'm interested.


Ubuntu 13.10 on Thinkpad slows down dramatically when power adapter is plugged in

After a long story which began with the same analysis as you told - power cable plug in => slow down the system - I found a solution and another better reproducible situation which works for me.

After waking up the system from suspend to ram the system is remarkable slow. I checked after a tip of a colleague the cpu frequency and the set governor. But the governor was set to performance (watch -s 1 'cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor') and all cpu seems to run with full MHz. (watch -n 1 'cat /proc/cpuinfo | grep MHz'). It seems that this information is not really reliable. After setting the governor to e.g. ondemand and than back to performance the system runs again as expected: fast!

For me the suspend to ram thing is a reproducible situation where the system slows down. But I think there are maybe also some other situations like the power cable  - sometimes. And I had also a situation where the governor was automatically set to ondemand if I put some load to the cpu. Only a restart of the system stopped this behaviour.

For setting the governor i used this as a source: http://wiki.ubuntuusers.de/Prozessortaktung (German only) the tool for unity e.g. is indicator-cpufreq sudo apt-get install indicator-cpufreq relogin or start it afterwards with indicator-cpufreq.

Bugs which might be interesting in this context:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1188647
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1233479


Install ndiswrapper

sudo install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9

Install the WiFi driver (from Windows):

sudo ndiswrapper -i yourdriver.inf

Check the driver is working:

sudo ndiswrapper -l

Load the module:

sudo depmod -a

sudo modprobe ndiswrapper

Configure modprobe so that it loads ndiswrapper:

sudo ndiswrapper -m

Edit the modules to add ndiswrapper at the end:

sudo gedit /etc/modules

Remember to add ndiswrapper at the end.

Hope you now have your WiFi up and working!


I know this question was asked 11 months ago, but I thought I would answer anyways. From what I can find you can use bumblebee.
First, enable the Universe and Multiverse repositories, if you haven't already done this you need to go to Software and Updates and make sure these repositories are enabled. (https://help.ubuntu.com/community/Repositories/Ubuntu)
Now install bumblebee, bumblebee-nvidia, primus and linux-headers-generic with this command: sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic. Don't forget to reboot after this step.
After this you can run any program you want with the Nvidia card by using optirun, for example optirun firefox.

Sources / more information: https://wiki.ubuntu.com/Bumblebee
To run games on Steam with your Nvidia graphics card: https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437&l=


Having generated a webapp with the generator, how do I test my click on the device?

The method I use for testing clicks is:-

Make the device accessible over adb using System Settings → About this phone → Developer Mode → Switch on.
Attach the device via a USB cable
Use adb to push the click package to the device

adb push /path/to/your.click /tmp

Use adb to install the click package

adb shell pkcon install-local --allow-untrusted /tmp/your.click

Pull down in the app scope to see the icon for your application appear


ubuntu 10.04 DHCP server upgraded and now severe problems

The configuration sounds like it's been set up manually. The default DHCP settings will auto-allocate IP addresses to new MAC addresses ad store that lease for a period of time.

The settings, by they way, aren't in a .txt file. They're at /etc/dhcp3/dhcpd.conf and you can edit them from the console with nano like so:

sudo nano /etc/dhcp3/dhcpd.conf

You should be able to edit that without the graphical session. I don't know why there's even a desktop installed. Most Ubuntu servers work headlessly (without a monitor or desktop). It's certainly unneccessary for a DHCP server.

Nothing you've described suggests corruption. It all points to you not having a clue what you're doing yet you're still making systemic changes. I don't understand how you could think this would end in anything but pain... Now you're in a position where a server and all its clients are down. And you're also getting close to the end of the lifespan of 10.04. The desktop support (ie Firefox and all the other graphical applications) have already expired. You shouldn't be using them. You need to upgrade the entire OS.

In short, everything's broken and you don't know how to fix any of it... It sounds to me like you desperately need to engage the services of a new support company. Or employ somebody with Ubuntu server experience (not that hard these days).


Use system environment variable for snort.conf HOME_NET setting

I would do it slightly differently. Assuming the command that gives you the IP range is

echo ipvar HOME_NET "$(/sbin/ip route | awk '/eth0/ && ++i==2 { print $1 }')"

You could write a little wrapper script that launches snort:

#!/usr/bin/env bash

echo ipvar HOME_NET "$(/sbin/ip route | awk '/eth0/ && ++i==2 { print $1 }')" > ~/HOME_NET.conf
snort

If you save that file as snort.sh, make it executable (chmod a+x snort.sh) and run it, it will update the ~/HOME_NET.conf file with the right IP range before launching snort so everything should work as you expect it to.


Are there any standard icons for qml-app-development?

The official Ubuntu Touch icon theme is called Ubuntu Mobile, and is available for installation in the ubuntu-mobile-icons package. Here is a sample of the icons provided:

To use the icons in your code, just use the path to the icon. For example, to set the icon in a toolbar button, do something similar to this:

ToolbarButton {
    text: i18n.tr("Refresh")
    iconSource: Qt.resolvedUrl("/usr/share/icons/ubuntu-mobile/actions/scalable/reload.svg")
}

To avoid having to repeat the root path over and over again, I usually use a small function called getIcon which returns the actual path to an icon:

function getIcon(name) {
    return Qt.resolvedUrl("/usr/share/icons/ubuntu-mobile/actions/scalable/" + name + ".svg")
}

The previous example would then be:

ToolbarButton {
    text: i18n.tr("Refresh")
    iconSource: getIcon("reload")
}


Black 'X' instead of cursor, no tool bar nor full windows

I do not know why this happened, but it seems that you get logged into a minimal session. One frequent cause of this or similar problems that I encountered (though normally with an error message) is that your ran out of disk space. In this case, the solution would be to delete some stuff and re-login or reboot. In Terminal, you can check free space with df -h and then look for the percentage for the root file system /

You said that nothing changed, but did the system maybe do updates in the background and those were interrupted? Was there any error message on startup or login?


Bad voice recording quality in Ubuntu 18.04

If you happen to be in LiveMode (with ReadOnly Overlay), check

/etc/speechd.conf

comment out Line 267 #Include "clients/*.conf"
activate Line 271 DisableAutoSpawn

SpeechDispatcher may create multiple InputDevice Instances from Templates (blocking the Buffer and disturbing the Realtime Pulseaudio).

Additionally check in System settings -> Sound -> Applications and remove (usually 3) Instances.


Before you panic, try the magic SysRq trick. Find the key on your keyboard labelled PRT SCRN|SYSRQ(Could be arranged differently). Hold that key, ALT and M. This invokes the Linux oom_kill which could aid in recovering. Also, try this with B instead of M and see it it reboots then. If it does, then you are either out of memory(If you have a swap partition, your disk may be active), or you have another software issue. If not, it is hardware. Try pressing CTRL+ALT+F1 during the freeze. Does that work? If so, you can use top after logging in to ascertain the process causing the issue.

Try running vmstat 1 in the Teminal. In a comment, tell us your swapin and swapout values.

Also ,try running top, giving us the top %CPU values, then pressing SHIFT+O, then Q or T, then ENTER. and the RSS and SHR values of the top processes. This can help pinpoint the cause. Also, are you using Skype, by any chance? There is a reported memory leak in it.


It looks like a Greasemonkey script.  You can install it from here:

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/

Once the extension is installed, clicking on the "Install UserScript" link on the Clean Up site should prompt you to install it.


Recover files from ruined Xubuntu using Windows

The default installation of Ubuntu uses the ext4 filesystem, which Windows can't read without installing third party drivers (see also the other answer of The Thunder Chimp). Personally I think you are much better off making a second liveUSB with Xubuntu to recover your files and then do the reinstall.


Try Planner - it fulfills your requirements. It is part of the Gnome applications set, and it is available in official Ubuntu repositories.


First try this:

Type in terminal sudo add-apt-repository ppa:pmcenery/ppa
Then run sudo apt-get update.
Then run sudo apt-get install libimobiledevice.

If it says Package not found:

Type in terminal sudo gedit /etc/apt/sources.list.d/pmcenery.list
It will open Gedit, a text editor. Replace these two lines...

deb http://ppa.launchpad.net/pmcenery/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/pmcenery/ppa/ubuntu oneiric main

...with these two lines:

deb http://ppa.launchpad.net/pmcenery/ppa/ubuntu maverick main
deb-src http://ppa.launchpad.net/pmcenery/ppa/ubuntu maverick main

Save the file.
Then again in terminal, run sudo apt-get update.
Then run sudo apt-get install libimobiledevice.


Unable to boot to windows 8 after installing Ubuntu 16.04

The already installed OS, Windows 8, for some unknown reason wasn't detected when you installed Ubuntu.

Considering Grub is already installed and works (Ubuntu boots), running the Grub updater should now find the other OS. In terminal:

sudo update-grub

Grub should find Windows 8 now and add it to the boot menu. Reboot and try booting Windows.


external displays not appearing in gnome settings

xrandr --output eDP  --auto --output HDMI-A-0 --primary --left-of eDP

where eDp and HDMI are my monitor names derived from
xrandr

you can make a Ubuntu shortcut key for this command, or a script.


Input method icon invisible in Radiance theme

Install Unity Tweak Tool, go to Icons tab and change icon theme from ubuntu-mono-dark to ubuntu-mono-light or the other way round. To install ubuntu tweak tool, open a terminal and type the following:

sudo apt-get install unity-tweak-tool


SSH jump + Lock User account on remote machine, but allow user to use sudo?

You could either implement SSH Agent Forwarding. Or if you are using a jumphost for SSH Access, then, its best for you to use iptables or ufw on the other servers to ONLY allow SSH access to the specific IP (which is the jumphost ip address).

IPTABLES SETUP:

iptables -I INPUT -p tcp -s YourIP --dport 22 -j ACCEPT

Installation of UFW:

sudo apt-get install ufw
sudo ufw enable
sudo ufw allow from 15.15.15.51 to any port 22 ---- Change 15.15.15.51 to the jumphost IP Address

Also, on the other servers, edit the sshd config and prohibit root login to better implement security.
Some server shells doesn't automatically ask for password. So you might as well install "ask-pass" so users can use their password.

One last thing, to easily manage users on this setup, make sure to create a group and include it on the sudoers (without password) then restart SSH. This grouping should be implement on those "other servers" and not on the jumphost server


IPTABLES - Forwarding 80 to 8080 to vagrant's apache

in command sudo ssh -gL 80:127.0.0.1:8080 localhost

option -g - Allows remote hosts to connect to local forwarded ports
option -L - [bind_address:]port:host:hostport
             Specifies that the given port on the local (client) host is to be
             forwarded to the given host and port on the remote side.  This
             works by allocating a socket to listen to port on the local side,
             optionally bound to the specified bind_address.  Whenever a
             connection is made to this port, the connection is forwarded over
             the secure channel, and a connection is made to host port
             hostport from the remote machine.  Port forwardings can also be
             specified in the configuration file.

traffic from port 80 redirected to port 8080 on localhost


How do I install wallpapers from older releases?

You can install the wallpapers of the 13.10 by running this command in a terminal:

sudo apt-get install ubuntu-wallpapers-saucy

or using Software Center

For other older Ubuntu versions, replace saucy with

raring for 13.04
quantal for 12.10
precise for 12.04
oneiric for 11.10
natty for 11.04,
maverick for 10.10,
lucid for 10.04,
karmic for 9.10,

Wallpapers for Ubuntu version 6.10, 7.04 and 7.10 also available. To Install edgy wallpapers use this command:

sudo apt-get install edgy-wallpapers

for feisty (1.04) and gutsy (7.10) replace edgy-wallpapers with feisty-wallpapers and gutsy-wallpapers respectively.

For convenience for users looking to download ALL the wallpapers:

sudo apt-get install ubuntu-wallpapers-* edgy-wallpapers feisty-wallpapers gutsy-wallpapers

Where can I find all the wallpapers ever included?


Scrambled video when using dash in Unity 14.04.3

After selecting the NVIDIA binary driver - version 340.76 from nvidia-340 (proprietary, tested) for my GPU, I restarted my box and the problem went away.

I surmise that after a kernel version minor update (perhaps requiring a restart, but I did not see that recommendation), the dash shell's gui's old dependencies were somehow not met when using the X.Org X server Nouveau Display Driver. That however strikes me as odd and it may not have anything to do with one driver or another.


Terminal read from file and then save to file

One possible explanation to what you are seeing is that the command generates output only to stderr and no output to stdout.

You have done something like this:

mysql [...] >> log.txt

which means that you are redirecting stdout to the log.txt file. However, any output to stderr will still appear directly in your terminal, it will not go to the log.txt file. Usually, error messages are output to stderr so if there are some error messages resulting from your mysql command then it is likely that those will be output to stderr rather than stdout.

You could try this instead:

mysql [...] >> log.txt 2>> err_log.txt

(just add "2>> err_log.txt" to the end of your command line)

that means that you are now requesting stdout to be redirected to the log.txt file, as before, but now you are also redirecting stderr to the err_log.txt file.

More about this here: https://stackoverflow.com/questions/7526971/how-to-redirect-both-stdout-and-stderr-to-a-file

Also here: https://stackoverflow.com/questions/876239/how-can-i-redirect-and-append-both-stdout-and-stderr-to-a-file-with-bash


Ctrl-k = e

You can use it in "insert" mode.

Proof: