Creating multiple interfaces on OpenStack Instances I'm able to have OpenStack up and running with no issues and I'm loving it, however, I'm trying to create extra interfaces on one of my instances and I read under openstack documentation that is possible.
OpenStack-Using-Multi-Nics

Has anyone been able to follow this article and successfully create multiple interfaces on instances?

I am not sure if I am little late on this. Anyways, I just successfully configured multi interface with ice house and ubuntu 14.04. I am using flatdhcp nova network configuration. Following are the steps.

Create 2 n/w using nova network-create command, each with 2 different bridges (say br100 and br101)
Then launch an instance attaching these 2 n/w.
By default using ubuntu 14.04 cloud image, only eth0 is configured. So image comes up with eth0 having ip address allocated. We see from openstack dashboard that instance has been assigned 2 IPs (one from each n/w) but that is from openstack viewpoint.
You can login to this new instance using eth0 ip and key pair. Once you are in, change /etc/network/interfaces to have auto eth1 and iface eth1 inet dhcp. Once you add these 2 lines execute sudo ifdown eth1 && sudo ifup eth1 (note that normal networking restart commands are not functional in 14.04 )
and then you have it :)

I also follow this link to configure. It is possible to use two NICs on instance.

But when the instance startup, the IPs failed to bind to the NIC. Then I have to login with VNC and bind the IP with each network interface.


Resetting my password through the root doesn't work I went to the root, and then typed in "passwd username" except I used my username. Instead of giving me an option to change the password, it says "Usage: passwd [options] [LOGIN]" and then gives me all of these options that dont even work when I try them.

You don't need to go into root if you're already logged in.

Simply run the command, with no arguments:

passwd

tim@Hairy14:~$ passwd
Changing password for tim.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
password changed


Hotkey for switching between windows I've the three open windows:

I would like to switch between them as Alt+1 - first windows, Alt+2 - second window, Alt+3 - third windows and so on.

Is there any third-party tool or other ways to do it?

I don't know if lubuntu keymapings are the same with ubuntu but the way to do it is hold down the Super/Windows Menu key and the keyboard shortcuts list will pop out. In ubuntu you can do it with Super+ 1-9.

If you mean change tabs , as far as i know in firefox is :

Forward-

CTRL+TAB

Backward-

CTRL+SHIFT+TAB

More here:

https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly


Ubuntu Linux 13.04 and Windows 8 don't like one another Well, I have done everything possible to ensure that all is well but to no avail.

I tried to install Ubuntu 12.04.2 and 13.04 onto a HDD with UEFI but all I get is the black screen.
I then tried vga=normal nomodeset at the end of the kernel line. Nothing happened.
I then tried to install Ubuntu Linux 13.04 in the Legacy boot.
I then ran boot-repair with the following from http://paste.ubuntu.com/5976834/. Now I cannot get Ubuntu to log in.

Any ideas out there?

A very quick synopsis of what is required to get Windows and Ubuntu using UEFI to boot.

If Windows already installed using UEFI boot to Windows and switch
off fast start or any hibernation settings.
Boot to firmware settings and switch off UEFI.
Boot Ubuntu installation media and allow installer to run in legacy
mode.
Boot to firmware settings and switch on UEFI.
Boot to boot-repairCD (not Ubuntu LiveDVD) and use this to install grub-efi.

If boot-repairCD does not boot using UEFI installing rEFInd may provide correct .efi drivers to enable booting boot-repairCD using UEFI.

Should now have dual booting system using UEFI. This is a work around due to Ubuntu installer unable to work using UEFI on some machines.

Installing ubuntu in UEFI HDD is not that easy, i created a gude, but is too large to write it here, so I'm giving you the link.

It's in spanish, use google translate

Guide for UEFI


Can't mount cd/dvd r/w drive in Ubuntu 12.04 I'm pretty new to Ubuntu and I'm having some troubles mounting my drive or getting it to detect media.

When I do this:
dmesg | grep "sr0"

I get :

[    2.096797] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    2.096968] sr 5:0:0:0: Attached scsi CD-ROM sr0

when I:

sudo mount /dev/sr0 /mnt/cdrom
mount: no medium found on /dev/sr0

sudo mount /dev/cdrom /media/cdrom
mount: no medium found on /dev/sr0

There is most certainly media in the drive.
Can someone please help me understand how I can resolve this issue?

I have the same problem. Using my Acer laptop Ubuntu (Any version) doesn't recognize the DVD R/W Rom drive that's built in. I purchased an External DVD R/W and it seems to work fine. I know it isn't a solution but for the time being, it works. Until I can figure out the problem, I can still utilize other discs.

Pico


Do I have to dual-boot or can I do a fresh install? This question is probably ridiculously stupid but I have a Windows 8 machine (new one with the UEFI thing).

I'm going to be installing Ubuntu later, and I was wondering if I absolutely have to dual-boot it with Windows 8 or if I can wipe the Windows installation and install just Ubuntu?

You do not have to dual boot.  Ubuntu will be just fine by itself even with UEFI, you just have to keep/create a UEFI boot partition when you install it by itself.

remember when dual booting on the same hard drive you risk corrupting mbr and boot sectors Id recommend installing linux on a separate drive and keeping windows some times you need windows files for certain things if you have the room and an extra drive I'd definitely dual boot.


Application Typora not found in Dash and no Icon visible I'm on 16.04 LTS. I've been using Typora App for Linux happily for months. Until recently, the app was easily found in the Dash by typing either "write..." or "typora...".

Installation followed the standard Ubuntu way as shown here.

However, since a couple of days, the app is not found in the dash anymore, while it still can be called from the console. If opened from the command line, there's no app icon but the default question mark.

So, how can I get Typora to behave like any other app on the Ubuntu desktop?

Update:

Output of apt-cache policy typora

typora:
  Installiert:           0.9.29-1
  Installationskandidat: 0.9.29-1
  Versionstabelle:
 *** 0.9.29-1 500
        500 https://typora.io linux/ Packages
        100 /var/lib/dpkg/status
     0.9.25-1 500
        500 https://typora.io linux/ Packages
     0.9.24-1 500
        500 https://typora.io linux/ Packages
     0.9.23-1 500
        500 https://typora.io linux/ Packages
     0.9.22-1 500
        500 https://typora.io linux/ Packages

