nmap in a shell script : some issues I decided to make a shell script for basic nmap scanning so I did it like this :

#!/bin/bash

sudo apt-get install nmap

printf "enter the name of site to do basic scan on >>>"

read NAME

nmap $NAME

echo "Do you wish to do Software Version scan?"
select yn in "Yes" "No"; do
    case $yn in
        Yes ) goto 17; break;;
        No ) exit;;

nmap $NAME -sV

echo "Do you wish to do OS scan?"
select yn in "Yes" "No"; do
    case $yn in
        Yes ) goto 25; break;;
        No ) exit;;

nmap $NAME -O

But the output was :

Nmap done: 1 IP address (1 host up) scanned in 109.97 seconds
Do you wish to do Software Version scan?
./nmap-basic.sh: line 17: syntax error near unexpected token `$NAME'
./nmap-basic.sh: line 17: `nmap $NAME -sV'

Any solutions?

case in bash should end in esac, select should end in done. I don't see those keywords in your script.

select NAME [in WORDS ... ;] do COMMANDS; done
case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac

your shell script has a alot problem, i rewrite that for you.

#!/bin/bash
echo -en "Enter name of website ?"
read name
echo -e "\e[93mScanning...\e[0m"
nmap $name
# software Scan
echo "############################################"
echo "Do you wish to do Software Version scan?"
read ans
    if [ "$ans" = "yes" ] || [ "$ans" = "YES" ]
     then
    echo "############################################"
    echo -e "\e[91m Software Scanning...\e[0m"
    nmap -sV $name
    fi
## OS Scan
echo "Do you wish to do OS scan?"
read ans
    if [ "$ans" = "yes" ] || [ "$ans" = "YES" ]
      then
    echo -e "\e[92m OS Scanning...\e[0m"
    sudo nmap -O $name
     fi
exit 0

in fact you don't need select command because in "no" case you don't have any work to do , and you can use break|continue in loop not in case statement. i added some color to make it beauty.
have fun bro


What Debian version are the different Ubuntu versions based on? I have some software packages customised for Ubuntu 10.04, 10.10 and 12.10, but now I have to install them on Debian Squeeze. I have been unable to Google for a mapping between specific Ubuntu and Debian versions. Can someone here help?

Specifically I want to know which Ubuntu version corresponds to Debian Squeeze.

You can find the Debian version on which your Ubuntu version is based in the file: /etc/debian_version
From 10.04 up to 21.04:
Ubuntu            Debian
21.04  hirsute    bullseye/ sid   - 11
20.10  groovy     bullseye/ sid
20.04  focal      bullseye/ sid
19.10  eoan       buster  / sid   - 10
19.04  disco      buster  / sid
18.10  cosmic     buster  / sid
18.04  bionic     buster  / sid
17.10  artful     stretch / sid   - 9
17.04  zesty      stretch / sid
16.10  yakkety    stretch / sid
16.04  xenial     stretch / sid
15.10  wily       jessie  / sid   - 8
15.04  vivid      jessie  / sid
14.10  utopic     jessie  / sid
14.04  trusty     jessie  / sid
13.10  saucy      wheezy  / sid   - 7
13.04  raring     wheezy  / sid
12.10  quantal    wheezy  / sid
12.04  precise    wheezy  / sid
11.10  oneiric    wheezy  / sid
11.04  natty      squeeze / sid   - 6
10.10  maverick   squeeze / sid
10.04  lucid      squeeze / sid

sid is the development distribution of Debian (sid - testing - stable)
You can find out the contents of the file without installing an entire system by view the sources for the package basefiles on Launchpad.

Unfortunately there is no direct mapping /etc/debian_version as mentioned in Jacob's answer gives a rough idea but it only really reflects one package and said package is a package that is locally modified in Ubuntu so won't be automatically pulled in from Debian.

In particular Ubuntu is often ahead of Debian on core packages like libc6. Trying to install a package built on Ubuntu on a contemporary version of Debian is likely to end up with version errors on libc6.

According to https://superuser.com/questions/407745/wrong-libc6-version-in-debian-squeeze-can-i-go-back Debian squeeze had libc6 2.11 . According to http://web.archive.org/web/20110705212424/http://packages.ubuntu.com/search?keywords=libc6 ubuntu 10.04 lucid also had libc6 2.11 . So the packages for 10.4 lucid are IMO the most likely to work on Squeeze.

Depending on what other libraries your program needs you may well find that a specific build for Debian squeeze is needed.


How do I make an exact recoverable copy of a hard drive? I'm looking to buy a new laptop, which comes with Windows 10 preinstalled.

I'm planning to remove it and install ubuntu right away. But I'm afraid that I might run into any driver issues, so I want to somehow make an exact copy of the whole drive (bit by bit), and in case I do want to return the laptop, I'd be able to recover the drive to the condition I got it from the store with.

How can I do this?

You can first try live without installing or dual booting with ubuntu before deleting windows completely.

Or you can follow the steps below to create a system image backup referenced from this step by step guide.

Steps for creating backup:

Open Control Panel.
Click on System and Security.
Click on Backup and Restore (Windows 7).
On the left pane, click the Create a system image link.
Under "Where do you want to save the backup?" select the On a hard disk option.
Using the "On a hard disk" drop-down menu, select the storage to save the backup.
Click the Start backup button.


Keyboard shortcut for "open a terminal here" How can I create a keyboard shortcut so that when I press F12 in nautilus (or desktop), I get a terminal in the current directory?

Finally figured it out.. first sudo apt-get install dconf-tools nautilus-open-terminal, then run dconf-editor and set the org/gnome/desktop/interface/can-change-accels boolean on.  Then open nautilus using this command (to disable Unity global menu Temporarily):

nautilus -q
UBUNTU_MENUPROXY=0 nautilus

Now you can mouseover the action in the file menu, and change the accel by typing your key while the action is highlighted, finally restart your nautilus.  If you don't see Open in terminal in the File menu and you've just installed nautilus-open-terminal, you might need to first run nautilus -q.

Ubuntu 14.04 and up

If you can't find the can-change-accels key in your dconf configuration you can try the following solution:

Stop nautilus by executing nautilus -q
Open ~/.config/nautilus/accels in a text editor of your choice, e.g. gedit:

gedit ~/.config/nautilus/accels

Try to see if you can find the following line:

;(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "")

If the line exists, add your keyboard shortcut in the second double-quoted segment and uncomment the line by removing ;:

(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F12")

This would set the shortcut to F12. For a list of all possible key codes please consult  this answer.

If the line doesn't exist just copy and paste the one found in this answer at the end of the file.
Save the file and restart Nautilus by clicking on the Nautilus icon in your launcher/dash.

Ubuntu 15.10 and 16.04

Here, the relevant command in ~/.config/nautilus/accels is TerminalNautilus:OpenFolderLocal. (NautilusOpenTerminal::open_terminal is still present in the file, but doesn't seem to have any effect.) So follow the instructions above, except change the line

; (gtk_accel_path "<Actions>/ExtensionsMenuGroup/TerminalNautilus:OpenFolderLocal" "")

to

(gtk_accel_path "<Actions>/ExtensionsMenuGroup/TerminalNautilus:OpenFolderLocal" "F12")

to make F12 your keyboard shortcut. Notice that ; is again removed.

Finally, log out for changes to take effect.

I would do a right click in your file browser or desktop with
alt+click

Then find the "Open in Terminal" option.


Can't install or remove packages I'm getting this error:

dpkg: unrecoverable fatal error, aborting:
 files list file for package `linux-image-extra-3.13.0-39-generic' contains empty filename

I think it might have some thing to do with an old kernel, but I can't uninstall it with sudo apt-get remove or purge since it keeps erroring.

You can also try the following:

  rm /var/lib/dpkg/info/linux-image-extra-3.13.0-39-generic.list

Then update your system.

Try this solution:
cd /var/lib/dpkg

Backup:
sudo cp diversions diversions.bak
sudo cp diversions-old diversions-old.bak

Then make diversions back to old:
sudo cp diversions-old diversions

Now try update:
sudo apt-get update

Then re-install your package:
sudo apt-get install --reinstall packagename

Another possible solution: Quoted from http://www.richud.com/wiki/Ubuntu_Dpkg:_unrecoverable_fatal_error
sudo gedit -w /var/lib/dpkg/status

Remove the whole section of linux-image-extra-3.13.0-39-generic
Then run
sudo apt-get install -f

You should then get still the initial errors "dpkg: warning: files list file for package `xxxxxxxxxxx' missing
Now run
sudo apt-get dist-upgrade

Yet again you should see "dpkg: warning: files list file for package `xxxxxxxxxxx' missing, assuming package has no files currently installed.".
Now do this replacing xxxxxxx with all the package names above that appear.
sudo apt-get install --reinstall xxxxxxxxxx


Where are cron logs stored on Ubuntu 14.04? I am trying to troubleshoot why my cron task isn't working sometimes.  Where does cron store log files by default?  Is it /var/log/syslog ?

I have looked at that file and it is empty.  Do I need to set something up?

As default, cron's logs saved in /var/log/syslog.
It depends on rsyslogd configuration. You can change it:
Go to rsyslog config

cd /etc/rsyslog.d/

sudo nano 50-default.conf

Uncoment line:

#cron.*                         /var/log/cron.log

Save file and restart rsyslog

sudo service rsyslog restart

Restart your cron daemon for get it's messages from new file

sudo service cron restart

It is in /var/log/syslog by default.

But it can be set up to create a separate cron.log, which is more useful.

This Q&A describes the process:

16.04: How do I make cron create cron.log and monitor it in real time?

Also in this answer is the instructions to create a wcron command that displays it is near-real-time.  Plus, it links to another answer,

How to change cron log level?

that shows how to change the log level to include more than just the start of jobs - level 15 will show errors and end time, also.


installing chrome in ubuntu 16.04 Im running 64 bits version, Im very new to ubuntu, just dived into it. this is what I do:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

then get:

`2016-10-01 23:22:41 (1.30 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [49990192/49990192]`

then

sudo dpkg –I google-chrome-stable_current_amd64.deb

and get:

dpkg: error: need an action option

Type

dpkg --help for help about installing and deinstalling packages [*];

Use 'apt' or 'aptitude' for user-friendly package management;

Type

dpkg -Dhelp for a list of dpkg debug flag values;

Type

dpkg --force-help for a list of forcing options;

Type

dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
Thanks in advance and sorry for my idiocy too

You typed the wrong command to install the application.  You used an uppercase I when it should have been a lower case i.  Unlike Windows, the case of the letters in a command makes a difference.

Run this to install the package:

$ sudo dpkg -i google-chrome-stable_current_amd64.deb

Just change your Uppercase I to the lowercase i in the command you typed and you'll be all set.

By the way, the difference between the lower case and the uppercase i is:

-i (lowercase) Install the package
-I (uppercase) Show information about the package.

For other details see:

$ man dpkg

In Ubuntu Xenial (16.04) you can simply install with apt:

sudo apt install google-chrome-stable_current_amd64.deb


A program has too many menu entries. How can I see them all? I want to use LiVES with Ubuntu 11.10. Unfortunately my screen is not very wide and LiVES has many menu entries so that I can not see all of them.
Is there any way that I can see and use all menu entries?

I took a screenshot, so you can see the problem:

The issue seems to have been resolved in 12.10. I tried to simulate it by changing my display resolution to 800x600.

LiVes window when the resolution is 1366x768:

LiVes window when the resolution is 800x600:

You can see that all the menu items are displayed in 800x600 resolution, although the menu names are clipped, hence enabling you to access any menu item.

Lives ?! Its not much helpful. I have tried this and believe me it takes 5-7 hours to render a 40 min avi movie. I have screen res of 1600x900 , and I also had difficulties using it. You can check VLMC or Pitivi. They are better.


Does installing Ubuntu on D: keep Windows from putting programs there? I'm here with a simple question. I'm tired of using Linux on virtual machine so I want to install on my HDD disk.

Let's say I've Windows 10 on an SSD disk with 128 GB (C:). And I want to install Ubuntu on my another HDD Disk with 1 TB (D:).

If I install Ubuntu on an HDD disk, can I still have all programs from Windows 10 like games, Photoshop installed on D:? If I'm on W10 can I still install programs on D: even if it has Ubuntu?

It depends on how do you install Ubuntu on disk D:

If you use full disk for Ubuntu partitions, it will be unusable by Windows.

If you select a part of disk D: to install Ubuntu, you can use the other part as an NTFS partition.

You must partition your HDD (we don't call it 'D', that's a Windows label). The Ubuntu partition will run Ubuntu. The Windows Data (NTFS) partition is where you will continue to install Windows programs. You generally cannot install Ubuntu programs to your Windows Data partition. Ubuntu is not a Windows clone, and cannot run your Windows software installed on your Windows Data partition.

A full explanation of partitioning is beyond the scope of a single answer in AskUbuntu. You have a great deal of research  to do to prepare for a safe installation of Ubuntu.

Pro Tip: Partitioning is dangerous. ALWAYS back up your system completely to some other media before attempting to partition a disk. This site is littered with threads of folks who wiped out years of valuable data with a single errant keystroke.


How can I convert a .MXF video file to .MKV with Ubuntu? I have some videos recorded on a Sony PXW-X70 camera that I wish to convert to something else, possibly an .mkv file. What program or command line utility can I use to do this?

Looks like mxf containers usually hold mpeg2video which FFmpeg easily converts, although there are some variations on this codec theme. I illustrate one conversion method with a publicly available sample file:

First download this sample file:

wget http://www.freemxf.org/samples/freeMXF-mxf1.mxf

This converts easily enough with the latest FFmpeg:

ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mkv

And then all should be well :)

A few extra points:

If you are troubled by FFmpeg errors with the Repository FFmpeg get the latest version here:

Compile FFmpeg on Ubuntu, Debian, or Mint
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
If you prefer a different container another good choice would be mp4:

ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mp4

And if you want to use the aged avi container something like the following should do the trick:

ffmpeg -i freeMXF-mxf1.mxf \
       -c:v mpeg4 -q:v 2 -vtag XVID -max_muxing_queue_size 1024 \
       -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 \
       output.avi

References:

Material Exchange Format (MXF) Wikipedia

Apparently you can do it with ffmpeg
sudo apt-get install ffmpeg

https://superuser.com/questions/559820/converting-from-mxf-to-mpeg-format-with-ffmpeg


After upgrade to 11.10, display for main account is messed up Possible Duplicate:
  Desktop forgets theme?

I upgraded to 11.10 from 11.04 earlier this week, and ran in to some problems booting up into the GUI. When I booted, I got a message saying there was an error with my display, but I was be able to get into the tty2 terminal. I did some research, and found that a lot of people actually ran into the problem; I was finally able to boot into the GUI by running "sudo startx", but the icons and display configurations are messed up. I made a new account, and the display for the new account is how it should be, but the display in my original account is still not right. Here are images of my original account, and of my new account:

messed up display on original account

how display should look on new account

Does anyone know why the display is different on my original account, but look perfectly fine when I made the new account? I didn't change any of the display configurations on my original account.

What desktop theme was set on your original user account in 11.04?

I suspect some leftover theme files are effecting your desktop display in 11.10 from your original user account.

Try and change the theme to Ambiance or Radiance in your original desktop and let me know what happens.

11.10 does not support installed theme files as yet other than those provided with the installation. You can however change icon sets using dconf editor.

type sudo apt-get update once more, then
type sudo apt-get upgrade, after that
type sudo apt-get autoremove it will change some file, then
type yes

restart your comp


Error while starting hadoop When I try to run hadoop as bin/start-all.sh, I get this error.:

 mkdir: cannot create directory /home/prasanna/Desktop/hadoop/libexec/../logs: Permission denied

 chown: cannot access /home/prasanna/Desktop/hadoop/libexec/../logs: No such file or directory

 starting namenode, logging to /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out

 /home/prasanna/Desktop/hadoop/bin/hadoop-daemon.sh: line 135: /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out: No such file or directory

 head: cannot open /home/prasanna/Desktop/hadoop/libexec/../logs/hadoop-prasanna-namenode-prasanna-VirtualBox.out for reading: No such file or directory

What would be the reason and how should I fix this?

PS: I am very new to Linux

The user you're using doesn't have root permission to create the folder in Desktop so use the sudo command:

example:

cd hadoop/bin
sudo ./start-all.sh


How do I deal with "unauthenticated sources" errors in the Software Center? Any install that I'm trying through the Software Center is telling me:

Requires installation of untrusted packages: The action would require the installation of packages from not authenticated sources.

I did an apt-get update from the command line, then removed the software sources that the keys were bad from (PPAs I added myself), and unchecked them in the software sources for software center, but to no avail.  I can't install anything from software center anymore - only> from the command line with apt-get.
Is uninstalling/installing the only option?  I don't want to break other PPAs that I have.
Additional information:
Here's a paste from apt-get update:
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B725097B3ACC3965
W: GPG error: http://us.archive.ubuntu.com oneiric Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>

I've tried apt-key update, and there was no effect (two keys unchanged).
The output of apt-get update and apt-get upgrade, and the contents of /etc/apt/sources.list, can be found in this pastebin post.

Open the Terminal and enter the commands below one by one:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

Update:
This might not help in some later versions, which might require alternative solutions like the one in the other answer, or this one that seems to do the job in some cases under Ubuntu 16.04:

sudo apt-get update
sudo apt-get dist-upgrade

Requires installation of untrusted packages: The action would require the installation of packages from not authenticated sources.

I received this error from the Ubuntu Software Updater after adding a repository without adding the key for the repository. Some software repositories are good about giving you instructions on how to add their repository keys along with the instructions to add the repository, like Launchpad.Others just give you the key.

To figure out what key you need in a terminal run:

sudo apt-get update

This will download the list of available packages from your repositories which uses the keys. If a key is missing it will return an error message.

Use the information in the error message to find and download the key then add it to your apt keyring with:

sudo apt-key add /PathToTheKeyFile/KeyFile.gpg

You should get back an OK. Now to test that you have all the needed repository authentication keys to allow the Ubuntu Software Updater to run:

sudo apt-get update

This will again download the list of available packages from your repositories which uses the keys. If a key is missing it will return an error message.


How do you remap a key to the Caps Lock key in Xubuntu? I'm using Xubuntu 12.04. How do I either swap or remap the Control (or any key) and Caps Lock keys?

Another way:

sudo vi /etc/default/keyboard

then find the line that starts with XKBOPTIONS, and add ctrl:nocaps to make Caps Lock an additional Control key or ctrl:swapcaps to swap Caps Lock and Control.

For example, mine looks like

XKBOPTIONS="lv3:ralt_alt,compose:menu,ctrl:nocaps"

then run

sudo dpkg-reconfigure keyboard-configuration

The reason this way is better is that it will take effect on the virtual consoles (e.g. Ctrl+Alt+F1) as well as in the graphical desktop.

For Raring (at least):

Start "Keyboard layout" (from dash).

Press "Options..." to reach "Keyboard layout options" menu.

I chose "Ctrl key position" => "Caps lock as Ctrl". Your tastes may differ.


Launcher going all black. What is wrong with it? All the icons in the Unity Launcher is blank.

Need Help!

Have you tried to restart unity? Adding from the second answer found here:

Hold down ctr+alt and press t. This will bring up the terminal. Then type unity. This will restart unity and hopefully fix the issue.


Fix Plymouth with Nvidia driver in Ubuntu 13.10 Using the Nvidia driver, how can Plymouth be fixed in Ubuntu 13.10 (Saucy Salamander)?

In other versions there was a script that fixed it, but it is not working in Ubuntu 13.10 and package hwinfo is missing, but with free drivers it is not the case.

Workaround in few steps:

Backup your sources.list: sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
Just add previous release repo (located here) to your /etc/apt/sources.list and run sudo apt-get update
Download and run this script
Put your sources.list back: sudo mv /etc/apt/sources.list_backup /etc/apt/sources.list and execute sudo apt-get update

After, you can download and change some plymouth themes:

sudo apt-get install plymouth-theme-solar
sudo update-alternatives --config default.plymouth
sudo update-initramfs -u

sudo apt-get install libhal1
sudo apt-get install libhd16
sudo apt-get install hwinfo
download and run this script


I can't get suspend, hibernate and shutdown to work in Ubuntu 12.04 I recently built a computer with these specs: Asus Motherboard, Intel i3 3.3 GHz dual processor, 8 GB of RAM. I installed 12.04 on a brand new hard drive.  I partitioned the hard drive between root, home and swap like I have often read how to do.

I cannot get this machine to properly shutdown.  I have to hold the power button down now.  Although, for the first few days it properly shutdown.

I also cannot get the system to hibernate or suspend properly.  I have read tons on this and watched many YouTube tutorials on how to fix both, but the computer never wakes up after suspend or hibernate. It just stays on a black screen.

Can anyone help?  I love 12.04 so far, but these setbacks are making me worried about stability and power management issues.  Also, I wonder if it's really bad for the hard drive to force the CPU to shutdown.

By swap he means the swap partition. Swap or paging
To check your swap partition, you could do one of these:
Go to Ubuntu Software Center, and install gparted.
There you can check all your disk partitions.

To use hibernation, your swap partition should be at minimum the same size as your RAM.

In your case it has to be at least  8 GB


Where do I set socks5 proxy settings on a server? Which software is used to setup connection to socks5 proxy from Ubuntu server?

Besides firefox socks5-client setup (which is what I use most in combination with ssh) I know of dante-client

http://www.inet.no/dante/doc/latest/config/client.html

This package provides the "socksify" client program - a tool which
 forwards network requests from any program to a SOCKS server (v4 or v5)
 which then performs them on your behalf.

Is that what you are looking for?

Read here-
http://www.ubuntugeek.com/how-to-configure-ubuntu-desktop-to-use-your-proxy-server.html

It's a little out of date, but it should give you an idea about what needs to be done.

Try the ubuntu configuration first and see if other utilities are able to derive those settings. If not, configure them separately.


Clone external hard drive to internal hard drive The hard drive failed on my new laptop so I installed Ubuntu 14.04.2 on an external hard drive and have been using it for the past 3 months. Now that the laptop manufacturer had sent me a new hard drive I want to clone whats on external hard drive to the internal hard disk.
I'm looking for steps to take to do this correctly.

You could use dd, from a live CD open a terminal an type:

dd if=/dev/sda of=/dev/sdb bs=64K

Just replace /dev/sda with your external hardrive name and /dev/sdb with your internal hardrive name.

@user2308612 is right. You can use dd for this task. It does low level copy, the partitions will remain. You asked for step by step instructions and I think they are nicely written here (pictures included): http://www.howtogeek.com/howto/19141/clone-a-hard-drive-using-an-ubuntu-live-cd/


Recover data in external harddisk (which still shows 1.2/2Tb as used) accidentally erased using Startup Disk Creator I accidentally erased a 2 TB harddisk while trying to create ubuntu startup disk on my 2GB pendrive. Instead of erasing the 2 GB pendrive I think I erased the 2TB external hardisk using the Startup Disk Creator. It took only less than 5 seconds for the startup disk creator to erase my 2TB external harddisk. Also when I open the affected external 2TB drive there are no files visible, but the properties of the disk shows 1.2TB of the space as used (same as the size of the data I had stored in it previously before accident). Please see this image.

So I believe that the original data is somewhere in broken/invisible formats inside the disk. That is my only hope. I don't have a alternate 2TB harddisk to take a backup or to perform testing. I can neither avail or afford one right now in my place. So I don't want to mess up further by choosing a wrong recovery method on the original affected disk. My clients would be mad to listen to these stories for delays in my current deliverable, but getting fired or loosing business is the least of my problems now. This external hardisk is more important and is everything I had in my life and career.

To recover the data, I have already gathered ideas about testdisk and photorec from this posting and several others in google. I didn't try any of them on the affected hard disk. But I did try both testdisk and photorec on other portable devices for testing purpose. For instance, I tested them on a pendrive and retrieved files like a broken pieces from postmortem. It will be of no use, if that is what the recovery tools can provide it will be too impossible for me to rearrange, rename and understand the data/files of total size which is around 1.5 TB. The data involves most possible formats of images, sounds, videos, scripts, programs, codes, design files etc.. Isn't there a way to just undo this accident (that took only 5 seconds) and get back all my files as it is? Because the properties of the external drive still shows 1.2 Tb as used and only 800 GB out of 2 TB as free.

I would loose 10 years of my life's work, designs, programs, all critical files, projects and priceless family memories. I am a living dead if I can't get back my data. Most of the post with similar issues are dated 2012 or before, so I believe there should have been some technology improvements to undo this by now. I know I am foolish to have something that I considered worth more than my life in one single external Hard disk. But it had been that way ever since I started computing and I never faced any single issue so far. I was using windows and only recently I switched to ubuntu. And I made this mess while using ubuntu's in-built Startup disk creator. Infact the hard-disk was only my backup and I used to have the working copies in my laptop. But my bad time, I had also crashed my laptop recently while I was trying to render an animation using Blender and this week I lost the main backup data in hard-disk too. I can never recover from this tragedy and I request that if anyone knows a solution to recover data and files from the 2Tb hard-disk data, please share me.

Please help! Should I run testdisk or photorec on my external Hard disk? Can it restore all the files as it is? Or do we have any other solution to resolve this, as my hard-disk is not totally empty and it's properties shows 1.2Tb as used space?

regards,

K

I have had this problem and it seems, you have to purchase a non-free to get the files as they are with all folders. Photorec is very powerful and it will centrally recover all your files till they were not over written but they will be renamed and sorted in folders according to photorec's policy.

R-studio is great one that supports multiple platform and all major file systems. It saved my arse back than.

Best of luck.

VVI : Back up !!!!! Back up !!!!! Back up !!!!!

Edit: this kind of problem has been solved here :)

