gedit plugin to highlight all instances of selection Using gedit 3, I've tried multiple plugins to highlight all instances of the current selection (a la Notepad++):

https://code.google.com/p/smart-highlighting-gedit/

https://github.com/mmuell23/mmuell23

The smart-highlighting will seem to install and let me activate it, but doesn't seem to actually do anything.

The one at github was written for v2.  To try to hack it into v3, I've tried:

change .gedit-plugin to just .plugin
edit IAge=2 to read IAge=3

That one still won't load (doesn't appear in prefs->plugins list).  Doesn't throw an error, just doesn't load.  I also can't find the gedit logs anywhere to see if there's a helpful message (I'm relatively new to Linux).  I checked /var/logs/ but there's no gedit.

Can anyone help?  I just want the auto-highlighting to work.

You don't need any plugin to highlight all instances of a selection in gedit. Select the text about you are interested in, then just press Ctrl+F (to search all instances of that selected text):

Now, let me give you some explanations about those plugins. First one, smart-highlighting is working like a charm for me. How I made:

First I checked my gedit version (from terminal with gedit --version command) - it's 3.6.2.
Because my gedit version is 3.6.2, I downloaded smart-highlighting-3.0.5.tar.gz.
Finally, I followed the manually installation method.

Second plugin, it's for gedit2.x and finish. It's not enough a simple hack like you tried.

[UPDATE]

Only works if installed to ~/.local/share/gedit/plugins/.  More in comments.

This plugin does what you want, just follow the instructions in there: https://github.com/mmuell23/mmuell23


From where can I download Ubuntu 12.04 From where can I download Ubuntu 12.04 only. Not even 12.04.*.

I want only 12.04 LTS. I tried to download from Ubuntu CD Images, but there is only 12.04.3

Because 12.04.* and all later versions has lots of critical bugs, like:

Wi-Fi hotspot doesn't work
USB 3G Datacard doesn't work
When I connects to any Wi-Fi network all other connected system on same Wi-Fi network doesn't access internet even network printer. This is unbelievable, but its happening!
Startup Disk Creator doesn't work
Empathy doesn't connect to any account properly
and many things

  All later versions of Ubuntu are totally worst.

Here are the direct links to download Ubuntu 12.04 (just 12.04) 32- and 64-bit:

Ubuntu 12.04: PC (Intel x86) desktop CD
Ubuntu 12.04: 64-bit PC (AMD64) desktop CD

I got these by first navigating to http://old-releases.ubuntu.com/releases/, then clicking on 12.04.0 in the directories at the bottom. The page will say 12.04.2, but you can scroll down and get links to everything else (12.04, 12.04.1, 12.04.2).

They really need to sort out those directories. It's like a maze!

I found this link searching for the same version:

http://mirrors.ustc.edu.cn/ubuntu-old-releases/releases/12.04.0/


Installing Epson Printer but Interrupted by lsb Dependency Error I am installing the Epson XP-310 driver from this website.

When I attempt to install the downloaded .deb file, I get the following error:

The Package System is broken

epson-inkjet-printer-201303w:i386: Depends: lsb(>=3.2) but 4.1+Debian11ubuntu is installed

I'm very confused. It says I must have lsb version >=3.2 but I have 4.1.
Why am I getting the dependency error?

I had the same problem with my Epson WF-3520 and the driver from the Epson-Website. This solved my problem:

Try, to make sure the damaged driver will be removed:

sudo apt-get -f install

And then install the driver from the package manager

sudo apt-get install printer-driver-escpr

I installed the package "printer-driver-escpr" version 1.3.0-1 with the package manager and the driver works for me with the Epson WF-3520.

Now, try to install your epson printer.

I coldn't get my Epson to print under Ubuntu 16.04, so I worked around this by doing a manual install of the LSB:

Note that I got the files from the br server as a live in Brazil, you may get from another server that suits you best. Another note is that I got the _amd64.deb versions, you may need _i386.deb if you're running under a 32 bit enviroment, if that's the case consider that the _all.deb remain unchanged.

Files required:

from ftp.br.debian.org/debian/pool/main/libj/libjpegturbo:

libjpeg62-turbo_1.4.80-115-gfb907b2-1_amd64.deb

ftp.br.debian.org/debian/pool/main/l/lsb:

lsb-core_4.1+Debian13+nmu1_amd64.deb
lsb-cxx_4.1+Debian13+nmu1_amd64.deb
lsb-desktop_4.1+Debian13+nmu1_amd64.deb
lsb-graphics_4.1+Debian13+nmu1_amd64.deb
lsb-invalid-mta_4.1+Debian13+nmu1_all.deb
lsb-languages_4.1+Debian13+nmu1_amd64.deb
lsb-multimedia_4.1+Debian13+nmu1_amd64.deb
lsb-printing_4.1+Debian13+nmu1_amd64.deb
lsb-release_4.1+Debian13+nmu1_all.deb
lsb-security_4.1+Debian13+nmu1_amd64.deb
lsb_4.1+Debian13+nmu1_all.deb

Then I used gdebi to install the packages:

sudo gdebi *package*

starting with libjpeg62turbo and then following by:

sudo gdebi lsb*

It constantly yelled at me complaining about dependencies, when it asked I installed that package first, and tried that last command again. After the process was over I could install my Epson printer trouble free and it works perfectly.

if gdebi is not installed:

sudo apt-get install gdebi

Someone more skilled than me can streamline the process... If I could check the order that the packages need to be installed I could write a script that does this process automagically. But it'll have to wait because right now I can't uninstall all of that and disable my printer in the process.

Cheers.


How do I setup dual monitors in XFCE? I've got an laptop with a intel chip, and I'd like to setup dual monitors in Xfce.

How do I do this?

First, open up monitor config - it's in Start > Settings > Settings Manger, then open the Display item.

Make sure both your displays are on.

Then, open a terminal and run this:

xrandr

The output will look something like this:

Screen 0: minimum 320 x 200, current 2464 x 900, maximum 4096 x 4096
LVDS1 connected 1024x600+1440+0 (normal left inverted right x axis y axis) 220mm x 129mm
   1024x600       60.0*+   65.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 408mm x 255mm
   1440x900       59.9*+   75.0
   1280x1024      75.0     60.0
   1280x960       60.0
   1280x800       74.9     59.8
   1152x864       75.0
   1024x768       75.1     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        72.8     75.0     66.7     60.0
   720x400        70.1

Then, run the following, changing VGA1 and LVDS1 to match the appropriate display:

xrandr --output VGA1 --left-of LVDS1

Note that you can move change --left-of to --right-of.

Now, it should work, but you've still got one problem.

It will disappear after you logout. So, you need to add it to your login items.

Head over to Start > Settings > Settings Manger, then open "Session and Startup", add the above command to your login items, and you're good to go!

Yes, Xrandr and/or the version 4.12 gui for the display settings will enable you to switch positions of monitors, and it is possible to have the panel with its applications menu on the right-hand monitor. However, desktop icons will still appear on the left-hand monitor.

It would be good if Xfce would implement something like the FolderView setting in KDE, whereby you can have the primary monitor on the right (with its panel and desktop icons).


Compatibility with Apple Devices and Printers I am a Windows user from the past 8 years. So, I am new to this Linux interface.
I would like to know whether Apple devices like iPhone,iPad can be connected in Ubuntu.
And also I have a HP(Hewlett-Packard) Deskjet Printer. So, I would also like to know whether these type of printers work with Ubuntu.

HP printers works with Linux, as dos other HP devices. As for Apples iPhones, iPads etc well sometimes, some of the mediaplayers have more support than others, try googling your devices with reguard to linux/ Ubuntu.


Simple way to connect Ubuntu Mate to Mac? I have a new Apple Macintosh computer and I am trying to find a way to send files back and forth from my Ubuntu Mate laptop. I have no Windows machines in my network. I don't know much about modern Macs.
I have turned on File sharing on the Mac and have done the funny thing about the password:

In System Preferences->Network->WiFi->Advanced...->WINS
I have set the Workgroup to "HOME".
In caja on the Ubuntu Mate, I can use the Browse Network bookmark and the name of the Mac appears. If I double-click on the Mac's icon, I get a dialogue box that says:

I correct the Domain name to the workgroup that the Mac is using, type the password of my user on the Mac and click "Connect".
The dialogue box goes away and then comes back with the Domain name reverted to WORKGROUP and waits for the password again. (N.B. I notice that the Mac username has a capital B. Important?)
Am I doing something wrong?
Is there a simpler way of doing file sharing between the two computers?
Later: Samba is running out of the box (I think) on the Ubuntu Mate. After I had edited /etc/samba/smb.conf to use HOME as Workgroup, allow access to users home directories and then restarted smbd and run the smbpasswd command, I was able to access my files on UM from the Mac.
I wasn't really expecting that file sharing would not be a GUI activity.
I'm still failing to connect to the Mac from UM, so more info later.

What is missing from your description is adding your Mac user to the smb password database on the Mac.
After you go to Sharing > enable File Sharing click on the Options button > then enable your Mac user name.
Now go back to caja and enter the Mac users password.
Don't obsess about the workgroup / domain.

Try installing Samba on your Ubuntu MATE machine, and sharing folders to your Mac that way. Also, you don't need a dedicated Samba server. Just using your existing Ubuntu MATE machine will do.
Though you will need your Ubuntu MATE machine's local IP address in order to connect your Mac to it (and they will both need to be on the same network. Just open up a terminal and type ip a. The (local) IP address you want will be under the interface beginning with either "enp" (if you are using Ethernet) or "wlp" (if you are using Wi-Fi).


Is there any possible issue with changing the boot order often? After going through many Q&As online, I have managed to install Ubuntu 12.04 along with Windows 8.1 (pre-installed). Though, its not complete,  I am happy with it (after trying it for almost 2days). But, I have a question.

Now, when I boot the PC, Windows 8.1 is automatically booted (no prompts to choose OS) and if I want to boot Ubuntu, I need to press f12 (I am using Acer V3-772G) to change the boot order and thus, I am able boot Ubuntu. This approach works perfectly fine for me.

But, I want to switch between Windows and Ubuntu often. My question is,  what are the consequences (or issues) of changing boot order often. will it corrupt my HDD or any other devices.

My PC configuration:

120 SSD: Windows 8.1 (C:\)
1TB SATA HDD1: D:\
1TB SATA HDD2:  Ubuntu 12.04 LTS

Note:
I tried boot-repair several times with no luck (I am getting grub-rescue>). So, I decided not to use that.

Changing the boot order frequently won't have any bad effect on your hardware, it will not corrupt anything.

You can use an easy-to-use the GUI application called Grub Customizer to make your life a little bit easier. As the name suggests, you can do much more than just reordering GRUB menu entries with it.
You can install it by:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

source
Another Method(CLI)
1: Determine the order of the OS you’d like to boot in GRUB
Restart your computer. When it boots again, press one of the directional keys (up or down) when the GRUB menu appears. Write down the line number of the OS you’d like to boot(start from 0)
2: Open the GRUB config file using the terminal
gksudo gedit /etc/default/grub

Locate the GRUB_DEFAULT setting. Delete the value that appears there (by default, 0) and replace it with the number you wrote down in step #1.
Once you’re done, save the document and close it.
3: Update GRUB
sudo update-grub


External Sitecom Wi-Fi antenna fails to connect to network I let the external Sitecom Wi-Fi antenna to works, since the Ubuntu setup.
So the connection has worked properly for many days... until it began to fails, despite all Wi-Fi networks are recognized.

As I had to force some update with Synaptic (mainly regarding kernel, updated to 3.13.0-45), I tried to switch to the previous one (3.13.0-31), but the issue wasn't solved.

I'm not sure if it's a consequence of a bad update, but I did this test.

Please help me, my mother needs a stable and "online" PC as it was in the first days, I won't to do newly an OS reinstallation.
Thank you

If you are connected to the internet, try sudo apt-get update. It will ask for your user password, so no worries. Then, sudo apt-get upgrade. Password again.  Try that first as it may just need to update or upgrade your software. Keep us posted.

Have you tried connecting to the Internet via the ether net port? See that works attempt updating as Anthony suggests.


Computer is running slow with Ubuntu Possible Duplicate:
  How can I speed up Unity with an ATI card?

Why my computer runs too slow when I install Ubuntu or any other Linux (Debian works better than other distros), but with windows works fine...?

My configuration is:
Processor: Intel Celeron CPU 1.70GHz
Graphics: Ati Radeon 9250 128 MB
HD: Western Digital 120GB
RAM: 2GB DDR1
Motherboard: MSI (MS-6566)

Is there anything unsuported by Ubuntu, or any Linux. If so, is there any way to get it work fine (visual effects are not important to me). What do I need to do?

Ubuntu 11.10 and beyond play well with at least a Dual-Core processor. I recommend you trying some lighter editions, such as Xubuntu, or Lubuntu. Other derivatives from Ubuntu might be elementary OS, (beware as stable release Jupiter 0.1 is outdated, but I still use it on netbooks), or Linux Mint, which you may try the new LXDE version (faster but less eye candy). Good luck! ;)

