Desktop notification when long running commands complete I'd like to have a desktop notification whenever a command that has run for more than, say 15 seconds, finishes in an interactive shell.

In other words, I would like all commands to be wrapped in something like this

start=$(date +%s);
ORIGINAL_COMMAND;
[ $(($(date +%s) - start)) -le 15 ] || notify-send "Long running command finished"

What's the best way to accomplish this in bash?

As far as I understood you want a wrapper. And you want to use a command through it so that it will give you desired notification if running time of your command is more than 15 sec. So here is it.

wrapper(){
    start=$(date +%s)
    "$@"
    [ $(($(date +%s) - start)) -le 15 ] || notify-send "Notification" "Long\
 running command \"$(echo $@)\" took $(($(date +%s) - start)) seconds to finish"
}

Copy this function in your ~/.bashrc and source ~/.bashrc as,

. ~/.bashrc

Useage

wrapper <your_command>

If it takes more than 15 sec you will get the desktop-notification describing the command and its time of execution.

Example

wrapper sudo apt-get update

You can also do this with a simple if statement like this

#!/bin/bash

START=$(date +%s)

TIME=$(($START+15))

ORIGINAL_COMMAND;

END=$(date +%s)

if [ $END -gt $TIME ]
then
    notify-send "Task Completed"
fi

You can use your own variable names.

I can confirm that this works, I tested with a command that takes a long time to finish and one that does not and the notification comes for the one that takes a long time

You can also do this with any command by replacing ORIGINAL_COMMAND with $@ and running the script as ./script command.


sudo apt-get install vim -- is not working, failed with dependency issues Reading package lists... Done
Building dependency tree
Reading state information... Done
vim is already the newest version (2:7.4.1689-3ubuntu1.3).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python3 : Depends: dh-python but it is not installable
 python3-setuptools : Depends: python3-pkg-resources (= 20.7.0-1) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

further tried to run apt-get -f install  vim  but again same error.

First, you have vim installed, and it is the newest version. You don't need to install it.

Second, you have some issues with Python packages. To solve them:
  - Run sudo apt-get -f install then run sudo dpkg --configure -a. Finally, run sudo apt-get -f install.
  - If the problem is not solved, run sudo apt-get install --reinstall python3

If not worked after sudo apt-get -f install, run the command sudo apt-get update to update.


grub unknown filesystem, Boot-Repair fails I have a Ubuntu (actually, Kubuntu) 14.04/

I tried using Gparted Live to resize sda2 and it gave an error, without giving other details (details.html had no information)

Since then, whenever I boot, I get the error

Error: unknown filesystem.
grub rescue>

I have downloaded BootRepair, and followed the instructions (purge etc) but at the end I still get "unknown filsystem" in the middle of the messages

in grub, I get:

grubrescue> ls
(hd0) (hd0, gpt3) (hd0, gpt2)  (hd0, gpt1)  (hd1)
grubrescue> ls (hd0,2)\
error: unknown filesystem

also,:

grubrescue> set root=(hd0,2)
grubrescue> set prefix=(hd0,2)/boot/grub
grubrescue> insmod normal
error: unknown filesystem

This is the boot-repair info: http://paste.ubuntu.com/22179649

It appears that there is a mixture of efi  and MBR booting this is supported but it is very complicated to set up.
If you have no valuable information on the disk I would recommend a complete reinstall of you OS after you have recreated the disk partition table and reformatted the partitions.  Obviously you will lose all info currently on the disk.  If you wish to recover the info then you can attempt to repair the portion table by other means.  This is not a trivial task and should not be undertaken lightly.  If you wish to pursue this route then I would recommend a considerable amount of research prior to attempting any repair.  It is very easy to make matters worse. A good starting place is Rods Books on EFI and GPT.  There are a number of excellent articles on these topics with instructions and help in implementing both.
You have probably tried to use an MBR type repartitioning tool on a hot portioned disk.  Usually this fails without causing damage as the GPT spec has provision for a protective MBR.  I do not know what the boot repair tool did but it seems to have made matters worse.
Before you start to reinstall decide if you want to use GPT or MBR disk partitions and then use appropriate tools.  Also you should decide on the type of booting you are using.  (EFI or MBR).
By the way is there a particular reason to use Ubuntu 14.04. If not then I recommend using 16.04 the latest LTS release.
Hope this gives you some pointers and goes some way to help you.


recordMyDesktop rendering is bad I have used recordMyDesktop for a while an it worked very good, but now it have begin to draw lines through the desktop on the rendered video. I don't know how that happened, but it would be good to still be using recordMyDesktop. I hope you guys have an answer to this. It would be good. But if you haven't an answer I maybe have to change desktop recorded. Then you can give me some advice of which program I should use then. Thanks in advice :-)

This one is pure awesome :D I believe it is the best one there is


How to share folders between two PC's with Ubuntu via WIFI Hello!

I try to share HOME folders between to PC with Ubuntu 16 via WIFI connetction.

I have followed this How to share files through the local network?. Now I see shared folders on each PC, but I can't access them. when I click on shared forlders on same PC or another PC, access popup appear and ask me Username, Domain (WORKGROUP as default) and Password.

I enter current user and password to access shared folder on same PC and username and password registered on another PC for shared folder on another PC. After press 'Connect' button this popup reset to default values without any errors/warnings. After press 'Cancel' it appear again and only after again 'Cancel' it dissapearing.

The only thing that is working is

ssh remote_pc_user@192.168.0.xxx

May be I have missing something in my settings for connect to shared folders in Files?

Thank you.

Check out SAMBA,

Complete tutorial here

Samba Share Ubuntu

By default Home Folder has only access to local particular user and other user don't have access to it at all. You can verify this statement by running ls -lgH in root folder. It is not recommended to share Home folder directly but if you still want to do it anyway. Changing it's permission through chmod might help.


How do I install and use the latest version of GNOME? I followed the instructions for compiling GNOME Shell and it did compile with a few errors here and there but it didn't run. I installed GNOME Shell using sudo apt-get install gnome-shell but I got version 2.31.x, while the latest is 2.91.5 or something. So is there a way for me to install the latest build?

Is there some repository available for the latest build?

Installing from the Software Center (11.10 and newer)

Open the software center search for "gnome shell" and install it, or just click this button:

After it installs, log out.

For 11.10

at the login screen click the little gear icon and select "GNOME" from the menu.

For 12.04 and 12.10

At the login screen click the icon show and select "GNOME" from the menu.

After that just put in your password and login:

The login manager will remember the last session you went into so you only need to select GNOME once, after that you can just login normally.

Customizing it further

You can also use the fallback mode if you prefer an old-school experience:

How to revert to GNOME Classic Desktop?

And if you use auto logins you might need to tell lightdm to always use shell:

How can I use gnome shell by default instead of unity?

Other Goodies to install with it

gnome-documents
gnome-boxes

Command Line Instructions:

 sudo apt-get install gnome-shell

Where to report problems:

Discussion about GNOME3 packaging (Mailing list link on the bottom left): https://launchpad.net/~gnome3-team

Most problems and issues with this set of packages can go on this list, it should be the first place you report problems and issues.

Bug reports that are NOT packaging related: https://bugzilla.gnome.org/

If GNOME3 isn't working well it could be packaging related, so please don't just randomly report bugs to GNOME unless you are confident that it's an upstream GNOME problem.
If you're not sure if you should report the bug upstream then ask someone either on IRC or on the mailing list above if you need help determining if something should be reported to GNOME.

Ubuntu 14.04 & 15.10

If you want to test the latest Gnome version (testing) :

sudo apt-add-repository ppa:gnome3-team/gnome3
sudo apt-add-repository ppa:gnome3-team/gnome3-staging

sudo apt-get update

sudo apt-get install gnome-shell

  === WARNING ===
  The packages here have been deemed not ready for general use, they have known bugs and/or regressions, sometimes of a critical nature. Mostly things should run smoothly but be prepared to use ppa-purge, when you encounter issues!

  If they break your system, you get to keep both halves.
  - Gnome Staging PPA


Is there a command to scroll? Other than using xdotool is there a way to scroll down by a set amount using a command. In other words, what is the scrolling command?

I'm not looking for a keyboard shortcut, I want a command for scrolling by say 10px in the currently focussed window. I also don't want xdotool because I need the "deeper command", what is "executed" when the wheel is rolled.

Not exactly what you asked for, because the OP asked for "10px" scrolling, but since it also asked for "what is executed when the wheel is rolled".  In Linux, when the wheel is rolled, it's up to the application to interpret it, but you can still simulate wheel rolling.
Wheel rolling up and down are typically mapped as mouse button 4 and 5 respectively.  The following command will simulate scrolling up
xdotool click 4

and the following command will simulate scrolling down
xdotool click 5

Use custom shortcuts or scripts to bind your input events to this command to simulate a wheel roll.

Scroll backwards:

Shift + Page Up

Scroll Forwards:

Shift + Page Down


How to mount a VirtualBox shared folder at startup? I have Ubuntu installed in Virtualbox. I want to mount my VirtualBox shared folder in Ubuntu automatically when I log in Ubuntu. I put the following line in my ~./bashrc and ~/.bash_profile:

sudo mount -t vboxsf windows_share /media/windows_share

where windows_share is the name I created with Virtualbox. But everytime I start my Ubuntu, it asks me for passwd since it needs sudo. Is there anyway to automatically mount Windows share without entering password every time I log in?

To always mount a Virtual Box "shared folder" on booting an Ubuntu guest we have two options. It is up to personal preference which option works best in our setting.
1. Mount with fstab
To mount a shared folder using the vboxsf filesystem provided with Guest Additions we first need to make sure prerequisites are met. Then we may put the following line in our etc/fstab file:
<name_of_share>   /path/to/mountpoint   vboxsf   <options>  0   0

Replace name_of_share and /path/to/mountpoint with your individual setup (the directory for the mountpoint has to be created first). See the manpage for mount <options>. One possibility is to mount with defaults, or to give specific mount options (e.g. rw, suid, exec, auto, users).
On some systems the vboxsf kernel module is not yet loaded at the time fstab is read on boot. It may then help to append the vboxsf kernel module to /etc/modules.
Some systems may need option comment=systemd.automount in their fstab entry (source).
2. Mount with Virtual Box "automatic mounting":
In recent releases of Virtual Box we can also automatically mount shared folders on creation:

After a reboot of the guest this shared folder will be mounted to the guest directory /media/<username>/sf_<name_of_share> accessible to all users who had been made member of the group vboxsf.

I recently encountered this thread when, after updating to Ubuntu LTS-18 (and making no changes whatever to VirtualBox, and after reinstalling the extensions and blah-de-blah), auto-mount stopped working.  The sf_xxx directories were present in /media/ but none of them were actually mounted.

