Question mark is used in URI as a separator of a path to the resource and query arguments. Per RFC 3986:

    foo://example.com:8042/over/there?name=ferret#nose
    \_/   \______________/\_________/ \_________/ \__/
     |           |            |            |        |
  scheme     authority       path        query   fragment

And in section 3.3:

  The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI.

So your first example is correct.

The second one (without ?) is wrong, because it combines query arguments into a path to the requested resource.

As a side note: browsers (at least current versions of Chrome or Firefox) will automatically change:

http://192.168.2.33:554?user=admin&password=&channel=2&stream=1.sdp

into:

http://192.168.2.33:554/?user=admin&password=&channel=2&stream=1.sdp


Try running these:

Take a backup of the file in question

sudo cp /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.5-BACKUP

Remove the file

sudo rm /usr/lib/libstdc++.so.5

Run the installer

sudo dpkg --install --force architecture lightscribe-1.18.27.10-linux-2.6-intel.deb

Refresh

sudo ldconfig


The package you're looking for is certainly bind9 not bLind9.

sudo apt-get install bind9


How to boot to usb from Grub2, when the BIOS keep booting solely to Grub despite what boot order

There are different keys for entering into the boot menu for various models you can fid them here.


You could always try the Ubuntu Server method of upgrading (which I use to upgrade desktops over SSH):

sudo apt-get install ubuntu-release-upgrader-core
sudo do-release-upgrade

Also, the -d flag is for upgrading to a development release. There simply isn't a development release that's a target from 12.10. 13.04 is your only upgrade path and that's released. By simply dropping the -d and using -c (to check for new releases), you might find it works:

update-manager -c


Application doesn't run after creating unity launcher with root permission

I have found the solution, I just needed to clarify path to the application and then change the exec command to something like below :

[Desktop Entry]
Type=Application
Terminal=false
Icon=/usr/local/ampps/ampps.png
Name=AMPPS
Path=/usr/local/ampps/
Exec= gksudo -k -u root ./Ampps
Categories=Programming;Development;
StartupNotify=true

Hope solve others problem.


CUPS Server Error "client-error-not-possible"

I had the same error in Ubuntu 18.04 with a Xerox printer and your suggestion of updating the smbclient like below actually helped.
sudo apt-get install smbclient

I just wanted to note that for some it can be a solution. For you obviously not. But, I could not comment yet (50 reputation needed) so opted for making an 'answer' here.


How do I edit ubuntu 16.10 grub menu to remove gfxmode

gfxmode was probably not really the problem. There were some kernel parameters that made the experience much better. It proved to be impossible to get this laptop working with Windows 10 (using the Nvidia card always), but it does work with Linux!

So on 16.04 (but with the 4.8 kernel) and Nvidia driver v 367, this is how you can get three monitors working (via a docking station) which is only possible with Optimus. Yes ... nvidia in discrete mode will only drive two outputs; not three. If you only need one external monitor and the laptop panel, you can either use optimus or discrete Nvidia. Discrete nvidia just works, no need for any config.

the machine will hang on boot unless you modify the grub cmd line entry to specify nox2apic
/etc/default/grub...

GRUB_CMDLINE_LINUX_DEFAULT="agp=off quiet splash nox2apic"

There are additional suggestions in the history of the w520 but with this kernel, only this change is needed.

There are hints about adding a file to /usr/share/X11/xorg.conf.d to set up nvidia brightness. This suggestion stopped optimus from working. I don't know how, but they have a nasty effect when X is starting. The symptom of this problem is that
xrandr --listproviders
needs to show both the nvidia card and the intel card. The brightness tweaks to xorg.conf seemed harmless, but they actually somehow stopped the intel card and nvidia card working together. xrandr --listprovider would only list one provider, Nvidia, and it is therefore impossible for X to render anything on the laptop panel. To my amazement, removing the brightness conf fixed this very annoying problem.

In any case, the brightness keys are working for me in optimus-nvidia mode, and changing brightness via the screen control panel works too.

lightdm refuses to allow me to use the laptop panel. The mouse pointer moves there, but I can't drag any windows, and there is no background (it's black).
However, install xfce but keeping lightdm works.  Note that if you want on-screen brightness control, you need to install the xfce power management plugin from synaptic or whatever package manager, and then add it to the panel.  Clicking the battery icon gives a display changer.

Note: I follow the arch wiki instructions here:

https://wiki.archlinux.org/index.php/NVIDIA_Optimus#LightDM

and added the short script make some xrandr changes. I did this mainly to try to understand why I had only one provider, before I worked out that the nvidia brightness changes was the problem. Possibly I don't need the script, but I'm so pleased that it's all working I don't want to change a thing.

However, changing from nvidia to intel requires a reboot: merely logging out doesn't work.


Ok. You should do the following.

You may go to BIOS and force your startup to be done right from the DVD-ROM(there is such an option right above the boot order). Select the DVD-ROM above this boot order and you re ready to go.

But, I can not understand why to prefer Windows over Ubuntu or any other Unix distro to tell the truth. Answer me when you have sucessfully formatted your PC with Windows.

Kind regards.


From what you described, it sounds like your experiencing a common issue with apt's update check, which runs as soon as you log in for the first time, and causes the CPU usage to spike for a while. It's harmless, and usually goes away after a few minutes.

In such cases, the best thing to do is to be patient and not do too much immediately after starting the system, since most systems (think, core2duo, 4GB Ram, and such like :), will not be able to handle the workload too smoothly.

Unfortunately, I don't know of any sure fire fix for this at this point in time.


Ubuntu 14.04 recognize my Thunderbolt Ethernet only in start up

You can't. There maybe will be Hotplug Support in Ubuntu 15.04 , but today you can just reboot.

Lets hope this feature makes it to the release ;-)


How do I select a field/column from the output of `ls -l`?

Try ls -l | awk '{print $7}'.

awk selects columns so it's perfect for this task.


Ubuntu 18.04 Bionic Beaver - Troubleshooting and Switching Graphics Drivers

You can do this in Software & Updates under the Additional Drivers tap.

Hopefully you will find the proprietary Radeon drivers there.


In conda virtual environment,how to use " sudo python exampy.py" without using the version of python in system?

this occurs because $PATH is different between your user and root.

An indepth discussion is given here: https://superuser.com/questions/600349/why-sudo-python-and-python-in-terminal-start-two-different-versions-python

in order to use your anaconda version of python type the following command:

sudo env "PATH=$PATH" python <enter python command>


The best way is to add a symbolic link to this file in the /usr/local/bin directory:

cd /usr/local/bin
ln -s server-stop.sh /path/to/your/folder/server-stop.sh

In this case, you are adding a link to the original file, so you can always change the original file and you command will always be working.


You need to edit /etc/network/interfaces.

sudo nano /etc/network/interfaces

Add the required details.

After that. Save and close.

Then:

systemctl restart networking


I ended up switching to MATE desktop environment to avoid the problem. See
here.


My Icon Theme is Not Applying to All Applications On Ubuntu 18.04

If you installed the applications via snap, there is a problem with snaps accessing some global settings like themes. See https://forum.snapcraft.io/t/use-the-system-gtk-theme/496/3 for a more technical description.


Return HUD key from Mod 2 + Alt L back to Alt L

Due to a bug described here:

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/981628

you can't change HUD key from mod2+ ALt L back to Alt L.

The solution is quite simple, just turn NumLock off and try again.

You'll find the default setting is back again!


Simulate Windows directory path for a logo?

C:\XML\XSL\Style\logo.png in Linux would just be the name of a file:

$ touch 'C:\XML\XSL\Style\logo.png'
$ ls
C:\XML\XSL\Style\logo.png

Just create it in whichever directories your program runs in, so that when it tries to access the file, it will be treated as a relative path to a file and taken from the current directory.


Use the vcs_info function in the zsh user contributions (included in the zsh package). Quick start:

autoload -Uz vcs_info
precmd () { vcs_info }
setopt prompt_subst
PS1="\$vcs_info_msg_0_$PS1"

It's likely that you'll want to make the output prettier. Since that's matter of personal taste, I refer you to the examples in the documentation.


How can I open (launch) files using the terminal?

xdg-open will try to guess your desktop environment and the file's mime type and try to open it in the appropriate application:

xdg-open myFile.txt


Specify initial geometry for any window with Gnome 3

I am having the same issue under 12.04 with Gnome Classic & compiz.

The only (command line) workaround I have found so far is to follow up the nautilus call with an invocation of wmctrl similar to this:

wmctrl -Fr "your exact window title" -e '0,0,0,400,1080'

wmctrl has a few different ways of selecting windows, and is just an apt-get away.


Is 2GB Ram enough for a snappy 64 bit experience?

Personal experience: I have a 10 year old Dell laptop with Core2Duo, 1.8 GHz, and 2 GB Ram -- and the experience with Kubuntu 14.04 is quite good as long as I don't try to play a games or load complex web pages when I'm off the dock (the machine reduces clock speed to save power when not on the dock).  On battery or the (aftermarket) external charger, it's on the slow side, but still usable for word processing and basic browsing.


One IP address, Two Websites, on Two Machines

You can instlall Apache and set it up as a reverse proxy:

sudo apt-get install apache2
sudo a2enmod proxy proxy_http

Create an /etc/apache2/sites-available/site1 with the following contents:

<VirtualHost *:80>
  ServerAdmin webmaster@site1.net
  ServerName www.site1.net
  ProxyPass / http://local_site1_server/
  ProxyPreserveHost on
</VirtualHost>

Then

sudo a2ensite site1
sudo /etc/init.d/apache2 restart


You can add an empty line to a file called "file_name" by running

echo >> file_name

An empty line is a line that contains literally nothing including tabs or spaces.


Does Ubuntu 16.04 64 bit support 2 different RAM sticks with different speeds?

RAM speeds are not dealt with by Ubuntu, therefore they shouldn't be a problem at all.

When your computer sees multiple different speeds of RAM present, the BIOS will scale down the speed of all of the RAM to the speed of the lowest RAM stick. In your case, that means all of you RAM will be running at 1333MHz. This is done automatically, before the Dell logo appears on your computer screen, and far before Ubuntu boots up.

This sounds more like your memory may be bad and/or mis-seated. Ensure that everything is connected properly, and then run memtest (from the GRUB menu) a few times to make sure that your RAM is okay. If a test fails, test each stick of RAM independently until you find the bad one, and then replace it.

If all of your memory returns okay, it's probably an issue with your computer's BIOS. Check to see if you have an upgrade available for it. A reset to default settings probably won't hurt either.

If your BIOS is completely up-to-date, it may be a good idea to contact Dell for further assistance.


I figured out the issue.

When typing startx it creates a .dbus file in the users home directory with root permissions.

I simply