Instructions step-by-step:

`Install TestDisk
 Mount the drive
 Launch sudo testdisk (eventually enlarge the terminal)
 Create a new log file
 Select the drive
 Select partition Table (usually Intel should be good)
 Analyse
 Quick Search (this should found only the actual partition)
 [Enter]
 Deeper Search (this should find your old partition, you can stop it after it found  it) Once you found what you think it's your partition select it with up/down arrows
 [P] for list files and look if it seems it
 [q] to quit list files
 [Enter]
 Write to save new partition table to MBR.`

Look carefully: this don't overwrite / recover any data, just the MBR of the disk.

Source: Recover 1TB disk erased with startup disk creator

Simple.  Connect it, mount it, use dd if=(path) of=(path)  Please let me know if you need any further help on this.


How to use guake at right side monitor in dual display environment I want to use Guake at right monitor.

So I added this ppa by sudo add-apt-repository ppa:cberner/guake, and sudo apt-get update.

https://launchpad.net/~cberner/+archive/guake/+index?field.series_filter=raring

Instruction says that I can set monitor_index somehow. But I couldn't find how to configure.

Does someone know about this?

I use two monitors and wanted Guake to be displayed on the right one (where by default it is displayed on the left one).

What I did was to edit my /usr/bin/guake/ file replacing the get_final_window_rect method with this:

def get_final_window_rect(self):
    """Gets the final size of the main window of guake. The height
    is the window_height property, width is window_width and the
    horizontal alignment is given by window_alignment.
    """
    screen = self.window.get_screen()
    height = self.client.get_int(KEY('/general/window_height'))
    width = 100
    halignment = self.client.get_int(KEY('/general/window_halignment'))

    # get the rectangle just from the first/default monitor in the
    # future we might create a field to select which monitor you
    # wanna use
    monitor = 1 # use the right most monitor
    window_rect = screen.get_monitor_geometry(monitor)
    # see if we don't have another screen, and if so, use the first one
    if window_rect.width == 0:
        monitor = 0
        window_rect = screen.get_monitor_geometry(monitor)
    total_width = window_rect.width
    window_rect.height = window_rect.height * height / 100
    window_rect.width = window_rect.width * width / 100

    if width < total_width:
        if halignment == ALIGN_CENTER:
            window_rect.x = (total_width - window_rect.width) / 2
            if monitor == 1:
                    right_window_rect = screen.get_monitor_geometry(0)
                    window_rect.x += right_window_rect.width
        elif halignment == ALIGN_LEFT:
            window_rect.x = 0
        elif halignment == ALIGN_RIGHT:
            window_rect.x = total_width - window_rect.width
    window_rect.y = 0
    return window_rect

Basically, it uses 1 as the monitor index and later on, adds the right screen width to the start point display of the guake window

hope this helps!

I try in Ubuntu 14.04,
I found you just need to click "Preferences" at guake icon (right top screen) in either monitor, then click "Show" in the same monitor, then you can see guake terminal pop out at the monitor you are using !!!


How can I reduce or increase the number of workspaces in Unity? I was reading about how to get multiple workspaces in the mutter version of Unity, however since Compiz is replacing Mutter how do I go about adding and removing workspaces in Compiz version of Unity?

15.04 and later
On later versions of Ubuntu Workspaces are in the Workspace switcher. The number of desktops can be modified by installing the CompizConfig Settings Manager and changing the numbers listed under "General Options > Desktop Size".
13.04 -14.10
Workspaces are by default disabled on a new install of Ubuntu v13.04.
You can toggle workspaces on/off as well as defining the number of workspaces through unity-tweak-tool  (sudo apt install unity-tweak-tool)

12.04
The number of workspaces can be safely set without using CCSM through MyUnity

Move the slide-bars to change the number of horizontal & vertical workspaces
for example 4x1

I used CompizConfig Settings Manager (CCSM). Open CCSM, select General Options then go to the Desktop Size tab.

You can adjust the number and the layout of the workspaces by using the Horizontal Virtual Size and Vertical Virtual Size sliders to adjust the number of "columns" and "rows" respectively.

Using this method does not appear to change the settings mentioned above in gconf editor.


Can´t boot Ubuntu 16.04 after upgrade Ubuntu propose upgrade. I accepted. While installing packages it stops (a lot of time) with a message about conflict with TrueTypeFonts and something else about Windows OS.
Now GRUB allows choose OS. But Ubuntu don´t starts. Last message is about loading system in RAM. I can initiate in recovery mode, login with user+password. In a command line without net connection.
I had tried with a bootable USB stick, but it don´t boot. How can i boot the system without erase user documents?
Espero no haber ofendido demasiado al lector con mi torpe inglés.

if you have a seperate space for /home u can reinstall ubuntu without loss any data in users! but carefull : you must use exactly previous username in install steps.

otherwise login in recovery mode and use update-grub2 command and write demsg output here.


Errore 1962 after replace w10 with ubuntu 15.10 later than 2 years I have decided to replace window disto with ubuntu 15.10 into my Lenovo C440 (I have decided to replace - no dual boot)
The installation is finished without any problems but then I could not get to work with my pc because it stops with an error - 1962.
I tried all the solutions that are in the network , enabling the legacy and forcing the boot but now, I do not know what to do . someone can help me?
Thanks

