How are typical users expected to read the documentation in /usr/share/doc? I recently learned that there is a huge pile of documentation in /usr/share/doc.

It seems like much of it is gzipped so that it is not directly accessible without administrative privileges:

$ gunzip examples/letter.tex.gz
gzip: examples/letter.tex: Permission denied

While one solution to this would be for every user to duplicate each item in their home directory just to read it, this arrangement hardly seems conducive to regular browsing.

How do normal people read this documentation?

I am not inclined to believe that the typical user is expected to install and maintain a web server just to read local text documentation.

There are at least two issues here:

reading the .gz files painlessly
permissions on the directories
(optional for tex files)

For #1, there are a number of applications that will cope with the gzipped files seamlessly.  A couple that you could use are less and vim .

 less README.gz
 vim -R README.Debian.gz
 view Important.bits.gz

view is an alias for vim -R, which just says to open the file read-only.

In the old days, before less was installed on my system, I would use gzcat and pipe the output to another utility. Apparently, it is only called zcat now on Ubuntu, but you would use it like this, e.g.:

 /usr/share/doc/xpdf$ zcat changelog.Debian.gz  | more

zcat is still available, and using it to pipe compressed contents somewhere can be useful in some cases.  (For situations with .bz2 files, bzcat is available.)

For #2, all of the files that I've seen under /usr/share/doc are in directories with other+rx permissions, meaning that all users can search the directories (e.g., list contents) and read files inside.  What you can't do (since only root has write permission by default), is to create files.   Because you are attempting to unzip into that directory, I imagine it is giving you permission denied because you have read but not write permissions by default.

For #3, I'm guessing you use .tex files more than I do.   But here's one way to deal with them without copying to home or a temp file.  For this, you are going to create a named pipe, but you can reuse that for your other tex piping and processing needs.
It should go like this:

zcat or gzcat the text
... and pipe that to your TeX processor
... and send that to your Named Pipe (here, I'll call him pipey)
... and then in a separate screen grab your output from pipey
... and send that to a dvi display process.

You can obviously alter these steps if you use different or better utilities than the ones here.

My example will use the mkfifo utility to create the named pipe, pipey .  The target file to process is /usr/share/doc/gdb/refcard.tex.gz .
You'll need two shell command lines available (via terminal, Alt+F2, or however).

You'll type in
terminal one:

mkfifo pipey

You now have a persistent named pipe.  You can use ls -l to peek at it.

zcat /usr/share/doc/gdb/refcard.tex.gz | tex > pipey

Notice that this command will not return until you do something with the output that's gone to the named pipe.

Now, in terminal two, you'll type: tex pipey | xdvi

And it works (well, here anyway).  The process can be refined for prettier output, but if you're looking for quick and relatively mess-free, that's one way to do it.

Your should not read .tex files! It is in humand readable format, but it is designed to be processed before reanding. You can use tex2pdf tool to convert it to .pdf.


Connection timeout to streams.canonical.com when installing juju The .cloud-install/commands.log file shows this error:

Attempt 5 to download tools from https://streams.canonical.com/juju/tools/agent/1.25.3/juju-1.25.3-trusty-amd64.tgz...
curl: (7) Failed to connect to streams.canonical.com port 443: Connection timed out

It attempts to download the tar file five times and then fails.
This is where the node stops and nothing happens here after.
The complete log file is available at: http://paste.ubuntu.com/15390451/

Solved it!!!!
Seems like for JUJU bootstrap to work IP forwarding needs to be enabled on MAAS server.

Refer: https://github.com/Ubuntu-Solutions-Engineering/openstack-installer/issues/901


Can I boot an external SSD with Ubuntu 18.04 installed on any computer? I’m just asking this question. It may have been asked before but I’m asking this time to obtain further details. If I installed my Ubuntu from a laptop (Asus) to an external SSD, will I be able to boot this external SSD on other laptops and desktops alike?

If I had ticked the box ‘Install third-party software for graphics and Wi-Fi hardware and additional media formats’ during installation, will this create complications? Right now, the Ubuntu external SSD I have has been installed from my laptop (Asus) which has intel graphics drivers and that Ubuntu always came with those as far as I’m aware of.

I’m also aware that I’ll be booting on computers with different hardware in which I hear Ubuntu will be compatible with 99% of the time unless I’m wrong. In case you ask, no I won’t be installing proprietary graphic drivers for every computer I boot Ubuntu from just to keep the compatibility unless it’s really safe.

Please ask if you need further details.

No you can not use the same Ubuntu thumb drive to boot a computer with Arm processors, or one that does not meet hardware spec's, or is 32bit. The drive needs to be made BIOS/UEFI compatible to boot both BIOS and UEFI computers. This is not too hard to do:

Ubuntu on a USB stick - boot in both BIOS and UEFI modes

This works with SSD also.

The last time I checked Nvidia proprietary graphic drivers did not interfere when booting a computer without a Nvidia graphics card.

A regular ubuntu intall to an external hard drive will not make the drive bootable. If the SSD is set up to be bootable, it should work. But you will still need to interrupt the BIOS boot process to tell your computer which drive you want to boot too.
I'm assuming that you are using a USB SATA Adapter Cable. You can probably run a bootable flash drive installation to the external USB hard drive. You can also choose the install option to make a "persistent" bootable USB drive. But there are limitations to the bootable external drives. You'd learn if it's what you want to do by making a bootable thumb drive for experimentation.
There are some great tutorials in Ask Ubuntu for making bootable flash drives..


Can't copy from hfs+ external I've spent days and days trying to figure this out, but still can't. I think I've read every article on this and tried all there is to try, and I still can't copy any file from my mac-formatted hfs+ external drive. Sorry if there's still an article I've missed..
I have disabled journaling and tried all the hfsprogs commands I could find, but still
whenever I click on a folder on the external and try to copy it to my home directory, I get this: "The folder xxx cannot be handled because you don't have permission to read its content."  I then found an article about inoring this by copying files through the Terminal. When trying to run the sudo cp -r command in the Terminal with my external drive path, I always get 'no such file or directory'..
Does anyone have another suggestion for me?
Thanks in advance!

I had come across a similar issue when an old imac ppc g5 logic board went on me. I had alot of data on that hard drive that I had lost access to so I pulled the hard drive out and hooked it up to a hdd external case. When I tried to copy files from it to my Ubuntu box I got a permissions error. I tried alot of different things to rectify but to no avail. Alas..   The following should get you out of the woods.

open up terminal and type:

sudo nautilus

Using the GUI window that opens. Navigate to the directory where your files are located and copy the files you want then using the same nautilus GUI window navigate to the directory they are to be copied to and paste to that directory. Rinse & repeat.

bindfs is the answer. It will take an already mounted file system and provide a view of it with whichever uid you'd like:

sudo apt-get install bindfs
mkdir ~/myUIDdiskFoo
sudo bindfs -u $(id -u) -g $(id -g) /media/diskFoo ~/myUIDdiskFoo


Is there an Ubuntu theme available to make it look like Windows 7? I want to know is there any theme available make it Ubuntu look like Windows 7 ?

Win7 theme for ubuntu versions prior to 11.10

Installing the Win7 Theme
cd
wget http://web.lib.sun.ac.za/ubuntu/files/help/theme/gnome/win7-setup.sh
chmod +x ~/win7-setup.sh
./win7-setup.sh

This will download a script file that will be used later to tell your computer what files to download to complete the Win7 theme packages install.  Once finished, a window will tell you that the installation will start now so just press OK.

Press OK, then back in the terminal enter:
setup-win7-theme

This command will setup Win7 theme and your computer will start transforming into windows style immediately. Wait for a few seconds and you will see a window asking you to logout so logout and log in again.
Source

Have you tried http://gnome-look.org/content/show.php/Win2-7+Pack?content=113264     ?
that tutorial you are looking at looks like its for gnome but ubuntu 11.10 has unity desktop on it you can install gnome

sudo apt-get insatll gnome

or

sudo apt-get insatll gnome-session

then logout and in the session menu select GNOME (Classic)
then you should be able to use most of the tutorial

although kde looks a lot more like windows 7

install kde

sudo apt-get install kde-standard

theme for kde
http://kde-look.org/content/show.php/Vistar7+-+Windows+7+Transformation+Pack?content=104232


Unable to reinstall unity-desktop. currently having GNOME I am tryint to install ubuntu-desktop but it shows following error :

The following packages have unmet dependencies:  ubuntu-desktop : Depends: ubuntu-session but it is not going to be installed
                  Depends: unity-control-center but it is not going to be installed
                  Depends: unity-settings-daemon but it is not going to be installed
                  Recommends: xul-ext-webaccounts but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I tried many things but didn't able to get rid from it.

I already tried sudo dpkg-reconfigure -a, and also uninstall gnome-shell. but then I become unable to login . Please help me out. I didn't able to get rid from GNOME. Many applications get crashed whenever i pressed ctrl button. cant't able to change background.

you can reset the unity

$ unity-reset
$ setsid unity

if the above didnot work
try:
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity


Upgrade to 16.10: PAM-CGFS errors Since upgrading my Ubuntu host server installation from 15.10 to 16.04.1 yesterday these errors fill my log:

PAM-CGFS[28483]: Failed to create a cgroup for user root

Googling this turns up nothing useful.
What could cause this and how can I get rid of them?

EDIT: I put the latest output of journalctl --boot 0 here: http://paste.ubuntu.com/22553947/ . It doesn't contain the error yet, as I just rebooted. I'm hoping the boot messages may help you diagnose the problem.

It doesn't trigger directly on boot ,  but happens after invoking some command which uses cgroups and tries accessing non-existent cgroup . In my case , it was lxc-ls  .

See https://lists.linuxcontainers.org/pipermail/lxc-users/2016-August/012172.html

Anyhow,try modifying /etc/pam.d/common-session{,-noninteractive} , adding cpuacct to

  session optional        pam_cgfs.so -c freezer,memory,name=systemd

fixed it for me .


Should I remove one partition before installing Ubuntu? I have more than one partition (4). Should I remove some before partitioning to fit Ubuntu (windows 8)?

I am keen to dual boot Ubuntu 13.04 onto my windows 8 HP laptop. I would like to install it onto USB, then boot it up and try it then give the OS its own partition.

Is it safe to have more than four partitions and then add a fifth? I am not a particularly 'techy guy, so laymens terms please!

The 4-partition limit is an issue on disks that use the old Master Boot Record (MBR) partitioning system. Computers that ship with Windows 8 almost invariably use the newer GUID Partition Table (GPT), which has a much higher limit -- 128 partitions by default, although that can be raised with the right software. (Even MBR-based disks can have more than four partitions, but one of the four primary partitions must be an extended partition, which in turn can hold an arbitrary number of logical partitions. Getting this set up on a system that already has four primary partitions can be a pain.)

If you've re-installed Windows, or if your system came with Windows 7 and you subsequently upgraded to Windows 8, it's conceivable you'll have to deal with MBR's 4-primary-partition limit. If you want to be 100% sure of what you've got, you can check your partition table type, as described here.

Have 4 or 5 partitions seems to me not the problem should just make sure that your pc have enough memory to do what you want to do.

If it has enough memory no problem.

Regards David


xen hypervisor wont boot from grub and "Can't find hypervisor information in sysfs!" error ubuntu 14.04 I have used This forum, trying to run xen on my os:

steps i have done :

egrep '(vmx|svm)' /proc/cpuinfo

ouput = 4 and also i have run KVM virtualization with no problem.

then:

sudo apt-get install xen-hypervisor-4.4-amd64 xen-utils-4.4 xenwatch xen-tools xen-utils-common xenstore-utils virtinst virt-viewer virt-manager

then opened a console : Ctrl + Alt + F1 and :

sudo nano /etc/xen/xend-config.sxp

and appended to the last of the file these lines:

>     (xend-http-server yes)
>     (xend-unix-server yes)

skipped the network part coz i will manage them when every thing is right by bridge control utility .

then

ln -sf /usr/lib/xen-4.1 /usr/lib64/xen

did reboot

in my ubuntu when i loaded booted after restart, whenever i insert this terminal code:

xm dmesg

i get the error of

  ERROR:  Can't find hypervisor information in sysfs!

in that forum and alot searches of google it says to configure the /etc/grub.d .

i did these steps for:
attempt 1:

sudo mv /etc/grub.d/10_linux /etc/grub.d/50_linux
update-grub2

attempt 2:

dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub

Attempt 3:

mv /etc/grub.d/10_linux /etc/grub.d/20_linux && mv /etc/grub.d/20_linux_xen /etc/grub.d/10_linux_xen

but even with that it gives the same error.

when i try to boot from xen hypervisro which has appeared in boot grub loader, no matter what kind of xen hypervisor boot loader i select, system goes plank (or purple color of ubuntu default color) and never starts.

is there any particular solution?

P.S:

  Ubuntu 14.04, AMD Mobility Radeon HD 5430/5450/5470 display ,4GB ram ,i3-370M -
  2.40GHz cpu

Although the community wiki states that as of Ubuntu 14.04, GRUB will automatically choose to boot Xen first if Xen is installed, it doesn't if you don't run Ubuntu (16.04) in English.

To be able to select the right kernel at boot open /etc/default/grub

sudo nano /etc/default/grub

and comment out the following 2 lines by putting a # in front of it and set GRUB_TIMEOUT to let's say 5

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5

next update Grub and reboot

sudo update-grub
sudo shutdown -r now

You should now be able to to select the right kernel in the grub menu and boot your system with Xen enabled. If you want to boot your system with this kernel by default write down the translation of "Ubuntu GNU/Linux, with Xen hypervisor". In my case (Dutch) that's "Ubuntu GNU/Linux, met Xen-hypervisor" and open /etc/default/grub.d/xen.cfg when booted.

sudo nano /etc/default/grub.d/xen.cfg

Replace GRUB_DEFAULT="Ubuntu GNU/Linux, with Xen hypervisor" with GRUB_DEFAULT="translation" at the bottom of that file and undo the changes you made in /etc/default/grub. Update Grub again and reboot with Xen enabled by default ...

This may help,
Found it somewhere in internet

dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen


change gsettings without running X and Unity I am trying to change some gconf settings in Ubuntu 12.10. I would like to change the lightdm greeter background.

I have discovered that while logged in to unity as a user while running X server, I am able to do this with:

sudo xhost +SI:localuser:lightdm
gsettings set com.canonical.unity-greeter background "'/usr/share/backgrounds/micros-background.png'"

The problem is that this requires me to login as a user under X. So that entire window manager needs to be running. But I want to use chroot to change these settings without any X server running. I just want to mount the partitions and change gsettings without having the full window manager running.

Is there a way to directly change gsettings without being logged into X and Unity?

Or alternatively... is there a way to bring up the X server and Unity in the background so that I can make the changes without having a full windowed display come up on my monitor?

It's possible to run gsettings without X11 using dbus-launch --exit-with-session:

dbus-launch --exit-with-session gsettings set com.canonical.unity-greeter background "'/usr/share/backgrounds/micros-background.png'"

Some people says that you must precede the "gsettings" command by the "dbus-launch" word, but I haven't tried it.


Fixed columns' width in Nautilus In Ubuntu 11.10 the nautilus version has a new feature, as you can see: it adapts the column's width to the content of the column itself (at least for the Name column).

This behavior is not always desirable, so I am looking for a way to disable it.

Before Ubuntu 12.10

As this seems to be hard-coded into Nautilus, your best bet be to report a bug, as there is no solution short of patching Nautilus. Even with the newer versions of Nautilus that use dconf, there is no option to change this setting:

Ubuntu 12.10 and up

In Ubuntu 12.10 (so far) it seems Nautilus no longer has this problem. If the final version comes with the standard Nautilus 3.6, you will be able to change the column width freely.

As i only have installed the German version, some translations of the menu might be different, but anyhow it will work if you enter the values below.

Configure fixed column-width

open Terminal
type in gconf-editor /apps/nautilus/list_view
[right mouseclick] -> create / make  key
at name type in: all_columns_have_same_width

type:        boolean

value:       true
close the editor. et voilà

Or, simply, execute gconftool-2 --type boolean --set /apps/nautilus/list_view/all_columns_have_same_width true in Terminal

The column width will stay now the same in nautilus, no matter of the length of the file name.
Also after closing and re-opening, all columns will have the same size.

Good alternatives to the nautilus commander are: "Krusader", "Tux-Commander" and for whom who is missing Norton Commander : "GNOME Commander".

(For a continuesly backup i would entrust you „back in time“)


Where can I download the latest release of Ubuntu? A new version of Ubuntu has been released. I still can't find it on ubuntu.com. Where can it be downloaded from, or is it the only way to install it using update-manager to upgrade an existing installation?

You can download it from any of the following:

Ubuntu Download page,
releases.ubuntu.com (precise, trusty, xenial)
Official CD Mirrors

You can directly upgrade from terminal using:

do-release-upgrade


Ubuntu 18 ans 20 freeze and restart randomly I am using Ubuntu 18. Since 2 days ubuntu restarts randomly - does not matter if I'm doing something at the mement or if I just left my laptop unattended for hours. It freezes, the mouse does not move, everything is unresposnsive and then restarts. I took it for a hardware check, the guys said it has no problems at all, changed the hard drive with one of theirs(with Windows) and it apparantly ran smoothly.
I tried reinstalling Ubuntu 18 and about an hour later got the same problem. Then I tried switching to Ubuntu 20. It seemed fine at the beginning for about 12 hours, then started randomly freezing and restarting again.
My machine is Lenovo ThinkPad E570 with Intel Core i7-7500U CPU at 2.7 GHz.
My Kernel Version (with Ubuntu 20 now) is 5.8.0-50-generic
I put down the kern.log and syslog.I didn't see anything to help me there, but thruth is I am not sure what to look for. There was a restart at 7:13h if that is relevant.
I would appreciate any help!
Syslog:  https://drive.google.com/file/d/18geWj0GJWtS6kbvHfelIuGhd9w9HKl6o/view?usp=sharing
Kern.log:  https://drive.google.com/file/d/15ZHLZvEugVL_ZfgXZ5ohXVqwugkQ5eft/view?usp=sharing

Note how your syslog did NOT log any normal shutdown activity warning before the 0713 restart. It didn't terminate the network connection. It didn't unmount the disks. It didn't progress through the systemd targets, finally reaching shutdown.target.
That's conclusive. It means the trigger did not come from Ubuntu.
Therefore the cause is likely hardware. "Random freezing and restarts" are classic symptoms of hardware failure.
Were the issue overheating, I would expect to see log entries showing CPU throttling or other heat-related warnings. None in the log. However, speculation about hardware troubleshooting is outside the scope of AskUbuntu.
Advice: Take it to a different hardware shop, and leave it there until they experience the same unexplained restart. Alternately, swap out components yourself --one at a time-- until the problem ceases. The last component you swapped was the problem.

Re install it bro I know your pain bro but it's the best solution.
Don't try to fix it unless you are a developer.


Unable to locate package mingw32 A project I'm trying to compile needs mingw32. apt-get install gives me Unable to locate package mingw32.

Doing an apt cache search yields many options and I need help choosing one that will work or eliminate this error.

System info:

4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015

Any ideas?

This package is in universe repository of Ubuntu. So make sure you have enabled universe in /etc/apt/sources.list

To install it use the command:

sudo apt-get install mingw32

It will install packages mingw32 mingw32-binutils  mingw32-runtime automatically

and

sudo apt-cache search mingw32

mingw32 - Minimalist GNU win32 (cross) compiler
mingw32-binutils - Minimalist GNU win32 (cross) binutils
mingw32-runtime - Minimalist GNU win32 (cross) runtime

no need to select one. These packages are dependency of mingw32

Note : Currently these packages are available in trusty, utopic and earlier version of Ubuntu. If you are using the latest Ubuntu version then check Ubuntu package search if package available or not. If not then either download package and install manually or download source and compile it.

EDIT:
You can also try this:

For 32bit system:

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32/mingw32_4.2.1.dfsg-2ubuntu1_i386.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-binutils/mingw32-binutils_2.20-0.2ubuntu1_i386.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-runtime/mingw32-runtime_3.15.2-0ubuntu1_all.deb

For 64bit system

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32/mingw32_4.2.1.dfsg-2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-binutils/mingw32-binutils_2.20-0.2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-runtime/mingw32-runtime_3.15.2-0ubuntu1_all.deb

Install these packages using the command:

sudo dpkg -i *.deb

If it shows dependencies then use command :

sudo apt-get install -f

and again install

 sudo dpkg -i *.deb

I had the same issue.
https://stackoverflow.com/questions/60387020/unable-to-locate-package-any-package-mingw32-mingw64-curses-on-ubuntu-18-04/60389640#60389640

The package name you're using is incorrect.
go to this link and check the for the correct package name.
https://packages.ubuntu.com/

Or see the above mentioned linked you'll see all the steps to follow.

I hope this will help.


Network connection not prompting for password I'm looking at my syslog and seeing very little in the way of useful information about this, but whenever I try to connect to a wifi or VPN connection, I don't get any prompt for auth but the menu on Gnome says "waiting for authentication". I'm not sure how to go about fixing this? It seems to have started happening only since I upgraded to 16.04, and I'm using vpnc (Cisco VPN) on top of the Network-Manager thing.

The syslog just contains info like the UI, e.g it shows the states going from waiting for authorisation to disconnected, it doesn't say anything about trying to prompt for auth.

So far I've tried:

Re-installing the network-manager
Restarting dbus
Multiple reboots
Cleaning out the folder with all the network configurations in and starting "from scratch"

These steps were taken from the answers in: Unable to connect to VPN using gnome-network-manager

Which this may be a duplicate of? I'll let this exist for now as the solutions there didn't help me and I'm not sure the root cause is the same.

It happens for WiFi, VPN, and any other type of connection which requires auth and uses the network-manager application.

kern.log contains:

May 16 10:11:58 joshuagdev NetworkManager[820]: <error> [1463389918.6751] vpn-connection[0x18b7400,c69258b7-65c1-41d2-86a0-7270b1d4e2a7,"Cambridge VPN",0]: Failed to request VPN secrets #3: No agents were available for this request.

I'm not sure exactly what this means, but it looks like it could be the root cause.

Update. I've managed to connect to the VPN using a terminal:

root@host:/home/user# vpnc-connect
Enter IPSec gateway address: hostname
Enter IPSec ID for hostname: groupuser
Enter IPSec secret for groupuser@hostname: secret
Enter username for hostname: user
Enter password for user@hostname: rsapassword
VPNC started in background (pid: 10735)...

While this solves the problem that I can't get on the VPN, it doesn't solve the problem that I now have to do it the hard way. More suggestions are always welcome!

You have not got gnome-keyring installed.

Correct this with

sudo apt-get install gnome-keyring

sudo apt-get update

Found this on other help sites. Not sure if it will help. You could give it a try though.

Create a new file /etc/modprobe.d/ath9k.conf Type in Terminal
sudo nano /etc/modprobe.d/ath9k.conf
Add the following line to it:
options ath9k nohwcrypt=1

Save the file and reboot. Good luck!


having issue with ubuntu 16.04 installation : looks like Graphic card / driver issue I have win-7 64bit , with enough ram and memory and 1GB AMD Radeon 6470M (for ICC) .I tried to install ubuntu 14.04.3 64bit / 16.04. it keeps giving me this error "ERROR* UVD not responding, trying to reset the VCPU!!!"

I am new with it - so Please suggest me what should I do ?

Try this
Errors "*ERROR* UVD not responding, trying to reset the VCPU!!!"

I am assuming here that you have already installed nano by:
sudo apt-get install nano

You substitute the ->"radeon"<-.modeset=0 to whatever brand your graphics card is.

Cheers,


Virtual machine hangs when I use Ubuntu I'm using 10.04 using VMWare Player. The virtual machine is very very slow and is hanging often. I have to force shutdown the system whenever it hangs. Mine is a Dell laptop with 4GB RAM i3 processor and 2.40GHz frequency.

I'm not sure if it is a problem with my processor. I could have comfortably used Ubuntu even if it is a bit slow. But the terminal and everything hangs. Let me know when someone face the same problem with a solution.

I had the same problem and as people mentioned, the problem is RAM and HDD. Even if it says that a lot of RAM is free, it doesn't mean it's actually free - it still used by 'standby' processes. When VM needs memory, it starts swapping on HDD. You can use resource monitor (perfmon.exe /res) to see that.
What I did:

Increase physical memory, the more the merrier
Increase VM memory allocation (in VM settings)
Change HDD to SSD, makes the computer fly!

The most popular bootleneck in every laptop and in many many desktop is the HDD. Probably your HDD is under stress and simply couldn't keep it up with all your I/O requests.

Your CPU is not an i7 but it should be at least a dual core with an high frequency and most likely your HDD is performing worse than your CPU.

If you have an external HDD try with this one.


Un bootstrapping a juju/orchestra environment I think my juju environment in my orchestra server is broken, and I want to do the bootstrap process again.
Basically, I'd like to run:

juju bootstrap

and not get:

2012-02-09 19:51:48,503 INFO juju environment previously bootstrapped.

How can I reset things, and re-bootstrap?

I also noticed that juju installed the zookeeper on node1 of my environment. Is there a way to get juju to install zookeeper on the orchestra server?

juju destroy-environment will shutdown all the machines in orchestra that juju was running (tagged in orchestra with the configured 'acquired-mgmt-class'). For juju to think its already bootstrapped, there is a running orchestra machine that has been recorded as the bootstrap server.

I faced the same issue and I resolved it by performing sudo juju bootstrap instead of juju bootstrap.


ap-hotspot works but nothing can connect I have been searching forever regarding this issue, and I'm not finding anyone with my unique circumstances.  I'm trying to set up a wifi hotspot using Ubuntu.  I was able to do this via Windows 7, however my laptop doesn't have Win7, so I'm trying to create the same setup on my laptop.

The adapter I am using is an ALFA AWUS036NHR V.2.  As far as I can tell the drivers are pre-installed in Ubuntu, as it is able to connect to networks.

I set up the ap-hotspot per various instructions around the web.

I am using the command

sudo ap-hotspot config

sudo ap-hotspot start

All of my devices can see the network, however the android gets an authentication error, the iphone keeps getting "wrong passcode" and the raspberry pi is going in a "4 way handshake (station)" disconnect/reconnect loop.

When I went through this excercise on Windows 7, I had to manually force the adapter to use different drivers until I found one that worked as a hotspot.  I'm concerned this may be the issue here as well, however I can't even get my system to install the drivers from the alfa.com.tw website.  I am using a fresh Ubuntu 12.04 install on an HP Elitebook 8530 laptop.  Below is the output of ap-hotspot debug

sudo ap-hotspot debug
Starting Wireless Hotspot...
* Stopping DNS forwarder and DHCP server dnsmasq
* (not running)
update-rc.d: warning: hostapd start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: hostapd stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
Disabling system startup links for /etc/init.d/hostapd ...
Removing any system startup links for /etc/init.d/hostapd ...
/etc/rc0.d/K20hostapd
/etc/rc1.d/K20hostapd
/etc/rc2.d/K80hostapd
/etc/rc3.d/K80hostapd
/etc/rc4.d/K80hostapd
/etc/rc5.d/K80hostapd
/etc/rc6.d/K20hostapd
Adding system startup for /etc/init.d/hostapd ...
/etc/rc0.d/K20hostapd -> ../init.d/hostapd
/etc/rc1.d/K20hostapd -> ../init.d/hostapd
/etc/rc6.d/K20hostapd -> ../init.d/hostapd
/etc/rc2.d/K80hostapd -> ../init.d/hostapd
/etc/rc3.d/K80hostapd -> ../init.d/hostapd
/etc/rc4.d/K80hostapd -> ../init.d/hostapd
/etc/rc5.d/K80hostapd -> ../init.d/hostapd
update-rc.d: warning: dnsmasq start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: dnsmasq stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
Disabling system startup links for /etc/init.d/dnsmasq ...
Removing any system startup links for /etc/init.d/dnsmasq ...
/etc/rc0.d/K85dnsmasq
/etc/rc1.d/K85dnsmasq
/etc/rc2.d/K85dnsmasq
/etc/rc3.d/K85dnsmasq
/etc/rc4.d/K85dnsmasq
/etc/rc5.d/K85dnsmasq
/etc/rc6.d/K85dnsmasq
Adding system startup for /etc/init.d/dnsmasq ...
/etc/rc0.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc1.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc6.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc2.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc3.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc4.d/K85dnsmasq -> ../init.d/dnsmasq
/etc/rc5.d/K85dnsmasq -> ../init.d/dnsmasq
* Restarting DNS forwarder and DHCP server configuration syntax check
...fail!
net.ipv4.ip_forward = 1
Wireless Hotspot active

I'm fairly new at this so I'm not sure what is wrong, but it appears to be very many things.  Please let me know if there's any further information needed.

Short answer: you probably have another instance of dnsmasq running. So kill all instances :

Edit 1 (thx to  Andrea):

$ sudo killall dnsmasq

Original answer:

$ sudo netstat -taunp | grep -w LISTEN | grep dnsmasq | awk '{print $7}' | sed -r "s/([0-9]+).*/\1/" | xargs kill -9

and try to start the hotspot again :

$ sudo ap-hotspot debug

Starting Wireless Hotspot...
* Stopping DNS forwarder and DHCP server dnsmasq
* (not running)

[...]

* Restarting DNS forwarder and DHCP server dnsmasq
...done.
net.ipv4.ip_forward = 1
Wireless Hotspot active

You can use the in-built hotspot function of Ubuntu. Just go to network and into wireless and click start using as hotspot. It works for me to connect Win laptops, android devices, palm devices.

You can also change various other settings from network connections and editing the network type


desktop does not come back after screen turns off after my screen goes to sleep, I move my mouse and try and wake the screen, I am just met with a black screen and the cursor.

I am able to ALT+CTRL+F3 to bash, and when I try and "startx" back into the desktop, i get an "X" cursor and no sidebar, or any options. the start key does not work either.

I am able to right click > terminal to reboot, but that gets very tiresome after a while.

What is going on? this is a pretty fresh install.

The only thing I've really done with this system is create a RAID1 disk using MDADM and set up samba shares to my home computers!

Otherwise this is a super fresh install!!!

Maybe your DM wasn't installed properly? I've come across similar situations whilst playing around with multiple DMs. The best solution I can think of is to restart the DM.

Bring up the terminal by pressing Alt + F2 and type in the command  unity (This is similar to the command unity --replace)

If you want to restart your entire X Session, then type in sudo service sddm restart

Hope this helps?


cannot connect to wifi on ubuntu 14.04.3 I installed Ubuntu 14.04.30 LTS using a USB stick. I didn't dual boot my pc, I deleted my old OS. I can't find Enable Wireless in the network menu.
The output for rfkill

----------------------------------
rfkill list all
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
-----------------------------------

The output for lshw -c network

*-network
      description: Network controller
      product: BCM4312 802.11b/g LP-PHY
      vendor: Broadcom Corporation
      physical id: 0
      bus info: pci@0000:03:00.0
      version: 01
      width: 64 bits
      clock: 33MHz
      capabilities: bus_master cap_list
      configuration: driver=b43-pci-bridge latency=0
      resources: irq:18 memory:99700000-99703fff
*- network
      description: Ethernet interface
      product: RTL1801E/RTL8102E PCI Express Fast Ethernet controller
      vendor: Related Semiconductor Co., Ltd.
      physical id: 0
      bus info: pci@0000:04:00.0
      logical name: eth0
      version: 02
      serial: 00:1e:ec:a1:73:dd
      size: 10Mbit/s
      capacity: 100Mbit/s
      width: 64 bits
      clock: 33MHz
      capabilities: bus_master cap_list rom Ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation

I am new to Linux and have no idea what to do. I can see the WiFi symbol at the top right corner of the screen. But its blank. When I click on it I can see that Enable Networking is checked. The other options are Edit connections & VPN connections.
I don't have access to internet. Can't use Ethernet as a WiFi network is all I can access. I have just downloaded Ubuntu 14.04.3 and haven't installed any drivers or packages

You can install the Broadcom 4312 driver through the terminal with these commands :

sudo apt-get update

then

sudo apt-get install bcmwl-kernel-source

Once installed just reboot and then it should be working.

If that doesn't work you can try this:

Search Additional Drivers and once there you have to click on Broadcom STA wireless driver and enable it.

Restart and see if that works for you.

The last thing i would recommend to you is reinstall Ubuntu and when it asks if you want to install the 3rd party software (restricted extras) then make sure that it is ticked. Once Ubuntu finishes installing your wifi should be working on first boot.

You might need to install an additional driver once you are connected to the wifi because the restricted extras driver might be unstable but it should work enough for you to install the other driver.

Check my post here for additional help.

Been their try this

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

mkdir ~/RTl8188EU

cd ~/RTL8188EU

git clone git://github.com/lwfinger/rtl8188eu

cd ~/RTL8188EU/rtl8188eu

sudo make

sudo make install

sudo cp -v ~/RTL8188EU/rtl8188eu/rtl8188eufw.bin /lib/firmware/rtlwifi/

sudo deomod -a

sudo update-initramfs -u

sudo modprobe 8188eu


What is the diference between a normal boot and resume option after a recovery boot? I have an Ubuntu 12.04.5 server machine that hangs on boot, but if I choose recovery mode and then resume, everything's ok.

Any clue?!

Recovery mode grub menu entry has the following differences from normal startup:

It has nomodeset boot option set
It emits recovery event instead of startup which does the following:

starts services: hostname, console-setup, setvtrb
emits mounted event for /run to trigger resolvconf and mounted-run.

With resume from the recovery console the start event is emmited and the normal boot is started.

sources:

/etc/grub/grub.cfg
/usr/share/initramfs-tools/init
/etc/init/friendly-recovery.conf

My guess is that you should boot your machine with the nomodeset option

Resume just makes any programs you previously had open or in use that are opened and controlled within the User Interface or opened by the user will be restarted and restored to when last used. Normal boot just gives you a fresh new UI.


Disable Dynamic Brightness Dell LCD I have a Dell Inspiron 11 3000 Series laptop that has built in Dynamic Contrast/Brightness in the screen. The screen automatically adjusts it's brightness according to how many white pixels are on the screen.

In windows Dell has a "Quickset" utility that I download and is able to disable this Power Saving Feature, however "Quickset" is unavailable for linux and running it in wine hasn't proven fruitful. Anyone know how to disable Dell Dynamic Brightness in Ubuntu?

Maybe dconf-editor could help you. I found in it an option that could rule the behavior of auto-brightness:

If you want to try, you can check if this option is enable or not installing dconf-editor.

So run this command:

sudo apt-get install dconf-editor

to install it. Now open dconf-editor and navigate to

com.ubuntu.system

Here you can see the auto-brightness option.

I hope this could help you.


Changing to a lower screen resolution without stretching When I change the screen resolution of my laptop from 1366x768 to 1024x768 via [Displays ...], the entire screen is still filled, stretching the picture uglyly.  How can I have a pixel wise 1-to-1 mapping such that the original proportions are preserved?

This I need particularly when I want to mirror the screen together with a beamer.

(In 9.10 it somewhat depended on the displays available at startup. If a lower resolution screen was added later on, proportions were retained)

xrandr output:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS connected 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm
   1366x768       60.0*+   50.0
   1360x768       60.0     50.0
   1280x768       60.0     50.0
   1280x720       60.0     50.0
   1024x768       60.0     50.0
   1024x600       60.0     50.0
   800x600        60.0     50.0
   800x480        60.0     50.0
   640x480        60.0     50.0
DFP1 disconnected (normal left inverted right x axis y axis)
CRT1 disconnected (normal left inverted right x axis y axis)

This is a lenovo X121e and:

$ sudo lshw -C display
[sudo] password for ulrich:
  *-display
       description: VGA compatible controller
       product: Wrestler [Radeon HD 6320]
       vendor: Hynix Semiconductor (Hyundai Electronics)
       physical id: 1
       bus info: pci@0000:00:01.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=fglrx_pci latency=0
       resources: irq:45 memory:e0000000-efffffff ioport:4000(size=256) memory:f0300000-f033ffff

(What I found odd when running above is that it took so long)

Try first setting scaling mode on the display to "Full aspect"

xrandr --output LVDS --set "scaling mode" "Full aspect"

or

xrandr --output LVDS --set PANEL_FITTING full_aspect

After this change your resolution

xrandr -s 1024x768

This works with lenovo E330 laptop with intel gpu.

Options for scaling mode are: "Full", "Center" or "Full aspect".

You could use another video drive the flgx, and then change the resolution, and set the background to zoom in settings.


Why can't I access a shared folder from within my Virtualbox machine? I have Ubuntu 14.04 as my host system, and then on Virtualbox, I have Lubuntu 14.04.

I am trying to share a folder on my host system so that my guest system can write files to it. I've followed instructions as best I can, installed the Virtualbox guest additions. I've got to the point where I've added the shared folder in the Devices interface:

However, even after rebooting, I can't find the folder anywhere in my guest system.

How do I get my shared folder to actually show up in my guest Lubuntu machine?

You have to mount your folder on your VM.

First you need to install Guest Additions (although I already did this during the installation).

Start your VM
Devices > Insert Guest Additions CD image...
I had to manually mount the CD: sudo mount /dev/cdrom /media/cdrom
Install the necessary packages: sudo apt-get install make gcc linux-headers-$(uname -r)
Install the Guest Additions: sudo /media/cdrom/VBoxLinuxAdditions.run

Now you can mount your share using:

mkdir ~/new
sudo mount -t vboxsf New ~/new

Where New is the name of your shared folder.

Now you can access the shared folder at ~/new.

Note: this is not permanent. To permanently mount your folder you should add the following line to /etc/fstab (sudo nano /etc/fstab):

New /home/user/new vboxsf defaults 0 0

Obviously you should replace user in /home/user/new by your own username.

I solved it by installing samba and sharing the folder with unity features. Then I could see the folder in the network of my virtual machine.


Ubuntu 14.04 login loop - Guest sessions does not work either I have been using Ubuntu 14.04 soon after it is released. Today I messed something up with the Chinese input ibus, and I don't know if this is the reason at all, but when I reboot using sudo shutdown -r now, I cannot pass the login. I entered the correct password, but then the screen just went black, and then the login screen comes up again!

I have searched quite a few solutions from others, but nothing is working for me.

I have read

Ubuntu gets stuck in a login loop
ubuntu 14.04 stuck in login loop. Nothing seems to help
Login screen loops unless you login as Guest
What represent .Xauthority file?

I tried to look at .xsession-error, but that file is empty on my computer.

I tried the suggestion of changing the ownership of .Xauthority, but my .Xauthority is not root initially. I also tried to delete it  but that does not work either.

I did sudo apt-get remove ibus-pinyin in case it is the problem (but not likely).

I also tried sudo apt-get install --reinstall lightdm, but it does not work either. I also tried dpkg-reconfigure lightdm, but I was not able to see the effect.

Also, I looked at /var/crash, and I saw a file _usr_bin_xpad.1000.crash, which seems to record the crash occured at the time that I first encountered thr login loop problem. Yet I cannot find further clue of how to solve it. At the bottom of that file, it suggested to update several packages if the crash still occurs. I did so but it does not work either. These packages are krb5-locales, libgssapi-krb5-2, libk5crypto3, libkrb5-3, libkrb5support0, libprocps3, procps

Can someone save me...I dont wanna switch back to Windows

I solved a similar problem by erasing the file "/etc/shadow.lock". I tried this, because I had no chance to create new users... There is a second lock-file, named "passwd.lock". Only removing this file did not solve the problem.

Maybe this could work to escape from the guest-session loop. I will test this solution with other computers, when this error appears again.


Prompt sudo password until correct one is given and store it in bash script variable I'd like to remove the need for the user to type a password multiple times for a bash script that runs sudo commands. How can I loop for password until something like sudo echo returns 0, and then store the password in a variable to use script-wide?

It is certainly possible to remove the need to type sudo password for specific commands or even whole scripts.

Your suggested path of storing the password in a local variable in the script is rather unwise. Anyone with read rights to /proc/<pid>/environ can read the local variables. Anyone who gains read access to a script, with hard coded credentials, could use those credentials to escalate privileges to root and own your system. On a single user system this is still unwise as there are increasing remote attacks targeting Linux users.

Without the specifics of your script I can only advise you to read Ubuntu Community Wiki - Sudoers. Then modify your sudoers file by running sudo visudo to add the specific commands to the file.

Likely you should add two lines one to add a command alias, and the second to authorize  users to run those commands.

An example of allowing specific user ie, bob, to run selected shutdown commands without a password.

Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/halt, /sbin/reboot
bob ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

The following script is an example of how to include in a script the ability to install, uninstall, or edit the example lines in /etc/sudoers.

#!/bin/bash

#Set Script Name variable
SCRIPT=`basename ${BASH_SOURCE[0]}`

#Initialize variables to default values.
OPT_i=i
OPT_u=u
OPT_e=e
OPT_m=m

#Set fonts for Help.
NORM=`tput sgr0`
BOLD=`tput bold`
REV=`tput smso`

#Help function
function HELP {
  echo -e \\n"Help documentation for ${BOLD}${SCRIPT}.${NORM}"\\n
  echo -e "${REV}Basic usage:${NORM} ${BOLD}$SCRIPT file.ext${NORM}"\\n
  echo "Command line switches are optional. The following switches are recognized."
  echo "${REV}-1${NORM}  --Installs lines in /etc/sudoers to allow script to be run without entering password multiple times."
  echo "${REV}-u${NORM}  --Unistalls lines in /etc/sudoers."
  echo "${REV}-e${NORM}  --Launces visudo to edit /etc/sudoers."
  echo "${REV}-m${NORM}  --Launces main."
  echo -e "${REV}-h${NORM}  --Displays this help message. No further functions are performed."\\n
  exit 1
}

#Install function
function INSTALL {
echo "launching Install"
echo -e '#script_append'\\n'Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/halt, /sbin/reboot'\\n'bob ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS' | sudo EDITOR='tee -a' visudo
}

#Unnstall function
function UNINSTALL {
echo "launching uninstall"
bash -c 'printf ",g/^#script_append$/d\nw\nq\n" | sudo EDITOR='ed' visudo'
bash -c 'printf ",g/^Cmnd_Alias.*reboot$/d\nw\nq\n" | sudo EDITOR='ed' visudo'
bash -c 'printf ",g/^bob ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS$/d\nw\nq\n" | sudo EDITOR='ed' visudo'
}

#Main function
function MAIN {
echo "launching editor via main"
sudo visudo
}

#Check the number of arguments. If none are passed, print help and exit.
NUMARGS=$#
echo -e \\n"Number of arguments: $NUMARGS"
if [ $NUMARGS -eq 0 ]; then
  HELP
fi

### Start getopts code ###

#Parse command line flags
#If an option should be followed by an argument, it should be followed by a ":".
#Notice there is no ":" after "h". The leading ":" suppresses error messages from
#getopts. This is required to get my unrecognized option code to work.

while getopts ":iuemh" FLAG; do
  case "${FLAG}" in
    i)  #set option "i"
     OPT_i=${OPTARG}
      echo "-i used: $OPTARG"
      if sudo grep -q '#script_append' /etc/sudoers
                then
                    echo "Sudoers apperes to have already been installed"
                    exit
                else
                    INSTALL
            fi
      ;;
    u)  #set option "u"
      OPT_u=$OPTARG
      echo "-u used: $OPTARG"
      UNINSTALL
      ;;
    e)  #set option "e"
      OPT_e=$OPTARG
      echo "-e used: $OPTARG"
      sudo visudo
      ;;
    m)  #set option "m"
      OPT_m=$OPTARG
      echo "-m used: $OPTARG"
      MAIN
      ;;
    h)  #show help
      HELP
      ;;
    \?) #unrecognized option - show help
      echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed."
      HELP
      #If you just want to display a simple error message instead of the full
      #help, remove the 2 lines above and uncomment the 2 lines below.
      #echo -e "Use ${BOLD}$SCRIPT -h${NORM} to see the help documentation."\\n
      #exit 2
      ;;
  esac