sudo mv .dbus bak.dbus

after that I was able to login.


HDMI cable causes extreme video lag in Ubuntu?

adjust the resolution (lower) so the laptop and tv match. set the main display to the external monitor (TV), but leave the display setting window open on the laptop, so you can switch it back when you need to (the text is blurry and small on the tv). this worked for me, fixed all the choppy lag. :)


Problem with ubuntu 12.04 - dell xps 15z - keyboard, trackpad, graphic card

I have the same keyboard and trackpad issue on the same laptop.
Solved booting problem adding acpi=off noveau.modeset=0 at start.


Dual boot - Installing ubuntu on pre-installed windows 8... then lost dual boot

Luckily, this is an easy problem to fix. Here's what you need to do:

Open a Terminal emulator with Ctrl+Alt+T
Type sudo update-grub and hit Enter
Wait for the command to finish running.
Shut down. (Don't restart! You may have to reboot again to get to Windows 8 if you do.)
Turn on your computer.

Now, you should see Windows 8 in the GRUB2 boot menu. Have fun with Ubuntu!


Install Ubuntu for large applications (SSD+HDD setup)

If you really intend to reinstall the OS, you could create a separate partition on the HDD, dedicated for any system directory, let's say /usr (where the most libraries are) and mount it at its place. As I remember correctly you can do that via the installation dialogue.
You can achieve the same result without reinstalling the OS. Just use gparted in order to resize the existing partitions on the HDD and create a new one, then follow the accepted answer of this question: How to move /usr to a new partition?
Another way is to move the /usr directory into the HDD and then mount it by using the bind option of the mount command in order to mount it at its place - the steps are described here: How do I mount a folder from another partition?


There's an option in systemd that allows you to prevent your laptop to get into sleep mode when you close the lid.

Here are the steps to use that option:

Open the file /etc/systemd/logind.conf with admin rights
Add in a new line at the end of the file:

  HandleLidSwitch=ignore

Or, in one command in your terminal:

    echo "HandleLidSwitch=ignore" | sudo tee -a /etc/systemd/logind.conf

Here's what logind.conf manual says (source):

  HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=,
         HandleLidSwitch=

       Controls whether logind shall handle the system power and sleep
       keys and the lid switch to trigger actions such as system power-off
       or suspend. Can be one of ignore, poweroff, reboot, halt, kexec,
       suspend, hibernate, hybrid-sleep and lock. If ignore logind will
       never handle these keys. If lock all running sessions will be
       screen locked. Otherwise the specified action will be taken in the
       respective event. Only input devices with the power-switch udev tag
       will be watched for key/lid switch events.  HandlePowerKey=
       defaults to poweroff.  HandleSuspendKey= and HandleLidSwitch=
       default to suspend.  HandleHibernateKey= defaults to hibernate.


The Linux kernel will keep file data cached in memory in case it is accessed again.  Over time, the data will be discarded if it is not accessed or other processes require the memory.  The cached stats show how much data is in the cache.  I would not get overly concerned about this.

If you do want to drop cached data (which is not advisable since you may be freeing up cached data and hence the kernel will have to re-read it again), you can write 1 to /proc/sys/vm/drop_caches to free up the pagecache.

To free pagecache:

echo 1 | sudo tee /proc/sys/vm/drop_caches

To free reclaimable slab objects (includes dentries and inodes):

echo 2 | sudo tee /proc/sys/vm/drop_caches

To free slab objects and pagecache:

echo 3 | sudo tee /proc/sys/vm/drop_caches


Can no longer boot into Ubuntu using Windows boot manager

You can add Ubuntu to windows boot loader using easybcd software in windows view the below link to see details

https://superuser.com/questions/499617/how-can-i-add-linux-to-the-new-windows-8-boot-manager


Alt+Tab doesn't work when Citrix is in full screen

Finally it's now working. I'm actually accessing remote desktop through web browser Google Chrome on Ubuntu 12.04.

I changed all the setting in Citrix receiver, but didn't realize to change the setting on web page. That is,  after typing username/password for the remote URI in the browser, there is a tab called setting (before click Remote Desktop Connect on AmericasXA...).

I was able to change the window size to full screen from Seamless. That's it, Alt+Tab and other keys started working fine on the remote desktop.


I had the same problem installing Sopcast at first, lots of tutorials in internet were just waste of time. The main problem was, the link was broken in Ubuntu forum and launchpad gives 404 error while clicking the page. I went to the femroberto page but there was no download link for 64bit package. There was a bug filed in launchpad about sp-auth installation, and no download link available for amd64 architecture. So, what I did to install was:

sudo add-apt-repository ppa:ferramroberto/sopcast (To add the repository)
Downloaded the sp-auth package from this website http://www.n00bsonubuntu.net/content/how-to-install-sopcast-on-ubuntu-13-04/
Installed the sp-auth package first using gdebi package installer. You can right click and use ubuntu software centre too.
From Terminal: sudo apt-get update
sudo apt-get install sopcast-player
Finally for Firefox to recognise the sop:// link (Though not important for latest firefox)

In Firefox address bar, type about:config and Enter the config
Search for network.protocol-handler.expose-all and try by changing the value to true or false. In my case it worked with true.

Now I am using sop-cast player


How do I convert a FAT32 to ext3 (keeping the data on it)

If you're not booting off the partition (is this even possible without using wubi?) and it's at least half free then just use gparted (paste apt:gparted in firefox).

Run it from the menu.
Find out the name of your partition
using fdisk -l in a terminal. The
partition named something like
/dev/sda* where * is a number. Or look through the list in the upper right edge of gparted
Resize the fat32 partition to less then half of it's original size
Create a new ext* partition
Move all files over to the ext partition
Delete the old one and resize the ext partition.

Note that I've done this several times and it always worked as intended HOWEVER there are many reports of people that lost data this way. Depending on the amount of data you can use Ubuntu One or Dropbox to backup your stuff. They both offer 2 GB which is most probably not enough.


When you're asked to provide a keyring password and you unlock it with the mentioned checkbox checked, passwords manager adds the new record to your default keyring - you can open "Passwords and Keys" application (seahorse), select your default keyring and remove unwanted records.


Seems kludgy, but by adding the following line to my /etc/mdm/mdm.conf, this sporadic nagging issue seems to have gone away (10+ consecutive bootups with clean automatic login):

/etc/mdm/mdm.conf
[daemon]
TimedLoginEnable=true
TimedLogin=frustratedUser
TimedLoginDelay=0


How can I publish my deb files to custom url?

Setting up your own private repository using reprepro is not  very hard.

Here are different tutorials:

in French on ubuntu-fr.org
in English
another one in English


Cannot find other desktop environments in software center

You’d install for example XFCE from the terminal on Ubuntu or Linux Mint:

sudo apt-get install xfce4

The above command would give you the standard XFCE desktop environment. But if you want Xubuntu’s customized XFCE desktop environment instead:

sudo apt-get install xubuntu-desktop

Log out of your Linux desktop after installing another desktop environment.

Then, when you see the login screen, click the session menu and select the desktop environment you want to use.


Java problem with high CPU running Universal Media Server

No idea how this occurred but a database file:

medias.mv.db

found in

/home/USERNAME/.config/UMS/database

had become massive, nearly 6GB.

I deleted the folder which UMS later recreated for me. The database file is now just over 1MB.

UMS and Java are now all happy and my home streaming is fab once more. Bliss.


How can I get a single-click workspace switcher?

Unfortunately I do not know of any alternative workspace switchers besides a simple drop down menu. As with nearly and change to the visual components of Ubuntu you will need CompizConfig Settings Manager. It is installable from the Ubuntu software centre by searching "Compiz." CompizConfig Settings Manager is also known as CCSM.

Once you have installed CCSM open it by searching in the dash for "compiz." Once open navigate down to the Expo plug-in. Expo is the workspace switching plug-in. All settings pertaining to it are located there.

First to tackle your single click to exit expo: The opening tab in Expo is the bindings tab you will want to set your exit expo button to which ever you want. I have it kept on the default left click but you can choose to use any mouse button you want. If you set it to left click you will have to change the drag and drop binding. If you never use drag and drop windows in the workspace switcher simply disable it.

And as a final note for productivity. It can be much more useful if you set the Expo key, Expo button, and expo edge. These will be the bindings that initiate the switcher. For instance I have my workspace edge set to bottom right so that when I'm primarily doing things on my mouse I can easily switch workspaces for multitasking. This can be seen in Mac and Linux Mint by having the switcher initiated by moving the mouse to the top right corner.

I hope that helps you out.


How to run a command within a time duration per min/sec?

There's several approaches you could use.

Get the script to loop 3600 times with a sleep 1 in the middle (= 1 hour) start it with cron at whatever time suits you.
Get the script to intelligently look for the files based on the date, then do the copy at a suitable time eg 4AM
Get the script to monitor when the files are made based on the date and any other relevent information. Do the copy as soon as the files are ready.

Note that "...copy script doesn't know the names of the files just created..." just means that the script doesn't have the code yet.  You've said the files with have the current date, just work with that. eg:

#!/bin/bash
FILE=$(date +"prefix%Y%m%d")
echo "The filename for today is "$FILE


How about

ls > /tmp/list ; seq -w `ls | wc -l` | paste /tmp/list - | awk -F\\t '{ print $1, "IMG"$2".jpeg"}' | xargs -n2 mv

List the files and redirect the list to a temporary file /tmp/list
Write a sequence of numbers, padded with zeros, equal to the number of files to STDOUT

The file count is gotten by listing the files and piping to the wc (word count) app in "lines" mode

paste the sequence of numbers from the previous command onto the right side of the list of files from /tmp/list

Paste sticks two files together as columns separated by a TAB character
Pipe the output to the next program

Use a small awk program to reformat these two fields

Separators specified as tab (\t - the first slash is to escape the second one)
First field $1, the original file name printed as-is
Second field $2, the sequence number, printed with an IMG prefix and a .jpeg suffix
Pipe the output to the next program

Using xargs, pass the pairs of arguments to the mv (move / rename command)

-n2 means that it will pass 2 of them at a time

NB, this presumes that your original file names do not contain spaces.

If you want to start at a number other than 1, you need to manipulate the parameters of seq ; e.g.

COUNT=`ls | wc -l` ; FIRST=32 ; LAST=$(($FIRST + $COUNT)) ; seq -w $FIRST $LAST


I also have this issue with the Nouveau driver.
I filed a bug for this, please see if you can contribute (like mark as affected):
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1912509
I found some people that reported this being a consequence of using 2 nvme slots.
Others wrote about installing Linux firmware.
A workaround seems to be to use a pre-5.8 kernel.
For me a fresh install with kernel 5.4 works, although I get an occasional freeze.
The hardware is quite new, so the best is to find as much people with this problem that can add info to the bug report.
I hope this is a bit helpful, I recommend using the nouveau driver because there is no support from Ubuntu / Canonical on proprietary drivers.
You could try to report it to Nvidia if you can pin down the issue to their driver, but I recommend to use only supported drivers to get support from Ubuntu developers.
Also check here for a possible workaround:
https://unix.stackexchange.com/questions/587371/mint-19-3-cinnamon-ucsi-acpi-usbc00000-ppm-init-failed-110


Unable to change to NVIDIA card after installing bumblebee on 15.10 (I would like to go back to nvidia-prime)

Actually bumblebee is common solution when you install it correctly you can use it with optirun command like optirun gimp. I suggest to you try again bumblebee.


I'm using Ubuntu 13.10 64bit and I'm also playing Dota 2 using Steam for Linux.

Could you please add some information to your question? It's unclear if Dota 2 or Steam take 5 minutes close and what exactly happens.

My best guess is that Steam says something like "Synchronizing Updates" what basically means that files are getting uploaded to SteamCloud.

If that's the case, you can simply right-click Dota 2 on the list, go to Properties > Updates > SteamCloud and uncheck Enable Steam Cloud.

Disabling SteamCloud means that if you're going to play Dota 2 from your account on another computer you won't have the files saved on your current computer, though Dota progress will be conserved.

Hope this helps.


How to set up an rsync backup to Ubuntu securely?

Ok, I think your trying to over architect a bit. SSH is one of the most secure file transfer protocols and if your already rsyncing over ssh then your 90% there.  Your router is acting as a basic firewall so you shouldn't need to turn on iptables for a personal backup server.

Stick with port 22. It will make life much easier.

fail2ban is a nice script for public servers, specially where password based logins are enabled. On your server it's going  to make more problems then it will fix. I wouldn't recommend running it. Here are my suggestions:

Go ahead and get the dynamic IP, it will make it easier, and about the time you go traveling, your ftp script will fail for some really strange reason.  Basically KISS.
Disable Password logins for ssh. In /etc/sshd_config change PasswordAuthentication yes to PasswordAuthentication no, and make sure challengeresponse is set to  no. That will bock any one without your private key from logging in at all.

Other then that your pretty much covered by default. ssh encrypts traffic and verifies the host/client. There not a lot left after that.


Upgrade Ubuntu 12.04 to 14.04 without deleting Mac OS X

What's the misunderstandable thing in "Erase disk"?

If it said "Erase partition", I'd share your doubt, but it clearly says it will erase the entire main hard disk.

"Erase Ubuntu and reinstall" may or may not wipe Mac OS X, depending on whether it is detected or not. The OS-Prober utility can not always be trusted, less so the interpretation of its output by Ubiquity (the installer)

I doubt the other options are what you want. From your title I take it that you want to upgrade the currently installed Ubuntu 12.04 to 14.04. This is most easily done from inside the running Ubuntu 12.04. Simply boot the installed Ubuntu and follow these instructions:

Backup your personal files
Open a terminal
Execute the following command:

sudo do-release-upgrade

Now the upgrade process will begin. You may be asked a few question, most of which should be answerable by yes or no. Please make sure the PC keeps running and has a permanent internet connection and power supply, if possible. If the computer's battery runs empty or it disconnects from the internet during the upgrade, the OS may be rendered unusable (One of the many reasons to make a backup if your files). If this happens despite precautions, e.g. an outage at your ISP's, you may have to completely reinstall your Ubuntu system. The Mac OS X system will not be touched in the process.


Have a look at this. This seems to be related to OpenGL.

http://www.stokebloke.com/wordpress/2015/02/19/minecraft-1-8-2-arrayindexoutofboundsexception-at-linuxdisplay-getavailabledisplaymodes/


Laptop-connected VGA monitor is mirror only, not independently detected. 14.04

Go to the system settings in the top-right corner of your screen
Click on "screen display"
Turn off mirroring

Done!;-)