Also, by hardware I may suppose you are talking of Windows XP, which in that case, minimum requirements are similar to the ones on Lubuntu. Ubuntu 11.10 is slightly heavier for your graphics in comparison to Windows 7 Home Premium.

The problem is Compiz - it's a resource hog.  Recent versions of Ubuntu [Desktop] use Compiz which requires a fairly recent CPU & GPU (within the last 3 years) to behave well, otherwise you'll notice severe choppiness and general "slowness."  This was my experience with a Pentium 4 and an AGP Radeon.  With Ubuntu versions prior to 11.04 I had no problem with that older hardware, but as soon as I upgraded to a version using Compiz that older hardware just became unbearable.  I built a new computer with a core i7 and Radeon 7870 and now Ubuntu 12.04 is responsive and snappy.  Your Celeron and Radeon 9250 are probably not powerful enough to run all the Compiz eye-candy so you may want to try using a version/distro of Linux that doesn't depend on Compiz, otherwise consider upgrading your hardware.


Installing a theme for rEFInd and finding rEFInd file MAC So I am attempting to add a theme to rEFInd, as I don't like how it looks, but I am a complete newbie when it comes to terminal and looking for usually hidden files.  This is the theme I'm trying to use: Minimal Theme, and this is how you are supposed to install it:

   # cd /boot/EFI/refind/
   # git clone https://github.com/EvanPurkhiser/rEFInd-minimal
   # echo "include refind-minimal/theme.conf" >> refind.conf
   # systemctl reboot

Anyways, I have installed rEFInd correctly (I hope, as it said install complete) but I cannot find where it is supposed to be.  locate refind.conf to no avail. Every time I tun the command above, I get cd: /boot/EFI/refind/: No such file or directory making it so it won't correctly install.

