failed to update - internet connection error i am using ubuntu 12.04 lts.
i m trying to update but i get an error

  Failed to download repository information
  Check your Internet connection.

My internet connection is fine.

when i see details of the error an get this

  W:Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)
  , E:Some index files failed to download. They have been ignored, or old ones used instead.

any help please

Go to Software Sources > Other Software and Uncheck the checkbox against http://dl.google.com/linux/chrome/deb/dists/stable/Release and Click on Close.

Now go and check for updates.


Windows doesn't start anymore from the grub boot menu I have an SSD with 2 partitions.
The first partition belongs to Windows 10 and it worked fine.
I installed Ubuntu 15.10 on the second partition and it also works fine.

When I boot, grub is correctly displayed and shows both Windows and Ubuntu. If I select Ubuntu it can boot without issue and I can even access the Windows partition from Ubuntu, but if I try to boot Windows 10 it displays a black screen (like it will start normally) for a few seconds (perhaps 2 or 3 seconds) and then it goes back to grub without showing any message.

Edit /boot/grub/grub.cfg

Find the Windows menu entry (looks like)

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (loader) (on /dev/sdXX)'

After

chainloader +1

Write

ntldr /bootmgr

It did the trick.

this worked for me:

install win 8/10
boot on a live linux cd (i used boot-repair-disk-64bit.iso), any from where you can run gparted.
shrink the win partition to make room for your linux.
AND NOW THE REALLY IMPORTANT: restart windows, and then open file explorer (the yellow one) and see that your drive C: still thinks it owns the whole disk.
right click on drive C: and chose properties/tools and click check.
now windows will check and verify the new size of the win partition.
you may have to reboot in to win a couple of times, but finally win knows the size and position of its partition(s)
now you can install ubuntu or whatever - and should it not work, boot-repair-disk-64bit.iso will make it work fast.


Passing unrecognized usb devices to virtualbox I'm running Ubuntu 16.04.1 with all the updates and have Win 10 installed on Virtualbox. I can use usb devices in Win 10, like thumb drives, webcam and so on, so I know vbox has been set up correctly (guest additions, usb support etc).

My problem is that I want to update the firmware on my Vaporesso Target Pro, for which I need Windows. When I plug in the mod, I don't see it on the list with USB devices.

[11065.688847] usb 3-1: new full-speed USB device number 7 using xhci_hcd
[11065.808894] usb 3-1: device descriptor read/64, error -71
[11066.032890] usb 3-1: device descriptor read/64, error -71
[11066.248827] usb 3-1: new full-speed USB device number 8 using xhci_hcd
[11066.368888] usb 3-1: device descriptor read/64, error -71
[11066.592897] usb 3-1: device descriptor read/64, error -71
[11066.808830] usb 3-1: new full-speed USB device number 9 using xhci_hcd
[11066.809139] usb 3-1: Device not responding to setup address.
[11067.013140] usb 3-1: Device not responding to setup address.
[11067.216818] usb 3-1: device not accepting address 9, error -71
[11067.328838] usb 3-1: new full-speed USB device number 10 using xhci_hcd
[11067.329157] usb 3-1: Device not responding to setup address.
[11067.533146] usb 3-1: Device not responding to setup address.
[11067.736829] usb 3-1: device not accepting address 10, error -71

That's what I get in dmesg when I plug it in, so now it makes sense that I don't see it in virtualbox. However, I have no idea how to get Ubuntu to recognize it so I can pass it through to virtualbox.

In order to use your USB device on the guest system, all you should need is the USB vendor ID and product ID.  Plug your device in, and try the lsusb command, which shows "vendor ID:product ID" as hexidecimal numbers.  By doing lsusb when the device is plugged in and when it's not, you should be able to figure out which entry in the lsusb table belongs to your device.

Once you know the vendor ID and product ID, head over to VirtualBox and create a USB filter for it according to the VirtualBox manual.  Once you do that, the device should be visible to the guest OS.


How to replace symbol in multiplefiles? I have many files in directory(with folders so i think solution must be recursive in deep)

root-folder

file-1.png
file-2.png
file-3.png
file-4.png
file-5.png
folder-1

file-1.png
file-2.png
file-3.png

I need to rename all files, which contains - character to _.

file-1.png -> file_1.png

But. I have little remark. folder-1 and root-folder must be not affected.

How i can do that?

Using find and the perl rename command:

find . -depth -name "*-*" -execdir prename -v s/-/_/g {} +

You do something like this:

#! /bin/bash

ROOT_DIR=$1

cd "$ROOT_DIR"
IFS="
"
for file in $(find -type f)
do
    mv -v "$file" "$(echo $file | sed -e 's#-#_#g')"
done
unset IFS
cd -

Assuming this script is called "my-rename.sh". Call it like this:

$ ./my-rename.sh <path-to-root-folder>

The only trick to using this script is that if any parent directory has "-" in their name, you'll change that too. You can certainly handle that but the answer would become too complex and the real solution lost in the middle of it.

Does this do the trick? Let me know if you have any other questions.

Cheers!


How to link libgattlib.so in a VS2017 VC++ for Linux project I tried to build a VC++ for Linux (Raspbian) project in VS2017 (from my PC)using libgattlib.so static library residing in Raspberry Pi 3 board. The compilation went without errors. I can reliably include in the project .h files using e.g. \\usr\include. I also need a reference to the libgattlib.so library file. It resides in /usr/lib on the Raspberry Pi 3 and the link is correctly(\\usr\lib) set in VS2017 Project->Configuration Properties->VC++ Directories->Library Directories and -lgattlib in Project->Configuration Properties->Linker->Input->Library Dependencies but the linker reports error:

Target Link:

1>  Linking objects
1>  Invoking 'ld'
1>  g++ -o "/home/pi/projects/Id2Monitor_For_Linux/bin/ARM/Debug/Id2Monitor_For_Linux.out" -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack /home/pi/projects/Id2Monitor_For_Linux/obj/ARM/Debug/main.o -lbluetooth -llibgattlib
1>  /usr/bin/ld: cannot find -llibgattlib
1>  /usr/bin/ld: cannot find -llibgattlib
1>  collect2: error: ld returned 1 exit status
1>  collect2: error: ld returned 1 exit status
1>  /usr/bin/ld: cannot find -llibgattlib
1>  collect2: error: ld returned 1 exit status
1>  collect2 : error : ld returned 1 exit status
1>  Done linking, output file name: '/home/pi/projects/Id2Monitor_For_Linux/bin/ARM/Debug/Id2Monitor_For_Linux.out'
1>Done building target "Link" in project "Id2Monitor_For_Linux.vcxproj" -- FAILED.
1>
1>Done building project "Id2Monitor_For_Linux.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>collect2 : error : ld returned 1 exit status
1>    0 Warning(s)
1>    1 Error(s)

Please advise me how to correctly set up the references for libgattlib.so library in VS2017. Thanks.

Thank you very much. It helped to solve my problem in Visual Studio 2017 with Linux remote compiler. Where I've needed to include Linux libraries I've had __float128 error and was stuck. I've done the following:

Copied /usr/include from Linux machine into Windows.
D:\usr\include into Project -> Configuration Properties -> VC++ Directories -> Library Directories
The library that I wanted to use for my project was portaudio so I added portaudio into Project -> Configuration Properties -> Linker -> Input -> Library Dependencies
-lportaudio -lrt -lpthread to Project -> Configuration Properties -> Linker -> Command Line


Why does eth0 disappear when I set a static IP (server 12.10)? For some reason, if I try to set a static IP address, my eth0 disappears from ifconfig's output. I am running Ubuntu server 12.10 on a gateway laptop.

auto eth0
iface eth0 inet dhcp