Try installing a newer version of Ubuntu (16.04 now in beta) which may help with hardware and automatic EFI detection: http://distrowatch.com/?newsid=09335


How to run only 1 window in Xorg? I don't want to use a desktop environment because I don't want to waste the CPU. I want to run Chromium browser without a desktop environment. I know there's already a question like this (it was about Firefox). I followed that question and it installed Vanilla GNOME after I installed Xorg. Is it possible to run Xorg with ONLY Chromium Browser WITHOUT a login screen e. g. using the startx command?
Also, will WebGL still work without a desktop environment?

Ubuntu version: 20.04

Type of installation: Server

ye u can run stuff w/out de or wm
just run startx xterm and type the command to open chromium in xterm
a window should show up
for webGL, idk but it should cuz even minecraft works
i only know this cuz bspwm wont run and i just wanna do normal stuff lol


Should I install 64-bit Ubuntu onto my 32-bit machine? I own a Toshiba Laptop with the following details:

AMD Turion X2 64 Mobile Technology TL-60 2.00 GHz Processor
3 GB of RAM
32-bit Windows Vista

Does this machine meet the requirements to run 64-bit Ubuntu?

Yes - as statet on wikipedia and the AMD Website it is indeed an 64bit processor and capable of running 64bit Ubuntu.

My understanding is that Ubuntu takes up less resources that what Windows does, so I would say give it a go. If it does not work out the worst that will happen is that you will have to clean it all down and start again. From the sound of the previous posts though, it sounds like you will be OK.

Most of my posts these days seem to have the letters (vm) in them, but I feel this could be a good option for you here. Download both iso's and then run them in a vm. This way you might be able to get a feel of it, before jumping all the way in with a 64 bit os.


How do I make vim the default graphical text editor? While trying to make vim default instead of gedit, I found this could be done two ways:

Use defaults.list and make text/plain (and others) point to vim.desktop (what is the format for creating .desktop files?)

Use update-alternatives and change gnome-text-editor (right now it has only one alternative, so I guess I have to install one more. How to do that?)

and which is the better way to do it?

OP fixed the problem here:

  Ok, I have created vim.desktop in ~/.local/share/applications and
  modified defaults.list (in the same dir) to include

text/plain=vim.desktop

  After that, sudo update-mime and its working! (I am not sure
  whether this step is require)

  Clicking on a text file opens vim, not gvim, in terminal and :q
  closes the terminal too.

For a graphical environment I use something like this:

Open Nautilus-RightClick on desired File-Properties-Open with...-Select

Then point to a simple wrapper, e.g.

#!/bin/bash
gnome-terminal.wrapper -e vim $*

It's not a global solution, though.


No network devices on Ubuntu 13.10 I'm brand new to Ubuntu and therefore am the noobest of noobs. I hope someone can help.

I've just installed 13.10 on my Dell Inspiron 6400. When installing the software, my wired internet connection worked. However, when installation completes, neither my wired or wireless connections work.

My understanding so far is that it seems I don't have my Broadcom BCM4401 (ethernet controller) or Broadcom BCM4311 (network controller) drivers installed. I've managed to download these drivers from my Windows PC, but it appears I need Synaptic Package Manager to install them on my Ubuntu laptop, which itself requires internet access to install.

Does anyone know how I can get my internet access up and running?

Thanks

The 'Additional Drivers' tool often offers to install the wrong driver for Broadcom 4311. Please open a terminal Ctrl+Alt+t and do:

sudo modprobe b44

Your ethernet should now be working. Hook it up and fix the wireless:

sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install linux-firmware-nonfree

Detach the ethernet, reboot and everything should be working as expected.

My solution was to buy a USB Ethernet dongle for $10.  I spent a lot of spare time over 2 weeks trying to get this to work without success, then decided it was easier to spend the $10.


How to mount an ISO file? I'm running into trouble trying to mount a large iso:

dev@dev-OptiPlex-745:~$ sudo mount -o loop /home/dev/Hämtningar/matlab2011a_64.iso /cdrom
mount: warning: /cdrom seems to be mounted read-only.
dev@dev-OptiPlex-745:~$

Can you tell me how I should do it?

Maybe, instead of installing additional software, you can use what the system has to this end:

Create a directory to serve as the mount location:

sudo mkdir /media/iso

Mount the ISO in the target directory:

sudo mount -o loop path/to/iso/file/YOUR_ISO_FILE.ISO /media/iso

Unmount the ISO:

sudo umount /media/iso

On your desktop will appear the mounted ISO.

Just double click it, see:
How do I mount an ISO?
PS. And, also try double clicking
/casper/filesystem.squashfs

if the ISO image is an Ubuntu LiveCD ISO etc.
To verify that the functionality IS applicable to these, right click the files to view the options for pertinent operations.


Can't play .TS format from a Samsung TV recording I recored a movie by Samsung TV and It has a .TS format, and I can't play it.
I tried VLC and Smplayer. None of them work.

In VLC I get this Error:

[0x7fbc40c018b8] ts demux error: libdvbpsi (misc PSI): Bad CRC_32 table 0x73 !!!

There is no application for Ubuntu with a genuine support for Samsung PVR recordings.
PVR recordings from a Samsung TV are encrypted to meet DRM. In order to view them on a device other than the very TV on which they were recorded we would have to decrypt them first.

Doing so may be illegal depending on copyright laws in your country.

Some older Samsung TVs stored the encryption key together with the video files on an attached USB drive but this is not the case in newer series.
For these we need root access to the TV firmware in order to read the encryption key generated from the TV before we can decrypt our recordings. You will find some tools including tools for Linux/Ubuntu from the SamyGo modified firmware support forums.
You may be able to adapt them to your settings better than me because my TV is not supported without also replacing it's firmware (which I did not want to do). Not all series of Samsung TVs are supported however.

Did you try to play them with Smplayer ?

Smplayer can play this type of videos but you cannot rewind or fast forward. You can only watch it. I run Linux Mint 17 and all multimedia files play normally except .ts files which play in Smplayer only. I have installed the following packages ubuntu-restricted-extras - Smplayer which are not installed by default in Linux Mint 17. I hope this can help. Edited from this point :) I do a work around to solve this issue I use WinFF app to convert the .ts file to any other file that play normally which in my case I prefer the following settings in winff

Convert to : ( I choose DVD ) Preset ( I select PAL DVD fast LQ)

Preset settings can change according to your needs of course :) Cheers


Megasync installation on Lubuntu 18.04 32bit is there a way to install megasync on 18.04 LTS Lubuntu?

Downloads in megasync has only 64bit version for (L)Ubuntu 18.04.
My only chance as a newbie is to go back to Lubuntu 16.04 LTS

TIA for any thoughts

Yeah the development of 32Bit versions of MEGAsync have been stoped since Ubuntu 17.10.

What you can do :

Install older Ubuntu versions with 32bit
Buy a new computer with 64Bit and install Ubuntu 18.04 in 64Bit, if you have checked that your current computer does not support 64bit

It's your decision...

A 32 bit version for Ubuntu 18.04 is available, click through to the "Other downloads" link and navigate to here: https://mega.nz/linux/MEGAsync/xUbuntu_18.04/i386/


Does the native RAID in Ubuntu support RAID configurations with hard drives of different sizes? have 8 hard drives of different sizes that I want in a RAID 5 or 6 configuration, the OS is Ubuntu 12.04 desktop.

Does the native RAID in Ubuntu support RAID configurations with hard drives of different sizes? Can i grow the RAID in the future?

If not, is ZFS a good alternative to this?

I have looked at other alternatives like FlexRAID (support is terrible and documentation is just as reliable), UnRAID, and snapRAID but there seems to be limitations with each of them. But, ZFS seems to be a good long term solution for RAID management and growth.

Btrfs can also manage RAID5/6 in last versions

Use ZFS.

ZFS uses zpools which are made up of vdevs, which accommodates different hard drive sizes.

A more detailed explanation is found here. http://en.wikipedia.org/wiki/Zfs#Storage_pools


Skype doesn't find my audio input Skype doesn't find my audio input. If I click on the "Microphone" no other suggestions appears, my web camera works.

In windows everything works.

This is my audio preferences.

audio settings.

Under Sound Preferences, please post the "Hardware Tab" in order to check your profile, which should use at least an output + an input being in use. Otherwise, your hardware is not using the input profile which can be chosen right there.

This answer may be changed after your posting in order to give you further details. Here is a sample. Thank you.

Edit

Here is the conversation in the general chat room.

Make sure to use the latest Skype beta version for Linux from http://www.skype.com/intl/en/get-skype/on-your-computer/linux/. Older versions do not work properly with Pulse Audio. Also uncheck the "Allow skype to automatically adjust my mixer levels", it caused a lot of trouble for me. After that, reset all your mixer levels by opening a command-line and running alsactl init.


How do I disable my system from going to sleep? I am getting a web server setup at home on an older AMD 2400+ desktop. I have Ubuntu 11.04 installed and running however, after a time, I can no longer browse to the server. When I go to the keyboard and press a key, everything magically works again.

I have looked through the BIOS and I am not seeing any power saving features enabled. Is there anything like that in Ubuntu? Can it be disabled?

I don't have any GUI installed. This is console only.

On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

And this to re-enable it:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

From man systemctl:

mask NAME...
           Mask one or more units, as specified on the command line. This
           will link these unit files to /dev/null, making it impossible to
           start them. This is a stronger version of disable, since it
           prohibits all kinds of activation of the unit, including
           enablement and manual activation. Use this option with care. This
           honors the --runtime option to only mask temporarily until the
           next reboot of the system. The --now option may be used to ensure
           that the units are also stopped. This command expects valid unit
           names only, it does not accept unit file paths.

 unmask NAME...
           Unmask one or more unit files, as specified on the command line.
           This will undo the effect of mask. This command expects valid
           unit names only, it does not accept unit file paths.

I found Light Locker, as I have Ubuntu 14.04.2 with LXDE (Lubuntu) Desktop; if you have this desktop you can change the default and manage the monitor through that.  Otherwise you might have to install gconf-editor through terminal if you don't have it.  Light Locker is in can be found in Preferences in the main menu.


Blank screen after installing nvidia restricted driver I've installed the current nvidia restricted driver and rebooted my machine and now I get a black or blank screen.

How can I fix this?

Remove all Nvidia-related packages

Log in to a terminal: Ctrl+Alt+F1 (terminal is visible with a blank screen)
sudo apt-get remove --purge nvidia-*

