Graphic card Nvidia gtx 745 and intel D graphics 4400 Hi all I'm having some issues with trying to install Ubuntu. For the past day's when I get to the boot menu I select my usb key which I turned into a bootable Ubuntu drive. When I click try or install Ubuntu I get a black screen and nothing happens. My screen is connected through DVI on my tower and HDMI on my screen. My question is how can I install Ubuntu since I can't see anything?

Have a look at this thread:
 Why do I get a black/purple screen when booting on a brand new PC build?

This is what solved the persons problem:

"After playing and searching around, I found that I could enter the GRUB menu by holding down F11, then pressing "e" on "install ubuntu" i then looked for where it said "quick splash --" and changed it to "nomodeset $vt_handoff" this allowed my system to boot it all up and after installing I played around with the /etc/default/grub file and changed around some text to allow my system to boot up right to Ubuntu."

You could also try this: http://ubuntuforums.org/showthread.php?p=11586016


Dell Precision m3800 wifi "Hardware Disabled" Network applet lists wifi as "Hardware Disabled." If I go to Software & Updates > Additional Drivers it indicates

Broadcom Corporation: BCM4352 802.11ac Wireless Adapter. This device is using an alternative driver

The following option is checked "Using Broadcom 802.11 Linux STA wireless driver source from bcmwl-kernel-source (proprietary)."

If I run

lspci -vvnn | grep -A 9 Network

I get:

06:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)
Subsystem: Dell Device [1028:0019]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at eca00000 (64-bit, non-prefetchable) [size=32K]
Region 2: Memory at ec800000 (64-bit, non-prefetchable) [size=2M]
Capabilities: <access denied>
Kernel driver in use: wl

Fn+PrtScr has no effect. There are not wireless options in the BIOS I can't find it.
I have purged and reinstalled bcmwl-kernel-source to no effect.
When I run rfkill list I get:

0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: brcmwl-0: Wireless LAN
Soft blocked: no
Hard blocked: yes
2: nfc0: NFC
Soft blocked: no
Hard blocked: no

So I run rfkill unblock 1 to no effect.
I have tried this to no effect:

cd /etc/modprobe.d/
mkdir tmp
mv iwlwifi.conf tmp

I have poked other around /etc/modprobe.d files to no effect. Another files I touched I changed back to their original state before trying something else.

Any help would be much appreciated.

Had the same problem. Fortunately I planned to dual boot (just in case) for a while. When I boot into Windows and do fn+PrtScr (wifi button), the wifi turns on, then works in Linux too. Not sure why, but the hardware button on the keyboard doesn't seem to work.

I have the exact same problem on my computer (also Precision M3800). The above trick with dual booting to Windows does not work - perhaps it is specific to the version of Windows on dual boot, I have 8.1. But this may be a partial solution: there is now a driver for the Dell airplane mode switch as of kernel version 4.2.


How to integrate Psi (or Psi+) into the messaging menu? I've just installed Psi, but it doesn't integrates into the messaging menu. Is there any way to do this? (plugin, etc...)

Create a new file /usr/share/indicators/messages/applications/psi with the following content:

/usr/share/applications/psi.desktop

Logout and login again.

Creating of /usr/share/applications/psi.desktop is OK, but you need to create the file /usr/share/indicators/messages/applications/psi (or psi-plus) and fill it with the link to psi(-plus).desktop e.g.: /usr/share/applications/psi-plus.desktop


Find packages which files got deleted or missing after installation I just accidentally did rm -r /var but luckily managed to ^C it before more damages were done. Is there way to find out all packages which files got deleted in the location so I can reinstall them?

% ls -l /var
total 20
drwxr-xr-x  2 root root 4096 Jan 14 08:26 backups
drwxr-xr-x 23 root root 4096 Jan  6 20:26 cache
drwxr-xr-x 70 root root 4096 Jan 14 09:26 lib
lrwxrwxrwx  1 root root    9 Oct 31 17:53 lock -> /run/lock
drwxrwsr-x  2 root mail 4096 Oct 17 02:59 mail
lrwxrwxrwx  1 root root    4 Oct 31 17:53 run -> /run
drwxr-xr-x 11 root root 4096 Jan 10 22:06 spool

The more general, simpler answer first:

Assuming the dpkg status area is intact, you can determine if any installed packages are missing registered files with something like:

for p in $(dpkg-query -f '${Package} ' -W); do
    dpkg -L $p | grep '^/' | while read file; do
        [ -e "$file" ] || echo "$p is missing $file"
    done
done

To limit the checking to files under /var, you could just change the grep expression:

for p in $(dpkg-query -f '${Package} ' -W); do
    dpkg -L $p | grep '^/var/' | while read file; do
        [ -e "$file" ] || echo "$p is missing $file"
    done
done

However, this may be of limited utility for you. Partly because most packages in Debian/Ubuntu don't ship many files directly to /var, and also because the dpkg status area I mentioned lives under /var, in /var/lib/dpkg. If anything was deleted from there, your problem gets quite a bit more complicated.

Most of the data in /var is "variable data"; "spool directories and files, administrative and logging data, and transient and temporary files" according to the FHS. So much of it, if not most, won't come back even if you reinstall all the packages. But by the same token, your system can probably still work pretty well without it.

The most important data in /var is your own data; this may be database contents, mail, crontabs, and such. Most of that will be under /var/lib, /var/mail, /var/spool, and /var/local, and /var/opt. If that sort of data has been deleted then you might just need to hope for good backups. Of typically less importance are the system logs in /var/log. If those are gone, obviously you've lost some ability to diagnose past problems, but everything should still work. The remaining most common directories in /var, (/var/backups, /var/cache, /var/run, /var/lock, /var/tmp; some of those may be symlinks to /run or elsewhere) you shouldn't need to worry about; data there should be regenerateable by the owning application.

Finally, if you haven't restarted your system or the system daemons since the accidental delete operation, some of the files that appear to be deleted may still be hanging around invisibly, held open by some process. The lsof tool can help you find those, and you can retrieve files like that by copying them from /proc/$pid/fd/$fdnumber.

I would go in a simpler approach.

Remember that you have a mirror (a cache, actually) of all your installed packages in

/var/cache

So if you want to restore programs and configs, then just enter to the cache and reinstall the stuff in there. Of course, this will work only if you didn't installed anything that broke your system preciously AND if you didn't deleted your apt packages cache (why would you do something like that!?).

If that's the case, I'll go for:

cd /var/cache/apt/archives/

sudo apt-get install *.deb

Again, you should do this only if your system worked OK before deleting the stuff.
Anyway, you will find all the installed packages in that location reconfiguring your setting as in the first install (so you will get programs + configs, despite the comment below).


ubuntu 12.4 LTS dualboot with windows xp not working Since I loaded ubuntu 12.4 LTS I can no longer get into windows XP. When I boot the computer Windows XP goes through its sequence until it shows boot from CD/DVD then the screen comes up to chose ubuntu or windows xp but the arrow keys do not respnd and ubuntu opens. Also I am not sure if I need the 320 updates the update manager says are available. They will not install anyway. I am a rookie when it comes to computers. What are my options? I would like to have a dual boot computer with ubuntu and windows xp. Any help would be appreciated.

I had exactly the same problem with windows 7 and ubuntu 12.10. Your Windows Bootloader has been overwritten by Ubuntu its. With a windows xp recovery cd you can reinstall the windows xp boatloader


Dell XPS 15 7590 Heat problem I have a Dell XPS 15 7590 and wondered if there were other people who had problems with the computer getting incredibly hot some times.
Are there things I can do to prevent it from warming up? Actually, the computer has always had this problem, only now it's much worse than before

If over heating is repeatedly happening, for 90% it means you have a malware consuming most of your comp ressources and results in a considerable over heating. Run malware scan with malwarebyte or eset internet security which I trust the most for its advanced AI detection. The scan should be done offline to avoid malware connection to its server. Another way to check this out, is to use your comp offline(not attached to network) : lauch 3 heavy softwares and let your comp running for 1 hour. If its not over heated, then its a 100% sign of malware. Else, it could be that your comp fan flooded with dust and not running any more, you have to clean it. If you do not have the requested knowledge to do it by your self, I advise you to bring it to IT repairing store.