And one last question, I ran diskutil list and it said I have two EFI disks (is that what it's called?). Is that normal? Any other tutorial I look out, they only have one EFI.

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            700.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:        Bios Boot Partition                         3.1 MB     disk0s4
   5:                 Linux Swap                         1.0 GB     disk0s5
   6: 0FC63DAF-8483-4772-8E79-3D69D8477DE4               298.3 GB   disk0s6
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS FreeAgent GoFlex Drive  499.8 GB   disk1s2

I really hope all this made sense, I am just a complete newbie to all of this.

From OSX, do the following

Start by mounting your EFI partition.

sudo mount -t msdos /dev/disk0s1 /Volumes

Then cd to the rEFInd directory on that partition
cd /Volumes/EFI/rEFInd

Download the theme with Git

git clone https://github.com/EvanPurkhiser/rEFInd-minimal

Now add the theme info to refind.conf

echo "include rEFInd-minimal/theme.conf" >> refind.conf

Reboot with sudo reboot

ReFIND Minimal Theme on Mac OS X Yosemite

In Terminal...

$ cd /Volumes/ESP/EFI/refind
$ git clone https://github.com/EvanPurkhiser/rEFInd-minimal
Cloning into 'rEFInd-minimal'...
remote: Counting objects: 182, done.
remote: Total 182 (delta 0), reused 0 (delta 0), pack-reused 182
Receiving objects: 100% (182/182), 3.35 MiB | 6.32 MiB/s, done.
Resolving deltas: 100% (74/74), done.
Checking connectivity... done.


How portable is Ubuntu If I take the hard drive out of the existing pc and install it in the newer one will it boot up okay?  Will it automatically detect and load the drivers for the new hardware?

Yes. Even if it was not a SATA interface you'd be fine.

1 thing you need to do: delete any 3rd party drivers before taking out your hard disk. The main one is the video card driver. And also delete the NIC 3rd party driver if you are using one currently.

Ubuntu will reset all drivers during booting and will use those that are needed for your system. After booting upgrade the video card driver if you want the 3rd party one.

Delete /etc/udev/rules.d/70-persistant-net-rules and reboot to detect your new netwok card (the card has a new nac address)


RandR extension missing When I try to run xrandr on Ubuntu 17.10 (artful) with xfce 4.12 over VNC I get the error

RandR extension missing

I've tried installing libxrandr2 but it's already installed.  When I run lxrandr I get the error:

Xlib: extension "RANDR" missing on display ":1.0".

I'm using tightvnc as the VNC server.  I've tried all the usual sudo apt-get repair things.

When I do

sudo apt-get update
sudo apt-get install x11-xserver-utils

I'm told that the package is already the newest version.

Try installing the development version of randr:

sudo apt-get install libxrandr-dev


GRUB booting problem I'd Ubuntu 11.04 32 bit installed via wubi on windows 7 64 bit. The installation was a success. I'd either access Ubuntu, or windows 7 on the boot option of my computer. i made use of both OS for months until when i'd only access windows 7. whenever i click/select the Ubuntu tab, it goes straight to GRUB. Displaying;

GRUB Version 1.98+20100804-5
 Minimal BASH-like line editing........
GRUB> _

I'm a rookie at this.
Please help!

The most likely cause of ending up at a grub prompt, is that the Wubi virtual disk has been corrupted i.e. the file C:\ubuntu\disks\root.disk (it may also be on a 'drive' other than C:) This can occur from performing hard shutdowns on your computer or power failures.

You should first run chkdsk on the drive that contains your Wubi install. Then you will need to confirm that the root.disk is still present or recover it from the \FOUND.000 directory that chkdsk recovers to.

Refer to this for specific instructions: http://ubuntu-with-wubi.blogspot.com/2011/08/missing-rootdisk.html

To avoid problems like this, avoid hard shutdowns - even if your Ubuntu install is hanging, try Alt+SysRq R-E-I-S-U-B to reboot safely.

I think your grub is partially broken and it is easiest to install grub to correct the problem. Boot into ubuntu using liveCD. You can find a very detailed info on grub/grub2 in https://help.ubuntu.com/community/Grub2 page.


How to let `dpkg -i` install dependencies for me? Say, I have foo-1.2.3.deb which depends on perl and python, however, running command:

dpkg -i ./foo-1.2.3.deb

won't install these dependencies. So I must apt-get install perl python by hand.

How to make dpkg -i install these dependencies for me automatically?

After using dpkg, running the following command helped me to install the required dependencies:

sudo apt-get -f install

In all, your terminal should look like this:

$ sudo dpkg -i package_with_unsatisfied_dependencies.deb
dpkg: dependency problems prevent ...
[additional messages]

$ sudo apt-get -f install
[apt messages]
Setting up [dependency]...
Setting up package_with_unsatisfied_dependencies...

Notice the line about Setting up package_with_unsatisfied_dependencies. This fixes (and completes) the installation of package_with_unsatisfied_dependencies.deb.

Actually the answer is that dpkg package manager cannot install dependencies out of the box. You cam man dpkg and found that out. So you need to use tools like apt, apt-get, aptitude, ..., based on dpkg.

I would say just the same case is for the rpm package manager on the other Linux hemisphere. rmp is not meant to do dependency based installs. It can install single packages, and for installing the dependencies you use yum, urpmi, up2date these are all based on RPM.

As noted there is a slight danger installing packages with dpkg directly, because later dependency resolution resolving may end up with a broken system as @Rinzwind outlined.


PKG_CONFIG_PATH environment variable Consider adjusting the PKG_CONFIG_PATH environment variable if you
  installed software in a non-standard prefix.

What does this mean ?

PKG_CONFIG_PATH is a environment variable that specifies additional paths in which pkg-config will search for its .pc files.

This variable is used to augment pkg-config's default search path. On a typical Unix system, it will search in the directories /usr/lib/pkgconfig and /usr/share/pkgconfig. This will usually cover system installed modules. However, some local modules may be installed in a different prefix such as /usr/local. In that case, it's necessary to prepend the search path so that pkg-config can locate the .pc files.

The pkg-config program is used to retrieve information about installed
libraries in the system. The primary use of pkg-config is to provide the necessary details for compiling and linking a program to a library. This metadata is stored in pkg-config files. These files have the suffix .pc and reside in specific locations known to the pkg-config tool.

To check the PKG_CONFIG_PATH value use this command:

echo $PKG_CONFIG_PATH

To set the PKG_CONFIG_PATH value use:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig

or

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

I was trying to install the latest version of axel and I ran ./configure and I got this:

configure: error: Package requirements (openssl) were not met:

No package 'openssl' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SSL_CFLAGS
and SSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

So I tried:

$ pkg-config --cflags openssl

and I got:

Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openssl' found

As obvious I had openssl installed (sudo apt-get install openssl) But on the above output as you can see it states "No package 'openssl' found".
So to make sure I did:

find / -type f -name "*.pc" |& grep -iv permission | grep openssl

Turns out I need some other package for sure, so a little googling and I found that I had to install this package:

sudo apt-get install libssl-dev

And all this had nothing to do with changing pkg-config path env variable.


Ubuntu 12.04, PCI, and CVE-2015-5352 PCI compliance will fail when the CVE-2015-5352 vulnerability is present. OpenSSH 6.9 fixes this vulnerability, but none of the supported versions of Ubuntu (12.04, 14.04, 15.04 and 15.10) have been patched.

What is the best way to address this vulnerability?

I am experiencing the same issue. While I await a fix from ubuntu I have also decided this is an issue I would address with my CSA; for the following reason.

If I understand the issue presented, the issue only arises if a root user on the affected computer is allowed to forward X11 connections. In my environment, the same root users on the affected computers have access to root on any system reachable from that computer, hence, if they were to conduct malicious activity, this potential vulnerability would neither help nor hinder that user.

Secondly, if the problem depends upon the ability to forward X11 connections, then shouldn't disabling this feature with "ForwardX11Trusted no" and "ForwardX11Timeout 0" be a proper configuration fix? This is my current configuration and as I have no X11 installs, seems to fit.

I found this blog article that listed the steps for manually installing OpenSSH 6.7. I followed the instructions, using OpenSSH 6.9 instead.


Using VAAPI to play 1080p videos? How can I use VAAPI to play 1080p videos with hardware acceleration in Ubuntu?

For an Intel card  install the i965-va-driver and vainfo packages. After that, issue the vainfo command, you should get something similar to this:

$ vainfo
libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Install your drivers for your video card, download xvba-video from http://www.splitted-desktop.com/static/libva/xvba-video/ if using ATI card install vlc from this ppa https://launchpad.net/~dtl131/+archive/catalysthacks


Desktop login sound doesn't play after login I've been looking around for a solution for this, but didn't found it.

I remember that from USB (Live Session) Ubuntu had all its sounds. But after installed and after login, desktop-login sound never play.

I've been looking at dconf-tool without success. Any idea?

Rather than deleting the whole .dconf folder, just open dconf-editor and navigate to:

org.gnome.desktop.sound

Change the value of "theme-name" to "ubuntu"

Also check to make sure that "GNOME Login Sound" is checked in "Startup Applications".

I've also filed a bug about this:

http://pad.lv/883677

Take a look at this post at Ubuntuforums : Oneiric Login Sound

This workaround solved the problem for me.
Attention : Deleting that folder you are going to miss some of your configurations such as unity launchers , desktop background...


Enable AMD-V (virtualization) I have an AMD E1 1200 dual core processor.
I'm trying to start a virtual machine with Oracle VirtualBox but am having errors.

Is there a way to check that my CPU supports virtualization and is enabled? If so, how do I turn it on?
Below is all the steps I've taken thus far including the error message pasted at the bottom of this message

I opened up the system settings in BIOS and under system configurations looked for an option to enable virtualization but could not find one in any of the BIOS menus.

I downloaded "Speccy" by piriform to see what it could ascertain. It is saying my system both supports virtualization and that it is currently enabled.

I then tried to confirm that the CPU was virtualization enabled with AMD virtualization technology and Microsoft Hyper-V Compatibility check Utility available from AMD support. This software is telling me that my system is not virtualization enabled contradicting the message from Speccy.

I also tried loading the virtual machine with only 1 processor because some individuals on Super User stackexchange forums said that solved their problem but no such luck for me.

ERROR MESSAGE

Failed to open a session for the virtual machine XXX.

AMD-V is disabled in the BIOS (or by the host OS). (VERR_SVM_DISABLED).

Result Code: E_FAIL (0x80004005)Component: ConsoleInterface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

Step 1

Reboot the computer and open the system's BIOS menu. This can usually be done by pressing the delete key, the F1 key or Alt and F4 keys depending on the system.

Select Restore Defaults or Restore Optimized Defaults, and then select Save & Exit.

Power off the machine and disconnect the power supply.

Step 2

Enabling the virtualization extensions in BIOS

Power on the machine and open the BIOS (as per Step 1).

Open the Processor submenu The processor settings menu may be hidden in the Chipset, Advanced CPU Configuration or Northbridge.

Enable Intel Virtualization Technology (also known as Intel VT) or AMD-V depending on the brand of the processor. The virtualization extensions may be labeled Virtualization Extensions, Vanderpool or various other names depending on the OEM and system BIOS.

Enable Intel VTd or AMD IOMMU, if the options are available.

Save & Exit.

Run

cat /proc/cpuinfo | grep --color 'vmx\|svm'

If you see vmx or svm in red, the virtualization extensions are now enabled. If there is no output your system may not have the virtualization extensions or the correct BIOS setting enabled.

As clearly mentioned in the error message you need to enable the virtualization in the BIOS. Please refer to your system manual for enabling it. VMWare or Virtual box needs that to be enabled in BIOS so that they can work.


update-java-alternatives vs update-alternatives --config java On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7.

From my understanding I need to manually choose which Java to use before running each application. This led me to the update-java-alternatives -l command. When I run this I only see the following:

java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64

but when I run update-alternatives --config java I see the following:

*0  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   auto mode
1  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   manual mode
2  /usr/lib/jvm/jdk1.7.0/bin/java                   manual mode
3  /usr/lib/jvm/jre1.7.0/bin/java                   manual mode

I don't understand why the update-java-alternatives doesn't display the same 3 options. I also don't understand how to switch between OpenJDK6 and JDK7. How I can go about using the OpenJDK6 for Arduino development and Sun JDK7 for Eclipse/Android development?

sudo update-alternatives --config java

Configures the default for the program "java". That's the Java VM.

sudo update-alternatives --config javac

Configures the default Java compiler.

You can also see that, because the first command lists a lot of "JRE" (Java Runtime Environment) folders and the Program is just called "java".

If I check which version is being used by issuing the command
java -version
or
javac -version,
I can see, that each command changes the program being used.

However, using update-java-alternatives with a JDK Version changes both programs for me. Using the first commands, you can use a Java VM and Java Compiler from different JDKs.

update-java-alternatives requires presence of a file with extension .jinfo in directory /usr/lib/jvm. The opendjk package is shipped with a .jinfo file, the jdk of Oracle (formerly Sun) is not. As alternative, you configure alternatives without update-java-alternatives:

For example, to add java from jvm-directory /usr/lib/jvm/jdk-12.0.1 (default directory of Debian package of Oracle) with priority 2082, use the following command:

sudo update-alternatives  --install /usr/bin/java java /usr/lib/jvm/jdk-12.0.1/bin/java 2082

As for switching for different development environments:

Are you talking about starting the IDE itself with different Java versions or using different versions in the IDE for compilation and running your app?

For 1.: You can specify which JVM to use in the eclipse.ini, as described here. I don't know how to do that for the Arduino IDE.

For 2.: In Eclipse you can select the JRE/JDK to be used in Window -> Preferences -> Java -> Installed JREs. And under Java -> Compiler you could choose an older Java compliance if you wish.

EDIT:
This DigitalOcean page also has a very nice explanation of everything related to Java on Ubuntu.

update-java-alternatives is a program to update alternatives for jre/jdk installations.

update-alternatives is a symbolic link management system for linux (I'm sure there is little news here).

You can, and really should, use both update-java-alternatives and update-alternatives together.

Firstly, be sure to have the all the alternatives configured correctly. java and javac are but a few. There is javadoc, rmic, serialver and others, substituting the above variables for: native2ascii and /opt/jdk1.8.0_40/bin/native2ascii should report if the alternative is installed and/or selected.

When all the alternatives are configured you can then create links in  /usr/lib/jvm to your manual instalation.

In order to configure update-java-alternatives you must use a hidden file with the same name as your directory but prefixed by a . (dot).

Hope this helps.

Bibliography

man -S 8 update-java-alternatives

http://tech.lanesnotes.com/2008/03/using-alternatives-in-linux-to-use.html

https://stackoverflow.com/questions/6477415/how-to-set-oracles-java-as-the-default-java-in-ubuntu


How can I prevent someone from resetting my password with a Live CD? Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD.

A quick and easy way to do this is to disable booting from CDs and USB sticks in your BIOS and set a BIOS password.

According to this wiki page:

  Placing passwords or locking menu items (in the Grub configuration files) does not prevent a user from booting manually using commands entered at the grub command-line.

However there's nothing stopping someone from just stealing your hard drive and mounting it on another machine, or resetting your BIOS by removing the battery, or one of the other methods that an attacker can use when they have physical access to your machine.

A better way would be to encrypt your drive, you can either do this by encrypting your home directory, or encrypting the entire disk:

How do I encrypt my home partition?
https://help.ubuntu.com/community/FullDiskEncryptionHowto

You can make it so that even in a case of resetting, the "resetter" wont be able to see the data.

To do this, just encrypt /home.

If you want to make it so that resetting isn't possible, something needs to be removed, which is in charge of changing the password.


Compiled executable cannot run, "command not found" I have compiled a cpp program, but now I cannot run it. The error message I get says command not found.

I compiled it by running this command:

gcc `pkg-config --cflags opencv` OpenCV_ViolaJones.cpp -o OpenCV_ViolaJones `pkg-config --libs opencv`

It's compiled successfully. However, when I run it:

./OpenCV_ViolaJones

It shows me "Command not found". I am pretty sure that I am in the same directory and using the correct name.

Could you explain this to me, please? Thank you very much!

You need to make it executable before being able to run it like that:

chmod +x OpenCV_ViolaJoanes

will make your compiled program executable and you will be then able to run it.


Can I set my user account to have no password? If I attempt to change my password to nothing by opening "User Accounts", the "Change" button remains greyed out:

How do I change my password to be empty? I know you can set Ubuntu to automatically log you in, but I want my password to be empty, I never want to type in a password to authenticate myself as that user.

I know that there are reasons why this might not be a good idea, but I want to know if it is even possible. I'm using Ubuntu 12.10.

You can't do that using the GUI tool, but you can using the terminal.

First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password.

To do so, open the sudoers configuration file with sudo visudo, and add the following line to the file, replacing david with your username:

david ALL=(ALL) NOPASSWD:ALL

Close the editor to apply the changes, and test the effect on sudo in a new terminal.
Delete the password for your user by running this command:

sudo passwd -d `whoami`

If you ever get prompted for a password, just type enter and it should work. I've tested this answer with LightDM, the lock screen, sudo, gksu and it works, but there's one more step to get it to work with pkexec (thanks muru).

It is possible to change password after deletion. You need just to boot in recovery mode. Here you'll find a nice tutorial: http://www.psychocats.net/ubuntu/resetpassword

In short what you'll find on the link above:

you have to reboot into recovery mode.
(to get the boot menu to show, you have to hold down the Shift key during bootup)
In boot-up menu select "Drop to root shell prompt" option
type on console one by one

ls /home
passwd username
passwd susan
exit

then reboot normal


wireless doesn't work after update I've installed Ubuntu 12.04 on a new Compaq cq58 laptop. After installing Ubuntu wifi dind't work, but following instructions on the forum I could install the drivers and make it work....now after updating wireless stopped working...I don't know what to do now...

~$ sudo rfkill list all

0: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

~$ lspci -nn | grep 0280
04:00.0 Network controller [0280]: Ralink corp. Device [1814:3290]

I got the answer here maybe you'll receive when you update that the key is not available key run this sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

in my case 8B48AD6246925553 is the key that I received with the error after update


How to `read` and echo whatever the user typed? I'm making this script: when you type

"my name is [your name]"

it tells you

"hi, [your name]".

However, I don't know how to make [your name] anything you type. I've made a script with a particular name, but I want it to echo whatever name the user enters:

#!/bin/bash
read -p "Say something: " sth
  if [[ $sth = "my name is ralph" ]]
      then
          echo "Hi $(echo $sth | cut -f 4 -d ' ')"
  else
      echo "I didn't understand that"
  fi

So this will echo Hi ralph, but how to make it echo Hi [your name] with whatever name you typed?

The specifics aren't given by you but generally you capture name like this.

#!/bin/bash

regex='[Mm]y(\ name\ is\ )(\w*)'

read -p "Say something: " response

echo $response

if [[ "$response" =~ $regex ]]; then

        name=$(echo $response | cut -d' ' -f4)

        echo "Hi $name"
else
        echo "I didn't understand that"

fi

You are having a problem with your script because you are using the = operator which is making an assignment to your $sth variable rather than making a comparison between the two.

Use the the double equal symbol (==) in place of the single (=).  The == is an operator for pattern match.

Change your conditional statement:

Change from:

if [[ $sth = "my name is ralph" ]]

Change to:

if [[ $sth == "my name is ralph" ]]


How do I configure a new Ubuntu installation to accept ssh connections? I just installed Ubuntu. How do I set it up to allow me to ssh into it?

Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".

sudo apt update
sudo apt install ssh
sudo ufw allow 22      # if you have ufw running, but it doesn't hurt to run.

That's the very minimum. It allows unlimited failed password attempts on a known port. Direct root-login is disabled (you can still su and sudo once logged in). If your username and password are guessable and the Internet can see the server, somebody will eventually break in.

I can't stress this enough: You need to harden the default setup. You essentially trade convenience for the likelihood of being hacked but I've gone through several suggestions on my blog. At the very least, I'd suggest:

Key-based logins. Disable password logins.
Move it off port 22. Use something crazy-high, in the 20000-60000 range.
Use fail2ban to ban people who do find it and try to brute it.

It'll take you less than 10 minutes and they take youfrom a 1/10000 chance of being broken in-to a probability so small, there isn't enough paper in the world to write its fraction. All assuming you're careful with your key, it has a passphrase of its own and you don't trumpet your credentials all over the net.

In terms of accessing this SSH server from the Internet, you may be facing local networking obstacles. If the computer is behind a NAT router (eg most home networks) without direct incoming access from the internet, you may need to look at port forwarding. Obviously if you don't need access outside the network, skipping this step will aide network security.

I just wanted to add that you need to make sure you have picked the correct WAN interface, if your modem/router support multiple WAN interfaces.

I have a Billion BiPAC 7800NXL which has 3 possible WAN ports (DSL, ETH and 3G). When you create a new forwards (called a "Virtual Server" in this router), the 7800NXL always defaults to the DSL WAN interface, even though I only use the Ethernet WAN interface.

I had all the ports set up correctly, but my forward was configured to use DSL, so it didn't work. As soon as I created a new forward for the ETH WAN interface,  it worked.


File/directory compare with right click in Thunar / Xubuntu I would like to be able to compare files or directories by multiple-selecting them and then right clicking (for example, if there was a "compare" option in the context menu).

On Ubuntu with Nautilus, I would install the package nautilus-compare. How can I get this ability in Xubuntu? (in Thunar in Xubuntu - I don't mean by installing Nautilus)

The comparison program I use is meld, but a general answer would be most useful.

The accepted answer is very close, but not entirely correct.

In order to compare multiple files / directories, create a new Action with the following command:

  meld %F

Only using "meld %f" will only allow you to open one object in meld.

See attached screenshots for an example.

Basic Action Seetings

Action Appearance Conditions

I would have made this a comment, but I am not yet allowed to do so.

I'm an xubuntu user but not a Thunar user.  As you may have noticed it isn't brimming with features.  Sometimes light can be TOO light.

My solution to disliking Thunar is to use Dolphin, which is a KDE app and my favorite file manager, hands down.  Installing it pulls in a shedload of KDE dependencies but that doesn't bug me.

You could just try installing nautilus.  If doing a web search on "xfce thunar compare files" or something similar I yielded nothing I'd definitely do it.


VMWare Windows 7 (host) Ubuntu 14.04 (guest) shared folder won't mount I have a windows 7 with vmware workstation 9, and I'm running Ubuntu 14.04 on it.
I configured the shared folder in the VM/settings menu, and I can see it in the Ubuntu when doing vmware-hgfsclient. But there's nothing inside /mnt folder.

I've tried following this thread:
How do I mount shared folders in Ubuntu using VMware tools?
but it still won't mount (after numerous restarts and installing and uninstalling vmware-tools like suggested there), there's still nothing inside /mnt.

I've also tried all sorts of stuff I stumbled upon with open-vm-tools, but nothing worked.

I think I don't have vmhgfs, because modprobe vmhgfs return this:

modprobe: FATAL: Module vmhgfs not found.

So hacking /etc/fstab like suggested in many places shouldn't work anyway, right?

Any ideas on how to fix this?

As told here the problem seems to be VMWare Tools, and it gets fixed with Tools 9.6.2 version. The main problem seems that this version of Tools come with Workstation 10, not 9.

I've tryed all this on VMWare 10 (diference here that I have kernel 3.13.0-77-generic on guest) and no progress...
Any other possibilities?


Apt-Get Dependencies Won't Install OK I'm kind of confused here. After I installed Code::Blocks from the website, a little error popped up the top bar. It said that "Error: BrokenCount > 0", and that one of my packages had unmet dependencies. I instantly knew this was Code::Blocks, because I recalled seeing an error when installing it, that it couldn't install the codeblocks-contrib package and some others. I have tried apt-get install -f, and all of the suggestions, and even going into the Software Center and clicking repair, but this launches similar errors that I found in the terminal. Here's my output of sudo apt-get install -f:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  codeblocks-contrib codeblocks-dev gamin libcodeblocks0 libgamin0
  libwxsmithlib-dev
Recommended packages:
  valgrind
The following packages will be REMOVED:
  codeblocks-headers
The following NEW packages will be installed:
  gamin libgamin0 libwxsmithlib-dev
The following packages will be upgraded:
  codeblocks-contrib codeblocks-dev libcodeblocks0
3 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
9 not fully installed or removed.
Need to get 0 B/5,309 kB of archives.
After this operation, 1,163 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 249992 files and directories currently installed.)
Preparing to unpack .../codeblocks-dev_13.12-3_amd64.deb ...
Unpacking codeblocks-dev (13.12-3) over (13.12-1) ...
dpkg: error processing archive /var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb (--unpack):
 trying to overwrite '/usr/include/codeblocks/externaldepsdlg.h', which is also in package codeblocks-headers 13.12-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Probably would be best to check for a ppa repo or see if it's in Ubuntu repo then sudo apt-get remove it and then sudo apt-get install it.


How to convert PDF to image? I have requirement of converting PDF pages to images. There is a background image with some text in my file, and when I save it as an image only the background image gets saved.
Is there any software available for the same so that complete page can be converted to an image?

You can use pdftoppm to convert a PDF to a PNG:
pdftoppm input.pdf outputname -png

This will output each page in the PDF using the format outputname-01.png, with 01 being the index of the page.
Converting a single page of the PDF
pdftoppm input.pdf outputname -png -f {page} -singlefile

Change {page} to the page number. It's indexed at 1, so -f 1 would be the first page.
Specifying the converted image's resolution
The default resolution for this command is 150 DPI. Increasing it will result in both a larger file size and more detail.
To increase the resolution of the converted PDF, add the options -rx {resolution} and -ry {resolution}. For example:
pdftoppm input.pdf outputname -png -rx 300 -ry 300

PDF Mod also allows exporting images of all or individual pages of PDF files.

Open PDF file in PDF Mod
Select page(s)-
Edit > Export image(s)


Ubuntu boots into terminal When I turn on my computer (a CR-48), I keep loading tty1. I have tried xstart, and all I get is:

  Fatal server error:
  Could not create lock file in /tmp/.tX0-lock

When I attempted to make the directory (both sudo and not), I received these two errors:

  sudo: Can't open /var/lib/sudo/don/tty2: Read-only file system (I've gotten other tty's for different virtual terminals)
  mkdir: cannot create directory '/tmp/tX0-lock': Read-only file system

Before I got to the only terminal state, I had the computer moving a few files from a network server to the computer, I put it to sleep without stopping the transfers, and started the computer again away from my home network, and attempted to stop the transfers, the computer than restarted.

Running sudo reboot puts me right back in the virtual terminal, and I can't get into any sort of x application.

The hard drive is read only because it's got some errors on it. These have been detected during a scan and now your drive is read only. You need to run fsck against your main root partition while the partition isn't mounted or read only. It's read only so you should just have to run fsck.

If it's possible to run the LiveCD, you can use the gui tools to fix the issue, you can do all this using the System > Administration > Disk Utility once you're booted into the LiveCD desktop:

Once you've run the checks, make sure your disk isn't full (delete some stuff if you have to) and then reboot.

My amazing skills of observance led me to seeing that I was being told to run fsck manually. I did that, and everything is fine.


Install HP 5740 office-jet all-in-one on ubuntu 15.04 I updated from ubuntu 14 to 15.04 so HPLIP 3.15.2 is installed and in theory the HP printer officejet 5740 e-all-in-one should be supported. Yet the HPLIP does not recognize the printer from the USB connection (although the lsusb command from terminal shows that a printer is indeed connected: Bus 002 Device 004: ID 03f0:cd11 Hewlett-Packard.

I can actually print using the installation from the system setting, but I don't have the scanner and let alone the fax. Neither of 'Simple scan', 'Acquire Images' and 'Xsane' identify a scanner. The CUPS web interface shows that there is a printer named 'HP_Officejet_5740_series', with description 'HP Officejet 5740 series' and 'Driver: HP Officejet 5740 Series, hpcups 3.15.2 '; connection 'usb://HP/Officejet%205740%20series?serial=TH4A6330Q805ZF&interface=1'; location 'Gigiux'. I can even print the test page. Yet the HP Device Manager does not identify a printer neither from USB (thus the wireless connections are also non available) nor from CUPS. Hence no scanner (let alone the fax). Even providing the direction of the usb (002:004) does not help.

So the question is: how can I properly install the HP officejet 5740 e-all-in -one and specifically how can I set the scanner (and optionally even the fax)?

Thank you

Gigiux

I'm using Ubuntu 14.04 and I download and install the newer Hplip driver from this page
http://hplipopensource.com/hplip-web/models/officejet/officejet_5740_series.html

Everything works for me (I do not test fax) with a wireless connection.

hplip version is 3.15.7 and
XSanne recognize the scanner immediately

Fred


Using youtube-dl to download Deezer playlist? Is it possible to download a Deezer.com playlist using youtube-dl? I tried inputting the Deezer playlist link and it only downloads 30 second samples of the songs. Any way to get the full songs?

While youtube-dl have supported DeezerPlaylist, but unfortunately if you try download playlist from Deezer, it will only download preview version of 30 seconds of each file.
On their GitHub page, you can clearly saw several user desperately trying to get Deezer Playlist/Track working fully downloadable with youtube-dl. Some has opened new issues about it:

https://github.com/rg3/youtube-dl/issues/10049
https://github.com/rg3/youtube-dl/issues/11411

Nevertheless, an contributor has create a python script named deezer.py, you can consider try this script for downloading purpose. I don't know what the script does as there aren't description yet, moreover I'm not familiar with python.
Update
Sadly, even deezer.py script unable to grab full length of track, someone has confirmed this:

Currently only 30 seconds previews are supported.
Duplicate of #10049.

So most likely you have to be patient, until youtube-dl developer support full track.

I posted a pull request for youtube-dl: https://github.com/rg3/youtube-dl/pull/13194, which adds full deezer support. It is based on an earlier  version available, via tor, on http://haklab4ulibiyeix.onion/revres/DeezerDownloader/.

There is a separate script, which extract's mp3's from your browser's .har file ( saved from ctrl-shift-i - network debugger ).
This works best from firefox, where the .har response size limit is user configurable.

http://haklab4ulibiyeix.onion/revres/DeezerDownloader/blob/master/decodehar.py


My External Hard drive was not properly removed and now will not mount I recently bought a computer for my Wife, windows (her choice not mine). Before we paid, I asked the salesman to check whether my hard drive would work with windows 7 (as sometimes windows can be iffy). It worked fine, however, the salesman yanked my hard drive out without removing it safely. Now it wont mount, in my Ubuntu computer or her new windows. I've tried a lot of instructions but none work.

This is what I'm up against:

sammy@Fart:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077cf7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848    20482047    10137600    7  HPFS/NTFS/exFAT
/dev/sda3        20482048   177605687    78561820    7  HPFS/NTFS/exFAT
/dev/sda4       177606654   976771071   399582209    5  Extended
/dev/sda5       177606656   971016191   396704768   83  Linux
/dev/sda6       971018240   976771071     2876416   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe640222c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001    7  HPFS/NTFS/exFAT

So, would I be right in presuming that my hard drive is /dev/sdb1 ?

I tried to mount it manually and got this error message:

sammy@Fart:~$ sudo mount -t ntfs /dev/sdb1 /media
Error reading bootsector: Input/output error
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.

I tried to run chkdsk /f on windows but it would not run due to my disk already being used by another process. Now I'm stuck. I'm not new to ubuntu but I'm not a computer whizz either. I don't really know anything about softraid/fakeraid and have no idea what to do.

Any help would be very much appreciated.

P.S.
(To answer the first question you may have on your mind, yes I regret calling my computer "fart")

Thanks alot,

Sammy

Update: I've now successfully completed check disk and it hasn't solved a thing. Nothing suggested has worked and I've run out of ideas.

Already answered:
Fix corrupt NTFS partition without Windows

Please try and see if it matches your case, using Gparted is a highly recommended solution, saved a lot of hassle for me (although all the other options suggested there are quite good as well).

From own experience: 'ungraceful' detachment of a removable device resulted in inconsistent reference to the volume's first sector in the mbr partition table.

Using a Disk editor (e.g. wxHexEditor), locate the ntfs boot sector.
Make sure this lies on sector 63 (64th sector).

Tas


Why ubuntu doesn't start getting ae_not_found error? I have an old computer with Ubuntu 20 that stops working suddenly. The computer doesn't open the ubuntu, I got this error:

    ACPI Error: AE_NOT_FOUND. While resolving a named reference package element - SATA (20190816/dspkginit-438)
fsck.ext4: Superblock checksum does not match superblock while trying to open /dev/sdb5
/dev/sdb5:
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

fsck exited with status code 8

I tried to add acpi=off on the Linux line on the boot file configuration but doesn't work. I also tried to reinstall the ubuntu but I got the same error  ACPI Error: AE_NOT_FOUND. While resolving a named reference package element - SATA (20190816/dspkginit-438)

If I try to run: e2fsck -b 8193 /dev/sdb I got this error:
Found a dos partition table in /dev/sdb

From the comments...

Boot to a Ubuntu Live DVD/USB, and in terminal, try sudo e2fsck -b 32768 /dev/sdb5.

It's all working now.

The <device> it's referring to is the device containing the filesystem.  The error message you related indicates the device is /dev/sdb5 , not /dev/sdb.  That's why it tells you that it's a partition table.  Your cmd line should be more like "e2fsck -b 8193 /dev/sdb5".  The problem doing that might be that this filesystem might be in use when you have booted into Ubuntu.  You may have to boot with a live CD or live USB in order to try and repair your filesystem.  But beware, in that case your filesystem may not be on sdb5, it might be on some other disk name.  You can use the blkid command to tell you what is on a disk or disk partition.  For example, you could run blkid /dev/sdb5 (or sudo blkid /dev/sda5) and it would tell you if there is a filesystem, what its UUID is, and any filesystem label it might have.  If it DOES have a label, you can try e2fsck LABEL=yourFilesystemLabelHere (or even with its UUID, but those are long and complicated).  If nothing else, you can use sudo blkid /dev/sd(something) (e.g. sda1, sda2, ..., sdb1, sdb2, sdb3,... sdc1, sdc2, etc.) until you find your filesystem that's now on sdb5.

Tough to diagnose remotely, but you're right, you may have an issue deeper than just a corrupted filesystem.  Not sure what to suggest for that, but at least maybe I have helped with how to use some more tools.

As "It's me" suggests, you may want to add "acpi=off" along with "nomodeset" in /etc/default/grub , then run sudo update-grub, and perhaps reboot.  That way your system will always boot with acpi=off.  Something to try anyway.


After inserting a new OS entry, GRUB2 asks for password Yesterday I installed a new fresh Ubuntu system, and installed Android-x86 in another partition. Then I followed this tutorial to add an entry for Android-x86. My 40_custom file:

#! /bin/sh -e

cat << EOF

menuentry "Android-x86 r1" {
    set root='(hd0,6)'
    linux /android-4.4-r1/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 acpi_sleep=s3_bios,s3_mode SRC=/android-4.4-r1
    initrd /android-4.4-r1/initrd.img
}
EOF

When I ran update-grub command everything went fine, and the entry has been created successfully. But when I rebooted the system and tried to access my Android-x86, grub2 asked for an user and password. I never set any user neither password for my grub2, and not even asked it to protect my Android-x86 menuentry. What is the problem here? Thanks.

Short answer: grub might be broken. You can follow the instructions here to repair it or reinstall it.

In a nutshell:

you boot from a live (in this case ubuntu) cd/usb
mount the partition where grub is installed
bind the directories that grub needs access to to detect other operating systems
install, check, and update grub

Somewhat longer answer:

I have being trying to install 8 different operating systems (win7 + 7 different GNU/Linux distros) in an old lap top and I have run into all kinds of problems with the install process and the way grub behaves. Yesterday It started asking for username/password in all but one grub entry (it was working fine before that). After following the instructions in the link, everything was back to normal.

Try installing Android and just running update-grub to let grub find the new kernel and update the menu.

Have you tried using grub customizer? https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer

Try backing up your current custom settings, then remove them.  Install grub customizer and see if it detects your android install.  It worked for me when updating grub didn't detect an os I had installed on an external drive.


when running playonlinux I get the error "PlayOnLinux cannot find 7z." When trying to run Linux I get the error message:

PlayOnLinux cannot find 7z.
You should install it to use PlayOnLinux

How do I install "7z"?

Simply open the software centre, search for 7z, click on 7zip, and click install; to make it even easier click:

and then click on the

This should help I suggest go to this URL and install accordingly,

http://ashu-geek.blogspot.in/2012/01/how-to-install-7-zip-file-archiver-on.html


Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives How would I go about dual booting Windows 10 and Ubuntu, the windows drive is on an ssd as my c drive and my s drive is a hdd that I want to use for Linux. I have no idea what I need to download it or anything.

This should work for most systems that use UEFI and which have two HDD.

Specification used for the tutorial below:

Dell Inspiron E5440:

Main HDD - 256GB Samsung SSD (Windows 10 installed)
Secondary HDD - 64GB Transcend mSATA SSD (Mint 18 was installed to this drive)

A) UEFI/BIOS

Set to "UEFI mode only" (no legacy/CSM).
Disable "secure boot"
Disable "Intel Rapid Start" (if equipped)
Disable "fast boot" in UEFI (note this is different than the "fastboot" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Advanced Power Options (Fastboot)

Disable fastboot in Windows 8/10 under "advanced power options". Restart computer to ensure that this subsequent boot and the next reboot/shutdown will be in "normal" mode.

  Optional:

  Install Macrium Reflect (free) and create a backup image and reinstallation media should something go wrong with Windows 10.

C) Rufus / Bootable USB stick

Use Rufus to create a bootable USB stick with your choice of Ubuntu based distro. Make sure in Rufus that you CHOOSE the option UEFI/GPT only. This ensures the Linux environment boots only into UEFI mode during your install.

D) Boot Menu

Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

  Note:

  Make sure it says UEFI in front of the USB stick in the boot menu.

  If not, return to Windows and recreate your USB stick with Rufus ensuring you choose the UEFI/GPT (only) option.

E) Boot into USB Stick

