problem installing Ubuntu 18.04 LTS on dell laptop inspiron 15 7000 gaming can I install Ubuntu 18.04 LTS on my dell laptop inspiron 15 7000 gaming. I tried to install it using usb, but the screen is freezing when I tried Ubuntu without install.

Thanks,

I have GTX 1050 on my Yoga 720 and Ubuntu installed fine. Make sure you have the drive interface in the BIOS set to AHCI instead of RAID. I dual boot Windows 10 on my machine, here's the step I took.

Windows 10 came installed with EFI BIOS set to have secure boot enabled and drive set to RAID. Boot to Windows Safe mode, go to the BIOS and change RAID to AHCI. Windows SAFE mode will get the proper AHCI driver enabled, so the next normal boot to Window 10 should be successful.

From Windows 10 OS, I shrink the C: drive to allow 100GB of free space for Ubuntu installation. Then reboot via Ubuntu 18.04 installation USB stick. Use select to do the partition yourself, make a partition or two if you want swap in separate partition. Select your root and swap (if necessary), and nstall Ubuntu and grub2 on the partition. Under EFI installation.

Both Windows 10 and Ubuntu boot option should be available to your BIOS EFI boot selection.

I install Ubuntu 18.04 but I have disable the GPU.

At the installation grub you have press e and then, after the --- put nomodeset and press f10.

The installation will work, but I can't install the nVidia drivers.


How to prevent "Write Failed: broken pipe" on SSH connection? What can I do to configure SSH on both client and servers to prevent Write Failed: broken pipe errors? It often occurs if you sleep your client computer and resume later.

I have tried this in /etc/ssh/ssh_config for Linux and Mac:

Host *
ServerAliveInterval 120

This is how often, in seconds, it should send a keepalive message to the server. If that doesn't work then train a monkey to press enter every two minutes while you work.

You could set either ServerAliveInterval in /etc/ssh/ssh_config of the client machine or ClientAliveInterval in /etc/ssh/sshd_config of the server machine. Try reducing the interval if you are still getting the error.

Configuration for a single user can be set in file ~/.ssh/config both on the server and client side. Make sure the file has correct permissions chmod 644 ~/.ssh/config.

You can add these args every time you invoke ssh: -o ServerAliveInterval=15 -o ServerAliveCountMax=3

You don't have to edit /etc/ssh/*config files if you do this.

You can create an bash alias or function or script to make this easy.

E.g. these bash functions, you can add into your .bashrc, do_ssh is used manually to turn on keepalives. do_ssh_pty is used within scripts to set pty and avoid prompts.

do_ssh() {
    ssh -o ServerAliveInterval=15 -o ServerAliveCountMax=3 $*
}

do_ssh_pty() {
    ssh -tt -o "BatchMode=yes" -o "StrictHostKeyChecking=no" -o ServerAliveInterval=15 -o ServerAliveCountMax=3 $*
}

Now do_ssh user@host can be used or do_ssh user@host <args> <command> and keepalives will be active.


Ubuntu unable to update and upgrade to 14.04: GPG Error I have been looking around the net for solutions but I just cannot get rid of this error.

sudo apt-get update
Ign http://archive.canonical.com saucy InRelease
Ign http://extras.ubuntu.com saucy InRelease
Ign http://ppa.launchpad.net saucy InRelease
Get:1 http://glug.nith.ac.in saucy InRelease
Get:2 http://qgis.org saucy InRelease [3,187 B]
100% [1 InRelease gpgv 9,491 B] [Waiting for headers] [Waiting for headers] [WaSplitting up /var/lib/apt/lists/partial/glug.nith.ac.in_ubuntu_archives_dists_sauIgn http://glug.nith.ac.in saucy InRelease
E: GPG error: http://glug.nith.ac.in saucy InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

EDIT: This particular error disappeared upon changing the server to the main Ubuntu server. There were a few errors with 404 not found, and I removed those ppas from the software list.
On a sidenote, I recently removed and purged qgis so don't know what its doing there.

I have had the same problem. Run following command to resolve it.

sudo dpkg-reconfigure -a
sudo apt-get update
sudo do-release-upgrade -d

and it might work fine this way.


Comic Reader that supports animated .GIF images? Short and simple question -- is there a comic viewer that will allow me to view my .cb7 comic files with animation?

There are some comics and manga I have that have animated .GIF images that move -- in windows I was able to open and display these using honeyview.

Is there any similar program for Linux? Right now I have decompress the archives in order to view the animations...

After some looking, I have determined there are currently NO applications for Linux that will open a .cb7 (7-zip compressed) archive and play the GIF images. My solution has been to extract these images into a folder and view them normally for now.

Linuxaria described five comic book readers that can process the archives.

Among them is Calibre, which I use frequently to process ebooks. But I'm not into comics, so I can't tell if animated GIFs are supported. They don't give any information in the survey either.

EDIT
Luis de Sousa's comment made me curious enough to run a single try. I can confirm that Calibre can import and display *.cbr archives. The one I got, however, was an archive of JPEGS. So the full question of the OP remains unsolved.

I suggest to give Calibre a try. It's in the repo (= doesn't require 3rd party resources) and a good tool anyway :)


How to convert an iso file to img format in linux? I had downloaded a ".iso" image of the ubuntu website and for some official work i need to convert this to ".img" format. i see a lot of windows software's available but how do i do this conversion in linux?

Actually there isn't any difference between iso's and img's apart the extension. Look at  this link.

So you have to just change the extension.

actually one of the users had posted the answer but deleted it,
the foll. had worked for me:

dd if=/home/asic/ubuntu.iso of=/home/asic/ubuntu.img


How do I login to Ubuntu directly using root account? How do I login to Ubuntu 15.10 directly using root account?

Root account is disabled in Ubuntu for login by default. You would have to change root password to login directly.

Personally i suggest you login to root through your sudo account with sudo -i

If you need login as root :
Open terminal then type

sudo nano /etc/gdm3/custom.conf

Find line [security]
and replace to

[security]
AllowRoot=true

Save and exit.
And run

sudo nano /etc/pam.d/gdm-password

Then replace this auth required pam_succeed_if.so user != root quiet_success

To #auth required pam_succeed_if.so user != root quiet_success

Save and exit
And restart computer.


How to set GRUB timeout to 0 on Ubuntu 18.04 I tried to update my grub config file to timeout to 0 value, so OS starts quickly. I modified /etc/default/grub configuration file on my Ubuntu 18.04 and then ran:

sudo update-grub

and it didn't work. I also ran:

sudo grub-mkconfig
sudo update-grub

but they didn't work.

I searched a lot on the web to solve this issue, but all guides say to run the update-grub command to update grub by /etc/default/grub config file.
I don't know if is Ubuntu 18.04 that handles grub files in a different way, but I cannot update my grub with my parameters.

This is my /etc/default/grub file:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

In /boot/grub/grub.cfg file there is a condition, almost at the end of the file, that sets the timeout to 10 if the timeout is set to 0. In other words, if you set the timeout to 0 in your /etc/default/grub and then update grub, the condition above reset it to 10 seconds.

if [ "${timeout}" = 0 ]; then
     set timeout=10
fi

However, /boot/grub/grub.cfg is a read-only file and I cannot remove that condition. I made some tests with different values of the timeout in /etc/default/grub. I tried with 1ms (0.001), 0.1s and 1s and I found out that values below 1 (like 0.1 and 0.001) work in the same way and almost like timeout set to 0.

The solution is to add

GRUB_RECORDFAIL_TIMEOUT=0

to /etc/default/grub.

All other solutions will be reset on grub updates.


OpenSSL remains vulnerable to CVE-2016-2107 on 16.04 after applying 1.0.2g-1ubuntu4.1 http://www.ubuntu.com/usn/usn-2959-1/ lists openssl vulnerability CVE-2016-2107. I applied 1.0.2g-1ubuntu4.1 and rebooted, but the vulnerability remains. http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-2107.html, states "...OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not ... check", which would suggest that 1.0.2g-1ubuntu4.1 fails to resolve the issue. openssl version -a reports 1 Mar 2016. How to close this vulnerability?

ajr, what confused you is that the package link in the update instructions says libssl1.0.0 but actually links to the openssl package.

(apt install openssl does not work, but installing libssl1.0.0 does resolve the issue)


How can I make text in Android Studio readable? I have installed Android Studio in Ubuntu 17.4 but it seems to use a very bad font. It does not show most characters at all, instead showing tiny boxes as though they were characters the font doesn't provide.

This is due to an unrecognized font.

See the below image for a guide as to how to change the font.

Or, in text:

In Android Studio, go to File > Settings
In Settings, go to Appearance and Behavior
Select the Appearance sub-menu
Check the Override default fonts option.
Set your overridden font to Ubuntu with size 15 (or whatever you prefer)


How do I compile and install the latest PiTiVi 0.15.2? As there's a critical bug in PiTiVi 0.15.1 (version released in Software Center) and I need to finish a project, I tried to install the latest version, 0.15.2. I tried to add the PPA and to compile it (I found the instructions at the PiTiVi website), but I had no luck. What should I do?

I'm using Ubuntu 12.04 in an iMac 21'5'' Late 2009.

The PPA does not include any packages for Precise (12.04), and contains no packages for the version you want either (0.15.2), so it's useless. You can remove it from Software Center or using apt-add-repository.

0.15.2 compiled just fine for me on Precise 64-bit, with the following. Open a terminal, and run the following to install PiTiVi 0.15.2 on your system

sudo apt-get build-dep pitivi -y
sudo wget -O- http://ftp.gnome.org/pub/GNOME/sources/pitivi/0.15/pitivi-0.15.2.tar.xz | tar -xJ
cd pitivi-0.15.2
./configure && make
sudo make install

Try sudo apt-get update to update your package list.
Then sudo apt-get autoclean to cleanup any partial packages.
Then sudo apt-get clean to clean up the apt cache.
Then sudo apt-get autoremove to cleanup any unneeded dependencies
Then run sudo apt-get install -f
Then run sudo apt-get update

Now go to the Ubuntu Software Center and remove the PiTiVi ppa which is noted as ppa:gstreamer-developers

Now install the PiTiVi by running the following commands one at a time:

sudo add-apt-repository ppa:gstreamer-developers/ppa && sudo apt-get update
sudo apt-get install pitivi

The whole process should remove all the previously installed broken packages and do a fresh install.


