Ubuntu really slow to shutdown/restart I'm running ubuntu 14.04.4 as a VM on Hyper-V (Server 2012 R2). The VM is configured to only have 1 VCPU and 2GB fixed ram.

Shutting down, or restarting takes around 15 minutes (sometimes a lot longer). The terminal disconnects immediately, and I can't reconnect but other than that nothing appears to happen. Connecting to the VM (I think it's called tty1, but I'm very new to linux!) I can see this:

In Hyper-V the state goes to "Stopping-Critical" and the status is "In Service". Eventually the machine wills top.

I've had a look around the issue but I'm struggling to find any obvious issue (I also can't tell if Hyper-V is causing the issue or not).

I think I might need to do something with grub to show me more info, but I'm a little out of my depth here! Any advice would be really useful!

[EDIT]

After rebooting another ubuntu machine running on the hyper-v server I can see it's having the same issues. I'm going to move the machine to another hyper-v server and see if that is the issue, but at the minute I suspect it is.

In this case it was an issue with Hyper-V. Removing and re-adding the feature fixed it.

If you can change Hypervisor host server, I'll recommend you the free Citrix XenServer, the Hyper-V is rather used to be hosted on Win Servers running Win VMs.
Maybe OpenStack, KVM or even VmWare could be a better Hypervisor choice...

In this case, the drivers might not be installed. Look at dmesg | less, or less /var/log/messages from Hyper-V console (tty#), after you was ordered a shutdown.


I cannot install any application anymore After installing wine and failed to agree on the agreement on the font.
this message is shown, and I cannot install or remove the ttf-mscorefonts-installer anymore.

The package 'ttf-mscorefonts-installer' is in an inconsistent state and needs to be re-installed, but no archive can be found for it.

I use this command first to re install the 'ttf-mscorefonts-instaler'

sudo apt-get --reinstall install ttf-mscorefonts-installer

This error message shows.

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package ttf-mscorefonts-installer needs to be reinstalled, but I can't find an archive for it.

and using this command "sudo apt-cache policy ttf-mscorefonts-installer" this error message shows.

Installed: 3.4ubuntu3
  Candidate: 3.4ubuntu3
  Version table:
 *** 3.4ubuntu3 0
        100 /var/lib/dpkg/status
     3.3ubuntu4 0
     500 http://archive.ubuntu.com/ubuntu/ oneiric/multiverse amd64 Packages

and with this command "sudo dpkg-reconfigure ttf-mscorefonts-installer" this message shows.

/usr/sbin/dpkg-reconfigure: ttf-mscorefonts-installer is broken or not fully installed

how to solve this problem??

You should reinstall it, otherwise it won't get removed:

sudo apt-get --reinstall install ttf-mscorefonts-installer
sudo apt-get install -f

That should solve your issue.

just reinstall

sudo apt-get install upgrade

when you reach at the menu, just type OK with the help of the ↹ TAB  button.

So you can place a clear install, then everything will be ok. Just accept download policies (with the tab and press enter button). Don't force close window or it will break the procedure and crash.


Pass sudo command from GUI I have a shell script using some sudo command. When I run this script from terminal - it asks me for password and runs with any problem. But when I try to run executable shell script form GUI (double click) it does not ask me for password - so does not work.

Example of my shell script:

c1=$(dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' | sha1sum | awk '{print $1}')

How to run script from GUI and pass all sudo commands with no problem?

You can pass the password to sudo from the standard input, like this:

echo 'yourpassword' | sudo -S yourcommand

Using -S tells sudo to read the password from stdin, which comes from the echo 'yourpassword' bit.

You could also edit visudo, so that sudo will never prompt for the password, either only for your specific comand, or always.

Warning: storing your password in plain text is an extremely bad idea


How to start and kill tcpdump within a script? Why can't I interrupt (i.e. kill -2, not kill -9) tcpdump as shown in this script?  The script runs, but tcpdump does not terminate and continues to run at the command line, even after printing some of its exit output.

(Note: this script requires sudo due to tcpdump and kill).

#!/bin/bash

#start a process in the background (it happens to be a TCP HTTP sniffer on  the loopback interface, for my apache server):

tcpdump -i lo -w dump.pcap 'port 80' &

#.....other commands that send packets to tcpdump.....

#now interrupt the process.  get its PID:
pid=$(ps -e | pgrep tcpdump)
echo $pid

#interrupt it:
kill -2 $pid

I found part of the answer on this Stack Overflow post.

To summarize, tcpdump was buffering its output before writing to the output file, and this caused issues when the script attempted to interrupt it.  Adding the -U ("flush") option to tcpdump fixes this.

Also necessary were a sleep command immediately after issuing tcpdump to allow it to initialize, and also before killing it, to allow it to write to the file:

#!/bin/bash

#start a process in the background (it happens to be a TCP HTTP sniffer on  the loopback interface, for my apache server):

tcpdump -U -i lo -w dump.pcap 'port 80' &
sleep 5

#.....other commands that send packets to tcpdump.....

#now interrupt the process.  get its PID:
pid=$(ps -e | pgrep tcpdump)
echo $pid

#interrupt it:
sleep 5
kill -2 $pid

For reference, from man tcpdump, under the -U option:

If  the -w option is specified, make the saved raw packet output
``packet-buffered''; i.e., as each packet is saved,
it will be written to the output file, rather than being written only
 when the output buffer fills.

After this, the script worked fine.

You can enter the command below:

killall tcpdump

This is relevant if you had a continuous tcpdump running and wanted to end that process. Nothing else is affected.


Wireless issues on 16.04 with RTL8821AE, ASUS E202S I've recently purchased an Asus E202S desktop computer and tried to install Ubuntu 16.04 on it. I had no problems to install or make a dualboot with Windows 10, but the real problems started to show up almost an hour after I've finished the system installation.

Basically, my wifi is periodically "freezing" (The wifi signal shows that everything is ok, but I do not have Internet connection), and I am forced to restart the network-manager. Even after restarting the manager, sometimes my wifi won't show up on the list of available networks or will not work at all. I don't have any of these problems on Windows 10, and also my Internet speed is much faster.

I've been trying to find the problem for almost one week, and here are some of the dozens of cases which seemed to be the closest to mine:

 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1482979
 http://askubuntu.com/questions/730430/wifi-connection-keeps-dropping-in-ubuntu-15-10-rtl8821ae
 https://ubuntuforums.org/showthread.php?t=2245164
 http://askubuntu.com/questions/797213/wireless-disconnect-issues-ubuntu-16-04-with-rtl8821ae
 http://askubuntu.com/questions/730430/wifi-connection-keeps-dropping-in-ubuntu-15-10-rtl8821ae

Even though I could find several people that had the same problem that I'm having, their solutions did not do me any good, and as a newbie ubuntu user, I'm not sure about how I should proceed in this situation.

Problem affects immediately if I uploading information like on Dropbox or via "scp" file transfer.
When freezing, ping command answer:

 ping: sendmsg: No buffer space available

My wireless information:
     https://paste.ubuntu.com/23806837/

Also I've tried:

a.)

  sudo add-apt-repository ppa:hanipouspilot/rtlwifi
  sudo apt-get update
  sudo apt-get install rtlwifi-new-dkms

It makes connection a little bit stable, with this driver I can upload 30-40 mb instead of only 5mb, but after upload freezes again.

b.) If I boot with older kernel (3.19.8) networking is working perfect and two times faster. But!, only in shell because Xorg fail to start on this kernel with error:

 [   113.698] 003f:1bdf: 3F ILLEGAL EXTENDED X86 OPCODE!
 [   113.698] (II) VESA(0): Setting up VESA Mode 0x17F (1366x768)
 [   113.698] 0000:1fcf: 3F ILLEGAL EXTENDED X86 OPCODE!
 [   113.698] (II) VESA(0): VBESetVBEMode failed0000:1fcf: 3F ILLEGAL EXTENDED X86 OPCODE!
 [   113.698]
 [   113.698] (EE)
 Fatal server error:
 [   113.699] (EE) AddScreen/ScreenInit failed for driver 0
 [   113.699] (EE)

Can anyone help me to solve these issues?

RTL8821AE wifi drivers in Ubuntu 16.04
First thing first, you need to identify which device is being used in your
hardware, to find it, I opened a terminal and wrote the following:

lspci | grep Wireless

The system replies with the following line
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
The model of the device (RTL8821AE) is very important, we will come back to this later.
For some reason, realtek adapters have had a history of disconnects and signal drops, but, lucky for us there is an answer.

sudo apt-get install linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install

These commands build and install the drivers for
rtl8192ce, rtl8192se, rtl8192de, rtl8188ee, rtl8192ee, rtl8723ae, rtl8723be, and rtl8821ae, all in one go.
Just in case the system doesn’t load the appropriate kernel module, you can execute the following command from within your rtlwifi_new directory

sudo modprobe rtl8821ae

and reboot your system.
Congratulations your Ubuntu Linux kernel now has working Realtek wireless drivers.

I used the following steps from Ubuntu Forums, which appeared to solve my equivalent problem:

  I also have a realtek wifi card and had issues with the network stopping until I disabled IPv6. Since doing that it works fine. Go to your network's properties,go to theIPv6 tab and select Ignore from the dropdown menu.


Ubuntu 20.04 - Screen Tearing Since I installed Ubuntu 20.04 I notice that there is Screen tearing when playing videos, it happens in several browsers and it is noticeable when moving the windows within the screen, when scrolling it is also noticeable. How is this problem solved?

I had the same problem with a GTX 960M on my Lenovo ideaPad Y700 and the following worked for me.
Open a terminal and run
sudo gedit /etc/modprobe.d/nvidia-drm-nomodeset.conf
In the file, write the following line:
options nvidia-drm modeset=1
Save the file. Back into the terminal, update initramfs by running:
sudo update-initramfs -u
Reboot.
Source: ubuntuhandbook.org

If the previous step didn't work, there is another solution that you can try:
$ xrandr --output eDP-1-1 --set "PRIME Synchronization" 1
Reboot.
This command will enable the sync in your hybrid card.
To check that sync has been enable:
$ sudo cat /sys/module/nvidia_drm/parameters/modeset
it should return Y now.
Reboot.

I didn't have the "Enable Force Composition Pipeline or Force Full Composition Pipeline" setting in the graphical Nvidia X server setting window nor did the command $ xrandr --output eDP-1-1 --set "PRIME Synchronization" 1 worked for me (it just didn't change the parameter value for some reason).
But when under "RRIME profiles" of the "NVIDIA X Server Settings" I selected "NVIDIA On-Demand" and restarted I got rid of the screen tearing.
Note: somebody commented that's because on demand uses intel not nvidia so it's probably not a very good solution