It then gives this output when I run ifconfig:

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:b8ff:fee7:f71c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:281 errors:0 dropped:0 overruns:0 frame:0
          TX packets:352 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31874 (31.8 KB)  TX bytes:45369 (45.3 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:41740 (41.7 KB)  TX bytes:41740 (41.7 KB)

When I change to static:

auto eth0
iface eth0 inet static
       address 192.168.1.37
       netmask 225.225.225.0
       gateway 192.168.1.1

...then run a service networking restart, I only get the loopback block from ifconfig:

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:41740 (41.7 KB)  TX bytes:41740 (41.7 KB)

However, I can force a static IP with ifconfig eth0 192.168.1.37 netmask 255.255.255.0 but obviously this goes away on a reboot.

Why will one way work but not the other? Am I doing something wrong?

It was a typo. I should have had 255.255.255.0 as my netmask and instead typed 225.225.225.0

Thanks to qbi for helping me see the error of my ways

Do not do service networking restart; it is deprecated.

Instead do ifdown eth0 and then ifup eth0 or simply reboot.


What download managers are available for Ubuntu? This question exists as it fills a specific criterion.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the FAQ. More information on the software-recommendation tag.

What download managers are available for Ubuntu? Can you provide the link as well?

I would recommend the wget command line utility which is absolutely awesome!

wget is a GNU free software package that is used for retrieving files over the web. If you have got it installed, then all you have to do is to get the download link and use wget to download it.

In order to get the download link, right click on whichever download you want in the firefox download manager. There will be an option ‘copy download link’. Click on it.

Then open a terminal and go to whichever folder you want the file downloaded to. Assuming it is in the Desktop, type the following command at the prompt:

$ wget <paste your download link here>

Now even if it gets stuck in the middle, you can resume from wherever it was interrupted by giving the option -c to wget. That is, the command will be like

$ wget -c <paste your download link here>

And there it continues beautifully.

Try Flashget with Wine. I have been using it on Windows and Ubuntu (with wine) and its an excellent application. If you decide to give it a try, I would suggest installing version 1.9.6


Switching from Nvidia to Radeon graphics card in year 2015 I am going to switch my monitors from an Nvidia graphics card to a Radeon Saphire FLEX series 250x (specifically, this model).

How should I prepare my 14.04 system so that it simply works once the card is installed? you will forgive me for not acting by answers from circa 2012 here because drivers and hardware have come a long way since. It would be wiser for me to act in preparation mode rather than in fire fighting mode.

What might be the series of steps to take for (1) preparing my system, and for (2) making the transition in the OS?

install fglrx driver using terminal commands

https://help.ubuntu.com/community/BinaryDriverHowto/AMD


How do I turn off the screen saver using the command line? I would like to turn off the screen saver from command line, which used to work with

gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type=bool false

in natty & oneiric
for precise this does not work.

Any ideas?

I know where I can do that in the gui, I'd need the setting for an automatic installation script, that also changes some default settings.

these settings will help

gsettings set org.gnome.desktop.screensaver lock-delay 3600
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

recheck with dconf-editor

when using the gui, these properties will also change in dconf-editor.

This is what did it for me:

gsettings set org.gnome.desktop.screensaver idle-activation-enabled 0


How do I set a custom resolution? I tried to use xrandr to set 1680x1050 as a new mode to VGA output, but it says:

sudo xrandr --addmode VGA-0 1680
X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  140 (RANDR)
Minor opcode of failed request:  18 (RRAddOutputMode)
Serial number of failed request:  35
Current serial number in output stream:  36

First generate a "modeline" by using cvt
Syntax is: cvt width height refreshrate

cvt 1680 1050 60

this gives you:

# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

Now tell this to xrandr:

xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

Then you can now add it to the table of possible resolutions of an output of your choice:

xrandr --addmode VGA-0 1680x1050_60.00

The changes are lost after reboot, to set up the resolution persistently, create the file ~/.xprofile with the content:

#!/bin/sh
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA-0 1680x1050_60.00

Definitely you have to take a look at autorandr, there seems to be no easier way.
This is the man page (from Ubuntu):
http://manpages.ubuntu.com/manpages/bionic/man1/autorandr.1.html
And this is the source code:
https://github.com/phillipberndt/autorandr
Install it in Ubuntu with:
sudo apt install autorandr

Then just save your current config with:
autorandr -s myFaveConfig

and change config and save others with
autorandr -s myOtherConfig

Then just apply them whenever you want with:
autorandr [theConfigIwant]

for example:
autorandr myFaveConfig

will load the first config you saved in this example.
Nothing easier !!


Which architecture should I use? Which architecture os do I use? I have a 32-bit processor, but I also have 4GB of RAM, the download page says the 32-bit system is for computers with less than 2GB of RAM.

If you have a 32-bit CPU, then you have no options. Only a 32-bit OS can be installed.

Ubuntu is shipped with pae-enabled kernels. Up to 64 GB of RAM can be used.

But not more than 4 GB per process.

If you have 4GB of ram then you have 64bit CPU or Physical Address Extensions. 4GB + all of the memory-mapped io, is more than a 32 bit can handle.

Your choices:

Use 32bit system: Can't use all of ram (approximately 3GB but can vary, it depends on what other hardware the system has). 3GB total mapped memory per process.
Use 32bit-pae kernel: Can use all of ram (max 64GB, kernel team say performance is degraded above 8GB, due to pae complexities). 3GB total mapped memory per process.
Use full 64bit system (if you can): can use all of ram. lots of GB total mapped memory per precess.
Use hybrid 64bit system (install 32bit system, then enable 64 bit kernel): can use all of ram. 4GB total mapped memory per process.

All but full 64bit will use the 32 bit install disk. It is just a case of trying different kernels.

Note: processes can map memory up to totals listed above. They can map RAM, files, swap, shared libraries, etc.


Safely Unmount External Drive on Lubuntu I'm using Lubuntu and have an external hard drive.

I would like to safely unmount the external hard drive.

Clicking the eject button in the file manager unmounts the drive, but does not power it down. (EDIT: Clicking on mount and then unplugging the drive means, at least on my machine, that the drive is still spinning when it's unplugged. This isn't good for the drive, so it's not good for my data!)

Naturally, 'umount' does not perform this function.

I can issue 'sudo hdparm -Y /dev/sdb', but this still leaves the drive's light on and I don't think it syncs the drive.

I seem to recall 'sudo sdparm --command=stop /dev/sdb' powering the drive down appropriately in the past, but this doesn't seem to be working now, and it's a mystery as to why the GUI doesn't have an option to do this.

Any suggestions?

I think udisks --detach [device] can help you.

Unmounting the drive is enough to sync it and to be safe in unplugging it, with the added advantage of being able to remount it, if you want.


Somehow an entire directory got changed into binary files, including my folders Totally new to linux - trying to learn it as I'm a PHP developer. I was having some issues with wordpress and in trying to fix them my permissions got out of whack for my /var/www/html folder, to the point where I had to launch Atom using sudo atom just so I could write to my files. Today I tried to fix the issue, and honestly I don't understand the linux permission system whatsoever, so I just turned to Google. I found a recommendation to use:

sudo chmod 766 -R /var/www/html

I used that, and now everything in the html directory has been changed to a binary file (Binary (application/octet-stream)). All of the folders have been changed to binary files with the same name as before and all of the files that were inside of those folders are nowhere to be found. Is there any way to recover these files?

I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!


Ubuntu OpenVPN is connected but won't change IP I know very little, just want a VPN so I can browse in privacy. So...

I downloaded the .ovpn file from CyberGhost, downloaded OpenVPN, put in the details and all that. At first it didn't connect to the internet at all but I changed the iptables and stuff like that (as forums suggested - I don't understand this stuff) and then it started working.

Now my issue is that my VPN doesn't change my IP at all.

Here's some data. I don't know much what this means. I just want my VPN to work :'(

ifconfig

eth0      Link encap:Ethernet  HWaddr a0:d3:c1:65:df:a2
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:12524 errors:0 dropped:0 overruns:0 frame:0
      TX packets:12524 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:1202759 (1.2 MB)  TX bytes:1202759 (1.2 MB)

tap0      Link encap:Ethernet  HWaddr 62:22:d9:7f:3c:da
      inet addr:10.129.9.170  Bcast:11.255.255.255  Mask:254.0.0.0
      inet6 addr: fe80::6022:d9ff:fe7f:3cda/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:100
      RX bytes:0 (0.0 B)  TX bytes:8996 (8.9 KB)

wlan0     Link encap:Ethernet  HWaddr 48:5a:b6:81:4e:65
      inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::4a5a:b6ff:fe81:4e65/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:219619 errors:0 dropped:0 overruns:0 frame:0
      TX packets:137619 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:266730368 (266.7 MB)  TX bytes:15699055 (15.6 MB)

Some kind of config.

client
remote 4-ro.cg-dialup.net 443
dev tun
proto udp
auth-user-pass

resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo

ca ca.crt

cert client.crt

key client.key

I also have 'use this connection only for resources on its network' ticked.

/sbin/route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref        Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
5.254.97.77     192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
10.0.0.0        0.0.0.0         254.0.0.0       U     0      0        0 tap0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

This was all whilst the VPN was connected. Can you help explain to me in layman's terms what I need to do? I really need help.

I also have 'use this connection only for resources on its network' ticked.

This might be the problem. To use a connection only for it's ressources means, that you address only services inside this vpn through that vpn. If you connect to a website, which is apparently not inside this network, it is not a local ressource and will not be connected through the vpn.

Also your first route entry says

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0

which means that all connections to outside go through your wlan0 interface. With a working vpn it would look like this (adapted to your case):

0.0.0.0         254.0.0.0        0.0.0.0         UG    0     0        0 tap0

I assume that you are using the network-manager to connect so I would recommend to untick 'use this connection only for resources on its network'.
Also if you're using the network-manager you usually don't need to change any iptables rules, only if you are using the openvpn service with the config file.

I wonder where you downloaded that from?

https://support.cyberghostvpn.com/index.php?/CGVPN/Knowledgebase/Article/View/393/0/devices-that-support-cyberghost-vpn

I don't see the download there for linux?

Anyway I'm looking to install it as well, but got stuck real fast.


GRUB not responding to keyboard I installed Ubuntu 12.4LTS on dual boot with Windows XP on my 7 year old desktop PC 2 months ago.
Everything worked perfectly in both Ubuntu and XP until last week when I removed LibreOffice from Ubuntu and installed OpenOffice 4.0.1. (removal/installation done from Terminal as per Ubuntu online instructions).
At the GRUB menu window, the keyboard is now inoperative, so the system times out and boots Ubuntu (which still works perfectly) but I cannot boot XP.
The keyboard (USB) works perfectly at the BIOS stage of startup, does not work during GRUB, but works again from the Ubuntu login onwards.
I have looked through the Q&As for a solution, the nearest refers to BIOS keyboard setup, but as my keyboard works in BIOS I don't think this is the cause.
I am not sure where the problem might be.  I have looked at grub.cfg, and whilst a newcomer to Linux, cannot see anything obviously corrupt, although I cannot identify which method/module/function call (if any) reads the keyboard.
I was considering reloading GRUB, but if the problem is elsewhere this won't solve it, and might make matters worse.
Any advice would be much appreciated.

Windows 7 and Ubuntu 14.04LTS dual boot, GRUB2 reinstalled using boot-repair, wireless USB keyboard, no keyboard recognized on GRUB2 screen resolved.

BIOS Setup
Integrated Peripherals
Legacy USB Support --> [Enabled]

I now have up and down arrow keys on the GRUB2 screen. NumLock is now toggled off at boot time, but NBD.

I'm not sure how to mark it RESOLVED, but since it's not a new thread, I don't think I have the power.

I had the same problem but none of the above helped. In my case I had to enable the BIOS option "use USB in DOS".


Printing from 14.04 on Canon MG6350 I cannot get printing to a Canon Pixma MG6350 work on my HP255 G1 running Ubuntu 14.04 LTS.  The printer wakes up but does not print.  Help would be much appreciated.

stuart, and you visits this page.

https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk/+packages

this article, is solution for install driver for printer mg6350.
http://linuxg.net/how-to-install-drivers-for-canon-printers-pixma-mg-series-on-ubuntu-14-0413-1013-0412-1012-04-linux-mint-16151413-pear-os-87-and-elementary-os-0-2/

good luck.

Bye.


Hosting my own Cloud IDE like cloud9 Hi I have a headless ubuntu server and would like to install some sort of cloud9 like IDE - any suggestions with instructions?

Code highlighting and hinting would be excellent. This is for mainly PHP development.

I recommend Codiad - dark theme, git, terminal, easy setup without big dependencies.

Also you can use koding.com without installing full ide on your server - you will need to install only plugin that needed to connect to your machine over ssh. So, here you will have terminal and file viewer - working nice for me.

Another cloud IDE without installing anything at your server, even plugin for connection - codeanywhere.com:

And Eclipse Che that now in Alpha and I not tested it but looking good:

Also you can use vi as nice text editor - you will need only to connect over ssh to your machine.

And another option - you can use atom with some plugin for remote editing of files, or you can edit file locally and click some buttons to upload file to server (with git of with some plugin).


How to boot persisted Ubuntu image? I am using Ubuntu 14.4 on Live USB, here i have installed and configured my project work. But now i am planning to permanently install the same on my system.
Is there a way to install the entire persisted image, i mean the exact copy of Live USB permanently onto my system?

Thanks in advance.

If your looking to install the Ubuntu OS, a great tutorial (depending on your Windows) would be  here. Your question was unclear to me, so maybe you just want to copy your work to Windows from the portable boot. Just simply copy the file into the folder "Windows" on the file explorer.


kill a screen session I'm trying to kill a screen session. I noticed a lot of other related questions, but none of those answers are working for me. I am trying to kill the following session:

screen -ls
There is a screen on:
    23520.pts-6.porkypig    (09/30/2013 02:49:47 PM)    (Detached)
1 Socket in /var/run/screen/S-root.

screen -r 23520.pts-6.porkypig

Now I am in the session. According to the documentation:

http://www.gnu.org/software/screen/manual/screen.html#Quit

I am supposed to press "control a" and then "control \". I do that and nothing happens.

Another solution said to  press Ctrl+a and type :quit. However, again it doesn't do anything. In fact, pressing control+a, absolutely nothing happens afterwards except a message "No Other Window"

first you need to re attach to the screen session
screen -r 23520 as you have done. Then press ctrl + a and then a k and press y when it asks if you really want to kill the session

Source

Press ctrl+d to kill screen window. Repeat this until you kill all screen windows. Once you ran out all windows screen will kill the session and terminating. Shortest solution if you not having many windows


How to make a bash script execute when the battery on my laptop begins charging/discharging? I have a conky setup that displays my battery level. The problem is, whenever I plug/unplug my laptop from the charger I need to run the conky-startup script to get it to display properly. I find this to be a pain (Even though I have a launcher set up that runs the script when clicked on) and would like to know what I need to do to make the script run whenever I plug/unplug my laptop from the charger.

Here's a pretty simple script that can be added as Startup Application and will run continuously. Insert the command you want to run upon detecting change in power method, as specified in the comments.

#!/bin/bash
# Author: Serg Kolo
# Date: June 17,2015
# Description:  this script detects changes in
# the powering method, and does something user
# specifies in appropriate field

on_ac_power
PREVIOUS=$(echo $?)

while [ 1 ]; do
    # check if we're on ac power or not
    on_ac_power
    CURRENT=$(echo $?)
    # check if previous values are current
    # are different. If they are
    # raise the flag.
    if [ $CURRENT -ne $PREVIOUS ]; then
        echo things changed
        # Insert commands you wanna run here
        # in the space below this comment
        echo running custom stuff

        # when done: make current value previous
        # for future comparison
        PREVIOUS=$(echo $CURRENT )
    else
        # if previous values and current are same
        # it means we didn't switch from battery to
        # ac or vice versa; do nothing
        continue
    fi

    sleep 1
done

Here is a generic approach:

#!/bin/bash

status="$(grep -Po '^charging\s+state:\s+\K.*$' /proc/acpi/battery/BAT0/state)"

if [[ $status = 'charging' ]]; then
    ##Charging, Do something

elif [[ $status = 'discharging' ]]; then
    ##Discharging, Do something

elif [[ $status = 'charged' ]]; then
    ##Charged, Do something

else
    ##Battery not found, Do something
fi

/proc/acpi/battery/BAT0/state contains the status of the battery, replace BAT0 if the battery name is different in your case
The line starting with charging state: of the file contains the status whether the battery is charging, discharging or charged
We save the status string from that line in the variable status
Depending on the value of status, we can do what we want.


Trying different flavors of Ubuntu from a USB drive Is it possible to have a dual boot of different Ubuntu versions? X K L M E U Since only 1 gig of space is recommended you should be able to have 8 possible version on a 16 gig flash drive. Cause I really hate the scroll scroll bars in the Unity version and want to see which system I Like best XFCE, KDE, Fluxbox custom(is what my friend uses), etc.

Currently I have made 3 boot up drives all one USB drive which means erasing and reinstalling every time.
Cheers,,

There's "MultiSystem – Create a MultiBoot USB from Linux" The main page is in French so look here: http://www.pendrivelinux.com/multiboot-create-a-multiboot-usb-from-linux/

You could customize the live CD image before writing it to your flash drive: Use package uck , although this is based on your already having Ubuntu installed to run uck. Just get Ubuntu in live CD, install uck to the live session, use it to customize an image, save the image, and write it to flash drive under Windows(As the squashfs partition may be in use when the liveimage is running)
Source:Experimentation and synaptic description of uck
I believe uck is in universe.


Firefox very slow to start I have a new computer with Ubuntu 16.04 LTS installed.

When launching firefox, I have to wait several minutes for the start page to appear. I just have this:

Once I'm finally on the start page, the navigation is perfectly normal. I tried to reinstall firefox and to run it on safemode, but none of these solved my problem. I first thought it was a connection problem, but it's not, since Chromium works just fine.

I admit this to be an oddball answer but here I find I need to reboot my DSL Router when connectivity to the outside world slows down: Firefox, ansiweather (Terminal-based weather utility), etc.  To me everything in the Router's web pages look fine -- 40-50% memory usage, etc.  Boot the Router and I'm back to full speed for another month or so.  HTH.

In my personal experience, I managed to speed up Firefox (and overall looking my entire PC as well) using software called BleachBit. You can find it in Ubuntu Software.

After installation, you'll be asked to enter your username's password. After that you're left with a powerful software that can clean your APT (Advanced Packaging Tool), Bash history, Deep scan, Firefox (everything from backup files, caches, cookies, passwords and even URL history), Flash caches and cookies, LibreOffice cache and history... But most importantly, you can perform some amazing System cleaning (I personally recommend that option).

I used an options called "Free disk space" which overwrites free disk space to hide deleted files and "Memory" which wipes the swap and free memory. It improved my overall system speed.

Much luck!


"kill " not really killing the process, why? I am trying to improve my command line skills and I have encountered a problem where I cannot kill a process. I type kill 2200 where 2200 is my PID and the process is not killed. After few minutes wait is still in the top and ps aux.
I have even tried typing it with sudo - no results.

Any ideas why it would be like that ?

EDIT

I have found a weird dependency, where fg updates the processes list:

x@xxx:/etc/grub.d$ ps
  PID TTY          TIME CMD
 1723 pts/0    00:00:00 bash
 2200 pts/0    00:00:00 top
 2202 pts/0    00:00:00 top
 2258 pts/0    00:00:00 ps
x@xxx:/etc/grub.d$ fg
top

x@xxx:/etc/grub.d$ ps
  PID TTY          TIME CMD
 1723 pts/0    00:00:00 bash
 2200 pts/0    00:00:00 top
 2620 pts/0    00:00:00 ps
x@xxx:/etc/grub.d$ fg
top

x@xxx:/etc/grub.d$ ps
  PID TTY          TIME CMD
 1723 pts/0    00:00:00 bash
 2621 pts/0    00:00:00 ps

Processes can ignore some signals. If you send SIGKILL it will not be able to ignore it (and neither catch it to do cleanups). Try:

kill -9 {PID}

Learn more by reading the manual page:

man kill

From within C++, I executed:

kill(4024, SIGKILL);

And on a linux(Ubuntu) terminal,

$ ps -ax | grep my_su

The output was:

4024 pts/1    Z+     0:00 [my_subscriber] <defunct>

Seemingly, it (4024) still surviving. However, as soon as I terminated the parent process which called the above "kill" statement, 4024 didn't appear any more. Now I judge "defunct" process is nothing more than a line displayed and decided to ignore it. I hope my experience could help someone out there. Cheers!


Is there any performance difference between Ubuntu Unity and Classic/Fallback? is there any difference between using Ubuntu Unity and GNOME Classic/Fallback? Just to be clear, I'm not talking about the Launcher or the Dash. Of course Ubuntu Classic/Fallback doesn't have the Launcher/Dash, but this is not the difference I'm talking about. I mean differences related to performance, features, functionalities, compatibilities, etc. These kinds of differences. I'm asking this because I've heard the Fallback Mode is kind of "incomplete" when it's compared to Gnome Shell or Ubuntu Unity, so I just wanted to know whether or not it's true, because if it's true, I don't think using Fallback Mode is worth it.

The standard Unity interface makes use of your graphics card's OpenGL capabilities to composite the different windows to form the desktop image.

The Gnome fallback mode doesn't make use of compositing, so rather than applications drawing to their own buffers and having the compositing manager draw those buffers to the screen, they instead draw to the screen directly.  This is simpler and can the performance difference can be noticeable if you have an underpowered video card or the video card drivers are not up to scratch.

With that in mind, there is also a "Unity 2D" login option you can choose that doesn't act as a compositing manager.  For the most part it should perform roughly as well as the Gnome fallback mode.  So if you like the Unity interface but are having trouble with performance you might want to try that.

One thing is certain though, the Fallback Mode is more productive and useful than the standard, default session. You don't get the full repertoire you may expect, but there's progress, good, healthy progress. In one fell stroke, you gain some 50-60% of your expected desktop functionality, which restores a bit of sanity and hope. Theoretically, you could get your old desktop back with some careful work on extra features, backward compatibility and a dab of visual polish. Experienced Linux distribution developers could pull this off easily, rebranding the skeleton looks with their own unique touch. Once again, we go back to Linux Mint, which has shown the art of subtle visual transformation many times over in the past.


unable to uninstall comodo on 12.04 lts 32-bit system I tried to uninstall comodo but it is showing the following errors:

anurag@ubuntu:~$ sudo apt-get --purge remove cav-linux
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
anurag@ubuntu:~$

What can I do about this?

Step #1 = Boot an Ubuntu disc, and choose try without installing

Step #2 = open nautilus and open your ubuntu install, thus mounting it.

Step #3 = Open terminal and type:

"sudo mount --bind /dev /#location#/dev"

"sudo mount --bind /proc /#location#/proc"

"sudo mount --bind /sys /#location#/sys"

"sudo chroot /#location#" (don't close the terminal or you'll have to type this again)

"apt-get --purge remove cav-linux"

Step # 4 = shutdown the live cd and reboot into your Ubuntu 12.04 install.

[#location# equates to the mounted access for your ubuntu install, eg /media/ubuntu/sda1 ]


Ubuntu 16.04 LTS occasional slow restart and shutdown Occasionally when restarting or shutting down (about 1 out of 5 times) the PC takes about 1-2 minutes to restart instead of the usual 2-3 seconds.

This screen appears and keeps loading something until it shuts down after a minute or two.

I have no idea what is causing this, initially I thought maybe it's updates that are being finalised. But It happens even when I haven't installed anything and it's hard to pinpoint exactly when it happens.

In my experience it is because there are applications that have open files. A sure-fire way to test this is for you to close all applications before shutting down and restarting.

Some other people have found this to be caused by the CUPS software (related to remote printers) here: Slow shutdown on Ubuntu 16.04 LTS (Stopping thermal daemon/running fit make remote CUPS printers)

If that's what the problem is for you too, the short answer is:

sudo systemctl disable cups-browsed.service


Can't ping websites with domains but can ping websites with ips The DNS on my Ubuntu Server isn't working. I changed some settings while trying to get my domain to go to my server and I think I reverted the changed back but it still doesn't work. It started happening after I removed Webmin by doing:
apt remove webmin

I know the problem is with dns since:
Pinging Google.com:
https://i.stack.imgur.com/t9Uto.png
Pinging 142.250.64.238 (Google's ip)
https://i.stack.imgur.com/RCcOo.png
Also I now can't update my server since the packages use domains:
https://i.stack.imgur.com/89grR.png
This is what shows up when I do the command ip a:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether a0:8c:fd:4a:1b:0e brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.13/24 brd 192.168.0.255 scope global dynamic enp1s0
       valid_lft 83038sec preferred_lft 83038sec
    inet6 2600:8802:2901:8a00:a28c:fdff:fe4a:1b0e/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86384sec preferred_lft 86384sec
    inet6 fe80::a28c:fdff:fe4a:1b0e/64 scope link
       valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 68:14:01:51:32:10 brd ff:ff:ff:ff:ff:ff

try this flow:
remove the symlink:
sudo rm /etc/resolv.conf

in /etc/resolv.conf
sudo nano /etc/resolv.conf

put
nameserver 8.8.8.8
nameserver 8.8.4.4

and make it immutable:
sudo chattr +i /etc/resolv.conf

The last command will add immutable bit, so the file doesn't get
overwritten. After you set immutable bit, even the root account will
not be able to write to the file. If you wish to edit the file again
latter on, and remove immutable bit, use this command:

sudo chattr -i /etc/resolv.conf

No write permissions on a file even with `sudo`


Downloaded themes don't show up in Unity Tweak I have a fresh 16.04 install, and try to customize it a bit.

I got a few themes in /usr/share/themes, but they are not listed in Unity Tweak. So I cannot try them.

Why is that ? How can I use them ?

Themes aren't listed in Unity Tweak

They were already in that folder right after the installation, I only downloaded "Aurora".
As you can see on the picture, I can only access "Ambiance", "Highcontrast" and "Radiance".

Thanks for the help

Try this download to install  the ARC theme, it worked for me.


error message "ubuntu-20.04-desktop no mountable file systems" Trying to install on an old Mac "2009" OS 10.6.8 and still get the error message after reading the previous replies and trying to download latest version. Please help

I had the same problem, and was able to solve it easily when I realized 1 thing:
You know when you download and you get the dialog box which has you choose to either open the file or save it?
I only got the "no mountable file systems" message when I chose to open the file.
Try downloading again, but this time choose "Save."
Hopefully this will work for you too!
Also, this YouTube video does a great job of walking you through it: https://www.youtube.com/watch?v=04ZNAKmm0dI


Ubuntu crashes during installation So I have been trying to install Ubuntu on my old Laptop (HP pavilion dv6)
However during the installation of ubuntu my it seems to crash and restart to windows when I choose 'Install inside of windows 7' option.
I have tried ubuntu 14.04 LTS and 15.04.
Hopefully someone can help me with this problem.

in order to install ubuntu 14.04 or 15.04 i had to remove the battery and make sure the laptop didn't overheat... which i find is a pain in the butt because I never had any issues of the type with windows on it... (other OS issues) but the problem persists even after install; laptop overheats, espexially during updates and crashes.

it hapend with both 14 and 15 I have a HP Pavilion G6

Sorry if this is late but I can definitely relate to your problem.

I have a HP Pavilion DV6 2114sa and let me say first so far it has been a horrible laptop: really loud fan (even after cleaning and new thermal paste), overheated easily, idled at 60', HDMI and VGA are very much hit and miss if they work at all. Anyway back on topic.

I found the laptop after it had been thrown away by my dad when he got a new computer for the reasons above and I fixed it up as much as possible but windows was being a pain so I decided to install Ubuntu 14.04.2 from a disk and it ran but crashed all the time either the screen going black or vertical stripped lines. I don't know if you are having a similar crash but I decided to make a bootable USB for it and I got the same problem but not as often and I managed to install it on the 10th time. Unfortunately it still crashed when I booted it up. I decided that as it is an old laptop that is about 5 years old so I thought I would go for an older version so I downloaded Ubuntu 12.04 and installed that onto a disk but the same problem. So I made another bootable USB with 12.04 and managed to install it on the second attempt. So far it is working fine.

Hope it helps.

(EDIT:Updated 12.04 from inside Ubuntu to 14.04 and it came up with the same problem. I am trying it with 12.10 now to see if I can get that one working. Will tell you how it goes.)


mouse crashes after sleeping mode I've installed Ubunutu 14.04 on my laptop, but I have a little problem. If I use sleep mode on my PC (closing it), after opening it, my mouse stops using. I can't click and can't move it neither. I tried to push "fn+f9", because it is the shortcut on my computer (asus) to turn off the mouse. It works normally, but after sleeping mode it shows only off mode...
Have you got any answers or I have to reinstall it?
Thanks!

Same problem bro, upgrade to 15.10. Use the "Software Update" tool. It'll update just about everything thats in the repositories you've got setup.

Edit: you need to update all your software before you can upgrade the install. the same tool does it.


Default login screen missing, how to revert? I installed some KDE stuff by mistake. After removing it, my login screen now is quite different; has a white background and the user icons+input appear in the centre.

[note that I have tried sudo dpkg-reconfigure lightdm; amongst other things]

How do I revert back to the default Ubuntu 13.10 x64 desktop one?

You just have to edit your /etc/lightdm/lightdm.conf file, and change this line

greeter-session=lightdm-kde-greeter

to this one

greeter-session=unity-greeter

Or simply reconfiguring the greeter (not the Desktop Manager) might work also:

sudo dpkg-reconfigure unity-greeter

For me

sudo apt-get purge lightdm-gtk-greeter

did solve the issue


/etc/network/interfaces is almost empty I'm trying to set up a static IP address for my LTSP server as to configure one of my two NICs (internal one : Server -> Light client) via the /etc/network/interfaces , but when I open the interfaces file all I can see is this :

auto lo
iface lo inet loopback

Is this normal?

This is normal. What you have is exactly the same as what's in /etc/network/interfaces on my Ubuntu 14.04 system (which is working fine and networking actively through two separate physical interfaces).

By default an Ubuntu desktop system uses NetworkManager to manage network connections automatically and dynamically. This does not require (and in fact typically requires there not be) entries detailing configuration of your physical interfaces in /etc/network/interfaces.

(NetworkManager, if changed from running in "unnmanaged mode" to "managed mode," will recognize and work with /etc/network/interfaces entries. But unmanaged mode is the default.)

Sources:

Ubuntu help wiki - Network Manager - Issues
nux's answer to How do I use /etc/network/interfaces instead of network-manager
NetworkManager (on Debian wiki)
NetworkManager's README.Debian file (also /usr/share/doc/network-manager/README.Debian, and related)
BatchyX's answer to Wireless Networks showing “device not managed” in Network Manager

No, there should be a lot more info in the interfaces file. Have you tried setting the IP using ifconfig yet?

ifconfig eth0 up
ifconfig eth0 x.x.x.x
ifconfig eth0 netmask x.x.x.x
ifconfig eth0 broadcast x.xx.x.x

or you can try to edit the interfaces file with the following lines:

iface eth0 inet static
    address x.x.x.x
    netmask x.x.x.x
    gateway x.x.x.x
    broadcast x.x.x.x


Unable to mount Windows (NTFS) filesystem due to hibernation Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.

When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.

Here's my partition table, if any more data is needed please let me know.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    20000767     9999360   83  Linux
/dev/sda2        20002814   478001151   228999169    5  Extended
/dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT
/dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris
/dev/sda5        20002816   478001151   228999168   83  Linux

A bug has been filed about the Nautilus dialog you are seeing as it recommends a potentially dangerous option that could result in data loss.  Please do not run the command in this dialog unless you want to delete your saved Windows session and potentially lose unsaved work.

  Explanation: Why Linux can't open hibernated Windows partitions:

  You are seeing this error because you hibernated Windows instead of
  turning it off the normal way (in newer versions of Windows, hibernate
  might be the default option).

  Hibernating saves the current state information to the hard disk and then powers down the computer.
  Shutting down the computer closes all programs and ends all running processes before powering down the computer.

  When you turn off Windows by hibernating it, you are essentially
  pausing the system and saving all of that information (into a big file
  called hiberfil.sys)  This way when you resume from hibernation all
  of your applications and files will be exactly how you left them.  It
  also sets a flag in hiberfil.sys to let other Operating Systems know
  that Windows is hibernated.

  Making changes to your Windows (ntfs) partition while it is
  hibernated could be dangerous--it could cause Windows to not resume
  from hibernation or to crash after resuming.  Because of this, the
  tool (ntfs-3g) that mounts (opens) the partition will not mount it
  in read-write mode if it sees a hibernation flag.  As such, Nautilus,
  the default file browser, will not be able to automatically open this
  partition--hence the error message that you see--because it is trying
  to open it in read-write mode.

Workaround for all versions of Windows:

There are three ways to mount a hibernated Windows partition:

Boot into Windows and power down the system by shutting it down
completely.  You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus.  Note that the "Shut Down" option may not be the one
displayed in your start menu by default.  You may need to click the
button next to it to see further options.
Manually mount the filesystem in read only mode.

Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media
using this command:

ls /media
If you don't see a folder for your Windows partition, you should create one with the following command:

sudo mkdir /media/windows
Next, mount the partition in read-only mode onto this folder with this command:

mount -t ntfs-3g -o ro /dev/sda3 /media/windows

Note that you should change /media/windows if your mountpoint is called something else.
Now you will be able to view/open files on your Windows partition using any program in Ubuntu.  However you will not be able to write
to the partition or modify any files as it is in read only mode.

If you need to mount the partition in read-write mode and are not
able to or willing to boot into Windows and shut it down completely
there is a third option.  However, it is not included here because it completely deletes hiberfil.sys and will cause you to lose all
unsaved information in the hibernated Windows programs.  The following is a quotation
from man ntfs-3g about the option that would be used to do this.

remove_hiberfile
              Unlike in case of  read-only  mount,  the  read-write  mount  is
              denied  if  the  NTFS  volume is hibernated. One needs either to
              resume Windows and shutdown it  properly,  or  use  this  option
              which  will  remove  the  Windows hibernation file. Please note,
              this means that the saved Windows  session  will  be  completely
              lost. Use this option under your own responsibility.

Solution (only for Windows 8 and 10):

There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:

  Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.

Open Control Panel in the small icons view and click on Power Options. (see screenshot 1)
Click on Choose what the power buttons do. (see screenshot 2)
Click on Change settings that are currently unavailable.
(see screenshot 3)
Uncheck Turn on fast startup (recommended). (see screenshot 4)

Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu.

If you still aren't able to mount without getting errors, you may need to turn off hibernation completely. Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:

powercfg /h off

Source: Fast Startup - Turn On or Off in Windows 8.

Windows 10 and Windows 8 both act funny about shutting down. Delete the fast boot option in Windows and if using Windows ten, make sure you reinstall the home option, which looks like a house, from Windows 8.. Then use it to shut down, not restart, when you want to go into Linux, or the error will continue to pop up, and when in Linux you cannot access the one drive... Or more than one Windows drive on my system... As I have one drive I use for sharing files between Linux and Windows.


"dpkg-divert: error: rename involves overwriting `protocol.txt' with different file `protocol-precise.txt'" while upgrading xorg This happen after the download of Ubuntu 13.04 and I can't even download stuff because of this problem:

root@Viktor-Dator:/home/viktor# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
xserver-common-lts-raring
The following packages have been kept back:
libboost-dev libboost-filesystem-dev libboost-regex-dev libboost-system-dev
libboost-thread-dev
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 1,646 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 264683 files and directories currently installed.)
Removing xserver-common-lts-raring ...
Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-raring'
dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with
different file `/usr/lib/xorg/protocol-precise.txt', not allowed
dpkg: error processing xserver-common-lts-raring (--remove):
subprocess installed post-removal script returned error exit status 2
No apport report written because MaxReports is reached already
Errors were encountered while processing:
xserver-common-lts-raring
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@Viktor-Dator:/home/viktor#

Output off sudo apt-get check

viktor@Viktor-Dator:~$ sudo apt-get check
[sudo] password for viktor:
Reading package lists... Done
Building dependency tree
Reading state information... Done
viktor@Viktor-Dator:~$

Ok, since apparently is not any package that when bad, we must remove it manually without the help of apt-get:

sudo apt-get update
sudo apt-get -s --reinstall install xserver-common
sudo dpkg --purge --force-all xserver-common-lts-raring
sudo apt-get --reinstall install xserver-common
sudo apt-get autoremove

Now you may want to unhold the package that you have hold:

sudo dpkg --set-selections < echo "libboost-dev install"
sudo dpkg --set-selections < echo "libboost-filesystem-dev install"
sudo dpkg --set-selections < echo "libboost-regex-dev install"
sudo dpkg --set-selections < echo "libboost-system-dev install"
sudo dpkg --set-selections < echo "libboost-thread-dev install"

Do a final sudo apt-get check to verify that everything is ok.

first you need to clear your console so just try this command that will clear your fault dependency in your system. and you can install any plugin again.

sudo dpkg -r libjack-jackd2-0
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade

The commands remove the offending file, attempts to fix the broken dependency and updates your system.


Installing Ubuntu onto MacBook Pro via USB I am new to this forum, and to Ubuntu. But I am trying to get it installed onto my MacBook Pro (late 2009 - with an installed Samsung SSD).

I have attempted to follow the tutorial on the Ubuntu website:

www.ubuntu.com - How to create a bootable USB stick on OS X

But it doesn't seem to work. I have rEFIt installed as well. I have partitioned my SSD into my main one (Macintosh HD), and a new one (~30GB, Ubuntu). I then followed the tutorial through, but it still doesn't seem to work. I have a few questions (parts I might have messed up on):

I downloaded Ubuntu 13.04, 64 bit. Is this OK?
On Step 3, I renamed the new image so that it ended in ".img" instead of ".dmg", which it converted to. I did this because the rest of the tutorial referred to a file ending in ".img". Was this what I was supposed to do?
When I rebooted and held down the alt key nothing but the rEFIt drive (and the Mac recovery drive came up. No Ubuntu drive (partition), and no USB drive, is this supposed to happen? However, when I booted into rEFIt, the USB drive came up, and when I ran it, it came up with a sort of purple screen the a keyboard and accessibility icon in the bottom center of the screen, after this however, it goes black (screen does not turn off).

(4. If I ever do get it installed, will I have to install any drivers for either my Mac harware or my SSD?)

I am currently on Mountain Lion. The reason why I am using a USB drive is because my MacBook Pro keep spitting out anything (except films...really odd) that I put into it. It rejected the Windows installation disk (which I put into test), and it rejected all CDs and DVDs which I attempted to burn Ubuntu onto.

I suggest you try the Mac version (64bit perhaps) of Ubuntu (or whatever flavor you wish) available on the main Ubuntu release page.

Then you put the ISO on the USB drive using Unetbootin for Mac. Thanks to REFIt or Refind it will work.

Source: That's The Way You Do It: How To Install Ubuntu 13.04 On A Macbook Air Using USB Drive


Do additional language packs need to be downloaded? I'm installing Ubuntu (12.04) right now.

I wanted to know if additional language packs have to be downloaded because my Internet is very slow. I chose English as my language.

Your ISO does not contain everything you need, instead it holds most necessary things.

There is a guide to install a language pack here.

I think it's necessary to download. Check here to find a nearby server to add in your etc/apt/source.list.


update-rc.d subversion default command not working on ubuntu 18.04 I have ubuntu 18.04 bionic server.

I Install the subversion. Running subversion manually without problems

Manual start command svnserve -d -r /srv/svnrepos/it/

What should I do to run automatically at system startup.

I did these, but it did not

cd /etc/init.d/

touch svnserve

vi /etc/init.d/svnserve

svnserve file content
   svnserve -d -r /srv/svnrepos/it/

update-rc.d svnserve defaults

but I could not run update-rc.d

### BEGIN INIT INFO
   # Provides: 3Proxy
   # Required-Start: $remote_fs $syslog
   # Required-Stop: $remote_fs $syslog
   # Default-Start: 2 3 4 5
   # Default-Stop: 0 1 6
   # Short-Description: Initialize 3proxy server
   # Description: starts 3proxy
   ### END INIT INFO

In order for update-rc.d to work correctly, you need to add a section to svnserve::

### BEGIN INIT INFO
# Provides: svnserve
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Initialize svnserve
# Description: starts svnserve
### END INIT INFO


zsh: command not found after npm install in ubuntu I have installed up to date version of node using:

curl -s -O https://deb.nodesource.com/node_5.x/pool/main/n/nodejs/nodejs_5.7.1-1nodesource1~trusty1_amd64.deb
sudo apt-get install rlwrap
sudo dpkg -i nodejs_5.7.1-1nodesource1~trusty1_amd64.deb

There after I installed yo using

 npm install -g yo

But when I try it out, I get an error that says:

zsh: command not found

With echo $PATH,

/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

How can I get this working ? I am very new to Ubuntu and pretty clueless about it.

I solved the

zsh: command not found

issue for the npm libraries by setting the path in ~/.zshrc

Setting the following path in ~/.zshrc solved my issue

echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc

zsh is a alernative to your bash shell.

You installed yeoman for node. (https://www.npmjs.com/package/yo)

To install zsh you can do so like this:

sudo apt-get update && sudo apt-get install zsh

and then type zsh to get started with zsh.

If you like zsh you should look into oh-my-zsh for some nice terminal themes and plugins.

http://ohmyz.sh/


How can I set sources.list to have the latest stable version? Is it possible to set the sources.list file to automatically have the latest stable version of the operating system, like in Debian when you set "stable"?

No, Ubuntu does not have a comparable repository to Debian/stable.

The term 'stable' has two meanings:

Debian's 'stable' means that the software is older, has had more time to get debugged, and is less likely to crash.

Ubuntu's 'stable' (used in LTS) means that the software won't change, so it won't break your workflow. It does NOT mean 'less likely to crash'...though several years into an LTS cycle that is also true.

Ubuntu does NOT maintain testing/unstable/stable pockets that you can use in your sources.list. Those are Debian-only. Ubuntu users are expected to release-upgrade either every six months (standard release) or two years (LTS release). The system will not initiate a release-upgrade for you.

I don't remember if is my fault but in my configuration I had "xenial" setted so was forced to remain at latest LTS, now I setted cosmic. Like below:

deb http://it.archive.ubuntu.com/ubuntu/ cosmic main universe restricted multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ cosmic main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu cosmic-security main universe restricted multiverse
deb-src http://security.ubuntu.com/ubuntu cosmic-security main universe restricted multiverse
deb http://it.archive.ubuntu.com/ubuntu/ cosmic-updates main universe restricted multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ cosmic-updates main universe restricted multiverse

This is linked to "cosmic" so when will arrive the next version I will have to change the source file to the "d*" version of Ubuntu. I want to avoid this future edit of the file.


Is there another way to restart the sound system if pulseaudio/ALSA don't work? I was listening to music, and my sound suddenly went dead in all my applications. I'm using Ubuntu 12.04, which uses pulseaudio, so I tried sudo /etc/init.d/pulseaudio restart, but nothing happened. According to lsof | grep pcm, nothing is using the soundcard at the moment, although I'm not entirely sure if my source for that command is applicable.

Is there a way another way to restart Ubuntu 12.04's sound system from the command line without rebooting the system?

I've used pulseaudio -k && sudo alsa force-reload a couple of times, and it worked well. The first part kills pulseaudio, the second reloads ALSA. You don't need to restart pulseaudio, because it auto-restarts.

FINALLY! This worked for me, and has worked repeatedly: https://askubuntu.com/a/221922

"Go in to the Preferences and switch the Output Module to ALSA audio output. Quit VLC & relaunch. It worked ok to me"


Google Account not working in fresh install of Ubuntu 18.04 I did a fresh install of ubuntu 18.04 (binonic beaver) and everything is working smooth except I'm unable to sync with my google account/calendar.

When I navigate to Settings --> Online Accounts --> Google, the page load is very slow. Subsequently, after I enter my username, it just hangs at "Something went wrong"

https://i.imgur.com/nSg6BDJ.png

I've found few issues related to this w.r.t gnome installation and apparently and a bug was filed against webkit2gtk. https://bugs.launchpad.net/ubuntu/+source/webkit2gtk/+bug/1687019. However as per that, latest version of webkit2gtk should fix this issue. I'm already on the latest version(I believe) of webkit2gtk.

➜  ~ sudo dpkg -l | grep libwebkit2gtk
ii  libwebkit2gtk-4.0-37:amd64                      2.22.2-0ubuntu0.18.04.1              amd64        Web content engine library for GTK+
ii  libwebkit2gtk-4.0-37-gtk2:amd64                 2.22.2-0ubuntu0.18.04.1              amd64        Web content engine library for GTK+ - GTK+2 plugin process

How do I get google account working ?

I was getting the similar issue but without message "Something went wrong". In my case the Linux sign in dialogue didn't evolve after type password (full frozen white screen).
This erro was happen in this invironment:

Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-71-generic
OS Type: 64-bit

And I resolved it with access to Google DisplayUnlockCaptcha in this link:
https://accounts.google.com/b/4/DisplayUnlockCaptcha
But pay attention: Change the number "4" in the url above for you desire account number, if you have more than one google account.
After access this link and click in "Continue" you will see the message: "account access allowed".
Then, go back to system settings in linux (my case is kubuntu), and try again:
System Settings > Personalization > Online Accounts > Add new Account > Google

And then may worked through the sign in dialogue in Evolution.
This got it up an running for me and for user Simon in launchpad.net.

I spent days trying to figure it out. The problem was with the network configuration actually.

My syslog was full of warning like this:

localhost systemd-resolved[1632]: Using degraded feature set (TCP) for DNS server 127.0.1.1

This thread helped: Syslog flooded with systemd-resolved messages "Using degraded feature set"

In a gist:

Make sure your network manager wont update file you are about to modify by adding
dns=none in [main] section of /etc/NetworkManager/NetworkManager.conf
Look into /etc/resolv.conf. You will probably see the line about nameserver address. Remove or comment it.
Run sudo service systemd-resolved restart to be sure all is reloaded

Those steps made my problem with Google Account login go away.


How do I include lines in resolv.conf that won't get lost on reboot? I have finally migrated to 12.04 from 7.10. I have one last part to complete but I am stumped. I am using Puppet on each server, and in the past I have included a nameserver address and a search domain name for the puppetmaster in resolv.conf.

search puppetmaster.com
nameserver 192.168.1.XXX

In 12.04 resolv.conf gets overwritten when rebooted. I cannot use a static IP for these, so using the /etc/network/interfaces to help me out is a nill point.

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

Is there a way to get resolvconf to handle this either in the head, tail or base? If there is, are there any examples I can use to tweak on my server.

Any help is much appreciated.

It's probably better to have your DNS server be able to resolve 'puppet' to the right address, and either to have your DHCP server hand out the DNS nameserver address and search list or else (if you have static IP addresses) to have something like the following in /etc/network/interfaces.

iface eth0 inet static
    address 192.168.3.3
    netmask 255.255.255.0
    gateway 192.168.3.1
    dns-search example.com
    dns-nameservers 192.168.3.45 192.168.8.10

But if you do want to do it via the resolvconf configuration files you will want to edit /etc/resolvconf/resolv.conf.d/base. In that file, put in your info as you would in resolv.conf.

nameserver 192.168.1.XXX

Then tell resolvconf to regenerate resolv.conf.

sudo resolvconf -u

That configuration is declared in /etc/default/bind9

RESOLVCONF=no|yes

no = don't apply the condition in the init.d bind9

yes, or other value = override resolv.conf

This problem accures when you install bind9 and don't care about check all confs.


What is the Linux equivalent to Windows' Program Files? Under Windows, most applications and application data are stored in a special directory known as C:\Program Files (and occasionally C:\Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?

Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.

Look in /bin, /usr/bin, and anything else that says bin.


Why is ntfs-3g not included anymore by default? Why is ntfs-3g not included anymore in Ubuntu 11.10?

Now I can't write to my NTFS partition.

Just curiosity, why the change?

AFAIK ntfs-3g is included in the default Ubuntu installation, because the virtual ubuntu-standard package depends on it. You've probably uninstalled it by mistake.

Check the output of

dpkg -l ntfs*

If you see something like rc for the package, you've uninstalled it.

EDIT:

From your comments it looks like you installed ntfsprogs. If that is true, then by installing it you automatically uninstalled ntfs-3g, as these two packages are in conflict (in Oneiric). ntfs-3g now provides the functionality of ntfsprogs so it's not needed.

I found out that ntfsprogs has write support for NTFS. And thus it replaces ntfs-3g.

But this package is still a bit buggy and sometimes it doesn't work so you can't create new folders and files on the NTFS filesystems.

So it is working on a random base xD.

In Ubuntu things should be tested more properly. Because they just replaced a working package with a buggy one.


How can i extend my ubuntu partition? I am using ubuntu 16.04 in dual boot with windows 10.

This is how my disk profile in Gparted looks like, how should I use those unallocated 300 GB (or some of it) to extend my ubuntu ext4 partition, what procedure should I follow?

You can resize the partition through Windows 10.  The Disk Management tool should be able to handle this without error.  Make sure you backup your files prior to resize, just in case.

Alternately, you could use a live CD/USB and use Gparted.

Either way, you'll select your partition(sda5) and choose the resize option.


Ubuntu firewall is blocking metatrader from install I want to install metatrader through wine but they say that there's a firewall so they keep asking for proxy server option. How i allow it to install?

Ubuntu firewall ufw is disabled by default.  If you have enabled it, use

sudo ufw disable to disable it again.

You can always check ufw status by typing sudo ufw status verbose.

The mentioned error has nothing to do with firewall. I have faced with it both in Ubuntu and Windows.

Based on my experience (3 installation), the only way to get rid of this error is to just cancel installation and starting it again and again.

To be more in safe margin, configure wine for Windows XP compatibility.

Best of luck


External harddisk formatted recovery I was trying to make a bootable usb stick but i accidently formatted my 1TB hard disk. Is there a way to recover my files. The command that i used for formatting my disk

 sudo dd if=ubuntu-gnome-15.10-desktop-amd64.iso of=/dev/sdc bs=1M

You could try testdisk or other partition recovery program. You probably lost some data.
You can follow this tutorial:
testdisk tutorial
else sources:
similar question


How did I uninstall KDE in 13.04? I wanted to uninstall kde-standard package (not confused with kubuntu-desktop) and all of KDE-related packages in 13.04. Seems lightdm shows too many desktops (because I installed lot of DEs) so Unity desktop selection gone off-screen. My selection is to uninstalls one of DEs I have.

What should I do?

Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get --purge remove kde-standard

Also to clean the list, go to /usr/share/xsessions/, and delete the ones that you want.  Keep in mind this will only remove the DE from the list.

sudo apt-get install -y ppa-purge
sudo ppa-purge ppa:kubuntu-ppa/backports
sudo apt-get autoremove

this works for me


How to set up a DHCP server? I am currently at this stage of setting up DHCP, and id just like to know what this output in terminal means? I know I have to edit a file but I do not know which one, and I do not know what to put in it. Ultimately I would like to set up a DHCP server.

matt@matt-R580-R590:~$ sudo tail /var/log/syslog
Jan  3 17:35:23 matt-R580-R590 dhcpd: Wrote 0 leases to leases file.
Jan  3 17:35:23 matt-R580-R590 dhcpd:
Jan  3 17:35:23 matt-R580-R590 dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Jan  3 17:35:23 matt-R580-R590 dhcpd: ** Ignoring requests on eth0.  If this is not what
Jan  3 17:35:23 matt-R580-R590 dhcpd:    you want, please write a subnet declaration
Jan  3 17:35:23 matt-R580-R590 dhcpd:    in your dhcpd.conf file for the network segment
Jan  3 17:35:23 matt-R580-R590 dhcpd:    to which interface eth0 is attached. **
Jan  3 17:35:23 matt-R580-R590 dhcpd:
Jan  3 17:35:23 matt-R580-R590 dhcpd:
Jan  3 17:35:23 matt-R580-R590 dhcpd: Not configured to listen on any interfaces!
matt@matt-R580-R590:~$

The problem is that with the new dhcp3 server that the config files are done differently than on older installations.

Now the installation is done under isc-dhcp-server the location of the dhcpd.conf file and interfaces has changed along with the mechanism to start stop the service.

The dhcpd.conf file has moved from /etc/dhcp3/dhcpd.conf to /etc/dhcp/dhcpd.conf.
The interface definition has also moved--from /etc/default/dhcp3-server to /etc/default/isc-dhcp-server.

The fields are basically the same but if you have been modifying the original files you will get the error you see above.  Make the mods to these files and you should be OK to go.

Also no best to start and stop using sudo service isc-dhcp-server start/stop/restart.

I was suffering with all these problems on Ubuntu 12.04 but this resolved all the issues and now it's working. I hope this helps you.

I think it means it's not configured to listen to any interfaces and you should write a subnet declaration in dhcpd.conf...
If you don't know what that means then I wonder why you want to set up a DHCP server in the first place because your probably don't need it.


Can Ubuntu be downloaded to a phone? I'm not that savvy when it comes to computers but am good on a phone. Can Ubuntu be installed onto a phone?

The short answer to your question is no. While there is an Ubuntu variant that works on phones and tablets, called Ubuntu Touch, you cannot just download Ubuntu Touch and install it on your phone as you would install a regular Ubuntu desktop on a computer.

If you are highly tech savvy you may be able to install it on a very limited number of supported phones, and there are now some phones preinstalled with Ubuntu Touch. For somebody who claims to be "not that savvy when it comes to computers", installing it themselves is pretty much completely out, and I wouldn't recommend getting a preinstalled Ubuntu phone either (at this point) unless you are very familiar with Ubuntu and want to tinker with it.

If you are still interested, you can get more information on the Ubuntu Touch Wiki.

The short answer to your question is yes. In the form of Ubuntu touch. Have a search on google and you will be able to find the link to download  it and install it. I have this on both my new phone and tablet. You can now buy phones and tablet with just Ubuntu on them. Still new but showing promise. The good thing is is that when you connect a blue  tooth  mouse and keyboard and HDMI monitor your phone or tablet turns into a desktop.


How to run a .run file as root? I downloaded a .run file for a Nvidia driver, but when I run it in the terminal it tells me it must be run as root.

I'm a complete noob and I barely even know what root is. I think it's somewhere around the equivalent of admin in windows.

Well, I got the file to run but it turns out that the driver will not recognize my card.
I've heard about other problems with Nvidia cards not working right with 64 bit versions of 12.04.

You need to do two things; both from a Terminal prompt:

Change to the directory where you have the .run file stored.
Type: chmod 755 filename.run
Type: sudo ./filename.run

The above commands will make the file executable and will launch the executable with root-level permissions.

If you have enabled the root account you can use

su

Enter the password for root, cd to your application folder, then run

./package.run


Twice the amount of drives show up when setting up a RAID array I am trying to set up an array, with ubuntu.

I have hooked up an array containing 12 drives of 1TB, but when I run the following command, it returns 24 - 1TB drives.

What's causing this, and where do I start?

sudo lshw -C disk -short

H/W path               Device       Class      Description
==========================================================
/0/100/7/0/0.0.0       /dev/sdb     disk       1TB SCSI Disk
/0/100/7/0/0.1.0       /dev/sdc     disk       1TB SCSI Disk
/0/100/7/0/0.2.0       /dev/sdd     disk       1TB SCSI Disk
/0/100/7/0/0.3.0       /dev/sde     disk       1TB SCSI Disk
/0/100/7/0/0.4.0       /dev/sdf     disk       1TB SCSI Disk
/0/100/7/0/0.5.0       /dev/sdg     disk       1TB SCSI Disk
/0/100/7/0/0.6.0       /dev/sdh     disk       1TB SCSI Disk
/0/100/7/0/0.7.0       /dev/sdi     disk       1TB SCSI Disk
/0/100/7/0/0.8.0       /dev/sdj     disk       1TB SCSI Disk
/0/100/7/0/0.9.0       /dev/sdk     disk       1TB SCSI Disk
/0/100/7/0/0.a.0       /dev/sdl     disk       1TB SCSI Disk
/0/100/7/0/0.b.0       /dev/sdm     disk       1TB SCSI Disk
/0/100/7/0/0.d.0       /dev/sdn     disk       1TB SCSI Disk
/0/100/7/0/0.e.0       /dev/sdo     disk       1TB SCSI Disk
/0/100/7/0/0.f.0       /dev/sdp     disk       1TB SCSI Disk
/0/100/7/0/0.10.0      /dev/sdq     disk       1TB SCSI Disk
/0/100/7/0/0.11.0      /dev/sdr     disk       1TB SCSI Disk
/0/100/7/0/0.12.0      /dev/sds     disk       1TB SCSI Disk
/0/100/7/0/0.13.0      /dev/sdt     disk       1TB SCSI Disk
/0/100/7/0/0.14.0      /dev/sdu     disk       1TB SCSI Disk
/0/100/7/0/0.15.0      /dev/sdv     disk       1TB SCSI Disk
/0/100/7/0/0.16.0      /dev/sdw     disk       1TB SCSI Disk
/0/100/7/0/0.17.0      /dev/sdx     disk       1TB SCSI Disk
/0/100/7/0/0.18.0      /dev/sdy     disk       1TB SCSI Disk
/0/100/1f.1/0.0.0      /dev/cdrom   disk       DVD reader
/0/100/1f.2/0.0.0      /dev/sda     disk       320GB Hitachi HDT72503
/0/1/0.0.0             /dev/cdrom1  disk       SCSI CD-ROM

try this as root (sudo -i):

first fdisk -l

then hdparm -i /dev/sd* | grep -i serial

 Model=WDC WD3200BPVT-22ZEST0, FwRev=01.01A01, SerialNo=WD-WX71A61P7681

that's another way to know about your drives info.


Will ConnMan replace NetworkManager on the desktop for 11.04? In the 10.10 release, Unity on the netbook edition used ConnMan. As Unity is now moving to the desktop for 11.04, will that mean that ConnMan will replace NetworkManager on the default Ubuntu desktop as well?

The systray (old notification area) will go away in 11.04. NetworkManager is the most critical piece that still uses it. We have three options:

Move to the new indicator-network which uses Connection Manager as a backend,
Provide patches for NM-applet that enable it to use the AppIndicator framework, and
Hack the systray so it only supports NM-applet

The Ubuntu Platform team is working on the NM-applet-indicator option, and it's their decision which approach is taken in the final release.

Go to System - Preferences - Startup Applications. In there, search for Network Manager, select it, click Edit, and provide the following values:

Name: Network Manager applet
Command: /usr/bin/nm-applet
Check: Launch at login

The next time you log in, you should see the applet appear.


Convert Hybrid GPT/MBR to pure GPT partition scheme I was wondering how to safely convert a Hybrid GPT/MBR to a pure GPT partition scheme? (Without Reformatting)

The reason why I ask is, I currently triple-boot with Ubuntu 16.04 LTS, Windows 10 and Mac OSX Lion.

Originally I needed to format my drive with a Hybrid partition scheme to install Windows 7 but I have since upgraded to Windows 10.

I know now that Windows 10 supports booting from GPT partitions and I would like to covert everything to a pure GPT partition scheme without reformatting.

If I can do this, I would be able to reformat my HFS+ partition to an APFS partition and install High Sierra.

So the questions are:

How do I convert my Hybrid MBR to a pure GPT?
Will it break booting into any of my OSes if I do? (Windows 10, Linux, MacOSX)

Here is my gdisk output:

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CBC86EEB-C878-4C46-9963-120433EB0BED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 8-sector boundaries
Total free space is 269477 sectors (131.6 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF02  EFI System Partition
   2          409640       293378391   139.7 GiB   AF00  Mac OSX
   3       293642240       684265471   186.3 GiB   0700  WINDOWS 7
   4       684265472      1075085311   186.4 GiB   0700  LINUX
   5      1075085865      1087375589   5.9 GiB     8200
   6      1087375590      3907024064   1.3 TiB     0700

From the gdisk(8) manual:

  n – Create a new protective MBR. Use this option if the current protective MBR is damaged in a way that gdisk doesn't automatically detect and correct, or if you want to convert a hybrid MBR into a "pure" GPT with a conventional protective MBR.

You need to enter the experts’ menu to access this option.

Open the drive in gdisk:

sudo gdisk /dev/sdX

Enter the experts’ menu (x).
Create a new protective MBR (n) and answer any dialogue questions as suitable.
Return to the main menu (m).
Write the changes to the drive and exit gdisk (w).

You may need to reinstall Grub in EFI mode if it was installed in MBR mode before.

In my opinion the only way that you can convert Hybrid MBR to pure GPT is to reformat the drive that you want to convert because as soon as you install your OSes on Hybrid MBR, it writes data on the drive, hence, I don't think there is a application or a way to do it. Because you basically mess up with the bootloader file for Windows, Ubuntu and Mac

I hope I can answer your question.

Would you mind let me know what mac are you using right now?


Why does the current directory not change after executing script? A script is executed from the shell as ./oximeter.
The script, oximeter, has 5 commands:
python3 ~/Documents/oximeter/3211ipod.py
ls -l
pwd
cd ~/Documents/oximeter/
pwd

The python script runs as expected.  I would like the script to change the directory as shown in command #4.  When control is returned to the user, the directory remains unchanged.
The second pwd returns the desired directory, however when control is returned to the user, pwd indicates that the directory is not ~/Documents/oximeter.
Why is this and is there a 'stronger' command that changes the target directory for the user?
This is in Ubuntu 20.04.

because you only tell python3 to run the .py script from a directory and you would have to cd there first
(e.g. in the script :) cd $(dirname ~/myfolder/myscript.py) ;python3 myscript.py

you can get the location of your python script in python with:
print('abspath:     ', os.path.abspath(__file__))
print('abs dirname: ', os.path.dirname(os.path.abspath(__file__)))

https://www.tutorialspoint.com/python3/os_getcwd.htm


C, C++ and Java IDE for Ubuntu Is there an IDE which can run on Ubuntu that supports C, C++ and Java? I installed NetBeans, but it only supported Java. I installed the C/C++ package manually, but that package gives an error if I include iostream.

Is there any other IDE which can satisfy my needs? Or can I get NetBeans with all packages pre-installed in it?

There's Eclipse available from the repository. You can install it with:

$ sudo apt install eclipse

Or by the GUI Search of the Ubuntu Software center.  A search of the word "IDE" will bring up a significant number.  You could also specify eclipse as the search criterion.

Eclipse will most likely have more of the familiar functionality and features you've used in Netbeans.  It is a very powerful IDE and has support plugins for most of the popular programming languages.

The current version is available from the developers at: https://www.eclipse.org/downloads/

In eclipse you can add support of all languages I tried it. But it is better to have separate eclipse for C++ and java thus your configuration won't interfere and you can use same shortcut and things will be similar.


B43 Device Firmware Error - 12.04 Installation Trying to install Ubuntu and I get this error.  Really have no idea what to do.  I tried to go the website it listed but I couldn't find anything close to what I have in this system.  I'm guessing I need a driver or something to complete the install?


Where to get novacom package from For working with my HP Touchpad, I now need the novacom package for Linux 64, again. Sadly, when searching, all palm sources seem to be extinct. I tried building from source, but their build system is a little flawed.

Does anyone know, where to find the package outside of palm pages?

The files are no longer available at Palm's website. I found them here: http://download2.polytechnic.edu.na/pub4/sourceforge/b/bi/bioinfoserv/Packages/Version5.0-YuleFlying/WebOS/2.1/

Novacom is available from The Palm Developer Network.  Which also have good information on how to install.  To download see the Palm Developer website.

Once on the page, scroll down to Number 5, and there you can download Novacom.  Once downloaded, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to where the file was downloaded, probably the Downloads folder, and run the command(s) below:

sudo dpkg -i palm-novacom_1.0.64_amd64.deb

Keep in mind that you may have to install per-requisits, so make sure you look at the website.

You can also download from Here


Will this backup the partition contents of both linux and windows? The partition table of my /sda disk got corrupted. I don't know the details of what happened exactly, but I can still read the disk, and boot into Linux, but not into Windows 8 anymore. I'm quite new to Linux and this doesn't seem to be easy to fix, so I decided to just backup my data to another disk, format the /sda disk, and put the data back.

/sda contains:

/sda2 which is Win8 *NTFS*
/sda3 is an extended partition containing:
    /sda5 which is Linux / (filesystem root) *EXT4*
    /sda6 which is swap.

/sdb is a one partition NTFS disk containing no OS, and only data.
/sdc5, a partition on my third disk, contains /home. EXT4

Here is how I was planning to backup my data:

Boot Linux from USB,
Use sudo cp -afv to copy /sda5 contents to a folder on /sdc5,
Use sudo cp -afv to copy /sda2 contents to a folder on the /sdb disk.

Format the /sda disk, partition it the same way again, and copy the data back using the same sudo cp -afv command (all from a Linux Live USB).

So my big question is, will all this work?

Details regarding my partition problem in case you're interested.

I would recommend to do an image of your disk. If you are able to access your partitions with Nautilus better do that. Again, you may want to repair Windows boot instead of messing with your partitions.

You may not need to backup and restore at all. testdisk is an amazing utility that can fix partition table errors. You can install it with:

sudo apt-get install testdisk

Then run

sudo testdisk

And go from there. There's an excellent guide about testdisk here. I've used this utility many times when windows screwed up my partition table.

Keep messing with those partition types until you eventually figure out the right combination. It's a bit tricky. Try the deep scan too. Pay attention to partition types and sizes for clues. There may be some false positives for partitions in the scan.


How do I set the default program? How do I set the default program that I use?

I have tried to open System Info → Default Program → change my program, but it won't work,

Any idea? Or should I use Terminal?

I want to replace the default movie player with VLC media player, because the current movie player is useless to me.

There's yet another GUI solution, which might come handy for you ;)

Try opening the properties (right click -> Properties) of the file type you want to be always played by VLC.

Choose the Open with tab and either choose from a list or add one (by choosing from an extended program list or simply typing vlc as the command)

EDIT:

... and click on Set as default

System Settings -> Details -> Default Applications


Problem with crontab, script runs when executed from command this is my cron entry:

*/5 * * * * /home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log

This is the script that is called:

#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
date_now=`date +%Y_%m_%d_%H_%M`
dir_name="BU/db_backup"
tar_name="db_backup_${date_now}.tar.gz"
file_name="${dir_name}/${tar_name}"

if [ -z "$dir_name" ]; then
    mkdir $dir_name
fi

log() {
    echo $1
}

do_cleanup(){
#    rm -rf db_backup*
    log 'cleaning up....'
}

do_backup(){
    log 'snapshotting the db and creating archive' && \
    mongodump -o ${HOME}/${dir_name} && tar -cjf ${HOME}/${tar_name} ${HOME}/${dir_name} || \
    log 'data backd up and created snapshot'

    log 'saving the backup archive in amazon S3' && \
    s3cmd put --acl-private ${HOME}/${tar_name} s3://bucket-name/db-backups/${tar_name} && \
    log 'data backup saved in amazon s3'
}

do_backup && do_cleanup

The thing is, this script works from the command line, but not from crontab. I took a look at Reasons why crontab does not work, and I have done everything that is mentioned there.

Is there anyway of running it via cron?

EDIT: I am currently running as su -c user Does that pose a problem?

Try changing your cron command to

bash -c '/home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log'

I have found wrapping things in bash has helped setup environment values in the past. You might even be able to dump parts of your script as a result.

I think, there is a problem with script permissions. Have you tried giving executable permission to your sh file? I was facing same issue. When I run through command prompt using sh command, it ran successfully. But, in crontab, it was not running. Then, I have provided 777 permission to script and it worked through crontab. It seems the problem is with Linux.


Qemu Snappy 15.04: How to tune sysctl.conf? I was able to start & login into Snappy Ubuntu 15.04.
However, doing:

sudo vi /etc/sysctl.conf

is NOT permitted.

How am I suppose to tune my own kernel and make changes to
/etc for performance and security?

Also. How to install nano editor to replace the OLD vi?

Thanks very much.

Not sure what you mean by "OLD" ... :)

ubuntu@localhost:~$ vi -version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 18 2016 12:05:46)

7.4  is the latest release and the specific version we use was just recently rebuilt. In case you mean the behavior (i.e. no cursor key support in edit mode) you can switch to new style behavior by creating a .vimrc file with:

set nocompatible

I doubt a nano snap would be a good idea unless you run it completely unconfined (since it would never be able to actually write files outside of its rw-snap dir), you can use the "classic dimension" [1] to actually use apt to install and use such things.

Changing /etc/sysctl.conf is definitely a missing feature, it should should actually be manageable. I filed https://bugs.launchpad.net/snappy/+bug/1552679 for this.

(Note that I'm talking about xenial here, 15.04 images will go out of support with the 16.04 release, they will not see changes or new features.)

[1]

sudo snappy enable-classic; snappy shell classic

PLEASE NOTE:  The following solutions have been tested and known to work correctly and the results are reproducible; unsure why this answer was down-voted.  Hit-and-run down-voting without providing feedback does nothing to improve the quality of answers.

Part 1 of your question: Editing /etc/sysctl.conf

You'll find the reason you can't write to /etc/sysctl.conf in the mount command's output (truncated below).

/dev/mmcblk0p4 on /writable type ext4 (rw,relatime,data=ordered)
/dev/loop0 on / type squashfs (ro,relatime)

Ubuntu Core mounts the root filesystem as squashfs (read-only). Although other parts of the filesystem are mounted RW, sadly /etc/sysctl.conf is not on such a mount.

SOLUTION:

I had the same issue as you:  I needed to tune Kernel params and found the RO filesystem issue.  This is how I solved the problem (using a here-doc in a bash script) when disabling IPv6 support:

#!/bin/bash

cat <<EOF> /etc/sysctl.d/60-ipv6-disable.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
EOF

sysctl -p --system

*sysctl is a modular config where you load your changes into a file prefaced by a number, the higher of which overrides preferences in files of a lower number.

In the above example "60-" suggested for end-users to record their changes in.  To learn more about how to make your sysctl changes:

/etc/sysctl.d/README

Part 2 of your question: Installing nano

SOLUTION:

On Ubuntu Core 16.04 I installed nano with:

snap install nano

Didn't puke any errors.  HTH-


Can I convert a 2D video to 3D? Is it possible to convert a 2D video to 3D on Linux?

There are several ways on Windows, one is using an AviSynth script.
I tried opening the script with avconv.exe and VirtualDub with Wine and AviSynth, but it fails to load AviSynth.dll.

I installed AviSynth with Wine 1.3.16 through PlayOnLinux, then I chose "System" version. I replaced DirectShowSource with AviSource in the script and I could open the script with VirtualDub.

One software that can help you is Bino. But, it is just a 3D video player, not a stuff to convert and save them into 3D. I think, recording screen may help if you want to save them into 3D.


How to type latin small letter c with cedilla I run Ubuntu on a DELL XPS 13 notebook that has an US keyboard configured as US international. After upgrading to version 13.10 I can no loger get a cedilla by typing '+C. Instead, I get a "ć".

What should I do to get a "ç"?

I am using Ubuntu Gnome 13.10 64 bit.

In 13.10 and above you can use right Alt+ , (i.e. right Alt + comma) in English (US International with dead keys) to get ç. Shift + Right Alt + comma = Ç

Right Alt + is useful for ¡¿áéúóí also.

One way is to use Ctrl+Shift+U combination and then type 00e7 followed by Space which will turn into ç (latin small letter c with cedilla).

Another way is to use Character Map:

And another way and probably the best is to use a keyboard layout like Portuguese:


Install ubuntu on a PowerMac G5 with no CD drive The PowerMac G5 is a 1.6GHz model. I do not have access to a CD. Can I use usb or a partition to install Ubuntu on a PowerMac G5?

Powermac G5 does not boot from USB !!!
Either:
- Borrow a CD-Drive and install it (or buy a cheap one)
- Borrow a FireWire-CD Drive
- Take an external Firewire HD and use it same way as described for the USB Stick
- Take an internal disk and use it the same way as described for the USB stick

There is a Program Called rEFIt  that you burn to a bootable CD and insert that into the drive and it allows you to boot from USB on a Mac....works on INTEL Macs... have not yet tried it on a PowerPC.. I think it does NOT, but here may be another solution:

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


sleep doesn't work on Ubuntu 20.04 (WSL) After upgrading to 20.04 on WSL sleep doesn't work with an error:

sleep: cannot read realtime clock: Invalid argument

wget https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb

sudo dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb

sudo apt-mark hold libc6

sudo apt --fix-broken install

sudo apt full-upgrade

How to upgrade Ubuntu 18.04 to 20.04 on WSL Windows 10

I just installed Ubuntu 20.04 using WSL 1 (my windows 10 version is 1903, OS Build 18362.778) and got this error trying to run a redis server.

Thanks to Raj's link to https://www.how2shout.com/how-to/how-to-upgrade-ubuntu-18-04-lts-to-20-04-lts-on-wsl-windows-10.html I got it fixed using what it suggested there.

sudo -i
sudo mv /bin/sleep /bin/sleep~ ; touch /bin/sleep ; chmod +x /bin/sleep

After that the redis server ran ok.