done

shift $((OPTIND-1))  #This tells getopts to move on to the next argument.

### End getopts code ###

My current approach that seems to be working is as follows:

read_sudo_pwd() {
    read -s -p "[sudo] password for $USER: " sudo_pwd
    until (echo $sudo_pwd | sudo -S echo '' 2>/dev/null)
    do
        echo -e '\nSorry, try again.'
        read -s -p "[sudo] password for $USER: " sudo_pwd
    done
}

read_sudo_pwd
echo $sudo_pwd | sudo -S echo 'Hello'
echo $sudo_pwd | sudo -S echo 'World'


I am unable to change brightness of my laptop i am new to ubuntu and using Ubuntu 14.04 and installed nvidia graphics driver in my sony vaio E-series VpCEH25en but I cant change the brightness.

To I'm just tried out the following command (As mentioned above)

Ctrl+Alt+T: to open command prompt
sudo gedit /etc/default/grub
Find the line

GRUB_CMLINE_LINUX_DEFAULT="quiet splash"

Replaced this line with the following line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
sudo update-grub
reboot

It's definitely working on it.

Try this app ... it  is handy one with out any overhead...

https://apps.ubuntu.com/cat/applications/brightness-controlleer/

Brightness Controller is the only GUI application for Linux that allows you to control brightness of your primary and secondary display from the same place. It is a software based dimmer. Released under GPL-3, Brightness Controller's source code is available.

