What command do I need to unzip/extract a .tar.gz file? I received a huge .tar.gz file from a client that contains about 800 mb of image files (when uncompressed.) Our hosting company's ftp is seriously slow, so extracting all the files locally and sending them up via ftp isn't practical. I was able to ftp the .tar.gz file to our hosting site, but when I ssh into my directory and try using unzip, it gives me this error:

[esthers@clients locations]$ unzip community_images.tar.gz
Archive:  community_images.tar.gz
  End-of-central-directory signature not found.  Either this file is not a zipfile, or it constitutes one disk of a multi-part archive.  In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
note:  community_images.tar.gz may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of community_images.tar.gz or community_images.tar.gz.zip, and cannot find community_images.tar.gz.ZIP, period.

What command do I need to use to extract all the files in a .tar.gz file?

Type man tar for more information, but this command should do the trick:

tar -xvzf community_images.tar.gz

Also, to extract in a specific directory

for eg. to extract the archive into a custom my_images directory .

tar -xvzf community_images.tar.gz -C my_images

To explain a little further, tar collected all the files into one package, community_images.tar. The gzip program applied compression, hence the gz extension. So the command does a couple things:

f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
z: tells tar to decompress the archive using gzip
x: tar can collect files or extract them. x does the latter.
v: makes tar talk a lot. Verbose output shows you all the files being extracted.
C: means change to directory DIR. In our example, DIR is my_images.

You could do this too in first step:

  gunzip community_images.tar.gz

Then you have the file: community_images.tar

Second step would be:

  tar -xvf community_images.tar

And the *.tar file would be extracted.


How to remove medibuntu repository and packages? I followed directions to add medibuntu but it has messed up some codecs and dependencies so I can no longer watch videos

I have run this command, originated by a forum post:

sean@sean-P55-USB3:~$ sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

How do I reverse this?

Just as a warning, I have not tested these commands, but I cannot see how they could fail. If they did fail, please let me know and I'll update the answer.

Run these commands in a terminal:

sudo apt-get purge medibuntu-keyring
sudo rm /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update

Notice that this will only disable the repository! If you want to remove the packages you installed from that repository, you can use this command:

PKGS=$(dpkg -l | awk '{print $2}' | grep -e aacgain -e aacplusenc -e acroread-fonts -e alsa-firmware -e app-install-data-medibuntu -e apport-hooks-medibuntu -e hot-babe -e ices -e libavcodec-extra-53 -e libavdevice-extra-53 -e libav-extra-dbg -e libavfilter-extra-2 -e libavformat-extra-53 -e libavutil-extra-51 -e libdvdcss2 -e libdvdcss-dev -e libpostproc-extra-52 -e libswscale-extra-2 -e medibuntu-keyring -e mencoder -e mplayer-dbg -e mplayer-doc -e mplayer-gui -e mplayer -e non-free-codecs -e rmconverter -e w32codecs -e w64codecs | tr '\n' ' '); sudo apt-get purge $PKGS

Hope this helps!

Open Software sources

Under the other tab find the Medibuntu source. Click Edit simply to see the source link. Then click cancel.

Install ppa-purge sudo apt-get install ppa-purge

Then run sudo ppa-purge ppa:repository-name/subdirectory

It will remove all packages installed through the ppa, put the standard versions if any and disable the ppa.


How do I install/run PISKEL after it was downloaded? I downloaded a program called Piskel and I can't figure out how to activate it.

I am trying to make a game on Linux Ubuntu and struggling immensely. I needed sprites for the game and they would help me visualize what was happening while testing and such. I looked around online and found a pixel art program called Pixel...

I had seen the program before but didn't think anything of it. When I decided to test it out, and watch a few online videos on how it worked, I fell in love. Unfortunately, I won't always have access to the online version. I sought a downloadable version and discovered they had one for Linux computers!

I clicked download, downloaded it as a ".zip" file, extracted the files and now I don't know what to do.

For the record, yes. I did try to download the Windows version and use Wine but it kept getting an error.

How do I run it and is there a step I'm missing? If so, what is it?

Running it is straightforward.

Double click the downloaded zip file and unzip the package to your home directory. This will create a directory Piskel-0.11.0-64bits.
Open a terminal (CTRL + ALT + T).
Entercd Piskel-0.11.0-64bits.
Enter ./piskel.

The Piskel window appears.
Unfortunately, this program does not follow application standards so there is no easy way to add this to your launcher.

You need to tell the operating system where to look for the piskel command. In this case, that is the current directory, indicated by .. So the command ./piskel means "look in the current directory and execute the program piskel located there".

just create a script .sh on folder of you have decompress Piskel

for example:

/home/myname/myprogs/Piskel.0.1.0/

create your .sh here with this code :