How to access/delete a folder accidentally named with escaped characters? I was setting up a cloud server and saw that I accidentally added a folder named ^[[4~ (with escape code). I want to see what is inside and if that was just a mistake then remove that directory. However I cannot cd nor ls the contents. I tried finding out the escape code so that I could enter a command like cd \x1b[30m; and hope that it would get me in the directory.

What if I was to cd or remove by searching for the first directory listed with ls. Would that be possible? Because when I do a ls |grep 4 two results come up and one of them is the one I'm trying to access.

Either finding out the folder name in escape string or changing the directory to the first directory ls finds might be a solution here. How can I approach this problem?

A funny way to deal with that, using Bash: cd into the directory (that's easy).

Then we'll check that a control character is in the file's name: if you issue

printf 'strange: %s\n' *[[:cntrl:]]*

you should see your file there. If not, try to use another character class or modify the glob so that it matches your file name. (But very likely, you'll only have the bizarre one.) Then, three possiblities:

The previous command only issued your bizarre file. Then, easy, just rename it:

mv -nv *[[:cntrl:]]* a_less_bizarre_name

done!
The previous command issued several filenames with bizarre names. Then, rename them all as:

i=0
for biz in *[[:cntrl:]]*; do
    mv -nv "$biz" a_less_bizarre_name$((++i))
done

done!
The previous command output several names, but you only want to change one. In this case, we'll put them all in an array, print them all out with a number in front, and then we'll select only the one we want:

bizarre=( *[[:cntrl:]]* )
for index in "${!bizarre[@]}"; do
    printf "%s --> %s\n" "$index" "${bizarre[index]}"
done
# Then, look at the index of the one you want to rename
# If its index is 42, issue:
mv -nv "${bizarre[42]}" a_less_bizarre_name

done!

Note. If you use these commands, make sure you use them with the proper quotings (i.e., the quotings I gave). Do not alter the quotings!

Remark. You will very likely want first to issue the mv I gave with an echo in front, just to see what it'll do, e.g.,

echo mv -nv *[[:cntrl:]]* a_less_bizarre_name

and remove the echo when you're happy with it! Anyways, I'm using the -n switch so as to not overwrite an otherwise existing file. All these commands are rather safe if you use them as I typed them.

Good luck!


how to remove files in a list of paths easily? I have a list of lines like

/usr/lib/i386-linux-gnu/libavfilter.so
/usr/lib/i386-linux-gnu/libavfilter.so.3
/usr/lib/i386-linux-gnu/libavfilter.so.3.42.103
/usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so
/usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so.3
/usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so.3.42.103
/usr/local/lib/libavfilter.so
/usr/local/lib/libavfilter.so.4
/usr/local/lib/libavfilter.so.4.4.100

How can I remove those files altogether instead of removing them one by one like

 rm        /usr/lib/i386-linux-gnu/libavfilter.so
 rm        /usr/lib/i386-linux-gnu/libavfilter.so.3
 rm        /usr/lib/i386-linux-gnu/libavfilter.so.3.42.103
 rm        /usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so
 rm        /usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so.3
 rm        /usr/lib/i386-linux-gnu/i686/cmov/libavfilter.so.3.42.103
 rm        /usr/local/lib/libavfilter.so
 rm        /usr/local/lib/libavfilter.so.4
 rm        /usr/local/lib/libavfilter.so.4.4.100

?

WARNING!
Don't apply below commands without checking output at first

What's your input? A file? A command? Either way, xargs should be helpful:

cat file | xargs rm

... will delete every path for every line in the file. If it's just a command that's outputting a path on each line, pipe it through xargs and it should work well.

Alternatively, use xargs --arg-file="file.txt" rm. This saves on pipe and unnecessary cat.

If you're looking to do more with each line, you could use a traditional bash while loop:

# uses echo for testing
# remove # before rm for actual deletion
while read -r path; do
    echo "deleting $path"
    # rm "$path"
done < file

If your list is the output of find, you have another couple of options, including a -delete option or using -exec rm {} \+. There are almost certainly a few dozen other viable routes to success. If you're doing automated deletion with find, just check the output before you delete. It won't forgive you your mistakes.

Spaces can be a problem with piping things into xargs. This might not be an issue for you and your locate but both locate and xargs have a way of getting around that. They can both choose to use the \0 null character as a delimiter instead of return lines. Yay. In short, your command becomes:

locate -0b libavfilter.so | xargs -0 rm

use something like notepad++, go to replace (ctrl+r) enter -> find what: \r\n (be sure search mode is set to extended) and replace with: enter a space

then you have all in a line

copy it to a shell and enter rm -rf [paste file/foldernames from notepad++ here]


Folder Sizes in nautilus Back when i was using xp i had this program called Folder Sizes
that showed the folder(also file) size in the explorer column
I was wondering will that option be or is available in nautilus or other file-manager

Screenshot

There are several ways to do this. (Disclaimer: all this methods can only make the folders show the amount of items that they contain, not their actual size)

Probabliy the most used option is to use the "List View" mode. You can enable it by going to View menu and click on List. You get this:

But there's also a really comfortable method to do it, which allows you to navigate your folders  using the "Icons View". All you have to do is going to Edit menu, click on Preferences option and then click on the Display tab. After that you have to set the first zooming option to show you the size of your folders and files.

In Nautilus, go to "View" Menu and click on "List"


Allow certain exit codes to not abort execution in bash "-e" mode If umount returns 0 as the exit code, this script continues.
Some times, the exit code is 127, I'm okay with it and the script
should continue. How can I modify the script to do such a "whitelisting"
of allowed umount exit codes?

set -e
sudo umount /drive || [ $? -eq 0 ]
echo do stuff

If such a technique exists, I have many use cases for it.

Let's try this:

if sudo mount /drive; then
    : # exit status 0
else
    rc=$?
    [ $rc -ne 127 ] && exit $rc
fi

Test with this -- experiment with different values for status

env status=0 bash -e -c '
    mycmd() { return $1; }
    if mycmd $status; then
        :
    else
        rc=$?
        [ $rc -ne 127 ] && exit $rc
    fi
    echo OK
'

This answer-in-a-comment by glenn jackman works for me:

mycmd || [ $? -eq 127 ] || exit


ASCII screensaver for the command-line or a TUI? This question was closed due to being too broad, so I'll be more specific with regard to ASCII animations here =)

Are there any ASCII animations that can be used as screensavers - either in the TUI or in the command-line?

Pipes.sh
The classic screensaver in ASCII.

Usage :
wget https://raw.githubusercontent.com/pipeseroni/pipes.sh/master/pipes.sh
chmod +x pipes.sh
./pipes.sh

Installation :
git clone https://github.com/pipeseroni/pipes.sh.git
cd pipes.sh
sudo make install

Options :
 -t #

Type of pipes. Refer to the documentation to see them all.
-f [20-100]

Framerate.
-s [5-15]

Probability of a straight fitting.
-r LIMIT

Reset after x characters, 0 if no limit.
-R

Random starting point.
-B

No bold effect.
-C

No color.

Refer to the documentation for more information.

zone-mode in emacs can be used as a screensaver. If you care about the mode line burned onto your screen then you are not an emacs user!


Open or convert .cdr files? I have a scanned image, and it's in Corel Draw (.cdr) format (~6mb). Is there a way to open it, or convert it to something that I can manage? I tried http://filespazz.com/ a few times, but it didn't work due to some timeout error.
Any suggestions?

Thanks in advance.

Another option is to try imagemagick convert utility,Imagemagic can be easily installed using software center or synaptic.

Since the document is scanned it should be a bitmap which imagemagick can handle, only the version of the .cdr would be a concern, you did not mention the version of the cdr file so you may just try imagemagick, at your terminal in the directory where the .cdr file is located, run the convert utility like this;

convert image.cdr image.png

this will convert the .cdr image called image.cdr to a .png image called image.png file that you can easily use, probably vectorize by tracing in inkscape if you wish.

See the imagemagic documentation on the convert utility if more control over the output is needed. hope the output is satisfactory.

Source.

  In order to work with CDR images you need to install some delegates
  for ImageMagick. In order to convert CDR files you need to install
  uniconvertor for CDR delegate:

sudo apt-get install python-uniconvertor

  List of all delegates:

convert -list delegate

  By default it outputs:

cdr =>          "uniconvertor" "%i" "%o.svg"; mv "%o.svg" "%o"

  Then run:

convert image.cdr -flatten -thumbnail '512x512' image.png

  Or with zoom cropping:

convert image.cdr -flatten -thumbnail '512x512^' -gravity center -crop 512x512+0+0 +repage image.png

  I convert to .png here, but you may choose your own output format.


Menu bar missing on some programs I'm running XFCE on Ubuntu 16.04.5. Two days ago the menu bar disappeared randomly in LibreOffice programs only, still worked in other programs like FileZilla, Thunar, Thunderbird, etc. But in LibreOffice programs Writer, Calc, and others, menu bar is completely gone:

I chocked it up to something in LO, so I left it until I had a chance to fix.

This morning I start up the computer and now Thunderbird is missing it's menu bar, just gone. It was there yesterday, but today gone. Also, my extension buttons are gone from the toolbar as well, only default buttons are there.

But Menu Bar is selected as there in the right click menu on the toolbar.

FileZilla and Thunar still have their menu bars. So do other programs. Starting up GIMP it still has it's menu:

I'm figuring something in GTK or another subsystem has been corrupted, but I don't know what controls those items, so I'm not sure where to begin.

I've tried a couple things, none of which have fixed it:

compiz --replace

Just replaces everything with a blue bar, still no menu bar.

xfwm4 --replace

No change at all.

sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt unity-gtk3-module unity-gtk2-module

Same, no change.

EDIT

If I remove libreoffice-gtk and start LO it comes up with pre-GTK menu:

sudo apt-get remove libreoffice-gtk

But once I add it back it goes away again. Is this a problem with GTK and how would I fix that in general?

EDIT

Re-Installing thunderbird does not fix the problem with thunderbird. I've also tried re-installing xubuntu-desktop with no avail.

For Thunderbird, right-click at the top of the screen (where the menubar would be) and check “Menu Bar”.

The answer for LibreOffice seems to be disabling OpenGL rendering, go to Tools > Options > View > uncheck “Use OpenGL for all rendering”. It is probably this bug

Hope this helps!


Cannot install .NET Core on Ubuntu Bionic Beaver I'm currently trying to install .NET Core on Ubuntu 18.04 following these instructions. But I always get the following message:

me@mine-Ubuntu:~$ sudo apt-get install -y dotnet-sdk-2.1.200
[sudo] password for me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dotnet-sdk-2.1.200 : Depends: dotnet-runtime-2.0.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I've found some posts about this issue but no help. I hope to get some proper information here.

first add the sources:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

after that:

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1.200

sudo apt-get update is important

source: https://www.microsoft.com/net/learn/get-started/linux/ubuntu18-04

You need to install libicu55:

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update
sudo apt-get install libicu55

And then install net core:

sudo apt-get install dotnet-sdk-2.1


Is there an Ubuntu One files iPhone client? Is it possible to access files in my account Ubuntu One via iPhone?

An iPhone client is on our roadmap, so you will eventually be able to. I can't quite tell you when it will be launched, so keep an eye out on our blog for when we announce it.

I´ve asked this to the Ubuntu-One team,and get the same aswer. While the app for files is released I´m using Dropbox; you can visualize your photos, read pdf, and get a link to share the file with someone else.


Firefox youtube flash player shows as grey box? Firefox and Youtube videos were working after upgrading from 10.04 to 10.10 but a couple of weeks ago, my Youtube flash video player shows up as a grey box.  The sound still works and I can hear the clip playing, but I can not see the video, or even the controls.

This is true for many of the flash based video players, and I think it even happens to some of the flash games out there on Firefox.

Everything works fine on Chromium. This isn't that weird because Chromium has its own flash plugin.  However, some flash players still function properly on Firefox, like the full episode flash player on thedailyshow.com

Why would flash be grey box for some flash players but not all?

I have a 32bit system, and a ATI x300 GPU card, which has been giving me problems right after updating to 10.10, but that seems to be resolved now.  I selected the allow proprietary codecs stuff at install , and then installed the Adobe Flash PPA and plugin in Ubuntu Tweak.

I would advise removing the Ubuntu Tweak PPA from your software sources by opening the Software Centre then clicking Edit->Software Sources.... Click the 'Other Software' tab then untick the Ubuntu Tweak PPA.

Close the software sources window and it should refresh your software index.

Uninstall any flash plugins you have installed then install ubuntu-restricted-extras. This should get flash working again.

In the future do not use PPAs unless you are certain of what you are doing. Note that Ubuntu Tweak is for users who know what they are doing and can mess up your system if you use it without precautions.

You could try removing the closed-sourced ATI drivers. I find that they cause more problems then they're worth, especially if your card is already supported by the opensource driver.

sudo apt-get remove fglrx*

should do the trick.


How to make Ubuntu shutdown when power lost? My project requires that the power source for the laptop be switched on and off.

Is there a way to make Ubuntu shutdown properly when the external power is lost? It will run the shutdown on its internal battery.

Try to check on_ac_power command. From man on_ac_power:
NAME
       on_ac_power - test whether computer is running on AC power

SYNOPSIS
       on_ac_power

DESCRIPTION
       on_ac_power  checks  whether  the  system  is  running on AC power (i.e., mains power) as opposed to battery
       power.

OPTIONS
       None.

EXIT STATUS
       0 (true)  System is on mains power
       1 (false) System is not on mains power
       255 (false)    Power status could not be determined

if on_ac_power; then
    echo "You are on AC-Power" # System is on mains power
 else
    echo "Power Lost"          # System is not on mains power
fi

You need to check the AC-Power status in every X interval of time. It's easiest way that you run it in the background, inside a while loop:
while true
 do
    if on_ac_power; then
        echo "You are on AC-Power" # System is on main power
     else
        echo "Power Lost"          # System is not on main power
    fi
    sleep [Seconds]
 done

Save your script(ChechMainPWR.sh) and if you want to run the script on startup, so add a line in /etc/rc.local to call your script (ChechMainPWR.sh) + "&" to make it exit. Like this
sh /home/USERNAME/ChechMainPWR.sh $

Reboot and see the changes.
BONUS
If you want to see the alert when it's lost or not connected on your desktop notification, you can use notify-send program.
notify-send "Main Power Lot!" "System is now shutting down"

See man notify-send for more info.
NAME
       notify-send - a program to send desktop notifications

SYNOPSIS
       notify-send [OPTIONS] <summary> [body]

DESCRIPTION
       With  notify-send you can sends desktop notifications to the user via a notification daemon from the command
       line.  These notifications can be used to inform the user about an event or display some form of information
       without getting in the user's way.

Then the final script would be like this:
Final script
while true
 do
    if ! on_ac_power; then    # System is not on main power
        notify-send "Main Power Lot!" "System is going down after 10 seconds"
        sleep 10
        echo YOUR_PASSWORD | sudo -kS  shutdown -h now
        #####^^^^^^^^^^^^^ VERY VERY VERY insecure!   ##########
    fi
    sleep 300 # check main power status every 5 minutes
 done

Warning: The echo YOUR_PASSWORD | sudo -kS  shutdown -h now works BUT it is extremely insecure, as your password is written in your history and may also be visible to other users through a process listing.
Then alternative solution is; You can configure your system that sudo someCommand does not require a password(in my case for sudo shutdown).
To do that, run sudo visudo and add the following line at the END in the file that opens:
Your_USERNAME  ALL=NOPASSWD: /sbin/shutdown

Then exit the editor and save it (CTRL+x).
Now you can use shutdown command from the command line or in your script without password.
So the script would be like this:
while true
 do
    if ! on_ac_power; then  #your system is not on AC-Power
        notify-send "Main Power Lost!" "System is going down after 10 seconds"
        sleep 10
        sudo shutdown -h now  # System is not on mains power
    fi
    sleep 300 # check main power status every 5 minutes
 done

External links:
How do I run specific sudo commands without a password?
How do I restart /shutdown from a terminal?

Go to system settings by clicking the settings-icon at the top right corner of your desktop and selecting "system settings..."
In system settings pannel Cick on "power" and there you can see an option for "when power is critically low it black by default. select it and choose 'power off' in the drop down menu.


Why does wubi fail with a 404 error? I'm installing Ubuntu using the Wubi installer, but it ends unexpectedly with following error:

12-27 15:15 DEBUG  downloader: downloading http://releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.metalink > G:\ubuntu\install
12-27 15:15 DEBUG  downloader: Download start filename=G:\ubuntu\install\ubuntu-11.04-desktop-amd64.metalink, url=http://releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.metalink, basename=ubuntu-11.04-desktop-amd64.metalink, length=28363, text=None
12-27 15:15 DEBUG  downloader: download finished (read 28363 bytes)
12-27 15:15 DEBUG  downloader: downloading http://releases.ubuntu.com/11.04/MD5SUMS-metalink > G:\ubuntu\install
12-27 15:15 ERROR  TaskList: [Errno 14] HTTP Error 404: Not Found
Traceback (most recent call last):

The Solution
Ubuntu 11.04 is no longer supported, ever since April 28, 2011. See this page for details. When a release is not supported anymore we call it EoL (end-of-life).
At least currently, Wubi cannot automatically download the files needed to install an EoL release. You must provide all the necessary files. (A 404, or File Not Found, error will occur otherwise.)
To do this:
If you have just Wubi.exe, saved to your hard drive:
Download the ISO image for the release. Make sure to get the one for the right architecture. If you have a 64-bit machine you can use the amd64 (64-bit) or i386 (32-bit) version. If you have a 32-bit machine you can only use the i386 version.
ISO images for old releases can be downloaded at http://old-releases.ubuntu.com/releases/.
Save the ISO image to your hard disk. Then there are three ways you can proceed:

Make sure the downloaded ISO image it's in the same folder that contains Wubi.exe. Then run Wubi.exe again.

Alternatively, if you have an archive manager for Windows like 7-zip that is capable of extracting ISO images as though they are compressed archives (even though they really aren't), you can use that to extract the ISO image into its own folder with nothing else in it. Then find Wubi.exe in that folder (it's one of the files that was extracted) and run that.

If you want, you also have the option of burning the ISO to a CD/DVD or writing it to a USB flash drive. That will work, and on rare occasion might make sense if you're having a lot of trouble getting Wubi to find your downloaded ISO. But generally this way is harder and takes longer.

If you're running Wubi.exe from an Ubuntu CD/DVD or USB flash drive that you've burned or written from an Ubuntu ISO:
Wubi only gets to the point where the error occurs after checking to make sure the necessary files for installation aren't already present and usable. So they are either not present, or one or more of them is corrupted.
Either way, there's two causes: either the ISO is corrupted, or the burn/write was bad (or modified afterwards). You can find out which by MD5 testing the ISO. Then rewrite it to the USB drive, burn it to a new disc, or (if the ISO is what's bad) download the ISO again.
(And then you can use one of the techniques described above, which are faster than having to make a disc or write to a USB drive.)
If you're running Wubi.exe from a virtual drive mounted from an Ubuntu ISO:
Some programs exist to mount ISO images in Windows as virtual drives. This is a somewhat popular way to install Wubi. If you're doing this and getting the error, then the same problem is happening as above. Since there's no actual physical Ubuntu disk, that means the ISO is bad. (Or that there's some problem with your drive virtualization software.)
The Caveat (and better solution, really)
When Ubuntu releases are EoL, you really shouldn't use them. You can't get as good support, the software on them is old, and most importantly, newly discovered bugs are not fixed. That means that there are lots of security bugs that are discovered and fixed only in supported releases. Users of EoL releases remain vulnerable. So it is actually dangerous to continue using an EoL release.
If you choose to continue using an EoL release of Ubuntu, we will respect that, but we may not be able to help you with problems (as most of us have moved on), and it's important you understand the disadvantages and risks.
Currently supported Ubuntu releases are 10.04.4 LTS, 11.10, 12.04.1 LTS, and 12.10. You can get them all here. Both ISO images and Wubi.exe installers are available for each supported release. This is highly recommended!
Technically, 8.04.4 LTS is also supported, but only for limited server use, which doesn't include GUI, community-community packages, or Wubi.
If you can't decide which version to use, it's usually best to go for the latest release (as most people do) or the latest LTS release.
The Analysis
The Traceback (most recent call last) line means this is a crash, which is a type of bug. Therefore, as Jorge Castro says, you should report this as a bug (against the Wubi project on Launchpad).
However, the fundamental problem here would probably not be considered a bug, and you can solve it pretty easily. See above for solutions, or below for an explanation.
They key to understanding what's going on lies in the output just before the crash:
12-27 15:15 DEBUG  CommonBackend: Searching for local ISO
12-27 15:15 DEBUG  CommonBackend: Could not find any ISO or CD, downloading one now
12-27 15:15 DEBUG  TaskList: New task get_metalink
12-27 15:15 DEBUG  TaskList: ### Running get_metalink...
12-27 15:15 DEBUG  downloader: downloading http://releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.metalink > G:\ubuntu\install
12-27 15:15 DEBUG  downloader: Download start filename=G:\ubuntu\install\ubuntu-11.04-desktop-amd64.metalink, url=http://releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.metalink, basename=ubuntu-11.04-desktop-amd64.metalink, length=28363, text=None
12-27 15:15 DEBUG  downloader: download finished (read 28363 bytes)
12-27 15:15 DEBUG  downloader: downloading http://releases.ubuntu.com/11.04/MD5SUMS-metalink > G:\ubuntu\install
12-27 15:15 ERROR  TaskList: [Errno 14] HTTP Error 404: Not Found

First, Wubi tries to find an Ubuntu ISO image on your computer. You don't have one--you probably just downloaded Wubi.exe (which is ordinarily a perfectly good thing to do). Then Wubi tries to download the ISO.
It connects to the http://releases.ubuntu.com server. But Ubuntu 11.04 is no longer supported--it is an end-of-life release. EoL releases are stored on a different server, accessible at http://old-releases.ubuntu.com. Some data on the releases server will redirect to the old-releases server automatically, but most will not; in particular, trying to download files that are actually part of an old distribution will fail. So Wubi downloads the initial .metalink file successfully but fails to download the first file that's part of Ubuntu 11.04 (which happens to be MD5SUMS-metalink).
This also explains why you can solve this by providing the ISO image yourself.

If you are using a cd either in physical or virtual cdrom drive. You can just try to disable the internet or any network on your machine. You should not get this error after that.
:)


BlueScreen after installing Ubuntu 12.04 with wubi First : I not good in english and totaly new with linux. I googling and it's say that ubuntu good for fresh user.

My problem here, I installed Ubuntu 12.04 with wubi. When my pc boot it give two option, windows xp or ubuntu. I choose ubuntu but nothing appearing except grub look alike command prompt in windows. I am trying to exit this "grub" but nothing working. Since nothing happen, i force shut down (push off power button), seem like my biggest mistake. It cost me which i cannot boot to windows xp anymore.

The most stressful thing is, this pc is goverment work which a lot of important files in my document which not recovery yet. and my pc set with password. Currently i use my notebook hardisk (have windows 7 in it) as temp, so i still can doing work. i cannot access my own files because it is protected.

What should i do?

You need to run Windows repair if Windows XP is not booting. If your drive is encrypted or you don't have a Windows XP installation disk then you probably need to get your IT department to look at it.

Wubi not booting is one issue, but if your drive is encrypted then this is normal that it won't work. You cannot boot Wubi from an encrypted drive because Ubuntu runs natively, not under the Windows OS (which can unlock the drive).

Windows not booting is another issue, which seems to be your real issue. It should work because Wubi doesn't change any of the boot files Windows needs. So it's hard to speculate what exactly is wrong with Windows. That's why you need a Windows repair disk.

Please don't try to install Grub or run boot-repair. That will be a waste of time and at best do nothing, at worst, more damage.

You might need to recover grub.

Insert your Ubuntu CD, reboot your computer and set it to boot from CD in the BIOS and boot into a live session. You can also use a LiveUSB if you have created one in the past.
Install and run Boot-Repair
Click "Recommended Repair".
Now reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting. You will be able to choose between Ubuntu and Windows.

If this doesn't work, use the terminal way. As you are not familiar with Linux, please copy and paste the code.

Open a terminal. As of Ubuntu 11.10 and 11.04, this can be done by opening the Unity Dash (you can click the Ubuntu logo in the top panel or use the Windows key on your keyboard) and typing in "Terminal", and clicking what comes up. On earlier versions, you can achieve this by going to Applications -> Accessories -> Terminal.

1.You are then presented with a standard bash prompt, type:

sudo grub-install /dev/XXX

where XXX is the device of your Ubuntu install. (eg: grub-install /dev/sdb). Hint: You can also use /dev/disk/by-label/ if the partition you installed on has a label. You can determine the /dev node for such a device by running:

ls -l /dev/disk/by-label/

This will give the output of something like:

lrwxrwxrwx 1 root root 10 Oct 16 10:27 data -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 data2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 fat -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 16 10:27 home -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 16 10:27 root -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 swap -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 16 10:27 windows -> ../../sdb1

You can also use sudo fdisk -l if you do not see the /dev/disk/by-label:

$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001bc54

   Device Boot      Start         End      Blocks   Id  System
  /dev/sda1   *           1       18725   150403072   83  Linux
 /dev/sda2           18725       19458     5884929    5  Extended
/dev/sda5           18725       19458     5884928   82  Linux swap / Solaris

Disk /dev/sdb: 15.1 GB, 15103033344 bytes
64 heads, 32 sectors/track, 14403 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00068852

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       14403    14748656    c  W95 FAT32 (LBA)

From here, find only the drive name, ignore the partition number, that is, for partitions labeled "root", "data2", "fat", "home" and "swap" it's all still just sda. This is due to the fact that GRUB is installed in the MBR of the drive, and not on a partition.

Now reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting. You will be able to choose between Ubuntu and Windows.

Using the Ubuntu Alternate CD

1.Boot your system from the Ubuntu Alternate CD.

When the Ubuntu splash screen comes up with the boot: prompt, type in rescue and press enter.
Choose your language, location (country) and then keyboard layout as if you were doing a fresh install.
Enter a host name, or leave it with the default (Ubuntu).
At this stage you are presented with a screen where you can select which partition is your root partition (there is a list of the partitions on your hard drive, so you are required to know which partition number Ubuntu is on). This will be dev/discs/discY/partX, where the X is a partition number and Y is the number of the drive.

6.Now proceed as described in "The terminal way" above.

Hope this helps!!!


RTL8188CUS Wireless USB Dongle doesn't work unless I disable wireless security I have a Digitus DN7045 wireless USB dongle which uses the Realtek RTL8188CUS chipset. If I disable security on my wireless network, it works fine. As soon as I enable any type of security, it stops working and Network Manager keeps asking for my network key/password over and over again.

The same dongle works fine on Windows with or without security and I've already updated to the latest driver (8192cu) from Realtek.com.tw and I've already blacklisted the default driver, rtl8192cu.

None of this has helped but, like I said, it is working, just not with security enabled. What can I try next?

I had the same problem and here's how I solved it. The summary is the built-in driver didn't work work completely, and I downloaded installed the manufacturer's driver instead, making sure the new driver was set to start on boot while the built-in driver was blacklisted.

Search on the Realtek site for your hardware. For me, I used lshw -c network to see that I had RTL8192cu, so I searched for that, which led me here
You should get a zip file to download it. I used a second computer for this and saved it to a USB drive, and then transferred it over the SneakerNet to the troubled computer.
After unpacking the 'zip' file, enter the directory it creates in the terminal and run  sudo bash install.sh
Disable the built-in driver by editing  /etc/modprobe.d/blacklist.conf and adding a line like blacklist rtl8192cu (The name you use should match output from lshw -c network
Set the new driver to be loaded by boot by editing /etc/modules and adding the line 8192cu
This step is optional. You can immediately test the new driver by manually unloading the old driver and manually loading the new driver. After these steps, the networking should work.

sudo modprobe -r rtl8192cu
sudo modprobe 8192cu
Reboot and test the networking again to confirm that your changes 'stick'.

I recommend keeping the "zip" file from Realtek around in case you need it again. The changes to files in /etc should survive upgrades, but the driver itself may not survive all kernel upgrades and the "install" step may need to be repeated.

I have several usb dongles with the 8188/8192cu chip. Some have an antenna and some not.  What I find is that despite having the same chip, some of them will work in Ubuntu 12.10 and 13.04 right out of the box without having to re-install the driver and some won't work with the native kernel drivers. One of the8188/8192cu minis without an antenna will connect if I move the laptop closer to the AP and the other won't and that tells me distance can be the real problem in some cases rather than the driver. I find it very interesting that different dongles with the same chip may or may not work with the native drivers. I also have a Rosewill RNX-EasyN1 that has the Raylink 2800 chip that is instantly recognized by all the Linux distros I have tried.


Using GIO in Python 3 How can I access the gio module for Python 3.2? (I want to interface with GVFS.) I did

sudo apt-get install python3-gobject

but this does not allow me to do

import gio

as it did in Python 2.7. Is the GIO module not provided with GObject in Python 3? How do I access it?

gio is a PyGTK module, and is not available for Python 3 because PyGTK itself is deprecated. If you want to create a GTK+ application in Python 3, you will need to use its replacement: PyGObject. In the case of Gio, you import it like this.

$ python3
Python 3.2.2 (default, Sep  5 2011, 21:17:14)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gio

Such documentation as exists can be found here. Best of luck!

It appears to be renamed to 'gi':

$ python3
Python 3.2.2 (default, Sep  5 2011, 22:09:30)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>>

See the file listing of the python3-gobject package: http://packages.ubuntu.com/oneiric/i386/python3-gobject/filelist


How do I increase swapfile in Ubuntu 18.04? I have laptop with 8 GB RAM and 1TB HDD. I have swapfile which is 2 GB (Ubuntu 18.04 uses a swapfile instead of a separate swap partition by default) and I want to increase it to use hibernation.

I want to increase it from 2 GB to 16 GB. Here is a screenshot of GParted:

I tried to increase it with fallocate -l 16G but it did not work.

Also there is the image from free -m:

From Ubuntu 18.04 onwards, a swapfile rather than a dedicated swap partition is used (except when LVM is used). The swap file is named "swapfile". To change the size of this swap file:

Disable the swap file and delete it (not really needed as you will overwrite it)
sudo swapoff /swapfile
sudo rm  /swapfile

Create a new swap file of the desired size. With thanks to user Hackinet, you can create a 4 GB swap file with the command
sudo fallocate -l 4G /swapfile

In this command, adjust 4G to the size you want.
Alternatively, you can use dd but feeding the correct parameters requires some calculations. If you want to make a 4 GB swap file, you will need to write 4 * 1024 blocks of 10242 bytes (= 1 MiB). That will make your count equal to 4 * 1024 = 4096. Create the file of this size with the command
    sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

Assign it read/write permissions for root only (not strictly needed, but it tightens security)
sudo chmod 600 /swapfile

Format the file as swap:
sudo mkswap /swapfile

The file will be activated on the next reboot. If you want to activate it for the current session:
sudo swapon /swapfile

You can check the swap that is available with the command swapon -s (no root permissions needed).

From the man mkswap it is recommended to use the dd command as demonstrated in @vanadium post.

If  you  don't  know  the  page  size  that  your  machine uses,
you may be able to look it up with
"cat /proc/cpuinfo"
(or you may not – the contents of this file depend on architecture and kernel version).

   To set up a swap file, it is necessary to create that file before
   initializing  it  with  mkswap,  e.g. using a command like

          # fallocate --length 8GiB swapfile

   Note  that  a  swap  file must not contain any holes.  Using cp(1) to
   create the file is not acceptable.
   Neither is use of fallocate(1) on file systems that support preallocated
   files, such as XFS or ext4,  or on  copy-on-write  filesystems like btrfs.

   It is recommended to use dd(1) and /dev/zero in these cases.
   Please read notes from swapon(8) before adding a swap file to copy-on-
   write filesystems.

And here the notes of man swapon

NOTES
       You should not use swapon on a file with holes.  This can be seen in
       the system log as

              swapon: swapfile has holes.

       The swap file implementation in the kernel expects to be able to write
       to the file directly, without the assistance  of the filesystem.  This
       is a problem on preallocated files (e.g.  fallocate(1)) on filesys‐
       tems like XFS or ext4, and on copy-on-write filesystems like btrfs.

       It is recommended to use dd(1) and /dev/zero to avoid holes on XFS
       and ext4.

       swapon may not work correctly when using a swap file with some
       versions of btrfs.  This is due to  btrfs being  a copy-on-write
       filesystem: the file location may not be static and corruption can
       result.
       Btrfs actively disallows the use of swap files on its filesystems
       by refusing to map the file.

       One possible workaround is to map the swap file to a loopback device.
       This will allow the filesystem to determine the mapping properly but
       may come with a performance impact.

       Swap over NFS may not work.


Are the source code of commercial version of open source software encrypted or hidden from being manipuated Commercial version of open source softwares are the main source of revenue for canonical, red head team, oracle [for MYSQL], etc. So my question is do all these source codes hidden or encrypted from being manipulated, otherwise their will be no way of generating revenue for all these open source teams.

Open source apps should share source code even if it is commercial,So if source code is hidden, it is not opensource, For eg redhat source code is available for download, But still redhat earns money from that product

Usability is the lynchpin that makes OSS based companies stay alive.  Open source or not, most commercial companies that are founded on open source are based on UI improvements or management interfaces(the good ones anyway).

Landscape is a Canonical effort for large node number management with a simple interface.  Juju is the effort to have scripts to make deployment of specific node-types easier.

Do I think Landscape will leverage a lot of Juju scripts?  Yes, but provisioning isn't all it does.

MySQL is a separate product from the Oracle database.  They acquired it AFTER they had a functional high-end product.  Let's leave that one out.  Examine Virtualbox instead.  Virtualbox OSE has a lot of features, enough to make it usable.  If you want USB passthrough, you need the non-open-source parts.  It's still free, but would you pay $5 for USB passthrough and use Vbox or tell everyone you support to buy a $300 VMWare product?

Asterisk was used by Trixbox.  Deployment and interface.

The OSS guys get it working.  The commercial guys put on a slick UI and make it easy to deploy.  That's just how I see it.


What Ubuntu version should I use What Ubuntu version should I use? Here are the specs.

Intel Celeron 2.80Ghz Processor
LGA775 socket motherboard (Asus P5PE-VM)
2GB RAM
80GB Hard Drive
Intel 865G + Intel ICH5 Chipset
Intel Extreme Graphics 2

Thanks in advance
Bombet

With a celeron processor and only 2 gigs of ram your computer will run better with lubuntu or xubuntu.lubuntu or xubuntu 32bit version. You could run ubuntu 32bit version but it will be slower then the other two.

It is not a matter of which one is better both are good but lubuntu will use the least resources so it will be a little faster and snappier.

Just make a livecd or liveusb of both and test for yourself to make sure everything works but remember the live version will be slower then when it is installed.

14.04 LTS is the latest version. 13.10 support will end in 4 days, settings can be changed to allow faster use though you might want to look at ZorinOS. It is basically a Ubuntu shell, uses all the same commands and repositories but is much faster in my experience


Ubuntu core snappy for rpi2 - source code I would like to work on ubuntu core snappy for raspberry Pi 2.
I got a the image - ubuntu-15.04-snappy-armhf-raspi2.
How do I get the corresponding source code?

Thanks.
Said

Ubuntu Core is directly build from the Ubuntu distribution, just with a different set of packages.

So, what happens during builds is basically a traditional live creation, and removal of the debs and apt metadata in /var/lib.

To get this Ubuntu source code, you can simply refer to Where can I find the source code of Ubuntu? for instance!


How to run chromium as root How do I run chrome as root in Ubuntu 12.04?

Open google-chrome located in /usr/bin with 'gedit', 'kate' or your favorite text editor:

sudo gedit /usr/bin/google-chrome

Add --user-data-dir (without the quotes) at the very end of the file. Mine looks like this:

exec -a "$0" "$HERE/chrome" "$@" --user-data-dir

Save, close and voilà, you're done. You can open chrome as root now.

Simple rly. Fastest way. But this isn't recomended.

chromium-browser --user-data-dir=/home/someuser


Why is the mysql-server package from mysql.com missing server files? I'm usually not using Ubuntu, but decided to give it a try today because it's the preferred distro for Windows Subsystem for Linux, that I wanted to try today to see if/how it could replace my VMWare machines on Windows 10.

So I'm using Ubuntu on WSL, although I don't think it makes a difference here.

Anyway, I installed the MySQL APT repo to get MySQL 8.0:

$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
$ sudo apt-get update
$ sudo apt-get install mysql-server

Now when I attempt to start the mysql service, I have no luck:

$ sudo service mysql start
mysql: unrecognized service

$ sudo service mysqld start
mysqld: unrecognized service

$ sudo service mysql-server start
mysql-server: unrecognized service

A quick look at init.d shows that there is no file for mysql:

$ ls -al /etc/init.d/mysql*
ls: cannot access '/etc/init.d/mysql*': No such file or directory

Note that I cannot use systemctl to start a service, as systemd is not available on WSL.

Now the interesting part: when I list the files inside the mysql-server package, it only contains files in /usr/share!

$ dpkg-query -L mysql-server
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mysql-server
/usr/share/doc/mysql-server/LICENSE.gz
/usr/share/doc/mysql-server/README
/usr/share/doc/mysql-server/changelog.Debian.gz
/usr/share/doc/mysql-server/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/mysql-server

Why is the mysql-server package missing the actual server files in MySQL APT repo?

see if the comment here helps -- https://github.com/Microsoft/WSL/issues/3631#issuecomment-465966498

here is my workable gist https://gist.github.com/e-cloud/34acbefe0597a02f9a081a01eff6dd24

sudo apt-get remove mysql-server mysql-client -y
sudo apt-get autoremove -y && sudo apt-get autoclean -y

wget –c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb # select 5.7

sudo apt-get update
sudo apt policy mysql-server #(it will show 5.x is the default candidate)

sudo apt-get -y install mysql-server
# ensure your host windows have no mysql service running
sudo service mysql start
sudo service mysql stop

sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb # select 8.0
sudo apt-get update
sudo apt policy mysql-server #(it will show 8.x is the default candidate)

sudo apt-get -y install mysql-server
sudo sed -ie 's/\/usr\/share\/mysql\/mysql-helpers/\/usr\/share\/mysql-8.0\/mysql-helpers/' /etc/init.d/mysql
sudo service mysql start


Unable to install Win font on Ubuntu. couldn't be accessed by user '_apt' I am trying to install Windows font on Ubuntu 16.04. It says package has installed when I try to reinstall the same package but fonts are not found on LibreOffice. Also, while installing it gives some error.

$ sudo apt-get install ttf-mscorefonts-installer
Reading package lists...
Done Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
   ttf-mscorefonts-installer
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/29.5 kB of archives.
After this operation, 134 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package ttf-mscorefonts-installer
(Reading database ... 208570 files and directories currently installed.)
Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
mscorefonts-eula license has already been accepted
Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
Processing triggers for update-notifier-common (3.168.2) ... ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading
http://downloads.sourceforge.net/corefonts/andale32.exe Get:1
http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB]
Fetched 198 kB in 5s (35.9 kB/s)
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/andale32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
ttf-mscorefonts-installer: downloading
http://downloads.sourceforge.net/corefonts/arial32.exe Get:1
http://downloads.sourceforge.net/corefonts/arial32.exe [554 kB]
Fetched 554 kB in 4s (124 kB/s)
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arial32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading
http://downloads.sourceforge.net/corefonts/arialb32.exe Get:1
http://downloads.sourceforge.net/corefonts/arialb32.exe [969 B] Err:1
http://downloads.sourceforge.net/corefonts/arialb32.exe
Hash Sum mismatch Fetched 969 B in 2s (367 B/s)
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arialb32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch http://downloads.sourceforge.net/mirrorproblem?failedmirror=excellmedia.dl.sourceforge.net Hash Sum mismatch
E: Download Failed

I followed this step. There still some Warning (W) was visible but No Error (E).
Warning is basically this:

W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/webdin32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

But after the steps mentioned in the link, I can see Window Font appear in LibreOffice font selection list.

Old Update Information Dialog Box still came. Not sure if it is coming due to old process or due to this one.

Do I need to take any more steps or everything is fine?

It's two things mixed up:

"Can't drop privileges..." is a warning, which you can just ignore. That warning is usually followed by a confirmation that the file was downloaded.

However, the attempt to fetch arialb32.exe was a real failure ("Hash Sum mismatch"). May be caused by a temporary server glitch; you can try again by reinstalling:

sudo apt install --reinstall ttf-mscorefonts-installer

As I said in the question itself that following link has solved but few warning was there so I wanted to get reply.

Main problem for me was Firefox. Font was looking very small. Unity Tweet tool has not proved useful for me. This tips has worked it seems. Text are looking better. There layout.css.devPixelsPerPx has made text readable. I am using value = 1.2 instead of suggested value 2.


How can I recover my data after replacing Windows with Ubuntu? I have migrated from Windows 7 to Ubuntu just yesterday. Windows 7 was in my C: drive. I did not realise that if I wipe Windows 7 and install Ubuntu, Ubuntu would be installed in the C: drive only. So I didn't make any backups, and I deleted Windows and installed Ubuntu. But, Ubuntu has formatted my hard drive and I have lost all my important data!

How can I recover my data now?

For recovering accidentally overwritten partitions with TestDisk  please follow these prcoedures:

Stop using the drive!
Boot Ubuntu live session ("Try Out Ubuntu") from a CD or USB-drive
Install Testdisk to the live session via the Software Center
follow this concise guide for recovery: TestDisk Step by Step

Optionally (but highly advisable) and if we had an external drive big enough to hold all of the faulty drive we can make a backup to recover data or partitions from an image. Make this image with the following command in a terminal:

sudo dd if=/dev/sdX of=/path/to/external_drive/backup.img

Replace sdX with the drive to recover. Since dd is an advanced and potentially harmful tool take extra care to not accidentally overwrite any drive you may still need.

In case you are unable to recover your partitions you may be able to recover single files by running PhotoRec wich comes with the TestDisk suite.

Just to have mentioned it: there are other "forensic" tools to help you recover lost partitions or files. See How to recover deleted files?.

You can use testdisk application to recover data from device .For downloading use

sudo apt-get install testdisk


How to check available webcams from the command line? Is there a terminal command that lists all the webcams connected to my computer including the native one? Maybe using the ffmpeg package?

v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices

Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
        /dev/video0

Tested on Ubuntu 16.04.
video1 metadata device
On Ubuntu 19.10 Lenovo Thinkpad P51 however, it lists two such devices, video0 and video1, but I only have one camera, and can only see images from video0 with ffplay. This has been asked at:

Four /dev/video entries but just one camera
https://unix.stackexchange.com/questions/512759/multiple-dev-video-for-one-physical-device

What happens is that /dev/video1 contains some kind of video metadata only and not the images as can been seen from:
sudo v4l2-ctl --device=/dev/video0 --all
sudo v4l2-ctl --device=/dev/video1 --all

which shows respectively:
        Device Caps      : 0x04200001
                Video Capture

        Device Caps      : 0x04a00000
                Metadata Capture

How to see the camera image live

https://unix.stackexchange.com/questions/3304/how-do-i-watch-my-webcams-feed-in-linux
What webcam apps are available and how to check if your webcam is working?

My favorite:
sudo apt install ffmpeg
ffplay /dev/video0

Take a single picture from the command line
Take a picture from terminal
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out.jpg

Record a video from the command line

Webcam video recorder
capturing video from webcam and saving to a file
Anything better than Cheese for video capture?

Parameters chosen based on "How to get camera parameters like resolution" below:
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -c copy out.mkv

Then:
ffprobe out.mkv

contains as expected:
Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

If you choose wrong parameters, the resolution might be slow. The camera already outputs a specific encoded format, and the simplest way to record is to just copy that format as above:

https://stackoverflow.com/questions/47292785/recording-from-webcam-using-ffmpeg-at-high-framerate
https://superuser.com/questions/1021899/what-ffmpeg-settings-to-get-the-best-possible-video-resolution-framerate-that-my

TODO If I replace -c copy out.mkv with out.ogv to try and record directly to an open format (unlike MJPEG), I got a low resolution video.
Interactive image/video capture with preview
Picture/Video capture programs
Until I learn how to run ffplay preview on one shell and capture at the same time from another shell with ffmpeg (they fight over the video device), I'll have to lower myself to this amazing GUI program:
sudo apt install cheese

Read camera data from C/C++
https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
A concrete C++ example that processes images from the camera on the GPU with OpenGL and shows it live: https://stackoverflow.com/questions/13693946/image-processing-with-glsl-shaders/40641014#40641014

How to get camera parameters like resolution

How can I find out the supported webcam resolutions?
https://superuser.com/questions/639738/how-can-i-list-the-available-video-modes-for-a-usb-webcam-in-linux

v4l2-ctl --list-formats-ext

produces some good information:
ioctl: VIDIOC_ENUM_FMT
    Type: Video Capture

    [0]: 'YUYV' (YUYV 4:2:2)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x180
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.100s (10.000 fps)
    [1]: 'MJPG' (Motion-JPEG, compressed)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x180
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)

How to get the corresponding ffmpeg encodings
v4l2-ctl --list-formats-ext gives the Linux kernel name of things, e.g . YUYV 4:2:2. But to do stuff with ffmpeg, you need to know the ffmpeg nama sometimes. You can do it like this:
ffmpeg -f v4l2 -list_formats all -i /dev/video0

sample output:
[video4linux2,v4l2 @ 0x555ba7267240] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x480 320x180 320x240 352x288 424x240 640x360 848x480 960x540 1280x720
[video4linux2,v4l2 @ 0x555ba7267240] Compressed:       mjpeg :          Motion-JPEG : 640x480 320x180 320x240 352x288 424x240 640x360 848x480 960x540 1280x720

This for example told us that the ffmpeg name for YUYV 4:2:2 is yuyv422.

For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber

To check the user friendly names of the connected webcams:

from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph

graph = FilterGraph()
print(graph.get_input_devices())


lenovo ideapad 14ISK 300 lost wifi connection ubuntu 14.04 I can connect to wifi when I boot the 300 14ISK, however, after a while the wifi connection will lost, and I cannot see the same ssid of the router.

Please help.

Output of lspci -knn | grep Net -A2

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]
Subsystem: Lenovo Device [17aa:a814]
Kernel driver in use: rtl8821ae

Try upgrading the distribution to Ubuntu 16.04.1.
[I've had a similar situation - with a new Lenovo Ideapad 14ISK Computer Model - where I couldn't connect to Wi-Fi on account of the fact that I had (Xubuntu) 14.04 and should have upgraded to/downloaded (Ubuntu) 16.04.1 in order to have
Wi-Fi Connection].
Good Luck.


Steam won't start on Ubuntu 17.04 Linux noob here.

I just installed Steam and when I run "steam" in the terminal it outputs this:

    priam@priam:~$ steam
    tar: This does not look like a tar archive
    xz: (stdin): File format not recognized
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    find: ‘/home/priam/.steam/ubuntu12_32/steam-runtime’: No such file or directory

I tried searching for solutions but I couldn't find anything that helps and I don't want to use Windows again. Thanks

mkdir /home/$(whoami)/.steam/ubuntu12_32/steam-runtime

worked great for me

Fixed:

$ mkdir /home/$(whoami)/.steam/ubuntu12_32/steam-runtime
$ steam
Running Steam on ubuntu 19.04 64-bit
STEAM_RUNTIME is enabled automatically

I got steam from the steam website. It works perfectly. The programs in the software center can get quite outdated.

Why do you not want to use steam on windows? Because not all windows games can be played on linux.


pip: AttributeError: 'module' object has no attribute 'SSL_ST_INIT' With pip on Ubuntu 14.04, I am getting this error:

Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

How can I solve this?

I found that this answer on stackoverflow helped. Basically, it says that you should do this:

rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL

You are missing pyOpenSSL package, or is outdated.

simply run

$ pip install pyopenssl

and update packages (may not be necessary).


How do I stop the Unity launcher from hiding behind other windows? The Unity launcher tends to put itself in the background of any windows sometimes.

It does not occur on startup, just randomly after some hours of usage.

How do I bring it back to front without restarting my computer/destroying my gdm session?

.

It was hard to get a picture of both the dash and the launcher since the dash captures the PRT SCRN key. Although the dash will hide behind any other windows too.

After some further use, my pc froze for a brief moment (it's under heavy load from render jobs), now dash and launcher shows correctly in front of everything.

I found this solution from comment #15 in an Ubuntu bug report:

  After this bug occurs, restarting unity by "unity& disown" in a terminal fixes the problem

There there is a duplicate bug here


Scroll Bar Way Too Narrow :( I just installed Ubuntu 17.10 and my scroll bars are WAY to narrow. I can barely grab them with my mouse. The scroll bar in LibreOffice and Firefox is so small I can barely grab it.

I have searched Google for hours trying to find a solution to this, with no luck.

Can someone please tell me how to change the width so that they're actually usable? I'm fairly new to Linux and the less complicated method, the better.

As I previously recommended in the answer to similar question you may try to remove overlay scrollbars and change CSS properties:

#Step 1
echo "export GTK_OVERLAY_SCROLLING=0" >> ~/.profile

#Step 2
mkdir -p ~/.config/gtk-3.0
cat <<EOF > ~/.config/gtk-3.0/gtk.css
/* Adding the buttons on the edges (if you don't need them, skip the next 4 lines)
 */

.scrollbar {
  -GtkScrollbar-has-backward-stepper: 1;
  -GtkScrollbar-has-forward-stepper: 1;
}

/* Scrollbar trough squeezes when cursor hovers over it. Disabling that
 */

.scrollbar.vertical:hover:dir(ltr),
.scrollbar.vertical.dragging:dir(ltr) {
    margin-left: 0px;
}

.scrollbar.vertical:hover:dir(rtl),
.scrollbar.vertical.dragging:dir(rtl) {
    margin-right: 0px;
}

.scrollbar.horizontal:hover,
.scrollbar.horizontal.dragging,
.scrollbar.horizontal.slider:hover,
.scrollbar.horizontal.slider.dragging {
    margin-top: 0px;
}

/* Slider widens to fill the scrollbar when cursor hovers over it. Making it permanent
 */

.scrollbar.slider.vertical:dir(ltr):not(:hover):not(.dragging) {
    margin-left: 0px;
}

.scrollbar.slider.vertical:dir(rtl):not(:hover):not(.dragging) {
    margin-right: 0px;
}

.scrollbar.slider.horizontal:not(:hover):not(.dragging) {
    margin-top: 0px;
}

EOF

#Step 3
cat <<EOF > ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-color-scheme="tooltip_bg_color:#ffffaf\ntooltip_fg_color:#000000"
gtk-application-prefer-dark-theme=0

gtk-primary-button-warps-slider = false

EOF

#Step 4
sudo apt-get purge overlay-scrollbar overlay-scrollbar-gtk2

It works at least on 16.04 LTS with MATE DE.

Check the settings on your TV/Monitor it could be the same problem I had. Please go here>>   How do I fix overscan on my HDMI HDTV?    << Worked for me.


PC won't boot anything but Ubuntu Well, I decided to give Ubuntu 12.10 a try but really isn't for me, mostly because I'm a gamer at heart and the game selection on Linux is very limited. :P

I want to revert back to Windows 7 but I can't seem to be able to access the recovery partition on my Desktop. It's an Acer, so the Alt + F10 combo should trigger the recovery management during the boot, but for some reason it doesn't: the PC goes straight into Ubuntu.

I've tried reinstalling Windows from a DVD but it looks like the computer is ignoring whatever boot command I give it. I changed the boot order inside the BIOS, I tried to directly tell the PC (with the built in function) to boot from the DVD but nothing: the PC won't boot anything but Ubuntu.

I can tell the recovery partition is still there because the disk management says that out of my 1TB, 60GB are already occupied by stuff, and I don't think Ubuntu takes that much space. So, something must have screwed up the boot system.

Any ideas on how could I fix this? Thanks in advance.

edit: I should have added that Ubuntu 12.10 is the only OS installed on the HDD at the moment. I'd like to reinstall Windows from either the recovery partition or the DVD but they just won't boot up! The PC goes straight into Ubuntu, regardless of what I do/click.

a) Option 1:

Setps.....

1) Insert the Windows 7 DVD into the CDROM.
2) Shut down the computer. (DO NOT RESTART)
3) Start the computer, & immediately after that start tapping on F12 which will give you boot options. Select CD/DVD ROM Over there.
4) Windows 7 should start the installation Process.