I can't create a NTFS partition in Ubuntu When I'm installing Ubuntu 12.04, I try to create a NTFS partition but I can't find it. There are FAT16, FAT32, ext... but not NTFS.

Since, You are in the installation process, I suggest you to boot into the Live Session, (Try Ubuntu).

Then press Super button to bring dash and type "gparted". After opening it, create NTFS partition using that tool.

Note, You don't need to install gparted in Live CD/USB. Gparted is already included in the Live session.

We install Ubuntu on ext filesystems. You may make following partitions:

Partition 1
Ext3 or Ext4
mount point = "/"

Partition 2 (4GB?)
Use as: swap

Installation should work fine.


Graphics on boot split into three sections I just installed 13.04 onto a new laptop because of the ease of install with the uefi bios. When I boot the system though, the screen is split into three sections each about 640x200 at the top of the screen, with the active terminal mirrored across them. Although I can login, startx fails due to something about a file. I have tried booting with vga=711 and normal nomodeset with no success. Booting the live usb I originally installed from results in the same issue. The graphics driver in the xorg.conf.something from what I can make out is set to vesa, but it could be set to some other four character value that is similar to vesa, hard to tell. How can I fix this? One thing to note, the laptop has two dedicated GT 750m's, along with the intel 4000 built into the processor.

This is what it looks like, the purple box is what the grub2 menu was in before boot.

Apologies for this poor answer, but I reinstalled using the guide posted here and followed the script I linked at the bottom. I no longer experience the graphics issue, but that is because I completely reinstalled.

I've been having this same problem today. Surprisingly, I was able to fix it by installing 12.04.2 via USB, rather than 13.04 via DVD. I'm not sure if it was one or both that did it, so try either and see if it works.


Convert PDF to images to PDF I have a PDF that I want to show to someone without giving them the ability to copy it. One possible way would be to convert pages to images, then these back into a PDF. How can I use convert or pdftk or otherwise script? Not GUI.

Imagemagick rasterizes everything. You could simply do:

convert -density 200 input.pdf output.pdf

Of course the recipient might decide to run an OCR program on your file. The density parameter sets the resolution expressed as PPI.

Yes, you can first convert your PDF pages to PNG/JPG images, then convert the PNG/JPG to PDF.
However, the person you send your file to can use an OCR service to get the text from your file.


Environment Variables not working in WSL I have used the commands

export http_proxy=address:port

and

export https_proxy=address:port

to set http and https proxy in bash in WSL. But every time I open bash, the environment variables are becoming empty. I tried setting up these variables in /etc/environment and ~/.bashrc too.

I am using bash.exe command in cmd promt to open bash.

I think WSLENV will work well for you.
Here is perfectly documented:
https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/

If you use export, you can only use the environment variables on that terminal session. Else, you have to add it to /etc/enviroment.

But if you aren't logged in as root, you can't use it. You should change the permissions of the file.


TestDisk "You have to reboot for the change to take efferct" I accidentally delete my entire disk. Now I am using TestDisk to recover the Harddisk. The problem is it is asking for reboot and only after if will start recovering and unfortunately I am running ubuntu from a live disk. Every time I reboot if start a fresh copy of Ubuntu. Please, I am in a big trouble and I really don't want to lose the files. Help Please.

I have used MiniTool Partition Wizard Bootable Edition. I downloaded the iso, and it worked for me . Now I have data back .. Oh.. I am safe at last.


Wifi keeps disconnecting on ubuntu 15.04 I just made the switch from only windows to dualbooting with ubuntu, and I'm having some trouble getting all the necessary things working on my computer. Specifically, I'm having trouble with my wifi.

The Problem:
Every 5 to 15 minutes, my wifi will randomly loose connection, but the wifi meter at the top of the screen remains at about 80%. Manually disconnecting and reconnecting the wifi works, but doing so is frustrating, especially at the frequency with which the wifi dies. I've looked around the forums for a fix, but haven't really found one that is for my version of ubuntu, not to mention I don't really understand the solution. Apparently there is some command I need to run for the mods so they can figure out what is wrong, but I currently don't know what it is. My computer is a Lenovo with an AMD processor, I think its a G something.

Anyone know how to fix this problem?

I had the exact same issue. Mine is Lenovo G40. Check following

lspci -nn | grep Wireless

if it is RTL8723BE, following solution should work:

 sudo gedit /etc/modprobe.d/rtl8723be.conf

When the terminal window opens, copy paste this in:

#Prevents the WiFi card from automatically sleeping and halting connection
options rtl8723be fwlps=0 swlps=0

Try this, edit the file /etc/modprobe.d/iwlwifi.conf and add below content to that file

options iwlwifi_11n_disable=1


USB Device is not authorized for usage I am using the newest ubuntu20.04, and all software were updated.
After installation of system, U disk can be used without any problem. After installation of many other software, U disk can not be recognized.
I am sure the driver was installed. When I run "lsusb", I can find the usb disk(Bus 001 Device 005: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2).
When I run "dmesg", it shows （[241620.374470] usb 1-1.3: Device is not authorized for usage
[241637.411899] usb 1-1.3: USB disconnect, device number 4）. I edited the "org.freedesktop.devicekit.udisks.policy",change "allow_any" to yes and still not work!
Later, I found the problem is that usbguard blocks the usb-device.
Find out the id of device by "usbguard list-devices" and use "usbguard allow-device XX"
But how can it work automaticly?
Thank you!
Hongwei

If you have usbguard and it blocks devices that you want to use, you can use the usbguard tool to add them to allowed list. Run usbguard and you should get some fairly clear instructions.
$ usbguard list-devices
Should give you a listing of connected devices and whether they are allowed or blocked. You can pick an id and run e.g.
$ usbguard allow-device -p 04b0:0428
and should see the change in journal:
 kernel: usb 1-1: authorized to connect
Usbguard is meant to block all devices hotplugged after system boot. To make persistent changes, you can add rules to /etc/usbguard/rules.conf. You can generate config from current rules with usbguard generate-policy.
So, to see what's changed between them, you can:
$ usbguard generate-policy | sudo diff - /etc/usbguard/rules.conf
And to overwrite the rules file with current run:
$ usbguard generate-policy | sudo tee /etc/usbguard/rules.conf
You can also edit the rules manually and copy across machines etc.

You have to remove the usbguard package by:
sudo apt autopurge usbguard

and reboot.


Building a six-screen setup. What video cards options are there? I'm building myself a nice setup with a massive amount of screen real estate. Since I had/have problems with video drivers in the past. I'm asking for advise here first.

I want to connect at least six screens. like this: 6 screen setup

What are the best options? What are the pitfalls?
I preferably would not like to use closed binary blob drivers.

usecase scenario:
I'm writing a piece of software that has to interact with other systems.
I would like to be able to see all of those systems, my code, lots of log files and
documentation without the need to swap windows/screens. To just better see what im doing.

UPDATE

I recently updated to ubuntu 14.04 and my radeon HD7880 with six mini hd outputs just worked out of the box without manual binary driver downloads etc. hardeware acceleration worked to! YAY!

I have a 3 monitor rig working with both blob and OSS drivers(blob performance is marginally better and supports opencl much better).  That's not a solution to a six monitor quandry.

Dual monitors cards with 2 triplehead2gos should be more than adequate to achieve 6 monitor screen real-estate.

Windows.

If you can afford 6 Monitors you can afford decent enough hardware to run your IDE in Ubuntu on a Virtual Machine. What you cannot afford is tinkering for weeks with Linux poor multi-monitor support with no stable solution in sight.

Please prove me wrong, I gave up.


Completely REMOVE and REINSTALL vlc on my system? I am using a Ubuntu 15.10 machine and everything was just fine until yesterday..when I decided it might be cool to run kde on my system, so I installed plasma and that's when things started to get bad.I logged in to plasma, and tried to play a video using vlc, and I there was something weird.Even in fullscreen, the video occupied only about a quarter of the screen, and I was unable to fix it.So I logged out of plasma and back to unity, and the problem was still there.Since then I have tried many possible solutions without avail.I tried reinstalling vlc,using synaptic to remove vlc and reinstall, using purge to remove vlc, and finally that issue is gone but there is new one. Now vlc display audio in one instance and audio in another. The instance with audio has the menu bar. I tried changing setting to allow only one instance but it didn't fix the problem. I really want to use vlc. I want to get vlc just as it was when I first installed i it. Any suggestions?

Update: I just discovered that when I check integrate video in interface, there is only one instance, but the previous issue returns.

In a terminal, run:

sudo apt-get remove --purge vlc

sudo apt-get autoremove

sudo apt-get autoclean

sudo apt-get install vlc

Done.

locate or find vlc from terminal and than delete all files from respective folders


How to change access rights for /? I accidentally changed access rights on / for my Ubuntu 16.04 using sudo chmod 466 /. I was supposed to change access rights for a file but instead I accidentally executed a chmod on / (root directory). Of course now I can't access the operating system and I would like to recover some files from it.

Is there a way that I can change access rights for / again so that I may recover my operating system and the files stored within it? If not is there at least a way that I can recover my files from it before I reinstall the entire system again?

I tried pressing F2 to enter the terminal before the system tries to load (since it can't load now, or at least the graphical UI won't load), and then logging in but since the permissions now don't allow write or execute it says that I don't have permissions to access it. I also tried executing a chmod 777 / while in terminal but that didn't do much good either, or maybe I did something wrong there... I tried looking for an answer to this question online but all I can find is how to chmod specific files and directories within the system.

The system is encrypted and all I am able to do now is to decrypt the disk before the system starts to load, but after that I can't do much. If anybody could help me with this it would be much appreciated.

-- Update -----

Ok, so this is where I am at right now:

I used a USB with a live Ubuntu system on it by clicking on the Try Ubuntu option and then using the terminal to change permissions for / of my system with sudo chmod 777 -R for the hard disk where my Ubuntu OS is installed. Now I can log in to the system again but now when I log in all my settings are gone and I can't access my files. It's like accessing a fresh installation of Ubuntu 16.04 even though I didn't install the system again. I just used the option Try Ubuntu from the live Ubuntu USB.

When I try to access my home directory which was also encrypted I can't see my files. All I can see are the default directories like Desktop, Documents, Downloads, Music, Pictures, Public etc. but the directories that I created are no longer there. There is a file though called "Access-Your-Private-Data.desktop" and when I click on it it launches a Terminal and asks form my login password. After I type in my login password nothing happens and I still don't see a new directory with all my files that were encrypted in my old home directory or anything like that. Can anybody help me out with this? How can I recover my files from that directory?

