Grub2 with BURG: duplicate Windows entries, how do I remove one? I have a dual boot system with Ubuntu 12.04 and Windows 7, using GRUB2 (with Burg) as boot loader.

For some reason, the Windows installation shows up twice in the boot menu:

Ubuntu GNU/Linux, with Linux 3.2.0-24-generic
Ubuntu GNU/Linux, with Linux 3.2.0-24-generic (recovery mode)
Windows 7 (loader) (on /dev/sda1)
Windows 7 (loader) (on /dev/sda2)

If I look in my partition table, /dev/sda2 is C:\ of the Windows installation, and /dev/sda1 is the "System Reserved" partition (which, IIRC, is Windows' own bootloader). Furthermore, gparted shows /dev/sda2 - but no other partitions - with a boot flag:

What is going on here? I'd like to have only the entries for Ubuntu and one entry for Windows in my boot menu - how do I remove one of them?

You are correct that Windows 7 puts it's "boot" partition on /dev/sda1 by default, but it is possible to get Win 7 to put the everything on its "root" partition too -- e.g. by installing to a pre-formatted NTFS partition.

Perhaps you have tweaked Windows in the past such that the bootloader/bootable flag went on /dev/sda2? Can you successfully boot from both Windows entries? If so, it's safe to delete one of them.

How to remove the entries

  Danger!

  This may make your Windows unbootable; to follow the steps below you'll have to insert sudo where appropriate and make sure the NTFS partition is mounted read-write beforehand.

cd /mnt/where-o-where-my-ntfs-be
rm -rf bootmgr Boot BOOTSECT.BAK Recovery
cd && umount /mnt/ntfs1
update-grub

That should do it - obviously I haven't tried on my dual-boot system(s). Please let me know if it doesn't work and I'll either give you more dangerous methods or maybe look in the grub source to see how it detects Windows partitions for a definitive answer.

sudo nano /boot/grub/grub.cfg
Then comment the second Windows entry (sda2), i.e., put a '#' from where the entry begins. It will remove the entry without affecting your files.
Same goes for burg as well.
Just replace grub with burg in the command.


USB 'boot error'; possibly bad files? So, while updating to the latest version of Ubuntu, the upgrade stopped halfway through and did not fully upgrade.  Due to this, my current version of ubuntu is unusable as i can only use the command line (the GUI will not pop up, wifi does not work, login in infinite loop.).

So, I am trying to reinstall Ubuntu back onto the computer by downloading the .iso from a Mac and then transferring using a USB.  This is bringing up a black screen with 'Boot Error',  and nothing else.

  I am using the iso file from http://releases.ubuntu.com/14.04/ and unetbootin for Mac.
Why is the startup not possible with this configuration?

Edit:
      I was looking at the files created by unetbootin and I noticed a program in it called 'setup.exe'.  Is it possible the boot fails because it needs Windows to run the file and I only have Ubuntu on the machine?

Use rufus https://rufus.akeo.ie/ and try installing from there


How can I remove window shadows in Unity? I tried turning the shadows off with CCSM, but it does not work ;/

System info:

Ubuntu 11.04 NN x64 desktop, HP ProBook 4520s, Unity

I think you have to choose a theme other than Ambiance or Radiance, because those override compiz's shadow settings.

If you really want to use the Ambiance borders without shadows:

Create a copy of Ambiance: cp -R /usr/share/themes/Ambiance ~/.themes
open ~/.themes/Ambiance/metacity-1/metacity-theme-1.xml and remove all of the <shadow> tags.
Open up appearance preferences and select your new, duplicate "Ambiance" theme.
Disable shadows in CCSM

Update  2015-01-21 In recent versions of Ubuntu you'll need to use Ubuntu Tweak Tool in step 3, since recent versions of the control center don't support custom themes.


How to disable mouse touchpad while typing on Dell XPS 13 (Ubuntu 16.04 LTS) I have a Dell XPS 13 9360 dual booted with Ubuntu LTS 16.04.

I was wondering how I could disable the mouse touchpad while I type. Any subtle touch to the touchpad completely throws off my typing. For example, the cursor shifts over to a random location and clicks, so then I start typing in the middle of a wrong sentence. I don’t experience this issue while I use Windows 10, however.

I’ve read on forums that this occurs because there are two touchpad drives installed or something. I tried a solution before, but when I changed the setting file, I was unable to boot Ubuntu and had to do a clean install. Since then, I’ve been a little more scared about changing files.

Are there any Dell XPS 13 9360 users out there that have figured this out?

Thanks.

To Disable Touchpad Goto ->
System Settings -> Mouse & Touchpad : in the Touchpad section switch from ON to OFF


Ubuntu 14.04 mouse not working but detected I have a Razer Imperator mouse that used to work just fine until yesterday.

lsusb, xinput and dmesg all correctly list the mouse, but yet it doesn't work.

Can anyone give some tips on how to debug this?

Ubuntu 14.04 with everything up to date.

I've been having this problem since I got Ubuntu, My mouse would work for like 30 minutes after each time i started the computer and even though the hardware was visible in lsusb the mouse wouldn't move and the lights on my razer imperator wouldn't light up.  I fixed the issue by removing another USB mouse out of my computer, its been almost 10 hours now and the mouse works fine.  The other mouse probably interfered.


Can not root: after removing ZSH and returning to default bash I can not $ sudo su everytime, I enter the command, the terminal says :

  can not execute /usr/bin/zsh no such file or directory

How to return to default bash of Ubuntu and make bash as default bash?

First remove the symlink and make a new symlink that makes the default to previous bash

sudo ln -sv /bin/bash /bin/sh

Exit the terminal, and start a new terminal.

Now, change root's shell. Edit the passwd file - Start any editor and search for zsh.

I used vim - $ sudo vim /etc/passwd

Searched /zsh. For me it was on the first line:

root:x:0:0:root:/root:/usr/bin/zsh

changed

root:x:0:0:root:/root:/bin/bash

Esc, :wq, Enter - This is for saving and exiting Vim.

For other editors like gedit and nano, just search for zsh, edit line, then save and exit.

Then exit Bash and restart your PC.


Ubuntu 14.04 LTS Freezing Randomly I have been using Ubuntu some few times on my computer. I installed it some weeks ago alongside windows 7 on a own hard drive. I installed the Nvidia drivers with this guide http://www.ubuntugeek.com/howto-install-nvidia-drivers-manually-on-ubuntu-10-04-lucid-lynx.html and did everything in it. After that everything seemed fine and I can play kerbal space program nicely without any kinds of graphical problems. I'm also using dual-screen (2 screens). But when I do stuff like surfing on internet or playing music. or surfing on web at my 2nd screen and playing kerbal space program on the main screen ubuntu freeze many times. When that happends my mouse can move around but is stuck at the screen it was on when it froze. I can hear sounds from the game like it is still going. I can go back to the terminal screen. Only solution is restarting my computer. But why does this happens? It is really annoying because this is happening allot. I have also use system monitor while playing (even before a freeze) and the RAM is FAR from overloaded and the processor is working at like 10-40% when it is crashing.

Specs:
AMD Athlon(tm) II X4 645 Processor 3.10 GHz
12 GB RAM
64 bit system (ubuntu 14.04 LTS 64 Bit)
Nvidia Gainward Geforce 550 Ti Graphics card

Switch to another tty by pressing Ctrl + Alt + F2, then type

sudo killall cinnamon


How to hide process arguments from other users? A while ago, I used to use the grsecurity kernel patches, which had an option to hide process arguments from other non-root users.  Basically this just made /proc/*/cmdline be mode 0600, and ps handles that properly by showing that the process exists but not its arguments.

This is kind of nice if someone on a multiuser machine is running say vi christmas-presents.txt, to use the canonical example.

Is there any supported way to do this in Ubuntu, other than by installing a new kernel?

(I'm familiar with the technique that lets individual programs alter their argv, but most programs don't do that and anyhow it is racy.  This stackoverflow user seems to be asking the same question, but actually just seems very confused.)

The only way to do this currently is to put each user in a separate container (see clone with CLONE_NEWPID and CLONE_NEWNS), and mounting a new /proc in the container. (lxc will do some of this for you.)

However, there are plans to be porting grsecurity features to the Ubuntu and upstream kernels. If you can, please sign up for something and help out.

You could stop them from accessing system monitor and top, by changing their permissions in the users and groups settings. I'm not certain this will be a complete solution but it should be sufficient to block this from most common users.


Mysql extension is missing in php7 installation. Ubuntu 16.04 I am having trouble enabling mysql in my php-config.

apt-get install php-mysql and apt-get install php7.0-mysql don't make a difference.

Also, the shared object is missing from the php extension directory.

Is there any way I could get the mysql.so?

On Ubuntu, I fixed this error by running

sudo apt-get install php-mysql

And then restarting my server (caddy, apache, nginx).

source

If I understand correctly, installing LAMP stack should fix your issue. Try this guide

https://www.unixmen.com/how-to-install-lamp-stack-on-ubuntu-16-04/


Can't Mount NTFS drive "The disk contains an unclean file system" I am getting an error when I try to access my NTFS drive from ubuntu.

Unable to access “My Drive”

Error mounting /dev/sda6 at /media/ubuntu/Media Center: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda6" "/media/rolindroy/Media Center"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda6': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option

Any help would be greatly appreciated!

If you can't access the drive, execute the following command:

sudo ntfsfix /dev/sdXY

where XY is the partition

e.g sda2 or sdb1

Then, mount with:

sudo mount -o rw /dev/sdXY

Log on to windows and then restart to Ubuntu. Works for me! But seriously I don't know whether there is a permanent solution to that.


Recover Deleted File I inadvertently deleted a directory containing several source code files.  I want them back.  I'm on a Linux Ubuntu machine.  The filesystem is NTSF.
I tried using TestDisk, but there are millions of deleted files in this partition.  TestDisk presents a curses interface which allows you to page through the deleted files.  But I can't search for the file I want.  I gave up after 15 minutes.  Is there another tool that allows me to undelete files without having to page through millions of file names?
I also looked at ddrescue, but that requires you to save the enture partition.  In my case that's 2 TB.  I don't have another 2TB of free space.

ntfsundelete did the trick
ntfsundelete did the trick


Wifi issues on Ubuntu 16.04LTS I have an HP Laptop (P6L84PA#ACJ) and have Ubuntu 16.04 LTS installed in it.

I cannot connect to my wifi network, it's always shown to be out of range, though my router is placed quite close. Even if it connects at times, it loses connection in a few minutes. Whereas there is no issue with my friend who uses Windows.

Is there a solution to this?

I am no  expert but I had a similar problem on my old laptop (Toshiba satellite). I found that I could connect to some net works but not others. All I did was reinstall, that seemed to work.

I have no idea if that will work but I recon it is worth a shot.

I had this problem and used the following:

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=1

and the signal improved.

Finally once the signal is strong

sudoedit /etc/modprobe.d/rtl8723be.conf

...you add this in the file and save it... and ready. Every time you reboot that configuration is applied.

options rtl8723be ant_sel=1


How to connect to WiFi from the command line? Other posts seems to be addressing more complicated network connection issues from the command line.

The Unity panel Network indicator/button doesn't respond too well sometimes - it keeps trying to connect to a network even when i click on "disconnect", stuff like that.

So I want to go command line for the control.  I don't like GUIs anyway.

Is there not some simple command line tool which can do something like the following?

wifi connect MyNetworkNameA
wifi disconnect
wifi connect MyNetworkNameB

I think you want to keep using managed interface (by NetworkManager). nmcli is a command‐line tool for controlling NetworkManager.

To see list of saved connections, use (<SavedWiFiConn>)

nmcli c

To see list of available WiFi hotspots (<WiFiSSID>)

nmcli d wifi list

or:

sudo iwlist <WifiInterface> scanning

To see list of interfaces (<WifiInterface>)

ifconfig -a

Just change <WifiInterface>, <WiFiSSID>, <WiFiPassword> in the following commands to reflect your setup. If WiFi info already saved, easier way using <SavedWiFiConn> name of connection as it was saved in NetworkManager.

Ubuntu 16.04

##disconnect
nmcli d disconnect <WifiInterface>

##connect
nmcli d connect <WifiInterface>

Another way:

##disconnect
nmcli c down <SavedWiFiConn>

##connect
nmcli c up <SavedWiFiConn>

Ubuntu 15.10 & previous

##disconnect
nmcli d disconnect iface <WifiInterface>

##connect
nmcli d wifi connect <WiFiSSID> password <WiFiPassword> iface <WifiInterface>

Another way:

##disconnect:
nmcli c down id <SavedWiFiConn>

##connect:
nmcli c up id <SavedWiFiConn>

If your password isn't automatically recognized type this:

nmcli -a c up <SavedWiFiConn>

Reference: man nmcli

If you want to connect to a network called PrettyFlyForAWiFi-5G

nmcli -a d wifi connect PrettyFlyForAWiFi-5G

-a (or --ask) means it will ask you for the password. The connection will be saved and should connect automatically if you restart your computer.

You could append password <your password> to the end (the literal word password followed by the actual password)

nmcli d wifi connect PrettyFlyForAWiFi-5G password 12345678

but maybe run unset HISTFILE beforehand, so that your WiFi password isn't saved to your ~/.bash_history file.

To see all the WiFi networks around you (--rescan yes is optional, the list of networks might be up to 30 seconds old without it)

nmcli d wifi list --rescan yes

which will output something like

IN-USE  SSID                         MODE   CHAN  RATE        SIGNAL  BARS  SECURITY
        PrettyFlyForAWiFi-5G         Infra  44    405 Mbit/s  59      ▂▄▆_  WPA2
        PrettyFlyForAWiFi            Infra  6     195 Mbit/s  41      ▂▄__  WPA1 WPA2

To forget a connection (that was saved after you ran nmcli -a d wifi connect <name>)

nmcli c delete PrettyFlyForAWiFi-5G

To see a list of all saved connections

nmcli c

You can use nmcli connection instead of nmcli c <whatever> and nmcli device instead of nmcli d

nmcli is the command line interface for NetworkManager (which is part of GNOME, Ubuntu's default desktop environment) and is already installed on Ubuntu.

Don't forget to set up your country code for using the perfect regulations:

sudo iw reg set <2 letter country code>

sudo nano /etc/default/crda


Remote Access to Owncloud Server I'm currently trying to setup my own own-cloud server, and I've got it fully installed, configured, and accessible from within my own local network. I cannot figure out how to access it from the outside. So far I've:

Successfully setup port-forwarding on my local router.

I've done so via 'single port forwarding' and 'port range forwarding'
Ports 80, 443, 3306 (Apache-Full and MySQL)

Successfully obtained my external IP address.

I've also tested this magic number from within the network at #insertIPhere/owncloud and it did work.

Successfully setup the server using SQLite
Successfully setup the server using MySQL
Created the following exceptions in my firewall:

Allow In Port 80   (Apache Full)
Allow In Port 443  (Apache Full)
Allow In Port 3306 (MySQL)

Tried connecting from several different remote networks, as to troubleshoot something on their end

As far as trying to access it, I'm doing so through Google-Chrome and Mozilla Firefox trying to reach the server through #insertIPhere/owncloud using the above public IP address.

So what have I missed, and how do I access my server from outside?

Thanks in advance for your help and time, and I apologize in advance for what will probably result in my noobish mistake in networking.

I've looked at the official documentation. And also this question here.

This sounds like everything is setup correctly and it should indeed work. Please check with your ISP if port 80 (http) is blocked.

Alternatively you can configure apache to use a different port (e.g. 1234) and then use the URL http://your.ip.he.re:1234/owncloud to try to reach the server.

If that's successful than your ISP is blocking port 80 (and potentially other ports too) and you'll need to use a port different from the blocked ones.

This is exactly the sort of usage scenario tools like PageKite were created for.  I agree with Vitalie, it would be quite insecure to consider exposing your internal ports for this.


How is Ubuntu different from Debian? Ubuntu is a derivative of Debian. It uses the same package format.

In what ways is Ubuntu different from Debian?

So maybe its crazy for me to answer this, having just joined Canonical 3 months ago (today!) and having only run Ubuntu out of curiosity for the few years before joining Canonical. It might even be silly for me to answer it, given that I am on the server team, and Ubuntu definitely has a very large focus on making "Linux for Humans", ergo, the desktop.

To me, the release cycle is everything. Yes there are some things that will never go back to Debian, because these things are somewhat counter to Debian's philosophies. But these are by-products of the greater goal of usability.

When Ubuntu was started, the idea was simple. Debian was awesome then, and is still awesome today. I ran it exclusively for several years and it served me well on laptops, desktops, and especially on servers, being a server kind of guy. But that release cycle was so slow that all of the cool whiz bang stuff that people were producing on Linux was just not making it into the stable releases, and the unstable development release that had all of these things was un-installable (no official isos) and broken quite often.

So by saying "we're going to limit our focus to a couple of architectures, and a subset of packages" (the "main" archive in Ubuntu), the Ubuntu project was able to commit to releasing a tested, stabilized OS with all of that cool new stuff in it. They were also able to commit to carrying a bit of a delta from Debian that was highly focused on usability. By committing capital investment to it, Canonical was able to commit to having the technical staff available to make that happen.

One awesome part of that was that they (I say they, because I am not an Ubuntu member yet) could still keep a lot of the wide breadth of Debian software by creating the "universe" archive. Even better, a community (MOTU) grew up around that to make sure it received some stabilization before release as well.

So, to sum it all up with an analogy.. Ubuntu is to Debian, as your local restaurant is to the local farmer's market. Chef Ubuntu goes to the Debian farmer's market periodically, finds the best fresh ingredients, mixes them with his own special blend, and produces food for his intended audience. For people who enjoy cooking, they can, and do, just go down to the market and get what they need.

Ubuntu is generally based on the "unstable" version (codename "sid") of Debian. They take Debian "unstable" every 6 months and stabilise it. Ubuntu and Debian packages are binary incompatible.


Lightweight local mail transfer agent I'd like to have a very lightweight and easy mail transfer agent on my server. The only purpose of this MTA is to buffer outgoing email messages locally and forward them to ISP's mail servers.

What options Ubuntu offers?

Criteria

Easy to configure for forwarding purposes
Simple - average user can understand how it works
Secure - outside traffic is disabled
No incoming email support needed

I have had various issues with sendmail and other complex solutions which are overkill for my modest needs.

postfix is what I'd use and it can accomplish what you're after but I'm not sure it checks all your criteria.

As far as simple goes, I'm not sure there's on MTA that's even slightly simple. Postfix isn't insanely hard to understand and you will get a nice installer to create the default configuration (that you can call again after installation from sudo dpkg-reconfigure postfix), but it's not something "just anybody" should be setting up.

Relaying email isn't hard but you can run into problems with some SASL issues if you don't install the right packages (libsasl2-2 libsasl2-modules ca-certificates).

Security is mainly a case of firewalling things so external people can't connect. Again, not hard. Either do it with your router or ufw on the server (sudo ufw deny smtp).

Basically, you all you need is Google on your side.

Well, the simplest and lightest would be the mail option built-in Opera Browser. You can use that browser for both browsing the web as well as mailbox.


Can't bring BIOS up now that I have Ubuntu installed (side-by-side with Windows Vista) I recently installed Ubuntu Desktop alongside Windows and I like Ubuntu so much, I want to reinstall it as the sole operating system on my laptop.  The dvd I burned won't boot up automatically so I'm trying to get into BIOS to make that happen, but I can't get the BIOS screen when I start the computer.  Instead, the screen that allows me to boot Windows or Ubuntu appears.  Tried hitting F8 but it doesn't present options for the dvd bootup.  Can anyone help me with this?  I'm computer-use literate but not highly technical.  Thx. :)

Some newer computers have a Boot menu as well as a BIOS setup menu.

For example, some computers use F2 for BIOS setup and F12 for Boot menu, which allows you to boot the computer from CD/DVD-ROM or USB drive instead of HDD.

Some older computers which don't have Boot menu, may use keys such as Delete or Esc as well to enter into BIOS menu.

You should consult your computer or motherboard manual to see which keys you should press at the very beginning of the boot process to have it displayed or try and find it by trial-and-error.

Or you might get more specific info from users of the same computer brand/model if you specify your computer (or motherboard) brand/model.

On modern computers, especially laptops, BIOS post is bypassed in order to boot faster. In order to access the BIOS settings, enter

sudo shutdown -H now

from a terminal window. When Ubuntu freezes, hold down the power button for at least 5 seconds. The BIOS settings should be accessible during the next power up.


Bluetooth speaker (Magicbox) not working on Ubuntu 14.04 My DKnight Magicbox bluetooth speaker is not working on Ubuntu. It pairs, then after I select it as my output in sound settings, and then click on "test sound" there is no output. The speaker also starts to do a weird clicking sound when it is paired. It works fine on my phone and Windows, just not on Ubuntu. Help is appreciated.

I got some results swithing off and then switching on the bt speaker with the audio panel open, I see that the bt speaker had wrong modes in the combo box before the off and on switch, after the mode A2DP appear in the modes combo box and selecting this value I can hear the sound from the speaker. The quality is not excellent but is working (may depends on speaker model... mine is very cheap)


Having trouble connecting through RDP to Ubuntu 14.04 LTS instance I've just completed a fresh install of Ubuntu 14.04 LTS onto my laptop. I installed XRDP and now i'm trying to connect to that instance from my windows 8.1 desktop machine using the MSTSC application that comes with windows...

This is my laptop running Ubuntu on Hyper-V

(http://i152.photobucket.com/albums/s174/aj_draknar/20140619_072510.jpg)

When i'm connected to instance through MSTSC, this is what it looks like on my desktop machine running windows 8.1...

(http://i152.photobucket.com/albums/s174/aj_draknar/20140619_072525.jpg)

I'm assuming that the instance of ubuntu isn't configured properly to support my desktop resolution... 1920x1080...

Any help would be most appreciated...

adTHANXvance

AJ

I have experienced the same issue and for the longest time I was unsuccessful getting my Ubuntu to work like my Hyper-V 2008 R2 RDP to Win7, Win8 worked.
In fact, I was so MS over the whole thing I never thought I'd get my Tablet using aRDP to connect with my RDP Services running on Server 2008 R2.

But, thanks to this post and several others I put together my simple guide to MS people going Ubuntu.

Required reading:
You probably also know that since the introduction of Unity Desktop Interface in Ubuntu you need to tweak the configuration in order to have it working. The most annoying part while using xrdp (with Ubuntu) is the fact that you have to install an alternate desktop environment.

Resource: Griffon's IT Library running what was suggested in Ubuntu 14.04 LTS xrdp grey screen

Loaded up Ubuntu 14.04 following the instructions from Griffon's IT Library then the magical line in terminal

sudo gedit

to open gedit in root edit mode

make the changes as suggested in the link Ubuntu 14.04 LTS xrdp grey screen and you now have something to work with.

THE FIX: edit /etc/xrdp/startwm.sh (as grahaml44 wrote)

#. /etc/X11/Xsession

. /usr/bin/startxfce4

Thanks grahaml44 for that fix.

Score one for those that know!

Now for Round two, I'm not done, we're finally getting things working. Let's push it to make 4 VM's in less that 20 minutes work remotely.
I have an addiction with my tablet to switch desktops very often while in the company of iPad users.

Using Griffon's IT Library once again (almost have an IT Crush) we find ourselves following yet other Ask Ubuntu members (Thanks again!!).

ubuntu 14.04 xrdp grey it was the post by "Nobody" and "abrasadera"

If you look at what Eric Gosh posted you'll see that the gnome-session just isn't going to work. I agree and my attempts which all failed confirm it.

So there you have it, two methods 100% Yes they work and verified by so many others and "Me".

What did you expect? Someone from Microsoft?

I've noticed you can create multiple sessions. I think I'm going to need a bigger server now.

Looks like you are facing empty desktop problem. You can try following (as from Blank desktop when logging in via xrdp )

cd /home/youruser
echo "gnome-session --session=ubuntu-2d" > .xsession
sudo /etc/init.d/xrdp restart


Unable to install the selected kernel Ubuntu 14.04 from local mirror We have setup ubuntu local mirror in our environment to do the ubuntu unattended installation, We have setup the local mirror from: http://archive.ubuntu.com/ubuntu/

Now we are facing the error: Unable to install the selected kernel, kindly check the attached image and assist me to rectify the issue.

Unable to install the selected kernel:

Are you specifying a proxy server while selecting the mirror? If yes, then use the proper format to specify it:

http://USERNAME:PASSWORD@PROXYIP:PROXYPORT

Make sure to add the

  http://

or the appropriate suffix in the beginning of the proxy address. For some reason if you miss this then you will get the error which you mentioned. This happened for me and this is the way I solve it.

Hope this helps.


Reinstall GRUB to partition? Recently my BCD corrupted, so I reinitialised it from a LiveUSB, and added my Ubuntu partition back to it. Unfortunately the kernel isn't loading, so I thought to reinstall GRUB. The results below show what happened when this was attempted.

Initial error was:

  "Failed to get canonical path of /cow"

mounting—including --bind of /dev stuff—the partition then chrooting in got over that error, but left me with a:

  "error: will not proceed with blocklists"

PS: Here is my boot-info log: http://www.pastebin.ca/3134305

Sometimes a total reorganization is the most easy solution, so I suggest :

Completely rebuild your disk layout and keep it as simple as possible.
You should place all boot loaders and operating systems on one disk.

Backup the partitions you want to keep (recommended : Clonezilla).
Create a new partition table on all disks (recommended : GParted).
Create new partitions and prepare them for restoration process.
Boot from Clonezilla live media again and restore the partitions.
Boot from Windows install media and rebuild Windows BCDstore.
Boot from ubuntu install media and reinstall the GRUB bootloader.

If you want Windows bootloader to be default turn around steps 5 and 6.
In this case you must install GRUB to the root partition of the ubuntu OS.

Then you can to use bcdedit to add the Linux partitions to the BCDstore.
Assuming you are having advanced knowledge I ommitted more details !

its seems your kernel is broken and needs repair here is your solution waiting for you  click me


Where is iscan-data_1.22.0-1_all.deb? I'm trying to set up the scanner driver for my Epson WF-3520 printer.  I started with

sudo dpkg -i iscan-network-nt_1.1.1-1_amd64.deb

after downloading that `.deb' file from the Epson website.  Unfortunately, this fails with an error:

Unpacking iscan-network-nt (from iscan-network-nt_1.1.1-1_amd64.deb) ...
dpkg: dependency problems prevent configuration of iscan-network-nt:
 iscan-network-nt depends on iscan (>= 2.29.3); however:
  Package iscan is not installed.

dpkg: error processing iscan-network-nt (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 iscan-network-nt

Based on previous discussions here and here, I need to start by installing `iscan-data_1.22.0-1_all.deb', but I can't find this.  Does it exist?

UPDATE:  Even after finding and installing iscan-data_1.22.0-1_all.deb, I get exactly the same error as listed above when I run sudo dpkg -i iscan-network-nt_1.1.1-1_amd64.deb.  This is turning into a different kind of question ... Follow the progress here!

old link to Epson page no more exists
new link here: http://support.epson.net/linux/en/iscan_c.html

According to the Epson FAQ you need to install the iscan and iscan_data packages from this Epson web page


Wireless and trackpad disabled in Ubuntu 13.04 after update Last week on Ubuntu 13.04, I ran a sudo apt-get dist-upgrade. Everything seemed fine until I rebooted. Suddenly, my trackpad stopped functioning, and I couldn't view available wireless networks anymore. I've run this command many times to update packages, and I have no idea how to go about diagnosing the problem. I also don't have access to a wired network to see if running another update fixes the issue. I do have a live USB but wouldn't know how to go about using it to resolve the problem.

Any help would be greatly appreciated!

Posting the solution I found for the sake of others:

I checked and could not find the device for either my trackpad or my wireless card, so I decided to try reinstalling the driver. I came across http://kuscsik.blogspot.com/2007/06/how-to-install-intel-4965-wireless.html which explained how to install the driver for my computer (Dell Inspiron 1720). I only had to run the one command sudo modprobe iwl4965, and my wifi immediately started working again. I ran sudo apt-get update and then sudo apt-get upgrade, rebooted, and then the trackpad worked perfectly as well.


How to monitor bandwidth usage per process? I am using Ubuntu 14.04. My internet connection is pretty slow (512 kbps). Sometimes I see that I have no software running which should download anything from the internet, but the system monitor still shows that some download is going on. So I think some hidden software are causing this. Is there a way I can monitor every software that is using internet?

You can use nethogs  tool to monitor all your traffic on an interface.

Install it using

sudo apt-get install nethogs

Now run it using

sudo nethogs <interface name>

For example

sudo nethogs wlan0

For more detail type man nethogs after installing.

There is a more modern alternative to ss by now :)

ss2(pyroute)


Some funny directories appeared in my home folder! I've recently installed Ubuntu Sever 12.04, and I've been having trouble with audio, and have been installing software to fix it.

However, after rebooting my computer in (a futile) attempt at getting volumeicon to work, I've found that my home directory has been populated with some directories that I am pretty sure I haven't created myself, and wasn't there when I freshly installed it. Namely, they are Desktop, Public, Videos, Documents, Music, Downloads, Pictures, and Templates.

How did these directories get there? Is it something I installed?

Those are part of the desktop installation. The desktop home looks like this:

Old image from the web. The www and node directories are extra in the image

Some extra information that might help pin point where it came from. The directories created are probably from

cat /etc/xdg/user-dirs.defaults

# Default settings for user directories
#
# The values are relative pathnames from the home directory and
# will be translated on a per-path-element basis into the users locale
DESKTOP=Desktop
DOWNLOAD=Downloads
TEMPLATES=Templates
PUBLICSHARE=Public
DOCUMENTS=Documents
MUSIC=Music
PICTURES=Pictures
VIDEOS=Videos
# Another alternative is:
#MUSIC=Documents/Music
#PICTURES=Documents/Pictures
#VIDEOS=Documents/Videos

More info on freedesktop.org

Unless you actually installed gnome desktop on that server (but I bet you'd remember that) you might have touched a package with xdg in the name.

Are these folders actually directly in the /home directory? or in /home/"Username" directory?  If they're under your /home/"Username" directory these are default folders that are installed with every distro.


How can I sync with an iPod Nano 6G? I'm having no luck at all with this iPod Nano.

I've tried the following software:

Banshee - The iPod shows up and files seem to be copied, but they don't show up on the iPod.
Rhythmbox - Same as Banshee. Claims to sync but no files available on the iPod
gPodder - At first it wouldn't even recognize the device even though I set the mount point and device type. After syncing one file to the iPod from iTunes on my mac it now behaves as Banshee and Rythmbox.
gtkpod - Again: Copies the files but they are inacessible on the iPod.
Hipo - Doesn't even recognize the iPod
Amarok - What is this, I don't even...

So to summarize: After some fiddling I can get most of these apps to recognize the iPod and copy files to it, but they are not accessible on the iPod which sort of defeats the whole purpose.

Help me out here. My continued harmonic love life depends on it. (Yes, it's the girlfriends iPod and laptop)

Apparently Apple borked linux support with Nano 6g, and it's proven difficult to hack the music database to allow access to non-iTunes apps.

https://bugzilla.gnome.org/show_bug.cgi?id=631006

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

GTKPod

gtkpod provides a graphical user interface that enables users of Linux and other Unix operating systems to transfer audio files onto their iPod Classic, iPod Nano, iPod Shuffle, iPod Photo, or iPod Mini music players. Although it does not support some of the more advanced features of iTunes, gtkpod still performs the role of an iPod manager for Linux. Album art and videos are now supported, and preliminary support for jailbroken iPhones and iPod Touches is available.

Its available to install from the Ubuntu Software Centre


I have Ubuntu and Windows 10 installed on 2 different drives. How do I remove Ubuntu? I found an old SSD and decided to use it for Ubuntu on my desktop where I only had Windows 10. I installed it and everything worked fine (dual booting, that is). Turns out that the reason the SSD was lying around was because it was broken.

So I figured that I would just remove the SSD and proceed with only Windows 10 but when I remove the SSD, I can't boot at all. I get into some sort of grub rescue environment.

As they were on different hard drives, I don't understand how I could mess up the Windows 10 SSD mbr?

Any suggestions for how to get out of this?

tl;dr Ubuntu on one SSD, Windows 10 on one SSD. I want to physically remove the Ubuntu SSD and only run W10. How?

I'm sure because ubuntu overwrites windows boot manager.

Partition or disk is the same thing, you must introduce a windows 10 CD / USB and boot it.

You can download the .iso here

https://www.microsoft.com/en-us/software-download/windows10ISO

Burn it on a CD/DVD or use rufus for a USB

Once you booted the windows disk/usb go to repair option, select advanced options and then command prompt and type this

bootrec /fixboot
bootrec /fixmbr
bootrec /rebuildbcd
exit

Reboot and it will run windows, if you want to erase the ssd just go to windows partition manager and erase all the ssd.


Nginx installation error in Ubuntu 16.04 :~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full*

Reading package lists... Done
Building dependency tree
Reading state information... Done

After this operation, 5,579 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB]
Fetched 3,789 kB in 33s (112 kB/s)
Selecting previously unselected package nginx-common.
(Reading database ... 189767 files and directories currently installed.)
Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ...
Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ...
Selecting previously unselected package nginx-full.
Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ...
Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ...
Selecting previously unselected package nginx-full-dbg.
Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ...
Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ...
Processing triggers for ufw (0.35-0ubuntu1) ...
Rules updated for profile 'Apache Full'
Rules updated for profile 'Nginx HTTP'

Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ...
Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ...
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

invoke-rc.d: initscript nginx, action "start" failed.

dpkg: error processing package nginx-full (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx-full-dbg:
 nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however:
  Package nginx-full is not configured yet.

dpkg: error processing package nginx-full-dbg (--configure):

 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

                          Errors were encountered while processing:
 nginx-full

 nginx-full-dbg

E: Sub-process /usr/bin/dpkg returned an error code (1)

Shutting down apache2 first before installing nginx should fix this problem:

sudo service apache2 stop

I see you want to reinstall Nginx, but we can have the same error when we have Nginx run in Docker container.

In this case, just look at started containers:

user@host:~$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED
STATUS              PORTS                                      NAMES
f4ee2264d5fb        docker_nginx        "nginx -g 'daemon of…"   5 months ago        Up 2 days           0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   nginx

Just stop it with CONTAINER ID

docker stop f4ee2264d5fb

Then you are able to install Nginx


My wireless (USB Dongle) headphones are not detected [ubuntu 20.04] My wireless headphones that use a USB dongle are not showed as audio devices in the settings
The system logs show them being connected, but I can't use them as there is no setting anywhere showing them.
The problem isn't I can't hear with them, it's that it's impossible for me to use them because the system doesn't let me chose them as an audio device.
Any possible solutions?
They are using a USB dongle that came in the box, nothing special.

Have you tried alsamixer?
Open up Terminal, then type alsamixer and press Enter.
You will get an odd sort of panel with all your output and input devices listed across the bottom, and a vertical display of the sound levels.
Left and right arrows pan through the list of sound devices, and up and down arrows increase or decrease the sound levels.
When you're dome making adjustments, just press Esc (the escape key) to exit.
Also read this: https://en.wikipedia.org/wiki/Alsamixer

I have succeeded with very much the same problem, my speakers not appearing in Sound settings. I've tried every option I have found, but a mix and match worked for me.
I went to https://techwiser.com/fix-bluetooth-device-doesnt-auto-connect-in-linux/ and followed the first two points, having tried all before, to ensure they were auto enabled and trusted.

Edit the file /etc/bluetooth/main.conf and add the line
AutoEnable=true

Get the MAC address of the device from Bluetooth Settings and use bluetoothctl to trust the device with this command (replacing XX... with the actual MAC address:
bluetoothctl trust XX:XX:XX:XX:XX:XX:XX

I then tried Bluetooth speaker connected but not listed in sound output
I followed the top answer, which I had followed before, but having auto enabled and trusted, it worked.
I'm no expert just thought it is worth a try, Good Luck Noah.


Pinta selection cropping I've just installed Pinta to basically crop a screenshot (why doesn't Ubuntu come with a simple image editing tool?!) but for the life of me cannot work out how to crop an image to a selection properly.  What I'm doing is using the rectangle selection tool, selecting the area I want to crop to then pressing 'Crop to Selection'.

The image crops, but it's not cropped the selection I made.  If I make the selection quite small, Pinta throws an exception.

Am I doing this simple task wrong?  Or is this a bug?

I had the same problem. Upgrading Pinta to a newer version today solved it for me.

sudo apt-get update
sudo apt-get install pinta


How to install Zulucrypt in Ubuntu! Hi everybody, I want to know how to install Zulucrypt in Ubuntu 14.04?

Add the PPA ppa:hda-me/zulucrypt via

sudo apt-add-repository ppa:hda-me/zulucrypt
sudo apt-get update

and install

sudo apt-get install zulucrypt-cli zulucrypt-gui

for the GUI and the CLI version.

There seems to be a PPA for this:

https://launchpad.net/~hda-me/+archive/ubuntu/zulucrypt


No sound alerts for system events I have installed Ubuntu 11.10 on my Inspiron N5030.
Initially there were login sounds and all. But after some updates and software installation, now I'm not getting any alert sounds. However I get sounds when logged in as guest. I don't know which update worked wrong.
I tried almost all solutions that provided in earlier posts...
 Please help me to solve it...

I have a fairly recent clean install of 11.10 with Gnome. One thing I've noticed with new installs is that the alert volume (separate from the normal volume) in system settings => sounds => sound effects seems to be set to minimum by default.  This caused Skype sounds to not work.

I raise this, and Skype works correctly.  the alert sounds all work correctly if I click on them in the sound dialog box.  However, if a question alert pops up, such as one asking me if I want to save a file, there is no sound.

I discovered that it is not a sound problem at all; I discovered this by going into the system settings => universal access => hearing tab, and trying to enable "visual alerts".  I tried this, and pressed the "Test flash" button, and nothing happened.  So, the event is not being fired, it seems.

Then, I discovered that it is a Compiz problem.  Changing to Metacity (running metacity --replace) makes it all work as expected.  Changing back to Compiz (compiz --replace) makes it stop working again.

The results can be seen either in the Universal Access settings when pressing the test button, or in a terminal by typing echo -e "\a", which should make the chosen alert sound.

using ubuntu 12.04, i installed ubuntu-tweak and on the Tweaks tab, enter the sound section and then enable Event sounds and choose a Sound theme (default "ubuntu").


Nautilus in Gnome 3.8 doesn't remember any view settings Since I changed from Unity to Gnome 3.8, nautilus has not remembered any view options:

Every time I launch nautilus, hidden files are displayed
Nautilus doesn't remember view settings for any folders (e.g. I change to sort by date modified, descending, in ~/Downloads, but next time I start nautilus it has forgotten).

Any ideas what could be causing this?

Thanks.

I realize that When using Nautilus (Fedora 19 - Gnome 3.8) an icon named "Files" appears in the top left of the screen (not in the window of Nautilus itself). Right click in the icon and choose "Preferences". After changing the settings we should close and restart Nautilus to see the results.


Can't install Apache 2.2.22 on Ubuntu 13.10 My work environment requires Apache 2.2.22 instead of the latest version of 2.4.  My machine is currently running Ubuntu 13.10.  When I use Synaptic or apt-get it will not allow me to choose an older version of Apache than 2.4.

So my question is, how can I force an install of Apache 2.2.22 on Ubuntu 13.10 using Synaptic or apt-get.  When I do try to specify the version I get the following:

sudo apt-get install apache2=2.2.22-1ubuntu1
[sudo] password for b18c1:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
apache2 : Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1) but it is not going to installed or
apache2-mpm-prefork (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-event (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-itk (= 2.2.22-1ubuntu1) but it is not going to be installed
Depends: apache2.2-common (= 2.2.22-1ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Apache 2.2 isn't available in the Saucy repositories. You should either work with it or downgrade to Precise Pangolin (Ubuntu 12.04).

If you force it, it makes yourself vulnerable to all sort of quirks and problems that can be in the future.

http://packages.ubuntu.com/precise/apache2

http://packages.ubuntu.com/saucy/apache2

As root:

# 13.04 = precise, 13.10 = saucy
cat /etc/apt/sources.list | sed 's/precise/saucy/g' > /tmp/1304-sources
echo -e "\n\n\n#\n# Following are precise (13.04) source list\n#\n" >> /etc/apt/sources.list
cat /tmp/1304-sources >> /etc/apt/sources.list
apt-get update
apt-cache policy apache2

Now using synaptic package manger you need to install apache forcing version from 'precise' and after that lock version (see menu package -> lock version and force version). It's not so easy as synaptic seems to have problems, but it's doable. I had to close and open symantec sometimes especially to install some additional libraries.


Problem with sudo apt-get update on Ubuntu 14.04 virtual machine My problem began when I was tried to install the mmtsb (multiscale modelling toolset for structural biology) on an Ubuntu 14.04 Virtual Machine on a Windows Host.

I tried giving the ./install.sh command. But this was the error which propped up:

bash: ./install.sh: /bin/csh: bad interpreter: No such file or directory

To resolve this I tried the following command:

sudo apt-get install csh

This in turn gave the following error:

Unable to locate package csh

I tried next to update the packages using:

sudo apt-get update

This in turn gave my the following error:

Err http://security.ubuntu.com trusty-security InRelease
Err http://security.ubuntu.com trusty-security Release.gpg
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) [IP: 2001:67c:1562::19 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

What do I do now ?

I didn't understand your problem but you may try this. By this may be you able to install packages using apt-get.

https://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages/35096935#35096935


How To Replicate 2 Ubuntu Server? I want to replicate 2 Ubuntu Server . So if i change settings on one server it will replicate to other .
The Server Will be Running Zpanel ( mysql , bind , apache , postfix , etc ) ..

Updated
The server 2 is exact the same copy of Server 1 . Basically after installing & updating server 1 i have made clone of server 1 . I am using Vmware Workstation for testing .
Update
if i update DB or something like update in /var/www/ on 1st server it automatically update on 2nd server ....... what i really want is ... i have 2 servers ..that will be Web hosting Servers ( Zpanel) i want Replication on 2 identical server if one is down 2nd one will be up as it an replica of 1st

What is Web server replication?
Replicating a web server machine is
the process of synchronizing two or more machines, so that they each
have the exact same files, at any given point in time.
Benefits of Web server replication
There are two primary benefits to web server replication:

High availability
Performance during high load times

Rsync
Rsync is a Linux shell utility that supports efficient copying of data
between two servers.
Unlike "normal copy" - Rsync only copies differential data (what just
got changed, instead of all the files). Another benefit of Rsync is
that it copies over SSH - so data is encrypted across the channel.
Rsync is one of the most popular methods to replicate web servers.
It's reliable, easy to setup and fast.
This guide,  will walk you through the process of using Rsync to
replicate two web server machines.
Below are the needed setup steps

Install RSync
Select folder(s) to replicate
Create Rsync server config file
Installing & Running Rsync server
Fetching changes with the Rsync client
Setting Rsync client as a cronjob 1

Read More
1Source: SPI

You could use rsync. Keep 2 servers in sync with rsync and ssh


How can I allow SSH password authentication from only certain IP addresses? I'd like to allow SSH password authentication from only a certain subnet. I see the option to disallow it globally in /etc/ssh/sshd_config:

# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes

Is there a way to apply this configuration to a select range of IP addresses?

Use a Match block at the end of /etc/ssh/sshd_config:

# Global settings
…
PasswordAuthentication no
…

# Settings that override the global settings for matching IP addresses only
Match address 192.0.2.0/24
    PasswordAuthentication yes

Then tell the sshd service to reload its configuration:

service ssh reload

you can add:

AllowUsers user1@192.168.*.*, user2@192.168.*.*

this changes default behaviour, really deny all other users from all hosts.
Match block available on OpenSsh version 5.1 and above.


Unable to find expected entry 'restricted/source/Sources' in Release file I am unable to view any screen in my ubuntu, Also, when i do apt-get update.

I get below errors :-

Failed to download repository information.
Check your internet connection

Details

W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file),
E:Some index files failed to download. They have been ignored , or old ones used instead.

How can i solve the issue.

Please try,

echo "deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse | sudo tee /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu trusty-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list"
echo "deb http://archive.ubuntu.com/ubuntu trusty-security main universe restricted multiverse"  | sudo tee -a /etc/apt/sources.list"
echo "deb http://archive.ubuntu.com/ubuntu trusty-backports main universe restricted multiverse"  | sudo tee -a /etc/apt/sources.list"
sudo apt-get update
sudo apt-get upgrade

The first lines will reset your repository. Then the update might work.


Error_log file size from Var/Log/Cups/ is increasing so much (70GB+) Error_log file size from Var/Log/Cups/ is increasing so much (70GB+) and wont stop until i get the error saying i don't have enough space left.

***Error_log***

W [08/Jun/2017:18:59:48 +0530] Notifier for subscription 3 (dbus://) went away, retrying!

E [08/Jun/2017:18:59:48 +0530] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions

These 2 errors are written constantly to the Error_Log. I think about 50 Megabytes/sec. Making system lag

Try this:

sudo service cups stop
sudo rm /etc/cups/subscriptions.conf*
sudo rm -r /var/cache/cups
sudo service cups start


What is the "t" letter in the output of "ls -ld /tmp"? When running the command ls -ld /tmp, the output would be:

drwxrwxrwt 30 root root 20480 Mar 11 14:17 /tmp

So I have two main questions:

What is the letter t after the permissions?
As far as I know /tmp is used to create temporary files related to
different users in the system, so how come it has permission rwxrwxrwx (777)?

This seems wrong for me. Please I need your help to understand what is going here.

So what is the sticky bit?

A sticky bit is a permission bit that is set on a directory that allows only the owner of the file within that directory, the owner of the directory or the root user to delete or rename the file. No other user has the needed privileges to delete the file created by some other user.

This is a security measure to avoid deletion of critical folders and their content (sub-directories and files), though other users have full permissions.

Why does /tmp have the t sticky bit?

The /tmp directory can be used by different Linux users to create temporary files. Now, what if an user deletes/rename a file created by some other user in this directory?

Well, to avoid these kind of issues, the concept of sticky bit is used. So for that a 777 is given but preserving the sticky bit is not a bad idea.

How can I setup the sticky bit for a directory?

I'll set a sticky bit on a directory called test on my Desktop.

Symbolic way (t represents the sticky bit):

chmod o+t ~/Desktop/test

or

chmod +t ~/Desktop/test

Numerical/octal way (1, sticky bit bit as value 1 in the first position)

chmod 1757 ~/Desktop/test

Now let us test the results:

ls -li ~/Desktop/test

1551793 drwxrwxrwt 45 hadi hadi 20485 Mar 11 14:35 ~/Desktop/test

To delete/Remove a sticky bit

chmod o-t ~/Desktop/test

Now let us test the results:

ls -li ~/Desktop/test

1551793 drwxrwxrwx 45 hadi hadi 20485 Mar 11 14:35 ~/Desktop/test

Source: “What is a sticky Bit and how to set it in Linux?” at The Linux Juggernaut

A stickybit is a workaround method for shared directories not to be deleted accidentally. When a directory has a stickybit then only the owner or the root can delete it even that every user can take the full other permissions.

/tmp is the most shared directory between processes and users and for that it contains the stickybit to ensure that no user can delete the directory, even that the permission is 777 , and it must be so to give the ability to the users and processes to use the directory without conflict in permissions.


How do I install the latest version of Git with apt? I read about a security flaw in Git, which was fixed in version 2.2.1. I currently have Git 2.1.0 on my system (Ubuntu 14.10), and tried to reinstall it with apt. However, apt told me that I currently have the latest version.

The Git website does not have prebuilt versions for Linux. They say that you can install it with package managers. Without building from source, how would I install the latest version of Git?

Use the PPA from the maintainers of git on Ubuntu:
sudo apt-add-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

If you don't know what PPAs are, first read What are PPAs and how do I use them?
If you receive an error about add-apt-repository command not found you  need to install software-properties-common, and then redo the above steps.
sudo apt-get install software-properties-common

This what i did to upgrade git 1.7.9.5 to 2.xxx on Ubuntu 12.04:

sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
git --version


How do I create an shortcut to a folder(not a symlink) in Ubuntu 18.04 like shortcuts in windows I need to create a shortcut to a folder in Ubuntu 18.04 like I did it windows.
I don't like symlinks for a navigation patterns I have used in windows. Symlink is not the best solution for me just because it works differently. Symlink brings a folder content to another folder, while shortcut helps me to navigate to the source folder.

Let's say I've got a folder with many projects. The one project is a major one which is 80% time spending. I'd like to create a shortcut to it so I can quickly navigate to that project. It might happen on rare occasion I need to navigate to another project then in windows I used to open the main project using that shortcut, THEN I GO ONE LEVEL UP AND SELECT ANOTHER PROJECT. This is not possible with symlinks. Because if I go up after I opened symlink I will be in a wrong place.

With shortcuts I don't need to have that many shortcuts as with symlinks. If I only have symlinks then I need to create at least 2 symlinks where in windows I would have just 1 shortcut.

Keyboard shortcut is not the same. The reson is that I normally create a folder called Links in which I have approximately 10 folder shortcuts. Remembering 10 keyboard shortcuts doesn't look like a great idea.

Creating a .desktop file also seems would not work as I believe it would work for 1 folder.

This way of working is not strongly supported in Ubuntu. Still, you can create a launcher to open a folder by creating a .desktop file.

[Desktop Entry]
Name=Publications folder
Comment=Go to publications
Exec=xdg-open /home/user/Documents/Project
Terminal=false
Icon=
Type=Application

Replace the folder path and name after "xdg-open" with the actual path and name of your folder. You can supply an icon after "Icon="

Make the .desktop file executable (right-click the file, select "Properties", on the "Permissions" tab, check "Allow executing file as program")

You can now

Place the file on your desktop
Place the file in a hidden folder .local/share/applications in your home folder. Then, this item will show up in your applications. You can therefore quickly launch it as any other program.
You can pin the icon to the dash for even quicker access.

Another possibility for quick access to that folder is to pin it as a bookmark in "Files". Highlight the folder in "Files" and drag it on the left bar. Drop it where it says "New bookmark". Shorter, go into the folder you want to bookmark, and press Ctrl+d.

A Link-type desktop file
is a good fit for your use-case,
since these navigate to the absolute path give by the URL,
unlike symbolic links which, as you pointed out, navigate relative to their parent directory,
not the parent directory of the target.
For example, if you want to link to /home/my-username/Documents/my-projects/project-1/,
use a desktop file like this:
[Desktop Entry]
Name=project-1
Type=Link
URL=file:///home/my-username/Documents/my-projects/project-1/
Icon=folder

A good name for this would be project-1.desktop,
but anything ending in .desktop is fine.
Double-clicking on this desktop file will open the folder
/home/my-username/Documents/my-projects/project-1/

and from there you can navigate to the parent directory
/home/my-username/Documents/my-projects/

as desired.
Note that the URL must be a file:// URL,
which requires an absolute file path and
proper percent encoding of characters
such as spaces and parentheses.
Some file managers have this linking built-in and can
assist you in generating these files
if you encounter difficulty doing it by hand.
Related:

Make link open target file, not file at link location

Is it possible to create a 'shortcut link' instead of 'symbolic link' to a folder?

restoring .desktop shortcut functionality broken by 18 > 20 upgrade

https://unix.stackexchange.com/questions/310618/is-it-possible-to-create-a-soft-link-on-my-desktop-which-opens-with-the-target-p


Crontab command does not function properly I have the following crontab entry to automate copying of my files to separate W/S in the network.  However, it does not copy the files but produce the log file.  here is the file contents

#! /bin/bash
echo "Rsync - MA Inbound Files"
rsync -rvu /media/hdd2/MA-Inbound /media/miracle/
echo "Completed MA Inbound Files Sync, Starting Tally.ERP 9 Data File Sync"

rsync -rvu /media/hdd2/Tally.ERP9 /media/miracle/
echo "Completd Tally.ERP9 Data File Sync, Starting 2011 Accounts Files Sync"

rsync -rvu /media/hdd2/"2011 Accounts" /media/miracle/
echo "Completd 2011 Accounts Files Sync, Starting 2012 Accounts Files Sync"

rsync -rvu /media/hdd2/"2012 Accounts" /media/miracle/
echo "Completd 2012 Accounts Files Sync, Starting 2012 Files Sync"

rsync -rvu /media/hdd2/"2012 Files" /media/miracle/
echo "Completd 2012 Files Sync, Starting 2013 Accounts Files Sync"

rsync -rvu /media/hdd2/"2013 Accounts" /media/miracle/
echo "Completd 2013 Accounts, Starting Admin Files Sync"

rsync -rvu /media/hdd2/"Admin" /media/miracle/
echo "Completd Admin Files Sync, Starting MA_Staff Data File Sync"

rsync -rvu /media/hdd2/MA_Staff /media/miracle/
echo "Completd MA_Staff Data File Sync, Starting MA-Outbound Data File Sync"

rsync -rvu /media/hdd2/MA_Outbound /media/miracle/
echo "Completd MA-Outbound Data File Sync, Starting Staff Pic Data File Sync"

rsync -rvu /media/hdd2/"Staff Pic" /media/miracle/
echo "Completd Staff Pic Data File Sync, End OF Syn"

here is the command which I have put in the crontab file

30 22 * * * /Desktop/marsync.sh >AutoRsyncLogfile.txt

When I copy these commands individually, it works flawlessly

Hope some one can help me out wit this.....

Thank you

You don't state what the log file contains; I assume it's empty.

If that's the case, it looks like your problem is due to the path used in the crontab file:

30 22 * * * /Desktop/marsync.sh >AutoRsyncLogfile.txt

The /Desktop part is probably incorrect; the Desktop directory is usually in your home directory (ie, /home/<username>), and can be referenced by the $HOME environment variable.. If you change this to something like:

30 22 * * * $HOME/Desktop/marsync.sh >AutoRsyncLogfile.txt

- then this should work. You'll also need to ensure that the marsync.sh file is executable:

chmod a+x $HOME/Desktop/marsync.sh

Also, you might want to capture standard error (in addition to standard output) to your log file. Use &> to do this:

30 22 * * * $HOME/Desktop/marsync.sh &>AutoRsyncLogfile.txt

You have to call all commands including path : /usr/bin/rsync , or specify path in the script:
look here


How to create partition from running onepartition? Hello i am new in ubuntu.
While setuping ubuntu i pressed replace windows 8 and it did.
But the problem is it also deleted other partition.
Now is there any way to slice my one partition into 2 pieces? I have 320GB HDD so i want to use 50GB for ubuntu and others for file storage.
And is there anyway to recover the datas that got deleted during installation?

I will be glad if somebody help me out

You can resize easily the partition with the ubuntu live cd.

You just select Try without installing then you run the tool gparted and resize your partition to which size you want.
Then you can make another partition with the free space.

To recover data lost during installation I don't know any tool.


How to Disable Ubuntu Phone "auto dim" function? Is there a way to disable the auto dim function of the Ubuntu Phone (14.10 r22)?
Even though I can disable the auto-brightness function and set the screen timeout to 10 minutes (or never) the screen of my phone is dimmed after a minute of inactivity - meaning NO TOUCH of the screen... This is annoying when watching youtube.

Preparation: If you haven't done so already, install the Terminal app.

In the Terminal write:

$ dconf write /com/ubuntu/touch/system/dim-timeout "@u 0"

The dim-timeout Key wants an unsigned int as a value. That's what the @u is for. The number stands for the seconds after the screen is dimmed (0 = infinite).

(Since the setting is stored for the local user (phablet), it's not nessecary to make the root file system writeable.)

(Tested on the Ubuntu tablet, with Ubuntu Touch 15.04.)

The auto dim is controlled by the donf key /com/ubuntu/touch/system/dim-timeout. You can set the timeout to 0 (= infinite) by executing this command in a terminal:

$ dconf write /com/ubuntu/touch/system/dim-timeout 0

The dconf database for the default user phablet is used for brightness control, not the root database, so do you should execute the command as phablet.

The above should work, but I had to remount the root file system writable and play with the brightness in the system settings app until it worked, but I don't know why or what happened exactly. Remounting the root file system writable is done (as root).

# remount -o remount,rw /

You can lock it against writing again by rebooting. Try this anyway, to see if the fix stuck.


Is there anything that allows me to smoothly zoom in with a trackpad I've googled to hell and back about this and I cannot find any information.

Is there

A browser
An Extension
Any program

That allows me to smoothly zoom a Webpage with a pinching gesture on my trackpad? My laptop supports multitouch and I have a bunch of programs that emulate most touchpad gestures, I just can't believe there wouldn't be a single way to get a smooth zoom pinch on Ubuntu.

I'm not looking to bind ctrl++ to a pinch gesture on my trackpad to be completely clear.

Can anyone help?

If you use Firefox (recommended) which comes pre-installed with Ubuntu and its the default browser, I class it as the native browser as I have never used anything else on Ubuntu, the latest and fastest version (atow) is Firefox Quantum v70 and if you add the following extension this gives you the ability to zoom smoothly using the trackpad and I think this is exactly what you need:)

https://addons.mozilla.org/en-US/firefox/addon/multi-touch-zoom/

Alternatively you can zoom using the keys on the keyboard or the mouse and the advantage of these is they work with all applications and do not require any additional apps or plug-ins .  I myself don't like using the trackpad at all and if I want to zoom I use either the keys CTR plus "+" and CTR plus "-" to zoom in and out, or alternatively I have a wireless mouse in which case I can zoom using the middle-mouse button while pressing and holding CTRL.

[edited] Removed this alternative as I realised it was in fact the other answer.

You can hold Ctrl and move two fingers up or down to zoom out or zoom in.


How to get latest version of acrobat reader (not acrobat reader 9) I am using acrobat reader 9 and I notice that this version is from 2013! I am wondering how I can get the LATEST version of acrobat reader in Ubuntu 20.04

You have already know about native 9.5.5 which is old.
The other option is to install Acrobat Reader using Wine. Also we know that it fails to access files from /tmp while using acrordrdc snap package.
So we need to install it manually using Wine and PlayOnLinux. Below is how:

Install PlayOnLinux
sudo apt-get install playonlinux

Launch PlayOnLinux

Click Install, enter acrobat into the search field

Select Adobe Acrobat Reader DC for installation

Proceed with one of the following:

download Acrobat Reader DC 2020 standalone installer from https://get.adobe.com/ru/reader/enterprise/ to get file named AcroRdrDC2000920063_en_US.exe and choose it on the corresponding step of wizard;
allow wizard to download Acrobat Reader DC 2015 by itself

Wait wizard to finish.

To get all fonts and remove visual artifacts save the code below to some file - for example ~/Downloads/acrordrc2020.pol with contents below
#!/usr/bin/env playonlinux-bash

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Adobe Acrobat Reader DC"
PREFIX="AdobeAcrobatReaderDC"
WINEVERSION="4.0.3"
EDITOR="Adobe Systems Inc."
GAME_URL="https://acrobat.adobe.com/us/en/products/pdf-reader.html"
AUTHOR="Martins Bruvelis, N0rbert (to support ARDC 2020)"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# select prefix
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"

# setup prefix
POL_Wine_InstallFonts
POL_Call POL_Install_atmlib
POL_Call POL_Install_corefonts
#POL_Call POL_Install_allfonts
POL_Call POL_Install_wsh57
POL_Call POL_Install_mspatcha
POL_Call POL_Install_riched30
POL_Call POL_Install_riched20
POL_Call POL_Install_gdiplus
POL_Call POL_Install_FontsSmoothRGB
POL_Call POL_Install_d3dx11
POL_Call POL_Install_d3dx10
POL_Call POL_Install_directx9

POL_Wine_WaitBefore "$TITLE"
POL_Wine_WaitExit "$TITLE"

POL_SetupWindow_Close
exit

In the PlayOnLinux window select Tools → Run a local script and specify path to it (~/Downloads/acrordrc2020.pol), confirm its execution and wait it to finish.

Set file association for PDF file with Acrobat in PlayOnLinux by choosing Settings → File Associations, then click New, enter .pdf and associate it with Acrobat in the bottom of window.

Open file manager, select PDF file and use Open With to get it opened using newly installed Adobe Acrobat Reader DC.

Enjoy:

You already have the latest version. There is no newer one. Adobe stopped supporting Linux many, many years ago.


What TweetDeck, or Gwibber alternatives are there that support Facebook? TweetDeck I really enjoyed until I installed Ubuntu, as Adobe doesn't have a 64-bit version of Adobe AIR (which is  necessary to run TweetDeck) so I can't use it anymore. Are there any alternatives that support Facebook?

Note - there is a similar question - but this has been reopened to be specific to facebook support:

What microblogging clients are available?

If you do not mind running in a browser then Tweetdeck, Hootsuite and Seesmic all run on Chrome(ium) and the last two on Firefox. Personally I run Tweetdeck under Chrome and running these services in a browser is probably the best way forward. Adobe have stopped development of Air for linux, so do not expect much new software in Ubuntu using it.

Try Hotot ,
or you can try TweetDeck on chrome browser.


View size of CPU cache through the command-line? How do I view the size of my CPU cache using the command-line?

I want to view information on L1, L2 and L3 cache.

Also, would it be possible to ouput only information on cache, so that all other information is filtered out?

lscpu will provide the info you're looking for.

lscpu | grep "cache" to filter out only cache info. This will result in something like:

L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K

Kind find below the command to list the size of all existing cache-related folders.

 for i in $(find /  -iname '*cache*'); do du -sh $i ; done 2> /dev/null | grep 'G\|M\|K\|B'| nl


How can I create a select menu in a shell script? I'm creating a simple bash script and I want to create a select menu in it, like this:

$./script

echo "Choose your option:"

1) Option 1
2) Option 2
3) Option 3
4) Quit

And according to user's choice, I want different actions to be executed. I'm a bash shell scripting noob, I've searched the web for some answers, but got nothing really concrete.

#!/bin/bash
# Bash Menu Script Example

PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "Option 1")
            echo "you chose choice 1"
            ;;
        "Option 2")
            echo "you chose choice 2"
            ;;
        "Option 3")
            echo "you chose choice $REPLY which is $opt"
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done

Add break statements wherever you need the select loop to exit. If a break is not performed, the select statement loops and the menu is re-displayed.

In the third option, I included variables that are set by the select statement to demonstrate that you have access to those values. If you choose it, it will output:

you chose choice 3 which is Option 3

You can see that $REPLY contains the string you entered at the prompt. It is used as an index into the array ${options[@]} as if the array were 1 based. The variable $opt contains the string from that index in the array.

Note that the choices could be a simple list directly in the select statement like this:

select opt in foo bar baz 'multi word choice'

but you can't put such a list in a scalar variable because of the spaces in one of the choices.

You can also use file globbing if you are choosing among files:

select file in *.tar.gz

Assuming you want to use a plain shell script menu (no fancy UI), check the menu example from http://www.tldp.org/LDP/abs/html/testbranch.html .


Thunderbird Links do not open the page in chrome With chrome as the default browser, when I click on a link in Thuderbird, it opens chrome, but always starts a new browser and just goes to the startup page and not to the page on the link.  I am using Ubuntu 16.04.  Chrome is 55.0.2883.87.  Thunderbird is 45.7.0.

Go into the "Attachments" tab in "Peferences" menu and search for "http" and "https", and then change values to the browser you want or to "Allways ask". Problem solved.

If that doesn't work, you can try going to "Tools", "Options", "Advanced", "General", "Config editor". Search for "network.protocol-handler.warn-external.http" and "network.protocol-handler.warn-external.https", change both values from "false" to "true" en then try to open a link in a message. It should ask to select what browser you want to use with an option to "Remember the choice".

After all the changes I made, e.g. set Chrome as the default application in the Config Editor, Chrome would not open when I would click on a link. When I changed to Explorer it would work, but not for Chrome.

If it works in one web browser, why doesn't it work in another? I thought that, maybe during an update, the symbolic link for Chrome was changed and Thunderbird tried to open it, but with a wrong link.

So, I created a new Chrome shortcut on my Desktop and made sure that when I clicked on the icon, Chrome would open and work as expected. Then, I replaced the default application in Thunderbird with the Chrome link on my Desktop. I tried it and the link in my e-mail in Thunderbird opened in Chrome, as it always did before.

In short, create a Chrome shortcut on your Desktop,
go to the Attachments tab → Preferences and change the link to the Chrome shortcut on your Desktop and click Always use this setting.


Speakers and headphones play no sound on Toshiba Satellite I just bought a second hand Toshiba Satellite S50-D and installed Ubuntu 14.04. Everything seems to be in working order, except my sound does not work. The speakers seem to be recognised in the sound menu, and when I took a look at pavucontrol it shows the audio being streamed to the device (that is, the sound bars move when I play music or something), yet neither the speakers nor the headphone jack play any sound. Before you suggest it, the devices are selected for output, and they are not muted.

Any suggestions? Some sources seem to say it requires messing about with probemasks but I don't know if that's relevant to my issue or how to go about it if it is.HDMI audio works fine, and the system panel accurately detects whether or not headphones are plugged in.

I really, really don't want to have to put Win8 back on this thing, but this is kind of a deal breaker. I'd really appreciate some guru assistance.

EDIT: ALSAMIXER detects the card as "HD-Audio Generic" with chip "IDT 92HD99BXX" if that's helpful in any way.

I just had a similar sound card experience on an old toshiba satallite pro m30.
Not a very technical answer this, but my problem turned out to be the "hidden" volume control situated under the front edge of the laptop just below the main input light.
This seems to to get rotated to the "off" position quite easily. I spent hours trying to sort this problem - Doh!

on my toshiba tecra m5 i did not have any sound,i found that the
solution was to go in to bios and change the setting in configuration
device config=setup by os,change to device config=all devices.
that solved it for me,i am running ubuntu 14.10.
i hope this solution might be helpfull for others too.


Newbie - What are the pros & cons of using vim instead of gedit I am a bit confused as of advantages or disadvantages of using 'vim, versus gedit. I just find 'gedit' very practical.
Thks

For a lot of things in Linux we have a multitude of tools that can do the same but are for a different audience. When you have a server version and not a desktop gedit is not an option. You might not use a server version ever in your life but there is likely also someone else that will never use an Ubuntu desktop.
When you have trouble starting a desktop (for instance when your graphical driver bugs out) and you are left with a TTY login you basically are using the server part of Ubuntu. In that case you can still use an editor like vim or vi and not gedit.
The only downside to vim ... it has so so so many features and all of them linked to a keyboard shortcut it will take time to get proficient.

They are, among text editors, completely different applications.
A main difference:
vim works at the     command line
gedit is a   gui        .
Some of the features offered by gedit are:

Full support for internationalized text (UTF-8)
Configurable syntax highlighting for various languages (C, C++, Java, HTML, XML, Python, Perl and many others)
Undo/Redo

On the other hand, Vim provides the following key features:

Vertically Split Windows
Vimdiff
Folding

Related:

https://www.slant.co/versus/42/58/~vim_vs_gedit
https://stackshare.io/stackups/gedit-vs-vim


How to set a short password on Ubuntu? When I install the Ubuntu, I set a short password(<4). Now I want to change the other short password by "passwd" or change passphrase on "Password and Keys" program, it needs a password >4 char.

Use following command in Terminal:

sudo passwd <user>

Replace <user> with the username whose password you wish to change.

This works because passwd suppresses all checks for length or entropy when you use it as the root user.

  Warning: if the target user has an encrypted home directory, this will
  cause problems!
  (see comments below)

In Ubuntu 18.04 none of other solutions worked for me. I had to replace both of these lines:

password    requisite                   pam_cracklib.so retry=3 minlen=8 difok=3 dcredit=-1 enforce_for_root lcredit=-1 ocredit=-1 reject_username ucredit=-1
password    [success=1 default=ignore]  pam_unix.so obscure use_authtok try_first_pass sha512

in /etc/pam.d/common-password with:

password    [success=1 default=ignore]  pam_unix.so minlen=2 sha512

These changes let me changed my password easily and after changing password I restored file to it's original form.


Restoring original system state Aborting dj@dj:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,258 kB]
Fetched 1,259 kB in 0s (0 B/s)
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg'
extracting 'bionic.tar.gz'
Reading cache
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Ign http://dl.google.com/linux/chrome/deb stable InRelease
Hit http://archive.ubuntu.com/ubuntu xenial InRelease
Hit http://archive.canonical.com/ubuntu xenial InRelease
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit http://dl.google.com/linux/chrome/deb stable Release
Hit http://archive.canonical.com xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Fetched 323 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
dj@dj:~$

You will have to remove the PPA which were added to the system

Step 1: List the PPAs

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {print "sudo ppa-purge ppa:"$4"/"$5}' "$file"; done

Step 2: Now, remove them

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {system("sudo ppa-purge ppa:"$4"/"$5)}' "$file"; done

Step 3: Install bleachbit and gtkorphan

sudo apt install bleachbit
sudo apt install gtkorphan

Step 4: Run bleachbit and gtkorphanas root

Step 5: Now, run the command

sudo do-release-upgrade


Is it possible yet to synchronise music to an iPhone running iOS 5/6? Is it possible yet to synchronise music to an iPhone running iOS 5/6?

I tried it in the Ubuntu 12.10 (Quantal Quetzal) live environment, but I didn't have any luck with Banshee or Rhythmbox.

Is there some way to do it?

Currently there is no linux software (or library) that can successfully read, write and update an iOS device's music library running iOS 5 or higher. All applications (that I know of), are dependent on libgpod for this functionality and libgpod has not worked properly with the current versions of iOS for some years now, ever since the database version (DBVersion) of the iTunes library within the device hit version 5.

Your best bet right now is iTunes via wine.

There are plenty of iPod managers out there on the Software center, just type iPod in the search bar. These are compatible with iPad, iPhone and iPod classic. They will happily synchronize your music and do way more for you. I reccomend gtkpod, but you can choose whichever you like.


Virtual mouse driver, possible problems with X11 I created virtual mouse driver according to Essential Linux Device Drivers book. After i wrote coordinates echo x y > /sys/ ... /coordinates into sysfs node, my program generates event packets through event interface /dev/input/event5 (i checked this). This event interface is attached to the GPM gpm -m /dev/input/event5 -t evdev. But mouse don't move.
  I asked this question on stackoverflow
and figure out that there might be a problem with X11 configuration. is it possible? What can interfere my driver work in this conditions?
i use ubuntu 11.04 on virtual box. Thanks.

Maybe this will help: in Xorg.0.log i see the following:

[    21.022] (II) No input driver/identifier specified (ignoring)

[   272.987] (II) config/udev: Adding input device  (/dev/input/event5)

[   272.987] (II) No input driver/identifier specified (ignoring)

[   666.521] (II) config/udev: Adding input device  (/dev/input/event5)

[   666.521] (II) No input driver/identifier specified (ignoring)

By initialzing the name field of the device and enabling keybit events(BTN_MOUSE), i could get the mouse moving. Im still trying to find the reason why relative events are not working, without enabling key button events.

In the input device driver (i.e Virtual mouse driver init module function), i added the below lines of code just before registering the input device. Rest of the code is same as in the book

// Device name

vms_input_dev->name = "Virtual Mouse";

// Enable relative and Button events

set_bit(EV_REL, vms_input_dev->evbit);

set_bit(EV_KEY, vms_input_dev->evbit);

set_bit(BTN_LEFT, vms_input_dev->keybit);

set_bit(REL_X, vms_input_dev->relbit);

set_bit(REL_Y, vms_input_dev->relbit);

The code worked for me on ubuntu 12.04


How to install Autodesk Maya 2016 in Ubuntu 14.04 Please tell me what is wrong and what went wrong. I'm trying to install Maya 2016 according to the instructions from this site.

I tried to run it through the terminal, via the menu dash, but it still does not work. It constantly complains Maya.bin

I tried running sudo chown -hR sne_byorn/home/sne_byorn/maya (see this screenshot) but it did not help. All the same, even when you run through a shortcut via dash menu, even in terminal sudo maya, maya -style gtk - it only has time to load the splash screen and everything and then nothing.

Have tried this enter in the terminal:

sudo aptitude install --reinstall libssl.so.0.9.8

and then this

sudo apt-get update
sudo apt-get upgrade

and it might work fine this way.


GRUB does not detect Windows I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?

When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.

I ran command sudo fdisk -l and here is log (http://pastebin.com/Cgv1igHc):

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xc3ffc3ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Boot Ubuntu and mount your Windows partition (simply open the disk on Nautilus)
Run the following on the command line (Ctrl+Alt+t):

sudo os-prober

If your Windows installation was found, you can run:

sudo update-grub

Note that step 2 is just for your convenience. You could just mount the Windows 7 partition and then run update-grub.

Related question

Unable to mount Windows (NTFS) filesystem due to hibernation

In addition to the answer of Bartosz Dabrowski, which lead me to solving my problem:
Be sure that if your Linux uses UEFI Boot/GPT that your other OS (eg. Windows in my case) also uses UEFI Boot/GPT. Coming from an old Win7 to Win10 installation the hard drive still had old school boot and MBR. Somehow os-prober and boot-repair had their problems to fix this.
Ensure that in BIOS / Boot order there is your HDD with ubuntu (eg. uefi: ubuntu) and your HDD with Windows Boot Manager (eg. uefi: Windows Boot Manager) to be found.
If WBM is missing ensure that windows boot disk has GPT. You can check this in Windows using Disk Management (Win + X, then Disk Management).
There is a Windows tool: mbr2gpt which can convert your MBR to GPT. After doing so (and booting via UEFI) os-prober and finally update-grub was able to find my Windows installation and added it to the boot options of grub.


How to reboot into Windows from Ubuntu? I'm looking for a way to reboot into Windows from Ubuntu on a 10.10/Vista dual boot system. The specific use case is that I would like to be able to ssh into my running Ubuntu instance and issue a command that will initiate a reboot directly into Windows.

I found a promising blog post, but the script that it suggests isn't working:

#!/bin/bash

WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
sudo grub-reboot $MENU_NUMBER
sudo reboot

man grub-reboot isn't much help, but it seems to be leading me in the right direction:

  set  the default boot entry for GRUB,
  for the next boot only

WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
echo $MENU_NUMBER

This returns the expected value, but on reboot the first menu entry is still highlighted. Any ideas why this isn't working or suggestions for other solutions?

You have to edit your grub first.

sudo gedit /etc/default/grub

Search for the line GRUB_DEFAULT=0 and modify it to GRUB_DEFAULT=saved

Update your grub using the following command.

sudo update-grub

Now create a script file,

sudo gedit switch-to-windows.sh

Then add these lines.

#!/bin/bash
WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
sudo grub-reboot $MENU_NUMBER
sudo reboot

Make the script executable.

sudo chmod +x switch-to-windows.sh

And now you can run this script from terminal to reboot into windows.

./switch-to-windows.sh

Or you can execute the following command in your terminal

sudo grub-reboot X

Where X is the menuentry position of the OS you want to restart in from the GRUB menu.(starting with 0 as the first entry)

For Example:

If this is your grub menu and if you want to boot into windows you should give the value of X as 5.
sudo grub-reboot 5

You can also create a launcher for the above command,so that double clicking the launcher will reboot into windows.

Simply edit /boot/grub/grub.cfg and change the default entry to point to the entry you want to boot.  The value can either be the ordinal number of the entry (starting from zero for the first one) or you can place the full title of the entry you want in quotes.


Refused connection of ssh I installed openssh on my new Ubuntu14.04 server, turned on ssh, and enjoyed it after I finished installation. Every thing was fine; however, after just one night, I was blocked when using putty as usual. I got the message: connection refused.

I rebooted the server, and I were again able to connect my server through ssh. But, after half a day, it happened again: my connection through ssh is refused.

I thought some important settings might be accidentally modified, so I re-installed Ubuntu 14.04 on the server. It worked at that moment but failed at the next day.

I wondered if there was anything wrong on the firewall, but the firewall manager said that another server, which is one of the new servers in our lab, under the same firewall policy does not have this problem, so there should be some problems on our machine.

There is no physical problem on internet, because the engineer showed me that he can ping this server through port 80.

This is confusing because the problem exists even though I re-installed the OS. There is no physical problem on the internet, and the firewall policy does not block other servers from my IP. Are there any ssh variables or system settings that I should check?

I was simply locked fully out of my machine and getting connection refused.
Purging and reinstalling openssh-server + client seems to have fixed it for me.


Splash screen doesn't show on boot Actually, that's slightly misleading, but titles ought to be simple. I have a splash screen:
-For about two seconds during boot, right before the login screen appears.
-During shutdown.

During boot I just see the same purple as used by grub. (Edit: when grub's background is changed, so is the one during boot, so grub seems to be... covering it?)

This has happened since I installed 11.04. 10.04 and 10.10's splashed worked fine for me.

I finally found the solution for me.

First I followed the instructions in the article "how to fix your Ubuntu splash screen".

Then I manually changed the resolutions in /etc/default/grub to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=800x600-24, mtrr=3, scroll=ywrap" ;

(do not forget to run sudo update-grub afterwards).

Why, I do not know. In 10.10 it was 1280x1024-24.

I think it is with the changes in the Ati driver that comes with 11.04.  But I have a nice splash screen at boot time and logoff time now.

Instal cryptsetup has no influence at all.  I have  found a partial solution at /usr/share/doc/plytmouth : readme.  This is because the driver that permits high-color graphics tends to
cause issues with suspend and resume, and we opted to prefer that
working.

For nVidia and ATI users, the default "nouveau" and "radeon"
drivers are Kernel Mode Setting enabled, but do not always
provide 3D capability at the current time.  By switching to
using the restricted/non-free nvidia-glx or fglrx drivers,
you will gain 3D capability at the loss of a high-color
splash screen.

You can however chose to enable high-color (and resolution) console
if you find it doesn't affect suspend/resume for you, or you don't
use that feature.

There are various methods of doing this, the most robust is the
following four steps:

Append video=vesafb to the GRUB_CMDLINE_LINUX_DEFAULT in
   /etc/default/grub
 sudo update-grub

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
 sudo update-initramfs -u

At the moment i have splash screen in low resolution at startup (always better than black screen) - and normal splash at logout.


bluetooth devices not showing in ubuntu 14.04 I have Ubuntu 14.04 and windows 8.1 dual boot. And in my ubuntu OS I got Bluetooth installed in it. I wanted to connect my bluetooth device, like my phone, my bluetooth headphones etc. But it does not list the any of available bluetooth devices.Why? and what i also experienced is the devices were visible in ubuntu if i turn off all the network connection(go to airplane mode) in windows 8.1 and turn it back on in ubuntu. Can a get a permanent solution too see my bluetooth devices visible in ubuntu Every time I try to do so?
thanks in advance. looking for serious help

Try Blueman

sudo apt-get install blueman


Unable to change any of the settings of ubuntu 18.04 I installed new Ubuntu OS for which i created a administrator account. I was unable to change any of the settings in settings option of Ubuntu 18.04. I am able to change the settings when i created the another account. I am not able to change the settings from the previous accounts.

I solved the issue by deleting .config

Step1:

cd .config

Step2:

rm -R *

suraj@suraj:~$ cd .config

suraj@suraj:~/.config$ ls
 dconf                      gnome-session   menus              update-notifier
 enchant                    goa-1.0         mimeapps.list      user-dirs.dirs
 eog                        google-chrome  'MongoDB Compass'   user-dirs.locale
 evolution                  gtk-3.0         nautilus           yelp
 gedit                      ibus            pulse
 gnome-initial-setup-done   libreoffice     Slack
suraj@suraj:~/.config$ rm -R *


Black screen, blinking cursor and purple line left Last week I installed Ubuntu on my notebook, now I'm also trying to install it on my PC, but with no luck.

When i start from my USB stick (same as I installed my notebook with, Ubuntu 13.04) first I'll see an purple screen, after this it shows a black screen, blinking cursor and the a small line on the left is purple.

I've started searching on Google, and tried the nomodeset function on the first black screen. Here it doesn't show the purple line on the left, but still an black screen with blinking cursor..

Now I tried to install 13.10 and 12.10 on the USB stick, but with no luck. Exactly the same things happened.

After this, I tried some other things:

acpi=off = Same effect as nomodeset.

nolapic = Same as "normal" boot (purple line, black screen), but without the blinking cursor.

Desktop specifications:

Intel Xeon E3-1240 V2
GeForce GTX 640 Ti BOOST
6GB of memory
3 displays, the purple line is always on the "main" screen (middle
one).
Currently windows 8 pro installed.
ASRock B75 Pro3-M

You could try this and see if it lets you access the desktop:

When hard-drive has stopped loading and you are sitting on a black screen, press CTRL+ALT+F1 and enter your username and password and press ENTER.

Now type: startx   which should run xorg and bring you to your desktop...

If this works, open a new Terminal window on your desktop and remove LightDM by typing the following:

   sudo apt-get remove lightdm

and then done we'll replace it with GDM instead by typing:

   sudo apt-get install gdm

now type: sudo reboot   to reboot computer and hopefully all is well...


Kubuntu doesn't work after upgrade to 16.04 I have a new System76 Lemur Laptop.  It worked fine for a week.  I installed Kubuntu, it worked fine.  Then I upgraded to Kubuntu 16.04 LTS and the system doesn't boot fully anymore.  The Kubuntu logo flashes but then never displays the login UI, I just see black.  I can get a TTY by pressing CTRL+ALT+F1 key.  I can run startx -- :1 from the TTY to get a bare bones graphical interface.

How can I get a usable graphical interface?

sudo dpkg-reconfigure sddm

and selecting sddm worked for me.

Same problem. I held the shift key down during boot and got to a menu where I chose "advanced options," then selected "upstart." At least I can do my office work now. Unknown how to make systemd, the new type of booting up, function.