b) Option 2:

Steps......

1) boot the system normally using Ubuntu installation that is there on Hard Drive.
2) Once you reach Ubuntu Desktop, insert Windows 7 DVD in DVD ROM Drive.
3) Ubuntu will automatically give you pop-up of the Windows 7 DVD & Start the Default auto-run program of Windows 7 DVD.
4) Click on the option to install Windows 7 from that pop-up menu.
System may restart Automatically After step no. 4
5) Windows 7 will start the installation.

Let me know if u have any further queries.

Ubuntu doesn't see Windows loader if its installed first (Before Windows).

You should just remove Ubuntu using Ubuntu installation disk and then you could regain control over the boot.

If you want to use just Windows, just remove all Linux partitions after removing Ubuntu.

If you want to keep using Ubuntu after that as a second OS choice, just leave some free disk space and install Ubuntu after you install Windows.


Not able to update Ubuntu 18.04 I have Ubuntu 18.04 and python 3.7.
uname -a
Linux username-laptop 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

When I run sudo apt-get update I get this error :
E: The repository 'http://dl.bintray.com/aluxian/deb stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://dl.bintray.com/aluxian/deb dev Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I tried this solution but I am also unable to open Software and updates.

I could finally solve the problem myself.
Before that, I did sudo update-alternatives --config python3 and switched to python 3.6