#!/bin/bash
cd ${0%/*}
`./piskel`

now you can move folder, if you change version just copy paste the .sh
You can easily create a shortcut now!


Firefox crashes after nvidia and cuda update on 14.04 I recently added CUDA to my laptop to be able to develop some parallel code I want. All went smooth and I managed to run the CUDA tests/samples with no problem. My computer seems to work fine apart from a big issue. Whenever I use Firefox to open a page it gets instantly very slow and in a matter of seconds my computer freezes. This happens even with pages like facebook and youtube which I expected to be working flawlessly.

I had nvidia 340.29 installed with cuda and then downgraded to 331 and now to 304.117 to see if the problem is fixed but no luck. Do you have anything to propose?

Thanks for your time.

I finally did a clean install of ubuntu 14 and just changed to Chrome and everything seems to work ok now with only chrome getting a bit slow when flash is on a webpage.


Unable to use autohide launcher in 12.10 I upgraded Ubuntu from 12.04 to 12.10. Everything went well but the launcher does not show when I move the mouse cursor on it.

My computer is HP Pavillion p6582l, Core i5, 4GB of RAM, Nvidia GeForce GF315 3D graphic card.

Please tell me how to fix this problem.

Solved adding

Option     "ConstrainCursor" "no"

to Section "Device" of xorg.conf (if xorg.conf is not present, create it with "nvidia settings") as described here.

go to compiz settings manager if not installed do it via synaptic or sudo apt-get install compizconfig-settings-manager. Run it and search for  ubuntu unity plugin check if itis enabled

Find experimental title.

Then change value in launcher reveal preassure

.Also you can run unity --replace or  setsid unity in terminal to restart it.
See if it works. ps
how to reset unity if something went wrong
https://www.youtube.com/watch?v=hwFG9XpdYEg


Apple magic track pad not working with 12.04.01 I have just now finished installing Ubuntu 12.04.01 (Bye-bye Windows...). I am trying to get Apple magic track pad working with it. I have read several similar questions but no one answered my problem.

I believe bluetooth is detecting the trackpad image below

I tried toggling the Connection button but it again comes back to "OFF". I also tried resetting trackpad by pressing the power button.

Please suggest.

I had to uninstall and reinstall bluez bluetooth package and it is working fine now.


Slash ("/") in Thinkpad T420 ABNT keyboard I have a Lenovo Thinkpad T420 with a Brazilian ABNT keyboard layout. This is a rather unique layout where the slash is between the context menu key and the arrow keys.

However, the slash key does not work! How could I make it work?

You can change the system-wide keyboard configuration (including TTY), by running:

sudo dpkg-reconfigure keyboard-configuration

as described in this SO answer.

To choose the thinkpadz60 layout shown in @brandizzi's answer, select the "IBM ThinkPad Z60m/Z60t/Z61m/Z61t" layout in the list. It should be above the "Generic PC" layout:

EDIT: Also works on Debian

I have the same Lenovo notebook with the BR ABNT keyboard. I was able to fix the slash key for text terminals.

Go to /usr/share/kbd/keymaps/i386/qwerty.
Copy the original map br-abnt2.map.gz to a temp directory.
Decompress the file and rename it to br-thinkpad.map (example, you can use any name you like).
Edit the file br-thinkpad.map with a text editor.
Insert the following line:

keycode  97 = slash question degree

I inserted the line respecting the order of the other keycodes in the file.
Save the file.
Compress the file with gzip br-thinkpad.map.
Copy the compressed file to /usr/share/kbd/keymaps/i386/qwerty.
Test the file with the command loadkeys br-thinkpad.
To make the change permanent edit /etc/sysconfig/keyboard, changing the value of KEYTABLE to br-thinkpad.map.gz.


How do I change my monitor's resolution when working in a virtual terminal? When using a virtual terminal with an external monitor, I would like to set the resolution to the monitors optimal resolution, but I'm not sure how.  Does anyone know how I would go about doing this?

run hwinfo --framebuffer

and you will get a short or long list depending on what video card you have. The list will look something like this:

Mode 0x0335: 320×240 (+640), 16 bits
Mode 0x0336: 320×240 (+1280), 24 bits
Mode 0x033d: 640×400 (+1280), 16 bits
Mode 0x033e: 640×400 (+2560), 24 bits
Mode 0x0345: 1600×1200 (+1600), 8 bits
Mode 0x0346: 1600×1200 (+3200), 16 bits
Mode 0x0347: 1400×1050 (+1400), 8 bits
Mode 0x0348: 1400×1050 (+2800), 16 bits
Mode 0x0349: 1400×1050 (+5600), 24 bits

Then you take the Hex value to the right, for example 0x0346 and you write it down.

edit /etc/default/grub

the line that has ="quiet", make it "quiet vga=0x0346"

then you have to run> sudo update-grub

reboot the machine

After you set up your virtual environment, you will need to install some specific hardware. If you are virtualizing a windows environment there should be an icon in the system tray on, bottom right.

Under linux, I'm not sure where it would show up but you should see those as well.

Without the extra install, you won't be able to get the full screen.


scp keeps on asking permission why? I am trying to do both upload / download file into my server using ubuntu command lines but somehow it keeps on giving me permission denies.
I have tried using -F and -i both doesn't work.

I tried something like

sudo scp -v /path/to/my/file/ ubuntu@ip-xx-xxx-xxx-xx:~/path/to/where/upload
sudo scp -v -i ~/.s/path/to/my/file/ ubuntu@ip-xx-xxx-xxx-xx:~/path/to/where/upload
sudo scp -v -F ~/.ssh/xxx.pem /path/to/my/file/ ubuntu@ip-xx-xxx-xxx-xx:~/path/to/where/upload

the above is just trying to upload.  Same for download too but of course reversed the order but didn't work too. For download, I used terminal to log into the server already and used something like this but in reverse sudo scp -v /path/to/my/file/ ubuntu@ip-xx-xxx-xxx-xx:~/path/to/where/upload

EDIT:

Getting errors like such and also, I tried using touch and able to make files without a problem too

debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:QgAQzu59hpmTEGkNnOdEeflCYVImcwLLU3qQD7foqbE
debug1: Host 'ip-xxx-xx-xx-xx' is known and matches the ECDSA host key.
debug1: Found key in /home/ubuntu/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ubuntu/.ssh/id_rsa
debug1: Trying private key: /home/ubuntu/.ssh/id_dsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ecdsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

The relevant messages are here:

debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ubuntu/.ssh/id_rsa
debug1: Trying private key: /home/ubuntu/.ssh/id_dsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ecdsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

The SSH server (the other computer) you're connecting to only accepts public key authentication (rather than some other method like entering a password), and none of your public keys on the SSH client (the computer you're at) have been added to ~/.ssh/authorized_keys on the SSH server. To fix that:

Log onto the SSH server as the user ubuntu
Copy the contents of the SSH client's ~/.ssh/id_rsa.pub file (or one of the other .pub files in ~/.ssh) into the SSH server's ~/.ssh/authorized_keys file
Try connecting to the SSH server by running ssh ubuntu@whatever on the SSH client

Your publickey might not work anymore. Try deleting the ECDSA key fingerprint.

You can find it in your /home/user/.ssh/known_hosts file on your desktop computer (note .ssh is an hidden folder and you have to select View -> Show Hidden Files from the file manager's menu).
I normally delete the file even if there are multiple keys in the file.

ssh ServerUsername@xxx.xxx.xxx.xxx into your server and you will be asked to accept a new ECDSA key fingerprint. Make sure you use your server's username with both the ssh and scp commands. Finally the server's user should have right access to the folder on your server you copy the files into.


Have to restart lightdm when opening laptop lid after 14.04 upgrade I've just upgraded to 14.04.

Whenever I shut the laptop lid and come back to it later, after entering the password the screen just goes blank and requires ctrl+alt+f2-ing to a terminal to restart lightdm in order to get everything back working again.

I can't see anything obvious in the lightdm logs. I've deleted ~/.Xauthority as per the answer to a similar question to no avail.

Any ideas?

Unfortunately this appears to be a bug in 14.04 release which prevents light locker from bringing the screen back up after a suspend when closing the lid.

In order to get your UI back up you will need to go to a text terminal ctrl+alt+f1, login and run

service lightdm restart

Unfortunately this will log you out and you will loose unsaved work.

To stop this happening in future, uninstall light-locker and light-locker-settings and make sure xscreensaver is installed.

sudo apt-get remove light-locker light-locker-extensions
sudo apt-get install xscreensaver

I hope this helps. Hopefully this sill be fixed properly soon as there is a launchpad bug opened on it:
https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1303736

If you are booting windows 7 and ubuntu 16.04 LTS I had same problem then I tried everything referred from sites. Finally nothing worked for me.
So one thing worked for me.

Do not choose the default Ubuntu OS.
Click on advanced option for Ubuntu
Choose the OS option like "Ubuntu 16.04 .....(Systemed)"

This will boot your ubuntu os normally. and it works for me also it saves your time to everytime restart lightdm service.


How to better allocate diskspace in a VM? I tried searching but with the terms I used I couldn't find anything similar.

I'm running Ubuntu server in multiple VMs on my Proxmox machine. I frequently run into this issue on my VMs and I don't understand enough to figure out why...

When I make new VMs I usually use the default Proxmox disk size of 32 GB which I figure will be PLENTY for running some small docker apps. I install Ubuntu Server with defaults but on LVM. Somehow my VMs keep filling up though. I even have a VM right now running 18.04 that can't update because the / partition is full and there isn't anything running on the server. I installed plex for some testing but it has no library or anything.

So when I do a DF it shows that the root is only 3.9GB. For some reason there are 3 other partitions that look like temp, swap or something. My DF is pasted below. Is there a setting I need to change during install to stop so much of my disk from being wasted?

udev                               7.9G     0  7.9G   0% /dev
tmpfs                              1.6G  9.0M  1.6G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  3.9G  3.9G     0 100% /
tmpfs                              7.9G  4.0K  7.9G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/loop0                          90M   90M     0 100% /snap/core/7713
/dev/loop1                          89M   89M     0 100% /snap/core/7396
/dev/vda2                          976M  222M  688M  25% /boot
tmpfs                              1.6G     0  1.6G   0% /run/user/1000

Adding parted output. Disk shows as 43GB here because I was going to expand it.

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 4295MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  4295MB  4295MB  ext4

Model: Virtio Block Device (virtblk)
Disk /dev/vda: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  1076MB  1074MB  ext4
 3      1076MB  42.9GB  41.9GB

I think I found my own answer. It seems that even though I selected "Use An Entire Disk And Setup LVM" it didn't use the entire disk. It set 4G to the root partition and leaves the rest as unused. Seems like a strange default when I tell it to use the entire disk.

I couldn't copy and paste the text since this is through Proxmox VNC in a browser.

https://i.imgur.com/RE3V71U.jpg

The answer is that the remainder of your virtual disk is allocated to LVM, but the volume group has empty unused space not allocated to filesystems. You need to either extend the root logical volume (lvextend -r -l +100%FREE ubuntu-vg/ubuntu-lv) or create file systems to mount underneath / (/var, /home, etc.) with lvcreate.


Keyboard layout related issue - fixed in GUI but receive error in terminal I run on Ubuntu 14.04. I have an issue related to the keyboard layout in GUI mode. I managed to fix it in the GUI by using:
setxkbmap -layout us [1]
and adding it to the ~/.bashrc. That works fine. However, the problem I have now is that when I login to the text-mode terminal I receive an error - Cannot display "default display". This is not surprising because this command does not work in text mode.

The question is: where should I put [1] and have no error in text mode terminal?

Issue is solved. Added script to ~/.bashrc:

if [ "$TERM" = "xterm" ]; then
setxkbmap -layout "us"
fi


apt-get update high cpu http process I also asked this question here.

When I do apt-get update, it keeps on updating. I stopped the process at 22 Gb - I just canceled it... Any idea about what to do?

ot sure if related, but HTTP process is running 2x and getting at 70% cpu per process... System gets all sluggish. Using cpulimit I can limit it to only 10% or so. Removed webmin because i thought the python from that was the cause.. not sure now.

Get:42 hxxp://nl.archive.ubuntu.com vivid/multiverse amd64 Packages [134 kB]
Get:43 hxxp://nl.archive.ubuntu.com vivid/main i386 Packages [1361 kB]
Get:44 hxxp://nl.archive.ubuntu.com vivid/restricted i386 Packages [15,5 kB]
Get:45 hxxp://nl.archive.ubuntu.com vivid/universe i386 Packages [6486 kB]
Get:46 hxxp://nl.archive.ubuntu.com vivid/multiverse i386 Packages [134 kB]
Get:47 hxxp://nl.archive.ubuntu.com vivid/main Translation-en [793 kB]
Get:48 hxxp://nl.archive.ubuntu.com vivid/multiverse Translation-en [103 kB]
Get:49 hxxp://nl.archive.ubuntu.com vivid/restricted Translation-en [4228 B]
Get:50 hxxp://nl.archive.ubuntu.com vivid/universe Translation-en [4456 kB]
Get:51 hxxp://nl.archive.ubuntu.com vivid-updates/main Sources [52,7 kB]
Get:52 hxxp://nl.archive.ubuntu.com vivid-updates/restricted Sources [28 B]
Get:53 hxxp://nl.archive.ubuntu.com vivid-updates/universe Sources [356 B]
Ign hxxp://download.virtualbox.org vivid/contrib Translation-en_US
Ign hxxp://download.virtualbox.org vivid/contrib Translation-en
Ign hxxp://download.virtualbox.org vivid/non-free Translation-en_US
Ign hxxp://download.virtualbox.org vivid/non-free Translation-en
100% [53 Sources 6133 MB/6133 MB 100%] [41 Packages 7834 MB/7834 MB 100%]

I noticed that when running apt-get update, the process start 2x an python3 http process? Which is really CPU consuming ~70% per process.

You could delete the soures.list file, and then push setting and then the update icon, and then hatch the upper chranoical, and then reload and it might work fine this way


Unable to sync PGP keys seahorse Ok so I tried for the first time to use PGP keys for email encryption in Evolution. I followed some instructions online, created a key, but coz I encountered some problems I decided to delete the key and restart the proces. (This fact is probably irrelevant, because I got similar errors when doing it.)
Now I have no key and I go to Remote: Sync and publish keys. Firstly it says that there are 6 keys selected for synchronisation. Why? I do have some passwords saved in here, will it sync those too??
And last, when I click sync I first get two errors:

Couldn't retrieve keys from server: pool.sks-keyservers.net
Couldn't communicate with server 'pool.sks-keyservers.net': Internal Server Error

and

Couldn't retrieve keys from server: keyserver.ubuntu.com:11371
Couldn't communicate with server 'keyserver.ubuntu.com:11371': Internal Server Error

Than the progress stops and no progress is made, it just says:

Synchronising keys... Exporting data

Any help?

I had the same problem. I fixed it by:

Remove all existing keyservers from the Sync box (by default hkp://keyserver.ubuntu.com:11371, hkp://pool.sks-keyservers.net, and ldap://keyserver.pgp.com).
Add them over again (keeping the same settings).
Press Sync.

Don't know why this works, but it does.

Try this solution from ubuntuforums. http://ubuntuforums.org/showthread.php?t=1726418

gpg --gen-key --enable-dsa2

Hope this helps!


Virtualbox won't start because of "retpoline" After the 'retpoline' fix for spectre was added to the kernel, Virtualbox would not start. You could rebuild the driver, but it wouldn't install because of the "version magic" mismatch. Had to drop back to a previous kernel (112) to run Virtualbox.

Running Ubuntu 14.04 LTS on a System76 Kudu.

Answer migrated from the question:

  Solved this by installing gcc-7:

sudo apt-get install gcc-7

  Then (probably not correctly) I created symbolic links to the 7 versions of gcc, gcc-ar, gcc-nm, and gcc-ranlib in /usr/bin.

  After verifying that gcc --version reported that it's version 7, I ran the following to recompile and install the vboxdrv module:

sudo /etc/init.d/vboxdrv setup

  And, viola!, it works.

I had the same issue on Ubuntu 14.04.05 LTS with kernel 3.13.0-153.

Used update-alternatives instead of manual symlink changes - seems to be a more correct way for adding/selecting compiler version.
Still need an additional step to build vboxdrv as build failed due to missing compiler-gcc7.h.

Workaround: copy compiler-gcc5.h to compiler-gcc7.h in /usr/src/linux-headers-3.13.0-153/include/linux/
and create appropriate symlink in /usr/src/linux-headers-3.13.0-153-generic/include/linux/.


How to increase brightness in smaller steps? Is there a way to adjust lighting step ? I have Lenovo L520, and Fn + Light Up or Down adjusts by 20%, how can I adjust the step to 10% ? it will help me fine tune lighting at my dark room.

Install xbacklight by opening a terminal with Ctrl+Alt+T shortcut and type this:

sudo apt-get install xbacklight

then after installation, type these commands in terminal:

xbacklight = 10
xbacklight = 20
xbacklight = 5

this may help.

Hold down Ctrl while increasing/decreasing the brightness. Increases in steps of 1.


Dual boot with two separate Ubuntu installation on two separate hard drives on the same physical machine I have one physical machine and two hard drives. In the beginning, I've installed an Ubuntu 16.04 LTS on each of them (without having the other hard drive attached). Everything works fine as long as I'm attaching one hard drive at a time. But now, I want to setup a dual-boot grub so that I can choose between different hard drives/installations with both hard drives attached.

I've tried update-grub and grub-install /dev/sdb but it didn't work. It actually detects and adds the other Ubuntu drives installation on the grub menu, but when I choose it, a blank screen with a blinking cursor appears (it also ruins the other drive's grub).

Any guides would be appreciated.

I would recommend rEFInd:

https://www.rodsbooks.com/refind/

Trying to use two different GUID's can be complicated, because you have to manually edit and configure grub.


problem with ubuntu 14.04 videos I have both ubuntu 14.04 and windows 7 installed on my computer. ubuntu videos worked fine after the installation.

However, after I booted windows, it check the disk for errors. Now I boot ubuntu again, video did not work properly. Each time I drag the slider, it crashes. I tried VLC. Same problem. Any suggestion? Thanks

I noticed that when I had only 2 partitions, one for Windows and one for Linux, and had all my Movies/Music/etc. on the windows partition, the Windows Check Disk would render those files unplayable in Linux.

My solution  was to make THREE partitions, the first one for Windows, the one in the middle as a shared NTFS drive that both Windows and Linux can access, and the last partition on the drive I put Linux onto.

Having all these partitions means that when you boot to windows and it checks the disk for errors, windows will check only it's own partition, leaving the rest alone. With all the movies/etc. on another partition, they are left alone.

Hope this helps!


VLC on Ubuntu won't resize window to video VLC on Mac and Windows works beautifully. Press Alt/Ctrl/Command+1/2/3/4, and you get a bigger or smaller WINDOW, perfectly containing the video.

In Ubuntu, you resize (not zoom, as VLC wrongly calls it), the window remains huge with black space filling the whole screen.

I have played with "Resize interface to video size" which resizes neither the window, nor the interface when checked, as well as Prefs > Video > Window Properties > Video Auto Scaling. No dice.

Desired behavior, and what happens on VLC on Mac and Windows: window always resizes to the video, and video always resizes the window. This is intuitive, and should be the default. For example, once you're dragging a corner of a window around to resize it, the video inside  scales. Why it doesn't scale when you Ctrl+1 it to tiny, but does scale when you drag it manually down to same tiny dimensions makes no sense. I'm not sure it's even possible to get this behavior on Ubuntu.

Also, window and video size("zoom") should both persist when looping. This happens in Windows/Mac, but not Ubuntu, where it's as if it's opening the video for the first time when it loops, making it huge or tiny. One video, it will always do this resizing every few seconds.

Alt+1/2/3/4 is working just fine on my system. I am using Ubuntu 16.10.
Try reinstalling it. In the terminal type:

sudo apt-get remove vlc

sudo apt-get install vlc

Alternatively, so the same using Ubuntu Software Center.


Can't start some apps, problem might have to do with ttf fonts I'm on a fresh install of x86 14.04, having trouble starting some applications, and the problem apparently has something to do with ttf fonts.

When I start a few apps, for example roguelike game dungeon crawl stone soup, installed from the software center, I get:

ERROR: Could not find font '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf

I tried a few other apps, what happens is they just show a black screen for a second and then I go back to desktop, and the error reporter starts.

If I start them from the terminal, I can see what the error is, it's not identical for every app, but mostly it shows "could not find a .ttf" or, "a .ttf does not exist".

I checked, I have restricted extras and the actual fonts installed.
Tried changing the permissions on the actual files and folders themselves,
even changed the ownership of usr to myself, but the error persists.

I can't check whether or not the live system has the problem on this machine right now.

Thanks in advance.

The solution is simple:

sudo apt-get install --reinstall fonts-dejavu and fonts-dejavu-core

After that:

sudo cp /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf

It might be necessary to repeat the copy process for all the fonts in the family:

/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf

Just use this for Dungeon Crawl in Ubuntu 14.04 x64:

sudo apt-get install ttf-dejavu-core


Unable to install ubuntu 15.10 on MSI GL62 I can't install ubuntu 15.10 at MSI GL62 6QD. Any options (install or try without install), as checking this disk makes the laptop freeze after two lines of Nouveau driver are shown.

I've checked the iso and it is fine (coincidence of md5).

I've also disabled every advanced option at BIOS configuration, and it freezes at the same time always.

The laptop is provided with a 950M Nvidia chipset.

Is there any possible solution?

Edit: I've also tried to install Xubuntu 15.10, which shows this output:

Edit 2: I've installed Linux Mint Rosa with Cinamon which is based in Ubuntu 14.04, but I'm still interested in Ubuntu 15.10.

I am referring to this answer from my other answers. I had a login loop issue as mentioned here. It seems you are also encountering login loop issue due to nvidia drivers issue.

First uninstall the currently installed NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl + Alt  + F1. Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl + Alt  + F1. Enter your user name and the password, then execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 sudo reboot

Note : Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS.

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions.

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs

Got the same problem on my lenovo y700 ideapad. I needed a distro with a newer kernelversion so i tried the new ubuntu 16.04 lts you can find the daily build and newest version here http://cdimage.ubuntu.com/daily-live/current/

Give it a try ! :)


create several users in samba I have 100 users. So i need to create a samba folder for each user to access to personal folders with individual username and password.

I will create them with the following format (in smb.conf samba version 4.7.6-Ubuntu)

[finance]
comment = finance PC
path = /home/user/finance
writeable = yes
browseable = no
read only = no
create mask = 0774
directory mask = 0777
valid users = finance
admin users = finance2018

[secretary1]
comment = secretary1 PC
path = /home/user/secretary1
writeable = yes
browseable = no
read only = no
create mask = 0774
directory mask = 0777
valid users = secretary1
admin users = secretary11976

The problem is that I have 100 users (for each PC). Then I must create 100 linux users, 100 users for samba (with 100 passwords) and 100 individual folders.

Is there any way to make this task easier?

In theory unlimited. The hardware is your limit.
Samba supports a [homes] setting. See chapter 9 in the manual.

[homes]
    browsable = no
    writable = yes

  The [homes] share is a special section of the Samba configuration file. If a user attempts to connect to an ordinary share
  that doesn't appear in the smb.conf file (such as specifying it with a
  UNC in Windows Explorer), Samba will search for a [homes] share. If
  one exists, the incoming share name is assumed to be a username and is
  queried as such in the password database ( /etc/passwd or equivalent)
  file of the Samba server. If it appears, Samba assumes the client is a
  Unix user trying to connect to his home directory.

That is likely to be the easiest to manage method for lots of users.

We have a users group (GID 100) you can use to group those users and apply settings to that group.

But the more obvious way would be to use active directory if you have that. Setup almost totally on the Windows side and not on the server.

Mind the part in bold.

A simple bash script: (read man seq)

#!/bin/bash
for i in $( seq 1 100 ) ; do  printf "%s\n" "[user$i]
comment = user$i
path = /home/user/user$i
writeable = yes
browseable = no
read only = no
create mask = 0774
directory mask = 0777
valid users = user$i
admin users = user12018
"
done


Dell Vostro 1510 WiFi Problem I have an old laptop,Dell Vostro 1510. I needed to install Kubuntu 14.04.3 on it. It doesn't recognize the wireless.
I entered:

lspci -nn | grep 0280

in a terminal, as @chili555 suggested in question 547746 right here in ask ubuntu, and the outcome is:

0c:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)

Kubuntu 14.04 recognized wireless while live.
I know there are some questions exactly about this on www.askubuntu.com but none have reached an end.
Thank you

You need to connect to internet by wire and run

sudo apt-get install firmware-b43-installer

Open source drivers have some issues with this card. The official drivers should work.
Download the binary file from here. It must be one of the first two depending on your architecture.
After download,

tar -xvf /path/to/archive
make
make install

This should work.


Is there an GUI Designer for python? Is there a GUI IDE for programming python just like java has netbeans?

I wanted one where we could drag & drop test boxes & labels just as we do in swing components using netbeans or eclipse.

Or is there an add-on present in either netbeans or eclipse itself?

Glade

If you want a wysiwyg GUI designer, Glade is your best bet:

first, install glade from the software centre
create your GUI, save it as, say, myapp.glade

Go to the signals tab and set up your callback, such as on_window1_destroy
In your python program, tell GTK to load the UI definitions

import gtk

class MyApp (object):

    def __init__(self):
        self.builder = gtk.Builder()
        self.builder.add_from_file("myapp.glade")
        self.builder.connect_signals(self)

    def run(self):
        self.builder.get_object("window1").show_all()
        gtk.main()

    def on_window1_destroy(self, *args):
        gtk.main_quit()

MyApp().run()

After getting everything set up, you can dive straight into the Glade tutorial (as Jeremy Kerr mentioned in his answer). Start by learning about the different lay–out options and signals.

Quickly

When you feel comfortable with glade, you can start using it via Quickly, which is a set of programs to make the common tasks in developing software very easy. It takes care of translations, storing configuration, packaging, launchpad integration including PPAs, and lots more:

sudo apt-get install quickly
quickly create ubuntu-application hello-world
cd hello-world/

Quickly now creates a huge project with everything you need already set up. A gui, the translation files, configuration via desktopcouch, and so on.

You'll see quickly sets up a few windows (the main App, configuration, and an about dialogue) for you. To start editing your GUI:

run quickly design

To get to the app's code, run quickly edit
Go to the HelloWorldWindow.py file
Now start adding signal handlers and logic.

Finally, to run your application, type quickly run.

At this point, you can get into the PyGTK documentation in order to learn about the signals, their handlers' signatures, the different widgets' methods and so on.

 PyGTK 2.0 Reference Manual
 PyGObject Reference Manual
Quickly Widgets (not required)

See also, some related questions:

What IDE to use for Python?
Best Visual-Studio Like tool for Linux Development
Creating GUI with Python in Linux
What is a good text editor for developing code on?

Best Python IDE ever is PyCharm. But it not free and it does not have GUI designer.
http://www.jetbrains.com/pycharm/index.html


Which Ubuntu version to use on a MAXDATA laptop Eco 3100X ? with this system info Possible Duplicate:
  Ubuntu on 256MB RAM

i am speaking as new ubuntu user, i just have installed ubuntu 10.04 on my laptop, but is running very slow...

So i am here to ask you a question: WHich ubuntu version can fit for my laptop MAXDATA Eco 3100x, .

And the screen freezes sometimes, i did install the lubuntu and xubuntu extention, still problem.. MAybe is a the video driver not configured as it should, i had the same issue with windows xp, but i installed the vga video drivers of it then it was ok. But on Ubuntu this driver i could not installed, what to do?

My Laptop System Information are:

SYSTEM INFORMATION
    Running Ubuntu Linux, the Ubuntu 10.04 (lucid) release.
    GNOME: 2.30.2 (Ubuntu 2010-06-25)
    Kernel version: 2.6.32-40-generic (#87-Ubuntu SMP Mon Mar 5 20:26:31 UTC 2012)
    GCC: 4.4.3 (i486-linux-gnu)
    Xorg: unknown (25 February 2012  06:59:39AM) (25 February 2012  06:59:39AM)
    Hostname: lotus-laptop
    Uptime: 0 days 1 h 6 min

CPU INFORMATION
    GenuineIntel, Intel(R) Pentium(R) 4 CPU 2.40GHz
    Number of CPUs: 1
    CPU clock currently at 2390.561 MHz with 512 KB cache
    Numbering: family(15) model(2) stepping(7)
    Bogomips: 4781.12
    Flags: fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts cid

MEMORY INFORMATION
    Total memory: 228 MB
    Total swap: 455 MB

STORAGE INFORMATION
    SCSI device -  scsi0
        Vendor:  ATA
        Model:  IBM-DJSA-210
    SCSI device -  scsi1
        Vendor:  TOSHIBA
        Model:  DVD-ROM SD-C2502

HARDWARE INFORMATION
MOTHERBOARD
    Host bridge
        Silicon Integrated Systems [SiS] 650/M650 Host (rev 11)
    PCI bridge(s)
        Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
        Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
    USB controller(s)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10)
        Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20)
    ISA bridge
        Silicon Integrated Systems [SiS] SiS962 [MuTIOL Media IO] (rev 04)
    IDE interface
        Silicon Integrated Systems [SiS] 5513 [IDE] (prog-if 80 [Master])
        Subsystem: Silicon Integrated Systems [SiS] 5513 [IDE]

GRAPHIC CARD
    VGA controller
        Silicon Integrated Systems [SiS] 65x/M650/740 PCI/AGP VGA Display Adapter
        Subsystem: Uniwill Computer Corp Device 5103

SOUND CARD
    Multimedia controller
        Silicon Integrated Systems [SiS] AC'97 Sound Controller (rev a0)
        Subsystem: Uniwill Computer Corp Device 5203

NETWORK
    Ethernet controller
        Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
        Subsystem: Uniwill Computer Corp Device 5002
    Modem
        Silicon Integrated Systems [SiS] AC'97 Modem Controller (rev a0)
        Subsystem: Uniwill Computer Corp Device 4003

Thanks you asap.
:-)
E

If Ubuntu is slow then you probably need to change your settings.  Right click somewhere on the desktop and select "Background."  Next click the "Visual Setting Tab" and check "None."  If you need games and applications which run on a slower machine then I would recommend dotdeb.com, those games work great on my laptop and are some of the least resource intensive I've seen.


How can I edit/create new launcher items in Unity by hand? Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.

For some programs I use, I have to make custom launchers or .desktop files.

For instance, daily blender builds are generally just folders with an executable.

In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.

Updated: 2015-Dec

For Ubuntu 15.10 or 14.04 LTS (11.10 or later, with Unity (3D))

NOTE: This can replace the function of an existing icon, or (once created) can be searched for (from Dash icon) to add to current button-bar.

First make your OWN copy of any of the .desktop files you want to modify.  It is MUCH safer, and then you can always delete and start over.

    (list all files)

    ls /usr/share/applications/*.desktop

Example:  Mozilla Firefox, firefox.desktop

    (do this once, or after deleting any failed attempt)

    cp /usr/share/applications/firefox.desktop ~/.local/share/applications

Then carefully change any wording, or add additional options.

    (edit the file)

    gedit ~/.local/share/applications/firefox.desktop &

Note: The ampersand '&' releases the command line immediately.

My own 'firefox.desktop' file:

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Name[es]=Navegador web Firefox
Name[fr]=Navigateur Web Firefox
Name[it]=Firefox Browser Web
Name[nl]=Firefox webbrowser
Comment=Browse the World Wide Web
Comment[de]=Im Internet surfen
Comment[es]=Navegue por la web
Comment[fr]=Naviguer sur le Web
Comment[it]=Esplora il web
Comment[nl]=Verken het internet
GenericName=Web Browser
GenericName[es]=Navegador web
GenericName[fr]=Navigateur Web
GenericName[it]=Browser web
GenericName[nl]=Webbrowser
Keywords=Internet;WWW;Browser;Web;Explorer
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
Keywords[es]=Explorador;Internet;WWW
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;NewSafeMode;ProfileManager;

[Desktop Action NewWindow]
Name=Open a New Window
Name[de]=Ein neues Fenster öffnen
Name[es]=Abrir una ventana nueva
Name[fr]=Ouvrir une nouvelle fenêtre
Name[it]=Apri una nuova finestra
Name[nl]=Nieuw venster openen
Exec=firefox -new-window
OnlyShowIn=Unity;

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Name[de]=Ein neues privates Fenster öffnen
Name[es]=Abrir una ventana privada nueva
Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée
Name[it]=Apri una nuova finestra anonima
Exec=firefox --private-window
OnlyShowIn=Unity;

[Desktop Action NewSafeMode]
Name=Open in Safe Mode
Exec=firefox --safe-mode
OnlyShowIn=Unity;

[Desktop Action ProfileManager]
Name=Open Profile Manager
Exec=firefox --ProfileManager
OnlyShowIn=Unity;

My own 'libreoffice-startcenter.desktop' file:

[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-main
Type=Application
Categories=Office;
Exec=libreoffice %U
# MimeType=application/vnd.openofficeorg.extension;
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;

Name=LibreOffice
Name[pt_BR]=BrOffice
GenericName=Office
GenericName[de]=Büroanwendungen
GenericName[en]=Office
GenericName[es]=Oficina
GenericName[fr]=Bureautique
GenericName[it]=Office
Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
Comment[de]=Die zum offenen und standardisierten ODF-Format kompatible Sammlung von Büroanwendungen. Unterstützt durch »The Document Foundation«.
Comment[en]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
Comment[es]=Suite de productividad para la oficina compatible con ODF, el formato de documentos abierto y estandarizado. Con el soporte de la Document Foundation.
Comment[fr]=Suite bureautique compatible avec le format de document standard et ouvert ODF. Soutenue par The Document Foundation.
Comment[it]=La suite di produttività compatibile con il formato standard e aperto dei documenti ODF. Supportata dalla The Document Foundation.

X-Ayatana-Desktop-Shortcuts=Writer;Calc;Draw;Impress;Math;

[Writer Shortcut Group]
Name=Writer
Exec=libreoffice --writer %U
TargetEnvironment=Unity

[Calc Shortcut Group]
Name=Calc
Exec=libreoffice -calc %U
TargetEnvironment=Unity

[Draw Shortcut Group]
Name=Draw
Exec=libreoffice -draw %U
TargetEnvironment=Unity

[Impress Shortcut Group]
Name=Impress
Exec=libreoffice -impress %U
TargetEnvironment=Unity

[Math Shortcut Group]
Name=Math
Exec=libreoffice -math %U
TargetEnvironment=Unity

A multi-tool icon 'toolbox.desktop' file:

[Desktop Entry]
Name=Ubuntu Toolbox
Comment=System Settings
Exec=unity-control-center --overview
Icon=redhat-tools
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;
OnlyShowIn=Unity;
Keywords=Preferences;Settings;
X-Ubuntu-Gettext-Domain=unity-control-center

X-Ayatana-Desktop-Shortcuts=GnomeTerminal;SoftwareCenter;SoftwareUpdates;

[GnomeTerminal Shortcut Group]
Name=Gnome Terminal
Exec=gnome-terminal
TargetEnvironment=Unity

[SoftwareCenter Shortcut Group]
Name=Ubuntu Software Center
Exec=software-center
TargetEnvironment=Unity

[SoftwareUpdates Shortcut Group]
Name=Update Manager
Exec=update-manager -c
TargetEnvironment=Unity

Here are some of my earlier efforts.

If you cannot find the .desktop anywhere else:

also look at /var/lib/snapd/desktop/applications/

suppose you are looking for the app Eclipse. Then run
(find / |grep clipse|grep desktop$) 2>/dev/null

Here I omitted the first letter of the app intentionally,
as this command is case sensitive (and indeed after locating it, the file was named eclipse.desktop)


Cannot restart, reboot, nor shutdown Ubuntu 11.04 I cannot restart, reboot or shut-down my PC using Natty.
Whenever I hit shut-down, restart or in terminal sudo reboot it shows a black screen.
If I should press down the power button for while, it is forced off.

Ctrl+Alt+Backspace will kill the X-server and bring you back to the log-on screen. You should be able to dismiss the session there using the shut-down / log-off / restart button.

If that fails to render the satisfaction of shutting down the machine then Ctrl+Alt+F1 which puts you directly into the shell-propmt.

sudo shutdown -h now

or to reboot Ctrl+Alt+Del

you could try pressing the power button for awhile.

or try the following key combo.

ctrl+alt then press the following keys in following order (while keeping hold of ctrl+alt) prtscn reisou


What's a good way to run a virtual copy of Ubuntu on Windows 7? I have a mathematical program that runs on 64 bit Ubuntu. I need to run it on my Windows 7 workstation, preferably without having to install Ubuntu instead of Windows, because this is a short term need. Is there a way I could run 64-bit Ubuntu as a virtual machine on my Windows 7 box?

You can download VirtualBox to run a virtual copy of Ubuntu.

Download a disk image of the Ubuntu 64-bit install CD here. Then open VirtualBox and create a new machine with the disk image as the start up disk.

I use this to run Ubuntu on Windows 7 every day and it works very well.

This really isn't an Ubuntu specific question, but you need to install Cygwin inside your Windows 7 session. Cygwin is a Linux emulator. You can then run your Linux executable from within your Cygwin session.

http://www.cygwin.com/install.html


Problem with Ubuntu Phone SDK demo app I have installed the Ubuntu phone SDK on a VirtualBox VM running Ubuntu Precise (12.04.2 LTS) as the guest OS.
The "guest extensions" have been installed.
The guest OS kernel is 32 bit 3.2.0-37 without PAE.

I followed the installation instructions for the SDK on http://developer.ubuntu.com, and the installation seemed to go smoothly.
However, when I attempt to run the demo "Currency Converter" app, qmlscene reports many errors with the form:

OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x8db7f98

ultimately followed by the message:

Unrecognized OpenGL version

A black box pops up, but nothing is drawn within it.   Does anyone know what might be causing this problem?

simply disable the 3d graphic accelaration in the virtualbox vm settings and it will work.
Put both off 3d and 2d accelaration

As far as I can see on the page of the currency converter app you need Ubuntu 12.10 instead of 12.04 (which I think is quite awkward btw).

I would start with upgrading to 12.10 and then try again..

Good luck!

ps. I am also starting to look into developing an app for the Ubuntu Phone.


Dual monitor - Desktop falls off the screen slightly I have a dual monitor setup where I have placed a 1280x1024 resolution monitor to the left and a 1920x1080 resolution monitor to the right. Internally it looks like Ubuntu (14.04) changes the total resolution to 3200x1080. So because I have placed the smaller monitor left, where the desktop's icons are oriented towards, the icons fall slightly off the screen. The 56 extra pixels ubuntu created at the bottom of my smaller monitor are filled with content, which obviously isn't visible. I have set "Scale all window contents to match" to the smaller monitor, but that didn't change much. Actually changing that setting doesn't change anything visibly or at least that I could see. So how do I go about changing how ubuntu handles this? Or should I always keep the bigger monitor (in height) to the left as a rule of thumb?

Added screenshot for clarity. For example file11 falls off the screen now.

I am having the same problem with multi-monitors and right-click "organize desktop by name".

Some of the icons go off the visible screen and I have to ctrl-A to bring them back into view.

There might be a way to adjust this using your monitor rather than through the OS.

Some monitors have built in "auto-adjust picture" functionality; otherwise, if you just click on the menu button on your monitor, and navigate around, there is probably a way to manually adjust the x-y position of the image.


Installing libboost-python-dev for python3 without installing python2.7 I am trying to install boost bindings for python3 on Ubuntu Xenial, but it pulls in whole python2.7 dependency tree. I do not want or need python2.7 on my system (Docker image). Is there a way to install only python3 bindings?

I have resolved to compiling and installing boost myself (I also installed/compiled Python 3.6 myself.). I have in my Dockerfile now:

# We have to compile it ourselves against the custom Python and cannot use Debian package.
# Includes a symlink workaround for: https://svn.boost.org/trac10/ticket/11120
RUN cd /usr/src && \
 wget --no-verbose https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz && \
 tar xzf boost_1_65_1.tar.gz && \
 cd boost_1_65_1 && \
 ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 && \
 ./bootstrap.sh --with-python=$(which python3) && \
 ./b2 install && \
 rm /usr/local/include/python3.6 && \
 ldconfig && \
 cd / && rm -rf /usr/src/*

I can offer two solutions, one is to build a Python:3.6 image from scratch. Here python3.x becomes the de-facto choice.

Also, another option which worked for me (in Mac OSX) was:

brew install boost-python --with-python3 --without-python


NVIDIA card disappeares after some time I have a laptop Dell 7720 with nvidia 650m discrete card. After installing ubuntu 14.04 it seemed to work fine. I downloaded nvidia current driver, changed to it in additional drivers and in nvidia x server. It worked. Then i switched back to intel graphics and after some time i discovered that i cant switch back. Simply because ubuntu doest detect my card anymore.

root@Inspiron-7720:/etc/X11# lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

It was the first time. So i though mb the problem was in my BIOS so installed windows, updated it and installed ubuntu again. And it worked again. But now after just few hours it's gone. By the way there is no xorg.conf in /etc/X11/ and i've never configured it.
Any suggestions?
Thanks.

Strange things happen :) I found a topic on one forum (guy encountered almost the same problem, but his video card did appear in lspci) and i copied code for xorg.conf from there:

Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    BusID "PCI:02:00:0"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
#

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

Put it in my /etc/X11/xorg.conf , but ubuntu got freezed after first reboot. But after the second one it did boot and recognized my card..somehow. Although there is no xorg.conf in /etc/X11/ now.

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1)

Now i've installed nvidia-346 and nvidia-prime as @Pilot6 suggested and will see if it will work.
I have no idea what happened. If someone knows, please tell me.

This happens when you get a kernel update. The NVIDIA driver, modifies the kernel when it installs. Later, you accept kernel updates, and the older kernel with the NVIDIA modules is no longer in use.

Its probably a good idea to update your kernel periodically, just keep in mind that any previously installed kernel modules will not be present in the updated kernel. You can always reinstall. Or you could not do kernel updates.
Or, you could boot to your older kernel with the modules you previously installed.


Package system is broken (Ubuntu 12.04) Keep trying to update Ubuntu 12.04 but it keeps telling me that my package system is broken. I run apt-get -f install and get this :

    owner@MyLaptop:~$ sudo apt-get -f install
[sudo] password for owner:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  thunderbird-globalmenu linux-headers-3.5.0-34-generic
  linux-headers-3.5.0-32-generic compiz-plugins compiz-plugins-main
  python-compizconfig python-central linux-headers-3.5.0-23
  linux-headers-3.5.0-32 linux-headers-3.5.0-34 linux-headers-3.5.0-23-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  indicator-session
The following packages will be upgraded:
  indicator-session
1 upgraded, 0 newly installed, 0 to remove and 399 not upgraded.
4 not fully installed or removed.
Need to get 0 B/75.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 12465 package 'indicator-session':
 `Depends' field, reference to `libcairo2':
 `>' is obsolete, use `>=' or `>>' instead
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 12465 package 'indicator-session':
 `Depends' field, reference to `libcairo2':
 version value starts with non-alphanumeric, suggest adding a space
dpkg: error: parsing file '/var/lib/dpkg/status' near line 12465 package 'indicator-session':
 `Depends' field, reference to `libcairo2': version contains ` '
E: Sub-process /usr/bin/dpkg returned an error code (2)

The details I get from the update manager are:

    The following packages have unmet dependencies:

indicator-session: Depends: libc6 (>= 2.3.6-6~) but 2.15-0ubuntu10.10 is installed
                   Depends: libcairo2 (>= } 1.2.4) but 1.10.2-6.1ubuntu3 is installed
                   Depends: libdbus-glib-1-2 (>= 0.78) but 0.98-1ubuntu1.1 is installed
                   Depends: libdbusmenu-glib4 (>= 0.4.2) but 0.6.2-0ubuntu0.1 is installed
                   Depends: libdbusmenu-gtk3-4 (>= 0.4.2) but 0.6.2-0ubuntu0.1 is installed
                   Depends: libgdk-pixbuf2.0-0 (>= 2.22.0) but 2.26.1-1 is installed
                   Depends: libglib2.0-0 (>= 2.26.0) but 2.32.3-0ubuntu1 is installed
                   Depends: libgtk-3-0 (>= 3.0.0) but 3.4.2-0ubuntu0.7 is installed
                   Depends: libgudev-1.0-0 (>= 147) but 1:175-0ubuntu9.3 is installed
                   Depends: libpango1.0-0 (>= 1.14.0) but 1.30.0-0ubuntu3.1 is installed

Any help will be appreciated, Thanks.

EDIT: This is what I get when I run apt-cache policy indicator-session:

    indicator-session:
  Installed: 0.3.96-0ubuntu1
  Candidate: 0.3.96-0ubuntu1
  Version table:
     0.3.96-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
 *** 0.3.96-0ubuntu1 0
        100 /var/lib/dpkg/status

sudo apt-get clean
it will clean the repository
or
you dpkg is installing another package in Ubuntu software center or in another terminal. or you break any package during installing.
check that and run
sudo apt-get update


Wifi network Connection detection takes too long time in Ubuntu 12.10 Internet connection detection in my Wifi network (Using Desktop Computer ) takes too long time, after upgrading from Ubuntu 12.04 to 12.10.

I have only basic knowledge in ubuntu.So please help me by providing step by step explanations to establish a quicker network connection?

Update the System.

 sudo apt-get update

After this command try whether your wifi working or not. If not means do the following

Then you have to remove the bcmwl kernel source:

 sudo apt-get remove bcmwl-kernel-source

Then again install :

 sudo apt-get install bcmwl-kernel-source


How to download torrents with long filenames? There is a known problem with transmission: it can't download torrents with filenames longer than 255 bytes. What are the workarounds?

I am here not to solve the problem, but to offer an alternative.

If you are not determined to use Transmission by any means, you might want to use Vuze. I invite you to download it and give it a try: sudo apt-get install vuze

You shouldn't try to download the link, because it's not supported by your file system.
Right click on magnet link, then 'copy link'.
Open transmission -> file -> Open URL, then paste.
Voila!


Drag-drop not working for Ubuntu 20.04 LTS on VMware® Workstation 15 Pro I've installed Ubuntu 20.04 LTS on VMware® Workstation 15 Pro Version 15.5.2 build-15785246. The problem is that the drag and drop feature (From the host (Windows 10) to the guest (Ubuntu) on the VMware) doesn't work. I've tries the following two methods, but no success!

Method (1):

sudo apt-get autoremove open-vm-tools
Install VMware Tools by following the usual method (Virtual Machine --> Reinstall VMware Tools)
Reboot the VM
sudo apt-get install open-vm-tools
sudo apt-get install open-vm-tools-desktop
Reboot the VM

Method (2):

Go into VM / Settings / Options / Guest Isolation
Uncheck both checkboxes (Enable drag and drop, Enable copy and paste) and click OK.
Shut down the guest, and shut down VMware Workstation
Reboot the host computer
Run VMware Workstation but do not launch the guest yet.
Go into VM / Settings / Options / Guest Isolation for the guest, and
CHECK both checkboxes
Power On the guest.

Any idea how to solve the issue, please?

Enter the following command in terminal to enable drag and drop between virtual machines and the host.

gsettings set org.gnome.nautilus.preferences use-experimental-views false

Do the following to enable drag and drop between two virtual machines:

Open the virtual machine settings editor (VM > Settings), click the Options tab and select Guest isolation.
Select Disable drag and drop to and from this virtual machine to disable the feature. Deselect it to enable the feature.

Just had this same problem where copy and paste stopped working with Workstation Pro 15.5.7 on Win 10 with Ubuntu 20.04 guest. Was working fine until both guest and host had some updates so hard to tell what caused it.  The simple fix was a variation from method 2 from this answer.

Shut down the guest
Go into VM / Settings / Options / Guest Isolation
Uncheck both checkboxes (Enable drag and drop, Enable copy and paste) and click OK.
Note: that it is not possible to uncheck these boxes unless the VM is stopped
Shut down VMware Workstation
Start VMware Workstation.
Note: there was no need to reboot host
For the VM in question, go into VM / Settings / Options / Guest Isolation
Check both checkboxes (Enable drag and drop, Enable copy and paste) and click OK
Start the guest VM

Copy and paste now works again in both directions.


Install fails - 'unable to install GRUB in /dev/sda' problem I have a Lenovo S series running Windows 8.1 (pre-installed). I downloaded Ubuntu 15.04 onto a USB stick and followed the instructions as outlined in the Quick Install From USB docs.

Secure Boot is disabled.

I can successfully boot into Ubuntu and begin the installation process. Around 80% of the way through I get the fatal error:

unable to install GRUB in /dev/sda

I've been through many of the other posts here on this issue, but cannot find a solution that seems to work in my situation. I have tried the 'Try without installing' option, and attempting to install after booting to desktop, but I get the same problem.

As far as I can tell, the issue is with the partition that is being attempted to install to.

Update: Boot Info here: http://paste.ubuntu.com/12447125/

Is anyone able to offer any advice on what might be causing this, or how I should choose/prepare a partition in order to install successfully?

Thanks

First, disable Fast Startup in Windows. This feature is a good way to cause filesystem corruption (my nickname for it is "Fast Filesystem Corruption"), which in turn can cause any number of problems, including an inability to install GRUB -- precisely the symptom you're seeing.

After you've disabled Fast Startup, you can try running Boot Repair or re-install Ubuntu. With any luck, disabling Fast Startup will enable either of these procedures to work, but I can't make any promises about that.

If you disable Fast Startup but can't seem to get GRUB installed, another option is to try my rEFInd boot manager. You can try it risk-free by preparing a USB flash drive or CD-R with the appropriate version (see the downloads page for links). You should then be able to boot from the appropriate medium, which should let you boot either Windows or Ubuntu. If you can boot both OSes, you can install rEFInd via the PPA or Debian package to get it on your hard disk. One big caveat is that if there's filesystem damage that's preventing GRUB from installing, the same problem is likely to affect rEFInd. OTOH, it could be a bug in the GRUB installation script that's not shared by the rEFInd installation script, so rEFInd might work around such problems. If nothing else, using rEFInd on a USB drive or CD-R might be a useful temporary stopgap to get you into your regular Ubuntu installation. From there you'd need to do more detailed analysis to figure out what's causing the boot loader problems, but at least you'd have a way to boot.

You are having problems with windows 8.1 secure boot. Try disabling UEFI following this tutorial. And then install Ubuntu.


Thinkpad Edge E330 refuses to boot from USB after installing Ubuntu Before I installed Ubuntu my Thinkpad edge bios allowed me to specify boot devices, their order etc. Now it only says Ubuntu in the boot device list. I am thinking this has to do something with UEFI but I am not sure what to do exactly. I tried every sensible combination of BIOS settings but nothing helps. Maybe someone had a similar issue.

This is clearly a firmware (what manufacturers and most people call a "BIOS," although it's not) bug. I recommend you go to your manufacturer's site and look for an update.

If that fails, my only suggestion is to use a third-party boot manager that will provide its own way to boot an external medium. My own rEFInd should do this, although in some cases you'll need to hit the Esc key to re-scan for bootable devices after it's booted.

Edit: It occurred to me after making the original post that disabling any "fast startup" type options in the firmware might also resolve the problem. Sometimes these options prevent the firmware from detecting a removable USB flash drive, so if such an option was accidentally enabled, it could cause the symptoms you're seeing.

For everybody having this problem then I finally fixed it by going into BIOS and reset it to default settings. Then I was able to boot up the computer with something else than Ubuntu.


Ubuntu screen flickering I have installed  ubuntu 20.04 on my laptop specification are intel i3 6th gen with intel graphics card 520,screen resolution 1366×768.
when i lock desktop to temporarily turn off the screen but when i press power button to wakeup the screen my screen flickers continuously,
this issue occurs only when locking the desktop or when screen goes off automatically.
I had same issue with ubuntu 18.04 version and kali linux.
But when i downgrade ubuntu to 16.04 it was running fine and same with kali linux when i installed slightly older version of kali linux it was also running fine.
I am having this issue with only newer versions of ubuntu and kali linux.
I have tried solution of
1)reducing screen size
2)installing older kernels

And also when i installed ubuntu 20.04 on my friends laptop it was also running fine in his laptop,
specs are i5 8th gen nvidia graphics card,screen resolution 1920×1080

I also had the same problem with a fresh install of Ubuntu 20.04 on my desktop with Intel Corporation UHD Graphics 630 graphic card and 2 Iiyama North America 27'' screens (see the attached image to have a feeling of the flickering I was experiencing).
My problem has been solved simply (thanks to Daniel Van Vugt, https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1883534) by using Wayland display server on the logging screen: click your profile > click the white weel in lower right corner > choose 'Ubuntu on Wayland'.
This change replaces the use of the xorg display server which seems to make a lot of arguing on the web. I have to admit that explaining exactly why this solves the problem is a bit out of my league, but I let this to other linux experts in the community. You can also find deeper technical explanations of xorg/wayland by following these links:
Why is Wayland better?
https://www.secjuice.com/wayland-vs-xorg/

Now save the file. Open your file manager with root privilege (sudo -i nautilus for Ubuntu). Paste the file in /etc/X11/xorg.conf.d Create the requisite folders if they don’t exist. Restart the system after it’s done.
If you experience issues like pixelated graphics, corrupt text, etc. after this, replace the word sna with uxa within the text.
This method worked like a charm


Scroll on touch pad is not working, Lenovo G50 I use Ubuntu 14.04 LTS 64 bit on my Lenovo laptop and scroll is not working on the touchpad.

When I try to look at it in settings, there is no Touchpad panel at all. (I guess it recognizes my Touchpad as a mouse.)

I tried to follow the following solution but it says that there is no dkms command. So I am kind of desperate, can you please help?

Thx Fabby for the comment, that solves my problem with dkms but touchpad still was not working.
I just was able to solve it by installing Gpointing Device Settings from Ubuntu Software Center and enable scrolling on touchpad from there.

Same thing happened to me.
You just have to install dkms:

sudo apt install dkms


Unity shell not starting after upgrade from 12.10 to 13.04 I upgraded from 12.10 to 13.04 last night, and unity won't start up for me now.  When I log in, I don't see the 'dash', just the desktop with some icons on it.

I'm running on a lenovo T430 without a dedicated graphics card, so no propritary drivers installed.  The 'unity_support_test' command shows everything is good.

I've tried some of the advice I've found on here such as doing:

dconf reset -f /org/compiz/
unity --reset-icons &disown

But it doesn't help.   If I use ccsm and turn off the 'Enable Ubuntu Unity Plugin' then run 'unity' from a terminal, it starts up, and I get window decorations on the terminal I started.   with the unity plugin enabled if I start unity in a terminal I get a segmentation fault right after the lines:

compiz (core) - Info: Starting plugin: workarounds
compiz (core) - Info: Loading plugin: unityshell
compiz (core) - Info: Starting plugin: unityshell

If I log in with a guest account I get similar behaviour, so I don't think it's a user setting of some kind.

Any advice?  I know I could go with gnome or xfce or something, but I'd rather not go down that road if I didn't have to.

I had this problem too, don't worry I found out a trick to get it off the base ubuntu drivers.

First when GRUB opens go into Ubuntu somenumbershere... (Advanced) and go into recovery mode. Next you will see a DOS-like window with a few options. Press the down arrow a few times until you get to a option with a name like 'Start in graphics safe mode'. Restart and go into ubuntu. If it starts up correctely you should see your fully-loaded ubuntu desktop. From there you can choose another driver your for integrated graphics and get out of graphics-safe mode :)

I had to guess on some parts as im not in front of ubuntu right now, post any questions.


Run a Bash script to set up iptables at startup I'm using Ubuntu 16.04 Server.

I want to use a Bash script for iptables at startup, but I dont wanna use crontab or init.d. Is there any possible way to achieve this without them?

#!/bin/bash
IPT="/sbin/iptables"
$IPT --flush
$IPT --delete-chain
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -P OUTPUT ACCEPT
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT*

If you do not want to install additional software, one possible workaround that works on Ubuntu 16.04 is to create two scripts one which will save the Iptables current configuration and one which will restore it. These scripts must be placed in (or sim-linked to) /etc/network/if-post-down.d/ and /etc/network/if-pre-up.d/. Also must be executable files and must not have any extensions, like .sh. Here is how these scripts look on my system:

$ cat /etc/network/if-post-down.d/iptables-save
#!/bin/sh
/sbin/iptables-save > /root/iptables-current-state.dat
exit 0

$ cat /etc/network/if-pre-up.d/iptables-restore
#!/bin/sh
/sbin/iptables-restore < /root/iptables-current-state.dat
exit 0

You can add the startup script to Ubuntu startup applications. There are detailed instructions here (https://help.ubuntu.com/stable/ubuntu-help/startup-applications.html.en). Remember you make your script executable before you add it to the startup applications.


What is the proper way to patch Wine for a custom PPA? I've been manually applying patches to Wine for use on my own machine, but I want to put it in a PPA for my friends and relations.

Currently I follow this procedure:

Get the latest source from an upstream PPA via apt-get source
Use patch to apply my unofficial, unsupported patches.
Create a package using dpkg-buildpackage -rfakeroot -uc -b

This is fine for creating a package that will run on my local machine. However I now want to distribute this custom build to others via a PPA.

Is this procedure sufficient, or is there a more correct and/or easier to maintain procedure I should be following specifically for Wine?

You're pretty close with your example steps, but here's what I'd suggest:

Grab the sources with apt-get source wine and cd into the new directory
Find what sort of patch system the wine package is based on: what-patch; in this case, it tells us we that the wine package uses quilt for patch management
Since we're using quilt, add your custom patch(es) to the quilt series: QUILT_PATCHES=debian/patches quilt import <your-patchfile.patch>If you have multiple patches, do this for each patch, in the order that you want them applied.
Add a suitable entry to the debian/changelog file - you'll need to alter the version number to ensure that your PPA version is differentiated from the official version. Typically, you should increment the last version number, and add a tilde (~) followed by your custom version string (eg ~jbowtie1). The dch -i command can help with this too.
Build the source package:debuild -S
Upload your source package to the PPA build system: dput ppa:<your-ppa> ../wine*.changesThe <your-ppa> parameter is specified on the launchpad page for the PPA you want to upload it to (you'll have to create this beforehand).

It's usually a good idea to do a test build before doing the dput - the pbuilder command allows you to recreate what the PPA build system would do with your package (ie, start from a clean install, add required deps, then build).

In this case you would have to set up pbuilder first (see https://wiki.ubuntu.com/PbuilderHowto), then do this before the dput:

sudo pbuilder build ../*.dsc

From the winehq website:

Open the Software Sources menu by going to System->Administration->Software Sources. Then select the Third Party Software tab and click Add.

Then, copy and paste the line below.

ppa:ubuntu-wine/ppa

Then run sudo apt-get update and after it's done sudo apt-get install wine


How can I install .deb files that look like a sealed box in the file folder to install on my ubuntu 16.04 lts desktop i have successfully downloaded a file, but the file does not open when in the folder, these are all .deb files and the icon is like a sealed box,

The .deb file is an application install package.  The sealed box you see is a visual showing it's a package.

You can install the package by double clicking on it.

When you double click the file, it should bring up the software center and give you a graphical interface with a button to click install.

You can also right click on the icon and choose the install program installer to run.

Alternately you can install a deb package from the commandline with:

$ sudo dpkg -i [packagename.deb]


USB wireless Netgear adapter I have just purchased a new Netgear N600 WIFI USB adapter for my desktop that currently runs ubuntu. I am new to ubuntu and still unfamiliar with it.
If anyone could help me get this set up on my computer I would greatly appreciate it.

$ lsusb
Bus 001 Device 006: ID 0846:9011 NetGear, Inc. WNDA3100v2 802.11abgn [Broadcom BCM4323]

Your Broadcom USB wireless usually works with ndiswrapper. Please obtain a temporary internet connection by ethernet, tethered or whatever means possible and open a terminal and do:

sudo apt-get update
sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9

Now download the files at post #6 here: http://ubuntuforums.org/showthread.php?t=2052594 Drag and drop the file to your desktop so we can find them. Right-click and select 'Extract Here.' Find out if your system is 32- or 64-bit:

arch

Now we install the driver files:

cd ~/Desktop/Broadcom_bcm43xx_USB_32_64bit_v2

If your system is 32-bit (i686), install the 32-bit driver file:

sudo ndiswrapper -i bcmn43xx32.inf

And if it is a 64-bit (x86_64) system:

sudo ndiswrapper -i bcmn43xx64.inf

In either case:

sudo ndiswrapper -ma
sudo depmod -a
sudo modprobe ndiswrapper

Your wireless should now be working.

Having viewed several Internet posts about how to get the Netgear WNDA3100v2  working in Linux, the only way I can make it authenticate with my EnGenius router is to downgrade the security in the router to WPA(TKIP). I decided I wasn't willing to use an obsolete security protocol to use the WNDA3100v2. Hopefully, in the not too distant future, a native Linux driver will be developed for the Broadcom BCM4323 chipset. FYI, I am running Debian with the MATE UI.


Meaning of "netinet" in socket programming What are the meanings of "netinet" and "in" in "#include <netinet/in.h>" ?

"#include <netinet/in.h>

The header file in.h contains constants and structures needed for internet domain addresses."

As quoted at http://www.linuxhowtos.org/C_C++/socket.htm


Reboot a Server from Command Line? How do I reboot a Ubuntu Server from the command line? sudo reboot now never seems to work for me. Because its a server, I don't have a window manager installed, so I can't do it from a GUI (which always seems to work).

I've had the problem for years on different versions of the operating system. It happens in virtual machines and on real metal. The same problem exists with sudo shutdown now, too.

I've lived with it in the past. The difference now is I don't want to just hit the power button because I might lose data.

Try using the following command to safely reboot:

sudo reboot

If, instead, you want to shut down the server safely, use this command:

sudo shutdown -h now

An alternate way:

sudo init 6

[NOTE]:

Without the init program there could be no command interpreter process.


"Authentication required. System policy prevents WiFi scans" in FocalFossa For those of you bothered by the deluge of annoying popups asking to authenticate pretty much every move one makes in Focal Fossa ("System policy prevents this and that" when mucking about in WiFi Settings, "Authentication needed to refresh system repositories" etc.), a partial answer is here: https://c-nergy.be/blog/?p=14051.
Apparently this is due to manually installing the xRDP package in Ubuntu.
Now, if only someone could post the fix for getting rid of network and WiFi-related "Authorization Required" messages, that'd be swell! I am guessing it'd have to be another .pkla file in /etc/polkit-1/localauthority/50-local.d

It would not be recommended to change your network setting while connected through xRDP. If something goes wrong, you will loose your xrdp connection and you will need to logon locally to check your settings.
In practice, yes, you could create a pkla file (under /etc/polkit-1/localauthority/50-local-d)  and populate it with the following info...
[Allow Wifi Scan]
Identity=unix-user:*
Action=org.freedesktop.NetworkManager.wifi.scan;org.freedesktop.NetworkManager.enable-disable-wifi;org.freedesktop.NetworkManager.settings.modify.own;org.freedesktop.NetworkManager.settings.modify.syste>
ResultAny=yes
ResultInactive=yes
ResultActive=yes

As you can see, the pkla file does a little bit more than authorizing Wifi Scans...Please adapt as required
Hope this help
Till next time
See ya


Hard drive error rate I recently installed Ubuntu and am loving it. The only issue that seems to persist is a bit of a (very soft) scratching sound coming from my HDD. I checked my drive manager and it appears to have a high read error rate. Is this a major issue? The software said any value other than 0 "indicates a problem with the disk or the read/write heads."

Here's a quick screenie for reference:

Thanks for any help!

The raw value for the read rate is meaningless, and basically all drives show really big numbers there.  The normalized value of 118 with a threadhold value of 6 indicates that it is a LONG way from being a problem indicator ( it has to get from 118 down to 6, and the worst it has ever been is 99 ).  This is why the assessment column reports that it is ok.

So, there is nothing wrong with this drive, at least based on that value.

I looked at these figures (your disc has a pretty high error-rate) and I really say: this is an issue. If I were you, I would have an eye on that and I would hurry with buying a new external drive and I would do a data-backup as soon as possible.

It cannot be said clearly, how long your internal disc will survive.

Greetings
Andrea


How can I configure a virtual host on Apache? I am trying to create a virtual host on Apache in Ubuntu(in a virtual machine) but I cannot get it. I did a lot of configurations but any of them give me any result so I created a new virtual machine to do it from the begining. I am going to put here all the process step by step so all of you could follow what I am doing wrong.

What I have

VirtualBox
Ubuntu 14.04 (Virtual machine on VirtualBox)
I instaled Apache on Ubuntu (sudo apt-get install apache2)

What I need

When I write the url ejemplo.es on my browser the file that I created on my VirtualHost folder will be displayed and not the page that it is on www.ejemplo.es (that it is not mine).
Use hosts file on /etc folder instead of DNS configuration.

What I tried

First of all: change the root directory of my server

First of all, what I need it is to make my root directory of my server as /var/www/extras so I created this new directory on /var/www.

sudo mkdir /var/www/extras

and create an index.html with some text on it.

After creating the new directory I have to change my 000-default.conf file to change the DocumentRoot directive.

sudo gedit /etc/apache2/sites-available/000-default.conf

and change the DocumentRoot directive as follows:

DocumentRoot /var/www/extras

and after that I restart Apache to save my changes:

sudo /etc/init.d/apache2 restart

and modify the Directory block on apache2.conf file

sudo gedit /etc/apache2/apache2.conf

from <Directory /var/www/html> to <Directory /var/www/extras> and restart Apache again.

Second step: creating the folder and the file from the virtual host I want to create

Inside /var/www/extras directory I am going to create a new folder (ejemplo.es) which is going to be the folder of my virtual host.

sudo mkdir /var/www/extras/ejemplo.es

and inside of it an index.html file as I created for the root directory of my server with the text "This is an example".

After that, if I go to the browser and write localhost/ejemplo.es I can see the content of the file I created in the step before. But what I want it is to access to the same content but typing ejemplo.es instead of localhost/ejemplo.es.

Final step: Configurate the virtual host

I need to create a new file on /etc/apache2/sites-available with the configuration of my virtual host.

sudo gedit /etc/apache2/sites-available/ejemplo.es.conf

with the following configuration:

<VirtualHost 10.0.2.15:80>
    ServerAdmin webmaster@ejemplo.es
    ServerName ejemplo.es
    ServerAlias www.ejemplo.es
    DocumentRoot /var/www/extras/ejemplo.es
</VirtualHost>

and on apache2.conf file I am going to change IncludeOptional sites-enabled/*.conf to Include sites-enabled/*.conf. (This was a prove to see if maybe my Apache did not include this folder and could be the posibility that my VirtualHost did not work for that).

So now I have to activate the VirtualHost I have created:

sudo a2ensite ejemplo.es

and restart Apache to save the changes I made:

sudo /etc/init.d/apache2 restart

If I list the content of the folder /etc/apache2/sites-enabled I can see that my VirtualHost it is active now (ls command to this folder).

To end, I add a new line on my hosts file (sudo gedit /etc/hosts):

10.0.2.15   ejemplo.es

so now the file has three lines with IP's:

127.0.0.1    localhost
127.0.1.1    user
10.0.2.15    ejemplo.es

and some lines below that starts with ff00... but I think they are not relevant for my purpose.

And finally I have to execute the following command to save my last changes:

sudo /etc/init.d/networking restart

but I get the default page of www.ejemplo.es instead the file that I put on my VirtualHost folder.

I am sure I am doing something wrong but cannot figure out where. It is the first time I create one VirtualHost and all tutorials that I have seen had these steps so I think I am missing something.

I expect you could follow my steps and ask if you have some doubt about the configuration that I made.

Thanks in advance!

I wanted to comment on the question for further information but I haven't had enough reputation point, so I just try answer this for you to give us little more information.

I did the same steps as you listed above in my new VM, and it's work fine.

I don't know exactly how you test the above domain, whether browser in your box (ubuntu - client) or in your host (which is running virtualbox).

If you're trying to visit the domain under client-ubuntu, you can add more IP into virtualhost tag:

<VirtualHost ejemplo.es:80 127.0.1.100:80 192.168.1.100:80></VirtualHost>.

Here 127.0.1.100 and 192.168.1.100 are example IPs that all pointing to ejemplo.es.

If you're trying to access from your host with IP 10.0.x.x, it may be not accessible. Especially if you didn't select the right network type for your VM. You can ping the IP first before checking the local domain work. In my case, I select the bridge connection (with copied NAT), so my VM can act just like any other physical device in my network.

Other thing is, if you have your site which is already on-service, and you want a local environment for developing and testing, it's better to use different domain (such as: .local, .dev) instead of using same domain.

Well kind of unclear without seeing all the configs but few things I can say

First check that NamedVirtualHosting is uncommented in the ports.conf file
change the permissions just to be sure under the /var/www/

sudo chown -R www-data.www-data /var/www/*
check if the syntax of the symbolic link in sites-enabled folder is correct or if the symbolic link is broken broken links shows in red
the syntax goes like this 000-default and whatever comes next goes like 001-test or 002-guest
check by

ll /etc/apache2/sites-enabled/*

Check if the syntax of the ejemplo.es.conf is correct

It looks like this. Make sure the directory is mentioned

I hope this helps good luck


How to remove recommended and suggested dependencies of uninstalled packages? I know of How to remove an uninstalled package's dependencies? and I tried

apt-get autoremove

but that does not remove dependencies that are recommended/suggested by other packages.

That is, if I install a package X that recommends Y, but I do not install Y, and then I install package Z that depends on Y. and later I do

apt-get remove --auto-remove Z

then Y is not automatically removed even though nothing depends on it.
(X "picked up" Y, even though it does not depend on it).

If you want to remove recommended packages from your system, even if there are still some installed packages recommending (or suggesting) them, put the following in the file /etc/apt/apt.conf.d/99_norecommends (create it):
APT::Install-Recommends "false";
APT::AutoRemove::RecommendsImportant "false";
APT::AutoRemove::SuggestsImportant "false";

The documentation for these options is here.
Then, the next apt run should remove them all. If it doesn't, launch aptitude, and type g and g again.
This configuration also disables the automatic installation of recommended packages when using apt-get. For aptitude it can be done from the console GUI, menu Options > Preferences > "Install recommended packages automatically" (uncheck it).

Right, if you want to remove package <Z> with dependances just type:

sudo apt-get autoremove --purge <Z>


ubuntu on steam help! Hi i am very new to ubuntu but am getting the hang of it. I need steam for my gaming needs but whenever i type (sudo apt-get install steam -y) it says something like this: package (steam) you have selected no canadate.
And then i try one other method: i have downloaded steam on my computer but have not installed it yet so i can't open the steam program but once i click the valve icon, enter my password and start installing after the white dots in the terminal are all the way to the other side it says: you are missing the following 32bit libraries and steam may not run:libc.so.6. i would appreciate any help and also knowing where to get a  libc.so.6 folder. thanks ahead of time!:)

The simplest way to get steam on the system is to download the .deb file from the valve developer community. You can get the download here.

The best way is to use software center, and search for stream and install it from the software center, and it probably work best this way, or else you need to install wine1.7, and open the downloaded exe file whit wine loader, and to install wine you have to enter this in the terminal:

       sudo add-apt-repository ppa:wine-ubuntu/ppa
       sudo apt-get update
       sudo apt-get install wine1.7 winetricks

and it might work fine this way.


What is LVM and what is it used for? As a Linux/Ubuntu newbie, what is LVM and what is it used for?

In terms of a web server installation, what benefits does it provide?

Would you recommend using it?

Benefits

You can think of LVM as "dynamic partitions", meaning that you can
create/resize/delete LVM "partitions" (they're called "Logical
Volumes" in LVM-speak) from the command line while your Linux system
is running: no need to reboot the system to make the kernel aware of
the newly-created or resized partitions.

Other nice features that LVM "Logical Volumes" provide are:

If you have more than one hard-disk, Logical Volumes can extend
 over more than one disk: i.e., they are not limited by the size of
 one single disk, rather by the total aggregate size.
You can set up "striped"  LVs, so that I/O can be distributed to
 all disks hosting the LV in parallel. (Similar to RAID-0, but a
 bit easier to set-up.)
You can create a (read-only) snapshot of any LV.  You can revert
 the original LV to the snapshot at a later time, or delete the
 snapshot if you no longer need it.  This is handy for server
 backups for instance (you cannot stop all your applications from
 writing, so you create a snapshot and backup the snapshot LV),
 but can also be used to provide a "safety net" before a critical
 system upgrade (clone the root partition, upgrade, revert if
 something went wrong).

While being most useful on server systems, I think that features
1. and 3., combined with LVM's ability to create/resize/delete LVs on
the fly, are quite handy on desktop systems as well.  (Especially if
you experiment a lot with the system.)

Downsides

Of course, all of this comes at a price: the initial setup of LVM is
more complex than just partitioning a disk, and you will definitely
need to understand the LVM terminology and model (Logical Volumes,
Physical Volumes, Volume Groups) before you can start using it.
(Once it is set up, using it is much easier, though.)

Also, if you use LVM across hard drives, you may lose all your data when only one drive fails.

Recommended reading

LVM HOW-TO from The Linux Documentation Project.

What kind of applications or content are you planning to host ? If it is a personal server or something for a small organization, you probably can get by without using LVM.

LVMs are useful if you need partitions etc across multiple disks. I doubt you would need it, given that you're asking here regarding it :)


How to share ethernet over wifi without creating access point? I have company internet with internal IP and proxy settings, I want to share this Ethernet connection over wifi, but creating accesspoint is somehow not working may be due to IP architecture, I want to share connection so that if my mobile use it over wifi, the computer thinks as if a browser on the same computer is accessing the internet (By forwarding or tunneling or something like that).

For now, I can access my vm. so, this maybe contains errors or does not fit your environment.

Click the up & down arrows in right upper side and click "Edit Connections...".
It shows "Network Connections", select "Wireless" tab, and click "add" button.
In "Editing Wireless connection 1", change "Connection name:" as you want.
Change SSID as you want.
Mode must be Ad-hoc.
Click "Wireless Security", select "Security" and "Password"
Finally, connect your device with SSID you made.