Window Placement on Unity doesn't open programs on workspaces 3 and 4, how can I fix it?

So i fixed the problem... To place/open programs on workspace 3 and 4 you also need to change the Y Viewport Positions. For opening programs on workspace 1 and 2 you only need to set the X Viewport position and leave Y viewport on 1. To open programs on workspace 3 change X Viewport Position to 1 and Y Viewport Position to 2. To open a program on workspace 4 change X Viewport Position to 2 and change Y Viewport Position to 2.

Workspace 1: X Viewport Position 1 - Y Viewport Position 1

Workspace 2: X Viewport Position 2 - Y Viewport Position 1

Workspace 3: X Viewport Position 1 - Y Viewport Position 2

Workspace 4: X Viewport Position 2 - Y Viewport Position 2


Why can one misbehaving program hang the whole system?

Depending on the resources consumed by your script this could very well be a "normal" behaviour. You can try to renice the process(es) to a lower priority and if the IO is at fault see ionice.


Mouse movement affects HDMI screen output

This isn't a full answer, but it may give a clue.  The laptop is my wife's; she had, somehow, sitting behind her browser session, multiple iterations of the calculator app. loaded.  No idea how; she swears (and I believe her) that she hasn't even used the calculator this morning (is it possible to accidentally launch it with a keystroke combination?), and she's pretty computer-literate.
Anyway, I closed the calculator (lost count of the times I had to do it, because you generally don't start counting when you click to close a program), rebooted, problem gone away.  OK, yes, should have rebooted as the first resort, but my initial instinct was to work out what was wrong in case it happened again.
There you go; thanks for reading, hope it doesn't happen to you.
Cheers


School wanting to use ubuntu 20.04 on all student laptops and need to know if any special licensing is needed?

From https://ubuntu.com/desktop

Ubuntu has always been free to download, use and share. We believe in the power of open source software; Ubuntu could not exist without its worldwide community of voluntary developers.

From https://ubuntu.com/licensing:

All of the application software installed by default is free software. In addition, we install some hardware drivers that are available only in binary format, but such packages are clearly marked in the restricted component.

Anybody, including you and your organization, can freely install Ubuntu as much as you like without purchasing any licenses, ever.

In this case, "free software" is a specific term, meaning that you can download and modify the software source code without asking anybody's permission, and you can redistribute the software to others without asking anybody's permission.

An enterprise-wide roll-out of Ubuntu may look different from a roll-out of chromebooks or Windows laptops: Hardware incompatibility, Admin access, and enterprise infrastructure can be quite different from a Windows or Chrome environment. Test, test, test because students and other users will find your weak spots!


I'd let go of the GUI first.

Open a terminal, e.g. by pressing CRTL+ALT+T and then run

sudo apt update && sudo apt upgrade


Suspend & Hibernate not working on a Toshiba Satellite L300

Open your Terminal.
Run sudo modprobe toshiba_acpi.

Did that fix the problem?  If so, you can:

Open your Terminal, if it's not already open from before.
Run sudo nano /etc/modules.
Add toshiba_acpi to the end of the file.
Save and exit.  This loads the toshiba_acpi module on boot.

You can, alternatively, add the following to the end of the file /etc/rc.local (creating the file if it does not already exist):

modprobe toshiba_acpi
exit 0


Is there any app for lubuntu which has ability to remotely turn on the PC and use it and then tun it off also

Wake-on-LAN (WOL) is an Ethernet computer networking standard that allows a shut-down computer to be turned on remotely. Most recent motherboards that have an integrated Ethernet controller that supports this feature. You can enable the Wake-on-LAN feature in the Power Management section of the motherboard’s BIOS. There are two ways of how Wake-on-LAN can work. The first one is you want to turn on a computer on the same local area network and the second one is you want to turn on a computer in another location through the internet.
This is how Wake-on-LAN works; the target computer is shut down with enough power reserved for the network card to function. The network card listens for a specific packet called the “Magic Packet”. The listening computer receives this packet, checks it for the correct information, and then boots if the Magic Packet is valid. A magic packet is data consisting of “FF FF FF FF FF FF” followed by 16 repetitions of the listening network device’s MAC address.

Setting Up Wake-on-LAN
In order to use WoL it must be supported and enabled as necessary in the BIOS, NIC and other network hardware (routers, switches etc). You may also need to configure some software if things don't work out-of-the-box.
Enabling WoL in the BIOS
This section may differ depending on whether or not you have a NIC integrated into your motherboard.
Using an Integrated NIC
To enable WoL in the BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.
Using a Non-Integrated NIC
If your NIC is not integrated into your motherboard, you will still have to configure your BIOS to allow devices to wake up your computer. Boot your computer and enter the BIOS settings menu. In one of the sub-menus there will hopefully be the option to allow USB and/or PCI devices to wake-up the computer. Enable the setting that is appropriate for your NIC. Save your settings and reboot.
PCI NICs sometimes require a cable connection to the power supply in order to stay awake when the computer is off/asleep. Check your manual to see if yours does and install if necessary
Enabling WoL in the NIC
First, determine which NIC will be used, and then check whether it supports the Magic Packet™ using
sudo ethtool <NIC>

where  is the device name of your NIC, e.g. eth0. This command will output some information about your the capabilities of your NIC. If this output contains a line similar to the following:
Supports Wake-on: <letters>

where  contains the letter g, the NIC should support the WoL Magic Packet™ method (for the other letters look at man ethtool).
Enabling WoL in the NIC
To check whether WoL is enabled in the NIC, one could use
sudo ethtool <NIC>

and look for
Wake-on: <letters>

If  contains g and not d, then Magic Packet™ is enabled. However, if  does contain d, WoL needs to be enabled by running the following command:
sudo ethtool -s <NIC> wol g

On most systems, issuing this command is required after each boot. If the system's networking is configured via ifupdown, then it is easy to add the line up ethtool -s  wol g below the interface's configuration stanza in /etc/network/interfaces. For example:
shahar@shahar-backup:~$ cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface

auto lo iface lo inet loopback
# The primary network interface

auto eth0 iface eth0 inet static
        address 10.0.0.1
        netmask 255.255.255.0
        gateway 10.0.0.138
        up ethtool -s eth0 wol g

This will ensure that WoL is enabled in the NIC on each boot. Fore more information see the interfaces manual.
Sources blog from raymond.cc & Ubuntu help

Tools to help set this up, configure and/or use:

etherwake (command line)
wakeonlan (command line)
powernap (command line)
gwakeonlan (gui)

gWakeOnLan
Installation: sudo apt-get install gwakeonlan or click this button

Images from ubuntugeek and that site also has a summary:
Requirements to allow gWakeOnLan to turn on a machine all these requirements must be met.
Each machine to turn on must:

have an integrated (or PCI/PCIE) Ethernet network card.
have the network cable plugged all the time.
have the power cable plugged all the time.
support the Wake On LAN with the Magic Packet.
have the Wake On LAN enabled in the BIOS.
have the Wake On LAN by Magic Packet enabled in the Operating System.
be powered off from the Operating System.

If one or more of these requirements is not met all the time, the Wake On LAN will not work.


Thunderbird opens HTTPS links in Chromium, instead of default browser

Launch Thunderbird.

Click on the menu button.

Click on Preferences.

Again click on Preferences.

Then goto the Advanced tab.

Click on Config Editor.

Pass through the Warranty by clicking "I'll be careful, I promise!".

Then search for "network.protocol-handler.warn-external.http". And change the value to true by double-clicking both the entry.

Then, search for "network.protocol-handler.warn-external.ftp". And change the value to true by double-clicking both the entry.

Now, you will be able to launch your default browser on clicking on any link.
Hope this helps!


Configure GSM connection using shell (nmcli)

Without having tried it myself, but the instructions on http://fedoraproject.org/wiki/Networking/CLI seem useful.

The link mentions that
nmcli connection edit con-name <name of new connection> asks you relevant questions in order to set your connection up.

This answer is a bit contradictory in that it mentions smth like nmcli dev gsm con "Mobile" to create a connection.

This link mentions adding the following lines to /etc/NetworkManager/system-connections and using nmcli con up id <connection id> to activate the connection:

[connection]
id=MTNL
uuid=15d742f1-2b5a-421e-9f27-fcb1fc26d72c
type=gsm
autoconnect=true

[ipv4]
method=auto

[gsm]
number=*99#
username=mtnl
password=mtnl123
apn=gprsppsmum

[serial]
baud=115200


Diff between 2 ways changing useradd defaults

There is no effective difference.  There are many ways of setting  configuration.  They both edit the SHELL variable in the /etc/default/useradd file.

Check the man page with:

$ man useradd

Then look for the -s argument.

One might be more convenient or easier to remember than the other for some users.  Since you have already tested both, you can decide for yourself which is easier for you to remember or use.


Which Ubuntu version works best for my system (see below)?

So the best version of Ubuntu will be the latest version for 32 bit systems, in this case, Ubuntu 16.04 LTS. Canonical dropped support 32 bit in new releases (scr: https://itsfoss.com/ubuntu-drops-32-bit-desktop/ )

You can download it from here:
http://releases.ubuntu.com/16.04/

Click on:
ubuntu-16.04.5-desktop-i386.iso          2018-07-31 01:14  1.5G  Desktop image for 32-bit PC (i386) computers  (standard download)


Ubuntu 16.04.3-server desktop: black screen after upgrade

It seems that upgrading the kernel can invoke this bug, which means that for now I can't upgrade the kernel from 4.10.0 to 4.13.0.

I've found an error saying that Failed to load module "fbdev" in the log of Xorg

Here is what I've done to solve this issue:

apt update
apt-mark hold linux-generic-hwe-16.04
apt-mark hold linux-headers-generic-hwe-16.04
apt-mark hold linux-image-generic-hwe-16.04
apt dist-upgrade
apt install ubuntu-desktop
apt install xserver-xorg-core-hwe-16.04 xserver-xorg-video-fbdev-hwe-16.04 && reboot

I don't know why but somehow apt install ubuntu-desktop doesn't install xserver-hwe packages automatically, whereas ubuntu16.04 on X86 do it automatically.

Maybe it's because I didn't upgrade the kernel?


Kernel source downloaded accidentally, and I want to delete it

As you can see with command man apt-get:

Note that source packages are not installed and tracked in the dpkg
database like binary packages; they are simply downloaded to the
current directory, like source tarballs.

There is no other way to remove sources than by hand.


You need to (re)install GRUB to the RAID device instead of the block device. This is documented in the Ubuntu Documentation though the documentation is a little old and can be confusing. The errors you encounters are correct because the filesystem is installed on the RAID device not the block device[*].

RAID (actually FakeRAID) devices are named /dev/mapper/[something] instead of /dev/sd[X]. First you will need to find the RAID device for your windows partition with ls /dev/mapper/. This will list all of the active devices.  Since you presumably only have one, it should be easy to find. If the device is not listed, the dmraid man page will explain how to activate your RAID device.  This is usually done with sudo dmraid -ay as root.

Once you know the device name, you can (re)install GRUB with sudo grub-install /dev/mapper/[something]. GRUB setup should detect Windows, and Ubuntu. Reboot to test.

[*]This is not technically correct as the underlying filesystem is actually installed on the block device. In modern versions of Ubuntu is is masked by the raid device to mimic the way the device is mounted in windows.  If this were RAID 1 instead of RAID 0 you could disable RAID in the BIOS and you would see two drives with identical filesystems on them. Since this is RAID 0 the filesystem is split between the two.


Ubuntu doesn't detect wifi-reset network scripts

To set up a simple wifi hotpsot for an Android phone use ap-hotspot as detailed here.  It works for me ;-)

Basically, install it:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot

Use ppa's at your own risk
Start it with:

sudo ap-hotspot start

You can also stop it:

sudo ap-hotspot stop

and configure it:

sudo ap-hotspot configure

Android does not seem to support the hotspot created in Ubuntu - <rant>even though I have never had this trouble with another operating system</rant>

Ubuntu 14.04 apparently needs a special fix as well (bear in mind it does not have the security fixes in the newer versions).

  For Ubuntu 14.04:

  also the hostapd version in Ubuntu 14.04 is buggy and doesn't
  work properly. To get AP-Hotspot to work with hostapd in Ubuntu 14.04,
  you need to downgrade hostapd and use apt to hold the package so it's
  not upgraded (thanks to spupuz for the tip!). To do this, use the
  following commands:

  64bit:

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

  32bit:

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd


Here's a quick walkthrough (if you are not familiar with vi, use nano or gedit)
I make the assumption that you want to login to a gnome fallback session for a better speed of rendering
Open a terminal
Install the FreeNX PPA
sudo add-apt-repository -y ppa:freenx-team/ppa

Since there is only a version for Precise you need to cheat
sudo sed -i s/quantal/precise/g /etc/apt/sources.list.d/freenx-team-ppa-quantal.list
sudo apt-get update
sudo apt-get install freenx-server gnome-session-fallback

Once installed, a bit of configuration:
sudo vi /etc/nxserver/node.conf

search for
#COMMAND_START_GNOME='gnome-session --session gnome-fallback'

and remove the # at the beginning
and while you are at it to prevent having no fonts displayed (bug in libcairo 1.12)
search for
#AGENT_EXTRA_OPTIONS_X="-nolisten tcp"

and replace by
AGENT_EXTRA_OPTIONS_X="-norender -nolisten tcp"

That should do the trick, if you select Unix-Gnome for the session it should log you in to the Gnome fallback session.


How to automatically answer interactive cli program (not script) with bash script?

With parted, you can just add the -s option:

parted -a optimal -s /dev/sda mklabel msdos

From the Trusty man page for parted:

[...]
       -s, --script
              never prompts for user intervention
[...]


Guake background no more transparent in 14.04

Transparency effects require desktop composition to be enabled to work.  Install compizconfig settings manager sudo apt-get install compizconfig-settings-manager and then open it, go "Accessibility" and I think "Opacity" is the correct option to enable this, however I'm at work and not able to verify this at the moment.


how to upgrade my Debian package with minor changes

First cd to the directory where your deb file is:

cd ~/lab

Then extract your deb file there:

dpkg-deb --raw-extract my.deb .

It will create some directories like:

DEBIAN  etc  usr

Apply your minor update whatever it's a new file removal or etc to the specific files you want.

Then recreate the package simply with:

dpkg-deb -b new.deb


Adding new usernames in capital:

By default capitals are not allowed in usernames.

You can use --force-badname to create a username in capital.(or you have to reconfigure NAME_REGEX in /etc/adduser.conf)
sudo adduser <username> --force-badname
i.e
sudo adduser JOHN --force-badname

Renaming your username in capital:

To rename your username in capital,first you have to edit /etc/adduser.conf and add the following line NAME_REGEX=[A-Z,a-z,0-9] to the end of the file.

And now you can rename your username with capital letter.

Also if you want to add a new user now,you dont want to use --force-badname,because we have added a new expression in adduser.conf.

And so you can simply add a new username with capital letter as,
sudo adduser <USERNAME> i.e sudo adduser JOHN

NOTE:

However i wouldn't suggest using capitals in a case sensitive OS.
Use it in your own risk.


Fail to Create New Directory/File on automounted Windows drive

I have ntfs drive and one can't be found from /etc/fstab (think you have typo, there is no ftab). Attleast one thing what point's out is "ntfs-3g", that is ntfs filesystem driver not filesystem itself.

And from /etc/mtab it's line is following:
/dev/sdb2 /media/ntfsHD vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush 0 0

edit: think this is not configuration ubuntu has created itself, is it? Usual mountpoin is /media/


One way to do this is sed. See How to print particular line number by using sed command, for example:

sed -n '3,5 p' < infile.txt > outfile.txt

By default, sed prints all lines it encounters, so we suppress that with the -n switch and then select the lines 3 to 5 for printing.

There are numerous other ways (e.g. awk) and I'm pretty sure there will be more answers soon to reflect that.


Getting 'permission denied error' with Wget

I believe you need root permissions to write to /var/www. So you should use sudo in front of your command i.e

sudo wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz


What are the must-have apps to customize Ubuntu Look and Feel?

Ubuntu Tweak is bound to help you a bit. It makes basic tweaking REALLY easy.


Hi & Welcome to AskUbuntu,

Looking at your current version (which is 11.10), you cannot easily upgrade your system to the latest 14.04 directly at once. Refer to Upgrade Notes listed under Ubuntu wiki which explains everything about the process.

  Well, before you do anything relating to update/upgrade, make sure
  you've backed-up important stuffs & your update manager core is
  up-to-date.

If you're trying to achieve this using the internet, then you will need to upgrade to 12.04 (LTS) release & then upgrade it to the latest 14.04 (LTS) release.
If you want to achieve this with a latest iSO downloades, then simply back-up your necessary DATA(s) and then do a fresh installwhich would indeed save more time. It saves you from arising issues that you will have to face after upgrading since its from an older version to the latest version.

So to summarize, your best bet over the internet is from 11.10 -> 12.04 (LTS) -> 14.04 (LTS) or to simply download a fresh copy of 14.04 (LTS) & get it installed. There are plenty of Q & A's discussing similar issues. Though the question are older and explains about older version, I'd still suggest you to go through "Can I skip over releases when upgrading?" & "How do I upgrade to a newer version of Ubuntu?" for more understanding on upgrading.

LTS stands for Long-Term Support. The term itself explains you the stability of the system. And Ubuntu will keep on releasing necessary patches, updates frequently to make the system more stable that you don't need to worry about.

Hope it helps!


You can use kpartx to be able to use embeded partition in files. For example:

sudo kpartx -a ubuntu-15.04.iso

Will give you additional devices under /dev/mapper like /dev/mapper/loop0p1, ... that you can mount.

This might not be needed in your case as to grow your partition, I suggest (do backup):

dd if=/dev/zero bs=1M count=500 >> yourfile.ext4

to append some zero at the end of your unmounted file. And then proceed to grow the ext4 fs with

resize2fs yourfile.ext4


Ubuntu 16.04 takes too much time to boot (Error - lvmetad is not active yet)

I have a similar problem. I see a message similar to this (A, B, X & Y are numbers) after upgrading my xubuntu to 16.04:

lvmetad is not active yet; using direct activation during sysinit
/dev/mapper/lubuntu--vg-root: clean, X/Y files, A/B blocks

I have kernel: 4.4.0.31 and two logical volumes - swap and root - which was unchanged from 14.04 LTS.
Unlike others with the problem, boot-up to login seems OK. Of interest is the fact that my "systemd-analyze blame" has the same two lines as above indicating that lvm starts after fsck:

3.244s lvm2-monitor.service
3.191s systemd-tmpfiles-setup-dev.service

I propose that fsck generates the warning because it is trying to check the disks before lvm has started automatically.
None of: boot.log, kern.log, syslog or dmesg seem to contain anything helpful.
I have been searching for solutions and have found people with problem graphics drivers, raid systems, encrypted disks and unusual backup strategies; none of which apply.
Any help welcome.
Marv


What is manual installation of required libraries and applications?

Thank the entire Ubuntu community so much for the online help it really meant a lot. After some more searching I found a way to make it work for me in this post http://ubuntuforums.org/showthread.php?t=1059889 it turns out I only needed to rename my .MOD files to .MPG in order to burn to DVD using Brasero, and the disk created works in my regular DVD player.


Why does my cursor keep changing to a black cross and how do I revert it?

I have the same issue and can't find a solution for it.

Doesn't solve the black cross directly, but it makes a very quick system reset:

sudo service dbus restart


Installed Xubuntu desktop on Ubuntu 12.04 server and now can't connect via SSH

This probably not a ssh config problem if it is working on your local network.

Are you sure ssh is not filtered by a local firewall when you do the check from the outside ? You can try: telnet portquiz.positon.org 22 to test that.

What error do you get? ssh timeout? If it is a timeout this is probably a firewall issue.

You can also check /var/log/auth.log on your ssh server.

Test a telnet yourserverpublicip 22 from outside, and check the output of netstat -anp or tcpdump -ni any port 22

One more idea: some local NAT firewalls do not support NAT loopback so that the connection from outside on your public ip will work, but not from inside your NATed network.


In my experience with this issue, Flash Player is experiencing some kind of problem to handle several video sources (which may not be your case). In my computer I have several video sources, and somehow it seems that Flash Player can reach the TV Tuner but is having problems to acquire images from the USB devices.
In order to solve this problem I have tried two tricks that I share to you not as a solution for your issue but as an alternative. The usage of the FlashCam Project or the Webcam Studio. Both them will drop a virtual device into your Flash Player device's list which will be easy handled.
In this answer: https://askubuntu.com/questions/53495/flash-crashes-on-enabling-webcam/53615#53615 I have previously documented this situation and I hope you find it useful, pasted here for your convenience:

Based on my personal experience when using the Ultimate Edition
DistroPlayer, fully documented here:
http://forumubuntusoftware.info/viewtopic.php?f=66&t=4998&start=0 ,
and information that can be reached here:
https://bugs.adobe.com/jira/browse/FP-204, you can use The Flashcam
Project in order to gain access to your webcam via Flash Player.
I have tried this both in Firefox and Chromium/Google-Chrome and it
works like a charm but I continue experiencing some issues with the
stability of the Flash Player when it tries to gain access to my TV
Tuner instead of the Webcam itself.
Another temporal solution that I find useful is the usage of the
WebCam Studio for GNU/Linux, which will drop a bridge between
your physical webcam and a virtual webcam that can be seen and managed
by Flash Player.
However, you may experience some issues when using both these tools,
anyway it's worth than expecting Flash Player to do what it seems it
can't.
Give it a try, and please inform how do you manage this issue. I am
yet interested on having the experiences of other people in order to
fix my TVTuner/Webcam crashing issue.
Good luck!


How do I reset graphic drivers to installation default? (AMD Radeon HD 6400M)

Ok, Let me just say I was just looking for reviews on the 12.10 drivers before I install and I'm on Windows 8, so not sure if this will help:

I do remember if you go to your Ati Catalyst Control Center.. and this is how it is in windows but it's probably the same for Linux/Ubuntu -in the top right corner it says Preferences - Click on that button and then the fourth one down is - Restore Factory Defaults...
Your best bet is probably just go back to 12.04 when everything was fine- just reinstall the 12.04 one from the Ati website.


Yes of course.

  or is there any other way to do it.

You can also remove it from command line.

cd /etc/apt/sources.list.d
ls -l

will show them all. Remove the one you need to remove that has list in the name.


proxy disconfiguration after using privoxy

The proxy settings are stored in the http_proxy environment variable.

Check your startup configuration files like ~/.bashrc, /etc/bash.bashrc, /etc/profile, /etc/environment, etc. and look for a line like this, remove it, then log out and log back in again:

export http_proxy="http://host:port"

For a temporary solution, you can use this command from a terminal:

unset http_proxy


How to use Canon's CanoScan LiDE 90 scanner in Ubuntu?

The Canon LiDE 90 scanner works in Ubuntu 20.10 (groovy). Previous versions of Ubuntu did not have support for this scanner. With SANE being upgraded to version 1.0.31, you can use this scanner with GUI utilities like simple-scan.
However, my comment above (to run the Canon utility in a virtualized old Windows OS) still is my preferred method. With this method you are using the real software from Canon and thus you can fully utilize the potential of this scanner.
Ref: http://www.sane-project.org/sane-mfgs.html


How to remove rEFInd drivers completely from my ubuntu?

If you want to completely remove rEFInd, do the following:

sudo dpkg -P refind
sudo rm -rf /boot/efi/EFI/refind
sudo update-grub

Depending on how you installed rEFInd, the first of those commands may return an error. The second deletes the rEFInd files. The third causes GRUB to rebuild its boot menu, which should omit the rEFInd entries.

If you want to leave rEFInd installed but remove the unnecessary drivers, you can remove the ones you don't want individually via rm, then run sudo update-grub to rebuild the GRUB menu.


Need to copy large directory structure, re-mounting and re-trying in case of I/O error

First, why is it un-mounting itself? I've seen filesystems with errors get remounted as read-only before... is it a filesystem error, or does the hard drive actually power itself down or "reset"? Look in your logs and check (/var/log/syslog or dmesg should help).

If it's a filesystem error, then mounting it as read-only (mount -o ro ...) should keep it mounted, since you won't be writing anything to it. Fixing the filesystem errors  might fix it, with a fsck tool, or if it's NTFS it may need a windows chkdsk to fix some errors. Unless there are hardware errors....

If there are hardware errors causing it to be un-mounted, then it's possible your drive is failing, and repeatedly mounting it read-write (rw) could be making it worse, possibly overwriting the data you want to save. Then data recovery could be needed, like gddrescue (GNU ddrescue) to image what you can read from the drive, then work on the image, with testdisk tools.


OK, I seem to have solved the problem, though I'm still unsure exactly what was happening. It seems when I told Ubuntu to shut down, it wasn't shutting down completely. I noticed the power light would be flashing like it does when on standby, so I tried something different. I shut Ubuntu down from the terminal with sudo shutdown -h now, then unplugged the laptop and removed the battery. This removed all possibility of the computer being on in any way. When I plugged back in and started up, voila: manufacturer splash logo, GRUB, and I could choose Windows.

The laptop being on standby (mostly) explains why I couldn't access anything else, since it would resume straight to Ubuntu rather than doing a full startup sequence. However, it certainly doesn't make sense that Ubuntu would not shut down when I told it to the regular way, nor that I could avoid the Ubuntu login screen appearing by pressing keys similar to GRUB selections and BIOS menu triggers. Furthermore, I got the full Ubuntu login screen when I would try to start up, not the lock screen which I would expect if it were truly on standby. Furthermore, when I managed to get Windows started, it did not appear to have been in hibernation.

Does any of this make sense? No. Did I manage to get things working despite that? Yes. Does anyone have any idea why this is? Do let me know.


When upgrading to a new version of Ubuntu, it is necessary to install newer versions of most installed applications. A substantial fraction of packages will need replacing, because either:

The new Ubuntu release contains a newer version of the package, or
The package version is similar, but because libraries in the base system have been updated upon which it depends, it has been rebuilt to work with them

I'm afraid the answer is that using the short term releases (12.10, 13.04, 13.10) does require a relatively large amount of bandwidth to keep updated. If you don't want to update on a 6-monthly cycle (with associated bandwidth usage), the LTS version (12.04 and probably 14.04 when available) allows you to keep the base system for 5 years from release.


Permission denied when attempting to open ttyS# in GtkTerm

Add yourself to the dialout group. It has read/reite permission to that device:

sudo usermod -a -G dialout <user>

and restart the session.

(groups command shows your groups)


I solved this by changing a couple of lines in /etc/pulse/daemon.conf
First, open the file for editing:

sudo gedit /etc/pulse/daemon.conf

Then make sure the following line is uncommented and set to 6

default-sample-channels = 6

also uncomment and edit the following line to yes

enable-lfe-remixing = yes

This enabled 5.1 audio on my Intel soundcard in 12.04


Can't get to forward ports with Iptables

I was trying all this time to connect via eth3 and hadn't redirected traffic from it, only from eth0. A stupid mistake that took days to solve...


Set .desktop shortcut as default email application

You can set your gmail to open all email links in two ways:

Easy Way

If you sign in to your gmail account from google chrome, you should see an 'eye' icon that says that the site wants to install a service handler. Click on it and then allow and click done. Now, whenever you click an email, it will open in your gmail.

Hard way

Open your favorite text editor and add the following lines to it:

#!/bin/sh
firefox https://mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed ‘s/mailto://’

save it as open_gmail.sh (or whatever you like)

Type in terminal the following command by giving the exact path of open_gmail.sh file:

chmod u+x /path/to/open_gmail.sh

Now I assuge thunderbird is your default client. I will edit thunderbird.desktop file in this example. First just back-up that file by:

cp /usr/share/applications/thunderbird.desktop path/to/where/you/want_to_save

Now open thunderbird.desktop by:

sudo nano /usr/share/applications/thunderbird.desktop

and find the line that says Exec=thunderbird %u

and make it look like:

Exec=/path/to/open_gmail.sh %u

Save and exit.

Run sudo update-desktop-database

Now whenever you click an email address, it will open in gmail in firefox. If you are not signed-in to gmail, it will first ask you to sign-in.

If you want to revert this, replace the edited /usr/share/applications/thunderbird.desktop with the backup of the original usr/share/applications/thunderbird.desktop file.


Installing NVIDIA geforce 9 driver using the installer I got from their website

First put the downloaded NVIDIA driver in a folder which is easily accessible, for example on the Desktop.

Then switch to a virtual terminal using Ctrl + Alt + F1.

Enter your username and password to login.

Navigate to the folder which you've placed your driver in it, in this case it is Desktop:

cd ~/Desktop/

Now add the permission : execute to the installation file:

sudo chmod +x NVIDIAdriver*.run

replace NVIDIAdriver* with the actual name.

Now stop the X server as the error also mentions the same thing:

sudo service lightdm stop

Now you can go ahead and install the driver simply by typing this command:

sudo ./NVIDIAdriver*.run

Again replace NVIDIAdriver* with the drivers actual name.

Also, graphic cards don't support visualization yet, so you won't get any good performance with WMware.


Another alternative would be Shairplay:

https://github.com/juhovh/shairplay


Finally I found the answer, The cross compiler solves the problem, in case of error I edit the makefile and recompile it.

try
    rtwbuild(modelName);
catch
    % If it is linux try to compile using cross compiler
    % This required the cross compile to be installed
    disp('Compilation faild');
    if strcmp(computer, 'GLNXA64')
        disp('Trying to compile for linux using cross-compiler')
        cd([modelName '_ert_shrlib_rtw'])
        C_FILE  = 'wesys_control.mk';

        fid  = fopen(C_FILE,'r');
        f=fread(fid,'*char')';
        fclose(fid);

        % Replacing the stop time
        f = strrep(f,'CC = gcc','CC = i686-w64-mingw32-gcc');
        f = strrep(f,'LD = gcc','LD = i686-w64-mingw32-gcc');
        f = strrep(f,'CPP = g++','CPP = i686-w64-mingw32-g++');
        f = strrep(f,'CPP_LD = g++','CPP_LD = i686-w64-mingw32-g++');
        f = strrep(f,'AR = ar','AR = i686-w64-mingw32-ar');

        fid  = fopen(C_FILE,'w');
        fprintf(fid,'%s',f);
        fclose(fid);

        !make -f wesys_control.mk all
        cd ('..')
    end
end


Are you aware that cron's error messages / STDERR ends up in the system mail? If you haven't set it up, you can quickly check in /var/mail/your_username. It is called Unix Movemail in Thunderbird, but I believe there are other names for the same mechanism too.
Default shell used is sh not bash.
Are you aware that the environment for a cron job is entirely different from your interactive shell? To test this I created a cron job:

* * * * * /tmp/testscript.sh

The contents of /tmp/testscript.sh is:

#!/bin/bash
set

I received an email with the following content (notice a.o. things that PATH is very different, compare it with set from the commandline:

BASH=/bin/bash
BASHOPTS=cmdhist:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="/tmp/testscript.sh")
BASH_VERSINFO=([0]="4" [1]="2" [2]="24" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.2.24(1)-release'
DIRSTACK=()
EUID=1000
GROUPS=()
HOME=/home/my_username
HOSTNAME=diablo
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LOGNAME=jhendrix
MACHTYPE=x86_64-pc-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/bin:/bin
PPID=623
PS4='+ '
PWD=/home/my_username
SHELL=/bin/sh
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
TERM=dumb
UID=1000
_=/bin/bash


To see dot or hidden files, use

ls -Al

To see just this file, use

ls -Al .ebextensions

To remove it, use

rm -rf .ebextensions

Just take care with those "-rf" options, because they can delete everything without asking if you type them wrong.

Also, on your file browser, configure it to show hidden files and you can delete it graphically.


How do I boot HP Pavilion g6 to display GRUB2.00 rather than opening Windows8 by default?

I have succeeded in booting to GRUB2.00 with Ubuntu by first default option but with Win8 as an option.
I tried the 'Ubuntu Boot Assistant' as postulated in the question - but it did not work.
The solution is:

Open Ubuntu

Download and install a program called Boot-Repair

Run the 'Recommended Repair' option
Boot-Repair cannot be accessed from Ubuntu's Software Center :-(

For full instructions on how to download and install the software see here.  I used the Terminal option and it worked just fine.


How to install and run Windows XP / Vista in KVM headless server?

You've setup quite a challenge for yourself, I'll answer your questions point by point.

You have to use a technology that can forward that ISO image to the remote server. It could be as simple as using NFS or SMB to share a directory of ISOs or using iSCSI to forward a single ISO image.
KVM will let you use VNC to connect to the video anywhere. There's an up and coming protocol called SPICE  that should be more responsive and flexible than VNC though I haven't tried it yet.
Well, it's Windows. Even allowing the forwarding of the Video console using VNC, only one user can log in at a time. Unless it's a Windows Terminal Server you will not be able to have multiple users logged in to the best of my knowledge.


How to change my onboard keyboard theme in lightdm gtk+

Add "--theme=ThemeName" argument to onboard command in lightdm-gtk-greeter.conf:

[greeter]
keyboard=onboard --theme=HighContrast


Run "Additional Driver" from application menu and install the one "recommended" then reboot.It should work for you.If you still stuck, edit your post.


Missing .ko file during installation of a wifi driver, what should I do?

You probably first have to run make in the directory of the module. When make finishes without errors, you can do a sudo make install.


How to prevent running out of disk space?

Several Linux filesystems, including the most common one ext4, have a feature to deal with this exact problem: by default 5% of the space on the drive is reserved for the root user. This ensures the administrator can always log in to fix out-of-space problems.

TL/DR:

Enable the root account in Ubuntu
Configure the SSH daemon to allow root login
Login with the root account whenever lack of space is preventing normal login

A security note is in order: allowing root logins should be done with care. In particular, it's recommended to allow root login via certificates only, no password logins allowed. In any case, make sure when you define the root password to make it a strong one (it should rarely be needed interactively anyway, so go to town on the password length).


Here is an article about that automount http://techiech.blogspot.ch/2013/04/mounting-webdav-directory-in-linux.html. However I had a problem mounting it in that way, but when I commented the line secrets ~/.davfs2/secrets back everything went fine.

Install davfs2

sudo apt-get install davfs2
Reconfigure davfs2 to enable to use davfs under unprivileged users

sudo dpkg-reconfigure davfs2
Edit /etc/davfs2/davfs2.conf to enable automatic credentials use.

Uncomment the line secrets ~/.davfs2/secrets

Edit ~/.davfs2/secrets file to add credentials to remote WebDav diectory.

Add a line to the end of file in following style:

https://<WebDav URI>   <username> <password>
Set the permission:

chmod 600 ~/.davfs2/secrets

Add a line to /etc/fstab about the remote WebDav directory

https://<WebDav URI> <mount point> davfs user,noauto,file_mode=600,dir_mode=700 0 1
Add your user to the davfs2 group

sudo vi /etc/group

Add your username as follows:

davfs2:x:134:<username>

That's it. You can use following commands without being a root user to mount/umount

mount <mount point>

umount <mount point>

You can also use nautilus to mount/umount the directory.


Interacting with PostgreSQL on remote server through SSH tunnel?

Doh! My SSH tunnel was connecting fine. You need to have a client installed on the server that's establishing the remote connection in order to communicate with PostgreSQL.

In my case it was a one liner on my webserver:

sudo apt-get install postgresql-client-9.3


Use sudo to run a command with root privileges:

sudo apt-get install qemu

Reference:  UsingTheTerminal


Trying X11 forwarding over ssh (to run Openbox) from Ubuntu server 18 to Windows/Putty

OK, I've done more testing here, and I've found that apps like xclock that (apparently) are not tied to Openbox ARE opened in Windows.

I tried installing a couple other (non Openbox?) terminals; xterm & xvt.  These BOTH are displayed on Windows.  So X11 forwarding is DEF working.

I'm gonna close this topic, and open another one regarding Openbox specifically - displaying Openbox through ssh.


How to disable proxy in Ubuntu 16.04 LTS

Ok, I get it. "global" proxies are disabled by clicking the appropriate button in the network settings window, and google drive in nautilus (I wrote this question because of it) did not work because of the expiration of the network account in settings.


Splitting /home among multiple partitions

The beauty of a Linux file system is that you can mount any device, any place you please. For instance if you have large data sets, too large to be cached effectively by available ram you can choose a folder named whatever you want, wherever you want on the tree.

Some folders already in existence on the system are well suited for specific tasks.  I often mount big data drives on /srv for instance. To be compliant distributions include this folder but I have not seen it used much in the past decade other than for my own purposes.

As an example: Say your SSD drive is /dev/sda and you partition it such that you have ~100 GB primary partition /dev/sda1 on the SSD for / and you decide that the remaining ~400GB on the drive which you've partitioned as /dev/sda2 will be used for data storage and mounted at /srv your /etc/fstab file would look something like this:

# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=06a31723-1f61-4bae-ae5d-403cd35d0adc /               ext4    errors=remount-ro 0       1
# /home was on /dev/sdb1 during installation
UUID=a2a0bb88-9faf-4e83-91cc-f687e1b4525a /home           ext4    defaults        0       2
UUID=7a6cc92c-4c0d-42e2-baac-373287cf5b80 /srv      ext4    defaults    0   2
# swap was on /dev/sdc2 during installation
UUID=f0f7785c-25b5-4770-b2b3-fd618ebf58c7   swap    swap    defaults    0   0

The installer is very good at allowing you to specify specific partitions for default mount points, but you can also create your own, anywhere and mount them via /etc/fstab. It's entirely possible to have a different drives/partitions mounted at / , /SSD , /HDD , /bin , /opt , /home , /home/Documents , /srv/ /srv/data etc, etc, etc.

The only limiting factor on the number of drives is the space available to place them and the power available to run them. IF you had 50 bays and table space for 10 external drives you could mount them all, anywhere on the tree you would like. There are also methods that allow for making numerous drives appear as 1, but I won't go into that as it appears that you want more control over which device is being read from and written to than is allowed by such approaches.

EDIT: There's a decent write up on the `Nix directory structure here.

If anything about this answer is unclear, please drop me a comment and I'll do my best to elaborate.


Reduce launcher icon size on vertical panel

Thanks @user26687:

  KDE tracker bug: Bug 378443 - Plasma 5 start-button gets too big when
  the panel is vertical - bugs.kde.org/show_bug.cgi?id=378443. Fixed
  with the plasma 5.10 or later.

I'm update files:

https://cgit.kde.org/plasma-desktop.git/commit/?id=200d5a73cbdb76a1b0df29c5cf502fd88b922542

https://cgit.kde.org/plasma-desktop.git/commit/?id=e3869e559da25d2fecdfb5418a5af6079a1dc2b3

https://cgit.kde.org/plasma-desktop.git/commit/?id=b45cb75675c92924db4b38ebc55d9ab93d53fb1f

and my issue fixed on my 5.8.7 version (I'm update plasma):


You can either insert a literal newline in the string:
PS3='
Select a config file to edit with vi? '

or use printf with a C-style \n for the newline:
PS3="$(printf '\nSelect a config file to edit with vi? ')"

or using the bash shell's printf -v to write to the variable directly
printf -v PS3 '\n%s ' 'Select a config file to edit with vi?'


After doing some research online, I noticed that help pages for programs are generally located using URIs such as help:ubuntu-help/index. I compared this to the URI my program was calling ghelp:jekyll-helper and noticed that my program for some reason put a "g" in front of "help".

I tried running yelp help:jekyll-helper in the terminal and it brought up the correct help files for my program. Thus the help files were being packaged, they just weren't being called properly.

So I looked for all instances of "ghelp" in my program and found two. One in jekyll_helper_lib/PreferencesDialog.py and another in jekyll_helper_lib/Window.py. I changed the instances of "ghelp" in each to "help" and re-packaged the program with quickly package --verbose --extras (though I still got a few warning messages). I installed the new package and ran the program and the help pages were then working.

So it looks like the call to the help pages for some reason had a "g" character in the URI that was looked up, which was preventing it from finding the help pages, whose correct URI did not include a "g" at the beginning.


Calligra words: what syntax is used in ~/.kde/share/config/wordsrc?

KDE configuration files

Earlier AskUubntu: Configuration files in a KDE application

Now KDE Frameworks KConfig: https://api.kde.org/frameworks/kconfig/html/

Calligra 2.9.7

...calligra-2.9.7/libs/main/KoMainWindow.cpp line 444:

KConfigGroup cfg(KGlobal::config(), "MainWindow");
cfg.writeEntry("ko_geometry", saveGeometry().toBase64());
cfg.writeEntry("ko_windowstate", saveState().toBase64());

The Calligra is saving the window geometry and the window state (what widgets are open and where they are etc...) to the rc files as base 64: https://en.wikipedia.org/wiki/Base64 .

Deconding your ko_windowstate snippet - https://www.base64decode.org:


I personally use a GNOME extension called Dynamic Panel Transparency. In the extension settings you can change the top bar color and text color to whatever you'd like.


Can I still utilize the LTE band if I install Ubuntu on my Galaxy S7?

Since there's no port for the S7, you can't install Ubuntu Touch on it. See here for a list of supported devices. If you (or someone) created a port, the LTE band would be usable, both in the US and the rest of the world.

Since UBports is not porting to new devices until Halium is finished, you might have to wait a while for someone else porting to it but for what it's worth, here's the porting guide.


Jailkit is a set of utilities that can limit user accounts to a specific directory tree and to specific commands. Setting up a jail is much easier using the Jailkit utilities that doing so 'by hand'. A jail is a directory tree that you create within your file system; the user cannot see any directories or files that are outside the jail directory. The user is jailed in that directory and it subdirectories.
Download & Install:
http://olivier.sessink.nl/jailkit/index.html#download
VERSION=2.20 # from November 2018
cd /tmp
wget https://olivier.sessink.nl/jailkit/jailkit-$VERSION.tar.gz
tar -zxvf jailkit-$VERSION.tar.gz
cd jailkit-$VERSION/
./configure
make
su -
make install

Setting up the jail
Now it’s time to set up the jail directory. Jailed users will see this directory as the root directory of the server. I chose to use /home/jail:
mkdir /home/jail
chown root:root /home/jail

jk_init can be used to quickly create a jail with several files or directories needed for a specific task or profile, (click on it & read full detail ).
jk_init -v /home/jail basicshell
jk_init -v /home/jail netutils
jk_init -v /home/jail ssh
jk_init -v /home/jail jk_lsh

Add a user
Add a new user with a home directory and bash shell, and set the password:
useradd -d /home/jailtest -m jailtest -s /bin/bash
passwd jailtest

Now it’s time to jail this user
use the following command:
jk_jailuser -m -j /home/jail jailtest

Your /etc/passwd should contain something like this now:
jailtest:x:1001:1001::/home/jail/./home/jailtest:/usr/sbin/jk_chrootsh

Enable bash
By using jk_cp the bash libraries are copied to the jail:
jk_cp -v -f /home/jail /bin/bash

Edit /home/jail/etc/passwd
replace this line:
jailtest:x:1001:1001::test:/usr/sbin/jk_lsh

with this:
jailtest:x:1001:1001::/home/jailtest:/bin/bash

Maintenance
By using jk_update updates on the real system can be updated in the jail.
A dry-run will show what’s going on:
jk_update -j /home/jail -d

Without the -d argument the real update is performed. More maintenance operations can be found here.
(In case /home/jail/opt is missing, create it with mkdir -p /home/jail/opt/
And run jk_update -j /home/jail again)
Give access to other directories
You can mount special folders, that the jail user may acces now. E.g.:
mount --bind /media/$USER/Data/ /home/jail/home/jailtest/test/

Help Taken

http://olivier.sessink.nl/jailkit/howtos_chroot_shell.html
http://olivier.sessink.nl/jailkit/index.html#intro ( a very good help )
This one also
This is been checked & verified , Working Properly


Keepass2 failed installation during upgrade from 14.04 LTS to 16.04 LTS

That's a strange one, but I've seen similar errors before from package files that had their download corrupted by a sketchy wifi connection on my end.

First I'd do a complete removal of the failed install using

sudo apt-get purge keepass*

and clean out your local repository with

sudo apt-get clean

Then try downloading the .deb file again from http://archive.ubuntu.com/ubuntu/pool/universe/k/keepass2/ (we're up to version 2.34 now; if you haven't got it working yet maybe you'll have more luck with the newest version ;) and run it with Ubuntu's software manager.

If that doesn't work, run another purge and clean on keepass2, then try the .deb package download from debian.org by installing it as you normally would.

If that doesn't work, jtaylor's PPA might. Run another purge and clean, then run

sudo add-apt-repository ppa:jtaylor/keepass
sudo apt-get update
sudo apt-get install keepass2

and see how that works out.


How can I cache NFS shares on a local disk?

Stefan led me down the right track. This will work on any system 12.04 and newer.

Your filesystem will also need extended attribute support. If you're using EXT4 you're fine, if you're using EXT3 you'll need to ensure your filesystem is mounted with the user_xattr attribute.

Here's how I set it  up on the client machine, you don't need to do anything on the server side.

First, install the user space daemon:
sudo apt-get install cachefilesd
Then turn it on by editing /etc/default/cachefilesd and changing the run line to RUN=yes
Ensure your NFS mount in /etc/fstab has an fsc option. Don't forget to remount it after you've made the changes. Here's my excerpt (modify to your needs):

192.168.1.115:/home/jorge /home/jorge/Backup nfs fsc
Start the service: sudo /etc/init.d/cachefilesd start

Configuration of the cache is done in /etc/cachefilesd.conf, see the references for what the setting options are.

References:

Linux Magazine
/usr/share/doc/cachefilesd/howto.txt.gz
/usr/share/doc/cachefilesd/README.gz
How do I enable extended attributes on ext4?


Ubuntu One can't connect: "root mismatch"

Before proceeding: Make sure that you have a backup of your local Ubuntu One folders, if you have anything in there that you'd like to keep.

Run the following commands:

u1sdtool --quit
rm -rf ~/.local/share/ubuntuone/syncdaemon
u1sdtool --start
u1sdtool --connect

Information found here.


Google chrome color patches around transparent images.

solution:
in chrome://flags/ find Force color profile and set on sRGB


How to find a command not in man or info

When in doubt, I turn to the help screen of the application that I am trying to find.

~$ alert --help
Usage:
  notify-send [OPTION...] <SUMMARY> [BODY] - create a notification

Help Options:
  -?, --help                        Show help options

Application Options:
  -u, --urgency=LEVEL               Specifies the urgency level (low, normal, critical).
  -t, --expire-time=TIME            Specifies the timeout in milliseconds at which to expire the notification.
  -a, --app-name=APP_NAME           Specifies the app name for the icon
  -i, --icon=ICON[,ICON...]         Specifies an icon filename or stock icon to display.
  -c, --category=TYPE[,TYPE...]     Specifies the notification category.
  -h, --hint=TYPE:NAME:VALUE        Specifies basic extra data to pass. Valid types are int, double, string and byte.
  -v, --version                     Version of the package.

As the help screen shows, alert is actually notify-send, and if you run type alert you will see that it is aliased to notify-send as it is actually not a package installed separately.

~$ type alert
alert is aliased to `notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e 's/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//')"'

And if you type in alias by itself, it will show you all the aliases that are setup for you.

~$ alias
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'


Can't Start Ubuntu After Updating Video Card Drivers

Start in safe graphical mode:

To start Ubuntu into safe mode (Recovery Mode) hold down the left Shift key as the computer starts to boot. If holding the Shift key doesn't display the menu press the Esc key repeatedly to display the GRUB 2 menu.  From there you can choose the recovery option.

Reference: here


Where have the full package descriptions gone?

This sounds like you have something like

Acquire::Languages { "none"; };

somewhere in /etc/apt/apt.conf.d/

Replace it by

Acquire::Languages { "environment"; };

or

Acquire::Languages { "en"; };

You may need to run

apt-get update

to download to corresponding translation files (/var/lib/apt/lists/*Translation-*)


Is the compiled version of a binary dynamically linked to the system SSL library?

Yes that means it is dynamically linked. If the library were statically linked it would have been incorporated into the object code of the binary and ldd/objdump would not show the library name.


Run:

cd ~/Downloads
sudo sh -e ./crouton -f trusty_backup.tar.gz


Terminating com.ubuntu.ScreenResolution.Mechanism due to inactivity

That service came from the package screen-resolution-extra whose description says, it is "Extension for the GNOME screen resolution applet". I think, you can safely remove this package without losing much functionality. To remove, use this command in terminal

sudo apt-get --purge remove screen-resolution-extra

Then reboot and see if the problem fixed.


Maybe print the debug statement to standard error instead of standard output?

echo "$1" >&2


Absolutely. A USB key acts just like any HD. Most BIOSes these days can boot off them.

I ran my NAS off a USB stick for about a year to keep the power usage down. It's deathly slow however, you will frequently be twiddling your fingers waiting for it to write a file, and you can generally go and make a three course dinner while it does an apt-get dist-upgrade!

There is nothing special you need to do to make it retain settings, you write to it like any other normal filesystem once its installed.


Document viewer doesn't have add annotation enable for pdf

Look at the toolbar from left, then locate the rightmost icon.

Click the icon (pencil icon in your screenshot), then another toolbar will appear and will show two more icons for adding "text annotation" and "highlight annotation".

Evince Document Viewer has slightly different user interface, depending on which available package of Evince in use. The annotation icon is located either in the toolbar menu (newer version, above) or the sidebar menu (older version, below).

I have tested and confirmed the annotated PDF file that has been created in the newer version can be opened and seen similarly in the older version. However:

text that has been added to any highlight annotation will neither be viewable nor editable
older version of Evince allows to add and modify "text annotation", but can't remove it
the "highlight annotation" feature is unavailable for older version of Evince, which is 3.10.3-0ubuntu10 in Xubuntu Trusty (14.04)

Compare above screenshots and notice some differences.

TL;DR The annotation icon is already there. Similarly noted in this canonical answer.


Ubuntu One stop syncing after Software Center logging in with another identity

As a temporary work around you can simply delete the entries in seahorse for ubuntu one and ubuntu software center.  You should then be able to log back into both with the correct user and everything work again.


How do I get a Line6 UX1 soundcard to work?

Install dkms package. After that all your drivers will be rebuilt every time you update your kernel.


You need to upgrade your gnome shell to 3.12 or higher from 3.10 (!!!). Windows button extension does not support gnome shell 3.10. I however advise against upgrading to the 'experimental' desktops for beginners since it might create some glitches and bugs. If however you still want to upgrade do the following:

sudo apt-get update && sudo apt-get dist-upgrade
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update && sudo apt-get dist-upgrade

Source: http://www.omgubuntu.co.uk/2014/05/upgrade-gnome-3-12-ubuntu-14-04


How can I install a complete Arabic font?

The Language Support section in Ubuntu lets you change the interface language, in other words, the menus, panels and other elements. It has nothing to do with the way a web page is displayed.

I am no expert in Arabic, but usually, if a web page is not displayed correctly, what you need to change is its character encoding,
View -> Character Encoding in Firefox.

The source code of the page has the following:

charset=UTF-8

font-family: georgia, helvetica, times new roman, serif;


How can I become the owner of a file that origins from another pc / user?

Command line instructions:

  Use the chown command.

  Example:

  sudo chown user file

  Where user is the username on the second pc. This needs to be run from the second pc.

GUI instructions:

  Run Nautilus with sudo privileges

  Alt+F2
  Enter gksu nautilus.
  Enter your password.
  Now you can right-click on a file, go to the Permissions tab and select the new owner from the Owner combobox.


System hangs often after upgrading to 64bit Ubuntu 14.04 LTS

1.8gb memory is not suitable for 64bit systems. You should strongly consider increasing your memory or reverting back to a 32bit OS.

If neither one of them is not possible, you can try to enable Zswap on your system. My guess is, your system runs out of memory and starts writing on swap, at which point you face those slowdowns.


Getting the Wacom Intuos Comic to Work on Ubuntu?

input-wacom 0.30.0 was released today, and has support for your device. You should be able to download the driver at:

http://sourceforge.net/projects/linuxwacom/files/xf86-input-wacom/input-wacom/

and install it according to the instructions at:

http://linuxwacom.sourceforge.net/wiki/index.php/Input-wacom


Sorry, I clicked on the flash-aid icon and ran the wizard and it cleaned everything up and now Facebook Scrabble seems to be working fine.

Whew! Life without Scrabble simply isn't worth living.


Has anything been changed in GNU/Linux to create Ubuntu, or has stuff just been added on?

Strictly speaking, Linux is the kernel that is used by various distributions. GNU is an organisation that developed and popularised a widely used free software license and also provide a home for various pieces of free software.

So there is no standard GNU/Linux operating system (despite what it says on gnu.org). There is GNU kernel (Hurd) but that is nowhere near being a production level kernel, though it is packaged by Debian among others.

There are multiple distributions that package up the Linux kernel and lots of GNU software (and X software, GNOME or KDE software, etc) and produce an easy to install and maintain operating system. Ubuntu is one of those distributions.


Trouble transferring files to Ubuntu server from mac

I was running into a similar problem. To solve it I used sudo chmod 777 filename to give my shared directory read write access.

Here is a good link about checking permissions.

Even with the "Read-only?" radial button "No" selected In the Edit Exports page and "Volume access" set to "read/write" for my logical volumes I couldn't successfully drag a file into my shared folders until using sudo chmod 777 filename.


Ubuntu DNS server working, but getting errors in syslog

These error messages are related to dnssec. Remove or comment out all the lines in /etc/bind/named.conf.options that start with dnssec and restart bind9.

The best explanation for what's going on that I could find is here:

  When the validator receives a response from an unsigned zone that has
  a signed parent, it must confirm with the parent that the zone was
  intentionally left unsigned. It does this by verifying, via signed and
  validated NSEC/NSEC3 records, that the parent zone contains no DS
  records for the child.

  If the validator can prove that the zone is insecure, then the
  response is accepted. However, if it cannot, then it must assume an
  insecure response to be a forgery; it rejects the response and logs an
  error.

  The logged error reads "insecurity proof failed" and "got insecure
  response; parent indicates it should be secure". (Prior to BIND 9.7,
  the logged error was "not insecure". This referred to the zone, not
  the response.)


I believe you could edit the xorg.conf file like mentioned below.
I do not have an exact same configuration but have some experience with Nvidia and X Server settings. I don't know if you need to do both steps but perhaps you will need to.

After each change to xorg.conf file you can test the new settings with

  restart lightdm

without the need to reboot the computer.
Please make a backup copy of your current xorg.conf file in case something goes wrong and you need to revert to previous working settings.

You can try to edit these two lines "nvidiaXineramaInfoOrder" and "metamodes".

1.According to Nvidia the "nvidiaXineramaInfoOrder" lists/orders the attached devices according to certain rules. Perhaps you should set "DFP" as the first device instead of "CRT". You'll have to do this in a text editor.

2.The other thing is "metamodes". If you play with

  nvidia-settings

(as root user) and switch both screens in the X server Display Configuration. So once VGA is on the left and HDMI on the right and then the other way around (VGA on the right and HDMI on the left) and save the xorg.conf each time to see the difference. Assuming you have a horizontal configuration of course but it is the same if you have a vertical configuration. You should see a difference in the position parameter (your current says VGA-0:... +0+0, DVI-I-0... +1680+0). This way you can (manually) set the position of the screens.

In your case if you wanted to exchange VGA and HDMI you shoudl have something like this DVI-I-0... +0+0, VGA-0:... +xyz+0,) where xyz is the horizontal resolution of your screen on HDMI.

Hopefully this helps!


This may solve your problem. I had the same issue, as you described, with my system and I finally solved the issue.

Check your syslog under /var/log. If you find PCIe bus errors (you will probably see alot) add the "pci=nomsi" flag to the Linux kernel command line. Go here for instructions on how to do this.


Ubuntu 16.04 screenshot leaves artifact on monitor

Once you take a screenshot. U need to close the application. If you minimise it or leave it in the background it leaves the shaded box. I experienced the same thing.

Once you have taken the screenshot you get this application either copy to clipboard or save the screenshot and then close the application. Once you close the application the shaded area will disappear. The shaded area marks where you have taken the screenshot. If you have several of this application open than you will have several shaded areas so save the images and close them all and the shaded areas will disappear.


Funnily, recently I was having a similar problem after upgrading our mantis + gitlab server at work.

It has nothing to do with php, and in fact you can check that php is working by running php /var/www/html/info.php. This article says that wordpress is using apache, and apache by default does not recognize php files, i.e. it doesn't know it has to preprocess with php them before displaying. To fix this I was following this article with small modifications for current ubuntu.

I'll attach the steps at the bottom, but here's a little catch: given apache is not listed in installation requirements for Wordpress, it's possible that Wordpress is using some local version of apache instead of the system one. So you may need to make modifications to steps below, e.g. to find apache2.conf in the list of wordpress files.

Anyway the steps (that you may want to modify per previous paragraph):

Edit file /etc/apache2/apache2.conf with your favorite editor, and add at the bottom:

# enable executing php files
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

run sudo a2dismod mpm_event && sudo a2enmod mpm_prefork && sudo a2enmod php7.0 (replace php7.0 with whatever version you has)
Restart apache2 with sudo systemctl restart apache2 (or just reboot, because if wordpress is using local version of apache2, systemctl obviously won't work).


What are the steps to install Balena Etcher to the 16.04 Launcher toolbar?

AppImage

You should delete (if these files exist) following files:

rm $HOME/.local/share/appimagekit/no_desktopintegration
sudo rm /usr/share/appimagekit/no_desktopintegration
sudo /etc/appimagekit/no_desktopintegration

Then invoke your app again and allow Etcher creating the .desktop file
Otherwise you can follow Kulfy's comment. A very simple and fast method is to open the appimage and right click mouse on the icon in the dash and "add to favorites".

If you prefer to install the usual way via apt, use the following guide from the github page:

APT Install Etcher

Refer to the downloads page for the latest pre-made installers for all supported operating systems.

Debian and Ubuntu based Package Repository (GNU/Linux x86/x64)

Add Etcher debian repository:

echo "deb https://deb.etcher.io stable etcher" | sudo tee /etc/apt/sources.list.d/balena-etcher.list

Trust Bintray.com's GPG key:

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 379CE192D401AB61

Update and install:

sudo apt-get update
sudo apt-get install balena-etcher-electron

In case you want to uninstall app

sudo apt-get remove balena-etcher-electron
sudo rm /etc/apt/sources.list.d/balena-etcher.list
sudo apt-get update


You should try debian on your 512mb RAM machines, it does not use up that much RAM. Also using a lighter desktop environment like LXDE should also help. But seriously 512mb RAM is way too less for a current high end system and will never run "good" on this hardware (my personal opinion).


Get all applications that can open a specific file (using the command line)

You can use mimeopen command to list the applications which is capable of opening the file.

Example: Say If I have to open a tar file. I can use the command

mimeopen -d test.tar

The sample output will be something like this

$mimeopen -d test.tar
Please choose a default application for files of type application/x-tar

    1) Archive Manager  (file-roller)
    2) Archive Mounter  (mount-archive)
    3) Other...

use application #

When you choose the 3rd option, you will be asked to enter a command which is capable of opening a tar file.


How can I mount a SMB share exactly like Nautilus does it?

Nautilus uses the Gnome Virtual File System (gvfs) to mount devices. In a system that's already running a gvfsd daemon you can initiate a mount manually using the gvfs-mount command e.g.

gvfs-mount smb://ip.address.goes.here/sharename

which should cause a link to the share to appear in the Nautilus sidebar; the actual mountpoint should appear in the filesystem at /run/user/<UID>/gvfs (or $HOME/.gvfs on earlier versions).

I'm not sure that will be an option in a truly headless environment: I suggest you create a new question detailing your exact issues with the fstab method.


Is there any way to get a MySQL database from a /var backup?

InnoDB is a storage engine, just like MyISAM is.

The old method of copying files back still works with MyISAM databases, but InnoDB has some features (like adherence to ACID and finer locking controls) that come with the price of that no longer working.

This thread over on StackOverflow has some answers on how to restore an InnoDB database from files.


So I downloaded the script and it seems that all it does is insert its own repository URL into your sources list and then uses the apt-get package manager to install it.

To remove, it is really simple, just open up a terminal and type:

sudo apt-get remove heroku-toolbelt

Also, as a word of warning, try not to use scripts written by others to install applications. Some of them can contain extremely dangerous commands which could cause irreversible damage to your data. If you are unsure how to install an application, you can always search Ask Ubuntu for similar questions and answers.


Following this tutorial up to step 4 and reinstalling the nivida driver fixed my problem.


Completely uninstall related packages installed with a package

If you installed "stuff" via a package manager (apt-get, dpkg, synaptic), it's all logged in /var/log/apt/*. It's a simple matter of editing to generate the apt-get purge commands.

If you installed "stuff" some other way (sudo make install, /usr/bin/cpan, ...) you have to uninstall it using the same method.

To make your life easier in the future, especially if you use the second method, consider installing and using installwatch. From the man page:

trusty (1) installwatch.1.gz
Provided by: checkinstall_1.6.2-4ubuntu1_i386

NAME

       installwatch — Track installation of software

SYNOPSIS

       installwatch [options]  [command]

DESCRIPTION

       installwatch  is  a  program that is used in order to track the changes
       made  while  installing  local  software  (i.e.   "make  install").  It
       monitors  the requested command, and produces a log which indicates all
       created and modified files.


How to increase the number of hashing rounds for /etc/shadow?

The number of rounds can be set by modifying the file /etc/pam.d/common-password. The relevant line is the one containing the pam_unix.so module. Add rounds=<n> at the end of the line to use <n> rounds for subsequent password changes.

Verify the setting by adding a user, e.g., by doing adduser test1. After adding the user, the /etc/shadow file should contain a line starting with test1:$6$rounds=<n>$.... Don't forget to delete the test user afterwards (deluser test1).

If everything looks good, change the passwords for all relevant users to apply the increased number of rounds to their hashes.

More information on pam_unix parameters can be found in the man page (man pam_unix).


How to change recup_dir file permission?

Change the ownership of the folders:

sudo chown -R  $USER: recup_dir*

You will be asked to type your sudo password.

sudo: run a command as super user (root)
chown: change ownership
-R: for a folder and everything below that folder
$USER:: to current user and his primary group (note the :)
recup_dir*: all subfolders from current directory beginning with .recup_dir


The package sublime-text needs to be reinstalled, but I can't find an archive for it?

try these steps

Configure interrupted packages sudo dpkg --configure -a
fix broken dependencies sudo apt --fix-broken install
remove unneeded packages sudo apt-get clean && sudo apt-get autoclean && sudo apt-get autoremove
uninstall sublime-text sudo apt-get purge sublime-text

That should do it.


No image output after gnome-applet purge

Firefox should work fine without any flash player, just won't have some flash videos & ads & stuff. This sounds more like the flash player was crashing constantly.

And your repos or your net connection to them could have been temporarily down, (or they could have been old repos or mirrors that were removed) trying to fix those errors would have been the best thing to do.

dpkg -P means "remove these packages" (always see man [command] or info [command] before blindly running terminal commands). There is a gnome-applets I'm not running Unity or gnome (on xfce) but if I were to install gnome-applets it would also install these:

gir1.2-panelapplet-4.0 (3.8.0-1ubuntu12.2)
gnome-applets (3.5.92-0ubuntu3)
gnome-applets-data (3.5.92-0ubuntu3)
gnome-panel (3.8.0-1ubuntu12.2)
gnome-panel-data (3.8.0-1ubuntu12.2)

I don't know exactly what you removed, but if you removed gnome-panel it may not let you load a desktop, it sounds pretty important. I'd guess you want to re-install gnome-panel and gnome-applets.

If you can still boot to a terminal (try ctrl+alt+F1 (or with F2 through F6) to get to another terminal/console and install those (with apt-get install gnome-panel gnome-applets ). And after booting, ctrl+alt+F7 may show some info on how far the desktop did load, and ctrl+alt+F8 should get back to the desktop.

Also lsb_release -a should tell you what you're running.


Need a Firewall application similar to one that ships with Fedora

UFW - Uncomplicated Firewall

  The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled.

  Gufw is a GUI that is available as a frontend.

UFW is installed by default but inactve:

sudo ufw status
Status: inactive

Enable:

sudo ufw enable

Disable:

sudo ufw disable

Examples

sudo ufw allow /
sudo ufw allow 53
sudo ufw allow 53/tcp
sudo ufw allow 53/udp
sudo ufw deny /
sudo ufw deny 53
sudo ufw deny 53/tcp
sudo ufw deny 53/udp

More info in the 1st link.


You should use 0 */2 * * * istead of * */2 * * *.


PPA Shows Up Under "All Software" That Is No Longer Enabled

I'd check that it doesn't show up in your apt sources list in /etc/apt/, then run an apt-get update from a terminal and see if the problem persists.


Copying to two locations at the same time

The bottleneck is likely to be reading from the DVD drive, so we must ensure to either read it only once, or read it twice but at sufficiently close intervals that the data will still be in the cache. The latter sounds difficult, so let's go for the first.

We need to get a duplicator in there somewhere. If we restrict to basic shell commands, the only choice is tee. So we need to convert the input (a tree of files) into a stream, feed the stream to tee, and convert each output stream back to a tree of files. The tool to do that is an archiver. Compression on something that'll remain in memory is a waste, so let's just use tar.

Pipes (command0 | command1) allow us to feed the output of a command into one other commands. We need to feed the output of tee into two other commands, so another bash construct comes in handy: command1 >(command2) creates a pipe that is passed to command1 as its first command rather than becoming the standard output of command2. (Look up process substitution in the bash manual.)

Here's the command (untested):

mkdir /media/disk0/copy_of_dvd /media/disk1/copy_of_dvd
cd /media/cdrom
tar cf - . | tee >(tar xf - -C /media/disk0/copy_of_dvd) | tar xf - -C /media/disk1/copy_of_dvd


Corsair m45 compatible with Ubuntu? (mouse)

What it means is it will only be garunteeded to work with Windows. Having it as dual boot won't make any difference.

However...

I use a Microsoft Track Ball Explorer, made by Microsoft:

It works perfectly with Ubuntu - better than it does with my Windows 8 computer. Just because it doesn't garuntee that it will work, it probaby still will.


Broadcom b43 driver again: Why modprobe b43 manually?

The pci.id for Broadcom cards sometimes but not always matches the model number; only Broadcom knows why. It is not significant to your problem.

Get the module to load automatically on boot with:

sudo -i
echo b43  >>  /etc/modules
exit

You should be all set.

If you find you have a conflicting blacklist, please do:

gksudo gedit /etc/modprobe.d/blacklist.conf

Remove the line 'blacklist b43' save and close gedit.


My /etc/apt/preferences.d directory contains nothing.So only creation of that directory will solve that problem,

sudo mkdir /etc/apt/preferences.d


Unable to start PostgreSQL: Operation not Permitted

You need to be superuser to run the software using the init.d script.

Try using sudo /etc/init.d/postgresql start to run the software.


How to recover deleted "dpkg" directory?

Using root and recursive rm (rm -r) is a recipe for disasters, don't do it. The files and directories that were deleted are as follows:
ls -l /var/lib/dpkg/
total 9964
drwxr-xr-x 2 root root    4096 nov 28 11:18 alternatives
-rw-r--r-- 1 root root      11 sep 18 14:08 arch
-rw-r--r-- 1 root root 2573807 nov 28 11:18 available
-rw-r--r-- 1 root root 2561322 nov 28 10:25 available-old
-rw-r--r-- 1 root root       8 abr 24  2013 cmethopt
-rw-r--r-- 1 root root     538 sep 25 17:24 diversions
-rw-r--r-- 1 root root     457 sep 25 17:24 diversions-old
drwxr-xr-x 2 root root  483328 nov 28 11:17 info
-rw-r----- 1 root root       0 nov 28 11:18 lock
drwxr-xr-x 2 root root    4096 mar 22  2013 parts
-rw-r--r-- 1 root root     135 abr 24  2013 statoverride
-rw-r--r-- 1 root root 2269113 nov 28 11:18 status
-rw-r--r-- 1 root root 2268870 nov 28 11:18 status-old
drwxr-xr-x 2 root root    4096 nov 28 11:18 triggers
drwxr-xr-x 2 root root    4096 nov 28 11:18 updates

You removed 5 directories, the status file, etc. So, lets try to fix the stuff. First, create the directory:
sudo mkdir -p /var/lib/dpkg/{alternatives,info,parts,triggers,updates}

Recover some backups:
sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status

Check if dpkg is working:
apt-get download dpkg
sudo dpkg -i dpkg*.deb

If everything is "ok" then repair your base files too:
apt-get download base-files
sudo dpkg -i base-files*.deb

Now try to update your package list, etc.:
dpkg --audit
sudo apt-get update
sudo apt-get check

Compare ls -l /var/lib/dpkg with the above list. If some -old file is not present don't worry it as it would be created with the normal usage of the system.


I had a similar problem when configure digital ocean on Ubuntu 18.04 VM

I set in your local ansible inventory file the python3 interpreter

[all:vars]
ansible_python_interpreter = /usr/bin/python3

after that all worked fine.


internet connection: connected only when detach/attach the wire again

I think thisis related to fact that my machine (Ubuntu 12.10) cannot find DHCP server which is my TP-LINK.

  The foundation for UPnP networking is IP addressing. Each device must
  implement a DHCP client and search for a DHCP server when the device
  is first connected to the network. If no DHCP server is available, the
  device must assign itself an address. The process by which a UPnP
  device assigns itself an address is known within the UPnP Device
  Architecture as AutoIP. In UPnP Device Architecture Version 1.0,[6]
  AutoIP is defined within the specification itself; in UPnP Device
  Architecture Version 1.1,[7] AutoIP references IETF RFC 3927.[8] If
  during the DHCP transaction, the device obtains a domain name, for
  example, through a DNS server or via DNS forwarding, the device should
  use that name in subsequent network operations; otherwise, the device
  should use its IP address.

I've found at least temporary workoround:
kill dhcp process

root@ubuntu:/home/user# dhcpcd eth0
err, eth0: dhcpcd already running on pid 2186 (/var/run/dhcpcd-eth0.pid)
root@ubuntu:/home/user# kill -9 2186
root@ubuntu:/home/user# ifconfig
eth0      Link encap:Ethernet  HWaddr b4:1u:2b:4b:41:c7
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe91::d62d:7eff:ft4b:54hc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8729693 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7491675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4836487722 (4.8 GB)  TX bytes:720522105 (720.5 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:51131 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51131 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5025732 (5.0 MB)  TX bytes:5025732 (5.0 MB)

put off the wire and plug it again, then dhcp service has to be turned on again:

root@ubuntu:/home/user# dhcpcd eth0
root@ubuntu:/home/user# dhcpcd.sh: interface eth0 has been configured with new IP=192.168.0.100

root@ubuntu:/home/user#

and should work ; )


Other than web apps such as Office 365 or Google Docs, there are currently no options to edit Microsoft Office documents on an Ubuntu phone.

This may change as the devices begin flowing into retail channels, and will change as development on convergence begins to show fruit in Ubuntu 15.10 and Ubuntu 16.04 LTS, where LibreOffice and all desktop apps will run natively on the phone on user request, even if the interface is not optimal.


warning messages while compiling c program using gcc

You are getting the warnings because you are using the wrong format specifier in printf(). p is an integer-pointer. &p is the address of a pointer. &x and &y are addresses of integers. These are all addresses in memory, not values of a variable.  The specifier %u is for values of unsigned integers. So you are printing apples where the compiler expects oranges. Addresses are shorter than some values stored in variables. By using %u will actually print an address value as decimal (highly unusual) and some more data located behind that in memory. The compiler is complaining, because that's probably not what you want to do. To print the addresses use the specifier %p, as in:
printf("\n&x = %p\n",&x);

Aside from that, your variables are signed integers and as such should use %i instead of %u. The %u format specifier of printf() is for positive integers only. For small positive values both, %i and %u are interchangeable. The warning is displayed because the variable type does not match its specifier and this causes problems in some cases.
This would be more sensible from your variable types:
printf("\n\np  = %p\n",  p); // p is a pointer so %p would print the address

printf("\n*p = %i\n",   *p); // the data saved at that address is an integer
                             // so %i is appropriate if you dereference the
                             // pointer with the star "*p"

printf("\n&x = %p\n",   &x); // &x gives the address of the integer variable x
                             // so %p is the specifier for that address

printf("\n&y = %p\n",   &y);
printf("\n&z = %p\n",   &z);

printf("\n&p = %p\n\n", &p); // &p gives the address, where the pointer p is
                             // stored -> still an address -> %p is the right
                             // specifier

A bit background on signed and unsigned integers and pointers:
C uses the same 32 bit (or another power of two depending on the system architecture) to store unsigned and signed integers. Thus the highest unsigned int is 232-1 or in binary notation:

232-1 = (11111111111111111111111111111111)2 <- (unsigned)

And a the number one would look like this in binary:

       1 = (00000000000000000000000000000001)2 <- (unsigned)

Now regular signed integers need to store the negative numbers as well, but still in the same space of 32 bit. If you stored the sign, of the number in e.g. the first bit, you would loose a whole bit. That would be wasteful, e.g. the zero would have two representations as + and - zero. To circumvent this problem negative numbers in  signed integers are stored a little differently: To encode a number into a signed integer, you add halve the possible range for your 32 bit number. This is 2(32-1), and then use the regular binary representation of that new number. So a one is encoded like 2(32-1) + 1 would be for an unsigned integer. We have:

 2(32-1) = (11111111111111111111111111111111)2 <-signed
         ...
         1 = (10000000000000000000000000000001)2 <- signed
         0 = (10000000000000000000000000000000)2 <- signed
        -1 = (01111111111111111111111111111111)2 <- signed
         ...
-2(32-1) = (00000000000000000000000000000000)2 <-signed

Now you have encoded the same number of integers, but the maximum for signed integers is consequently only 2(32-1) as opposed to double that, 232-1, for unsigned integers. This is called excess-K or offset-binary representation for negative numbers. Most systems use the Two's complement, where the first, most significant bit is reversed.
To see this, set x=-1; and then printf("%u",x). You will get the following output:

2147483648

Which is 232-1 or (01111111111111111111111111111111)2 in binary notation. For the Two's complement this number would be:

4294967295

Or 232-1. This equals (11111111111111111111111111111111)2 in binary, so it has the first bit reversed compared to the above excess-K value of 2147483648.
So this is how the data is stored. Pointers come into play when you think of the where. The physical bits in the memory must have addresses. Since there are incredibly many of them you address them in chunks of more then one bit. If you create a pointer, the physical memory at the address of the pointer holds another address in memory. So a house is a physical object, much like a bit in your PC's memory. A piece of paper would be a pointer. It is smaller than the house, but can hold the address of a house or other houses. In that analogy, above you would have tried to demolish the piece of paper instead of the actual house and it was actually a mountain...


Can I use native the Qt5 C++ library to create applications for the phone?

The Ubuntu SDK is based on Qt5 respectively QtQuick 2.0 and QML. So you should be able to use all Qt5 libraries. Further information you could find on the Ubuntu SDK, the Qt5, the QtQuick and the QML Documentation pages.

To test your application on a real device you have to wait until the release of the first version of the Ubuntu Phone OS which will be released next week (February 21st). The 3rd generation Galaxy Nexus will support the Ubuntu Phone OS but there will be other devices. For further details have a look at the Ubuntu Wiki and the Ubuntu Operators page.


Why does top not require root (can non-root programs see other running processes)?

On Linux it's traditional for all users to be able to see the list of running processes.  While it does reveal information about what software is running and what privileges it's running as, it's not traditionally considered a primary security risk.

You can configure it so that users can't see the process list, though it may break compatibility with some applications.

More info at: https://unix.stackexchange.com/questions/244353/why-can-i-list-other-users-processes-without-root-permission


There are two solutions off the top of my head:

The first is to install postfix and accept the default configuration. Any mail sent to username@server (or just a username if it's all on one server) would be delivered to that specific user. It's fairly easy to get going and can be expanded to a full mail system in the future without much pain.

The second solution, which I leaned of in the Django documentation, is to run:

python -m smtpd -n -c DebuggingServer localhost:25

You may need to run this as root to claim the port. Any mail that is sent to your server will appear on the terminal as long as you have this running. It's great for testing out mail in different applications.


How to make Ubuntu beep (a few seconds) before suspend?

First install beep package:

sudo apt install beep

Then load pcspkr module, by default pc speaker is not enable (module is not loaded):

sudo modprobe pcspkr

Now install xprintidle, it's a utility to print user's idle time.

Finally we need a command to check if idle time was bigger than of X, runs beep:

if [ `xprintidle` -ge 3000 ]; then beep; fi

3000 means 3 second, e.g: if your system goes to sleep after 10 Minutes you should use something around "540000" (9 Min) so it is able to make a alert 1 Min before system goes to sleep.

After all create a line in /etc/crontab to run this command every minute:

* * * * *   username   if [ `xprintidle` -ge 540000 ]; then beep; fi


how to create dynamic qcow2 image from Windows C:\ drive?

There is a tool already available to do this conversion, called virt-p2v.

To get started, install libguestfs-tools on your Ubuntu system which will serve as the hypervisor for your new KVM virtual machine. This will install virt-p2v, virt-v2v and virt-p2v-make-disk, all of which you will need.

sudo apt install libguestfs-tools

Now insert a USB stick to your Linux system, make note of its /dev/sd* device name, and run virt-p2v-make-disk to create a bootable virt-p2v environment, from which you will later boot the Windows machine. (Or see the man page for other options for creating the bootable image.)

sudo virt-p2v-make-disk -o /dev/sd*

Now boot your Windows system from this USB stick. It will ask you to provide credentials to SSH into the Linux machine. You will either need to enable root on the Ubuntu machine, or set up passwordless sudo for your account.

After you set up ssh, virt-p2v will ask you some questions about the virtual machine you want to create, and then it will begin copying data from your physical machine to the Ubuntu server.


ubuntu 13.10 no launcher and no dash appears

Press CTRL + ALT + F2 and login to a text session by typing your username and password. After you sign in type the following commands:

sudo apt-get update
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get upgrade
sudo apt-get install wget python dconf-tools
wget https://launchpad.net/~amith/+archive/ubuntutools/+build/3910667/+files/unity-reset_0.1-8_all.deb
sudo chmod +x unity-reset_0.1-8_all.deb
sudo dpkg -i unity-reset_0.1-8_all.deb
sudo apt-get -f install
unity-reset
dconf reset -f /org/compiz/
compiz --replace
sudo reboot

Don't worry if you get an error after compiz --replace. That's just in there for good measure.


I had the same problem when I was moving to ubuntu. To dual boot ubuntu with windows you need to have seperate HDDs to my knowledge.

Do you really want to move to ubuntu then try it on a virtual box first.


TouchPad doesn't work on Ubuntu 11.10, Toshiba Salellite L500-1WP

First update all your packages.

Than

sudo apt-get install dconf-tools
dconf-editor
Search for: /org/gnome/settings-daemon/peripherals/touchpad/
Check "touchpad-enabled"


Change folder icon of multiple folders (movies)

This script was written by Jacob Vlijm and was originally posted here.

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

# --- set the list of valid extensions below (lowercase)
# --- use quotes, *don't* include the dot!
ext = ["jpg", "jpeg", "png", "gif", "icns", "ico"]
# ---

# retrieve the path of the targeted folder
current = os.getenv("NAUTILUS_SCRIPT_CURRENT_URI").replace("file://", "").replace("%20", " ")
dr = os.path.realpath(current)

for root, dirs, files in os.walk(dr):
    for directory in dirs:
        folder = os.path.join(root, directory)
        try:
            first = min(p for p in os.listdir(folder)
                        if p.split(".")[-1].lower() in ext)
        except ValueError:
            pass
        else:
              subprocess.Popen([
                  "gvfs-set-attribute", "-t", "string",
                  os.path.abspath(folder), "metadata::custom-icon",
                  "file://"+os.path.abspath(os.path.join(folder, first))
                  ])

To use

Create, if it doesn't exist yet, the directory

~/.local/share/nautilus/scripts

Copy the script into an empty file, save it in ~/.local/share/nautilus/scripts as set_foldericons (no extension!), right click and go to file properties and make it executable.
Log out and back in, it works.

If you want to hide all the folder icons (so that you don't accidentally presume they are folders) add a . at the start of file names, for example folder.png becomes .folder.png

Original work


This line in /etc/default/grub is not correct:

GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"

It should say

GRUB_CMDLINE_LINUX=""

And your boot parameters acpi_osi=Linux acpi_backlight=vendor should be placed in the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

edit the file:

sudoedit /etc/default/grub

and correct the two lines so after your edit you have:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""

Save the file, exit, and run

sudo update-grub


Dependecies missing when updating to 15.04

Because you messed up your Ubuntu installation I recommend a clean install of Ubuntu.

In this special case to fiddle around with a repair attempt will not make very much sense.

Fortunately the new edition 15.10 is just around the corner, it will be released tomorrow.

As Ubuntu 15.04 will only be supported until January 2016 you should wait this one day.

Alternatively you can stick with Ubuntu 14.04 LTS, for which you have a working backup.


Run this command

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"


Internet connection problems after installation of Ubuntu

The internet connection problems may be due to your wireless card being incompatible with the default open source drivers.

Can you post the output when the following is entered in a terminal?

sudo lshw -c network

In case you are using a Broadcom (BCMxxxx) wireless card, head over to 'Additional Drivers' and select the available proprietary driver (bcmwl-kernel-source) and you are good to go.


Ubuntu 16.04 doesn't shut down after suspend or hibernate

Forcing hibernate to power off the machine:

After looking around a long time for an answer to this that actually addressed the issue (not related ones), I found a tip here which got the job done for me:

Create a file in the pm config directory:

sudo vim /etc/pm/config.d/hibernate_mode

that sets the variable HIBERNATE_MODE like so:

HIBERNATE_MODE="shutdown"

After doing this, hibernate powered down the machine on completion like expected. An explanation for what setting HIBERNATE_MODE does is in the manual for pm-hibernate:

  Default method to power down the system when
  hibernating. If not set, the system will use the kernel default as a
  default value. Check /sys/power/disk for valid values. The default
  value will be surrounded by [square brackets].

My default in that file was platform. Setting the variable above to shutdown overrides this, and gets what we want happening.

Related information and tips for getting hibernate to work correctly:

As for those "related issues" everyone seems to have with hibernating, quick debugging tips:

Check that the command sudo pm-hibernate actually does something. If not, none of these other tips will make any difference. If it doesn't work, ensure 1) the size of your swap partition is greater than that of your RAM and 2) secure boot is disabled in your BIOS.
Only once that command works, look at integrating hibernate into your system as you please. A couple of common ones:

Add hibernate to the Ubuntu menu: This seems to be the best answer to me. Official documentation also has a slightly different version.
Note: once hibernate is added to the Ubuntu menu, you may also need to fix the alternative call to sudo systemctl hibernate. Apparently, (at least for Ubuntu 16.04) the Ubuntu menu option calls sudo systemctl hibernate instead of sudo pm-hibernate. systemctl hibernate was fixed for me by adding the following content to file /etc/systemd/sleep.conf:

  [Sleep]
  HibernateMode=shutdown

If the file doesn't exists yet, you can create it. More info here.
Change the behaviour of the power button (by default it displays in interactive menu): To change it to directly hibernate, or shutdown you need to modify the associated gsettings entry. A lot of other answers go through the GUI way if that floats your boat. To see the available options use gsettings range org.gnome.settings-daemon.plugins.power button-power


Select specific Twitter in Gwibber without seeing the rest i follow

Yes that is possible.

To do that, first login to Twitter.com and create a Twitter list and add the people you want to have in that list.

Once you've done that, open up Gwibber, and load the "lists" view.

Then, select a list

And you're done!


Ubuntu 12.10 won't allow admin privileges when password is set to None

I guess you have to reset your account's password.

Reboot your computer and in the Grub menu, choose recovery mode. In the recovery menu choose root shell.

Remount the partition as read/write with: mount -rw -o remount /

Now you can reset your password with: passwd username. change username with the name for your account.

Reboot your computer and you're done.