After that, I followed the answer of the same post (which I couldn't earlier because Software and updates wouldn't open) and unticked https://dl.bintray.com/aluxian/deb. Then the sudo apt-get update problem was solved !!!

Probably find the repository is not on apt-get anymore. Use sudo apt update, it will then tell what packages need to be upgraded. Just upgrade them all by typing in sudo apt upgrade in your terminal. Update snap as well. Ubuntu relies on snap more so than apt-get and apt. Bit of a grey area in open-source software.


How to alter touchpad settings on Ubuntu GNOME 16.04? After upgrading to Ubuntu GNOME 16.04 with GNOME 3.20 I have found that if I tap my touchpad it clicks which is something I do not want due to a faulty touchpad, previously I was able to disable this through the gnome-control-center, but seemingly there is no way to do this any more through there, so how do I do it? Also, even though it is set to false in gsettings and the dconf-editor seemingly for some reason somewhere in the system it is also set to true as it is behaving as such. I am also unable to set natural scrolling or any of the other touchpad settings seemingly, why not?

To be able to set these settings through Terminal or through the gnome-control-center you need to make sure that you have xserver-xorg-input-libinput installed. It appears to be a bug that it is not already installed by default, in order to install simply run:

sudo apt-get install xserver-xorg-input-libinput

After doing so and then logging out and in again you will find new settings in the gnome-control-center's Mouse & Touchpad settings:

You should now also be able to set the touchpad settings through the dconf-editor and gsettings in Terminal.

Related: LP Bug #1586657

I just installed gnome-control-center in Unity, and the tap-to-click check box is there, just to the left of two finger scroll and natural scrolling.


Wireless connected, IP fetched, but no browsing I'm using 12.04 on an Acer 722, and just after I've installed MESA drivers to use open source graphics drivers, the wireless connection stopped working. As soon as I've removed bcm STA drivers, the adapter came back to life, finds my router, connects, fetches an IP address from the DHCP server (mikrotik) but no browsing.

On terminal, I've ping'd my router (192.168.88.1) and after a good amount of time, it starts answering "unreachable". Through cable everything seems fine. Other devices run fine under this same network (as this same netbook did before with the STA drivers).

Is there a way I can run the previous driver (it fails with blacklist error on jockey log, even after I've put an # mark before the blacklist marking on the blacklist file) or are there any other options?

Update: Yes, everything comes out fine from the DHCP server. When I try to PING the provided address from another station, it goes "unreachable". (that also happens after a good amount of time on the netbook, updated above) Setting all the IPv4 info manually, the same occurs. The addresses are on the accordingly range.

I've posted the question as "last resort" since I've tried everything that I could found on web so far, even issues that weren't like mine but involved similar hardware. With ATI'ś proprietary graphics driver from AMD website I did not have such issues, since the STA driver worked flawlessly. But once MESA drivers were installed, I can't enable it anymore. I'd rather stick with the open source drivers, because the overall machine seems to run faster and there are no hibernation issues.

Made it work. If you're an AspireOne 722 owner, the best thing to do is:

First: follow the steps on the link below, be sure to install the open source video drivers, since it also installs drivers for several devices on your netbook:

UBUNTU - INSTALLATION OF ACER ASPIRE ONE 722 (AO722)

Second: run those on terminal:

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source
sudo apt-get install b43-fwcutter firmware-b43-installer

If it does not work still, reset your router to factory settings. Running the code brought my broadcomm back to live. Before the factory reset, the router worked fine with wired and wireless connections BUT both the netbook and an iPad, connected fine but refused to browse.

Does the DHCP set 192.168.88.1 as the gateway?

Is the IP address that it gives you in the same range for example 192.168.88.something?

Can you ping the IP assigned by the DHCP?

Have you tried adding your network settings manually?


How do I get the 12.04 login screen to turn off screen after timeout? On 12.04, the login screen doesn't timeout or go to screensaver after a set time. I have a number of machines in a testbed that spend a lot of time waiting for logins and I'm afraid the monitors will get damaged.
Thanks

This behavior has now gone in Precise after an upgrade (I admit, I experienced that problem too). I suggest you to upgrade your machines. May be that was a bug

sudo apt-get update
sudo apt-get upgrade

Your monitors won't be damaged from lack of screensaver :D

To set timed screen turn off with lock enter System Settings -> Brightness and Lock.
Set "Turn screen off when inactive for:"
Set "Lock" to ON
Set "Lock screen after:" to "Screen turns off"


How to burn 801MB iso file I have ubuntu 11.10 (XFce) and I download Xubuntu 13.04 64Bit iso file that have 801MB and both brasero and XFburn can't burn that image on 800MB CD-R. Can I burn that image on that CD using overburn (those programs don't have that option, I use to do that on Windows but never on GNU/Linux) or do I need to buy larger CD?