Wifi not getting connected but LAN cable connection is working. Please help

Code:

sudo apt remove bcmwl-kernel-source && sudo apt install git dkms
git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6

Reboot
If you notice weak signal try
Code:

sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=1

and see if it is better, if not do
Code:

sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=2

Resource Worked for me


Linux Support for builtin wifi adapters in Thinkpad T-series and Dell XPS?

I have a Lenovo T440p and my wireless works perfectly.

lspci -nnk | grep 0280 -A2

03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b2] (rev 6b)
    Subsystem: Intel Corporation Wireless-N 7260 [8086:c262]
    Kernel driver in use: iwlwifi


Sadly no, this is not possible. It looks like the developers of this app aim for as little configurability as possible. Look yourself at the Deja-Dup Bugtracker.


The partition size cannot be modified while it is in use, so you'll need to boot from a Live USB or Live DVD to do this. That said, it's not too difficult to do:

Make a backup of your important files (you do backup your files ... right?)
Boot to a Live USB or Live DVD and choose "Try Ubuntu"
Load GParted
Resize the Logical Volume (this would appear to be above the partition)⇢ Right Click ⇢ Resize ⇢ Follow instructions
Resize the partition⇢ Right Click ⇢ Resize ⇢ Follow instructions
Click "Apply"

Once everything is done, reboot. Be sure to remove the USB stick or DVD when the system tells you it's safe to do so.


Computer suspends monitor after 5 minutes, then deactivates it... I don't want this to happen

It's not in Power Settings. You need to look under System Settings > Brightness & Lock, and select your preferred screen timeout under Turn screen off when inactive for:


The graphical options for keyboard layout seem to have changed. You can do it via terminal though. Open a terminal using Ctrl+Alt+t and then do then:

setxkbmap -option caps:none

To re-enable them:

setxkbmap -option

