How to get whatsapp as a desktop app on Ubuntu? Hi this is my second day using linux so I am a noob. But when looking for a solution for my question I found this question: Install WhatsApp webapp on Ubuntu the top ranked answer does nothing for me, I just end up with the text copied in a window.
I assume there are some obvious steps which I am missing as someone completely new to linux. I tried saving that file and finding it through terminal but the directory where it's supposedly saved doesn't exist.

Create the file in ~/.local/share/applications, so you don't have to mess with sudo:

Open gedit, paste the text shown in the answer you link, and save as <the name you prefer>.desktop, let's say whataspp.desktop, under the directory mentioned.

In the Exec line, you are telling which web browser to use, using the absolute path to the executable.

As said in the other answer, if you are going to use chrome, or chromium, you have to install it and change the line with the path to the executable. Use which google-chrome (or which chromium-browser) to check the path.

You'll first have to install Chrome to do this, because Firefox doesn't natively support installing websites as applications yet. To install Chrome, open a Terminal window and type:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo dpkg -i google-chrome-stable_current_amd64.deb

Type in the admin password if asked. Now, open WhatsApp Web in Chrome, and sign in. After signing in, click on the options button in the top right corner, click on "More tools", then click on "Create shortcut...", and click on the checkmark that says: "Open as window", then click on "Create"
Now, open the apps screen or the Activities overview, and type "Whatsapp" in the search bar, then right click on the WA icon, and click on "Add to favourites". Done!


How do I change the font size / zoom level in the project/package explorer in Eclipse version: 2019-12 (4.14.0)? I am using ubuntu 18.04 . I only want to change my project explorer's zoom level or its font size. Currently I think the project explorer is using my system font which I don't want to change.

I tried this solution but in my plugins/theme there is no css folder or css files??

Although I'm running Mac OS and Eclipse 4.15, this thread regarding the Eclipse theme CSS helped me change the project explorer font size:
https://stackoverflow.com/questions/47731327/change-project-explorer-tree-view-font-size-in-eclipse-oxygen
The key part is to find the path to the theme css you're using. In my case, the path was /Users/myuser/.p2/pool/plugins/org.eclipse.ui.themes_X.X.X.vXXXXXXXX-XXXX/css/dark and the file I needed to change was e4-dark_mac.css. On an Ubuntu system the path is more likely to resemble /home/myuser/.p2/pool/plugins/org.eclipse.ui.themes_X.X.X.vXXXXXXXX-XXXX/css/dark.
I then added the following rule:
.MPart Tree {
    font-size-adjust: none;
    font-size: 14px;
}


16.04 - sudo nautilus does not open in unity bar In Ubuntu 16.04: when I run sudo nautilus from the terminal, a new window pops up but no arrow indicating an opened window appears besides the nautilus icon at the unity panel. When I minimize the root window and then click again on the icon, instead of opening the root window, a new non-root window pops up and suddenly two arrows appear near the nautilus icon. (Not even scrolling on top of the icon works to show the minimized window.) When I close the non-root window, only then the arrow indicating the root window stays on the panel and everything works like it should.

I also tried removing the nautilus icon from the panel and run sudo nautilus from the terminal. In that case a new icon appears with the arrow and everything behaves normal.

Is there a way to fix this? It is annoying.

First killall nautilus processes:

sudo killall nautilus

Then re-install the data package:

sudo apt-get install --reinstall nautilus-data

Method:
Just open the terminal and type nautilus.

The disk icons will show up again and they will not disappear when you minimize them.

Had the same problem since I removed the disk icon (not nautilus icon) from the unity bar.

apt-get remove and apt-get install commands won't work.


Wifi drivers for rtl8188e does not work I have a Toshiba S55-A5236, currently I have Ubuntu 13.04 installed and my kernel 3.12.0-031200-generic. When I do lspci I get back:

00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Lynx Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #4 (rev d4)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 04)
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8179 (rev 01)
03:00.0 Ethernet controller: Qualcomm Atheros QCA8171 Gigabit Ethernet (rev 10)

I am dual booting Windows 8.1 (not by my choice) and Ubuntu 13.04 (both are x64) Due to the latest kernel update I am now stuck without wifi and have been trying to fix it without any luck. If someone would please help me (and I am a beginner at bash, but eager to learn) fix this problem prior to me throwing this computer out the window  I would be very grateful.

Oh, I have tried to download the driver from the website and compile it, but I am receiving compilation errors. I tried FreedomBen's git solution but I can figure it out.

Thanks,
Jack Dare

UPDATE:

user217298's answer was the fix, to why chili555's answer wouldn't work, however after the fix my wifi is now working. I would put a checkmark next to his answer but it wont let me.

Thank you for your answers.

The easy solution is installing the latest kernel image/headers pair. This can be done using:

sudo apt-get install linux-generic

This problem was fixed by marking a bunch of unneeded linux-headers versions for removal and installing the most current one.


Installation problem /usr/bin/dpkg returned an error code (1) Anything I tried to install I get this error message:

No apport report written because MaxReports is reached already
  Errors were encountered while processing:
   linux-image-3.2.0-23-generic-pae
   linux-image-3.2.0-24-generic-pae
   linux-image-3.2.0-26-generic-pae
   linux-image-3.2.0-27-generic-pae
   linux-image-3.2.0-30-generic-pae
  E: Sub-process /usr/bin/dpkg returned an error code (1)

I've tried most of the tips people say:
apt-get upgrade, apt-get -f install, apt-get update.
and I've always got the same error.

With the help of a fellow from lauchpad, I found the solution for my problem.
It was related with edition problems of grub.cfg
Here is the  complete discussion at lauchpad.
And the direct link to the solution is here.
Well, of course the grub.cfg varies from user to user and so  its possible editing errors.

Try:

sudo apt-get clean

sudo apt-get autoclean

then try again.

Hope it works.


libcurl4-gnutls-dev : Depends: libldap2-dev but it is not going to be installed I am trying to install curl in my ubuntu server as I was getting this error -

fatal error: curl.h: No such file or directory

Below is the error -

username@phx7b02c-ee1b:~$ sudo apt-get install libcurl4-gnutls-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:
 libcurl4-gnutls-dev : Depends: libldap2-dev but it is not going to be installed
E: Broken packages

I am not sure what wrong I am doing here?

Update:-

My ubuntu version -

username@phx7b02c-ee1b:~$ uname -a
Linux phx7b02c-ee1b 2.6.35-22-server #33-Ubuntu SMP Sun Sep 19 20:48:58 UTC 2010 x86_64 GNU/Linux

Similar to other questions about "some packages could not be installed", try

apt-get update
apt-get autoremove
apt-get install -f


How do I open a text file in my terminal? There is a file named RESULTS.txt and I want to open this file in my terminal. (I mean I want to see the file contents be displayed in the terminal and not in some text editor)

How do I do that ?

For short files:

cat <path/your_file>

directly shows a text file in the terminal.

For longer files:

less <path/your_file>

lets you scroll and search (/ text to search Enter) in the file; press q to exit.

e.g.

cat /home/john/RESULTS.txt
less /home/john/RESULTS.txt

If you need to edit the content of the file i commonly use nano.

nano filename


Ubuntu 16.04 - Sources.list Problem I have installed Ubuntu 16.04.02 a couple of minutes ago. When I want to update my system:

$ sudo apt-get update && sudo apt-get upgrade

Ubuntu does not update itself. The error message is above:

error list

The problem is with sources.list. But how can i solve this problem? Please help me!

Seems your /etc/apt/sources.list is broken..

Usually your it should look somehow like (at least for my Ubuntu Servers its looks like this)

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

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.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://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.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://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.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://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonicals
## "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 main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse

try this:
disable any ppa.
disable ipv6 for now ,
run: sudo service resolvconf restart ,
run sudo apt update first

if that doesn't fix it, then you may want to try using a mirror from software & update -> Ubuntu Software - Download from -> other -> select the best server.


I messed the file bash.bashrc ubuntu 14.04 Trying to install java jre, I messed up the file bash.bashrc on Ubuntu 14.04, by adding these two lines at the end :

export PATH= $PATH:usr/java/bin/ ;
export JAVA_HOME= $JAVA_HOME:usr/java/bin/java/

Now I cannot do any command on terminal. When I open terminal it give me these errors:

bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:usr/java/bin/': not a valid identifier
bash: export: `:usr/java/bin/java/': not a valid identifier
bash: lesspipe: No such file or directory
bash: dircolors: No such file or directory
bash: ls: No such file or directory

Could anyone help?

With:

export PATH= $PATH:usr/java/bin/ ;
export JAVA_HOME= $JAVA_HOME:usr/java/bin/java/

bash: export: ':usr/java/bin/java/': not a valid identifier; Sure you left a space between JAVA_HOME= and $JAVA_HOME:usr/java/bin/java/, so export supposes that
$JAVA_HOME:usr/java/bin/java/ is a second variable. Same case for 1st line too.

export: usage: export [-fn] [name[=value] ...] or export -p

... means it does support/expect multiple variables with name[=value] format.

Remove spaces (after =) and semicolon ; and add / before usr/ (as it should be a full path):

export PATH=$PATH:/usr/java/bin/
export JAVA_HOME=$JAVA_HOME:/usr/java/bin/java/

If still facing errors, take  l0b0's advice  (Problem with installing Android developer files on Eclipse - messed up something with .bashrc) to get new default .bashrc file, then try again adding those two lines.

Edit you .bashrc file as follows:

export JAVA_HOME=/usr/java/
export PATH=$PATH:$JAVA_HOME/bin/

This assumes Java is installed in /usr/java.


Ubuntu-desktop: unmet dependencies I tried to install Gnome on ubuntu 13.04 using these guide (http://www.omgubuntu.co.uk/2013/04/gnome-3-8-ppa-for-ubuntu-gnome). It didn't work very well (there were some glitches), so I tried uninstall it.

I followed the instructions, but when I went back to Unity it was "ugly" and I couldn't see the desktop (I had files there, but they weren't shown).

I reinstalled gnome again, and purge everything again, and I think I also uninstalled ubuntu-deskop (following advice from another page)

Now unity is more or less ok, but I can't still see my Desktop, and some programs like evince are lost. If I try to sudo apt-get install ubuntu-desktop

I get

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:
 ubuntu-desktop : Depends: evince but it is not going to be installed
                  Depends: gnome-control-center but it is not going to be installed
                  Depends: seahorse but it is not going to be installed
                  Depends: software-center but it is not going to be installed
                  Recommends: deja-dup-backend-ubuntuone but it is not going to be installed
                  Recommends: empathy but it is not going to be installed
                  Recommends: gnome-control-center-unity but it is not going to be installed
                  Recommends: thunderbird-gnome-support but it is not going to be installed
                  Recommends: ubuntuone-client-gnome but it is not going to be installed
                  Recommends: ubuntuone-control-panel-qt but it is not going to be installed
                  Recommends: xul-ext-webaccounts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And I cannot install, for example, evince, because I get:

daniel@daniel-linux:~$ sudo apt-get install evince
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:
 evince : Depends: evince-common (< 3.7) but 3.8.2-0ubuntu4~raring1 is to be installed
E: Unable to correct problems, you have held broken packages.

I've tried apt-get clean, apt-get update, apt-get autoremove also... I've also followed the steps given here Gnome 3.8 affects Unity in Ubuntu 13.04 , but I still have the same problem.

Any idea on how can I get everything working again?

To solve your 'unmet dependencies' issue, I suggest using
 sudo apt-get -f install .


Lenovo Thinkpad X1 Carbon support I am considering selling my Mac to get money towards a Lenovo Thinkpad X1 because what I really want to do is to be running an Ubuntu system all the time.

Is this machine completely supported in Ubuntu, with no tiny little feature missing just because I am "going Linux"?

Optional user story section, skip to the question below if you don't have time:

I have a friend who bought a "works on Ubuntu" system a year ago and has hated the fact ever since: battery lasts less than if he boots in Windows (which he despises) and he ascribes that to "no good OS/harware integration and support for advanced chipset power management features", odd behaviour on suspend/resume/hibernate (says: "when it works 90% of the time and the other 10% it makes you lose your work is as good as broken -> 90% is the same as 0% he says), some occasional graphics card glitches he can perfectly well live with and has almost grown affectionate to, and finally, and that is what would make him undo his choice if he could, bad "input device drivers". He says: trackpoint and trackpad just "feel different", "so much better" on Windows and that was impossible to know from the website brochure.

That story makes me very doubtful... but I want to abandon this "walled garden" of prison that is my Mac and go Ubuntu all the way, no doubt about that! My dilemma at this time is just: "I don't want to live with those eternal frustrations for sure"!

Here's a directly answerable phrasing of my question:

Is the Lenovo Thinkpad X1 supported on Ubuntu? Yes/no, which version?
Which hardware features are not supported? Provide a list
Optionally: sort the list in descending order of frustration from your experience
Optionally: mention if there are acceptable workarounds to the "out-of-the-box" condition described in the earlier points and whether this ameliorates frustration at least to "tolerable" levels

Comment: the Ubuntu hardware certification page is so not-for-end-users it's unreal. Whoa. What would make it end-user friendly is:

Link to "buy here and you'll be just fine, this is the right configuration for you, it'll work as long as you press BUY on that page and don't browse further"
Remove mentions of may and might not work. Just tell it straight: press buy here and you will get a working system with the exception of A, B, C (so that I can decide whether the philosophical "freedom pleasure" I get from escaping an Apple world is enough to off-balance the loss, for instance, of Bluetooth capabilities (something that I of course use on my Mac) but "could" lose to use free  (as in freedom) software

The certification page fails to dispel doubts in me as an end-user. I don't feel "eased into Ubuntu", I feel "partially informed".

I just received a Lenovo X1 Carbon and installing Ubuntu 12.10 (64bit) then everything works out of the box without any tweaks, except for two minor things:

Finger print reader
Mute button for microphone

Everything else seems to work very well, including the WiFi and SD card reader.  The laptop is amazingly light, runs very quite as it rarely gets that hot and the fan is very quiet on the one occasion it did come on (after several hours of video playback).

I have the i7 version with 8Gb RAM and a 180 Gb SSD.  The laptop is very fast and Ubuntu desktop is incredibly responsive.

I am writing my experiences with this new laptop in detail on my blog: http://jr0cket.co.uk/tags/lenovo/

Thank you.

John.

This answer received a few down votes, because some people stumble upon this question when they seek for an answer to hardware recommendation. However this answer also (or may be mostly) deals with the ideological part of the initial question.

The SD card reader and the fingerprint reader will not work (fingerprint readers are for convenience and don't improve security). All in all, there is no big difference to the T530 base configuration I am currently using with 12.04. It's mostly the Thinkpad 2012 platform with an Intel processor in the smallest chassis.

From my experience with my T530 booting in UEFI mode works fine. Hibernate and resume work fine and fast with an mSATA SSD, but you should always save your work. Input devices work fine, you may just have to configure the behavior (pointer speed) to match that from the other operating system.

You want to have control over your computing devices, which is good and GNU licensed software – like Linux – that protects your four kinds of freedom is a good direction and starting point.

However bringing an attitude that is focused only on consumption to the community isn't healthy. The ideal situation, of course, should be that everything works right out of the box. However unless you have a support contract with someone you cannot expect that your demand for such a thing is instantly fulfilled and it's in your best interest to get involved. (Your friend should have done the same.) Otherwise, if you have a support contract, please use the contacts provided in the contract.

Given that users and developers care to contribute and take responsibility, a free and libre software ecosystem can deliver great software quality and user experience where several companies not committing to work together may be unsuccessful and patronize users. But this is more of an ideal and making a purchase decision on what's currently available on the market, probably heavily marketed and labeled as "cutting edge" or latest generation, is the first step of degrading this ideal to a bad compromise, which will get worse when you keep the consumer attitude and don't get involved with the community.

You need to realize that too many manufacturers on the market don't respect your rights because their primary goal is to be profitable, not a charity. You shouldn't feel constrained to buying products that don't improve your quality of life by the amount you expected, just because the market doesn't care.

   I know many would rather choose lifestyle and state of the art patented and dongled technology over pure free hardware designs. Initially the concept of patents was to protect the inventor while allowing access for others but mostly gets negative press due to abuse. On a similar note getting funding for science and research apparently got more difficult and is somehow set up with wrong incentives.

It's up to the consumer to decide how slow the industry moves towards respecting your freedom and free hardware designs that work flawless with free software and it requires more than just replacing one brand with another.

Regarding this topic I would currently recommend watching the talk from Richard Stallman from the Chaos Communication Congress of 2014: 31C3 - 6123 - Freedom in your computer and in the net.

It's not as mean-spirited as one would expect, because that wouldn't be helpful at all. (Some people in the audience got their share later that day, 6205) While his introduction may leave many puzzled and one may find him awkward, it's more convincing to try to use devices that respect your freedom than the every now and then failure in escapism of someone trying to write an article about her/his experience on living without a certain device or service. Never forget that devices that respect your freedom are vital to protect and fight for your rights, civil rights, everything you take for granted or were unaware of (like rights of people that don't live in your state or country).


Skype and MS Office on a Ubuntu laptop I recently purchased a Dell Latitude 3550 with Ubuntu as default OS. I had always planned to install Windows 10. However I found that the Ubuntu OS was supportive of net access using WIFI, had its own version of MS office tools though not as refined as MS Office.I am now getting second thoughts on installing Win 10.

I am a heavy Skype user. Is Skype compatible with Ubuntu?

Can I install MS Office on Ubuntu without resorting to Win 10?

Would appreciate your advice.

for sure, there is a skype-client for linux-based systems!

it is even available in the repositories, so it integrates in your package system and will be updated like all the other software in one place! - please have a look at this question: How do I install Skype?

MS Office is not available for Linux-based systems but you can try to install the windows-version via Wine.

it might get a bit tricky, so please read this questions first:
Can I install Microsoft Office? If so, how?
Installing MS Office 2013 on Ubuntu 12.04 LTS

although i suggest you to try LibreOffice (it is installed by default and nearly equal featured as MS Office) and maybe also the free standardized odf-format!
IMHO most people don't need MS Office anyway... they just want a familiar GUI: so if you like the WinXP/2003-look you will love LibreOffice, if you want the Win7/2007-look maybe give WPS Office a try for a native office suite: Can Kingsoft Office be installed?

Yes there is a version for skype in ubuntu. here This will help you to install skype.
And for MS office representative, there is Libreoffice which is pre-installed in ubuntu. It's quite decent. If you really want to use MS office you can use it's online version MS office


Ruby 2.2.2 extracted but not installed? I read that the Software Center doesn't always have the latest version of Ruby, so I went ahead and downloaded it from the Ruby website. The problem is, I'm new to Linux so I don't know if it's installed, or where the program file (executable?) is located. What should I do?

I'm going to guess that it's not a good idea to install things to a live USB...

Assuming you downloaded the source code, (if you didn't please do) run the following commands:

cd /path/to/where/you/downloaded/ruby
tar -zxf ruby-2.2.2.tar.gz
cd ruby-2.2.2
./configure
make
sudo make install

And you should have ruby installed!


Installing Flash Player I have downloaded Adobe Flash player 11.2, but can't install it.

I am using Ubuntu 13.04. Can anyone help me?

I don't know which program it will open with.

Maybe you also would like to uncomment the line

deb http://archive.canonical.com/ubuntu precise partner

in /etc/apt/sources.list and install the graphical adobe configuration tool for flash:

apt-get update && apt-get install adobe-flash-properties-gtk adobe-flashplugin

BTW: you can get it for your kde settings too: adobe-flash-properties-kde

Try:

sudo apt-get install ubuntu-restricted-extras flashplugin-installer


How to enable SSH server in recovery mode? How to enable SSH server in Ubuntu 10.10 Desktop Edition recovery mode?
My display is not working (broken video card). So how can I do that "blindly"? :)

If you know what you're typing onto, it's just one simple command, but I'll explain the complete procedure to rule out any and all errors.

Boot up the machine, holding down Shift
When you're sure the grub menu is up, press Down then Return*
Press Down six times to select "Drop to root shell prompt" and hit Return
Carefully type apt-get install openssh-server and hit Return
Carefully type /etc/init.d/ssh start and hit Return to start it without rebooting

The last step may not be required, but it doesn't hurt either.

*: Assuming your second boot entry is the recovery mode of the newest kernel, this may vary if you've manually put a Windows boot entry on top of the list or something like that, I assume you know.

If you decide to try "ssh" instead of "openssh-server", you may have to press "Y" to confirm. However, you don't need to enter the password if you drop to a root shell. After waiting long enough (!), hit Ctrl+C in case you didn't need to put in the "Y" before you continue.

after you log in with a user you can type

$ sudo apt-get install ssh

type your password and enter

try to connect from another PC


Envy 4500 printer not scanning I have an HP ENVY 4500 e-all-in-one printer. It installed & prints successfully. But the scanner function does not work. Simple Scan says no scanner detected. I ran the command sudo sane-find-scanner & the scaner was also not detected.

I tied upgrading my hplip driver to the latest version, but it fails with an error that GCC is not installed. But I know for a fact GCC is installed.

Any help would be appreciated.

Try this: it worked for me. I have the same printer and had same issues until I used the terminal command hp-setup.

For more information https://wiki.archlinux.org/index.php/Sane#For_HP_hardware

Just bought an HP Envy 4500.  Worked out of the box with Ubuntu 14.04LTS - print, copy, scan.  Simply added it as a printer with hplip.


Radeon HD 4650 failed to load firmware I have a VisionTek Radeon HD 4650 PCIex16 video card installed. I can't run anything other than the built-in display at 1024x768.

I get the following:

$ dmesg | egrep 'drm|radeon'
[    5.527134] [drm] Initialized drm 1.1.0 20060810
[    5.591796] [drm] radeon kernel modesetting enabled.
[    5.591874] fb: conflicting fb hw usage radeondrmfb vs VESA VGA - removing generic driver
[    5.592565] [drm] initializing kernel modesetting (RV730 0x1002:0x9498 0x1545:0x4330).
[    5.592593] [drm] register mmio base: 0xFE9F0000
[    5.592596] [drm] register mmio size: 65536
[    5.592752] radeon 0000:01:00.0: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)
[    5.592757] radeon 0000:01:00.0: GTT: 1024M 0x0000000020000000 - 0x000000005FFFFFFF
[    5.592760] [drm] Detected VRAM RAM=512M, BAR=256M
[    5.592763] [drm] RAM width 128bits DDR
[    5.593295] [drm] radeon: 512M of VRAM memory ready
[    5.593298] [drm] radeon: 1024M of GTT memory ready.
[    5.593313] [drm] Loading RV730 Microcode
[    5.593338] radeon 0000:01:00.0: Direct firmware load failed with error -2
[    5.593342] radeon 0000:01:00.0: Falling back to user helper
[    5.608499] r600_cp: Failed to load firmware "radeon/RV730_pfp.bin"
[    5.608505] [drm:rv770_init] *ERROR* Failed to load firmware!
[    5.608511] radeon 0000:01:00.0: Fatal error during GPU init
[    5.608517] [drm] radeon: finishing device.
[    5.630462] [drm] radeon: ttm finalized
[    5.630857] radeon: probe of 0000:01:00.0 failed with error -2

Download file RV730_pfp.bin from this site http://people.freedesktop.org/~agd5f/radeon_ucode/ and put it in /lib/firmware/radeon


Minecraft Black Screen Ubunutu 12.10 using Java 7 I get these errors when trying to run minecraft.

ian@ian-Beast:~$ cd ~/.minecraft
ian@ian-Beast:~/.minecraft$ cd /.bin
bash: cd: /.bin: No such file or directory
ian@ian-Beast:~/.minecraft$ cd ./bin
ian@ian-Beast:~/.minecraft/bin$ java -jar minecraft.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
    at java.lang.Class.getMethod0(Class.java:2694)
    at java.lang.Class.getMethod(Class.java:1622)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 6 more

Any clues on how to fix?

Just realized...you are running minecraft directly, you don't run minecraft from the bin directory, you run it from the launcher.

Launcher is located on the minecraft.net site

https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar

Same name, different programs

If that doesn't help refer to the following...

Definitive guide, I have been running Minecraft for a long time now and this guide has shown me a few tricks

How can I install Minecraft?

For Minecraft on Linux, I've often found that you have to manually delete and reinstall the lwjgl libraries. This would make sense, because the errors you're getting are referencing lwjgl. Here's a link on how to do that.


Xubuntu 20.04 minimal installation After having used Xubuntu minimal installations from the netboot (mini.iso) image in multiple previous versions of Ubuntu, I noticed that the netboot installer is no longer actively supported. I would like to know what the "official" way is now to get a Xubuntu 20.04 minimal installation in a virtual machine (since Xubuntu is the only official flavor without a "minimal installation" option in its installer). I am aware of the following options with their respective shortcomings:

The Xubuntu Core description on the Xubuntu
Website still
refers to the mini.iso which is not officially supported for >18.04. There is a mini.iso for 20.04 as described in this
post,
albeit not officially supported anymore. It could disappear any
moment or be discontinued completely for future versions >20.04. For
now, this image allows me to install a minimal version of Xubuntu.

The Xubuntu Core image cannot be
installed as the installer crashes (I tried this multiple times
since the release and with different versions of VirtualBox):

Installing the xubuntu-core package via apt on Ubuntu live server, which is listed as
the recommended replacement for the mini.iso, yields >4 GB of used
disk space and thus seems to differ significantly from the minimal
installation performed by the 20.04 mini.iso as well as the 18.04 mini.iso.

Ubuntu Core is not an option for me as it requires creating and
linking it to a user account. I have not tried it so far because of
this restriction. I would just like to install Xubuntu in a VM and
use it offline.

Ubuntu Base is too minimal and requires a very high number of
preparatory steps. I would just like to install Xubuntu.

Given these options, is there anything that I missed which would give me a Xubuntu 20.04 minimal installation in a way that is officially supported and will likely be supported in future versions?

Using Ubuntu Base with Live auto installer (subiquity) to get minimal Ubuntu/Xubuntu system
Below is an autoinstall template file with which you can auto-install Ubuntu Base 20.10 (and newer) and get relatively minimal installation of Xubuntu from it. As a requirement, you need to have rest of PXE installation environment setup already (see below link for step by step guide). PXE environment is composed of: DHCP service, TFTP server, HTTP(S) server, and optional NFS server. When combined, these offer PXE boot ability for devices in your network. Device itself also needs to support boot from network (either legacy BIOS or UEFI).
I did all my testing using PXE boot, Ubuntu 20.04.1 & 20.10, and autoinstall files (see below, for 20.10). To get details about setting up PXE step by step for 20.04 and newer please read my other guide here: https://askubuntu.com/a/1292097/1080682
Notes: commands listed bellow can also be executed in other ways, eg. manually inside Live-CD or any other live boot session, I've also done it with PXE booting to installer (subiquity) and then doing it over SSH inside subiquity live session. Please make sure that booted session/installer is of same major release as Ubuntu Base you plan to install, eg. Live-CD of Ubuntu 20.10 for creating Ubuntu Base 20.10
Autoinstall script is served via PXE as "user-data" file.
user-data
#cloud-config

autoinstall:
  version: 1
  early-commands:
    - dd if=/dev/zero of=/dev/sda bs=8M count=30
    - (echo o; echo n; echo p; echo 1; echo ""; echo +200M; echo n; echo p; echo 2; echo ''; echo ''; echo a; echo 1; echo p; echo w) | fdisk /dev/sda
    - mkfs.fat -F 32 -D 0x80 -M 0xF8 -n BOOT /dev/sda1
    - mkfs.ext4 -F /dev/sda2
    - mkdir /mnt/boot /mnt/root
    - mount /dev/sda2 /mnt/root
    - curl http://cdimage.ubuntu.com/ubuntu-base/releases/20.10/release/ubuntu-base-20.10-base-amd64.tar.gz -o /ubuntu-base-20.10-base-amd64.tar.gz
    - tar -xzvf /ubuntu-base-20.10-base-amd64.tar.gz -C /mnt/root
    - touch /mnt/root/etc/resolv.conf
    - echo "nameserver 8.8.8.8" > /mnt/root/etc/resolv.conf
    - chroot /mnt/root sh -c "apt-get update"
    - chroot /mnt/root sh -c "apt-get install -y linux-image-5.8.0-28-generic initramfs-tools init dbus iproute2 sudo nano --no-install-recommends"
    - chroot /mnt/root sh -c "useradd -m ubuntu -s '/bin/bash' && echo ubuntu:ubuntu | chpasswd"
    - chroot /mnt/root sh -c "addgroup ubuntu adm"
    - chroot /mnt/root sh -c "addgroup ubuntu sudo"
    - apt-get update
    - apt-get install -y syslinux
    - syslinux -i /dev/sda1
    - dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda bs=440 count=1 conv=notrunc
    - mount /dev/sda1 /mnt/boot
    - touch /mnt/boot/syslinux.cfg
    - (echo PROMPT 0; echo DEFAULT base; echo LABEL base; echo KERNEL vmlinuz; echo APPEND root=/dev/sda2 rw; echo INITRD initrd.img) > /mnt/boot/syslinux.cfg
    - cp /mnt/root/boot/vmlinuz /mnt/boot
    - cp /mnt/root/boot/initrd.img /mnt/boot
    - touch /mnt/root/etc/systemd/network/00-wired.network
    - (echo [Match]; echo Name=enp0s10f0; echo [Network]; echo Address=10.10.2.101/24; echo Gateway=10.10.2.99; echo DNS=8.8.8.8) > /mnt/root/etc/systemd/network/00-wired.network
    - chroot /mnt/root sh -c "systemctl enable systemd-networkd.service"
    - chroot /mnt/root sh -c "apt-get clean"
    - umount /mnt/boot
    - umount /mnt/root
    - reboot

Above script is just pure script for BIOS / legacy boot, and it should work fine as-is, copy/paste.
To add UEFI capabilities, insert the following lines after apt-get clean and before umount & reboot commands.
    - mkdir -p /mnt/boot/EFI/BOOT/
    - cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi /mnt/boot/EFI/BOOT/BOOTX64.EFI
    - cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 /mnt/boot/EFI/BOOT/
    - cp /mnt/boot/syslinux.cfg /mnt/boot/EFI/BOOT/syslinux.cfg
    - cp /mnt/root/boot/vmlinuz /mnt/boot/EFI/BOOT/
    - cp /mnt/root/boot/initrd.img /mnt/boot/EFI/BOOT/

Lines to be aware of, which may need changes:

useradd and addgroup - change to your own username and password, or leave it for ubuntu/ubuntu
/etc/systemd/network/00-*.network - feel free to change the config file name, and make sure to change interface name (in my case enp0s10f0), IP (10.10.2.101/24) and gateway (10.10.2.99) to something that you actually expect
if you also install DHCP client package (isc-dhcp-client) you can use something like echo [Match]; echo Name=eth0; echo [Network]; echo DHCP=yes (just check interface name)
you can also leave script completely as is, and change both user/password or networking after reboot

Once you run the script through automated installer, it will install Ubuntu Base and reboot. After reboot login with user ubuntu password ubuntu (or your own, if you changed it).
Note that I am NOT running installation of xubuntu-core, please see comments in script below, as well as comments under the answer.
More info with details
To explain the process I'm also pasting the script with all comments, for others that want to get more details, understand the process, and expand on it to change it to your liking.
user-data (with comments)
#cloud-config

autoinstall:
  version: 1
  early-commands:
# delete any old partition data, up to 240MB size, if this was reinstall
# erases partition tables and whole boot partition as well, by erasing 30x8MB=240MB (partition is 200MB)
    - dd if=/dev/zero of=/dev/sda bs=8M count=30
# create new 200MB boot partition and rest as root partition
    - (echo o; echo n; echo p; echo 1; echo ""; echo +200M; echo n; echo p; echo 2; echo ''; echo ''; echo a; echo 1; echo p; echo w) | fdisk /dev/sda
# format boot as FAT 32
    - mkfs.fat -F 32 -D 0x80 -M 0xF8 -n BOOT /dev/sda1
# format rest as ext4
    - mkfs.ext4 -F /dev/sda2
# create mount points for boot and root
    - mkdir /mnt/boot /mnt/root
# don't mount boot yet, as later syslinux requires it unmounted, or mount it here and unmount before syslinux -i
#    - mount /dev/sda1 /mnt/boot
    - mount /dev/sda2 /mnt/root
# optional commands to see what's mounted, note if you did not mount it, don't ls it because subiquity installer will fail
#    - df -h
#    - ls -al /mnt
#    - ls -al /mnt/boot
#    - ls -al /mnt/root
# download ubuntu Base from official repo, we download 20.10 below, this will download to / (root) of ubiquity installer, which means - into memory
# if you want 20.04 or 20.10 or anything else (future releases) just change following these two lines (curl and tar) to reflect that, plus later in script change kernel version
    - curl http://cdimage.ubuntu.com/ubuntu-base/releases/20.10/release/ubuntu-base-20.10-base-amd64.tar.gz -o /ubuntu-base-20.10-base-amd64.tar.gz
# extract all files to our sda2, mounted at /mnt/root
    - tar -xzvf /ubuntu-base-20.10-base-amd64.tar.gz -C /mnt/root
# create temporary resolv.conf in the new system
    - touch /mnt/root/etc/resolv.conf
    - echo "nameserver 8.8.8.8" > /mnt/root/etc/resolv.conf
# chroot to /mnt/root and start executing commands one by one
# update apt's package cache
    - chroot /mnt/root sh -c "apt-get update"
# install Linux image, which will install kernel and create initrd and all
# you need to install specific version depending on OS, eg 20.04 will use linux-image-5.4.0-42-generic
# we also install: init, dbus, iproute2, sudo, which also pull systemd - to have actually usable system
# additionally install nano to be able to edit confs, you can change that to any other editor
    - chroot /mnt/root sh -c "apt-get install -y linux-image-5.8.0-28-generic initramfs-tools init dbus iproute2 sudo nano --no-install-recommends"
# I personally always install openssh-server as well, ping for debugging
# and you may also want to add isc-dhcp-client package to enable networking setup by DHCP server
    - chroot /mnt/root sh -c "apt-get install -y openssh-server isc-dhcp-client iputils-ping --no-install-recommends"
# add at least one user, here we add user ubuntu with password ubuntu, change it here or later after first login
    - chroot /mnt/root sh -c "useradd -m ubuntu -s '/bin/bash' && echo ubuntu:ubuntu | chpasswd"
# add this new user to correct groups to enable it to be admin and to have sudo access
    - chroot /mnt/root sh -c "addgroup ubuntu adm"
    - chroot /mnt/root sh -c "addgroup ubuntu sudo"
# this would installs Xubuntu ... or switch to whatever you need... if you install some other package or desktop environment - it will be there after your login
# but it is quite large (2GB) so if ANY package fails or throws ANY error - whole subiquity installer crashes; so I recommend this to be done on first interactive login after reboot
#    - chroot /mnt/root sh -c "apt-get install -y xubuntu-core"
# below is syslinux install the easy way, through Ubuntu's official package/repo
# get the syslinux package, note this is not in chroot, this installs just to subiquity memory, so we need to run apt update again
    - apt-get update
    - apt-get install -y syslinux
# tell syslinux to install itself to your sda1 which is your boot partition
# if you mounted it earlier, unmount boot!! use command below (which is commented out by default)
#    - umount /mnt/boot
    - syslinux -i /dev/sda1
# now that syslinux is installed, burn it's mbr.bin (or maybe gptmbr.bin if you plan to use GPT + UEFI) to start of your disk; note we target whole device "sda" - NOT sda1
    - dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda bs=440 count=1 conv=notrunc
# now we can safely mount boot partition
    - mount /dev/sda1 /mnt/boot
# we create syslinux.cfg, I do touch, as if it doesn't exist it will break subiquity again
    - touch /mnt/boot/syslinux.cfg
# echo your config to it; explaining
# PROMPT 0 - don't ask use default / 1 - ask for user input (good for diag); DEFAULT - set which label is default so syslinux can autoboot; LABEL - this is config for our Ubuntu Base OS; KERNEL - vmlinuz or eqivalent kernel name; APPEND - to mount your /root partiton as writeable; INITRD - name of your initrd image
    - (echo PROMPT 0; echo DEFAULT base; echo LABEL base; echo KERNEL vmlinuz; echo APPEND root=/dev/sda2 rw; echo INITRD initrd.img) > /mnt/boot/syslinux.cfg
# copy vmlinuz & initrd files that you've installed in your chroot, you can specify exact version, just make sure to change syslinux.cfg echo (above) accordingly
# can also copy * to copy all, but all we need is these ones really
    - cp /mnt/root/boot/vmlinuz /mnt/boot
    - cp /mnt/root/boot/initrd.img /mnt/boot
# setup EFI boot, you can keep both BIOS and UEFI bootloaders at the same time
# install additional package
    - apt-get install -y syslinux-efi
# create directories, will create both BOOT and parent EFI folders
    - mkdir -p /mnt/boot/EFI/BOOT/
# copy all files, in order: UEFI bootloader, bootloader's module (required), syslinux config (same as above), kernel and initrd (same as above)
    - cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi /mnt/boot/EFI/BOOT/BOOTX64.EFI
    - cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 /mnt/boot/EFI/BOOT/
    - cp /mnt/boot/syslinux.cfg /mnt/boot/EFI/BOOT/syslinux.cfg
    - cp /mnt/root/boot/vmlinuz /mnt/boot/EFI/BOOT/
    - cp /mnt/root/boot/initrd.img /mnt/boot/EFI/BOOT/
# now we create network config, make sure to change: interface name, IP, gateway
    - touch /mnt/root/etc/systemd/network/00-wired.network
    - (echo [Match]; echo Name=enp0s10f0; echo [Network]; echo Address=10.10.2.101/24; echo Gateway=10.10.2.99; echo DNS=8.8.8.8) > /mnt/root/etc/systemd/network/00-wired.network
# and enable networkd service so it runs on first boot already
    - chroot /mnt/root sh -c "systemctl enable systemd-networkd.service"
# this is optional, but cleans 100+MB from our chroot partition
    - chroot /mnt/root sh -c "apt-get clean"
# and finally, I leave this uncommented sometimes, to allow me to do anything in interactive bash shell before final reboot (or to just pause and wait for you if you took coffee and don't want your system to reboot unattended)
#    - bash -c "exec bash"
# unmount partitions
    - umount /mnt/boot
    - umount /mnt/root
# and reboot!
    - reboot
# after reboot login with your user (ubuntu/ubuntu in this script) and complete installation and/or configuration
# you can also connect using ssh to this machine, sudo, and install or configure whatever you wish! Congrats!

The script with comments can also be used as-is, copy/paste. As before, please check your user/password, and network (interface name, IP, gateway, etc.)
Again, it will NOT install Xubuntu, I have that commented out.
This will boot to bit under 400MB / (root) partition (plus small partition for boot, it's set to 200MB but can be smaller, about 58MB is needed for both BIOS+EFI files).
Adding Xubuntu Core requires about 1.8GB (so says apt). After xubuntu-core is installed partition usage grows to 2.4GB, and after apt clean goes down to 1.9GB, so it is more like 1.5GB of extras on top of Ubuntu Base.
Please let me know if you encounter any issues to fix the instructions for everyone.
This was all tested with Ubuntu 20.04.1 (PXE server, Live Install ISO image, and Base image), as well as with 20.10 "client", and should be same or similar for any future release, as long as you change the file names where needed (eg. in curl & tar commands, and where apt installs linux image). Rest should be indentical, until Canonical changes something.
Test environment (both PXE server and services, and test client) were done on Hyper-V VMs.
Note: This was initially for legacy BIOS installs, I have added UEFI support now. Changes are minor for UEFI, syslinux installation was expanded.
Documentation:
Ubuntu Base wiki (outdated)
Ubuntu Base repository
Ubuntu Base Installation Example Guide (heavily outdated, GUI tools)
Edit - 2020-11-22: Modified script for Ubuntu 20.10. If you view revision history, earlier script was for 20.04.1, but I also did some tweaks in meantime, so please compare them to see changes.
Edit - 2020-12-06: Modified script, made it simpler and more straightforward, with better networking, and added EFI bootloader support. I did not write new script for 20.04 but literally only lines with curl, tar and apt-get install of linux-image-x.x.x-xx-generic would need to change, you can check revisions of this answer, and very first version has paths and names for 20.04.1 Ubuntu Base and it's kernel.

You're right.
Xubuntu Core fails to install on VirtulaBox 6.1
At this point, the only option is to be online, create a User ID & then take the machine offline.
Please visit https://core.docs.ubuntu.com/en/guides/manage-devices/ to install Xubuntu Core, in case you want to tweak around this req & create a fresh ISO...


Adding file paths to Python code I am currently running the code for a program called HotNet.

In its simpleRun.py file, there is a place to insert a file path to be run.

parser.add_argument('-mf', '--infmat_file', required=True,
                    help='Path to .mat file containing influence matrix')

My path file is /home/lai/Downloads/influence_matrix_files/hprd_inf_.mat; and I have tried to add it in as such:

parser.add_argument('-mf', '--infmat_file', required=True,
                    help= /home/lai/Downloads/influence_matrix_file/hprd_inf_.mat)

But I get SyntaxError when running the code:

File "simpleRun.py", line 29
    help= ~/home/lai/Downloads/influence_matrix_files/hprd_inf_.mat)
           ^
SyntaxError: invalid syntax

I have also tried to place the path in quotes (as strings ' ') but that isn't processed.

I have tried removing the / however that just returns the following error:

NameError: global name 'home' is not defined

How do I fix this?

Instead of editing the py file, you would simply call the simpleRun.py with the argument:

python simpleRun.py -mf /home/lai/Downloads/influence_matrix_file/hprd_inf_.mat

or

python simpleRun.py --infmat_file=/home/lai/Downloads/influence_matrix_file/hprd_inf_.mat

~/ is the same as /home/lai, so you want to be using ~/Downloads or /home/lai/Downloads.


Can't unmount ext 4 in gparted I wanted to add extra swap to my pc I followed lots of tutorials but i needed to make a unallocated partition and for that I needed to unmount ext4
I'm totally new in Ubuntu or linux
Anybody a suggestion?

I have not had this problem but try just unplugging if it is not doing any work.

sudo umount /mnt/share


How do I set the computer to suspend when battery is critically low? I accidentally clicked on the option "When power is critically low" under System Settings>Power. The original entry was blank, but the only two options after I clicked were Hibernate and Shutdown. I want to set it back to Suspend.

To change this setting back to suspend, use dconf-editor. Go to org.gnome.settings-daemon.plugins.power and change critical-battery-action to suspend.

Alternatively, in a terminal session use the command:

gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'suspend'

The gsettings command is resident by default while dconf-editor requires installing via:

sudo apt-get install dconf-tools

There's a way to disable suspension / power off completely.

gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'false'

(in case it's showing critically low even at 100%)


Install Ubuntu or Kubuntu? I want to upgrade my Ubuntu Lucid to Kubuntu Maverick (with a fresh install of course). I want to try KDE, but I have heard there are slight issues with the native Qt applications  compared to the GTK application equivalents - such as nvidia-settings, Gimp, Ubuntu Software Centre, and especially th eSynaptic package manager (which in detail showed the administration package / KPackageKit is not powerful yet than synaptic)

I believe we can have run GTK+ applications in KDE, but GTK+ applications do not blend with the KDE desktop. Also Java does not provide a GUI for KDE/Qt.

Should I install Kubuntu (KDE/Qt) or stay with ubuntu (GNOME/GTK +)?

Using Ubuntu (Gnome-desktop) or Kubuntu (KDE-desktop) is in the end a choice of preference and maybe what applications you use more.

You can even install both, by making sure that both packages, ubuntu-desktop and kubuntu-desktop are installed. With this setup you can decide when you login, which desktop you want to use (or with the change user option have both desktops running at the same time).

if you want to have a better blend of GTK apps in KDE, you can select the Curve theme for them in the settings (I think it is in appearances in system-settings).

I do not think there is a real objective answer more than this for your question, and we do not want to start any flaming here :)

I run a hybrid and everything works great. K3b works fine when I use GNOME and I use the GIMP all of the time in KDE. It does not matter much which you use.

Kwallet manages KDE applications in GNOME and the Gnome keyring manages GNOME applications in Kubuntu. You can use Nautilus in KDE as long as you launch it from the commandline with nautilus --no-desktop, other wise it takes over your desktop with GNOME. You can use Software Centre and Ubuntu One in Kubuntu just fine.

I don't know why anyone would possibly think that Ubuntu is more polished. I agree that it is the flagship but we all know what happens to flagships (Titanic was a flagship and so was the Mary Rose). GNOME needs more polish than that to be on par with KDE 4.5, IMO. Feature for feature, there is no comparison.


Opening Chrome causes Ubuntu to freeze Ubuntu v14.04
Simply opening the Chrome browser causes Ubuntu to freeze completely. No key strokes are effective and the mouse pointer is frozen in place or disappears. After a hard reboot, I opened other programs including Firefox in order to reassure myself that it was most likely Chrome causing the issue.

I saw posts suggesting various actions, such as clearing your history, that require getting into the Chrome menu but it freezes before I have the chance to try. I do have various extensions enabled so I tried opening Chrome from the command line with the flag --disable-plugins and that bought me a few seconds but then everything froze anyway.

Run Chrome from a terminal with the flag --disable-gpu

    google-chrome --disable-gpu

Then select:

Options - Settings - Show Advanced Settings

Under the System heading, uncheck "Use hardware acceleration when available" and restart the browser.

Try installing chromium its a open source version of chrome that works just as well. It just has different icons. You can download chrome apps and the bookmarks link.


How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? I am trying to revert my PHP version to 5.6 from 7 and though I removed PHP 7 and then installed PHP 5.6 I still seem to be running version 7.

Is there a simple method for moving through PHP versions where apache, phpMyAdmin and co are configured appropriately?

A simple way to change the current version of PHP on the fly and even site by site would be great.

Update
Today I got again problem with PHP 7 running despite I have disabled php7.0 apache module: phpinfo was showing php 7 using fastCGI ...
... So if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module:

sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart

1. Re-Install PHP 5.6

What worked for me was this guide: http://www.lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu

Actually is not required to remove php7.0, you can install php5.6 together  ( also because you will have dependency problem with phpmyadmin package that required php7.0)

Assuming libapache2-mod-php is a suitable way to enable PHP in Apache for you, you can proceed in this way:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0

2. Switch PHP version:

From php5.6 to php7.0:

Apache:

sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart

CLI:

sudo update-alternatives --set php /usr/bin/php7.0

From php7.0 to php5.6:

Apache:

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

CLI:

sudo update-alternatives --set php /usr/bin/php5.6

I think you should remove your php packages and install php5.6. You can proceed as follows:

sudo apt-get purge php7.*
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6

You can then check the version of your php to be sure. It is done as seen below:

php -v


Broken Kernel on 14.04 - can't run any apt-get, dpkg I recently tried to upgrade to 15.04. My whole computer is acting extremely strangely from it, I believe the process failed halfway through.
My login screen shows 15.04, but my system info still says 14.04.
I can't run apt-get install for anything, before anything it tries to remove linux-image-extra-3.13.0-74-generic, which it can't seem to do and I have had no luck finding a solution.
I have seen a lot of similar issues crop up on forums, but this one seems to be a little different and I can't seem to get it going. Can anyone provide some insight to this problem?
The following packages will be REMOVED:
  linux-image-extra-3.13.0-74-generic
0 upgraded, 0 newly installed, 1 to remove and 87 not upgraded.
9 not fully installed or removed.
After this operation, 152 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 322754 files and directories currently installed.)
Removing linux-image-extra-3.13.0-74-generic (3.13.0-74.118) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-74-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-74-generic
E: /usr/share/initramfs-tools/hooks/casper-memdisk failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.13.0-74-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-74-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-74-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I fixed the issue after a lot of terrifying and dangerous tinkering. I'll post what I did, some sort of combination of a bunch of different similar issues I found.

The general solution was to not delete the old kernel at all, and just pretend that its not there.

First:

I edited /var/lib/dpkg/status and removed every occurrence of the package linux-image-extra-3.13.0-74-generic.

This led to a lot of packages that weren't configured, so I still couldn't' do a whole lot. The solution to this was to purge all of these. It looked like this for me:

sudo apt-get purge linux-image-3.19.0-42-generic linux-image-3.19.0-49-generic linux-image-generic linux-generic linux-image-extra-3.19.0-42-generic linux-signed-image-3.19.0-42-generic initramfs-tools

Then I ran apt-get update, followed by sudo apt-get install --install-recommends linux-generic-lts-utopic

Then I ran apt-get install -f to fix dependencies.

Finally I ran apt-get autoremove to get rid of all of the garbage that's been here from whatever I did to my system.

I'm not exactly new to Ubuntu or unix at all, but I tend to stay away from the lower-level nasty bits, mostly use it for software development. If anybody is having similar issues to this, what I have above fixed the problem for me, but I can't exactly recommend it unless you at least sort of know what you're doing. Like I said, i don't really know what I'm doing, but I do know that I was playing with fire and the fact that my system is still running is  a miracle.

Any specific reasons why you were trying to upgrade?
14.04.3 is LTS...in april we will be getting 16.04 LTS anyway. Looking at logs...it's better to resinstall 15.10 all from scratch if you don't have any critical data(if there is some critical data try to login in recovery mode and take a backup of it)
Upgrade to 16.04 LTS is easy from 15.10


Display remains in sleep/suspend mode but machine is not in sleep mode First, this is not a Laptop, but a desktop machine. I am running Precise Pangolin.

I often notice that, when I am away from my computer for a while (usually at least 15 minutes or so) and come back, the monitor will be black, and the monitor's power indicator will be orange rather than the usual green, so I just assume the computer is in suspend mode. But then I move my mouse, type on the keyboard, etc., and the display stays in the same state. The power indicator on the tower itself is solid green (On) all throughout this process.

Whenever this happens, I end up having to push and hold the computer's power button to turn off and restart the computer.

I have looked for similar questions, and the closest I can find are questions about laptops relating to suspend/hibernate mode. Does anyone know what could be going wrong?

EDIT (5/21/12): This is happening less often now, but it still happens. My temporary solution is to force the machine to suspend anytime I know I'll be away for more than 5 minutes. It isn't ideal, but at least it keeps me from having to "brute-force shutdown", and possibly lose a lot of data, quite as often.

it has something to do with your OS because the monitor doesn't have it's own time to start up, or your computer is slow on reappearing, so just check these things. by the way the monitor does take a while to reappear by not after about 5 minutes, it's the OS your running or the monitor itself.


How to install PHP5 after uninstall! I was trying to downgrade PHP back to 5.4 (my website became amazingly slow after upgrade). I followed the first step from this guide : How to downgrade PHP from 5.5.9 to 5.4 in Ubuntu 14.04 (Installed with LAMP)

Now I am stuck with not being able to install PHP5 anymore with

Get:1 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main php5 all 5.5.9+dfsg-1ubuntu4.25 [1,308 B]
Fetched 1,308 B in 0s (31.9 kB/s)
(Reading database ... 63966 files and directories currently installed.)
Removing phpmyadmin (4:4.0.10-1) ...
dpkg: error processing package phpmyadmin (--remove):
 subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
 phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I solve that?

I tried to get the install to complete with apt-get -f install but got that :

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  phpmyadmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 23.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 63213 files and directories currently installed.)
Removing phpmyadmin (4:4.0.10-1) ...
dpkg: error processing package phpmyadmin (--remove):
 subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
 phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ubuntu 16.04.3

Tried to reboot, still same situation

The Apt database is locked. Someone else is just trying to install something else. Maybe it's you in another terminal or maybe you have Synaptic Package Manager running. Try to find it by grep-ing your processes:

ps -ef | grep apt

or

ps -ef | grep synaptic

just try to exit or kill this application with kill -15  and try to install again.


How to install Windows alongside preinstalled Ubuntu 14.04 UEFI this is my first time on askubuntu.com, which is just great :)

I have to install Windows 8.1 or 10 on my new Dell Inspirion 3543 laptop, which came with preinstalled Ubuntu 14.04  UEFI. I've read many topics with similar problem but nothing is exactly like mine so I would like to know everything:
I have next partitions right now:
1) ESP (524 MB/ 502 MB free)
2) DIAGS(42 MB)
3) OS(3.2GB)
4) Filesystem(488GB) ext4
5) Swap(8.4GB)
6) Free Space(1.1MB)

Should I resize this large 488GB partition and make space for Windows and than start installation on that partition?
What will happend with ESP, will Windows create another or maybe delete it?
Will this work?

You can control partitions on Windows Installer, but later you need to restore the GRUB using a live cd.

So create a NTFS partition and install Windows on it.


The desktop of ubuntu 15.04, doesn't work I try to instaló ubuntu many times un muy pc, but when i replay the desktop doesn't work. It looks like a normal ubuntu desktop, but when i try to clik on  ANY icon it doesn't work. Please help me, i'm hopeless.

First logout of the system and press CTRL + ALT + F1 which will open a terminal, then type the following:

apt-get install --reinstall ubuntu-desktop
apt-get install unity
apt-get purge nvidia* bumblebee*
apt-get install nvidia-prime
shutdown -r now


Sony Walkman NWZ-B173F 12.04 support I bought this groovy little device for my daughters only to discover they didn't play nice with Ubuntu.  My main desktop runs 12.04 64bit.  My secondary desktop runs 13.04.
Didn't get recognised on either.

It appeared in dmesg and syslog and the "disks utility" app, but the filesystem type was not recognised which seems to be why it didn't mount.

After much searching etc, I've figured out how to mount it.  It's a vfat partition.

mount /dev/sdg /media/walkman

(I manually created the walkman directory)

Took me awhile to figure this out as I normally mount scsi drives as something like sdg1 or sda2 (depending on the partition)

So I've got around the initial problem of not being able to transfer music across, but I'm a little puzzled as to why this would not auto-mount.

Any thoughts out there?

I found this article helpful for figuring out how to mount it. It walks you step by step through the process of manually making the directory. Also, I used Disk Utility to identify what the sony drive was called on by Ubuntu.

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


Make a Python program executable from its icon I wish to python programs execute in a window from clicking an icon.

This is day one of teaching myself and type of coding and Ubuntu so over-explantion and extra detail is appreciated.

Code example I am using

print("Game Over")
input("\n\nPress the enter key to exit")

Runs OK in IDLE but when I click the .py file icon it an editor opens instead of program/window

Steps I have  done so far

right clicked the .py file and set permissions to "allow executing file as program"
read as much as i could and it seems to be pointing me to information that is above my head.

Examples

#!/usr/local/bin/python
#!/usr/bin/env python
CHMOD X

None of which I understand or know where to use.

I am using Ubuntu 14.04 and Python 3

Thank you in advance.

Although your question might be on the edge for more than one reason (too broad, off topic, more than one subject per question, on the edge of a number of almost-duplicates), I'll answer the question(s).

The first question: about running a (text-only) script "from an icon", as you mention it:

Your script is text-only, and needs to be run in either Idle or a terminal window. That means that if you want to run it by double-clicking from an icon, you'd need to create a .desktop file, in which is defined to run the script inside a terminal window.
These .desktop files are part of practically all GUI applications installed on Ubuntu by the way.

A very basic example, fit for your script:

[Desktop Entry]
Name=Test
Exec=/home/jacob/Bureaublad/test.py
Terminal=true
Type=Application

The most interesting lines are:

Exec=/home/jacob/Bureaublad/test.py

in which the command to run your script is defined.
Read more on how to create the command, the script being executable or not, using the shebang, language extension, see here.

and the line:

Terminal=true

That says the script needs to be run in a terminal window.

You can extend your .desktop file with a.o. an icon and a lot more options, depending on what you are using it for exactly, see here.
How to use the .desktop file

Paste the code above in an empty file, save it as test.desktop. Edit the command in the line Exec=/home/jacob/Bureaublad/test.py, according to the link I added to create commands to run a script.
If you use the file from your desktop, make it executable with the command:

chmod +x /path/to/Test.desktop

Alternatively, you can copy (move) the .desktop file to ~/.local/share/applications to make it available in Dash. Globally installed applications store their .desktop files in /usr/share/applications. In the last two directories, there is no need to make the .desktop file executable.

About the example lines you don't understand

The lines:

#!/usr/local/bin/python
#!/usr/bin/env python

are shebangs; the first line of a script, telling the shell how to run it if the script is executable, and you run it without python before the path to the script. Since you use python3, the shebang in your scripts should normally be:

#!/usr/bin/env python3

More on this, and the relation between shebang and command in the link above.
CHMOD X (?) chmod +x is probably what you mean. As explained above, you can make a file executable with the command:

chmod +x /path/to/file

Write a .bat file, which runs under command prompt.In the file, write just one line like:
C:/Python/Python38/python.exe c:/MyProject/mainFile.py

Where, C:/Python/Python38/python.exe is Python 3.8, and c:/MyProject/mainFile.py is the python script file to be executed.

Create a shortcut of the .bat file and place it on Windows screen as an icon. That is it.


mysql service always crashes I'm new with this, so sorry if this is a stupid question, but Mysql service keeps crashing. I found on Internet I should edit my.cnf file and add innodb_buffer_pool_size=64M, but when I try sudoedit /etc/mysql/my.cnf, I get sudoedit: /etc/mysql/my.cnf: editing symbolic links is not permitted.

Can somebody help me? I have Ubuntu 18.04. Where I should put that innodb buffer, and is that size okay? I can't find anything that is clear and helps. What else should I do to fix this? :(

Try sudo nano /etc/mysql/my.cnf. You have the error editing symbolic links is not permitted just because /etc/mysql/my.cnf is only symbolic link to file /etc/alternatives/my.cnf. Don't use sudoedit, edit mysql.cnfwith nano or vim text editors which are able follow symbolic links.

My suggestion is to select innodb_buffer_pool_size about 80% of available installed RAM if your RAM less than 8 Gb and 90% if your RAM exeeds 8Gb. Everything depends on your definite situation in particular case. The rule: the larger innodb_buffer_pool_size the faster MySQL - is true.

Thus, assume you have 8Gb RAM, then 50% of RAM or 4Gb is right choice to start. If this configuration works well, increase this value step by step by 10% up to 80% of RAM. If you'll see that your swap has been used intensively enough, stop to increase this value and decrease it by resonable number.

Finally, open your my.cnf file with nano text editor:

sudo nano /etc/mysql/my.cnf

and add at the end of file new line:

innodb_buffer_pool_size = 4G

Save changes by pressing in nano CTRL+O -> y -> Enter and exit - CTRL+X.
Restart mysql service to apply new mysql configuration:

sudo systemctl restart mysql.service

That's all.


Why is sudoers NOPASSWD option not working? I have a NOPASSWD line in /etc/sudoers (edited with visudo)

gatoatigrado    ALL=(ALL) NOPASSWD: /bin/set-slow-cpufreq

However, the output is,

gatoatigrado@coral:~> sudo -n /bin/set-slow-cpufreq
sudo: sorry, a password is required to run sudo

This kind of command works on an OpenSuSE machine, but not on Ubuntu 11.10. What am I doing wrong?

Note: I cannot find any relevant system log messages, e.g. via tail -f /var/log/syslog.

edit

Here is /etc/sudoers.

Defaults    env_reset

# things I've tried copying from an opensuse machine
Defaults always_set_home
Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"

root    ALL=(ALL:ALL) ALL
gatoatigrado ALL=NOPASSWD: /bin/set-slow-cpufreq
%admin ALL=(ALL) ALL
%sudo   ALL=(ALL:ALL) ALL

You should put that line after the line with the rule for the sudo group, because, as the sudoers man page states:

   When multiple entries match for a user, they are applied in order.
   Where there are multiple matches, the last match is used (which is not
   necessarily the most specific match).

On the remote system, drop the encryption, but let everything be owned by a root as in the group of "Administrators" - that is not 0!
You can amend  #sudo -g Administrators  to those that need full access - not in the  sudo  file, but .login profile. Any standard script now can have access to the remote as "root" and you can protect the files that must be protected.
Another handy "group" is "Sandbox" with a login directory in the browser cache and can read this freely and nothing else. Use upper case first character.


No wakeup after screenlock After 10 minutes my desktop computer darkens the screen, and when I move the mouse or tab any key it comes back alive and asks for my password. That is perfect and the behavior I like to have it.

But sometimes (mostly after a longer period) I can't get back to the login screen.

Nothing happens when moving mouse or press a key. Only way to get the computer back working is by restarting with reset button on the machine.

Has anyone an idea what I need to do?

I have a AMD HD 7950 grapics card with the 13.12 driver.

Ubuntu is 13.10 with Unity.

Here is a link to a blogger with the same problem:

Ubuntu Suspend Won't Wake Up: My Quest - wafflesatnoon.com

This bug in launchpad has some workaround which works for many users who have been using Ubuntu 13.10. Hope it works for you too.

Just follow these steps and try it once:

Copy the grub file first as backup for safety:

sudo cp /etc/default/grub /etc/default/grub_back

taking the backup of original /etc/default/grub file, in case some error occurs we can get back to original state
Open grub file to edit:

sudo gedit /etc/default/grub

opening the file in gedit to make the changes.
Once file opened replace following line :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"

Note: The next line to the line mentioned above should be GRUB_CMDLINE_LINUX="" not GRUB_CMDLINE_LINUX="acpi_osi=Linux". Just check for the differences.

save and close the file.
Update the grub and restart your system once:

sudo update-grub
sudo reboot

Please reply if something goes wrong or you need any clarifications.

Install the latest proprietary graphics driver on your PC.

At the moment to avoid restarts I would just disable the screen lock in the options.

PS: please give more details about your computer, OS version, graphics card, etc. The more the better


16.04 apt pdate error: arm64 Packages not found While trying to update on my Ubuntu 16.04 system I get the following errors:
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-arm64/Packages  404  Not Found [IP: 141.30.62.24 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-arm64/Packages  404  Not Found [IP: 141.30.62.24 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-arm64/Packages  404  Not Found [IP: 2001:67c:1360:8001::17 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-arm64/Packages  404  Not Found [IP: 141.30.62.24 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

I tried the solutions suggested here: 16.04 Upgrade: Failed to fetch Empty files can't be valid archives
but none of them worked for me. I've had this problem for a while now.
My architecture is
amd64

Foreign archs are
i386
arm64

I cannot simply remove the ARM architecture because it is needed for the NVidia SDK I'm developing with.
Any help would be appreciated!

Ok so I figured out both what's the problem (thanks to you guys) and how to solve it:

The problem was that the NVidia Driveworks SKD seems to mess with apt, as in that apt tries to look for updates on the ARM architecture as well and there is no such path in the predefined package path (thanks, @guiverc).
Since I can't remove the architecture because I need it for development, I changed the /etc/apt/sources.list file by adding [arch=amd64,i386] where necessary. Example:

deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu xenial universe main restricted multiverse

Apt is then only looking for updates on those two architectures. This solved the problem.

Untick the unnecessary PPA's in the other software menu and the again try sudo update. 404 errors are mostly due to broken or dead links. This might solve  your problem. If your problem still remains unsolved, follow https://askubuntu.com/a/92897/779822


Live-Build lb build "chroot: failed to run command ‘/usr/bin/env’: No such file or directory" I have a problem with live build

$ sudo lb build --interactive shell

returns with

chroot: failed to run command ‘/usr/bin/env’: No such file or directory

does anyone know what is happening?

I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.

P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
P: Running debootstrap...
mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
P: Begin unmounting filesystems...
P: Saving caches...
chroot: failed to run command ‘/usr/bin/env’: No such file or directory

The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env

I moved outside of the /vagrant path on my machine and it seems to be working.

Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!

Change your mirror, as You say lb build stop after
chroot: failed to run command ‘/usr/bin/env’: No such file or directory
This happened since all packages which you set in include.chroot.packages
are not all downloaded.
So system unmounted at that point, now chroot does not do anything even taking telescope:))
change mirror in lb config , use stable mirror
This also happened with me while building Amzux , the solution was to change the mirror.
And you are also able to manually add packages in chroot/var/apt/cache/archives


How can I reduce Unity 3D's memory usage? I have a problem with Ubuntu 12.04 64-bit installed on Acer Aspire AO 722 with AMD C-60 processor. at the first startup, Ubuntu is much more resource consuming up to 500MB with Unity 3D. after I checked, was the most resource consuming is Xorg and Compiz. is it normal? My comparison with the Intel Atom netbook 32-bit consuming resource only up to 190mb with Unity 3D. any solution for that?

Your netbook with "Intel Atom" is 32bit and your "Acer Aspire AO 722 with AMD C-60 processor" is a 64bit processor, running Ubuntu 12.04 64bit. So, the simple answer is Yes, It is normal to use more resource for a 64 bit OS, than a 32bit OS.

As for comparison, I run Ubuntu 12.04 32bit with Unity 3D. It consumes around 350~ MB of RAM.

My Suggestion:
Though, You did not mention how much RAM you have, I will suggest to use 64bit Ubuntu with Unity 3D, If you have have >= 2GB and You are not a power user with graphics intensive work. But If you do lots of graphics intensive work, and have RAM less than 2GB, I recommend to use either Unity 2D or Xubuntu or Lubuntu.

For a detailed discussion about 32bit and 64bit, you can check this question
You can also read this page for a neat discussion about 32 bit and 64 bit system

Full fledged Ubuntu with Unity 3D will certainly eat more RAM, though I don't really know exactly how much is normal. I'm running 32-bit Lubuntu 12.04 on an Acer Aspire D257 and it uses 90 Mb of RAM without other processes going.

I think, most of the modern OSes are made for computers that have 2 GB of RAM or more, in my experience.

If you don't have that much RAM, I suggest you try Lubuntu, which is very lightweight. Or if you plan to buy RAM soon, you can use Unity 2D until then (which is usually more lightweight than full 3D Unity).

Since you already have Ubuntu installed, you can run it like a Lubuntu system by installing the lubuntu-desktop package. Then log out (or reboot, but that's not necessary), click the Ubuntu logo icon on the login screen, select Lubuntu from the drop-down menu, and log in.


Ubuntu 14 Installed on External Hard Drive Random Crashes I have installed Ubuntu 14 onto my external hard drive and everything initially works great. However after an apparently random amount of time (although this has happened every time I have been running Ubuntu on the hard drive) everything completely freezes and I have to do a hard restart.

Can anyone suggest any reasons why this might be happening or how I can go about fixing this?

I have fixed the problem by opening the NVIDIA X Server Settings application and changing the graphics profile from NVIDIA to Intel, but thanks for the other answers.


Realtek Ethernet card disconnnects randomly My laptop has a Realtek RTL8168 Ethernet card, which works pretty well. Except at some times, where the connection just gets dropped and I have to un- and replug the cable in order to reset the connection.

I've tried the preinstalled r8169 module, but now I'm using the r8168 module built with the source from Realtek's website. The problem occurs with both driver modules.

$ lspci | grep Ethernet
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

$ dmesg
#stops working, no reports
#unplugging
[ 9324.277753] r8168: eth0: link down
[ 9328.636380] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
#replugging
[ 9334.316610] r8168: eth0: link up
[ 9334.316744] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
#Working again

PS: With grep NetworkManager /var/log/syslog, I've fould the following, around the time such a connection interruption happened:

#EDIT:These messages are printed when I plug out the cable. Before, there is nothing
Jan 28 23:40:31 dracarys NetworkManager[912]: <info> (eth0): carrier now OFF (device state 100, deferring action for 4 seconds)
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): device state change: activated -> unavailable (reason 'carrier-changed') [100 20 40]
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): deactivating device (reason 'carrier-changed') [40]
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): canceled DHCP transaction, DHCP client pid 6975
Jan 28 23:40:35 dracarys NetworkManager[912]: <warn> DNS: plugin dnsmasq update failed
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> Removing DNS information from /sbin/resolvconf
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> NetworkManager state is now DISCONNECTED
#replug
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): carrier now ON (device state 20)
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> Auto-activating connection 'Wired connection 1'.
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> Activation (eth0) starting connection 'Wired connection 1'
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> NetworkManager state is now CONNECTING

And then it worked again

Any ideas on how to fix this? Let me know if you need additional information.

EDIT: $ modinfo r8168

filename:       /lib/modules/3.13.0-37-generic/kernel/drivers/net/ethernet/realtek/r8168.ko
version:        8.038.00-NAPI
license:        GPL
description:    RealTek RTL-8168 Gigabit Ethernet driver
author:         Realtek and the Linux r8168 crew <netdev@vger.kernel.org>
srcversion:     7600C3366E422907A1D79F1
alias:          pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
depends:
vermagic:       3.13.0-37-generic SMP mod_unload modversions
parm:           eee_enable:int
parm:           speed:force phy operation. Deprecated by ethtool (8). (ushort)
parm:           duplex:force phy operation. Deprecated by ethtool (8). (int)
parm:           autoneg:force phy operation. Deprecated by ethtool (8). (int)
parm:           aspm:Enable ASPM. (int)
parm:           s5wol:Enable Shutdown Wake On Lan. (int)
parm:           rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm:           timer_count:Timer Interrupt Interval. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)

N.B :  This answer is by no means final. I've came up with a couple possible solutions based on some research online as well as personal suggestions from experience.

Replace Kernel Module

From researching online, it appears that frequently the best solution is to replace the r8168 module that comes with Ubuntu installation, with a newer , updated version. For instance, this crunchbang post.

This  Ubuntu Forums post from 2012 documents a script for a newer, updated version of the r8168 module. You can do sudo apt-get install linux-headers-$(uname -r) or     sudo apt-get install --reinstall linux-headers-$(uname -r) , and then follow matera.ttp's instructions. Praseonym, who also posted there, suggests installing the driver with dkms , which is supposed to rebuild modules for each kernel update. Now, you should have dkms already installed, and you could check it with which dkms . So you could either use Praseonym's instructions or matera.ttp's . The idea is the same.

Tweak Module Settings

For many network issues tweaking the module configurations could help solve the issues, but frankly I doubt it's an issue, since you've used  r8169 with same effect. Nonetheless , give it a try.

In  the /etc/modprobe.d/ directory, create r8168.conf file. In that file, write:

options eee_enable=1

Save and reboot.

Now, you could do very much same thing with other options. For instance, my first guess was to add options timer_count=3600 to the r8168.conf file. Why 3600 ? Assuming that the parameter deals with time, then it's most likely seconds.

I've found a case where it actually didn't work, and the problem was bios related. Refer to this page: http://ubuntuforums.org/showthread.php?t=2138125&page=2

If everything else fails

I've mentioned on other posts as well, that sometimes hardware is the issue and no matter how much tweaking you do - it won't help. In personal experience , I've dealt with two rtl8192 wireless chipsets, one of which was giving weird sound bug, but the other works almost flawlessly.

I suggest you explore possible replacements for your ethernet card. My suggestion would be portable usb hub with ethernet slot, much like these

I think, you need to install more stable official driver for Realtek (RTL8111/RTL8168) ethernet card.

1. Get root privileges

Get root privileges, while typing “su” or (when you use Ubuntu) “sudo -s” in a terminal.

2. Get the requirements

To build and install the driver, we need the kernel headers and the build tools like gcc. To get them, just easily type in a terminal:

apt-get install build-essential

3. Get the driver

Now, go to the official download page from Realtek for the Linux/UNIX Driver for the RTL8111/RTL8168 ethernet card and download the latest driver version.

Link: Realtek Download Page

4. Untar the archive

The driver is compressed to an archive. So uncompress it with the following command:

tar xfvj r8168-8.025.00.tar.bz2

NOTE: Please do not forget to replace the “r8168-8.025.00.tar.bz2″ with the driver version which you have downloaded!

5. Blacklist old driver

We have to blacklist the old driver (r8169) to prevent the system to load it. To do this, easily set a new entry in “/etc/modprobe.d/blacklist.conf” which is called:

blacklist r8169

or just enter in the terminal again

echo “blacklist r8169″ >> /etc/modprobe.d/blacklist.conf

to do this in only one command.

6. Build and install the new driver

Now, the whole requirements to install the new driver are done. Let us now change in the driver directory, which we have uncompressed in a few steps before:

cd r8168-8.025.00

NOTE: Again, please do not forget, to change “r8168-8.025.00″ to the version which you have downloaded.

The only think we have to do now is, to build the driver and install it. To build it, just type:

make clean modules

after a few secondes (depending on your CPU), the driver is build and you can install it with:

make install

7. Welcome r8168

One of our last steps is, to let the system know about the r8168 driver. With the command

depmod -a

you rebuild the kernel module dependencies and with an

insmod ./src/r8168.ko

you insert the new kernel module (the driver) into the kernel.

8. Make it available for boot

To always use the new module, you have to make a new initrd boot file. Just do

mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`