You probably won't find a CD that will (naturally) support that size file, and overburning isn't recommended due to issues.

I'd recommend using a DVD instead, or if that's not an option, a USB drive.

EDIT: I'd emphasize trying to get a DVD... I personally had many issues with using my 8 GB USB drive.  The first time I attempted a DVD install was fully successful.

You can't burn it to a single layer DVD or split it. What you can do is mount it with something like Daemon Tools and then rip that your hard disk. Once it's in your hard drive and no longer in ISO format you can either shrink it to single layer size with something like DVDShrink or you can possibly split it with something like IFOEdit if you know what you are doing. I would recommend using DVDShrink as it can get complicated to split with IFOEdit if you are not very experienced in doing this.


Video quality on Youtube (Firefox) is limited to 360p I'm finding that the video quality setting on Youtube videos only has the options "Auto" and "360p". My browser is Firefox 37.0.1 and I'm using Ubuntu 14.04 LTS 64 bit, and my motherboard chip-set is Intel 965GM (I believe) and is using Xorg open source driver.

Additionally, I have higher quality options available in the dedicated Youtube application from the Ubuntu software center, however I would prefer to use my browser.

Any advice on how to enable higher quality settings would certainly be appreciated!

sudo lshw -class display returns:

*-display

       description: VGA compatible controller
       product: Mobile GM965/GL960 Integrated Graphics Controller (primary)
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:43 memory:f6e00000-f6efffff memory:e0000000-efffffff ioport:efe8(size=8)