To make this happen at every reboot, write the command to a file and store it in a convinient location(the filesystem should be ext4 where you would store the file) and then on a terminal, type crontab -e and then add this line to the end of the file that opens up(it may ask you to set the editor by which it should open, I prefer nano or vim.full:

@reboot /path/to/the/script


How to encrypt php folder under /var/www?

I found a way to encrypt the folder. it works by encrypting /var/www, then you mount it in a different location. example:

I mount the encrypted /var/www, and I have to add files by putting them in /home/jmartin/mounted

As far a making it not visible if the drive is mount via livecd or another computer? you would need to have your partition setup as an encrypted LVM. this must be done at the time of installation. Its a clear choice when installing server, use this guide for desktop: http://ubuntuforums.org/showthread.php?t=1782296

back to encrypting your folder. open a terminal and type:

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

its a good idea to update before doing anything new. next type

sudo apt-get install encfs

this will install encfs, an encryption tool. next:

sudo encfs /var/www home/USERNAME/mounted

the first location is what you are encrypting, the second is what where you will access it. use your username where it says "USERNAME".

to unmount the visible location:

sudo ifusermount -u home/USERNAME/mounted

to unlock and mount:

sudo encfs /var/www home/USERNAME/mounted

hope this helps! more info: https://help.ubuntu.com/community/FolderEncryption


Open a terminal and type

lspci -v

Check the audio controller section.  You will also see what driver/kernel module is used.  If you don't see any module then you do need a driver.


Install libxt6 with

sudo apt-get install libxt6

Then check again

sudo updatedb
locate libXt.so.6

If you have libXt.so.6.0.0 and not libXt.so.6 go to the directory where you have the file and type

ln -s libXt.so.6.0.0 libXt.so.6

If you are on x86 architecture and would like to install i386 version type

sudo apt-get install libxt6:i386


I want to store multiple logs at /var/logs, into different folders by the name of the log files

As requested, as answer.

The renaming of the logfiles is done with the program logrotate.

Take a look at the manpage, and especially at the Option olddir. The configuration can be found in /etc/logrotate.conf and/or /etc/logrotate.d/*


Automatically reconnect to more preferred WLAN network if it becomes available

The "priority"option for Network Manager is on the wishlist since long time; I think that the developers are not convinced about adding a knob for it. You can check the status on launchpad and upstream.

Anyway, you can manage the connection with script with:

nmcli nm wifi on

(or off) and

nmcli c up id "Auto MYwireless"

(you need the exact id, you can list them with nmcli c list)

More info in man nmcli.


X server does not respond when Spotify takes focus

This is a known issue with the desktop client under some circumstances. I am pleased to report that it is fixed in the upcoming beta. The new client uses CEF3 (based on chromium) for text input rather than handmade native components.

Sadly, we haven't had time yet to create a Linux distribution package for the beta, but it is coming soon. Keep your eyes on the Spotify community forum for the Linux beta announcement!


Error getting while installing Virtualbox

Install synaptic package manager from the software center repository

Open synaptic

Search for and install each dependency

I verified all are available in synaptic


How do I change permissions so I can edit the PAM password file?

Try putting sudo in front of your command. That said if you are using gedit you need to use gksu gedit instead of putting sudo in front.

We see occasional questions from students here needing help with their homework projects but this is the first one from a teacher I've seen....


My applications do not proceed when I leave my computer

I finally realized that I should prevent my computer from locking rather than sleep, screen saver, etc.


I have a laptop, can I use Wifi and cable (Ethernet) networking at same time?

You can plug both in at the same time and be connected to both, but you can only use the Internet from one of them. The computer will prefer the cable.

So if you only have Internet access via one of them then yes you can be connected to both networks. But if both are capable of providing Internet access, then Ubuntu will prefer the cable (Ethernet) network to access the Internet (and not use the Wifi network to access the Internet).

The upside of using two connections that provide Internet access, is that if one is disconnected, you will keep on using the Internet without being affected.

I have asked a similar question on the site before, that you might find useful.


NVidia and Wifi card driver problems in ubuntu

This is not a problem. You will have to install the proprietary nvidia drivers for any nvidia card, they are not included in ubuntu. Same with most realtek wifi cards. My latop (which is running ubuntu 16.04) also has an nvidia graphics card and a realtek wifi card. My suggestion is, plug in your laptop to your router using a lan cable and install a wifi driver. Then you can go about configuring the other things.

For your nvidia card, you will also need nvidia prime after installing the driver. This will enable you to switch between the integrated graphics card and your nvidia card. Without prime, th OS will use your default graphics card, which will be the integrated one.


move ubuntu hard drive to another laptop

It may work fine and it may crash and burn. There's no real way of telling. Since the two computers are somewhat similar, you may have better luck than others, but there's still no way of knowing. The best you can do is try and see.

If it boots up, that's great. If it doesn't work, your only option is really to manually transfer things over.


Gtk inspector force open Menus, Popups for inspection

In theory, after running gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true, you can navigate to a menu and press Ctrl+Shift+I to inspect that object. (I wish that would work with Firefox, too.)


How can I tell which driver my system is using?

Run sudo lshw from a terminal. This will get you extensive information on your hardware, including information about drivers.


Do different desktop environments affect game performance?

A few months ago, Phoronix posted some benchmark results of 3D performance with different desktop environments. You can find the article here: http://www.phoronix.com/scan.php?page=article&item=ubuntu_1204_desktops

Do note that these were results from Ubuntu 12.04 so results may be a bit different in 12.10 or later. As you can see from the results, Unity tends to eat away a little bit more then other DE's. So, if you are going to make a system purely for gaming, it looks like using the Xfce (Xubuntu) environment will provide the best performance.


update-initramfs generates junk images that should not exist

The question was how update-initramfs tool has the idea of these "versions" (how it managed to "generate" them is another :D)? To find...

cd (go to) into the directory:
lukas@OMEN:/etc/initramfs-tools$ cd /var/lib/initramfs-tools

ls (list) the files in current directory:
lukas@OMEN:/var/lib/initramfs-tools$ ls
'-r)'   -r}  '(uname'   {uname  '(uname -r)'  '{uname -r}'

Here we can see these files. Just proceed deleting them one-by-one, if you recognize something else you may need, or just remove them all:
lukas@OMEN:~$ sudo rm /var/lib/initramfs-tools/*

Now, delete the junk files in /boot...
First, check what files are there:
lukas@OMEN:~$ ls /boot
 boot                          initrd.img-5.7.10-xanmod2     System.map-5.4.0-42-generic
 config-5.3.0-62-generic       initrd.img-5.7.11-xanmod1     System.map-5.7.10-xanmod2
 config-5.4.0-42-generic       initrd.img-{uname             System.map-5.7.11-xanmod1
 config-5.7.10-xanmod2        'initrd.img-{uname -r}'        vmlinuz-5.3.0-62-generic
 config-5.7.11-xanmod1         lost+found                    vmlinuz-5.4.0-42-generic
 efi                           memtest86+.bin                vmlinuz-5.7.10-xanmod2
 grub                          memtest86+.elf                vmlinuz-5.7.11-xanmod1
 initrd.img-5.3.0-62-generic   memtest86+_multiboot.bin
 initrd.img-5.4.0-42-generic   System.map-5.3.0-62-generic

Then delete the files you recognize to be junk ones
(be careful, deleting wrong files can make your system unbootable):
lukas@OMEN:~$ sudo rm "/boot/initrd.img-{uname -r}"

If the files have space symbol or some weird symbols, put the argument after rm in quotes (both ' and " work)
If you did accidentally delete an image that was needed, do not reboot your computer, first do this:

Type in terminal uname -r, then sudo ls /boot and check if running kernel still has initrd image (should be initrd.img-VERSION, where VERSION is the output from uname -r). If there is such a file, you will be able to reboot your PC into GNU/Linux. Following next steps are still recommended, though.
Open up Synaptic or Muon (if neither are installed, sudo apt install synaptic), then launch from your dash or application menu.
Search for installed linux-image packages (put what is in quotes into search box, wait a sec for the application to load package list, then sort packages by "installed version" or "status".
Reinstall everything that shows a "installed version" or has status "installed" down below.
Check /boot directory with ls /boot again, and if you have the initrd images again, you can relax and do what you want, successful reboot included.


No option to "Install Alongside Windows 8.1" in installer GRUB menu

Select Install Ubuntu. It will take you to another screen, where you will get the option of installing alongside 8.1.

If you still have some problem try this

I can't install Ubuntu 14.04.1 LTS alongside windows 7 system restarts


Did you try

resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

after the lvextend?


Ubuntu 16.04 has experienced an internal error /cups/filter/hpps

I have observed the same. I am pretty sure it is this bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1446987

The printer driver crashes if it runs into a network problem. To quote the issue description: "As Linux distributions have automatic crash handling/reporting systems this causes annoying pop-ups which irritate the users giving the impression of a more severe problem."

So nothing too bad - just annoying. It looks like hp is working on a fix (see end of issue comments). I'm thinking about uninstalling hplip for now.


Why isn't java one of my "open with" options when I am trying to open a .jar file and I already successfully downloaded java?

I'd say that the reason for that is because you've installed the JDK, JRE. And in their original state, they wouldn't be an option to open .jar files. You can do any one of the following:

Download an IDE which has Java support, Eclipse, Netbeans and their ilk. This in my opinion is the simplest way to handle it.
Export the JDK's path to folder you wish to work in, using the export PATH command as follows:

export PATH=/path/to/dir:$PATH

For example, on my machine in the relevant folder i gave the following command: export PATH=$PATH: /usr/lib/jvm/java-7-openjdk-i386/bin


Why does eth0 disappear when I set a static IP (server 12.10)?

It was a typo. I should have had 255.255.255.0 as my netmask and instead typed 225.225.225.0

Thanks to qbi for helping me see the error of my ways


I have added b43 to /etc/modules as suggested by Chili555, but still wasn't able to connect. Then I found a question from fhgshfdg on Ubuntu forums about finding b43 blacklisted in broadcom-sta-common.conf. Once I added the # to the line blacklisting b43 my wifi automatically connected on reboot.
Thank you to all who helped with this long search.


Reset wrong file permissions on root directory

I was able to fix this using recovery mode. I booted to the most recent kernel in recovery mode. The I selected the option to drop into a root shell. I then ran
mount -o remount, rw /
chmod 755 /

After I rebooted and allowed it to boot on its own (most recent kernel with normal mount) the / directory had the correct permissions.


system,exec calls in linux not work from php its work fine if i run directly to putty

The shell command you're trying to execute will run with the permissions of the process running the PHP binary ( I.e. apache , etc...)
When you're logged in via putty/ssh, the kill command has your permissions.

Unless you suexec the PHP /apache or are trying to kill a process owned by the same user as that running the PHP/apache, you're not going to have much luck.


Installing on a separate hard drive partition

The partitions look alright.

I would put the boot loader on sda, because it's faster and that's where the operating systems reside anyway.


Intel wireless 7260 (rev 73) / NUC N2820: OK during install, failed after install

Is the driver loading? Check from the terminal:

lsmod | grep iwl

If not, load it and see if the problem is fixed:

sudo modprobe iwlwifi

If that fixes it, let's get iwlwifi to load on boot.

sudo -i
echo iwlwifi >> /etc/modules
exit

Do you have the latest firmware?

ls -al /lib/firmware | grep 7260

The newest is 683236 iwlwifi-7260-7.ucode; the older is smaller,  682892. If you have the older firmware, update it: Intel wireless 7260 driver crashes, how do I work around it?

Finally, look for clues:

dmesg | grep iwl


Lenovo X220 reboots instead of shutting down

I'm here on Xubuntu 11.10 with an x220 i5 and experienced the same issue.

Installing laptop-mode-tools (with aptitude install laptop-mode-tools --without-recommends) fixed it for me.

(found the hint via https://answers.launchpad.net/ubuntu/+source/acpi/+question/168617)

I came up with another solution that does not involve laptop-mode-tools. Maybe it works for others.
The problem seems to occur when power-management for PCI(e) devices is enabled (set to "auto").
Here are two ways to check that:

run powertop, switch to the "Tunables" tab and see if your "Runtime PM for PCI*" entries are marked as "Good"
cat /sys/bus/pci/devices/*/power/control and see if it outputs some "auto" values.
"auto" causes the shutdown problems on my machine while "on" does not.

I created an init.d script to handle that (and other stuff like setting battery charge threshs and the like), available via pastebin.

Note:

The script runs fine on my machine. This does not mean it will run on others due to missing programs, etc.
The script does more than (potentially) circumventing the shutdown problem, so please read it first.
I am not sure that "auto" brings any benefit at all ;)

Hope it helps.


Screen tearing/flickering on Lenovo Ideapad 720S 131IKB

I had this same issue and following this guide made it work for me:

boot to the GRUB menu
select Ubuntu
hit the e key
use arrow keys to move
find the line that has "quiet splash"
add nomodeset, so "quiet splash nomodeset"
hit F10 to exit and continue boot
see if it flickers

If you want to make it permanent you can edit the grub file by opening a terminal and doing this:

sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nomodeset" then exit the gedit
sudo update-grub
reboot

The original guide I read was here:
Ubuntu randomly started blinking the screen on boot


Ok then; consider yourself warned ;)
Have a look at https://github.com/pyenv/pyenv#installation

pyenv does...

Let you change the global Python version on a per-user basis.
Provide support for per-project Python versions.
Allow you to override the Python version with an environment variable.
Search commands from multiple versions of Python at a time. This may be helpful to test across Python versions with tox.

Would that work for you? You will need to install both version though. pyenv uses an own reference to PATH to switch to the other version. Not what you asked but it so much more versatile this way.


Matlab cannot find the mpeg codec on ubuntu 16.04

I was able to resolve this issue by -

   sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
   sudo apt-get update
   sudo apt-get install gstreamer0.10-ffmpeg

The latest repository library "ffmpeg" does not have the codecs needed by my system and i had to install gstreamer0.10-ffmpeg (not in the repository) from the ppa.


Keyboard and mouse unresponsive after suspend

Reinstall or install input device drivers.

sudo apt-get install xserver-xorg-input-all

Or:

sudo apt-get install --reinstall xserver-xorg-input-all


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


How do I associate torrent files with Vuze?

Right click on a torrent file and choose Properties > Open With.
Select Vuze from the list and press Set as Default button


how to remove hidden playonlinux files remained after uninstallation?

First remove playonlinux and all of its configuration by typing in the following:

sudo apt-get remove --purge playonlinux

Also, since playonlinux depends on wine, remove wine too.

sudo apt-get remove --purge wine*

Next, autoremove dependencies:

sudo apt-get autoremove

Now, to find any residues left over after those commands, run the command:

sudo find / -type f -iname '*playonlinux*'; sudo find / -type d -iname '*playonlinux*'; sudo find / -type f -iname '*wine*'; sudo find / -type d -iname '*wine*'; sudo find / -type f -iname '*pol*'; sudo find / -type d -iname '*pol*';

Check the results and delete the relevant files.

Be extra sure to not delete any system files.


Nothing.

You can install putty if you like, but there is a command line ssh client installed by default. There is no need for another X Server (that is what xming is).

The default command to start a ssh session with X fordwarding enabled is:

ssh -X target.machine.address


What does this mean by site IP or Fully Qualified Domain Name?

I guess it's apache you are configureing?

Example:
You have the domain: mycleverdomainname.com

Configure the DNS for mycleverdomainname.com with an A-record pointing to your webbserver IP-adress.

Your apache virtualhost can look something like this:

<VirtualHost *:80>
  ServerName mycleverdomainname.com
  DocumentRoot /var/www/myclever/

 <Directory /var/www/myclever/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Require all granted
 </Directory>