in a terminal. Here we make the initrd file with the help of the “uname -r” command, which allows us to get the version of the actually running kernel.

At least, you have to add in the “/etc/modules” file a new entry, which is called “r8168″, to get the driver automatically loaded after boot. As an alternative you can do the last step again with only one command:

echo “r8168″ >> /etc/modules

That’s it! After a reboot you should have the best possible performance with the RTL8111/RTL8168 and additionally no other network problems should be available anymore (no break down).

After the reboot you can check if the right driver is loaded with this command:

lspci -v

with this command you should find your RTL8111/RTL8168 network card in a list and the additional command “Kernel driver in use: r8168″.


Opendkim won't start: can't open PID file? This is the complaint I get from systemd:

"opendkim.service: Can't open PID file /var/run/opendkim/opendkim.pid"

As seen here:

systemctl status opendkim.service

puts out this:

● opendkim.service - OpenDKIM DomainKeys Identified Mail (DKIM) Milter
   Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) (Result: timeout)
     Docs: man:opendkim(8)
           man:opendkim.conf(5)
           man:opendkim-genkey(8)
           man:opendkim-genzone(8)
           man:opendkim-testadsp(8)
           man:opendkim-testkey
           http://www.opendkim.org/docs.html
  Process: 8217 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf (code=exited, status=0/SUCCESS)
    Tasks: 6 (limit: 2361)
   CGroup: /system.slice/opendkim.service
           └─8226 /usr/sbin/opendkim -x /etc/opendkim.conf