Attempts to mount them in /etc/fstab (as suggested by VirtualBox's own documentation) didn't work:  the boot failed into "emergency mode," even when I had modified the /etc/modules file.

What did eventually work – although I regard it as a stinkin' hack – is the crontab trick described above.

To this day, I have no idea "what broke."


I can not install Google Chrome For the command:

apt-cache show google-chrome-stable

I get:

Package: google-chrome-stable
Version: 7.0.517.44-r64615
Architecture: i386
Maintainer: Chrome Linux Team <chrome-linux-packager@google.com>
Installed-Size: 76076
Pre-Depends: dpkg (>= 1.14.0)
Depends: ca-certificates, libasound2, libatk1.0-0 (>= 1.13.2), libbz2-1.0, libc6 (>= 2.6-1), libcairo2 (>= 1.4.0), libfontconfig1 (>= 2.4.0), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.2.1), libgconf2-4, libglib2.0-0 (>= 2.14.0), libgtk2.0-0 (>= 2.12.0), libjpeg62, libnspr4-0d (>= 4.7.1), libnss3-1d (>= 3.12.3), libpango1.0-0 (>= 1.18.3), libpng12-0, libstdc++6 (>= 4.2.1), libxslt1.1, libxss1, lsb-base (>= 3.2), wget, xdg-utils (>= 1.0.1), zlib1g (>= 1:1.2.3.3.dfsg-1)
Conflicts: google-chrome
Replaces: google-chrome
Provides: google-chrome
Priority: optional
Section: net
Filename: pool/main/g/google-chrome-stable/google-chrome-stable_7.0.517.44-r64615_i386.deb
Size: 21896322
SHA1: 2a09d457180a77a6d1472f24562feb43c2184cf5
MD5sum: eff030c9ebee87eb3abff1ce95f65796
Description: The web browser from Google
 Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

Package: google-chrome-stable
Status: install ok unpacked
Priority: optional
Section: web
Installed-Size: 108380
Maintainer: Chrome Linux Team <chromium-dev@chromium.org>
Architecture: i386
Version: 17.0.963.83-r127885
Replaces: google-chrome
Provides: google-chrome, www-browser
Depends: libasound2 (>> 1.0.22), libbz2-1.0, libc6 (>= 2.11), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.2.14), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.3.9), libgcc1 (>= 1:4.1.1), libgconf2-4 (>= 2.27.0), libgcrypt11 (>= 1.4.2), libglib2.0-0 (>= 2.18.0), libgtk2.0-0 (>= 2.18.0), libnspr4-0d (>= 4.7.3-0ubuntu1~) | libnspr4 (>= 4.8.7-0ubuntu1), libnss3-1d (>= 3.12.3), libpango1.0-0 (>= 1.20.0), libpng12-0 (>= 1.2.13-4), libstdc++6 (>= 4.4.0), libx11-6 (>= 0), libxext6 (>= 0), libxfixes3 (>= 1:4.0.1), libxrender1, libxss1, zlib1g (>= 1:1.2.3.3.dfsg), ca-certificates, libcurl3, libatk1.0-0 (>= 1.30.0), lsb-base (>= 3.2), xdg-utils (>= 1.0.2), wget
Pre-Depends: dpkg (>= 1.14.0)
Conflicts: google-chrome
Description: The web browser from Google
 Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

Download the .deb file directly from the Google Chrome website and install it (double-click on it).
This will also add the repository for stable updates in the future.

Use the below command in terminal to install the chromium(variant of chrome) browser Ubuntu

sudo apt-get install chromium-browser


Sharing File between 2 ubuntu machines Sorry for asking what is most probably an already answered question.

I have 2 machines running 12.04 (desktop and a laptop) and I want to move nearly 50gig of files from one to the other in the most efficient way possible.

I have taken all the files I need from my laptop and saved them all inside one file on my desktop, ready to be moved over to my pc. I then plan to move them from my pc, to my external hd (that can only be connected to my desktop pc)

There are a few different ways for me to do this, and I have spent the last couple of hours trying to figure out which would be the best way, but have only succeeded in confusing my little n00b brain more.

I need a guide with basic step by step instructions, including every step that I will need, but also in a format that is easy to understand and implement please.

Im sure this has been answered before, but either I cant find the thread, or my brain is throwing spanners in the works, so your help would be greatly appreciated.

Thanks Ubuntu masters

EDIT I have just tried using 'giver' and it seems to work for small pictures but not for larger things or folders. I used this guide succesfully; How to transfer files between Ubuntu machines? but I assume the programme isnt capable of moving 45gig folders at one time, but it should help someone wanting to move smaller files easily.

The quickest and easiest way I found to move my files from laptop to pc was DUKTO, recommended to me by https://askubuntu.com/users/16395/rmano Thanks!

The link for DUKTO is here;
http://www.msec.it/blog/?page_id=11

Its simple to set up and use, and I believe its also multi platform. A drawback for some will be the lack of any security features meaning data could be sniffed but that wasn't a problem for me as I just plugged both devices straight into the router and unplugged the phoneline to create a superfast and secure network.

Took less than 2 hours to shift about 110gig of data so Im happy, and would recommend DUKTO :) (for use in a secure network)

Thanks for contributions

P.S. There are a number of other applications claiming to do the same or similar to DUKTO, and they might be even better

as I see it you only have one option, that is to plug in the external harddrive to your laptop, ubuntu do got a cloud service but it would take too long for you to move all of it


Unable to install ubuntu 15.04 64 bit OS When I boot from my pendrive and go into boot options under my pendrive, which has Ubuntu 15.04 (64 bit), it says 'insecure boot' and does not boot into pendrive.

Any solutions for this?

I have 8GB of RAM and I want to install the latest version of 64 bit Ubuntu.

Your USB drive seems to not be properly configured.

Assuming you are running a current Ubuntu system:

Open built-in Disks tool and click ☰ (right top corner) and select Restore Disk Image
Choose the Ubuntu 15.04 ISO image, select the USB drive to write it to and start the process
Reboot the computer and select the UEFI - USB - drive entry from BIOS menu to boot from

Your system uefi firmware aparently does not allow booting untrusted (which is cryptographically unsigned) operating systems. See if you can access the firmware (usually by pressing a brand/model specific key during the early boot) and change the setting.


add apps to top panel in ubuntu 12.04 Is there any way to add any app I wish to the top panel in Ubuntu 12.04? e.g, I have dropbox, mail, wireless and sound icons there. I'd like to add for example terminal, google earth or any app there.

Also, what's the shortcut for the task manager, that shows the processes and some specifications of the computer?

If you are using GNOME panel then you can add any application in there. All you have to do is Super+Alt+Right Click in panel. Click Add to panel and then select Application Launcher and click forward.

Then choose your desired application from list and click add.

You are done.

If you just follow these instructions:

open the application, the application will appear in the launcher on the left side,
now press Super/Window + Alt
then right click on the application on the launcher and click on lock to launcher.

Now the application is permanently locked to launcher.


How do I remove Cinnamon? Today I installed Cinnamon 1.4 but when I log in to it I can't see any panels, just my background image. Can you tell me how to log in to Unity using the terminal and how to remove Cinnamon?

From your post on Ubuntu Forums

Boot into Recovery mode and type this for the var/apt/cache error:
sudo mount -n -o remount /

Then disable auto login from virtual console by doing the following
sudo nano /etc/lightdm/lightdm.conf

Some of the lines should look like this

  [SeatDefaults]
  autologin-guest=false
  autologin-user=username
  autologin-user-timeout=0
  autologin-session=lightdm-autologin
  greeter-session=unity-greeter
  user-session=ubuntu

Just put a # before all lines starting with autologin

Then whenever you boot into Ubuntu just change the login to unity from the lightdm's login screen options

Also you might want to remove Cinnamon
Then type in the terminal

  sudo apt-get --purge autoremove cinnamon

Hope that helps.

I fixed this:

http://ubuntuforums.org/showthread.php?t=1987942


Ubuntu- notebook overheating fan1 = 0 RPM speed I have installed Ubuntu alongisde with Windows 8.1 but my notebook is really loud and temperatures as super high while I'm just browsing webpages on the internet.

Now basically when I do not do anything it's :

temp 1: 68-71 min:54 max : All of them 85
physical id: 68-71 min:54
core 0: 67 min:52
core 1: 68-69 min:51
core 2: 70 min:53
core 3: 64 min:52
temp1 : 60 min:52

Laptop is really warm and especially loud, I do not have the same problem in Windows even though termeratures are not optimal. In Windows its around 56-58 all of them + notebook is not laud.
My specs:

Lenovo ideaPad z50-70
GTX 980 4gb
Intel i7 haschwell 4720 Hq
Ubuntu 14 / Windows 8.1

tlp-stat -t shows:

CPU temp = 69 [°C]
Fan speed (fan1) = 0 [/min]

I noticed in Psensor and also in another application that fan1 is at RPM:0 could this be the problem? I'll be thankful for all the help.

You might try upgrading to the latest microcode for your processor, as described here: Link

Since you have an intel processor, the following command should upgrade the microcode for your cpu:

sudo apt-get install microcode.ctl intel-microcode

Also, try upgrading your bios to the latest version. This might be tricky, since many manufacturers do only provide Windows executables with the drivers. Since you have Windows installed alongside Ubuntu, use that to run the Bios update. Download the appropriate executables from Lenovo and run them under Windows.


How do I do a complete BIND9 DNS Server Configuration with a hostname? I need a complete step-by-step guide on how to produce such a server configuration.

Can anyone help-me?

Complete DNS server in ubuntu server 12.

First of all change the ip address of your server form DHCP to STATIC for this use the following command

sudo nano /etc/network/interfaces

and add:

auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-nameservers

Restart networking daemons

sudo /etc/init.d/networking restart

Before configuring a DNS server in linux Ubuntu you have to make domain name first and then you will proceed. First you will check your hostname command for this is

sudo nano /etc/hostname

 nefitari

(This is my Ubuntu server hostname yours might be different .You can change this according to your need)

Now after hostname, you have to make domain name for your server. Say servername.domain.com it is better practice that whenever you are configuring server for home use or so, do not use .com but .hom or .net or whatever you like. Give the below command

  sudo nano /etc/hosts

add if it does not have it:

  127.0.0.1   localhost

  192.168.1.5     nefitari.autun.hom    nefitari

In my file 127.0.0.1 is for localhost and I have changed the second IP address 127.0.1.1 with my server IP that is 192.168.1.5 now I enter my domain name having my hostname nefitari first then my domain name autun.hom and then alias nefitari. You can select of your own, hostname.abc.net or hostname.home.lan etc. but remember changing to this file need to restart your server and then login. Restart is must

Now install BIND9

 sudo apt-get install bind9

After installation just configure the below files step by step