Ubuntu internet not working with lower Wi-Fi signal levels Ubuntu 14.04.3 not accessing internet traffic when Wi-Fi signal is at 2 bars of strength or less. It connects to the router/modem combo, but no web pages can be downloaded in any browser (or any network traffic it seems). Windows 7 can access internet fine on same hardware and low signal strength. Problem disappears when signal strength is 3 bars or higher.

Output of lspci -knn | grep Net -A2 command is:

05:00.0 Network controller [0280]: Broadcom Corporation BCM43224 802.11a/b/g/n [14e4:4353] (rev 01)
    Subsystem: Dell Wireless 1520 Half-size Mini PCIe Card [1028:000e]
    Kernel driver in use: bcma-pci-bridge
--
0b:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe [14e4:1698] (rev 10)
    Subsystem: Dell Device [1028:02fe]
    Kernel driver in use: tg3

Could it be driver related?

According to b43 driver wiki this adapter is supported by b43 driver.

You can install firmware for this adapter by running

sudo apt-get install firmware-b43-installer

And you can activate b43 driver by

sudo modprobe -r brcmsmac bcma
sudo modprobe b43

After that lspci -k | grep 0280 -A2 should show b43 as Kernel driver in use.

If this driver works better, then I will add how to make it permanent.

I had a similar issue with my BCM4313, and it was due to the drivers in use ( bcma-pci-bridge, same as you ).
The solution was to install the official drivers, bcmwl-kernel-source.
You can find them on the repositories.

For more information check out this page:
https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx
It may help you.


youtube-dl is not working I am using youtube-dl to download some videos from youtube. But when I write:

youtube-dl http://www.youtube.com/watch?v=rn_YodiJO6k

I get:

[youtube] Setting language
[youtube] rn_YodiJO6k: Downloading video webpage
[youtube] rn_YodiJO6k: Downloading video info webpage
[youtube] rn_YodiJO6k: Extracting video information

ERROR: unable to download video

What am I doing wrong?

Same question was asked on unix.stackexchange.com.

Youtube changed something to make it incompatible with youtube-dl, it's been fixed in the latest version. Use the following to update youtube-dl until the package system gets the updated version:

sudo youtube-dl -U

Update

As noted by sup in the comments youtube-dl is patched in Ubuntu to disable the --update option because of security concerns (the bugreport is here). It is also argued in the bugreport that youtube-dl is a moving target, so the version in the repositories is often out of date. This makes easy upgrade a necessity.

Easy upgrade is still possible with e.g. pip. Install like this (you may want to uninstall old versions of youtube-dl first):

sudo pip install youtube_dl

Upgrading can now be done with:

sudo pip install --upgrade youtube_dl

As documented on the youtube-dl download page. Note that similar security concerns are attached to this method as well.

