Why doesn't Ubuntu 12.04 recognize my Windows 7 partition? After some problems trying to install Ubuntu alongside Windows 7, now I have Windows 7 installed and it works just fine. But when I am going to install Ubuntu it doesn't recognize my windows.

What should I do to see Ubuntu in my PC? My Ubuntu version is 12.04 64 bit.

PC specs:

Asus crosshair IV formula
AMD phenom II x6 1055t @ 4.1GHz
Corsiar 4x2Gb 1766 @ 9-9-9-24
AMD Radeon 7870 GHz edition
WD 1TB caviar black

The usual cause of the "missing partitions" problem is one of two things:

A damaged partition table -- On an MBR disk, my FixParts program can usually fix such problems. See the FixParts page for details on how to use it. It's usually just a matter of launching the program on the disk, typing p to verify that it's detected your partitions correctly, and then typing w to save the fixes.
Leftover motherboard-based software RAID data -- This can usually be fixed by typing sudo dmraid -E -r /dev/sda, IIRC, changing the device filename as necessary. You may also need to go into your firmware setup to disable RAID. Of course, if you're actually using RAID you should not do this!

You say: "when I am going to install Ubuntu it doesn't recognize my windows". This suggests to me that your problem is similar to the one described, for example, in this question:
Dual boot ubuntu 12.10 and windows 8 Dell Inspiron 15 r

If so, the answers to that question may be helpful.


Keyboard layout identical to "US Extended" on Macbook Pro I am running Ubuntu 13.04 on a Dell machine and I want to have the exact same keyboard layout as I have on my other machine, which is a Macbook Pro with an International English keyboard. On the Mac I have the keyboard set to US Extended.

On Ubuntu I have the layout set to English (Macintosh) which gives me this layout:

However what I really want is an exact copy of the US Extended on my Mac, which looks like this:

And with the following modifiers with the alt key pressed:

The layouts are similar but there are small differences, in particular producing the character ˙ modifier on Mac is Alt-w, while under Ubuntu it's Alt-h.
I've tried all the English layouts on Ubuntu but none match this exactly.
Any suggestions? I'm not adverse to writing a layout config myself, if that's what it takes, but a few pointers would be welcome!

The best thing for you is to learn the keyboards of each world ... because by using a pc keyboard on a mac or a mac keyboard on a pc you'll restrict yourself on the real use of the machine.

After a simple search those links answer to your question, you'll just have to apply it to your needs :

How to configure a keyboard on Ubuntu (simple way but may not fit your specific needs) :
http://rabbitmoondot.blogspot.fr/2012/01/how-to-configure-ubuntus-keyboard-to.html
https://help.ubuntu.com/community/AppleKeyboard

and the hard one (but the one that I think will answer to your need) :
http://michal.kosmulski.org/computing/articles/custom-keyboard-layouts-xkb.html
https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions

Best regards.

John!

It looks like you'll need an edition of Kino's AltLatin ASDF Transliteration keyboard layout, which is based on Apple's United States Extended layout—albeit optimized primarily for input of Semitic language transliteration.  It was originally made by Kino, in association with the Middle East Documentation Center (Mamluk Studies Resources) at the University Of Chicago (whom also publishes their U-Chicago Press Style Manual)—but made for your Ubuntu system.

I'm currently working on building version 1.3 of the Windows AltLatin layout—which'll introduce some more deadkeys (for slashed, barred, and for hoi-marked Vietnamese letters; as well as for miscellaneous characters), and add support for Vietnamese and for Ancient Egyptian hieroglyphic transliteration.

You may contact me via e-mail:  [RWhlk142@gmail.com].  Thank You!

Robert Lloyd Wheelock
INTERNATIONAL SYMBOLISM RESEARCH INSTITUTE
Augusta / Harmony, ME  U.S.A.


I want to change from 64 bit Ubuntu 12.10 to 32 bit I had installed Ubuntu 12.10 amd64 Desktop on my laptop, but I realized my laptop's hardware is not meant for 64 bit Ubuntu. (I also have Windows 7 installed in another partion)

Is there any way to convert to a 32 bit Ubuntu?