Start from scratch

sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv

Reinstall everything

sudo apt-get install nvidia-common
sudo apt-get install xserver-xorg-video-nouveau
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core

Reconfigure the X server

sudo dpkg-reconfigure xserver-xorg

Source: Ubuntu Wiki

Just install clear ubuntu (no updates, no software) connect with internet, download your driver and install and reboot! Worked for me! Thanks for my neighbour!!! (that was his idea)


How to Remove Recursively grant ownership I recently switched from Windows 8.1 to Ubuntu.

Yesterday, I wanted to install PHP but during tutorial I did this:

sudo chown -R joy /var/www

but now onward for every command it ask for password

$ sudo apt-get install vlc
sudo: /var/lib/sudo owned by uid 1000, should be uid 0
[sudo] password for joy:

I tried to search on google about that & I come to know that I recursively granted ownership of the directory /var/www and all files and subdirectories, to user joy.

Now I want to reset everything back like before I recursively granted ownership.

Update:

Try this:
sudo chown -h root /var/lib/sudo

This will change the owner of /var/lib/sudo to root


Ubuntu 12.04 Problem connecting Internet by Mobile Broadband through LG GU220 I am using Ubuntu 12.04. I use my LG cellphone titled GU220 using Aircel connection. The phone gets connected as an USB device well enough, but the network always fails to connect whenever I try to connect through mobile broadband. I also have Windows 7 which does not fail to connect the network through PC Suite.

I tried it several times even after restarting both phone and Ubuntu but in vain.

Also for 1st two days things worked well and the network was well connected; the problem  started just after those two days - in from the next login.

First call your Aircel customer care and asked following GPRS setting details.