Named.conf.options
Named.conf.local
/etc/resolv.conf

Now configure file named.conf.options
This file is use for DNS IPs It mean that your server must connect to some DNS outside. When you buy domain name from ISP’s they normally gives you their own DNS IPs. You can use open DNS IPs of google or so. In my case I am using my own ISP DNS IPs.

 sudo nano /etc/bind/named.conf.options
 forwarders {
 # Give here your ISP DNS IP’s
192.168.1.1;    # gateway or router
182.176.39.23;
182.176.18.13;
68.87.76.178;
  };

***Save the file and exit***using control x press y and overwrite the file

Now edit the file named.conf.local
This is the file in which we define forward zones and reverse zones. It means that when we enter domain name it will translate it into IP address and when we enter IP address it will simply convert it into name.

sudo nano /etc/bind/named.conf.local

will show:

# Our forward zone
zone "autun.hom" {
 type master;
 file "/etc/bind/zones/db.autun.hom";
 };

# Our reverse Zone
# Server IP 192.168.1.5
zone "1.168.192.in-addr.arpa" {
  type master;
  file "/etc/bind/zones/db.192";
 };

***Save the file and exit***using control x press y and overwrite the file

Now we will make these two database files db.autun.hom and db.192 in zones folder

First make the directory zones in /etc/bind/

  sudo mkdir /etc/bind/zones

Before making files let me clear you that I have different devices

Devices       IPs

Server itself    192.168.1.5
Gateway          192.168.1.1
Win7pc       192.168.1.50

Now in zones directory we will create two files first db.autun.hom. I am just copying the db.local already present in /etc/bind folder to zones folder by changing its name to db.autun.hom.
I will put these IP’s in my db.autun.hom file. Let’s start

sudo cp /etc/bind/db.local  /etc/bind/zones/db.autun.hom

Now use the command below to edit the file