Ok, so this is what I did in the end... I lost the home directory decryption key and without that there really wasn't much I could do. I had to reinstall my system, but fortunately the data loss wasn't too big, only a few files that I could do without in the end. Since I backed up the important things before I got locked out of my account I could copy back the important data once I reinstalled the system.

I know this answer may disappoint others who may find themselves in a similar situation, but this is what I did in the end. I just had to do a clean install and copy all my data back from my backup drive. This time I made sure I save the home decryption key on my external drive.

I guess my advice would be to make sure you save your home decryption password and back up your data regularly.

I think It's all there if you still have the encryption key.
You can try a live usb ubuntu image
See this post about mounting encrypted volumes.

  Your volume is probably encrypted with LUKS, here's how to mount it:

You need:

sudo apt-get install cryptsetup

To decrypt the volume:

sudo cryptsetup luksOpen /dev/sda1 my_encrypted_volume

Now you can mount it as usual:

sudo mkdir /media/my_device
sudo mount /dev/mapper/my_encrypted_volume /media/my_device

To lock the container again, it needs to be unmounted first:

sudo umount /media/my_device
sudo cryptsetup luksClose my_encrypted_volume

To automatically put it in the /media location, use the udisks tool

sudo udisks --mount /dev/mapper/my_encrypted_volume


How can I avoid the black screen on boot with GMA500 graphics? Ubuntu 12.04 was released today, but it still can't boot normally with GMA500 graphics :(. It's a black screen and i need to go into text mode via Ctrl-Alt-F1 and restart desktop manager via "sudo service lightdm restart".

Is it any way to avoid this restarts every time OS boots?

Yes, you should add 'console=tty1' to grub options.

To do that, run gksudo gedit /etc/default/grub
find the line GRUB_CMDLINE_LINUX="", and change it to:

GRUB_CMDLINE_LINUX="console=tty1"

Lastly, update grub with sudo update-grub.

How do I add a kernel boot parameter?

The added line didn't work for me. Here's what did (from: https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsboAlternatives)...

Getting 1366x768 resolution

Create file /etc/grub.d/01_915resolution with lines

echo insmod 915resolution
echo 915resolution 58 1366 768 32
and execute:

chmod +x /etc/grub.d/01_915resolution
In file /etc/default/grub, assign value 1366x768x32 to variables GRUB_GFXMODE and GRUB_GFXPAYLOAD_LINUX:

GRUB_GFXMODE=1366x768x32
GRUB_GFXPAYLOAD_LINUX=1366x768x32

Execute:

sudo update-grub
reboot, now you have 1366x768 resolution.

===

I already had that resolution, but with the added commands above I can now see the screen too.


Slow boot times since 18.04 installation on Dell D630 Since I have upgraded my Del D630 laptop to Ubuntu 18.04 , boot times became "impossible". It literally take many minutes just to get a login screen, and then still one minute or more to have working icons on a desktop. This for both X11 and Wayland sessions.

I ran systemd analyse tools and I saw that the different snap and systemd services are causing a huge delay in booting.

Does anyone have any idea how to overcome this or how to remove them without further breaking breaking my system?

$ systemd-analyze blame
1min 31.794s dev-loop8.device
1min 31.790s dev-loop9.device
1min 31.675s systemd-backlight@backlight:intel_backlight.service
1min 31.144s systemd-rfkill.service
1.408s dev-sda1.device
822ms fwupd.service
789ms dev-loop7.device
689ms dev-loop6.device
658ms dev-loop3.device
634ms dev-loop1.device
629ms dev-loop5.device
626ms dev-loop0.device
601ms dev-loop4.device
562ms dev-loop2.device
529ms networkd-dispatcher.service
522ms systemd-udev-trigger.service
491ms ModemManager.service
490ms accounts-daemon.service
437ms udisks2.service
409ms NetworkManager.service

$ systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 33.705s
└─multi-user.target @1min 33.703s
└─systemd-user-sessions.service @1min 33.620s +8ms
└─network.target @1min 33.617s
└─NetworkManager.service @1min 33.206s +409ms
└─dbus.service @1min 33.119s
└─basic.target @1min 32.981s
└─sockets.target @1min 32.979s
└─snapd.socket @1min 32.961s +15ms
└─sysinit.target @1min 32.935s
└─apparmor.service @1min 32.710s +222ms
└─local-fs.target @1min 32.686s
└─home.mount @1.695s +22ms
└─systemd-fsck@dev-disk-by\x2duuid-79ea6e09\x2dcdf7\x2d4447\x2d9041\x2d6abffceb9e50.s ervice @1.641s +47ms
└─dev-disk-by\x2duuid-79ea6e09\x2dcdf7\x2d4447\x2d9041\x2d6abffceb9e50.d evice @1.635s

Thanks for any help or tips.

I may have found a work-around; my boot time got reduced from over 4 minutes back to about 50 seconds (Wayland session) by doing:

sudo vi /etc/default/grub
I changed the GRUB_CMDLINE_LINUX_DEFAULT boot parameter to:  GRUB_CMDLINE_LINUX_DEFAULT="video=SVIDEO-1:d"
Save and exit vi
sudo update-grub
sudo reboot

br, Koen.

for me this helped:
Boot hangs for 30 seconds at "Begin: Running /scripts/local-premount"

I found out that the local-premount script was hanging when i disabled the splash screen in the grub configuration


How to check hard disk performance How to check the performance of a hard drive (Either via terminal or GUI). The write speed. The read speed. Cache size and speed. Random speed.

Terminal method

hdparm is a good place to start.

sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads:   12540 MB in  2.00 seconds = 6277.67 MB/sec
Timing buffered disk reads: 234 MB in  3.00 seconds =  77.98 MB/sec

sudo hdparm -v /dev/sda will give information as well.

dd will give you information on write speed.

If the drive doesn't have a file system (and only then), use of=/dev/sda.

Otherwise, mount it on /tmp and write then delete the test output file.

dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/output

10240+0 records in
10240+0 records out
83886080 bytes (84 MB) copied, 1.08009 s, 77.7 MB/s

Graphical method

Go to  System -> Administration -> Disk Utility.

Alternatively, launch the Gnome disk utility from the command line by running  gnome-disks

Select your hard disk at left pane.
Now click “Benchmark – Measure Drive Performance” button in right pane.
A new window with charts opens.You will find and two buttons. One is for “Start Read Only Benchmark” and another one is “Start Read/Write Benchmark”. When you click on anyone button it starts benchmarking of hard disk.

How to benchmark disk I/O

Article

Is there something more you want?

some hints on how to use bonnie++

bonnie++ -d [TEST_LOCATION] -s [TEST_SIZE] -n 0 -m [TEST_NAME] -f -b -u [TEST_USER]
bonnie++ -d /tmp -s 4G -n 0 -m TEST -f -b -u james

A bit more at: SIMPLE BONNIE++ EXAMPLE.


Compiling and installing Intel graphics card drivers I have a laptop which has an Intel core 2 duo processor with in-built graphics card. I have some issues with the video drivers. I want to know from where I can get latest sources code for the drivers, and also need suggestions about the best way of compiling and installing the driver.

Instead of compiling the drivers yourself you can just add this PPA to your system and update it. All the instructions you need are on the page itself. Follow them carefully, and remember, you do this at your own risk (so the developers are not responsible for breakage).

You can add this PPA to your system using he command sudo add-apt-repository ppa:xorg-edgers/ppa.

It is however strongly recommended to stay with the default drivers that are installed by Ubuntu since they have been widely tested.

If you are looking for something newer but still regarded as stable then look to installing the x-updates PPA

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

You can download the driver from the site of ati or nvidia and install .


Grub is only a command line, and cant see windows I recently set up linux on my main machine, to be compatible with a research group I'm now working with, as a dual boot with windows 10. After instillation, grub comes up as a command line, and doesn't see either os.

I followed the tutorial here and I managed to boot into linux using the following code

grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot

subbing root for the correct directory, as well as the correct linux and initrd files.

The isue is that I have to enter this every time I boot the machine. I tried the code at the bottom of the page talking about "permanent repairs" but it didn't work. I also have no way as of now to get back to my windows partition.

Boot into Ubuntu , just as you described, and run sudo grub-install /dev/sda && sudo update-grub. Reboot to test.

I usually use a utility called Boot Repair. Here's the Linux Community page for Boot Repair: https://help.ubuntu.com/community/Boot-Repair


How much free space should I have on my hdd? I know this could sound like a silly question.

But I have always wondered what the free space on a Ubuntu partition should be!

With should be I mean how much do I need free to be able to run everything as smoothly as possible and get the best amount of speed form my computer.

Is it 10%? 10GB? or something else?
is it specific for this hard drive or only the Ubuntu partition?
Is it specific for "/home"? (if you have separate system and personal stuff.)

Well. It varies...

First of all, on *IX all filesystems usually have a reserved space, accessible only to root; nowadays it is 5% of the filesystem size (by default), but can be larger or smaller. If you are running as the superuser, then there is no reserve.

So, whatever is your filesystem size, you can actually use up to (100 - reserved space).

There is no fixed response to your question: it depends on how you use the filesystem. For normal usage (i.e., a desktop/laptop with email, browser, music, videos), a probable safe bet is around 60-80%. If the disk contents is volatile -- meaning lots of changes, large files being created/deleted, etc -- then you can expect degradation as the filesystem gets filled up. Now... of old, a good initial bet was "be worried if it is 80% full"; but with the current crop of extremely large drives, it does not make a lot of sense anymore -- 20% free space off 1T is still 200G! -- and this is one of the reasons the reserved space is now only ~ 5%.

But... rule of thumb for generic use... I would say tops at 70%, then start considering an upgrade/additional drive ;-)

If, OTOH, you are just adding files one after the other, never (re)moving them, then you can safely use all space available with no impact.

And yes, there can be fragmentation, which can cause degradation on read/write times.


Reduce request latency on an FTDI UBS-to-RS-232 adapter I'm using an ElmScan5 scantool which uses an FTDI USB-2-RS-232 serial-to-USB chip under Wine 1.6.2 on Ubuntu 14.04 (Trusty Tahr).

The latency is very high and I found a recommendation on how to reduce it on Windows, but I'm not sure how to do something similar on Linux.