Dial up No. ( may be something like *99# )

APN.

Go to Network settings, Mobile Broadband , choose country, Choose provider, Finish.
You will be able to see aircel connection in  Mobile broadband section. select it and choose edit from right pane.

Fill dial up no and APN given by aircel customer care. Make sure that you have filled perfect details

Try to Connect internet, You will have success.

You can try this- Connect usb stick first in other os(eg. windows) if you have dual boot and then you can boot Ubuntu. You may be automatically find internet connectivity option. Just connect and enjoy. I am not sure but it may work..


"ctrl+space" has been bound to invoke some input method and does not work in Emacs or Eclipse auto-complete In Emacs run in terminal, ctrl+space is a standard shortcut key to select region. But under Ubuntu 12.04, it will invoke some input method for non-English language. I was wondering if I can reserve it for Emacs only?

Under System Settings -> Keyboard -> Shortcuts, I couldn't find to what ctrl+space has been bound. Strange.

Other programs, especially auto-complete in Eclipse, also seem to have a problem handling ctrl+space.

It sounds like you have Ibus running, which uses Ctrl + Space by default to enable/disable the input editor.

You can change the shortcut key assigned to it in Ibus Preferences.

If Ibus is running in the menubar, you can right-click to choose Preference from the menu. If Ibus is not running in the menubar, you can start the Preferences dialog from the Dash by running Keyboard Input Methods or from the terminal with ibus-setup.

Update for 14.04

ibus-setup is no longer available for 14.04. Functions from the former ibus-setup are instead integrated into System Settings >> Text Entry.

Input switching is now set by default to Super + Space, but Ibus may still steal focus from the Control + Space keybinding and cause other system problems, most notably the auto-complete in Eclipse.

Integration of Ibus input switching into the new Text Entry settings is still a work in progress, and this is causing the problem since the older setting still exists behind the scenes.

If you have upgraded from 12.04, ibus-settings should still be available.

In 14.04, you can edit the settings directly is dconf-editor.

If it is not installed:

sudo apt install dconf-editor

Then browse to Desktop >> ibus >> general >> hotkey. The trigger and triggers setting will still show 'control+space'. Edit these settings out, being careful to leave empty brackets [] in triggers.

I have Ubuntu 14.04 GNOME with LXDE. Apparently this desktop has ibus-setup. So, for me, changing the ibus setting was the right fix. Perhaps it was only Unity that did away with the ibus-setup app.


Why is X11 a security risk in servers? I remember reading that servers do not have a GUI because X11 is a security risk. Why?

Ubuntu's community documentation explains the real reasons why it's not recommended to run a GUI on a production server system:

  Most Ubuntu Server developers do not recommend installing X on a
  server. There are multiple reasons for not installing a GUI.

  Some reasons to not install a GUI include:

  You'll have more code subject to security vulnerabilities, more packages that need updating, and more server downtime.
  X11 and desktop packages are not supported for the full 5 year lifecycle of the LTS server release.
  Performance may suffer because resources (memory, hard disk space, CPU, etc.) will be consumed by the GUI.
  It is best practice to only install needed software on a production server.
  The GUI may include other network services that are inappropriate for a server.

  One of the goals of Ubuntu Desktop Edition is to make it easier for users to use Linux. When installing some desktop environments,
  services that you may not specifically want will be installed. For
  example avahi-daemon, which is used to help configure networking,
  adds another open port and may introduce unwanted DNS conflicts with a
  .local domain.

  So for the most secure server it is best to not install a GUI.

"ServerGUI" by "Contributors to the Ubuntu documentation wiki", reproduced here as permitted by CC-BY-SA 3.0.

Contrary to somewhat common misconception, X11 being a server really has nothing to do with why running a GUI on a production server is considered to be non-ideal from a security perspective. X11 is virtually never configured by default to be accessible over a network anymore, on any operating system. No version of Ubuntu has ever had X11 run a network-accessible server in the default configuration. (To access X11 on Ubuntu via TCP, you have to forward it though SSH or manually reconfigure the server.)

Furthermore, even if X11 did run a network-accessible server, this would not be a reason not to have it installed on a production server system. Anyone running a production server is presumably capable of configuring it for their needs and auditing it  to make sure undesirable services are not running. (If they cannot, that will pose a far greater threat to their security than would be created by having a GUI installed.) Even if X11 had to have a port listening on a physical network interface (which is not the case), the port could easily be blocked by reconfiguring the built-in netfilter using iptables (or a higher-level frontend like ufw).

In contrast, the problems listed above are not so easy to overcome by reconfiguration.

The real reason is so admins can think of themselves as super smart by running stuff from the command line. There is no security risk of running a GUI on Ubuntu server.


how to start VNC service remotely without first logging into Ubuntu 12.04 locally I tried the answers other similar queuest in Ask Ubuntu, but didn't get it to work.

I reboot Ubuntu 12.04.
I remote in using SSH, and do
/usr/lib/vino/vino-server
to start VNC service.

UltraVNC client reports: Failed to connect to server!

But if I login at the Ubuntu computer and try UltraVNC again, it works.

I also had this issue. I tried user1689961's answer but got a connection refused. When I added the -allow <ip address of client> option, it worked.

The full command:

sudo x11vnc -safer -localhost -once -nopw -auth /var/run/lightdm/root/:0 -display :0 -allow <ip address>

This is a great guide.

https://help.ubuntu.com/community/VNC/Servers

Specifically, this command worked for me:

sudo x11vnc -safer -localhost -once -nopw -auth /var/run/lightdm/root/:0 -display :0


How to SSH on a port other than 22 I have two computers behind the same router. Let's call them A and B.

A can SSH to B in the following manner: ssh usr@<internal ip of computer>

B can SSH to A by doing the same, but the external IP must be used. I have forwarded port 22 of my router to the IP of computer A, so that all makes sense to me.

However, I want to also forward port 26 to computer B, and SSH from outside the network by using the external IP for both, but specifying either port 22 or 26, to effectively select which computer to use.

I have tried allowing port 26 through OUTPUT of iptables on A and INPUT of B, but that didn't seem to work. I have also forwarded port 26 to the internal IP of B (through the router), as I did with 22 for A.

Here's what I get when I try to SSH from A to B using the external IP and port 26:

ssh: connect to host xx.xx.xxx.xx port 26: Connection refused.

Versions:

A = OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
B = OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1c 10 May 2012

A has 12.04 Ubuntu, B is a Raspberry Pi with Raspbian.

EDIT: Something that I forgot to put in: I did try switching the SSH config file (I found it is /etc/ssh/ssh_config) I uncommented (deleted the #) the line with Port and changed 22 to 26. It gave me the connection refused message still. (I rebooted to no avail.)

If you are on Linux system and you want connect to an SSH server on port 26 you can use the following command.

ssh user@192.168.1.1 -p 26

Note:

Replace server IP with the IP Address or DNS name of your server.
Change your port number as you have set.
if you are using custom port SSH then same port most be allowed for outbound, inbound connection on firewall otherwise the connection will not establish

Is not a good idea to run ssh on default port (TCP/22), neither forward from WAN IP 22 to whatever port is using ssh-server on LAN IP.
To make ssh-server listen on any given port  you have to

Edit on /etc/ssh/sshd_config (note the d) from #Port 22 to Port 26. Ie, uncomment and change the port. Better than 26 would be something randomly above (below 65535), like 42895.
Also consider changing to PermitRootLogin no.

Test your configuration with ssh test mode
sudo sshd -t

Restart ssh-server service
 sudo systemctl restart sshd.service

Then from ssh-client you will be able to connect
ssh user@serverNameOrIP -p 42895

Bonus: mosh
If mosh package is installed on server you then use
mosh --ssh="ssh -p 42895" serverNameOrIP


How to get GNOME Shell Calendar to sync with Google Calendar with Thunderbird installed? On GNOME Shell, I want to use the Calendar and have it synced with my Google Calendar account, but I have Thunderbird on my computer.  I have seen a couple of posts making Thunderbird default through the means of the terminal, but those changes did not effect the calendar on the desktop panel.  I have used Evolution in the past, and i never really liked it, but will conform to it if necessary for the ease of having Google Calendar sync.

You could try: https://github.com/vintitres/gnome-shell-google-calendar

Few steps are enough:

Setup dependencies:

sudo apt-get install python-gtk2 python-dbus python-gdata python-iso8601 python-gnomekeyring
Download it from: https://github.com/vintitres/gnome-shell-google-calendar/zipball/master
Extract it in any folder you like.
Run gnome-shell-google-calendar.py:

/path/where/you/extracted/gnome-shell-google-calendar/gnome-shell-google-calendar.py
You should beforehand have a online account set up with Google (see: What are online accounts and how do they work?). You should get prompted with this text:

A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html

0. yourname@gmail.com
Please choose the Account:
Enter the number of your account and the program will start to syncronize.
If you don't want to run it manually everytime, you should add gnome-shell-google-calendar.py to startup applications (see this answer: How do I manage applications on startup in GNOME 3? , insert in the field "command" the path of gnome-shell-google-calendar.py ).

Done!

here are a few solution

http://www.webupd8.org/2011/11/how-to-integrate-google-calendar-with.html

http://www.webupd8.org/2011/09/google-calendar-gnome-shell-integration.html


GPG error: The following signatures couldn't be verified because the public key is not available Possible Duplicate:
  How do I fix the GPG error “NO_PUBKEY”?

after sudo apt-get update I get this error:

W: GPG error: http://archive.hivemind.me all Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3C962022012520A0

Run the following in your terminal,

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3C962022012520A0
 sudo apt-get update

References: How do I fix the GPG error "NO_PUBKEY"?

You need to replace the key (3C962022...) with the one that is displayed in the error message in the terminal.

When you add a third-party repository, you should also add its key to your system. The public key is a string which identifies that certain repository. You can find some more information on this and how to add the key here.


Install Google Chrome Ubuntu 12.04 without sudo I was wondering if I could install google chrome without using the sudo command.

I've tried to use the tutorials from google but I couldn't read it because I accidently downloaded the french version of Ubuntu, so I basically don't know what's happening, also, I'm a complete noob at Ubuntu... so if anyone could give me a very very basic tutorial on how to do it, it would be appreciated.

Thanks in advance.

I guess without sudo you cannot install google chrome. Because google chrome will try to install it in directory /opt and few other root directory, which needs sudo privilege.

But the alternative way is to install the chrome portable app. But to run a portable app you must have RUNZ framework

Follow the procedures in this link to install google chrome portable.

But I would recommend you to install the Google chrome with sudo permissions using the below commands

Add PPA to

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

Install Google chrome

sudo apt-get update
sudo apt-get install google-chrome-stable

Hope this helps

You can use the latest builds of the chromium project and use it directly without sudo. All you would need to do is to extract the zip they provide and then execute it using terminal. You can look for more information in this method at how-to-install-chromium-zip-file


How to solve the phpmyadmin not found issue after upgrading php and apache? Recently I have install the PHP, Apache, MySQL, phpMyAdmin, python in my Ubuntu Desktop 12.04.3 LTS to use it as a LAMP server. The commands I used to install these are given below:

1: sudo passwd
2: su
3: apt-get install php5
4: apt-get install apache2
5: apt-get install mysql-server mysql-client
6: apt-get install phpmyadmin
7: apt-get install python
8: apt-get install python-mysqldb
9: ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
10: /etc/init.d/apache2 restart

Then everything works fine. The LAMP server runs great. Then i thought to upgrade the whole LAMP server I mean the PHP, Apahce, MySQL, phpMyAdmin etc. Then I searched in google and get some ppa which got the latest versions of these softwares. Then I added those ppa. The ppa links:

1. https://launchpad.net/~tuxpoldo/+archive/phpmyadmin
2. https://launchpad.net/~ondrej/+archive/mysql-5.6
3. https://launchpad.net/~ondrej/+archive/apache2
4. https://launchpad.net/~ondrej/+archive/php5

Then is used these ppa and firstly upgraded the phpmyadmin then MySQL server then Apache and then PHP.
After upgradation of phpmyadmin and mysql server the whole LAMP server runs well with the updated mysql server and phpmyadmin. But after the upgradation of Apache and PHP the phpmyadmin is not showing up. When I try:

http://127.0.0.1/phpmyadmin

it says "Not Found".

How can I sove this problem with the phpmyadmin?? Please help me as fast as you can. I am in great trouble for this.

Thanks in advance.

Create a link in /var/www like this:

sudo ln -s /usr/share/phpmyadmin /var/www/

Note: since 14.04 you may want to use /var/www/html/ instead of /var/www/

If that's not working for you, you need to include PHPMyAdmin inside apache configuration.

Open apache.conf using your favorite editor, mine is vim :)

sudo vim /etc/apache2/apache2.conf

Then add the following line:

Include /etc/phpmyadmin/apache.conf

For Ubuntu 15.04 and 16.04

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload

you can also install this by manual process.

just download file to your web root folder.(/var/www/phpmyadmin)

for more Click Here
Download from here


What is the 'whoopsie' process and how can I remove it? On one of my machines I have a process running called "whoopsie". I'm running 12.04 server and never specifically installed anything with this name.

Google seems to imply that it has something to with error logs but I'm not finding too much information. The fact that I didn't manually install it and the 3 other servers I checked did in fact have no such running process OR executable made me a bit confused.

Does anyone know what the "whoopsie" process is?

Does anyone know what packages might have installed it? The server is quite plain, it has a LAMP stack, Samba and print servers and the Nagios NRPE plugin, nothing more installed, just standing there being a nice backup-server.

Some more info:

$ whoopsie -h
Usage:
  whoopsie [OPTION...]

Help Options:
  -h, --help           Show help options

Application Options:
  -f, --foreground     Run in the foreground

and

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
whoopsie   913  0.0  0.4  24448  2092 ?        Ssl  May07   0:00 whoopsie

and

$ sudo cat /etc/passwd | grep whoop
whoopsie:x:107:118::/nonexistent:/bin/false

What's whoopsie ?

It's the "Ubuntu Error Reporting" daemon, and is installed by default in both desktop/server installations.
When something crashes, whoopsie does two things:

Collects the crash report generated by Apport and
Can send them to Ubuntu/Canonical (specifically to https://daisy.ubuntu.com in BSON)

Whoopsie won't send your crash reports without your permission!

As Evan explains in his answer below, the actual transmission of crash data occurs only if you permit it via the graphical dialog (see below), or for a CLI server, explicitly run apport-cli.

How do I disable it on my desktop?

GNOME Shell (Ubuntu 17.10+)

Unity (Ubuntu before 17.04)

Go to Settings...Privacy...

And in the Diagnostics Tab, uncheck the Send Error Reports to Canonical option:

How do I disable it on a server or via the command-line?

Just change the report_crashes parameter to false in the /etc/default/whoopsie file.
Then bid farewell to whoopsie with sudo service whoopsie stop.

Whoopsie has a list of dependencies, and they are redundant without Whoopsie
Synaptic Package Manager does the trick

Search > Whoopsie

Mark for Complete Removal all the lib_* whoopsie related packages.

Apply

If you went the sudo apt-get -s purge whoopsie route, don't forget to
sudo apt autoremove after that to get all the packages flushed.

Suggest a sudo apt-get update after everything and then service --status-all to verify that 'whoopsie' isn't on your system.


Prevent user from executing a shell command How can I prevent a none root user to executes e.g. the passwd command in terminal?

To avoid a user from running the passwd command, just make it non-executable for everyone but root.

sudo chmod o-x /usr/bin/passwd

An odd request though. You usually want users to be able to change their password, and to do it regularly. Also, the passwd command isn't the only way a user can change their own password...

With sudo you most certainly know that the default setup will require the user running sudo to enter a password (by default the password of the user running sudo and not the root password).
In Ubuntu, if you wish to remove a user from the admin group, run this command in a terminal:

gpasswd -d username admin

Check it out:

id -Gn username

You should see something like that:

username adm dialout cdrom plugdev lpadmin sambashare

without the admin privilege.


New to UBUNTU, need a learning experience Possible Duplicate:
  How do I install Ubuntu?

I  am quite new to UBUNTU. I have just read a book on UNIX. I have no practical experience about working on Linux. Can anyone help me out on how do I go about,installing it on my machine(laptop). Which is presently running Windows 7.I am a bit worried about losing the previously important files, in case things go wrong.Yes, I am lagging a bit of confidence, to be specific.:p

You don't have to install it on your machine in order to try it. There's what are called "Live CDs" or "Live USBs" that you can boot from, run Ubuntu wihtout any modification to your existing system (unless, of course, you actively erase or modify your files), and when you reboot again the original OS comes back unmodified.

You can check this guide on the official ubuntu site on how to try ubuntu befor you install it.

The #Ubuntu-beginners and #Ubuntu channels in IRC are great, I hang out in there all day.  Always active.


No boot manager after new Ubuntu installation I just installed Ubuntu 12.04 on my C drive using the windows installer LTS. Windows 7 also resides on my C drive. The installation appears to have completed but I never did get the boot manager (GRUB) window at start-up. So my computer only boots to Windows 7. Also I no longer see my F8 or F12 boot options - not good! Thanks for any help in this!

In Windows 7 open an admin prompt and type:

bcdedit /enum all /v >bcd.txt

attach bcd.txt when posting back.

This will show all entries you have in Windows BCD (boot config data).

Wubi method of installation is using chainloading of Grub over Windows boot manager.
Ubuntu itself is placed in a virtual disk (a special file on disk).

You should have a

  boot sector loader

entry in BCD to chainload Grub.

First of all there would be no GRUB for UBUNTU install using WUBI i.e Window Ubuntu Installer.

At booting process of win7 you will see option as other os beneath of Win7. Press down arrow key to select that beneath option and u will boot to UBUNTU.

Hope this is what you are looking for


How do I arrange my windows automatically? Is there some equivalent of Windows' "Tile Windows" in Ubuntu?

If you're using compiz, you can enable the "Grid" plugin to use keyboard shortcuts to move windows around the screen in a tiling sort of way.
You'll need to make sure compiz-fusion-plugins-extra is installed (sudo apt-get install compiz-fusion-plugins-extra or use synaptic - probably software center too).
I got the tip from here: http://www.webupd8.org/2009/12/linux-w-compiz-tile-position-and-resize.html
You can do something similar without compiz using this: https://www.omgubuntu.co.uk/2010/08/python-window-organizer-organize-your-windows-using-the-keyboard
I don't think either of these options have an auto tile feature though. Using a default install, I'm not sure this option is anywhere (not anywhere that I know of anyway). In that case, some of the other answers already posted might be more useful.

I think you can use wmtile for your case: http://ostatic.com/wmtile/home/1


How to safely try KDE? There's a way to safely try KDE on top of an Ubuntu installation, keeping the possibility to revert the changes in case I dislike how it runs?

The absolute safest way to do that is to install it on a separate partition, but that's probably more work than you need.
What I'd recommend is to install Kubuntu. I'm not sure if that's really what you meant when you said "KDE on top of an Ubuntu installation", but Kubuntu is little more than KDE+Ubuntu. Just do:

  sudo apt-get install kubuntu-desktop

on any terminal window (it will install a ton of kde packages). By the end, you'll get prompted if you want to use gdm or kdm as login manager. It's OK to choose either one, but kdm will give you the full Kubuntu experience.

Next time you boot, just before logging in, choose KDE as your session manager. It will use the same $HOME and the same root folder, and thus you'll still have all the same programs installed, and their respective settings will be kept. I might be wrong, but I think only the settings stored under ~/.gnome2/ won't be loaded by KDE (they are gnome settings after all).

Finally, you don't really need to remove KDE after that. You can keep using gnome regularly, and never choose KDE again in the session manager. If, for some reason, you do want to really remove KDE (maybe you need to free up space), here's what you do:

  sudo apt-get purge kubuntu-desktop

kubuntu-desktop is a dummy package (you'll notice the removal process will be quick), removing this package will make apt consider all of the kde packages as unnecessary (since they were brought along by this one), so just do:

  sudo apt-get autoremove --purge

If you chose to keep gdm as your login manager, you can stop here. If you happened to choose kdm as your login manager back in the first step, you'll have to either reinstall gdm (it's technically already installed, so you can just reconfigure it if you know how) sudo apt-get install --reinstall gdm or reinstall kdm again sudo apt-get install kdm.

EDIT According to @AnwarShah the method above for removing Kubuntu doesn't actually work. I don't have an Ubuntu machine on which to test that right now, so I'll just provide an alternative method.

The command provided in this answer, should purge all traces of kde from your system. Before running it you should read all of the packages and make sure none of them had been previously installed by you! Make sure to remove the name of any packages you want to keep.
(Also, I haven't read through all of those packages, so I can't garantee anything regarding the commands effectiveness.)

Alternatively, you could keept track of all packages installed when you install kubuntu-desktop, and then just do apt-get purge on these packages. This requires the forethought of copying the list of packages back when you installed kubuntu-desktop (and remembering where you saved it), but it's a little safer to do.

My choice (since refurbished systems are really cheap ~ $200) build a test-bench with these! I have several test-bench systems that I install on - before installing or upgrading critical systems. I've tried the live CD, but I prefer the test-bench.


ping 8.8.8.8 works but ping www.google.com doesn't I'm running ubuntu server 16.04.2 and apt-get update returns temporary failure resolving "everything on the list".

When I ping www.google.com, it responds with unknown host.
When I ping with 8.8.8.8, I get packets sent with no errors etc.

I have tried every "fix" I can find in Ubuntu forums and all over the
   rest of the internet world and nothing works.  The resolv.conf is
   empty, ifconfig shows nic is functioning, firewall is off, and I
   threw away the hammer just in case.  Unfortunately, I am typing this
   on another computer on the same network but can't attach text from the
   various outputs to show whats going on. Need help on this please.

The resolv.conf file contains these lines:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search 8.8.8.8 8.8.4.4

The last line is placed their by the interfaces file when you reboot the system.  This is new for 16.04LTS.  I'm thinking Windows NT4 wasn't so bad and neither was Ubuntu Server 12.

You need a Name Server in your /etc/resolv.conf file.  Edit your /etc/resolv.conf and add a working Name Server.  Google provides  a free one, 8.8.8.8.

Do this:

$ nano /etc/resolv.conf

Place this as the first non-commented line:

nameserver 8.8.8.8

You can verify this functionality with:

$ ping -c10 www.google.com

You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head file.

The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted.  If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.

To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files.  The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head file.

This made the changes permanent and solved the problem of resolving domain names error message host not found.  It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well.  Thank you all for your supreme efforts in solving this puzzle.


Need to install Canon ip2600 printer using 12.04 Using 12.04 32bit; trying to setup Canon ip2600 printer.

When I try to install the Canon driver apt-get refuses to install it, instead replaces "libcupsys2" with newer "libcups2" creating a dependency problem since the Canon requires "libcupsys2". I have tried the standards:
sudo apt-get update, sudo apt-get clean, sudo apt-get autoremove,
sudo apt-get update && sudo apt-get upgrade, sudo dpkg --configure -a, &
sudo apt-get install -f but none make the printer work

I followed instructions at: http://ubuntuforums.org/showthread.php?t=1427098 to change the dependencys but that did not help, it generated error messages. Printer state is still: "idle - /usr/lib/cups/filter/gstoraster failed"

At this point I am wondering if I should "apt-get remove" the cups package.

Any help would be appreciated

After trying many things I finally stumbled onto this page which solved my problem:
http://www.ppsolution.net/en/articles/linux/ubuntu_driver_printer_canon_ip2600.pdf

I used the shell script method and the printer installed with no problems.
They have not only the explanation of the problem but the solution. They deserve some "attaboys".

I just installed Ubuntu on an Acer Aspire circa 2010 and a ThinkPad X61. I spent several hours trying to get my Canon Pixma iP2600 to work with advice from several sites. Some wanted me to type many terminal commands. None worked. Finally found this one, it’s simple, and works perfectly: http://handytutorial.com/install-canon-printer-driver-for-ubuntu-13-04-12-10-12-04/.


Dash, top panel and title bars of windows are not being displayed After logging in to my system, the dash, top panel and title bars of windows are not being displayed. I tried opening dash by pressing the window key but it was of no use.

On my desktop, I had two shortcuts to some folders I use regularly. Using it I was able to open the nautilus explorer which let me realize that also the title bars are not being displayed.

Despite the comment at the start of this answer, I tried it never the less. Surprisingly, it seems compizconfig-settings-manager was already installed on my system and the Ubuntu Unity Plugin and Enable OpenGL checkboxes were already checked. I may have installed it when this system used to be an older version of Ubuntu but I don't remember doing it.

I also tried the following (again expecting it to work against all odds).

unity --replace

But the issue persists.

I thought of trying to get a screenshot but it would just have been my wallpaper with the two icons or maybe the title bar less window of nautilus. I don't think it would have helped anyway.

This system used to be 14.04 which I had then upgraded to 16.04. It used to work fine up until yesterday. I don't know what happened now.

Really need help with this :(

Update #1

As I mentioned, I've already tried most of the solutions given against this question; None helped.

I have the same problem. Check this thread for fixes people have tried. Some of them seem to work for some people. But not for all. The problem is still unsolved and pending.
Ubuntu Forums

1.) I tried to clear the cache as suggested (terminal -> sudo rm -r ~/.cache), but i did not work for me.
2.) I tried to login as a guest, but the screen is still blank and i had to open console one by ctl+alt+F1 and sudo reboot.
3.) Opening a terminal by right click and then unity --reset or unity --reset-icons did not work either.
As of 3.) i get error messages in terminal, as is:
compizconfig - Error: Unable to find interface type 3 on 0x10065b0
[... ]
unity-panel-service stop/waiting
unity-panel-service start/running process 2798
start: Job failed to start
I am out of ideas now, as im not an expert for unity or desktop GUIs in general.