sudo nano /etc/bind/zones/db.autun.hom

 ;
 ; BIND data file for local loopback interface
 ;
 $TTL    604800
 @       IN      SOA     nefitari.autun.hom. webuser.autun.hom. (
                          2         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
  ;
autun.hom.      IN  NS  nefitari.autun.hom.
autun.hom.      IN  A   192.168.1.5
   ;@               IN  A   127.0.0.1
   ;@               IN  AAAA    ::1
nefitari            IN  A   192.168.1.5
gateway         IN  A   192.168.1.1
win7pc          IN  A   192.168.1.50
www     IN  CNAME   autun.hom.

Save it and exit

Webuser.autun.hom. is the email who will access name server. You can
write any name instead webuser like admin, root or host master etc.
Autun.hom. is my NS means name server
Autun.hom.changing to IP 192.168.1.5
@ IN A 127.0.0.1 and AAAA  ::1 can be comment out you should not need
it because db.local is already present in /etc/bind it is just a copy
of that file. So no need you can delete it
Changing Nefitari to IP 192.168.1.5
Gateway to IP 192.168.1.1
Win7pc you can name your windows PCs or Linux Clients to any name but
remember IP of that client must correctly be inserted into file. In
my case I gave IP of windows PC 192.168.1.50
Last, I am using CNAME means canonical name it is just an alias to
nefitari. Means that you can access your server by entering
www.autun.hom instead nefitari.autun.hom . You can omit this or
comment it. It is just up to you.

Now create reverse lookup zone file

sudo cp /etc/bind/db.127    /etc/bind/zones/db.192

Now use the command below to edit the file

sudo nano /etc/bind/zones/db.192

   ;
   ; BIND reverse data file for local loopback interface
   ;
   $TTL    604800
   @       IN      SOA     nefitari.autun.hom. webuser.autun.hom. (
                          2         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
   ;
        IN  NS  nefitari.
1   IN  PTR gateway.autun.hom.
5   IN  PTR nefitari.autun.hom.
50  IN  PTR win7pc.autun.hom.

Save it and exit

Now when you are done with your zone file you have to check it whether it is working correctly or not by entering the command below for forward zone file

named-checkzone autun.hom /etc/bind/zones/db.autun.hom
zone autun.hom /IN: loaded serial   2
Ok

Now check the reverse zone file

named-checkzone autun.hom /etc/bind/zones/db.192
zone autun.hom /IN: loaded serial   2
Ok

If the output of your named-checkzone is same as above then it is working fine otherwise you made some mistake in file.

Now edit the file resolv.conf

sudo nano /etc/resolv.conf

nameserver      192.168.1.5
domain      autun.hom
search      autun.hom

Enter the following lines into to your resolv.conf file and save it

Restart the bind

sudo /etc/init.d/bind9 restart

After bind start check your setting in log file

tail -f /var/log/syslog

it must not have any error in the log

Checking forward zones

host –l autun.hom

Output should like this

 autun.hom name server nefitari.autun.hom.
 autun.hom has address 192.168.1.5
 gateway.autun.hom has address 192.168.1.1
 nefitari.autun.hom has address 192.168.1.5
 win7pc.autun.hom has address 192.168.1.50

Now use NSLOOKUP

nslookup autun.hom

OUTPUT

Server: 192.168.1.5
Address: 192.168.1.5#53

Name: autun.hom
Address: 192.168.1.5

Use DIG

 dig gateway.autun.hom

 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35612
 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

 ;; QUESTION SECTION:
 ;gateway.autun.hom         IN  A

 ;; ANSWER SECTION:
 gateway.autun.hom      604800  IN  A   192.168.1.1

 ;; AUTHORITY SECTION:
 Autun.hom.     604800  IN      NS  nefitari.autun.hom.

 ;; ADDITIONAL SECTION:
 Nefitari.autun.hom.    604800  IN      A   192.168.1.5

 ;; Query time: 12 msec
 ;; SERVER: 192.168.1.5#53(192.168.1.5)
 ;; WHEN: Thu Aug 8 01:56:25 2013
 ;; MSG SIZE  rcvd: 90

Output should similar to the above, check status: NOERROR means it is resolving check ANSWER SECTION: gateway.autun.hom is resolved into 192.168.1.1

Checking reverse zone

 host 192.168.1.1

Output

 1.1.168.192.in-addr.arpa domain name pointer gateway.autun.hom

If it gives you an error like below

 host 1.1.168.192.in-addr.arpa. not found: 3(NXDOMAIN)

This means that you made some mistake in /etc/bind/named.conf.local file in reverse zone
If your server IP is 192.168.1.5 then your reverse zone looks like this

zone "**1.168.192**.in-addr.arpa" {
 correct ip reversing
};

Sometime people made mistake in reversing the ip like (just an example)

zone "**0.168.192**.in-addr.arpa" {
incorrect ip reversing
};

Use NSLOOKUP

nslookup 192.168.1.1

Server: 192.168.1.5
Address: 192.168.1.5#53

1.1.168.192.in-addr.arpa    name=gateway.autun.hom

If you get NXDOMAIN or SERVFAIL like errors  it means that one of your zone file is not working correctly

Now you can ping ubuntu.com or dig ubuntu.com for the first time it will take several miliseconds to resolve the name ubuntu.com but when you run it second time it will take 1, 2 or 3 seconds normally form 1 to 10 mili seconds are normal and it means that your DNS is working properly

Configuring clients

windows side

open network connections
select change adapter settings
select properties
select internet protocol version IPv4

and here give the IP address (in my case it is 192.168.1.50 have you remember win7pc)

IP address 192.168.1.50
Subnet Mask 255.255.255.0
Default Gateway 192.168.1.1
primary DNS 192.168.1.5 (my new BIND DNS server ip)
in the same window select Advance
select DNS tab
Type in the text box below here In DNS Suffix for this
connection:autun.hom
click ok
click on validate setting upon exit
click ok

and you are done with it open CMD

ping gateway

it must gives you some replies

similarly

ping 192.168.1.1 or 5

it must gives you some replies

Test Your Server to Outside World

Now you can ping ubuntu.com or dig ubuntu.com for the first time it will take several miliseconds to resolve the name ubuntu.com but when you run it second time, it will take form 1 to 10 mili seconds, its normal time and it means that your DNS is working properly
Configuring clients

windows side

open network connections
select change adapter settings
select properties
select internet protocol version IPv4

and here give the IP address (in my case it is 192.168.1.50 have you remember win7pc)

IP address 192.168.1.50

Subnet Mask 255.255.255.0

Default Gateway 192.168.1.1

primary DNS 192.168.1.5 (my new BIND DNS server ip)

select Advance (in the same window)

select DNS tab

Type in the text box below here In DNS Suffix for this connection:autun.hom

click ok

click on validate setting upon exit

click ok

and you are done with it open CMD

Code:

 ping gateway

it must gives you some replies

similarly

Code:

 ping 192.168.1.1 or 5

it must gives you some replies
you can use NSLOOKUP
Code:

 nslookup gateway

LINUX CLIENTS

Code:

 sudo nano /etc/network/interfaces

type the following lines

Code:

 auto eth0
 iface eth0 inet dhcp

Now restart Network Deamons

Code:

 sudo /etc/init.d/networking restart

to force client renew IP command

Code:

 sudo dhclient -r

Now obtain fresh IP:

Code:

 sudo dhclient

If you are running DHCP server on your Network then enter the domain name and name server in dhcpd.conf file; for example I have DNS server named nefitari.autun.hom and IP address is 192.168.1.5 like as under

Code:

 option domain-name "nefitari.autun.hom";
 option domain-name-server  192.168.1.5;

source

The answer is just an addition to the great description above.

Troubleshooting tip

Be very careful with the many '.' in the configuration files as each one is important. A single missing '.' can stop the DNS server from working. You should not count on clear error messages.

I learned its good practice to use a more telling serial number. Its very important to increment the serial number every time the setup is modified, e.g. new entries being added. If its not incremented a secondary DNS will fail to synchronize the new settings. The suggested format is YYYYMMDDss, where ss is the "old" serial number. So when incrementing, you should increment ss by +1 and set the date to the current date.
I found this very helpful in troubleshooting the setup. In the syslog you clearly see the date and serial of the used file.

In Ubuntu 16.04 changing resolv.conf is deprecated. As jdthood writes in his comment replace the step with the following procedure:
 - Change /etc/default/bind9: the new will should look like this:

   # run resolvconf?
   RESOLVCONF=yes

   # startup options for the server
   OPTIONS="-u bind"

   # use this when you have trouble with IPV6
   #OPTIONS="-u bind -4"

see comment from not-a-patch for the IPV6 issues.

put a symlink of /etc/resolv.conf into /run/resolvconf/resolv.conf

 cd /etc
 sudo ln -s /etc/resolv.conf /run/resolvconf/resolv.conf

Offline Setup

The setup is exactly the same, and even a bit easier, since you can just skip the forwarding sections. They do not have to be present, so there is no need to edit the /etc/bind/names.con.options.

Class-B Networks

There are a few minor changes required to make this work for class-B networks (before there are comments, there is no reason why a local network , even at home, could not be a class-B instead of a class-C network). In this example I use the network number 172.20.x.x. (I think the formal notation is 172.20.0.0. for more info google rfc1918).

Use the description from the first answer, replace all IPs 192.168.x.x with 172.20.x.x, use for the server IP 172.20.0.100 and modify the files as follows:

the name of the file db.192 becomes db.172.
the file named.conf.local gets a different reverse zone section:

zone "20.172.in-addr.arpe" {
type master;
file "/etc/bind/zones/db.172";
}

The reverse zones file changes to:

;
; BIND reverse data file for 172.20.x.x
;
$TTL    604800
@       IN      SOA     nefitari.autun.hom. webuser.autun.hom. (
             2017022102         ; more intuitive serial YYYYMMDDss, here ss=02
                 604800         ; Refresh
                  86400         ; Retry
                2419200         ; Expire
                 604800 )       ; Negative Cache TTL

; note: the '@'was missing from in the initial description
@       IN  NS  nefitari.autun.hom.

100.0   IN  PTR nefitari.autun.hom.
121.0   IN  PTR client1.autun.hom.
130.0   IN  PTR client2.autun.hom.
33.0    IN  PTR client3.autun.hom.

The rest is the same.

Hope its useful for someone.


i3 throttled at 500Mhz when battery under 30% I have the following problem. As soon as the battery drops below 30%, the CPU is being throttled to 500Mhz. As soon as I plug in the power adapter, it goes back to normal. The laptop is a Lenovo U41-70, I am running Ubuntu 15.10 x64, the CPU is an Intel i3-5020U.

I am not sure if this is helpful, but while it's on battery and below 30%, lscpu (same values from cat /proc/cpuinfo) still gives out:

CPU MHz:               499.984
CPU max MHz:           2200,0000
CPU min MHz:           500,0000

When it's plugged in, CPU MHz immediately jumps up to 2195.015Mhz when there is load on the CPU, which is fine of course.

What could cause this problem? I don't have Windows installed so I don't know if the problem exists there as well.

Edit a file

You can always change your clock speed by controlling Intel-pstate.

Intel-pstate can be controlled by changing files in /sys/devices/system/cpu/intel_pstate (Change as root i.e. using sudo)

Use a bash script

You can use this bash file, which I created for my own use. Note that I don't think i3 supports turbo boost.

Download the file from google drive
Run sudo chmod 775 set_cpu_pstate
Execute with sudo ./set_cpu_pstate
Set MAX power to 100
Set MIN power to 100 to force high performance all the time
Enter 1 to activate TurboBoost or 0 to deactivate it

CPU Frequency

You can use i7z for current CPU frequency.

sudo apt-get install i7z
sudo i7z

Intel i3-5020U does not support turbo boost manually, means no software as I know something for Intel, but It offers 2 Physical Cores (4 Logical), initially clocked at 2.2GHz, which may go up to ???GHz and 3MB of L3 Cache.

Among its many features, Hyper Threading, and Virtualization are activated. and I don't know but there would be drivers in Ubuntu but you are not able to see the graph like in Windows.

It is something like over clocking in AMD CPU through your BIOS setting if your are an avid gamer you might know this to increase the clock speed in AMD so Intel does not let you over-clock their chip yourself from BIOS settings.

You can check performance of the CPU from System Monitor available with Ubuntu. What I know about you need to have a BIOS update for the systems come pre-installed with Ubuntu and their has to be something to update your BIOS in Ubuntu also to get the full potential of the hardware.

As for wine I will not recommend anyone to update firmware we need something to update BIOS pre-installed with Ubuntu I feel Canonical should and definitely will do something. I also had a very bad experience with Dell,I wish Canonical hardware certification team should have the best guys because I love Ubuntu and it has to be as easy at least on hardware site to upgrade your BIOS using Ubuntu.

You can see  about the performance of the CPU at Ark-Intel also.


My Update manager is not showing the latest version of ubuntu 12.04? I am currently having ubuntu 11.04

As per your statement, if you want to upgrade to next version (12.04 ?) of ubuntu using update manager just type this command in terminal (or hit alt+f2 to run as a program)

$ update-manager -d

It will pop up update manager with the option to upgrade to next version of ubuntu on top.


Ubuntu 16.04 on OSX with VirtualBox, Unity incredibly slow? I did some googling and found similar complaints with older versions of Ubuntu/OSX, but none of the suggestions in those worked, seeing if anyone has any updated advice.

I am running VirtualBox 5.1.2 on OSX 10.11.6. I've installed Ubuntu 16.04. The VM has 8GB of RAM and a 40GB disk size. Right now I have 2D and 3D acceleration turned on for the VM, but turning them on and off doesn't seem to affect anything.

Symptoms are general lag involving anything with the Unity UI. Even starting with typing my password into the login screen. I type my password, then watch as the characters appear one at a time with about a half second delay between each one. Typing in universal search is a similar experience. Dragging windows around is also laggy. Mouse clicks themselves don't seem to be similarly delayed though. Typing in say, the address bar in Firefox is SLIGHTLY delayed, but typical of going through a VM and not nearly to the extent of the delay within Unity. Typing in Terminal is pretty responsive as well. Just seems to be actual Unity UI things.

Any ideas?

This is most likely caused by the absence of 3D acceleration (settings -> display -> enable 3d acceleration).

Unfortunately, at this time, this option does not work for mac. See this link

I've landed on this thread because I've searched for solutions for this problem myself, so because of that, I'm going to write my suggestion here in case others come across the same behaviour:
So in my case enabling 3d acceleration on my Mac actually ruins the whole experience. I imagine there shouldn't be any important difference in this respect between Ubuntu 16.04 and Ubuntu 18.04 (which I'm currently running to test this), but this behaviour has been consistent for maybe two years now, so I believe it applies to previous versions of VBox/Mac OS/Ubuntu running as VM.
So in my case, whenever I enable 3D acceleration (which actually enables VMSVGA, without telling you --> going back to the settings will display VMSVGA, even if you have already chosen another graphics controller with 3D) one of the immediate effects is that it repeats the characters I enter when I type just a little bit faster. Very, very frustrating. On the other hand, enabling VMSVGA without 3D accelaration displays the same behaviour.
So what I did is disable 3D acceleration and choose VBoxVGA. When you do that, you get an extremely misleading (given the circumstances) message, that the virtualbox has identified some invalid settings (which obviously aren't invalid). Just ignore them, and start your VM as it is. I've also added a maximum of 128MB of video memory just to make sure. With these settings the VM works decently (as good as a VM could work in an virtualised environment under these circumstances).
It goes without saying, as others here have already pointed out, the the vbox guest additions need to be installed.
My current setup:
macbook pro 13" Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz (2019), MacOS Catalina, VirtualBox 6.1, Ubuntu 18.04.


How to install LAN Messenger in Ubuntu 16.04 and higher? I want to install LAN Messenger in Ubuntu 16.04 OS.

I have referred following link but didn't get LAN Messenger install in my OS :
How to Launch Lan Messenger in Ubuntu 14.04

Can you please help me to solve this problem?

Thank you in advance.

The Messenger was successfully installed but I am unable to open it. If I write command in terminal like lmc &, I am getting following error :

This is not a Canonical "designed" product.
/usr/lib/lmc/lan-messenger: error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared object file: No such file or directory

Also, I am not able to find LAN in my ubuntu.. as that link describes

Instructions for installing LAN Messenger--a serverless text chat application--on Ubuntu/Mint 18.x.

Notes: If anyone would like to install this app on a 19.x O/S release, note that the procedure is somewhat different and it requires a bit of "hacking". I'll update this post with that procedure when I'm able... The LAN Messenger software has only been built for install on 64-bit Linux. If you require a 32-bit version, you'll need to build the app from the source code which is available at the web address shown below... Be aware that I've only tested the app's basic features, i.e. chatting and sending files between two computers and these functions appear to work quite well.

For what it's worth, here's a review of LAN Messenger from 2013:
https://www.makeuseof.com/tag/instant-message-anyone-on-your-home-network-with-lan-messenger/

As the first step in the process, boot into a live instance of the chosen Ubuntu/Mint 18.x distro. In my case, I had a live USB copy of Linux Mint 18.1 to work with. I recommend this step be done because it allows you to investigate LAN Messenger without altering anything in your computer's installed O/S.

Having booted into the live session, download the LAN Messenger .deb file from the app's website (https://lanmessenger.github.io/) and install it using GDebi by right-clicking on the .deb file and choosing "Open with GDebi Package Installer".

Once installed, try to run the app ("lmc") in the terminal. You'll likely get the following error:

  mint@mint ~ $ lmc /usr/lib/lmc/lan-messenger: error while loading
  shared libraries: libQt5Multimedia.so.5: cannot open shared object
  file: No such file or directory
  mint@mint ~ $

If so, then from the terminal update the package cache and then install the libqt5multimedia5 package:

sudo apt-get update
sudo apt-get install libqt5multimedia5

Again, try running the app in the terminal. If there are no fatal errors reported and the software's icon now exists in the system tray, left-click on it to access its menu options. Before continuing you may want to first "exit" the app in the system tray and confirm that it can be restarted from the system menu.

If everything works as expected, you can repeat the above process on a second computer on your home network (booting from a second live USB or DVD) and test the communication between both systems. When you first run the app on the second computer, you should be greeted with a notification message saying that the user on the first computer is available for chat...

Welcome to using LAN Messenger!


How can I install and run Ubuntu directly from an SD card? I've heard that this is possible and I want to do this. I downloaded Ubuntu 14.04.3 LTS.iso(64-bit) file and used win32 Disk Imager to write it onto two SD cards to try and get it to work. The SD cards I used were a 64GB Class 10 SDXC card and a 32GB Micro SDHC card (with adapter). I formatted them as exFAT and FAT32 respectively and have tried to format them both as NTFS to see if that worked. I also tried this on a 8GB USB drive formatted as NTFS and it worked just fine. Right now I'm using a Lenovo Y70 laptop with these specs:

Windows 10 Home (64-bit),
Intel Core i7-4710HQ 2.5 GHZ,
16B GDDR3L,
1TB + 8BG SSHD,
NVIDIA Geforce 860m (4GB DDR5),
Card Reader (Support: SD, SDHC, SDXC, MMC),

I have turned safe boot off and turned legacy support on in BIOS and it still won't even recognize it as a bootable drive, I'm really not sure what I'm doing wrong.

If you have a dual-SD card reader where you can insert both cards at once, it's possible.
What you need to do is:

"burn" the .iso file on the "install SD"
boot from the install SD
install on the second SD (wiping it completely)
remove the "Install SD"
boot from the second SD.

Done!
If you want to optimise the system a bit have a look here for some advanced settings.

This is possible, however you will need to have a device that supports booting from an SD. Like a Raspberry PI. If you have an image you can use dd to write it to the SD card.


Making stripe_cache_size permanent I did

echo 8192 > /sys/block/md0/md/stripe_cache_size

to improve my RAID performance, and it did helped alot.

But I still can't figure out how to make it permanent.

I was trying to set it in /etc/rc.local - other commands are executed, but it was overwritten to 256 elsewhere... Any hints?

Add a udev rule, e.g. to /etc/udev/rules.d/60-md-stripe-cache.rules:

SUBSYSTEM=="block", KERNEL=="md*", ACTION=="change", TEST=="md/stripe_cache_size", ATTR{md/stripe_cache_size}="8192"

I haven't actually tried this so it might not be 100% right (may be some typos), but it should be close.  Check man udev to understand more.

You may also want to run the following commands afterwards to immediately apply the new rule:

udevadm trigger
udevadm control --reload-rules

This page suggests that stripe size (or width) should have been set up when the fs was set up. Maybe tunefs could help here?


How to move several files in different directories to one unique directory? I have 220 directories, each one with 2 files inside. all the files have the same termination (*.fq.gz). I want to move all these files to one unique directory.

I think I could do tha with a shell loop, but I don't have idea how to do that...

This is something I use when I don't need to be extra careful

mkdir unique_dir && mv */*.fq.gz unique_dir/

Unless I missed something.

krusader can search files and save to a custom tab then you can select all of those (or filter the list) and move them to the destination

sudo apt install krusader

you might as well add

sudo apt install krename

go to the topmost source directory
tools, search or crtl+s
click feed to listbox
edit select all
file, copy to other panel or f5
other panel being the other tab which is the source target


How to run linux in efi mode after installing in legacy mode? I installed Ubuntu in windows by making separate partition.
My both OS are installed in legacy mode but I want to switch to UEFI. When I switch to UEFI MODE a black screen comes up instead of grub and it asks me to press ESC.
Is it possible to switch to UEFI ?
Do I need to make any partition for EFI ?
Thanks in advance...

Switching Linux to boot in EFI mode is relatively easy; you just need to install the EFI-mode boot loader of your choice, although this will require that you create an EFI System Partition (ESP), and some EFIs also require you to convert the disk from MBR to GPT.

Switching Windows to boot in EFI mode is harder. The same steps are required, but Windows makes it a bit harder to perform those steps. If you're interested, I recommend you read this page, which describes the process in detail.

Overall, I'd say it's not worth the hassle unless you've got some compelling reason, such as if you're replacing a sub-2TiB disk with one that's larger than 2TiB (and that therefore requires GPT, and hence an EFI-mode boot of Windows).

The only way is to actually install Ubuntu in the UEFI boot mode.  However, you can keep what ever windows install there.  In windows, run fdisk, there create a second partition, split the drive in half(considering you have the space to pull off.).  At which point, you will then use the USB install point of Ubuntu.

However, since you now have a legacy install and a UEFI install, you will have to pick which boot you want every time.  So you would have to press F12 if you wanted to boot in Windows, which will require a reboot.  Also, please note that GRUB2 might not see Windows because the boot partition will not see legacy.

This Q&A should answer anything else you want done.


Libre Office won't open Anything LibreOffice will not open.

I can open it if I switch user to guest.

I have searched and gotten many results for this problem, so that it seems to be common, but the answers are unintelligible to me.  This one here  said:

  ...there is a hidden folder ~/.config (so in your home directory). Could you make >it visible by typing Ctrl+H while in your home directory and remove the libreoffice >folder inside that folder? Good chance that all works fine then. Possibly (probably, my >guess) some settings file is damaged. Those files are not removed when uninstalling I >believe. – Jacob Vlijm 2 days ago

I don't know HOW to do this. Could someone please take it the very beginning, for someone like me who doesn't just know this stuff? Again, it seems like a common problem with an easy fix, if I just knew HOW.

i'm not going to add anything to Jacob comment but just inserting some screenshots to help:

Open your file manager and go to your home(it will open there by default).

Show hidden file by pressing CTRL+h

Now you can find many hidden files/dirs search for that named .config

Now open that directory and search for directory called libreoffice

Now remove this dir by pressing Delete  or rightclick --> Move to Trash

Now log out and log in again then try to open libroffice again

I had the same problem with my Ubuntu 14.04 and wanted to just remove and reinstall, but somehow I got lucky. Here is how I was able to fix it.

Go to your Ubuntu Software Center and search for any of the LibreOffice packages (e.g. LibreOffice Calc).
Click on it and then click on Remove and wait.
You will receive a message indicating that the package cannot be removed because it has a problem and you will be asked it you want to fix it. Just accept by clicking on Yes.
The entire LibreOffice suite will be fixed and you should be able work with any of the packages in it again.


My cpu fan makes more noise while running Ubuntu 13.04? I have

AMD Athlon x3 processor
gigabyte GA-MA74GMT-S2 motherboard
6gb ddr3 ram
ati 4350 hd 1gb graphics card.


How to change my account type from standard to administrator? Possible Duplicate:
  How do I add myself back as a sudo user?

I just re-installed my Ubuntu 11.10, and I accidently changed my account type from admin to standard and I don't have a second admin account to change it back.

Boot into recovery modus. There you have superuser rights to change it back.

adduser Yngthlet admin

Exit and proceed.


How to install updates via command line? When I log into my web server via SSH I see the information:

88 packages can be updated.
80 updates are security updates

I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?

Use this:

sudo apt update        # Fetches the list of available updates
sudo apt upgrade       # Installs some updates; does not remove packages
sudo apt full-upgrade  # Installs updates; may also remove some packages, if needed
sudo apt autoremove    # Removes any old packages that are no longer needed

Documentation about each apt option can be found in the the manpages for apt. These are also available by running man apt in your terminal.

Use of both upgrade and full-upgrade together is usually not needed, but it may help in some cases: see Debian documentation about Upgrades from Debian 9.

this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one

remote_user=usernamehere
remote_host=example.com

ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} && \
sudo apt-get update && \
sudo apt-get -f install -y && \
sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y && \
sudo apt-get autoremove -y && \
[ -f /var/run/reboot-required ] && \
echo "sudo reboot now" && \
sudo reboot now

to run on your local box just leave off that first line doing the ssh

here is an alias I save in ~/.bashrc

alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '

then on terminal I just issue  doit


Unity doesn't load, no Launcher, no Dash appears When I login, nothing happens.

I am presented with my desktop wallpaper.

No Dash, no Launcher, nothing.

This answer applies to versions of Ubuntu running Compiz.

  This answer assumes Unity is being run through Compiz. If you don't have compiz installed (ex: on non-Unity versions of Ubuntu, such as the Gnome-based Ubuntu 18.04 and later) this answer doesn't apply to you.

You just need to turn the Unity plugin back on. The problem is this is a pain in the bottom because you've now got no graphical method to do this. So:

Try to open a terminal with Ctrl+Alt+T.
This may not work but you can try right clicking on the desktop and selecting "Open terminal here." Otherwise, you may need to change to a "hard" terminal by pressing
Ctrl+Alt+F1 and log in.
Install compizconfig-settings-manager by running

sudo apt-get install compizconfig-settings-manager

Then run it with this:

DISPLAY=:0 ccsm &

The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).
If you switched to a TTY in step 1, switch back to the graphical server by pressing Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes).
There there should be a CompizConfig Settings Manager waiting for you.
Find the Unity plugin. Enable it (detailed instructions just below). You will be asked "Ubuntu Unity Plugin requires the plugin OpenGL. Enable Ubuntu Unity Plugin / Enable OpenGL"

1) To enable the Unity Plugin: Click "Desktop" (left side) --> Ubuntu Unity Plugin. You can also type "unity plugin" into the "Filter" search box. Screenshot:

From here, click the checkbox for "Enable Ubuntu Unity Plugin":

2) To enable OpenGL: click "General" (left side) --> then check the box for "OpenGL", as shown below. You can also type "opengl" into the "Filter" search box to bring it up.

Everything should spring into life but if it doesn't, you might have to restart. You can do that by going back to the terminal and running sudo reboot.

I had the same problem and all the suggestions above failed for me.

I made the following steps:

Installed kubuntu-desktop as an user interface alternative for Unity (login via ALT + Ctrl + F1, then sudo apt-get install kubuntu-desktop). Sure, you can choose other Unity alternatives.
Restarted the machine and logged in via KDE.
Created a temp user (let's name it alice) with admin rights.
Copied my files in Alice's account.
Deleted the original user (including the files)
Created again the original user (same username, same rights)
Copied the files from backup.
Deleted the temp user (alice).

Then, you don't need KDE anymore. ;-)


No bootable device error message on UEFI after installation I have a new Acer Aspire E13 (ES1-311-P1D5) notebook. I tried to install Ubuntu 14.10 with disabled Secure Boot but enabled UEFI.
After the installation I couldn't bot. I just got "No Bootable Device". I'm not sure what to do except for diabling UEFI.

Is there any way or anything that I need to consider?

In my case some UEFI params needed to be set in the BIOS. I followed these instructions:

https://itsfoss.com/no-bootable-device-found-ubuntu/

Here is a short description of the steps.

Step 1: Go to BIOS (with F2)

Step 2: Turn ON Secure Boot (You might need to set BIOS password before doing this)

Step 3: Select an UEFI file as trusted for executing: HDD0 -> EFI -> ubuntu -> shimx64.efi

Step 4: Add a description and confirm. Save BIOS settings and reboot.

BTW, later I discovered that when Secure Boot is turned ON that Linux won't recognize WiFi hardware, so I needed to turn it OFF.

Could try this similar issue: http://ubuntuforums.org/showthread.php?t=2237568


can't connect wifi on ubuntu 16.04 dual boot windows 10 I've just installed ubuntu 16.04 alongside windows 10. Unfortunately I can't connect wifi on ubuntu, but wifi on windows still works. it says wifi disabled and I can't enable wifi. anyone help me to solve this problem?
ps. my wireless card is Qualcomm

I think there are similar questions. What I found online says that the problem is with some missing firmware.

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

Sources:

Ubuntu 14.04 Wireless not working: no network interface. Atheros [168c:003e] device

No Wifi in Qualcom Atheros - Ubuntu 16.04 - Acer Aspire E 15


How can I change the contents of grub loader? I have Ubuntu installed alongside of Windows and in bootloader (grub) these operating systems as all of yours are with long names! How can I change the names in grub? for example I want to change the 4th one to "my fathers OS" and when I choose it in the grub it will go to the Windows.

Try Try Grub Customizer

To install Grub Customizer in 13.04, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:adabbas/1stppa
sudo apt-get update
sudo apt-get install grub-customizer

Once installed, search for it in Dash, and click on it

Once opened, right click on the desired item that you want to rename, and then click on Rename, once done, just save and exit.

Load Ubuntu, open terminal and edit grub.cfg file:

 sudo nano /boot/grub/grub.cfg

At the end of file you should find the line starting with:

 menuentry 'Windows...'

Change "Windows..." to something you need, like to "My father OS".

Store your changes and reboot system to see what happens.


Can I create a setup file out of already installed files? I have used an Android phone and was very much impressed to learn that it is based on Linux. I had an application there named "Super Manager" from play store. It has many features but my favorite is that it can convert installed apps into .apk files and using those I can install the same apps on other phones as well either through memory card or through backup.
I was wondering if the same feature would be available in Ubuntu, because I have another PC which doesn't have internet so I can't download applications directly from Ubuntu Software Center. I am pretty new in Linux environment as I have been using Windows so long, so asked this just out of curiosity. Help will be much appreciated. Thanks a lot friends.

To obtain a list of installed packages we may use the inbuilt command line Debian package manager dpkg [manpage for the dpkg command] with the option --get-selections. Below command will generate a file packages.list of all installed packages (including the default packages) in the directory you opened the terminal in:

dpkg --get-selections > packages.list

For a more elaborate answer on how to further use this list for backup purposes see

How to backup settings and list of installed packages

We may also use the sync function from the Ubuntu Software Center to syncronize installed applications between computers:

How to use the sync between computers in Software Center

there is a small tiny script named cde which, once ran, it can compile any installed app and all its dependencies and libraries in use into a portable app folder. Then you can copy that folder to your other machine and then you have two options, or use them as portable or copy by hand any file into its proper location. To do the last you may follow the portable folder file system as a guide to copy to the machine own files. Be careful to not overwrite newer versions of any library.


VLC media player installation on Ubuntu 14.04 I have searched for many options on the Internet to install VLC media player on Ubuntu 14.04 (Trusty Tahr), but nothing is working for me.

How can I fix this problem?

Errors:

root@hiteshb-To-be-filled-by-O-E-M:~# apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libavcodec54 libavformat54 libchromaprint0 libmp3lame0 libvlc5 libvlccore7
  vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse
Suggested packages:
  libchromaprint-tools python-acoustid videolan-doc
Recommended packages:
  libdvdcss2
The following NEW packages will be installed:
  libavcodec54 libavformat54 libchromaprint0 libmp3lame0 libvlc5 libvlccore7
  vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

As of 2015-09-23, the latest VLC version for Ubuntu 14.04 (Trusty Tahr) provided by this repository is 2.2.1.

Open a terminal and run (for 14.04):

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install vlc vlc-plugin-*

For other versions, see here.

This worked for me in 2015-1-8:

sudo add-apt-repository ppa:djcj/vlc-stable
sudo apt-get update
sudo apt-get install vlc


Performance tuning - multiple swap partitions? (command-line) SUMMARY
Does Ubuntu take advantage of multiple swap partitions on separate physical media, from a load sharing point of view?  i.e. if one drive with a swap partition is burdened with i/o, will it utilise (other) swap space that resides on a different physical hard drive?

BACKGROUND
Building a headless home server (command-line only responses, please!). I usually put the o/s, the virtual/swap space and apps+data each on separate drives.  While I think I've got directories and mount points clear (even managed to automount an NFS folder from a NAS), swap still seems a little hazy to me...

The Ubuntu install sequence partitioned my main drive with LVM [still unsure if LVM was the best choice for a headless server; but this is not a question, just an observation]
I've got two additional drives I'd like to use.  While I see guides for GParted, detail regarding fdisk doesn't seem as thorough.
I realise there's also the "swappiness" setting, but I'm more curious about the possible benefits if Ubuntu is sufficiently "device-aware" to take into account an i/o burdened device vs. an idle one, should it have multiple swap areas at its disposal.

At boot mountall commands calls the swapon utility.

The swapon manpage says :

Calls to swapon normally occur in the system boot scripts making all swap devices available, so that the  paging  and swapping activity is interleaved across several devices and files.

As pages are interleaved across different devices one can assume that different swap spaces on different devices would performs better (like a RAID 0) than a single swap space on a single device.

My opinion is that tuning swap access is pointless, as when you got to a point where swap access is a critical resource, your system is almost unusable, disk access is  1000x slower than memory access.

Better tune the memory usage by removing unnecessary daemons, checking software parameters....

You should find useful informations on memory footprint here:
http://linux-mm.org/LinuxMMDocumentation

While this doesn't actually answer my question regarding swap behaviour, I thought I'd at least share some useful commands when working with hard drives and partitions from the command-line.

!! WARNING !!

THE COMMANDS BELOW ARE EXAMPLES.   DELETING PARTITIONS, MODIFYING AND FORMATTING FILESYSTEMS CAN DESTROY DATA AND/OR PREVENT YOUR MACHINE FROM BOOTING.   MAKE BACKUPS.    USE AT OWN RISK.   TRY ON A MACHINE YOU DON'T MIND LOSING ALL DATA ON. CAVEAT ADMIN.

Cheat sheet to quickly get a drive up as a single ext4 partition...

View detected devices of class "DISK"

  lshw -C disk

View existing partition table(s)

  fdisk -l

Edit the partition table for my chosen device (in this case, "sdx")

  fdisk /dev/sdx

Within FDISK, press:

d ...to delete the current partition
n ...to create a new partition
p ...to specify it as a PRIMARY partition
1 ...to set it as the 1ST primary partition
w ...to write the changes.

Display the new partition table:

  fdisk -l

Format the new partition's filesystem as type ext4

  mkfs -t ext4 /dev/sdx1

Remove reserved blocks (i.e. set to 0%) since this isn't / (root filesystem)

  tune2fs -m 0 /dev/sdx1

Create a new directory where the new drive will mount into:

  mkdir /storage
   mount /dev/sdx1 /storage

add mount to boot up, using /etc/fstab

  vi /etc/fstab

(refer to other guides on the contents of /etc/fstab and the various options available within it and, once again, be careful!)


Bootable pendrive for Windows 10 Technical Preview I want to install Windows 10 Technical Preview. I have downloaded its .iso file. Now I want to make a flash drive bootable. How can I do that?

I already have tried these 2 options.

Making a bootable pendrive via dd command, but it's not working.

sudo umount /dev/sdb
sudo dd if=/path/to/windows10.iso of=/dev/sdb bs=1M && sync

I also have tried using WinUSB, but it's not working either.

sudo add-apt-repository ppa:colingille/freshlight
sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/colingille-freshlight-trusty.list"
sudo apt-get update
sudo apt-get install winusb

It was just running a process showing a message that it's formatting the USB stick, but that didn't last for 20 minutes!! And I had to cancel it.

Is there any way I can make a bootable pendrive for installing Windows 10 from Ubuntu 14.04?

use unetbootin!
easy, fast, with GUI, give it a try! ;)

or right click on win10 image, open with disk image mounter, and copy all to your bootable pen. make sure it's empty on either way, you can use "disks"* from ubuntu, have a look on youtube, lots of ways to do that (just look for any windows image, it's all the same) ;)

*disks: select your pendrive, unmount, click on the wheels, format, fat32 (it'll say lba initializable), then copy or use unetbootin!


How to regenerate grub menu entries on Ubuntu 14.04 Trusty after deleting all kernels? I accidently removed all kernels from my Ubuntu 14.04 Trusty. I followed steps in this question's answers to install a new kernel but when I try to boot I don't see the 'Linux/ubuntu' option in my grub menu list. It only shows 'System Settings'.

How do I regenerate the earlier/default menu entries for ubuntu in grub?

Note:

I am currently able to boot with these steps on grub prompt:

set root=(lvm/ubuntu--vg-root)
linux /boot/vmlinuz-3.13.0-74-generic root=/dev/mapper/ubuntu--vg-root
initrd /boot/initrd.img-3.13.0-74-generic

boot
When on live usb, I copied vmlinuz, init... etc. from my boot partition to /boot folder because I could not find a way to use a separate boot partition from grub prompt.

You can manually boot with a separate /boot.

Separate /boot on sda1, / on /dev/mapper/ubuntu--vg-root:

set prefix=(hd0,1)/grub
insmod linux
set root=/dev/mapper/ubuntu--vg-root
linux (hd0,1)/boot/vmlinuz-3.13.0-74-generic root=/dev/mapper/ubuntu--vg-root
initrd (hd0,1)/boot/initrd.img-3.13.0-74-generic
boot

Not sure why BobaJob's instructions were down voted. If you can boot and fstab still has separate /boot that would reinstall grub to MBR. And a sudo update-grub regenerates menu.
Or use dpkg to reinstall grub.
If from live installer you can also use Boot-Repair.

sudo grub-install /dev/sda

Something like that should fix it, assuming your main HDD is /dev/sda.

If you've booted from a Live CD/USB you'll need to chroot first.
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd


Removing the Livepatch system tray panel indicator in Lubuntu 20.04 I'm using LXQt in Lubuntu 20.04 Focal Fossa.
I'd like to get rid of the Livepatch indicator, that's within the system tray that's on my panel (the tray is full of c*** I don't need anyway!)
I looked for answers here:

How can I remove live patch notification?
https://www.reddit.com/r/Ubuntu/comments/bkndho/how_can_i_remove_the_livepatch_appindicator/
Two updater icons in Lubuntu 20.04
Hide livepatch indicator in top panel

but the suggestions did not work, or were not about removing livepatch.
I don't mind disabling it completely, or just removing the icon. And it can be just for my user, or globally.

Sorry about that:
Will this work then:
sudo canonical-livepatch disable

Or
sudo snap run canonical-livepatch disable

I've used both with sucess

If I read you correctly, to disable "Livepatch (Canonical Livepatch Service)"
ubuntu-advantage disable-livepatch -r

this will Disable the Livepatch service. If the -r option is given,  the  canonical-livepatch snap will be removed after the service is disabled.
Would have been easier/better if Dconf would have worked to hide the icon though.
I don't use lubuntu sorry.


VBoxManage is unable to start vm code NS_ERROR_FAILURE ubuntu 16.04 I recently upgraded to virtualbox 5.2.4 and vagrant 2.0.1 because of this issue. Since then, I haven't been able to run any of my vagrant boxes (some ubuntu, some centos).  I get the following error when running vagrant up:

  There was an error while executing VBoxManage, a CLI used by Vagrant
  for controlling VirtualBox. The command and stderr is shown below.

  Command: ["startvm", "ef47d1fc-4ed1-42cb-b564-09bc2bb43296", "--type", "headless"]

  Stderr: VBoxManage: error: The virtual machine 'ishbook-centos' has terminated unexpectedly during startup with exit code 1 (0x1)
  VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

When I just run vboxmanage without --type headless, I get a popup saying to run /sbin/vboxconfig.

  RTR3InitEx failed with rc=-1912 (rc=-1912)

  The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

  '/sbin/vboxconfig'

  may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.

  where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.

No luck even after running sudo /sbin/vboxconfig multiple times.

I've tried reinstalling virtualbox and the extension pack multiple times and reinstalling linux-headers and dkms as seen in answers to questions similar to this one, but nothing has worked.  Any ideas?

Edit: Just tried it out on 5.1, but it's the same error, 5.0 just hangs my computer

OK.  Figured out the problem here.  My kernel modules hadn't been deleted from the previous install of virtualbox when I uninstalled.  So when I ran modinfo vboxdrv, it said I was using the kernel drivers for 5.0.4.

I deleted everything in the path to the filename given in the modinfo output and rebooted.  Installing virtualbox and starting vms worked after that.

Run:
VBoxManage startvm name --type=headless

Found it here: The virtual machine has terminated unexpectedly during startup because of signal 6.


Gedit "Highlight Misspelled Words" enabled by default I'm using gedit 3.10.4 on Ubuntu 14.04 LTS with the Spell checker enabled. At the moment, I have to enable the "Highlight Misspelled Words" option every time I open a file, even if it is the same file. I would like to have the "Highlight Misspelled Words" option enabled by default when I open gedit.

I searched for an answer and I only found this 2007 forum post that links to a bug that offers a command that doesn't work in my version of Ubuntu/gedit as a solution.

Is it possible to have the "Highlight Misspelled Words" option enabled by default in this version of Ubuntu/gedit?

It would also be nice to have the "Set Language…" option enabled by default as well without having to change the language of my entire system.

EDIT:
Thanks to @jozxyqk for providing a more recent link:
gedit highlight misspelled words for every document by default

No it can not be set as default.

That does not rule out that someone who knows how to decompile, reprogram and recompile the spell checker plugin for gedit can't make a setting for it, it is open source after all.  If it is indeed abandoned, then it is even more so free game.  Just give credit where due.  I would love to have this option, and setting a different language as default too.

i think add spell checker plugin in gedit
1st of all
open gedit.then Click preferences inside edit button.then click plugin button, and then add spell checker plugin


Steam won't start on 18.04 I'm on Ubuntu 18.04, 64 bit.

I downloaded the .deb from the Steam website. I tried installing with Ubuntu Software. It didn't seem to work. I tried installing via the terminal, using various commands and combinations of commands.

sudo dpkg -i ~/Downloads/steam_latest.deb
sudo apt-get update
sudo apt --fix-broken install
sudo apt-get install -f

In Ubuntu Software, it currently lists both "Steam" and "Steam installer" as installed applications. When I go to Steam and click "launch", nothing happens. When I open the show applications menu from the desktop and type "Steam", a program named Steam, with the Steam logo, appears. I click it; nothing happens.

How do I diagnose what is wrong?

How do I figure out why Steam is not running on my computer?

—

EDIT – in response to Organic Marble, here is the code output to the command steam—

Repairing installation, linking /home/elen/.steam/steam to /home/elen/.local/share/Steam
Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0)
/home/elen/.local/share/Steam/ubuntu12_32/steam: symbol lookup error: /usr/lib/i386-linux-gnu/libxcb-dri3.so.0: undefined symbol: xcb_send_request_with_fds
/home/elen/.local/share/Steam/steam.sh: line 444: no match: ssfn*

Running 'steam' on console stalled also for me on a fresh install. This is the sequence of actions that made it work for me.

Deleted ~/.steam
Deleted ~/.local/share/Steam
Ran 'steam' in a terminal. Pressed Control+C when it stalled
Ran '~/.local/share/Steam/ubuntu12_32/steam' in a terminal. It autoupdated and finished normally.
Ran 'steam' again. It started normally.

This happened to me on Ubuntu 17.04 and 17.10, and after this it always worked fine, although the binary of step 4 was different. It seems like an issue with their initial setup.

The client itself doesn't open until you click on its icon in the system tray, near the date & Time (top right). After that, it appears to function normally, as I found at https://steamcommunity.com/app/221410/discussions/0/2906376154318030934/


Ubuntu UI texts not showing properly I have installed Ubuntu 14.04.2 LTS from the Ubuntu page 3 days ago but now the UI texts is broken as you can see in this image

Do you have any idea how to solve this? and what is causing it?

I found the solution. I just installed some updates that I were skipping all the time. Now everything is fine.


Create a link to a folder on the left panel of Nautilus file manager? I would like to create a link to some new folder that I have in my home.
The left panel shows docs, images downloads etc. But I would like to add my other folders that I created myself like university etc,

It use to be as simple as drag and drop the folder on the panel, but it doens't work anymore. How can I create a link?

The image is to show what panel I'm talking about:

You can add Bookmarks. Just go to the desired directory and via Global Menu →
Bookmarks → Add bookmark.

Or you can use simply Ctrl+D when you are in the desired directory.

For Ubuntu 13.04 or more updated versions, you can click the "gear" icon on top right and use "Add Bookmark"

It's not elegant, but if you simply create an empty file, open it, save-as, then browse the top level folder of the directory you want to bookmark in the side panel, you can actually drag that link to the side panel and it will then show up in the side panel.


Unity takes ages to start after log in After I upgraded to 12.04 from 11.10,Unity has started taking too long to start.

Booting from zero to BURG takes about 3 sec,BURG to login screen takes about 5-7sec...n then login screen to unity takes more than 2 min...why so?

I've even tried stuff like disableing networking and stuff...

This sounds like https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1001138

Try moving aside the file ~/.config/compiz-1/compizconfig/config and then logging in again.

mv ~/.config/compiz-1/compizconfig/config ~/.config/compiz-1/compizconfig/config.backup

If you can login fast now, then you can put back the file and try to just delete these lines as described in the bug comments:

+[gnome_session]
+profile =

Or you can just leave it and use the freshly generated confg.

I tried these tips and they worked for me. Really improved the performance of my machine.

Hope this will help.


12.04.1 CD not recognized as a boot disk I'm trying to install Ubuntu 12.04.1 x64 as a standalone OS.

I cannot get the laptop to recognize the CD as a boot disk. The Chipset is an Intel T5500 which is x64 architecture (have also tried the 32bit, and slowest burn possible).

If I use a Windows disk (I have tried Windows 7 32, 64 ultimate), I have no problems at all and Windows loads and installs.

I have also run Ubuntu side by side through the Windows installer and it worked perfectly (now I just want a standalone install).

Any help is greatly appreciated.

It sounds like the cd wasnt burnt as an  ISO

In windows 7 simply right-click on the downloaded ubuntu  ISO image icon and choose “Burn disc image”.

If in  ubuntu go to dash and type brasero and start the program.Then choose the option burn image

Place the burnt image cd into the drive

restart computer

Make sure the bios settings on your computer  are set to boot from cd first

If it was an incorrectly burnt cd this should resolve your problems

Also, make sure the first partition is set with a proper bootloader (Windows "mbr" file, formatted as "ntfs"). Your disk may not have the correct (or any) bootloader..latest Ubuntu (Dec. 2015) is ver. 16  (ver. 15.2 prior).


How to move from Mint 9 to Ubuntu 10.10? I have a Mint 9 & Windows 7 laptop, that I, obviously, want to upgrade to Ubuntu 10.10.
I do want to keep the dual boot, and I do not want to keep the Mint.
I have Burg controlling the boot - will that cause any problems with Ubuntu installation/Upgrade?

If you run the Ubuntu installer, either off a cd or USB drive, there is an option in the partitioner to overwrite an existing Linux distro with the new one. That will leave your Windows installation alone while replacing Burg with Grub.

Try disabling all Mint repositories and enabling Ubuntu only repositories. Then issue this command
update-manager -d

I'm not sure about this. Just a guess.


Samba error message invoke-rc.d: initscript samba, action "restart" failed Hello I'm on Ubuntu 13.10 x64 Newbies

I try to create a samba share.

it is installed, and I think it is running, I create users and a shared folder on a secondary internal hard drive sata automatically mounted at startup.

the trouble is that as soon as I created my shared folder with the "system-comfig-samba" command when clicked on create this error in the terminal

"invoke-rc.d: initscript samba, action," restart "failed." it appears has all my manipulations in the samba configuration manager cited above

and if I go to my pc running Ubuntu from Windows I see my folder but I can not access it. win7 diagnostics wonder my internet connection. but I go to another shared samba folder by default. if it is shared by samba.

I can give more info if you told me how to proceed.

thank you for your help ...

Michael

You can restart samba manually by.

sudo /etc/init.d/smbd restart
sudo /etc/init.d/nmbd restart

You may need need to restart windows too or wait for some time clicking refresh to purge windows cache. You may have problem to connect to one samba server with 2 different users.

BTW: samba will always give you problems cause its m$oft. (cannot change ip ports, it not encrypted, so good for local net only) Use ssh if you can. If you just need to copy files winscp.net will do the job.

BTW2: ubuntu (or system-config-samba) guys could handle to restart samba processes cause it's been years already (in 14.10 the problem still persist and I remember it was there before 13.?)


gear icon missing ubuntu 14.04 from login ok im done looking .... I'm missing the little gear icon on the login menu/window. I'm trying to load up lubuntu. Is their a terminal command to do this? or is their a terminal command for the little gear icon. I all ready did this part "sudo apt-get install lubuntu-desktop".

Run this in the terminal to access settings

    gnome-control-center


Compiling apib undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' I want to compile apib on my ubuntu 13.04 box but I am having issues with pthread lib. This is the error that I get :

$ colormake -j 5
cd src && make all
make[1]: Entering directory `/home/monkey/bin/apib-1_0/src'
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_cpu.o apib_cpu.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_iothread.o apib_iothread.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_lines.o apib_lines.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_main.o apib_main.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_oauth.o apib_oauth.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_reporting.o apib_reporting.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_priorityq.o apib_priorityq.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_url.o apib_url.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -g -O2 -I. -I/usr/include/apr-1.0 -DHAVE_CONFIG_H -D_GNU_SOURCE   -c -o apib_mon.o apib_mon.c
gcc -std=gnu99 -pedantic -Wall -Wno-deprecated-declarations -o ../apibmon  apib_mon.o apib_lines.o apib_cpu.o -lapr-1
/usr/bin/ld: apib_mon.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [../apibmon] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/monkey/bin/apib-1_0/src'
make: *** [all] Error 2

Whereas all needed libraries are installed:

$ dpkg -l  | grep apr && dpkg -l | grep libssl
ii  libapr1                                   1.4.6-3ubuntu1                             amd64        Apache Portable Runtime Library
ii  libapr1-dev                               1.4.6-3ubuntu1                             amd64        Apache Portable Runtime Library - Development Headers
ii  libaprutil1                               1.4.1-3                                    amd64        Apache Portable Runtime Utility Library
ii  libaprutil1-dbd-sqlite3                   1.4.1-3                                    amd64        Apache Portable Runtime Utility Library - SQLite3 Driver
ii  libaprutil1-dev                           1.4.1-3                                    amd64        Apache Portable Runtime Utility Library - Development Headers
ii  libaprutil1-ldap                          1.4.1-3                                    amd64        Apache Portable Runtime Utility Library - LDAP Driver
ii  libssl-dev                                1.0.1c-4ubuntu8.1                          amd64        SSL development libraries, header files and documentation
ii  libssl-doc                                1.0.1c-4ubuntu8.1                          all          SSL development documentation documentation
ii  libssl1.0.0:amd64                         1.0.1c-4ubuntu8.1                          amd64        SSL shared libraries
ii  libssl1.0.0:i386                          1.0.1c-4ubuntu8.1                          i386         SSL shared libraries

In Makefile :

APR_LIBS = -L/lib/x86_64-linux-gnu/ -lm -lcrypto -lpthread -lssl -lapr-1 -laprutil-1

OK, I have found it - there was an error in Makefile

APR_ONLY_LIBS did not have libthread linked :

APR_ONLY_LIBS = -lapr-1

So I changed it to :

APR_ONLY_LIBS = -lapr-1 -lpthread

If you came here cause of an ant build problem, just include pthread.

<property name="client.lib.path" value="/usr/local/lib"/> #this filepath
<property name="client.lib.list" value="fltk,pthread,stdc++"/> #this line
<libset dir="${client.lib.path}" libs="${client.lib.list}"/> #variable here with file path mentioned above


"Error calling fsync(2) on /dev/sdc1: Input/output error" while formatting my pendrive? I have a Transcend 4 GB pen-drive. When I tried to format my pen-drive by right-clicking and selecting format, it showed:

Error creating file system: helper exited with exit code 1: Error calling fsync(2) on /dev/sdc1: Input/output error

Then I tried to remove the contents of the pen-drive through:

rm -r software

The folder "software" is present in my pen-drive but the response was:

rm: cannot remove `software': Read-only file system

I had the same problem. I tried many methods on Linux but failed. However, when I insert my pen drive into the computer running windows 7, the system offered to repair my pen drive; after I clicked 'OK', the system repaired my pen drive automatically.

Hope this may help you ...


How to create a swap partition (no free space left) I've installed Ubuntu on one partition which utilizes all disk space (if we're ignoring the NFTS partitions). I forgot to define a swap partition.

How do I make a swap partition after installation? I need to "borrow" from the current one.
I defined the current partition as logical and not primary. Is that a problem? Should/Can I change it?

Thanks!

2 Schools of thought here.

A) If you have a fairly up-to-date system with more than 8GB RAM - Linux will likely never touch the swap unless you are running intensive rendering applications. So, if you meet that standard, I wouldn't sweat the swap partition. I run two boxes with no swap... no problems.

B) Another school of thought is to define a swap partition because, it is a fallback safety valve which, I admit, is always nice to have.

If you adhere to the "B" school of thought, you can use GParted (sudo apt-get install gparted) and CAREFULLY select a partition to be resized.
Then use your mouse to drag the right side of that partitions graphical image to reduce that partition's size... by 2-4GB (or whatever you feel is appropriate)
This creates "unallocated space" which (after applying the above changes) can be defined as a new partition; (again using GParted) which, can be "formatted as" type:SWAP. Apply those changes. et voila! Swap partition.

Another cchool of thought "C" would be to use the swap FILE method detailed in the answer referenced by @mniess above. I've never used that method. So, I do not have any opinion on it.


System hangs during boot at "Starting MySQL server [OK]" I have Ubuntu 12.04 installed on my machine (Dual boot). It was working fine till today.
I executed the following commands in the terminal, and when I restarted I get a Purple Screen of Death.

sudo apt-get autoremove

I also had Qt Designer installed, so I removed it using

sudo apt-get remove qt4-dev-tools
sudo apt-get remove qt4-docs
sudo apt-get remove qt4-assistant
sudo apt-get remove qt4-linguist

I had already tried the following:

In recovery mode, it always hangs at this part.

* Starting MySQL server [OK]

From a Ubuntu Forum post, I tried doing Ctrl+Alt+F1 and then

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx
sudo aticonfig --initial

But this always ends with aticonfig:No supported adapters detected.

Any help would be greatly appreciated.

P.S : Please do not mark this as duplicate as I've gone through many threads and I'm not able to find a solution myself.

EDIT: it now hangs at Checking battery state itself :( .
I've referred to this http://ubuntuforums.org/showthread.php?t=1606130 but I'm unable to find any solution.

If it is hanging at * Starting MySQL server [OK] you should try disabling MySQL server (via Ctrl+Alt+F1) and then see if it continues past that stage when you reboot.

You can do this as follows:

sudo nano /etc/init/mysql.conf

Comment out (using a hash sign) the start on section - and this section only! If it spans multiple lines, add a hash sign to each line.

For example:

#start on (net-device-up
          #and local-filesystems
          #and runlevel [2345])

Instructions from: How to keep apache and mysql from starting automatically

To restore your ubuntu 12.04 do a version upgrade to Ubuntu 12.10 via USB and you will have the problem fixed.

You could also do a clean install of the latest 13.10 to avoid any future problems as it is the most updated stable version for Ubuntu and as you are not an Enterprise you don´t need LTS versions.

PS: if you boot into the system run the following on the terminal:

sudo apt-get update

sudo apt-get -f upgrade

sudo apt-get -f dist-upgrade    (this last one doesn´t update your system to a new Ubuntu verison)

Hope it helped you out.


Rootstock not working I am getting this error:

./rootstock: 1000: ./rootstock: cannot create /tmp/tmp.C7sAyhcAxf/tmpmount/etc/fstab: Directory nonexistent

Ubuntu 13.04

When I want to create simple qemu image with this command:

 sudo ./rootstock --fqdn qemu-test --login qemu --password qemupwd --notarball

Im using Ubuntu 13.04

Any info?

The real problem is the fact that the default repository is not there.

this is an archive that works still: http://old-releases.ubuntu.com/ubuntu/.

here is what my cmd looks like

sudo ./rootstock --fqdn myhostname --login ubuntu --password temppwd --imagesize 2G -m http://old-releases.ubuntu.com/ubuntu/ -d jaunty --seed dpkg-dev,debhelper,libgtk2.0-dev,gnome-settings-daemon-dev,libgconf2-dev,libglade2-dev,libxklavier12-dev,libgnomekbd-dev,libasound2-dev

so just add -m http://old-releases.ubuntu.com/ubuntu/ and it works great!

Please install the fakeroot package by:

sudo apt-get install fakeroot


How to make read-only file system writable? At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.

Are there some possible reasons for the player's file system to change permissions in this way?

I tried using chmod:

$ sudo chmod a+rw SGTL\ MSCN/
chmod: changing permissions of `SGTL MSCN/': Read-only file system

SGTL MSCN is the mount point of the digital audio player.

What else can I try to make it writeable?

If a filesystem has been mounted read-only, chmod will not work since it's a write operation too.

Try remounting it read-write:

sudo mount -o remount,rw '/media/SGTL MSCN'

If the device has a write lock on it (like SD memory cards), you need to turn it off. Hardware locks cannot be disabled by software. Note that the write lock on SD memory cards is located from the sight you see the letters near the up left corner and it looks like a very small switch.

Some filesystem drivers may also not support write operations, this is the case with the older NTFS module supported by Linux. For NTFS filesystems, be sure to use the ntfs-3g driver which should be picked automatically nowadays. If not, you can force the driver with something like:

sudo mount -t ntfs-3g -o uid=$(id -u) /dev/sdb1 /mnt/

(where /dev/sdb1 has to be substituted for your block device and /mnt/ for your destination)

In Case of Dual Booting Operating System (for me Windows 10 and Linux Mint 19.1),
when windows10 was not properly shutdown, this problem will occur to my disk partition on the Linux,

The Solution is to start up the Windows 10 then shut it down properly.

Now you can write file to the partition on Linux again.

Hope this will help


Best way to clone an installation (copying to identical hardware) Kind-of like this question but slightly different (I think), in that I have 6 identical Acer Aspire Revo R3610 machines. One is (almost) configured to my requirements - when I'm done preparing it I'd like to make the other 5 machines absolutely the same. I'm very new to Ubuntu, what's the most straightforward (easiest) way of doing this?

The machines are going to live on different networks if that might otherwise be a problem (eg with Windows you can clone disks but you then have to make registry changes afterwards if they're going to run on the same network etc). The hardware in all 6 machines is, I stress, the same!

How can I efficiently clone one source image on to these identical machines?

Please restrict one software/solution per answer

Clonezilla sounds like it fits your needs

Having never done been in this predicament (I don't have hundreds of servers - I've always just used base images), I can only give you my gut instinct.

That aside, I would say netboot is probably your best bet. Create a master server, get it doing what you want and then have all your other machines boot and install from it. Scripting things to happen automatically (ala run-once) shouldn't be too hard. You do all the secondary things through kickstart.

More (although it's a little old): https://help.ubuntu.com/community/PXEInstallServer

Edit: There's an application called system-config-kickstart that should help make generating the kickstart file quite a bit easier. YMMV.


Ubuntu running really slow first time posting here, so i have this laptop from 2009 which has this specs : intel centrino duo t2050 1.6 ghz
             3 gb of ram
             nvidia go 7300 with 256 mb
i recently installed ubuntu but its running pretty slow and i dont know why, opening a page feels laggy and watching videos on youtube is impossible, it is weird because on windows 10 the experience is fluid, im running ubuntu 17.04, any solutions or its just a matter of hardware. also i have tried to see if the gpu i was using was the correct one and it is.

Try opening System Monitor and check 'Processes' and 'Resources' to see if you are, for example, running out of CPU, RAM, etc. or if a process is hogging resources. This will not resolve the issue, but refine the diagnosis of it.

If you can find out if it is your hardware causing the slowness (not a specific process/program using up all resources), then you may need to look into getting new hardware, or switching to a lighter weight version of Ubuntu, such as Lubuntu or Xubuntu.

If it is an issue of a single program or process taking up resources, then you could look to see if there are settings for that program to use less memory or look for a low usage alternative.

Just a tip about Markdown (how posts are formatted here): put a blank line whenever you want to have a new paragraph, and prepend lines of a list with -, *, or +. It will make it more readable.