**EDIT:TRY THIS **
Changing the /etc/default/grub file may work
In terminal

sudo gedit /etc/default/grub

Find the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and modify it to one of the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

or

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linuxacpi_backlight=vendor"
(try this if the first one doesn't work)

 Save and close gedit.

Then type

 sudo update-grub

 Reboot your pc.

As from Ubuntu 13.10, needed one extra step for the problem to be solved.

Create an xorg.conf file in /etc/X11/ with the following contents:

Section "Device"
   Identifier      "Configured Video Device"
   Driver          "intel"
   Option          "Backlight"       "intel_backlight"
EndSection
#
Section "Monitor"
   Identifier      "Configured Monitor"
EndSection
#
Section "Screen"
   Identifier      "Default Screen"
   Monitor         "Configured Monitor"
   Device          "Configured Video Device"
EndSection

WARNING!! Getting the file wrong or if this configuration is not compatible with your hardware, might end up with an unbootable system!

In that case, you'll have to delete (or rename) the file, but to do so requires either booting from a liveUSB or liveDVD (the simplest way) or booting in recovery mode, making the Ubuntu partition rewritable and then delete the offending xorg.conf file.


How to create bootable Backup (ubuntu) From Virtual box I have installed Ubuntu 16.. on virtual box.
I need to backup this Ubuntu to sd card or USB and i will install this on physical machine. How can i do that?

The steps below describes how to create the bootable backup ISO of your VM.  You'll have the ISO.  If just having the backup is all needed. You can disregard the references to transferring the ISO image to a new drive.

The target drive has to be as least the size of the source drive.  The size doesn't matter as long as it's not smaller.  If it's smaller the transfer will fail.

These are the steps needed:

Create ISO image from VirtualMachine's HD
Copy the ISO to the physical Drive
Fix the integrity of the physical drive or partition

Creating the ISO image from the VM's HD

$ VBoxManage clonehd ["source vdi pathname"] ["target iso pathname"] --format RAW

The pathnames will be replaced with something similar to:

Source VDI:    "~/VirtualBox VMs/Ubuntu 16.04 LTS"
Target ISO:    "~/isoimages/ubuntu-16.04lts.iso"

The quotes are only needed if you have spaces in the pathname.  Don't include the brackets.

Now place that ISO image to the new target drive (using the example source and destination above):

$ sudo dd if="~/isoimages/ubuntu-16.04lts.iso" of=[/dev/sdc] bs=4M status=progress

In the command above the /dev/sdc is new target drive that you are transferring the VM drive to.  Don't include the brackets in the command.

Very Important!  The dd command is a lowlevel command that will not perform normal safeguards.  If you make a mistake and run it on an unintended drive, it'll be overwritten.  You lose the current data on the drive.  So be very careful with the of= command.

Now run Gparted on the new target drive.  Use this to resize the partitions to accommodate for the difference in drive size.

I perform these steps often in having a default installation for fresh Ubuntu Installs for clients machines.

Try making an archive:

sudo tar -cpzf name.tar.gz /

Then start a live session and make a bootable ext4 partition, mount it, and:

sudo tar -xpzf name.tar.gz -C /target_drive

Then change the /etc/fstab to the correct UUIDs then chroot into that system, and run a sudo update-grub, then come back and tell me if it works or not cause I didn't tried...

don't delete the system from the virtual box, just in case it doesn't work...


How to enable ssh root access on Ubuntu 14.04 I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.

Simply adding a password for root is not enough for Ubuntu 14.04 Server.

You also need to edit /etc/ssh/sshd_config, and comment out the following line:

PermitRootLogin without-password

Just below it, add the following line:

PermitRootLogin yes

Then restart SSH:

service ssh reload

For Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64) PermitRootLogin without-password has been replaced by PermitRootLogin prohibit-password.