EDIT:
I have a single core processor ( I don't even think its a 64 bit one)

I've figured it out.

First I had to uninstall Ubuntu and restoring to Windows 7: http://www.youtube.com/watch?v=LSYGkSptSy4

Then after deleting the partion where Ubuntu was installed I inserted my Ubuntu 12.10 i386 disc and installed it on the same old partion.


How to boot from an old 3.5'' internal hard drive connected via an USB adapter? The Windows XP of my father's old PC was utterly broken (no wonder), so I removed his 160 GB internal SATA-drive from his PC, took it at home, connected it via a universal USB connector for all kinds of old hard drives, and installed Xubuntu 14.04 onto it.

To install, I used my Dell Laptop Latitude 6400, also running Xubuntu (which does not matter in this problem), and the Xubuntu installation ISO burnt on a freshly formatted USB stick.

Everything worked fine, the installer even came to the very last point where it said "remove USB stick now and reboot" (or something similar).

But I just cannot get my Dell Laptop to boot from this (now) external hard drive, still connected via the USB adapter. I have googled now for more than 5 hours and followed all kinds of hints, but none of them works.

The only thing I can imagine that I have done wrong was when it came to the question "where do you want to install the master boot record on?"

During installation, my laptop had 3 drives available:

/dev/sda - internal HD of Dell laptop
/dev/sdb - USB stick with Xubuntu installation ISO on it
/dev/sdc - father's previously internal hard drive connected via USB

I chose /dev/sdc.

I have tried each and every boot sequence in the BIOS - nothing works. I have also tried boot tools such as the Universal Boot CD (ubcd). Now, as I have removed the USB stick, the external drive is recognized as /dev/sdb. When I explicitly boot from it, I either get a blank screen, or it just boots from /dev/sda (my laptop hard drive), or I get "Gave up waiting for root device" "/dev/disk/by-uuid/xxx does not exist".

What the hell do I have to do?

And if some day this problem is solved, can I just insert the drive back into my father's PC and will it boot from it?

I admit that I might not have completely understood what a MBR is. And then, there is GRUB. Or is it not?

Here comes my 19th nervous breakdown... (Rolling Stones)

This is related to the firmware of your laptop or the controller in external enclosure. I for example know that my T530 is unable to detect my USB 3.0 HDD enclosures and thumb drives and let me boot from them after powering on the laptop, but with a warm reboot everything works. Another example is an external dock that doesn't play nice, partitioning some drives in it is different than connecting the same drive internally. From that experience, I'd say try another computer and another enclosure or install on the target machine. This should save you time spent chasing firmware bugs.

I can't quite tell what you did from your description, but the easy way(s) to make a bootable USB stick are:

mkusb
startup disk creator

both are GUI apps. You can't just write the ISO to the stick like a DVD.


How do I change the computer name? When I connect to my server (ubuntu server 10.10), I get this:

name@server-name.belkin ~>

How can I remove ".belkin"?

You need to edit the computer name in two files:

/etc/hostname

and

/etc/hosts

These will both need administrative access, so run

gksu gedit /path/to/file

Replace any instances of the existing computer name with your new one. When complete run

sudo service hostname start

The name will also be changed if you restart your computer.

See also:

How do I change the hostname without a restart?

Open a terminal and

sudo sed -i '1s/.*/desired-name/g' /etc/hostname

# you need restart to effect with...

sudo shutdown -r 0


Do pastes made on Ubuntu Pastebin Service get deleted? I had used Ubuntu's Pastebin Service to give the output of terminal commands as follow-up for the following question I had asked:

Problem resolving many of the Web Pages

However, now I am not able to access any of the pastes I had made. There are atleast 5 pastebin links if I am counting correctly. All the links complain as:

  The Paste you are looking for does not currently exist.

See the image for yourself:

So, is there any condition that the pastes would be deleted:

after x number of days, or
if it doesn't get atleast x number of views every y days, or
something similar.

Is it possible to recover them in any manner?

It took 8 years for Pastebin.com to surpass 10 million "Active" pastes (not spam or expired pastes).1 Less than a year later the owners of Pastebin.com tweeted that they had already surpassed the 20 million active pastes mark.Tech Crunch

The maximum size a paste can be is 512 kilobytes (0.5 megabytes). This should be enough for almost any script, and it prevents people from jamming our servers. PRO members are allowed to create pastes up to 10 megabytes.

As far as pastebin.ubuntu.com, from what I found out from my pastes that it's probably a six to nine month windows.  Because anything that I pasted that's less that nine months old, I can still find, but anything over a year I'm not able to find.

I hope that answers your question.

I found some information here → https://answers.launchpad.net/ubuntu/+source/pastebinit/+question/127981
that lead me to this screenshot of the first post on Ubuntu pastbin and it is still there... "Notice the Date"

My guess is a "bad" or "mistyped" link maybe...


How to run script at shutdown? How can I make a bash script run only at shutdown?  I have searched for it and keep coming up empty handed. I would be fine with either a link or an explanation to how to do it.

I believe you add script to /etc/rc6.d/

You might want to read /etc/init.d/README


Ubuntu 13.10 - VirtualBox Win7 x86? or Win7 x64? I have installed Ubuntu 13.10 in my Sony Vaio and got rid of Win8 :P

Now at work; I need to use some software in windows; so I guess the best idea is to install a VirtualBox - Win7 machine.

My question is: Should I install Win x86?? x64??

Which one will run faster and consume fewer resources??

In my experience it's about the same performance wise, but according to various microsoft documents I've seen the 64bit version apparently consumes more ram for the system cache. I don't have cite handy.


GCC -std=gnu99 error I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename>

Instead of getting an output file, I get this.

/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status

Compiling with -std=c11 works perfectly fine, but not with -std=gnu99.

Bascially this means that you don't have 32 bits support on your system, just 64 bits.

With main.c

/*  extern void start();                                                     */

int main()
{
/*  start();                                                                 */
}

and

gcc -m32 main.c -o main

I got on an ubuntu 18.04 with just gcc installed:

> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status

after

su
# apt install multi-lib

Everything went nice, and I could run my do nothing program.

try:

find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null

modify your gcc command to read

gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o


Wifi not working Ubuntu 14.04, no wifi detected My wifi is not working or detected in the nm-tool.

here is the necessary information
http://pastebin.com/Utt3iMg4

The answer to the question Lenovo Z50-70 realtek dirver RTL7823BE wi-fi does not connect… works perfectly nice for lenovo z50-70. in ubuntu 14.04

update kernel is essential I guess.


command to span window across multiple monitors Trying to create a shortcut to take the active window and display it across two displays.  Using the following only maximizes it on a single monitor:

wmctrl -r :ACTIVE: -e 0,0,0,1800,2300

Dual Monitors in Unity:

Hold your move-window modifier (it is alt by default) and drag the window from within the window's chrome (body) as opposed to the title bar (using your mouse).

Right click on the DF taskbar and select Settings.

Click on the Functions tab on the left.

Scroll down and you will see Span Window Across all Monitors and the keyboard shortcut for it.

After you have spanned a window you can revert back by using the same shortcut.

You can change the shortcut if you want by double clicking on it.


GRUB command line appears on boot after deleting Ubuntu partition from Windows 10 I dual booted Win 10 and Ubuntu, then I deleted my Ubuntu partition. But every time I start my PC I see

GNU GRUB version 2.02~beta2-36ubuntu3.2
Minimal BASH-like line editing is supported.
For the first word, TAB lists possible command completions.
Anywhere else TAB lists possible device or file completions".

I can run windows by exiting from there and choosing windows boot loader.

How can I stop this screen from appearing and delete GRUB?

You can use EasyUEFI http://easyuefi.com to delete the Ubuntu option from boot menu http://www.easyuefi.com/faq/en_US/Delete-UEFI-Boot-Entries.html

This will remove the Ubuntu boot option. To remove the grub files follow these instructions:

http://www.easyuefi.com/faq/en_US/Rebuild-EFI-System-Partition.html

Try Using windows bootable DVD

In rescue mode reach the command prompt
type fixmbr (device-name) e.g.\Device\HardDisk0 or just execute fixmbr without any argument or
you can do  bootrec /fixboot and bootrec /fixmbr

you'll get windows boot back


Getting error while running sudo commands, from /etc/sudo.conf file I want to run commands in terminal with sudo and get in this error for running sudo commands:
sudo su

sudo: error in /etc/sudo.conf, line 16 while loading plugin "sudoers_audit"
sudo: unable to find symbol "sudoers_audit" in /usr/lib/sudo/sudoers.so
sudo: fatal error, unable to load plugins

when I check /etc/sudo.conf file, it has these plugins :
Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so
Plugin sudoers_audit sudoers.so

and by checking ldd dependencies for /usr/lib/sudo/sudoers.so all of dependencies are exist.
linux-vdso.so.1 (0x0000007f84e17000)
libgtk3-nocsd.so.0 => /usr/lib/aarch64-linux-gnu/libgtk3-nocsd.so.0 (0x0000007f84d44000)
libaudit.so.1 => /lib/aarch64-linux-gnu/libaudit.so.1 (0x0000007f84d0d000)
libpam.so.0 => /lib/aarch64-linux-gnu/libpam.so.0 (0x0000007f84cf0000)
libsudo_util.so.0 => /usr/lib/sudo/libsudo_util.so.0 (0x0000007f84cce000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f84b75000)
/lib/ld-linux-aarch64.so.1 (0x0000007f84deb000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f84b60000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f84b34000)
libcap-ng.so.0 => /lib/aarch64-linux-gnu/libcap-ng.so.0 (0x0000007f84b1f000)

also, all libaudit.so.1 dependencies are exist:
linux-vdso.so.1 (0x0000007f85188000)
libgtk3-nocsd.so.0 => /usr/lib/aarch64-linux-gnu/libgtk3-nocsd.so.0 (0x0000007f850e0000)
libcap-ng.so.0 => /lib/aarch64-linux-gnu/libcap-ng.so.0 (0x0000007f850cb000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f84f72000)
/lib/ld-linux-aarch64.so.1 (0x0000007f8515c000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f84f5d000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f84f31000)

How could I resolve this problem?

This is a situation where you need to use a live system image, use the same installation media.you need root privileges to fix this which you cannot access because Ubuntu by default locks the root user.
boot into the live image since Root has no password in live session,
then you need to do few steps
when you open the terminal type 'su' to run session using root user
1- mkdir /mnt create a directory then mount your root partition mount /dev/sdaX /mnt
2- chroot /mnt change the current root, this will let you install stuff in the system not in the live session.
3- apt --reinstall install sudo reinstall sudo
4- passwd -i root you can try activating the root user by configuring a password for it, this way the root user will be activated when you login next time. (acitvated only for CLI not GUI so press ctrl+alt+f* to login)
5-to enable the root user in the GUI , add the AllowRoot=true line in the [security] directive in file /etc/gdm3/custom.conf file.
and Add the # to comment the following line
auth required pam_succeed_if.so user !=root quiet_success
in /etc/gdm3/custom.conf file.
5- then umount and restart, when you login you can use root user and password
Edit:
if not possible to boot with live image , try the suggested solution for this issue in here


All of my icons appear blank. How can I change them back? I installed the new 11.10 Oneiric Ocelot Ubuntu version, and I am very happy with it, but today I had a problem that I dont know how to solve.

The icons of the directories have changed, look at this:

As you can see, the icons have white papers, and not their original one.

All you have to do is to install the drivers for your graphic card. I had the same problem and now it is fixed.

I have a Nvidia GeForce GTX260 and I solved installing the reccomended video driver.


Setting Firefox hot keys to be like in Windows I have been using Firefox for years on Windows and I do a lot with keyboard. For example, Ctrl-Y shows the downloads. And now on Ubuntu all this is broken. I need an easy way to set Windows-Firefox keyboard shortcuts for Ubuntu-Firefox.

There is a KeyConfig extension. it seems to be the least painful way to assign shortcut keys.

See this page: Change Firefox Keyboard Shortcuts

Although it does not contain preconfigured bindings for Windows.

First of all the shortcuts for firefox in ubuntu an d windows are a lot different (*example for downloads in ubuntu the shortcut is ctrl+shift+y)
you should refer for documentation in ubuntu firefox help menu or use internet resources


Where are the Unity desktop wallpapers located? Please see the picture below. Where are the Unity desktop wallpapers located?

/usr/share/backgrounds

The default wallpapers are part of ubuntu-wallpapers-<codename> package (e.g. ubuntu-wallpapers-precise, ubuntu-wallpapers-trusty, etc.). Run dpkg -L ubuntu-wallpapers-$(lsb_release -cs) to get the list of wallpaper files.

In the "Appearance" window go to the drop menu above the thumbnails and pick pictures. You will then be able to pick a wallpaper that is not in the "backgrounds" but in the "pictures" folder which is in your home folder. Using the same start, you can also navigate out of the home folder and fish out a wallpaper stored in /usr/share/backgrounds. While the added wallpapers will not show in the "Appearance" window, they are there if you have copied them there (as the owner from terminal)


How can I reduce the file size of a scanned PDF file? I have a 72.9MB PDF file that I need to shrink into under 500KB.

The file was a JPEG image that I had scanned, and then converted to pdf.

Use the following ghostscript command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Summary of -dPDFSETTINGS:

-dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi)
-dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi)
-dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
-dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
-dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file

Reference: https://www.ghostscript.com/doc/current/VectorDevices.htm#PSPDF_IN:

Controls and features specific to PostScript and PDF input
-dPDFSETTINGS=configuration
Presets the "distiller parameters" to one of four predefined settings:

/screen selects low-resolution output similar to the Acrobat Distiller (up to version X) "Screen Optimized" setting.
/ebook selects medium-resolution output similar to the Acrobat Distiller (up to version X) "eBook" setting.
/printer selects output similar to the Acrobat Distiller "Print Optimized" (up to version X) setting.
/prepress selects output similar to Acrobat Distiller "Prepress Optimized" (up to version X) setting.
/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.

The exact settings for each of these, including their DPI values, are shown in the dozens of options in this table: https://www.ghostscript.com/doc/current/VectorDevices.htm#distillerparams.

I used below commands but it didnt compress my pdf file substantially. Some times some of the portion was blackened after compression.

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf $INPUTFILE
"ps2pdf -dPDFSETTINGS=/ebook %s %s" % (input_file_path, out_file_path)