You have to put double quotes (") before and after the URL of the video to make it work.
I don't think it's a bug.

For example:

youtube-dl "<video-URL>"


How to Install ubuntu with windows 8? I am using windows 8.I wanted to install ubuntu alongside with windows. I can install with windows 7 but not windows 8..Please Guide me

Create a USB Installer using LinuxLive USB Creator. Then, boot from the USB and install Ubuntu in another hard drive, or alongside Windows 8. To install it alongside Windows 8, use GParted, which can be found by clicking Dash which is in the top left and searching for the program. You must partition your drive and use the free space that you have created to install Ubuntu on.

http://www.linuxliveusb.com/

I also found a link that may help you:

http://www.linuxbsdos.com/2012/11/05/dual-boot-windows-8-and-ubuntu-12-10-on-uefi-hardware/


Windows executables are started with archive manager I have Wine installed and several Windows applications installed there run fine, if I start them using the right mouse menu "Open with Wine program loader". But if I try starting an .exe file by just double clicking instead, the archive manager tries to open the executable.

How do I fix that?

And something like a bonus question as a former Windows user: Can this be done easily for a single file I currently see in the file manager (similar to the "Open with..." context menu in Windows) and for many file types together (like in Windows, using the menu "Folder settings" in the Explorer)?

Right-click, select Properties, open the "Open With" tab, and make Wine the default application for EXE files.

That does not always work. Some settings for file type handling can be found in

.local/share/applications/mimeapps.list

In that file, I found the follow line:

application/x-ms-dos-executable=file-roller.desktop;wine.desktop;

and changed it to

application/x-ms-dos-executable=wine.desktop;

After saving the file the result is active immediately.


How do I run executable scripts in Nautilus? When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?

Open Nautilus.
Open this from the menu bar:

  Edit → Preferences

Select the 'Behavior' tab.
Select "Ask each time" under "Executable Text Files".
Close the window.
Right click the file, and select "Properties.
Select the "Permissions" tab, and make sure "Allow executing file as program" is selected.
Close the window.

Now you can double-click your executable text file in Nautilus to be asked whether to execute or edit your script.

Answer credit: Nur

Open Nautilus. (File Browser)

In Ubuntu 17.04, now we can cummulative bar so Preferences in available in Files.
Open this from the menu bar:

Files → Preferences
Select 'Behavior' tab
Select "Ask what to do" under "Executable Text Files".

Close it.


Is it possible to use a 2.6.38 kernel with 10.10? I have simple question. Is it possible to use new 2.6.38 kernel with Ubuntu 10.10? Does there exists some PPA or you need to compile?

You can also use the debs coming from Natty... Just go here and download the "linux-image-2.6.38-" and the needed "linux-headers-2.6.38-" you want and install the debian files. They should work with no issues.


wget 200 Webcat Access denied error I am trying to download this file from terminal but getting following error

sudo wget "http://indiamp3download.com/indian_movies/Gangs_Of_Wasseypur_(2012)_IndiaMp3.Com.zip"

http://indiamp3download.com/indian_movies/Gangs_Of_Wasseypur_(2012)_IndiaMp3.Com.zip
Resolving indiamp3download.com (indiamp3download.com)... 94.102.51.123
Connecting to indiamp3download.com (indiamp3download.com)|94.102.51.123|:80... connected.
HTTP request sent, awaiting response... 200 Webcat Access denied
Length: unspecified [text/html]
Saving to: ‘Gangs_Of_Wasseypur_(2012)_IndiaMp3.Com.zip.7’

Any other way or something I am missing ?

According to the output of wget, the remote HTTP server returns the response code and message:

200 Webcat Access denied

This is a bit odd, because status code 200 is supposed to denote success, but the subsequent status messages contains "denied". It's also a non-standard message, because "Webcat" doesn't appear anywhere in the HTTP specification.

To summarize, the error lies not with you but with the server administrator. There's nothing, you can do about it without their help.

The error means that your network provider doesn't allow you to download a file exceeding a particular file size. Ask your network provider to allow you to download large files.


Connect to a Microsoft Exchange 5.5 server using Evolution I am trying to set up Evolution to connect to my company's Exchange server, but I got this error after entering the request OWA URL and credentials:

  The Exchange server is not compatible
  with Exchange Connector.

  The server is running Exchange 5.5.
  Exchange Connector  supports Microsoft
  Exchange 2000 and 2003 only.

I read that I can use Thunderbird or IMAP if it's enabled, but that I'd lose calendar and contacts sync.  I'd rather not do that.

Is there a workaround for this so that I can get roughly the same functionality I'd get using Outlook for Windows?

You'll need to use the MAPI plugin for Evolution.

sudo apt-get install evolution-mapi

I've been able to use this successfully at a previous place of employment where the only source of mail was an Exchange Server. To my knowledge contact syncing did not work - but calendar and mail services worked properly.

During the setup I needed to use the IP address of the exchange server (you can find this out by contacting your local IT or running a dig against the mail server's domain) as well as including my domain for the user login ( eg: DOMAIN\user). After setup of the account I needed to restart evolution for the sync to take place.

It's pretty simple -- you can't.

I'm in a similar situation at my job.  DAVMail is pretty wonky -- sometimes it makes so many requests the system locks my account and I have to call tech and have them unlock it.

Sometimes it just doesn't sync.

The MAPI plug-in is even worse -- it just randomly plain doesn't work.

Running IE in Wine is a not-so-decent-but workable solution, but honestly, Outlook on Windows is the only piece of software that works correctly with Exchange.  Even Entourage (the old Mac client) uses the DAV interface (just like DAVmail) and the new Outlook for the Mac requires the latest versions of Exchange as well.

Balls vendor lock-in


writing to /proc/irq/*/smp_affinity as root Here is the command I issued:

root@vishal-Think:~# echo "0" > /proc/irq/0/smp_affinity

And here is the error:

-bash: echo: write error: Input/output error

The ls command shows that root has write permissions:

root@vishal-Think:~# ls -l /proc/irq/0/smp_affinity
-rw------- 1 root root 0 May 21 16:30 /proc/irq/0/smp_affinity

Please tell me how I could fix this.

Another question of mine is that even after disabling irqbalance and rebooting the machine, I still see interrupts going to cpus other than cpu0. Why could that be happening?

IRQ 0 is timer interrupt and is handled only by core 0. This can not be moved to other cores.

/proc is a virtual file system and although the information appears to be a file, you do not write to the files.

See http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html

I am not sure what the problem is with your hardware or how to fix it. Please update your question describing the problem and what you did to generate that error message.


How do I install drivers on an Alienware m11x? I installed Ubuntu 12.04 on my alienware m11x, which has both integrated and discrete graphics. I also installed gnome-shell, but upon login it defaults to fallback mode. I'm pretty sure this is an issue with the graphics drivers.

However, there are no graphics drivers listed in the 'additional drivers' so I'm not sure what drivers I need. I know even the discrete graphics are capable of running gnome shell (I had linux mint previously installed and it ran gnome shell fine), its just a matter of installing the right drivers. Are there some drivers I can install from the command line? I also found this page: http://intellinuxgraphics.org/
but I have no idea what I need.

Any help would be awesome.

Looking up the Alienware M11x's specs on Dell's website, it appears that you are running with an integrated/discrete setup composed of Intel Integrated Graphics and the nVidia GeForce GT 335M.1
From Dell's website:

With the Alienware™ M11x gaming laptop, you can play anything, anywhere. While weighing in at less than 4.51 pounds, the M11x packs enough power to handle the latest games. It truly redefines the gaming capabilities of sub-15" laptops.You can also maximize battery life by switching to integrated graphics or switch to the 1GB NVIDIA® GeForce® GT 335M graphics for an intense gaming experience.

This kind of setup comes with nVidia Optimus technology, which, sadly, only runs on Windows 7.

However, all hope may not be lost. There is an open-source alternative: Bumblebee. It is available as a PPA.

For detailed information on how to get nVidia Optimus cards working on Ubuntu through Bumblebee, see How well do laptops with Nvidia Optimus work?

Once you install Bumblebee, you should restart. After you've rebooted, you will be able to run programs on the nVidia card with the terminal command optirun.

Test that it's working properly by opening a new terminal window with Ctrl+Alt+T and entering

optirun glxspheres

The above command will start glxspheres, a program which consists of a ton of 3D spheres. Additionally, if you look back at the terminal, you should see the word nvidia in the GL vendor string. Congratulations, Bumblebee's installed correctly and you can now use your nVidia card for graphics-intensive programs such as games.

I personally have a laptop with the nVidia GeForce GT 540M and Bumblebee effectively replicates the behavior of Optimus. An added bonus is that, like Optimus, Bumblebee turns off your nVidia card when you're not using it, so you'll get a better battery life than you would without Bumblebee.

1 Whatever you do, do not install the proprietary nVidia drivers from nvidia.com! This may totally mess up Ubuntu!

I looked up your laptop's features and it seems your graphics card is an NVIDIA GT 540M.

You can choose between two ways:

Follow these instructions, which will add a repository to your setup which will let you install the correct driver and afterwards update it automatically:

How To Install New Nvidia Linux Driver Supports Ubuntu 11.04 Series 270.41.06?

For your card you would need to download this driver:

http://www.nvidia.com/object/linux-display-amd64-295.49-driver.html

This download will give you a file with the extension: .run

Just execute this file as root or sudo from the command line before starting any window manager (or log out from your current session). You may have to shut down lightGDM (the login greeter) as well.

Both ways should setup your xorg.conf file to use the new driver.

After installing the driver, you should restart your machine.


When I plug my printer the system automatically knows its make and model Does the systems reads the firmware of the device and knows it behavior features and functions or does Ubuntu have all the device drivers in a database?

There is a command for that, and it probes the device:

Command

ieee1284_get_deviceid

  This function is for retrieving the IEEE 1284 Device ID of the specified device. The device is specified by the port to which it is attached, and optionally an address (daisy) on the daisy chain of devices on that port.

Example

A printer setup tool detects an HP LaserJet 3390 on the local USB by getting the following IEEE-1284 device ID:

MFG:Hewlett-Packard;
CMD:PJL,PML,MLC,POSTSCRIPT,PCLXL,PCL;
MDL:HP LaserJet 3390;
CLS:PRINTER;
DES:Hewlett-Packard LaserJet 3390;
MEM:MEM=53MB;
1284.4DL:4d,4e,1;
COMMENT:RES=1200x1;

By the way there is also an on-line database that can be accesses using wget: https://wiki.linuxfoundation.org/en/OpenPrinting/Database/Query

Answer is yes. Unlike Windows, Ubuntu can detect any kind of device without installing prior device drivers externally. It has got all kinds of Generic drivers inbuilt which are required on daily purpose.


How to recover GRUB? I have installed windows 10 in one hard disk and in another ssd I have ubuntu 17.04 installed. Grub was installed in the drive where windows is installed. Basically the windows MBR got replaced by GRUB. Now I want to format my windows drive and reinstall windows 10 without disturbing the ubuntu installation. But if I do this then the grub will be gone. How can I recover the grub menu like previous without disturbing the ubuntu installation. Please help.
I am a bit skeptical how boot repair will work. Since my hard disks are different will it be OK if I use the windows installer to format the ssd and install windows in it or is it better to use GParted to create a NTFS partition and install windows in it. will the boot repair replace the windows MBR or will it install GRUB in the partition where ubuntu is installed. These are the few questions which I have. I really don't want to reinstall ubuntu again.

It might not be what you want, but you could avoid using GRUB altogether by installing EasyBCD on Windows and adding Ubuntu to Windows Boot Manager.

Take a look here :

Is it possible to boot Ubuntu using the Windows bootloader?


How to make a desktop shortcuts on Ubuntu 20.04? Let's add some fresh knowledge to the forum now Ubuntu 20.04 is out =). My question today is simple; what is the most elegant way to create desktop shortcuts (e.g. to folders, applications or documents) in Ubuntu 20.04?

For Application Shortcuts:
I think TheBuntuNewb's answer is pretty good.
Do that using file manager:

Open /usr/share/applications
Copy the application shortcut to desktop
Right click on the shortcut on the desktop and select Allow Launching

For Folder/File shortcuts:
Either directly use the terminal to create a symbolic link
ln -s <complete path to dir> <shortcut save location>

or

Open the folder in the file manager (nautilus), navigate to the directory to which you want to create a shortcut to.

Right click and select Open in Terminal.

For shortcut to current directory, type and execute
ln -s $PWD ~/Desktop/

For shortcut to a file/folder inside the current directory, type and execute
ln -s $PWD/filename ~/Desktop/

or
ln -s $PWD/dirname ~/Desktop/

To keep working with GUI one have to enable symbolic link creation in Nautilus by visiting its settings: Settings → Behavior → [x] Show action to create symbolic links and then user will be able to create symbolic links for executables, folders and files on the ~/Desktop.

But the most elegant way for average non-techinal user who is scared by the terminal - would be to not use GNOME Shell and install Unity or MATE DE instead with one of the two solutions below:

sudo apt-get install ubuntu-unity-desktop
sudo apt-get install ubuntu-mate-desktop^

then select one of these sessions on the login screen and as the result to forget this new GNOME Shell nightmare (the Desktop without DESKTOP is a pain, but not the real desktop).

More technical users who prefer traditional desktop with traditional habbits have to remove GNOME Shell completely and install other DE of their preference. I have a solution for such method which was tested on Ubuntu 20.04 LTS freshly installed VM.


Ubuntu 14.04 and Windows 8.1 dual boot, boot menu not appearing after windows "refresh". Looking for help in getting dual boot capability back I can't get a boot menu to appear. Can anyone help me to restore it, or tell me how to be able to choose which OS to boot into at startup?

I ran Windows 8.1 and Ubuntu together no problem for the better part of a year.

I have an Acer Aspire ES1-512-C1W0 running windows 8.1 and Ubuntu 14.04 trusty. In a moment of craziness I ran Windows "Refresh" (no backup:(). That worked ok, but the boot menu that used to appear is gone. I can boot into the live USB no problem. I have read many posts and tried the following.

Disabled fast and safe boot.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

(tried several times thinking I had it wrong the first time)

The boot repair link is http://paste.ubuntu.com/25762750/

[2

I don't know much about Linux, just learning, so I would appreciate if you could be specific with any advice.

Per the suggestion of duplicate

The first reference in that answer was suggested below and caused an error.

The second comment essentially does the same just further into the process.

Neither Easyuefi nor EasyBCD saw my Ubuntu partition.
They are talking about selecting the Linux partition and moving it "up" in the boot order. I can't see that partition anywhere but on gparted, and so can't move it "up".

There is a long chain of comments and solutions here I haven't tried them all yet.

Message from EasyBCD

  EasyBCD has detected that your machine is currently booting in EFI mode. Due to limitations set by Microsoft, many of EasyBCD's multi-booting features cannot be used in EFI mode and have been disabled. Linux doesn't show up and the tab it has the options greyed out.

I got it to dual boot again. The last action I took was listed in the answer below in the "Windows 8 removes Grub as default boot manager" Link

The key command seems to eventually have been:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

After that I rebooted and presto the boot menu was back.

In the interim I tried a bunch of things listed on various pages, none of which seemed to do anything. I did try EasyUEFI again and was able to move the boot order of windows to the bottom. None of the partitions listed were names linux or similar, and there seemed to be no effect from this, for what it's worth.

I consider this closed from my end. I am not sure if I am supposed to take any action to indicate that other than checking the answer below which I did.

In theory, the following command, typed from an Ubuntu emergency disk booted in EFI mode, should fix the problem:

sudo efibootmgr -c -d /dev/sda -p 2 -l \\EFI\\ubuntu\\shimx64.efi -L ubuntu

That said, it looks like Boot Repair has tried this and failed. This puts you in a "messed up system" scenario. Most likely your NVRAM settings are corrupt and are confusing the EFI. Resetting everything to the default might help. If not, there are a number of other workarounds, which are described in various existing questions and answers here, such as:

efibootmanager -o changes are lost on reboot
Windows 8 removes Grub as default boot manager
How can I repair grub? (How to get Ubuntu back after installing Windows?)

After Windows update messed up dual-boot on a PC, I found the easiest fix was to reinstall Ubuntu.

Image the whole disk, ensuring that you have access to each partition (particularly the ext[n] one with Ubuntu). Windows utilities such as Macrium Reflect Free, as well as Linux dd and clonezilla do creditable jobs.
Using the Ubuntu Live media, install Ubuntu... you may need to mark the ext[n] and swap partitions as unused free space, first.
When satisfied that the new, minimal, installation dula-boots correctly with Windows, restore the ext[n] partition with your previous Ubuntu setup saved in step 1.

While this seems a bit drastic, I found it only took about 1/2 hour, far less time than it takes for a Windows installation.


Windows 10 as guest not activated inside virtualbox with Ubuntu 18.04 as host I have a laptop with Windows 10 came pre-installed. I formatted my hd and disabled secure boot. Then installed Ubuntu 18.04
I then installed virtualbox with Windows 10 as guest. I went to setting and found that Windows 10 is not activated.
I also deleted secure keys info in bios accidentally.

Would my above steps rend me losing Windows 10 license? I need to use Visual Studio Code now. This could be a huge problem. Thanks.

It depends whether you activated a license with you Microsoft account. When yes, then simply login to Windows using your account. If you are trying to transfer OEM license to Virtualbox, then you are going the wrong way. For activating inside Virtualbox you will need a retail license. There are plenty of websites where you can get a license for a reasonable price. The question is whether you need it right now, because a standard installation of Windows 10 allows a trial period of 90 days...

You can use the license key of the machine, since it came preinstalled with Windows 10. To get the key use the following command:
sudo strings /sys/firmware/acpi/tables/MSDM

The license key will be the last line of the output.


google-chrome-stable keeps asking if it should be set to default Since the Ubuntu 15.10 upgrade, google-chrome-stable keeps asking if it should be set as default browser, even though it already is. I tried to reinstall it, but that didn't help. Any ideas?

For the working fix, see the end of this answer.

INITIAL ANSWER Oct 28th 2015 (outdated fix)

To avoid being asked if you want to use Chrome as the default browser, use the following workaround (proposed here and suggested in the comment section of this question by Yurii Kolesnykov):

Open the file ~/.config/google-chrome/Default/Preferences with a text editor.

Find the line

"check_default_browser": true,

and replace it with

"check_default_browser": false,

In my case, the file was >200k characters, for which reason gedit crashed a few times. If it is the same in your case, you probably want to use a terminal-based editor like vi.

Please note that this is a workaround, the problem itself has to be fixed by the Chrome developers.

UPDATE Nov 24th 2015

As Danilo Piazzalunga mentioned, the bug is confirmed. As NicDumZ suggested, please vote up this bug by clicking on

to raise attention. Thanks!

UPDATE Feb 20th 2016

As reported first by Ron Thompson and 3vi1 in the comment section; and finally confirmed by myself (using Ubuntu 15.10), this workaround doesn't seem to work anymore, at least not for everyone, after reinstalling google-chrome. Everybody who used this workaround should try to avoid reinstalling chrome.

I again encourage you to say that you are affected by the bug on launchpad (currently 302 people).

UPDATE April 5th 2016 (Working fix!)

A fix has been proposed on launchpad that apparently did the job for a couple of people:

To apply the fix, change line #198 in the file /usr/bin/xdg-settings from

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`"

to

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//' | head -n 1`"

UPDATE July 25th 2016 (Working fix!)

Update to the proposed fix for (K)Ubuntu 16.04:

To apply the fix, change lines #177 and #202 in the file /usr/bin/xdg-settings from

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word"

to

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word | head -n 1`"

Then go to Google Chrome settings and set Chrome as default browser.

UPDATE Jun 1st 2017

The Bug has been closed and marked as "Fix Released" as of today. Quoting the user Olivier Tilloy (osomon):

  If I read the report correctly, the issue was fixed in xdg-utils in xenial. Wily has been EOL for almost a year, so I am closing the bug.

  no longer affects: chromium-browser
  no longer affects: google-chrome-beta (Ubuntu)
  no longer affects: google-chrome (Ubuntu)
  Changed in chromium-browser (Ubuntu):
  assignee:  Chad Miller (cmiller) → nobody
  status:    In Progress → Invalid
  Changed in xdg-utils (Ubuntu):
  assignee:  Chad Miller (cmiller) → nobody
  status:    Confirmed → Fix Released

I was having the same problem with 15.10.  Each time I rebooted and started chrome it complained it was not the default browser even though settings details Default Applications shows it default for web.  I noticed that firefox was default for photos, so set that to image viewer.  After a total of one reboots chrome is no longer complaining.  I should try a few more times before I claim this solved my problem but wanted to share the initial result if anyone is in the mode of trying things themselves.


How do I play m3u8 files? I would really like to play m3u8 files (more specifically, http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8) but when I try to run it on VLC player, it goes on to multiple .ts files with a very annoying gap between the stream.

Is there any way I can play this stream on ubuntu just as if I were playing it on an iphone (which is what the stream is for).

m3u8 files are m3u files encoded in utf8.
m3u files are a text based playlist format. You can open the file with any text editor and see the that it contains a list with files to be played.
if you open the file with vlc, it has to download every single video before playing it. Vlc does not seem to preload the files, this is why the gaps occur.

Open your mousepad or text editor & copy this code

enter code here <EMBED SRC="http://liveips.nasa.gov.edgesuite.net/msfc/Wifi.m3u8" HEIGHT="500" WIDTH="800">

save it as nasa.html

Run it on firefox and you will be asked to

install the plugin
install run again

and you've got your .m3u8 movie on your file

maybe you need to install gnome mplayer to make it work

it worked for me.


13.04 wont start, "cant identify screen, graphics card etc..." error Trying to start 13.04 after a recent installation.

A window appears that says "Cannot correctly detect the screen, graphics card, and input device settings" You will need to set these yourself.  Standby as display restarts"  Then there is only a terminal window, which says "* Checking battery state    ...  [ok]"  and it just hangs there and does nothing and does not respond to any input"

any suggestions?

thanks,
stephen

So I reinstalled 13.04 after struggling with modifying the boot commands which didn't seem to accomplish much.  I gave a larger disk space allocation, it started fine.

thank you all for your help

thanks
stephen

Install the system again or it is better to have 12.04. I think it supports more hardware stuff.
Check this link

https://help.ubuntu.com/13.04/installation-guide/index.html

Maybe you will find an answer


What are some good ASCII art generators? I have tried figlet but it's not much good. Are there any other ASCII editors?

jp2a

Another good program available in the repositories is jp2a, and there is some good documentation on it at the official site and on the Ubuntu manpage.

It should be said that the program will convert any jpg, but it is best to use simple, logo or cartoon like pictures as they come out much better. If you need to convert your image to jpg beforehand, just use imagemagick's convert utility and run convert logo.png logo.jpg.

There is often a need to fiddle with the jp2a options to specify the characters used, the size of the ascii, or to invert the representation. Once you get the settings right you can get good results, however, as I display in the screenshot below. The results do, however, depend a lot on the image you have chosen to convert to ascii.

As an example, I have used the following command to do an ascii representation of the Ubuntu logo, which displays on the terminal screen and also saves to file: (This assumes the input ubuntu-logo.jpg is in your present working directory)

jp2a -i --chars="..00xx@@" ubuntu-logo.jpg | tee ubuntu-logo.txt

Here is a good ascii art generator: http://asciiart.club

                                     y#▓▓▓▓▓▄
                                    #▓▓▓▓▓▓▓▓▓
                      ¿╓╔###║###M╔  ▓▓▓▓▓▓▓▓▓▓
                    ╙║║║║║║║║║║║║║░ └▓▓▓▓▓▓▓▓┘
               ╔╠░    ║║║║║║║║║║║║║N, └╙╩╩╙└
             ╔╠╠╠╠╠,   ╚║║║║║║║║║║║║║║M╔╓╓╓#N,
           ╓╠╠╠╠╠╠╠╠∩   ╙╙      └╙╙║║║║║║║║║║║N
          #╠╠╠╠╠╠╠╠╠╚                ╙║║║║║║║║║║
         ╔╠╠╠╠╠╠╠╠╚                    ╙║║║║║║║║║
  .╓╔╔╓,  ╙╠╠╠╠╠╠╚                      ╙║║║║║║║║Γ
.║║║║║║║║,  ╠╠╠╠╠                        ║║║║║║║║║
║║║║║║║║║║  ╠╠╠╠░
╚║║║║║║║║╠  ╠╠╠╠░                        ╓»»»»»»»»
 ╙╚║║║║╚╙  #╠╠╠╠╠∩                       ▓▓▓▓▓▓▓▓▒
         ╔╠╠╠╠╠╠╠╠,                    \▓▓▓▓▓▓▓▓▓
         `╠╠╠╠╠╠╠╠╠∩                  #▓▓▓▓▓▓▓▓▓Ñ
           ╠╠╠╠╠╠╠╠╠╠              ╓@▓▓▓▓▓▓▓▓▓▓╜
            ╙╠╠╠╠╠╠╚   ┌▓▓₧MmmM₧▓▓▓▓▓▓▓▓▓▓▓▓▓▓
              ╙╠╠╠∩   ╓▓▓▓▓▓▓▓▓▓▓▓▓▓▀░      └
                `    #▓▓▓▓▓▓▓▓▓▓▓▓▓  ╓∩╠╠╠╠∩╔
                    "▀▓▓▓▓▓▓▓▓▓▓▓▓  #╠╠╠╠╠╠╠╠░
                          └└└└└└    ╠╠╠╠╠╠╠╠╠╠
                                     ╚╠╠╠╠╠╠╠
                                       └╙╙╙

It can generate in full color from a variety of character sets, from oldskool/amiga to ascii or extended (even braille!), and generates output in HTML, BBCode, Markdown, and even share an image on Imgur with one click.

Try it! -=cP


alias vs. function in bash scripts I want to know the difference between aliases and functions in the bash shell - and when to use which one.

It seems obvious that since functions can take arguments, they are a lot more powerful - since I work mainly on the road with a netbook and want to save energy and processing power, I would especially like to know a little more about what the performance differences of this two ways to extend bash functionality are.

Think of aliases as nicknames.  You might have a command that you perform a lot but want to shorten.

As an example, you often want to go straight to desktop in commandline, so you can do this

alias desktop="cd ~/Desktop"

From then on you just type

desktop

in terminal and it will perform the cd ~/Desktop for you.

Functions contains logic.  In a function, you might make calls to several different programs.  Here's a simple echo function

function e {
                echo $1
                echo $1 $1
                echo $1 $1 $1
           }

While it may appear similar to an alias when you call it

e Hello

Your e() can have a lot of different things happen.  The above is a simplistic example.

Aliases should be reserved for simple use cases.  Personal example - I have replaced my rm command like this

alias rm='trash-put'

Whenever I do an rm, it will send it to trash instead of deleting it from disk.  This caters to my clumsiness in the terminal where I may (sometimes) accidentally delete an important file.

Functions, you need to remember, are pieces of logic.  You wouldn't use a function standalone, usually.  It would be part of a larger script.  Imagine a script which takes all of your files and renames them to their pig latin versions.  Ignore that there are different ways of doing it.

But what you could do is loop through every file in the directory and pass the filepath to your RenameAsPigLatin function.  The RenameAsPigLatin function might have extra logic in there involving numbers, where you decide that files ending with numbers shouldn't be renamed.

Immediately you can see the benefit of having it as a function.  The function can focus on the renaming by your strange rules while the rest of the script can traverse various directories as necessary.

As an addition to what’s already been said functions also pipe better than aliases where using an alias your locked into what’s defined by the alias (unless quoted). I have several stand-alone aliases that I call within  task specific piped commands that would be much harder to call if they were aliases. Also functions allow you to set variables either globally or locally for the task at hand.


Copy to USB memory stick really slow? When I copy files to the USB device, it takes much longer than in windows (same usb device, same port) it's faster than USB 1.0 speeds (1MB/s) but much slower than USB 2.0 speeds (12MB/s). To copy 1.8GB takes me over 10 minutes (it should be < 3 min.) I have two identical SanDisk Cruzer 8GB sticks, and I have the same problem with both. I have a super talent 32GB USB SSD in the neighboring port and it works at expected speeds.

The problem I seem to see in the GUI is that the progress bar goes to 90% almost instantly, completes to 100% a little slower and then hangs there for 10 minutes. Interrupting the copy at this point seems to result in corruption at the tail end of the file. If I wait for it to complete the copy is successful.

Any ideas? dmesg output below:

[64059.432309] usb 2-1.2: new high-speed USB device number 5 using ehci_hcd
[64059.526419] scsi8 : usb-storage 2-1.2:1.0
[64060.529071] scsi 8:0:0:0: Direct-Access     SanDisk  Cruzer           1.14 PQ: 0 ANSI: 2
[64060.530834] sd 8:0:0:0: Attached scsi generic sg4 type 0
[64060.531925] sd 8:0:0:0: [sdd] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[64060.533419] sd 8:0:0:0: [sdd] Write Protect is off
[64060.533428] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00
[64060.534319] sd 8:0:0:0: [sdd] No Caching mode page present
[64060.534327] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[64060.537988] sd 8:0:0:0: [sdd] No Caching mode page present
[64060.537995] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[64060.541290]  sdd: sdd1
[64060.544617] sd 8:0:0:0: [sdd] No Caching mode page present
[64060.544619] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[64060.544621] sd 8:0:0:0: [sdd] Attached SCSI removable disk

Why is copying to my USB drive so slow in Linux (and faster in Windows)?

Reason 1. File caching can make writes appear slower or faster

  The problem I seem to see in the GUI is that the progress bar goes to 90% almost instantly, completes to 100% a little slower and then hangs there for 10 minutes.

One thing you need to understand is file caching. Linux (and Windows) will use otherwise "empty" RAM to cache read/write operations and make them faster on subsequent accesses. Caching copy operations to slow devices results in the behavior you see -- the "fast completion" is actually writing to the cache, and then it slows and stops because the actual flushing of the data in the cache (sync) to the slow device is taking very long. If you abort at that point, the data is corrupted (as you noted) since the sync never finished.

Such copying in Windows may seem faster (including the reported MB/sec speeds) because sometimes Windows will not wait for the sync, and declare the job completed as soon as the data is written to cache.

Reason 2. Writing lots of files, especially small ones, is slow

  To copy 1.8GB

Because of the way flash memory and filesystems work, the fastest throughput (speed) is achieved when writing very large files. Writing lots of small files, or even mixed data containing a number of small files can slow the process down a lot. This affects hard drives too, but to a somewhat lesser extent.

Reason 3. Write speeds of a USB stick and an SSD cannot be compared

  I have a super talent 32GB USB SSD in the neighboring port and it works at expected speeds.

A garden variety USB stick usually consists of flash memory chips that are written to serially (sequentially), and does not have any cache of its own.
An SSD, on the other hand, contains a controller which writes to the flash memory chips parallel, increasing the throughput by a factor of 2 or more over the USB stick.

If your 32GB SSD had 4x 8GB chips, it would still be 4x faster than the USB stick at any write operation.
The SSD also contains RAM cache (like hard disks), so it can quickly store incoming data in the cache and tell the OS that it's done, while it still has to actually write that data to the flash memory.

So, with one large file, your 32GB GB with the 4x structure we assumed, would be 4x as fast; with many small files, it would be 10x or more faster because it could intelligently store them in its cache.

To sum up, these are the reasons why file copying to USB sticks may appear slower in Linux. Is it actually slower because of a hardware/driver issue or whatever....

Doing a proper comparison of write speeds between Linux and Windows

First of all, forget about the SSD because of reason 3. It's like oranges and apples.
To negate the effects of reason 1 (caching) and reason 2 (small files), you need to test with a single large file, larger than the amount of RAM on the test system.
In Linux you can create it with dd if=/dev/urandom of=largetest bs=1M count=7500, which gives you a 7500 MB test file. Assuming your system has less than 4GB or so of RAM, it's good enough. Copy that to a freshly formatted Sandisk 8GB stick, and time it.
Reboot in Windows, and copy largetest from the USB stick to your hard disk. Reboot again (to remove it from the cache). Then format the USB stick (same vfat/FAT32!), and copy largetest from the hard disk to the stick.
How do the times compare?

Okay, I had the same problem for three days and how I managed to backup my 1TB hard drive was by using rsync, I  know that it is used for backing up but it got the job done, even when transferring large files I use it to do that job. If you would like to use it with a GUI I suggest installing Grsync which is a graphical version of rsync since rsync runs on the terminal.

Hope this helped


How can I install Ubuntu without CD and USB? I want to install Ubuntu on my laptop that doesn't have a CD-ROM drive and I have no spare USB disk. I've tried Wubi, but that doesn't seem to work (since it prompts me to have the CD in the drive, which I don't have).

How can I install Ubuntu, easily and in a fast way?

P.s: I want to dual boot it with Windows 7 (which was preinstalled).

Edit:

When extracting the ISO to a folder and running Wubi it does install, but when I reboot the computer, it doesn't show GRUB, nor can I choose if I want to boot Ubuntu or Windows 7.
After trying for the third time today, wubi gives me an error: Permission denied

I'm the administrator on the PC.

For BIOS devices:

To install Ubuntu without CD/DVD or USB pendrive, follow these steps:

Download Unetbootin from here.
Run Unetbootin.
Now, from the drop-down menu under Type: select Hard Disk.

Next select the Diskimage. Browse to the directory where you downloaded the iso file of Ubuntu.

Press OK.
Next when you reboot, you will get a menu like this:

Select Unetbootin and you will get the "Try" or "Install" option there.
Finally, you can install your version of Ubuntu alongside Windows.

For UEFI devices:

First, download rEFInd.
Then, extract it.
Now, follow the below steps to install rEFInd[source], so that, you have a boot menu to boot to Ubuntu Live environment. Summary of the installation process given in the source is as belows:

Open cmd with Administrator privileges.
Then,

mountvol S: /S

(you may change S: to any available drive letter)

Type cd in cmd and then drag and drop the extracted folder to the already open cmd window. E.g.,

cd "C:\Program Files"

Copy refind

xcopy /E refind S:\EFI\refind\

In this step S: will be the drive letter that you used above.

Change directory to rEFInd

cd S:\EFI\refind

Rename config file

rename refind.conf-sample refind.conf

Note that {bootmgr} is entered as such; that's not a notation for a variable. Also, change refind_x64.efi to refind_ia32.efi on systems with 32-bit EFIs. Such computers are rare, and most of them are tablets. Check your Windows bit depth to determine which binary you should use.

bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi

Download EaseUS Partition Master Free and run it.
Select your last partition.

Right-click on it and from the context menu select Resize/Move partition.

From the size shown beside Partition Size minus 4096 MB (to mimic a 4GB pendrive).

Press tab and the rest will be auto-completed.

Select the newly created partition and right-click on it. Select Create Partition from context menu.

In this window, select FAT32 as the File System. Click on OK. Finally, click on Apply (present at the top-left of the window).

Next, extract Ubuntu iso to this partition and finally reboot.
You will be presented with a rEFInd menu. From here select the Ubuntu partition. It will boot into a Live environment. Continue with the installation. After the installation finishes boot to Windows.
Run EaseUS Partition Master Free again.
Right-click on the 4 GB partition and from the context menu select Delete Partition.

Right-click on the partition above the Unallocated partition and select Resize/Move Partition from the context menu.

Extend the bar to the extreme right by dragging the button.

Click on OK. Finally, click on Apply (present at the top-left of the window).

Open cmd with Administrator privileges.
Then,

mountvol S: /S

(you may change S: to any available drive letter)

Remove rEFInd

rmdir "S:\EFI\refind" /S /Q

In this step S: will be the drive letter that you used above.

Reinstall grub as your primary boot manager

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

You can try using EasyBCD to add the ISO to the Windows Boot Manager. In some cases it may not work, but give it a try.


Could not open lock file /var/lib/dpkg/lock E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not open lock file /var/lib/dpkg/lock - open (21: Is a directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Your error says that /var/lib/dpkg/lock is a directory. It's supposed to either be a regular file or not exist at all. See if sudo rmdir /var/lib/dpkg/lock works. (If it fails because there's stuff in it, move the stuff somewhere else then delete the directory.)


How do I add an application to the dash? I just installed Oneiric Ocelot, and I can't figure out how to add an application, which is stored in my home directory, to the dash. I can create a launcher, but I want it in the dash also.

There are 2 ways to go about this

No new software method

For 11.10 and newer:

To create a simple custom .desktop you will need to add these entries to a .desktop file of your choice in ~/.local/share/applications/

nano ~/.local/share/applications/your_application_name.desktop

[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

For extra options for your .desktop file you can visit this site. All the options available are very well described there.

You can also copy a existing application's .desktop file from /usr/share/applications/to your ~/.local/share/applications/ and edit it to fit your needs.

ie: this will copy gedit .desktop file to the folder where the .desktop files should be saved for a user

cd ~/.local/share/applications
sudo cp /usr/share/applications/gedit.desktop .

After that open that location using nautilus ~/.local/share/applications/ and drag n drop the file you have just created to the Unity launcher.

Has an option instead of drag n dropping the file you can open dconf-editor (install it with sudo apt-get install dconf-tools or look for it in the USC) and navigate to desktop.unity.launcher and edit the key favorites by double clicking on the entries to the right of the key.

To add your custom launcher add it at the position you want with this format '/home//.local/share/applications/.desktop'. Don't forget to respect the , and the spaces in that line and make sure that the line starts and ends with [ and ]respectively.

With this method you will need to log off and back in for the change in favorites to take effect. This will make it appear in the dash

Using New software

Using gnome-desktop-item-edit

For this you need gnome-tweak-tool or gnome-shell installed

Use ALT+F2 and type

gnome-desktop-item-edit --create-new ~/Desktop

This will open the dialog Create Launcher

You can put this .desktop file in /home/<username>/.local/share/applications/ to make it appear in the dash

Using alacarte

For this method, you need alacarte installed.Do it by

sudo apt-get install alacarte

And use ALT+F2 and type in alacarte

You will get this dialog:

Select the category you want and click "New Item"

You will get this dialog

Click OK . It will appear in the dash

  NOTE for Ubuntu 13.04 and above:
  After performing the above steps, nothing will happen and it will seem like nothing is added to the dash

  To resolve this, go to ~/.local/share/applications and you should be able to see a file named alacarte-made.desktop.

  Right Click on this file and check the box which allows it excecute permissions.

  After closing the properties dialog, your entry will now appear in the dash.

Sources:

Bruno Pereira's answer

Binarylife's answer

Kikixx's answer

James' comment

Usually when you install you the icon will be automatically added. But if it is not, then do the following:

Open the Unity dashboard.
Type main menu in the search bar. (In Germany you need to type "Hauptmenu")
Open it and select the best category your app fits (if you want create one).
Select insert item.
Type name, command (a terminal command or path to the executable) and comment.
Add the item.
Launch the item from the Unity dash board.


Can't login to Ubuntu anymore Ubuntu no longer lets me login.  I type my password into the login screen and hit enter and the screen goes black then brings me directly back to the login screen.  It gives me no messages either.  I know for a fact I am typing the correct password.  Anybody know whats going on?  My home folder is also encrypted and I am running 11.10

Thanks

(Comment from OP fixed issue)

Sounds to me like X (the graphical server) is crashing at some point and it's just reloading (that's why you're being pushed back to the login screen). If you have a network connection please run sudo apt-get install pastebinit, then pastebinit /var/log/Xorg.0.log and then post the URL it generates back here so we can see what X did last time it loaded. – Oli♦ Oct 20 '11 at 1:0

Ok i seem to have solved the problem. I was unable to access my home directory when I was using the console so i changed the permissions of it to 777. When i restarted my computer i was able to login. Very weird. – matthew Oct 20 '11 at 1:12

Same prob with .Xauthority owned by root.

Fixed by removing it.

Possibly caused by starting vncserver as root.


How do I correctly install r8169 Network driver? My network driver drops out within a short time of logging on. The situation is explained more readily in the following forums thread which has not been replied to as yet.

http://ubuntuforums.org/showthread.php?t=1937956
As I am not very computer literate, I would appreciate guidance about correctly installing the driver or alternatively point me in the right direction to assist me in providing a solution.

I have looked at a number of posts in launchpad however these tend to confuse me. I hope that somebody is able to help me - thank you

The problem is more likely that you need to install a different driver. My system defaults to using r8169 and I can never get stable connections with it (except on newer kernel versions than Ubuntu is using).

If your Ethernet chip set is  RTL8111/8168B, I recommend that you download and install driver r8168. The version you need to find is 8.028 or greater.

After you expand the driver into its own directory, cd into that directory and run "sudo ./autorun.sh". After that script completes, your ethernet connection should start, and it should also be stable.

You will have to reinstall the driver every time you upgrade to a newer Linux kernel. At least until Linux gets to the level where r8169 starts working.

Until I am forced to obtain another solution I will rely on the "Windows" solution I have obtained which has worked satisfactorily now for a number of weeks - Thanks to all for help.


Daily Ubuntu base update I am getting Ubuntu base update almost every day. This seems strange to me. What am I missing?

(I am using Ubuntu 14.04 LTS)

Ubuntu base is a group for the tools and services and core parts of Ubuntu and the following applies equally to any software installed.

It's normal to have Ubuntu base updates more often. In Linux, security flaws are found much easier when they exist due to the code being open. Then the patch is immediately put upstream and onto your computer through the package update.

Whereas in a closed source system, often such flaws aren't found until exploitation. Its just a matter of when the security flaw is found, not the existence itself.

If it gets annoying you could change Security Updates in your update setting to how long you want. After that time it would show you if a new update has come.


Mouse cursor flickering and disappearing I installed Ubuntu today and since the first start up I have a problem with the mouse cursor.

It starts randomly disappearing and flickering a lot.

I have searched for a solution on Google and here but didn't find anything.

I had the same problem. You can fix it manually.
Open System Settings > Displays.
In the Displays window, you will see an Unknown monitor.
Click it and disable it.

I ran, from within 16.04, the command:

  sudo apt-get upgrade

and it seems to have appeased the pointer, so far.
I had instability, especially over the Chrome browser tabs.


installation of wine i was trying to install wine on ubuntu 14.04. I used the command sudo apt-get install wine. A complete process was worked out. Around 140 MB data was downloaded from the internet but suddenly it was interrupted. after then when tried to run the same command again it gave me the following message:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

please suggest remedy to the problem. I am new to ubuntu community.
Thanks

The error message tells you what happened " dpkg was interrupted" meaning it stopped in the middle of installing something. Can you tell use how that happened ? did something crash ? did you stop it ?

And also how to correct the problem "you must manually run 'sudo dpkg --configure -a' to correct the problem,"

So, open a terminal and run

sudo dpkg --configure -a

post any problems that you get when your run that command ;)

If you get no errors, it is fixed.


Make terminal use pageup/pagedown instead of shift-pageup/shift-pagedown? I've grown quite weary of shift-pgup to page up in gnome terminal, the command line, terminator, and guake, etc.

Any way to easily make these apps use the straight page-up and page-down keys for paging around?

I am afraid this is not possible, as no PgUp/PgDown will be sent to command-line applications, which will render some of them unusable. This is good ol' days Unix feature.

If you want more user-friendly scrolling, I suggest using the less command. It's used this way:

command-with-lot-of-output | less

This will start the less command with output of your original command. (More about piping output to other programs can be found here: http://www.dsj.net/compedge/shellbasics1.html)

Less can be navigated using arrows or PgUp/PgDown. For your convenience, it also provides searching and more (see man less for more).
You can quit less by just hitting the q key.

You can use the more command like this:

command-with-lots-of-output  |  more

this will start your command original output with more.

more can be navigated with 'space'. Just press the space and see the output of the command as  pages.


Desktop shortcut for terminal command I was wondering how to make a clickable terminal shortcut for my desktop using the command easytether connect.

I don't want to have to open/close the terminal every time I wish to connect to the Internet through my phone.

I've tried updating my gnome-panel but I can only make a new directory on my desktop.

Right click the desktop and create an empty file (or use gedit) named easytether.desktop. Paste this into this file:
[Desktop Entry]
Name=Easytether
Exec=easytether connect
Terminal=true
Type=Application

and save! You will then need to make the file executable, by editing the properties of the file, or running: chmod +x easytether.desktop.

The Name=Easytether line specifies the name of the shortcut that will appear to the user.

The Exec=easytether connect line specifies the command to be run, in this case, easytether connect.

The Terminal=true line specifies that the command should be run in GNOME Terminal, so that the user can inspect its output. You can later set this to false if you don't want the shortcut to open a Terminal window. For instance, if you made a shortcut to the "sound" panel of the "settings" and want it to only open that (the command would be "gnome-control-center sound").

You can even add a line Icon=path/to/png/ (or Icon=iconname and put your iconname.png in ~.local/share/icons) in order to add a custom icon to your launcher.

Also, you can put the easytether.desktop file into ~/.local/share/applications and start it from Dash or other app-launcher (Synapse, Kickoff, Slingshot etc).

Click on "Search your computer and ressources" on the left toolbar (launcher). In the bottom, click applications. In "Installed", search the Terminal you want to use, open it.

The application appear on the left toolbar, right click and select "lock to Launcher".


Why doesn't chmod work on a file under /media? I want to execute a script file from terminal but it shows error

root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ./android
-bash: ./android: Permission denied`

so I saw the file permissions from terminal & tried to give execute permission. but no use even I give permission it won't change.

root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ll android
-rw-r--r-- 1 silambarasan silambarasan 3498 Dec  6 08:14 android
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# chmod 777 android
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ll android
-rw-r--r-- 1 silambarasan silambarasan 3498 Dec  6 08:14 android`

I don't know what to do.

Thank you.

Easiest would be to copy the executable to your home folder and start it from there.

But…

It seems your executable is mounted on an external partition. Make sure the partition is not mounted with noexec. Try:

grep '/media/D-DEVELOPME' /etc/mtab | grep noexec

If you see a line containing the word "noexec", try re-mounting the partition without the noexec flag:

mount -o remount,exec /media/D-DEVELOPME

Also make sure your media actually allows you to change the permissions, e.g. you cannot do that on a mounted CD or an SD crad with the read-only switch on.

Instead of chmod 777 file, you may use chmod u+x file. Where u means user and x means execution permissons. See man chmod pages for more information. I know that 777 gives all permisson for read, write execute for user, group and others, try using the syntax with u+x.


Grub background messed after installing a new Graphics card I had a nVidia Geforce 6200 128mb AGP Vga card before and ubuntu was working fine and I had customized my Grub boot menu background, Today I installed a new graphics card which is  same as above but it is 256MB, now the graphics of the grub menu is lowered (low resolution and color depth), what should I do to fix it?

Determine Resolution to Use

First determine the video resolution you are able to use. Go to the grub menu and enter c to get a "grub" prompt. Then enter:

set pager=more
vbeinfo

and copy down the resolution you want to use. I suggest that you use the preferred mode listed at the end,
if any.

You could also use xrandr to find your current mode. xrandr lists all modes and highlights the one in use.

will list your resolutions and highlight the one you are using.

Alter Grub Configuration

In the video Cako found yooyoomine suggests the following steps:

gksu gedit /etc/default/grub

Look for the line containing # GRUB_GFXMODE=800x600

Edit the line, removing the initial "#" so it is no longer a comment, and change the resolution to the one you picked above. Save the file when done.

Now enter:

gksu gedit /etc/grub.d/00_header

search for the following fragment (about half way down the file):

    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
  set gfxmode=${GRUB_GFXMODE}

----->

  load_video
  insmod gfxterm
EOF

Where the line is enter the line:

set gfxpayload=keep

and save this file.

Then run:

sudo update-grub

Then boot and test. If this disallows the normal use of grub you will have to either boot without seeing the menu, or use an Ubuntu Live CD, to unmake the changes.

This cause is for the bad nvidia driver.I had the same problem before saw this video:
Video


Why is k9copy no longer in use? Trying to install this under 13.10, but see it hasn't been updated since 12.10 - is it no longer worth using? If it is, how do I install manually on 13.10?

The author no longer believes in linux
http://k9copy.sourceforge.net/web/index.php/en/nouveautes/12-theend

At least there is one PPA to install K9Copy in recent (K)Ubuntu versions, although I haven't tried it:

https://launchpad.net/~cwbennech-gmail/+archive/ppa

https://launchpad.net/ubuntu/+source/k9copy


Does 32-bit PAE with more than 4GB RAM improve speed? I would like to buy a Thinkpad T420 with 8GB RAM configuration and install specifically 32-bit Ubuntu Desktop with PAE as I heard that 64-bit version has some issues such as providing support for applications based on Flash. Theoretically more RAM gives better speed, but practically there could be some issues such as consuming more power etc. Therefore, I am not sure whether I can get improved speed if I use Ubuntu 32-bit PAE with 8GB RAM instead of 32-bit PAE with 4GB RAM or not, specifically for watching streamed movies, playing videos, video encoding etc. Therefore, I am in dilemma whether to buy T420 with upgarded 8GB RAM or not?

PAE with 8GB RAM may be faster than a machine with 4GB RAM, by avoiding paging.  PAE with 8GB RAM will also probably be slower than a 64-bit kernel with 8GB RAM, due to PAE overhead.  Just how much faster or slower depends on what you use the machine for.

Flash works reliably on 64-bit Ubuntu, so it's no longer a reason to install a 32-bit OS. 32-bit binaries will just run on 64-bit Ubuntu without you needing to do anything special.  So the short story is, today, if you have 4GB or more of memory, you should just install a 64-bit kernel.

Phoronix did some benchmarks showing a substantial disadvantage to PAE on some tasks.

More RAM uses more power, and gives more opportunities for something to fail.  The main benefit is that with more RAM, your machine needs to do less physical disk IO, but this is only a benefit up to the point that all the data it touches fits in memory.  So, there is no point installing more memory than will actually be useful to fit your typical working set.

  specifically for watching streamed movies, playing videos, video encoding etc

The first two don't need a lot of memory; only enough to make sure your browser and video player are not paging.  The second is mostly cpu-bound, not ram-bound.

So, either 4GB or 8GB memory would be fine.  If you expect to do development or other more memory-intensive tasks later, get 8GB.  Either way, install a 64-bit kernel.

The AMD deck "Myths and facts about 64-bit Linux" from 2008 makes these points:

64-bit mode allows more registers, wider registers, and new instructions, so both applications and the kernel can be more efficient, even ignoring the issue of memory use
64-bit mode is often faster even on machines with under 3GB RAM
32-bit apps run very well on 64-bit kernels

Since 2008 most applications will be primarily developed in and tuned for 64-bit mode.

PAE is useful when you have 4GB RAM or more. In case if you have no problem with specific software you may have, try a 64-bit OS.

Good luck.


Can't install Ubuntu on Asus a42f I am really going crazy here , I tried many times to install Ubuntu 12.4 on my Asus from a usb(don't have a working cd drive) and every time the installation process goes perfectly smooth until it asks me to reboot to finish the installation process and then keaboom
I reboot nothing is there but a black dos screen talking about errors and asking me to put my win7 (which I loathe more than anything in this life)

so what did I do wrong , does Asus a42f doesn't accept 32bit version which I am trying to install ?

or I have to install Ubuntu along with win7 ? although there is a choice to install Ub and get rid of win7 ?

I really need some serious help to install it step by step please
Thank u very much for your time ?

Can your computer run from a USB? If yes, then press Delete or Esc or F12 then look for the part that say boot from device or something like that and then press F10 to save that settings then it should boot from the USB, if your computer can boot from USB.

clearly no one else on the internet has a Asus K42F I've been trying to solve this problem myself just now, I've spent 35min trying to get it to work. mostly reading peoples attempts at helping people with this. this is all i can find. every one says f2,f8,f12,f10 none of it helps and this is why

its Press DEL to enter Bios for this particular laptop (only half the people suggest DEL) the first screen that's ment to show some form of instructions like f12=bios is just an Asus logo the rest is blank, no one seems to get this bit, the start up screen is useless.

once you get into bios it doesn't get any easier. the 3rd tab is Boot configuration. i assume you will find the same thing i do, only a single hard drive as a boot option.

all you have to do is change the boot order in there, don't worry about inventing the usb boot option, i tried that, its done just as well if you go in and just change the order in priorities. its actually much simpler than i first thought it was, yet still more of a pain than every other computer I've used in the last 20 years.

the K42F is just special but not in a good way.


Can't upgrade to 18.04 from 17.10 I cannot update to 18.04 from 17.10 installation. Neither

sudo do-release-upgrade -d

or (I am using Wayland)

xhost +
sudo xhost si:localuser:root
sudo update-manager -cd

worked for me. I got

Checking for a new Ubuntu release
Upgrades to the development release are only
available from the latest supported release.

in the first case and this in the second. What else could I do?

From Software & Updates program open Updates tab
then from option Notify me of a new Ubuntu version select For any new
version

Then enter in terminal:

sudo do-release-upgrade

do-release-upgrade works for the first minor version after LTS release, thus:

July 26th

Ubuntu Ubuntu 18.04.1

has to be available.

BB Release Schedule


ERROR: "Failed to save. Insufficient permissions." When trying to save changes in VS Code I am using VS Code (1.30.02) and Ubuntu 18.04.  When I try to save any changes in VS Code, I get this error:

  Failed to save 'SomeFileName.js': Insufficient permissions. Select
  'Retry as Sudo' to retry as superuser.

I have the same issue if I try to create a new file:

  Permission denied writing to file
  (file:///path/to/new/file/newfile.js)

I am making these changes or trying to create new files in my own directory.  I am new to Ubuntu, so I apologize if this is a stupid question, but I am not sure what I am doing wrong.  What is the issue?

It looks like you somehow changed file ownerships in your home directory.

One way to correct this without endangering your system is

sudo chown -c -R $USER:$USER $HOME

Explanation:

chown: change the ownership of files/directories
-c: report all changes
-R: do this recursively (for all files/directories beneath the given one)
$USER:$USER: change the owner and the group that owns the the entry to the user that issues the command (sudo preserves the values)
$HOME: do this with your home directory

You can test those environment variables with the following commands

echo $USER
sudo echo $USER
echo $HOME
sudo echo $HOME

Navigate to the parent folder of the file in your terminal and enter the following code:

sudo chmod -R 777 filename


How to read "service --status-all" results I need to identify the currently running services but I can't figure out the results of running service --status-all, I mean what does ?, - and + mean ?

$ service --status-all
 [ + ]  acpid
 [ + ]  anacron
 [ + ]  apparmor
 [ ? ]  apport
 [ ? ]  atieventsd
 [ + ]  avahi-daemon
 [ ? ]  binfmt-support
 [ + ]  bluetooth
 [ - ]  brltty
 [ + ]  console-font
 [ + ]  console-setup
 [ + ]  cron
 [ + ]  cups
 [ + ]  cups-browsed
 [ - ]  dbus
 [ ? ]  dns-clean
 [ + ]  friendly-recovery
 [ - ]  grub-common
 [ ? ]  irqbalance
 [ - ]  kerneloops
 [ ? ]  killprocs
 [ + ]  kmod
 [ ? ]  lightdm
 [ - ]  lm-sensors
 [ ? ]  mysql
 [ ? ]  networking
 [ ? ]  ondemand
 [ ? ]  pppd-dns
 [ - ]  procps
 [ - ]  pulseaudio
 [ ? ]  rc.local
 [ + ]  resolvconf
 [ + ]  rfkill-restore
 [ + ]  rfkill-store
 [ - ]  rsync
 [ + ]  rsyslog
 [ + ]  saned
 [ ? ]  sendsigs
 [ + ]  setvtrgb
 [ ? ]  speech-dispatcher
 [ - ]  sudo
 [ + ]  timidity
 [ + ]  udev
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ - ]  unattended-upgrades
 [ - ]  urandom
 [ + ]  virtualbox
 [ - ]  x11-common

And would running this command with sudo make any difference ? I tried it and in my case it didn't make any difference, but may it differ in other setups ?

The output of service --status-all lists the state of services controlled by System V.

The + indicates the service is running, - indicates a stopped service. You can see this by running service SERVICENAME status for a + and - service.

Some services are managed by Upstart. You can check the status of all Upstart services with sudo initctl list. Any service managed by Upstart will also show in the list provided by service --status-all but will be marked with a ?.

Reference: man service

I find that running with/without sudo makes a difference.

Some services in /var/run/ have read access only to root user. Those services show status [-] without sudo, and [+] with sudo.


No output plugins when installing cmus from source I am running Ubuntu 14.04 and I am trying to install the latest version of cmus (2.7.1) from the source code by running ./configure, make, and make install in the cmus-2.7.1 folder.
However, when I do so, it seems that it is not installing output plugins. Running cmus after install returns the error cmus: Error: couldn't open directory '/usr/local/lib/cmus/op': No such file or directory.
Running the command cmus --plugins returns

Input Plugins: /usr/local/lib/cmus/ip
wav:
Priority: 50
File Types: wav
MIME Types:
Output Plugins: /usr/local/lib/cmus/op

I also had 2 quick questions regarding installing from source and cmus:

Do I have to keep the cmus-2.7.1 folder forever for when I want to uninstall cmus using the make uninstall command. Or is there another way for me to uninstall a program installed from source without keeping that folder stored somewhere on my computer?

This is a long shot, but is there a way for the terminal to show a different icon (custom made or whatever) in the application switcher (alt-tab) when it is running cmus? That way it would be easier to find cmus in this switcher when multiple terminals are open.

Thanks in advance!

If you are installing cmus from source,you also need to install all the dependencies.

Look through this!

Dev packages needed to be installed for libraries used for input and output plugins.
Most are not installed on a default Ubuntu 14.04 install.
Found the list of library on an ArchLinux page (https://www.archlinux.org/packages/community/x86_64/cmus/)

These libraries include:

libcue

ncurses

alsa-lib (optional) - for ALSA output plugin support

faad2 (optional) - for AAC input plugin support

ffmpeg (optional) - for ffmpeg input plugin support

flac (optional) - for flac input plugin support

libao (optional) - for AO output plugin support

libcdio-paranoia (optional) - for cdio support

libmad (optional) - for mp3 input plugin support

libmodplug (optional) - for modplug input plugin support

libmp4v2 (optional) - for mp4 input plugin support

libmpcdec (optional) - for musepack input plugin support

libpulse (optional) - for PulseAudio output plugin support

libvorbis (optional) - for vorbis input plugin support

opusfile (optional) - for opus input plugin support

wavpack (optional) - for wavpack input plugin support

faad2 (make)

ffmpeg (make)

flac (make)

libao (make)

libcdio-paranoia (make)

libmad (make)

libmodplug (make)

libmp4v2 (make)

libmpcdec (make)

libpulse (make)

libvorbis (make)

opusfile (make)

wavpack (make)

https://github.com/cmus/cmus/issues/197


How to restart kwin when it is hung? kwin occasionally hangs, which looks like the system not responding to mouse clicks or key presses - although the mouse pointer still moves when you move the mouse!

As described in the official Kwin documentation, a good way to go would be to try this either on a running terminal application or on a virtual console (i.e.: Ctrl+Alt+F1), :

DISPLAY=:0 kwin --replace

Just do:

killall plasma-desktop
plasma-desktop &

you could have it all in a bash script in case you need it more times,

recoverkde.sh:

killall plasma-desktop
plasma-desktop &


Browsing the internet from the command line How can I browse the Internet from the command line in Ubuntu?

There are actually a bunch of text-mode web-browsers, these are my top three :)

ELinks (install):

Keyboard Shortcuts

Open new tab - t
Goto URL - g
Go back - Left
Go forward - u
Exit - q
Toggle images - *
Toggle link numbering - .
Toggle document colours - %
Next tab - >
Previous tab - <
Close tab - c
Open in new tab in background - T

Automatic URL rewrites

d - dictionary search
dmoz - dmoz search
g - google search
wiki - wikipedia search

(source)

Lynx  (install):

Lynx User-Guide

w3m (install):

w3m Manual

Wikipedia has a List of more text-based web-browsers, not all of which are available in Ubuntu.

You can use the browser lynx. It is available in the Ubuntu repositories:

sudo apt-get install lynx

Here is further information: http://en.wikipedia.org/wiki/Lynx_(web_browser)


Computer not hibernating despite free swap I am on Acer 5742G. Here are some specs

  Processor : Intel Core i5-460M Mobile Processor (3MB Intel Smart Cache, 2.53GHz)

  Chipset : Mobile Intel HM55 Express

  Memory : Up to 3GB DDR3 SDRAM

  Storage : Up to 500GB SATA hard drive, 5400RPM

  Video : NVIDIA GeForce 420M graphics

I have 3.3GB of Swap partition and 2.3GB of ram. But whenever I try to hibernate it says "not enough free swap".

Here is the output of free command

               total       used       free     shared    buffers     cached

 Mem:          2319       1304

 1014          0        453        544

 -/+ buffers/cache:        306       2012

 Swap:         3344          0     3344

So you see there is lots of free swap space. Then why is it not hibernating?

Weirdly enough I found that Wubi hibernates just fine, it's just not called "hibernate" in the settings, it's variously called "Sleep" or "Suspend to RAM".

When I go to Settings > System Settings > Advanced > Power Management > Edit Profiles and edit the currently selected power profile (in my case "Powersave"), on the line that says: "When the system is idle for more than"... when I select "suspend to disk" (which matches my definition of hibernation) I get the exact problem you've described above.  I also tried increasing swap to something huge and it still didn't work.

But here's the odd thing: I just changed that setting to "suspend to RAM", and now it in fact hibernates just fine, in other words the screen goes blank and the hard disk stops spinning, and the light on my computer blinks, so that only the power button will wake it up again.  Regardless of what it's called, that matches my definition of hibernation.

Similarly, if I go to the shutdown menu and choose "hibernate", I again get the free swap space problem described above, but if I choose "sleep" then it goes into a state that perfectly matches my definition of hibernation.

So short answer: just use "sleep" or "suspend to RAM" and pretend it's called "hibernate".  You won't know the difference.


couldn't install npm on ubuntu Tried to install nodejs and npm on ubuntu 12.04. I googled and did it. Now, I could not install npm on machine.

sudo apt-get install npm

Which gives me this

The following packages have unmet dependencies:
 npm : Depends: nodejs but it is not going to be installed
       Depends: nodejs-dev
       Depends: node-request but it is not going to be installed
       Depends: node-mkdirp but it is not going to be installed
       Depends: node-minimatch but it is not going to be installed
       Depends: node-semver but it is not going to be installed
       Depends: node-ini but it is not going to be installed
       Depends: node-graceful-fs but it is not going to be installed
       Depends: node-abbrev but it is not going to be installed
       Depends: node-nopt but it is not going to be installed
       Depends: node-fstream but it is not going to be installed
       Depends: node-rimraf but it is not going to be installed
       Depends: node-tar but it is not going to be installed
       Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This looks like you probably installed the chris-lea node.js ppa which is fine. However, you don't install npm from that ppa as it breaks the way debian packages work. Instead, just install nodejs. Once that's installed, run npm -v you should see it's now installed. If you didn't use the chris-lea ppa update your question on what webpage you Googled to find out how to install nodejs on Ubuntu.

Installing nodejs will install npm, so just remove nodejs then reinstall it:

sudo apt-get remove nodejs


Can I specify a port for certain IP address in SSH's config? A ssh server on 192.168.1.45 listens on port 2222.  I know I can just add -p2222 or add an alias in ~/.bash_aliases, but is there a way to force a certain port when I ssh a specified IP?

Sure, you can put these settings in ~/.ssh/config.

Host 192.168.1.45
Port 2222

You can take this opportunity to give the machine a nickname, and set other options, in particular the remote user name. For example, the following declaration makes ssh foo equivalent to ssh -p 2222 matt@192.168.1.45 (Host foo means that the following options apply when you run ssh foo, and the HostName directive makes foo a nickname for 192.168.1.45 with all the other options):

Host foo
HostName 192.168.1.45
Port 2222
User matt

For any ec2 instance IP, automatically picks useranme and key file.

Host *.*.*.*
     IdentityFile ~/.ssh/key.pem
     Port 22
     CheckHostIP no
     PasswordAuthentication no
     User ec2-user
     UserKnownHostsFile /dev/null
     StrictHostKeyChecking no


What's apt-get's equivalent option of this dpkg command? dpkg -L <package>

This command gives me a list of all the installed files, what's apt-get's equivalent option for it? I read the man page but couldn't figure out.

Like Dennis said, apt-get is a layer on top of dpkg (or other local package managers such as rpm). dpkg manages the local packages on the machine, while apt-get provides a way to grab packages from distant repositories and resolve dependencies between packages that will be handed to dpkg.

dpkg -L <package_file>

lists the files provided by a package already installed on the machine.

With apt-get, you might want to list the files that a package provides, even if it is not installed in your system. Fortunately for you, there is a tool for that, called apt-file, which needs to be installed in addition to apt-get. You can use it this way:

# Install apt-file
$ sudo apt-get install apt-file
# update apt-file's cache (different than apt-get's, namely apt-cache)
$ sudo apt-file update
# display the contents of a package
$ sudo apt-file list <package_name>

Note that apt-file uses special files on the package repository called Contents files. While all official repositories have these files, some third-party repositories might not have them, so apt-file won't be able to list the contents of packages on these repositories.

man apt-file

will also list other nice things you can do with apt-file, such as apt-file search <keyword> which lets you find which packages provide a given file.

It doesn't exist. You can use the GUI synaptic which will show you all the installed packages.

Shown below.


Rename all ".pdf" files to "_0.pdf" I want to copy all files *.pdf to *_0.pdf

How can I do it?

A simple way would be to use the mmv command:

mmv '*.pdf' '#1_0.pdf'

You might need to install it first (available in the Universe repository):

sudo apt-get install mmv

Simple solution files on same directory

On sh shell, rename will help you:

rename .pdf _0.pdf *.pdf

Execute the comand on directory with the pdf files.

Files inside directory recursive

If you have the files inside directories and want to find all of then and replace:

find . -iname "*.pdf" | fgrep -v _0.pdf | xargs -n1 echo rename .pdf _0.pdf


Installing vmware tools on Ubuntu host? I am running Ubuntu 14.04 64 bit, and using vmware player to run Windows 7 32 bit as guest with vmware tools installed.

I can't get the shared clipboard to run!

I found that I must also install vmware tools on the host (Ubuntu). How can I install vmware tools on Ubuntu 14.04 ?

I tried to download the deb package from vmware website but I didn't find a version for 14.04. When I browsed older versions of Ubuntu I found about thirty .deb packages. I don't know which I must download.

Any ideas?

download the VM workstation

http://www.vmware.com/products/workstation/

chmod +x VMware-Workstation-Full-10.0.1-1379776.i386.bundle
sh VMware-Workstation-Full-10.0.1-1379776.i386.bundle

the continue the installation


extract multiple files with password I have about 200 files that i zipped long time a go in win. they are zipped with different extensions (zip, 7zip, rar,...) but the password to extract them is the same.

How do I extract all the files by inputting the password only once?

The method to extract 1 file would be:

unzip -P password file

This is used to mark several files with different extensions: *.{zip,7zip,rar}

So I would start with ...

unzip -P password *.{zip,7zip,rar}

Mind though that this could error out on any of the files not being correct (damaged) or with the wrong password. Also: this is -insecure-: the password is typed in plain sight and someone checking the process list is also capable of seeing it. If that is a concern you should leave the "password" part and type it when asked.

No idea if it will ask for it every time though so you need to confirm this ;)

Check this link out:
http://www.cyberciti.biz/faq/linux-unix-shell-unzipping-many-zip-files/

Basically you can use this code :

unzip '*.zip'


Windows USB is not recognized I know it might be weird, but I'm trying to boot a Windows version on dual boot in Linux for gaming. I followed these steps:

Download a version of Windows;
Copy the files inside the *.iso to the mounted USB stick with cp command;
Restart the machine;
Change BIOS to recognize either USB CD/DVD or USB Hardrive as first boot in priority.

The system does not recognize the stick. I suspect it might be due to permissions issues.

Thank you in advance.

It is complicated to create a live Windows system (live: will boot from USB and run the operating system). And it is off-topic here at AskUbuntu anyway.
If you want a Windows installer (that can install Windows into an internal drive), you can use WoeUSB according to the following link. It is possible to create the installer with an NTFS file system, when there is a file exceeding the size limit of FAT32.
WoeUSB Error Code 256 with NTFS formatted USB
In Ubuntu 20.04.x LTS there are problems with WoeUSB, but you can use mkusb (mkusb-dus or mkusb-plug).
https://help.ubuntu.com/community/mkusb

It's easiest to use a live USB creation tool to do this, such as WoeUSB. This automatically handles making the drive bootable To install WoeUSB:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install woeusb

You can then run WoeUSB and you'll need to select your source .ISO (in your case the Windows  installation disk image) as well as the target USB drive that you want to make bootable.

IIRC WoeUSB can only create bootable USB drives with the FAT32 file system, for the latest builds of Windows 10 (version 1903 +) install.wim is often larger than 4GB (i.e. larger than FAT32 supports) so WoeUSB will fail for these newest versions of Windows (try an older Windows 10 version (like 1809 or 1803), then run the upgrade to 1903 after you've installed Windows).