</VirtualHost>


Is there a way to know which application is producing sound(audio output) in ubuntu, through code?

You can list all applications producing sound by using pacmd list-sink-inputs. You'll get a list of indexes with indented details per source. Then you'll want to look at the "state" field. If it is "RUNNING", then it's playing sound. Directly below, you'll find "sink", which is which output it's playing to. Underneath, you'll find a "properties" field which includes other details, such as "application.name".

I don't know if there are any nice libraries available, but parsing this data shouldn't be too complicated. Perhaps you'll even find some nice regexes out there.


How I set any distribution for Debian package?

That is an issue for the repository that distributes your package, not your package itself. If you want to go with a generic name, pick stable.


You can try ap-hotspot. It works with Android devices, but it has only two problems: no GUI and you can't share the network that you use to connect to the router (example: wifi connected - cannot share wifi).

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot
sudo ap-hotspot configure
sudo ap-hotspot start

The hotspot is now active and ready to go. The hotspot can be stopped by using the command:

sudo ap-hotspot stop


cannot exec 'anything' : no such file or directory screen

Your stop script does not define port (check the start script, that one does, and this is missing). So when you run the screen -S $port -X quit command, it looks like ($port is not defined so it results in a blank string):

screen -S -X quit

Screen interprets this as "set the session name to -X, then run the quit command inside a shell".

If you had the port, it would look like:

screen -S 28970 -X quit

this means "send the quit screen action to the session named 28970", which is what you actually want.

So in order to fix it, simply ensure your stop.sh script has port defined.

Learn more about screen command line parameters:

https://www.gnu.org/software/screen/manual/screen.html#Invoking-Screen


Copy current terminal prompt to clipboard

To cut, press ctrl+u. To paste, use ctrl+y. This copies whole line to bash clipboard. If you're using X and default Ubuntu terminal, you can use your mouse to mark contents and press ctrl+shift+c to copy, and ctrl+shift+v to paste.


Cron job not running - postfix/sendmail error

According to cron manual:

  When executing commands, any output is  mailed  to  the  owner  of  the
  crontab (or to the user named in the MAILTO environment variable in the
  crontab, if such exists)

If you want to stop mail alert, you should redirect standard output and standard error.

So you should modify your cron file as:

  @hourly /home/userName/ntpdate.sh >> /home/userName/ntpdateLog.txt 2>&1

and your script:

  echo "Current time is $(date), "
  ntpdate -u 192.168.1.25

Another way to do this is give an empty value to MAILTO variable at the top of your cron file:

  MAILTO=""
  @hourly /home/userName/ntpdate.sh >> /home/userName/ntpdateLog.txt 2>&1

I suggest you redirect std output and std error in any case because it is easier to debug the script in case of errors.

Here is crontab manual for more details.


Finally I installed the NVIDIA driver by using the run-file provided by nVIDIA. The point is installing it without DKMS. The problem might because of DKMS could not work well with an out-of-date kernel.


How can I disable snaps in gnome-software centre?

Pretty simple, just remove this package, stop & restart gnome-software. (easiest thing to do is just reboot..

sudo apt purge gnome-software-plugin-snap

Then reboot & you'll not see snaps in gnome or ubuntu software app


Dell PowerEdge R910 adding more disks without rebooting

If the drive bays are hot swappable, new disks should be recognized by the kernel when added.

If RAID configurations may be modified without rebooting depends on

hard- or software-RAID
if hardware RAID, may the controller be managed by tools while running the system?

If you use software raid (for the data disks) it could be expanded by mdadm --grow. Another way is to use LVM to increase/resize logical volumes. Or to use ZFS for the data disks, which is also expandable in some way without reboot.


replace a string by variable in a file using bash script

Using Perl:

perl -pe 's/\bweb\K[0-9]+\b/$&+1/ge' file

To edit the file in place, add the -i option:

perl -i -pe 's/\bweb\K[0-9]+\b/$&+1/ge' file

-p: causes Perl to assume the following loop around your program, which makes it iterate over filename arguments somewhat like sed:

   LINE:
     while (<>) {
         ...             # your program goes here
     } continue {
         print or die "-p destination: $!\n";
     }

-e: may be used to enter one line of program.
s/\bweb\K[0-9]+\b/$&+1/ge: matches any web string preceded by a word boundary, discards the match and matches one or more digits followed by a word boundary, replacing the match with the equivalent number increased by 1.

% cat file
project web0
project web1
project web2
% perl -pe 's/\bweb\K[0-9]+\b/$&+1/ge' file
project web1
project web2
project web3


On clean Ubuntu 18.04 LTS installation of OpenCV Python bindings with

sudo apt-get install python-opencv python3-opencv

does not have any issues. Both commands

python2 -c "import cv2"
python3 -c "import cv2"

terminate successfully.

Note: cv2 python modules are from official packages

$ dpkg -S cv2 | grep python
python-opencv: /usr/lib/python2.7/dist-packages/cv2.x86_64-linux-gnu.so
python3-opencv: /usr/lib/python3/dist-packages/cv2.cpython-36m-x86_64-linux-gnu.so


How to install Ubuntu on a Mac with a broken disk drive?

Make a bootable USB drive, and install from that. There are instructions for doing just that here on the Ubuntu website.


How do I set up shared folders in a Windows Virtualbox guest?

First step is to install Guest Additions in your virtual Windows.
After that you may define a shared folder as outlined in this answer. However in Windows you don't "mount" it but instead you take the following steps (from the user manual of Virtual Box):

In a Windows guest, shared folders are browseable and therefore visible in Windows Explorer. So, to attach the host's shared folder to your Windows guest, open Windows Explorer and look for it under "My Networking Places" -> "Entire Network" -> "VirtualBox Shared Folders". By right-clicking on a shared folder and selecting "Map network drive" from the menu that pops up, you can assign a drive letter to that shared folder.

If you don't see any entries coming up in the Browse dialog, you can manually fill out the Folder: field with \\VBOXSVR\<folder-name> where <folder-name> is the share name of your folder.

Screenshots for Windows Explorer (German locale)
Windows XP

Windows 7

Windows 10


Attempting to disable NTP with timedatectl results in "Failed to set ntp: The name org.freedesktop.timedate1 was not provided by any .service file"

It sounds like you may be trying to disable something which is not currently enabled. Check the output of this command:

systemctl status systemd-timesyncd.service

Look at the Loaded: line. Does it say "enabled" or "disabled"?
Look at the Active: line. Does it say "active" or some other value?

If the service is not active and not enabled, then your goal has already been accomplished.


Can I "upgrade" Ubuntu MATE 14.04 to Ubuntu GNOME 14.04?

Yes you can install it, but not as an upgrade.

All you need to do is install GNOME as an extra desktop environment, which you can do either through the software centre or the terminal:

sudo apt-get install gnome-shell

To select the environment:


ls -l *.txt | wc -l | tee count.txt

In first example:

The ls command lists all files in the current directory that have the filename extension .txt, one file per line; this output is piped to wc, which counts the lines and outputs the number; this output is piped to tee, which writes the output to the terminal, and writes the same information to the file count.txt. If count.txt already exists, it is overwritten.

In your second example:

ls -l *.txt | wc -l > tee count.txt

In this example tee will be treated as file name instead of a command and output of wc -l will be redirected to the newly crated file tee and will  contain the output of wc -l and string count.txt.

If you want the same behaviour as in the first example then right way of doing this would be:

 ls -l *.txt | wc -l > count.txt

> itself is sufficient to redirect the output to count.txt file


Installed Lubuntu 16.04 version no audio now

Before anything, make sure your sound is not muted.

ALSA and PulseAudio don't get together well. They are conflicting each other most of the times. Unless ALSA is specifically required by an app or hardware I recommend using only Pulse (it's newer and better).
First, remove alsa completely by opening a Terminal window and typing:

sudo apt-get remove --purge alsa

Secondly install Pulse:

sudo apt-get install pavucontrol

pavucontrol is the graphical interface for Pulse, but it will install Pulse completely (as its dependencies).

And finally, type:

gksu pavucontrol

A Pulse window should come up with many tabs and options. Make sure the inputs and outputs matches your connection (hdmi, usb, headphones, etc), and make sure Pulse is using the correct audio card (on-board, dedicated, external usb/hdmi device, etc). E.g. When connecting laptop to large screens via hdmi, Pulse might detect the hdmi audio card as external output device with specific brand (not necessary the same as vendor brand). If so, you must choose that external card as output to make audio work.

Be aware that Ubuntu doesn't support hdmi hot-plugging! After disconnecting hdmi device, Pulse (or ALSA) will not fall-back to previous settings. You have to change the settings (again) and then restart the Pulse audio service by log out + log in in order to make things work again.


How to set default options for mounted file systems?

It turns out is is not possible at all, as explained in another answer in unix.SE. The reason is that mount options are hardcoded in udisk2 (see FSMountOptions in udiskslinuxfilesystem.c).

A patch has been proposed to make mount options user-configurables but it has not been integrated as of April 2016.


How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy)

First you need to know a bit about how name resolving works in Ubuntu since Ubuntu 12.04.

Stéphane Graber blogged some information about it last year here. The most important thing to know is that both Ubuntu Server and Ubuntu Desktop use resolvconf to manage the resolv.conf file. That means that you should no longer edit /etc/resolv.conf directly; instead you should configure your network interface configuration utility to provide the right information to resolvconf. For Ubuntu Server the network interface configuration utility is ifup and it is configured by the file /etc/network/interfaces. For Ubuntu Desktop the network interface configuration utility is NetworkManager. This is what you are using.

NetworkManager is configured by means of Network indicator > Edit Connections. However, for network interfaces configured by DHCP it normally isn't necessary to change any settings manually. Normally what happens is that the (remote) DHCP server provides to NetworkManager both an IP address for the local interface and the address of a (remote) DNS nameserver to use. NetworkManager starts an instance of a forwarding nameserver that listens locally at 127.0.1.1. This address, 127.0.1.1, is sent to resolvconf which puts nameserver 127.0.1.1 in /etc/resolv.conf. NetworkManager also gives the (remote) IP address of the DHCP-provided DNS nameserver to the forwarding nameserver. Thus a program running on the local system asks the resolver to translate a host name into an IP address; the resolver queries the local forwarding nameserver at 127.0.1.1; the forwarding nameserver queries the remote nameserver(s) it has been told about, receives an answer and sends it back up the chain.

NetworkManager communicates with the forwarding nameserver process over D-Bus. You can see what NetworkManager told the forwarding nameserver by running the command

nmcli dev list iface eth0 | grep IP4.DNS