Boot into Linux live environment and begin install.

F) Installation type

When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.

G) Create partitions

Find your secondary HDD that you will be installing Linux to.

In my case it was listed as /dev/sdc (with /dev/sda being the windows drive and /dev/sdb the USB drive [which was invisible in the installer]).

So basically:

+--------------+--------+---------------------------+--------------------------------+
| Device path  | Device | Operating System (OS)     | Visible in Ubiquity installer? |
+--------------+--------+---------------------------+--------------------------------+
| /dev/sda     |  HDD   | Windows 10                | yes                            |
| /dev/sdb     |  USB   | Ubuntu 16.04 (Live Stick) | no                             |
| /dev/sdc     |  HDD   | None                      | yes                            |
+--------------+--------+---------------------------+--------------------------------+

1st Partition / EFI

Select your target drive (in my case /dev/sdc)
Select "Make New Partition Table"
Partition the target drive as follows:

  Size: 650 MB
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: EFI (this will be listed as /dev/sdc1 efi in the partitioning tool once you create it)

2nd Partition / Root

Select "free space" under your target drive (in my case /dev/sdc)
Select "+"
Partition the target drive as follows:

  Size: min. 10 GB (20+GB better)
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: ext4
  Mount point: Choose "/"

3rd Partition / Swap

Select "free space" under your target drive (in my case /dev/sdc)
Select "+"
Partition the target drive as follows:

  Size: min. 2 GB (20+GB better)
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: swap (if you wish to use hibernation, the swap needs to be just slightly larger than your total amount of RAM - example I have 8 GB so the size of this parition was set at 9000 MB)

