"The selected boot device failed" when attempting to boot a Live USB on my device Today I received my new convertible device, a HP Pavilion x2 10-n015n, which came preinstalled with Windows 8.1 32bit.

As I'd like to - at least testwise - install Ubuntu GNOME on it, I created a bootable USB stick with the 14.04 LTS ISO of Ubuntu GNOME. However, when trying to boot it, I only receive the following message:

The selected boot device failed. Press <Enter> to continue.

What I've tried so far:

Disable fast boot in Windows
Disable Secure Boot in the BIOS settings
Searched for an option to enable Legacy booting, but there is none
Used both UnetBootin and Ubuntu's Startup Disk Creator
Used two different USB drives
Tried both the 32bit and 64bit image of Ubuntu GNOME
Verified checksums (although it shouldn't be necessary using BitTorrent)
Also tried the "normal" Ubuntu (also 14.04), in case Ubuntu GNOME didn't yet support UEFI.
On my main computer (no UEFI, no Windows), the live system booted without problems each time.
Tried creating the bootstick using Rufus (both GPT and MBR parttables, both ISO and dd mode), as suggested by Raphael.

None of these helped me:

“selected bootable device failed” error dual boot ubuntu alongside windows8.1
Dual Booting in HP Laptop "Selected boot device failed to boot" Error

Do you have any idea why the USB won't boot or what can be done about it?

Ok, here is what I've found out:

The system has a 32bit UEFI, while Ubuntu (and all other distros I know) currently only supports 64bit UEFI. I managed to do the following:

Create a bootable Ubuntu USB stick using UnetBootin.
Download the latest rEFInd binary and installed it manually to the USB stick according to the instructions in rEFInd's online manual.
Create an entry in rEFInd's config file, equivalent to the "Try without installing" GRUB entry.
Reboot the system and manually select rEFInd's 32bit EFI executable.
Select the created menu entry and boot it.

rEFInd now tries to boot the live system. As I removed the quiet splash options, I could see the boot log. However, after a few seconds, the screen turned black. I have not yet found out where the black screen comes from or what causes it, but I doubt it is an X11 issue, as Ctrl+Alt+Del reboots the system, which wouldn't happen if the graphical environment were running. But I managed to boot the kernel from the live system, which technically could count as booting the live system ;)

However, I decided not to try installing Ubuntu any further, but I think this procedure can be helpful if someone else runs into a similar problem.

UPDATE: After some more annoyances by Windows, I tried again. The solution for the black screen was simple: Added the nomodeset argument to the boot options, and the system properly booted.

However, half of the device's hardware, including both WiFi and Bluetooth adapters, is not recognized (I'm not talking about no drivers, I'm talking about not even found by the system, e.g. listed in lshw).
So I guess I'll have to stick to Windows, then.

I had this exact problem. I did a couple of things:
1 I swapped to legacy boot mode which was call legacy compatibility for me.
2 (I think this was was actually did it) I had USB ports that were set to USB 3.0. I had to change this setting to "Auto" in the bios.
This way the ports are set to 2.0 then if the OS supports it, it swaps to 3.0, instead of booting as 3.0.


Problem starting apache Before the question let me give some background info:

I have Ubuntu karmic installed on top of android on my asus transformer. I have also installed netbeans, git, tightvncserver and openssh.

I am viewing the desktop using an android vnc viewer app. Tightvnc is listening on port 5900 and 5901.

Now for the question/problem I have. I have installed apache2. It installed without a problem. When I start the apache service it show in terminal that it is initializing without a problem, but when I check the ports using netstat -tulpn I don't see apache listening on any ports. All I see is tightvnc.

This is the error I see in the apache error.log file.

[warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[emerg] (38)Function not implemented: Couldn't create accept lock (/var/lock/apache2/accept.lock.13752) (5)

This is show various times.

Any suggestions?

This is related to lack of System V IPC in the kernel.

If you have the config file used to build the kernel, you can check for it; for example, in stock Ubuntu at the moment (the config filename will change depending on your exact version)

grep CONFIG_SYSVIPC /boot/config-3.0.0-13-generic

Gives:

CONFIG_SYSVIPC=y

(amongst other things, but that's the important one).

In some kernels, you can also check /proc/config.gz if CONFIG_IKCONFIG_PROC is turned on; that gives you a gzipped dump of the currently running kernel's option (so use zgrep on it). Ubuntu's stock kernels don't have this turned on but you're unlikely to need it with those because the packages give you the config file anyway.

The solution: use the stock Ubuntu kernel (it's really quite good and has pretty much everything compiled in that you're ever likely to need) - or rebuild your custom kernel with this turned on.

I met the same error on Android with a chroot ubuntu distribution.
I just change the following apache option (apache2.conf):

AcceptMutex flock

And it works for me. I hope it help.


Windows 7 Virtual box If I install Ubuntu along side my windows 7 installation can I then boot into the Ubuntu and launch the windows 7 via the virtual box?  Or does the windows OS have to be installed via the virtual box to work?

VirtualBox is a "virtual computer"; it looks like a full computer to the programs, and includes audio, video, disk drives, etc.  When it starts out, it is like a brand new computer without anything installed.

If you have a Windows CD, you can install windows within VirtualBox just like installing it to a new computer; same with other Windows versions or Linux.  You put the Cd in, or mount an ISO image of a CD, and reboot the virtual machine (called the "guest" OS).  The host OS continues to run normally while this is happening.

But you can't run the existing windows 7 OS in virtual box, or simultaneously with Ubuntu.

Windows XP will work within Ubuntu virtualbox.  This is how some gamers & other people run Windows programs.

Many people, myself included, run Windows7 programs with WINE, or PlayOnLinux, which to varying degrees of capability, might work.

Apple OS-X users have the similar problem.  IMHO - to be an Apple OS-X user, you are best to avoid Apple-branded hardware because you can get better hardware components in PC and notebook world.


black desktop in KDE on primary monitor I have Kubuntu 20.04 LTS version. I have two monitors connected to my PC - primary one via HDMI and secondary via DisplayPort. Both have the same resolution.
After login into KDE I have the 'task panel' and the 'application launcher' on the correct (primary) monitor. But sometimes I dont have any 'desktop' - just black screen (when I minize all windows) on the primary monitor. I have correct desktop wallpaper on the secondary monitor - but of course, without any widgets since they are placed on the primary one.
I don't know exact steps to reproduce, because it seems this is happening randomly - sometimes I have the desktop wallpaper and sometimes i don't. In all cases I have wallpaper on secondary monitor and I have the 'main panel' and 'application launcer' visible on the primary one (but not the other widgets, icons and wallpaper)
This happens on different activities too - for some I have the desktop layout as Desktop and for other I have it as Folder View
Any idea what can couse this and/or how to fix it?

Thanks

I have to use the following command from terminal:
kquitapp5 plasmashell && kstart5 plasmashell &

but yes I am also looking for solution to make it start automatically as in single display.

Having same issue.
I can confirm toggling monitor position and primary display made it work again.


Swap CTRL and caps lock in tty1 (deeper than gnome) I have Ctrl and Caps Lock swapped in my main desktop environment 14.04 using GNOME Tweak Tool like here.

However, when I'm using tty1, which I do by default, my Ctrl and Caps Lock are not remapped.

How can I remap my keybindings at the machine/tty1 rather than the Gnome level?

I'm looking for a solution that does not require the x server, so xkbd options for example are not an option

Open /etc/default/keyboard for editing and change the line

XKBOPTIONS=""

to

XKBOPTIONS="ctrl:swapcaps"

Don't. That's not the normal way to do remaps. Remaps nowadays are normally done at the X level and result in the behavior you see, which is usually inconsequential.

Otherwise, anything that's related to X obviously won't do. Package kbd and its files in /etc/kbd/ may provide a solution.


How to mount a NTFS partition in /etc/fstab? I have two partitions that I want to mount on startup:
/dev/sda3   /mnt/devel  ext4    defaults    0   2
/dev/sda2   /mnt/excess ntfs    defaults    0   2

The ext4 partition mounts fine (owned by me, writable only by me), but the NTFS mounts owned by root with R\W permission for all.
How to fix this?
drwxr-xr-x  7 amanda amanda 4096 2012-03-14 19:07 devel
drwxrwxrwx  1 root   root   4096 2012-03-14 22:38 excess

Permissions for ntfs and vfat file systems must be set with the dmask, fmask and umask options. dmask controls permissions for directories, fmask controls permissions for files, and umask controls both. Since these options set masks, they should be the complement of the permissions you want. For example, rwx for the owner and rx for others is 022 rather than 755.

To set the owner, use the uid and gid options for user and group, respectively. You can find your UID with the command id -u. To find your GID, use id -g. These values are both usually 1000.

A common set of mount options for ntfs is uid=1000,gid=1000,dmask=027,fmask=137. This sets you as the owner of the drive, and sets the permissions to drwxr-x---.

Here are two lines from my /etc/fstab working

UUID=EEA2B69CA2B668AB        /WIN_C     ntfs-3g   defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0
UUID=65AEC0E830EA0497        /WIN_D     ntfs-3g   rw 0 0

If you get no visible error after rebooting and partitions stay readonly or you get an error similar to:

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

This is because Windows 8 and 10 offer a "Fast Startup" option that depends on a "non-complete" shutdown.  You can disable fast startup by following these steps under "Power Options".

Might not be a good solution , but you can always map user id to your own one , or the group id:

Just an example here , my user id was 1000

/dev/sda5 /mnt/excess  ntfs defaults,uid=1000,rw  0  0

In that case , all files mounted owned by user ided 1000


Ubuntu backup asks for encryption password repeatedly I recently had to install a fresh Ubuntu. I have automatic backups of my old Ubuntu. I do not wish to restore to my old state. I just need to get back specific folders containing some pdfs and doc files. The backups however are all stored in a gpg format, with names such as duplicity-inc or duplicity-new-signautes. Is it possible to restore specific files from such a backup?

Edit:
I tried the Ubuntu backup, but it keeps asking me for the encryption password repeatedly.

Thanks!

You can restore specific files from a duplicity backup. You need to enter the following command:

duplicity restore --file-to-restore relative/path/to/file URL /target/file

The file-to-restore must be a relative path depending from the directory where the backup is based. URL is a FTP-, file- or other link and /target/file is the place where the restored file should live.

However as you wrote in your comment when you lost your password there is not much chance to recover the backup anyway. You only can try to remember it. Maybe you wrote it down somewhere or have it in your shell history. Sometimes mistakes happen and help to recover the password.

Scalpel is one of the best command line tool to recover deleted files in Ubuntu Linux. It can recover almost all types of files. It visits data blocks of files sequentially and identifies deleted files and recovers them instantly. You can install it by running following command in your terminal.

apt-get install scalpel

SOURCE : http://hub4pc.blogspot.in/


Enable PostGIS extension on Ubuntu 14.04.2 I have troubles enabling PostGIS extension on Ubuntu 14.04.2 and PostgreSQL 9.3. I have installed the packages with this step by step procedure.

PostgreSQL and pgAdminIII seem to be installed properly. I can launch pgAdminIII and the localhost default server exists. I add a new DB and type in CREATE EXTENSION postgis;. I get the following error:

ERROR:  could not open extension control file "/usr/share/postgresql/9.3/extension/postgis.control": Aucun fichier ou dossier de ce type

Could anyone help? I think I'm not far from success...

Thanks a lot!

You must install postgis and postgresql-9.3-postgis-2.1 packages and create postgis extension on your database

sudo apt-get install postgis postgresql-9.3-postgis-2.1
sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" DATABASE_NAME_HERE

Reference: Jon Saints' Tutorial

wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
tar xfvz postgis-2.1.8.tar.gz
cd postgis-2.1.8
./configure --with-pgconfig=/usr/lib/postgresql/9.4/bin/pg_config --without-raster
make && make install

Now there was a problem for me in that the postgis library can't see the proj library, as can be seen from the 'not found' when executing ldd /usr/lib/postgresql/9.4/lib/postgis-2.1.so. The solution was to softlink it:

ln /usr/local/lib/libproj.so.9.1.0 /usr/lib/libproj.so.9


Getting notified of failed cron jobs I'm concerned that cron jobs can fail silently for an indefinite period of time on vanilla Ubuntu Desktop 12.04.1 (Precise), and no one will notice. I would like to get a notification whenever a system cron job prints some output or just fails.

I know it is possible to install a mail server (e.g. postfix), configure it for local-only delivery, set up an alias so that root's mail is delivered to my normal user account and configure a mail client to check my local mailbox.

Are there any lightweight alternatives to this solution in Ubuntu?

You could redirect the error output of your cronjob command to a file. Here is an example of a line in /etc/crontab:
01 3    * * *   user    /bin/command 2>> /var/log/some.file

Then at least you got a clue if errors occured. You might even write a script to notify you over notify-osd or similar tools when the file changes.
Edit:
The file /var/log/syslog reports messages from cron as well. You might want to take a look at that. To get a dedicated log-file for the cron deamon edit /etc/rsyslog.d/50-default.conf and uncomment/edit the line that says:
#cron.*             /var/log/cron.log

Don't know what you'll find there but worth the try. Report how it went.

Have you tried writing script? I'm sure there is an easy way like:

if cron.output = fail then notify-send "sorry bro"


Problem upgrading from Ubuntu 10.04 to 10.10 I've been trying to upgrade from 10.04 to 10.10.

During the package installing and upgrade process there were numerous packages which threw errors but it continued installing.  The last one to fail was squid, when this failed the upgrade manager quit-out without finishing everything.  When I restarted I get a Kernel Panic error:

Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tainted 2.6.35-22-generic #33-Ubuntu

Similar to the question asked here.

At the grub loader I tried to boot to 2.5.32 but this drops into an incomplete command-line (BusyBox) with limited commands with the error: udevadmn trigger is not permitted while udev is unconfigured

Any help would be greatly appreciated.

I'm not sure if this will help anyone else but this is the process I had to go through ... and my thoughts as to why:

Backup all data
Unplug my external drive
Re-install a fresh 10.10
Copy data back

Every time I tried to install 10.10 with my external drive plugged in it would choose the external drive as the default install location.  I would change it to my internal drive and then install as normal.  However, after re-boot it would have the issues mentioned above.  On a lark I tried installing after unplugging the drive.  Everything worked out fine.

Thanks for the help everyone and I hope that this answer helps someone else.

I'm afraid that the simplest way is to copy /home directory to external drive and reinstall system.

I also recommend separate partition for /home dir. The most critical time in upgrade is when package manager has downloaded all files and before finish of configuration. When You have error there that's very bad situation.


Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu? I am considering buying a Dell XPS 15 laptop. The laptop has a Nvidia 420m card which should work with Linux but I keep reading that the Nvidia Optimus technology isn't supported on Linux. I am not really interested in switching from Nvidia to Intel to save power but need to know that the Nvidia card will in fact work if I installed Ubuntu.

If anyone has experience using a Nvidia card with Optimus technology or even better the exact laptop in question (Dell XPS 15 with 1GB NVIDIA® GeForce®  GT 420M) it would be great.

A major problem holding people back from adopting Linux is this sort of hardware issue.
I am a long term Ubuntu user and supporter who can't afford to make a mistake with a purchase like this.
I don't want to spend £500+ to find I have no graphics acceleration because Windows 7 is not an option.

Even if the Supported Products tab on the driver download page says that GT420M is supported, the Optimus variants are not supported. From the Additional Information tab:

  Some designs incorporating supported GPUs may not be compatible with the Nvidia Linux driver: in particular, notebook and all-in-one desktop designs with switchable (hybrid) or Optimus graphics will not work if means to disable the integrated graphics in hardware are not available.

This Optimus design means that the discrete Nvidia card is wired into the integrated Intel GPU and that it's not connected to a monitor at all. Some hybrid graphics laptops still allow you to choose the Nvidia card in BIOS, but most modern Optimus laptops don't have this option.

I am speaking from experience, I have a GT425M combined with an i5-460M processor. If there is no BIOS or hardware setting for switching / disabling the card, you're throwing away your money. The XPS 15 family does not appear to have any of these features. Although you are able to use the Intel graphics card, you may want to use the Nvidia card as well because you've paid for it which is not directly possible at the moment.

You'd better look for another laptop without Optimus. Optimus is crap and Nvidia refuses to provide better support for Linux. If you are adventurous and buy such a notebook, visit the Linux Hybrid Graphics blog and subscribe to its Launchpad mailing list. Visit their wiki for various ways to get such a card (hopefully) working. One method is called Bumblebee which allows you to render programs on your nvidia card. I currently recommend it over other solutions (disclosure: I'm a developer of it).

Ubuntu 12.10 Quantal will be shipped with the first bits for real support for hybrid graphics laptops, called PRIME. This is highly experimental and in development and probably not stable enough for many people. Only the open-source graphics drivers support this, though Nvidia may release support in the future too if it is not too much work for them. This page tracks hybrid graphics support for Quantal, these are the blueprints for Raring.

If you've installed the driver from nvidia.com

You've made a huge mistake by installing the drivers directly from nvidia.com. If you want to have newer drivers, add the ubuntu-x-swat/x-updates PPA because these will install the nvidia drivers in such a way that your Optimus system does not die.

After installing the nvidia driver from nvidia.com, you may experience loss of all graphics effects, black screen or very slow graphics performance. Uninstallation instructions:

Boot into recovery mode by holding Shift before booting and choosing for the recovery option
In the following menu, choose for netroot.
Uninstall nvidia:

nvidia-uninstall

Remove the configuration file generated by nvidia if any:

rm /etc/X11/xorg.conf

Reinstall the Mesa package for GL:

apt-get --reinstall install libgl1-mesa-glx

When done, reboot with:

reboot

Installation instructions for Bumblebee

If you have installed Bumblebee or Ironhide before, be sure to check the instructions on http://wiki.bumblebee-project.org/Upgrading-on-Ubuntu

Since Bumblebee version 3.0 "Tumbleweed", it can disable the Nvidia card in a safe way to save power (press release). You can also run programs using the discrete card for better performance. Installation instructions:

Enable the Universe and multiverse repository for the Nvidia driver.
1.(optional for 13.10 Saucy) Add a PPA containing recent drivers as the one in the repositories is possibly outdated:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

(for 13.04 Raring and earlier, not needed for Saucy and later) Add the Stable Bumblebee Releases PPA:

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update

Install Bumblebee using the proprietary Nvidia driver:

sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic

Reboot or re-login to apply the group changes

If you'd like to run a program on the nvidia card now, use the optirun program:

optirun firefox &

If you are only interested in power savings, replace the last command in step 4 by:

sudo apt-get install --no-install-recommends bumblebee linux-headers-generic

At a later time, you can still use NVIDIA by installing bumblebee-nvidia. If you want to use a 32-bit program, you can still install the required libraries with sudo apt-get install virtualgl-libs-ia32. You have to add linux-headers-generic, otherwise the power saving module bbswitch cannot be built.

Instead of virtualgl, you can also try primus to achieve better performance. The package name is primus and you can use:

primusrun glxgears
# alternative that is nearly the same:
optirun -b primus glxgears

(note: before asking about a 60 fps limit, please read its FAQ.)

See also https://wiki.ubuntu.com/Bumblebee

Notes:

Using acpi_call manually is deprecated. By default, it won't survive suspend.
Do not use ppa:mj-casalogic/bumblebee or the MrMEEE/bumblebee-Old-and-abandoned git, it's not maintained anymore and contains a lot of errors.
Martin Juhl forked the original Bumblebee to Ironhide, but in my opinion it should not be used because the design flaws from the original Bumblebee are still present and the "power management" features are not stable (the wrong methods, _ON and _OFF, are used). Installation is still a mess, your installation may be broken after removing it.

If you do not want to use the nvidia card nor Bumblebee

If you've accidentally installed the nvidia driver (i.e. using the jockey), you've two choices:

Uninstall the driver (package nvidia-current)
Set the default OpenGL libraries as described in this bugreport

It does't work well at all.

If you are planning to use Linux as your main OS, do not buy an Nvidia Optimus-based computer!

Please ! Just don't do it... it will be the most horrible mistake in your life.

I am not trying to be hard or evil. I'm just saying that all the problems with Nvidia, Bumblebee, HDMI not working, Intel not doing a great job (because we bought an Nvidia laptop and is the Intel that is doing the whole job), No Flash at more than 480p (just forget it) in full screen.

If you are thinking about buying a computer just because it has a good battery and it is little so you can play 3D games correctly with Windows or watch flash and HD Movies with Windows, than yes you can go ahead and buy it.

But if you want to buy it to use Ubuntu (or any Linux Distribution) as your most used OS than please do yourself a favour and don't buy it... or just wait until the problems are solved... and I promise you, it is going take a LONG time before we see something working.

Finally, Bumblebee/Ironhide is not a solution.


How to change the screen resolution for the GDM login screen? I use a login list with faces and the icons and text are tiny in GDM. Is there an easy way to change the resolution of the login screen? I'm currently using 10.04 Lucid.

On newer systems, you will want to place your monitors.xml file into the gdm configuration directory, the resolution will be picked up there:

This, of course, assumes that you have gon into Settings > Displays, and have selected the resolution you want, click 'Apply', this will create a monitors.xml in .config of your home dir.

sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/monitors.xml

More details available at
https://wiki.archlinux.org/index.php/GDM#Setup_default_monitor_settings

It can be a isolated problem with the current theme. Which theme you are using now in GDM? Did you check if you have the same problem with others themes?

You also can try to reconfigure your GDM using the commands (You will lose your X11 session doing so) below:

$ sudo dpkg-reconfigure gdm
$ sudo /etc/init.d/gdm restart .

You may need to run the gdmsetup (just works for Ubuntu before 2010):

Press Alt + F2, type gdmsetup and press Enter (will open a desktop application).


package 'adobe-flashplugin' has no installation candidate . How can i solve this error? I'm trying to install a newest version of flash player on my laptop, I'm running ubuntu 14.04.5 (by flashdrive, not using a dual boot). I was reading other questions about this topic but I keep getting this error.

ubuntu@ubuntu:~$ sudo apt-get install adobe-flashplugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package adobe-flashplugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: package 'adobe-flashplugin' has no installation candidate

Try this
sudo apt-get install flashplugin-installer


How to download an MP3 track from a YouTube video There are several Q&A threads that explain how to download youtube videos using the terminal.

However, I would also like to learn how to extract the video's soundtracks as MP3 files--also using only the terminal.

Answers briefly explaining how to use youtube-dl or other similar utilities before explaining how to extract the MP3 would be ideal for the sake of having all the information in one place--even though this aspect has been covered in other posts.

You can also download the mp3 directly from youtube without converting using ffmpeg

youtube-dl --extract-audio --audio-format mp3 <video URL>

From the online help:

-x, --extract-audio        convert video files to audio-only files (requires
                           ffmpeg or avconv and ffprobe or avprobe)

Bear in mind as well that youtube-dl defaults to using avconv so you should consider specifying either avconv or FFmpeg at the commandline . From the online help :

--prefer-avconv                  Prefer avconv over ffmpeg for running the
                                 postprocessors (default)
--prefer-ffmpeg                  Prefer ffmpeg over avconv for running the
                                 postprocessors

Further options for keeping the original video, adjusting the bitrate or quality of the audio and a few others can be seen by looking at youtube-dl -h .

16.04 and later
I recommend using the youtube-dl snap package (sudo snap install youtube-dl) to download the mp3 components of YouTube videos, so that you don't get blocked from downloading from YouTube because your version of youtube-dl is not up-to-date.
Show a list of the available formats for a specific YouTube URL which I have denoted by <video URL> in the following line of code.
snap run youtube-dl -F <video URL>

Download the mp3 from a specific URL.
snap run youtube-dl -f your-choice-of-format --extract-audio --audio-format mp3 <video URL>

where your-choice-of-format is replaced by an  format integer number that is selected from the audio only results of youtube-dl -F <URL>. The audio only results of youtube-dl -F <URL> will show a choice of available bitrates (e.g. 192k) for you to choose from, but the video only results of youtube-dl -F <URL> cannot be saved by youtube-dl to any audio format.


How to log into multiple accounts in Hotot 0.9.8.10 I am using Hotot 0.9.8.10 and am un-able to figure out how to log into multiple accounts.

I know it is possible, because I have heard people talking about it, but I can not seem to figure it out.

On the sign in page, barely visible, there is a plus sign right below the hotot logo. Click it.

Took me a while to find it.

You need to logout and click to plus, here is a screen shot:


How to install R version 3.2.1 – collect2: error: ld returned 1 exit status I'm trying to install R version 3.2.1. I executed the following code

./configure --enable-R-shlib

followed by make command. But the following error is obtained.

/usr/bin/ld: ../appl/dchdc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
../appl/dchdc.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Please help me to resolve this or let me know how to remove this specific version of R. Because when I run sudo apt-get --purge autoremove R,

E: Unable to locate package R

For a full list of steps to install a version from source, skip the following lines and read on with Install from source

To install/remove the GNU R statistical computation and graphics system you need the package r-base.

Therefore

sudo apt-get install r-base

or

sudo apt-get purge r-base

To install/remove the GNU R collection of recommended packages  you need r-recommended

sudo apt-get install r-recommended

or

sudo apt-get install r-recommended

Install from source

The version 3.2.1 is in the Wily Universe repositories.

To install the version 3.2.1 on older Ubuntu versions, you have to compile the packages for yourself

Download and extract

cd
wget https://cran.r-project.org/src/base/R-3/R-3.2.1.tar.gz
sudo apt-get install tcl tcl-dev tk-dev tk
tar xf R-3.2.1.tar.gz
cd R-3.2.1

Create a Makefile with configure and enable shared libraries (--enable-R-shlib) and Tcl/TK-support (--with-tcltk)

./configure --prefix=/usr/local --enable-R-shlib --with-tcltk

or simply with (without shared libraries)

./configure

And start the build process

make

After that, install. I prefer the installation with checkinstall, to create and install a deb package

sudo apt-get install checkinstall
sudo checkinstall

But you could also use the standard way

sudo make install

And now, you have version 3.2.1 installed

 % /usr/local/bin/R

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Install RStudio Desktop

Download the latest version here, e.g.

wget https://download1.rstudio.org/rstudio-0.99.467-amd64.deb

Install via

sudo dpkg -i rstudio-0.99.467-amd64.deb

Check the install output and install missing packages, e.g. in my case

sudo apt install libjpeg62

Start RStudio via Unity Dash or GNOME Activities or via command line

/usr/lib/rstudio/bin/rstudio

If you encounter following error:

configure: error: --with-readline=yes (default) and headers/libs are not available

run this command:

sudo apt-get build-dep r-base


I can not install any software on Ubuntu 13.04 I've recently installed Ubuntu 13.04 and now, whenever I install any software I get this error:

sudo apt-get install vlc

  dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': Is a directory
E: Sub-process /usr/bin/dpkg returned an error code (2)

This is the best solution to your problem. What happened is that the repository does not exist any more or has changed. This site has directions on how to fix the problem.
How can I fix a 404 Error when using a PPA or updating my package lists?
Following these steps are necessary, you will not be able to update without following them.
As for installing vlc, try using the software centre. I know it's a bit heavy and the terminal should work better since it's a direct link to everything, but an address or directory could have changed and it looks like you don't know it, and the list isn't updating it. I have had the same problem with plexydesk and myunity.


I cannot use MacBook Pro 2017's built-in keyboard and touchpad on Ubuntu 18.04 I am a MacBook user and I tried to run Ubuntu 18.04 on a MacBook Pro 2017 15-inch yesterday. Ubuntu Live USB can boot normally, but the keyboard and touchpad are completely unusable, so nothing can be done except shutting down.
How can I solve this problem?

For the MacBook Pro 2016 to 2017 you will need an external USB keyboard and Wifi to get work with Linux:
https://nixaid.com/linux-on-macbookpro/


Disk by UUID not detected (initramfs), boot failure I am unable to boot Ubuntu 10.04, with the built in boot shell giving out this error:

Gave up waiting for root device. Common problems:
  — Boot args (cat /proc/cmdline)
    — Check rootdelay= (did the system wait long enough?)
    — Check root= (did the system wait for the right device?)
  — Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/aa91b9fe-1e27-44d7-9c1b-72dd7d4e8575 does not exist.
Dropping to a shell!

BusyBox v.1.13.3 (Ubuntu 1:1.13.3-1ubuntu11) built-in shell (ash)
Enter 'help' for list of built-in commands.

(initramfs)

Update 1
This error occurred after I updated my 2.6.32-26 version kernel and booted directly in Windows.

The rootdelay solution did not work. Is there any chance that my disk's uuid got changed (maybe by windows), I could log in to my Ubuntu earlier but after logging into windows, and rebooting I get this error. As far as backing up is concerned, do I need to even if I have separate home and workspace partitions than Ubuntu installation?

Update 2
The update after which this happened was just an update (no new install) of version 2.6.32-26. So I guess this has something to do with last update of this version of kernel. Also since it was not a new install, no new menu entry was added. By any chance may this be caused because of my rebooting in Windows after the kernel update.

Update 3
Installed older kernel by chrooting through live USB, still the same problem with the kernel, so it seems the problem is not due to kernel update after all.

I have faced this problem earlier too but back then, I just considered reinstalling distribution easier (I used to distro switch a lot). But now I had configured it too far and so looking for some last resort.

Update 4
Reinstalled Ubuntu. Configuration was easier this time thanks to separate home and workspace partitions. Even tough I don't need the solution of this problem just now but if you know any possible solution please post here for future benefit.

I had the same issue like the thread starter and I solved it without reinstalling.

My issue occurred while juggling with a virtual installation based on a copied disk image. This resulted in a changed uuid and the copy wouldn't start. This is a rough sketch of what i did.

First boot using a rescue system (same version) and run a shell on your non-booting disk.
Have a look at /etc/fstab and confirm the uuids there by issuing the blkid command for each device. Fix these entries as they're important.

Next we fix grub with:

grub-mkconfig
update-grub

Then run:

update-initramfs -u /boot/initrd.img-2.6.YOURVERSION-HERE

This will create a fresh initramdisk for your version. If you don't know the exact version you were running have a look at the files in /boot/. Picking the highest version number should be safe.

After you exit the rescue shell the ubuntu live cd will offer you the last menu from where you entered the shell. Choose "install Grub" (or similar) there and enter the device where to put your boot sector.

On most systems (standard install) /dev/sda is a safe bet. Be aware: Windows- or other multiboot-systems might need other entries here!

Finally you should be able to boot from the repaired disk.

I just went to the recovery mode. And choose something indicate updating grub in the menu. then fix the issue.


How can I create launchers on my desktop? In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.

How can I create such launchers now?

Note: gnome-desktop-item-edit was removed from gnome-panel in 19.10 (see gnome-desktop-item-edit: command not found on Ubuntu 19.10 and later even with the 'gnome-panel' package installed). So, this answer is unlikely to work for 19.10 and later.

The old GUI dialog is still available if you still want to use this:
Using ALT+F2 type
gnome-desktop-item-edit --create-new ~/Desktop

This will launch the old GUI Dialog and create a launcher on your Desktop:

Prerequisites
gnome-desktop-item-edit is installed automatically if you have installed gnome-shell/gnome-fallback.  It is also installed automatically if you have previously installed gnome-tweak-tool.
Alternatively, you can install the old gnome-panel without much of the bulk:
sudo apt-get install --no-install-recommends gnome-panel

You can later move the MyLauncher.Desktop file from ~/Desktop to ~/.local/share/applications/ to make it appear in all applications dashboards, or to /usr/local/share/applications to make it available to all users (Thanks to @JonBently's comment).

Start the terminal application. (Hotkey: Ctrl+Alt+T)
Use the command sudo nautilus to launch the file manager as super user (admin level of your account). (*)
Browse Computer > usr > share > applications and scroll down to the application you want to use.
Drag from the Nautilus file manager window to the desktop. (Make sure the nautilus window is not maximized.)
Close Nautilus and exit from the terminal.
Drag the new launcher around the desktop to the place you want it.

(*) You will get an error if you just try to drag/drop with Nautilus as a normal level user. That error was what made me figure out the six steps listed here. It's another example of "failure" being a step on the path to success.


Ubuntu software problem E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/)

Is another process using it?

You will be able  to see what is  using the lock file:

lsof /var/lib/apt/lists/lock
lsof /var/lib/dpkg/lock

Be careful before delete the files ... there is certainly a reason if the files are block...

The questions or suggestions within the read out corresponding to the request are often pretty clear indications of the reason for the error. If you read the response given, you would understand the system is recommending that you are attempting to access or modify (run) dual processes on core files/directories.

Your admin directory is your bank vault,
your security boxes in the the vault  represent additional directories and their core configuration files.
Your customer represents a command to access lock boxes.
Your bank policy strictly prohibits multiple customers into the vault at the same time, to avoid any access which may lead to a mix up of contents between to customers having multiple lock boxes open and being sorted on a small table.

When updating, installing, or running core modification processes doing so concurrent to one another is not possible. This is a security guard. As the system is designed to take the command you give it as root, carry it into the safe, shutting the door, and not opening the door until any previous command has been completed.

However as mentioned, glitches happen and sometimes things go Wong. But in this case it's likely even just an update window open or some other prompt waiting for reply.

:)


How to install on a MacBook Air 3,2 without an external CD drive? I've got a new MacBook Air which I'd like to install Ubuntu on. It has no internal optical drive, I have no external one.

I do have the ability to partition the disk and also have a USB flash drive and USB external hard drive. None of these I've been able to successfully boot the Ubuntu installer with though.

So... how can I install Ubuntu on a MacBook Air 3,2? Thanks in advance.

I had a similar problem on an old Macbook 1.1 with a broken cd-drive. I remember that all the approaches shown in the forums did not work. Try to do the following (it worked for me), the main difference is to format the flash drive as EXT:

install refit
format your flash drive as EXT4. In the following commands note that you'll need to sudo.
install grub on the flash drive as follows: say the device is /dev/sdb and you mount it as /media/usbdrive, then run

sudo grub-install --root-directory=/media/usbdrive /dev/sdb

copy the ubuntu iso to /media/usbdrive:

sudo cp ubuntu-10.10-desktop-i386.iso /media/usbdrive/

now you want to create the config file for grub inside /media/usbdrive/boot/grub/. Create a file called grub.cfg with your favorite editor (you'll need to sudo): gksudo gedit /media/usbdrive/boot/grub/grub.cfg and paste the following 5 lines inside.

search --set -f /ubuntu-10.10-desktop-i386.iso
loopback loop /ubuntu-10.10-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-10.10-desktop-i386.iso persistent debug=
initrd (loop)/casper/initrd.lz
boot

Do a sudo sync to commit all changes to the usb drive.
That's it! Reboot, with your usb plugged-in and when refit comes up select the usb drive (in my case, it takes a while to boot (you will not see grub or anything just wait a ), probably it is uncompressing the iso, not sure.
Hope it works!

Booting from an USB stick is not possible with a Macbook air without some extra work.

See http://cweiske.de/tagebuch/ubuntu-on-macbook-air.htm#boot-preparation for a detailled explanation how to get the installer running despite this problem.


Making a shortcut for UNIX program I'm new on Ubuntu 14.04 LTS (64bit) and I'm just getting a hold of this new way of doing things.

I am using a program built for UNIX and I managed to install it and get it all work perfectly, but I am a little bit lazy so I'm trying to figure out a way to make an application shortcut just by double clicking on it (without using Teminal to go to the path and then typing the command for the program).

The command after I get into the right path:

java -cp jts.jar:total.2013.jar -Xmx512M -XX:MaxPermSize=128M jclient.LoginFrame .

Please try to make it as detailed as poosible because, as I said, I'm very new at this.

Option 1: if the program shows an icon on left-side start bar when you open the program through terminal, then right click on that icon , and select " Lock to launcher" option.

Option 2: install GNOME Do. This little program shows up on login, and you type the name of any app that you wanna start.

Option 3: Classic menu.
In software center download Classic Ubuntu Menu. It's an equivalent of start menu in Windows XP, and lists almost all programs you installed on Ubuntu.

Option 4 : Configure File Manager in Edit-> Properties -> Behavior to "Run executable text files when they are opened. " That way, you can make a scrip to open this program in xterm or another terminal emulator.

So having changed file manager behavior, create a new text file on desktop , and open with your favourite text editor. For me that's nano, so i would type in terminal:

nano ~/Desktop/Shortcut_Script.sh

And in this script file put the following lines

#!/bin/bash

xterm -hold -e " /path/to/your/program/java -cp jts.jar:total.2013.jar -Xmx512M -XX:MaxPermSize=128M jclient.LoginFrame "

A small explanation here: this script basically calls xterm window, tells it to stay on (hold), and execute the commands enclosed by double quotes. From reading your question, I understand that you first need to navigate to the right folder, and then call the program, right ? So /path/to/your/program/ part should let you call that program in the right folder, while staying in the original start folder for xterm (which is your home/user folder). Now, if this does not work, and you do need to navigate to the folder, what you can do is this:

xterm -hold -e " cd /path/to/your/program/ ; java -cp jts.jar:total.2013.jar -Xmx512M -XX:MaxPermSize=128M jclient.LoginFrame "

Notice the semicolon. As you may know, it separates commands to bash. It will execute cd /path/to/your/folder first, and call the program second.


Kernel panic - unable to mount root fs after upgrade to 20.04 I got prompted to upgrade to 20.04 on my 19.10 Ubuntu machine. (Linux only, no dualboot)
After upgrading, I immediately got presented a white screen saying "Oh no! Something has gone wrong - Please log out and try again". I could not figure out how to log out so I restarted my Notebook.

After restart I got the error:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I also was not able to use an older kernel via grub, same white error screen appears.

I just reloaded a snapshot with a live-usb.

Is there a way to fix this beforehand? Is something in my current installation broken? I have a pretty basic ubuntu 19.10 installation and expected the upgrade to run smoothly.

I've seen solutions like https://www.geekswarrior.com/2019/07/solved-how-to-fix-kernel-panic-on-linux.html however I did not test them yet. I wanted to use this notebook as consumer-like as possible. So is there any way I configured something wrong beforehand? Or is there any way to officially report this as a bug? Or is it really specific to my notebook-model/setup?

I had this on every or nearly every update from Ubuntu 19.10 to 20.04. No crazy old devices or anything, just plain VMs or bare metal with standard hardware.
So I'm wondering why they obviously didn't even test the happy path of a normal upgrade from 19.10 to 20.04, as it HAS to work on a fresh release, no excuses. "Wait for the first point release" is an advice for the LTS to LTS upgrade.

However, leasts-pain-solution for the people without USB-Sticks at hand is:

Hold SHIFT during boot to get GRUB menu (it will appear after the
first failed boot automatically, though)
Choose "Advanced options for Ubuntu"
Choose the older kernel in recovery mode (Linux 5.3.0-51-generic (recovery mode))
In the Recovery Menu, choose "dpkg - Repair broken packages"
After repair, reboot. Hold SHIFT again
Now choose "Advanced options for Ubuntu"/older Kernel again, this time WITHOUT recovery mode
System should now properly boot with GUI. uname -a will show the old kernel 5.3.0
Simply reboot again
System should now magically boot with GUI and the new 5.4.0 Kernel

During upgrade did you get prompt to upgrade/keep grub? Normal releases aren't as stable as LTS. Ubuntu 19.10 to 20.04 isn't as stable as 18.04 to 20.04. I've done a few 19.10 jumps without issue, but I don't keep any old files during upgrade process. For all operating systems upgrade it is always best practice to wait a few months before upgrading. For Ubuntu the recommendation is wait until 20.04.1 is released (23 July).

Is something in my current installation broken? You reverted back to 19.10? Keep doing sudo apt update; sudo apt upgrade -y && sudo apt dist-upgrade until 20.04.1 gets released after 23 July. https://wiki.ubuntu.com/FocalFossa/ReleaseSchedule

Or is there any way to officially report this as a bug? Report Bug: https://help.ubuntu.com/community/ReportingBugs

So is there any way I configured something wrong beforehand? Here are something to do before upgrading:
1. Unplug any USB devices, and wired connections are faster and more reliable
2. Fully updated system but also run sudo apt autoremove I like this guide ( https://www.fossmint.com/keep-ubuntu-system-clean ) to remove files
3. If running proprietary drivers, like Nvidia, consider removing and use the open source driver, like Nouveau, that are baked into kernel. https://linuxconfig.org/how-to-uninstall-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux
4. Just wait until after Ubuntu 20.04.1 release and stick to LTS so don't install 20.10 when released. Next LTS release will be 22.04. That is 2 years of Stable updates.

Or is it really specific to my notebook-model/setup? You didn't list what notebook-model you have. You could make a live-usb of Ubuntu 20.04 and see if everything works correctly before upgrading. Here is a site to check if your laptop has been certified but Ubuntu usually just works. https://certification.ubuntu.com/desktop


How do I free up disk space? My Ubuntu cloud server has left only 900MB of disk space.

I'll just empty the directory /tmp and wondering if there is any other location to clean up.

To delete downloaded packages (.deb) already installed (and no longer needed)

sudo apt-get clean

To remove all stored archives in your cache for packages that can not be downloaded anymore (thus packages that are no longer in the repository or that have a newer version in the repository).

sudo apt-get autoclean

To remove unnecessary packages (After uninstalling an app there could be packages you don't need anymore)

sudo apt-get autoremove

To delete old kernel versions

sudo apt-get remove --purge linux-image-X.X.XX-XX-generic

If you don't know which kernel version to remove

dpkg --get-selections | grep linux-image

Source: Limpiando Ubuntu: comandos y programas (actualización) (google translated)

When I need make more free space on servers I use this command. It find all files bigger then 50 MB and "du -h" make better list of files and "sort -n" after pipe make list numericcaly sorted by file size.

find / -size +50M -type f -exec du -h {} \; | sort -n


How to Use KDE Dialogs in Gtk Apps Update: There is a new and very general solution available now. It works with Firefox and other GTK apps running in KDE. See the DK Bose's answer.

Original question:
I want to use KDE file dialogs (file open, file save) in Firefox in Kubuntu 12.04.
This requires something like the ancient KGtk script, but for KDE 4.x and recent Firefox versions.
OpenSuse offers this kind of functionality. Kubuntu dropped it, but surely someone has worked on bringing this back to Kubuntu (I hope).
Note, I'm not asking about theming/looks. I'm asking about actually using KDE file dialogs instead of XUL or GTK dialog.
And the preference ui.allow_platform_file_picker doesn't affect this. I have already tried setting it to true and false. Neither options results in using KDE dialogs.

The solution has been given in this forum topic. The specific answer is buried somewhere in that thread. But I'll provide the steps here. However, that forum topic will keep you updated as things evolve. These steps allow the use of KDE dialogs with Firefox in Kubuntu 12.04 (other KDE distros are supported too -- see the forum topic).

My solution (given below) is the comprehensive solution. If the amount of detail here confuses you, see the forum thread or ask questions here.

First, you need to add a PPA to Kubuntu. I know of two suitable PPA's. blue-shell is the primary one, but alexey-ivanov is also available. Please check the forum topic (or do a search) to see if the PPA's mentioned here are still the best choices. (UPDATE: The replies below suggest that the alexey-ivanov PPA may be defunct now.) I expect blue-shell to remain a good choice because they are a significant KDE player.

Caveat: as long as there is a Firefox package in the PPA, it should be given priority over other (non-KDE) versions from Ubuntu (by default). But if there is no package in the PPA, the regular (non-KDE) Firefox will be installed. That generally makes KDE users unhappy.

There are several easy solutions for that minor annoyance. (You could even ignore the possibility mentioned in my caveat and take a simpler approach -- but I'm offering the comprehensive solution in this answer. I also discuss a couple of other options in the forum topic mentioned above.)

My recommended solution is to add both PPA's mentioned above. (Adding two is almost as easy as adding one.) If there is a problem with one PPA, the KDE-enabled Firefox can be pulled from the other PPA. The solution is not perfect, but it is reasonable. (Again, see the  topic for detailed discussion.)

Here is a URL relevant to each PPA along with code which can be executed in the terminal to add the PPA.

http://www.bluemintlinux.com/2012/08/kubuntu-gets-kde-support-in-firefox.html:

sudo apt-add-repository ppa:blue-shell/firefox-kde
https://launchpad.net/~alexey-ivanov/+archive/firefox-kde:

sudo apt-add-repository ppa:alexey-ivanov/firefox-kde

As mentioned, I added both PPA's to my system and I think that is a good strategy. But you can follow these instructions for just one of the PPA's by leaving out the steps related to the other.

Now set the installation priority of each PPA as follows:

sudo nano /etc/apt/preferences.d/blue-shell-firefox-kde-pin-1001

That file should contain this text:

Package: *
Pin: release o=LP-PPA-blue-shell-firefox-kde
Pin-Priority: 1001

Do the same for the other PPA if you added both:

sudo nano /etc/apt/preferences.d/alexey-ivanov-firefox-kde-pin-1000

Here's the text that goes in the 2nd file:

Package: *
Pin: release o=LP-PPA-alexey-ivanov-firefox-kde
Pin-Priority: 1000

Note that the Pin-Priority values are not the same. I gave higher priority to blue-shell. (If you only install one PPA, just use a value of 1000 for it.)

Now execute this code in a terminal:

sudo apt-get update

At this point you could install or update Firefox (using apt-get install). But I want to show another step that I include. Before running apt-get install I execute this command:

apt-cache policy firefox

The output will resemble this (with different version numbers, of course):

Installed: 16.0.2+build1-0ubuntu0.12.04.1+ppa1
Candidate: 17.0+build2-0ubuntu0.12.04.2~ppa2
Version table:
 17.0.1+build1-0ubuntu0.12.04.1 0
   500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
   500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
 17.0+build2-0ubuntu0.12.04.2~ppa2 0
   1001 http://ppa.launchpad.net/blue-shell/firefox-kde/ubuntu/ precise/main amd64 Packages
 *** 16.0.2+build1-0ubuntu0.12.04.1+ppa1 0
 11.0+build1-0ubuntu4 0
   500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

The three asterisks above point to the one that's installed. "Candidate" shows you which one will be installed if you run apt-get install. Looking over this quickly will help you avoid any surprises (such as losing your KDE-enabled version of Firefox if a PPA is down).

Summary (tl;dr)

The first time you do this, use all these steps:

sudo add-apt-repository ppa:XXXXXXXXXXX (as above)
edit the /etc/apt/preferences.d/XXXX file for each PPA (set priority)
sudo apt-get update
apt-cache policy firefox
sudo apt-get install firefox firefox-kde-support

For later manual updates, if you don't use automatic updates, do this:

sudo apt-get update
(optional) apt-cache policy firefox
sudo apt-get install firefox firefox-kde-support

I'm not sure if this is what the OP is looking for, but the kde-config-gtk package lets you apply your QT theme to GTK applications.  It won't change the dialogs to be identical, but it could be what you're after.


Unable to install VMWare Workstation v8 Installing VMware 8.0.2 64bit
Ubuntu 12.04LTS 64bit BETA
My Kernel version is: 3.2.0-20-generic
pst007x@pst007x-Aspire-5741:~$ sudo sh VMware-Workstation-Full-8.0.2- 591240.x86_64.bundle

Installs ok
When I launch I am asked to install modules which are compiled and loaded into the running kernel.
A window opens

VMware Kernel Module Updater
This fails on Virtual Network Device

ERROR LOG.
UPDATE:
PATCH.
When I try to add patch, following error:
 pst007x@pst007x-Aspire-5741:~$ sudo sh patch-modules_3.2.0.sh
 [sudo] password for pst007x:
 patch-modules_3.2.0.sh: 27: [: workstation8.0.2: unexpected operator
 patch-modules_3.2.0.sh: 28: [: workstation8.0.2: unexpected operator
 Sorry, this script is only for VMWare WorkStation 8.0.2 or VMWare Player 4.0.2.
 Exiting
 pst007x@pst007x-Aspire-5741:~$

I have fully un-installed, and re-installed. I am installing the correct version. Probably a problem with the patch.
VMware installs perfectly on Ubuntu 11.10
This is how I uninstalled.

Put together this from various responses:

Move to Home folder

VMware-Workstation-Full-8.0.2-591240.x86_64.bundle
PATCH: patch-modules_3.2.0.sh
PATCH: vmware3.2.0.patch

  Patch download link (xtact contents to Home folder):

  http://weltall.heliohost.org/wordpress/2012/01/26/vmware-workstation-8-0-2-player-4-0-2-fix-for-linux-kernel-3-2-and-3-3/

Install VMware

sudo sh VMware-Workstation-Full-8.0.2-591240.x86_64.bundle

Install Patch

sudo ./patch-modules_3.2.0.sh

NB: Make sure patch has an executable permission

I am running Ubuntu 10.04 LTS in VMware Workstation 8.0.2 without any issues...

Cheers!!

http://mytricks.in/2012/05/guide-how-to-install-ubuntu-12-04-lts-in-vmware-workstation-8.html


bash script to check if input has an @ Hi I am trying to write a bash script in which the input is checked to see if it contains an @ symbol, I'm am relatively new to bash so please forgive any/all errors!
So far I have:

var1="@"
var2="INPUT"

echo "input"
read INPUT

if [[ "$var2" == "$var1" ]]; then
echo "pass"
else
echo "fail"
fi

Though you have the option of using inbuilt shell functionality to check if the user's input contained @ (which is well documented in the other answers), another reasonable way to do it is with the external grep utility:

#!/usr/bin/env bash

read -erp '> '
if grep -q @ <<<"$REPLY"; then
    echo pass
else
    echo fail
fi

Passing the -q flag to grep prevents it printing matching lines. (It also keeps it from reading any more lines after finding a match, but that doesn't make a difference here as there is only one line of input.)

It's tempting to shorten the if construct to something like grep -q @ <<<"$REPLY" && echo pass || echo fail, but I have deliberately avoided doing so:

In this case, that's probably okay, since the only way the wrong word prints is if pass was supposed to be printed and echo failed to print it. Then, presumably, echo would fail to print fail as well.
While short-circuit && and || are often themselves appropriate (and I frequently use them to abbreviate an if without an else clause), using them together as though they were a ternary if operator is not really a good habit. While some commands cannot fail, echo can.
If the user redirects your script's output to an unwritable file or device, or uses it in a broken pipeline, echo and other commands that output text can return failure, causing the && expression to fail and the right side of the || expression to execute.
You can test the behavior of a script in the presence of an unwritable output device by running it with >/dev/full.

That script uses a few bash features:

-e enables GNU readline, so the user can move the cursor left and right with the arrow keys to edit their input while entering it.
In bash, read automatically puts the user's input in the REPLY variable if no variable was given.
A here string with <<< is a convenient way to pass the user's input to grep.
Bash and some other Bourne-style shells such as dash accept -p. But POSIX-compatible shells need only understand -r. And in some, like ksh, -p has a different meaning.
(Thanks to geirha for pointing out both that -p is sometimes absent and that it doesn't always mean "prompt.")

If you want a script that's portable to on other OSes that might not have bash installed, you can use:

#!/bin/sh

printf '> '
read -r line

if printf '%s' "$line" | grep -q @; then
    echo pass
else
    echo fail
fi

If you like, you can skip storing the user's input in a variable by reading it with head instead of read:

#!/bin/sh

printf '> '
if head -1 | grep -q @; then
    echo pass
else
    echo fail
fi

As geirha mentioned, head -n 1 might be considered better syntax as head -1 is officially obsolete (though current sed implementations, or at least GNU sed, support -1 in their latest versions, while some very old sed implementations do not support -n 1).

As the head documentation says, you can use sed instead for maximum portability.

#!/bin/sh

printf '> '
if sed 1q | grep -q @; then
    echo pass
else
    echo fail
fi

In newer versions of bash, you should be able to use a regular expression match via the =~ extended test operator:

$ read -p "input: " input
input: quertyuiop
$ if [[ $input =~ \@ ]]; then echo "match"; else echo "no match"; fi
no match
$
$ read -p "input: " input
input: qwerty@uiop
$ if [[ $input =~ \@ ]]; then echo "match"; else echo "no match"; fi
match

An alternative that should work in any POSIX compliant system is to use expr e.g. in the dash shell:

$ read input
qwertyuiop
$ if expr "$input" : '.*@.*' > /dev/null; then echo 'match'; else echo 'no match'; fi
no match
$
$ read input
qwerty@uiop
$ if expr "$input" : '.*@.*' > /dev/null; then echo 'match'; else echo 'no match'; fi
match
$


Upgrading from 13.10 to 14.04 When I search how to upgrade my OS from Ubuntu 13.10 to 14.04 LTS, I see posts stating to enter the terminal and type:

sudo apt-get update && sudo apt-get dist-upgrade

I have also seen suggestions to use software updater and select the upgrade option. Do these two methods serve different functions or are they the same thing? If they are the same thing, if I use the command-line method, will using the GUI method cause issues?

Just read through all the posts, and maybe google "is using terminal to update better than software updater on linux?". I would go with whatever one has more posts about


" g++ not installed " even after installing it " sudo apt-get install g++ " i recently installed Ubuntu on a VMware and following a tutorial...
gcc works for me, but when i try g++, it says " The program 'g++' is currently not installed. You can install it by typing: sudo apt-get install g++ " but, when i do and return to compile a c++ file. It still says the same thing.

EDIT

I tried reinstalling it, didn't work. It doesn't give any error messages per say, but it opens a list of packages that are "the newest version" and when i search for g++ among them, it isn't there.
I tried to locate where it exists, with command " ls -l /usr/bin g++ " i get, " no such file or directory. "
output of command " lsb_release -a "
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Relase: 14.04
Codename: trusty.
output of command "uname -a"
Linus ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 20 15 x86_64 GNU/Linux.
I get nothing by typing " command -v g++ ".
And I dont see g++'s description like the others i see when i use "apt-cache policy g++".

What solved this problem for me was simply uninstalling then reinstalling in 2 steps:

sudo apt-get remove g++
sudo apt-get install g++

If you already have multiple versions of g++ they will be called with the version number on the end. See the output of:

ls /usr/bin/g++*

I have:

/usr/bin/g++-5  /usr/bin/g++-7

Instead of calling g++ I need to call g++-5 or g++-7


how to install Scraping plugin "libweb-scraper-perl_0.36.orig.tar.gz "? I have downloaded "libweb-scraper-perl_0.36.orig.tar.gz " from the link given below :

http://packages.ubuntu.com/precise/perl/libweb-scraper-perl

and it is in desktop folder, help me to install it in 32 bit ubuntu 14.04.2

you don't have to install from source code. Easily you can just run the command to install:

sudo apt-get install libweb-scraper-perl

But you have to enable "Universe" repository if you don't have it yet.

To do that  open software center. Click on 'edit' and then 'software sources' to open the software sources window. Once that is open, check the box that says, "Community-maintained free and open-source software (universe)."

Go to the directory where you have downloaded libweb-scraper-perl_0.36.orig.tar.gz and run the following commands:

tar -zxvf libweb-scraper-perl_0.36.orig.tar.gz

This will extract the contents to a directory. Go to the directory by:

cd name-of-directory

and execute:

./configure
make
sudo make install

If the package is available from Ubuntu (I am sure it is) you can easily install this using the below command:

sudo apt-get install libweb-scraper-perl


12.04 does not detect wlan0(Broadcom  4365) Installed 12.04 on dell inspiron 5420.  wired connection is working however wifi and bluetooth connection does not work. In fact I can't see wlan0. Can I know the correct driver to install?

it's the driver issue, the broadcom didn't release the driver source.
some guy extracted a amd64 binary version from Dell's pre-loaded Ubuntu.
follow this link to see more.
https://bbs.archlinux.org/viewtopic.php?id=145884

ubuntu-1204-wifi-not-working-at-laptop-or-notebook-unblock-it

Ubuntu 12.04.  WiFi not working

Check if the wifi card is blocked (Terminal)

rfkill list wlan     (for wifi)

OR

rfkill list all             (for wifi and bluetooth)

UNBLOCK:

rfkill unblock wlan     (for wifi)

OR

rfkill unblock all             (for wifi and bluetooth)

Restart the network:

sudo service network-manager restart


I accidentally own /etc/ on user ubuntu in aws ec2 I accidentally own /etc/ on user Ubuntu in aws ec2
I owned /etc/ and now this message comes up whenever I used sudo:

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I have been finding answers here yesterday until now and I haven't found any solution that doesn't require stopping an instance.

(This is not the same as the 'another question' posted, why? because he can still run 'sudo' base on the comments I read, and this is a cloud server )

This is my /etc/sudoers file:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

How do I fix this?

You will need to boot a live cd and run

sudo chown root:root -R /media/$USER/*/etc

You will need to open the folder in the file browser to mount the disk

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
**ee209195 ALL=(ALL:ALL) ALL    # TODO ADD THIS LINE With your uid**

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d


gnome-ppp conflicts with resolvconf gnome-ppp package shows the following error in installation:

Conflicts with already installed package resolvconf

wvdial is already installed and all its dependencies are satisfied.

You should use GTK PPP: https://sourceforge.net/p/gtk-ppp/ (new gtk3 version of GNOME PPP)


Why is /etc/profile not being loaded during non-login bash shell sessions? For 11.04, I did a fresh install of my system. Part of that install was to install rvm, which sticks a rvm.sh in /etc/profile.d/. This doesn't work as /etc/profile (which loads each +r in /etc/profile.d/*.sh) is not being loaded. According to the documentation, the profile is only sourced if bash is run in login. To verify this, I invoked bash --login, after which rvm was available.

This has worked for me in previous versions of Ubuntu without any configuration. That is, a fresh install of 10.10 will correctly source profile/.d.

My question is: is there anything I'm doing wrong, or are there some new assumptions being made in Natty that have broken this? My current workaround is to source /etc/profile in ~/.bashrc (which is awful as profile is meant to load before bashrc's, but does the trick).

Per default, gnome-terminal does not start bash as a login shell (I assume you mean bash started inside a gnome-terminal). That means bash will not read /etc/profile or ~/.profile. As you have correctly observed, bash will read those files if started as a login shell.

The quick fix to your problem is to configure gnome-terminal to start bash as a login shell so it will read /etc/profile. To do that you have to enable "Run Command as a login shell" in the gnome-terminal "Profile Preferences" reachable from the Edit menu.

I do not recommend doing this because it messes up the distinction between ~/.profile and ~/.bashrc. Ideally ~/.profile should do stuff which is required only once, during login, while ~/.bashrc should do stuff which is required everytime bash is started.

There is a question and answer at superuser talking about the difference between bashrc and profile. Read there for more information.

From your problem description it seems that the rvm script needs to be loaded only once, during login. As far as I know Ubuntu has configured the graphical login to read /etc/profile/ and ~/.profile. That means, after logging out and a logging in once, the rvm script should be active. If it still doesn't work, then perhaps the rvm script needs to be loaded for every bash session. If that is the case then bashrc is the more appropriate place for the script.

echo ". .profile" >> ~/.bashrc

And then open another window. I think this is the easy approach.


VirtualBox Installation gives message "modprobe vboxdrv" failed VirtualBox Installation gives message

sudo modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found.

I have updated system with

sudo apt-get update

followed with

reboot

Ubuntu version: 14.04 LTS

I tried installing with GDebi Package Installer, the message is-

Selecting previously unselected package virtualbox-5.1.
(Reading database ... 800789 files and directories currently installed.)
Preparing to unpack .../virtualbox-5.1_5.1.0-108711~Ubuntu~trusty_amd64.deb ...
Unpacking virtualbox-5.1 (5.1.0-108711~Ubuntu~trusty) ...
Setting up virtualbox-5.1 (5.1.0-108711~Ubuntu~trusty) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...

Another Try:
I disabled secure boot from BIOS and followed

apt-get update
apt-get install linux-headers-$(uname -r)
dpkg-reconfigure virtualbox-dkms
modprobe vboxdrv

Now modprobe vboxdrv working fine. So I installed VirtualBox with file- virtualbox-5.1_5.1.0-108711~Ubuntu~trusty_amd64.deb with GDebi Package Installer. Now when I start the VirtualBox and start a machine it shows following error-

**RTR3InitEx failed with rc=-1912 (rc=-1912)**

 The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

'/sbin/vboxconfig'

may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.

where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.

This helped me:

apt-get update
apt-get install linux-headers-$(uname -r)
dpkg-reconfigure virtualbox-dkms
modprobe vboxdrv

If you recently installed a new kernel version, try the earlier one. Kernel vmlinuz-4.2.0-42-generic doesnt work for me, but vmlinuz-4.2.0-41-generic works. Apparently, there is no vboxdrv version for vmlinuz-4.2.0-42-generic . I'm using VirtualBox 5.1.


Can't create a folder inside my local server? I recently installed Lampp server (version 1.7.7)
so I went to my local folder, which I believe is in /opt/lampp/htdocs because that's where I've installed my server, and wanted to create a folder where I can put my projects, but I couldn't because the option in the right-click menu isn't even available.

How can I create a directory here?

First off, I'd do what others have suggested and point your browser at your home folder for the project, but to answer your question....

It's not available because your user doesn't have write access to it, you could...

give your self access

sudo chown $USER:webuser /opt/lampp/htdocs/
sudo chmod 755 /opt/lampp/htdocs/

create the directory from the command line

sudo mkdir /opt/lampp/htdocs/your_project
sudo chown $USER:webuser /opt/lampp/htdocs/your_project
sudo chmod 755 /opt/lampp/htdocs/your_project

Note on the chown one, check the webuser, probably www-data, but I've seen it as apache

The safest way to use you projects would be simply to store your files elsewhere and Just keep links to these files in your projects folder.


What is the difference between pm-suspend and pm-suspend-hybrid? I read the man pages of both of them but I couldn't figure out the difference.

man page says:

Hybrid-suspend is the process where the
           system does everything it needs to hibernate,
           but suspends instead of shutting down. This
           means that your computer can wake up quicker
           than for normal hibernation if you do not run
           out of power

Isn't that the same as suspend ?

pm-suspend basically turns off the CPU but keeps memory powered on. This is quick to resume from, but if you run out of power the data in memory is lost.  The hybrid-suspend will save the contents of memory to disk and then suspend, you can wakeup from this like normal suspend, however if you lose power you can power up and the machine will load the saved state back from disk and resume, much like traditional a hibernate resume.

Albert,

Suspend is a "warm resume"  meaning the system is still "active" merely cat nappign "with one eye open " to use the common phrase" whereas, with hibernate the system is totally shut off adn has the " Don not distrub me room service people " mentality


How to get a drive formatted with exfat working? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.

So my question is how do I enable exfat support?

Turns out the packages from the official repositories do the trick. Just install exfat-utils and exfat-fuse packages using the package manager of your choice, or just using apt-get from the command line:

sudo apt-get install exfat-utils exfat-fuse

This should delivery a working exfat file system (read and write support, but not formatting the drives with exfat via Gnome Disks and GParted).

From 13.04+ it hasn't been necessary but if you're using 12.04 you might need to reboot your computer before you can mount your exfat partition. If it isn't working for you after installing the packages, try rebooting.

fuse-utils moved to fuse. fuse-utils has been a trasitionary metapackage (something that just depends on the new package name) since 12.04.

That doesn't help you much if you have something that has a package dependency on fuse-utils because you're right, the metapackage has been removed now. The simplest thing to do might be to just download the Raring version and install that. It shouldn't hurt anything as it makes no demands on which version of fuse to install, just that there's one installed.


Sudo doesn't work: "/etc/sudoers is owned by uid 1000, should be 0" When I type a sudo command into the terminal it shows the following error:

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

How do I fix this?

Change the owner back to root:
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R

Or use the visudo command to ensure general correctness of the files:
pkexec visudo

first run the following command

$ su -root

it will ask for password and then run following commands one by one

chown root:root /etc/sudoers
chmod 440 /etc/sudoers
chown -R root:root /etc/sudoers.d
chmod  755 /etc/sudoers.d
chmod  440 /etc/sudoers.d/*


how to extract service names out of file and save them in clean version in file? i try to figure out how to extract all service names out of /etc/services and send them to text file
sort them alphabetically
remove any duplicates
get rid of any blank lines and unnecessary spaces
and have line count

The file /etc/services looks like this:

# Network services, Internet style
#
# (more comments)

tcpmux    1/tcp     # TCP port service multiplexer
echo      7/tcp
...
discard   9/tcp     sink null
discard   9/udp     sink null
...
ssh       22/tcp    # SSH Remote Login Protocol
...

That is, there are

lines that consist only of a comment
lines with trailing comments
empty lines
duplicates in the first column

To remove all of them, the following command is one possible way:

awk '!/^\s*$/ && !/^\s*#/ {print $1}' /etc/services | sort -u | cat -n

Output

 1  acr-nema
 2  afbackup
 3  afmbackup
 4  afpovertcp
 5  afs3-bos
 6  afs3-callback
 7  afs3-errors
...

Explanation

awk '!/^\s*$/ && !/^\s*#/ {print $1}' /etc/services

In general, awk reads a given file (or stdin) and then executes the following for each line:

condition_for_a_line { commands_when_condition_is_met }

We use !/^\s*$/ && !/^\s*#/ as the condition which means line is not empty and line doesn't start with a comment. When both conditions are met, the first column $1 is printed. This gives us all first columns of the file without empty and comment lines.

sort -u

This sorts the data and eliminates duplicates in one go.

cat -n

Simply adds line numbers.

awk '{print $1}' /etc/services | grep -v # | uniq | sort > yourFile


How to create partitions in Ubuntu while installing? I had Windows 7 crashed. So I wanted to install 12.04. While installing, I am not able to create a new partition after deleting all earlier partitions. I mean I am able to create but not able to understand the technical jargons as I am new to any version of Linux.

Please help me with the steps for creating to create three partition of 50GB, 50GB and 150GB. I want my Ubuntu files to be in one of the 50GB partition or suggest any better way to partition. (I have only 1 hard disk of 250GB in my laptop).

If possible please explain to what the technical terms mean.

There are two kind of disk in terms of legacy partition table.

Primary - Generally OS are use this kind of partition.
Extended  - A special type of primary partition that holds many logical partition.

Max number of primary partition (including extended partition) can be 4. Extended partition doesn't take much space. Consider its a packing box and your logical partitions are packed inside it.

Filetypes of disk parition:

These defines how the files will written in disk. Earlier windows (upto xp) used FAT, FAT32. Newer windows file systems called NTFS.
Unix / Linux uses different file types like ext, ext3, ext4. In addition linux uses a partition with special format called swap.

Now I am assuming you want to have dual boot with windows. So first 50 GB is for ubuntu, second 50 GB for windows system and rest 150 GB for data.

Now ubuntu requires a swap partition (not necessarily if you have big amount of ram). Its generally calculated 1.5x RAM SIZE. If you have a 2GB RAM, preserve 1 GB for SWAP, have 4 GB RAM , preserve 512MB. Its your choice. Good amount of SWAP improves performance.

Steps

Click on unallocated space, click on new. Enter size as 48GB (you have to enter in mb), choose file system type as ext4, mount point /, partition type primary This means ubuntu root partition.
Click on unallocated space, click on new. Enter size as 2GB, choose primary partition, file system type SWAP.
Click on unallocated space, click on new. Enter size 50 GB, choose primary partition, file type ntfs (I don't remember whether this option available, you can use gparted later to format if its not available .)
Click on rest unallocated space, click on it. Choose ntfs as file system, partition type logical and create it. This will automatically create extended partition.

Explanation:

Why logical drive in ntfs? Its because it will be available to both windows and ubuntu. Windows can't work with ext file system.
If you don't want windows at all, you can create all file system with ext4. But remember if you ever try to install windows, you have to reformat everything. Otherwise those drives won't be visible.
If you don't want to install a windows system, in step 3, choose logical instead of primary.

If your Win7 is running normal then use Windows disk management and unallocate your desired free space for Ubuntu 50GB for ext4 journal and same size of your RAM for swap.
Install Ubuntu via USB disk and a select the option that states Other...(something in that sense...). Then select your unallocated free space to create ext4 and swap.
If your Win7 is gone as in kaput then you must install it first if you want dual booting.
If you can do computing without Windows then install Ubuntu in item 2 above with all your drive ext4 and some swap.


Start computer, no launcher, no side panel and hot keys don't work. So after I log in nothing appears, just the background. Can't manage to open up a terminal with Ctrl-Alt t. Nothing
This happen after I mistakenly click an option in effects in Compiz.
I saw a couple previous threads that look similar but nothing has worked yet.

Not sure, but you can try:

When bootig up your PC press Shift to force show the Grub. Then start to command line and login to your user. Then type:

dconf reset -f /org/compiz

That should reset Compiz to defaults.


How to screen mirror android phone to Ubuntu PC? I need to screen mirror my android phone to Ubuntu PC.
Is there any tool or package available in Ubuntu to do this?

There are several solutionsHere are the two bests to me

Best but harder: scrcpy (Screen mirror and device control via USB and TCP/IP): This application provides display and control of Android
devices connected on USB (or over TCP/IP)

The Android device requires at least API 21 (Android 5.0).
Make sure you enabled adb debugging on your device(s). On some devices, you also need to enable an additional option to control it using keyboard and mouse.
Install scrcpy from snap or from github snap install scrcpy
Configure
Connect

A good article document on how to do this.

Quick & Easy: Airdroid on Android device & a browser on Linux PC

Install AirDroid app on Android device
Connect a Linux Pc browser to device
Use (from Linux PC) the Airdroid Screenshot feature

Feature is available with free use and without any account to online service.

Install Chromium web browser. Oon the far top right corner tap the vertical row of 3 dots and look for Cast. If the two devices are on the same wifi and compatible you'll be able to select the PC.


No sound through headphone jack (Dual boot setup) I have dual boot setup (Windows and Ubuntu) on my Asus UX530UX laptop, last time I was on Windows I had my headphones pluged in and shut down the computer. Ever since, Ubuntu does not output sound through my headphones, however it does recognize the microphone input as the bar on the input panel is moving along with the sound (I haven't confirmed anymore than that).
I have tried the following:

checked that the headphones are not muted from alsamixer
restarted pulseaudio (multiple times)
reinstalled Ubuntu 18.04 LTS
today I upgraded to Ubuntu 20.04 hoping that it would fix the issue
I even reset Windows but nothing worked

The headphones would work when live booting from a USB but not when it finishes the installation.
pacmd list | grep "active port" output:
active port: <analog-output-headphones>
active port: <analog-input-headset-mic>

lspci | grep -i audio output:
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

dpkg -l *alsa* output:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version              Architecture Description
+++-=======================-====================-============-=========================================
un  alsa                    <none>               <none>       (no description available)
ii  alsa-base               1.0.25+dfsg-0ubuntu5 all          ALSA driver configuration files
un  alsa-oss                <none>               <none>       (no description available)
ii  alsa-topology-conf      1.2.2-1              all          ALSA topology configuration files
ii  alsa-ucm-conf           1.2.2-1ubuntu0.1     all          ALSA Use Case Manager configuration files
ii  alsa-utils              1.2.2-1ubuntu1       amd64        Utilities for configuring and using ALSA
un  bluez-alsa              <none>               <none>       (no description available)
ii  gstreamer1.0-alsa:amd64 1.16.2-4             amd64        GStreamer plugin for ALSA

What should I do to make my headphones work?

Updated with Official Ubuntu Docs on Wifi Powersave: https://core.docs.ubuntu.com/en/stacks/network/network-manager/docs/reference/snap-configuration/wifi-powersave


input/output error during write on /dev/sdb during Ubuntu installation I am trying to install Ubuntu 14.04 on a clean hard drive but it gives an error:

input/output error during write on /dev/sdb

What should I do to fix it? Thanks in advance I haven't tried anything as I am a newbie.

"I am trying to install Ubuntu 14.04 on a clean hard drive":   "input/output error during write on /dev/sdb" indicates that the system is unable to write to /dev/sdb.

please begin by opening a terminal and providing the output of:

sudo fdisk -l /dev/sdb

If this fails, it's likely either the drive or the cable connecting it is bad.

Try disk destroyer("dd") command, google for disk destroyer command , be extra careful on which partition it is being used. If this does not work then you device is broken, there is no way to fix it.


Is there a better pdf to text converter than pdftotext? I'm using pdftotext (part of poppler-utils) to convert PDF documents to text. It works, for the most part, but one thing I wish it did was to insert blank lines between separate paragraphs instead of mashing them together.

Is there way to get pdftotext to do this? And if not, is there another pdf to text utility that can do this?

If you are using pdftotext you can use the -layout flag to preserve the layout of the text on the pages in your input pdf file:

pdftotext -layout input.pdf output.txt

I also tried pypdf and compared it against pdftotext on two documents. It had more linebreaks and split some section names (REFERENCES was R E F E R E N C E S).

pdf2txt did output complete garbage.

I often use pdfBox (java) if pdftotext screws up the output. You  might give it a try.


I want to use my Lubuntu 16.04 as bluetooth speakers for my Android phone I want my Lubuntu to play my Android ringtone when my Lubuntu is paired over Bluetooth whit my Android phone.

I was able to make my Lubuntu play music and video sounds from my Android, whit Blueman-applet, but when it should play ringtone when someone is calling me, it only plays on my phone speakers, but not on my Lubuntu.

I know this is kinda duplicate question, but since I found no answer there, I ask here, and hope someone will help me, and many more people that need this help.

Here is duplicate: How to use Computer as a HeadSet using a bluetooth dongle paired with Android phone

Here is another question: https://www.facebook.com/groups/lubuntu.official/permalink/1160833463973472/

buddy idk much as well but yes there is a way of using soundwire application for using your phone as speaker but it works only in wrt wifi.
i.e you will have to creaate hotspot through your phone connect your pc/laptop to it.
then install soundwire apk on your phone and software with dependecies on your laptop/pc and then launch application from laptop and then from your phone and by putting required details yo will be able to figure it out how to use


What does "cp: omitting directory" mean? I've issued the following command:

sudo cp ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/

When I do this, I start getting the following messages:

cp: omitting directory `Tag'
cp: omitting directory `Test'
cp: omitting directory `Text'
cp: omitting directory `TimeSync'
cp: omitting directory `Tool'
cp: omitting directory `Translate'
cp: omitting directory `Uri'
cp: omitting directory `Validate'

and so on...

Why do I get these messages ?

By default, cp copies only the direct files in, and not subdirectories in the directory. The message cp: omitting directory 'directory' warns you that the mentioned directory is not copied.

To do so, specify the -r (or --recursive) option:

sudo cp -r ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/

The manual page (command: man cp) contains an overview of the available options.

Suppose you have two directories 'Tag' & 'Test'

If you want to copy 'Tag' directory to 'Test' directory use command

$ : cp -r Tag Test (case sensitive)

Mostly Problem will be solved with above code if not and you get below message like

cp: omitting directory `Tag'
cp: omitting directory `Test'

then add some files in 'Tag' directory and then copy those to 'Test' . Actually i to have same problem but solved like what i said secondly.


How can I install the Unity Photo Lens I can't install the Photo Lens. After running these commands:

sudo add-apt-repository ppa:scopes-packagers/ppa
sudo apt-get update && sudo apt-get install unity-lens-photo unity-scope-shotwell unity-scope-flickr

I get this:

  Package unity-lens-photo is not available, but is referred to by
  another package. This may mean that the package is missing, has been
  obsoleted, or is only available from another source

  E: Package 'unity-lens-photo' has no installation candidate

Is there a fix for that? Thank you very much.

After a brief look at https://launchpad.net/~scopes-packagers/+archive/ppa?field.series_filter=, it seems that there is no package named unity-lens-photo. It looks like  unity-lens-photos, however is in the main archive for quantal (12.10) but not for precise (12.04).

If you really want it in 12.04, you could update your unity to the quantal version with this ppa (https://launchpad.net/~benkai/+archive/precise-unity-backport) although that could be a bit risky as it is still in beta.

unity-lens-photo separately download the DEB package to install later, and at the end:
 sudo add- apt-repository ppa: scopes-packagers/ppa
 sudo apt-get update && sudo apt- get install unity-lens-photo unity-scope- Shotwell unity-scope- flickr
 for me it works
 P.S.
 Some of the packages that are needed and there is no time, unfortunately, is not easy to separately download:)?
 I greet


Root password while logging in as guest I have installed Ubuntu using WUBI from my Windows OS. I created my username and its password. While I am trying to log in it's saying that the password is wrong. I have reinstalled 3 times giving the same problem.

How can I reset the root password in order for me to install an application?

I think you haven`t root password and you must created.

Type the following command:

sudo passwd
The following message will appear:

[sudo] password for [username]: [Type your user password and press return]

After that another message will appear, the following:

Type new UNIX password: [Type the root password you want]

Now the last thing you need to do, the following:

Retype new UNIX password: [Retype the root password you chosen before]

The following message will appear:

passwd: password updated successfully


How can I keep recent files from appearing in Unity? I sometimes browse erotic media files but I would like to avoid having them appear in files & folders / recent. How can I do that?

The old "making .recently-used.xbel a folder" trick from 10.10 and older doesn't work any more.

Plus I'd prefer to turn off tracking only temporarily.

I also prefer not to use a separate user for this, as switching users sometimes isn't fast enough.

Method 1: Using Activity Log Manager

Ubuntu Precise 12.04

In Ubuntu Precise Activity Log Manager 0.9 is included by default. It can be accessed from System Settings or just by looking for Privacy.

Or you can simply type Privacy in Dash

Now you can start blacklisting applications. Screenshots

Activity Log Manager in Oneiric and first release

You can install Activity Log Manager from the Stable PPA.

For more details about Activity Log Manager you should check out the article on OMG! Ubuntu! and article on Webupd8

A new version of Activity Log Manager is in development which looks better and is simpler to use. A screenshot of the unreleased Activity Log Manager

Method 2: Using Gnome Activity Journal

You can do it, provided that there is some pattern in the files. For example you have kept all your explicit content in folder /home/mrpig/erotica/ folder.

Then open Activity Journal which is a GUI frontend to Zeitgeist which acts as a Dashboard showing your recent activities. On top right Zeitgeist Icon, click it and Preferences. Check "Blacklist Manager" plugin

Then goto "BlackList Manager" tab.
Click on New button, and then edit the new entry which comes as file:///home/mrpig/erotica/*

Linked Question:

Hidden files are shown in Dash

Using a GUI Method:

Click on the Home Icon on the Left Tool Bar which opens Nautilus in your Home directory.
Under View on the Top Tool Bar make sure Show Hidden Files is checked.
Now using Nautilus navigate to .local/share.
Optional: if you don't like to type: highlight the file: recently-used.xbel
then right click and choose Rename then copy the entire file name of
recently-used.xbel by using either Ctrl+c or Ctrl+Insert
Now Delete the file: recently-used.xbel
In a blank area of the current folder right click and choose Create Document/Empty File
Rename the default filename: new file to recently-used.xbel by either
typing it or if you followed step 4 Paste by Ctrl+V or Shift+Insert the name so the new file appears as recently-used.xbel


keyboard shortcut to switch between windows within an application Is there a keyboard shortcut, or can I somehow bind a shortcut, to switch between windows within an application (similar to opt+~ on macOS)?

Ideally, I'd like Alt+Tab to be unaffected or to be rebound to switch between applications (not between windows).

The existing shortcut is Alt + key above TAB

Depending on your keyboard key above TAB could be §, `, º, ^, ², etc.

This differs in various keyboard layouts, but usually it is the key right above the TAB key.

In the german and spanish layout it is ALT+°

This is quite handy, this way you can easily access both switches.