In Windows under COM ports there is an option to reduce the latency timer:

  Call Device Manager, find your USB port. (1) Call Properties; (2) Call advanced (3) Change Latency Timer from 16 to 2 or 1 ms.

In order to get the software working under Wine I had to add the following to the Wine registry file:

[Hardware\\Devicemap\\Serialcomm] 1015709345
"Serial0"="COM1"

So I don't know if this is a Linux or a Wine issue.

OK, so here's the answer ( haven't tested it yet but looks good):

# cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
16
# echo 1 > /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
# cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
1

The only annoying thing is that it looks like I may have to manually set it every time a unplug then plug back in the device, or at least on every reboot.

cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
sudo bash -c "echo 1 > /sys/bus/usb-serial/devices/ttyUSB0/latency_timer"
cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer


Install mooshak 1.6.2 in ubuntu 14.04 I am trying to install mooshak to host a programming contest in my server. I tried installing mooshak in my server. The installation completed with a error message

could not find username in the output of info

When I run

http://localhost/~mooshak

I am redirecting to a page looks like a script file. The address at the address bar shows

http://localhost/~mooshak/cgi-bin/execute

I hope the script file is not executing.

Could someone please help me to install mooshak.

Looks like you missed this step

Enable some modules of Apache.

a2enmod userdir
a2enmod suexec

for complete guide : http://askqueries.com/install-mooshak-online-judge-ubuntu-linux/

your problem is operating system version. some supporting tools are already there in your os so u need to install ubuntu 12.0 version then it works like that i got


code::blocks on Xenial Beta Attempting to install code::blocks through the PPA with apt-get and not having much luck. I keep receiving these errors:

The following packages have unmet dependencies.
libcodeblocks0 : Depends: libwxbase2.8-0 (>= 2.8.12.1+dfsg2) but it is not installable
                 Depends: libwxgtk2.8-0 (>= 2.8.12.1+dfsg2) but it is not installable
                 Recommends: codeblocks but it is not going to be installed

I have also attempted installing through Synaptic but to no avail. Has anyone got any ideas?

Thanks in advance!

To get Code::Blocks installing you have to get a bit creative, as first download the packages for Ubuntu 15.10 from here (simply do a search for libwxgtk2.8-). For a 64-bit system you can as well use the following links to download the packages. Best do the now stated commands in a separate directory so you not install any other downloads you maybe did before.

wget http://mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets2.8/libwxgtk2.8-0_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets2.8/libwxgtk2.8-dbg_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets2.8/libwxgtk2.8-dev_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets2.8/libwxbase2.8-dbg_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/w/wxwidgets2.8/wx2.8-headers_2.8.12.1+dfsg2-2ubuntu2_amd64.deb

Now you can go and install those by:

dpkg -i wx2.8-headers_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
dpkg -i libwxgtk2.8-0_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
dpkg -i libwxbase2.8-dbg_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
dpkg -i libwxgtk2.8-dbg_2.8.12.1+dfsg2-2ubuntu2_amd64.deb
dpkg -i libwxgtk2.8-dev_2.8.12.1+dfsg2-2ubuntu2_amd64.deb

Do this

sudo apt-get install libwxbase2.8-dev   libwxgtk2.8-dev

to install the upstream packages ... then do the code::blocks install


Unable to download Ubuntu SDK I am unable to download Ubuntu SDK . Whenever I try the command given on the website.  I get an error saying unable to lock the administration directory.

Run these three commands on the terminal to remove the lock

sudo rm /var/lib/apt/lists/lock
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock


GNOME Shell flickering with ATI proprietary drivers Works fine with opensource drivers, but with catalyst flickers everytime you press on activities or the lower right bar.

I have 01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3600 Series

Running fresh ubuntu 11.10 and catalyst 11.10 from ati.com website.

Any suggestions?

EDIT: I want to use the proprietary drivers I know that opensource ones work fine.

Uninstall proprietary drivers.

I did it last week and latest version of open source drivers works perfectly.

sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo rm -rf /etc/ati

http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide

To solve this (with propietary drivers) install compiz manager, then go to OpenGL and make sure all the options are unchecked. Restart and you are good to go (:


hybrid-dump for VDPAU accelerated video playing on Ubuntu 11.10 with bumblebee 3.0? I am trying to run hybrid-dump for VDPAU accelerated video playing on Ubuntu 11.10 with Bumblebee 3.0 installed and running. But following the instructions in the URL below, I can't get mplayer with vdpau to work:

https://askubuntu.com/a/100812/17702

avilella@magneto:~/hybrid_graphics/hybrid-windump$ git pull
Already up-to-date.
avilella@magneto:~/hybrid_graphics/hybrid-windump$ make clean && make

optirun true
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 metacity --replace &
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer -vo vdpau file.720p.mkv
#(in the other gnome-terminal tab)
LD_LIBRARY_PATH=/usr/lib/nvidia-current ~/hybrid_graphics/hybrid-windump/windump :8 :0

Also tried:

LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer -vo vdpau -vc ffh264vdpau file.720p.mkv

I don't get any video from it, only audio. I do get video and audio if I remove the vdpau bit, but then windump is not needed:

LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer file.720p.mkv

If I try glxspheres, it works well, like this:

LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 glxspheres
#(in the other gnome-terminal tab)
LD_LIBRARY_PATH=/usr/lib/nvidia-current ~/hybrid_graphics/hybrid-windump/windump :8 :0

Polygons in scene: 62464
Visual ID of window: 0x27
Context is Direct
OpenGL Renderer: GeForce 310M/PCI/SSE2

Now video playing. Following the instructions below, I got it to work to some extend:

Edit /etc/bumblebee/xorg.conf.nvidia and added:

Section "Screen"
    Identifier "Screen0"
    DefaultDepth 24
    SubSection "Display"
        Depth    24
        Virtual  1280 720
    EndSubSection
EndSection

Restarted bumblebeed:

sudo restart bumblebeed

In one of the terminals, I call the mplayer command:

LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/lib/nvidia-current/vdpau DISPLAY=:8 optirun mplayer -vo vdpau -ao alsa file.720p.mkv

In another terminal, I then call the compiz and then windump commands:

LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8  compiz --replace &

~/hybrid-windump/windump :8 :0

PROBLEMS: I am struggling with the size of the video window. In a 1366x768 screen, I set up for a 1280x720 video size, but the image is chopped by about 200 pixels on the right hand side, leaving the same size of black windump area.

Any ideas?

This is how I got vdpau:

Edited /etc/bumblebee/xorg.conf.nvidia to have

Section "Screen"
    Identifier "Screen0"
    DefaultDepth 24
    SubSection "Display"
        Depth    24
        Virtual  1920 1080
    EndSubSection
EndSection

Run

LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/lib/nvidia-current/vdpau DISPLAY=:8 optirun mplayer -vo vdpau file.720p.mkv

Run

LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8  compiz --replace &

Downloaded https://github.com/gebart/hybrid-windump, removed xorg.conf from it, then compiled (just make command).
Run ./windump :8 :0

Note: You don't need to edit /etc/bumblebee/bumblebee.conf and change KeepUnusedXServer to true as we run MPlayer directly with Optirun.

It should be DISPLAY=:0; metacity --replace &

Also, optirun says that your display is clearly :0.0, why are you trying to start metacity on display :8? Do you have a program running on display :8 that we can't see in your post? If you do, please provide us that info as well, please?


Ubuntu 16.04 fan problem on my Asus UX501VW I've installed Ubuntu 16.04 but my PC starts to run fan at maximum speed when I log in. Once installed I tried to find where the problem is, so I have installed lmsensors, fancontrol and psensor. All temps are o.k. (about 30 °C) but fan speed is -1 RPM (on Windows and on Ubuntu 15.10 fans work correctly). Changing video driver (from X.Org to nVidia driver) fans work correctly (and on Psensor fans are about at 2200 RPM) but my battery runs out quickly because of the nVidia Geforce GTX 960M. If I go back to X.Org video driver the problem returns. I have tried  to install laptop-mode-tools too, but the problem remains. How can I solve this problem and continue to use X.Org driver?
Thank you so much and sorry for my English.

P.S.: this is the result of sensor using nVidia driver

acpitz-virtual-0
Adapter: Virtual device
temp1:        +38.0°C  (crit = +103.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +39.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:         +36.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:         +36.0°C  (high = +100.0°C, crit = +100.0°C)
Core 2:         +34.0°C  (high = +100.0°C, crit = +100.0°C)
Core 3:         +34.0°C  (high = +100.0°C, crit = +100.0°C)

asus-isa-0000
Adapter: ISA adapter
cpu_fan:     2100 RPM
temp1:        +38.0°C

EDIT:

I have solved my problem installing Linux kernel 4.6.0 (Ubuntu 16.04 has Linux kernel 4.4.0). Here's a guide to install it and here another solution for my problem (tested) that use Linux kernel 4.3.5.

The second solution slow down system start, so I have used the first one

Just for the record, since I have no interest in using the intel gpu, I never have. As an experiment, I used the nvidia gui to change to intel, logged out, and, after login the same fan issue occurred in 15.10,

uname -a
Linux deblap2 4.2.0-36-generic #41-Ubuntu SMP Mon Apr 18 15:49:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

thus, as far as I can tell, it is not ubuntu 16.04 specific, and, in the various distros I attempted to install on the laptop, including debian, manjaro, mandriva, it has universally occurred, except that only ubuntu 15.10 installed correctly.

Also more interesting, I could not then revert by using the nvidia gui, as after logout touchpad froze, and I need to hard shutdown.

this is interesting as the problem with the power switch was the main reason i ended up with ubuntu,  as ever other distro I tried had the issue that the power switch and the commands reboot and shutdown did not work as expected.

I thought it was a kernel version issue, or my laptop, same as OP's, or elan or evdev, or coretemp,  but even though arch recommended adding lmsensors and coretemp, coretemp is loaded. thus, the post and answers bring us one step closer, as the issues are somehow gpu related.

best

M

I had same issue,

What I did, is to install ubuntu 16.10, and the problem with the fan was gone; I still had a login issue, which I was able to solve with this:
Ubuntu gets stuck in a login loop

Besides that, everything else works perfect with 16.10


Failed to load module “canberra-gtk-module” .... but already installed Gtk-Message: Failed to load module "canberra-gtk-module"

but I already have the libcanberra-gtk-module  and libcanberra-gtk3-module installed.
(i.e. I tried this solution, but it is already installed.)

This happens for instance, when I run ipython --pylab

I'm running Ubuntu 13.04 - raring.

install gtk and gtk3 module should solve it.

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

Maybe too much but this solved my problem:

$ sudo apt-get install libcanberra-gtk*


Oxford 8 on ubuntu 13.10 I  have the Oxford ed.8 setup folder on my hard disk in folder (Downloads) and here what I've got in the terminal when I try to install it (the install folder  has setup for Linux with name: linux):

WARNING:root:python-html2text is not present. HTML pages will not be converted into text.
shams@shams-MS-7592:~$ cd Downloads/Oxford/linux/
shams@shams-MS-7592:~/Downloads/Oxford/linux$ ./setup.sh
The setup program seems to have failed on amd64/unknown

Fatal error, no tech support email configured in this setup

That's because probably you're trying to install a 32-bit on a 64-bit system.
Try this-

linux32 ./setup.sh

Here are the steps:

Open a terminal (press Ctrl + Alt + T) and cd to the target directory containing the setup.sh:

cd /to/target/directory

e.g.

cd /media/OALD8

And execute the setup.sh file with (or sudo ./setup.sh):

./setup.sh

(running without sudo will create a local installation without root access.)
Go through the licence agreement, on the prompt, hit Y to agree, specify the installation path or hit RETURN key to use the default, and finally hit Y on the continue insatllation prompt.
A desktop desktop shortcut will be created on your desktop. To make it executable, run this command in terminal:

chmod +x $HOME/Desktop/oald8.desktop

To make it available in the Dash's application lens:

sudo cp $HOME/Desktop/oald8.desktop /usr/share/applications/

Double click the desktop icon or search oald8 in Dash and click to launch the program:

PS. Resolving dependencies:

The error message that you've posted demands installation of python-html2text and you can do this with the command:

sudo apt-get install python-html2text

(which is available under the universe section, so make sure you have allowed downloads from the repository. Here's a link showing how you can do that; remember to update the package list with apt-get after adding the repository.)

After installing python-html2text run the script again and it's not unexpected if you further encounter some more dependency problems, just get the packages installed and continue.

Alternatives:

"Artha", A handy off-line thesaurus based on WordNet:

Section - Universe/utils

Installation:

sudo apt-get install artha

"GoldenDict", offering feature-rich dictionary lookup program using WebKit for an accurate articles' representation, complete with all formatting, colors, images and links.

Section - Universe/utils

Installation:

sudo apt-get install goldendict

Gnome Dictionary:

Section - Universe/gnome

Installation:

sudo apt-get install gnome-dictionary

dict - a CLI client to dictd server (offline usage):

Section - text

Installation:

sudo apt-get install dict
sudo apt-get install dictd

Installing English dictionary databeses (gcide, wn, devil):

sudo apt-get install dict-gcide
sudo apt-get install dict-wn
sudo apt-get install dict-devil

Installing English Thesaurus database (moby-thesaurus):

sudo apt-get install dict-moby-thesaurus

Usage:

Using a particular database (eg. WordNet - wn):

dict -d wn "dictionary"

Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.

 dict "dictionary"


How to permanently open browsers in firejail? I've edited /usr/share/applications/firefox.desktop in the past to use firejail when running firefox, but it seems like this was removed during an update.
How can I permanently open browsers in Firefox without needing to update .desktop files whenever they're updated?
.desktop files in ~/.local/share/applications
These files still exist, they're unchanged from when I created them months ago. The system just isn't picking them up for some reason, and seems to be prioritising the ones in /usr/share/applications instead.
Some of this is redacted due to extraneous content (language specs, etc).
firefox.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=firejail firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=Open a New Window
Name[ar]=افتح نافذة جديدة
Exec=firefox -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -private-window

brave-browser.desktop
[Desktop Entry]
Version=1.0
Name=Brave Web Browser
GenericName=Web Browser
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Exec=firejail /usr/bin/brave-browser-stable %U
StartupNotify=true
Terminal=false
Icon=brave-browser
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window
Exec=/usr/bin/brave-browser-stable

[Desktop Action new-private-window]
Name=New Incognito Window
Exec=/usr/bin/brave-browser-stable --incognito

.desktop files in /usr/share/applications
They're identical to the ones in ~/.local/share/applications.
I just added firejail to the front of the Exec command in each .desktop file. These commands work fine when manually executed in the terminal.
Further debugging info
I think this may have started happening after I updated from Ubuntu 20.04.1 LTS to Ubuntu 20.04.2 LTS. I'm not sure, though.
I haven't changed anything besides updating system packages with apt. I'm not aware of anything that could've caused this problem.
I know when it's working, because when it is, I can only access the ~/Downloads folder when uploading files in the browser. And if I'm running it from the command line, I'll get output from firejail.

If I understand correctly, you want to open Firefox in a Firejail sandboxed environment every time a web page is opened (by whichever means).
How to achieve this will vary depending on the method you use to start firefox:

Command line
A launcher in dash
A launcher in the desktop

For method 1 above, you can set an alias in your ~/.bashrc (assuming you use bash)
alias firefox='firejail firefox'

For method 2 above, the option you posted in the question should work.
I suggest you repeat that, and if the change in /usr/share/applications/firefox.desktop you perform is ever reverted, you check the date of the change.
Then compare with e.g. less /var/log/apt/history.log what could have been the update that caused the change (sources: 1, 2).
You can actually try this in your current state.
You can also create your own .desktop as you mention in your answer.
Then drag it to the dash (I am not sure you did that).
Same as above, I suggest you repeat the operation, and check whenever this stops working for the possible cause.

EDIT
In addition, I suggest you post the following detailed information:

The commands you use to verify when "it is working" and "when it is not", and the output that shows it. It is better if you copy this verbatim (instead of "explaining" what you did).
The location and full contents of your .desktop files, after you changed them, and after the system changed them.

You did not specify:

In your question, what action you performed that reverted your changes in /usr/share/applications/firefox.desktop. "An update" is quite loose... did you update firefox, or some other application?
In your answer, what action you performed that made your ~/.local/share/applications/firefox.desktop inoperative. "doesn't seem to have worked long-term" is again loose. Plus, is your .desktop file is still there and with its contents the same as when it worked, but now simply not working? Or was it somehow modified?

Getting your feedback on this will help a lot.
Related:

How do I change the launcher commands?

As I know you haven't to do anything because:
$ which firefox
/usr/local/bin/firefox
$ ls -l /usr/local/bin/firefox
/usr/local/bin/firefox -> /usr/bin/firejail


How to rotate a specific window in 90ْ ? Is there a way to rotate a specific window and not the whole screen?

The Freewins plugin for compiz is supposed to be able to do that.

The support status of the plugin is a bit unclear. It can be installed by typing apt-get install compiz-plugins, but for a long time I could not figure out how to get it to do anything other than cause selected windows to "permanently" lose focus until compiz is restarted.

An answer from three years ago says it is no longer supported and recommends not using it as it could cause system freezes. It recommends an alternative which supports some of the features of Freewins, but unfortunately not window rotation.

In my experience compiz freezes can happen even without installing this plugin, but when they do happen the system can be unfrozen by ssh to the machine and running DISPLAY=:0 compiz --replace. I do not know if the freezes that Freewins allegedly cause are any harder to fix than those which can happen in a standard compiz install. So far I haven't seen it cause a problem that could not be fixed by restarting compiz.

If you want to give that plugin a try, I recommend your first learn how to restart compiz remotely, in case you should need to do so. Secondly I recommend you disable the two options Prevent Input and Immediate Moves, as those seem to be causing the most trouble.

Additionally, there is a setting deciding which windows are allowed to be rotated. I haven't figured out exactly how it works, but it appears that "old-skool" applications such as xterm cannot be rotated.

ctrlshifte and ctrlshiftq can be used to rotate the window in focus. ctrlshiftr will return to normal orientation (though sometimes I had to press it a few times before it worked).

I couldn't get rotation by using the mouse to work at all. And a rotated window could not be focused using the mouse, but it could be selected using alttab.

I know of a "cheating" way to do it, one screenshot at a time...

Grab a screenshot (Print Scrn)
Open screenshot in GIMP (or the default viewer if it can do 3.)
Rotate image 90ْ

And vlc can rotate a video to any angle you want. If you could get vlc to open only part of your Desktop (in Capture Device) you might be able to rotate it's display to see a "live" view of the window too...


efibootmgr creates an entry in which DevPath is set to Venhw istead of PciRoot Hello I have a big problem because you see when I use efibootmgrto create a boot entry it just makes a unbootable japanese character in the EFI boot menu and this is very bad.

On the other hand when I use bcfg in the EFI shell it works just fine. The efibootmgr command used is : efibootmgr -c -d /dev/nvme0n1 -p 1 -l /EFI/refind/refind_x64.efi -L "rEFInd" whereas the bcfg one is : bcfg boot add 3 fs0:\EFI\refind\refind_x64.efi "rEFInd"

When I do bcfg boot dump -v the difference between the efibootmgr and bcfg entries is the following :

The DevPath for the bcfg made entry is PciRoot(0x0)/Pci.....\EFI\refind\refind_x64.efi whereas for the efiboomgr made entry is just says VenHw(99E275E7-75AO-4B37)

Do you have an idea on how to get efibootmgr to work ? Or alternatively what option in the command call I need to use in order to specify kernel paramaters with bcfg ?

If efibootmgr is creating an entry like you describe (VenHw(99E275E7-75AO-4B37)), then that sounds like a bug in either efibootmgr or the firmware. That said, consider the efibootmgr command you specified:

efibootmgr -c -d /dev/nvme0n1 -p 1 -l /EFI/refind/refind_x64.efi -L "rEFInd"

There are two things that are unusual about this:

Disk device -- Most disk devices in Linux have names of the form /dev/sd?, where ? is a letter from a up. Some devices, such as some SSD cards, have filenames that take other forms, like /dev/mmcblk0 (that's from memory and might not be quite right). I don't recall ever seeing a device name like /dev/nvme0n1. That's not to say it's wrong, but at the very least it's unusual, and you should double-check it. I'd be especially careful to not include the partition number -- that's what the -p option to efibootmgr is for.
File specification -- Older versions of efibootmgr require that files be specified using EFI syntax -- that is, with backslashes (\) rather than slashes (/) separating directory entries. Because Linux shells generally treat backslashes uniquely, this also requires either quoting the entire pathname or doubling up on the backslashes, so you'd specify -l \\EFI\\refind\\refind_x64.efi or -l "\EFI\refind\refind_x64.efi. I've heard that the most recent versions of efibootmgr will accept a more traditional Unix/Linux form and "translate" internally, but I don't know precisely when that feature was added, and you haven't said what version of Ubuntu you're using. Thus, I recommend you use doubled-up or quoted backslashes rather than slashes.

As a practical matter, of course, if you've got a working entry via bcfg, there should be no need to do anything else with efibootmgr. I assume you're asking because it should work and because you want to be able to perform this type of maintenance from Ubuntu.

You need to edit the refind.conf file and change the path back to PciRoot. Write down the entire description of the device, so you can enter it in the conf file. Just make sure to pick the correct PciRoot ;)


KSH syntax error: invalid arithmetic operator (error token is ".111111111 -2.55555") I have the following example, and I cannot see why.
 line 48: 15.111111111 -2.55555: syntax error: invalid arithmetic operator (error token is ".111111111 -2.55555")

This is my source in ksh:
export a=2.55555
export b=15.111111111
export c=$(( $b -$a))
echo $c

Does someone have an idea please ?

You code is valid in ksh (although it is not necessary to export the variables, unless you plan on using them in a child environment). So for example given
$ cat myscript.ksh
#!/usr/bin/env ksh

export a=2.55555
export b=15.111111111
export c=$(( $b -$a))
echo $c

then
chmod +x myscript.ksh

$ ./myscript.ksh
12.555561111

However most other common shells do not support non-integer arithmetic - based on the error message it looks like you are actually executing the code with bash:
$ bash ./myscript.ksh
./myscript.ksh: line 5: 15.111111111 -2.55555: syntax error: invalid arithmetic operator (error token is ".111111111 -2.55555")

ksh has floating point support, so ksh was not used?
Bash doesn't do decimals in $(( ... )),
i.e. floating point numbers cannot be used.
One can look up the relevant section in man bash -manual by typing
/^ARITH ENTER
Well there you will see:
"Evaluation  is  done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error."

As @Terrance says in a comment above:
export c=$(echo "$b - $a | bc) should work.


Remove LibreOffice version installed by dpkg -i *.deb I have LibreOffice 5.4, had been installed by downloading the _deb.tar.gz and running sudo dpkg -i *.deb as it says in the readme.

I just downloaded LibreOffice 6 the same way and did the same process, expecting an over-write of 5.4 with 6. Instead now I have both. I have never gone the sudo apt-get install or PPA route because the latest ones were always out sooner in _deb.tar.gz and I frankly found the process smooth enough to never bother.

So, my OS doesn't really know that LibreOffice is even installed:

$ libreoffice --version
The program 'libreoffice' is currently not installed. You can install it by typing:
sudo apt install libreoffice-common

How does one remove a LibreOffice that's been installed the sudo dpkg -i *.deb way? Online I'm finding various answers that advise to remove it the apt-get way (ie assuming every existing LibreOffice out there has been installed the system way and not by dpkg... and they then advise how to install latest version by the dpkg way! Next time?)

Is it just about deleting off some files and folders? Is there something else to be done? Some config files to edit yada yada? I'm not doing direct-deleting yet, assuming some more steps may be needed. Oh and I have both 5.4 and 6 installed on my system, want to remove 5.4 only.

Found how to do it : Synaptic Package Manager. I had assumed that since sudo apt.. didn't know there was a libreoffice on board then even here it would be the same. But now I know this works differently.

I searched for "libreoffice" by name and it listed them all.. including not-installed but in-catalog ones (1.6.0.3! oh boy now I know why they ask not to install from the official repositories and ask us to add PPAs..). The 5.4 and 6.0 ones were all checked. So I selected all the 5.4 ones, right-clicked and marked for complete removal. Pressed the Apply button, and now the older one is gone, I have 700MB more space on the drive, its shortcuts are gone and entries from Open With.. are also gone. Clean uninstall.

Depending on the programs, you may or may not have to remove the old version, but chances are that such info won't be mentioned in the readmes or anywhere, so that you can happily lose an hour or two figuring out how to delete the older version. I have installed version 6.06 with dpkg -i *.deb since 5.2.7, which is the latest version for Debian Stretch's package manager, had stopped starting up (just displaying Application error).

I then carefully did apt-get remove libreoffice (not libreoffice6.0) and this of course removed the new version…


How to install tuxcut? need tuxcut to see who is on my network.. I used netcut on windows , and recently found out that tuxcut is the linux alternative of netcut.

Thnx in advance :D

Download the tuxcut deb file from this Sourceforge link
Install it's dependencies

sudo apt-get install wondershaper python-qt4 arp-scan dsniff arptables

Install the tuxcut's deb file with dpkg

sudo dpkg -i tuxcut_5.0_all.deb

Download the tuxcut deb file the above same link
, install it's dependencie

sudo apt-get install wondershaper python-qt4 arp-scan dsniff arptables

Create the following file

sudo touch /usr/bin/run-tuxcut

Install the tuxcut's deb file with dpkg

sudo dpkg -i tuxcut_5.0_all.deb


How to format a partitioned sd card? I have a SD card that has several partitions on it.

Running sudo fdisk -l gives me:

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192     2121093     1056451    c  W95 FAT32 (LBA)
/dev/mmcblk0p2         2121728    15333375     6605824    5  Extended
/dev/mmcblk0p3        15333376    15398911       32768   83  Linux
/dev/mmcblk0p5         2129920     2252799       61440    c  W95 FAT32 (LBA)
/dev/mmcblk0p6         2260992    15333375     6536192   83  Linux

Note all the above devices does not show up when I disconnect the SD card, hence I can assume all the above is related to the SD card.

Note the SD card is 8GB.

How can I format the SD card so that it behaves like normal?

Try this:

Insert sd card
Open a terminal,Press Ctrl+Alt+T
Run it:

sudo -i
umount /dev/mmcblk0p6
umount /dev/mmcblk0p5
umount /dev/mmcblk0p3
umount /dev/mmcblk0p2
umount /dev/mmcblk0p1
gparted

In Gparted, create a new partition table on a sd card device:
Select a sd card device.
Choose: Device --- Create Partition Table.
The application displays a Create partition table on /path-to-device dialog.
Select a msdos partition table type.
Apply
Create a new partition.
Select an unallocated space on the sd card device.
Choose: Partition --- New. (The application displays the Create new Partition dialog)
Specify the size and the location for the partition.
Specify the type of partition.
Specify the type of file system for the partition.
Specify the label of the file system for the partition.
Click Add to add the create partition operation to the operation queue.

Go into the dash
Type "disks"
Choose the programs called disks
Choose your device
Delete all the partitions by selecting the blocks and click the minus sign
Select the whole partition and click format

A simple Disks can do the job. Hope it helped :D


Which version of Ubuntu for Mac? The download page only mentions desktop pcs, so what version do I get for a Mac?

You want to get the Desktop version (Desktop refers to any computer that isn't a server), and if you have a newer mac, the 64-bit version.

http://www.ubuntu.com/download/desktop

If you're just trying it out, you might want the latest version -- 13.04 for all the shiny new features.  Otherwise, if you're looking for something to put on your computer and Just Get Work Done, I would recommend 12.04.

A mac is a desktop pc isn't (desktop as in desktop or laptop)?  So get the desktop version.


Use Ubuntu laptop as second monitor So I have an Windows 10 computer, a VGA/HDMI cable, and an Ubuntu 16.04 HP Laptop. Is there any way to use my laptop as a second screen to my Windows computer, but still see Ubuntu UI and all that? Like to have a window opened on Ubuntu seeing my Windows computer.

I don't want any remote software like TeamViewer.

You will most likely need software to accomplish this. Synergy will allow you to share the mouse and keyboard, which would make it feel somewhat like the same machine.

http://synergy-foss.org/


How can I undo the last cd command? Is there any way to jump back to the previous working directory after doing a cd to a different directory?

My use-case is that I'm traversing a directory structure for a Java project, and I'm expecting that the current directory has only one sub-directory. So, I type cd and hit Tab and Enter rather quickly. However, the Tab failed, as I mistakenly expected one sub-directory, when in fact there are more. So now, I just executed cd, and am now in my home directory, instead of the Java project. Is there a way to "undo" this cd and jump back to the directory I was in?

You can use cd - to go back to your previous location, no matter where that was.

Best way to do this for going back is cd -, however if you want to skip a lot of levels at once, you better use cd .. for one level, cd ../.., for two, cd ../../.. for three and on... a nice way to do it fast is this script:

#!/bin/bash
printf "Number of folders to move back: "
read TIMES
BACKCHARS=../
BACK=$(for i in `seq $TIMES`; do printf $BACKCHARS; done)
cd $BACK


How to use a .iso image as a CD-ROM Repository? I have all images of Debian, Ubuntu and Ubuntustudio as .iso. How can I use them as repository to install my desired packages with sudo apt-get install package-name?

I easily mount the .iso file with Archive Mounter, but when adding CD-ROM in Software Sources it says Please Insert CD-ROM.

How should I do this without burning them to disk?

This question has already been answered as part of an answer to a different question:
How to make USB drive as local repository

The easiest way to add the image as a software source is to burn it to a CD/DVD. You then need to go to System -> Administration -> Software Sources, click 'Other Software' and click 'Add CD-ROM...'.
If you want to use the ISO image as a software source without burning it, the process will be a bit more complicated. You will need to open a terminal Applications -> Accessories -> Terminal and run these commands:
sudo mkdir /aptoncd-mountpoint
sudo mount /media/USB/aptoncd.iso ~/aptoncd-mountpoint -oloop
sudo apt-cdrom -d=/aptoncd-mountpoint add
(source: http://www.debianhelp.org/node/10486)

Salam

Personal Repositories in Ubuntu:
https://help.ubuntu.com/community/Repositories/Personal

to add mount point to sourcelist
add

deb file:/aptoncd-mountpoint

in general:

deb file:/usr/local/mydebs ./


Should I create separate users for glassfish, mysql or not? I recently installed Ubuntu Server and now I am reading about it. I am going to install software and I see many tutorials create a own user for each program and a group. I am going to install Glassfish, MySQL etc and I wonder if these should have their own users such as glassfish user, mysql user and so on? Or is it sufficient/better to just create a group and add my own nonroot account to it?

Glassfish or MySQL will create their own users and I think it's better to rely on them instead of creating a group and adding your non-root user to it.

In Ubuntu, applications come in a form of packages which are stored in a package repository and installed using a package manager. A package normally comes with install scripts, config files and everything needed to run the particular software, including creating and configuring non-privileged user accounts.

You normally should not be concerned with creating user accounts for your MySQL server, manually compiling programs or even creating config files, especially if you're new to Linux. As @KetanPatel suggests, just use sudo apt-get install (package name) if you have terminal access; or use Software Center if you have GUI.


Webpages not loading in 12.04 after upgrading to ubuntu 12.04 lts browser (firefox, chrome) does not load webpages.
Connection to the network works and also to the internet (skype is working)
Software installaion via sudo apt-get fails ( -5 hostname association ...)

This could be to do with your DNS settings. Are you getting any error messages back from either browser or terminal?

You should pick up your DNS setting from your router/default gateway which in turn picks it up from your ISP.  Try editing the connection to use a external DNS.  One that I always use is 8.8.8.8 and secondary of 8.8.4.4 which are run by Google. Other options available are OpenDNS.

Ideally this would be some that would be programmed into your router so that your whole network behaves the same other you may have to fix this on each workstation.

Note: This can have issues on your local network if you need to resolve something internally.

=>Clear all the browser related items like cookies, history and bookmarks.

or

if first one is not working then follow second.

=>Make an installation of your browser again. remove your existing installed browser.It will help you to cover all those files which are corrupting your browser.


Upgrading from 10.04 to 11.04 I want to upgrade Ubuntu 10.04 to 11.04 offline. I have burnt a Ubuntu 11.04 CD. During the installation there's an option; "Upgrade to 11.04". Will choosing this option affect my Windows partition? I don't want my Windows partition to be affected.

The option "upgrade 10.04 to 11.04" is not like upgrading 10.04 to 11.04 via an upgrade to 10.10.. This option means that all data from your /home will be preserved but you will have to reinstall your idividual applications and you will also have to create your users again. User setting from these applications (including passwords in the keyring) will be preserved.

"Upgrade from 10.04 to 11.04" therefore is like a clean installation (i.e. "Erase Ubuntu and reinstall") but without formatting your drive and without erasing /home.

As with all OS upgrades it is strongly recommended to backup your data before you proceed.

Your Windows partition(s) will only be touched and deleted by choosing "Erase everything".

you can't upgrade from 10.04 to 11.04, you need to upgrade to 10.10 first od do a clean install of 11.04. Do as you wish and luck ;)


Lubuntu 13.10 selected LX games desktop now can't login I logged out of my normal desktop and selected LX games from the dropdown list and logged back in. This led me to a black screen and now I can't see the login screen in order to change back to my normal desktop. On startup the machine boots normally, the lubuntu splash screen shows up, then it goes to a black screen with nothing on it - not even a mouse cursor. I can bring up a terminal using ctrl+alt+F2.
Is there a way via terminal to change my desktop environment back to its previous state?
Or alternatively, is there a file I can edit where my preferred desktop is stored? (The machine is dual-booted so I can access the Lubuntu files from LXLE which is installed on a second partition).  The machine in question is a Toshiba A200 laptop.
UPDATE: I was unable to find a satisfactory way around this so have re-installed the OS.
Has anyone else been adventurous enough to select the lx games desktop and if so did they have any problems?

I also selected LX Games session and could not see any UI after that. This is what worked for me:
I edited the file /etc/lightdm/lightdm.conf

[SeatDefaults]
autologin-guest=true --> I set this var to true
autologin-user=user_name
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu

After this change I restarted my computer.

I don't know if this is the correct way to solve it, but at least I was able to logout and select back the Lubuntu session, and reset the autologin-guest var to false again.
This link was also helpful for me: https://wiki.ubuntu.com/LightDM

Note: I activated the autologin option when I installed Lubuntu.

Press the combination CTRL-ALT-F1
login with your root password
type top to see the current active programs running
then type killall lxsession


lightdm doesn't show up whenever I reboot the lightdm display the mouse cursor but it doesn't show the login form. However if I type my password I login into my account. This hapens since I've moved to kubuntu 15.04 (upgrade from kubuntu 14.10). I've reinstalled lightdm and it keeps doing the same thing. Any ideas?
Thkx,
Pedro.

It looks like a bug and affects me too.
Switching to SDDM works for me. Switching from lightdm to SDDM is as follows:

Run the following and select sddm, and then do a restart:

sudo dpkg-reconfigure lightdm

Then select sddm.

Have you tried this:

   sudo apt-get install --reinstall unity
   sudo apt-get update
   sudo apt-get upgrade
   sudo apt-get dist-upgrade
   unity --replace

and it might work fine this way


How to access and copy files from an old/other Ubuntu system's partition? I'm getting permission denied when I try to access my old 10.04 partition. I'm trying to get into the home folder so that I can back up the data before I do a fresh install of 12.04.

I know the password but not how to get the proper permissions so that I can move stuff via the GUI.

How can I do this?

Browsing and Managing Your Files (Graphically) As Root
Open Nautilus as root:

Press Alt+F2.
Run gksu nautilus (or gksudo nautilus -- on Ubuntu, they should do the same thing).

(Or in Kubuntu--that is, if the live system that you're using to recover the files is Kubuntu--use kdesudo instead of gksu and Dophin instead of Nautilus: kdesudo dolphin For other flavors of Ubuntu, see my answer to a similar question.)
Now be very careful, because with a root Nautilus window, you can do just about anything, including things you don't want to do.
Offloading Your Files
Copy the files to wherever you want them. Then select the files at the target, where you've just copied them, and change the owner to your user account.
(If you're using a live CD, you can save this for when you access them from an installed system, if you like.)
Changing Their Ownership (Recursively)
To change the ownership of a folder and everything in it, right-click on it in a root Nautilus window and click Properties. Go to the Permissions tab.

Change Owner to you. Click Apply Permissions to Enclosed Files (or it will only be applied to the folder, not the files and folders contained in it). Click Close.
Usually that's sufficient, and changing the permissions themselves is unnecessary. However, if you need to change the permissions, you can do that the same way (using the folder and file access drop-down menus under Owner, Group, and Others.

First, su to administrator account (If your account is not the admin, aka can't use sudo)
su *admins_account_name*
Next, type

sudo nautilus

Now try to go in there. You need root. You can now right click and change permissions to allow unprivileged users to read and write to that partition or folder. I don't recommend that, though.

You can also use sudo and cd, ls ...


HP laptop running 14.04 : Wireless not working I recently bought HP pavilion notebook 15 alongside windows10,I dual booted ubuntu 14.04,Wireless  connection is not working,what can i do?

description: Ethernet interface
   product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:03:00.0
   logical name: eth0
   version: 0a
   serial: c8:d3:ff:cf:a0:3e
   size: 100Mbit/s
   capacity: 100Mbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8107e-2_0.0.2 02/26/15 ip=192.168.1.8 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
   resources: irq:130 ioport:3000(size=256) memory:b4104000-b4104fff memory:b4100000-b4103fff

*-network UNCLAIMED
       description: Network controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:05:00.0
       version: 10
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: memory:b4000000-b4001fff


Mount old home as actual home I'm new on ubuntu and I had Ubuntu 14.04 with Unity.
I had home on separate partition (not decrypted).
Today I install Ubuntu Gnome 15.10 on old boot partition. I want now mount old home as actual home.
I found this link with similar procedure:
https://help.ubuntu.com/community/Partitioning/Home/Moving
Is this what I should do If I want mount this partition as my home?
This is what how it is now:

/dev/sda1: UUID="...335" TYPE="ext4" PARTUUID="000627f7-01"
/dev/sda5: UUID="...5c2" TYPE="swap" PARTUUID="000627f7-05"
/dev/sda6: UUID="...2ab" TYPE="ext4" PARTUUID="000627f7-06"

/dev/sda6 is my old home

this is how it looks in nautilus
And I have different user name now... it is problem?

Please help me...

UPDATE:
Yes I want step by step answer please.
This are additional information you want:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=e32e4178-b039-41e1-a591-4ca3c739f335 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=92a0ca7e-064c-44f1-a48b-38360928b5c2 none            swap    sw              0       0

and

uid=1000(spajdo) gid=1000(spajdo) groups=1000(spajdo),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),130(sambashare)

Old username was michal

To change the home directory of a user, do:

sudo usermod -m -d /newhome/username username

then give it the mount point of your old hard drive.

So, you do not want your home to be what it is currently. "/home/spajdo/"
instead, you would like it to be "media/spajdo/90aeb766-0497-4557-a922-d6ddffb022ab/michal/"  and whatever your user-name is.
 so you might do

sudo usermod -m -d /media/spajdo/90aeb766-0497-4557-a922-d6ddffb022ab/michal/  `whoami`

you can read more about this in the manpage. man usermod


Launcher auto-hides but does not come back I'm using Ubuntu 12.04. If I switch on "Auto-hide launcher", it hides but does not reveal with the pointer, and only comes back on switching off auto-hide.

Thanks to "Warrioring 64". I found my solution in replies to BUG 9894477.
Launcher reappears:-

By pressing Alt+F1
By pressing super key.
By striking the left side with the pointer 3/4 times quickly.
By moving your pointer towards the left end and when you reach the left end, don't stop and just keep moving left (as if you're trying to push the mouse out of the screen).

Well i faced this problem too...The solution I followed??

This might not be the exact solution you want but if nothing else works,you may use this-

I loved the dodge window feature more...I brought it back through compiz...

If you also like it or wish to add and use it, do the following-

Install CompizConfigurationManager via the SoftwareCenter if you do not have it
enter the following commands in the terminal one by one-

sudo apt-add-repository ppa:ikarosdev/unity-revamped
sudo apt-get update && sudo apt-get dist-upgrade

You will find the feature in the "Ubuntu Unity Plugin" option.

1:

2:


How to map volume buttons on Apple EarPods I cannot control volume using Apple EarPods's buttons. Is there any way to do so?

My system: Ubuntu 14.04 64bit.

Apple EarPods use a special/different type of connector layout called CTIA.

Your Macbook works perfectly with CTIA headphones because they are both Apple products and implement CTIA. Your ubuntu setup most likely uses OMTP.

Here is an image depicting the mismatch:

This incompatibility will prevent you from using your Apple EarPods

You don't say what device you are using but most modern laptops with one socket of that type will , when correctly setup, prompt you to select what type of device you have plugged in and configure the port appropriately.

That this is not happening suggests that you have not got the right profile loaded for your computer's (laptop ?) particular chip layout.

Possible options are listed here

http://www.alsa-project.org/main/index.php/Help_To_Debug_Intel_HDA

A tool to help find the right options is avilabile here

http://www.alsa-project.org/main/index.php/HDA_Analyzer


How can I restore configuration files? I would like to restore LightDM to its default state, because for some reason
/etc/lightdm/unity-greeter.conf is now an empty file.

Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.

How can I restore a missing config file?

Find out what package installed the config file:

$ dpkg -S unity-greeter.conf
unity-greeter: /etc/lightdm/unity-greeter.conf

As you can see, the name of the package is unity-greeter.

If you deleted a directory, like /etc/pam.d, you can list every package that added to it by using the directory path:

$ dpkg -S /etc/pam.d
 login, sudo, libpam-runtime, cups-daemon, openssh-server, cron, policykit-1, at, samba-common, ppp, accountsservice, dovecot-core, passwd: /etc/pam.d

Run the following command, replacing <package-name> with the name of the package:

sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" <package-name>

And for restoring the directory:

sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" $(dpkg -S /etc/some/directory | sed 's/,//g; s/:.*//')

If everything worked as expected, you should get a message:

Configuration file `/etc/lightdm/unity-greeter.conf', does not exist on system.
Installing new config file as you requested.

A Practical example when needing to reinstall all of the PulseAudio configuration files:

apt-cache pkgnames pulse |xargs -n 1 apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall

Delete (back) the file and and reinstall unity-greeter with apt-get install --reinstall unity-greeter.


How do I check the battery's status via the terminal? I would like a command that displays the battery status in the terminal.

The below command outputs a lot status and statistical information about the battery. The /org/... path can be found with the command upower -e (--enumerate).

upower -i /org/freedesktop/UPower/devices/battery_BAT0

Example output:

  native-path:          /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  vendor:               NOTEBOOK
  model:                BAT
  serial:               0001
  power supply:         yes
  updated:              Thu Feb  9 18:42:15 2012 (1 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               charging
    energy:              22.3998 Wh
    energy-empty:        0 Wh
    energy-full:         52.6473 Wh
    energy-full-design:  62.16 Wh
    energy-rate:         31.6905 W
    voltage:             12.191 V
    time to full:        57.3 minutes
    percentage:          42.5469%
    capacity:            84.6964%
    technology:          lithium-ion
  History (charge):
    1328809335  42.547  charging
    1328809305  42.020  charging
    1328809275  41.472  charging
    1328809245  41.008  charging
  History (rate):
    1328809335  31.691  charging
    1328809305  32.323  charging
    1328809275  33.133  charging

You could use tools like grep to get just the information you want from all that output.

One simple way: piping the above command into

grep -E "state|to\ full|percentage"

outputs:

state:               charging
time to full:        57.3 minutes
percentage:          42.5469%

If you would often like to run that command, then you could make a Bash alias for the whole command. Example:

alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'

Add that to the end of your .bashrc file, and you can type 'bat' any time, in the terminal.

There is also a upower -d (--dump) command that shows information for all available power resources such as laptop batteries, external mice, etc.


snapcraft snap failing because python modules are missing I'm attempting to learn something of snap desktop packaging by repackaging unity-tweak-tool as a snap. I am finding the docs to be less than stellar, but so far I've got a snapcraft.yaml file that looks like this:

name: unity-tweak-tool
version: 1
summary: configuration tool for the Unity desktop environment
description: |
 Unity Tweak Tool is a settings manager for the Unity desktop.
 It provides users with a fast, simple and easy-to-use interface
 with which to access many useful and little known features and settings
 of the desktop environment that one may want to configure.

apps:
  unity-tweak-tool:
    command: $SNAP/usr/bin/unity-tweak-tool
    plugs: [unity7]
parts:
  unity-tweak-tool:
    plugin: python3
    source: git://github.com/Seth-Johnson/unity-tweak-tool.git
    source-type: git
    build-packages:
        - python3-distutils-extra
        - python3-all
        - python3-dbus
        - python-dev
    stage-packages:
        - gir1.2-glib-2.0
        - gir1.2-gtk-3.0
        - python3-xdg
        - python3-cairo
        - unity-webapps-service

However when I run snapcraft snap setup.py always fails because several python modules are missing:

  Running setup.py install for unity-tweak-tool ... error
    Complete output from command /home/sethj/projects/snappy-testing/parts/unity-tweak-tool/install/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-s6dwhgys-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xxv1mi7p-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmp2y5izah7:
    ERROR: Python module values not found
    ERROR: Python module apport not found
    ERROR: Python module apport.hookutils not found
    WARNING: syntax errors in notes/wizardry.py: Missing parentheses in call to 'print' (wizardry.py, line 9)
    ERROR: Python module dbus not found
    ERROR: Python module dbus.service not found
    ERROR: Python module dbus.mainloop.glib not found

(full output here)

I admit I'm not 100% sure I doing this properly, but as far as I can tell it should be building the packages listed under build-packages, which satisfy the build requirements for unity-tweak-tool.

Where am I going wrong?

In the case of python you probably want some of those build-packages to be stage-packages. The python plugin sets PYTHONPATH to be within the snap which is why it's missing these packages (you have them installed on the host system instead).

Byt the way, if this upstream had a proper install_requires in setup.py these dependencies would have been taken care automatically for you.

you can a find an explanation on how to get python to discover the GI repository here


Change Chrome notification positions Chrome notifications on Windows/Mac show up in the bottom right, but on Ubuntu it is the top right. How can I change this? Does Chromium do it differently?

You sadly don't have a way to control the position. at least yet.
https://productforums.google.com/forum/#!topic/chrome/ZipDRLuxFZw


Why doesn't cron complete my script? I have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab)

0 2   * * *   root    /bin/bash --login /opt/aebackup/sshbackup.sh

If I run it as logged in root like following it runs prefectly fine.

root@server:~# /opt/aebackup/sshbackup.sh

If I run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly)

Does anyone have an idea why my cron would do that? thanks for anything... I'm desperate!

There was a bug in the old cron, for explanation see this launchpad entry.

The answer may be in cron's log output.

It is in /var/log/syslog by default.

But it can be set up to create a separate cron.log, which is more useful.

This Q&A describes the process:

16.04: How do I make cron create cron.log and monitor it in real time?

Also in this answer is the instructions to create a wcron command that displays it is near-real-time.  Plus, it links to another answer,

How to change cron log level?

that shows how to change the log level to include more than just the start of jobs - level 15 will show errors and end time, also.


How to restart nautilus without logging out? How do I just restart the nautilus after adding a nautilus script without having to log out.

To restart nautilus...

First, type the following in your terminal to quit nautilus:
nautilus -q or killall nautilus

Then, open nautilus via Unity menu (press the Super key) or using the run command (Alt + F2).

Another option without terminal is by closing "Nautilus" from "System Monitor" .


Is Wubi safe on Windows Installation? Possible Duplicate:
  What are the benefits of a disk install vs. Wubi? And can I migrate my settings easily?

Is Wubi installer dangerous? I want to know this before i install it on my laptop. I really want to use Ubuntu OS as my secondary operating system, primary being windows. Thanks.

Not at all.

As said in ubuntu wiki:

  The Windows-based Ubuntu Installer (Wubi) allows you to install and uninstall Ubuntu from within Microsoft Windows. It lets a Microsoft Windows user try Ubuntu without risking any data loss due to disk formatting or partitioning.

So try it and don't worry.

Yeah it's convenience to use wubi to install ubuntu OS. However it has some problems with hibernate. The OS may not recovery successfully and you may not get into the system again.


Permission Error copying files into Ubuntu on Windows with Windows copy/paste I'm currently using Ubuntu on Windows from the Microsoft Store.

To try some of my Python scripts, I copied and pasted them to the documents folder I can access with Ubuntu session :

C:\Users\[MyUsername]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\[MyUsername]

But when I lauch the scripts, it returns "PermissionError: [Errno 13] Permission denied: '[folderName]". Is there a way to copy/paste files and folders from Windows session to Ubuntu folders without having to run chmod on all files ?

Thanks for your time

You should not be manually copying data into the WSL installation from Windows - it will give you this permissions error when you do this.
 Rather, you should be copying from windows into WSL from within the WSL environment instead.

The Windows C drive is located at /mnt/c within WSL.  If the scripts are located in C:\Users\username\My Documents\Python\ then you can do the following from within WSL to copy the scripts into the Ubuntu environment:

cp /mnt/c/Users/username/My\ Documents/Python/*.py ~

This will copy the data in and retain permissions so it works properly within the Windows subsystem for Linux.  This also saves you from having to chmod typically.

If you want to copy/paste any of your files from Linux/Ubuntu to your windows machine, this may be really helpful.

Boot Windows and hit Windows+R. That brings you to the "Run Dialog". There, type shutdown /s (Here /s means "Use this option with the shutdown command to shut down the local or /m defined remote computer.").

By the way you don't need to uncheck Fastboot or anything.


How to delete a file from another directory in Ubuntu terminal I'm starting learning Linux Ubuntu commands, now I want to learn how to delete a file from another directory while I'm in a different directory.

For example, now I'm in Documents and want to delete a file TEST file that is in Downloads

You just need to give the right path :)

To delete the TEST file in ~/Downloads you could use

rm ~/Downloads/TEST

that would work from anywhere in the filesystem because it is an absolute path. It is a shortened version of the full path /home/$USER/Downloads/TEST ($USER is expanded to the name of the current user) because ~ is a shortcut for the home directory, in my case /home/zanna

The relative path, from ~/Documents would be

rm ../Downloads/TEST

.. specifies the parent directory of where you are now, and Downloads is a subdirectory of that directory. But you should be extra careful when using rm with relative paths, because it is easy to make a mistake and delete something you didn't intend to!

Best way delete directory file is " sudo rm -R ./file name " . first you check ls then you see delete files name then write file name and delet any directory file.


The difference between the two versions of Inkscape in Ubuntu repos I am one of the hobos who don't understand the answer Ubuntu community gives to why there is 2 versions of Inkscape in the Ubuntu repos. I would like to understand the reason. I have used Inkscape several years, and before that used Corel Draw in 15 years, and there might be something I am missing when using one version of Inkscape instead on the other. Please do not just tell me that one of them has a SNAP, and that it is up to me to decide. Decide what, that is the problem.
Thank you very much, if I could be enlightned.
Sincerely yours, Carl-Georg Madelung

The deb packages available for each release can be seen with

https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=inkscape

where note only one for each release

Snap packages you can have a version installed from each channel (so multiple snaps available is to be expected). Three are available I note

https://snapcraft.io/inkscape

Snap & deb packaged versions are to be expected for some programs (not all though)

As it looks here (are we talking about 18.04?), the Snap package is the development version and the 'normal' version the stable version.

If you do not need fancy features, let me assume the stable version suits you.