After too much wandering over the web I just couldn't find the right compression library. I came across pdfcompressor.com. This is just awesome website. It compresses the pdf by 95% ( 15Mb of files). So I used selenium and Tor to automate the compression. Checkout my Github Repository.
[GITHUB] (https://github.com/gugli28/PdfCompressor)


Change keyboard layout in Wine? I've got some games running in Wine, but I can't figure out how to change the keyboard layout.  By default, I use the dvorak layout in Ubuntu, which isn't very friendly for most games.  I can change it back to QWERTY in Ubuntu, but when I fire up a game, it stays with my default dvorak.  How can I change to QWERTY inside my wine application?

In case someone has multiple keyboard layouts - this solution worked for me.

I have two keyboard layouts: English (us) and Ukrainian (uk). The first one was set as default in system settings. However, in Wine games the letter keys (q,w,e,r,t,y,etc.) didn't work at all.

Based on Alex's answer, I found the way to determine my current X keyboard layout settings:

setxkbmap -v

It showed me the following:

Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete+numpad(microsoft)
compat:     complete
symbols:    pc+ua+us:2+inet(evdev)+group(alt_shift_toggle)
geometry:   pc(pc101)

I noticed that the symbols line has ua (not us) on the first place. Assuming that Wine always uses the first specified layout, I just needed to change the layout precedence:

setxkbmap us,ua

And it worked. However, after reboot it was reset back to its default state. Thus, I have to do it each time after boot. I'll try to find a way to store those settings by default.

In the keyboard control panel, you can configure multiple keyboard layouts from the Layouts tab.  Click on Options... and expand the Key(s) to change layout section.  Pick the key combo you prefer and you should have an easy way to switch layouts.

If the Separate layout for each window checkbox is checked in the main keyboard control panel, then each window should remember which layout they are using separately rather than it being a global setting.


how to install nvidia drivers for Geforce 750M? (no bumblebee) Ubuntu 13.10, 64bit, Asus n550jv, Nvidia Geforce 750M

I wonder has anyone succeeded to install nvidia drivers in Ubuntu 13.10 64bit without bumblebee. And if yes - then what's the trick and exact steps to follow?

My steps are the following and it always leads to black screen with only cursor visible:

Ubuntu 13.10 fresh install and updates;
Download the latest nvidia driver for 750M (which at present moment is 331.49);
Go to terminal CTRL+ALT+F1;
Stop the lightdm service and execute the nvidia .run installer file;
Reboot

As a result I am always getting black screen after login .. only my cursor is visible and no idea what to do next!

Yes, i know how to install bumblebee and run with optirun, however I do not want to do that anymore and looking for pure nvidia solution without any third parties in the middle. Driver info says that it is for 750M then why isnt it running?

Please help, really desperate! Thank you!

It's hybrid graphics laptop. You can't install nvidia graphics driver directly. As i know NVIDIA doesn't work in VGA(low graphics mode or minimal graphics support) in hybrid system. You have to install bumblebee and configure bbswitch to always use the card(battery issue, no recommended).

Install bumblebee-gui to easily select application which you want to run with nvidia. To install bumblebee successfully in ubuntu 13.10 follow this thread.


Ubuntu 17.10 natural scrolling I have just updated from Ubuntu 17.04. Natural scrolling was not activated, so I turned it on in Settings -> Devices -> Mouse & Touch-pad.
But still not working... What can I do?

I followed advice from answers to the queston How to enable natural scrolling with mouse in 17.04?. In my case removing xserver-xorg-input-synaptics and restarting did the trick:

sudo apt remove xserver-xorg-input-synaptics

Add on /usr/share/X11/xorg.conf.d/40-libinput.conf file the next line:

Section "InputClass"
        Identifier "libinput touchpad catchall"
-->     Option "Tapping" "true"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

This line without the arrow:

-->  Option "Tapping" "true"

Next step should either reboot (did myself) or restart X server, it seems is working for me!!


Would dualbooting Windows mess up GRUB? I have Ubuntu 12.04 as my main OS, but have been thinking of doing some dualbooting, would making a partition specifically for Windows and installing it to that partition mess with GRUB? or Would it be fine?

1st option : get a CD including Boot-Repair
The easiest way to use Boot-Repair is to burn one of the following CDs and boot on it.

Boot-Repair-Disk is a CD starting Boot-Repair automatically. (English only).
Boot-Repair is also included in Ubuntu Secured Remix CDs (multi-languages).

Get boot-repair disk
Remarks:

You can also install the ISO on a live-USB.
Please note that this ISO is not an official Ubuntu image.

2nd option : install Boot-Repair in Ubuntu
Either add ppa:yannubuntu/boot-repair to your Software Sources via the Software Centre or, for speeds-sake, add it using a new Terminal session:
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

You can run this from terminal sudo boot-repair

Windows would mess up GRUB, after you install Windows just use a live CD and follow these instructions.


USB not detected with Ubuntu 16.04 This is what I got with

sudo fdisk -l
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 484214783 484212736 230.9G 83 Linux
/dev/sda2       484216830 488396799   4179970     2G  5 Extended
/dev/sda5       484216832 488396799   4179968     2G 82 Linux swap / Solaris

Disk /dev/sdb: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors Size Id Type
/dev/sdb1  *       32 31457279 31457248  15G  c W95 FAT32 (LBA)

and

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0 230.9G  0 part /
├─sda2   8:2    0     1K  0 part
└─sda5   8:5    0     2G  0 part [SWAP]
sdb      8:16   1    15G  0 disk
└─sdb1   8:17   1    15G  0 part
sr0     11:0    1  1024M  0 rom

I have tried to mount it but

sudo mount -t vfat /dev/sdb1 /media/milenko/flashdrive/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

With gparted,does not appear sdb

What should I try?

will it mount in windows? I had this once and the USB's disk format was bad. Only solution was to use gparted to completely reformat it (hopefully you won't have to).

Just a warning regards an attached USB device which appeared to be effectively useless: 'bad superblock', huge bad-block list, gparted identified it, but couldn't select it, smartmontools "read device identity failed", etc. In my case, a Seagate 3TB usb drive. I was just about to throw in the towel and try to do a hard-reformat, but decided instead to power-cycle everything, re-boot (but not re-mount the USB drive), and do a blkid to see if Ubu 16.04 could detect it. It did, I re-mounted it, and found the 2TB of archives I had been storing were still there, and apparently intact.

I'm assuming there is an intermittent hardware problem (due to periodic lengthy write-retries), and the drive is no longer reliable. However, still have a decent chance of recovering most of the archival data.

Update: Apropos 'smartmontools' & 'read device identity failed'...
https://bugzilla.redhat.com/show_bug.cgi?id=1334569

(The above link appears to provide work-arounds to the error conditions I encountered, specific to external USB3 Seagate Expansion Disk with USB IDs 0bc2:3312, using smartmontools.)


Ubuntu 16.04 KVM + QXL Guest - Can't change resolution Using Spice + QXL for a 16.04 guest running on a 16.04 KVM hypervisor. This was working normally until recently.

After the last reboot of the guest, resolution was set to 1024x768. When I try setting it back to 1680x1050 (or any resolution), the session freezes until the timeout reverts back to the previous resolution.

spice-vdagent and the xorg QXL driver are installed on the guest.

(edit: added additional info)

This allowed me to change the resolution, but is not persistent across reboots:

xrandr -s 1680x1050

I had this same issue, but I tried so many things that I am not sure what made the difference.  Going in reverse of what I did to get a working solution.

1) In the KVM host, I changed the Video from "QXL" --> "VGA" (worked after this)

2) Updated ~/.config/monitors.xml with:

<monitors version="1">
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>unknown</vendor>
      <product>unknown</product>
      <serial>unknown</serial>
      <width>1440</width>
      <height>900</height>
      <rate>59.990913391113281</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>???</vendor>
      <product>0x0000</product>
      <serial>0x00000000</serial>
      <width>1440</width>
      <height>900</height>
      <rate>60</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
</monitors>

3) Updated /etc/default/grub adding: "GRUB_GFXMODE=1440x900" and then running "sudo update-grub"

4) Using advice from this post ( Reinstall package and its installed dependencies) to reinstall Gnome:

sudo apt-cache depends gnome | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y

Hope this helps!

The problem is in a new HWE kernel in ubuntu 16.04 (4.13).

As a workaround you can use the kernel from LTS branch (4.4), it doesn't have this problem with resolution switch on QXL and spice, and seems to work good with another QEMU virtual hardware.

sudo apt-get install linux-generic-lts-xenial
sudo apt-get purge linux-image-4.13*


Why can't I install Phusion Passenger for nginx? I'm trying to install phusion passenger.

passenger-install-nginx-module

Eventually I got an error

Permission problems

This installer must be able to write to the following directory:

  /opt/nginx

But it can't do that, because you're running the installer as alex.
Please re-run this installer as root.

I tried to do to

sudo passenger-install-nginx-module

but it says

sudo: passenger-install-nginx-module: command not found

How do I solve it?

From Passenger installation with nginx fails in Stack Overflow:

  The correct way of running the Phusion Passenger installer for nginx,
  when using RVM, is to use rvmsudo as in:

rvmsudo passenger-install-nginx-module

  Credits go to this blog post.

open your terminal and type this to create a user as deploy .

sudo adduser deploy

then do Update and install required dependencies with this command

sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties

then we have to install Ruby

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure
make
sudo make install
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
sudo gem install bundler

Then now we are able to install Nginx with Passenger , with these commands

sudo gem install passenger
sudo passenger-install-nginx-module

Hope that helps .

  Source: http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/


How to find (and delete) duplicate files I have a largish music collection and there are some duplicates in there. Is there any way to find duplicate files. At a minimum by doing a hash and seeing if two files have the same hash.

Bonus points for also finding files with the same name apart from the extension - I think I have some songs with both mp3 and ogg format versions.

I'm happy using the command line if that is the easiest way.

I use fdupes for this. It is a commandline program which can be installed from the repositories with sudo apt install fdupes. You can call it like fdupes -r /dir/ect/ory and it will print out a list of dupes. fdupes has also a simple Homepage and a Wikipedia article, which lists some more programs.

dupeGuru has a dedicated mode for music. It is a cross-platform GUI program and, as of today (February 2021), it is in active development, although it is unclear which releases work on which systems. Check its documentation.


how can i install Boost 1.55 on Ubuntu 15.10? How can i install, from packages, Boost 1.55 on Ubuntu 15.10? For example, the repository (via Synaptic) only shows Boost 1.58 only, and Emulationstation (the version i have as tarball) uses Boost 1.55 as dependency - i have 1.58 installed, and terminal shows "emulationstation: error while loading shared libraries: libboost_system.so.1.55.0: cannot open shared object file: No such file or directory"

This can be really bad for your system.
The best thing to do is to clone the source code and compile it yourself.