For me, none of these steps worked, I've even tried something I wouldn't ever try for something else then a toy vm: PermitRootLogin without-password

The only thing that worked for me was disabling the PAM module for this:

UsePAM no

This option is normally at the very end of the file. To be honest, I don't know the real drawbacks of this, but since you're not supposed to allow root login online, I guess it's okay for a private dev-vm.

Nevertheless, set a strong password, always. Nope this is not an exception. Not even only this time...


I'm using Ubuntu 16.04 and there's no fglrx! I'm using Ubuntu 16.04 and there's no fglrx! What happened?

The publishing history on Launchpad indicates the package has been deleted for 16.04:

Removed from disk on 2016-03-03.
Removal requested on 2016-03-03.
Deleted on 2016-03-03 by Martin Pitt
(tjaalton) there will not be updates any more, incompatible with new X.org ABI, free driver is good enough now

You could post a bug on Launchpad if you feel the open source driver isn't good enough.

The Release Notes for 16.04 has more information:

  fglrx

  The fglrx driver is now deprecated in 16.04, and we recommend its open
  source alternatives (radeon and amdgpu). AMD put a lot of work into
  the drivers, and we backported kernel code from Linux 4.5 to provide a
  better experience.

  When upgrading to Ubuntu 16.04 from a previous release, both the fglrx
  driver and the xorg.conf will be removed, so that the system is set to
  use either the amdgpu driver or the radeon driver (depending on the
  available hardware).

In a mailing list discussion, it's suggested that people who really need the fglrx driver might have to continue using 14.04 until the open source driver improves:

  AMD dropped support for their proprietary-blob fglrx video driver so it can't be included in 16.04 LTS. The last release AMD did can not be used because it is incompatible with the newer x.org display server. Most people will be able to the use the open source AMD video driver, but there are a few applications (certain graphics-intensive games, bitcoin mining) for which it is inadequate. Folk who rely on such applications might choose to remain on 14.04 LTS until adequate support lands in the open source AMD video drivers.

Related:

Ubuntu Is Deprecating fglrx (Catalyst) In 16.04 LTS - Phoronix

graphics for AMD Radeon graphics cards have been released for most Ubuntu versions and thus I would expect that they will also release one for 16.04. Reading the FAQ, it (fglrx) is mostly released, 12 weeks after releasing the ubuntu release; so we need to be a bit more patient.

About using the open source driver with an AMD Radeon HD6670, works ok but not too good. E.g. photoś are definitely displayed with lesser quality. Also the X-server crashes once a while (though I still need to investigate what exactly happens).


Uncomplicated Firewall (UFW) is not blocking anything when using Docker This is my first time setting up an Ubuntu Server (14.04 LTS) and I am having trouble configuring the firewall (UFW).

I only need ssh and http, so I am doing this:

sudo ufw disable

sudo ufw reset
sudo ufw default deny incoming
sudo ufw default allow outgoing

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp

sudo ufw enable
sudo reboot

But I can still connect to databases on other ports of this machine. Any idea about what am I doing wrong?

EDIT: these databases are on Docker containers. Could this be related? is it overriding my ufw config?

EDIT2: output of sudo ufw status verbose

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW IN    Anywhere
80/tcp                     ALLOW IN    Anywhere
22/tcp (v6)                ALLOW IN    Anywhere (v6)
80/tcp (v6)                ALLOW IN    Anywhere (v6)

The problem was using the -p flag on containers.

It turns out that Docker makes changes directly on your iptables, which are not shown with ufw status.

Possible solutions are:

Stop using the -p flag. Use docker linking or docker networks instead.
Bind containers locally so they are not exposed outside your machine:

docker run -p 127.0.0.1:8080:8080 ...
If you insist on using the -p flag, tell docker not to touch your iptables by disabling them in /etc/docker/daemon.json and restarting:

{ "iptables" : false }

I recommend option 1 or 2. Beware that option 3 has side-effects, like containers becoming unable to connect to the internet.

Login to your docker console:

  sudo docker exec -i -t docker_image_name /bin/bash

And then inside your docker console:

sudo apt-get update
sudo apt-get install ufw
sudo ufw allow 22

Add your ufw rules and enable the ufw

  sudo ufw enable

Your Docker image need to be started with --cap-add=NET_ADMIN

To enable "NET_ADMIN" Docker option:

1.Stop Container:

docker stop yourcontainer;
2.Get container id:

docker inspect yourcontainer;
3.Modify hostconfig.json(default docker path:/var/lib/docker, you can change yours)

vim /var/lib/docker/containers/containerid/hostconfig.json

4.Search "CapAdd", and modify null to ["NET_ADMIN"];

....,"VolumesFrom":null,"CapAdd":["NET_ADMIN"],"CapDrop":null,....
5.Restart docker in host machine;

service docker restart;
6.Start yourconatiner;

docker start yourcontainer;


How to clear text in a file? How to clear text that existed in a text file without opening it?

I mean for example I have a file as hello.txt with some text data in it, and how can I clear the total text in that file without opening it?

By this, I mean not using any editor like nano, Gedit, etc.

Just open your terminal with CTRL+ALT+Tand type as

 > hello.txt

that's it, your data in that file will be cleared with out opening it even .

Example:

So, I see a lot of redirections being used to answer this ;)

A little different approach with the combo: rm & touch

rm hello.txt && touch hello.txt

(yeah... yet another cheat!)

So with this command combo the file hello.txt wasn't opened and in the end you still have file hello.txt in its place with the contents cleared. Just like you wanted!


