Ubuntu:Unable to correct problems, you have held broken packages I am trying to install ImageMagick Library.
with the command:

sudo apt-get install libmagickwand-dev

But It give error like:

libmagickwand-dev : Depends: libmagickwand5 (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
Depends: libmagickcore5-extra (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
Depends: libmagickcore-dev (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What is the solution of this type of problem?

First ensure your system's libraries are update by running:

$ sudo apt update
$ sudo apt upgrade

Then manually install the Depends that are displayed in the error message.

Then install the package as normal.

I met the same problem.

system: Linux mint 18.1 "Serena"

When I did like this:

$ sudo apt-get install vlc browser-plugin-vlc

Outcomes:

  sudo: unable to resolve host mint
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:

  The following packages have unmet dependencies:
  vlc : Depends: vlc-nox (= 2.2.2+git20170601+r59025+56~ubuntu16.04.1) but it is not going to be installed
        Depends: libavcodec-ffmpeg56 (>= 7:2.4) but it is not going to be installed or
                 libavcodec-ffmpeg-extra56 (>= 7:2.4) but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.

I tried many methods that i can search on the net, such like:

$ sudo apt-get update
$ sudo apt-get upgrade

$ sudo apt-get update --fix-missing

$ sudo apt-get autoclean $$ apt-get clear cache

and so on.

But those can help me to solve the problem.

I also see Synaptic Package Manager --> Custom Filters --> Broken, there were no broken package.

Finally, I changed the software source, then I tried

 $ sudo apt-get install vlc browser-plugin-vlc

The problem was solved.


Ubuntu 18.04 - Dell XPS13 9370 no longer suspends on lid close This was working perfectly on 17.10 but after upgrading to 18.04 yesterday, when the lid is closed the screen turns off but doesn't suspend properly.

I travel around a lot and immediately noticed the heat (and battery draining) when taking it out of the travel case.

I've tried uncommenting these lines in /etc/systemd/logind.conf

HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend

and restarted but didn't make any difference.

I think I managed to figure out what was going on, thanks to these two sources: Dell XPS 13 (9370) ArchLinux Install notes and Arch Linux Forum.
For some reason, the laptop is not going in deep sleep anymore, but rather an s2idle mode which is merely a screen off type of suspend.
Diagnosis of the issue
To confirm whether this is the case for your system, suspend the laptop using your favorite method (close the lid, hit Fn+End, write pm-suspend in a terminal if you have pm-utils installed, or hit the Windows key type suspend and hit the Enter key).
Wake up from suspend mode and type in a terminal: sudo journalctl | grep "PM: suspend" | tail -2.
If the output is
May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)
May 13 20:52:36 mex kernel: PM: suspend exit

Then you are not entering deep sleep.
You can also check cat /sys/power/mem_sleep which should return
[s2idle] deep

which confirms that the default suspend mode is s2idle (since it is highlighted with brackets).
Temporary fix
To try a temporary fix, do echo deep > /sys/power/mem_sleep as a root user. Check that it was successful by looking at the output of cat /sys/power/mem_sleep which should be
s2idle [deep]

then suspend the laptop and wake up again. If sudo journalctl | grep "PM: suspend" | tail -2 returns
May 13 18:41:00 mex kernel: PM: suspend entry (deep)
May 13 20:52:36 mex kernel: PM: suspend exit

then the issue should be fixed.
You can put your computer to sleep for a couple of hours and check whether the battery drain improved.
Permanent fix
To make it permanent, you have to edit your bootloader cmdline. To do so, edit as root user the file /etc/default/grub, by running for example sudo -H gedit /etc/default/grub. Replace the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

and regenerate your grub configuration (run sudo grub-mkconfig -o /boot/grub/grub.cfg).

I'm using a Lenovo ThinkPad Edge E531 and experienced a similar issue where the machine was unable to enter deep sleep. The behavior was intermittent, and on resume, sometimes caused the touchpad to stop working on the wifi to disconnect.

I tried a dozen or so fixes suggested online, but the only solution that worked for me was installing UKUU and upgrading the kernel to 4.19.11-041911-generic.


How to run mysql command from terminal? I have the following sql command which I usually run in phpmyadmin by selecting the database, then running it in the command window.

DELETE FROM `wp_posts` WHERE `post_type` = "attachment"

However I've never done this via terminal before. My question is, how do I "point" this command to a specific database and then run it?

For you to run it from terminal, you need to be logged into mysql first and then you execute your program. The ideal code would be

mysql -u(username) -p(password) (the name of the database) -e "DELETE FROM `wp_posts` WHERE `post_type` = "attachment""

I`m sure this works, hope it helps

Okay basically it was "SELECT databasename;" then executing my command.


Persistent USB synced to my laptop I apologize if this is a duplicate, don't even know the right words to search.

What inspired the thought:I know I can backup to a USB. I also know that a USB can be a persistent(believe this means it saves data between sessions) OS.

I currently run UBUNTU 16.04. I love the speed of my SSD as well as the performance of how it is setup as a standard install, plus I don't have to worry about breaking the USB with it in a laptop all the time. However the idea of throwing that in my pocket and having MY software setup available when I get where I am going sounds amazing.

Is it possible to take the OS as it sits on my hard-drive and use that to create a portable OS? This way i have all my programs and files every time I leave the house and all I need is my flash-drive. This way I don't have to mess with windows period anymore, however being able to go to a friends and use his hardware setup with my software setup and not having to plug and unplug sounds amazing. Even if the USB cant back transfer this would be amazing. It sounds kind of far fetched to me, however the *nix community never fails to amaze me at what they can/have do(ne).

This will work if your back-up is under 8 GB.
I think its persistant and if not use Unetbootin to make a fresh persistant drive. I noticed that Ubuntu 16.04's built in Start-up disk creator still has a glitch the last time I tried to use it (I had to create an ISO folder and load the .iso from it. I thought it would work but it refused to load Ubuntu from the persistent usb.)

sudo add-apt-repository ppa:nemh/systemback
sudo apt-get update
sudo apt-get install systemback


Root filesystem check fails after power failure during installation During the "install" phase of the upgrade there was a power failure. After when starting up again the following errors are reported:

init: udevtrigger main process (420) terminated with status 1
init: udevtrigger post-stop process (428) terminated with status 1
init: udevmonitor main process (419) killed by TERM signal
The disk drive for / is not ready yet or not present
Continue to wait; or press S to skip mounting or M for manual recovery

Pressing M gives me the following message:

Root filesystem check failed.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.

I had the same situation happen -- power failure during upgrade.

Get to the maintenance shell, and try this:

sudo mount -o remount,rw /
sudo  dpkg --configure -a
sudo mount -o remount,ro /
sudo sync
sudo reboot

(the remount/sync at the end is probably just paranoia, but just in case...)

I experienced this error as well, but my problem (and thus the fix) were different.

After installing Ubuntu 11.04 successfully, I ran a dist-upgrade.  For whatever reason, during the upgrade, it randomly changed the drive letter in /etc/fstab for all of my partitions that were not identified by UUIDs.

Editing /etc/fstab and fixing the drive letter fixed the problem for me.


HDMI stops working with my new Acer aspire E3-112 I bourght a new Acer Aspire E3-112. I use external screens both at home and at work. After installing Ubuntu everyting worked. I used it at home and at work. The second day when I got home the external screen was not to be found in the system. I was almost like it stopped working.

After a while I tried to install Xubuntu. After installing there was no external screen but after updating I could find it but I had to activate it in the screen settings. I then used it a few more days but now the hdmi is nowere to be found. I can even see it in the settings so that I can activate it.

It looks like the HDMI port has been switched off. I have serched the net but found no help.

I have new information. I got back to my office and then the hdmi port worked. So I think that this is what happens.

I install Ubuntu with two monitors at home. My external is a 27 inch Panasonic. It starts to work after installing an updating. It will continue to work at home until I take it to the office and use my 21 inch LG monitor. It will continue to work at the office but I can't even see the port. I have attached an image where I have circled the hdmi port. In the office I can see the icon at home I can only see it after fresh install and update as long as I don't plug it in at the office.

I needed 10 reputation to post the pic.

I had a similar problem. I wiped Winows 10 and installed Ubuntu 14.04 and the HDMI output worked in that the laptop screen was mirrored to HDMI. So I could watch BBC iplayer for example. Then I upgraded to Ubuntu 16,04 and the only HDMI output was the ubuntu screen with no programs running . So I reinstalled Ubuntu 14.04 (clean install) and the only program that gets mirrored to HDMI is Skype. Not Firefox etc. I can no longer watch BBC iplayer on HDMI now.

Any ideas please?

That HDMI of E3-112 is "HDMI port with HDCP support" and which should be understood as "HDCP RESTRICTED" - High-Bandwidth Digital Content Protection, a copy protection scheme to eliminate the possibility of intercepting digital data midstream between the source to the display.

So at some moment the  restriction has been activated, most probably by online or offline event. Think what it could be in that direction.


unable to connect to hidden WIFI I have Xubuntu 16.04 and when i try to use the connect to hidden WIFI network I can choose the network i prepared before but the button connect is always dimmed
the user i use is member in these groups

$ groups
root adm dialout fax cdrom floppy tape sudo audio dip video plugdev
netdev lpadmin scanner sambashare vboxusers

so how i can solve this issue

It appears to be a bug: https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1542733

The workaround is to use a terminal like

nmcli c up id "SSID"

where you replace SSID by the name of your hidden Wifi.

Practically, using a hidden SSID is not helpful anymore.  It was really helpful back in the days of Windows XP or earlier when hidden networks were not showing anywhere unless one used specific third party software for revealing them.

Now, as you can see, it's just one more click and they're there.  It's better to unhide your network SSID, maximize your protection settings using WPA2/AES-256 exclusively and using a 20 or 32 character strong passphrase.

This way, you will use the maximum protection current wireless encryption technology can offer.


Unity Not loading after installing Nvidia proprietary drivers I just got a new Nvidia GTX 650. The huge downside at this point is that whenever I use the open source driver, the computer is ridiculously slow. Whenever I use the proprietary drivers and restart, the desktop wallpaper will load and nothing more. I've tried restarting unity only to get a continuous rolling error. With the CCSM options, unity is enabled, yet nothing appears.

Whenever I'm using proprietary drivers I get a microcode error which happens so quickly that I can't record the number.

Run this command in a terminal:

sudo apt-get autoremove fglrx --purge


bit torrent stopped working I have downloaded many times using bit torrent.  But it seems to not work now.  I have Nordvpn and wondered if maybe they changed something.  I have Ubuntu 18 on this computer and have tried qb and transfer.   I have Ubuntu 20 on the other computer and it has transfer on it.  I tried to download a file that was "trending" so it had a lot of seeds but still nothing.  Any ideas what could be causing things to no longer work?
Thanks.

Steps To Check

Update your Bit torrent
Check the Internet is connected and working. (You can try to open google.com in your browser)
Make sure one last time that you have the latest version of Ubuntu.
You can add tracker in your torrent file.Check this link

If anything will not work

Change Your torrent downloader(Utorrent is a good application)


How to install 3G dongles on Ubuntu 12? I just bought an unlocked Idea 3G Netsetter dongle (USB stick for internet connection) and have an Aircel SIM (3G activated on unlimited plan). I cnnnected my SIM properly with dongle.

Nothing happened!

Please tell me how to install it. I am using Ubuntu 12 with Windows XP (installed using Wubi).

P.S It's detecting on Windows but not on Ubuntu.

Thanks! :)

Insert your usbmodem.
Click on the network icon on the Right Side > Edit Connection > Select Mobile Broadband > Add
Follow the steps (select country and your service provider as Aircel). complete the steps by saving.
Click on the desktop taskbar network icon and select the connection made.

If you are using a Dlink DWM 156 Modem to connect to internet using your Aricel 3G Sim try to follow the instructions on this link it worked for me.

http://lawrencematthew.wordpress.com/2013/06/21/connecting-ubuntu-12-04-2-to-internet-using-d-link-dwm-156-3g3-75g-usb-modem/


Ubuntu 12.04 Window installer edition? Possible Duplicate:
  Why can't I download the Windows installer from the Ubuntu website?

I am using Windows 7. Now, I wish to install Ubuntu 12.04 with the Windows installer. But I cannot install it. Please guide me. How can I install Ubuntu 12.04 with the Windows installer on my computer?

To install Ubuntu with the Wubi installer (i.e., with the installer than runs in Windows and puts Ubuntu inside the partition that already exists for your Windows system), follow the official instructions (which are a click away from the download page).

If you encounter a problem while following these (or any other) instructions, it is best to post a question that includes a link to the instructions you're using, describes in detail what you did, and describes in detail whatever went wrong (including the full and exact text of any error messages).

Its very easy.  Read this guide here - http://ubuntu-helpcenter.blogspot.in/2012/03/p-002.html


Will I be able to upgrade to 13.04 from 12.10 with a Wubi installation? Will it be possible to upgrade to 13.04 from 12.10 on a wubi-enabled installation? I was looking at the schedule and noticed that Wubi is being discontinued.

I like the setup I have now (Windows 7 and Ubuntu 12.10), and would like to use 13.4.

Wubi instalations are not required but are working well. (You just notice that I/O disk performance is bad).
With the support dropped, you cannot instal it. You can however try and upgrade from 12.10 after having verified that there were no changes in grub/kernel versions from 12.10 to 13.04.
My advice is to keep a 12.04 LTS w/ Wubi if you want to keep that configuration.


After upgrade 14.04 to 16.04.1 Postgresql server does not start Just upgraded my system from 14.04. LTS to 16.04.1 LTS, postgresql does not start on systemd:

/etc/init.d/postgresql start
[ ok ] Starting postgresql (via systemctl): postgresql.service

# /etc/init.d/postgresql status
● postgresql.service - PostgreSQL RDBMS
  Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor     preset: enabled)
  Active: active (exited) since Вт 2016-08-09 13:40:51 MSK; 3min 23s ago
  Process: 23142 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
  Main PID: 23142 (code=exited, status=0/SUCCESS)Seems that

Seems that systemd script contains wrong data:

# cat /lib/systemd/system/postgresql.service
# systemd service for managing all PostgreSQL clusters on the system. This
# service is actually a systemd target, but we are using a service since
# targets cannot be reloaded.

[Unit]
Description=PostgreSQL RDBMS

[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=on

[Install]
WantedBy=multi-user.target

What should be correct script for postgresql?

Systemd should use script from /etc/init.d. Instead, systemd uses some kind of template file. To fix that, follow that steps:

Remove invalid service script:

# rm /lib/systemd/system/postgresql.service
Reload daemon scripts:

# systemctl daemon-reload
Enable postgresql service:

# systemctl enable postgresql

After that, you would be able to start postgres with any preferred variants: sudo systemctl start postgresql, sudo service postgresql start, or sudo /etc/init.d/postgresql start. To check that postgresql actually run, please check the status of service: sudo systemctl status postgresql. It sould looks like:

% sudo systemctl status postgresql
● postgresql.service - LSB: PostgreSQL RDBMS server
   Loaded: loaded (/etc/init.d/postgresql; bad; vendor preset: enabled)
   Active: active (running) since Пт 2016-08-12 10:13:43 MSK; 1h 37min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/postgresql.service
           ├─4086 /usr/lib/postgresql/9.5/bin/postgres -D     /var/lib/postgresql/9.5/main -c  config_file=/etc/postgresql/9.5/main/postgresql.conf
           ├─4099 postgres: checkpointer process
           ├─4100 postgres: writer process
           ├─4101 postgres: wal writer process
           ├─4102 postgres: autovacuum launcher process
           └─4103 postgres: stats collector process

авг 12 10:13:40 ubuntu-precise systemd[1]: Starting LSB: PostgreSQL RDBMS server...
авг 12 10:13:40 ubuntu-precise postgresql[4009]:  * Starting PostgreSQL 9.5 database server
авг 12 10:13:43 ubuntu-precise postgresql[4009]:    ...done.
авг 12 10:13:43 ubuntu-precise systemd[1]: Started LSB: PostgreSQL RDBMS server.

Not the nicest solution, but this solves the problem without having to dive into anything. Add this to cron:

@reboot sleep 5; systemctl start postgresql


Is Creating a Bootable USB Drive Permanent? More specifically, I want to know if when I put the Ubuntu OS on my flash drive if it is permanent or not. As in,can I delete the Ubuntu installation files after I install it on my computer and use it as a regular USB again? I just want to install Ubuntu on a unformatted hard drive and then be able to use my USB like normal again.

Sorry, I know I must sound very redundant. Thank you for the help.

After installation, you can use Disk Utility to reformat the USB drive so that it will work like normal again. The method for doing so can be found in this thread How to format a USB drive?

Nope. You can always reformat your USB again and fill it with what ever you like.


"Disable Touchpad while typing option" gone in Ubuntu 16.04 LTS This option, which was present in the "Mouse and Touchpad" settings panel in previous versions, is for some reason absent in 16.04 LTS. Does anyone know why this is, and/or how to fix it? Thanks.

I found a similar question AskUbuntu which provided a link to the details needed to solve this issue.
In short, edit your quirks file:
sudo vim /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf

And add the following to the end of the file:
# Disable generic Synaptics device, as we're using
# "DLL0704:01 06CB:76AE Touchpad"
# Having multiple touchpad devices running confuses syndaemon
Section "InputClass"
        Identifier "SynPS/2 Synaptics TouchPad"
        MatchProduct "SynPS/2 Synaptics TouchPad"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/event*"
        Option "Ignore" "on"
EndSection

Now restart Xorg:
sudo systemctl restart lightdm

Now, just start syndaemon as usual:
killall syndaemon
syndaemon -i 0.50 -m 0.10 -d -K

Note: For some reason, two-finger scrolling didn't work until I fully rebooted my laptop, but it eventually started working.
Edit
I eventually installed touchpad indicator like another answer suggests, when I had to switch to a different Dell laptop, and this fix no longer worked.

In gnome exists an extension that works perfect:
https://extensions.gnome.org/extension/131/touchpad-indicator/


Loosing my Win 8 loosing my Ubuntu this is the problem! I have installed Ubuntu with Win 8 but at first step it blocked my Win8! Unfortunately I had to reinstall my Win8 & all of my program.

I've search your site so it seems the problem is because of GRUB! So I've used these codes which I found in your site:

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

and after that these
sudo apt-get install -y boot-repair && (sudo boot-repair &)

and then boot & repair which unfortunately I've lost my Win 8 again!!!! So I've reinstall my Win but there is no boot menu at starting my PC to choose Ubuntu or Win 8 and my PC runs with Win 8!!!

So please help me to use lovely Ubuntu with my Win 8 together without loosing anything!

Additionally I am Beginner with Ubuntu.

Thank you.

Oh my god, actually you have made many mistakes
firstly, i have installed ubuntu and it dosnt block windows8, it do dual boot, however, you should tell ubuntu that when installing, this is the first mistake

the second mistake, NEVER FORMAT, DELETE OR WIPE ANYTHING
what i mean how could you delete windows 8 and reinstall it??
i will cry if i have forced to :'(

everything has a fix, ask me when it comes to boot, MBR or some similar problems
im expert in them :D

okay so here we need to fix things out, first GRUB is very cool bootloader

second, look at the internet on how to setup bootloader on a flash drive
i prefer GRUB4DOS

after you made the both and you able to boot from windows 8 and ubuntu using the flash drive, boot up windows 8,

first, make disk check by going to computer and right-click on the windows8 drive and in tools tab you will find disk check, do this cause sometimes the partition might run into error and cause linux to not detect it as an OS, like what happened mine

second, boot from ubuntu, and do bootloader repair, if it still boot up from one OS, then open up windows 8 again and google easyBCD, download and install this program and run it

with it you can manage everything about boot

first do MBR repair (in the program)
then click "edit" tab and delete your windows8/ubuntu boot
then click on "add new" tab and choose windows 8, and choose on what drive windows 8 is, or i might detect it automaticlly, and then go again to "add new" tab and add linux boot

after that, go to "edit boot menu" and edit your boot as you prefer, how much counting time and other settings

after you have done, reboot your system and test it, if it dosn't work, im sorry i cant help you

however, if it worked im not sure if it will boot using normal linux bootloader

and lastly, i might have some errors in this answer cause i'm now using ubuntu so i cant run the program and tell you the exact same thing
tell me if you have faced more problems


Is there any advantage in using propietary video drivers over the open source ones? I have been using Ubuntu as my main OS for 3 cycles now, with a Radeon HD 4870 video card. In every cycle the open source video drivers were not enough, meaning that something was not working right. Weather it was the movies or Unity 3D (compiz cube in the old days) I always had something which was not working. So I always installed the ATI proprietary drivers, thus solving the issues.

Precise was the first OS upgrade I have ever made (for the old ones I always made a complete new install). So, before upgrade, I have uninstalled the ATI drivers and reverted to the open source one in order to avoid issues.

After the upgrade everything is working as it should with the open source drivers Gallium 0.4. I have all the nice 3D features and full HD movies are running.

So, I am really asking myself, if there would be any reason for me to turn back to the propriety drivers from ATI? I mean do you guys know for sure there are some features present that are not in the open source one drivers?

Thanks.

The proprietary drivers typically enable or enhance 3D support on some cards, as well as potentially providing enhanced 2D. They are also said to allow the card to operate at a lower temperature. They might, I suppose, also enable fan control if the open driver doesn't.

In practical terms, it comes down to the combination of driver and your particular set of hardware and the programs you use. Adding the drivers, and falling back to the open driver, is easy using Additional Drivers.

In my case, during the 12.04 beta period, I found that using ATM's Radeon driver corresponded with frequent crashe of a few of the applets I was using. Since I don't need to push my machine's 3D capabilities, I opted for the open driver.

Sometime the open source drivers are better, sometimes the proprietary ones.  If it ain't broke, don't fix it!


How to configure a second IP address and bind it to a VBoxHeadless virtual machine? I've requested my ISP to dedicate me a second Internet IP address and have got it. Now I need to configure it (I've never had any experience with using multiple IP addresses on one network interface) on my Ubuntu 10.04 server so that it will be a public address of a VirtualBox (VBoxHeadless) machine (running Ubuntu 10.04 Server as well). Would you be so kind to tell me how can I do so, or at least what docs to read and what specific subjects to google for?

The easiest way would be to set the virtual machine to use ‘bridged’ networking on the host's normal eth0 interface. Then set up the guest OS to use the second IP address as a static IP, whilst the host OS continues to the the first static IP.

With this approach, you don't have to set up multiple interfaces on the host OS or NAT rules to map the guest to a particular external IP. The guest and the host use different interfaces on the same shared network adapter.

Just to add, in my case (strato.nl) I had to set the same MAC address in the guess as the one in the host, also check the route configuration of the host.


Setting up a home network to support server applications I'm trying to setup a home network using Linux (14.04) and would like to know what the process is called where you have a client machine (or several) connected to a server using the programs from the server instead of the client. Like in schools and enterprises.

I have no idea what this process is called so I cannot Google it.

I have tried some methods like using LDAP & NIS, But they crash my client machine.

Could someone tell me what the name of this system is?

The setup you are describing is often referred to as a thin client configuration. You may find the Linux Terminal Server Project (LSTP) a good place to start.

It may be that you are thinking of multi-tiered architecture. This would have a client like a browser, a web server like Apache, a database like SQL, etc.

To set that up at home, look for LAMP (Linux-Apache-MySQL-PHP) and you'll find a lot of information including tutorials on setup, etc.


virtualbox installation through apt gets stuck on ubuntu 18.04 bionic beaver I am trying to install virtualbox package using the command:

sudo apt-get install virtualbox

this installs three packages; virtualbox, virtualbox-qt and virtualbox-dkms. But the installation does not complete and gets stuck in between while installing virtualbox-dkms:

selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../6-virtualbox-dkms_5.2.10-dfsg-6_all.deb ...
Unpacking virtualbox-dkms (5.2.10-dfsg-6) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../7-virtualbox_5.2.10-dfsg-6_amd64.deb ...
Unpacking virtualbox (5.2.10-dfsg-6) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../8-virtualbox-qt_5.2.10-dfsg-6_amd64.deb ...
Unpacking virtualbox-qt (5.2.10-dfsg-6) ...
Setting up libqt5x11extras5:amd64 (5.9.5-0ubuntu1) ...
Setting up libvncserver1:amd64 (0.9.11+dfsg-1ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Setting up virtualbox-dkms (5.2.10-dfsg-6) ...
Loading new virtualbox-5.2.10 DKMS files...
Building for 4.15.0-22-generic
Building initial module for 4.15.0-22-generic
Progress: [ 70%] [########################################..................]

I was previously using ubuntu-16.04 and this process seemed to work.
Others are facing similar issue and have posted on this thread.

i have no clue to get it to work. Any workarounds.

thanks in advance

turns out, disabling secure-boot did the trick. hence the question is resolved.


How can I connect to a forticlient ssl-vpn via Terminal? I need to connect my machine to a forticlient getaway but I don't know how to do it via terminal I don't mean the command to open the GUI, but the commands tho connect and disconnect assuming that I already have my vpn connection profiles configurated if it's there any command like:

fortissl connectionname on

or something like this:

fortissl (serverIP) (username) (password) (port) (example)

That should be nice as well I'm using ubuntu 18.10 and the foti app is Forticlient SSL-VPN

Basically I don't want to open the GUI anymore, just connect to the server via Terminal, then I'll be trying some bash things with that.

Since I was recently found about this too. It is all running in CLI by the way
You can Download Fortigate SSLVPN CLI and extract it to any folder then navigate to to forticlientsslvpn/64bit/ or forticlientsslvpn/32bit/
after that just run: ./forticlientsslvpn_cli --server serveraddress:port --vpnuser username
And you are done.
Source: https://www.networkreverse.com/2020/09/setup-linux-router-with-forticlient.html


No OS found, after installing Ubuntu on my Sony Vaio I installed the newest Ubuntu on my Sony Vaio. Now, It can not boot.

I get this on screen:

Yukon PXE v6.65.1.1 (alpha) (20090623)
© Copyright 2003-2009 Marvell ®. All rights reserved.
Pre-boot eXecution Environment (PXE) v2.1
© Copyright 1997-2000 Intel Corporation
PXE-E61: Media test failure, check cable
PXE-M0F: Exiting PXE ROM

Then it tells me:

  No OS found

You must make sure that you have ubuntu installed compeletely.
Has the ubuntu boot entry been added to the MBR?

So you tried to install ubuntu, replacing windows? You may have been running it off of the USB, instead of installing it on your HDD/SSD, which would cause the computer to be unable to boot if you unplugged the USB. If so, try plugging any USBs that you had plugged in at the time of install back in and try to reboot.


How to Start Using Ubuntu I have already completed installation of Ubuntu alongside Windows. When I try to launch Ubuntu, it's either my screen just shows zigzags or the desktop launches but I cannot do anything on it. It would show the Keyboard Shortcuts, which I cannot close. There is also an error message at the upper left corner that says "System program problem detected" and asks if I want to report the problem. I'm trying to do something, but my mouse pointer won't even move anywhere.

Try reinstall ubuntu.
It might be a corrupt version. It could also be a different architecture (32bit / 64bit).

Your mouse could be having a driver related problem also. Use keyboard's "super"(Windows) key to open dash. Search Additional drivers. Install your mouse's drivers their. Reboot and check if it works!!

if you have NVIDIA drivers you may need to replace them. search NVIDIA web site for NVIDIA-Linux-x86_64-346.35.run


Terminal exits after pressing  or When I open terminal and press Enter or Tab multiple times, terminal exits i.e. when i type ls and press Enter or cd and press Tab all the terminal window get close. How can I solve this problem?

This behavior is usual if you have the line set -e in your ~/.bashrc or any user/global configuration file of the shell that will be sourced when you start the shell. From help set:

-e  Exit immediately if a command exits with a non-zero status.

Run the following and try exactly what you were doing, you'll now get the normal behavior i.e. bash_completion:

set +e

To permanently fix this find where the set -e is set (should be in ~/.bashrc) and either comment out that or set it as set +e.

Its due to the change in permission settings of /tmp/ folder.

 chmod 1777 /tmp

Now the problem solved.


Python has unmet dependencies I used this command for downloading software center

sudo apt-get install software-center

this error pops up

python-lxml but it is not going to be installed

Tried

  sudo apt-get purge python
  sudo apt-get install python2.7

and now I got more errors

software-center :Depends: gvfs-backends
                 Depends: python-lxml but it is not going to be installed
                 Recommends: update-notifier but it is not going to be installed

The error here isn't an issue with python but with python-lxml that it is not installed. Try the following :

  sudo apt-get install python-lxml
  sudo apt-get install software-center

This shoud resolve your issue.


Attempted removal and reinstallation of LibreOffice failed I desperately need to get LibreOffice installed and useable on my system (Ubuntu 16.04). I had tried to install it my self using terminal probably using (cannot remember specifically):

sudo apt-get install libreoffice

But I was not able to find and open any of the libreoffice software. So I tried using the Ubuntu software manager GUI to install it instead. On searching for 'libreoffice', the manager displayed the option to "remove" programs: writer, calc, draw, impress and base; suggesting that these are already installed. But I was not able to open them using terminal i.e. by writing:

libreoffice writer

So I ran the following in terminal (terminal lines in image 2 begin from the last line in image 1). Apologies, but my lack of "reputation points" won't allow me to take more than two screen shots, so I have written the terminal lines which were displayed before those in terminal screen-shot 1 (but the formatting for this text box and the ensuing published material is ridiculous):

vascofmbull@vascofmbull-ThinkPad-S2:~$** sudo dpkg -r libreoffice
[sudo] password for vascofmbull:
(Reading database ... 219354 files and directories currently installed.)
Removing libreoffice (1:5.2.2-0ubuntu1~xenial0) ...

vascofmbull@vascofmbull-ThinkPad-S2:~$ man dpkg
vascofmbull@vascofmbull-ThinkPad-S2:~$ libreoffice
The program 'libreoffice' is currently not installed. You can install it by typing:
sudo apt install libreoffice-common
vascofmbull@vascofmbull-ThinkPad-S2:~$ sudo apt install libreoffice-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-dejavu fonts-sil-gentium fonts-sil-gentium-basic libabw-0.1-1v5
  libcdr-0.1-1 libcmis-0.5-5v5 libe-book-0.1-1 libeot0 libetonyek-0.1-1
  libfreehand-0.1-1 libmspub-0.1-1 libmwaw-0.3-3 libodfgen-0.1-1
  liborcus-0.10-0v5 libpagemaker-0.0-0 libreoffice-gtk
  libreoffice-report-builder-bin librevenge-0.0-0 libvisio-0.1-1
  libwpd-0.10-10 libwpg-0.3-3 libwps-0.4-4
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  libreoffice-style-breeze libreoffice-style-hicontrast
  libreoffice-style-human libreoffice-style-oxygen libreoffice-style-sifr
  libreoffice-style-tango
The following NEW packages will be installed
  libreoffice-common
0 to upgrade, 1 to newly install, 0 to remove and 135 not to upgrade.
65 not fully installed or removed.
Need to get 0 B/22.5 MB of archives.
After this operation, 85.4 MB of additional disk space will be used.
(Reading database ... 219351 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.2.2-0ubuntu1~xenial0_all.deb ...
Unpacking libreoffice-common (1:5.2.2-0ubuntu1~xenial0) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.2.2-0ubuntu1~xenial0_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.1-9775
rmdir: failed to remove '/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/share/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...

I'm sorry for the mess that I produced in the terminal. But I figured it would be best to show everything that I did.

Any suggestions as to how I can install and use libreoffice on my system?

Download LibreOffice from the official website and install using sudo dpkg -i (the .deb file name)


Booting Android with GRUB, but how? I have a small problem. I have seven partitions:

Device    Boot   Begin       End         Blocks     Id   System
/dev/sda1   *      206848   219013119   109403136    7  HPFS/NTFS/exFAT     <-- wINDOWS 7
/dev/sda2       219013120   735516671   258251776    7  HPFS/NTFS/exFAT     <--Musik,....
/dev/sda3       735516672   815638527    40060928    7  HPFS/NTFS/exFAT     <-- Android
/dev/sda4       815640574   976771071    80565249    5  Erweiterte          <-- No Idea:D
Partition 4 does not start at a physical sector boundary.
/dev/sda5       815640576   872494091    28426758   83  Linux               <--Kali Linux
/dev/sda6       970151936   976771071     3309568   82  Linux Swap / Solaris
/dev/sda7       872495104   970149887    48827392   83  Linux               <-- Ubuntu

I found a tutorial, but I tried this and it doesn't work. Here's the link:

http://www.webupd8.org/2012/03/how-to-dual-boot-android-x86-and-ubuntu.html

I used this Android from android-x86.org and the version android-x86-4.4-r1.iso.

This is my 40_Costum document:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Android-x86" {
set root='(hd0,3)'
linux /android-x86-4.4-r1/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-x86-4.4-r1
initrd /android-x86-4.4-r1/initrd.img}

If I start my PC the GRUB boot manager comes and I can choose Android, but it doesn't boot Android. The background is purple and nothing happens.

What would be a complete and working 40_Customm script?

It doesn't work if I make a script in Grub Customizer and save it. It doesn't show on the boot menu if I open the Grub Customizer again the script is removed.

This is my code :

set root='(hd0,3)'
`search --no-floppy --fs-uuid --set=root 28D9FDF951298246
linux android-x86/kernel root=UUID=28D9FDF951298246  quiet
androidboot.hardware=generic_x86 SRC=/android-x86 acpi_sleep=s3_bios,s3_mode
initrd Android-x86/android-4.4-r1/initrd.img

Now I have one extra Problem:

If I Start my laptop it shows Ubuntu, Windows, Kali Linux and Android (which doesn't work ), but if I start the GRub Costumizer the Windows isn't listed?! But Why?

Regarding Android x86 6.0

The "EEEPC" assignment is only for ASUS EEEPCs, only use it if you have one, otherwise use android_x86, do not use generic_x86, you will get stuck at the boot animation and have to restart by using CTRL+F1 to access the terminal and issue reboot as the GUI will not get loaded. I know this because I spent several hours following bad, though well intentioned, advice.

set root='(hd0,4)'
linux /android-6.0-rc1/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 acpi_sleep=s3_bios,s3_mode SRC=/android-6.0-rc1
initrd /android-6.0-rc1/initrd.img

This was the final configuration that worked for me on an old school SONY VAIO 64 bit on a triple boot setup.

'(0,4)' was the location of my hard drive and partition Android x86 was installed to, change it accordingly. You do not need your UUID, you only need exactly what I have put above with your installation location being the only change.

Don't bother with the sda or sdc, it is always (hd0,x) in my case if you installed the android x86 to the booting device. That's to say, in my case, whether your device is listed in os like ubuntu as /dev/sda or /dev/sdb, you should add (hd0,x), x is the number of your android x86 partition, in the grub 2 item, as long as you boot up with the same device you installed your android x86(for example, you installed android x86 in a usb drive named U at partition 3, and U listed in your ubuntu as /dev/sdc, but you boot from U, then you should add root=(hd0,3) but not root=(hd2,3) in the grub).


"Files" file manager utility 3.10.1, How do I uninstall it? This thing just showed up one day.  I already have dolphin and Konqueror.  It doesn't show up on the taskbar.  I am running kde, with kdm on Ubuntu Linux 14.04.  Now every time I start my machine, this shows up with the Documents folder open.

I close it down, but every now and then it re-launches itself,  Yet, I can't find any representation of it anywhere, not even in Task Manager (though it could be showing there under a different name).

Some update has changed something involving that program showing "Files" as it's name; The name is very unspecific, and used by multiple different programs. After finding out which programs can be run under this name, the rest of the problem may be easy to solve.

Find out which programs show up with the name "Files" when run

We need to look into all *.desktop files for the name. There, we find the command in the Exec line:

locate -b '.desktop' | xargs grep -ls '^Name.*=Files$' | xargs grep '^Exec.*'

lists desktop file names and commands for the GUI program File - replace that with the exact name you look for - even it it's multiple words (for substring search, leave out the = and $).

With the command, I find Files may be nautilus, dolphin or active-filebrowser:

/etc/xdg/autostart/nautilus-autostart.desktop:Exec=nautilus -n
/usr/share/app-install/desktop/nemo:nemo.desktop:Exec=nemo %U
/usr/share/app-install/desktop/plasma-active:kde4__active-filebrowser.desktop:Exec=active-filebrowser -graphicssystem raster %u
/usr/share/applications/nautilus-folder-handler.desktop:Exec=nautilus %U
/usr/share/applications/nautilus.desktop:Exec=nautilus --new-window %U
/usr/share/applications/nautilus.desktop:Exec=nautilus --new-window

Here's my solution for Kubuntu 14.04:

    sudo apt-get remove furiusisomount nautilus nautilus-data brasero

I think nautilus, nautilus-data and brasero where installed when I installed furiusisomount.


How do I add and/or keep subtitles when converting video? I have a mkv video I want to convert to mp4, but every which way I try and convert it (Handbrake, WinFF, ffmpeg, mencoder,...I lose the video's subtitles.  How can I convert the video,keeping the subtitles, or add a subtitles.srt?

I also would like 2 pass encoding with a video bitrate of 4054 and audio bitrate of 160.

Thanks.

I was asked for the ffmpeg -i:

joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos$ ffmpeg -i iron.mkv
ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav     developers
built on Jun 12 2012 16:52:09 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[matroska,webm @ 0x1a319a0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'iron.mkv':
Metadata:
title           : Iron
Duration: 02:06:01.67, start: 0.000000, bitrate: 1280 kb/s
Chapter #0.0: start 0.000000, end 546.170622
Metadata:
  title           : Chapter 00
Chapter #0.1: start 546.170622, end 1080.579489
Metadata:
  title           : Chapter 01
Chapter #0.2: start 1080.579489, end 1609.941667
Metadata:
  title           : Chapter 02
Chapter #0.3: start 1609.941667, end 2101.849733
Metadata:
  title           : Chapter 03
Chapter #0.4: start 2101.849733, end 2595.259333
Metadata:
  title           : Chapter 04
Chapter #0.5: start 2595.259333, end 3158.488667
Metadata:
  title           : Chapter 05
Chapter #0.6: start 3158.488667, end 3564.644400
Metadata:
  title           : Chapter 06
Chapter #0.7: start 3564.644400, end 4052.423356
Metadata:
  title           : Chapter 07
Chapter #0.8: start 4052.423356, end 4304.300000
Metadata:
  title           : Chapter 08
Chapter #0.9: start 4304.300000, end 4711.206489
Metadata:
  title           : Chapter 09
Chapter #0.10: start 4711.206489, end 5080.575489
Metadata:
  title           : Chapter 10
Chapter #0.11: start 5080.575489, end 5700.111067
Metadata:
  title           : Chapter 11
Chapter #0.12: start 5700.111067, end 6269.346400
Metadata:
  title           : Chapter 12
Chapter #0.13: start 6269.346400, end 6811.471333
Metadata:
  title           : Chapter 13
Chapter #0.14: start 6811.471333, end 7561.679000
Metadata:
  title           : Chapter 14
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default)
Metadata:
  title           : 3/2+1
Stream #0.2(ita): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Metadata:
  title           : 3/2+1
Stream #0.3(eng): Subtitle: pgssub (default)
Stream #0.4(eng): Subtitle: pgssub
Stream #0.5(eng): Subtitle: pgssub
Stream #0.6(eng): Subtitle: pgssub
At least one output file must be specified
joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos

Softsubs

MP4 supports streaming text format subtitles, but playback support for this among players and devices is not universal.

Basic example using default stream selection behavior while stream copying the audio:

ffmpeg -i input.mkv -c copy -c:s mov_text output.mp4

Example to stream copy all of the video and audio streams, convert the all text based subtitle input streams (SRT, ASS, VTT, etc) to the streaming text format, and set the language for the first two subtitle streams.

ffmpeg -i input.mkv -map 0 -c copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=ipk output.mp4

Same as above but re-encode the video and audio to formats compatible with the MP4 container (H.264 video:

ffmpeg -i input.mkv -map 0 -c:v libx264 -c:a aac -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=ipk output.mp4

Same as above but use the -map option to choose the first video stream, second audio stream, and third subtitle stream:

ffmpeg -i input.mkv -map 0:v:0 -map 0:a:1 -map 0:s:2 -c:v libx264 -c:a aac -c:s mov_text -metadata:s:s:0 language=eng output.mp4

Hardsubs

Text based subtitle format inputs

Use the subtitles filter to "burn-in" text based subtitle formats (SRT, ASS, VTT, etc). Note that this requires re-encoding, so it will by much slower than using softsubs.

Basic example using default stream selection behavior while stream copying the audio:

ffmpeg -i input.mkv -filter_complex "subtitles=input.mkv" -c:a copy output.mp4

Example to use the third video stream, fifth subtitle stream, and first audio stream:

ffmpeg -i input.mkv -filter_complex "[0:v:2]subtitles=input.mkv:si=4[v]" -map "[v]" -map 0:a:0 -c:a copy output.mp4

Example for a separate subtitle input file (your-subtitles-file.srt):

ffmpeg -i input.mp4 -filter_complex "subtitles=your-subtitles-file.srt" -c:a copy output.mp4

Image based subtitle format inputs

Use the overlay filter. This example will overlay the fourth subtitle stream over the second video stream, and stream copy the seventh audio stream:

ffmpeg -i input.mkv -filter_complex "[0:v:2][0:s:3]overlay[v]" -map "[v]" -map 0:a:6 -c:a copy output.mp4

Also see

FFmpeg Wiki: Subtitles
How to use the -map option to choose streams

Well I found a way to make it work, not ideal, but it works. I can add a srt to a video with mkvmerge. Only downfall is it makes the video mkv, not mp4.


How do I apt-get -y dist-upgrade without a grub config prompt? Per Make apt-get (or aptitude) run with -y but not prompt for replacement of configuration files?

I did the following:

ec2run ami-3c994355 --region us-east-1 -n 1 -t m1.large -z us-east-1d

On the machine:

sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

I still get a prompt asking me which config file I want to use. These are the lines that come before the prompt:

Setting up grub-pc (1.99-21ubuntu3.1) ...

then:

                         ┌───────────────────────────────────────────────────────┤ Configuring grub-pc ├───────────────────────────────────────────────────────┐
                         │ A new version of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.  │
                         │                                                                                │
                         │ What do you want to do about modified configuration file grub?                                                                      │
                         │                                                                                │
                         │                                     install the package maintainer's version                                                        │

The /etc/default/grub file is generated at package install time, which is necessary because it integrates with debconf. This means that it can not treated as a dpkg conf file, and so dpkg's configuration file handling doesn't know about it.

Instead, it uses ucf, a more sophisticated Debian tool for handling configuration. This, unfortunately, doesn't understand dpkg options, so setting Dpkg::Options::="--force-confdef" won't help. It does have its own way of doing no-prompt upgrades, though, through the UCF_FORCE_CONFFNEW and UCF_FORCE_CONFFOLD environment variables.

ucf uses debconf for prompting, so setting the debconf interface to noninteractive will also silence the message. If you really want non-interactive updates you'll need to do this anyway - arbitrary packages may ask debconf questions (although they generally won't during upgrades).

You can set the debconf interface as a one-off by adding DEBIAN_FRONTEND=noninteractive to your environment, or can set it permanently by running dpkg-reconfigure debconf and selecting the noninteractive frontend. If you're using the noninteractive frontend you'll get the default answer for any questions a package might ask.

For ucf, the default answer is “keep the existing file”.

So, the full command to do a really, 100% guaranteed¹ no-prompting update would be.

sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

¹: It's technically possible for packages to use another method of prompting than debconf, but this is against Debian policy. If you run across such a package, file a bug.

I've been wrangling with the same issue on Ubuntu 18.04 the past few days. On launching a new EC2 instance (specifically ami-00035f41c82244dab), I run an automated provisioning script (via User Data config supplied at the time of initialisation), one of the first steps of which is to run apt update/upgrade.

The script gets blocked while the user is prompted about modified GRUB files - first /etc/default/grub, and then /boot/grub/menu.lst. Since this is running in an unattended mode when supplied as User Data, the process stalls and never recovers.

From lots of Googling, it seems this has been a long-running GRUB issue in one form or another, with fixes being applied and then latter regressing again, as far as I can tell.

Ultimately, the only workaround I have been able to apply successfully is the following ugly hack in my provisioning script. Hopefully it might get somebody else out of a bind though!

#!/bin/bash

apt update

### Workaround: Pre-update /etc/default/grub and remove /boot/grub/menu.lst to avoid 'file changed' prompts from blocking completion of unattended update process
patch /etc/default/grub <<'EOF'
10c10
< GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0"
---
> GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 nvme.io_timeout=4294967295"
19c19
< GRUB_TERMINAL=console
---
> #GRUB_TERMINAL=console
EOF
rm /boot/grub/menu.lst

apt upgrade -y

### Workaround part 2: re-generate /boot/grub/menu.lst
/usr/sbin/update-grub-legacy-ec2 -y

I can only assume the problem I encountered is quite specific to the Ubuntu 18.04 AMI version currently available, and any updated version that incorporates newer GRUB packages may not be subject to the same issue. In particular, the nature of the changes to /etc/default/grub are not likely to be applicable to newer versions of the AMI. Just putting this out there anyway.


Installing ubuntu 14.04 or higher on PCIe G3x4 SSD with Windows pre-installed I just recently bought this laptop with Windows 10 pre-installed in it on the SSD. I want to install Ubuntu 14.04 on this SSD (does not matter if I have to remove Windows for that) and use 1 TB HDD to store data.

The problem I am having right now is that Ubuntu installer does not detect SSD, it only shows 1 TB HDD. I have tried different versions of Ubuntu (14.04, 15.04, 15.10) but the same problem is there. Also, GParted (latest version with support for NVMe devices) is not able to show the SSD but Windows shows both SSD and HDD. SSD has NVMe controller type and PCIe as controller interface whereas HDD has AHCI controller type and SATA as controller interface and the SATA Configuration is RAID. There is no option in UEFI to change any of these options.

I am not able to figure out why the SSD is not being shown on Ubuntu installer or GParted. Does anyone have any idea what can be the reason?

EDIT : It looks like it might be because Intel Rapid Storage Technology (RST) is enabled. Can this be the reason that GParted and Ubuntu is not able to see the SSD? There is no option to disable it from the UEFI. How can I disable it from Windows 10? Also, only windows can see SSD and it has Windows OS installed on it.. Is it possible that it is locked so that no one else can see it? Any help will be appreciated.

Thanks in advance.

Your problem was likely caused by this bug in GParted. That bug was fixed in version 0.24.0 on October 27th, 2015. Please try again with a newer version of GParted and you should no longer have any problems!

First, you need to disable secure boot on your laptop. Startup your laptop and go into the BIOS - this is usually F2/F10 key. Change the setting in boot to disable secure boot and disable UEFI if its enabled. Use the legacy mode to install. When the Ubuntu install screen appears it will automatically setup the system with UEFI if its available.

If the above does not help, then you need to remove the disk from the laptop and put it into an another laptop or an usb 2 enclosure to find out if the disk is alright.


Will long-term use of ubuntu via wubi harm my PC? I do see a part of my question being discussed already. The specific answer I'm looking for  is, will LONG-TERM use of Ubuntu via Wubi harm my PC (i.e cause irrevocable h/w failure or damage my windows 7 installation)...? My daily use is a few hrs (say 4-8 hrs/day) on Wubi-Ubuntu. I certainly don't want to shorten my PC's expected life-span by using Wubi. I am so far glad with wubi's performance on my thinkpad T510, so no major complaints on that end. Also re-partitioning my HD is not an option for me since I'm not an "adept" in computers and won't wanna affect existing win 7 installation or the manufacturer's recovery partition. Thanks in advance for suggestions!

No, using Wubi or extended periods of time will not shorten the life span of your computer at all.

However, there are many advantages to dual booting as opposed to using Wubi. For example:

Wubi is slower then a dual booted Ubuntu install, and Wubi installs cannot Hibernate (it can Suspend).
Wubi installs are also much more likely to break through an update.
Dual booting the computer does not endanger Windows 7 at all, and the Ubuntu installer makes dual booting very easy.

I would highly recommend dual booting if you intend on using Ubuntu for long periods of time.

From my experience, I can say that Installing Ubuntu with Wubi should be avoided, for sure. Also, Canonical should neither recommend nor support Wubi installations, as it will mar Ubuntu's image in the market. I had installed Ubuntu on my Acer system under Wubi. Whenever I was using Ubuntu, my system used to touch 90 degrees. However, on Win7, its temperature used to stay at around 60 degrees. During the overheats, the system used to promptly shut off. Now this problem has become permanent in my system, and even leads to shutdowns in Windows. This could've been a problem specific to my Acer. But soon, I did the same thing on a one day old Lenovo IdeaPad, and what would you know? It started feeling like a frying pan the moment I installed Ubuntu on Wubi. If you really want to use ubuntu, do so on a separate partition, natively. Avoid Wubi.


Samba suddenly stopped working I have weird problem suddenly, my windows 8.1 machine cannot connect to samba share anymore. It has been working for months without any problem but now it just stopped working. I was writing an essay and I managed to create the file to server but not save it again after that, my word just went blank and stopped responding and video that I was playing stopped playing. I tried to copy video file from server to computer and got this error. I have added network location to Computer and from there I can connect to samba share but I can't copy anything and it just kinda feels that it loses connection after while. If I press network on explorer it does not find my server from there. My android phone is also unable to play videos so it might be problem on server side. I tried to restart smbd without any good, I also restarted whole server without help. So in a nutshell I can view the files as in list but can't open them. I can also connect to server via ssh without problem. Server is running Linux Ubuntu 14.04.3 and I haven't done any changes lately. What can I do? I can provide more info if needed.

I am having the same issue. I have Ubuntu 14.04 server running that I have been running forever, well as long as it has been out. Before that I ran 12. I have been using Samba for years without any problems. No withing the past two days it has stopped working. I can connect to the share, but when I try to access any folder in it. I get the following message on my windows 7 box:
Windows Error

The only thing that I did was apply updates to Ubuntu, nothing to windows. If I can provide any more information to assist in clearing this up let me know.

I forgot to mention. I also configured Samba to accept root login. I was able to log into the share, but couldn't access any directories. Same as regular user.


How can I fix bad screen tearing on Ubuntu 15.10 with an Nvidia GTX 960? When I play games or watch videos, there is very noticeable screen tearing.

I have tried turning on vsync in both the game and the nvidia
settings (sync to vblank).
I have tried setting the image quality and powermizer to best
performance.
I have tried setting 'force full screen redraw' in
compizconfig-settings-manager.
I tried adding the intel section to xorg.conf with 'tearfree' option
set to true.
I tried setting the -bs option in lighdm 50-server-command.conf
I also tried to use the 355.11 drivers.

None of that has helped.

I'm using Ubuntu 15.10, GTX 960, and am using the proprietary 352.55 nvidia drivers. I have an intel i5 processor.

What else can I try?

Had same problem in xfce 15.10. Switching the windows compositor solved my issue

http://duncanlock.net/blog/2013/06/07/how-to-switch-to-compton-for-beautiful-tear-free-compositing-in-xfce/


External USB hard disk not seen in device window I am attempting to format an external hard drive in Linux (as opposed to Mac or PC).  I am running the Ubuntu Linux 14.04 desktop on my MacBook pro through Parrallels.  When I click the Dash button, and then disks, my internal hard drive shows up under devices but any USB  external hard drives connected to the Mac do not, even though it is visible in my laptop window. So,

Can I format a hard drive in Linux?
Is there a way of seeing this hard drive listed under "devices" in Ubuntu?
Since I'm not a programmer or computer tech is there a simple answer which doesn't require using the command lines.

The reason for a Linux format is that movie theaters require picture and sound files to be sent on a Linux formatted hard drive. Mac formatting is a single click on the disk utilities app.  I have yet to find a simple way of creating a Linux formatted disk. Any help would be greatly appreciated.

Try installing gparted from the software center (or via command line with sudo apt-get install gparted). Gparted is a very powerful partitioning program which can format drives in many different ways through a simple graphical interface.


Bluetooth Keyboard and mouse disconnect when idle for a few seconds and reconnects when moved / typed on Ubuntu 20.04 I have a keyboard K850 and a M720 Triathlon mouse both from Logitech. They work correctly but get disconnected when idle.
The behaviour seems to be like an auto suspend function where the device disconnects after a few seconds and reconnects when there is interaction. It makes the use of these device tedious, specially the keyboard as it does not remember the key strokes when it reactivates and it takes a few secs to become responsive again.
I researched online and found a few solutions related to autosuspend of bluetooth and usb. For instance I tried the following line in grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash btusb.enable_autosuspend=n usbcore.autosuspend=-1 usbcore.autosuspend_delay_ms=-1"
Which does not work for me.
This is a session with bluetoothctl:
root@balearics:~# bluetoothctl
Agent registered
[CHG] Controller 5C:87:9C:35:87:83 Pairable: yes
[M720 Triathlon]# devices
Device C9:58:68:E2:1A:D9 M720 Triathlon
Device DA:95:18:89:C3:30 Keyboard K850
[CHG] Device C9:58:68:E2:1A:D9 ServicesResolved: no
[CHG] Device C9:58:68:E2:1A:D9 Connected: no
[CHG] Device C9:58:68:E2:1A:D9 Connected: yes
[CHG] Device C9:58:68:E2:1A:D9 ServicesResolved: yes
[CHG] Device DA:95:18:89:C3:30 ServicesResolved: no
[CHG] Device DA:95:18:89:C3:30 Connected: no
[CHG] Device DA:95:18:89:C3:30 Connected: yes
[CHG] Device DA:95:18:89:C3:30 ServicesResolved: yes
[M720 Triathlon]#

As you can see after idling it gets disconnected and when I touch it / type it gets connected again.
Any help would be appreciated

You didn't make it clear if you'd gone through the GUI and power settings, so I'll take a stab at this.
Open your power settings and disable the ability to suspend Bluetooth devices to save power.

maybe this is working ( I do not use bluetooth devices)
create a file
/etc/modprobe/btusb.conf

with conntent.
options btusb enable_autosuspend=0

Make i reboot.


Cannot load grub4dos through kexec I execute

sudo kexec -l /sbin/grub.exe
sudo kexec -e

and get black screen with some phrases. The font is squeezed vertically and I see also one copy of the same phrases on the right. There are phrases (I could confuse numbers)

"... root is (0x80.0)
"Processing the preset menu ...
Launching GRUB ..."

It doesn't hang up because if I wait for 10-20 seconds, one more phrase appears "If hangup, use 'geometry --lba1sector (120)' at the beginning of preset menu."

I tried to insert that string in menu.lst. No effect. Also I tried --reset-vga option of kexec and tried its --append='...' option to pass the same content of menu.lst to grun4dos as its parameter. The same result.

I didn't make changes in MBR or partition boot sector especially for grub4dos. I have menu.lst and grldr on C: drive and one string in boot.ini there. In this way I can load Ubuntu through grub4dos.

That was for grub4dos 0.4.5. With grub4dos 0.4.4 I can reach some menu, font is squeezed and input is disabled.

kexec is configured in the way to make quick restart by means of it when I press Shut Down -> Restart. This way it is working fine.

Any suggestions how to solve this issue? Maybe Ubuntu should do first some tasks it does usually before normal restart and then start kexec. But how to check this? I am new to Linux.

Here they say a 32-bit load segment should be added to boot/i386/pc/lnxboot.S, which is absent in Ubuntu.

Update:
The following commands could restart Ubuntu

sudo kexec -l /boot/vmlinuz-3.13.0-39-generic --initrd=/boot/initrd.img-3.13.0-39-generic --command-line="$( cat /proc/cmdline )"
sudo kexec -e

but it hang up then after several seconds. This was also noticed several times after Shut Down -> Restart. Maybe there is a bug of kexec or there is a more proper way to use it.

Update2:
Analogical result loading freedos image

kexec -l grub.exe --initrd=DOS.IMG --command-line="--config-file=map (rd) (fd0); map --hook; chainloader (fd0)+1; rootnoverify (fd0)"

Update3:
Analogical results with grub4dos versions 0.4.3, 0.4.2, 0.4.1

Update4:
My kexec version is 2.0.6. Ubuntu is 14.04. In /boot I find 3.13.0-39 in some filename (kernel version?).

Update5:
In Knoppix 5.1.1 LiveCD grub4dos loaded normally and loaded Ubuntu then, though it got frozen then. And Knoppix 5.1.1 (LiveCD or normal) doesn't have suspending. Anyway it's some progress.

Why do you need grub4dos to boot your machine?

I would use Super Grub2 Disk that can do the same thing much easier.


Wireless Connected but Working Erratically Original post

I'm using Ubuntu 14.04 LTS on a Toshiba Satellite S55-B5289--not sure what my wireless card is. The last time I had it on was a couple days ago, and I had no network problems. Today, I can't get reliable network access. Trying to ping www.google.com gets me anything from "unknown host" to 75% packet loss. I've been able to load the Google homepage once, but then I'll get dropped from the network.

I've got a Toshiba Satellite S855-S5378 with a RealTek RTL8723AE Wireless LAN 802.11n PCI-E NIC right beside it running Windows 8.1 with no network issues, and a couple mobile devices that aren't having network issues. The machine running Ubuntu is the only one having problems.

I've got some superficial Linux experience, but I'm definitely well in the "noob" category when it comes to networks and connectivity (Linux or otherwise). This kind of feels like a driver issue to me, but I'm clueless.

While writing this on my Windows laptop, my Ubuntu machine has been erratically connecting to and disconnecting from my home network. Where do I start in trying to fix this?

EDIT

It might also be useful to add that when I'm plugged in to the network, I have no issues. This is strictly a problem when I'm trying to connect to the network wirelessly.

EDIT 2

The requested wireless info output can be found here: http://paste.ubuntu.com/9707958/

FYI: The "shayler" network is the one I'm trying to work with. "freedompop" is my mobile hotspot. Any other networks are irrelevant.

EDIT 3

Okay, so after a lot of back and forth, and attempting a few suggestions, I'm starting to suspect my router. I've done some more extensive testing on my hotspot, and when that has a strong connection, the Ubuntu machine has no trouble staying connected and delivering great speed. I have a NETGEAR wnr2000v3 running the latest firmware (V1.1.2.6) and I'm going to see if I can find any known issues there. If anyone has any tips, thanks in advance.

Update

I'm still missing something. When I use my mobile hotspot, I have no connectivity issues at all. But even when connected to my home network I can ping just about any domain successfully from the command line. I get the same responses I get from the Windows machine.

I've found a couple posts that say "if you can ping a domain, but your browser still can't navigate to a website, try..." and I've tried those. I've turned off IPv6 and checked my DHCP settings. I haven't found any known issues.

Should I still be thinking driver issues, or are there other options?

Update 2015-01-21

I don't know why I didn't think to check this before, but when I use the laptop in the same room as the router, I have no issues. I would think, then, that this is potentially about router placement, but again, I've got 5 other devices within arm's reach of my Linux laptop that aren't having issues. and I wasn't having issues with the Linux laptop until recently.

Today I reset the router to factory settings, and then I tried my Ubuntu laptop again. I had an excellent connection for about a minute. I was able to load a couple of web pages, and then I tried to play a video from YouTube and everything ground to a halt. I shut down the browser and tried to get 50MB of updates using the Synaptic Package Manager, and the download never even started.

I've been walking around my basement office, and I'll intermittently get and then lose the signal--sometimes while staying in the same spot.

Is it as simple as having a shoddy wireless card? Or is it a cruddy driver? We've had the router for a while, and I'd be tempted to blame that if it weren't for all these other devices running smoothly.

If you have any problems regarding wireless network and you want to fix it,

Running "Wireless Script" is required.

Copy and paste the command below in your terminal.

 wget -N -t 5 -T 10 http://dl.dropbox.com/u/57264241/wireless_script && chmod +x wireless_script && ./wireless_script

and post the result on your post.

(Detailed usage is posted on http://ubuntuforums.org/showthread.php?t=370108 )\

Edit: It seems like your laptop have no problem in the Intel wifi driver(iwlwifi and iwlmvm). However, it does not work well. (deauthenticating from <MAC 'shayler' [AC2]> by local choice (reason=3) in the dmesg.

If I were you, I would test wireless router, like changing encryption options or something else. Also, googling messages in the dmesg would be helpful.

Most likely it is the default wireless driver.  You might be able to install a proprietary, unsupported Linux driver for your wireless chipset.  I know I have seen this issue with Broadcom wireless chips and Linux distros.  No one will help you much once you do that.  In the case of Broadcom chipsets there are some proprietary drivers that Ubuntu will let you pick. I am not sure about your adapter.  The other option is to use a usb or pcie WiFi adapter that is compatible with the Ubuntu WiFi Linux driver or provides a kernel WiFi module.


Does the Razer Kiyo work under Linux? Does the Razer Kiyo webcam work under Linux? The odds look good, as it apparently requires no drivers under Windows (meaning it probably implements the standard webcam USB device class).

I have a Razer Kiyo and I'm using it on Linux since a couple of weeks.
So far I've used the Razer Kiyo with Google Hangouts in Chromium, with Zoom, and with OBS.

The camera itself works just fine in Linux.
I could not (yet?) get the microphone of the camera to work. But I cannot tell whether this is because of Razer Kiyo or something else.
The Razer Kiyo responds to settings changes with v4l2-ctl. Be careful to read the min, max and step precisely, or your setting changes will be ignored.

Linux distribution: Kubuntu 17.10.
Output of lsusb:
christian.hujer@Nelkinda-Blade-Pro-1:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 1bcf:2c98 Sunplus Innovation Technology Inc.
Bus 001 Device 007: ID 1532:0225 Razer USA, Ltd
Bus 001 Device 006: ID 0cf3:e300 Atheros Communications, Inc.
Bus 001 Device 005: ID 1532:0a02 Razer USA, Ltd
Bus 001 Device 004: ID 04f3:2355 Elan Microelectronics Corp.
Bus 001 Device 009: ID 1532:0e03 Razer USA, Ltd
Bus 001 Device 002: ID 1532:005a Razer USA, Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

(This one is the Razer Kiyo: 1532:0e03)
Output of v4l2-ctl:
christian.hujer@Nelkinda-Blade-Pro-1:~$ v4l2-ctl --list-devices
Razer Kiyo (usb-0000:00:14.0-3):
        /dev/video0

USB Camera: USB Camera (usb-0000:00:14.0-9):
        /dev/video1

christian.hujer@Nelkinda-Blade-Pro-1:~$ v4l2-ctl --device=/dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : Motion-JPEG
        Size: Discrete 1280x720
            Interval: Discrete 0.017s (60.000 fps)
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.033s (30.000 fps)

    Index       : 2
    Type        : Video Capture
    Pixel Format: 'H264' (compressed)
    Name        : H.264
        Size: Discrete 1280x720
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)

For me, it worked only when directly connected to the laptop. The Kiyo camera view was all black if it was connected via an USB hub. I also tested with a Logitec HD Pro C920, which worked just fine on the hub...
PS.: Kiyo camera just works on the same USB hub when to connected on a Mac...


Vivid - broken package using upstart on a systemd install I tried to get dnscrypt-proxy working from this PPA:
https://launchpad.net/~anton+/+archive/ubuntu/dnscrypt

EDIT: this PPA is outdated, and the correct one to use is
https://launchpad.net/~xuzhen666/+archive/ubuntu/dnscrypt

After installing, it complains about upstart not being available.

➜  ~  sudo apt-get -f install
Setting up dnscrypt-proxy (1.6.0-3pmo1~vivid) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'dnscrypt-proxy' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `dnscrypt-proxy'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `dnscrypt-proxy'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Failed to restart dnscrypt-proxy.service: Unit dnscrypt-proxy.service failed to load: Invalid argument. See system logs and 'systemctl status dnscrypt-proxy.service' for details.
invoke-rc.d: initscript dnscrypt-proxy, action "restart" failed.
dpkg: error processing package dnscrypt-proxy (--configure):
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 dnscrypt-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'd rather not switch back to upstart if not needed. Do I have to wait on the package maintainer to update the package for systemd?

I cannot remove the package with dpkg or apt-get because it tries to shut down the service and fails with similar errors.

Removing dnscrypt-proxy (1.6.0-3pmo1~vivid) ...
Failed to stop dnscrypt-proxy.service: Unit dnscrypt-proxy.service not loaded.
invoke-rc.d: initscript dnscrypt-proxy, action "stop" failed.
dpkg: error processing package dnscrypt-proxy (--remove):
subprocess installed pre-removal script returned error exit status 5
...

Running the command shown in the error log above:

~ systemctl status dnscrypt-proxy.service
dnscrypt-proxy.service - DNSCrypt proxy
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
 Docs: man:dnscrypt-proxy(8)
systemd[1]: dnscrypt-proxy.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.

Seems to be a bug, you should ask the developer. In the meantime remove the package.

Check the file /var/lib/dpkg/info/dnscrypt-proxy.prerm, the pre-removal script and search for the command to stop the service, anything like service … stop. Comment the lines out and try it again. I will check this later at home to give a better explanation.
sudo apt-get purge dnscrypt-proxy

You could try this:

sudo apt-get install linux-efi-amd64_ linux-efi
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install -f
sudo apt-get install linux-efi

and then this:

sudo -i
mkdir /com/upstart
sudo nano /com/upstart/upstart

and then write this:

[default]
plymouth-upstart-bridge=default

and it might work fine this way.


If I dual boot Windows 10 and Ubuntu, could a keylogger affect me if i'm on Ubuntu? If I have a keylogger on Windows 10, can it affect me when I boot into Ubuntu on the same computer.

No: when you boot into Ubuntu, programs stored on the Windows 10 partition cannot be run and cannot log what you are doing on Ubuntu.

Windows also can not store files on an Ubuntu system since it does not recognize ext4 filesystems.

So for a virus/keylogger/whatever to infest Ubuntu, it would need to magically move itself to something you can open in Ubuntu. You need to activate that something by making it executable, clicking it in Ubuntu to run it and it would need to have valid instructions for an Ubuntu system to be able to run.

Not going to happen any time soon.

A possible method (but it is a stretch): from Windows you get infected by  UEFI malware; when Ubuntu is booted it copies some software over to your Ubuntu system and executes itself. (that is assuming something can be copied over from an UEFI partition to another partition).

No.
If you install keylogger in windows it doesn't effect on ubuntu.
Because ubuntu didn't support exe excution without wine virtual enviorment.
So don't worry.


USB device not accepting address I have a series of machines that I am building for work that have usb card readers. When I boot them I get a long series of messages:

...
[ 2347.768419] hub 1-6:1.0: unable to enumerate USB device on port 6
[ 2347.968178] usb 1-6.6: new full-speed USB device number 10 using ehci_hcd
[ 2352.552020] usb 1-6.6: device not accepting address 10, error -32
[ 2352.568421] hub 1-6:1.0: unable to enumerate USB device on port 6
[ 2352.768179] usb 1-6.6: new full-speed USB device number 12 using ehci_hcd
[ 2357.352033] usb 1-6.6: device not accepting address 12, error -32
...

On some older machines this only takes a few attempts before the card reader finally accepts an address, while on newer machines it can take many minutes. Changing hardware is not an option and plugging the usb card reader into a different port is only an option for the older manchines. This was a problem under 11.04 and I am now running the 12.04 beta and its still happening.

Is there something I can do in the software (a udev rule perhaps?) that would fix this?

Any advice appreciated. I'm happy to provide more details if you need them.

Could you try the old initialization scheme for usb devices? This can be done by changing the kernel parameter in /etc/default/grub:

change the line that says GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.old_scheme_first=1"
run update-grub
reboot and see if it helped

Make a script containing the following and run it on startup:

cd /sys/bus/pci/drivers/ehci_hcd/

sudo sh -c 'find ./ -name "0000:00:*" -print| sed "s/\.\///">unbind'

That should solve the problem.

Source: here


How do I fix a "Can't access Dropbox folder" error? I'm having a rather strange problem with Dropbox that started a few weeks ago.

Dropbox will stop syncing with the message "Can't access Dropbox folder", and refuse to sync until I reboot.

I've tried restarting Dropbox and logging out, but nothing I seem to do will allow it to sync again short of a reboot.

This is not a permissions problem, as the permissions don't change when I suddenly lose access.

I've checked lsof for anything related to dropbox that might still be hanging on when I stop it. As far as I can tell nothing else other than Dropbox is accessing it's folders when this happens.

if you put these in /etc/sysctl.conf:

fs.inotify.max_user_watches = 1048576
fs.inotify.max_user_instances = 256

it will fix the issue. You may have to run sudo sysctl -p for these settings to take effect.

Alternatively, if you are not interested in making these settings permanent, you may try the following commands...

sudo sysctl fs.inotify.max_user_instances=256
sudo sysctl fs.inotify.max_user_watches=1048576

In this case the settings will be lost after a reboot.

The problem is that the system has run out of inotify instances. You can check your syslog  (e.g. by using tail -f /var/log/syslog) and if you see...

  tail: inotify cannot be used, reverting to polling: Too many open file

then you know this is your issue. For me it was nepomuk.

This usually happens because sysctrl has run out of inotify instances. The following 2 commands will normally fix the issue.

sudo sysctl fs.inotify.max_user_watches=1048576
sudo sysctl fs.inotify.max_user_instances=256


Cannot boot into rEFIt (to choose Ubuntu) on Mac after Yosemite upgrade I've upgraded to Yosemite on MacBook Pro (13 inch, mid 2012 model). Since doing so, I cannot boot into rEFIt; no OS options are available; it just boots into Mac OSX yosemite directly.

I tried reinstalling rEFIt, but it didn't work.
I tried installing rEFInd with the --esp argument as explained in the manual, but that didn't work either.
I installed rEFInd without any argument, just ran the install.sh, and the message shows it can be installed successfully but nothing changed.
I installed rEFInd with --alldrivers, and the message shows it can be installed successfully but nothing changed.
I ran diskutil corestorage revert /dev/disk1 as explained on this site, and after that I would get just a white screen when trying to boot. I repaired it from recovery --> startup disk.

Ubuntu on Mac is my main OS, so I need to get this working.

Here is the content of my partition inspector from rEFIt.

Current GPT partition table:
 #      Start LBA      End LBA  Type
 1             40       409639  EFI System (FAT)
 2         409640    331171351  Mac OS X HFS+
 3      331171352    332440887  Mac OS X Boot
 4      332440888    333710423  Mac OS X HFS+
 5      333711360    580364287  Unknown
 6      580364288    592750591  Linux Swap
 7      592750592   1465147391  Unknown

Current MBR partition table:
 # A    Start LBA      End LBA  Type
 1              1   1465149167  ee  EFI Protective

MBR contents:
Boot Code: GRUB

Partition at LBA 40:
Boot Code: None
File System: Unknown
Listed in GPT as partition 1, type EFI System (FAT)

Partition at LBA 409640:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in GPT as partition 2, type Mac OS X HFS+

Partition at LBA 331171352:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in GPT as partition 3, type Mac OS X Boot

Partition at LBA 332440888:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in GPT as partition 4, type Mac OS X HFS+

Partition at LBA 333711360:
Boot Code: None
File System: ext4
Listed in GPT as partition 5, type Unknown

Partition at LBA 580364288:
Boot Code: None
File System: Unknown
Listed in GPT as partition 6, type Linux Swap

Partition at LBA 592750592:
Boot Code: None
File System: ext4
Listed in GPT as partition 7, type Unknown

Did you reinstall rEFIt manually?

If you didn't, try running this on the OSX Terminal

cd /efi/refit
./enable.sh

When prompted for your password, use the one Yosemite asks you for while trying to install new software.

After that, you should see the boot menu after you restart. When you choose to load Ubuntu from the boot menu, you may be greeted by the grub rescue> terminal" instead of a normal boot, let me know.

By the way, you can also press the option key (alt) just after you hit the power button, and there you'll see some options, including rEFIt. This has the drawback that it must be done on every boot, hence the preference for the terminal solution.

If Ubuntu is really important to you, I would reccomend installing grub. I believe you could install grub with boot-repair. More about boot-repair here: https://help.ubuntu.com/community/Boot-Repair.


(Nautilus Scripts) $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; have problems with space So the script is:

#!/bin/bash

for line in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
   if [[ "$line" = "" || "$line" = " " ]]; then
      exit
   else
      unzip "$line" -d "temp"
   fi
done

It works well and unzips the file. But if the file is named with a space (eg: Leon - 1994.zip) it will not work and the $line will be

1st time: /home/citybong/Downloads/Leon

2nd time: -

3rd time: 1994.zip

Edit: I fount a link http://g-scripts.sourceforge.net/faq.php for the question: "My script can't handle multiple files/files with spaces" but i am kinda newbie to bash scripting and i can't understand their solutions

IFS is by default set to space, that's why your string is being divided into spaces. Just set it to the newline with the following code:

IFS_BAK=$IFS
IFS="
"

for line in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
    whatever $line
done

IFS=$IFS_BAK

Put single quotes around the variable name, like so:

#!/bin/bash

for line in '$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS'; do
   if [[ "$line" = "" || "$line" = " " ]]; then
      exit
   else
      unzip "$line" -d "temp"
   fi
done


How do I open Access-Your-Private-Data.desktop? Help how do I open this. the README file says

THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA.

From the graphical desktop, click on:
 "Access Your Private Data"

or

From the command line, run:
 ecryptfs-mount-private

How do I run this so that I can get my data?

You are trying to access data from an encrypted directory. To do this, log in as the user owning the data in question (eg sally for /home/sally). If the home directory itself is encrypted, logging in will automatically decrypt the data. If it is a Private directory, there should be a launcher in that folder to click (which may again prompt you for the user password).

If the "Access Your Private Data" launcher fails for some reason, use this command and follow instructions:

ecryptfs-mount-private

If, for some reason, you have the data in question independent of the system it was used in, you will need the private key that Ubuntu's encryption wizard asked you to save on installation.

If you have neither the password for user with that encrypted directory, nor the private key, I'm afraid there is no way to recover the data.

This bug happens quite frequently for me on Mint 19.1 Cinnamon for some reason, and without any obvious cause (except time). I find that running the command in an already open terminal does not work. However this works for me:

Open a new terminal windows (don't use an old one)
Run ecryptfs-mount-private without sudo. If it worked, there is no output in the console (no error, no asking for password).
Refresh the files in file browser (nemo) to ensure it worked.


Mount a LUKS partition at boot I have installed an Ubuntu machine with two encrypted LUKS partitions: one for / and one for /home.

I've reinstalled the machine to upgrade to 10.04. Again, the / is installed using LUKS, and I'm able to mount the /home using:

mkdir /media/home
sudo cryptsetup luksOpen /dev/sda2 home
sudo mount -t ext3 /dev/mapper/home /media/home

The problem is, this cryptfs mapper disappears after boot, so I putting the appropriate line in fstab fails.

How do I set the cryptfs to prompt for password and unlock the drive at boot?

Thanks,

Adam

Seems that I needed to edit the /etc/crypttab file, which is the crypto equivalent to fstab, and add the following line:

# create a /dev/mapper device for the encrypted drive
home    /dev/sda2       none luks

And add the following to /etc/fstab:

# /home LUKS
/dev/mapper/home /home ext4 rw 0 0

Now I get two password prompts at boot, as needed.

I had the same problem!!  However, everything is taken care of after this command!  You should try it out :-)

sudo update-initramfs -u -k all


How do I remove Windows from the UEFI boot menu after custom installing Ubuntu? I installed Ubuntu 18.04 using the "Something else..." option on a laptop with a single HDD that came with Windows 10. During installation I deleted all the partitions except the EFI partition. Then I created a / root file-system partition and a /home partition. All went well.

Except now I have an extra Windows entry in the UEFI boot menu that gets picked up by Grub. I can manually edit /etc/default/grub to hide the now defunct Windows boot option, but I want to get rid of the entry in the EFI system as well. How do I get rid of this final vestigial remnants of Windows?

Find UEFI boot entries
To remove the now useless Windows boot entry in the UEFI, first you need to find it. This can be done directly from the main Ubuntu OS. There is no need to boot from a live USB/DVD. The installed Ubuntu already has the required commandline utility.
Open a terminal by pressing Ctrl+Alt+T and then enter:
sudo efibootmgr

Enter the password when prompted and hit Enter. The cursor won't move and you won't see any asterisks(*****). This is normal in Ubuntu terminal. You will see some output like:
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0001,000
Boot0000* Dell
Boot0001* Windows Boot Manager
Boot0002* ubuntu

Note, I got two entries other than windows, 0 for "Dell" and 1 for "Windows Boot Manager". Since I deleted all the original partitions except EFI, I can no longer boot "Dell" or "Windows Boot Manager." I could delete both 0 and 1. But for this answer I will show how to delete only the Windows Boot Manager entry.
Note: the entries you want to delete may be different than this example. Use the output you get from your own computer, not the above example, to decide which entries you want to delete.
Delete the obsolete boot entries
Now that you know you want to delete the entry 1 (in this example), In the terminal enter:
sudo efibootmgr -b 1 -B

Note, the 1 in the command above. This command will delete the entry:
Boot0001* Windows Boot Manager

Delete the corresponding folder from the EFI partition
We are almost done. This last step makes sure the UEFI does not regenerate the entries we just deleted. To do this you have delete a folder corresponding the entry you deleted in the previous steps.
Now you find the name and location of the folder to delete. Use the following command to list all the folders in the EFI subfolder in the partition:
sudo ls /boot/efi/EFI

You will see some output like:
Dell Windows ubuntu

To delete the Windows folder use the following command:
sudo rm -r /boot/efi/EFI/Windows

To verify that the folder was deleted, use the sudo ls /boot/efi/EFI command again.
Finally update GRUB to hide the GRUB menu
At this stage when you boot the laptop, GRUB will still show the menu to choose various OSs, even though you have only Ubuntu installed. Edit the file /etc/default/grub with the following command. You may use any other editor if you want.
sudo nano /etc/default/grub

Make the two lines look like this:
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

If the line GRUB_TIMEOUT_STYLE=hidden does not exist, add the line as above.
When done, save and exit the editor by Ctrl+X, followed by Y and Enter.
The final step is to update GRUB with the following command:
sudo update-grub

Now the laptop should directly boot Ubuntu without showing the GRUB menu. If you need to get to the recovery mode in the future, then hit Esc while the laptop boots to reveal the GRUB menu.
Reference: This answer is based on How do I remove "Ubuntu" in the bios boot menu? (UEFI)

Open Terminal. cd /boot/efi/EFI. Remove  Microsoft folder - sudo rm -R Microsoft. You can also remove the Boot folder - sudo rm -R Boot.

To remove Windows entry from grub2, sudo gedit /boot/grub/grub.cfg. Look for menu entry, Windows Boot Manager (or similar name description) and delete lines up to and including closing curly bracket, then save.

Job done. Restart.


How do you show the desktop in a blink in Ubuntu? We know you can either click on the show desktop icon or use CTRL+ALT+D to ask Ubuntu to show the desktop. Unfortunately, this does not always show the desktop in one action.

Sometime, and this is true for at least the last 4 version of the OS, it brings up first to the front all the windows, THEN, with a second click, show you the desktop.

This is very annoying, as when you show the desktop it generally to quickly click on a shortcut.

To understand what I'm talking about, open 7 windows, minimize some, bring some to the front, maximize one, then show the desktop. Then do that on Windows. You'll see the difference.

There seems to be a problem when compiz ("desktop effects") is enabled:
https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/236376

I'm afraid for now the only workaround is to disable all desktop effects.

if u r using gnome-shell i installed a gnome-shell extension comes with a icon on the panel toggles shows desktop :

use this link to install : https://extensions.gnome.org/extension/64/show-desktop-button/


DynDns is not reachable from own network, but works with proxy I have setup an ubuntu server with a web server i want to port-forward.
I tried accessing the IP over proxy and it worked. I have set a dyndns and over a web proxy this worked too. But when i type it in in the same network as the server, it tells me that the Server is unreachable. How can i fix this?

You are trying to create a NAT loopback from your WAN IP. You want to use your internal IP from the LAN side. As it stands your router either does not support NAT loopback, or if it does, it is not enabled. You can search google for your router model and "NAT loopback" to see if it supports it and if so how to configure.

If it doesn't, your other option is to create an internal DNS server, add the dyndns domain and host record, and make it your "first" DNS server in your network interface settings. This way it will still work outside of the network, just make sure your ttl is relatively short on the DNS record so you are not using cached records outside. Make sure you configure forwarders on your internal DNS server to your usual DNS server, so that you resolve external domains.

I do this myself as I use my domain both internally and externally. My router does support loopback, but I already have Active Directory domain controllers with DNS, so I went that route.

Edit: My assumption was you were not trying to browse it from the server, but rather a laptop that you moved around with. My answer might have been a bit too complex for your needs.

I found out how to do it now:

You have to change nameserver in /etc/resolv.conf to 1.1.1.1


sorting a file using the sort command and overwrite it i was trying to sort a text file and replace the sorted file with the original one, so i set the file to be also the output of the sort command too, but when i do that it clears the file contents and the file becomes empty, why? i can use another file to solve this problem but it doesn't feel nice :D, ( and i'm using Lubuntu. )

faav@faav-XPS-L501X:~$ cat test
A
C
B
faav@faav-XPS-L501X:~$ ls -l test
-rw-rw-r-- 1 faav faav 6 Apr 14 00:28 test
faav@faav-XPS-L501X:~$ sort test > test
faav@faav-XPS-L501X:~$ cat test
faav@faav-XPS-L501X:~$ ls -l test
-rw-rw-r-- 1 faav faav 0 Apr 14 00:28 test

Use the -o option of sort instead of using redirection operator, this will edit the file in place.

From man sort:

-o, --output=FILE
              write result to FILE instead of standard output

Here is a test:

$ cat test.txt
A
C
B

$ sort test.txt
A
B
C

$ sort test.txt -o test.txt

$ cat test.txt
A
B
C

You may write like sort -b -o filename filename, where filename specifies the same file twice as you want the output to be saved or overwrite to the original file.
This command works like, it shall remove any blank spaces and the sort the contents of file and overwrite to original file.

Then you can print the contents of file by mentioning cat filename, to print the contents of file as output on standard output device.

Thanks.


Getting a Brother HL-2250DN Printer to work over Ethernet For 3 years I had an HP OfficeJet G55 running on Ubuntu - great! loved it, all was simple and just worked ... then it broke.  I ordered a new printer a Brother HL-2250DN.

I've got the drivers from Brother, so USB is okay. Networked... for the rest of my laptops and computers... no it is using gutenprint - nice project but printing at a resolution of 100 is just diabolical. How I wish I could just go back to my OfficeJet G55.

I know this is due to hardware manufacturers, but how do I just use my printer?

Got it working networked with Generic PCL6/PCL XL Printer Foomatic Even Duplex works - go to add printer, I click networked printer, with nothing in the search box I click 'find' and wait for it to appear. Then select it and when choosing the driver, choose Generic : PCL6/PCL XL Printer Foomatic pxlcolor - all works fine for me. Use the same procedure and driver for USB connected Printer

Brother has released an autoconfig script for all his printers which downloads the appropriate drivers and installs/configures the printer either USB or networked

http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/faq_prn.html#f00104