(it doesn't look that hard: https://github.com/Aloshi/EmulationStation)

But if for some reason you really want to install an old version of libboost you can do it that way:
(I really don't recommend doing that unless you know what you're doing, you can damage your system)
Download from here the packages suitable for your OS:
http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.55/

Ror 64bit download libboost1.55-dev_1.55.0+dfsg-3ubuntu2_amd64.deb  For 32bit download libboost1.55-dev_1.55.0+dfsg-3ubuntu2_i386.deb
If you run something else download libboost1.55-doc_1.55.0+dfsg-3ubuntu2_all.deb

This will cover the bases for you:

sudo apt-get install libboost-all-dev

It works for me when I have a libboost_system.so.1.55.0 dependecy (or any libboost dependency) not meet on system.

Hope it helps!


mysql-workbench and Gnome keyring daemon problem when launching mysql-workbench I have the following warning:

[12:13:49] coil@coil:~$ sudo mysql-workbench &
[12:14:03] coil@coil:~$ ** Message: Gnome keyring daemon seems to not be available. Stored passwords will be lost once quit
[12:14:05] coil@coil:~$ Ready

Is there a way to fix this issue? Indeed, my passwords never get saved.

The bug has been fixed in MySQL Workbench 6.2.5 / 6.3.0 releases. http://bugs.mysql.com/bug.php?id=74771

A possible workaround was to add this code to the top of file /usr/bin/mysql-workbench

export GNOME_KEYRING_CONTROL=1

This fix work on my ubuntu 14.04 with MySQL Workbench community 6.2.4 from deb http://repo.mysql.com/apt/ubuntu/ trusty workbench-6.2

Ubuntu 20.04 LTS
I just:

Removed mysql-workbench.
Downloaded mysql-workbench deb package from the official mysql page.
Installed it with dpkg and it solved my problem.

I guess the problem was that I installed mysql-workbech with snap.


Remove First n Lines of a Large Text File I need to remove the first 42 lines of a 2GB SQL dump.

I know I can view the first lines using:

head -n 44 dump.sql

But is there anyway to edit or remove them?

If you want to just view the lines from the 43rd on you can use

tail -n +43 dump.sql

The + sign is important - without it, tail will print the last 43 lines instead. Alternatively with 'sed'

sed 1,42d dump.sql

If you want to really delete the first 42 lines from the original file then you can make sed make the change inplace with the -i option

sed -i 1,42d dump.sql

Sorry, I can't give you actual code right now.
However, try looking at something along the lines of

tail -n arcv(`wc -l`) -44

What this should do (once properly formatted) is count the number of lines in the file (wc -l), subtract 44 from it (-44) and then print out everything starting with the 45th line in the file.

Hope this helps and good luck.


Where can I find the SHA256 hashes of Ubuntu images? I'm trying to securely validate the hash of a downloaded ubuntu-11.04-alternate-amd64.iso but it seems I just can't find any.

I found this site: https://help.ubuntu.com/community/UbuntuHashes
but there are only MD5SUMs on it.

About MD5's security: https://secure.wikimedia.org/wikipedia/en/wiki/MD5#Security

Where are the SHA256 hashes of Ubuntu images?

http://releases.ubuntu.com/11.04/SHA256SUMS is not a solution, because it's not using valid HTTPS.

Verifying the SHA256SUMS with GPG isn't the solution either, because not everyone has the public key, so we have to import it with:

gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0xFBB75451

and I think using this method could be compromised (when importing the keys).

Currently only MD5 hashes are securely available. If you believe it is necessary to provide SHA256 hashes as well, please file a bug against the Ubuntu website.

Your report will be significantly more well received if you refrain from shouting profanities at those from whom you are seeking help.

Ubuntu help: Installation/MinimalCD, section 64-bit PC (amd64, x86_64)


Ubuntu 16.04/14.04 + Pro-Ject DS2 Ultra external DAC doesn't work i'd like to ask for some help, at the moment i'm struggling with that, maybe someone already knows this problem and/or even got a solution for that...

i bought an external DAC (Pro-Ject DAC Box DS2 Ultra) and i'd like to use it with my computer...based on the description from the company it doesn't need any drivers on Linux-systems, kinda "plug-n-play" device...but in my case it doesn't work...no sound, nothing even the system doesn't recognize this device...after some re- and unplugging alsamixer recognizes this as an external sound card, but refuses to use because of some kind of "protocol failure"

any ideas about what could be wrong? thanks in advance!

i tried it with Ubuntu 14.04 LTS (32bit), Ubuntu 16.04 LTS (64bit) and with Ubuntu Studio 16.04 LTS, resulkts are the same, no differences.

this is what i get till now:

ubuntu-studio@ubuntu-studio:~$ lsusb
Bus 002 Device 003: ID 04f2:b008 Chicony Electronics Co., Ltd USB 2.0 Camera
Bus 002 Device 002: ID 0951:1603 Kingston Technology DataTraveler 1GB/2GB Pen     Drive
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 0930:0508 Toshiba Corp. Integrated Bluetooth HCI
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

ubuntu-studio@ubuntu-studio:~$ dmesg | grep -i usb
..
..
..
[ 247.431215] usb 2-2: new high-speed USB device number 5 using ehci-pci
[ 247.550578] usb 2-2: New USB device found, idVendor=2772, idProduct=0201
[ 247.550585] usb 2-2: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[ 247.550589] usb 2-2: Product: DAC Box DS2 USB Audio 2.0
[ 247.550593] usb 2-2: Manufacturer: Project
[ 247.727218] usbcore: registered new interface driver snd-usb-audio
[ 252.898343] usb 2-2: 1:1: usb_set_interface failed (-110)
[ 252.902941] usb 2-2: 1:1: usb_set_interface failed (-71)
..
..
..

I am using a JRiver Id as my music server which initially failed to recognise the DS2 Ultra as a USB DAC. I eventually was given a firmware update by Henley Audio which after installing allowed the Id to recognise the DAC. However the DAC is unable to control the jitter when outputting 44.1 files at 44.1 via JRiver from the Id and also from my MBP. As a fix for this issue I am outputting 44.1 files at 88.2 which seems to eliminate the Jitter. Outputting 44.1 files at 44.1 via a chord Hugo 2 and Hegel HD30 show none of the jitter issues of the DS2 Ultra. Even though Project insist they cannot replicate the jitter issue my belief is that the firmware is not fully up to scratch yet with the DS2 ultra.

home site https://www.project-audio.com/en/product/dac-box-ds2-ultra/
download firmware update utitlity
https://www.project-audio.com/wp-content/uploads/2018/06/Pro-Ject_Firmware_Update_Utility.zip

Please uprade the firmware of your unit to minimum version 1.04 (in Downloads). After that your DAC Box DS2 ultra should work normal.


Unable to install Ubuntu 12.04 on Dell Inspiron 14Z I just got my new Dell Inspiron 14Z laptop, I am trying to install Ubuntu 12.04, I already have Windows installed on it.

We can install ubuntu 12.04 but it disappears once we restart it and model is inspiron 5423 ultrabook. I am trying for a dual boot version, i mean to run ubuntu along with Windows.

How do I do it? A quick googling did not help me much.

How do fix it and get it installed.

You said:

  we can install ubuntu 12.04 but it disappears once we restart it and model is inspiron 5423 ultrabook. I am trying for a dual boot version, i mean to run ubuntu along with windows

If you are booting from an Ubuntu live CD/DVD or live USB flash drive and running the installer, and it appears to succeed, but when you remove the installation media and restart you just boot into Windows without an option to select Ubuntu, this usually means the GRUB2 boot loader was not properly installed to the Master Boot Record.

The solution to that is to reinstall GRUB2 to the MBR. You can choose whichever method you prefer. Because they're easiest, I recommend either using the Boot Repair GUI utility or using this method.

If that doesn't work, then we definitely will need more information to answer your question. Here's the information we need:

How, exactly, did you install Ubuntu? Provide as much detail as possible.
In particular, if you installed Ubuntu inside Windows using Wubi, the above instructions will not help you, and you'll have to tell us that.
Boot from the live CD, open a Terminal window (Ctrl+Alt+T), and run sudo parted -l. Select all the text in the Terminal window, copy it to the clipboard, and edit your question, pasting it into your question and formatting it with the <$> tool in the Ask Ubuntu editing toolbar. (You should be able to access the Internet from the live CD system to do this.)

You have to install Ubuntu in Legacy Mode while the Windows running in UEFI mode.
To access Windows again you will have to change
the boot mode to UEFI and when you want to access Ubuntu you've to change to Legacy Mode.


Unable to login to Ubuntu I am new to Ubuntu. I installed Ubuntu 12.04 on my pc which is way old along with Windows XP. After installation I got a message "Run ubuntu in low graphics" I clicked yes and then I was asked for user name and password. But I keep getting the same screen over and over.

To summarize my ubuntu installation is hung at the login screen.

Try bringing your computer up in Recovery Mode, drop to the console and reset your password with the "passwd" command, then boot up normally.   If you're running on an old system without too many resources you might try installing the Lubuntu variant, as it works better (faster) on systems like this.

Sounds to me that your user account doesnt have administrator access, known as ROOT.
To do this you need to enable ROOT and that way you can run certain devices and installations.

With my first experience I installed ubuntu to a virtual pc rather than dual boot and played that way. I could surf the net on it and things were less risky, now with my knowledge and understanding i feel as if I can play and understand how to make this opperating system much more functional.


Ubuntu Installation: Reinstalling Ubuntu and keep files from previous installation I'm new to Ask Ubuntu, apologies if I'm not specific enough.

I had Ubuntu 14.04 installed on my hp laptop. I attempted to update my distro to 16.04 via command line using this command; "sudo apt-get dist-upgrade". All seemed good, I rebooted my machine so that the changes could take effect. When my laptop had rebooted back into Ubuntu, all that displayed was a black dull screen. I pressed the master terminal keys, it asked for my login and password, but each time I pressed a key, the cursor would just move up, down, left and right all over the place, when I pressed enter, a new line would appear below that looks like something written in Japanese or something.

I think what's happened is the distro update has only partly installed 16.04, so the installation and drivers are just completely screwed. I've attempted to install 16.04 via usb stick where I have been welcomed by a "Upgrade ubuntu 14.04 to 16.04" message on the installation menu, which is a total relief, what I'm wanting to know is, is there a way I can upgrade 14.04 to 16.04 and not loose any of the files I've got inside my 14.04 installation? Any help would be appreciated hugely, cheers.

First, try and be safe. You don't want to loose any of your data. Try this...

Boot the computer.

If the GRUB menu doesn't normally automatically appear for you, hold down the LEFT SHIFT KEY at boot time.

Choose ADVANCED OPTIONS from the GRUB menu, and select the prior kernel, and see if you can boot properly to 14.04.

If you can boot into 14.04, backup your important files to an external disk or USB flash drive.

Then bring up Software Updater and try the 16.04 upgrade again.

Let us know how you do. Cheers, Al

It should keep it automaticlly if not then make a new partition for Ubuntu 16.04 to be installed on and once installed just mount the Ubuntu 14.04 partition to the new Ubuntu install.


How to zero out a drive? I'm currently running Ubuntu 12.04 and want to completely format my laptop so I can install Windows 7 (replace Ubuntu).

When I put in my bootable USB with the OS it just shows a black screen with a white blinking cursor on the top left corner. I wait for hours (to be specific 5 whole hours) waiting for something to happen but I get nothing, so I pull out the USB and my Ubuntu 12.04 loads up.

Repeated this several times with putting different boot priority options on top-est that relate to USB but the results are same. I go and visit some sites on the net like this http://www.techspot.com/community/topics/cant-replace-ubuntu-with-windows.175716/ that say I have to zero out my hard drive.

My question is how?

Note: Erasing out all my data is no problem cause I have nothing important to backup.

If I have to lose my primary OS (Ubuntu 12.04) in the process I am ready to as my aim is just to install Windows 7 successfully. Please don't answer that there is something wrong with my USB or my USB reader/port/hardware or the content inside the USB cause they all works fine on my brothers PC as it boots up flawlessly.

Zero-out drive on Linux is done via:
dd if=/dev/zero of=/dev/sdX

where sdX is the device of the drive to delete.
If you're not aware on how to do this, press Ctrl+Alt+T from Ubuntu, and type following:
sudo dd if=/dev/zero of=/dev/sdb

In example above, sdb is the second connected drive.
NB! This will erase your drive completely. Use at your own risk.

EDIT 1:
Optionally, you might want to add status=progress to show progress status:
sudo dd if=/dev/zero of=/dev/sdb status=progress

EDIT 2:
As per comments below, setting the buffer size might significantly speed up the process:
sudo dd if=/dev/zero of=/dev/sdb bs=16M

Please note, however, with a buffer dd will not wait until operation is complete, so afterwards you might need to execute sync command, which synchronizes data on disk with memory.
sudo dd if=/dev/zero of=/dev/sdb bs=16M && sync

What's the purpose of sync? Simple: in case if your storage is slow and power off happens right after dd while disk data is not synchronized, some of the data might be lost. It might be not so relevant for this particular case about zeroing out the drive on PC, but for things like embedded systems with slow flash memories this needs to be considered.

It is really questionable whether this is an Ubuntu question at all.

If you have set the BIOS of your computer to boot from the USB first you should have no trouble. It should  boot entirely from the USB stick and it should not matter how the Hard Drive is formatted.

Windows will format the Hard Disk and anything there will be overwritten.

You should not have to zero out the Hard Drive at all.


USB devices showing as read only I am using Ubuntu 14.04.

I have an 8gb FAT32 USB stick and a 500gb FAT32 HDD; both of these have suddenly become read only devices.

I've tried deleting the directory inside /media and then creating it again, renaming it,  then giving that directory full permissions. However, this didn't work.

Results of mount:

$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=simon)

