Difference between shutdown -r and shutdown -P? What's the difference between shutdown -r and shutdown -P?

You can get information about commands by typing:

man <command>

For the shutdown command you get:

OPTIONS
   -r     Requests that the system be rebooted after it has been brought down.

   -h     Requests that the system be either halted or powered off after it has been brought down, with  the  choice  as  to
          which left up to the system.

   -H     Requests that the system be halted after it has been brought down.

   -P     Requests that the system be powered off after it has been brought down.

   -c     Cancels a running shutdown.  TIME is not specified with this option, the first argument is MESSAGE.

   -k     Only send out the warning messages and disable logins, do not actually bring the system down.

shutdown -p will power off your system.

shutdown -r will restart it.


Grub doesn't show both Ubuntu installations I have a laptop with Ubuntu 12.04 LTS installed as the main OS. The other day I installed Ubuntu-Studio (version 12.04) into another partition on the machine.

The installation went great and when the machine booted, the grub menu popped up and I could see the option for Ubuntu Studio and the vanilla Ubuntu OS'. The problem was that this version of grub, installed by the Studio installer, didn't look great and insisted on putting Studio at the top of the list, and therefore as the main OS to boot.

I use the standard Ubuntu more often, so I booted into that and ran sudo grub-install  dev/sda. That worked OK and now Ubuntu boots as normal. Only problem is that the Grub menu doesn't show up and doesn't give me a chance to choose the other OS. Running sudo os-prober shows that it can find ubuntu studio, it doesn't give me a chance to boot it.

Any ideas as to how I can fix this problem?

Cheers in advance.

EDIT:
followed instructions here and saw the boot menu, but the only boot options present were for the standard installation of Ubuntu.

I the os-prober utility wasn't executable. I had to run this:

sudo chmod +x /etc/init.d/30_os-prober

and then

sudo update-grub2


New Application Switcher gone and is now ugly When I installed Ubuntu 11.10 Beta 2, during live-CD install, I tried out the new application switcher and it worked beautifully.  After the installation is complete, the new application switcher is gone.  In its place is a ugly grey Windows XP-ish thing.

I am not sure if this is a graphics driver issue, because I enabled nvidia proprietary driver.  But other 3D related things looks fine.  So how can I get the new application switcher back?

It looks like if you are using Ubuntu 2D. When logging in, select "Ubuntu", instead of "Ubuntu 2D".

You can test your hardware for unity compliance, see:

http://www.installubuntulinux.com/2011/05/how-to-test-unity-support-in-your.html


Hyper-V host Ubuntu shared folder E514 write error on second write Host: Windows 10
Guest: Hyper-V virtual machine: Ubuntu 18.0.4
Problem with shared folder: Can edit and write a new file only once.
On second write:

Virtual-Machine-Ubuntu-18-04-3-LTS:~$ vi    shared-drives/D:/HYPERV_SHARED_FOLDER/test
Virtual-Machine-Ubuntu-18-04-3-LTS:~$ cat     shared-drives/D:/HYPERV_SHARED_FOLDER/test
First write of shared folder file: ok
Virtual-Machine-Ubuntu-18-04-3-LTS:~$ vi    shared-drives/D:/HYPERV_SHARED_FOLDER/test
Error on write:
"shared-drives/D:/HYPERV_SHARED_FOLDER/test"
"shared-drives/D:/HYPERV_SHARED_FOLDER/test" E514: write error (file system full?)
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!
Press ENTER or type command to continue

I ran into the same issue.  I wasn't able to resolve it on the VM side, instead I created network shares for the folders I needed access to and mounted those from the VM.
So far this has been pretty painless, a guide is available for the windows side here:
https://linuxhint.com/shared_folders_hypver-v_ubuntu_guest/
And for the Ubuntu side to enable permanent share mounting here:
https://wiki.ubuntu.com/MountWindowsSharesPermanently


Lenovo Ideapad Unstable Touchpad Cursor I recently installed Ubuntu 14.04 on my Lenovo Yoga 2 Pro and there is a problem with the touchpad. Whenever I lift my finger from the touchpad or click, the cursor moves a little bit to a random direction which makes me miss the target I wanted to click. This is very annoying and I couldn't find a solution online.

Can anyone tell me whether there is a solution to this problem and how would I fix it?

Thanks in advance.

The simple initial approach would be to simply adjust your touchpad configuration, perhaps tun your sensitivity down, especially if it moves that much simply from taking your finger off the pad. Go to System Settings>Mouse and TouchPad> drag the bar next to TouchPad cursor speed to the left to turn down.

If the above option does not resolve the issue, see this link:
http://memobadz.wordpress.com/2014/02/16/lenovo-yoga-pro-2-on-ubuntu/

which discusses several options for hardware configuration that you could explore. In reference to your issue, the section on Jumpy Touchpad and lack of middle button seems appropriate. Here is their suggestion:

Try creating the file /etc/X11/xorg.conf.d/50-synaptics.conf with this content:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    # This option is recommend on all Linux systems using evdev, but cannot be
    # enabled by default. See the following link for details:
    # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
    MatchDevicePath "/dev/input/event*"

    Option "FingerLow"              "46"
    Option "FingerHigh"             "46"
    Option "ClickFinger1"           "1"
    Option "ClickFinger2"           "2"
    Option "ClickFinger3"           "3"
    Option "TapButton1"             "1"
    Option "TapButton2"             "2"
    Option "TapButton3"             "3"
    Option "AreaBottomEdge"         "85%"
    Option "SoftButtonAreas"        "60% 0 85% 0 40% 60% 85% 0" # Btn2 LRTB - Btn3 LRTB
    Option "EmulateMidButtonTime"   "75"
EndSection

You can play with the values at runtime using synclient.

Amended:

To create above file, from command line:

cd ~/Desktop             #changes your current directory to your Desktop for easy access
touch 50-synaptics.conf  #creates file named 50-synaptics.conf
gedit 50-synaptics.conf  #uses gedit(text editor) to open file