Need help with this too! I need my Computer/GUI...

UPDATE
Finally i found a solution, that worked for me (Ubuntu 16.04.04 LTS) !

rm -rf ~/.compiz-1 ~/.config/compiz-1
sudo shutdown now

reboot PC
Keep in mind this will delete your Dash customization :( But at least Dash and Menus are back now!


How to restart only missing/invisible mouse pointer/cursor? For some reason, the mouse pointer on my Ubuntu 10.04 PC disappears after the computer is woken up from suspend. That PC is missing a keyboard, so I can fix this by logging via ssh, and issuing:

sudo service gdm restart

... however, this basically restarts gnome, and will close any applications that may have been running.

Another way to solve this is to set up that PC as a synergy slave - and then move the mouse from the synergy master to the slave desktop; this brings the mouse pointer back.

Is it possible to run some command, such that I don't need to restart X (or gdm) but I'll effectively restart the mouse pointer code? Then I could put this into a script on the desktop, and be able to recover the mouse pointer after suspend without needing a second machine (even with the mouse pointer invisible, mouseovers on icons are still rendered, so I could target this icon).

this may fix the problem.

If you are stuck with no mouse movement on your laptop (touchpad) then press the key combinations Alt+F2 and type in

gksudo modprobe -r psmouse

Type in the password, press enter, and then press Alt+F2 again for entering the following

gksudo modprobe psmouse

Thats it. Your mouse pointer will start working again.

If you like to do it through the terminal, then type in gnome-terminal after pressing Alt+F2
When the terminal open up type the following

sudo modprobe -r psmouse

or

sudo modprobe psmouse

If your usb mouse is getting stuck, then use the following command after pressing Alt+F2

gksudo /etc/init.d/hotplug restart

If you are using a USB mouse, and are on location with the computer in question, then the first thing you should try is to unplug the mouse for a moment and then plug it back in.

Works for me every time.

I hibernate my computer each night and very occasionally upon awakening, the mouse pointer is missing but my USB keyboard works.


Error while installing netbeans I tried to install NetBeans 7.2 from a downloaded .sh file, but experienced problems. Here's text from the Terminal, which shows what I did and what happened:

hridesh@ubuntu:~$ cd Desktop/
hridesh@ubuntu:~/Desktop$ cd full\ netbeans\ 7.2\ for\ linux\ in\ .sh\ format/
hridesh@ubuntu:~/Desktop/full netbeans 7.2 for linux in .sh format$ chmod +x netbeans-7.1.2-ml-linux.sh
hridesh@ubuntu:~/Desktop/full netbeans 7.2 for linux in .sh format$ ./netbeans-7.1.2-ml-linux.sh
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Installer file /home/hridesh/Desktop/full seems to be corrupted

Why does the message Installer file /home/hridesh/Desktop/full seems to be corrupted appear? Is this file actually corrupted or something else going wrong?

The setup showed this error

Installer file /home/hridesh/Desktop/full seems to be corrupted

Since the full path being used is "home/hridesh/Desktop/full netbeans 7.2 for linux in .sh format" it would seem that the installer is having problem with such a complex folder name.

Renaming the folder "full netbeans 7.2 for linux in .sh format" to something simple like "netbeans_installer" should solve the problem the installer is reporting.

cd Desktop
mv full\ netbeans\ 7.2\ for\ linux\ in\ .sh\ format netbeans_installer
cd netbeans_installer
./netbeans-7.1.2-ml-linux.sh


Find number of files in folder and sub folders? I want to find the total count of the number of files under a folder and all its sub folders.

May be something like

find . -type f | wc -l

would do the trick. Try the command from the parent folder.

find . -name <pattern> -type f finds all files in . and subfolders. The result (a list of files found) is passed (|) to wc -l which counts the number of lines. -name <pattern> only looks for certain files.

I'd go with this option myself:

  ls -alR | grep -c ^-


Can't get Office 2010 to run under Wine I can't get Microsoft Office 2010 Home and Student to install on Ubuntu 12.10 under the latest version of Wine. I've tried both the 32- and 64 bit installers but they both fail about two thirds of the way into the installation.

How can I install Office 2010 using Wine?

i finally make working office 2010 and 2013 boths versions of 32 bits, 64 bits i don't know why no works, but i explain the two ways of install both. first you need the installers of office 2010 professional plus. later follow the steps, dependences and architecture of 32 bits.

sudo dpkg --add-architecture i386

remove all wine do you have

sudo apt remove wine*

later install from repositories

wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt-get install --install-recommends winehq-devel
wine --version
sudo apt install winetricks

later of this installation you need prepare for install office

first setup with

WINEARCH=win32 WINEPREFIX=~/.wineoffice2010 winetricks dotnet20 msxml6 corefonts

this install gecko and mono, you need install them, later install office with the setup

WINEPREFIX=~/.wineoffice2010 wine Download/office/setup.exe

and finally test word, excel and others, for me working in ubuntu 18.04 and working good

Here is a video of someone who has Office 2010 installed on Ubuntu 10.10.
http://www.youtube.com/watch?v=QcPpn_Ugs2o
In the description, he writes:

  Ubuntu 10.10 PL, WINE 1.3.17, MS Office 2010 PL

  Winetricks: dotnet2, msxml6, Visual C++ 2005.

  Original urlmon.dll (ie6 version - from Google, ie7 version will not
  work ), Original msvcr90.dll (from Google)

Otherwise, you'll find even a tutorial here: http://appdb.winehq.org/objectManager.php?sClass=version&iId=17336


mount an .iso converted from .bin please how do I mount an .iso converted from .bin?
the .bin had no .cue si I created one the lines of the .cue file:

FILE "file.bin" BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00

I used command bchunk Setup-1a.bin Setup-1a.cue Setup-1a
when trying to mount my .iso file using mount Setup-1a01.iso /mnt/iso

mount: you must specify the filesystem type

than I tried mount -t iso9660 Setup-1a01.iso /mnt/iso/ but

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Thank you for your help

try this:

mount -o loop Setup-1a01.iso /mnt/iso


How can I allow unprivileged users to shutdown from the panel? (no sudo) I set up an old PC with Edubuntu 12.04 for my girls, with an admin account for myself and normal user accounts for both of them. Unfortunately, they are not able to shut down the computer by themselves with this configuration. Choosing shutdown from the (Unity) panel menu will log them out, but that's it. How do I give them shutdown privileges?

Please note that they are 5 and 7 years old and just starting to find their way around a computer. Solutions that would require them to open a terminal and sudo whatever are not helpful -- and I don't want them to be able to sudo anything, anyway. I need the panel menu entry "Shutdown" to work for them.

Okay, I found it: The answer was actually very simple. Another user session was still open. My girls had just switched accounts instead of logging off. Of course, an unprivileged user issuing a shutdown command does not have any right to terminate another user's session, like a 'sudo shutdown' would.


How do I restart the network interface? I have recently switched from Windows 10 to Ubuntu, but am now unable to connect to the internet. I've been told that it's because my network adapter isn't being recognized (or something like that), and here was step I followed:

https://www.swiftstack.com/docs/install/configure_networking.html

I went through Changing the network configuration, and now I'm stuck at the last bit, restarting the interface. How do I do that? Do I input the command included into the terminal, the etc/network/interfaces file, or GUI?

Internet connection issues are common for dual-booted Windows/Ubuntu. Here is another recent thread with a similar issue (Ubuntu (dual boot Windows) Ethernet Not Connecting/Detecting). If you hadn't already started the procedure you linked to, I would have suggested simply turning off your computer and then turning it back on. To clarify, because people still get this confused, I am not talking about rebooting/restarting. I mean a full shutdown where you have to physically turn your computer back on. I am going to guess that this issue occurred after using Windows. Usually going from Ubuntu to Windows doesn't have this issue.


Can anyone tell me how to get the same Gnome desktop environment as the one in the photo? I have been using gnome fallback for more than a year, but recently I have come across this image:

However, when in virtual machine (new copy of ubuntu 12.04) I change to gnome 3 shell, the desktop is not even similar to the one in the photo above. I am wondering if there are others things that I am missing/have to do....to get to the same thing (or similar) that you can see in the image above.

NOTE: Here is a screenshot from the virtual machine after I used these commands:

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell

ppa:gnome3-team/gnome3  (Click here for instructions on using PPAs.)

You have to install VirtualBox Guest Additions in order to use Gnome Shell. There is no need to add any PPAs. Gnome Shell is in Ubuntu. But it requires hardware accelerated graphics, which isn't available until you install the Guest Additions.

I think installing gnome3 will do, if it doesn't bother you, however, you can install ubuntu gnome remix 12.10.1, which comes with gnome for default and doesn't leave all those nasty unity plugins or programs installed.


Can't change keyboard layout on login screen When the PC wakes from locked state and I try to change keyboard layout on a login screen, it flickers revealing the desktop but the layout isn't changed. Everything worked fine on 15.04. Any idea on how to fix this?

I don't know how you can fix it, but I know that because I have the same problem. For temporary solution you can do this:

Press Alt+Ctrl+F1(or F2, F3, ...)
After login type this: export DISPALY=:0
Type xdotool type {your password}

This tools (xdotool) type the required information on X and the problem (for login) can be solved in this way. I hope the Ubuntu team solved this problem permanently!

this bug on LP

floating bug. He played for many years. There is no solution.

additionally Fixed a few days ago


How to remove typed-in URLs from browser history in Firefox? I know I can remove visited pages from the history via History→Show all History, and simply mark the unwanted entries plus hit the Delete key. But this seems not to remove the URLs I've typed into the address bar when calling up those pages. So they are still used to predict the URLs I want to type in later. Especially with sites one heavily frequents (like here on the StackExchange network), this clutters up the list of suggested URLs.

Is there any way to remove the "typed URLs" from the browser history completely? Preferable with some easy clicks for the end-user -- but I wouldn't mind doing so via command-line if necessary (e.g. modifying Firefox's sqlite databases directly).