*-display
       description: Display controller
       product: Mobile GM965/GL960 Integrated Graphics Controller (secondary)
       vendor: Intel Corporation
       physical id: 2.1
       bus info: pci@0000:00:02.1
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: latency=0
       resources: memory:f6f00000-f6ffffff

Head to about:config page and check if the following keys are set to true:

media.mediasource.enabled
media.mediasource.mp4.enabled
media.mediasource.webm.enabled

After that, install the packages gstreamer1.0-libav and gstreamer1.0-plugins-good with

sudo apt-get install gstreamer1.0-libav gstreamer1.0-plugins-good

Restart Firefox and go to https://www.youtube.com/html5. You should see something like the following image:

This solution worked for me and I didn't have to install any third-party software such as FlashPlayer or Firefox Extension. I've came up with this solution by looking at the Arch Linux Wiki > Firefox Tweaks > Enable Additional Media Codecs.

Actually google automatically define this according to you internet speed. There is nothing to setup manually by users.


How would I broadcast a http website over WiFi? I am trying to braodcast a http website over wifi using my laptop to enable my smartphone to connect to this website just by using wifi connection and a web browser.
The goal is to create my private network so I can brodcast websites containing media that I can access using my smartphone with no configuration or app and of course without any need for an internet connection for both the smartphone and laptop.