Results of sudo parted -l:

Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size    Type      File system     Flags
 4      1049kB  500GB  500GB   extended
 5      2097kB  496GB  496GB   logical   ext4
 6      496GB   500GB  4238MB  logical   linux-swap(v1)

Model: Verbatim STORE N GO (scsi)
Disk /dev/sdb: 8028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      24.6kB  8028MB  8028MB  primary  fat32        boot

Results of lsblk:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda4   8:4    0     1K  0 part
├─sda5   8:5    0 461.8G  0 part /
└─sda6   8:6    0     4G  0 part [SWAP]
sdb      8:16   1   7.5G  0 disk
└─sdb1   8:17   1   7.5G  0 part /media/simon/LYDIA
sr0     11:0    1  1024M  0 rom

USB write test:

$ cd /media/simon/LYDIA
$ touch newfile001
touch: cannot touch ‘newfile001’: Read-only file system

Results of dmesg:

[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be       corrupt. Please run fsck.
[  159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.383258] FAT-fs (sdb1): Filesystem has been set read-only
[  159.383571] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.384251] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.384319] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.475111] systemd-hostnamed[2966]: Warning: nss-myhostname is not installed.
Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[  159.480141] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.480224] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.480497] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  159.480516] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2893.091767] wlan0: deauthenticating from c0:3e:0f:31:21:05 by local choice   (reason=3)

See this bug.

Run this command to kill Nautilus (Files):

killall nautilus

Quick fix methods:

Method 1

Sometimes we can accomplish the task from bash without trouble
I usually do (no sudo required)

mkdir /media/$USER/mydrive/myfolder
cp -r src/ /media/$USER/mydrive/myfolder

However, sometimes, when I need to use file browser,

sudo nautilus /media/$USER/mydrive/

Note: this is a quick fix, use it only if you get frustrated because no other answers above worked

Method 2

Reboot OS


Network service discovery disabled: What does this mean for me? Every time at boot I get a message “Network service discovery disabled. Your current network has a .local domain, which is not recommended and incompatible with the Avahi network service discovery. The service has been disabled.”

What does this mean for me?

Wi-Fi is disabled.

It looks like avahi-daemon is started when the network connection is established (/etc/network/if-up.d/avahi-daemon).
This notification is informing you that mDNS (Avahi) has been disabled. It's only used for a small number of applications that only work on the local network, it won't adversely affect your internet connection or DNS.

The most well known use for mDNS is sharing music with Rhythmbox (or iTunes) over your LAN. It's an Apple technology, but it's largely been ignored in favour of uPNP or DLNA.

To disable it, you must edit the file /etc/default/avahi-daemon as root:

sudo -i
gedit /etc/default/avahi-daemon

and add this line (or change it if already exists to):

AVAHI_DAEMON_DETECT_LOCAL=0

Source: http://ubuntuforums.org/showthread.php?t=1632952

In /etc/avahi/avahi-daemon.conf, uncomment and change the line with domain name to:

domain-name=.alocal

This worked for me in Ubuntu 19.10.


Installing glib gives "You must have either have gettext support" I'm trying to install glib-2.37.6 (also same problem with glib-2.32.1) and getting this error during configuration:

  You must have either have gettext support in your C library, or use the
  GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

I previously built gettext, though.  To clarify, I'm trying to build a number of things (leading up to gtk+) without actually installing in the usual places, since this is a machine others use; instead, I'm using --prefix= to put everything in a work directory under my home directory.

I tried looking at the logs to see if I could get a clue about whether I needed to set anything else.  I also tried looking at the configure script, although I'm not an expert on autoconf.  What I found was that the error occurred because gt_cv_have_gettext wasn't set to yes.  So then I looked for where it was supposed to get set, so that I could tell what file or whatever it was checking for.  But unless I'm missing something, the only command that would set it to yes is underneath this if:

  if test "$gt_cv_func_dgettext_libc" != "yes" \
     || test "$gt_cv_func_ngettext_libc" != "yes" \
     || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then

The config.log (looking at the configure line numbers) indicates that the condition was false, so everything inside (including the command to set gt_cv_have_gettext) was skipped.  But the test seems to check that none of three things are missing.  And none of them are; here's one of the last segments of config.log right before the error:

configure:7982: checking for ngettext in libc
configure:8000: gcc -o conftest -g -O2   conftest.c  >&5
configure:8000: $? = 0
configure:8009: result: yes
configure:8013: checking for dgettext in libc
configure:8031: gcc -o conftest -g -O2   conftest.c  >&5
configure:8031: $? = 0
configure:8040: result: yes
configure:8047: checking for bind_textdomain_codeset
configure:8047: gcc -o conftest -g -O2   conftest.c  >&5
configure:8047: $? = 0
configure:8047: result: yes
configure:8323: checking for msgfmt

(The line that would set gt_cv_have_gettext is somewhere between 8047 and 8323.)  So unless I'm missing something, it looks as though if all these three things--ngettext, dgettext, bind_textdomain_codeset--are present (or succeed, or something), then an error will result.

So what am I missing?  Is there some other option that needs to be set, or something else wrong with my configuration?  Or did I find an error in the configure script?  Thanks for any help.  I wanted to ask in a forum like this before submitting it as a bug report.

OK, I think I figured it out.  Since I was "installing" everything in a directory under my home directory, I needed to add the "bin" subdirectory of the --prefix directory to my $PATH before running configure.  That made it find msgfmt and, I think, got it around the error.

how to add the "bin" subdirectory of the --prefix directory to my $PATH before running configure. That made it find msgfmt and, I think, got it around the error.


Virtual machine using natively installed windows I have windows installed on my PC, and sometimes I would like to run it under ubuntu, is it possible?

In vmware workstation you have ability to create VM from a real system. I did that before and now this system is working in the vmware player. However, this is not a partition, but the big file with system. I don't think that this even possible, because virtualized systems can use only their own hardware components (that is virtualized) and when you'll change them in real system (when you launching windows in ubuntu) - you won't be able to login back to the real system. Because registry of the windows system will have modified drivers for hardware devices (that can be used in vm).

With VirtualBox (installable via the SoftwareCenter in Ubuntu) it is possible under Windows as well as Ubuntu to install your preferred OS into a virtual maschine.

Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7), DOS/Windows 3.x, Linux (2.4 and 2.6), Solaris and OpenSolaris, OS/2, and OpenBSD.


File names with spaces in scripts Here is a simple script to pass a file path to ls or chmod but filenames with spaces don't work even when enclosed in quote marks.

How do I get it to work ?

#!/bin/sh
# Script to fix permissions on supplied folder and file name

echo "Enter Folder name"
read folder
echo "Folder name is "$folder
echo "Enter File name - if name includes spaces enclose in single quote marks"
read filename

echo "File name is "$filename
fullpath="/home/abc/"$folder"/"$filename

echo "Full path is "$fullpath

fixcommand="chmod a+rw -v "$fullpath

echo "Command to be executed is "$fixcommand

echo -n "Is that correct (y/n)? "
read answer
if echo "$answer" | grep -iq "^y" ;then
$fixcommand
else
    echo No action taken
fi

In the script provided by you, the variables actually aren't quoted.