How do I run a single command at startup using systemd? I'd like to startup an Apache Spark cluster after boot using the following command:

sudo ./path/to/spark/sbin/start-all.sh

Then run this command when the system prepares to reboot/shutdown:

sudo ./path/to/spark/sbin/stop-all.sh

How can I get started? Is there a basic template I can build on?

I've tried to use an extremely simple (file: /lib/systemd/system/spark.service):

[Unit]
Description=Spark service

[Service]
ExecStart=sudo ./path/to/spark/sbin/start-all.sh

Which doesn't work.

Your .service file should look like this:

[Unit]
Description=Spark service

[Service]
ExecStart=/path/to/spark/sbin/start-all.sh

[Install]
WantedBy=multi-user.target

Now, take a few more steps to enable and use the .service file:

Place it in /etc/systemd/system folder with say a name of myfirst.service
Make sure that your script executable with:

chmod u+x /path/to/spark/sbin/start-all.sh

Start it:

sudo systemctl start myfirst

Enable it to run at boot:

sudo systemctl enable myfirst

Stop it:

sudo systemctl stop myfirst

Notes

You don't need to launch Spark with sudo in your service, as the default service user is already root.
Look at the links below for more systemd options.

Moreover

Now what we have above is just rudimentary, here is a complete setup for spark:

[Unit]
Description=Apache Spark Master and Slave Servers
After=network.target
After=systemd-user-sessions.service
After=network-online.target

[Service]
User=spark
Type=forking
ExecStart=/opt/spark-1.6.1-bin-hadoop2.6/sbin/start-all.sh
ExecStop=/opt/spark-1.6.1-bin-hadoop2.6/sbin/stop-all.sh
TimeoutSec=30
Restart=on-failure
RestartSec=30
StartLimitInterval=350
StartLimitBurst=10

[Install]
WantedBy=multi-user.target

To setup the service:

sudo systemctl start spark.service
sudo systemctl stop spark.service
sudo systemctl enable spark.service

Further reading

Please read through the following links. Spark is a complex setup, so you should understand how it integrates with Ubuntu's init service.

https://datasciencenovice.wordpress.com/2016/11/30/spark-stand-alone-cluster-as-a-systemd-service-ubuntu-16-04centos-7/
https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Copy-paste this into a terminal (as root) to create /root/boot.sh and run it on boot:

bootscript=/root/boot.sh
servicename=customboot

cat > $bootscript <<EOF
#!/usr/bin/env bash
echo "$bootscript ran at \$(date)!" > /tmp/it-works
EOF

chmod +x $bootscript

cat > /etc/systemd/system/$servicename.service <<EOF
[Service]
ExecStart=$bootscript
[Install]
WantedBy=default.target
EOF

systemctl enable $servicename

To modify the parameters, for example to use a different $bootscript, just set that variable manually and skip that line when copying the commands.

After running the commands, you can edit /root/boot.sh using your favorite editor, and it will run on next boot. You can also immediately run it by using:

systemctl start $servicename


Ubuntu Touch ota-13 update faillure? I have an BQ Aquaris E5 Ubuntu Edition and today the Ubuntu Touch ota-13 update released. So i installed the update. After the update is installed, the device booted normaly. But suddenly the screen brightness took down to the lowest level. Normaly Ubuntu turns of the screen in 1 minute idletime. That's normal but when it turns the screen of, it cannot be turned on. The only thing that turns the screen on for a couple of moments is the charger. But the screen is black. The screen turned on, but all what i see is a black screen. Can someone help me. This happened 1 time earlier to me when updating the device to 15.04 ota-9.1 (first update) But then i could reset the device easy when booting up. And now it does nothing but showing a glowing black screen when connected and released from the charger.

Don't panic yet. So many users are facing this issue after OTA-13. Just wait patiently. Looks like it's taking longer than normal to apply the update. The device should boot all by itself after a few minutes (~15) of black screen. Do not press the power button. If nothing happens after say half an hour, then try long pressing the power button to turn it on.

I had the same issue. I pressed for a long time the three butons to force a reboot: I had a purple screen written "fastboot mode" and then I mannually forced reboot again and everything went back to normal after updating...


KDE: Disable touchpad while typing How can I disable the touchpad while typing on KDE?

Is there such a setting like in gnome?

Application menu -> Utilities -> touchpad management. There, you can ask the system to disable the touchpad when a usb mouse is connected and/or when you are typing.

Did you try touchpad-indicator? You can install it using these commands while in a terminal:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator


install build-essentials I have used the command

sudo apt-get install build-essentials g++-4.4 gcc-4.4

This command gives error

E: Unable to locate package build-essentials.

how should I install gcc?

The package I think you want to install is "build-essential". If you use the correct name, not "build-essentials", you will get better results

run command :

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

then do

sudo apt-get update
sudo apt-get install build-essential


Ubuntu12.04 has libc6 dependency problems when installing software The following packages unmet dependencies:
 libc6 : Depends: libc-bin (= 2.15-0ubuntu10.3) but 2.15-0ubuntu10.4 already installed
 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.4) but 2.15-0ubuntu10.3 already installed
             Depends: libc-dev-bin (= 2.15-0ubuntu10.4) but 2.15-0ubuntu10.4 already installed
 libc6:i386 : Depends: libc-bin (= 2.15-0ubuntu10.3) but 2.15-0ubuntu10.4 already installed

What is the reason, how to solve?

just type the command in the terminal

dpkg --configure libc6


How to add "Open terminal here" to Nautilus' context menu? I am working on Ubuntu 12.04 64bit.

I want to add "Open terminal here" to Nautilus context or right-click menu but it tries to download 32bit version from Internet.

You have to install the nautilus-open-terminal package from the universe repositories for Ubuntu versions up to Ubuntu 15.04:

sudo apt-get install nautilus-open-terminal

If you want to install it with apturl, use this URL: apt://nautilus-open-terminal

Then:

nautilus -q

In order to restart Nautilus

In Ubuntu 15.10, the functionality is already included in nautilus!

This link provides the best working solution for adding the feature "Open terminal here" as context command menu for a folder.

http://www.n00bsonubuntu.net/content/add-open-terminal-here-to-file-menu-ubuntu-14-04/


Can't use bluetooth audio device despite Pulseaudio modules loaded and device connected I already spent hours and hours to get my bluetooth audio device running.

System: Ubuntu 16.04 LTS Xenial, all updates installed, running on a Lenovo Y50 Notebook
Device: Bluetooth receiver MR230, with analog audio output. It is meant to connect to an old hi-fi system. The device won't connect automatically, but I can find, pair, trust, and connect it with bluetoothctl without problems. The bluetooth manager shows it as a headphone.
the pactl list short command shows, that the modules module-bluetooth-discover, module-bluez5-discover, module-switch-on-connect, and module-bluetooth-policy are all running (after I started them manually)

But still, I can't choose the device in pavucontrol because it doesn't appear there. I might have messed up some of my config files during these tries, though it should still work as all necessary modules are loaded and the device is connected.

Any ideas?

For me, the reason I was getting no sink in pulseaudio was using hcitool instead of bluetoothctl to connect the headset. With bluez5, the latter is preferred, and the former isn't guaranteed to work.

But even having a pavucontrol-selectable sink did not give me sound. I've certainly heard noise level change between sink sleep and unsuspend transitions, but still no sound ended up actually playing (with unmuted sink at max volume). Also, pulseaudio refused to use the A2DP profile saying module-bluez5-device.c: Profile 'a2dp' not valid or not supported by device eventhough bluetoothctl <<< "info 00:11:22:33:44:55" was clearly listing Audio Sink UUID 0000110b-0000-1000-8000-00805f9b34fb. So PA was using HSP/HFP or whatever, and that means hardcoded  8kHz mono.

In the end, how I got actually working A2DP on Ubuntu 16.04.1 was to compile pulseaudio 9.0 from source. Very predictable build; a short transcript for those who know some compiling:

git clone --branch master git://anongit.freedesktop.org/pulseaudio/pulseaudio \
    && cd pulseaudio
./autogen.sh
./configure \
  --enable-bluez5 \
  --enable-bluez5-native-headset \
  --with-speex \
  && make -sj3

Just find and apt install those -dev packages configure asks for. make took ~100 seconds to complete.

Then quick in-place test:

echo 'autospawn=no' > ~/.config/pulse/client.conf; killall pulseaudio

src/pulseaudio --daemonize=no --log-level=info -F /etc/pulse/default.pa

At this point I got it working.

$ src/pulseaudio --version
pulseaudio 9.0-129-gf7b8

For final touch, I'd package that up into a .deb, install systemwide via dpkg -i and undo the autospawn=no change.

I found this answer at Here by Louis Gagnon

The permanent solution would be to add the blueman PPA and update your package to the latest version which has the bug fixed: https://launchpad.net/~blueman/+archive/ubuntu/ppa

sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update
sudo apt-get upgrade

That way, you should no longer have to run the

sudo -i pactl load-module module-bluetooth-discover

command every time but only once. Works for me on 14.04 LTS (Trusty)

Source: http://www.lxle.net/forums/discussion/503/how-to-sink-audio-a2dp-to-your-bluetooth-headset/p1


How to delete selected results from bash history? history command shows all the results but we can filter to get particular command using history | grep searchingCommand. It is really helpful.

But the problem is it shows those commands also which was entered with typo error or which was unsuccessful. Then identifying the correct one is really a pain. I checked this link: Selective command-history in the terminal? but that was not my solution.

So is there a way to delete those commands from the history which was incorrect at the time entered or later?

Use:

history -d OFFSET

to delete the history entry at offset OFFSET even before it was added to your bash history file. To find out the right OFFSET, you need only to run history command. It's the number from from the start of the line which contain the history entry that you want to delete it.

And to save the modifications to the history use:

history -w

See more details in this guide.

I had a situation where I had superfluous entries in my bash history from a Yubikey- maybe 50 or so, matching 'ccccc.....'. Ideally, I wanted a way to delete entries matching a pattern, which I suppose you could do with sed or something, assuming your history ignores blanks.

Anyway, I got lazy and ended up using vim, searching for 'cccc' and using 'dd' while cycling through every match. Didn't take more than a minute.


Acer Aspire 5542G overheating with ubuntu/kubuntu 12.04 I have an Acer Aspire 5542G laptop purchased couple of years ago. All these days, i used windows 7 on it . Then I tried ubuntu 12.04 . Everything was fine except the overheating issue. I updated ubuntu with all security fixes and available updates but nothing solved the problem. With idle use like internet browsing, the cpu fan speeds up a lot and i can feel very hot air coming from the vent (comparable to playing serious 3d game in windows). But it will not go to a point of freeze and shutdown. But as long as im using it, with no intensive tasks at all, the laptop stays too hot. This wasn't the case with windows7. In windows 7 the fan will not rotate at all with normal use.

I heard there was manufacturing defect with some acer laptops, but i think it wasn't the case with my laptop since windows7 runs perfectly.

I updated the bios to latest version. I cleaned dust in the vents. I tried kubuntu 12.04 up-to-date. Nothing solved the issue.