Does anyone have an idea?

And Thanks.

The website is listening on a port, usually 80, on you laptop.  Assuming you can connect to "localhost" with a browser (on the laptop) and connect to the website, then all is well.

Your laptop has an ip address, such as 192.168.0.100 for example.  You should be able to use that address instead of localhost on your laptop, and you should also be able to use that same address from any computer on your LAN; ie, http://192.168.0.100, or whatever the actual address is.  For other computers that run linux, windows, or OSX, you can enter an alias in the hosts files so you can type a name, instead of the numbers, such as http://laptop.

If you want to connect from both inside and outside your LAN, you can use a dynamic IP address service that can direct requests to the website.

You can actually have multiple virtual websites running on the laptop either way.  I use dyndns, for which I pay a small amount each year.  I can access my server by using something like http://myname.homelinux.net, or many other URLs.

Open a web browser on your phone and navigate to your web page, using your internal ip address. For example "http://ip.of.your.web.server:80". Does that not work ?


How to install programs? Keep getting archive manger error When trying to download and install programs keep getting archive manger error. Need to be able to install CCLEANER

You could try using Ubuntu Tweak. It has a built-in cleaning function which might do what you want.


Youtube-dl: Python not found (18.04) I have done a clean install of 18.04 LTS.
I then installed youtube-dl using

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

When I try to use youtube-dl, I get the following error message:

rudolffischer@HP8770w:~$ youtube-dl -U
/usr/bin/env: ‘python’: No such file or directory

Python 3 seems to  be installed

rudolffischer@HP8770w:~$ python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

Why?

On Ubuntu 18.04.2 LTS with youtube-dl version 2019.06.08, after creating symbolic link with following command:

$ sudo ln -s /usr/bin/python3 /usr/local/bin/python

youtube-dl worked as usual, the error "/usr/bin/env: ‘python’: No such file or directory" vanished.

this solution to youtube-dl error works for Ubuntu 18.04.02 LTS.
(The date when I wrote this is  Mar.04.2019 so please check version).

This is the way, when using youtube-dl, I solved the following error message  :

/usr/bin/env: ‘python’: No such file or directory

cd  /usr/bin
ls python

This should show you what python version you have.  If your python version is 3 or above just go to step 4. if your version is below python 3 go to step3.

sudo apt install python3
/usr/bin/python3.6  /usr/local/bin/youtube-dl  ( your youtube video hyper link).

( in my case I had python 3.6 located in /use/bin/(whatever python version). Obviously, you have to adjust for whatever python version you have).

this should work for that stupid /usr/bin/env python error on youtube-dl.


How to dettach input devices in startup? I would like to dettach external input devices connected to the computer on boot (external mouse, keyboard, badusb). Udev cannot help me with that because the input devices are connected in boot time.
I have tried to create a script via rc.local and xinput, however it seems like xinput is unknown in startup (when I run to script manually, it worked, so its a xinput and boot problem).
Are there other ways to do so in startup without blocking an entire usb port?

you can use (xinput):
xinput list
⎡ Virtual core pointer                     id=2 [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer               id=4 [slave  pointer  (2)]
⎜   ↳ MOSART Semi. HP Wireless Keyboard and Mouse id=10 [slave  pointer  (2)]
⎜   ↳ ELAN0707:00 04F3:30DA Touchpad           id=12 [slave  pointer  (2)]
⎜   ↳ ELAN2514:00 04F3:23C4                   id=13 [slave  pointer  (2)]
⎜   ↳ ELAN2514:00 04F3:23C4 Pen               id=14 [slave  pointer  (2)]
⎣ Virtual core keyboard                   id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard             id=5 [slave  keyboard (3)]
    ↳ Power Button                             id=6 [slave  keyboard (3)]
    ↳ Video Bus                               id=7 [slave  keyboard (3)]
    ↳ Power Button                             id=8 [slave  keyboard (3)]
    ↳ MOSART Semi. HP Wireless Keyboard and Mouse id=9 [slave  keyboard (3)]
    ↳ HP Wide Vision HD Camera: HP Wi         id=11 [slave  keyboard (3)]
    ↳ Intel HID events                         id=15 [slave  keyboard (3)]
    ↳ Intel HID 5 button array                 id=16 [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard             id=17 [slave  keyboard (3)]
    ↳ HP WMI hotkeys                           id=18 [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                     id=19 [slave  keyboard (3)]


Logged out on resume from sleep ubuntu 15.10 I use command sudo pm-suspend to put my laptop to sleep and when I resume from sleep my session logs out and saved session is lost.
It does not happen every time but very often.

Try use pm-suspend-hybrid instead. It will prepare the system for hibernate by storing all memory content to disk and then goes into suspend. The suspended state gives the advantage that it can resume very quick and because it also prepared for hibernate the system is also able to start when the power is lost.

More info here:
http://manpages.ubuntu.com/manpages/precise/man8/pm-action.8.html

Good luck!


Running programs in the background from terminal How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running?
Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:

nm-applet

When it's started, it occupies the foreground of the terminal window.

Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?

On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:

nm-applet &

But this isn't much use as any processes started in the terminal are killed once the terminal is closed.

I've recently come to like setsid. It starts off looking like you're just running something from the terminal but you can disconnect (close the terminal) and it just keeps going.

This is because the command actually forks out and while the input comes through to the current terminal, it's owned by a completely different parent (that remains alive after you close the terminal).

An example:

setsid gnome-calculator

I'm also quite partial to disown which can be used to separate a process from the current tree. You use it in conjunction with the backgrounding ampersand:

gnome-calculator & disown

I also just learnt about spawning subshells with parenthesis. This simple method works:

(gnome-calculator &)

And of course there's nohup as you mentioned. I'm not wild about nohup because it has a tendency to write to ~/nohup.out without me asking it to. If you rely on that, it might be for you.

nohup gnome-calculator

And for the longer-term processes, there are things like screen and other virtual terminal-muxers that keep sessions alive between connections. These probably don't really apply to you because you just want temporary access to the terminal output, but if you wanted to go back some time later and view the latest terminal activity, screen would probably be your best choice.

The internet is full of screen tutorials but here's a simple quick-start:

http://thingsilearned.com/2009/05/26/gnu-screen-super-basic-tutorial/

I dont know its the right way but i just start another session while leaving the previous one allone. For example i ran a simple web server on my raspberry. the web.py one. then i start a new session while leaving it alone. thats it. it also is wuite useful since you are still updated even though you are workin on the other session.


Ubuntu as the only office / commercial OS? I was wondering if any people had any experience of using ubuntu (and other office - like software & possibly some wine installs) as their only OS. To clarify, i am asking if anyone has experience with MS free office environments and would like their input on:

Training time (not all office workers are tech savvy)
Migration Issues
Support Issues  Compatibility with other MS using offices.
Other?

I know in theory that Ubuntu has all the tools needed, but i havent heard of any experience of people actually doing it.

There are some case studies of companies (or more usually goverment agencies) switching to GNU/Linux for workstations. Most notable would be Gendarmerie Nationale (French police) - they've switched to Ubuntu in 2009.

If you are looking for company-wide deployment, I'd recommend to contact Canonical (the company behind Ubuntu) who can provide you all the information and support you need. There are more commercial-backed distributions like Red Hat Enterprise Linux (by Red Hat) or SUSE (by Novell), and there are many local partners or independent Linux dedicated companies which will provide you with the support.

Edit: I believe you should take first steps by using cross-platform software with your existing infrastructure - most software available for Ubuntu is available for Windows too. For example, switch from MS Office to LibreOffice (aka OpenOffice.org), and so on. This way you can apply training in small doses and always easily switch back if you run into any problems.

If you rely on some Windows-only software without any viable alternative, Wine could be a solution but it's definitely not a silver bullet - check out Wine's AppDB or try CrossOver (a commercial counterpart of Wine by CodeWeavers, which are contributors to Wine).

I love it (being MS free).
office fully compatible.
Training is an issue but also issue with new msoffice 2007 + 2010.
I won't go back to buggy, crashing, continual updates with MS junk.