Feb 11 04:56:48 hacksaw.org systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter...
Feb 11 04:56:48 hacksaw.org systemd[1]: opendkim.service: Can't open PID file /var/run/opendkim/opendkim.pid (yet?) after start: No such file or directory
Feb 11 04:56:48 hacksaw.org opendkim[8226]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)
Feb 11 04:58:18 hacksaw.org systemd[1]: opendkim.service: Start operation timed out. Terminating.

If I start the daemon by hand, it goes. This seems to be about systemd.

Other data:

#ls -ld /var/run/opendkim/
drwxr-xr-x 2 opendkim opendkim 40 Feb 11 04:25 /var/run/opendkim/

The only line on the opendkim.conf:

UserID      opendkim:opendkim

The default opendkim service file, from /lib/systemd/service:

[Unit]
Description=OpenDKIM DomainKeys Identified Mail (DKIM) Milter
Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
After=network.target nss-lookup.target

[Service]
Type=forking
PIDFile=/var/run/opendkim/opendkim.pid
UMask=0007
ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf
Restart=on-failure
ExecReload=/bin/kill -USR1 $MAINPID

[Install]
WantedBy=multi-user.target

I fixed it by specifying the PidFile in the /etc/opendkim.conf file:

PidFile                 /var/run/opendkim/opendkim.pid