Output of  ls -l /usr/share/applications/typora.desktop /usr/share/icons/hicolor/*/apps/typora.png

-rw-rw-r-- 1 root root   302 Apr 23 18:45 /usr/share/applications/typora.desktop
-rw-rw-r-- 1 root root  8534 Apr 23 18:45 /usr/share/icons/hicolor/128x128/apps/typora.png
-rw-rw-r-- 1 root root 20775 Apr 23 18:45 /usr/share/icons/hicolor/256x256/apps/typora.png
-rw-rw-r-- 1 root root  2398 Apr 23 18:45 /usr/share/icons/hicolor/32x32/apps/typora.png
-rw-rw-r-- 1 root root  4179 Apr 23 18:45 /usr/share/icons/hicolor/64x64/apps/typora.png

Update 2

unity --replace did not bring Typora back to the Dash.

find ~/.local/share/applications -name typora.desktop 2>&- comes with an empty result. No file found.

The most likely reason for this is that you have accidentally deselected  applications on the filters setting for unity dash Try setting your filters as shown in the image below and searching again for typora:

Edit: If the root cause of your issue is a packaging problem as indicated by this comment removing your existing package and installing the current one should resolve your issue.


"Cannot locate suitable jar utility" while trying to install Oracle Java JDK I have installed jdk-7u3-linux-i586.tar.gz according to this:

How do I install Oracle Java JDK 7?

But when I try to install java_ee_sdk-6u4-unix.sh using the command sudo sh java_ee_sdk-6u4-unix.sh from inside the /home//Downloads/ directory I get the message

  Could not locate a suitable jar utility.
  Please ensure that you have Java 6 or newer installed on your system
  and accessible in your PATH or by setting JAVA_HOME

Note: Even though I get the mesage "Could not locate a suitable jar utility.
Please ensure that you have Java 6 or newer installed on your system
and accessible in your PATH or by setting JAVA_HOME" commands "java", "javac" are working from any location.

The problem is the same that for other programs (java, javac, javaws etc.) You just need to create an update alternative for the "jar" program like this:

sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/jdk1.7.0/bin/jar" 1

Note: remember to replace the "jdk1.7.0" path by the real name of your target jdk installation path if it is different.

#!/bin/bash
#Author: Yucca Nel http://thejarbar.org
#Will restart system
#Modify these variables as needed...
tempWork=/tmp/work
locBin=/usr/local/bin
javaUsrLib=/usr/lib/jvm

sudo mkdir -p $javaUsrLib
mkdir -p $tempWork
cd $tempWork

#Update this line to reflect newer versions of JDK...
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u3-download-1501626.html;" http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz

#Extract the download
tar -zxvf $tempWork/*

#Move it to where it can be found...

sudo mv -f $tempWork/jdk1* $javaUsrLib/

sudo ln -f -s $javaUsrLib/jdk1*/bin/* /usr/bin/
sudo rm -rf $tempWork
#Update this line to reflect newer versions of JDK...
export JAVA_HOME="$javaUsrLib/jdk1.7.0_03"

if ! grep "JAVA_HOME=$javaUsrLib/jdk1.7.0_03" /etc/environment
then
    echo "JAVA_HOME=$javaUsrLib/jdk1.7.0_03"| sudo tee -a /etc/environment
fi

exit 0


Compile and install rtl8192cu driver Can someone help me with this problem ? I am new to Linux, so I do not know commands and I never did something like installing or compiling with command-line.

I bought WiFi adapter from Edimax, model EW-7811UN for my PC (not laptop, so I do not have wifi card, only ethernet). When I go through guide on CD, I came across a version of kernel. It said I need version 2.6, but I have 3.5.0-22-generic.

I got errors like I do not have file or folder etc. Can someone tell me where I can download compiled driver and where I need to put it? Or some other advice. I don't want downgrade kernel when it is not necessary.

If you run into this problem, what worked for me was installing the following driver:
https://github.com/pvaret/rtl8192cu-fixes

From the README.md file:

  Installation

  Ensure you have the necessary prerequisites:

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

  Clone this repository:

git clone https://github.com/pvaret/rtl8192cu-fixes.git

  Set it up as a DKMS module:

sudo dkms add ./rtl8192cu-fixes

  Build and install it (this version number may change, it is .11 as of November 07 2019)

sudo dkms install 8192cu/1.11

  Refresh the module list:

sudo depmod -a

  Ensure the native (and broken) kernel driver is blacklisted:

sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

  And reboot. You're done.

I downloaded a newer version of the driver and installed it with:
sudo dkms install 8192cu/1.9

So, keep in mind to install using your driver version.


Is 1GB RAM with integrated graphics sufficient for Unity 3D on 12.04? I have been using Ubuntu since Hardy Heron (8.04). I used Natty, Oneiric with Unity. But When I recently (more than 1 month now) upgraded My Ubuntu to Precise (12.04), the performance of my laptop is not satisfactory. It is too unresponsive compared to older releases.

For example, the Unity in 12.04 is very unresponsive. Sometimes, it requires 2 seconds to show up the dash (which was not the case with Natty, though people always saying that Natty's version of Unity is buggiest). I am assuming that, May be my 1GB RAM now becomes too low to run Unity of Precise. But I also think, Since Unity is improved in Precise,
It may not be the case. So, I am not sure.

Do you have any ideas? Will upgrading RAM fix it? How much I need if upgrade is required?

Laptop model: "Lenovo 3000 Y410"
Graphic : "Intel GMA X3100" on Intel 965GM Chipset.
RAM/Memory : "1 GB DDR2" (1 slot empty).
Swap space : 1.1GB
Resolution: 1280x800 widescreen
Shared RAM for Graphics: 256 MB  as below output suggests

$ dmesg | grep AGP
[    0.825548] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000

I'd say 1GB is low, considering that you have 256MB of that dedicated to the integrated Intel graphics!!

What I mean is that, with 12.04 Unity, if you will be doing a decent amount of multitasking, you will start to notice lags with 1GB. Eg Firefox open with 5+ tabs along with 3-4 other programs running in the background, etc. (This is based on my own extensive experience with a 1GB machine).

A stock i386 install of 12.04 desktop with Unity 3D uses about 550-600MB of RAM after boot for me, excluding caches and with near-zero swap usage.

So I believe that an additional 1GB of RAM will almost certainly solve your problem. However, since RAM prices are at historical lows (should also be in Bangladesh), if you can afford it I suggest you "max out" with a 2GB module and future-proof your computer :)

Temporarily, if you do not game, I recommend reducing the integrated graphics share to 128MB. This shouldnt affect the user interface/Unity in any way.

No not at all. 1 Gb RAM is more than enough for normal user. If you good performance then try using the Lubuntu-session. It is a good alternative to gnome or default unity.

Links:

lxde site
lxde Wiki Page

To install:

sudo apt-get install lubuntu-desktop

It is very good if you want to save on your system resources.

But if you want to use or unity then you can also use your gnome or unity and increase you RAM by setting up a SWAP area. That will actually increase your RAM virtually.
For further information about SWAP area visit : https://help.ubuntu.com/community/SwapFaq

If you find lxde very good then remove ubuntu and install lubuntu. It will save you space on hard disk. For installation instructions visit the lubuntu site. Lxde uses only 100 Mb for RAM at boot time.


How can I connect to Wi-Fi? I have just installed Ubuntu 18.04.3 for studying purposes. I cannot connect to internet in any way as the WI-FI adapter is not found and every other solution to the problem I have looked up on the internet requires a wired connection to the internet, which will not work for me as my notepad does not have a Ethernet port, it can only use wireless connections and Bluetooth. My notepad is Asus Vivobook S14 S431F. Please help me!

As noted at https://www.asus.com/Laptops/ASUS-VivoBook-S14-S431FA/Tech-Specs/

you have a USB3 Gen 2 port. Attach a micro USB3 to Ehternet adapter there and you will have wired Ethernet capability, with which you can use solutions which require a connection to download a file.


error in first step of of Ubuntu Deb Pack Installation When I copied the first line of the Ubuntu Deb Pack Installation of 14.04 LTS, which is:

VERS=$(lsb_release ‐cs)
sudo sh ‐c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list

I get this error:

sh: 0: Can't open ‐c.

Please explain why I am getting this error.

Here is the explanation:

Your ‐ isn't really a -, although they look exactly the same! The one in your example is a UNICODE U+2010 whereas what you need is a UNICODE U+0045 (ASCII 45).

Here is a test with your ‐:

$ echo "‐" > test
$ hexdump test
0000000 80e2 0a90

And here is the regular -:

$ echo "-" > test
$ hexdump test1
0000000 0a2d

This command works:

sudo sh -c 'echo "deb http://www.openfoam.org/download/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/openfoam.list'

or the longer version:

VERS=$(lsb_release -cs)
sudo sh -c 'echo "deb http://www.openfoam.org/download/ubuntu $VERS main" > /etc/apt/sources.list.d/openfoam.list'


How to see Login history? Is it possible to see the login history, i mean to see if someone has used the computer in my absence and when he used it .
if it is possible, where can i get the log ?
if not, is there a program that logs all the logins and their time ?

/var/log/auth.log

That contains a lot more than just plain logins (sudo calls, etc) but logins are in there too. It's protected so you'll need to be root to read it:

sudo less /var/log/auth.log

Well appending your question and oli's answer if you are on laptop then you can also check it through grepping the exact content like

sudo cat /var/log/auth.log | grep "Lid opened"

or

sudo cat /var/log/auth.log | grep "Lid closed"

and whether he/she perform any kind of activity through sudo permission by

sudo cat /var/log/auth.log | grep "session opened for user root"

or

sudo cat /var/log/auth.log | grep "session closed for user root"

It will give you extra information what you want to know about user's logged in your system without your permission :):)


Wireless adapter hard blocked: rfkill unblock all not working I did a clean install of ubuntu 14.04 LTS, and now my network adapter seems to be disabled. I get the greyed-out message "Wifi is disabled by hardware switch" When I open the drop-down wifi menu from the top of the screen.

I put in the command rfkill list wlan into the terminal, and the following output came up:

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

I run the command rfkill unblock all, and the output from rfkill list wlan is exactly the same. I'm starting to think that this has to do with bios settings.

Does anyone have any ideas for my problem?

Try getting the event ID first by running rfkill event (press CtrlC to exit rfkill afterwards).

Then run rfkill unblock xxxxxxxxxx.xxxxxx, replacing xxxxxxxxxx.xxxxxx with the event ID from the previous command.

This will release the block.


Kernel upgrade breaks NVIDIA. Am I stuck with the same kernel forever? I switched to Ubuntu ~3 months ago and it is an incredible way to interact with a computer.  I ran into a snag last night after a restart.  I fixed the issue, but it left me with some questions.

Problem:
After restart my screen resolution dropped from 1920x1080 to 800x600 and neither cinnamon nor unity would initialize.  Running the following:

lspci | grep VGA

showed:

03:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 760 OEM] (rev a1)

But it obviously wasn’t being used for either video or sound.  After some digging, I found that a recent kernel update had taken effect at restart and it wasn’t playing nicely with my NVIDIA graphics card and/or drivers.

Solution:
Restarting Ubuntu using the previous kernel version fixed the problem.  I edited /etc/default/grub and ran grub-update to default to the previous kernel version and this works.  But now I am worried about the long-term outlook for my machine.

Questions:

Should I try reinstalling my NVIDIA drivers?  They were a giant pain to install the first time around.  They are still present on the system so I don’t know if reinstalling them with the new kernel in place would make any difference and I don’t really feel like spending half a day working on a project that appears to have little chance of success.
Should I file a bug report with Ubuntu?  Or maybe on the git repository for the kernel?  Is this a bug, or is this kind of thing par for the course when running third party drivers?
Most importantly am I now stuck with the Linux 3.16.0-41-generic kernel for the rest of eternity?  Is it likely that this problem will be resolved in 3.16.0-45 or will I just be running on an old kernel until I get a new machine.  My graphics card is not old so I would be surprised if it is no longer supported.  And running an outdated kernel smells like a security risk.  What’s the deal?

If you install Nvidia drivers from .run files, you will always have to reinstall them after each kernel upgrade.

To install Nvidia drivers a proper way you need to uninstall it first by running

sudo sh <nvidia_run_file_name>.run --uninstall

from the directory where the driver file is located.

Then you can install nvidia-331 from Ubuntu repositories by

sudo apt-get install nvidia-331

or install the latest driver from xorg-edgers PPA.

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

Now also 340, 346 and 349 versions are available there.

If you have hybrid grapghics, you need also nvidia-prime package.

You could try this and upgrade you kernel, and enter this in the terminal:

 sudo apt-get install linux-amd64_ linux-efi
 sudo apt-get install aptitude
 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get dist-upgrade
 sudo apt-get install -f
 sudo aptitude linux-efi

and it might work fine this way.


How do I use OpenConnect via Network Manager to connect to Juniper VPN? The more general question: How do I pass arguments/switches to the client in Network Manager?

In order to connect to a Juniper VPN using OpenConnect, I use the following command-line:
sudo openconnect --juniper -u me vpn.juniper.example.com

I've installed network-manager-openconnect, but it fails to connect (I get a "XML response has no "auth" node" message in the log window).

How do I configure the vpn client when using Network Manager?

Update
It may not be as simple as passing the --juniper switch.  I renamed the client and put a shell script in its place to call the client with the --juniper switch added and saw no difference in the behavior when trying to connect.  So the general question remains: how to configure the client when using Network Manager?

The current stable network manager doesn't support this feature just yet but it is in developement. It seems it will be possible in the 1.4 version.

Source: http://lists.infradead.org/pipermail/openconnect-devel/2016-July/003752.html

See the "Getting Help" section of the OpenConnect web site at http://www.infradead.org/openconnect/mail.html


Cannot install Pulseaudio after upgrade to 18.04 I upgraded to 18.04 (actually it said partial upgrade) and now have no sound, I tried to install pulseaudio as it seems to be missing but I ge the message below.

dave@Dave-PC:~$ sudo apt install pulseaudio
[sudo] password for dave:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 pulseaudio : Depends: libpulse0 (= 1:10.0-2ubuntu3.1) but 1:11.1-1ubuntu7 is to be installed
E: Unable to correct problems, you have held broken packages.
dave@Dave-PC:~$

How do I fix this?

The error speaks itself, the missing dependency / library is libpulse which can be found in libpulse-dev package.

First purge it by (So that obsolete installation is deleted) :

sudo apt purge libpulse-dev

And then install it :

sudo apt install libpulse-dev

And then try installing pulseaudio.


Install on Second Hard Drive with startup boot option? In theory, what I want to do is very simple, but I've done some google research and read some posts on this site and I'm still confused.

I want to keep win7 on my primary C:\ drive, and install Ubuntu (12.10) on a secondary drive (that I have yet to buy or install. I just want to be certain that I'm successful when I do this). If at all possible I'd also like it if when I start the computer I have the option to boot either Win7 or Ubuntu, like an account log in type thing where I just pick which drive I'm running with that day. And just to reiterate, I do not want to partition my C:\ drive or alter, change, or affect my Win7 system in any way.

The reason I'm still fairly uncertain about all of this, is that a lot of the guides I've read have been for earlier versions of Ubuntu. Also the vast majority of guides are about partitioning one drive to fit both OS'. I want two separate OS running from two separate drives that I can pick at boot. The guides I did find mentioned that there is some issue with the grub being installed on C:\ but the rest of the OS being installed on the other drive. Is this still the case? How do I avoid that?

Also, if it helps, I've been running 12.04lts on my laptop for a few months now in and out of class and I love it.

Finally, if you could please point me to a guide or write your answer in the form of a guide for a two year old that'd be awesome. I'm still an Ubuntu novice and I don't want to mess up my win7.

How it works

Each partitioned disk contain one small block called MBR. It resides at the beginning of the disk.

Now, the OS inserts their code to MBR to load their own bootloader.
Windows does same, Linux does same.

They insert a small code pointing to actual location of bootloader. Like in Linux, This MBR contains Stage1 of GRUB (GRUB is a bootloader used in Linux) which loads a larger executable Stage2 that may located in other partition.

If you install Windows, and then Linux, GRUB Stage1 sits in MBR. Now other part of GRUB (the actual bootloader) contains the Windows bootloader location. Now when you select Windows from GRUB menu, Windows starts to load. This is called chain loading (GRUB loads first, then GRUB loads the Windows bootloader based on selection).

Coming back to your question

In your case, you have two MBR (because you have 2 hard disks).

Therefore, you have two options:

Easiest Option

Create a partition on 2nd disk.
Install Ubuntu on that partition & install GRUB on 2nd disk's MBR not on first disk's MBR. Be careful here. See below image (just for demo purpose), you need to do everything in (probably) sdb.
You select your already created sdb partition, edit, assign mount point /, and file system type ext4
Select boot loader location as sdb , not sda (see red colored section)

Once done, reboot and you will be booted to Windows 7.

It happens because, your boot disk priority says to boot from first hard disk (Where we didn't change anything).

So open BIOS, change boot disk priority so that the disk containing Ubuntu comes first.

This time, GRUB will be loaded. And you can boot either OS.
Remove the disk, Windows 7 will boot directly.
Again plugin the 2nd disk, verify boot order from BIOS so that 2nd disk comes first. You can now boot any OS again.

Another Option

You can modify Windows bootloader also to load Ubuntu from 2nd disk. It is a bit harder, and since you don't want to touch Windows 7 at all, I am not recommending it.

Note: All tutorials available here talks about adding Ubuntu from same disk but different partition. I have not done it for across devices, you may need to adopt accordingly.

Here is a tough guide to do so.

There is a great GUI tool to edit boot loader called EasyBCD (It is free for personal use). Their guide about setting up Ubuntu using Windows bootloader.

You can have more resource on it Easy BCD Help: Dual boot Win7 and Ubuntu 11.10 -- "Add new Entry" for Ubuntu

I strongly recommend using GRUB as bootloader, as it is more flexible. May be you can set Windows as default boot option AND/OR reduce timeout value.

Disconnect your first drive with the Win 7 on it. That way you will be safe. Your computer probably has a boot selector function in it. Take a look in the setup and see that it is enabled.


Where does Ubuntu store its library files? I want to add my own library to use in c compiling, but don't really know where ubuntu stores it.

Depending on library, ubuntu stores its libraries mainly in three locations

/lib
/usr/lib
/usr/local/lib

Following is from File System Hierarchy Standard

/lib

  The /lib directory contains those
  shared library images needed to boot
  the system and run the commands in the
  root filesystem, ie. by binaries in
  /bin and /sbin.

/usr/lib

  /usr/lib includes object files,
  libraries, and internal binaries that
  are not intended to be executed
  directly by users or shell scripts.
  [22]

  Applications may use a single
  subdirectory under /usr/lib. If an
  application uses a subdirectory, all
  architecture-dependent data
  exclusively used by the application
  must be placed within that
  subdirectory.

/usr/local/lib contains local libraries i.e one specific for this system but I can not find references to /usr/local/lib in FHS, it only contains explanation for /usr/local.

In Ubuntu they are found in /usr/include.


How do I retrieve the public key from a SSH private key? A SSH private key as generated by ssh-keygen contains a public key part. How do I retrieve this public key from the private key? I've lost my public key and need to put the contents of this public key in the servers authorized_keys file and do not want to create a new key pair.

Alternatively phrased: how do I create the id_rsa.pub file from a id_rsa file?

I've found the answer on Server Fault: Create a public SSH key from the private key?
The option -y outputs the public key:
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub

As a side note, the comment of the public key is lost. I've had a site which required the comment (Launchpad?), so you need to edit ~/.ssh/id_rsa.pub and append a comment to the first line with a space between the comment and key data. An example public key is shown truncated below.
ssh-rsa AAAA..../VqDjtS5 ubuntu@ubuntu

For keys that were added to the SSH Agent (a program that runs in the background and avoids the need for re-entering the keyfile passphrase over and over again), you can use the ssh-add -L command to list the public keys for keys that were added to the agent (via ssh-add -l). This is useful when the SSH key is stored on a smart card (and access to the private key file is not possible).

This is a solution is specifically for users using Windows to SSH into their remote machines, including cloud images on Amazon AWS and GCE.
(Disclaimer)
I recently used this solution to remote log in to new deployed VM images on GCE.

Tools used:

puttygen
WinSCP

Steps to perform:

Generate a public/private key pair using puttygen.
Upload a public key to your server in the cloud or remote location.

Description (how to do it):

Generate a key/pair or use an existing private key:
If you have a private key:
Open puttygen, press load button and select your private key (*.pem) file.
If you do not have a private key:

Open puttygen,
Select the desired key type SSH2 DSA (you may use RSA or DSA) within the Parameters section... and it is important that you leave the passphrase field blank,
Press generate and follow instructions to generate (public/private) key pair.

Create a new 'authorized_keys' file (with Notepad):
Copy your public key data from the "Public key for pasting into OpenSSH authorized_keys file" section of the PuTTY Key Generator, and paste the key data to the "authorized_keys" file.
Make sure there is only one line of text in this file.

Upload the key to a Linux server:

Open WinSCP,
Select the SFTP file protocol and log in with your SSH credentials.
On success, you see the home directory structure at your remote machine.

Upload authorized_keys file to the home directory at the remote machine.

Set proper permissions:
Make a .ssh directory (if it does not exist)
Copy the authorized_keys file to the .ssh directory (this will replace any existing authorized_keys file; take note of this).
If the file exists, simply add the contents of this file to the existing file.
Run commands to set permissions:
 sudo chmod 700 .ssh && chmod 600 .ssh/authorized_keys

Now you will be able to ssh into a remote machine without entering credentials every time.
Further reading:

Generating and uploading SSH keys under Windows

Authentication without password using OpenSSH Key, certificates .pem and .pub


Eclipse won't work in 12.04 64 bit I just finished upgrading my ubuntu

I had eclipse installed from terminal using apt-get install eclipse

Now I'm getting the following error

  An error has occurred. See the log file
  /home/toluwanimi/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1336830746877.log.

Please how do I go fix this

I've tried most of the fixes on this site but they don't seem to work for me

Here's the log

!SESSION 2012-05-12 14:52:26.563 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_02
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2012-05-12 14:52:29.469
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        no swt-gtk-3740 in java.library.path
        no swt-gtk in java.library.path
        Can't load library: /home/toluwanimi/.swt/lib/linux/x86_64/libswt-gtk-3740.so
        Can't load library: /home/toluwanimi/.swt/lib/linux/x86_64/libswt-gtk.so

        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
        at org.eclipse.swt.internal.C.<clinit>(C.java:21)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
        at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java1386)

have you installed different versions of java rather than 1.7.x? it may be confused to eclipse, just see this link to re-configure your java environment.

To fix, open up terminal and type

sudo update-alternatives --config java

https://stackoverflow.com/questions/10165693/ubuntu-eclipse-cannot-load-swt-libraries-not-opening

In addition, I recommend install java and eclipse with self-extract files, it's easy to re-configure and can have multiple versions of them. Hope it helps.

Try with this command:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/


Can't boot from disk I've just bought a stick to download the latest version of Ubuntu Desktop. I downloaded the program from Ubuntu and it is now on the stick.
I downloaded it and I see both the file and the ISO file. I open the file folder and all files are listed include "Install" I click on that file and a mt86plus comes up....

I am then asked how do you want to open this file, I tried opening it with 7-Zip and nothing...

Any suggestions?

You will need to create a bootable usb media according to these instructions.

So i had problem booting ubuntu from USB Stick(Flash Drive) too.

Be sure your flash drive is bootable, you can see how to make a
bootable flash drive here.
If you still can't boot from flash drive you must do a bootalbe DVD.
You can see <a
href="http://www.ubuntu.com/download/desktop/burn-a-dvd-on-windows" rel="nofollow">here
how to do.


Install ubuntu 14.04 and windows 8 in different hard drives I use Ubuntu 14.04 as my operating system and recently I bought a new hard drive where I want to install windows 8.

How I can install 8 in the second hard drive and then be able to boot them from the Ubuntu grub?

Test this:

Insert the second hdd.

Check it is /dev/sdb and Ubuntu hdd is /dev/sda.

If not so, change the ide/sata wires.

Disconnect Ubuntu hdd.

Install Windows.

Connect Ubuntu hdd.

Boot Ubuntu.

Open a terminal.

And run:

sudo -i
update-grub

Windows should enter the Grub menu.

Firstly setup the Win8 to a free-space on your HDD.
Then Use a Live any Linux CD/DVD/USB for the Boot Menu.
You need to install GRUB.
You'll se if you put your Live CD to your computer.


KDE Connect: Can't start media after pause I am using Kubuntu. I have upgraded KDE Connect to version 1.3.3 and in my Android mobile, I am using KDE Connect version 1.10.1. Everything works fine (including file transfer). But if I pause a video from mobile or PC it doesn't matter, I can't start it from my phone. The button was grayed out. I have uploaded screenshots:

Before pause

and

After pause

Well, I have uninstalled KDE Connect from my computer and installed GSconnect instead. The problem gone, also I get some more features like controlling computer's volume level.


How to install driver for ReakTek rtl8821ce with NO ETHERNET PORT I just bought a new HP 15-ef0875ms laptop and am trying to install Xubuntu 18.04.4. The network card is not recognized.

Steps I have taken:

I downloaded the driver using other answers here.
I tried to build the driver. make is not installed.
I tried to install make. I don't have build-essential, gcc, g++, or other installed.
I tried to install those. Dependency hell ensues. Eventually it tells me I can't install dpkg-dev because of libdpkg-perl version being too new.
I am lost.

What can I do without any internet access of any kind on the machine itself?

You can always go online on any system having a USB port.

Connect your phone with a USB cable and turn on USB modem mode there.

It is a lot easier for a newbie that to manually install many packages with dependencies.

Borrow modern phone and use @Pilot6 user's advice
Download all required packages using this method:

apt-get --simulate install build-essential 2>&1 | grep "^  [a-z0-9]" | sed 's/^T.*$//g;s/ /\n/g' | tee packages.txt

Using packages.txt file you could make a script to automatically download these packages on system with working network adapter through wget.
Copying packages from cache on machine with internet:

Duplicate installation on PC with network access
sudo apt clean && sudo apt update && sudo apt upgrade && sudo apt install make gcc build-essential
sudo cp /var/cache/apt /your/usbdisk/ on machine with internet
cd /your/usbdisk/apt && sudo dpkg -i *.deb

Create customized Ubuntu 18.04 distribution enabling required build packages
And also, maybe driver could be compiled on the other machine with the same kernel...


How do I get to work my Atheros AR9485 Wireless card in Ubuntu 14.04 LTS? I've recently installed Ubuntu 14.04 LTS in my ASUS D550CA, and so far things have gone great.

The only problem I've got is the Wi-Fi. It doesn't work.

I've got an Qualcomm Atheros AR9485. I've tried installing the drivers, but the sytem says it doesn't find any.

So I started looking around this forum for solutions.

I've read every single post from this forum about my Wi-Fi network adapter, and I've found nothing that solves my problem.

Let me give you some info about my configuration.

Disclaimer: my configuration is in spanish, so if you don't understand something you can either use Google translate, or use your imagination. :D

When I run $ sudo lshw -C network this is what I get:

*-network DEACTIVATED
   descripción: Interfaz inalámbrica
   producto: AR9485 Wireless Network Adapter
   fabricante: Qualcomm Atheros
   id físico: 0
   información del bus: pci@0000:02:00.0
   nombre lógico: wlan0
   versión: 01
   serie: 28:e3:47:5c:5d:3f
   anchura: 64 bits
   reloj: 33MHz
   capacidades: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
   configuración: broadcast=yes driver=ath9k driverversion=3.13.0-34-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
   recursos: irq:17 memoria:f7d00000-f7d7ffff memoria:f7d80000-f7d8ffff
  *-network
       descripción: Ethernet interface
       producto: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
       fabricante: Realtek Semiconductor Co., Ltd.
       id físico: 0.2
       información del bus: pci@0000:03:00.2
       nombre lógico: eth0
       versión: 06
       serie: e0:3f:49:ce:57:49
       tamaño: 100Mbit/s
       capacidad: 100Mbit/s
       anchura: 64 bits
       reloj: 33MHz
       capacidades: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuración: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8402-1_0.0.1 10/26/11 ip=181.165.245.39 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       recursos: irq:41 ioport:e000(size=256) memoria:f0004000-f0004fff memoria:f0000000-f0003fff

At the beginning, you'll see that it says "*-network DEACTIVATED" (or at least that's what I translated), is that something bad?

Then, when I run ipconfig this is what I get:

eth0      Link encap:Ethernet  direcciónHW e0:3f:49:ce:57:49
          Direc. inet:181.165.245.39  Difus.:181.165.245.255  Másc:255.255.255.0
          Dirección inet6: fe80::e23f:49ff:fece:5749/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:221199 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:62025 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000
          Bytes RX:124409589 (124.4 MB)  TX bytes:7471899 (7.4 MB)

lo        Link encap:Bucle local
          Direc. inet:127.0.0.1  Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO  MTU:65536  Métrica:1
          Paquetes RX:2977 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:2977 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:0
          Bytes RX:397158 (397.1 KB)  TX bytes:397158 (397.1 KB)

When I put iwconfig:

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=off
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

Finally, when I put sudo rfkill list all, I got:

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

I hope anyone can help me solve this, I've searched a lot and found no solution.

Thanks a lot.

Your wireless is blocked by the wireless switch or key combination; please see:

  Hard blocked: yes

Please try the key combination, Fn+F2 or similar and run again:

rfkill list all

Any change? If not, is the module asus_nb_wmi loaded? Check:

lsmod | grep asus

If so, please try:

echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus.conf

Reboot and see if your wireless key combination is working as expected.

Encountered the same problem today on a headless Ubuntu 12.04 server with PCI Qualcomm Atheros AR9485 wlan. I believe that unblocking with rfkill should solve it.

rfkill unblock all

However, I could not even get Internet access to install rfkill. So, while installing Ubuntu 14 server on the same machine, I chose the Qualcomm Atheros AR9485 as the primary NIC and it connected to a wireless router during configuration. If its still disabled after you complete installation, you may have to include it in network interfaces

sudo nano /etc/network/interfaces

then append

auto wlan0
.....

Remember to include the essid(case sensitive), IP,and wep/wap security (google that)


Make Cairo Dock update like launcher does Is there anyway to make the Cairo Dock mirror the launcher? Such as showing programs when they're open?

Right-click on the dock and choose Cairo-Dock > Configure.  In the "Behavior" group click on "Taskbar".  There you will find the option to "Show currently opened applications in the dock".  There are also a variety of other options there related to open application icons.

This is in the advanced configuration.
In the simple configuration, just select "integrated" for the type of taskbar.


Loop in "failed to start Snappy Daemon" I'm not really experienced with Ubuntu and do not have a clue what to do in the current situation.

My system currently has two boot states:

Does not boot at all. Going to different console by ctrl+alt+f2 shows that it tries to start Snappy daemon in the loop. It waits for it to be started for 90 seconds, then stops it and tries to start again.

snapd.service log
Fails to start GUI, but different console ctrl+alt+f2 loads terminal where I can execute commands. I'm not sure exactly how to go into that state from the first one. Perhaps by pressing Ctrl+C several times sometimes helps after restart.

syslog

In the second state it complains about:

WARNING: IceLockAuthFile failed: File exists

I found this Debian bug report and tried to delete /var/lib/gdm3/.ICE* and then restart the system as suggested there, but this returns me to the first state.

Ubuntu version 18.04 LTS

Open ubuntu recovery mode and select boot options on the box then just type on the terminal this line

 sudo dpkg --configure -a


USB drive are not mounted automatically My USB Drive is not mounted automatically but it has detected through lsusb.

I also used dconf-Editor but it is not working. Every time I have to mount manually through Disk Utility.

A complete description for configuring auto-mount is given here:

https://help.ubuntu.com/community/Mount/USB

If this does not help, please insert your usb-stick and post the last lines of dmesg and syslog.

Opened Disks / GParted apps may result in not working USB automount at time of testing.
Try to close these apps and then re-plug USB flash drive.


How much space does Ubuntu automatically take when installing alongside Windows> If I don't partition my drive before installing and I choose to install alongside Windows 10, how much space will Ubuntu automatically take?

If I do create a partition, how do I also create a swap partition for it?

Will it automatically create a swap partition?

During the installation process, you get to decide how big the new partition should be, no automatic formatting is done.

There are no swap partitions any more, in recent releases they have been replace by swap files that grow and shrink in size dynamically.

According to their System requirements, you will need 5 GB of disk space minimum.

I installed Ubuntu 18.04 alongside Windows 10, I did not partition the disk and the installer didn't ask me to. After installation I could see it had created a 35GB partition on my 500GB HDD and installed to that.


Fatal Python error: Py_Initialize: Unable to get the locale encoding ... SyntaxError: invalid syntax Aborted (core dumped) I installed anaconda by running the

bash Anaconda-2.2.0-Linux-x86_64.sh

command on my Ubuntu 14.04 system , which installed successfully, after which I was asked to export my new /home/username/anaconda/bin $PATH environment variable.

On doing so, I was able to use all of anaconda's features including the IDE's as well as use all conda based commands successfully.

The next time I booted up my system, every miss-typed command saw a

Fatal Python error: Py_Initialize: Unable to get the locale encoding
  File "/usr/local/lib/python2.7/encodings/__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax
Aborted (core dumped)

error. (All commands except python to be specific)

On following a few stackexchange and askubuntu posts and also noticing that my $PYTHONPATH had been set to usr/local/lib/python2.7, I tried to

export PYTHONPATH=$PYTHONPATH:/home/username/anaconda/lib/python2.7

but it didn't help.

This had me go through a entire saga of package removals and reinstalls,  and of course, a lot of updates and upgrades, to try and fix the problem by myself.

conda info -a returns:

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: <not set>
CONDA_ENVS_PATH: <not set>
LD_LIBRARY_PATH: <not set>
PATH: /home/username/anaconda/bin:/home/username/Scala-sbt/sbt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/username/bin:/usr/local/java/jdk1.8.0_20/bin
PYTHONHOME: <not set>
PYTHONPATH: /usr/local/lib/python2.7:/home/username/anaconda/bin/python

The command

which python

returns

/home/username/anaconda/bin/python

and

echo "$PATH"

returns

/home/username/anaconda/bin:/home/username/Scala-sbt/sbt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/username/bin:/usr/local/java/jdk1.8.0_20/bin

I know it's something to do with the way I set the path variables, specifically in the ~/.bashrc in which Anaconda automatically prepended my /home/username/anaconda/bin folder to the $PATH variable (This happened during a second installation of Anaconda after I removed it first).

I haven't modified any other environment variable in either ~/.profile or ~/.bashrc.

I added the export $PYTHONPATH line to my ~/.bashrc before restarting.

All of Anaconda's features work now, although the same Fatal Python error: Py_Initialize: Unable to get the locale encoding error keeps showing up instead of the usual unknown command error, for most mistyped commands.

I will keep looking into this and edit my answer (or refer to existing answers, if any) as soon as I find out why this happens.

I would recommend unsetting PYTHONPATH. It is generally not needed, and it causes things to break like this by making one Python load things from another Python (in this case, it looks like the system's Python 3 is trying to load something that was written for Python 2).

I had a similar issue on windows - I deleted the PYTHONHOME system variable.
I will try to translate the solution into English. My Computer > Properties > Advanced System Settings > Environment Variables, look for the variable PYTHONHOME and delete it.


How to lock without turning the screen (monitor) off? Due to a recent bug, each time my screen turns off, I cannot get it back on.

Currently, the screen starts turning off after the computer is locked - which effectively means that I cannot lock my computer without having to completely restart it.

Is there a way to lock it, but without the monitor going to sleep/off?

If you need or want a solution that prevents the screen to fall asleep, but that does dim/lock the screen after a while, there is another solution: instead of the system's own dim/lock option, use the script below to run in the background. You will need to install xprintidle.

How to set up:

Disable all dim / lock options in System Settings. (In Brightness & lock AND in "Energy" settings)
install xprintidle:

sudo apt-get install xprintidle

Find your screen name; run in a terminal:

xrandr

Look for the name in the line where it says "connected". Your screen name could be for example VGA-1 or DVI-I-1.
Copy the script below, set the correct screen_name, the idle time before it should lock/dim the screen, and paste it into an empty file. Save it aslock_dim.py

The script

#!/usr/bin/env python3

import subprocess
import time

seconds = 600 # number of seconds to wait before lock/dim the screen
screen_name = "DVI-I-1" # example, replace it with your screen's name

awake = True

while True:
    curr_idle = subprocess.check_output(["xprintidle"]).decode("utf-8").strip()
    if awake == True:
        if int(curr_idle) > seconds*1000:
            command1 = "gnome-screensaver-command -l"
            command2 = "xrandr --output "+screen_name+" --brightness 0.1"
            subprocess.call(["/bin/bash", "-c", command1])
            subprocess.call(["/bin/bash", "-c", command2])
            awake = False
        else:
            pass
    elif awake == False:
        if int(curr_idle) > seconds*1000:
            pass
        else:
            command3 = "xrandr --output "+screen_name+" --brightness 1"
            subprocess.call(["/bin/bash", "-c", command3])
            awake = True
    time.sleep(2)

Test the script by opening a terminal and type:

python3 /path/to/lock_dim.py

If it works as you like, add it to your startup applications: Open Dash > "Startup Applications" > "Add", add the command:

python3 /path/to/lock_dim.py

Go to System preferences > Brightness & lock, then change "Turn Screen off when inactive" to Never.

Now click on setting icon from top right click on you account username your screen will be locked and never sleep.


Moving / from SSD to HDD My current installation of Ubuntu 14.04 is done partly on a SSD and a HDD.
The file systems /home/ and /usr/share are on the HDD and the rest is on the SSD. But I am running out of space on the SSD now which is indicated through a popup error and also the upgrade to 15.04 can not be done due to not enough disk space on the root dir.

I thought that the best way to solve this is simply to move everything from the SSD to the HDD? But I am not entirely sure how to accomplish that correctly!

Here are the outputs of df -h:

Filesystem          Size  Used Avail Use% Mounted on
/dev/sdb2            15G   13G  1.1G  93% /
none                4.0K     0  4.0K   0% /sys/fs/cgroup
udev                3.8G  4.0K  3.8G   1% /dev
tmpfs               766M  1.4M  764M   1% /run
none                5.0M  4.0K  5.0M   1% /run/lock
none                3.8G   96K  3.8G   1% /run/shm
none                100M   64K  100M   1% /run/user
/dev/sda4           205G  6.5G  188G   4% /usr/share
/dev/sda3           481G  203G  255G  45% /home
/home/dan/.Private  481G  203G  255G  45% /home/dan

and from fdisk -l:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00098003

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848  493502463  493295616 235.2G  7 HPFS/NTFS/exFAT
/dev/sda3        493502464 1518438399 1024935936 488.7G 83 Linux
/dev/sda4       1518438400 1953523711  435085312 207.5G 83 Linux

Disk /dev/sdb: 14.9 GiB, 16013942784 bytes, 31277232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x38b890f8

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb2  *     2048 31277055 31275008 14.9G 83 Linux

Please let me know if you need further information about the system!
System space of root /:

Your HDD use a msdos partition table that can only hold 4 primary partitions.

So your main problem is to make room for another partition on the HDD: this might mean delete(backup before !) a primary partition to create an extended partition and be able to create logical partition inside it.

Then once you have room on HDD, you can use gparted (from a live CD/USB) that can simply copy/paste the whole root(/) partition from SSD to HDD. And after a reboot, it should be ok.

Or you can attempt an in-place conversion from MBR to GPT partition table. But this is for expert: How can I change/convert a  Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

Note:
Why, oh why do you need 250Gb for /usr/share ?? Mine is only 1.5Gb here...


Unable to install msodbcsql17 on Ubuntu 18.04 I installed the sqlserver based on the Microsoft Documentation.
The following commands are executed correctly.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update
sudo apt-get install -y mssql-server

sudo /opt/mssql/bin/mssql-conf setup

systemctl status mssql-server

But when I try to install the SQL Server command-line tools,the following error occurs.

sudo apt-get install mssql-tools unixodbc-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going
 to be installed
           Depends: msodbcsql17 (< 17.4.0.0) but it is not going to be
  installed
 E: Unable to correct problems, you have held broken packages.

My operation system is Linux Ubuntu 18.04.1 LTS

After searching around, I have found the requested package, it is located on Microsoft Ubuntu 18.04 repository, in order to install the package you have to add the repo first.

This will install msodbcsql17 that correspond to Ubuntu 18.04, open up terminal and run:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main" | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt update
sudo apt install msodbcsql17

This issue was resolved here correctly on TechDirectArchive.

Root cause: The msodbcsql17 package have a different version of mssql-tools, both should have the same version

Solution: Update msodbcsql17 package running the following command

sudo apt-get install msodbcsql17

Formore infomation, see the link below
https://techdirectarchive.com/2020/06/22/error-installing-mssql-on-linux-unable-to-install-msodbcsql17-on-ubuntu/


How can I put quick launchers in the top-panel? How can I put quick launchers in the top-panel. There is space for many many useful launchers.

You can't put launchers on the top-panel; the top-panel is a part of the Unity Design .

and it it is not gnome-panel anymore, see this answer.

You can only install application indicators:

see What Application Indicators are available?

Simply Drag the application and Place on the panel ....That's it


Why do most of my drivers not load after updating kernel to 3.13.0-36? I recently upgraded my system with a new motherboard, and reinstalled Trusty to have an AMD64 system (old motherboard was 32-bit). Reinstallation (side-by-side), with 14.04.01 LTS went fine and new build was running well.

Then the Software Updater installed updates, including a new kernel (3.13.0-36-generic). On the next reboot I got a kernel panic. I tried a couple of times and found that the -36 kernel just wasn't working. Switching back to the original (3.13.0-32-generic) worked fine. I found that the -36 kernel was missing most of its ko files. Forcing a reinstall with apt allowed update-initramfs to succeed, and I tried another reboot.

This time, the -36 kernel booted, but left me with no network, no keyboard (USB), and no mouse (USB). Probably no sound as well.

Since then, I have tried uninstalling and purging the -36 kernel and reinstalling it and reupdating the ramfs and grub2 configuration. Still the same behavior: -32 works fine, -36 fails to load most drivers and leaves me at a login screen where I cannot log in.

Any suggestions on what to try next?

Thanks,
Paul

I have same problema here, my server didn't start with USB and network. I saw that package "linux-generic-pae" was missing. System 32-bit need this package, I found this Why are there so many "linux-" kernel packages on my machine, and what do they all do?.

This solve for me:
apt-get install linux-generic-pae


Lftp default timeout and retry? Where can I find the defaults for lftp? Eg net:max-retries and net:timeout.

I'm asking because I get some **** Data socket error (Connection timed out) - reconnecting message in my lftp debug log. And it seems to retry forever if I don't quit the process manually. Which is bad for cron jobs.

Questions:

How could I explicit set the timeout and retries for one special script, which is as follows:

lftp -c "
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --delete --verbose $FSOURCE $FTARGET
exit
"

And how could I catch any sync errors in the batch file above, so that I could eg send an email notification on max timeouts?

Still I don't know how to find out the defaults. But could change them as follows:

lftp -c "
set net:timeout 5;
set net:max-retries 3;
set net:reconnect-interval-multiplier 1;
set net:reconnect-interval-base 5;
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --delete --verbose $FSOURCE $FTARGET
exit
"

/etc/lftp.conf

This is the default settings file for lftp on our systems.

You can simply add lines to this as per the settings in membersound's answer above.


Root partition is full. No unallocated space. Home partition almost empty. Resize? so when I installed Ubuntu I followed a tutorial that suggested allocating 10-20gb for the / partition so I did. Well I ran out of that space on the first day and I've been struggling a LOT with getting these damn nvidia drivers/cuda drivers to work properly so I don't want to reinstall... So my question is, is it possible, and if so how, to shrink (or delete it completely and just create a new one?) my 200gb /home partition and then allocate about half of that to the root partition? I have 20gb swap, 20gb for root and 200gb for home and that's the whole disk.

I was able to downsize home...

but I can't increase the size of root.

You will have to move the home partition to the back end of the free space - to the right. Then you can expand root into the now free space.

Partitions can be resized by common partition editors (GParted, KDE Partition Manager, etc.), but this can only be done when the partition is unmounted.  You effectively can't unmount your / and /home partitions when Ubuntu is running -- so you have a dilemma.

The solution is to boot from Live media (like the USB or DVD you originally installed from), and use the partition editor in the Live media to do exactly what you suggest -- shrink the /home partition on the left, then expand the / partition to use the freed space.  Since shrinking on the left will require moving data, expect the operation to take some time -- possibly an hour or more, depending on the amount of data present -- but once that's done, expanding / should take only a few minutes.


Cannot update Ubuntu 14.04 : apt-get issues I am trying to update Ubuntu 14.04. But sudo apt-get update is returning the following errors.

0% [Connecting to in.archive.ubuntu.com] [Connecting to archive
0% [Connecting to in.archive.ubuntu.com] [Connecting to archive
Err http://in.archive.ubuntu.com trusty InRelease
Err http://archive.canonical.com trusty InRelease
Err http://extras.ubuntu.com trusty InRelease
Err http://in.archive.ubuntu.com trusty Release.gpg

Could not resolve 'in.archive.ubuntu.com'
Err http://archive.canonical.com trusty Release.gpg

Could not resolve 'archive.canonical.com'
Err http://extras.ubuntu.com trusty Release.gpg
Could not resolve 'extras.ubuntu.com'
Reading package lists...Done
W:Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W:Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/InRelease
W:Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg
Could not resolve 'in.archive.ubuntu.com'
W:Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/Release.gpg
Could not resolve 'archive.canonical.com'
W:Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/Release.gpg
Could not resolve 'extras.ubuntu.com'
W:Some index files failed to download.They have been ignored or old ones used instead.

I am facing with same problem. From the errors you can see that you are using the Ubuntu Server in India. Change the update server to something other than India.
Go to Setting > Software & update --- under Ubuntu Software tab, find the drop-down list to choose the server for downloading updates from. Choose main server.

See this:

Repository[prbm]

        There is a spelling mistake on your link on sources.list it will be present on a directory (/etc/apt/). There you will be able to see the file called sources.list and sources.list.save. Manually copy the contents of file sources.list.save to sources.list. Else use following commands on terminal.(Make sure that you logged on root permission / You need to know the administrator password).

sudo rm /etc/apt/sources.list
sudo cp /etc/apt/sources.list.save /etc/apt/sources.list
sudo apt-get update
sudo apt-get update --fix-missing

I hope it will works fine..


Ubuntu 14 wifi not working I have a problem with wireless connection on ubuntu 14.04. I guess I should install some drivers but still can't figure it out. Some types and responses from terminal:

lspci | grep Network

I get empty message.

ifconfig wlan0

I get

wlan0: error fetching interface information: Device not found

I typed bcm in software center and downloaded the driver but it doesn't appear in Software & Updates in system settings. Any ideas how to get it working?

EDIT:
lspci -nn | grep 0280 Empty result. lspci -knn | grep Net -A2 also empty result. Here's the result of lspci:

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)

If this is an info here, I run ubuntu on virtualbox on windows 7.

If you run Ubuntu in Virtualbox, then you do not need to setup wireless connections there. It will use host system connection.
Guest system does not directly use network hardware, unless it is a USB dongle, which you passed through to the guest system.

Try to install the "linux-firmware-nonfree" by typing:

sudo apt-get update
sudo apt-get install linux-firmware-nonfree

And then reboot. (it's worked for me)


What is the difference between a hard link and a symbolic link? As the title says, I would like to know the difference between a hard link and a soft link created by the command ln. The command man ln does provide information, but does not sufficiently answer my question.

Also, it would be nice if someone could provide a setting where hard link might be preferable over a symbolic link.

"A picture is worth a thousand words."

And, "An example is worth a hundred paragraphs..."

Create two files:

$ touch blah1
$ touch blah2

Enter some data into them:

$ echo "Cat" > blah1
$ echo "Dog" > blah2

And as expected:

$cat blah1; cat blah2
Cat
Dog

Let's create hard and soft links:

$ ln blah1 blah1-hard
$ ln -s blah2 blah2-soft

Let's see what just happened:

$ ls -l

blah1
blah1-hard
blah2
blah2-soft -> blah2

Changing the name of blah1 does not matter:

$ mv blah1 blah1-new
$ cat blah1-hard
Cat

blah1-hard points to the inode, the contents, of the file - that wasn't changed.

$ mv blah2 blah2-new
$ ls blah2-soft
blah2-soft
$ cat blah2-soft
cat: blah2-soft: No such file or directory

The contents of the file could not be found because the soft link points to the name, that was changed, and not to the contents.
Similarly, If blah1 is deleted, blah1-hard still holds the contents; if blah2 is deleted, blah2-soft is just a link to a non-existing file.

source: blatantly copying it from StackOverflow!

It's very simple. Files (and directories!) are stored at addresses on the block device (HDD or whatever). Normally you have a single name mapped to an address, and that's how you get your file. A hard link is a second, third, etc name mapped to the same address. A symbolic link instead refers to the symbol - the name - and so is a second name mapped to the first name. As far as the kernel is concerned, once it reads the symbolic link target it stops and goes back to the beginning with the target value as the filename (more or less) so relative symlinks are possible but wildly unhelpful. The target name is not used above the filesystem level except if it's explicitly queried in userspace code.


Installing Flash during system installation Why is it we don't give the user the option to install the Flash plugin during installation when we do install the Fluendo MP3 codec? Flash is just as essential to an average user's browsing experience as MP3 playback is to their audio experience. Are the nature of the restrictions different, or is this just an oversight?

As a matter of fact, the option to pre-install Flash does exists in the Ubuntu installer. The following dialogue will be presented to the user during installation, and checking the second option will install it for you.

Because flash is closed source,but free and Adobe has very specific rules in their EULA that control who(Themselves) can distribute it and who can't (everyone else).


Lost all the data after installing Ubuntu 12.10 I installed Ubuntu 12.10 on my Laptop. While installing two options were available:

Install Ubuntu alongside Windows 7
Replace windows 7

My Laptop had 3 drives. Windows 7 was installed on C: drive and there was data on other two drives. I chose option to Replace Windows 7.

But now in Ubuntu, there is only one drive. Its size is approximately equals the hard-disk size and it is almost free, so it seems like all the data is lost.

Could anyone please help me on this? Would it be possible to recover the lost data?

You may use testdisk.

First and foremost stop using the system!

Boot a live DVD or live USB, install testdisk and run it. Try the Recover partitions option.

It's your best bet.

with Live CD first create the image of your hard disk..

Fire up the terminal and run:

dd if=/dev/sdX of=/dev/sdY conv=noerror

where X is your hard drive and Y is the external drive in which you are creating image ..

and after the image creation .. mount the image in any linux system and do the recovery..


Trying to disable mouse accel and I have a question Can someone tell me how do I figure which of these 2 is actually my mouse so that I can actually turn off mouse accel ? .Why the hell does it show 2 A4TECH USB DEVICE?

virtual core pointer is going to be you mouse.


How do I get to terminal after upgrading to 13.10 I upgraded from 13.04 to 13.10 and now when system starts it goes to a black screen.

I believe that the problem is related to the drivers for the NVidia graphics cards.

How can I get to a terminal so as to disable the updated driver??

Thanks

Try Strg + Alt + F1 to open the console even if you're not logged in.
You might need to add a function key if you are on a laptop.


How can I disable quick search in unity file explorer? When I'm exploring files and folders, and type some character, I would like, instead of open a search, to jump over the file or folder containing the name of the pressed key.

Sorry about my poor English explanation..

Thanks!

The issue is resolved in 14.04; wait for its release.


Ubuntu 18.04 "Super+O" can't trigger shortcut event I'm using Ubuntu 18.04 and I used xmodmap to changed left Alt as "Meta_L" and bind it solely to "mod4" (meaning I did remember to remove "Mod1" from Meta_L), the end result is left Alt behaves like "Command" in Mac OS so I can use the same keyboard shortcuts of IntelliJ and Sublime Text as I do in Mac OS.

However I found out that for whatever reason, "Super + O ('Oh' not '0')" or "Super + Shift + O" binding can't produce the shortcut event. At the same time "Super + B", "Super + Shift + up" and etc. all work as expected.

I was wondering if "Super + O" is system shortcut that override the application shortcut but after some research I can't find any.

At last, I used the same technique in Ubuntu 16.04 too and every thing works as expected.

Hope someone can share their experience and idea on this, thanks a lot!

I ran into this problem (Ubuntu 19.10) and found this page. I was trying to use Super+O for a shortcut but it didn't work. Thanks to Anbu's answer showing gsettings I was able to figure out what was grabbing the key:

(for schema in $(gsettings list-schemas); do gsettings list-recursively $schema; done) | grep '<Super>o'

It showed org.gnome.settings-daemon.plugins.media-keys rotate-video-lock-static ['<Super>o'] so I removed it with

gsettings set org.gnome.settings-daemon.plugins.media-keys rotate-video-lock-static []

I restarted and was able to use the key again. I found lots more unwanted bindings with

(for schema in $(gsettings list-schemas); do gsettings list-recursively $schema; done) | grep '<Super>'

and then removed them with gsettings set …

I end up re-installing 16.04 LTS and everything works as expected.


Difference between "bootable flag" and /boot mount point In partition table, we can give /boot as mount point. But we can, too, toggle bootable flag. What's difference between those two?

As for boot flag, see here. It is usually not needed for Ubuntu installation.

Boot mount point is the partition you mount your /boot to, if you use a separate /boot partition. If you do not have a separate /boot partition, /boot is just a directory under /. See here for more about partitions and mount points used in Ubuntu installation.

The /boot mount point specifies the location to install the bootloader (GRUB, Syslinux), to be used by legacy BIOS-based systems in order to boot when the actual boot device contains a GUID Partition Table (GPT).

A boot flag, on the other hand, is a 1-byte value in a non-extended partition record, within a master boot record. Its primary function is to indicate to a MS-DOS/MS Windows-type boot loader which partition to boot.

If you have an MBR (Master Boot Record) type partition table, all you need to do is to set a boot flag on the root filesystem /. However, if you have a GPT partition table, you need to create a separate BIOS boot partition and install GRUB to it.


My Opera can't play videos I am using Opera 68.0.3618.125 on latest Ubuntu version. But I can't watch videos. For example on Twitter. Everyone says get libffmpeg.so and copy to /snap/opera/current/usr/lib/x86_64-linux-gnu/opera but I can't access this file even I'm in root access. Please help me.

Install ffmpeg, which will install the missing shared library libffmpeg.so:
sudo apt install ffmpeg

Sorry for this late answer, I had only just realised my suggestion which I was not 100% certain about worked for you. But here it is.

Yes, it's all about the libffmpeg.so file. I had to download it from a previous version of Ubuntu as explained in this post The Videos Don't Play Topic as none of the files in 20.04 worked.

I did some research and replaced libffmpeg.so with the one I downloaded from https://packages.ubuntu.com/xenial-updates/amd64/chromium-codecs-ffmpeg-extra/download

Find and extract libffmpeg.so in the downloaded package, then save it as libffmpeg.so in /usr/lib/x86_64-linux-gnu/opera (the path may vary), replacing the existing file if it is there. You will need to do this with root privileges.


USB not showing at all in Ubuntu 16.04 I am having tones of troubles with Ubuntu recently.My USB which I use to boot many distros,is not working.I plug it in again and again but no success.When I do lsusb it shows as abcd 1234 Unknown and I do not know what to do.I tried using a Windows computer but still no success.

If someone can help me that will be awsome!

Thanks#1

There are many reasons why this may be occurring. Being that you said that you use it to boot many distributions it may be that your file system is incorrect, and it is causing you the issue. The other reason why it may not be working is because the USB disk is flat out worn out. Constantly reading and writing over time can lead to the end of the USB's life.


Cant install Ruby on Ubuntu 16.04 LTS Can't install Ruby via

sudo apt-get install ruby-full

The following packages have unmet dependencies :
Ruby, ruby-dev, libtcltk-ruby,  ri

E: Unable to correct problems, you have held broken packages.

## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://am.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://am.archive.ubuntu.com/ubuntu/ xenial universe
deb http://am.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://am.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://am.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://am.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://am.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://am.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://am.archive.ubuntu.com/ubuntu/ xenial-backports restricted universe multiverse
# deb-src http://am.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
~

It looks like you're missing the first lines from your /etc/apt/sources.list file.  Put them in manually at the start of your file:

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://am.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://am.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://am.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://am.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://am.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://am.archive.ubuntu.com/ubuntu/ xenial universe
deb http://am.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://am.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to

I know this looks a little funny, but I'd say that's what's lacking in your file.  Copy and paste these to the top of /etc/apt/sources.list and run sudo apt-get update and then try your install.

Using rbenv with ruby-build plugin typing:

$ rbenv install 2.x.x

For installing rbenv, see instructions at GitHub Project's page.

See also the ruby-build project page.


Can't get unity to work on virtualbox ubuntu 11.10/12.04b guest I haven't been able to get 3d acceleration to work properly on my VBox guest, no matter what I do I always get fallback unity 2d mode, here's what I've tried:

Enabled "3d acceleration" on VBox settings, set video memory all the way to 128mb.
Installed vbox guest additions, checked to see if there was any guest additions pre-installed first, it didn't throw any errors
Enabled "Oracle VirtualBox Guest Additions for Linux Module" in "Additional Drivers"
Ran "unity --replace"

Nothing seems to work, I'm using VBox 4.1.10. The guest additions seem to work partially though, before I install them if I maximize my ubuntu guest window it doesn't resize up but after installing them the desktop does resize correctly but I'm stuck in unity 2d (I also tried installing gnome-shell and it also threw me in fallback mode)

Anyone knows what could be wrong? Thanks in advance!

EDIT: Looks like it's not a problem with Unity but VirtualBox, I tried with mint, arch and debian and all DEs switched me to fallback mode

I have installed both Ubuntu 11.10 and 12.04 it doesn't need any additional settings as far as I recollect. So now the question is that have you tried the same ISO installer some where else. I doubt if the installer itself is not able to install required packages. Or try to update the system if you have not done it yet.


Compiling Mame 0.170 on Ubuntu 15.10 when trying to compile mame 0.170 I get the following error:

m1xalis@m1xalis-HP-Compaq-6830s:~$ cd .mame
m1xalis@m1xalis-HP-Compaq-6830s:~/.mame$ make
GCC 5.2.1 detected
Compiling src/osd/modules/debugger/debugqt.cpp...
../../../../../src/osd/modules/debugger/debugqt.cpp:18:34: fatal error: QtWidget
s/QApplication: No such file or directory
#include <QtWidgets/QApplication>

compilation terminated.
qtdbg_sdl.make:361: recipe for target        '../../../../linux_gcc/obj/x64/Release/qtdbg_sdl/src/osd/modules/debugger/debugqt.o' failed
make[2]: *** [../../../../linux_gcc/obj/x64/Release/qtdbg_sdl/src/osd/modules/debugger/debugqt.o] Error 1
Makefile:16: recipe for target 'qtdbg_sdl' failed
make[1]: *** [qtdbg_sdl] Error 2
makefile:1025: recipe for target 'linux_x64' failed
make: *** [linux_x64] Error 2

This is a new install and upgrade to ubuntu wily. I had previously compiled mame 0.169 on ubuntu trusty tahr using gcc 4.9 (I think). Any help/suggestions would be appreciated.

I found that I needed to add this to the makefile:

QT_HOME = /usr/lib/x86_64-linux-gnu/qt5/

This was actually on Debian jessie, not Ubuntu.  The directory on your system may or may not be the same.  But it shouldn't be too hard to locate.

It Works fine for me, compiling Mame 0.172 on Linux Mint 17.3!

(with qt5-default package installed previously

sudo apt-get install qt5-default

and executing on terminal this:

export QT_SELECT=qt5

(for Qt5 version as default on system))


How can I find the version of Ubuntu that is installed? I installed some version of Ubuntu on my VMware, but I don't know what version exactly it is. How can I find it out?

Your version of Ubuntu can be determined by opening System Settings and then opening the System Info or Details (from 12.04) section:

This page will also tell you whether you have the 32- or 64-bit version of Ubuntu installed, as well as what processor and graphics you have, the amount of RAM installed, and your disk capacity.

You can get this info from a terminal with the command:

lsb_release -a

  Credit in part to htorque and WarriorIng64

[Note: for versions before 11.10, e.g. 11.04 this is not available this way, but see Roland's answer below for workable option (basically use the 'System Monitor' icon instead]

Another way, from 2 starting points:

From the web browser’s address bar: ghelp:about-ubuntu
Run this command (Alt + F2): gnome-help ghelp:about-ubuntu

Both of them have the same effect as using the Main menu > System > About Ubuntu. They open the “Display application and GNOME system help” in a page giving the same information such as https://help.ubuntu.com/10.04/about-ubuntu/C/index.html (in the language in which you are using Ubuntu)


What are the differences between 32-bit and 64-bit, and which should I choose? What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.

If so, why not promote 64-bit over 32-bit?

I believe the main question when choosing between 32 and 64 bits is not "Does my processor support 64 bits — if so then I should use 64 because that's twice as good", but "How much memory do I have?".

64-bit programs use about 50% more memory then their 32-bit counterparts. The results of this are:

less code/data can fit into processor caches -> more cache misses -> your super-fast processor waits more for memory controller to fetch data from RAM. Processor also needs to read more data because it's more bloated.
Linux uses non-allocated RAM to cache disks. Less free memory available -> less space for disk caches -> slower disk access
Once you're out of RAM and the system starts swapping - disk access is thousands times slower than RAM, so any potential benefits of 64-bit code (see below) are flying out of window.

On the other hand, in 64-bit mode processor has more registers, so it doesn't need to access memory that often, also, some calculations (64-bit numbers etc.) are more efficient. So generally, code which is not memory-restricted runs slightly faster in 64-bit mode.

So, if your system has, say, 2GiB of RAM or less then I would definitely choose 32 bits. More than 4GiB - the benefits of 64 bits are becoming more prominent. Around 4GiB is a "grey zone" - you need to make a choice yourself.

Here are screenshots of a (rather old) vanilla Ubuntu running in a VirtualBox with 1GiB RAM:

32 bit: uses 388 MiB of RAM right after booting, no additional applications running (from the screenshot, 397780KiB, which is 388MiB)

64 bit: uses 491 MiB of RAM (from the screenshot, 503452KiB = 491MiB)

Additionally, in my testing, a web-application written in Python used up to 60% more memory on a 64-bit machine which resulted in a test suite running in 380 secs on a 32-bit machine but taking 523 seconds on a 64-bit one (both with 1GiB of RAM). If the machines were not RAM-limited the results would likely be different (as phoronix tests show).

Here are some more thorough and recent tests: http://kernel.ubuntu.com/~cking/x32/Quantal-x32-power-memory-comparisons.ods

Basically, it's like giving up 30% of your RAM in exchange of possible gain of 10% CPU speed.

Apart from being able to address more memory and possible speed improvements, you should download and install the 64-Bit version for your new UEFI capable machine that comes with Windows 8 or a newer version of Windows.

While 32-Bit support for UEFI systems is being worked on, there are currently no standard 32-Bit images available that boot in UEFI mode.


Xubuntu 14.04 disable desktop and panel I'm looking to test a Xubuntu 14.04 in the Library public lab.  I'm looking for an option to disable right click on the panel and desktop.

I google it and found something about the locking the panel: https://sites.google.com/site/easylinuxtipsproject/xfce#TOC-Lock-the-panels-kiosk-mode-

but this doesn't really work as expected.  My goal is to create a separate public account for xubuntu and had the public log on automatically.  The public user account will be restrict to create folders on desktop or disable right click on desktop and disable right click on panel or disable adding new icons on panel.

thanks in advance!

As noted by Xubuntu Project Leader in the #xubuntu-devel IRC channel, kiosk mode is not well supported in Xfce and is not a use-case that is considered high priority.  The Xubuntu Technical Leader noted in #xubuntu-devel that write-locking xfconf may solve the right-click issue.

I think you're looking for something like kiosk mode.  Here's a link:

Booting in kiosk mode


What exactly is this Shell Script doing? I want to know what this Shell Script does.

#!/bin/sh
for i in $*
do
echo "cat>$i<<'end of $i'"
cat $i
echo "End of $i"
done

I mean, how is it working?
Thanks!

This Script takes name of files as inputs and then print the content of those files in a format like this:

cat>FILE_NAME<<'end of FILE_NAME'
"Here goes the content"
End of FILE_NAME

To run this script

sh SCRIPT_NAME.sh fileA fileB fileC ....

The image illustrates more


How can I watch the NBC Olympics 2012 (USA)? I cannot log in to the nbcolympics.com (USA) site on Ubuntu. (I have tried on two computers, with Chromium and Firefox on each.) I choose "Click here to get started", then the site asks for my cable provider. I choose it, enter my password, and it appears to accept it. The next screen that loads again says "Click here to get started". If I click it and choose my provider, it doesn't even ask for my password, it just says signing in and the process repeats. A couple of points:

It works fine on Windows XP.
If I purposely enter a wrong password, it tells me so. This error only occurs if I have the password correct.

Has anyone been able to make it work?

As per this post on the Adobe website:

Step One: Install HAL

sudo apt-get install hal

Step Two: Quit your web browser

Step Three: Clean out the Adobe Flash folder:

cd ~/.adobe/Flash_Player
rm -rf NativeCache AssetCache APSPrivateData2

This process worked for me.  In my case, I'd been able to go to nbcolympics.com and click the log to begin the verification process, but never given the chance to enter my Comcast credentials.  Doing the steps above fixed everything.

Try:

Uninstall moonlight 2.0 plugin
Install moonlight 3.0
Play video


How to keep processes running after ending ssh session? Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?

You should look for modern alternatives like tmux.

tmux is superior to screen for many reasons, here are just some examples:

Windows can be moved between session and even linked to multiple sessions
Windows can be split horizontally and vertically into panes
Support for UTF-8 and 256 colour terminals
Sessions can be controlled from the shell without the need to enter a session

Basic Functionality

To get the same functionality as explained in the answer recommending screen, you would need to do the following:

ssh into the remote machine
start tmux by typing tmux into the shell
start the process you want inside the started tmux session
leave/detach the tmux session by typing Ctrl+b and then d

You can now safely log off from the remote machine, your process will keep running inside tmux. When you come back again and want to check the status of your process you can use tmux attach to attach to your tmux session.

If you want to have multiple sessions running side-by-side, you should name each session using Ctrl+b and $. You can get a list of the currently running sessions using tmux list-sessions, now attach to a running session with command tmux attach-session -t <session-name>.

tmux can do much more advanced things than handle a single window in a single session. For more information have a look in man tmux or the tmux GitHub page. In particular, here's an FAQ about the main differences between screen and tmux.

Instead of :

cmd options;

Add before nohup :

nohup cmd options &

Then, you will be able to see the console stdout by :

tail -f nohup.out


How do I install Java? How do I install Java, including in my browser, so websites with Java work?

There are several implementations of Java. The three most common implementations when talking about it for Ubuntu are:

OpenJDK: The primary goal of the OpenJDK project is to produce an
open-source implementation of the Java SE Platform (6 and 7). This is
the default version of Java that Ubuntu uses and is the easiest to
install.
Sun Java: Sun Java is the reference implementation for Java 6. Its support has been discontinued in Ubuntu.
Oracle Java: Oracle Java is the OpenJDK Java Se Platform version 7 implementation from Oracle. Oracle introduced with this implementation a license that prevents distribution.

Since Ubuntu 11.10 (Oneiric Ocelot) and due to license issues Ubuntu will no longer distribute Oracle's JDK and JRE. Also, previous versions supplied on PPAs suffer from security issues and are not recommended to be installed on any Ubuntu system.
There are no more supported .deb releases from Ubuntu with reference to Sun Java or Oracle Java, Ubuntu officially supports OpenJDK and OpenJRE implementation of Java which is the base for Oracle's own implementation.
OpenJRE is the official implementation of Java Runtime Environment (JRE) for your Ubuntu systems and should suffice to run any Java program that you might require and it's included in the main repository and it's easily installable.
OpenJRE
By opening a terminal and typing
sudo apt-get install default-jre

this installs openjdk-11-jre (at the time of writing this, you may install a newer java version in the future, which is now, if it installs a different openjdk version I guess)
The openjdk-11-jre package contains just the Java Runtime Environment. If you want to develop Java programs then install the default-jdk package:

Also important is to install the wrapper for supporting Java applications on your web browser, the Iced-Tea Java Plugin.
IcedTea Plugin

Or via a terminal
sudo apt-get install icedtea-plugin

Or look for icedtea-plugin in the Ubuntu Software Center.

To make sure that you are running the correct version of Java, use this command to set your choice:
sudo update-alternatives --config java

java -version should display the choice you previously made.

If you need to install OpenJDK-JRE 6 or OpenJDK-JDK 6
openjdk-6-jre (click to install) is available for installation for Ubuntu 8.04 (Hardy Heron) and up.
Install it with
sudo apt-get install openjdk-6-jre

Or if you need the developers' package, openjdk-6-jdk (click to install), install it with:
sudo apt-get install openjdk-6-jdk

A version of the icedtea-plugin (click to install) is also available to install if you are going to use OpenJDK 6.
Install it with:
sudo apt-get install icedtea6-plugin

If you really want to use Oracle's Java SE Platform, see How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?.

I made a text-based Java installer using terminal commands. It uses wget, tar, update-alternatives, and ln. It will install the Oracle JRE with the Firefox plugin.

You can download the installer from Google Drive here. Then put it in your home folder, open Terminal and type bash Install. Then it will run the installer in Terminal. It uses sudo, so you will need to type your password after it downloads. Also, this is the 64-bit version, so I will add the 32 bit later.


"autoreconf: not found" error during making qemu-1.4.0 I was ./configure'd the qemu-1.4.0 and during make it cause:

(cd /home/amin/Simulate/qemu-1.4.0/pixman; autoreconf -v --install)
/bin/sh: 1: autoreconf: not found
make: *** [/home/amin/Simulate/qemu-1.4.0/pixman/configure] Error 127

Now, I can't find how to pass this error.

Thanks.

I just had this problem myself, and the solution I found in reading the autoconf manual which states autoreconf runs autoconf which I did not have installed.

sudo apt-get install autoconf

and the autogen script I am using now works.

I used to search for package first:

# apt-cache search autoreconf
   autoconf2.13 - automatic configure script builder (obsolete version)
   dh-autoreconf - debhelper add-on to call autoreconf and clean up after the build

Then install what I need:

# apt-get install dh-autoreconf