Problem computer not detecting graphics card After I configured dual boot and booted up windows (with ubuntu 15.10) again none of my files are damaged or harmed and I thought I successfully configured a dual boot but now I have one problem. When I went to play some fallout new vegas and it then prompts me with "configuring settings to fit your hardware" and I thought that was odd then it says I have no graphics card and there is no selection for a graphics card. I also went to msi after burner and it didn't detect it there. But if I go to system information it says a gtx 960 is in use which is my graphics card. Thanks for reading any help would be greatly appreciated!

OS: windows 10 + ubuntu 15.10
the problem: games/programs can't detect graphics card

Steps to do:
1- Uninstall Ubuntu
2- Reinstall Ubuntu on a separate drive instead of installing side by side

Hopefully, it's gonna help you!


No audio in vlc player when sharing screen in discord I'm using Ubuntu 20.04.In discord, when i'm trying to share screen in discord i can share vlc playing but my video has no sound to others.
How can i solve this?
(I think for using discord now web camera is not working properly.It has become more black and sometimes its okey but sometimes it's not.)

You normally can't stream sound on discord if you're not under W10, but here's a guide that may help you
https://www.reddit.com/r/discordapp/comments/f22vz6/guide_how_to_stream_audio_to_discord_on_linux/


How can I logout from the GUI using CLI? I chose an Openbox DE at the time of login and the system took ages to load the DE. So I switched to CLI (Ctrl+Alt+F1) and rebooted my system (but I wanted to logout from the GUI and not restart the whole system).

My question is, can I issue some command at CLI to log me out from the GUI so that I can select different DE. (I don't want to restart my system every-time DE hangs.)

$ DISPLAY=:0 gnome-session-quit --force

** (gnome-session-quit:3144): WARNING **: Failed to call logout: The name org.gnome.SessionManager was not provided by any .service files

To end all user processes and be sent back to the login screen, you can use:

kill -9 -1

Don't run it as root though, for reasons discussed here.

You can use the command killall gnome-session to log out. This will work for all GNOME sessions and if I remember correctly all GNOME-related ones. It takes you right back to LightDM so you can select a new DE or a new user. :)


automate sshpass when server is asking a "yes/no" question I have this small script for connecting to new machines I don't have ssh-key to:

function my_ssh () {
    ip=$1
    optional_cmd=$2

    ssh -o "BatchMode yes" user_name@$ip exit > /dev/null 2>&1

    if [ $? -gt 0 ]; then
        echo "1st time connection - adding key to authorized keys list"
        sshpass -p "secret_password" ssh-copy-id user_name@$ip
    fi

    echo $optional_cmd
    ssh -X user_name@$ip $optional_cmd
}

This works weel for servers that either have my ssh-key, or only ask for a password in order to use ssh-copy-id. However, some servers require a "yes/no" after the following question:

  The authenticity of host 'A.B.C.D ()' can't be established.
  ECDSA key fingerprint is SHA256:****.
  Are you sure you want to continue connecting (yes/no)?

How can I add a "yes" string echoed into the server question stdin and then use the sshpass?

ps, I went over the sshpass code from github but it doesn't seem sshpass is designed for something like this. I think I can modify it to suite my needs, but I prefer using a normal Linux mechanism if possible

To answer the OP's question about entering "yes" on the ECDSA key fingerprint prompt, and I would only advise this for localhost SSHds - never in anything more than an experimental docker container setup, you can do the following:
sshpass -p 'password' ssh \
  -o StrictHostKeyChecking=no \
  username@127.0.0.1 -p 2222 'whoami'

A use case? You could have a nobody user that is the only user who is allowed to password-SSH into a machine (all other users are set to require keys). You could then just get some system info you need, say, as you experiment with orchestration.
sshpass -p 'meminfo' ssh \
  -o StrictHostKeyChecking=no \
  meminfo@127.0.0.1 -p 2222 "egrep 'Mem|Cache|Swap' /proc/meminfo"

The result would be something like this.
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
SSHPASS searching for password prompt using match "assword"
meminfo@127.0.0.1's password:
SSHPASS detected prompt. Sending password.
SSHPASS read:

MemTotal:       16369628 kB
MemFree:          683412 kB
MemAvailable:    8847748 kB
Cached:          6544572 kB
SwapCached:          460 kB
SwapTotal:       2097148 kB
SwapFree:        2071928 kB

Then you can nmap a cluster or Pis (or docker containers) on your LAN and then automate checking how they are doing without adding NodeJS or Python or a health API service.
If you're finished experimenting and want to clean up those rubber-stamped ECDSA fingerprints, you can run:
ssh-keygen -f "~/.ssh/known_hosts" -R "[127.0.0.1]:2222"

Warning: I must remind everyone that even the above with a nobody user can be dangerous if they find some privileged command that has the suid bit set - nobodys could still run as root!

Workaround:

list.txt
vm1.example.com
vm2.example.com
vm3.example.com
...

for i in $(cat list.txt); do timeout 1 ssh -o StrictHostKeyChecking=no user@$i; done
for i in $(cat list.txt); do ssh-copy-id -i user@$i; done

ssh user@vm1.example.com -- no pass


How do I upgrade Ubuntu? I'm new to Ubuntu and Linux in general and coming from Windows I was wondering how to upgrade Ubuntu from one version to another. A new version is released each six months, right? So let's say I'm now running 13.04. When 13.10 will be released in october, how will I upgrade my system?

Will I have to reinstall my whole Linux, loosing all my programs or is there a way to simply replace 13.04 by 13.10?

this link will help u
http://www.ubuntu.com/download/desktop/upgrade

Launch the update manager
Press the Superkey (Windows key) to launch the Dash and search for Update Manager

Check for updates

Click the Check button to check for new updates. If there are any updates to install, use the Install Updates button to install them, press Check again after that first update is complete — then press the Upgrade button.

I would not recommend upgrades, they are too often responsible for strange system problems. The best option is reinstalling ubuntu completely new.

During the installer process your old ubuntu installation will be recognized and you can choose "replace existing installation of ubuntu". This guarantees a completely clean version of ubuntu without any odd problems or errors.


Light locker no longer blanks screen or puts monitor into energy saving mode I'm on Xubuntu 14.04. When I originally upgraded, I had the problem of both light locker and xscreensaver running simultaneously. After that was fixed, light locker has been running smoothly.

But, recently, I noticed my screen on after I was gone all day; it was on when I woke up the next morning; etc.

I tried changing settings, rebooting, looking for other screensaver-like processes, checking that the command args would update when I made changes in the settings UI, etc.

I can manually lock the screen with light-locker-command -l, but I don't remember to do that every time.

I wasn't able to find other askubuntu questions that address my situation.

Could there have been a problem with a recent update (I apply them appx. once/week)? Or, are there other things I should check?

Switch to xscreensaver.

$ sudo apt-get remove light-locker
$ pkill light-locker
$ sudo apt-get install xscreensaver

Edit the screensaver settings (click yes/okay if asked to start the daemon):

$ xscreensaver-demo

Open the XFCE Power Manager ("Power Manager" from the "Settings" menu) and  de-select "Handle display power management" in the "Display" tab.

I found this suggestion on a discussion group, but can't find the reference at the moment (thank you to whoever suggested it!)

Log out
Switch to a terminal (e.g. Ctrl-Alt-F1)
Log in to the text terminal
$ rm -rf ~/.cache/sessions/*
$ exit
Return to the graphical environment (Alt-F7)
Log in as normal

Now, I'm getting screen saver & locking as configured via the xfce4 power manager.


Internet slow on Ubuntu but not windows using a RTL8111 I have just installed a dual boot windows7 /ubuntu 11.10 and the internet is much slower than windows.
I have read the post here and tried the solutions presented and none have worked.
Here is what I am dealing with; In Windows my internet is as normal, nice and fast.

However in ubuntu on my new system my internet is super slow (Here it is important to note that my other system ubuntu has the same speeds as windows on this system). I have installed all of the updates and am using the latest stable google chrome and my speedtest results are way lower. (upload times out and eventually fails, however before that happens ping is 10ms and download is <5meg). the difference is really felt when downloading anything, including updates.
My system specs are as follows:

 Motherboard: Asus P8Z68-V LX
 CPU:         Intel i5 2500k
 RAM:         Corsair vengeance blue 8GB (4X4GB)
 SSD:         OCZ Vertex 3 60gb

I am using the onboard lan. Drivers were installed from the CD provided with the motherboard. I installed the drivers in Windows (windows was installed first). Ubuntu did not require me to install any new drivers for the internet to work (and by work I mean I can get a connection, albeit intermittent and slow).
I have read people having difficulties with the UEFI BIOS but never internet speeds.
Any help diagnosing my problem would be greatly appreciated.

rdl@rdl-home-ubuntu:~$ ethtool -s eth0 speed 1000 duplex full autoneg off
Cannot set new settings: Operation not permitted
  not setting speed
  not setting duplex
  not setting autoneg
rdl@rdl-home-ubuntu:~$ ifconfig eth0 |grep errors
          RX packets:14632 errors:0 dropped:14632 overruns:0 frame:14632
          TX packets:14094 errors:0 dropped:297 overruns:0 carrier:0

running the first command as sudo only changes Operation not permitted to Invalid argument
Here is the output of sudo ethtool eth0

Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                         100baseT/Half 100baseT/Full
                                         1000baseT/Full
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: yes

and after I run sudo ethtool -s eth0 speed 100 duplex full autoneg off

Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes:  Not reported
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: off
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: yes

Problem still persists.

Most probably you need to install the driver from here: http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

The package comes with an install script.

As others have mentioned this is a known issue, try searching for "Realtek RTL8111".

1. First method :

You need to disactivate IPv6, to do that, open terminal and enter
the following commands:

echo “#disable ipv6″ | sudo tee -a /etc/sysctl.conf

echo “net.ipv6.conf.all.disable_ipv6 = 1″ | sudo tee -a /etc/sysctl.conf

echo “net.ipv6.conf.default.disable_ipv6 = 1″ | sudo tee -a /etc/sysctl.conf

echo “net.ipv6.conf.lo.disable_ipv6 = 1″ | sudo tee -a /etc/sysctl.conf

Then restart your system.

If you still have the issue, follow also instructions on step 2.

2. Second method:

A second solution for this issue can be by using the following :
Open terminal and enter the following command:

sudo -s

then gksu gedit /etc/modprobe.d/ath9k.conf and at the end of the
file add this:

options ath9k nohwcrypt=1

Save an restart your OS.


What is the closest font to Helvetica available on Ubuntu? As I understand we don't have the font Helvetica in Ubuntu. Is there any font that is very similar to it? How can I install it?

The PostScript language defines 35 core fonts in PostScript 2. Among them is the Helvetica family. A properly configured system should automatically substitute one of the following fonts, if available:

Microsoft commissioned a copy of Helvetica – The well-known Arial. (ttf-mscorefonts-installer)

Google commissioned the Croscore fonts, designed to be metrically compatible with Microsoft fonts. The Arial equivalent is Arimo. (fonts-croscore)

Red Hat commissioned a set of fonts designed to be metrically compatible with Microsoft fonts. The equivalent of Arial is Liberation Sans. (fonts-liberation2)

URW released open-source clones of the 35 Postscript fonts for ghostscript. The Helvetica equivalent is Nimbus Sans. The metrics are slightly different from Arial.

GUST TeX Gyre is based on the URW fonts. The Helvetica equivalent is TeX Gyre Heros. The metrics appear to have been adjusted to match Arial. (fonts-texgyre)

GNU FreeFont is based on the URW fonts, with the same metrics. The Helvetica equivalent is FreeSans. (fonts-freefont-ttf)

Reference

ArchWiki: Metric-compatible fonts

Try the font 'Phetsarath OT' (at least it shows up in Inkscape; not sure if it is a system-wide font).

LaTeX on Ubuntu advertises having Helvetica as an option, but they actually use the one I mentioned.


"ERROR while getting interface flags: no such device" The command

airmon-ng start wlan0

gives as output

Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time you may want to kill (some of) them!
PID    Name
3258   wpa_supplicant
4175   NetworkManager
4180   dhclient
4190   avahi-daemon
4191   avahi-daemon
Process with PID 4180 (dhclient) is running on interface wlan0

Interface       Chipset       Driver

wlan0           Unknown       wl - (phy0]mon0: ERROR while getting interface flags: Onjuist apparaat

                              (monitor mode emabled on mon0)

and then I type

ifconfig mon0 down

and I get this error:

ERROR while getting interface flags: no such device

The error will probably start at airmon-ng start wlan0.

To quote from the aircrack-ng site:

  This means you have an old version of airmon-ng installed. Upgrade to at least v1.0-rc1.

They add chipset information/support in their newer releases, as well as incorporate patches.

To upgrade to the latest version of aircrack-ng, please follow the steps in this answer.

The problem is with the name of the interface

So, type airmon-ng to start your wireless interface in monitoring mode

Then type airmon-ng check kill to kill all the interfering processes

Now type

airodump-ng wlan0mon

instead of typing

airodump-ng mon0

I hope this will work, if not please comment


How to check password strength I wrote this script but [:alnum:] doesnt work. Anyone help?

echo -n "Enter a password : "
read password

LEN=$(echo ${#password})

if [ $LEN -lt 10 ]; then

       echo "$password is smaller than 10 characters"
else
     if ! [ -z `echo $password | tr -d "[:alnum:]"` ]; then
        echo "$password is a weak password"
     else
        echo "$password is a strong password"
     fi
fi
echo

If you really want to check password strengths, you should use cracklib-check from the cracklib-runtime package (should be installed by default):

$ echo foo | cracklib-check
foo: it is WAY too short
$ echo foobar | cracklib-check
foobar: it is based on a dictionary word
$ echo foobared | cracklib-check
foobared: it is based on a dictionary word
$ echo foobared123 | cracklib-check
foobared123: it is too simplistic/systematic
$ echo '!'foobared123 | cracklib-check
!foobared123: OK

I found the correct script and it works:

echo -n "Enter a password : "
read password

LEN=$(echo ${#password})

if [ $LEN -lt 10 ]; then

       echo "$password is smaller than 10 characters"
else
     if  [ -z `echo $password | tr -d '[:alpha:]' | tr -d '[:upper:]' | tr -d '[:lower:]' ` ]; then
        echo "$password is a weak password"
     else
        echo "$password is a strong password"
     fi
fi
echo


USB not found in GParted My Ubuntu 16.04 is unable to recognize and format a usb drive. Below are things I tried:

When I try opening disks, it does show a "Generic USB Flash Disk" as /dev/sdb, but all options (including Format Partition), except for Edit Mount Options, are grayed out.
GParted does not recognize the device (/dev/sdb) at all.
sudo mkfs.vfat /dev/sdb returns No medium found

Any idea?

there is a  little menu up to the top right of the Gparted dialog box click it and see if you can switch to the  flash drive. It's how I do it


What is the best way to control music on my PC from my iphone or android? Apple has a very slick tool, called "Remote.app" that allows you to control music playback on a PC running iTunes, see.

It lets you quickly select and queue songs for playback, and adjust the volume among other things.  What's the best linux-compatible alternative?  I'm not married to a particular music player on my PC - Banshee, Rhythmbox, whatever, I'm open.

My ideal vision is laying on the couch queuing up songs without having to turn on a monitor.  Wow.. putting it like that makes me feel lazy.

Anyway...VNC is cumbersome...surely there's a better way?

You can do it with mpd.

You have to set up the daemon such that it allows ssh connection (basically comment the line bind to adress: 127.0.0.1 in the config file /etc/mpd/), then it will play in the background. You can then control it from any client (i.e. from any device which can connect to your PC) there is a list there:

http://mpd.wikia.com/wiki/Clients

Some of them are particuliarly designed for Iphone. Some are php clients also, which can be fun.

This is what I'm using at home and it works perfectly!

I think you should take a look on this list: http://www.techdrivein.com/2011/08/5-android-apps-for-remotely-controlling.html


Segmentation Fault while using Primus I have been trying to use primus for a while, but I couldn't manage to get it work. I have followed these instructions; http://www.webupd8.org/2012/11/primus-better-performance-and-less.html

Optirun is working pretty nice, however if I try to run primus it fails with a segfault.

04:10 ~ $ primusrun glxspheres
Segmentation fault (core dumped)

I'm not sure how can I debug this, and why this is happening.

syslog is not helpful either

Dec 21 04:53:47 n56-laptop kernel: [ 3581.385043] glxspheres[7889]: segfault at 0 ip
(null) sp 00007fffda4604a8 error 14 in glxspheres[400000+7000]

I'm running ubuntu 12.10 - 64bit.

Thanks for any advice/help on this.

You need to modify primusrun script for nvidia-experimental.

Following are the changes required for bumblbee and primus

gksu gedit /etc/bumblebee/bumblebee.conf

on line 22, make sure "Driver=" is set to "nvidia", like this:

Driver=nvidia
change the "KernelDriver=" (on line 47) to "nvidia-experimental-310", like this:

KernelDriver=nvidia-experimental-310
change LibraryPath= (on line 51) to /usr/lib/nvidia-experimental-310:/usr/lib32/nvidia-experimental-310, so it looks like this:

LibraryPath=/usr/lib/nvidia-experimental-310:/usr/lib32/nvidia-experimental-310
change the XorgModulePath= (line 54) to XorgModulePath=/usr/lib/nvidia-experimental-310/xorg,/usr/lib/xorg/modules so it looks like this:

XorgModulePath=/usr/lib/nvidia-experimental-310/xorg,/usr/lib/xorg/modules

gksu gedit /usr/bin/primusrun

There will be three occurrences of nvidia-current , replace them with nvidia-experimental-310

Source

If you have Astrill installed, try removing it. That fixed the problem of Primus segfaulting, on my system.


Display flickering and going black on 15.04 - Lenovo Y40-70 The Problem:

The problem began a few weeks ago when my display started to flicker on the login screen. Recently the flickering became much worse, especially when browsing the web. Any update to the image on the display causes flickering. When it's at it's worst, even typing causes it to flicker and the screen will go completely black.

What I've tried:

I have two graphics cards installed, but switching between them (using AMD Catalyst Control Center) does not help. The problem also persists when booting into my Windows 8 partition. Restarting the computer sometimes helps temporarily. The display does not seem to be affected at all by jiggling or tapping. I stripped a screw trying to open the computer up, so I haven't been able to check for loose connections or other damage yet.

The Cards:

Intel Corporation Haswell-ULT Integrated Graphics Controller

AMD Radeon R9 M275X

UPDATE 1

My computer is a Lenovo Y40-70 Laptop.

Also had Ubuntu 12.04 installed, which was listed as a problem in some similar questions I found. Removing Ubuntu 12.04 had no effect.

I now think that this is a hardware issue with the screen itself. When I turn the display back-light completely off and shine a light at the screen I can see that the pixels are still being rendered and there is no flicker.

One thing that you may want to check is pushing the settings buttons on the side. If the menus are problematic as well, your screen is likely going out. If you have a spare screen or device, you will want to go with process of elimination. But if you don't, that my be something that you can try.

If it persists / is associated with the computer, then maybe it is a motherboard issue?

As for the stripped screw, you can try using a nail and tapping it lightly at an angle to move the screw out (unscrew) very slowly. The other option is to take an old bit and superglue ( or JB Weld) it to the screw and carefully remove it.

Good Luck,
Joey

Since you have Windows also on your computer.  May have opened up a stronger possibility of getting a computer virus that is causing this issue.  I would try running a virus software like COMODO antivirus.  I am not saying that this is the only answer or solution.  Just that this is a strong possibility.


Could not find settings panel "unity-appearance" I just updated/upgraded (technically dist-upgrade but it was already 13.04) this morning and now my appearance setting is missing. I can select it from the unity menu but nothing happens and it's missing from the settings options. Any ideas how to get it back? I have gnome-control-center-unity installed and the other thing that has happened is that the background for the other settings has turned black. Here are the relevant entries in /var/log/dist-upgrade/ apt.log, apt-term.log and I'm actually not seeing anything in main.log relevant to this - it's all from 5/3/13 instead of today. I'm not entirely sure what other logs could/would be helpful and I'm not sure if this is in fact a bug or if I just screwed something up.

Some other things I've tried:

purge and re-install gnome-control-center-unity
rm -rf ~/.config/* (a little overkill but I was getting frustrated)
purging/removing gnome-shell

Admittedly it's not a requirement to have the appearance settings back but it would make my life a bit more pleasant -I could just install nitrogen or something for wallpaper management but I do enjoy the auto-hide of my old unity set-up for my dual monitors.

You may just try
re-install gnome-control-center
without -unity


How do I remove hidden backup files? I have files ending in ~ in my home directory, and I want to delete them. How do I do that? How do I prevent this backup functionality?

If you also have unwanted backup files in subfolders, it gets a bit more difficult:

find . -type f -name '*~' -delete

The hidden files are in place to keep user program setup and other program information.

I strongly suggest you to not delete those files.

If you a sure to want to delete them, then open the menu
Places->Home Folder (press CTRL+H if you don't see hidden files)
and then select and press the Delete keyboard key.
If you don't want move them into trash press Shift+Delete keyboard keys

From terminal you can delete hidden files ( don't do it ) with:
rm -fr /home/youruser/.*


How do I install ReactJS? I'm trying to install React JS on Ubuntu, but the instructions in the tutorial are only for Windows. How can I continue?

I've checked some other tutorials on the internet and I find that no two websites suggest the same things in order, also I'm not sure if it's safe to install the stuff third party websites say.
I'm totally confused with this setup.

Assuming you do not have anything installed yet, install nodejs and npm using:

sudo apt-get install nodejs npm

Make a project directory to build your app:

mkdir reactApp
cd reactApp

Initialize your npm project and add all your project lib/dependencies.  You can press enter for all of the questions asked during the npm init. Or you can use npm init -y to skip all questions.

npm init OR npm init -y
npm install webpack --save
npm install webpack-dev-server --save
npm install react --save

Alternatively, you can use the library created by the good facebook folks to bootstrap a react project so that you do not have to worry about webpack, babel-core and the rest...
Simply run:

npm install -g create-react-app

Then after it has been installed globally, you can now use it to create a project

create-react-app projectname

Keep project name all in lowercase or you will get an error (this just started of recent).
When that is done,

cd projectname

and Voila!

npm start or yarn will start up your program at port 3000.

To install Node.js:

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install nodejs
node -v
npm -v

For installing React we need to install some dependencies too:

npm install -g babel-cli
npm install babel-preset-es2015 babel-preset-react
npm install -g browserify
npm install -g watchify

Now to install React:

npm install -g create-react-app

To create a project:

Go to DocumentRoot:
Create project by

create-react-app react-project
cd react-project
npm start

Successfully done.


How to remove all traces of KDE installed I have 2 computers with Ubuntu but on both I installed KDE to have another option for the users. Since Unity has come along very well, there has not been a need to use KDE for a while now. How can I delete all KDE related packages with one single sweep, freeing space and anything KDE related in Ubuntu, including overwriting the Logo of ubuntu when the PCs start or shutdown since after installing KDE the Kubuntu logo is the default one. How to revert back completely from all KDE stuff with a simple short command line or GUI tool.

NOTE - I ask this because it is very time consuming to start selecting, one by one, each package that relates to the KDE desktop environment, checking if it also relates to any GTK, checking dependencies for each, etc.. Deleting the package kubuntu-desktop does not remove every installed KDE package that was installed with it since this is a pseudo package that installs the rest of the real packages but does not uninstall them which makes me wonder why a package can install a whole bunch of other packages but not uninstall them with some added option to actually uninstall them not just the dummy package itself.

I rather liked the simplicity of the following remove:

apt-get remove kdelibs-bin kdelibs5-data

Credit to craigevil on the Debian Forums. (http://forums.debian.net/viewtopic.php?f=10&t=102884)

The thing here is that, by focusing on the two packages on which virtually all of KDE is built, the rest of KDE gets uninstalled too, as they depend on the above.

I used this command (it removes all of KDE and installs unity):

sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok \
amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia \
cdrdao docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 \
gpgsm gstreamer0.10-qapt gtk2-engines-oxygen gwenview ibus-qt4 icoutils \
jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data \
katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk \
kde-config-touchpad kde-runtime kde-runtime-data kde-wallpapers-default \
kde-window-manager kde-workspace kde-workspace-bin kde-workspace-data \
kde-workspace-kgreet-plugins kde-zeroconf kdebase-runtime kdegames-card-data \
kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins \
kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd  kdepim-kresources \
kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdesudo kdm \
kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool \
knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp \
ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data \
kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs \
kubuntu-firefox-installer kubuntu-netbook-default-settings \
kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager \
language-selector-kde libakonadi-calendar4 libakonadi-contact4 \
libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 \
libakonadiprotocolinternals1 libassuan0  libbluedevil1 \
libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl \
libdebconf-kde0 libdiscid0 libdlrestrictions1 libdmtx0a libencode-locale-perl \
libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl \
libgadu3 libgpgme++2 libgrantlee-core0 libhtml-form-perl libhtml-format-perl \
libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl \
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl \
libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 \
libindicate-qt1 libio-socket-ssl-perl libiodbc2 libk3b6 libkabc4 \
libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 \
libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdecorations4 \
libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 \
libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 \
libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 \
libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 \
libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 \
libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates \
libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 \
libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 \
libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 \
libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n \
libktorrent3 libkunitconversion4 libkxmlrpcclient4 liblastfm0 \
libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl \
libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 \
libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 \
libmsn0.3 libmuonprivate1 libmusicbrainz3-6 libnepomuk4 libnepomukquery4a \
libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 \
libntrack0 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 \
libplasma3  libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 \
libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime \
libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 \
libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools \
libqt4-sql-sqlite libqt4-test libqtassistantclient4 libqtglib-2.0-0 \
libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network \
libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 \
libreoffice-kde libreoffice-style-oxygen libsolid4 libsolidcontrol4abi2 \
libsolidcontrolifaces4abi2 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 \
libsyndication4 libtag-extras1 libtemplateparser4 libthreadweaver4 \
libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl \
libwww-robotrules-perl libxml2-utils libxss1 muon muon-installer \
muon-notifier muon-updater ntrack-module-libnl-0 odbcinst odbcinst1debian2 \
okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme \
oxygen-icon-theme-complete partitionmanager phonon phonon-backend-gstreamer \
pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons \
plasma-dataengines-workspace plasma-desktop plasma-netbook \
plasma-scriptengine-javascript plasma-scriptengine-python \
plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel  \
plasma-widget-menubar plasma-widget-message-indicator \
plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace \
plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text printer-applet \
python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch \
qapt-deb-installer quassel quassel-data rekonq shared-desktop-ontologies \
software-properties-kde soprano-daemon system-config-printer-kde \
systemsettings update-manager-kde usb-creator-kde userconfig virtuoso-minimal \
virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common \
&& sudo apt-get install ubuntu-desktop


Directory Permission Change Not Working I'm sure I'm missing something quite basic here, but I'm running Ubuntu through Virtual Box on my Mac, and so I need to give my Ubuntu user read/write access to the folder shared by the host and guest systems (named sf_VB_Shared_Folder).  I performed and got the following:

user@user-VirtualBox:/media$ ls -l
total 0
drwxrwx--- 1 root vboxsf 68 Aug  3 07:59 sf_VB_Shared_Folder
user@user-VirtualBox:/media$ sudo chmod ugo+rwx sf_VB_Shared_Folder
user@user-VirtualBox:/media$ ls -l
total 0
drwxrwx--- 1 root vboxsf 68 Aug  3 07:59 sf_VB_Shared_Folder

Why are the permissions not changing?

I know it's not quite answering the question as asked, but from the looks of things, adding any users which need that access to group "vboxsf" might actually be the better way to go.  The command:

usermod -aG vboxsf user

should do the trick, assuming the user you want to give access to is named "user".  After that, try writing to the directory as the user.  I think it should work.

You can find the answer here. I think this is a duplicate question.

  External hard drive not allowing permission


Cannot start virtualbox VM's: Kernel driver is not installed I'm a Linux Novice

Was running 12.04 with virtualbox 4.2.  Everything was rosie.

Upgraded to 12.10; now Virtualbox will run, but can start any VM's.  Get error 'kernel driver not installed'  I've ran /etc/init.d/vboxdrv setup but get error 'Your kernel headers for kernel 3.8.0-32-generic cannot be found'

I tried running apt-get linux-headers-3.8.0-32-generic but get error 'Pakcage linux-headers-3.8.0.32-generic is not available, but is referred to by another package'.

uname -r responds with 3.8.0-32-generic

ls /usr/src contains linux-headers-3.5.0-42; linux-headers-3.5.0-42-generic & vboxhost-4.3.0

How do I resolve this? I now understand I should have installed DKMS before performing the OS upgrade and kernel headers would have been updated.

Install all kernel package include kernel-header, with a newest kernel (3.11.0-13 (binary) with synaptic. Then reboot . The system will start with new kernel and ... work. (my problem is using vmware)

If you have a problem with 3.5.0-42 you can start with old one.

Most of the time this is the fix for me.

sudo apt-get update
sudo apt-get install dkms
sudo reboot

If that fails try:

sudo apt-get remove virtualbox
sudo apt-get install virtualbox
sudo reboot

Don’t worry you will not lose any of your created virtual machines.


Flash version 9,0 or greater required in Ubuntu 14.04 I'm trying to watch videos on techtalks.tv. Those are talks where the presentation slides are shown along the videos. Unfortunately this only works on my Windows machines (using Internet Explorer). Is there any way to make it run unter Ubuntu 14.04.

I already have the standard flash package installed, but it doesn't work in neither chrome nor firefox

I think you should check again that Adobe Flash Plugin is installed and/or reinstall it:

sudo apt-get install --reinstall flashplugin-installer

You can check flash support on official site on this page.

On my 16.04 LTS system the site shows video and right-clicking on it shows Adobe Flash Player drop-down menu.
It works on Firefox, SeaMonkey and Opera.
But Chrome reports

Flash version 9,0 or greater is required
You have no flash plugin installed
Click here to download latest version

as you wrote.

I guess I already found a good description to fix the problem in chrome on this website:

The site asks to download Flash
To the left of the web address, click Lock Lock or Info Information.
To the right of "Flash," click the Arrows Arrows.
Choose Always allow on this site.
Reload the page.

On your computer, open Chrome.
In the address bar at the top, enter chrome://components and press Enter.
Look for "Adobe Flash Player."
Click Check for update.
If you see "Component not updated" or "Component updated," you're on the latest version.
Go back to the page with the Flash content. If it doesn't open automatically, at the top left, click Reload Reload.


pip raises ImportError: cannot import name HTTPSHandler After installing the python-pip package in Ubuntu 14.04.1 I get:

$ pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 10, in <module>
    from pip.util import get_installed_distributions, get_prog
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 18, in <module>
    from distlib import version
  File "/usr/lib/python2.7/dist-packages/distlib/version.py", line 14, in <module>
    from .compat import string_types
  File "/usr/lib/python2.7/dist-packages/distlib/compat.py", line 31, in <module>
    from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler

I checked, I do have libssl-dev and python-openssl installed and the problem seems to be that the ssl module can't be imported:

>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/ssl.py", line 61, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl

Everything is installed from the Ubuntu repositories, though, so I don't know what's causing the problem.

After some struggling I figured it out. In short (not really sure if the first command is necessary):

sudo apt-get install libssl-dev
sudo apt-get --reinstall install libpython2.7-stdlib

The long explanation is that, based on the places Python is looking for libraries:

python -c "import sys; print sys.path"

and seeing that there was an _ssl.so file in /usr/lib/python2.7/lib-dynload on a "healthy" other 14.04.1 server, I figured out that the package responsible for this is libpython2.7-stdlib:

$ dpkg -S /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so
libpython2.7-stdlib:amd64: /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so

After reinstalling libpython2.7-stdlib on the original machine, the file was recreated and the problem went away.

sudo apt-get --reinstall install libpython2.7-stdlib

(I really don't know how or why was this _ssl file missing from the system - I'm not the only person using the server...)

You maybe have more than one python version installed in your system.
the pip use the wrong python version
run python -V to see the python default version to use
you may need to change the pip to use the correct version by opening /usr/bin/pip with your favorite text editor then change:
#!/usr/bin/python to the correct version e.g. #!/usr/bin/python2.6


Adding additional DNS search domains when using DHCP How can I add additional DNS search domains to a network connection which is configured using DHCP?

At work, we have several sub-domains (test.example.com, dev.example.com, etc), and I've grown tired of perpending the sub-domain every time I need to access a server in one of the sub-domains.

Here is a complete solution that works at least with 12.04:

sudo nano /etc/dhcp/dhclient.conf
# add next line (alternatively you can use append instead of prepend)
prepend domain-name "example.com other.example.com";
# before: request subnet-mask...

(you can also use sudo -e /etc/dhcp/dhclient.conf if you trust the default editor)

If you're on any sort of "professional" network that has its own DNS servers and/or if you've setup your own DNS service(s) on said network and also on your workstation, then, you might also want to comment-out this line:

# domain-name, domain-name-servers, domain-search, host-name,

--Doing so lets you use your own domain-name-servers, enabling your personalized domain-search to work much more smoothly, which is probably better than using whatever somebody else has setup for you.  E.G.: I'm on the network 192.168.10.0; the company has name server 192.168.10.10 and 192.168.10.11 -- but, I run my own name server with a more extensive list of names on 192.168.10.20 (which will forward to 192.168.10.10 and .11 as needed). All my network configurations declare 192.168.10.20 and 8.8.8.8 and 8.8.4.4 (the Google name servers), but, DHCP will tend to override that preference, feeding me 192.168.10.10 as the default server. In the end... not requesting those aspects from DHCP makes for a much better network life.

Now restart the networking:

sudo service networking restart

(you can also use sudo /etc/init.d/networking restart with old rc scripts)

Try below in this case when users gets ip address from dhcp server it gets mulitple dns servers

/etc/dhcp3/dhcpd.conf:

ddns-update-style none;

ignore client-updates;

authoritative;

default-lease-time 1209600;

max-lease-time 1814400;

option local-wpad code 252 = text;

--- Domain name servers, tells the clients which DNS servers to use.

option domain-name-servers 10.0.0.15, 8.8.8.8, 192.168.1.1;

option time-offset 0


How can I empty the trash using terminal? I am not able to search trash anywhere. Can you please tell me a command or anything like that to empty the trash using terminal ?

You can use the rm command:

rm -rf ~/.local/share/Trash/*

The rm command removes (deletes) files or directories.

-f, --force     Ignore nonexistant files, and never prompt before removing.
-r, -R, --recursive     Remove directories and their contents recursively.

The trash folder is found at: $HOME/.local/share/Trash

Be careful how you use the rm command - the files aren't sent to a trash can where you can undelete them, so it's not easy to undo.

With trash-cli installed type trash-empty I've used this successfully to empty the trash across different drives and numerous locations.

to install trash-cli type
 sudo apt-get install trash-cli

Or you could use this script to do it for you.


Issues regarding antivirus I have Ubuntu 12.04 and I am unable to install install antivirus software. Help me to install the software.

Don't know - I had already an Apple-Trojan in my machine ...
This Trojan was only found by avast, but not by clamTK ... it sounds weird, but I have avast installed for Linux. You can get it here :

http://avast.softpedia.com/#nx_linux

or here it is - as short description specially for Ubuntu :

http://forum.avast.com/index.php?topic=91145.0

More details for little trouble-shooting you find there in forum.avast.com

You will get free License-Code for 1 Year, when you mail to support@avast.com

For emergency cases you can obtain a rescue-CD from Kaspersky for free - it bases on Linux as live-CD :

http://support.kaspersky.com/4162

Rescue-CD of Kaspersky creates a directory for Kaspersky in your home-directory of your Linux-Installation, when running as Live-System, only for to store the recent search-results and for found malware in Quarantaine (to send to Kaspersky-Labs - if new - then delete them).

something forgotten - there can be rootkits too, but this is rare :

  sudo apt-get install rkhunter

and

  sudo apt-get install unhide

Think now this thread is complete.

Ubuntu does not need an antivirus, as most of the time everything you will install comes from the Software Center. the software within the Software Center is considered safe and has been reviewed and used many times.
On another note, the most popular antivirus for linux, Avast! Antivirus, was dropped by the Avast company, so if you still feel the need for an antivirus, you have nearly zero choices.


Verifying NVIDIA driver on Ubuntu 19.10 I'm using Ubuntu 19.10 and I want to make sure that my graphics card is putting in its time and not free-riding off my CPU. I downloaded the driver, that I believe should be right, from NVIDIA's website. Currently, I have the 3rd party driver downloaded. I'm thinking that maybe I should switch the drivers out, but I'm not sure how to do that on my version of Ubuntu.

My laptop should have the Quadro P620 in it, but the System → Details → About page says that the graphics are coming from Intel UHD Graphics 630. That doesn't seem like they'd be the same thing to me, but I am very new to Ubuntu.

Here's a screenshot of what I've got going on.

And one more for good measure.

And the one I was asked to include (lspci -k | grep -EA3 'VGA|3D|Display').

Disable Secure Boot in UEFI aka BIOS settings and the Nvidia driver will be up and running.

See Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? for explanation why isn't it loading now.

You should be using your package maintainer's provided version of Nvidia drivers to ensure there are no issues. The best reason for that is so apt, the package manager for Ubuntu, can resolve package dependencies/file collisions. In the case of Ubuntu, Nvidia is not maintained as a core package due to it not being open source (IIRC). Fortunately Nvidia has a working uninstall script that you should use to remove it.

Follow the instructions on adding this repository for Nvidia drivers:

https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

Blacklist the nouveau modules provided by the Linux kernel. They will override the Nvidia drivers that you've installed. Nouveau is an open source driver for Nvidia cards and while they provide a great service to users dedicated to FOSS systems their drivers do not perform as well as Nvidia's proprietary drivers. Much of this is due to Nvidia refusing to open source their own software. If you didn't want to read that skip to below.
Optimize, if supported for your card, by enabling PCIe Gen 3.x. By default, Nvidia drivers are set to PCIe Gen 2 to prevent any permanent hardware damage that may be caused by running a card that does not support the higher bus speed. If you do damage it and blame me because you did not read, please let me know because that would be hilarious.
Remake your initramfs and reboot

Commands to run:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get update
$ sudo apt install nvidia-driver-440

440 is currently the newest version, you can check yourself on the site linked above. This will install a large list of packages. Please take the time to read
and understand the function of dkms. The application nvidia-settings will be helpful, too.

$ sudo apt autoremove
$ sudo -i
# echo -e "blacklist nouveau\nblacklist nvidiafb\noptions nvidia NVreg_EnablePCIeGen3=1" >> /etc/modprobe.d/nvidia-only.conf
# update-initramfs -u -k all

We choose to black list nouveau, the open source driver, in favor of letting Nvidia take control of the framebuffer. nvidiafb is actually a kernel module meant to be used with either the open source driver or older Nvidia cards. FYI nvidia-drivers provides its own framebuffer. You can check its name with sudo cat /proc/fb.

nvidia-settings will provide you the option of choosing performance, which should make your Nvidia card preferred over for all graphics related things instead of i915, your CPU's integrated GPU. This is probably one of the more important steps, and you may need to install the Nvidia proprietary drivers, reboot, set to performance, and reboot again.

nvidia-smi is failing to load because nouveau is loaded.

You do not need to disable SecureBoot because:

Ubuntu's distribution kernel does not force modules to be signed validly (CONFIG_MODULE_SIG_FORCE is not set)
You've shown that it is loaded


Ubuntu installation is slow, why? I am currently installing Ubuntu 12.04.3. Everything was going fine until I came across this...

  Installing System

It is sssooooooo close to being finished! Like 1/6 of the way there! I just wanted to know if this is normal or if something is wrong. I'm installing it through a flash drive if that helps

Also,what will happen if I press the skip button that pops up when I click Installing System?

do try not to install - updating while installing.  Just do installing without connecting to Internet.

I too had this, and when I tried installing for my friend at his home (without internet) it was just as fast as other installations.

try it and let us know how it goes

I cleaned the fan because I guess my computer was overheated and then the speed is normal. Have a try. I don't think the problem is on the memory size or processor, because Ubuntu installer first test pre-requirements before install it.


How to create a launcher to execute a terminal command? for example, this terminal command: ping www.google.com so my question is how can I create a launcher in my desktop can do this command, so there is no longer needs to open terminal every time and write this it.

Well you could create a new document on your Desktop, name it something.desktop like ping1.desktop

Then put this in, Name= & Icon= lines can be whatever you want (usually best to full path Icon=) or you can leave Icon= blank

[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Exec=ping www.google.com
Name=whatever you want
Icon=

After creating right click on the launcher > Properties > Permissions > & check the Execute: box

(- you could also extend it's use to other pings if you use in unity's launcher  via added quicklist entries in the .desktop

Or even easier:
To run atari800 emulator
1) in terminal type "which atari800"
2) right click mouse on desktop and select "create launcher"
3) enter following in launched properties:
a) Name: Atari800
b) Command: /usr/bin/atari800 (the path returned by step 1 in the terminal).
c) comment: whatever you want (e.g. Atari800 emulator".
d) tick Launch in terminal
4) Click OK in launcher properties,

Note this is in linux mint mate, may not be same for other distributions.


Which email client is fast enough for a Maildir containing one million emails? I have a Maildir, which subfolders contain about one million emails. Mutt is so slow on it. Any better choice?

PS: An email deduplicate tool contained is better. Normal scripts keep the index in memory which end up being killed.

For such number of mails notmuch is an obvious choice. You can try using alot as a frontend.

I reccomend Thunderbird.

Search for it in the Dash. It's pre-installed.

Log in to your server.

And there you go! Your e-mails!

Hope this helps!!!


Accidentally deleted my Windows 8 boot entry from dual boot with EasyBCD I installed Ubuntu with a live USB and it's running great, but I had one problem, Windows was always booting. I tried to set up a dual boot with EasyBCD, but I deleted my Windows 8 boot entry.

Through GRUB I can choose Windows Boot Manager, but I get this error:

Windows failed to start. A recent hardware or software change might be the cause.
To fix the problem:

  1. Insert your windows installation disc and restart your computer.
  2. Choose your language settings, and then click "Next."
  3. Click "Repair your computer."

If you don't have this disc, contact your system administrator or computer manufacturer for assistance.

    File: \Boot\BCD

    Status: 0xc0000098

    Info: The Windows Boot configuration Data file does not contain a valid OS entry.

I tried to rerun a Windows 8 install from USB, but only the Ubuntu GRUB launches, even after I changed the boot order.

I tried to fix it with Boot-Repair and got this: http://paste.ubuntu.com/8883078/

For now I can't do the bootrec method.

So is there a way to "re-enable" Windows 8 from GRUB?

Test this:

Insert the Windows 8 usb install

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
dd if=/media/user/windows-usb of=/windows.iso
apt-get update
apt-get install unetbootin

Run Unetbootin.

Select the Diskimage option.

Then browse for /windows.iso

Under Type select Hard Disk

Leave / for the Drive.

Press OK

Restart your computer.

Select Unetbootin in the Grub 2 menu.

When the computer boots off Windows 8 iso.

Press the Troubleshoot option.

Select Advanced Options.

Select Command Prompt.

Recreate the Boot Configuration Data store:

bcdboot c:\Windows /l en-us /s v: /f ALL

Have you checked correct settings using Recovery Center? If not, try these steps:

Press Windows Key + C.
Click Settings, and then Change PC Settings ->> Update & Recovery ->> Recovery ->> Get Started.

Detailed diagnostic info published here.


Critically Low Battery Notification not showing in Ubuntu 14.04.1 Ubuntu is not showing the notification if there is a critically low battery.

I already tried this reinstalling libnotify-bin notify-osd, but that didn't help.

I am using a dell Inspiron 15 3537 laptop.

Please note that by default battery notification should be enabled in your system. Try reinstalling the packages of NotifyOSD which was the source for notification alert in Ubuntu and then check the reported issue, If you have not already tried with NotifyOSD

Command to install NotifyOSD

sudo apt-get --reinstall install libnotify-bin notify-osd

Hope this helps!


Lost Windows 10 during installation of Ubuntu 17.10 for UEFI I wanted to install Ubuntu 17.10 alongside Windows 10. But it all got messed up while I was installing Ubuntu 17.10!

The problem is UEFI mode. I don't know UEFI. I still want to dual boot between Windows 10 and Ubuntu 17.10, So what can I do now?

Note: My laptop is Asuspro core i7 2.4 ghz processors, 8GB ddr3 ram, and entering the BIOS I didn't find so called UEFI!

I tried from Windows 10 Control Panel > Recovery but didn't find UEFI Firmware settings. How can I find it to configure?

had same issue dual boot, and they say boot livecd and install something,
but I found it so easy livecd - install grub-customizer and use the
"write to mbr" option. reboot and all fixed.

Clonezilla saves original mbr and can use linux dd command to put it back or clonezilla itself will put it back for you. But am not skilled at most clonezilla options.


Disk Utility: What's the difference between "Unmount" and "Safe Removal"? System > Administration > Disk Utility

What's the difference between "Unmount Volume" and "Safe Removal"? Say you insert a flash drive and open the Disk Utility UI, if you click on "Safe Removal" you receive an "Error Detaching Drive" notification, because it's busy. You must first click the "Unmount Volume" button, and then follow it with the "Safe Removal" button.

A couple questions here: Does this mean all these times I've been "ejecting" the drive (via context menu) before removing it, I haven't been "safely" removing it? And what are the command line equivalents for the two different operations?

(This question was somewhat addressed here but the answers seem to contradict what I'm pointing out about the Disk Utility options. Thanks.)

"Unmount" unmounts a filesystem.  If your USB mass storage device (e.g. USB memory sticks or USB hard disks) contains more than one partition, this will only unmount the filesystem on the currently selected partition.

"Safe removal" does the same as "eject" I suppose.  In case of USB mass storage devices it powers down the device, which makes it inaccessible (it will disappear from the device list until you unplug & plug it in again).  Powering down the device before unmounting would have the same result as disconnecting the usb device without unmounting: possible data loss.

From a usability point of view, it would be better if clicking the "safe removal" button for a device that still has mounted filesystems on it would just ask if it's okay to unmount those filesystems, or maybe even just do that without asking, because that's most likely what the user wants...

The commandline-equivalents of the Disk Utility buttons are:

udisks --unmount for the "Unmount" button
udisks --detach for the "Safe Removal" button

If I use safe removal on a pendrive, then I'm not able to use any other pendrive. Ubuntu doesn't recognize that I have plugged a pendrive at all. (nothing shows on /var/log/messages)

This was on ubuntu version 10.04, maybe it's fixed now.


How do I fix an error while updating packages cache? When I try to update in Ubuntu 11.04 after installation, I get the following error

E: Some index files failed to download. They have been ignored, or old ones
used instead.

I tried the following command still the same error

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

Please help me.

Proxy problem. Permissions to download the package weren't there.

exactly check if you have /etc/apt/source.list file over there. if it is, open it and check its structure.


after upgrade gdb won't attach to process I just recently upgraded from 10.04 to 11.04 and gdb won't allow me to attach to processes anymore I get the error

  Attaching to process 10144 Could not
  attach to process.  If your uid
  matches the uid of the target process,
  check the setting of
  /proc/sys/kernel/yama/ptrace_scope, or
  try again as the root user.  For more
  details, see
  /etc/sysctl.d/10-ptrace.conf ptrace:
  Operation not permitted.

How do I fix this so that I can debug again without sudo?

In Maverick Meerkat (10.10) Ubuntu introduced a patch to disallow ptracing of non-child processes by non-root users - ie. only a process which is a parent of another process can ptrace it for normal users - whilst root can still ptrace every process. Hence why you can use gdb to attach via sudo still.
You can temporarily disable this restriction (and revert to the old behaviour allowing your user to ptrace (gdb) any of their other processes) by doing:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

To permanently allow it edit /etc/sysctl.d/10-ptrace.conf and change the line:
kernel.yama.ptrace_scope = 1

To read:
kernel.yama.ptrace_scope = 0

For some background on why this change was made, see the Ubuntu wiki.

If you prefer to leave /proc/sys/kernel/yama/ptrace_scope set to its default value of 1, then as a workaround you could consider using gdb to run the program you want to debug.  You can then bring up the debugger simply by pressing ^C.  For example, to debug to the (boring) program sleep 60, do the following:

$ gdb -q sleep -ex 'run 60'

Here is a complete example.

$ gdb -q sleep -ex 'run 60'
Reading symbols from sleep...(no debugging symbols found)...done.
Starting program: /bin/sleep 60
^C
Program received signal SIGINT, Interrupt.
0x00007ffff7ad5d60 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
81      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) backtrace
#0  0x00007ffff7ad5d60 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000000000403cd7 in ?? ()
#2  0x0000000000403b88 in ?? ()
#3  0x00000000004016c9 in ?? ()
#4  0x00007ffff7a35ec5 in __libc_start_main (main=0x401540, argc=2, argv=0x7fffffffea08, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe9f8) at libc-start.c:287
#5  0x00000000004017d5 in ?? ()
(gdb) continue
Continuing.
[Inferior 1 (process 3531) exited normally]
(gdb) quit

Since /bin/sleep was (unsurprisingly) compiled without debugging information, the above backtrace contains minimal information.


Suspend broken on Ubuntu 16.04 LTS, Dell XPS 9350 Since I upgraded from Ubuntu 15.10 to Ubuntu 16.04 LTS on my Dell XPS 9350, suspend is broken. When closing my lid the laptop will suspend, but resuming fails and it reboots. I tried pm-suspend and tried resuming, resuming failed and the laptop rebooted. I got the following errors when I got back into Ubuntu. The odd thing in my opinion is that it claims the kernel is not an official ubuntu package. Either way my Linux knowledge is not sufficient to know what's going wrong here.

EDIT: I just tried installing kernel 4.4.8 which should fix some things, but it did not fix this problem. By now I also tried 4.4.9 and 4.6 RC7. None of them fixed it for me.

I had this same problem on an XPS 15 9550. The only thing that worked for me was going into the bios and turning on "Block Sleep" under power options. This apparently turns off Intel Rapid Start and sleep (state 3). So technically the machine doesn't hibernate / suspend (state 3), but it does go to a higher sleep state when closing the lid / opening / power button and comes back fine. Seems like until the issue is addressed in the kernel, or driver this may be the only option and is the only thing that worked in my case.

EDIT: This script worked for me and I was able to turn off Block Sleep in bios! Sleep / suspend now works on my ubuntu 16.04:
https://ubuntuforums.org/showthread.php?t=2317843&page=11

try to make a complete install of the 16.04. from a bootable USB Stick. Make sure you have a internet connection and aktivat the update function befor you start the setup.
I´am not a linux pro, but over the years i learnt that it´s better to install ubuntu complete from a medium like USB-stick, CD, DVD...
I´am use a xps 13 9350 and it works with 16.04. for me perfect. (with kernel 4.4.2)

You can try to make a backup with deja-dup on 15.10 and recover it on 16.04 after you are sure it runs.

Sorry i can´t fix the problem, good luck.


How to install ice cat on Ubuntu 16.04? I'm considering using GNU Icecat, but it doesn't seem to be in the ubuntu repository that I can apt-get install from.

Their website doesn't really come with any readmes. Is it possible to install it so that the software gets updated regularly through apt-get update && apt-get upgrade?

Go at http://ftp.gnu.org/gnu/gnuzilla/ and download the latest package.

Extract it at your desired location.

There, you may be able to launch the browser by just double clicking the icecat executable, or try first, by opening a terminal in that location:

chmod +x icecat

To create a desktop file like for a normally installed browser:

Using gedit text editor:

sudo gedit /usr/share/applications/icecat.desktop

Then paste this, changing accordingly the lines that start with Exex= and Icon= :

[Desktop Entry]
Name=Icecat Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=path/to/your/location/icecat %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=path/to/some/icecat.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;

Save, close, and you should see it in Dash or other launchers, or add it to a panel etc.

Depending on your desktop environment and/or launcher: in order to properly see the icon in the launcher, icecat.png file might be needed in a proper location.

Let's say we have a 128x128 file called icecat.png (that we can get from somewhere like here).

Go to the location ~/.local/share/icons/hicolor/128x128/apps/icecat.png ( or create it first), and then again sudo gedit /usr/share/applications/icecat.desktop, change the necessary line to Icon=icecat.

WARNING: if you use any unofficial repository and install software from         them,you doing this on your own risk.

Well, you doing everything on your own risk anyway :-)
Please have a look here:
This link shows you how to search for such repos:
https://launchpad.net/ubuntu/+ppas?name_filter=icecat&show_inactive=on
then look for:
→ gnuzilla icecat for 64bit
→ https://launchpad.net/~brunoalexandremiguel/+archive/ubuntu/ppa
the last link show how to add this icecat repo like this commands do:

sudo add-apt-repository ppa:brunoalexandremiguel/ppa
sudo apt-get update


How can I recursively search for directory names with a particular string where the string is only part of the directory name How can I recursively search for directory names with a particular string where the string is only part of the directory name?

For example:
the directory name is "8.0.3-99966_en", but I want to recursively search for directories with the string "99966".

You can use the find command:

find YOUR_STARTING_DIRECTORY -type d -name "*99966*" -print

Example:

find ~ -type d -name "*99966*" -print

should find all directories (-type d) starting from your home directory (~)that have their names containing the string "99966" (-name "*99966*") and output them (-print).

An easy way to do this is to use find | egrep string.   If there are too many hits, then use the -type d flag for find.   Run the command at the start of the directory tree you want to search, or you will have to supply the directory as an argument to find as well.

Another way to do this is to use ls -laR | egrep ^d.

And the locate command also comes in handy: locate string


How to enable exFAT in Ubuntu 14.04 I just installed Ubuntu 14.04 and I can't mount my exFAT HDD.

I get the following error:

Unable to access “SeagateHDD”
Error mounting /dev/sdb1 at /media/me/SeagateHDD: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdb1" "/media/me/SeagateHDD"' exited with non-zero exit status 1:
stdout: `FUSE exfat 1.0.1
'
stderr: `ERROR: `Operating Systems' has invalid checksum (0x281c != 0x2450).
'

I installed exfat-utils and exfat-fuse using apt-get but no luck.
I also tried the repository ppa:relan/exfat but I got:

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:
 fuse-exfat : Depends: fuse-utils (>= 2.7) but it is not installable
E: Unable to correct problems, you have held broken packages.

Can anybody give me a hint? All my backed up data is on that HDD.

EDIT:

The output of $ sudo apt-cache policy exfat-fuse is:

exfat-fuse:
  Installed: (none)
  Candidate: 1.0.1-1
  Version table:
     1.0.1-1 0
        500 http://ppa.launchpad.net/relan/exfat/ubuntu/ trusty/main amd64 Packages

Tried it on a Linux Mint and had the same problem. Also tried mounting it on a Mac and it worked perfectly so the data is not corrupted.

EDIT2:

It appears it was a problem with my HDD which apparently I unplugged from the USB port without unmounting and it had a checksum error. What I did was I plugged it on my Mac and it automatically did a fsck_exfat disk check which fixed the problem and I could load it on Ubuntu as well. I think a similar thing could be achieved on Ubuntu as well, but I don't know which tools to use to do so.

Installing the below packages alone will auto-mounts your exFAT formatted drives ,

sudo apt-get install exfat-fuse exfat-utils

Or you may try to mount it manually after installing the above packages,

sudo mkdir /media/exfat
sudo mount -t exfat /dev/sdxx /media/exfat

/dev/sdxx - your exfat partition.

In Ubuntu 14.04, exfat-fuse and exfat-utils packages are available in Universe repository. So enable this repository inorder to install these two packages on Ubuntu 14.04.

sudo add-apt-repository universe

And don't forget to update all repositories,

sudo apt-get update

I had the same issue and I tried fuse and everything recommended in the forums with setting up/verifying fuse and trying to mount it manually but no luck.

The issue happened because I ejected the disk before unmounting it when my macbookpro got struck. So I used MacBook's Diskutility to repair it and it started mounting again in ubuntu with all my data intact.


Is there any way to make snap installed apps look more native? Snaps seem like a great idea in theory, but in my experience in practice they look like something hacked into the desktop.

I have been unable to get them to use my system cursors and when clicking on the indicator the menu looks more like something run with WINE than anything even remotely native. (not sure anymore, but I think they also look out of place in the gtk themes as well)

I have tried two snaps and both are the same: Discord and Libreoffice

While I could deal with the hackey looking menus, the jarring transition of the cursors is too ugly to overcome.

So to my question-  Is there any way to make snaps look more native to my desktop?

More possibly pertinent info:

I am running Ubuntu 17.10, but I am using vanilla-gnome-desktop for my DE.
I am using  the default Adwaita gtk theme.
I am using custom cursors installed in my home folder in .icons folder and enabled via gnome-tweak-tool

You can monitor this link: Use the system gtk theme and the latest, as of now, is this which has a lot of specific links.

  With these latter pieces landing, themes will be unblocked. The very first version of the feature will leverage a single snap containing a number of common themes which can be used as the default-provider in content interfaces in client applications. This is easy to do and will get us good looking applications in the short term.

  Later we’ll then introduce improvements that will allow finding and installing snaps providing arbitrary themes that match the local environment needs. We have initial ideas here but the details still need to be designed.

So, work is in progress and the intention to make snaps appear "more integrated" is there.

Just in case if anybody is interested in this question.
You can install vlc with flatpak from flathub repo. Which inherits system-wide styling. Assuming you are on Ubuntu 16.04:

Install flatpak

sudo add-apt-repository ppa:alexlarsson/flatpak

sudo apt update

sudo apt install flatpak

Install vlc

flatpak install flathub org.videolan.VLC

Run vlc

flatpak run org.videolan.VLC

Links:

Flathub installation guides

Flathub docs


Is it possible to remove a particular host key from SSH's known_hosts file? Is it possible to remove a particular host key from SSH's known_hosts file?

I usually end up deleting the entire known_hosts file, which I have no problems with doing, but just out of curiosity, is it possible to remove just a single entry?

I opened the known_hosts file, but I am struggling to understand its contents.

Below is the message I faced, which led me to ask this question:

Add correct host key in /home/wissen16/.ssh/known_hosts to get rid of this message.
Offending key in /home/wissen16/.ssh/known_hosts:1
RSA host key for foo.com has changed and you have requested strict checking.
Host key verification failed.

Use this command to remove entries from known_hosts:

ssh-keygen -R hostname

sed '/10\.20\.120\.211/d' ~/.ssh/known_hosts > temp && mv temp ~/.ssh/known_hosts

In this case, 10.20.120.211 is the host I want to delete from my known_hosts file, make sure you escape the special characters like (.)


I am getting the same error everytime I try to boot Ubuntu on VirtualBox Every time I try to run Ubuntu, this error comes up.

"Failed to open a session for the virtual machine Linux.

The virtual machine 'Linux' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\matthew\VirtualBox VMs\Linux\Logs\VBoxStartup.log'.

Result Code: E_FAIL (0x80004005)
Component: Machine
Interface: IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048}"

I do not know why, I have the .iso file n my desktop, and connected to the IDE Secondary Master. It just isn't making any sense, I am very angered at this because I have been trying to boot Ubuntu so I can manually root my phone. But, I have obviously hit a major road block. Any help is appreciated.

For me the problem occurred when running the VM with VBoxManage, and the fix was that I had forgotten to specify --type headless on the command line.


Changing files names of more than 100 files So there's a folder in my directory which contains around 400-500 files (java, cpp, xml & etc) each with one name common for e.g
xml_1_ubuntu.xml
java_1_ubuntu.java
cpp_1_ubuntu.cpp
...

I wanna change the ubuntu in their name (irrespective of their extension/file type) to notubuntu so the work dir will have files like
xml_1_notubuntu.xml
java_1_notubuntu.java
cpp_1_notubuntu.cpp
...

is there anyway I can do this?

Yes with the rename command using a normal regex:
rename -n 's/_ubuntu/_notubuntu/' *

-n makes it a dry-run. Remove it if this does what you want.

Without the rename command:
ls -1 | awk '{ name=$0; gsub(/ubuntu/,"notubuntu",name); print "mv " $0 " " name }' | bash

Without | bash at the end it will only display the commands without actually performing them (dry-run).


Is it already possible to test Ubuntu for Android? I'm very excited about Ubuntu being able to run trhough an Android smartphone just by connecting it to a monitor, a keyboard and a mouse. Now I'm wondering if there is a way to test it? Are there any daily-builds of it? Alpha package?

If you don't know what Ubuntu for Android is take a look at it's page.

Other things I'm unsure about Ubuntu for Android is:

Will it work for tablets too?
Does it require a dual-core smartphone?
Do you necessarily need a Dock?
Is there a release date for the first version of it?

I've looked for some info in Ubuntu for Android LaunchPad page, but I didn't find anything useful.

In This Page Canonical lets you to leave your contact if you are interest in Ubuntu for Android.

Not currently, it is for OEMs to install on their devices, not for the consumer.
When it is released, it shall be hacked on to these old devices.

The only supported device at the moment is the Nexus 7 tablet, no smartphone.

Install instructions:
https://wiki.ubuntu.com/Nexus7/Installation

More info:
http://www.omgubuntu.co.uk/2012/10/ubuntu-installer-for-nexus-7-tablet-made-available-for-devs
http://forum.xda-developers.com/showthread.php?t=1957561


How do I remove a pool from ZFS? My Ubuntu 12.04 system has two zpools: rpool (containing the root filesystem) and rdata (containing all other data). rdata was originally 2 x 1TB disks mirrored.

Because I couldn't upgrade rdata to 3TB disks (wrong ashift) I had to create a new zpool from the new 3TB disks: initially called datapool. I then rsync'd all the data across, exported rdata, imported datapool as rdata and Bob's your Uncle. I then powered off and removed the old disks. However...

When I powered back on, zpool status shows

  pool: rdata
 state: UNAVAIL
status: One or more devices could not be used because the label is missing
    or invalid.  There are insufficient replicas for the pool to continue
functioning.
action: Destroy and re-create the pool from
    a backup source.
   see: http://zfsonlinux.org/msg/ZFS-8000-5E
  scan: none requested
config:

NAME                                                 STATE     READ WRITE CKSUM
rdata                                                UNAVAIL      0     0     0         insufficient replicas
  mirror-0                                           UNAVAIL      0     0     0  insufficient replicas
    scsi-SATA_WDC_WD10EADS-00_WD-WCAU47275172-part1  UNAVAIL      0     0     0
    scsi-SATA_WDC_WD10EADS-00_WD-WCAU47283913-part1  UNAVAIL      0     0     0

  pool: rpool
 state: ONLINE
  scan: scrub repaired 0 in 0h23m with 0 errors on Tue Jun  4 11:33:29 2013
config:

NAME                                 STATE     READ WRITE CKSUM
rpool                                ONLINE       0     0     0
  ata-Maxtor_6Y120L0_Y31J3CLE-part2  ONLINE       0     0     0

errors: No known data errors

As you can see, zpool status is still showing the old rdata; which is not available.

zpool import shows

   pool: rdata
     id: 7033445233439275442
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

rdata                                   ONLINE
  mirror-0                              ONLINE
    scsi-SATA_ST3000DM001-1CH_W1F1EE1G  ONLINE
    scsi-SATA_ST3000DM001-1CH_W1F25SE2  ONLINE

This is the correct rdata

Question: How do I get Ubuntu to forget all about the old zpool?

sudo zpool destroy rdata

will destroy the old pool (you may need -f to force).

sudo zpool export rdata

will disconnect the pool.

sudo zpool import 7033445233439275442

will import the new pool. You need to use the id number as there are two "rdata" pools.

As you're running with a ZFS root, all that's left to do is rebuild the initramfs to update the pools:

sudo update-initramfs -c -k all
sudo update-grub

Reboot and all is well. :)

You can destroy pool within just a command.

sudo zpool destroy <poolname>

Check the status of pool

sudo zpool status <poolname>


Ubuntu 14.04 stuck in gui login loop and after fix attempt no login gui My Ubuntu 14.04 was stuck in a login loop under all profiles including the Guest profile. I do get a terminal session through ssh from another computer, and I can Ctrl-Alt-F3 to a terminal. I tried all the suggestions of re-owning the .Xauthority file and checking if .profiles has not been corrupted. I tried to reinstall lightdm and reconfigured it, and installed gdm but it came up with errors after these commands based on this page:

$ sudo apt-get purge lightdm; sudo apt-get install lightdm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
  lightdm* ubuntu-desktop*
0 to upgrade, 0 to newly install, 2 to remove and 10 not to upgrade.
After this operation, 635 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 794245 files and directories currently installed.)
Removing ubuntu-desktop (1.325) ...
Removing lightdm (1.10.6-0ubuntu1) ...
Purging configuration files for lightdm (1.10.6-0ubuntu1) ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
userdel: user lightdm is currently used by process 1539
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed
  lightdm
0 to upgrade, 1 to newly install, 0 to remove and 10 not to upgrade.
Need to get 0 B/108 kB of archives.
After this operation, 573 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package lightdm.
(Reading database ... 794213 files and directories currently installed.)
Preparing to unpack .../lightdm_1.10.6-0ubuntu1_amd64.deb ...
Unpacking lightdm (1.10.6-0ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up lightdm (1.10.6-0ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...

After which I need to select the lightdm from the list. It's still stuck in the loop.

and

$ sudo apt-get purge lightdm; sudo apt-get install gdm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
  lightdm*
0 to upgrade, 0 to newly install, 1 to remove and 10 not to upgrade.
After this operation, 573 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 794242 files and directories currently installed.)
Removing lightdm (1.10.6-0ubuntu1) ...
Purging configuration files for lightdm (1.10.6-0ubuntu1) ...
Removing user `lightdm' ...
Warning: group `lightdm' has no more members.
userdel: user lightdm is currently used by process 1683
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
gdm is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 10 not to upgrade.

now I can't even get the gui login and it passes to a flashing screen showing Stopping System V runlevel compatibility.

Trying sudo apt-get install lightdm ubuntu-desktop shows no errors but it's still stuck in the loop.

After several attempts with no clear solution I have managed to get back to a successful login with a unity launcher session and everything looks fine so far. The steps I took are as follows:

I removed the proprietary graphics card driver using sudo apt-get remove fglrx*. Upon reboot this didn't seem to change anything.
I decided to remove not only the .Xauthority file but all related files using sudo rm .Xauth* after which I could log in but had no unity launcher or status bar etc, only the background and icons.
I tried to reinstall unity and ubuntu-desktop using sudo apt-get install --reinstall unity and sudo apt-get install --reinstall ubuntu-desktop, which also didn't change anything.
I tried to use a graphical method of resetting unity based on this link, which didn't seem to change a thing.
I this same link it states to dconf reset -f /org/compiz/ I got some message to state that the path was not correct, after that using unity --reset-icons &disown seems to have corrected everything and I could log in with a full unity launcher session.

Have you recently installed any graphic card drives?
I got this error (login loop) too on Ubuntu 15.10 when I was messing around with my drivers.

Try to uninstall the drivers first.

I think this command is for AMD/ATI drivers:

sudo aticonfig --uninstall

If this doesn't fix your problem then I'm sry, you will have to do a fresh install :(


How to detect architecture of a .deb package? There is a .deb package in a repository which is declared to be 32bit, but installs 64bit binaries. This is the case for both installing through apt-get from the repository as well as with downloading the .deb file and running dpkg -i.

If I install the file to try, it upgrades/overwrites my existing application in 32bit, and I can't run it any more (on 15.04 32bit Ubuntu). When this happened first, I searched the installed executable with which and checked it's type with file, that proved it to be a 64bit ELF binary:

$ file qtox
qtox: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped

So while I wait for the maintainers to fix the issue, how can I determine which architecture a package (from repository or .deb file) contains?

I tried both apt-cache show and apt-cache policy for the repository version and dpkg -I for the .deb file, but all of them report 32bit, which is wrong.

Is there any chance to find the real architecture the contained executables are made for out, except by accessing the package's meta information (I think this is what the commands I tried did?) which does obviously not fit.

Create a script, in my example foo

#!/bin/bash

# Create a temporary folder in /tmp
dir=$(mktemp -d)

# Extract the deb file
dpkg -x "$1" "$dir"

printf "\n%s\n\n" "$1"

# Show the package architecture information
dpkg --info $1 | \
    awk '/Architecture/ {printf "defined dpkg architecture is:\t%s\n", $2}'

# Show the executable format via find and awk for ELF
find $dir -type f -exec file -b {} \; | \
        sort -u | \
        awk '/ELF/ {printf "executable format is: \t\t%s\n", $0}'

rm -rf "$dir"

exit 0

Usage

./foo <deb_file>

Example

% ./foo qtox_1.1\~git20150707.cfeeb03-97_i386.deb

qtox_1.1~git20150707.cfeeb03-97_i386.deb

defined dpkg architecture is:   i386
executable format is :          ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped

Each deb package declares an architecture, eg. "i386" or "all". However this is only a declaration, and it can be declared wrong (intentionally for some reason, or eg. by error in some package building script).

What can you about to verify the real package architecture:

# verify, if package supports multiple architectures (and possibly has some bug):
dpkg --print-foreign-architectures package.deb

# unpack and check executables inside:
dpkg --unpack package.deb
dpkg --contents package.deb |grep ^-rwxr-xr-x |awk "{ print \$6 }" |grep -v /etc/

# and then check a few random unpacked executables using:
file ./usr/bin/some-executable


Windows gets progressively slower over time, why doesn't Ubuntu? I, and many other previous Windows users notice that the computer seems to get progressively slower over time. I bought a leapfrog crammer only to find it installed process that sat there waiting for me to plug the crammer in so it could run the software. It took up three percent of the CPU twenty-four seven, seven day a week! This is one of the main reasons I left Windows. But, Ubuntu doesn't seem to slow down over time at all. Does Ubuntu allow programs to install background programs like the leapfrog crammer did to sit there like a leech and suck away at resources? Could someone explain why Windows tends to get slower over time, and is Ubuntu vulnrable to this too? Thanks for any help, this is puzzling me.

In my opinion most important reason is that most of the programs on Windows are registry dependent.  Registry is arguably a well organized storage, however it is not known to be a very efficient one. When you first install Windows, registry size is small and look up operations are inexpensive; however as you install more and more programs registry gets larger and harder to manage.

Another factor is disk fragmentation. NTFS and FAT are very notorious for their inability to prevent fragmentation. On the other hand Linux file systems, especially ext3 (I do not have any experience in reiserFS or other alternatives) is quite resilient  to fragmentation.

A short primer on fragmentation

What is fragmentation?  This article does a good job explaining it, but the gist of it is this: Windows clumps all of its files together in one place on the disk, while Linux spreads them all over the place.  That means that, when a file grows on Windows, it runs the risk of being so big that it overlaps the next file's hard disk allocation, and therefore must either be moved or (more likely) fragmented, with the new fragment being stored on a different place on the hard drive.  The next time that file is accessed, Windows actually has to make two disk accesses, one for the initial file and a second for the newly created fragment.  When a file grows in Linux, on the other hand, there is ofter more than enough space for it, and the OS proceeds happily along.  Linux's method does have a small downside on mechanical hard disks, and that is, because the files are spread all over the place, there is a small delay in accessing them over a series of "clumped" files.  The e4rat project works rather well for eliminating or reducing some of these delays (ext4 filesystems only), and the incurred overhead is never worse then what Windows experiences from file fragmentation.

Another factor is a small trick that Windows pulls: A Windows installation is never up when it's up. Windows starts a lot of processes after you log in. The distinction between system processes and user processes is a little vague for Windows, especially for the old versions before XP. And a lot of Windows applications are very eager to start background processes and place tray icons. In time a Windows installation begins starting more and more processes at start up. However Linux strictly starts all system processes before you log in. After you log in, only a minimal number of processes are started. Linux also never encouraged using background services related to specific tasks of a specific user, or using tray icons. Last version of the Gnome denies all applications to place tray icons, except a very narrow white-list. So in time a Linux installation still starts only a limited number of processes after the start up.

I'm sure there are other numerous factors that contribute to this phenomenon, these are the major ones that comes to my mind.

I actually think that the virus protection software is the biggest cause of Windows slowdown. At work I have to use a Windows based computer. If you disable the virus software for a day, the computer will run significantly quicker, but it is not an alternative for us. We had an 'infestation' on the network awhile ago and all hell broke loose. There are fewer malware programs that affect Linux, though I have read they are rampant in the Android world.


Not spanning Wallpaper across dual screen With compiz plugin Wallpaper on ubuntu 16.04, the wallpaper spans across dual monitors automatically.
How to disable this? I would like to simply duplicate the wallpaper on both screen.

18.04 and later

Install Tweaks with sudo apt install gnome-tweak-tool and open Tweaks.
Select Appearance.
Click the ▾ arrow to show the dropdown menu as marked by the mouse cursor in the below screenshot. Change the span option to Zoom.

16.04

Open System Settings by clicking the gear icon on the Launcher.
Select Appearance -> Look tab.
Click the ▾ arrow to show the dropdown menu as shown in the below screenshot. Change the Span option to Zoom.

Simply right click on your wallpaper image file. And click on "Set as Wallpaper" option. That's it.


Requesting URL to gnome-shell integration plugin for Firefox Please give me the link to download the gnome-shell integration plugin which will allow me to subsequently install gnome-shell extensions via the web browser.

I just want the link to the plugin,

I do not want to do apt-get dist-upgrade or reinstall gnome.

The link to the plugin itself, should be available for all users to install.

I can't find the link on google or in the plugin/addon section.

I believe the confusion is that the plugin does not seem to be shipped as a plugin on ff addons. Instead, you find it in the repo for your distro. See the file lists below. Unfortunately, it also appears that not all the distros put it in the same "kind" of place.

Ubuntu: http://packages.ubuntu.com/saucy/amd64/gnome-shell/filelist
Fedora: http://rpmfind.net/linux/RPM/fedora/updates/19/x86_64/gnome-shell-3.8.4-3.fc19.x86_64.html

The actual plugin (as an xpi) may be available some place, but I can't find it.

Also, the link in @user118369 is to the tbird plugin which is something else entirely.

Here you go!

It is on Firefox's add-on page but is hard to find with the browser's local search machine.


How to get and set php.ini variables through terminal I want to change some php.ini (php5.6) variables through the terminal.
Example: I need to get the post_max_size value (that for now is 8M), display it in the terminal, change it to 2048M and display it again.

How could I do that?

Get:

grep '^post_max_size ' php.ini

Replace:

sed -i 's,^post_max_size =.*$,post_max_size = 2048M,' php.ini

Note that it's a good idea to create a backup of php.ini before running sed:

cp php.ini php.ini.bak

I wrote a simple bash script that implements Arkadiusz Drabczyk's answer.

The script auto detects the active version of php.

The script assumes you are using apache2 (you can pass a third arg to override).

I named the file php-iniset and added it to one of my bin directories.

now you can call:

php-iniset post_max_size 2048M

or call it like this to comment out the variable:

php-iniset post_max_size

You might need to tweak things like the filepath to your needs

Remember to backup your ini file first!

Here is the script:

#!/bin/bash
#
#   useage:
#   php-iniset key value
#
#   sets php ini key to value
#   if no value is supplied key will be commented
#   If value is supplied key will automatically be commented out
#
key=$1
val=$2
scope=${3:-apache2}

version=`php -r "echo substr(PHP_VERSION, 0, 3);"`
filepath="/etc/php/$version/$scope/php.ini"

if [ -f $filepath ]
then
    if [ -e $val ]
    then
        #disable if value is empty
        sudo sed -i "/^$key =.*$/s/^/;/g" $filepath

        #confirm disabled
        grep "^;$key " $filepath

    else
        #enable if value has been supplied
        sudo sed -i "/^;$key =.*$/s/^;//g" $filepath

        #modify value
        sudo sed -i "s,^$key =.*$,$key = $val," $filepath

        #confirm value
        grep "^$key " $filepath
    fi

else
    echo "$path does not exist"
fi


Why is it called sudo? Why  do we use sudo to perform a terminal command as an administrative? Why isn't it  admin or something else? Is there a reason for sudo?

From Wikipedia:

  sudo  is a program for Unix-like
  computer operating systems that allows users to run programs with the
  security privileges of another user (normally the superuser, or
  root). Its name is a concatenation of "su" (substitute user) and
  "do", or take action.

  Unlike the su command, users typically supply their own password to
  sudo rather than the root password. After authentication, and if the
  /usr/local/etc/sudoers (sometimes found at /etc/sudoers) configuration
  file permits the user access, then the system will invoke the
  requested command. The sudoers configuration file enables a huge
  amount of configurability, including but not limited to: enabling root
  commands only from the invoking terminal; not requiring a password for
  certain commands; requiring a password per user or group; requiring
  re-entry of a password every time or never requiring a password at all
  for a particular command line. It can also be configured to permit
  passing arguments or multiple commands, and even supports commands
  with regular expressions.

Its a temporary one-time command with superuser (administrator) privileges without direct root login.

Most folks have given the answer that it's a mashup of "super user do". I like this, but it may be more correct to say that it's a mashup of "substitute user do" because you can choose what user you "do" as with the -u flag.

I also think of it as a play on the word psuedonym because you can pretend to be someone else , either root or any other user using the -u flag.


Is it possible to reorder my workspaces? Recently I found that on a macbook it is possible to drag the multiple desktops to change their order.

The ideal solution would be to, while on the compiz Expo mode, be able to just drag and move a whole workspace together with all the windows it contains to another position.

Searching for this I found an ubuntu braistorm idea that describes exactly what I would like to be able to do!

A work around using a command line script could also be used maybe..?

Any ideas?

I have been looking for an answer to this question for quite a long time but recently I had stumbled upon the answer myself.

Solution:

When you hit Windows+S to go to workspace switcher, in that view you can quickly double click on any visible window in any workspace and drag that window to any other workspace.

This way you can re-order workspaces.

I am a huge user of workspaces on a daily basis and I find this little trick very helpful to re-order my workspaces.

Hope it is helpful.

I think the simple answer is: no

The long answer is: Do you really need this feature? If so the go to compiz site and beg them to add it. (or ubutus site) You can otherwise use: super w to spread out al the windows and see them. You can also use "clone output" that will transform the Window to a lillte icon that you can move to another work-space. But I think that at this state the work-spaces is static. Hope it helped.