My laptop specs are:
CPU : AMD turion2 x2 M500 @ 2.2GHz
GPU : AMD Mobility Radeon HD4570
3GB RAM and 320GB hard disk.     *EDIT : * If it helps, my laptop was shipped with LINPUS LINUX.

I guess i found something. It overheats when using the open source radeon driver. After installing fglrx and setting the power save option in catalyst control center there seems to be major difference.

Certa vez li em um forum que este problema ocorre com o desenvolvimento da gestão de energia do Ubuntu.
Tenho o mesmo notebook e o mesmo problema.
Vamos aguardar para ver se um dia alguem resolve.


BumbleBee / getting Nvidia 310.19 Drivers to Work | 12.10 Asus U31JG - A1 Laptop:

-Intel Core i3

-Nvidia 415m / Intel HD Graphics ( Optimus Technology )

Hello, I have been trying for about 3 weeks now to get any kind of Nvidia driver to work, and now am determined to get the 310.19 driver to work. I have tried numerous times of which either nothing happened or my interface ( menu bars, the top and left bar on desktop, and the ability to close a window) would disappear. Apparently I'm not making the connection on how to get these to install properly. I have tried numerous other posts and websites and attempted "bumblebee" to no avail. I am wondering if anyone can write a step by step guide of commands  that I need to run in terminal to get this to work. I've had to reinstall 12.10, so if you could walk me through the process of getting the drivers downloaded and installed, I would greatly appreciate it. I barely know what I'm doing, and this is quite a turn off for someone new to Ubuntu, I really want to enjoy it but this is preventing me from committing. Thank you in advance, and I apologize for being so flustered / helpless with this but I have ran out of patience with this.

G'day,

I'm not sure if this will help, but I had a lot of trouble getting graphics drivers working in 12.04 on my Optimus machine.

Here is the procedure I eventually used to get it running smoothly: How do I get a Dell Latitude e6420 working?

I hope this helps.

there are two possible methods:

Installing the driver from the official Ubuntu repositories ("nvidia-experimental-310") removes bumblebee-nvidia because the package depends on nvidia-current. To avoid this, you need to get the Bumblebee source and repackage the deb with the nvidia-experimental-310 dependency instead of nvidia-current. You may also need to adjust the Primus paths and recompile it.
Add a PPA that uses the nvidia 310 drivers as "nvidia-current" not "nvidia-experimental-310". There are some (like this one: https://launchpad.net/~2nv2u/+... ), but I don't recommend using an unofficial PPA for this. The only official PPA with such a package is, as far as I know, the xorg edgers PPA: https://launchpad.net/~xorg-ed... which has "Xorg packages fresh from git" so it's not stable.

Keep in mind that if you add the xorg edgers PPA, do a dist-upgrade, but you'll get many other packages with the driver (you can't just install the nvidia-current package)


Arrow keys, Home, End, tab-complete keys not working in shell I have installed ubuntu minimal(mini.iso) on my vm. I then used recovery mode to login as root and create an account with useradd -m admin and then set a password with passwd admin.