4th Partition / Home

Select "free space" under your target drive (in my case /dev/sdc)
Select "+"
Partition the target drive as follows:

  Size: remainder of space on drive
  Type for the new partition: Primary
  Location for the new partition: Beginning of this space
  Use as: ext4
  Mount point: Choose "/home"

H) Boot loader Device

BEFORE clicking "Install Now", from the "device for boot loader installation" option button, select the 650MB EFI partition you just created as the target for the bootloader. (example /dev/sdc1 in my case).
Click "Install Now".

I) Installation & Reboot

Finish installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

J) Upon reboot

After UEFI/BIOS reads the new bootloader entry that Linux has added to it, you will be presented with the grub menu with a listing of your Linux distro as well as a listing to boot Windows 10.

Boot into Linux
Install any updates and then reboot and attempt to enter Windows 10 from the grub menu to make sure that grub correctly handles the hand-off to the Windows 10 bootloader.

What you have done:

You have installed the Linux EFI bootloader to the newly created EFI partition. In the process of this, Linux has added an entry to your UEFI listings in your systems UEFI/BIOS. Linux has also automatically detected your Windows 10 install and added a grub menu item to boot it. Your computer at this point will now automatically boot to Linux unless you choose to boot to Windows (from the Grub menu).

What you have not done:

You have not in any way altered your Windows 10 install or its bootloader or even so much as touched the Windows 10 EFI partition. Everything is reversible simply by removing the Linux UEFI listing from your UEFI/BIOS settings. How to do so varies from each vendor.

I currently have Ubuntu 15.10 on one partition and CentOS 7 on a separate partition of the same 1TB HDD (as well as swap partitons.) On a separate SSD I have Windows 10.

Here is what I'd suggest:

-Install Windows 10 on your HDD/SSD (if not done already)

-Make a bootable USB/CD of Ubuntu

-Boot USB/CD

-Select 'other' for install portion

-Create 30GB '/' partition of type ext4

-Create 8GB of type swap *

-Create x-amount GB (whatever space is left) for '/home' of type ext4 **

-Install grub2 on drive that has Windows master boot record.

After finishing up the install you will reboot and see grub2 and be able to choose which OS to boot into.

*assuming you have 8GB ram

**alternatively you can make one large / partition instead of a separate /home partition if you prefer.


Xserver sometimes fails to start I'm having problems with my Xserver sometimes failing to start. It doesn't happen consistently, but when it happens, instead of showing the login screen I get some vague one-line error message about some service failing to start (can't remember exactly what it says now, and it's not copy-pasteable...) the following error message:

** (plymouthd:313): WARNING **: Command line `dbus-launch --autolaunch=56a6ab7418a994dcd756ff100000002 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

For those of you too lazy to scroll: the line ends with Autolaunch error: X11 initialization failed.

The only way to get anything done is to Ctrl+Alt+Fx to one of they TTY terminals, which after login proceeds to tell me (once or more twice) that I Failed to connect to X Server, and refer to /var/log/Xorg.0.log for details.

When this happened just now, grep /var/log/Xorg.0.log -e EE gave me this:

    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     3.936] Initializing built-in extension MIT-SCREEN-SAVER
[     3.998] (EE) intel(0): [drm] Failed to open DRM device for pci:0000:00:02.0: No such file or directory
[     3.998] (EE) intel(0): Failed to become DRM master.
[     3.998] (EE) Screen(s) found, but none have a usable configuration.
[     3.998] (EE)
[     3.998] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     3.998] (EE)

I login, and reboot. Usually one reboot is enough to get it working, but sometimes it takes two or three.

I beleive this is caused by some service not terminating properly when Ubuntu quits on system shut down, and - since I have had other problems with it as well - I wouldn't be surprised if it's related to my graphics cards (I have a laptop with an NVidia G550M and an Intel integrated card), but I have no idea where to go from here.

How do I figure out exactly what caused the problem? Is it likely to be a bug somewhere, or is it due to an error of mine?

Update:
As suggested in the linked-to bug report I tried restarting lightdm from the TTY terminal, and that got me a login working login screen. The bug report talks about this behavior being caused by a race condition at startup, so that not all required devices are available when lightdm starts (see e.g. comments #23 and #48). Most of them involve changing /etc/init/lightdm.conf in some way as to either prevent the race condition by stalling (e.g. sleep 2), or respawn if the first attempt crashes (and hope the second attempt is delayed enough to succeed). Is a workaround like that "update safe", or will it be overwritten when lightdm is updated? Is there a better way to work around (or even fix) this?

This seems to be a problem with lightdm that starts before video device show up.

Please see https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/969489 for workaround.

One of the workarounds, which works best for me, is to put

respawn

after

stop on runlevel [016]

This will force lightdm to restart until it works correctly.

Workarounds described in this bug report modifies /etc/init/lightdm.conf, so I would suggest to override this file during update of lightdm package just to be sure that it works with rest of lightdm correctly. If the bug is still not fixed in updated version, you should reapply the fix.

Debian's/Ubuntu's dpkg tools should keep original and modified versions of configuration files during update.


Realtek RTL8723BE Wi-Fi incredibly weak I have a HP 14-AN001NA laptop. It came with Windows 10 installed on which the Wi-Fi worked fine anywhere in the house.

However I removed Windows 10 and installed Ubuntu 16.04 instead and since I have had terrible Wi-Fi anywhere aside from about three foot away from the router. I don't know if it's relevant but my Wi-Fi is not called wlan0 but wlo1 for some reason (I didn't change it).

When running lspci -knn | grep Net -A3     I get the following output:

05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
DeviceName:
Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:81c1]
Kernel driver in use: rtl8723be
Kernel modules: wl, rtl8723be

Run in a terminal

sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"

and reboot.

The ant_sel parameter enables one of the two antenna connectors of your RTL8723be adapter. Your laptop has only one antenna because the vendor is too greedy to install two. The Linux drivers can't detect which antenna connector is in use. So we have to guess it.

In Windows either the vendor sets it up somewhere on a pre-installed system, or the Windows proprietary drivers can detect it.

If ant_sel=1 does not help, use ant_sel=2. This setting tells which antenna is in use 1 or 2.

Follow below steps available on hp site:

https://h30434.www3.hp.com/t5/Notebook-Wireless-and-Networking/Realtek-8723DE-wifi-module-amp-Bluetooth-Linux-driver/td-p/6477307

$ git clone -b extended --single-branch https://github.com/lwfinger/rtlwifi_new.git
unofficial
$ cd rtlwifi_new

$ make
$ sudo make install
$ sudo modprobe -v rtl8723de ant_sel=2


How to get Intel 18265 Wifi Card working on Lenovo X1 Carbon running Ubuntu 16.04 I've just got a Lenovo X1 Carbon (5th generation). When I installed Ubuntu 16.04 LTS off an USB the Wifi was working from the point go.

However at some point during the setup process the Wifi card stopped working. The card is identified as a Intel WiGig 18265AC+BT 2x2 vPro in the specsheet.

The network dropdown on the system bar reads:

Wi-Fi Networks
device not ready
Mobile Broadband
not enabled

Bluetooth is not accessible either. I've had a look around via Google but haven't found any solution that works.

What is the best approach to get this up and running?

I had a simiar problem, except that wifi never worked for me, even using the USB drive. What worked for me was changing kernel to the most recent one that I found available using

apt-cache search linux-image-extra

I changed kernel using the following commands:

sudo apt-get install linux-image-4.11.0-14-generic linux-headers-4.11.0-14-generic linux-image-extra-4.11.0-14-generic

(But using the commands suggested in another comment here

sudo apt-get autoremove
sudo service network-manager restart

did fix my bluetooth, so thanks!)

In the end the following commands got me up and running:

sudo apt-get autoremove
sudo service network-manager restart

At a guess there were conflicting unused drivers.


Set up Ubuntu Server 12.04 for my office As I have great interest in Linux, I suggested my GM to update my office server to Ubuntu. He agreed to buy a new server (Hardware) after explaining him the good things about Linux & bad things about Windows.

The scenario is:

The main server will be Ubuntu 12.04 LTS (where I should create a domain & users on domain).
The old server (which is Win 2003) is going to be an application server.
Around 30+ windows (both Win 7 & Vista, 32 & 64 bit) machines should connect to the domain & be able to access the shared folders on Ubuntu server.

I really appreciate some help as I don't have any experience on Linux server. At least how to guidelines.

You are setting up a server in a "Small Medium Business" (< 100 employees), which may be very simple or very difficult, depending of what you will want to do with it.

Short answer

substitute a windows server by a linux server is not as easy as it seems, but possible (just it might be overwhelming for the amateur/enthusiast, leave that for the matured professional administrator)
add a linux server to an existing working network, is very easy and a good way to start with linux without any drawback, nor compromising the existing services. Benefit: linux services don't have licenses - they come  free and forever :)

Long answer

Window server does more than file sharing.

So to substitute it by linux, you will have to:

understand all that windows was doing
how to configure linux to do all that
and migrate the configuration settings from the windows -> linux

And do it all in the backstage without the clients (employees) noticing any change (or they will complaint: if they are your friends they will laugh and joke the first day, but not after 5 days of suffering :) antecipate it :) )

Before disconnecting the Windows Server, you should take into account some hidden things that the windows server might be doing besides being a File Server:

managing windows domains, primary controllers and active directory
share printers
email server (by gods sake, if this is the case, then be aware that preparing a linux email server is no small task... and neither is maintaining it)
login scripts used by windows clients, and delivered by the windows server (it can be done with linux server also, but you will have to do it (see samba))

This is not supposed to scare you, but instead to make you aware and avoid disaster :)

With that said, here comes the good news: linux runs in almost any machine, with much lower requirements than windows servers, meaning you can recycle old hardware to try and make a test linux server without buying anything, and use it to test&convince all other in the office.

The simplest way to start, is to add (not substitute) a Linux Server to the existing network, and create simple services in the Linux Server such as

File-Server (with samba, very easy, lots of info, can also share printers)
Chat service (see ejabberd, not so simple, but not that hard)
Internal Forum for employees (see phpBB, easy to install, up and running in a breeze)
HTTP proxy (well, better check before promissing anything)

Other services can also be implemented in Linux (and work better than in windows, that's the backbone of how internet works) but they require a more profound knowledge from the system administrator, such as email, firewall, vpn, active directory, primary domain controller, calendar/task sharing, Dns, system monitoring and alerts, ...

I would recommend you start by making a virtual machine (use VirtualBox) and try to make the server there as you intend to do in reality. Also use some linux distribution with which you feel comfortable and there is lots of info/people (big community to search for help), such as centOs or Ubuntu Server

Finally, if you only want to make a simple server-for-1-job, search for a linux distribution which gives you a service and comes ready-to-use, such as  FreeNas

Linux can provide a fantastic advantage, when well understood :)

Hope it helps - tell how it went

Everything you need will be answered by reading documentation about Samba

Documentation
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/
Wiki https://wiki.samba.org/index.php/Main_Page

With it you can act as a DC and have a way to setup shares with windows machines

Note: linux servers don't have any kind of GUI!
For your first time, you might want to install one.
I suggest against it, but deploying a server OS you are not familiar with to a production environment is not a good idea to begin with.

Ofcourse the best way to learn about something is to "just do it" ;)


simple method to install a mail server I am looking for a simple way to install a mail server on my Ubuntu server. I would like to be able to receive and send emails though a webmail (e.g. roundcube).

I have a domain name. The web server already works without any problem.

When I googled "simple method to install mail server on Ubuntu", I arrive on blogs with literally hundreds of steps to install a mail server:

A Mailserver on Ubuntu 12.04: Postfix, Dovecot, MySQL
Creating a Mail Server on Ubuntu
Postfix

But, for sure I will make a mistake, if I follow those tutorials, and it will be very very time consuming. Most of the steps look very easy to automate, though.

I've try several install methods:

sudo apt-get install dovecot-postfix

sudo tasksel install mail-server

But from there, I have no idea how to add email accounts, and test if it actually works.

Do you know if there is an automated way to install a mail server?

EDIT - NEW ANSWER

Mail-In-A-Box

A very interesting open source project that turns a ubuntu machine into an email server:

https://github.com/JoshData/mailinabox

This is the best/simple method.

sudo apt-get install postfix

That's it a mail server is installed.

Now administrating that mail server is a whole different story.

By default postfix will deliver and relay for all local user accounts. That should get you started. If you want something more complex then you REALLY REALLY need to read, study, learn, apprentice, etc. Mail servers are very very complex to setup correctly. Even when setup correctly they take constant supervision and monitoring.  If your doing anything more then local delivery then I 100% recommend that you do not setup your own mail server.

Do not forget to setup DNS and SPF records if your going to be sending emails to non-local addresses. This is a bare minimum and will not result in deliverable mail to most ISPs.

Again, I strongly urge you to read, and fully understand what you are doing before you even attempt to run a public mail server. Keep in mind, that (at least in the US) you can be fined per email, for emails sent from your server incorrectly. This is rare but has happened. A more common effect is that you get blacklisted, shunned, and marked as a generally evil person and are banned from ever running an email server again (this happens quite frequently).

If your  going to run a public server make sure you speak with your ISP/Hosting first. You will need, at a minimum a static IP and their permission. Most ISPs will block you 100% from every getting back on the internet for running an incorrectly configured mail server for an extended period of time.

I add all these warnings so that you know, local delivery, intranet delivery, your fine. Remote delivery, know what you are doing before you even attempt it. Incorrectly configured mail servers can bring on a whole world of disaster if not handled correctly.

Ubuntu help / MailServer
https://help.ubuntu.com/community/MailServer

Ubuntu official documentation is most of the time, easy enough.


Resizing partition capacity? Possible Duplicate:
  Resize Partition with gparted

I have a 500GB hard-drive. Now im using Ubuntu 11.04 with Windows 7 (dual boot). My Ubuntu partition capacity is just 20GB. How can I resize it to 50GB (using free space from another partitions)?

Here is a howto on resizing with Windows 7 using Disk Management.

There probably is a way with Ubuntu I just found that easier.


Cannot shutdown or restart using Ubuntu 12.10 I use Ubuntu 12.10 recently installed. Now it cannot shutdown or restart. I remember it was shut-downed or restarted properly a few days ago. Now when I shutdown it, the screen turns to black swiftly that I only see a few statements beginning from "stopping ....". Any suggestion?   Mike

Try using the command reboot or shutdown -h now with root login. Give more detail about what error you get.

Try updating GRUB (sudo update-grub2). This solved the problem for me.


My computer freezes during installation I have used a 64bit AMD processor with Ubuntu for the last 2 years and have installed 10.04 and then 11.10.

I have tried to upgrade to 12.04 but after the installation starts it keeps asking who I am and it wants me to fill in my name and my computer name, but then the installation freezes.

I have tried the earlier version (9.10), but the same problem persists.

had the same issue... press ctrl+c once and the network configuration dialog will restart... it didn't hang the second time


Find the installation directory of OpenCv I need to find the installation directory of OpenCv so that I can add it's path to PKG_CONFIG_PATH so I can run OpenCv programs the problem is I don't know where to look for it since I'm completely new to ubuntu.

I'm using ubuntu 10.04
Any help would be appreciated.Thanks!!!

You can add following lines to /etc/bash.bashrc using your favorite text editor so that you dont have to export path everytime.

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

and restart your system.


Unable to install python3-venv I am trying to install python3-venv ubuntu package but I have this error:

sudo apt-get install python3-venv

The following packages have unmet dependencies:
 python3-venv : Depends: python3.5-venv (>= 3.5.1-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So I tried install python3.5-venv but without any success:

sudo apt-get install python3-venv

The following packages have unmet dependencies:
 python3.5-venv : Depends: python3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I tried use conda and downgrade my python version from 3.5.2 to 3.5.1 but error is still occurs.

conda install python=3.5.1

My Ubuntu version => Ubuntu 16.04.2 LTS 64-bit

I also tried sudo apt install -f but this didn't solve my problem.

Where can be a problem?

Ok, I finally found solution. I have broken source.list. I regenerate new one here:

https://repogen.simplylinux.ch/

And replace at /etc/apt/

venv is in the standard modules since Python 3.3 and means you don't have to install it separately.

python3 -m venv my_venv


eth0 not working anymore after trying to set static ip Hi I tried to set up a static ip and have lost the ability to use eth0, I can see that it is there but disabled, tried the edit with the auto eth0 and DHCP but to no avail, been trying all sorts of commands that have been suggested in other posts but getting nowhere. need help to reprogram eth0 from scratch.

I have static IP and it works without any problem.
Check your settings again. Check "Gateway" and "DNS servers"


New User, Please Help with PassPhrase Question We are new users to Ubuntu, and completed the dvd disk installation.  Now the before logging in, Ubuntu is requesting a PassPhrase.  We did not recall creating a PassPhrase, only a password.  Can someone please assist us?

Probably you made your home folder encrypted.

Take a look on this article, maybe will help you.

I had the same problem (passphrase).

My solution that worked was to switch my boot location in the start-up routine (boot PROM)
from "Hard Disk" to "CDROM".

I had previously loaded a Linux version and encrypted it.


Recommendations for a WebDAV client I am trying to get additional functionality from a school website that can allow multiple file uploads/downloads via drag and drop between the site's Resources folders and my personal computer via a WebDAV client, versus downloading each individual file manually. However, this feature is only officially supported for Windows and Mac, or for 3rd-party clients for those operating systems. I would like to be able to use this feature with Ubuntu 11.04.

I have already taken a look at this question, but had no luck with its answer...probably because it never asks me for my school password, and I can't find a way to input one.

If there's a way to do this using what's already installed by default, or from some other application, please let me know.

UPDATE: When I try connecting through Nautilus, I get the following error message, regardless of whether I picked WebDAV (http) or Secure WebDAV (https):

And just to reiterate, at no point does it ever ask for my password.

In Nautilus (the file browser), select File > Connect to ... and select WebDAV. Enter the information you need, such as a host name, a directory, port and username. Check the box to create a bookmark, and you'll find it in your Files and Folder lense and in the left pane in Nautilus.

You'll be able to use your WebDAV share as if it were a local folder.

This looks more like a windows name resolution problem... it cannot resolve the netbios name of the server.  It should work with te IP address however.

-To mount a windows share on a DHCP network, it is convenient to be able to mount by netbios name... it's very easy:

1) Edit your /etc/nsswitch.conf file with your preferred editor (gedit, kate, nano, vim, etc)... search through the file and look for the line that looks something like this:

hosts:      files mdns4_minimal [NOTFOUND=return] dns mdns4

...and add "wins" to the end of the line so it looks something like this:

hosts:      files mdns4_minimal [NOTFOUND=return] wins dns mdns4

2) Save the file.  Note: "wins" MUST come before "dns" if you are using the openDNS service.

3) Now you'll need to install winbind

Code:
sudo apt-get install winbind

4) Reboot, or restart your network.


Not able to stop apache processes Update: Responding to the comment:

check processes of apache:

$ ps a | grep apache 3
grep: 3: No such file or directory
$ ps a | grep apache
 4514 pts/0    S+     0:00 grep --color=auto apache
$ ps a | grep apache2
 4516 pts/0    S+     0:00 grep --color=auto apache2

checking apache error log

$ tail /var/log/apache2/error.log
[Sun Aug 07 03:14:19 2011] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.5 with Suhosin-Patch configured -- resuming normal operations
[Mon Aug 08 03:13:58 2011] [notice] Graceful restart requested, doing restart
[Mon Aug 08 03:14:00 2011] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.5 with Suhosin-Patch configured -- resuming normal operations
[Mon Aug 08 09:03:16 2011] [notice] caught SIGTERM, shutting down
[Mon Aug 08 09:05:47 2011] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.5 with Suhosin-Patch configured -- resuming normal operations

Original: I have stopped apache, but why it still has the same number of processes running?

$ ps -A | grep apache
 1663 ?        00:00:00 apache2
 1667 ?        00:00:00 apache2
 1668 ?        00:00:00 apache2
 1669 ?        00:00:00 apache2
 1670 ?        00:00:00 apache2
 1671 ?        00:00:00 apache2
$ /etc/init.d/apache2 stop
 * Stopping web server apache2                            [ OK ]
$ ps -A | grep apache
 1663 ?        00:00:00 apache2
 1667 ?        00:00:00 apache2
 1668 ?        00:00:00 apache2
 1669 ?        00:00:00 apache2
 1670 ?        00:00:00 apache2
 1671 ?        00:00:00 apache2

Thanks!

This can happen occasionally when Apache refuses to stop nicely or has Zombie Processes. For the former you can kill all running processes with sudo killall -9 apache2; however, for the latter you'll simple need to wait for them to go away. In the event it's Apache not wanting to stop nicely, what you'll really want to do is investigate what's going on. Finding out exactly what's going on can be difficult though.

An interactive strace of the process id may lend a clue as to what site(s) are acting up and causing issues. From your above ps -A you can check the first process with

strace -p 1663

This will attach to the running processes stack trace providing live output of what is going on. At any time you can Ctrl+C

An additional resource is the main error log for Apache this can be found in /var/log/apache2/error.log You'll want to get a decent chunk of the log and skim it for details. If the problem is an ongoing issue running

tail -f /var/log/apache2/error.log

This similar to the strace will run in realtime. For the last N lines replace -f with -# where the # is a positive number like 50, 100, 282, etc.

After installing nginx my apache stopped working properly.
Seems to in some cases apache confusing with nginx.
Just remove nginx

sudo apt-get purge nginx nginx-common
sudo apt-get autoremove


How can I mount a lowerdir into a specific subdirectory with overlayfs? I want to mount the following directories using overlayfs:

(lowerdir) /chroot in /merged
(lowerdir) /home   in /merged/home
(upperdir) /tmpfs  in /merged

...so that the resulting merged directory is a COW system that contains both the /chroot and /home.

I cannot find any way to do that.

1) Trying multiple lower dirs:

mount -t overlay -o lowerdir=/chroot:/home,upperdir=/tmpfs,workdir=/workdir overlay /merged
ls /merged

==> failure, the /home contents merge with the /chroot contents directly in /merged without getting inside a /merged/home subdirectory.

2) Trying bind-mounts:

mount --bind /home /chroot/home
mount -t overlay -o lowerdir=/chroot,upperdir=/tmpfs,workdir=/workdir overlay /merged
ls /merged/home

==> empty, the /chroot/home submount contents do not show up in /merged/home.

Any ideas?
Thank you.

I ran into this exact problem tonight, however I was using /, /usr, /var as the test since I wanted to capture changes to the filesytem from a package install and skim it out of the OverlayFS 'upperdir'.

I figured out that OverlayFS wasn't designed for this, then I remembered about unionfs-fuse...  I also saw that OverlayFS could use itself as a lowerdir, so I took a shot with using unionfs-fuse instead and it worked.

Keep in mind this is just a quick 'lab' PoC test, and I'm sure you'll want to tweak the unionfs-fuse options quite a bit for your needs...

mkdir merged union upper work
sudo unionfs-fuse /=RO:/usr=RO:/var=RO:/home=RO union
sudo mount -t overlay overlay -olowerdir=union,upperdir=upper,workdir=work merged
sudo echo test > merged/newtestfile
ls merged/newtestfile # exists
ls upper/newtestfile # exists

Overall, the solution is a bit twisted/demented but it seems to work ok at least for what I was trying to accomplish by isolating the changes that could be skimmed from the ./upper directory.

We committed the solution in:
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2652


squid + iptables not working I would like to setup a proxy on my ubuntu VM to test a PHP script that must use a proxy.
I installed Squid and made some things with iptables command.

I wrote :

sudo iptables -A OUTPUT -p tcp --dport 80 -j DROP

Then I edited my squid.conf file :

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
#
acl localnet src 192.168.152.132/24 #this is my ip address
#
acl SSL_ports port 443      # https
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
acl Safe_ports port 70      # gopher
acl Safe_ports port 210     # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280     # http-mgmt
acl Safe_ports port 488     # gss-http
acl Safe_ports port 591     # filemaker
acl Safe_ports port 777     # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow localnet
http_access deny all

http_port 3128 transparent

visible_hostname MyProxy

coredump_dir /var/spool/squid3
refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

so every port 80 request are now blocked and in Firefox when I'm editing my proxy settings I would like to pass through that proxy. I wrote my ip address with squid's port but I still get an access denied error. Do you know what I'm doing wrong?

From the terminal run:

sudo squid3 -k reconfigure

-k reconfigure - Parse configuration file, then send signal to running copy and exit


How to install php without Apache webserver? It seems that the only way to do this is to install together an Apache server which is very-very unwanted (in our case).

We just want to utilize the simple built-in web server, as the lucky users of some non-ubuntu OSes (like MS Windows 10) have.

Ubuntu package details says php (php7.2) depends on libapache2-mod-php7.2 OR php7.2-fpm OR php7.2-cgi.

It seems to default to the first package, which itself depends on apache2. But if you install one of the latter first, and php afterwards, apache2 will not be installed.

sudo apt install php-cgi
sudo apt install php

or manually put the resolved dependency:

sudo apt install php php7.2-cgi

Then you can run

php -S localhost:8000

sudo apt-get --no-install-recommends --dry-run install php

First simulate. I'm not in ubuntu now. If you are happy you can run

sudo apt-get --no-install-recommends install php