Add the listed content to the file using gedit, then save and exit
Make destination folder, from command line  (#added line per comment from OP).

sudo mkdir /etc/x11/xorg.conf.d

To move file to appropriate folder, from command line

sudo mv ~/Desktop/50-synaptics.conf /etc/X11/xorg.conf.d/ #Moves file from Desktop to target folder.

Good luck.

These answers have nothing to do with the question.  There isn't a touchpad parameter for "amount to jump around randomly".  Yes, most of us have tried changing the various sensitivities but that only changes how fast and how much pressure it takes...for the curse to jump around randomly.

To be clear, we're talking about the fact that Ideapads under Linux, when you simply touch the pad and leave your finger at the touch point, the cursor starts jumping around on the screen.  Decrease the sensitivity and it takes more pressure before it starts jumping around.

None of these answers have anything to do with that.  The bottom line is that IBM's taking over the hardware has MANY issues and seldom works right.  Ever had it mute itself whilst reporting full volume?  Dim the screen whilst reporting full brightness?  These are all things where the IBM drivers are intercepting commands "to help you" with some "value added feature".  Like most of those "features", it doesn't work right and you can't turn it off.

I have had some success cleaning under the space bar and alt key.  It does this under Windoze as well and has been widely reported.

I've always known IBM laptops were prone to that.  I've never seen it this bad though.  Definitely my last IBM.


Tally up results from a grep search? Say I have a list such as this:

8
382.34.6
sally
sally
8
923
183.3.3
183.3.3
183.3.3
8

And I want to tally up the number of times each unique value repeats and get output like this:

8 3
382.34.6 1
sally 2
923 1
183.3.3 3

What command would I need to run to do this?  If it makes a difference, the list is coming from a grep search.

Try this:

sort file | uniq -c | awk '{print $2,$1}'

Output:

183.3.3 3
382.34.6 1
8 3
923 1
sally 2

Try this

stuff=(apple,boat,chicken)
for (i=0; i<${#stuff}; i=i+1); do
echo INPUT | grep ${stuff[i]} | wc
done

INPUT meaning the text to search. Also fill in the array with your words.


how to factory reset a usb? How do you factory reset a usb?

I have a hp 4gb usb that seems like it has a messed up partition table and ubuntu isn't recognizing all the space. I've tried formatting it in disks. That doesn't work. How do you make a usb good as new on ubuntu?

I formatted it in the default way - FAT. Originally what happened was that I did sudo dd if=memtest86-usb.img of=/dev/sdb to install memtest86 on the usb. When I was done with that I formatted it in the default way but Ubuntu kept calling it the 51mb volume in nautilus. I formatted it and tried to use it with winusb.

winusb gave me an error.

Installation failed ! Exit code: 256 Log: Formating device... Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra 7655424 blocks) or continue with the current setting?

Error: You requested a partition from 1000kB to 4077MB. The closest location we can manage is 17.4kB to 157MB.

Then I tried following the advice on the first answer on this page. I'm trying to now use the usb with winusb and winusb just keeps trying to format it.

Output of sudo parted -l:

Model: ATA TOSHIBA MK5076GS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size    Type      File system  Flags
 1      1049kB  496GB  496GB   primary   ext4         boot
 2      496GB   500GB  3868MB  extended
 5      496GB   500GB  3868MB  logical

Model: USB DISK 2.0 (scsi)
Disk /dev/sdb: 4077MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  4077MB  4077MB  fat32

Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/cryptswap1: 3868MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  3868MB  3868MB  linux-swap(v1)

Default way: Ubuntu 14.04 program "Disks" - Format - (Quick) (FAT)

winusb is a linux program for making a windows install disk.

Disks rarely works for me, but Gparted is a great alternative. I know someone has already suggested using Gparted, you tried it, and it failed. I think that's because you didn't create a new partition table first, and I believe your current table is damaged given it's showing up as "loop" so I suggest trying Gparted again; what have you got to loose right. This time create a new partition table, and then a new partition. You will loose any data currently on the drive.

Steps:

In terminal type sudo apt-get install gparted.
Open Gparted from the applications screen.
Select your device from the drop down menu on the far right.
From the top menu click "device", and then choose "create partition table".
From the partition table menu choose a partition table type. [MBR and GPT are the most commonly used. If you aren't sure which to pick then pick MBR. In Gparted MBR is called "msdos".]
The drive should appear as unallocated now. Right click on it and choose "new". Change the desired options and click "add".

[Screenshot of the settings I used: https://copy.com/qvCWZBqdKfRz ]

Click the green checkmark on the top menu, and then click "apply" on the prompt.
Click "close" on the prompt. Your device is now ready for use.

Notes:

Gparted only supports quick formatting.

Sometimes this happens if you create a smaller partition than the actual size of the stick, maybe with other tools(?). I solved the problem with the HP USB Disk Storage Format Tool (runs in Windows, needs admin rights).

HP USB Disk Storage Format Tool (Windows)


Syntax Error: "(" unexpected error on XAMPP installation I'm getting these errors while running sudo ./xampp-linux-x64-7.3.7-1-installer.run.

$ sudo ./xampp-linux-x64-7.3.7-1-installer.run`
./xampp-linux-x64-7.3.7-1-installer.run: 1: ./xampp-linux-x64-7.3.7-1-installer.run: ELF: not found
./xampp-linux-x64-7.3.7-1-installer.run: 2: ./xampp-linux-x64-7.3.7-1-installer.run: @@@0@00088@8@00��#��#�#�c������#��c��c��TT@T@: not found
./xampp-linux-x64-7.3.7-1-installer.run: 6: ./xampp-linux-x64-7.3.7-1-installer.run: Syntax error: ")" unexpected

Output of  uname -a:

Linux ows-desktop 4.15.0-1032-raspi2 #34-Ubuntu SMP PREEMPT Wed Feb 6 11:46:23 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

I also tried downloading and running 32 bit version of XAMPP> But this is what I got:

$ sudo ./xampp-linux-5.6.20-0-installer.run
./xampp-linux-5.6.20-0-installer.run: 1: ./xampp-linux-5.6.20-0-installer.run: Syntax error: "(" unexpected

According to your uname output, your processor architecture is aarch64 - which is 64-bit ARM

However according to file, the installer that you are trying to run is ELF 64-bit LSB executable, x86-64 which is for the 64-bit AMD/Intel instruction set.

Because the kernel doesn't know how to load and execute the code, it make a last-ditch attempt to execute it with the default shell interpreter - which fails with a syntax error, as you have observed.

See also:

Syntax error: “(” unexpected when execute a compiled c program

sudo chmod +x xampp-linux-x64-*-installer.run

sudo ./xampp-linux-x64-*-installer.run


How do I change file system in recovery mode to read-write mode? I have messed up my sudoers file and I want to change the permission on it.

When I login in recovery mode, I cannot run the command chmod as it is read-only option.

I tried mount -o remount,rw / in recovery mode. Didn't work for me:

Err : Ext4-fs remount. Opts errors=remount-ro

How can I boot into recovery mode and with read-write option?

I did some web searching on "Recover Mode Read Only" and came across this post on LinuxQuestions.org website.

Shutdown the computer
Boot into Recovery Mode --After BIOS load, hold down Shift key to
access the grub menu --Once in grub menu, select the entry ending in
"(recovery mode)"
From the next menu selected option to enter Root Session
At the root session, execute command mount -o rw,remount / to
remount the filesystem as read-write

I always use following way to change into read/write mode

Login in Safe Mode
From the Menu just go to Grub option, it will give a message like Updating grub will mount your system in read/write mode. Just chose yes to mount your system in read/write mode. It will update your grub and will exit from Grub menu.
Finally login as root, your system will be in read/write mode.
You can also chose dpkg option from the menu to change file system to read/write mode.

It always worked for me. It helps when you don't remember the command to change into read/write mode.

Just give it a try..


Permission denied to move files from a live session I want to clear space on my computer in order to download drivers for my internet, so I tried moving files to a different location.

Unfortunately I don't have permission to do this. How do I change this? I should point out that I am not logged in; I think I'm a guest or something because if I log in I cannot gain access to the internet to download the drivers that I need, so I'm using the live cd in Try Ubuntu mode to try achieve downloading the drivers.

To move files, you can use (1) sudo to execute a command as the root and ()2) mv to move them. You must open a Terminal, for instance, by pressing Ctrl+Alt+T on your keyboard to open Terminal and run the follwing command:

$ sudo mv -f -i <Source> <Destination>

The -f option will force the move. The -i will instruct mv to ask for permission before overwrite some file. Example: sudo mv -f -i /home/user/test /home/user/test1

To copy the files, you can use

sudo cp -i -v <Source> <Destination>

Example: sudo cp -i -v /home/user/test /home/user/test1

If you use the Try Ubuntu feature and fire up Terminal, type in the following command:

    sudo su

This will log you in as super user without typing a password. You should see the word root before the prompt. Then you can change directory and you will have permission.


Ubuntu touch - OpenVPN Is there something available or on the horizon (network settings or an app) to use OpenVPN with Ubuntu touch?

My secondary solution would be to switch to read-write (although I'd hate loosing over the air updates) and apt-get install openvpn, plus probably some more configuration to route all web traffic through the connection. Would you see any general problem with that?

Cheers
Philipp

Yes. Ubuntu phone/tablet images now have OpenVPN support. The configuration is a bit arduous, being a phone, but it is now usable on the images by default.

Currently I am not aware of any other option than installing OpenVPN client via apt-get.

You can turn the read-write mode off if you need an OTA upgrade, but you probably need to reinstall OpenVPN again after the OTA. Saving the install steps to a small bash script would probably make this a reasonable hack until somebody creates a snap to install via the Touch GUI. However since the OpenVPN Ubuntu client is basically a plugin to network-manager this might not be that straight forward.


OpenSource ATI driver - Fan running at full speed all the time I know this is a common problem and have read other topics but couldn't resolve. Anyways yesterday I found a solution - I have 2 graphic cards (hybrid) and they were both on. So I turned one off and installed Jupiter for power management and from there on the fans were quiet and I was happy as hell.

However (:)), yesterday evening I also updated the system and the fan and it's noise came back. I checked whether I am using only 1 graphics card and I am.

c0dehunter@mintBox ~ $ sudo lshw -c video
[sudo] password for c0dehunter:
  *-display
       description: VGA compatible controller
       product: RS780M/RS780MN [Mobility Radeon HD 3200 Graphics]
       vendor: Hynix Semiconductor (Hyundai Electronics)
       physical id: 5
       bus info: pci@0000:01:05.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:18 memory:c0000000-cfffffff ioport:c000(size=256) memory:fbcf0000-fbcfffff memory:fbb00000-fbbfffff

Maybe the problem is (false) temp reading from GPU?

c0dehunter@mintBox ~ $ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +44.0°C  (crit = +105.0°C)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +47.0°C  (high = +70.0°C)
                       (crit = +115.0°C, hyst = +110.0°C)

radeon-pci-0200
Adapter: PCI adapter
temp1:       +127.5°C

The thing that is weird is that if I boot into Windows the fan is still at full power (previously it wasn't). Did I f--- up my hardware with software? :)

//OH, yes - I forgot to mention that my laptop is not hot at all. The temps are about 50°C.

This Ati fan control post worked for me in ubuntu and I also use this in Archlinux.

I have the same problem but when booting into Windows I use the AMD control software.

Simply switch the fan control from auto to manual and then to auto again.

I have a XFX Radeon HD 6670


empathy "Facebook account requires authorization" problem I am trying to connect to my Facebook account from Empathy on Ubuntu 13.04.

When setting up the account in Empathy everything looks OK, but then Empathy just shows the message:

  Facebook account requires authorization

According to bug #1170832, this is due to a problem in the telepathy-gabble package which has been fixed in version 0.18.1.

However, I manually installed telepathy-gabble_0.18.1-1_amd64.deb from Launchpad and the problem persists. Has anyone else had any luck with this?

The telepathy-gabble 0.18.1 package in Ubuntu actually contained a work-around for the problem, not a proper solution. Quoting from the ChangeLog:

telepathy-gabble (0.18.1-1) unstable; urgency=low

  * New upstream stable release
    - work around Facebook server behaviour change so we don't consider its
      service discovery response to be spoofed (Closes: #721883)

 -- Simon McVittie  Mon, 09 Sep 2013 13:05:13 +0100

Apparently, this work-around does not work, and in fact the status of the bug has been reverted from Fix Released to Confirmed.

For the proper fix I'm sorry you will have to wait for the upstream bug to be fixed (unless someone proposes an another work-around in the meantime).

Just a couple suggestions you might try...

No-1. Log into facebook and turn off notifications for log-ins...
Facebook > Account Settings > Account Security (change) >
Change "Would you like to receive notifications for logins from new devices?" to NO.

No-2. Try logging out of facebook and logging back in (with the "facebook username", not email)

More suggestion and info here → http://ubuntuforums.org/showthread.php?t=1487433

Hope this helps... Good Luck!


How do I stop green flashes when playing video? I have Ubuntu 15.10, running Gnome Retro/Flashback/Fallback... whatever it's being called right now. I also have Compiz.

When I play videos in either VLC or Gnome Media player, the screen frequently flashes green. Put another way, every now and again, the whole screen turns completely green, but just for one frame or so. Sometimes this happens multiple times within one second, other times it just happens once. The frequency of when this occurs is random, but I'd say on average as often as once every minute or so.

This seems to have started roughly when I upgraded to 15.10, though I can't say with absolute certainty that the upgrade was the dividing factor. Before around that time, video playback worked perfectly.

This only affects local video files I play. YouTube and other online videos seem to work fine.

I found some suggestions on the web for how to fix this. One was to open Compizconfig and check the box for "Force full screen redraws (buffer swap) on repaint". The other solution I tried was specific to VLC, and in preferences I unchecked the "Accelerated video output (Overlay)" box. Unfortunately, neither suggestion worked.

How can I eradicate green flickering from my videos?

From settings video output to OpenGL or something other than you are currently using.

1)  The "green flashing screens" is a very old "de-interlacing" bug
    which has persisted in VLC player for years.

2)  It is common to all hardware, drivers and operating systems,
    including windows.

3)  Depending on whether the player starts by rendering odd or even frames,
    the flashing may (or may not) occur every time you play, start, rewind
    or fast forward a film.

4)  The flashing is therefore intermittent, neither consistent nor repeatable.

5)  It occurs in different movie segments at different times in the same file.

6)  It happens only in certain movie files, most often in ripped DVD's,
    which contain multiple 1 GB files inside a VIDEO_TS folder.

7)  It could also (therefore) be the result of incorrect HDCP decoding during
    the unauthorized DVD rips, using tools like "SlyFox anyDVD", such that the
    resulting (malformed) files confuse the de-interlacing algorithms in VLC player.

8)  In all cases I have experienced, disabling video de-interlacing in VLC player
    seems to fix the problem, at the cost of jittery, poor video playback, with a
    low line count.

9)  The problem does not seem to effect HD movies in single "Matroska" vid containers.

===
BTW:
I wish people in forums stopped trying to sound smart,
by flooding the forums with dumb "Generic" answers like:
"Do you have the latest driver update?" ... or

"Is your mouse plugged in?" ... LOL.

Then 100,000 other web sites scrape and reprint these IDIOTIC
statements and reprint them as their own, flooding the Internet

with worthless spam.

Empty cans need to stop making so much noise!

===


Stuck at GRUB command line This is what I see:

GNU GRUB version 2.02~beta2-9ubuntu1

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.

grub> _

What should I do now?

I copied from eli's answer in Unix forum

Cause: boot process can't find the root partition

Solution

Please type
ls
This will show all partitions, and then type individual

ls (hd0,1)/
ls (hd0,2)/

... and so on, until you find like

(hd0,1)/boot/grub or (hd0,1)/grub

In case of EFI,

(hd0,1)/efi/boot/grub or (hd0,1)/efi/grub... now set the boot parameters accordingly, just type this with your number

set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod linux
insmod normal
normal

now it would boot and please open the Terminal and put this command line

sudo update-grub
... it should boot correctly in the next time. If not, you have to go through the steps again. In other case, you might have to repair or install grub again, please look at this article.

My SW: Windows 10 and Ubuntu 16.04 dual boot

HW: HP Pavilion 15t

grub> ls

Get the data members

grub> ls (hd0,gpt2)/
grub> ls (hd0,gpt2)/boot
grub> set root=(hd0,gpt2)
linux /boot/vmlinuz-4.15.0-20


No Host only adapter selected I have a problem with my virtualbox on ubuntu 12.04, I can't add a host only adapter, the message is "no host only network adapter selected" I can't select anything

can anyone solve this problem??

Probably, the virtual host-only network wasn't set up yet. Here's is how you can fix this:

From the main menu, select File > Preferences (Ctrl+G) - NOT the settings of a single vm
Select Network in the list on the left
You should see an empty white box with "Host-only Networks" at the top. On the right, there are three buttons to manage them. Click the topmost one (with a green plus symbol). A new Host-only network will be created and added to the list.

Normally, the settings of the new network will be ok, but for completeness, I give the default values here. You can access the settings for the host-only network through the screwdriver button on the right.

Adapter:

IPv4 address: 192.168.56.1
IPv4 Network Mask: 255.255.255.0

DHCP server:

Enable server: checked
Server Address: 192.168.56.100
Server Mask: 255.255.255.0
Lower Address Bound: 192.168.56.101
Upper Address Bound: 192.168.56.254

You can change these settings to your liking, as long as they're consistent.

In 2020, a few changes.

From the main menu select file

Select Host Network Manager

Select create

This would create the settings of the new network, check the "Enable DHCP Server". Now go back to network settings it should see the name of the newly created network when you select Host-only Adapter.


Does it matter that wlan0 has changed its name to eth1 after I upgraded to 12.04? After upgrading to 12.04 I cannot see wlan0 as ny wireless connection. It's now called eth1.

ifconfig and iwconfig also return the same: eth1.

Is this okay, or should I make any changes?

$ iwconfig
ppp0    no wireless extensions.

lo      no wireless extensions.

eth1    IEEE 802.11  Access Point: Not-Associated
        Link Quality:5   Signal level:0   Noise level:220
        Rx invalid nwid:0   invalid crypt:0    invald misc:0

eth0    no wireless extensions.

That bug "report" (more like a series of people pointing fingers without testing anything) might apply but it's not a udev issue.

As anybody who has followed these things for more than week will know, the Broadcom driver for some of their chips has flipped around over the years on how it names things... But it's just a name. You probably could force it back to being an wlan* device but only with a fight.

I'd just ignore it and do something awesome instead. Network manager should still be able to use it as a wireless device, it should all still work.

sudo brctl addbr br0

sudo ifconfig eth0 0.0.0.0

sudo brctl addif br0 eth0

sudo ifconfig br0 192.168.1.115 netmask 255.255.255.0 up

sudo route add -net 192.168.1.0 netmask 255.255.255.0 br0

sudo route add default gw 192.168.1.1 br0

btw what do you got with wlan0 ? do there any network came across ? or its just unplugged ?


Make new instance of main window, python gtk I am fairly new to python and gtk and I am writing an app for the Ubuntu App Showdown using Quickly. I want to make a new instance of the main window when the user clicks on 'New'.

I have the button and menu item linked up, i.e. I can make it make it print 'new' to the command line when they are clicked. However I have searched and cannot find how to make a new instance.

If you want to start a new window of your application in the same process, you can just create a new instance of the window class that Quickly created for you.

My app is called quickly-gtk, and in the python module ./quickly_gtk/init.py I have the following lines (at the bottom of the file):

# Run the application.
window = QuicklyGtkWindow.QuicklyGtkWindow()
window.show()

If you call that again it start a new instance of your primary window.  However, the code Quickly produces is really meant to run one instance of this window at a time, so you will have some side effects you will need to code around.

For example, Quickly connects the window closing event to a callback that ends your whole process.  If you have multiple windows, you'll need to override the on_destroy() method of your window.  There are likely to be other issues you'll come up against doing this.

You make a new window by creating the window object, then showing it Here is an example piece of code:

window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.show()

There are, however, may useful resources to also help, such as the PyGTK reference: http://developer.gnome.org/pygtk/stable/

Also, there is a few more tutorials at: http://pygtk.org/pygtk2tutorial/


is there a lower-graphics setting? Beginning Ubuntu user here.  I just installed Ubuntu 14.04 32-bit on an old Dell computer to replace Windows XP.  I like the interface, but I notice that it responds very slowly.  I suspect this is due to my older graphics card.  Is there a way I can disable some of the animation in the interface, or is there a version of Ubuntu that is less graphics-intensive?

Considering that the machine was running Windows XP previously, you are probably looking for a "lighter" flavour of Ubuntu. It is possible to disable some animations and effects from Unity/Gnome, but depending on how old is the PC, it might not be enough to make it usable.

Xubuntu - XFCE Desktop Environment

Lubuntu - LXDE Desktop Environment

The XFCE environment has a good compromise between usability, performance and customization, when compared to Unity/GNOME. LXDE is another good alternative, that is somewhat "lighter" than XFCE, but it also lacks some customization and usability when compared to the former.


compiz crashing today Running Ubuntu 15.10 32-bit under Parallels Desktop 11.

I the updater today, which included a new kernel.   After reboot the login screen comes up fine, but upon login, my desktop background and resolution updated, but no unity panel or other windows showed up.  Investigation revealed that compiz was segfaulting repeatedly and the window manager could not come up at all.

I attempted a re-install from scratch and the first thing I did after install was run updates -- same problem happened right away (though I could not 100% confirm it was compiz crashing because I neglected to install ssh-server before running updates -- but it "looked" the same visually.

I found a temporary workaround for the problem:

WARNING: this breaks some functions of parallels like coherence.
The workaround can be reverted by reinstalling the parallels tools.

  cd /usr/lib/compiz && sudo rm libprlcompiz_0_*

Compiz (used by unity) is crashing somewhere inside the plugin installed by parallels. Switch to a console and run "unity --replace --debug" for a backtrace. Seems to be an incompatibility caused by the latest updates.

Confirmed that removing /usr/lib/compiz/libprlcompiz_* stops Compiz from crashing on my setup. I'm running Ubuntu 15.10 64-bit under Parallels 11 Mac.

I don't use Coherence, so that's not a big deal for me. Switching between fullscreen and multi-monitor, automatic mouse/keyboard grab, as well as clipboard sync all appear to be behaving just fine.
I didn't try modality, so I can't confirm whether or not it's broken, but I'm up and running as far as I'm concerned.


Blank desktop on Ubuntu 14.04 (menu missing) I had to shutdown my laptop unconventionally because of a programm error. Now if I startup I receive just the blue desktop wallpaper, without any menus. Can't even access the terminal. The right mouse button works and behaves normally and I can reach the settings. Something with gnome?

I already tried

sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install unity

from the command line without any success.

I also tried:

sudo apt-get install --reinstall ubuntu-desktop

In the user interface press Ctrl+Alt+F1 or F2.

Then a command line shows. Type your login account and password.

Type the following commands.

 sudo apt-get install gnome
 sudo apt-get update
 sudo apt-get upgrade
 sudo reboot

In the login screen change the Desktop Environment(DE) to GNOME. Then again back to Ubuntu default.

Please provide a feedback!


How do I convert an MP4 to an MP3? I have some songs which are in mp4 format and I want to convert them into mp3 format.

I am new to Ubuntu/Linux. So please explain the step by step process or give any software which can do the above job.

I would recommend Sound Converter. It is extremely simple to use for what you want. You can find it in the Software Center, or install it from the terminal:

sudo apt-get install soundconverter

Ubuntu Repo: soundconverter
Apt Link: Install soundconverter

All you need to do is open it up, change your preferences (Edit -> Preferences) then click the "Add File" or "Add Folder" buttons to add the music to be converted, and click Convert. It doesn't get much simpler.

Combining things here, but this keeps file names and dumps a original sound copy to m4a:

for f in *.mp4; do name=`echo "$f" | sed -e "s/.mp4$//g"` && ffmpeg -i "$f" -vn -acodec copy "$name.m4a"; done


How to configure GnuPG's S.gpg-agent socket location? GnuPG places its socket S.gpg-agent at ~/.gnupg/S.gpg-agent by default. I didn't find any way to configure the location of this socket nor seems there to be a manpage of gpg.conf.

Background: I want to symlink ~/.gnupg to an OpenAFS mount which doesn't support sockets (and avoid to create a symlink for every file in ~/.gnupg (which is a workaround) instead of just ~/.gnupg), i.e. find the most elegant solution imo.

Since GnuPG Version 2.1.1 there exists a solution:
Place a simple text-file S.gpg-agent in the gpg-homedir with following content:

%Assuan%
socket=/path/to/where/ever/you/want/S.gpg-agent

It replaces some evnvars like ${HOME} or ${HOSTNAME}

Be careful, when using a subdirectory of /tmp, because gpg-agent will not create  needed directories.

Further reading at:
https://dev.gnupg.org/T1752

User ruhri's solution did not work for us on our Debian stretch systems. At least, we had to add more socket "redirects". Here is what worked for us.

Create the .gnupg/S.gpg-agent file as described by ruhri:

%Assuan%
socket=/srv/scratch/joeuser/S.gpg-agent

Add these two lines to the end of .gnupg/gpg-agent.conf (create file if it does not already exist):

extra-socket /srv/scratch/joeuser/S.gpg-agent.extra
browser-socket /srv/scratch/joeuser/S.gpg-agent.browser

Create the file .gnupg/S.gpg-agent.ssh similar to the file .gnupg/S.gpg-agent:

%Assuan%
socket=/srv/scratch/joeuser/S.gpg-agent.ssh

This solution comes from this comment.


Skipping "Configuring apt" during system installation on Ubuntu Server I'm using packer to automate an installation of Ubuntu Server 16.04.1 LTS (Xenial Xerus).

During the installation, I noticed that the installer spends a lot of time hanging on this screen before eventually seeming to give up and move on:

It just hangs at "Retrieving file 1 of 18" for a few minutes and then moves to the next screen, without "file 2 of 18" or any progress beyond file 1 ever showing. I believe this is because I am doing an offline install with no internet access, and apt is waiting for some sort of timeout before moving on.

This doesn't cause the install to fail, but it does cause the installer to spend quite a bit of unnecessary time just sitting there, doing nothing. Is there a preseed option I can use to just skip this step entirely? That would certainly speed up my builds quite a bit.

I realize I can just hit cancel manually, but I'm doing an entirely automated install, so that isn't a viable option for production.

I've already tried the following options, and none of them seemed to have any effect on this screen:

d-i pkgsel/updatedb boolean false
d-i pkgsel/upgrade select none
d-i apt-setup/use_mirror boolean false

you can skip configuring apt by simply pressing ctrl+R+del then the following step will skip by connecting to the server of that step.No any bug found while trying  this step.well,being a linux expert i suggest you to use this method or another method that is ctrl+F1+esc.thats all

Please try the following options

d-i apt-setup/services-select multiselect


Windows computers can only print test pages to shared Ubuntu printer I have an HP printer connected to my Ubuntu 11.10 machine. I have 2 other Windows computers (Win7/Vista). Both of these Windows computers can view, install, and print a test page to the shared Ubuntu printer. The Windows computers cannot print anything to the Ubuntu printer except the test page under properties or during install. I have tried word and pdf files.

In Linux stop sharing the printer through Samba.

Share it through CUPS instead: go to http://localhost:631/ and there will be spoe "Share printers" checkbox.

On Windows add a Network printer, and don't search for it; add manually this address:

http://servername_or_IP:631/printers/printer_name

printer_name is the name shown in the CUPS Web interface for your printer.

You will be prompted to choose the proper model and a driver will be installed. That's it.

Unlike Samba, advanced feature also work now.

This is a Ubuntu Guide For Windows Users: Connecting To Shared Printers On Windows Computers.
http://www.watchingthenet.com/connecting-to-shared-printers-on-windows-computers.html


Failed to fetch - Installation errors I am trying to make updates and installations and I keep getting errors like:

Err:1 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1

What do I need to do to rectify these errors?

Here is the full attempt:

sudo apt install gcc-8
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  cpp-8 gcc-10-base gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
Suggested packages:
  gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg
  libmpx2-dbg libquadmath0-dbg
The following NEW packages will be installed:
  cpp-8 gcc-10-base gcc-8 gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
0 upgraded, 8 newly installed, 0 to remove and 13 not upgraded.
Need to get 21.0 MB/21.6 MB of archives.
After this operation, 72.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libgcc-8-dev amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 gcc-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/cpp-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/libgcc-8-dev_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/gcc-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
____________________________________________________________________________________

Also the scroll wheel does not work, but I don't know if it associated with this problem.

Thank you

As APT say 404 not found it means that repository information is outdated. You can easily solve it by issuing this command on terminal:

sudo apt update

Now retry to install your package and the installation process would be smooth.


How to update VLC to the latest version on Ubuntu Related to: How to update VLC to the latest version?

Except that there are no builds for Natty in this VLC ppa:

  ppa:videolan/stable-daily

Index of /videolan/stable-daily/ubuntu/dists:

oneiric
precise

So how do I update VLC (currently 2.0) on Ubuntu 11.04, Natty Narwhal?

There is a daily build PPA from the VLC team, add it following these steps

sudo add-apt-repository ppa:videolan/master-daily

Update and upgrade / install VLC

sudo apt-get update && sudo apt-get install vlc

REF

Try using this PPA, I don't know if they have packages for 11.04, but they have for either 11.10 and 10.04, so it's worth trying.

sudo add-apt-repository ppa:n-muench/vlc
sudo apt-get update
sudo apt-get install vlc

This PPA is not a testing repo, so lastest VLC 2.0 stable version is released here.
If you still can't get it the easy way, you can always compile from source.

Good luck! ;)


Is there a keyboard shortcut for "save link as" in firefox or chrome? I'm tired of right-clicking. Can I do a "Save Link As" by holding a keyboard button and clicking the link?

You can restore the old Alt-click "Save Link As" functionality in Firefox:

Open a new tab in Firefox. In the Firefox address space, type:

about:config

Click the "I'll be careful, I promise" prompt.  Type

browser.altClickSave

in the Search space.  Double-click on the browser.altClickSave line to change the value from false to true.  Close the about:config tab.

Now when you Alt-click on a valid download link it will open the Save As explorer screen.  All you need to do is set the correct location and press Enter.  Once you set the download location, if you are downloading a lot of files into the same location, all you need to do is press enter.  This will greatly speed up your download process.

I did the above process in Windows 7.  It should also work in Ubuntu.

Save Linked Page (when a link is selected) (for firefox):

On Windows : Shift+Enter

On Mac : Option+Enter

On Linux : Shift+Enter

(See more shortcuts)


Upgrade Git version on Ubuntu 14.04 Can please somebody tell me what is wrong with this?

I run

$ sudo apt-get purge git; sudo apt-get autoremove; sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  git-man liberror-perl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  git* git-core*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 21.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 81533 files and directories currently installed.)
Removing git-core (1:1.9.1-1ubuntu0.1) ...
Removing git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Purging configuration files for git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  git-man liberror-perl
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1,831 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 80929 files and directories currently installed.)
Removing git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Removing liberror-perl (0.17-1.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11.0 MB of archives.
After this operation, 22.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package liberror-perl.
(Reading database ... 80751 files and directories currently installed.)
Preparing to unpack .../liberror-perl_0.17-1.1_all.deb ...
Unpacking liberror-perl (0.17-1.1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a2.2.2-0ppa1~ubuntu10.04.1_all.deb ...
Unpacking git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a2.2.2-0ppa1~ubuntu10.04.1_i386.deb ...
Unpacking git (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up liberror-perl (0.17-1.1) ...
Setting up git-man (1:2.2.2-0ppa1~ubuntu10.04.1) ...
Setting up git (1:2.2.2-0ppa1~ubuntu10.04.1) ...

After that $ git --version shows:

git version 1.8.2.1

It looks like git 2.x was installed but I can continue getting the old version.

Updates:

I have already tried this: Git 1.7.9.5 Upgrade to current release of GIT 2.x on ubuntu 12.04
dpkg -L git see: https://gist.github.com/montogeek/e7bedaf03cef9a3d969b
which git:  /usr/local/bin/git

You need to add the Git Maintainers repository in order to get the latest Git version.

Please run these commands in order:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Then, check the version of the installed Git:

git --version

It's not always necessary to remove the existing Git before upgrading it, but if you run into any problems, do the following and then repeat the steps mentioned above:

sudo apt-get remove git

You have a second copy of git installed in /usr/local/bin which is being used instead of the system installed git.

Without knowing how the other git has been installed, I would say that you need to manually remove the other git binary from /usr/local/bin.


How do I get brightness control working on an HP 655? please I installed Ubuntu 14.04.1 on my hp 655 alongside windows 8.1 but my brightness control doesn't work although it does work on my windows platform.

I finally got my brightness feature to work.
I discovered that my device uses radeon_bl0:

ls /sys/class/backlight/

to check and then i navigated to the brightness file under radeon_bl0.
My maximum brightness was 255 of which my current settings was on and i changed the value to a much lesser value and there, it worked. Here is the code i used...

 echo 'value' > /sys/class/backlight/radeon_bl0/brightness

where 'value' is any value between 1 and 255.

Hope this helps someone else.

Maybe, it could be the solution:
Add video.use_native_backlight=1 in the grub

sudo gedit /etc/default/grub

And add:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video.use_native_backlight=1"

Then update the grub:

sudo update-grub

Finally, reboot.


Ubuntu 18.04 cant load package manage ("serious problem" as implied by ubuntu itself) So I´ve been using Ubuntu for a while now, trying to get used to it.
But now all of a sudden this appears

Sorry, Ubuntu 18.04 has experiences an internal error.

and if I try to open the package as suggested by the system i get

Failed to load the package list
This is a serious problem
Details: E:Malformed entry 55 in list file /etc/apt/sources.list (URI parse), E:The list of sources could not be read like I said, not too used to Ubuntu yet. So I have no clue what to do

Edit:

I got told to open a file, which contains this in line 54-56

# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
deb [arch=amd64] <DOCKER-EE-URL>/ubuntu bionic stable-17.06
# deb-src [arch=amd64] <DOCKER-EE-URL>/ubuntu bionic stable-17.06

In the terminal type this...
cd /etc/apt # change directory
sudo -H gedit sources.list # edit the file
Be careful not to change anything yet.
In gedit go to the preferences and enable line numbers.
Scroll down to line 55, and copy lines 54-56 to the clipboard, quit gedit without saving, then come back here, edit your question, and paste those lines so I can take a look for you. Then we can edit out the errors.
Update #1:
I've looked at lines 54-56, and there are TWO bad lines (55-56) that need to be completely removed... as the URL's are missing, and the repository doesn't exist any more anyway...

deb [arch=amd64] < DOCKER-EE-URL>/ubuntu bionic stable-17.06
deb-src [arch=amd64] < DOCKER-EE-URL>/ubuntu bionic stable-17.06

Start the gedit editor as you did earlier, delete these two lines, save the file, and you're done!

Sounds like the file in /etc/apt/sources.list has a broken line on that.

You can open that in whatever your preferred editor is, just make sure you are root when doing so (some gui's will do this for you)
eg in a terminal run

sudo gedit

One the file is open, go to line 55, either put a # at the beginning and save, or see if you can fix whatever is wrong with the line.


How can I control my others PC's music from my laptop? I have a big music collection on my Desktop-PC and it's hooked to a couple speakers. I want to make the music play through those speakers, but control the player from my laptop....

It's hard to explain because I'm not a native speaker, but I'll try to clarify with an example:

I'm laying in my bed with my laptop. I choose the song I want to listen and it starts playing through my desktop's speakers, I can add songs to it's library with my laptop and so on, I hope this is better explained!

Using a special music player
The most versatile of the music players might be the music player daemon. Your desktop will run the daemon. There are many clients available to remote control it. It is not the only option as far as remote control players go. Rhythmweb is another option but many more exist.
Using Pulseaudio
Pulseaudio is an abstraction layer giving programs access to your sound hardware. You can configure your Desktop as a "sink" for audio and your laptop as a "source. Then you will be able to stream all the sound from your laptop to your desktop on a very low level. See chronitis' answer and tutorial link for more information.
Using ssh
Probably the easiest and way if you already know ssh is this one:
Assuming your Laptop has an ssh client with X11 capabilities (installed by default on Ubuntu or MobaXTerm and many others on Windows) and your Desktop-PC is running Ubuntu.

Install ssh-server  / sudo apt-get install openssh-server on your desktop PC.

Make sure that the file /etc/ssh/sshd_config on your Desktop-PC has a line that says
PasswordAuthentication yes*

Use the command (ssh -CX user@desktop-PC NameOfYourMusicPlayer) on your laptop to start the music player of your Desktop-PC (it will run on your laptop but play sound on your desktop's speakers).

Enter your password on your Desktop-PC and wait for the player to load.

Substitute "user" for your username on your Desktop-PC, "desktop-PC" with the IP or hostname of your Desktop-PC and "NameOfYourMusicPlayer" with the name of your Desktop-PC's music player (e.g. Amarok, Banshee or Rhythmbox)
All music you want to play has to be present on your Desktop-PC. You cannot play music files located on your laptop. What you can do is move music files from you laptop to your desktop over network using scp or nautilus.

Warning: PasswordAutentication for ssh is a potential security risk. If your password is weak and your Router forwards the standard ssh-port (22) or if many people have access to the network your Desktop-PC and laptop are connected that might be a security risk and you should use another authentication method (see the ssh-tutorial for more information).*

ssh username@music_server

and then with mplayer play your musics

but it's just a solution, surely others suggested better ones..


Google Chrome - Google.com using SHA-1 14.04LTS Anytime I go to any Google site (including Youtube), I don't get that nice green HTTPS sign letting me know everything should be safe with my connection to Google. In the past week or so, it has been just showing a non-colored HTTPS, and it says that google.com is using SHA-1, which is a deprecated means of encryption. This also happens with some other sites, but most still have the green HTTPS. Any online certificate checker I go to says Google should not be using SHA-1. How do I fix this so Google can be a green HTTPS again?

Chrome 46.0.2490.80

Ubuntu 14.04 LTS

I fixed this issue, I had updates off for Ubuntu so that I would not get popup notifications for updates. I just had to re-enable my sources and update libnss3 to get everything fixed up.


Ubuntu 14.04 + Virtual Box and CorelDraw I have Win7/Ubuntu dual boot. I have no reason to use Win anymore, except CorelDRAW which is a must, I'm bored of switching between these two.

My plan is to install Ubuntu on 24GB SSD (20GB for /root, 4GB for /swap), and 500GB SATA to set as /home. After that, need to install VirtualBox, set up Win7 and install CorelDRAW.

Is that possible? Important thing is that VirtualBox + Windows + CorelDRAW must be on /home, because theres only 20GB on /root.

As an aside, I'd recommend putting your swap on your HDD rather than your SSD - this is for two main reasons:

4 GB of a 24 GB drive is a large percentage. SSDs run best when you're using below a certain percentage of their storage (I think the number is around 80%)
Lots of writes from the swap, which will likely lead to degradation of the hard drive faster

As for the rest of it, you should be good to go. Virtualbox lets you put the windows 7 virtual hard drive wherever you please.

If what you are asking is "Is it possible to put /home on a different disk than /root?" then yes, that is possible.

I'm not very familiar with VirtualBox, but according to this article, it should work just fine.

One such way to install /home and /root on separate partitions can be found here: http://www.psychocats.net/ubuntu/installseparatehome
From what I can tell it answers your question.
It appears to be a little out-dated, but it looks like it will still work.


Ubuntu unusable after trying to update to 16.04 I tried to update my Ubuntu 14.04 to 16.04 and in the middle of the process the computer suffered a power down.

After turning it on again it was unstable, for example the screen wasn't the right resolution.

Trying to solve that I did run sudo apt-get update but the problem persisted. Also the top bar disappeared.

Then I tried to change the nvidia default drivers, selecting from the XOrg to another option. I didn't take a screenshot.

After that I couldn't access Ubuntu again. I tried turning the computer on again and getting into recovery mode, and the screen gets frozen and dead.

I tried rescatux as well, in order to fix GRUB in case it was an issue with that.

Now I have the computer turned on with the 14.04 live CD. I do have the hard drive mounted.

Is there any way to access any file in that drive and modify it in order to undo the selection of that Nvidia driver?

Or is there anything else that I could try?

Please take into consideration that I cannot access Ubuntu, so I cannot type anything into the terminal.

You can revert your Xorg.conf (possibly under /etc/X11/) file to its previous state to use default nvidia driver & boot into it, then try using aptitude to see if you can get the package manager to a more stable state. Reverting is a vague term here. May mean using a backup copy of it if there's one, or just creating a new one (see the link in the update below).

Also, since aptitude works in console mode, you can try booting to console mode from grub to do the same, but you'll need to fix the Xorg.conf before you can get the xwindows.

update:

This answer is downgraded, possibly because there may not be an xorg.conf file. I thought since you tried to install non-default nvidia drivers, you may have ended up with an xorg.conf. Regardless, have a look at another answer for xorg.conf: Where is the X.org config file? How do I configure X there?

Remember, since you're mounting your linux partition from a live-cd, your root partition is mounted somewhere. If, for example it's /media/Linux, than you would be checking /media/Linux/etc/X11/ folder to find it, if it exists.


missing resolution on XPS13 after upgrading to 16.10 I'm not sure if this is a bug, so i'm posting a question first so see if anyone can help me figure out it's a bug.

I just upgraded from 16.04 to 16.10 and now i'm missing a resolution mode on my XPS13-9350. I have 3200x1800 available, but i rather use 2560x1600, which was available to me while i was running 16.04.

I tried to mess a bit with xrandr, but the system froze while i was trying out stuff, so i'm not sure this is the right way.

Can anyone help me further?


How can I be able to start Windows 7 from Ubuntu, and not from grub? While I was in Windows 7, I once changed my System Settings to have Ubuntu starting automatically, and since then I don't know how to run Windows again (what a stupid thing I did). Since I can't run Windows, I'm unable to uninstall Ubuntu, which I have installed inside Windows, as Wubi.
Please let me know if there is anyway I can solve this problem.

I'm using Windows 7 and Ubuntu 13.04.

Install grub. It is the only way possible to recover it strictly from Ubuntu. Other methods are possible but GRUB is the easiest. It is very simple to install as well.

Right from Ubuntu's support pages:

sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda

If you later wish to return to the Windows Boot Loader, it is possible and there are many guides on the internet. I would highly recommend that you install your own partitioned and completely seperate Ubuntu. It works much more elegantly.


Is it safe to install Ubuntu 12.04 alongside windows 7? Is it safe to install ubuntu alongside windows 7?

I have a laptop with 500 GB hard disk and 2 GB RAM and it is pre-installed with windows 7.My professor asks me to install ubuntu 12.04 alongside Windows 7.

However I am not sure whether it is safe to make a dual boot system? Will it affect my hard disk ?Is there any chance of a hard disk crash?

Please help.

It depends on what do you call "safe"?

There is a risk of data loss if power supply fails during partitioning of the HDD.

There is also a risk that the person who installs Ubuntu removes a wrong partition or incorrectly understands what disk is. That it is not like "Disk D" in Windows. It is a physical disk.

There are lots of things that an inexperienced user can do wrong.

That is why it is always recommended to backup your important data first.

But if you do everything carefully, read manuals first, it can be pretty safe.

You can read this answer for directions.

There is no risk as long as you do it right as others have covered.

12.04 is an LTS version but is pretty darn old, I can't see a reason to go with 12.04. Some people stick with 10.04 because it is a 2.6 kernel and they need specific kernel patches (RTOS) but if you are going to go to 3.x or 4.x (there was no major updates in 4.0 it was just a numbers thing) go with either the latest (best support) or the most recent LTS (decent support and support for years). There is a small chance your professor needs a specific kernel, gcc or other package version but this seems unlikely and can be fixed (will take time to learn, but that is what you are in college for). What class is this for?


"Disk is likely to fail soon" SMART error Hi I am facing th "DISK IS LIKELY TO FAIL SOON (41° C / 106° F)" issue.

My laptop is overheated. Currently i am using the coolpad for bringing down the heating issue.

My laptop battery is also dead because of overheating my laptop got shutdown when i unplug the charger.

But i am worried about disk failing message. Please help.

The short answer is, "No."
This is the longer answer:
During the process of asking your question, there was this link in the sidebar. There's a section about keeping an open mind. Sadly, there's no "good" answer for this. Sorry about that, but it is beyond our control.
S.M.A.R.T. stands for Self-Monitoring, Analysis and Reporting Technology and reports disk health. It's not 100% accurate, but it is a very useful reporting tool.
Your disk is almost certainly going to die soon. If it has important data, you are going to lose that data - unless you've backed it up. If you have important data on that disk, back it up now. Do not hesitate, or you will end up losing it when the disk does fail.
SMART can't know the exact moment of failure. It can only tell you that it's going to fail. It is telling you that.
What you should do is replace the drive as soon as possible. Until you get your data backed up, you should avoid using anything that uses the hard drive. While waiting, you can decide to use a Live USB instance of Ubuntu and disconnect your hard drive in the interim.
Every read/write operation on your drive is going to move your point of failure closer. Every power on operation is going to move your point of failure closer.
There is nothing that you can do to stop this. Your only recourse is to back your data up, replace the disk, move your backed up data to the new disk, and to keep on truckin' on. Your disk will fail. It will fail soon. The more you use it, the more probable the failure and irrevocable loss of data.
If you have vital data and it does fail, there are data recovery experts that can disassemble drives and recover them, more so for spinning platter drives, but that is extremely expensive and often results in only partial recovery. To avoid any of this, backup your data (hoping that it doesn't fail while doing so), and move on. Disks have a lifespan, it is variable, and disk death is a certainty.
Again, time is of the essence. Doing this as soon as you can makes the outcome more likely to be favorable. If you must wait to do this, I'd highly recommend using a live boot USB/optical disk and not mounting the drive during the live sessions. If possible, I'd even disconnect the drive physically.

Your hard drive most probably has a few bad sectors (regions on the surface that cannot be read or written, so they've been marked "bad"). Hard drives with bad sectors are not reliable, generally shouldn't be used as main drives, only for testing/backup/recovery/repair or other professional use.
How important is the data to you? If it is irreplaceable then consider a professional data recovery service. The price can range from $300 to $1000 and up.
If that is not possible see the below guide. Read it twice. After imaging to a new drive, you can use software like iBoysoft Data Recovery to scan the newly cloned drive. The software recovers data in real-time so you would need another drive that would have enough free space. It will recover the files and finds with the names intact but you need to purchase a key for any recovery over 1GB. This is a detailed tutorial.


Change timezone in 10.04/11.04 without user input How can one change the time-zone in Ubuntu 10.04 or 11.04 server from the command line without user input (e.g. tzconfig EST).

While one would use dpkg-reconfigure tzdata, per the related question How to change the time-zone settings from the command line, with user interaction, I can't seem to find out how to change the time-zone from within a non-interactive a script.

The solution is meant to be part of an installation script that configures a server.

Thank you for reading.

Create a link to /etc/localtime

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Just replace /America/Los_Angeles with your zone.

Goto Systems > Administration > Time and Date.

Then press the padlock icon beside "Click to make changes", enter your password to authenticate, now you can change your Time Zone.


Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'xxx' doesn't support architecture 'i386' Getting below error message while issuing :

sudo apt-get update

Get:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease [95.8 kB]
Ign:2 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease
Hit:5 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease
Ign:7 http://dl.google.com/linux/talkplugin/deb stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:9 http://linux.dropbox.com/ubuntu wily InRelease
Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease
Get:12 http://dl.google.com/linux/chrome/deb stable Release [782 B]
Hit:13 http://dl.google.com/linux/talkplugin/deb stable Release
Ign:14 https://apt.dockerproject.org/repo ubuntu-wily InRelease
Hit:15 https://apt.dockerproject.org/repo ubuntu-wily Release
Get:16 http://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]
Hit:17 http://linux.dropbox.com/ubuntu wily Release
Get:20 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,191 B]
Fetched 98.0 kB in 0s (118 kB/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'

This cuts across various releases of ubuntu

I tracked down offending repo (any for Google chrome in this dir)

cd /etc/apt/sources.list.d
grep chrome * | grep -v amd64

or more generally

grep -r google  /etc/apt | grep -v amd64

Now do same as below for each repo file which matches above

cat /etc/apt/sources.list.d/google-chrome-unstable.list

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main

SOLUTION : limit to just 64 bit by introducing the [arch=amd64]

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

ROOT CAUSE : Google dropped support for 32-bit Chrome on Linux triggering an error when updating apt in 64-bit systems (with multi arch enabled) ...  details here : http://www.omgubuntu.co.uk/2016/03/fix-failed-to-fetch-google-chrome-apt-error-ubuntu

To confirm you are using 64 bit ubuntu with multiarch enabled issue

dpkg --print-foreign-architectures

if it says

i386

then you have added 32 bit support, this will list your native arch ... issue

dpkg --print-architecture

if you are native 64 you will see this output so do SOLUTION shown above

amd64

Here is the command to remove multi architecture ( only if you have no 32 bit applications )

sudo dpkg --remove-architecture i386

Though this question has been marked solved, I was unable to solve this issue with any of the above answers. I used an another method. Go to 'software & updates' > ubuntu software > download from > select best server. Now wait for some time for the system to find it out. Once this gets done, try your command again. This worked for me.


How to automatically switch default printers based on your location I wonder if is it possible to automatically switch the default printer according to the wifi network to which the computer is connected.

Apparently, windows has this feature

This answer does not need sudo privileges
I assume you have two places with WiFi connections and two different Network Printers. Your laptop is setup to connect to these two WiFi connections. You have also setup your laptop's printer setup to the two printers and you can print to these two printers when connected to the respective WiFi networks.
For simplicity I will call the:

First WiFi network the "HomeWiFi" and the associated printer the
"HomePrinter".
Second WiFi network the "OfficeWiFi" and the associated printer the
"OfficePrinter".

I have written a bash script I call changedefaultprinter.sh you can name the file what you want and edit it as you wish. You will need to names of the WiFi and printers in the script to make it work.
The Script
#!/bin/bash
# File name: changedefaultprinter.sh
# Purpose: Change the default printer to home or office based on WiFi

############################
# User modification section
# Add WiFi and Printer pairs below:
WIFI1="HomeWiFi"
PRINTER1="HomePrinter"

WIFI2="OfficeWiFi"
PRINTER2="OfficePrinter"

# End of user modification section
############################

CURRENTWIFI=$(iwgetid -r)             # Get the name of the current WiFi

if   [[ ! $CURRENTWIFI ]]; then         # Not on WiFi
    echo "Could not find any WiFi, exiting..."
    exit 0
elif [[ $CURRENTWIFI == $WIFI1 ]]; then
    echo "Found $WIFI1, Setting $PRINTER1 as the default..."
    lpoptions -d $PRINTER1
elif [[ $CURRENTWIFI == $WIFI2 ]]; then
    echo "Found $WIFI2, Setting $PRINTER2 as the default..."
    lpoptions -d $PRINTER2
else
    echo "On unknown WiFi, exiting..."
    exit 0
fi

How to use:

Copy the script into a file changedefaultprinter.sh and save it in the location /home/$USER/bin. If you don't have the folder bin create it first. Make the file "executable". See How to make a file executable?

Find out the names of your WiFi and the default printers you have already setup. You can do this in many ways. I use the terminal and the commands below:

Make sure you are connected to your Home WiFi and and the home printer is set as the default. Open a terminal by pressing Ctrl+Alt+T and enter the command:
iwgetid -r

This should show you the name of your WiFi. Copy this name from the terminal and paste it into the file above where it says HomeWiFi.
Now to copy the name of the home printer use the command:
lpstat -t

You will see something like:
scheduler is running
system default destination: HomePrinter

Copy the name of the printer from the terminal and paste it into the file above where it says HomePrinter.

Now take the laptop to the office and repeat the same process to get the names of your office WiFi and Office default printer into the script. Replace the OfficeWiFi and OfficePrinter in the script.

Try it out:
In the terminal enter the command while connected to the home WiFi:
changedefaultprinter.sh

If all goes well you will see some text telling you your default printer is now set to your home printer. Do the same thing in the office to make sure it works there as well.
Make the script run when you login to the laptop
Open the application "Startup Application Preferences" and click on the button Add

Add a sensible name of the script so that you know what it does, and the location of the script as:
/home/$USER/bin/changedefaultprinter.sh
Where $USER is your username.
Click the Add to save the changes and close the "Startup Application Preferences" window. From now on every time you login to your laptop this script will run. It will determine which WiFi you are on and change the default printer.

Alessandro, I'm ashamed for how long I've been putting up with the same annoyance before I figured out how dead simple it really was...!
I've made a little project, which I think you might want to try out. Please let me know either way.
To install it, open up a terminal and enter the following (you don't need to type in the '#' and the number after it):
sudo apt install autorandr #1
mkdir -p ~/.config/autorandr && cd ~/.config/autorandr #2
git clone https://github.com/Noughtnaut/noughty-autorandr.git #3
autorandr -s some_name_here #4

and you're all set. This is what you just did:

Install the autorandr package, which automatically runs whenever you (un)plug a display. If you prefer, you can also do this via a graphical software manager.
Create a folder for the program's local configuration, and navigate to it.
Download my add-on that manages printer defaults. It is important that this is done inside of the ~/.config/autorandr folder.
Store your current setup -- including the setting for default printer. Then, when you get to the office, or anywhere else with a particular monitor setup, you run this same command again, with a different name for each profile.

Henceforth, your laptop will automatically change the default printer for you.


My Gnome shell in Ubuntu is the old-style gnome 2.0 style I have upgraded from Natty to Oneiric. I want to use Gnome shell 3 in Oneiric, and have installed it from the repository. When I login I see the old gnome 2.* style desktop. Is this the expected result? Shouldn't the interface be the same as gnome-shell. I am confused since different posts on the Internet are showing both interfaces.

When you were asked to login, you clicked on the button that says you can choose

Gnome
Gnome Classic
Gnome Classic (No Effect)
Ubuntu
Ubuntu 2D

you should chose Gnome.

what version did you chose ?

Ubuntu 11.10 Oneiric Ocelot uses Unity not GNOME Shell.
If you want to use GNOME Shell, then install the gnome-shell package, this can be done with sudo apt-get install gnome-shell.

In the login manager (LightDM), which you see when you boot Ubuntu, you can click on the gear icon to chose which session to use when you login.


How to fix a grub boot error : "symbol 'grub_calloc' not found Just ran the latest batch of updates on 20.04 (Xubuntu), and now I'm getting a GRUB error:
symbol 'grub_calloc' not found

I'm dropped into the 'grub rescue' shell, but have no idea what to do there that might be useful. To me, 'symbol not found' implies some sort of build error with the grub package, but I don't really know how grub works. I noticed that this update also included 'firmware', not sure if that could be related. Is my best bet just to boot from a live CD and see if I can roll back the update to grub somehow?
Edited to add:
OK, thanks to lots of people ! Here's what I think I now understand.

On 'non-UEFI' systems, grub is installed in two separate parts. The first, most basic, part is the part that is started on bootup. But for most of it's functionality, it needs the second part. These parts must be aligned - neither part must require any functionality from the other part which is not actually there.
The visible, run-time problem occurs when these parts are not aligned, and the function grub_calloc is not supplied. It's not 100% clear to me if grub_calloc belongs in the second, larger part or the first. I would have expected the second, but the grub build system is a work of considerable art, so I don't know :).

The root cause of the problem is that the grub update has not ensured that both parts have been updated. Ideally, failure to do this should cause grub installation to fail, and the system should be reverted to a safe state. This does not happen.
This is actually still a bit of a mystery to me. All that the update needs to do by default is put each part where the current parts are, because obviously that worked. If the install locations/drives are configuration - driven, and one of these locations can't be reached, then somehow a mismatch has arisen between that configuration data and reality. This might not show up as a problem as long as no new dependency was introduced between the parts.

All flavours of solution involve reinstalling grub to ensure that the two parts are aligned. It's not actually necessary to go back to the previous version ( although that will work ), because it's not the grub runtime per se that is broken. There are numerous ways to achieve this, depending on your environment, but running the Boot-repair live disk worked for me.
It may be useful, for the purpose of avoiding such a misalignment in future, to ensure that the grub installer on your system is configured to install to the correct devices.
This update resolves some important bugs (See Ubuntu Security Notice 4432). If you have reverted grub to resolve this problem, be aware that you are exposed to these issues.

Using Linux Mint 19.3 bios grub setup in a simple 2 partition installation.
After GRUB2 update the machine crashed on reboot and entered rescue mode.
error: symbol 'grub_calloc' not found

To restore GRUB I booted into Linux Mint 19.3 Live USB stick and issued the following commands in the terminal:
sudo mount /dev/sda1  /mnt
sudo grub-install --root-directory=/mnt/  /dev/sda

On reboot the desktop showed up nicely.

Like Juan Fra - I have 2 disks, but not RAID. I suspect GRUB was on both. I'm on Ubuntu so booted from CD, installed "boot-repair" (instructions available online) and it updated all grub partitions. All good now.


How to update kernel to the latest mainline version without any Distro-upgrade? Currently I'm running Linux-3.0 and I want to update it to Linux-3.3.1 the latest stable kernel release as mentioned at http://www.kernel.org. Can I update to 3.3.1 in Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..Currently I have Linux-3.0.0.17..Can I update?

NOTE:

The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. What the question author is referring to is mainline kernel, see:  Should I upgrade to the "mainline" kernels?

The simplest set of instructions I always used for kernel upgrade / downgrade are by ubuntuforums.org user by the name of lykwydchykyn (url modified by me for this post):

Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/
Download 3 (maybe 4) debs to a folder somewhere:

linux-headers-VERSION-NUMBER_all.deb
linux-headers-VERSION-NUMBER_amd64.deb
linux-image-VERSION-NUMBER_amd64.deb
linux-image-extra-VERSION-NUMBER_amd64.deb   # if available

Install the debs with whatever package manager front-end you use (is gdebi still around?), or use these commands:

cd /path/to/folder/where/you/put/the/debs
sudo dpkg -i *.deb

Sources:

https://wiki.ubuntu.com/Kernel/MainlineBuilds
http://ubuntuforums.org/showthread.php?p=11391743#post11391743

Check Your Kernel Version
$ uname -sr

Download Kernel v5 for 32 bit

$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb

Download Kernel v5 for 64 bit

$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-unsigned-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb

Install it

$ sudo dpkg -i *.deb

Then Reboot

sudo reboot


Dual boot partition problem When trying to create a dual boot (windows and ubuntu) I ran in some trouble. Because I do already have 4 partitions, the 5th one is unusable for ubuntu to install. Now I'm really hesitating which one could be deleted or not. I have the following partitions:

device    type   size     used      system
/dev/sda1 ntfs   104mb    25mb      Windows 7(loader)
/dev/sda2 ntfs   877973mb 195685mb
unusable         56624mb    an
/dev/sda3 ntfs   64424mb  24054mb
/dev/sda4 ntfs   1065mb   218mb     Windows Recovery Environment(loader)

As you can see, sda2 is my main partition, and sda 3 is my driver partition.

Can I safely remove sda1 or sda4 partition? I'm not sure what the "loader" is supposed to do.

If you can merge the contents of your drivers partition onto your main Windows partition and get can confidently remove it you can delete that partition and add extended partitions using its space and the contiguous unused space.

At that point if you want to create an Ubuntu partition as well as create a new Windows driver extended NTFS partition you can.

Having four primary partitions is a dead-end it's best to avoid.

If your computer and Windows can deal with it you may also be able to convert the disk to GPT format--it doesn't differentiate between primary and extended partitions and can have a large number of partitions. Both Windows and your BIOS would have to support that move.

I'm confused by one of your comments. You mention having allocated space for the Windows installer already. If I understand correctly and that's an NTFS partitions on the list never used you could delete it, boot from a DVD or USB Ubuntu installer, and then let the Ubuntu installer handle putting Ubuntu into an extended partition (not a primary one). Ubuntu doesn't generally install on an NTFS partition, using a different file system like Ext4. You don't need to create a partition for the Ubuntu installer itself. You can boot an Ubuntu install DVD and the software on it will do the formatting you need.

Unless you are letting the Ubuntu installer do all the formatting automatically you will have to choose "Custom" for the install type.

In any case you would have to be careful about backing up and having a way to use the backup if there is a problem.

My guess is that the Windows and Linux programs are not properly compatible. I suggest to revoke the changes you've made in Win and start the installer again. Then use the Ubuntu program to shrink /sda2 again.

Hope that'll work, good luck!


How can I know which file is being used in a bash for loop? I have a very tricky question that I have been wanting to tackle for quite some time.

If $line is from $(cat foo), then do action1

If $line is from $(cat bar), then do action2

for line in $(cat foo) $(cat bar) ; do
    if [ ??? ]
        then action1
        else action2
    fi
done

What would I need to put in the if statement?

What about this?

for line in $(grep '^.*$' foo /dev/null) $(grep '^.*$' bar /dev/null)
do
    if [[ ${line} =~ ^foo.*$ ]]
    then
        action1
    else
        action2
   fi
done

If you want to strip the leading filename in $line afterwards you can add line=$(<<<$line sed 's/^foo:\(.*\)$/\1/') and line=$(<<<$line sed 's/^bar:\(.*\)$/\1/') in the if / else body.

Self solution

As long as $line will never equal to "FILECHANGE," (most likely never in my case) this will work

x=1
for line in $(cat foo) FILECHANGE $(cat bar) ; do
  if [ $line = FILECHANGE ]
  then x=$(($x+1))
  elif [ $x = 1 ]
  then echo 1
  elif [ $x = 2 ]
  then echo 2
  fi
done


Slight sound "crackle/pop" in 14.04 I have a slight sort of crackling noise coming through my headset when I play, well, anything. It doesn't seem to happen if I just open a youtube video and let it play, not touching ANYTHING else. But if I maximize and minimize a couple times it starts up (or if I am doing anything else on the comp e.g. chatting on steam).

I am new to Linux and I am using my SteelSeries Siberia v2 USB headset which has it's own usb sound card 7.1 simulator thing. More info here:
http://steelseries.com/us/products/audio/steelseries-siberia-v2-usb

I tried editing pulse settings but I can't seem to get permission to do that. And I looked up how to just delete pulse and ended up deleting a bunch of stuff I shouldn't have and then had 0 sound and no system settings...I reinstalled everything is back to where it was.

Is there a workaround for this?

I had horrible clicking/popping sounds from my Logitech G35 USB headset. It worked fine on windows but not Fedora. There would be a painful sharp crack every now and again when music was playing, and every time I'd seek to a new spot in a track or on youtube.

The following additions to /etc/pulse/daemon.conf seems to have improved things, although I've only tested for about an hour. These options increase audio delays/buffer sizes, and reduces the sampling rate. It's pretty severe, so if it works start playing with the numbers to find a balance. Not sure which option is the main suspect yet.

resample-method = src-sinc-best-quality
default-sample-format = float32ne
enable-remixing = yes
default-sample-rate = 16000
deferred-volume-safety-margin-usec = 16000
default-fragments = 8
default-fragment-size-msec = 60
nice-level = -15

After saving, run pulseaudio --kill, pulseaudio --check and pulseaudio --start if no errors.

Update: Pretty sure the 16khz sampling frequency essentially removes the crackles with a low-pass filter. Ugly quality, but better than aching ears.

If you wanted to get permissions, it's very simple to become the root user. Simply open the terminal, type sudo su and enter the password to use to log in. Then you can change your pulseaudio settings.


Ubuntu on a SSD and everything else on a HDD So I am looking into the future on getting a new computer, one with a 1TB Hard Disk Drive for everything and a Solid State Drive STRICTLY for Ubuntu, I did some research and found out that you have to move each program every time you install it or another one.

I know that in Microsoft Windows you can put the OS on a Solid State Drive and everything else on a Hard Disk Drive (I believe the user files to). I am not aware what Ubuntu's "Programs File(x86)/Programs File x64" equivalent is since it... well does not seem to have one.

I use Steam with a library of 2 to 4 games, 10+ virtual Boxes, a bunch of different programs, including Wine. Wile keeping the Solid State Drive all to Ubuntu (since the OS is read-only, I figured this would work well on a Solid State Drive without wear and tear off the Drive.) So how would I set something like this up? Even for guest users and other users.

And how to install the OS properly to the computer to have the following confuration?

P.S. What do people call that when you have a Solid State Drive as your OS Drive and a Hard Disk Drive as your storage?

I have a SSD with with Sheerly Ubuntu and a 1TD HDD set up as a network share on my desko. I haven't had any issues with this setup so far.

The Equivalent to the Program files in Ubuntu is the /etc folder so you would need to format a disk with a mount point of /etc and the system would put that folder there to r/w from.

for you I would recommend putting your /home and /etc on an the separate drive. Also I don't think it's really called anything, You just DO that with your hard drives windows or linux. both user groups do it


Unable to install mysql with Can't read dir of '/etc/mysql/conf.d/' error I just installed the latest version of ubuntu on usb. First I run sudo apt update, then sudo apt install apache2. So far everything was fine. But when I run sudo apt install mysql-server I get this error:

Setting up mysql-server-5.7 (5.7.24-0ubuntu0.18.04.1) ... Renaming removed key_buffer and myisam-recover options (if present) ERROR:
Unable to start MySQL server: mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 13 - Permission denied) mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

I am lost here. I run sudo chmod -R 755 /etc/mysql/conf.d/ and it didnt help. What could be the reason for this, why it shows permission denied if I chmoded the dir?

The output of ls -lhd /etc/mysql/conf.d is drwxr-xr-x 2 root root 4.0K nov 10 20:55 /etc/mysql/conf.d

UPDATE
After restarting my laptop and running the sudo apt install mysql-server the permission error doesnt show up anymore, but now I get another errror

ubuntu@ubuntu:~$ journalctl -xe An error was encountered while opening
journal file or directory
/var/log/journal/d83633b7cd754897927e2a87e67fd985/system@7f9cc60cd768485c982d8183c054e0ba-0000000000000001-00057a56ce4251c4.journal,
ignoring file: Identifier removed
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the res
-- the configured Restart= setting for the unit. nov 10 22:24:49 ubuntu systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished shutting down. nov 10 22:24:49 ubuntu systemd[1]: mysql.service: Start request repeated too qui nov
10 22:24:49 ubuntu systemd[1]: mysql.service: Failed with result
'exit-code' nov 10 22:24:49 ubuntu systemd[1]: Failed to start MySQL
Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT. nov 10 22:24:54 ubuntu sudo[2810]: pam_unix(sudo:session): session closed for us lines 1129-1151/1151
(END)
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit. nov 10 22:24:49 ubuntu systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished shutting down. nov 10 22:24:49 ubuntu systemd[1]: mysql.service: Start request repeated too quickly.
nov 10 22:24:49 ubuntu systemd[1]: mysql.service: Failed with result
'exit-code'. nov 10 22:24:49 ubuntu systemd[1]: Failed to start MySQL
Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT. nov 10 22:24:54 ubuntu sudo[2810]: pam_unix(sudo:session): session closed for user root

After all I installed Ubuntu to hard drive instead running it from usb and after that everything went smoothly.

FWIW:

stop apparmor:

sudo /etc/init.d/apparmor stop
sudo /etc/init.d/apparmor teardown

create an empty file on /etc/apparmor.d/usr.sbin.mysqld

cleanup all dpkg packages and re-run the install.

When prompted with something like below make sure to select Y:

Configuration file '/etc/apparmor.d/usr.sbin.mysqld'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** usr.sbin.mysqld (Y/I/N/O/D/Z) [default=N] ? Y

(I was successful)


How to enable root password in Ubuntu 12.04 Whenever I use the sudo su command to work as root, it does not ask my root password. How can I make it prompt for root password?

Using sudo will never ask for the root password. It will only ever ask for your password. That's the whole point of how it works.

You can set the password for the root user, but sudo su will never ask for it.

Step 1: Open terminal
Step 2: Type passwd
Step 3: Set your Unix password e.g.(abcdefg)


Suddenly sudo gets error 'usr/bin/sudo must be owned by uid 0 Yesterday I was using my computer normally, but, today, when I turned it on, this problem suddenly appears.

I understand that there's quite a few things to do to try to fix this issue.

When I run the following command:

sudo apt-get update

sudo gets an error:

/usr/bin/sudo must be owned by uid 0 and have the setuid bit set

My question isn't about how to fix this, but how and why this happened?

Is it possible that you ran a recursive chmod command at the root level recently?  Accidentally or otherwise?  Resetting chmod to a standard value like 0755 will remove all setuid bits.

There are dozens of files on your filesystem that require special permissions to work correctly and for which a simple permission like 0755 or even 0777 won't work.

There isn't a reliable way to undo this without reinstalling, since this is a lossy operation: there's no way to revert each file to the permissions it was previously.

Its because of Permission issue.

 $ su
 Password: <type your user password>

Switch to root user and run the command

# pkexec chmod a=rx,u+ws /usr/bin/sudo

Then check it by typing from the user

$sudo -l

It works fine for me.


Getting Ubuntu on Bootloader after formatting I've been running Windows XP on a desktop machine (C:/) and installed Ubuntu 12.04 (D:/) and Windows bootloader was able to recognize Ubuntu when I turn on the computer.

Months later, I've formatted drive C:/, removed XP, and then installed Windows 7 but sadly, Ubuntu is not showing in the boot menu as it used to be presented:

  Windows 7

  Ubuntu

How to get it back on boot list?

NOTE: Please note that installing Ubuntu was done from inside Windows XP with wubi.exe

I am no expert on wubi but your best bet may be to install Ubuntu again. You may want to go for installing Ubuntu alongside Windows 7 it its own sets of partitions.

If you have files under previous Ubuntu installation inside the root.disk, you can copy them to the new /home after mounting the root.disk using these instructions: Can I mount a Wubi .disk image in a new Wubi installation?.

Another approach (This is untested. It may not work and you may lose all the data.) is to:

make a copy of root.disk and keep it in another location
Install Ubuntu using wubi again from Windows 7
Reboot to make sure the new wubi installation works
Reboot back to windows and replace the new root.disk with the copy of
the old root.disk with existing data
Reboot and verify the wubi installation works with the old wubi

If the old root.disk does not work under the new wubi installation:

Reboot to Windows 7, switch back to the new root.disk
Reboot to Ubuntu, mount the old root.disk and copy the data files to
the new installation.

First, wubi installations are problematic as root.disk files can get corrupted. Second, I have no idea what happens if you copy or move the root.disk files while booted to Windows, in terms of the ability of booting back to Ubuntu under wubi installation. Use extreme caution, if you want to try this. You may lose all the data in the Ubuntu wubi installation.

Hope this helps

If unsure do a complete raw reformat with a program Killdisk from the ultimate boot Cd - current version available 5.1.1.

www,Ultimatebootcd.com

www.ubcd4win.com


Damaged SD card (badly unmounted?) How to fix? First Off I'm using Ubuntu 12.04 on a laptop with a built in card reader.

I have a sandisk 8Gig micro sd card that came with my HTC Desire HD phone.

Unfortunately I had mounted it to a windows computer at work via a usb cable attached to the phone and didn't "safely remove hardware". This was not the first time I didn't "safely remove" it from windows and each time I accidentally did so, I had to restart my phone before the sd card was accessible again.

It must have worn out something though because now my phone won't recognize the card at all and when I put it into my laptop's card reader I get the following errors in /var/log/syslog

Apr  4 21:17:59 jesse-laptop kernel: [12665.532025] mmc0: error -110 whilst initialising SD card
Apr  4 21:18:00 jesse-laptop kernel: [12667.192024] mmc0: error -110 whilst initialising SD card
Apr  4 21:18:02 jesse-laptop kernel: [12668.860020] mmc0: error -110 whilst initialising SD card
Apr  4 21:18:04 jesse-laptop kernel: [12670.532020] mmc0: error -110 whilst initialising SD card

I have googled this message but can't find anywhere that explains what it means. All of the posts regarding similar errors that I found are about getting card readers to work, but my card reader works perfectly when I insert a different sd card.

Apr  4 21:26:35 jesse-laptop kernel: [13182.192121] mmc0: new SDHC card at address b368
Apr  4 21:26:35 jesse-laptop kernel: [13182.195849] mmcblk0: mmc0:b368       29.8 GiB
Apr  4 21:26:35 jesse-laptop kernel: [13182.197931]  mmcblk0: p1

So I know the problem is with the damaged card not the reader.

The problem seems to be with initializing the card because it doesn't appear under /dev/ anywhere I can find. When I insert a working SD card it appears as /dev/mmcblk0 & the partition is /dev/mmcblk0p1.

Needless to say I can't format the card or run any recovery software until I can get it to appear as a device.

Edit: - I have discovered by looking at my syslog relevant parts available here that when I first inserted my card the error was different to what it is now. I don't really understand any of these errors. I'm guessing the card was left in a state of anticipating a transfer (if that's possible) and it didn't receive it. Now it can't be initialized (whatever that actually means)

Any help regarding what this error means and/or how to recover data from my sd card is very much appreciated. Most of my important data was backed up but there was one note taking application (on my phone) that wasn't and I'd like very much to retrieve that data.

P.S. Both the working card and the damaged card are micro sd and I'm using a card adapter to insert them into my computer.

P.P.S. I've uploaded an annotated version of my /var/log/syslog with just the relevant parts here and also the full syslog here

It looks like the card has been damaged due to premature removal. The messages indicate either a controller failure in the card or bad blocks. The latter may be recoverable. Try this to recover:

Insert card
Unmount it with umount /dev/mmc0 (or with whatever the drive is mounted as)
fsck -v /dev/mmc0
mount it

If this doesn't help, you have to reformat with mkfs.
If the card is still unusable, the controller has probably been damaged in hardware beyond recovery.

Try using gparted to create a new partition table. Open gparted from the Dash or with gksu gparted in a terminal, then select your device, and go to Device -> New Partition Table.