When I login on the new account, instead of the normal prompt I only see a $ sign. If I try to tab-complete a command or file name it prints a normal tab. If I try to use the arrow keys it prints ^[[A, ^[[B, ^[[C or ^[[D. Also, ls no longer adds colors.

None of these problems were in recovery mode. How can I fix this?

That probably means that the new user account was created with /bin/sh as its login shell (which symlinks to the dash shell by default) instead of /bin/bash - you can change a user's login shell with the 'chsh' command
chsh -s /bin/bash

or to change another user's login shell (need to be root to do this obviously)
sudo chsh -s /bin/bash <username>

(you will need to start a new login session for the change to take effect). You may also need to copy the default .bashrc from /etc/skel to get the color prompt.
In future you might want to use the 'adduser' command instead of 'useradd' - it sets up a more complete user environment including things like a default .profile and .bashrc - as well as setting the login shell to 'bash'

This will solve all: paste and press . After that you will be able to auto-complete from the history, using arrow up.

bind '"\e[A": history-search-backward'

Taken from:
https://unix.stackexchange.com/questions/5366/command-line-completion-from-command-history
Also you can use Ctrl + R to see your history.


ubuntu server not resolving LAN hostnames Bit stuck here.

I have 2 machines that cannot resolve LAN hostsnames, unless there are specific entries in /etc/hosts

But other machines on the LAN can resolves hostnames.

My LAN:

1 x Cisco router runnning DD-WRT v24-sp2 with DNSMasq enabled. I've configured this with the hostnames and IPs on my LAN.
1 x Kubuntu 12.10 (resolves all hostnames correctly as long as they are entered into DNSMasq on the router)
2 x NAS (also resolve all names correctly)
1 x Ubuntu Server 12.04 (this does NOT resolve local hostnames unless they are entered into /etc/hosts)
1 x XBMCLive (Dharma) (same - does not resolve unless entries are in /etc/hosts)

How do I get the last 2 to use the DNSMasq entries on the router? Each machine is set to use the router as a nameserver, and all units resolve external addresses correctly.

Thanks.

some more info:

whilst on server, if I ping another PC (wstation)

$ ping wstation
PING wstation.local.domain (x.x.x.x)

If I then append .local

$ ping wstation.local
PING wstation.local.local.domain (x.x.x.x)

and directly

$ ping 10.0.0.4
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_req=1 ttl=64 time=0.387 ms
64 bytes from 10.0.0.4: icmp_req=2 ttl=64 time=0.316 ms
64 bytes from 10.0.0.4: icmp_req=3 ttl=64 time=0.312 ms
64 bytes from 10.0.0.4: icmp_req=4 ttl=64 time=0.280 ms
64 bytes from 10.0.0.4: icmp_req=5 ttl=64 time=0.322 ms
^C
--- 10.0.0.4 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.280/0.323/0.387/0.038 ms

About your current output

ping wstation
PING wstation.local.domain

Clearly indicates that your pc is appending .local.domain to non-FQDN queries. This is something configured improperly or at least wrong in your set up. (unless you actually use the .local.domain suffix on purpose)

Name resolving and periods

One important thing what a lot of people don't know, is that a full name should always end with a period (.). If you omit it, then the machine will try to resolve it within the local search domain (e.g. mydomain.tld). So in that case, a query for mypc.local would become mypc.local.mydomain.tld. To prevent this, query with the period.

Resolver configuration

The resolver configuration is of great importance here. In Ubuntu (and Debian) this is configured in the file /etc/network/interfaces (assuming you're not running NetworkManager):

iface eth0 inet static
   address 192.168.3.3
   netmask 255.255.255.0
   gateway 192.168.3.1
   dns-nameservers 192.168.3.45 192.168.8.10
   dns-search foo.org bar.com                      # <-- these are the search domains

Name resolving in Linux can also be accomplished in other ways. It's not just that the local DNS server is being queried for all of this. Take a look at your /etc/nsswitch.conf file for the hosts configuration of resolving:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

This means that files are tried first (this is the /etc/hosts file), then mDNS and only later the real DNS server is queried. mDNS is implemented using Avahi in Linux and is called Bonjour on Apple devices. It is using the .local suffix by default and works via broadcast messages. Much like ARP works, but then for DNS.

All these systems can be very confusing and even more when using .local in a regular DNS setup mixed with mDNS devices. I guess this is why you're confused now as to why one device works and the other doesn't: they're not all using the same resolving method.

To sort things out

Avoid the use if .local unless you want to rely on mDNS completely. From your question I understand you'd like to keep things configured yourself in a central place, so my approach here is to avoid it.
Configure your local DNS server (the DD-WRT device in your case) to use a special domain name, e.g. my.home. For dnsmasq this is a single setting, but in regular setups this should be configured on both the DNS server as well as the DHCP server (as it's being announced via DHCP).
Configure all PCs to have a simple and unique host name. They use this in their request for DHCP and this is used in the dnsmasq running on your router to resolve them. Alternatively, configure them manually to not to have to rely on DHCP.
Remove any leftover configuration in /etc/resolv.conf in case you fiddled with it in the past.
Configure the PCs in your network to use my.home as the local search domain. This can be done via DHCP automatically, or if using static addresses via the /etc/network/interfaces file or in Network Manager:

Now both simple name resolving (ping hostname) as well as full name (ping hostname.my.home) should work.

I got similar issues with a /etc/hosts containing multiple spaces between IP and hostname, instead using a TAB. After changing to TAB the hostname could be resolved by ping.

127.0.0.1        test.local
         ^^^^^^^^ → Should be a TAB not multiple spaces.

see also on https://superuser.com/a/938366/467479


How can I prevent programs from switching workspaces? I want to prevent programs from switching workspaces. If I'm working in one workspace and a program in another workspace has a dialog box come up, it interrupts whatever I'm doing. Similarly, if I switch to a workspace, click to open a program, then switch back to the first workspace, the program will open in the workspace I'm currently on, rather than the workspace I opened it in.

Basically, I want a program to be locked to a workspace and unable to switch.

Any suggestions are appreciated!

To fix an application to a specific viewport (you can manually move it after it has opened), use Compiz.

Install CompizConfig Settings Manager using Ubuntu Software Manager. Warning: you can mess up your interface if you fiddle with bits you don't know, so follow the instructions here carefully.
Open CompizConfig Settings Manager (also known as CCSM).
Choose Window Management from the left-hand menu.
Choose Place Windows from the right-hand side.

Select the tab Fixed Window Placement.

Now, for each application whose window you want to place in a fixed viewport:

Open the application.
In CCSM, under Windows with fixed viewport, select New.
Press the big green + and then Grab. The cursor changes to a cross; click on the application window you want to fix (e.g. Firefox). The Value will be automatically filled in.
Press Add.

Fill the X Viewport Positions (should be singular); this refers to the workspace number counting from the left.
Fill the Y Viewport Positions (should be singular); this refers to the workspace number counting from the top.
In my example, I have chosen Firefox to always start in the third column, second row of the available workspaces.

Press Close.

Thereafter, that application will always open in that specific viewport.

Right-click on the workspaces bar
Click 'preferences'
Locate "Number of workspaces" under the heading "workspaces"
Click the minus sign until the number of workspaces is 1.
Close the window


Why do I get IBUS-Warning on running the sudo gedit command? Whenever I try to run a sudo gedit command as instructed in Step 4 of this answer, my terminal puts out:

  (gedit:7549): IBUS-WARNING **: The owner of /home/jared/.config/ibus/bus is not root!

How do I get out of this situation?

You should always use gksudo instead of sudo to launch graphical applications otherwise the environmental variables aren't set up correctly.

In your example ibus is looking at the files in your users home directory instead of roots home directory as it should be doing.

Do this on a terminal:

michele@Zeus:~/.config/ibus$ sudo gedit /etc/bluetooth/main.conf

(gedit:3940): IBUS-WARNING **: The owner of /home/michele/.config/ibus/bus is not root!

michele@Zeus:~/.config/ibus$ ll
totale 12

drwx------  3 michele michele 4096 dic 29 18:11 ./

drwx------ 26 michele michele 4096 gen  2 12:25 ../

**drwx------  2 michele michele 4096 gen  5 13:19 bus/**

michele@Zeus:~/.config/ibus$ rm -R bus/

michele@Zeus:~/.config/ibus$ sudo gedit /etc/bluetooth/main.conf

and now!!!

michele@Zeus:~/.config/ibus$ ll

totale 12

drwx------  3 michele michele 4096 gen  5 13:35 ./

drwx------ 26 michele michele 4096 gen  2 12:25 ../

**drwx------  2 root    root    4096 gen  5 13:35 bus/**


How do I install modern packages in Ubuntu "the right way" ? I'm using Ubuntu 14.04.3 and I'm wondering how to install a modern version of GPA (Gnu Privacy Assistant). The one present in the Ubuntu repositories is really old.

There are some modern packages on Launchpad, however I don't understand how to install the current stable release which is only available for 15.10 and not for 14.04.3

https://launchpad.net/ubuntu/+source/gpa

Thank you everyone!

You will need all packages follow these steps.

First you need add  repository. , What ever Git, launchpad, Debian. etc

grap mean by what application you need ?.
Grap mean below ddrescue is grap
What you want from launchpad.
ex. sudo apt-get install dd rescue-gui.
and
Just grape the name and add into

sudo apt-get install --download-app-name/name


Game Console Emulators (Nintendo, Super Nintendo, Sega Genesis, Nintendo 64, Gameboy...) What gaming console emulators are available in the latest 11.10 version.

If my english is wrong about gaming console emulator I am referring to Nintendo, Super Nintendo, Sega Genesis, Gameboy and others in that genre. What emulators are available to be able to play Rom games for this gaming consoles.

In the repository there are emulators for lots of different game consoles.

DGen  (Sega Genesis/MegaDrive).
FCE Ultra  (Nintendo 8-bit emulator).
FCEUX  (Another Nintendo 8-bit emulator).
MAME  (Multiple Arcade Machine Emulator).
Mupen64plus  (Nintendo 64 emulator).
PCSX  (PlayStation emulator).
PCSX-Reloaded  (Another PlayStation emulator, fork of pscx).
ZSNES  (Super Nintendo emulator)
VisualBoyAdvance  (Gameboy Advance emulator)
DeSmuME  (Nintendo DS emulator)
gngb  (Game Boy Color emulator)
Yabause  (Sega Saturn emulator)

There are also other emulators and compatibility layers for computers and systems, such as Wine , DOS, Amiga , Atari, Commodore .

there is a great emulator on raspberry pi. it is called retro pie and you can get games from most of the systems here, except from the ds and ps2.
if you have a raspberry pi you just have to go on the web page and follow the steps provided and download the emulator station. Here you can download games from most platforms.


Booting multiple Ubuntu's in a system I having Ubuntu 11.10, Windows7 and Windows8 installed for now.

I also want to install UbuntuStudio.
I have tried installing it into a separate partition.

But, that did not load.

Only the Ubuntu 11.10(with WindowsLoader[windows7 & windows8]) loads.
The newly installed UbuntuStudio(based on Ubuntu 12.04) doesn't load up. The installation went successful.
How am I supposed to load that also?

Run sudo update-grub in Ubuntu and it should find and add ubuntustudio to the menu.

Also 11.10 reaches end of life in a few weeks, so you should upgrade.

That depends on how many (primary) partitions you already have.

AFAIK only 4 primary partitions or 3 primary partitions and 1 extended partition, which can be subdivided into multiple logical partitions, are possible to be created on any hard drive. Many operating systems need to be running on an active primary partition to be bootable.

So if you already have 3 operating systems (probably on 3 primary partitions) and maybe one SWAP or data partition, you cannot create an additional primary partition (see Wikipedia for more information).

Nevertheless you actually don't need to seperately install Ubuntu Studio, as all the additional packages are available though the official packet sources. You can find a list of the packages here.


Lost WiFi when loaded into my HP Laptop I have loaded Ubuntu/Linux 14.04LTS onto my HP Laptop. I did a dual boot with Windows 8.1. Using Windows I have a WiFi connection. When I shut down and reboot into the Ubuntu/Linux I then loose my entire WiFi connection. When I go to the Network Icon in the Linux I only get a dialog box showing that I can only connect using a Ethernet cable.
I have tried to manually enter my ISP and WEP key and still can not connect.
Did I miss out on something when installing the OS. The drivers seem to be missing.
I am also a complete novice to computing and really don't know how to enter any code or where to enter code if it needs it.
I would appreciate any information that someone could provide. I see lots of people posting a similar problem but I don't see the correct fix.
Thank you,
Ted

I had the same problem with an HP laptop, I was able to connect via network cable and download the solution following the instructions on this page, works great now! Hope this helps!
12.04 (Precise Pangolin) - 14.04 (Trusty Tahr)

Open a Terminal and if you haven't already done so, update your package list:

sudo apt-get update

If you have a b43 card use the command

sudo apt-get install firmware-b43-installer

or, if you need the b43legacy driver, use:

sudo apt-get install firmware-b43legacy-installer

or, (12.04 - 12.10) if you need a LP-PHY version (e.g BCM4312), use:

sudo apt-get install firmware-b43-lpphy-installer

Restart the computer


What are the differences between different releases of Ubuntu? For example, what is the difference between Ubuntu 11.10 and 12.04 LTS? What are some major/minor changes between the two versions?

I'd recommend consulting the release notes page which can be found here:

http://www.ubuntu.com/getubuntu/releasenotes

I think the main difference is in support and stability. Ubuntu 12.04 is more stable than Ubuntu 11.04 and 11.10 because it received several bug fix. Ubuntu 12.04 is a Long Term Support (LTS) release (until 2017-04) but Ubuntu 11.04 and 11.10 support is finished soon (2012-10 and 2013-04)


Will Ubuntu be ok after formatting windows 7? I currently have two partitions on one hard drive. Windows 7 is installed on partition C, and Ubuntu is installed on partition D.

I wish to format the Windows Partition and replace windows 7 with windows 8.1.
Ubuntu wasn't installed with Wubi.

Will Ubuntu be ok ?

Windows would rewrite MBR and purge grub from this drive sector, but don't worry - you can upgrade your Windows almost safe. Be sure you can run Ubuntu in recovery mode.

Here you have a guide how to do that: Recovering Ubuntu After Installing Windows

If you are sure about that your Ubuntu driver will be protected its own format like "ext4", you can uninstall or delete Win7. But you may face an error about bios autoloader. I mean you can't see your Ubuntu while pc is starting but you can edit settings in Windows typing in cmd , msconfig code. You can edit your startup time to e.g. 15 seconds and select Ubuntu when you want to be crazy in Ubuntu :-)

Sum : I am sure you will have no problem uninstalling Win7 from your computer.


Accents in no english languages (greek, spanish...) in ubuntu 14.04 and wine (or similar) (e.g. MSOffice) I have installed ubuntu 14.04 and in this version I have a problem. It is that when I write a vocal with accent (e.g. a + ´ = á) nothing is written. nothing is nothing (no a without accent or ´a)
I have report this error in codewaeavers (Crossover):

Hello
I'm using Crossover 12.5.1 and ubuntu 14.04, and I have installed MSOffice 2010.
When I write accents (e.g. é) nothing is written in the text. Nothing is nothing (e + ' = no string).
I used Crossover in ubuntu 13.10 and I didn't have problems. but in this versions, (in two different ubuntu installations) I have it.
Which can be the problem?
Thanks
EDIT: My last attempt has been with a empty ubuntu

And I have seen other persons with the same problem link
Does anybody knows a solution or if is the problem being solved?
Thanks

A solution has been posted in codeweavers, it is disable IBUS on system configuration.  Set the default input method from System Settings >> Language Support >> Default input method.

NOTE: You need restart the pc

Install (with apt-get) and use lxkeymap command.


Keyboard shortcuts not working in Ubuntu 17.10 with Unity After I installed Ubuntu 17.10 and installed Unity instead of Gnome keyboard shortcuts stopped working. For example I cannot launch terminal with Ctrl+Alt+T or change language using keyboard. It is interesting that simple shortcuts, which involve only one modifier key (like Alt+F4) work and the same applies not only to the OS but to the applications as well.

The volume keys and other special keys on the keyboard are not working as well.

I ran into this issue too with an update to Ubuntu 17.10 and switch to Unity.

To get Ctrl+Alt+T to spawn a gnome-terminal I started ccsm and went to the "Commands" item in the "General" section entering /usr/bin/gnome-terminal in "Command line 0" under the "Commands" tab and set Ctrl+Alt+T for "Run command 0" under the "Key Bindings" tab. The "Commands" item also needs to be enabled with the tick mark.

In unity-control-center under "Keyboard" and "Shortcuts" tab the "Launch terminal" in the "Launchers" section now displays "Disabled".

I resolved it by reinstalling Ubuntu. It is for sure not the best solution, but I found no other option. It was too annoying for me.

Maybe I damaged some packages while switching from Gnome to Unity and trying to remove Gnome, and that caused issues with shortcuts.


Is there a command to list all users? Also to add, delete, modify users, in the terminal? I need a command to list all users as well as commands to add, delete and modify users from terminal - any commands that could help in administrating user accounts easily by terminal.

To list

To list all local users you can use:

cut -d: -f1 /etc/passwd

To list all users capable of authenticating (in some way), including non-local, see this reply.

Some more useful user-management commands (also limited to local users):

To add

To add a new user you can use:

sudo adduser new_username

or:

sudo useradd new_username

See also: What is the difference between adduser and useradd?

To remove/delete

To remove/delete a user, first you can use:

sudo userdel username

Then you may want to delete the home directory for the deleted user account :

sudo rm -r /home/username

Please use with caution the above command!

To modify

To modify the username of a user:

usermod -l new_username old_username

To change the password for a user:

sudo passwd username

To change the shell for a user:

sudo chsh username

To change the details for a user (for example real name):

sudo chfn username

To add a user to the sudo group:

adduser username sudo

or

usermod -aG sudo username

And, of course, see also: man adduser, man useradd, man userdel... and so on.

The first answer recommends:

cut -d: -f1 /etc/passwd

But using this and counting number of users you get:

$ cut -d: -f1 /etc/passwd | wc -l
46

46 users for a laptop computer are a lot!. So use this instead:

$ cat /etc/passwd | grep -vE '(/bin/false|/sbin/nologin|/bin/sync)' | cut -d: -f1
root
rick
guest-atkb2q
guest-u4sf2i
guest-rmlbtg
guest-mz53vp

To remove guest accounts (who don't have saved files anyway) use:

$ cat /etc/passwd | grep -vE '(/bin/false|/sbin/nologin|/bin/sync|guest-)' | cut -d: -f1
root
rick

Some sample users removed from the listing are:

systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
sync:x:4:65534:sync:/bin:/bin/sync
guest-atkb2q:x:999:999:Guest:/tmp/guest-atkb2q:/bin/bash

It turns out most of the users on a single user system are actually programs that have set themselves up as users.