Edit: Thanks to Dan's answer a part of my issue is explained -- and I found out I missed to fully describe it. Until reading Dan's explanations, I didn't see some of the details.

So let's say I've visited http://readwrite.com/somearticle and http://readwrite.com/otherarticle. And of course a lot of other pages having an "r" somewhere in their URL. Now, on an empty urlbar, I type an "r". Immediately, auto-complete fills that up with "readwrite.com" (not one of the full URLs), and the drop-down shows a bunch of other pages (but none from readwrite.com).

Dan's first method doesn't work, as the auto-completed string is not contained in the dropdown
Dan's second suggestion (switching auto-complete off altogether) is no option for me, I just want to get rid of some specific "suggestions"
I have no matching bookmark (to be more specific: none for readwrite.com)

So how to get rid of that "readwrite.com" suggestion? I've checked the entire history and made sure there's no entry left for it. I've also checked my bookmarks, no traces there either.

As all things accessible via Firefox's default interface seemed to fail, I decided to take the "deep-dive" approach. So I installed the SQLite Manager plugin, opened the places.sqlite file from within my firefox user profile directory (Menü: Database → Connect Database), and checked the moz_places table (select it in the left pane of SQLite manager) via the search function (in the big right pane: Tab Browse and Search, there the "Search" button) for the "offending" url. The corresponding SQL-Statement (for the Execute SQL tab) would have been:

SELECT * FROM moz_places WHERE url LIKE '%readwrite.com%';

For users prefering the graphical way:

Screenshot of the search filter (click image to enlarge)

As it turned out, there was exactly one hit with a full URL, which did not show up when filtering the browser history/bookmarks! So I took the freedom to delete that record, and tried my urlbar again: Yeah, looks like that solved the issue! But why so difficult, Mozilla?

EDIT: Keep in mind that "operating directly at the heart" you might "kill the cat". Be careful modifying Firefox' databases directly -- or you might end up with inconsistent bookmarks or worse! Always cross-check before deleting, for example.

I had the same annoyng issue, everytime I start typing ww..... then the stored web adresses appear... not serious, but very VERY annoying.  I use Firefox.

I went onto the Firefox website and looked in HELP, I finally solved this.

In the URL bar type : About:config  (and promise to be carefull !)
locate : Browser.urlbar.default.behaviour  (this value is probably 0)
double click this, so that you can modify it, and change the 0 to 33.
close this page
Your problem should be solved, it did for me.

Thank you Firefox !


CMAKE 3 binary package for PRECISE Does anyone know where this package would be available? I am looking to use it on Travis-CI so building from sources takes too long and is not an option.

a dpkg would suffice if you know where to find it.

CMake 3.2.2 is available for Precise in this PPA:

ppa:george-edison55/precise-backports  (Click here for instructions on using PPAs.)

You could download them from cake. com and extract them from the mouse menu, and follow the inot all ation file, and you could use these command to install it enter in the terminal this:

  sudo su <the sh files>

Or this.

  jhbuild <the installation file>

and this After any of the others.

  make <the cake installation file>

and to install jhbuild type this in.

  sudo apt-get install jhbuild

and after one of three upper type this in.

  make

and it might work fine this way.


Play tracks from a FLAC file Is there any music player to show tracks of an album when a single FLAC file is played?

cuetools can split the album file into song files, but I do not want to change the FLAC single file. I just want to play the entire album when individual tracks are distinguishable.

I recall playing files/archives with embedded cuesheet information in Amarok 2.x a few years ago, but I gave up on this esoteric approach to archiving as well as archaic and naive attempt to tagging recordings that isn't very popular outside of certain piracy forums.

(Realize that there do not only exist bands and individual artists or projects for eternity who produce songs/recordings with names covered by the latin alphabet of only one particular genre, but that there is a lot more that can and should be covered with metadata if you are still collecting recordings and want to make the most out of your personal collection. Just look at lineup changes and forming of superbands or subgroups to get a glimpse. Just stuffing artists somewhere that won't fit anywhere else due to limited tagging capabilities is the wrong approach. 1, 2, 3)

Related: Foobar2000-like music player?