Update arising from the comments:
Note that resolvconf actually writes the file /run/resolvconf/resolv.conf to which /etc/resolv.conf is supposed to be a symbolic link. If /etc/resolv.conf is not a symbolic link then you need to recreate it. To do so you can run

sudo dpkg-reconfigure resolvconf

or

sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf


Luks broken after update from 17.10 to 18.04

you should try the answer to this question : Ubuntu with full disk encryption - bad password after upgrade to 18.04

It worked for me.


How to remove Ubuntu and Install Windows

Here is the steps by step described. Hope this is useful for you.
        Ref.
How To Remove Ubuntu 13.04 Installed Alongside Windows 8

Steps To Remove Ubuntu Easily:

NOTE:This method is applicable for most of the Linux Operating system’s.

Use a Live USB/DVD with Ubuntu and boot using it.
Choose “Try Ubuntu”, go to edit network connections connect with internet (set up your internet connection and remain connected with internet)
Open Terminal (Ctrl+Alt+T) on Ubuntu and use these lines of code :
    ---> sudo add-apt-repository ppa:yannubuntu/boot-repair
    ---> sudo apt-get update
    ---> sudo apt-get install -y os-uninstaller && os-uninstaller
Press Enter after entering each line of code and wait for the process to be completed.

Basically we’ll be using an app called os-uninstaller found in Ubuntu repository.OS-uninstaller will automatically be launched if not then find it here:System->Administration->OS-Uninstaller menu if you use Gnome, or via the dash if you use UnityChoose the OS you want to uninstall/remove.A confirmation will appear, Click Apply to start the removal.

AlSO SEE:Official website of OS-Uninstaller

Note: There may be numerous other methods but this one is pretty simple and less prone to errors (best for newbies).

 Now Restart Your PC and it’ll boot into your windows.

 Follow these steps to regain your lost space (The space Ubuntu has been using)

1. Right-click on computer and select Manage.
2. Go to Disk Management.
3. The windows partitions will usually be wrapped in green, look to right of this green box. the partitions to right of it are usually created by Ubuntu.
4. Delete Those Volume’s and they’ll go into that green box and will form a single volume.
5. Now Format the volume.
6. Right-click on the last NTFS volume and select Extend volume and then Next to complete the process.
Now you’ll regain your drive space you’ve lost to Ubuntu.

And yes, you can change the drive letter’s if they are not displayed correctly.


Dual Screen problem when trying to maximize the window on the second screen

Here is a workaround I found on Launchpad.  It works for me:

  If you want to maximize on left screen:

  Drag your window in the left monitor, with your mouse (normal size)
  Ctrl + Super + ←
  Ctrl + Super + ↑

  If you want to maximize on right screen:

  Drag your window in the right monitor, with your mouse (normal size)
  Ctrl + Super + →
  Ctrl + Super + ↑

According to the page, there is a fix (patch for Compiz).  I just don't know where/how to get it.


Udev problem after updating to ubuntu 15.04

Yesterday I stumbled into the same problem. I upgraded from 14.10 to 15.04 and during the upgrade I got the same errors as you get. Luckily I was able to pinpoint the cause of the issue. There are two ways to fix this:

  First way (EASY) Go to the terminal and execute the command sudo groupdel input. Now run sudo apt-get update && sudo apt-get dist-upgrade.

Only read the second way if you are interested in the cause of the issue or if the first way didn't work.

  Second way (I just posted this to explain the issue)

  A certain line in the dpkg configuration script is the problem, we
  want to delete this line. First open the file via terminal:

sudo nano /var/lib/dpkg/info/udev.postinst

  Now search for the line addgroup --quiet --system input and delete
  it. This line is the first part of the config script. It adds the
  group 'input' to your system. Strangely it crashes the whole script
  when the group already exists. Obviously members of this group have
  access to your systems input, but it isn't needed, as input also works
  without this group. Save your edited file and run sudo apt-get update && sudo apt-get dist-upgrade.

I hope this fixed the issue for you and will be helpful for other users in the future. Until this is fixed we have to apply one of the fixes everytime there is an update for udev. I have no idea how to report this bug, otherwise I would have done it.

Best Regards,

Shengolol


Is there any GUI tool for setting up an OpenVPN server?

OpenVPN Access Server have good web gui interface. Simply to install. But have free license only for 2 clients.
OpenVPN Access Server
Also you can look at this project https://github.com/deranjer/OpenVPN-PHP-Management-Gui
And look plugins to webmin panel.


Can't find USB flash drive in terminal in VirtualBox guest

You need to set Virtualbox to share that specific usb device.

To make sure Ubuntu sees it, run lsusb with it attached and unattached. If it displays in that listing it is at least seeing it, and it should display the drive in Files.


How do I remove wine and playonlinux completely?

After uninstalling PlayOnLinux, delete the hidden folder .PlayOnLinux in your home directory and it's link:

rm -r ~/.PlayOnLinux ~/"PlayOnLinux's virtual drives"

Now reinstall PlayOnLinux.


Do LTS releases get the features from normal releases through the update process?

You need to upgrade to 13.04 to enjoy its features.

With few exceptions, new features are not added to any Ubuntu release post-release. The exceptions are for hardware enablement (making 12.04 work on hardware released after the release of 12.04) and software like Firefox which are generally driven by upstreams and fulfil certain requirements.

See https://wiki.ubuntu.com/StableReleaseUpdates and https://wiki.ubuntu.com/StableReleaseUpdates/MicroReleaseExceptions for details.


'/etc/.a/kernelupd /etc/.a/.cf --daemonized' Using 100% CPU

This seems to be an XMR mining malware. My server was also hacked to run the same program, which has exactly the same file creation date time as yours.


How to do command line search for duplicate downloads within downloads folder?

I think this is what you're looking for:

for f in ~/Downloads/*; do
    if [[ $f == *\([1-9]\).* ]]; then
        echo "$f"
    fi
done

Edit: @steeldriver pointed out that globs can do the above, so the simpler solution is this:

printf '%s\n' ~/Downloads/*\([1-9]\).*

I prefer plain Bash, but you could do this in one line using find:

find ~/Downloads/ -name '*\([1-9]\).*'


Job for mysql.service failed because the control process exited with error code

I encountered this error on Armbian 20.08.5 Bionic with Linux 5.4.65.
The problem was a missing log directory at /var/log/mysql, indicated by a log entry in /var/log/syslog. Creating the directory /var/log/mysql with owner mysql and group adm fixed it for me.
mkdir /var/log/mysql
chown mysql:adm /var/log/mysql

# start mysql with your init system (e.g. systemctl start mysql)


Shortcut to go to the next unread mail in Evolution?

I believe that the keyboard shortcut is Ctrl-]


Use "find" to select a zip file and deplace them with mv

With either bash or zshell you can use

find . -name '*.zip' -exec mv {} /path/to/target/directory/ \;


PPT does not open in LiberOffice Impress

That's a common issue. The import of Microsoft Office documents in LibreOffice is far from perfect (notably because Microsoft uses or used to use obscure file formats).

What you can do:

upgrade to a newer LibreOffice version that may or may not have improved PPT support:

sudo add-apt-repository ppa:libreoffice/libreoffice-5-2
sudo apt update
sudo apt full-upgrade

Convert the PPT file to PPTX with Microsoft Office because the latter is better supported by LibreOffice overall.


Why is my laptop getting hot using Ubuntu

There are several issues with overheating in 11.10. At least most of those are fixed in Precise (which will become 12.04). I had similar issues with all my computers on 11.10, but never since. (Never before 11.10 either).

If you really want to get into it, you can try upgrading your kernel. Or maybe you'll rather want to upgrade to 12.04 Beta 1 on the first of March. Of course, you could always download it now and try it in a memory stick  or something, just to confirm that all the issues have been resolved. They should.


BIOS won't see neither USB nor HDD after install

I recommend rebuilding the LiveUSB with Ubuntu's Disk Image Creator from a LiveCD. It sounds like you have a corrupt boot file on the USB.

That's the most help I can offer as the question is a little unclear.

It almost sounds like your boot file is corrupt on the main drive. It that case, definitely rerun the installation and set the bootloader to install to the / of the hard drive.


Dual booting Windows 7 and Ubuntu 13.10. Windows 7 isn't showing up

Boot into Ubuntu os and run the below commands on the terminal,

sudo update-grub
sudo shutdown -r now

Now you will see windows entry on the grub.


Can someone explain what this all means please?

Can someone tell me if this machine has drivers or not?

Your screenshot clearly states you are using the open source driver (the name for that is xserver-xorg-video-ati. That is a wrapper though and connects to one of these:

xserver-xorg-video-mach64
xserver-xorg-video-r128
xserver-xorg-video-radeon

The ati wrapper autodetects if you have a Radeon, Rage 128, or Mach64 or earlier chip and loads the radeon, r128, or mach64 xorg video driver corresponding to your card).

  and if not can they please link to me the correct drivers?

All should be fine unless you want some more extra. The normal, open source version often lacks that little bit extra as it is a one-fits-all type of thing.

Besides the one currently active you can also opt for 2 versions from AMD itself from the screenshot you posted (proprietary, so owned by AMD) called fglrx and fglrx-updates. Sometimes it is worth installing this one as it often also comes with some tool where you can tweak the video card. Then again a general rule is: if it is not broken don't try to fix it; so if what is installed now works and you do not feel like you miss out on anything keep the open source driver.

By the way: if you had no driver for your videocard I doubt your system would even boot and it would crash as soon as anything videocard driver related was going to be shown; I assume that would be the purple greeting screen with the 3 dots.

Then there is also the official Radeon how to. You have an R9 290 so do note this bit of information:

  Ubuntu 16.04 LTS and newer: for some most recent graphics cards (R9 285, R9 380/380X, R9 M395X, R9 Nano/Fury/FuryX, RX 460/470/480, RX 550/560/570/580...) and APUs (Carrizo, Stoney), the open-source AMDGPU driver is enabled by default. For Ubuntu 16.04 LTS AMDGPU-Pro hybrid driver is also available to download here (please read the release notes for known problems and limitations).

It is about 16.04 and, as it is newer, 18.04 will have even better support.


Kubuntu 19.10 screen saver activates HDMI sound and does not turn off screen

Of all the things I tried, I finally found one that worked, disabling the module that corresponds to the HDMI sound.  This removes the HDMI sound source.

Find the module number of the HDMI sound source (the output lists the module as "index:")

pacmd list-modules

I found that mine was 7.

To remove it do

pacmd unload-module 7

I put this in a script that runs  at system startup.  Now the screen saver and sound work (and continue to work) as expected.


Command to switch to next/previous application

The shortcuts control the window manager, to do the same using terminal commands there's wmctrl. Here are some usage examples:

list  the  windows  being  managed by the window manager

wmctrl -l

switch to the desktop containing Firefox, raise the window and give it focus

wmctrl -a firefox

move Firefox to the current desktop, raise the window and give it focus

wmctrl -R firefox

Toggle “fullscreen” and “stay above“ mode for currently active window

wmctrl -r :ACTIVE: -b toggle,fullscreen,above

Select a window by clicking on it, maximize it horizontally and make it invisible for the taskbar

wmctrl -r :SELECT: -b add,maximized_horz,skip_taskbar

Read man wmctrl and wmctrl‘s homepage for more. The window properties available for the -b option may partially be specific to the window manager in use, use wmctrl -m to get its name and search from there – or just try it out.


How to enable Unity 3D support in Ubuntu 12.04 64 bit virtual box with host Windows 7 64 bit?

I've had the same problem since Unity came out, here is the solution that always works for me.

Enable 3D acceleration in VirtualBox for the machine
Provide adequate video memory
Boot the Ubuntu guest
ensure kernel headers is installed for your running kernel

sudo apt-get install build-essential linux-headers-$(uname -r)
Mount vbox additions
Install Guest Additions, it should autostart, if not run it from a sudo command prompt

sudo ./VBoxLinuxAdditions.run
Ensure that the word 'vboxvideo' appears on a line on it's own in /etc/modules
Reboot
Test with sudo /usr/lib/nux/unity_support_test -p

This ensures the vbox video driver is built correctly and installed for your current running kernel.

Note, if you ever do an apt-get dist-upgrade you will need to repeat this process as your kernel version might change.


Microphone recording through flashplayer on Ubuntu

Some users on my corporate network had this problem, too. There was no audio from microphone when they were accessing the flash based chat room at Englishtown.

I "solved" it by using Google Chrome. Its built-in flash player had no problem recording audio from microphone.


Showing "No batteries available" on kubuntu 18.04 in Lenovo G450 laptop

I had the same problem, installing upower helped.

apt-get install upower


You need to let update-alternatives to know that you have 2 C/C++ compilers, create a record for each one, and then configure which one you want to use. This is done with the following:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --config gcc

From this point forward, the only thing required when switching compilers is this command:

sudo update-alternatives --config gcc

Source: http://charette.no-ip.com:81/programming/2011-12-24_GCCv47/.


Change Ubuntu 12.04 (with Gnome) number of workspaces via command line

To get the number of workspaces you can use:

gsettings get org.gnome.desktop.wm.preferences num-workspaces

To change the number of workspaces to 8 for example you can use:

gsettings set org.gnome.desktop.wm.preferences num-workspaces 8


Is it possible to make Popper mail notification working on Ubuntu 16.04 and 18.04 (MATE and Unity)?

Yes, it is possible. The result will look like as in screenshot from Ubuntu MATE 18.04 LTS:

Ubuntu 16.04 LTS (running MATE or Unity)
See comment on bug 1683516.
You can do the following:
sudo apt-get install libindicate-gtk3 libindicate5 python-indicate \
python-gnomekeyring python-notify

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-support/python-support_1.0.14ubuntu2_all.deb
sudo dpkg -i python-support_1.0.14ubuntu2_all.deb

wget http://ppa.launchpad.net/ralf.hersel/rhersel-ppa/ubuntu/pool/main/p/popper/popper_0.31.3-0ubuntu1_all.deb
sudo dpkg -i popper_0.31.3-0ubuntu1_all.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/i/indicator-messages/libindicator-messages-status-provider1_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
sudo dpkg -i libindicator-messages-status-provider1_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/i/indicator-messages/indicator-messages_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
sudo dpkg -i indicator-messages_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/i/indicator-messages/indicator-messages-gtk2_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
sudo dpkg -i indicator-messages-gtk2_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb

Then for MATE - mate-tweak -> Panel (Interface) -> Enable indicators.
Then Applications -> Internet -> Popper - set account settings.
Then pin installed packages:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-indicators
Package: indicator-messages
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: indicator-messages-gtk2
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: libindicator-messages-status-provider1
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: popper
Pin: version 0.31.3-0ubuntu1
Pin-Priority: 1337

Package: python-support
Pin: version 1.0.14ubuntu2
Pin-Priority: 1337

EOF

Reboot and login back.
That is all. You got indicator-messages working again.
Ubuntu 18.04 LTS (running MATE or Unity)
You can do the following:
sudo apt-get install libindicate-gtk3 libindicate5 python-indicate \
python-notify libpango1.0-0

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-support/python-support_1.0.14ubuntu2_all.deb
wget http://ppa.launchpad.net/ralf.hersel/rhersel-ppa/ubuntu/pool/main/p/popper/popper_0.31.3-0ubuntu1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/i/indicator-messages/libindicator-messages-status-provider1_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/i/indicator-messages/indicator-messages_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/i/indicator-messages/indicator-messages-gtk2_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/i/indicator-messages/libindicator-messages-status-provider1_0.6.0-0ubuntu2_`dpkg --print-architecture`.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python-desktop/python-gnomekeyring_2.32.0+dfsg-3_`dpkg --print-architecture`.deb

sudo apt-get install ./*.deb

Then Applications -> Internet -> Popper - set account settings.
Then pin installed packages:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-indicators
Package: indicator-messages
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: indicator-messages-gtk2
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: libindicator-messages-status-provider1
Pin: version 0.6.0-0ubuntu2
Pin-Priority: 1337

Package: popper
Pin: version 0.31.3-0ubuntu1
Pin-Priority: 1337

Package: python-gnomekeyring
Pin: version 2.32.0+dfsg-3
Pin-Priority: 1337

Package: python-support
Pin: version 1.0.14ubuntu2
Pin-Priority: 1337

EOF

Reboot and login back.
That is all. You got indicator-messages working again.
Ubuntu MATE 20.04 LTS
Popper is installable with some hacks, but does not work anymore.


how does adding a ppa with a curl command work?

Explanation of the line:

curl -sL https://deb.nodesource.com/setup | sudo bash -

curl flags and options:

-s <==> Silent mode
-L <==> or --location, will follow redirects

sudo bash:

The minus sign behind sudo bash in fact means take the input comming from the pipe and treat it as a bash script. and that is exactly what this link contains, a bash script, you could as well use this line:

wget -O- https://deb.nodesource.com/setup | sudo bash -

Which will do exact the same.


Ttrying ubuntu 12.04 64 bit from a usb stick

"signal out of range" means that the driver you're trying to use (fglrx) is trying to display a resolution not supported by your monitor. If you read the documentation on fglrx I'm sure there is a command line method of changing the driver's default resolution.

If you are not running games or high graphics-intensive programs, can you not just use the default linux Nouveau driver instead of installing proprietary video card drivers? If it is a new card then it may not have linux support for the proprietary driver yet.

Also yes if you're trying to install software on a 32bit operating system or machine, it will not work. If your machine is 64bit why can you not just boot from 64bit live-CD, and reinstall, replacing the 32bit version of Ubuntu?

If you boot from 64bit live-CD and use that to try to install software on a 32bit already installed system, and it actually allows you to do so in the first place, when you reboot to HD it will break almost guaranteed. Which again begs the question, why can you not just use a 64bit system on your machine?


Boot from Ubuntu Live CD.

Open the Terminal.

Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch gparted (included in the Live CD) if not then install it via software centre and find out. It is Usually a EXT4 Partition. Replace the XY with the drive letter, and partition number.ex: sudo mount /dev/sda5 /mnt. Then bind the directories, you need, like so:

sudo mount /dev/sdXY /mnt

sudo mount --bind /dev /mnt/dev

sudo mount --bind /proc /mnt/proc

Now we jump into that using chroot.

sudo chroot /mnt

Now to install, check, and update grub you only need to add the partition letter (usually 'a') to replace X  ex: grub-install /dev/sda, grub-install –recheck /dev/sda

grub-install /dev/sdX

grub-install --recheck /dev/sdX

update-grub

Now you can exit you mounted hard disk,

exit

sudo umount /mnt/dev

sudo umount /mnt/proc

sudo umount /mnt

Now restart and in terminal

sudo update-grub

Source >> How to Repair/Restore/Reinstall Grub 2 with a Ubuntu Live CD


You need to reinstall your Windows Boot-loader. To install windows boot-loader use windows cd/live USB.

Boot into cd/usb and select your windows and use repair windows

In that goto repair -> repair using cmd or command prompt

Type the following commands

Bootrec/fixboot

Bootrec/fixmbr

It gives a successful messages for each command.

Restart.

You can boot into windows again.


This is a bug in Ubuntu. When you have IPV6 addressing, sometimes after suspend you do not get an IPV4 address.

You can check it by looking into Network manager -> Connections. You will see only IPV6 address.

A workaround is to disconnect from your wireless router and connect again.

I tried to report the bug to Launchpad.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1695641


Brightness doesn't decrease on an HP Pavilion G6

A friend of mine had the exact same problem on a Samsung NP530 laptop, after an Ubuntu 12.04 kernel update.

/etc/default/grub, GRUB_CMDLINE_LINUX_DEFAULT variable, he added acpi_osi=

After running update-grub and a reboot, problem solved.

Similar questions:

What does the kernel boot parameter "set acpi_osi=Linux" do?

Screen brightness not changing on Acer 5742 notebook

Brightness controls stopped working after update on a Samsung QX412-S01AU

Fn+F6 & F7 does not work for screen brightness in 12.04


Ubuntu 18.04 clevis decrypt of secondary disk

Found that my disk UUID was incorrect. Once I updated that to the correct one, this whole procedure worked perfectly.


running Ubuntu 15.04 how do I gain root privileges for nmap?

Run it with sudo in front -  sudo nmap -O -v scanme.nmap.org

When you're asked for a password enter the one of your user.


I found the problem's solution. it will be show up in cases you have proxy!

just define no_proxy="...." in /etc/environment for both m server and juju client.

and define no-proxy="..." in ~/.juju/environment.yaml

Hope this save a lot of time for you


Ubuntu FTP install and publish for LAN network

This command:

sudo apt-get install ftp

install a ftp client, not a server. That's why, see the output of:

$apt-cache show ftp
Package: ftp
....
Description-en: classical file transfer client
 This is the user interface to the ARPANET standard File Transfer Protocol.
 The program allows a user to transfer files to and from a remote network
 site.
Description-md5: ce93e483dfc5fef0655f73f364b3c01c
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: standard, kubuntu-active, kubuntu-active


As my problem is caused by a hardcoded key bindings to the indicator-applet I removed that code and pushed a clean indicator-applet to my PPA. The patch is the same as this one.

PPA


18.04 Kaby Lake Intel Graphics - Screens randomly turning off and on again

Kernel version 4.10.0-38 was released for Ubuntu 16.04: https://packages.ubuntu.com/xenial-updates/linux-image-4.10.0-38-generic

Because you are using Ubuntu 18.04 I'd recommend trying most recent Kernel version 4.15 designed for Ubuntu 18.04. If you have a problem witht hat kernel version you can try mainline kernel 4.14.74 or 4.18.12 instead.


Microsoft Office Communicator 2007 r2 in ubuntu 13.04

Well you can run it under Wine which is a layer that allows you to run windows applications under Ubuntu.

The other option is to use Pidgin protocol plugin to connect to MS Office Communicator.  it is offered under the name pidgin-sipe.  To install, and for more information, see the SIPE Project website.

Or to install just click it Pidgin-Sipe


xubuntu 12.04 doesn't seem to have option to not "sleep" computer

I had adjusted the slider from never and forgotten that you have to slide it down (and not up) to get the "never" setting. So when you move the slider up, it maxes out at 5 hrs 50 something.


Lubuntu 17.10 Panel Digital Clock/Calendar Error

Those numbers are not anything random at all they are the week number of the year. February starts on the 5th week of the year so that is why it is number 5. I do not think you can remove those with any ease. https://help.ubuntu.com/community/Lubuntu/Documentation/CustomizingTheClock

however this does not have anything on setting up the calendar to not show weeks.


User74513,

Yes, the unnecessary dependency of gcc 4.8 on ubuntu 13.04 is a fact. Visit the site:

https://launchpad.net/~ubuntu-toolchain-r/+archive/test

and under the "Overview of published packages" select quantal (or whatever, ex raring), and you'll see no availability. Select Raring and life will be good, except for the wait and then the bugs once 13.04 is released.

For std::thread's you can use gcc 4.7.2-5ubuntu. The difference between 4.7 and 4.8 (and others) can be seen here:

http://gcc.gnu.org/gcc-4.7/cxx0x_status.html

(or /gcc-4.8/)

If you need thread local storage, however, then you'll need gcc 4.8.

For the record, I've written the developers who own the PPA above (3 times) but they never bothered to reply.


Create keyboard shortcuts to move windows to different monitors without Compiz

Introduction

window_jumper.py is a python script that will move active window across multiple monitors in cycle. For instance, if you have 3 monitors A,B, and C , repeated keypress of the assigned shortcut will move the window from A, to B, to C, and back to A. The window placement will be Top Left corner of each screen.

Usage

To run script manually

python window_jumper.py

The script has no command line options ( as of right now , but may in future ).

Setting Up Keyboard Shortcut

Ubuntu Unity steps:

Go to System Settings -> KeyboardShortcuts tab , select Custom Shortcuts and click + button. Custom Shortcut popup will appear with two fields Name: and Command:
For Name field , call it window_jumper. For Command: provide full path to the script file. For instance, python /home/ubuntu_user/bin/window_jumper.py . Click Apply
Click on the right-most column , the words New accelerator will appear. Press the keyboard shortcut that you wish to be designated to this script. For instance , I chose CtrlSuperJ

Ubuntu Mate instructions:

Go to SystemControl CenterKeyboard Shortcuts , click Add. Custom Shortcut popup will appear with two fields Name: and Command:
For Name field , call it window_jumper. For Command: provide full path to the script file. For instance, python /home/ubuntu_user/bin/window_jumper.py . Click Apply
Right-most column (labeled Shortcut) will have words Disabled on the line. Click on the words, the text will change to New shortcut. Press the key combination you wish to use.

Script source

Also available as on GitHub. If you have GitHub account, please submit issues and feature requests there.

#!/usr/bin/env python
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import GdkX11, Gdk, Gtk

def main():

    DEBUG = False

    screen = GdkX11.X11Screen.get_default()
    monitors = []
    for monitor in range(screen.get_n_monitors()):
        monitors.append(
            [screen.get_monitor_geometry(monitor).x,
             screen.get_monitor_geometry(monitor).y])

    if DEBUG:
        print monitors

    active_window = screen.get_active_window()
    active_window_location = screen.get_monitor_at_window(active_window)

    new_location = None
    new_location = active_window_location + 1
    if active_window_location + 1 >= monitors.__len__():
        new_location = 0
    new_screen = monitors[new_location]
    if DEBUG:
        print new_screen

    active_window.move(new_screen[0], new_screen[1])
    screen.get_active_window()
    # TODO: add resizing window routine in cases where
    # a window is larger than the size of the screen
    # to which we're moving it.

if __name__ == "__main__":
    main()

Side notes:

The code may or may not change to include additional features.
In case you receive ImportError: No module named gi run sudo apt install python-gi (Thanks Dariusz for the comment)


HDMI recognized as "unplugged", after installing drivers

Thank you !

pacmd set-card-profile 0 output:hdmi-stereo mostly solves the problem

if not,

CtrlAltF1

then

CtrlAltF7

solves it.


mail: cannot send message: Process exited with a non-zero status

You can not use external applications with your normal password,
you must go to https://security.google.com/settings/security/apppasswords
and create a special password to use with your mail sender.


I would use GParted

https://help.ubuntu.com/community/GParted

Download and create a GParted LiveCD and run from it.

Just be careful and make sure you are working with the right HD when you hit its "apply" button.

GParted makes it pretty simple to resize any partition and there are multiple guides/video's to help explain what you need to do or think about.

Youtube is your friend and there are multiple video guides.   Here is just one:

https://www.youtube.com/watch?v=nNoQ6sdES_g


THE simplest/easiest possible way to remote into an Ubuntu desktop?

Ubuntu ships with remote desktop but it is off by default. Search for "desktop" in dash and it will show "desktop sharing". Your dad needs to check the top choice (and do make him set a password).

It is the easiest method for your dad. Your side needs installation but that is not to difficult (and you probably are already familiar with it). You need to have open-ssh server installed on your machine.

sudo apt-get install openssh-server

And all you then need is his IP and his password to take over his machine.

There are other choices that are web only like logmein or teamviewer but remote desktop is already available.


Yes you can use Ubuntu as a live disk only and partition storage space for files and saved sessions (if your flashdrive is big enough--at least 8gb). Not going to be very good for long term, but fine for a while.

https://wiki.ubuntu.com/LiveUsbPendrivePersistent

Any OS is going to run slower off of a flash drive so I would recommend using 3.0 if you have it.


How do I reset qBittorrent settings to default?

qBittorrent stores its settings in ~/.config/qBittorrent, where ~ is your home directory. To clear the settings, you can remove or, better, rename that directory. You should expect that this will cause qBittorrent to forget all your current torrents, though the actual files in them will remain intact. I recommend making sure qBittorrent is not runnning before proceeding.

Since occasionally qBittorrent can remain running in the background after it seems like you've closed it, you can run this command to see if it  is running, if you think it might be. It will output a process ID if it is, or nothing if it is not:

pgrep qbittorrent

To rename ~/.config/qBittorrent from the command line, run:

mv ~/.config/qBittorrent{,.old}

Or, if you prefer:

cd ~/.config
mv qBittorrent qBittorrent.old

There are other ways, of course, but either of those work. Whichever you use, it renames the qBittorrent directory with a .old suffix. You don't need to replace ~ with anything when you type it on the command line. The shell expands it automatically to the name of your home directory.

If you really want to remove the directory, which I suggest against doing, then you can do that this way:

cd ~/.config
rm -r qBittorrent

If you prefer to rename or remove it using Nautilus (or another graphical file browser), then open up a file browser window in your home directory. Press Ctrl+H to show hidden files and directories, so you can see the .config directory. Go into it and find the qBittorrent directory; then rename or delete it. (Pressing Ctrl+H again will re-hide files and directories whose names start with ..)

Next time you start qBittorrent, a new ~/.config/qBittorrent directory will be created with fresh (default) settings.


How do I get traditional chinese input with pinyin on Ubuntu 20.04?

I just figured out how to switch Google Pinyin with fcitx to traditional.
First, follow the instructions on this blog to install fcitx and add Google Pinyin as an input method:
https://leimao.github.io/blog/Ubuntu-Gaming-Chinese-Input/
After installing fcitx, open the config tool
fcitx-configtool

Click on Google Pinyin so it's highlighted.
Click on Addon on the bar at the top.
Scroll down to where it says "Simplified Chinese To Traditional Chinese." Select it and click the button that says "Configure." Click Ok.
Now, when using Google Pinyin, you can use Ctrl + Shift + F to toggle between Simplified and Traditional.


Finally reinstalling the same version of Ubuntu (based on 16.04) has solved all my problems.
Luckily it is quite fast to reinstall Ubuntu if you have separate /home and root partitions.

One big difference between now and before, is that the Brother supplied script it is now able to download and install the drivers.  It failed before, no matter how many times I tried it.


Backlight too low on Ubuntu 16.04 (Lenovo Laptop)

Ok! After a few days trying to sort out this issue, I found out that I had my ideapad_laptop module blacklisted on /etc/modprobe.d/blacklist.conf . It was due to a Bumblebee installation tutorial that I followed few days ago. So removing ideapad_laptop from my blacklist.conf solved the problem.

Maybe one of the solutions I listed on the question works. So this topic serves as a compilation of few tricks to sort related problems.


unable to print. System Settings-> Printers says that CUPS is not running. But systemctl says it is running

if you look to see which version of cups you have installed;

there have been issues in the last few weeks with a cups update that went "belly-up":

If you paste this command dpkg -l cups*

have a look to see which version you have; it seems cups2.1.3-4ubuntu0.2 is the problem; if you just have 2.1.3-4ubuntu then that seems ok

on the Mint forum; (ubuntu lookalike) https://forums.linuxmint.com/viewtopic.php?f=51&t=242497&start=40

if you count down to post #9, houchou has a solution: it worked for him and others; we can only point you to that;


As Java intermediate programmer how can i contribute to Ubuntu?

Look at these links to help you get started with contributing to Ubuntu:

https://community.ubuntu.com/t/contribute/26

https://wiki.ubuntu.com/ContributeToUbuntu

https://wiki.ubuntu.com/UbuntuDevelopers


I spent a whole morning fixing this, tried all different solutions, when I type go version, it's still there, really annoying...

Thank bloody frigging god, this worked for me.

sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go

Check this original post :D


Install a virtual machine manager, such as VMPlayer or VirtualBox, load Ubuntu 16.04 into that, and  within the virtual machine test all of your applications.


sysctl.conf open and I can't write in it, it goes boing boing boing

Well, that's your editor that's making that noise, probably because you don't have write access to that file.

I'd suggest using sudo nano /etc/sysctl.conf from the terminal.  (Or if you're more familiar with vim, use vim instead of nano.)

/etc/sysctl.conf is only writeable by the root users (for obvious reasons).  So you need to use 'sudo' to act as the root user (super user).