I think it's better to solve it here than modifying the systemd script. Also, systemd recommends the PIDFile option if the Type option is set to forking, which it seems to be in this service.

This PidFile setting was present in the default /etc/opendkim.conf file. However, I replaced that file while I was following a tutorial for configuring OpenDKIM. So that is where it went wrong for me.

I solve this problem just by creating opendkim folder in /var/run/ and chowned it to opendkim:opendkim. After that the service started correctly and created its pid-file.


Problem with DNS (17.10) Fresh installation of Ubuntu 17.10. After 1 day of use, I couldn't get access to webpages. It was a DNS problem. Every time I restart Ubuntu I get this in /etc/resolv.conf:

# Generated by Connection Managernameserver ::1
nameserver 127.0.0.1

After writing manually the resolv.conf file indicating a DNS server (google) each time after I reboot, I can get access to Internet.

nameserver 8.8.8.8
nameserver 8.8.4.4

However, when I connect to a corporate VPN, I experience the same problem again, I cannot access web pages. If I disconnect the VPN, the DNS appears to work again.

System information: http://paste.ubuntu.com/26024991/

Probably DNS configuration gets pushed from VPN client. Why it is pointing to lo address - check servers configs if possible.

I believe you have a line like this on the servers openvpn file:
push "dhcp-option DNS 127.0.0.1"

To override this, do simply:

echo -e "nameserver 8.8.8.8\n nameserver 8.8.4.4" > /etc/resolv.conf

chmod 444 /etc/resolv.conf

chattr +i /etc/resolv.conf

chattr will set immutable bit, so the file doesn't get overwritten.

PS (maybe resolv.conf is managed by systemd somewhere else - idk i do not use sysd )

Please edit /etc/NetworkManager/NetworkManager.conf:

 dns=default

then, restart NM service...