You should update your script and quote the variables with " "

For example:

fullpath="/home/abc/"$folder"/"$filename

Should be:

fullpath="/home/abc/$folder/$filename"

  Thanks for @glenn jackman - who suggested reading Security implications of forgetting to quote a variable in bash/POSIX shells

You can find below the full feedback of shell-check site on your script

Line 5:
read folder
^-- SC2162: read without -r will mangle backslashes.

Line 6:
echo "Folder name is "$folder
                      ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 8:
read filename
^-- SC2162: read without -r will mangle backslashes.

Line 10:
echo "File name is "$filename
                    ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 11:
fullpath="/home/abc/"$folder"/"$filename
                     ^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.

Line 13:
echo "Full path is "$fullpath
                    ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 17:
echo "Command to be executed is "$fixcommand
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 19:
echo -n "Is that correct (y/n)? "
     ^-- SC2039: In POSIX sh, echo flags are undefined.

Line 20:
read answer
^-- SC2162: read without -r will mangle backslashes.

Thanks all  Final working version is :

#!/bin/sh
# Script to fix permissions on supplied folder and file name
# including folders and filenames containing spaces
echo "Fixfilepermissions running"

echo "Enter Folder name"
IFS= read -r folder
echo "Folder name is "$folder
echo "Enter File name"
IFS= read -r filename
echo "File name is "$filename

fullpath="/home/abc/$folder/$filename"

echo "Full path is "$fullpath

echo "Command to be executed is: chmod a+rw -v \"$fullpath\""
echo -n "Is that correct (y/n)? "
read answer
if echo "$answer" | grep -iq "^y" ;then
chmod a+rw -v "$fullpath"
else
    echo "No action taken"
fi


Mount specific FTP folder in ubuntu I want to mount a specific folder in Ubuntu.

By default the folder that is set by the ftp server is the user's home folder. However, if I mount ftp://server.com/my_folder it will mount the "my_folder" folder. After I add the bookmark however, it looks like Ubuntu forgets about my folder and stores only ftp://server.com as after reboot when I open the bookmark I am taken directly to my ftp user's home folder.

Any hints?

Edit your bookmark (Ctrl+B) and specify the remote path in the location field.


Can't upgrade Ubuntu 18.04 to 20.04 because of "Please install all available updates for your release before upgrading" error I've been trying to upgrade my version of Ubuntu 18.04 to 20.04. I've run all the steps from updating and upgrading both apt and apt-get, changing the settings in update manager and all of the steps described in this link. Yet I keep getting the error:

Please install all available updates for your release before upgrading.

Is there something special about trying to upgrade from 18.04 to 20.04 that's causing this error? Do I maybe need to update to 19.04 first?

EDIT: I just noticed something that might be important. When I run sudo apt-get update I get the following notice at the end of the output:

The following packages have been kept back:
  colord gimagereader python-sane sane simple-scan
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

Might that be causing the issue?

sequence from 18.04 to 20.04
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo do-release-upgrade -d -f DistUpgradeViewGtk3

Follow onscreen instruction.
Good luck!

first, run

sudo apt update && sudo apt upgrade

you will see like this
These packages need to upgrade here

install every one manual

sudo apt install

or all

sudo apt install mongodb-org-shell && sudo apt instll mongodb-org-tools

after finish
try to upgrade will be working


Give specific user permission to write to a folder using +w notation I know I can assign the permission to write to an owner/group/others like this:

chmod u+w myfolder

Can I specify the specific user here? Some like this:

chmod username u+w myfolder

You could use setfacl:
setfacl -m u:username:rwx myfolder

This sets permissions for specific users, without changing the ownership of the directory.
Check out the man page for further details and examples.
EDIT: Highlighted points in comment

setfacl = set File ACL, ACL = Access Control List hence for short "setFacl"
If you want to apply it recursively to all the subdirectories: add the -R flag like this: setfacl -R -m u:username:rwx myfolder


Cannot download Ubuntu to a USB drive. Only option available is to burn to a DVD, which I do not have After downloading Ubuntu 14.04.2 LTS, when I click on the program, a window opens which asks me to burn to a disk. Even though I have a USB drive attached (and which is recognized by my computer) it is not available for loading the program.

JohnC

UNetbootin can create a bootable Live USB drive.

UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X.

http://sourceforge.net/projects/unetbootin/files/UNetbootin/608/unetbootin-windows-608.exe/download?use_mirror=ufpr

If using Windows, run the file, select an ISO file or a distribution to download, select a target drive (USB Drive or Hard Disk), then reboot once done. If your USB drive doesn't show up, reformat it as FAT32.

Source: http://unetbootin.sourceforge.net/

Try Rufus https://rufus.akeo.ie

Here is an video as an example https://youtu.be/8xV7gIFzk5Q


How to import numpy as standard user from server? I installed python, numpy, scipy as super user in server and I can import them  without any errors. However, standard users (who connect with ssh) can not import them.
How to fix it so that standard users can import them?

Thanks.

this sounds like your $PATH isn't pointing to those executables.

try running the following as root and then as as user

echo $PATH
which python
echo $PYTHONPATH

this will tell you which python installation you are using and where it is looking for installed python files.

It sounds like your user accounts are not pointing at the same python setup. Its best with python to only use root to update the system packages as most distros require specific python versions for some of their internal tools.

Have a look at Virtualenv installations for your user accounts , this way you can have a custom setup for each user that will not conflict, its also easier to migrate that user to other machines as the python setup will be entirely in its homedir.

I am assuming that since you are running Ubuntu, your standard users'
OS has Python installed or that the users can install Python if it is not already installed. Add the import paths for numpy and scipy on the server at the beginning of your Python script,

import sys
sys.path.append("/path/to/numpy")
import numpy
sys.path.append("/path/to/scipy")
import scipy


How to copy a folder from /home/kevin to /opt I have a new computer installed with Ubuntu 12.04. Then I want to install wireless driver named compat-wireless-3.5-3. Before that, the driver folder to /home/kevin.

I want to install it on /opt directory. Before install the driver, i want to copy the driver folder from /home/kevin to /opt. I try to use ordinary copy (Right Click Copy Paste), but the paste is blured.
After that, i tried using this on terminal:

sudo cp /home/kevin/compat-wireless-3.5-3 /opt

But I get this error:

cp: omitting directory `home/kevin/compat-wireless-3.5-3'

What does the command mean? I can't copy the driver folder until now.

You have to use the -r flag when copying directories, in other words,

sudo cp -r /home/kevin/compat-wireless-3.5-3 /opt

-r means the directory will be copied recursively, content first, then the directory itself.

Or you can try

  sudo cp /home/kevin/compat-wireless-3.5-3/* /opt

The "*" wildcard takes in the folder and the files in compat-wireless-3.5-3 and will copy them to /opt folder.


How do I get passed the "MBR-helper missing" error message in installation? I'm entirely new to Linux/Ubuntu so please bear with me.

I currently have Windows 7 32Bit and wanted to install Ubuntu. I used the installation off the website and copied it onto my bootable USB. As I installed Ubuntu it says I need to reboot my system - so I did.

As I try to boot up in Ubuntu it just simply says 'MBR-helper missing' and nothing else, however, it lets me boot back up in Windows fine.

Is there a way to get around or repair this error? I can't find a clear answer on forums.

Is this error because I copied it into my USB? Or is this a common yet fixable problem?

Please help.

Try redownloading the iso. Also don't forget to check the MD5Sum and make sure they are the same

How to check MD5

If your Master Boot Record broke during the install, Windows may most probably auto-fix that. Type chkdsk /f /r to Windows commandline (run as administrator).


How to make nautilus to mount at `/drivename` instead of `/media/drivename`? I want to mount my other drives (mostly ntfs and fat) on /drivename by clicking on the drive icon in the nautilus side pane, where "drivename" refers to the label of the drive. By default nautilus mounts drives with name drivename in /media/drivename folder.

My question is: How can I make nautilus to do like that?

I don't want to use fstab: Please do not suggest doing this by editing /etc/fstab file. I want this feature in nautilus and after clicking the drive should also be seen in the side pane. (should not be hidden).

Edit: Seems there are some misunderstanding with this question. I don't want to mount in the drive /, i.e all contents of a drive in /. What I want is when I mount a drive with drive name "Main", that drive will get mounted at /Main instead of /media/Main.

you need write a udev rule for this:
you can create a file in the directory /etc/udev/rules.d/ with

# Start at sdb to avoid system harddrive.
KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="defaults,relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs",         ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o    $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

And change the actions ADD and REMOVE with your path, in this case /

ACTION=="add", RUN+="/bin/mkdir -p /%E{dir_name}", RUN+="/bin/mount -o    $env{mount_options} /dev/%k /%E{dir_name}"
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /%E{dir_name}", RUN+="/bin/rmdir /%E{dir_name}"

As far as I know, This isn't possible now, (at least not feasible). It may require compilation of some packages including nautilus


"It has to install from unauthenticated sources" from software updater I tried updating my 13.04 from software updater. I had about 202.9 MB to download. When I click "Install Now" and then a message came saying "It has to install from unauthenticated sources". I click OK and then the software updater Exits... There is no way I can update due to this problem.

Seems that somehow you messed up your keyrings or your DNS got hi-hacked. I will ask you to execute one by one these commands and stop when you see an error:

Clean your sources.list:

sudo rename 's/\.list$/\.list\.disable/' /etc/apt/sources.list.d/*.list
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
sudo sh -c "echo 'deb http://us.archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main restricted universe multiverse' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://archives.ubuntu.com/ubuntu $(lsb_release -sc)-security main restricted universe multiverse' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://archives.ubuntu.com/ubuntu $(lsb_release -sc)-updates main restricted universe multiverse' >> /etc/apt/sources.list"

Update your list (be sure that you have rebooted)

sudo apt-get update
sudo apt-get install ubuntu-keyring

Now update as normal:

sudo apt-get update
sudo apt-get upgrade

If you have another instance of apt-get please close it, be it Ubuntu Software Center, apt-get, synaptic, aptitude, gdebi, etc.

Try typing sudo do-release-upgrade as an administrator into a terminal (Ctrl+Alt+T), and put the error here.


How to just gain root permission without running anything? When I run a command with sudo like the following, subsequent sudo commands will not ask for a password anymore.
sudo ls

But this still runs ls. If I don't want to run any command at the beginning, but just stop subsequent sudo commands from asking a password later on. Is there a way to do so?

Use sudo -v:

-v, --validate
Update the user's cached credentials, authenticating the user if necessary.


How to downgrade a package via apt-get? How can I downgrade a package to an older version via apt-get?

Other tools are also acceptable but apt-get is preferred.

If you have the version number, or the target release,  apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from terminal by typing man apt-get
sudo apt-get install <package-name>=<package-version-number>  OR
sudo apt-get -t=<target release> install <package-name>
is the command to be run. This can be used to down-grade a package to a specific version.
Remark that when using a target release (option -t), the release priority must greater than 1000 to allow downgrades (see man 5 apt_preferences) otherwise the currently installed version will be kept.
It has been helpfully pointed out in the comments that

apt-cache showpkg <package-name> lists all available versions. (h/t Sparhawk)
apt-mark hold <package-name>  "holds" the package at the current version, preventing automatic upgrades. (h/t Luís de Sousa )

This question is old but Google led me here and I didn't find simple solution that does't require manual version passing when downgrading a bunch of packages to an older release.
So maybe someone who also needs that will find my solution useful as well.
There's a tool called apt-show-versions that shows versions installed. To install it:
$ sudo apt install apt-show-versions

Make sure APT's cache is up to date:
$ sudo apt-show-versions -i

You can easily downgrade all required packages by fine-tuning the regex but here it is:
$ sudo apt-get install $(apt-show-versions \
   | grep -P 'newer than version in archive' \
   | awk -F: '{print $1"/'$(lsb_release -cs)'"}')

You should have lsb-release installed for the latter.


Changing colors for user, host, directory information in terminal command prompt Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display?

I've already seen something like this done by OSX users, but I don't know how to do the same thing in gnome terminal (I can only change foreground and background colors).

It'd be very useful when, for example, trying to compile programs that have errors, since long, unformatted messages make it hard to distinguish which lines are commands and which are output.

You can edit the settings editing the file: ~/.bashrc.

Open the file: gedit ~/.bashrc.
Look for the line with #force_color_prompt=yes and uncomment (delete the #).
Look for the line below   if [ "$color_prompt" = yes ]; then that should looks like:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Pay attention at the part \u@\h it is saying "user@host" and the number before it \[\033[01;32m\] indicates the color. This is what you have to change. For example, lets change the user to purple, the "@" to black and host to green. Edit the line so it looks like:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u\[\033[01;30m\]@\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Result:

The colors numbers are:

Black       0;30     Dark Gray     1;30
Blue        0;34     Light Blue    1;34
Green       0;32     Light Green   1;32
Cyan        0;36     Light Cyan    1;36
Red         0;31     Light Red     1;31
Purple      0;35     Light Purple  1;35
Brown       0;33     Yellow        1;33
Light Gray  0;37     White         1;37

References: 1, 2.

I wrote a file that can help you customise everything
Execute the file with a leading . to make it run on the same terminal else it will create a child terminal and results thereof will not be seen. Like this:
. shortern_path_terminal.sh
How it works:

The variable PS1 controls the display of the terminal.
PS1='\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]$ '

u - Refers to the user

w - Refers to the current working directory

W - Shows the full path up to the current working directory

h - Displays the name of the system

[\033[01;32m] - Precedes the texture of text

01 bold

00 not bold

{colour}m
  Black       0;30     Dark Gray     1;30
  Blue        0;34     Light Blue    1;34
  Green       0;32     Light Green   1;32
  Cyan        0;36     Light Cyan    1;36
  Red         0;31     Light Red     1;31
  Purple      0;35     Light Purple  1;35
  Brown       0;33     Yellow        1;33
  Light Gray  0;37     White         1;37

Reference


Wine - cups-bsd but it is not going to be installed and more On a Ubuntu 14.04 server

sudo apt-get update
sudo add-apt-repository ppa:ubuntu-wine/ppa

command not found: add-apt-repository

I have to run

sudo apt-get install software-properties-common python-software-properties

Retype and now is all ok:

sudo add-apt-repository ppa:ubuntu-wine/ppa

After I type:

sudo apt-get install -y wine1.7 winetricks

but I have this:

The following packages have unmet dependencies:
 wine1.7 : Depends: wine1.7-i386 (= 1:1.7.34-0ubuntu1~ppa1) but it is not installable
           Recommends: cups-bsd but it is not going to be installed
           Recommends: gnome-exe-thumbnailer but it is not going to be installed or
                       kde-runtime but it is not going to be installed
           Recommends: fonts-droid but it is not going to be installed
           Recommends: fonts-liberation but it is not going to be installed
           Recommends: ttf-mscorefonts-installer but it is not going to be installed
           Recommends: fonts-horai-umefont but it is not going to be installed
           Recommends: fonts-unfonts-core but it is not going to be installed
           Recommends: ttf-wqy-microhei
E: Unable to correct problems, you have held broken packages

apt-get updade or similar not works, returns me same errors. how Can install or compile manually missing package?

You need to enable x86 architecture for multiarch packages:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine1.7


Synaptics Touchpad 3 finger swipe for Forward/Back I've searched and searched but can't find anything concrete for what i'm looking for.

In windows, i can do a 3 finger swipe left or right on the touchpad to go back/forward in a browser or file manager.

I would like to replicate this exact feature in ubuntu 16.04 running chrome.

A lot of suggestions mention easystroke but this is NOT what i'm looking for.

To clarify, I want to swipe the touchpad with 3 fingers in a from left to right or right to left to go back/foward in browsers or file managers.

Not sure why this is so difficult with linux

In ubuntu you have 2 finger scroll.
Along with that you have an option of "Horizontal scroll", it will work with the 2 finger scroll.


Hiding window decorations when maximized on Gnome3 On 10.04, I had had a very handy option from Compiz that allowed me to hide the window decorations (including the titlebar) when window was maximized.

How do I achieve the same with GNOME 3?

(the questions is a bit old, but might be useful for someone)

Webupd8, has some really nice tutorials on customization regarding gnome shell.

This is for removing the window decoration when maximized:
http://www.webupd8.org/2011/05/how-to-remove-maximized-windows.html

And this explains how to add Unity-like buttons (maximize, minimize, close) to the top-bar.
http://www.webupd8.org/2011/12/get-unity-like-window-buttons-on-top.html

They worked for me, and I have noticed no bugs or crashes.

Please have a look here:
https://bbs.archlinux.org/viewtopic.php?id=117936


Rotate External Display with NVIDIA drivers I am running Ubuntu 16.04 64-bit and have an NVIDIA GeForce 940M graphics card (proprietary NVIDIA drivers are installed for this). I have an external monitor that I want to rotate Counter-Clockwise (I doubt it matters, but specifically this is the Oculus Rift whose screen I am trying to rotate). It works correctly with most games/programs that I run on it, but everything i sideways because I can't rotate the display.

When I tried to do it from the command line by running xrandr --output HDMI-1 --rotate left, I get the output: xrandr: output HDMI-1 cannot use rotation "left" reflection "none". The same is evident when I go to the display settings app, when I click the "rotation" drop-down, the only option is "Normal". I, of course, did a bit of research before posting this, but from what I could tell by trying xrandr again after making the changes, it didn't work. My xorg.conf file looks like this (generated from NVIDIA X server settings app):

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "RandRRotation" "on"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "RandRRotation" "True"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

The additions I made were Option "RandRRotation" "True" and Option "RandRRotation" "on". I feel like I'm missing something, but I'm not very good with X11, especially with display configuration files like xorg.conf. Is there something more I could do, something I am missing from all of this?

Timo Aaltonen has fixed this issue on on 2017-06-26. Thank you.

https://i.stack.imgur.com/qNc19.png


"Parsing filters unsupported" error during extraction of RAR file I have received an .rar which I wish to unpack as it contains something rather important to me that I need to really have now. However even though I can view the contents of the .rar archive in the Archive Manager, I am unable to extract it due to this error:

The archive should contain two folders within it, each though contain at least 10 audio files as well as a PDF file each (I don't know what the contents exactly should be except for there should be audio files in there, and the content I have described is what I can see from the Archive Manager's view). So the only thing I am left with except the error is one of the folders and one of the audio files, but it says it has 0 bytes in it.

So how exactly do I fix this problem? I am running Ubuntu GNOME 16.04.1 with GNOME 3.20.

Information Update:

In reply to a comment requesting the output from the dpkg -l unrar unrar-free command:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  unrar          <none>       <none>       (no description available)
dpkg-query: no packages found matching unrar-free

You can use:

sudo apt-get install unrar

or

sudo apt-get install unar

I recommend you install only one of these (unrar in my case). Then use archive manager:

sudo apt-get install file-roller

I did install unrar:

sudo apt-get install unrar

then to extract, go to the path of the .rar file and:

unrar x [filename.rar]


There is recursive startup. Just tried to install Ubuntu. Get this image over and over again Saw this image "System Boot Order not found"

Use the following steps:

Go into BIOS/UEFI setup utility.
Set a supervisor password.
Go to Security
select select UEFI as trusted
Select HDDO, then EFI, then Ubuntu. Then Shimx.EFI.

Your computer won't tell you but you will have to name the file first. It can be anything. When you type in the name you want, press Enter. Then select yes.

You can now erase the supervisor password you made.

Go to the boot menu and there will be a new title with the name that you gave. * Put it all the way to the top.
Save your changes
Exit the setup utility.
Now, the Grub menu will show up without Windows.
Go to your Ubuntu account
open terminal.
Type:

sudo update-grub

That's it.


Nvidia GT750M driver Ubuntu14.04 I configured my graphic card with the nvidia driver-331 by terminal with the command explained in this guide.

http://www.linuxveda.com/2014/06/13/howto-install-nvidia-331-bumblebee-optimus-cards-ubuntu/

However my graphic card not works, and it is not visible from Ubuntu.

After typing:

    lspci -v | less

it answer:

    01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev ff) (prog-if ff)
    !!!Unknown header type 7f

Can anyone help me?!?!
Thanks alot!

Try this. To install Nvidia Drivers, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below:

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current

If that doesn't work, you can download the 32bit or 64bit drivers from Nvidia.

DO NOT. I REPEAT DO NOT INSTALL THE DRIVERS FROM NVIDIA!!!

I did that and i just had to reinstall my whole system. spend two days trying to fix my Xserver and gave up. they do something to prevent xserver from starting. in my case they changed a bunch of permissions and ownership of xserver files, as well as prevented X from finding a screen.


Install postgresql. Why is initdb unavailable? I'm following these instructions, however I can only get to step 17.2.

Despite installing postgresql successfully via the

sudo apt-get install postgresql

command, upon running

initdb -D /usr/local/pgsql/data

Ubuntu tells me that it 'initdb' isn't installed. The instructions tell me this command is installed by

sudo apt-get install postgresql

so what's going on? I can make initdb available by installing postgres-xc, but I think postgres-xc is just some weird third party rubbish, and it's not detailed in the instructions. Any ideas?

You will find initdb under /usr/lib/postgresql/x.y/bin/.  See also /usr/share/doc/postgresql-common/README.Debian.gz for more information on the setup on Debian and Ubuntu.

Follow the following steps with user root

passwd postgres - your password
su postgres
psql
Create a user with your user name like CREATE USER SAM ;
create database sam;
Log out and type psql <your_user>


PHP7.1 has been installed but php -v still show PHP5.6 I've been installed PHP7.1 and my on my laptop has 2 php versions there are
PHP 5.6 and PHP7.1 , i tried a2dismod php5.6 and a2enmod php7.1 then i restarted .. and i tried php -v still show me old version , anyone have solution about this ?

Thank you

That version has to do with the cli (command-line interpreter) version which you might not have installed so install it:

sudo apt install php7.1-cli

then check that version again. Noe remove the other version:

sudo apt remove php5.6-cli

if that is what it's called, then restart you server.

a2dismod is a command that disables php support for apache service.
On the other hand, php-cli package is only meant to work for console (in terminal).
Unless you uninstall php-cli package (or php7.1-cli for 7.1 version) you will be able to work with php in terminal (even it won't work on your webservice at the time)

If you want to replace php 5.6 with 7.1 in the cli do this:

sudo rm -rf /usr/bin/php
ln -s /usr/bin/php7.1 /usr/bin/php

this should replace your current cli version with 7.1 and php -v should show your desired version


Hotkey combinations for window management? What is the most useful hotkeys on ubuntu desktop ? (for show all windows at the same time, change between programs,...)

On Ubuntu 10.10 and early versions

To see all windows at the same time : superkey(win key) + w

To see all Desktops at the same time : superkey(win key) + e

change between programs: Alt + Tab

The default ubuntu shortcuts see this:  Ubuntu Hotkeys - Keyboard Shortcuts

To Define a shortcut  see this post answer create a shortcut

On unity Ubuntu 11.04

shows the Unity launcher superkey

Activates or opens the corresponding applications in the Unity launcher superkey + {number}

show all workstations(desktop) superkey + S

To see all open programs on one workstation  superkey + W

Here is the a nice documentation of
What are Unity's keyboard and mouse shortcuts?

Run a program: ALT + F2
Ubuntu will show you suggestions, which makes this a very quick way to access your apps instead browsing all the menus
Switch workspace right or left : CTRL + ALT + {ARROW}


My Dell inspiron 1464 bluetooth adapters does not work in ubuntu 12.04 LTS My Dell inspiron 1464 bluetooth adapters does not work in Ubuntu 12.04 LTS

How to fix this?

Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 008: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 004: ID 0c45:6480 Microdia Sonix 1.3 MP Laptop Integrated Webcam
Bus 002 Device 003: ID 1c4f:0003 SiGma Micro HID controller
Bus 002 Device 005: ID 198f:0220 Beceem Communications Inc. BCSM250 WiMAX Adapter
Bus 001 Device 009: ID 413c:8161 Dell Computer Corp. Integrated Keyboard
Bus 001 Device 010: ID 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]

What do you get when you run rfkill list ?

Sample output (from my Acer laptop) is:

phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: i2400m-usb:1-1.5:1.0: WiMAX
    Soft blocked: yes
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
3: acer-wireless: Wireless LAN
    Soft blocked: no
    Hard blocked: no
4: acer-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

Secondly, on some Dell laptops (e.g. Studio 15) you have to switch the Bluetooth mode from HID to HCI using

hid2hci

You can install the tool by running:

sudo apt-get -y install hid2hci

Refer to the man file by running man hid2hci or refer to http://manpages.ubuntu.com/manpages/jaunty/man8/hid2hci.8.html

Good luck.


Why are old kernels marked as manually installed? From everything I've read, in Ubuntu 18.04 sudo apt-get autoremove should clean up old kernels. However, for some reason, after installing a new kernel version, I am left with "linux-image-*", "linux-headers-*" and "linux-modules-*" packages which are inexplicably marked as manually installed, and therefore are not cleaned up by apt-get autoremove.

I have not manually installed these packages (for example linux-image-4.15.0-70-generic), and can't figure out what is marking them as manually installed.

Why are these packages getting marked as manually installed? And how can I stop that from happening?

Update

I'm replying to @user535733 here, because it is too long for a comment. I think this is something different than the script in /etc/kernel/postinst.d/apt-auto-removal.

Looking at that script, it doesn't mark the packages as manually installed, instead it writes an apt configuration file with a "APT::NeverAutoRemove" section that lists the kernels that shouldn't be removed. And I understand that. The problem is the packages I'm seeing marked as manually installed are not in that list. And they are never removed by autoremove even after multiple kernel updates.

And by marked as manually installed, I mean that apt-mark showmanual linux-* lists these packages and apt-mark showauto linux-* does not.

Update 2

I found this in my apt history:

Remove: linux-headers-5.0.0-32:amd64 (5.0.0-32.34~18.04.2), linux-modules-extra-5.0.0-32-generic:amd64 (5.0.0-32.34~18.04.2), linux-headers-5.0.0-32-generic:amd64 (5.0.0-32.34~18.04.2), linux-image-4.15.0-70-generic:amd64 (4.15.0-70.79), linux-modules-5.0.0-32-generic:amd64 (5.0.0-32.34~18.04.2), linux-modules-extra-4.15.0-70-generic:amd64 (4.15.0-70.79), linux-image-5.0.0-32-generic:amd64 (5.0.0-32.34~18.04.2), gradle-6.0:amd64 (1.0-0ubuntu2), linux-modules-4.15.0-70-generic:amd64 (4.15.0-70.79)
Error: Sub-process /usr/bin/dpkg returned an error code (2)

And the corresponding term.log contains:

Log started: 2019-12-21  22:23:02
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
Log ended: 2019-12-21  22:23:02

So it looks like autoremove tried and failed to remove the packages. (And I think it is failing because it is in a cron job and the PATH isn't set correctly). I still don't understand how they became marked as manually installed though. I don't see anything else suspicious in the apt history or term.log

The script /etc/kernel/postinst.d/apt-auto-removal governs which kernel packages are apt-marked 'manual' (ineligible for autoremoval) and which are apt-marked 'auto' (eligible).

There is a good reason for it: It's very wise to keep at least one old kernel handy in case a new kernel fails to boot.

This is contrary to normal Debian practice of installing only one version of a package at a time. So apt isn't well-equipped to handle this corner-case. Hence the need for the script.

The logic that the script uses is described in the script, and is easy to follow. Take a look at it.

Why you don't use ukuu, you can find how to install ukuu below.

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update && sudo apt-get install ukuu


HP Laser Jet 1020 plus installation In Ubuntu 12.04 on switching on the printer the system automatically recognized the plug in but in Ubuntu 14.04 this would not happen.

I wish someone would show me the method by which I can install HP Laserjet 1020 plus driver and plugin easily.

Now I have got some easier solution to my own problem. I just used command: hp-check

After that I used the command : hp-doctor

I had to answer some question during the process. And it downloaded all the necessary drivers / plug-ins. That's all.

I followed steps given in the blog https://blog.hostonnet.com/how-to-install-hp-laser-jet-1020-plus printer. These are on terminal enter following steps.
sudo apt update
sudo apt remove hplip cups-filters cups hplip-data system-config-printer-udev
sudo apt install build-essential tix groff dc cups
sudo apt install cups-filters unp system-config-printer-gnome
sudo rm -rf /usr/share/hplip
cd /tmp
rm foo*
wget -c http://foo2zjs.rkkda.com/foo2zjs.tar.gz
unp foo2zjs.tar.gz
cd foo2zjs/
make
./getweb 1020
sudo make install
sudo make install-hotplug

Unplug and replug USB printer.
Type system-config-printer, select foo2zjs as the printer driver.
Errors can be checked by entering tail /var/log/syslog


Why isn't iTunes working for me? I know you are to install iTunes in WINE but when ever I open it an error message appears that says

Apple Application Support was not found.
Apple Application Support is required to run iTunes. Please uninstall
iTunes, then install iTunes again.

Error 2(Windows error 2)

I have tried uninstalling the iTunes, re downloading it and repairing it.  Nothing seems to work.  Please help me here.  Thank you.

I've also tried this, it didn't work for me.
iTunes was rated as Silver on the Winehq website, with few known reports of it working properly. http://appdb.winehq.org/objectManager.php?sClass=application&iId=1347
I use banshee, it's simple, lightweight, and all around in my opinion, it's better than iTunes. It also allows you to Sync media to your iPod or iPhone, but with limited functionality.
Hope this helps. :)

Some versions work with some versions of wine. If you'd chosen a product from a more open company then you would have significantly fewer issues. I suggest you check the wine appdb for your version of wine running the version of iTunes you have. You may need the wine ppa adding ad run wine 1.3

Alternatively you could drop the ipod and get a decent device.